]>
Commit | Line | Data |
---|---|---|
d6e9fb05 | 1 | #! /bin/sh |
d6e9fb05 | 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 | # |
d6e9fb05 JK |
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' | |
bec39cab | 50 | else |
81ecdfbb RW |
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 | |
301 | ||
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 | |
bec39cab | 418 | |
81ecdfbb RW |
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 | |
dae5f5cf DJ |
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 | |
b80864fb | 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 | |
dae5f5cf | 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' |
dae5f5cf | 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 | |
d6e9fb05 | 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 | |
bec39cab AC |
559 | |
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 | # | |
d6e9fb05 | 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= | |
dae5f5cf | 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 | 584 | |
feacfcac | 585 | ac_unique_file="server.cc" |
bec39cab AC |
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 | ||
05ea2a05 | 622 | ac_header_list= |
c971b7fa | 623 | ac_subst_vars='LTLIBOBJS |
698b3e08 | 624 | LIBOBJS |
c9a1864a | 625 | GNULIB_STDINT_H |
fa593d66 PA |
626 | extra_libraries |
627 | IPA_DEPFILES | |
81ecdfbb RW |
628 | srv_xmlfiles |
629 | srv_xmlbuiltin | |
81ecdfbb RW |
630 | GDBSERVER_LIBS |
631 | GDBSERVER_DEPFILES | |
632 | RDYNAMIC | |
633 | REPORT_BUGS_TEXI | |
634 | REPORT_BUGS_TO | |
635 | PKGVERSION | |
d4596a3d PA |
636 | WERROR_CFLAGS |
637 | WARN_CFLAGS | |
0fb4aa4b PA |
638 | ustinc |
639 | ustlibs | |
db6878ac SM |
640 | CCDEPMODE |
641 | CONFIG_SRC_SUBDIR | |
9a665d62 TT |
642 | CATOBJEXT |
643 | GENCAT | |
644 | INSTOBJEXT | |
645 | DATADIRNAME | |
646 | CATALOGS | |
647 | POSUB | |
648 | GMSGFMT | |
649 | XGETTEXT | |
650 | INCINTL | |
651 | LIBINTL_DEP | |
652 | LIBINTL | |
653 | USE_NLS | |
db6878ac SM |
654 | DEPDIR |
655 | am__leading_dot | |
656 | host_noncanonical | |
657 | target_noncanonical | |
4635ff97 | 658 | WIN32APILIBS |
8b35ed1f SM |
659 | LTLIBXXHASH |
660 | LIBXXHASH | |
661 | HAVE_LIBXXHASH | |
05ea2a05 TT |
662 | LTLIBIPT |
663 | LIBIPT | |
664 | HAVE_LIBIPT | |
5e030278 TT |
665 | PTHREAD_CFLAGS |
666 | PTHREAD_LIBS | |
667 | PTHREAD_CC | |
668 | ax_pthread_config | |
669 | SED | |
9c232dda | 670 | ALLOCA |
0bcda685 PA |
671 | CXX_DIALECT |
672 | HAVE_CXX11 | |
c971b7fa | 673 | RANLIB |
e1d2394b | 674 | AR |
81ecdfbb RW |
675 | INSTALL_DATA |
676 | INSTALL_SCRIPT | |
677 | INSTALL_PROGRAM | |
678 | target_os | |
679 | target_vendor | |
680 | target_cpu | |
681 | target | |
682 | host_os | |
683 | host_vendor | |
684 | host_cpu | |
685 | host | |
686 | build_os | |
687 | build_vendor | |
688 | build_cpu | |
689 | build | |
bdaed379 HD |
690 | INSTALL_STRIP_PROGRAM |
691 | STRIP | |
692 | install_sh | |
770d76d7 PA |
693 | EGREP |
694 | GREP | |
695 | CPP | |
3bc3d82a PA |
696 | ac_ct_CXX |
697 | CXXFLAGS | |
698 | CXX | |
81ecdfbb RW |
699 | OBJEXT |
700 | EXEEXT | |
701 | ac_ct_CC | |
702 | CPPFLAGS | |
703 | LDFLAGS | |
704 | CFLAGS | |
705 | CC | |
c9a1864a YQ |
706 | MAINT |
707 | MAINTAINER_MODE_FALSE | |
708 | MAINTAINER_MODE_TRUE | |
81ecdfbb RW |
709 | target_alias |
710 | host_alias | |
711 | build_alias | |
712 | LIBS | |
713 | ECHO_T | |
714 | ECHO_N | |
715 | ECHO_C | |
716 | DEFS | |
717 | mandir | |
718 | localedir | |
719 | libdir | |
720 | psdir | |
721 | pdfdir | |
722 | dvidir | |
723 | htmldir | |
724 | infodir | |
725 | docdir | |
726 | oldincludedir | |
727 | includedir | |
728 | localstatedir | |
729 | sharedstatedir | |
730 | sysconfdir | |
731 | datadir | |
732 | datarootdir | |
733 | libexecdir | |
734 | sbindir | |
735 | bindir | |
736 | program_transform_name | |
737 | prefix | |
738 | exec_prefix | |
739 | PACKAGE_URL | |
740 | PACKAGE_BUGREPORT | |
741 | PACKAGE_STRING | |
742 | PACKAGE_VERSION | |
743 | PACKAGE_TARNAME | |
744 | PACKAGE_NAME | |
745 | PATH_SEPARATOR | |
746 | SHELL' | |
bec39cab | 747 | ac_subst_files='' |
81ecdfbb RW |
748 | ac_user_opts=' |
749 | enable_option_checking | |
c9a1864a | 750 | enable_maintainer_mode |
589bc927 | 751 | enable_largefile |
261b0748 | 752 | enable_threading |
05ea2a05 TT |
753 | with_intel_pt |
754 | with_gnu_ld | |
755 | enable_rpath | |
756 | with_libipt_prefix | |
9f1528a1 | 757 | with_libipt_type |
8b35ed1f SM |
758 | with_xxhash |
759 | with_libxxhash_prefix | |
760 | with_libxxhash_type | |
db6878ac | 761 | enable_unit_tests |
0fb4aa4b PA |
762 | with_ust |
763 | with_ust_include | |
764 | with_ust_lib | |
d4596a3d | 765 | enable_werror |
8f13a3ce MF |
766 | enable_build_warnings |
767 | enable_gdb_build_warnings | |
81ecdfbb RW |
768 | with_pkgversion |
769 | with_bugurl | |
96f15937 | 770 | with_libthread_db |
c2a66c29 | 771 | enable_inprocess_agent |
81ecdfbb RW |
772 | ' |
773 | ac_precious_vars='build_alias | |
774 | host_alias | |
775 | target_alias | |
776 | CC | |
777 | CFLAGS | |
778 | LDFLAGS | |
779 | LIBS | |
780 | CPPFLAGS | |
3bc3d82a PA |
781 | CXX |
782 | CXXFLAGS | |
783 | CCC | |
81ecdfbb RW |
784 | CPP' |
785 | ||
d6e9fb05 JK |
786 | |
787 | # Initialize some variables set by options. | |
bec39cab AC |
788 | ac_init_help= |
789 | ac_init_version=false | |
81ecdfbb RW |
790 | ac_unrecognized_opts= |
791 | ac_unrecognized_sep= | |
d6e9fb05 JK |
792 | # The variables have the same names as the options, with |
793 | # dashes changed to underlines. | |
bec39cab | 794 | cache_file=/dev/null |
d6e9fb05 | 795 | exec_prefix=NONE |
d6e9fb05 | 796 | no_create= |
d6e9fb05 JK |
797 | no_recursion= |
798 | prefix=NONE | |
799 | program_prefix=NONE | |
800 | program_suffix=NONE | |
801 | program_transform_name=s,x,x, | |
802 | silent= | |
803 | site= | |
804 | srcdir= | |
d6e9fb05 JK |
805 | verbose= |
806 | x_includes=NONE | |
807 | x_libraries=NONE | |
bec39cab AC |
808 | |
809 | # Installation directory options. | |
810 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
811 | # and all the variables that are supposed to be based on exec_prefix | |
812 | # by default will actually change. | |
813 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 814 | # (The list follows the same order as the GNU Coding Standards.) |
d6e9fb05 JK |
815 | bindir='${exec_prefix}/bin' |
816 | sbindir='${exec_prefix}/sbin' | |
817 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
818 | datarootdir='${prefix}/share' |
819 | datadir='${datarootdir}' | |
d6e9fb05 JK |
820 | sysconfdir='${prefix}/etc' |
821 | sharedstatedir='${prefix}/com' | |
822 | localstatedir='${prefix}/var' | |
d6e9fb05 JK |
823 | includedir='${prefix}/include' |
824 | oldincludedir='/usr/include' | |
81ecdfbb RW |
825 | docdir='${datarootdir}/doc/${PACKAGE}' |
826 | infodir='${datarootdir}/info' | |
827 | htmldir='${docdir}' | |
828 | dvidir='${docdir}' | |
829 | pdfdir='${docdir}' | |
830 | psdir='${docdir}' | |
831 | libdir='${exec_prefix}/lib' | |
832 | localedir='${datarootdir}/locale' | |
833 | mandir='${datarootdir}/man' | |
d6e9fb05 | 834 | |
d6e9fb05 | 835 | ac_prev= |
81ecdfbb | 836 | ac_dashdash= |
d6e9fb05 JK |
837 | for ac_option |
838 | do | |
d6e9fb05 JK |
839 | # If the previous option needs an argument, assign it. |
840 | if test -n "$ac_prev"; then | |
81ecdfbb | 841 | eval $ac_prev=\$ac_option |
d6e9fb05 JK |
842 | ac_prev= |
843 | continue | |
844 | fi | |
845 | ||
81ecdfbb | 846 | case $ac_option in |
d0ac1c44 SM |
847 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
848 | *=) ac_optarg= ;; | |
849 | *) ac_optarg=yes ;; | |
81ecdfbb | 850 | esac |
d6e9fb05 JK |
851 | |
852 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
853 | ||
81ecdfbb RW |
854 | case $ac_dashdash$ac_option in |
855 | --) | |
856 | ac_dashdash=yes ;; | |
d6e9fb05 JK |
857 | |
858 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
859 | ac_prev=bindir ;; | |
860 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 861 | bindir=$ac_optarg ;; |
d6e9fb05 JK |
862 | |
863 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 864 | ac_prev=build_alias ;; |
d6e9fb05 | 865 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 866 | build_alias=$ac_optarg ;; |
d6e9fb05 JK |
867 | |
868 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
869 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
870 | ac_prev=cache_file ;; | |
871 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
872 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
873 | cache_file=$ac_optarg ;; |
874 | ||
875 | --config-cache | -C) | |
876 | cache_file=config.cache ;; | |
d6e9fb05 | 877 | |
81ecdfbb | 878 | -datadir | --datadir | --datadi | --datad) |
d6e9fb05 | 879 | ac_prev=datadir ;; |
81ecdfbb | 880 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 881 | datadir=$ac_optarg ;; |
d6e9fb05 | 882 | |
81ecdfbb RW |
883 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
884 | | --dataroo | --dataro | --datar) | |
885 | ac_prev=datarootdir ;; | |
886 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
887 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
888 | datarootdir=$ac_optarg ;; | |
889 | ||
d6e9fb05 | 890 | -disable-* | --disable-*) |
81ecdfbb | 891 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
d6e9fb05 | 892 | # Reject names that are not valid shell variable names. |
81ecdfbb | 893 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 894 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
895 | ac_useropt_orig=$ac_useropt |
896 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
897 | case $ac_user_opts in | |
898 | *" | |
899 | "enable_$ac_useropt" | |
900 | "*) ;; | |
901 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
902 | ac_unrecognized_sep=', ';; | |
903 | esac | |
904 | eval enable_$ac_useropt=no ;; | |
905 | ||
906 | -docdir | --docdir | --docdi | --doc | --do) | |
907 | ac_prev=docdir ;; | |
908 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
909 | docdir=$ac_optarg ;; | |
910 | ||
911 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
912 | ac_prev=dvidir ;; | |
913 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
914 | dvidir=$ac_optarg ;; | |
d6e9fb05 JK |
915 | |
916 | -enable-* | --enable-*) | |
81ecdfbb | 917 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
d6e9fb05 | 918 | # Reject names that are not valid shell variable names. |
81ecdfbb | 919 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 920 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
921 | ac_useropt_orig=$ac_useropt |
922 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
923 | case $ac_user_opts in | |
924 | *" | |
925 | "enable_$ac_useropt" | |
926 | "*) ;; | |
927 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
928 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 929 | esac |
81ecdfbb | 930 | eval enable_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
931 | |
932 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
933 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
934 | | --exec | --exe | --ex) | |
935 | ac_prev=exec_prefix ;; | |
936 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
937 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
938 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 939 | exec_prefix=$ac_optarg ;; |
d6e9fb05 JK |
940 | |
941 | -gas | --gas | --ga | --g) | |
942 | # Obsolete; use --with-gas. | |
943 | with_gas=yes ;; | |
944 | ||
bec39cab AC |
945 | -help | --help | --hel | --he | -h) |
946 | ac_init_help=long ;; | |
947 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
948 | ac_init_help=recursive ;; | |
949 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
950 | ac_init_help=short ;; | |
d6e9fb05 JK |
951 | |
952 | -host | --host | --hos | --ho) | |
bec39cab | 953 | ac_prev=host_alias ;; |
d6e9fb05 | 954 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 955 | host_alias=$ac_optarg ;; |
d6e9fb05 | 956 | |
81ecdfbb RW |
957 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
958 | ac_prev=htmldir ;; | |
959 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
960 | | --ht=*) | |
961 | htmldir=$ac_optarg ;; | |
962 | ||
d6e9fb05 JK |
963 | -includedir | --includedir | --includedi | --included | --include \ |
964 | | --includ | --inclu | --incl | --inc) | |
965 | ac_prev=includedir ;; | |
966 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
967 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 968 | includedir=$ac_optarg ;; |
d6e9fb05 JK |
969 | |
970 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
971 | ac_prev=infodir ;; | |
972 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 973 | infodir=$ac_optarg ;; |
d6e9fb05 JK |
974 | |
975 | -libdir | --libdir | --libdi | --libd) | |
976 | ac_prev=libdir ;; | |
977 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 978 | libdir=$ac_optarg ;; |
d6e9fb05 JK |
979 | |
980 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
981 | | --libexe | --libex | --libe) | |
982 | ac_prev=libexecdir ;; | |
983 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
984 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 985 | libexecdir=$ac_optarg ;; |
d6e9fb05 | 986 | |
81ecdfbb RW |
987 | -localedir | --localedir | --localedi | --localed | --locale) |
988 | ac_prev=localedir ;; | |
989 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
990 | localedir=$ac_optarg ;; | |
991 | ||
d6e9fb05 | 992 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 993 | | --localstate | --localstat | --localsta | --localst | --locals) |
d6e9fb05 JK |
994 | ac_prev=localstatedir ;; |
995 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 996 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 997 | localstatedir=$ac_optarg ;; |
d6e9fb05 JK |
998 | |
999 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1000 | ac_prev=mandir ;; | |
1001 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1002 | mandir=$ac_optarg ;; |
d6e9fb05 JK |
1003 | |
1004 | -nfp | --nfp | --nf) | |
1005 | # Obsolete; use --without-fp. | |
1006 | with_fp=no ;; | |
1007 | ||
1008 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1009 | | --no-cr | --no-c | -n) |
d6e9fb05 JK |
1010 | no_create=yes ;; |
1011 | ||
1012 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1013 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1014 | no_recursion=yes ;; | |
1015 | ||
1016 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1017 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1018 | | --oldin | --oldi | --old | --ol | --o) | |
1019 | ac_prev=oldincludedir ;; | |
1020 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1021 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1022 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1023 | oldincludedir=$ac_optarg ;; |
d6e9fb05 JK |
1024 | |
1025 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1026 | ac_prev=prefix ;; | |
1027 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1028 | prefix=$ac_optarg ;; |
d6e9fb05 JK |
1029 | |
1030 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1031 | | --program-pre | --program-pr | --program-p) | |
1032 | ac_prev=program_prefix ;; | |
1033 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1034 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1035 | program_prefix=$ac_optarg ;; |
d6e9fb05 JK |
1036 | |
1037 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1038 | | --program-suf | --program-su | --program-s) | |
1039 | ac_prev=program_suffix ;; | |
1040 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1041 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1042 | program_suffix=$ac_optarg ;; |
d6e9fb05 JK |
1043 | |
1044 | -program-transform-name | --program-transform-name \ | |
1045 | | --program-transform-nam | --program-transform-na \ | |
1046 | | --program-transform-n | --program-transform- \ | |
1047 | | --program-transform | --program-transfor \ | |
1048 | | --program-transfo | --program-transf \ | |
1049 | | --program-trans | --program-tran \ | |
1050 | | --progr-tra | --program-tr | --program-t) | |
1051 | ac_prev=program_transform_name ;; | |
1052 | -program-transform-name=* | --program-transform-name=* \ | |
1053 | | --program-transform-nam=* | --program-transform-na=* \ | |
1054 | | --program-transform-n=* | --program-transform-=* \ | |
1055 | | --program-transform=* | --program-transfor=* \ | |
1056 | | --program-transfo=* | --program-transf=* \ | |
1057 | | --program-trans=* | --program-tran=* \ | |
1058 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1059 | program_transform_name=$ac_optarg ;; |
d6e9fb05 | 1060 | |
81ecdfbb RW |
1061 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1062 | ac_prev=pdfdir ;; | |
1063 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1064 | pdfdir=$ac_optarg ;; | |
1065 | ||
1066 | -psdir | --psdir | --psdi | --psd | --ps) | |
1067 | ac_prev=psdir ;; | |
1068 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1069 | psdir=$ac_optarg ;; | |
1070 | ||
d6e9fb05 JK |
1071 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1072 | | -silent | --silent | --silen | --sile | --sil) | |
1073 | silent=yes ;; | |
1074 | ||
1075 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1076 | ac_prev=sbindir ;; | |
1077 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1078 | | --sbi=* | --sb=*) | |
bec39cab | 1079 | sbindir=$ac_optarg ;; |
d6e9fb05 JK |
1080 | |
1081 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1082 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1083 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1084 | | --sha | --sh) | |
1085 | ac_prev=sharedstatedir ;; | |
1086 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1087 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1088 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1089 | | --sha=* | --sh=*) | |
bec39cab | 1090 | sharedstatedir=$ac_optarg ;; |
d6e9fb05 JK |
1091 | |
1092 | -site | --site | --sit) | |
1093 | ac_prev=site ;; | |
1094 | -site=* | --site=* | --sit=*) | |
bec39cab | 1095 | site=$ac_optarg ;; |
434c4c77 | 1096 | |
d6e9fb05 JK |
1097 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1098 | ac_prev=srcdir ;; | |
1099 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1100 | srcdir=$ac_optarg ;; |
d6e9fb05 JK |
1101 | |
1102 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1103 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1104 | ac_prev=sysconfdir ;; | |
1105 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1106 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1107 | sysconfdir=$ac_optarg ;; |
d6e9fb05 JK |
1108 | |
1109 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1110 | ac_prev=target_alias ;; |
d6e9fb05 | 1111 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1112 | target_alias=$ac_optarg ;; |
d6e9fb05 JK |
1113 | |
1114 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1115 | verbose=yes ;; | |
1116 | ||
bec39cab AC |
1117 | -version | --version | --versio | --versi | --vers | -V) |
1118 | ac_init_version=: ;; | |
d6e9fb05 JK |
1119 | |
1120 | -with-* | --with-*) | |
81ecdfbb | 1121 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
d6e9fb05 | 1122 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1123 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1124 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1125 | ac_useropt_orig=$ac_useropt |
1126 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1127 | case $ac_user_opts in | |
1128 | *" | |
1129 | "with_$ac_useropt" | |
1130 | "*) ;; | |
1131 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1132 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 1133 | esac |
81ecdfbb | 1134 | eval with_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
1135 | |
1136 | -without-* | --without-*) | |
81ecdfbb | 1137 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
d6e9fb05 | 1138 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1139 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1140 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1141 | ac_useropt_orig=$ac_useropt |
1142 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1143 | case $ac_user_opts in | |
1144 | *" | |
1145 | "with_$ac_useropt" | |
1146 | "*) ;; | |
1147 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1148 | ac_unrecognized_sep=', ';; | |
1149 | esac | |
1150 | eval with_$ac_useropt=no ;; | |
d6e9fb05 JK |
1151 | |
1152 | --x) | |
1153 | # Obsolete; use --with-x. | |
1154 | with_x=yes ;; | |
1155 | ||
1156 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1157 | | --x-incl | --x-inc | --x-in | --x-i) | |
1158 | ac_prev=x_includes ;; | |
1159 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1160 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1161 | x_includes=$ac_optarg ;; |
d6e9fb05 JK |
1162 | |
1163 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1164 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1165 | ac_prev=x_libraries ;; | |
1166 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1167 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1168 | x_libraries=$ac_optarg ;; |
d6e9fb05 | 1169 | |
d0ac1c44 SM |
1170 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1171 | Try \`$0 --help' for more information" | |
d6e9fb05 JK |
1172 | ;; |
1173 | ||
bec39cab AC |
1174 | *=*) |
1175 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1176 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1177 | case $ac_envvar in #( |
1178 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1179 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1180 | esac |
1181 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1182 | export $ac_envvar ;; |
1183 | ||
d6e9fb05 | 1184 | *) |
bec39cab | 1185 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1186 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1187 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1188 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1189 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
d6e9fb05 JK |
1190 | ;; |
1191 | ||
1192 | esac | |
1193 | done | |
1194 | ||
1195 | if test -n "$ac_prev"; then | |
bec39cab | 1196 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1197 | as_fn_error $? "missing argument to $ac_option" |
d6e9fb05 | 1198 | fi |
d6e9fb05 | 1199 | |
81ecdfbb RW |
1200 | if test -n "$ac_unrecognized_opts"; then |
1201 | case $enable_option_checking in | |
1202 | no) ;; | |
d0ac1c44 | 1203 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1204 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
dae5f5cf | 1205 | esac |
81ecdfbb | 1206 | fi |
dae5f5cf | 1207 | |
81ecdfbb RW |
1208 | # Check all directory arguments for consistency. |
1209 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1210 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1211 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1212 | libdir localedir mandir | |
dae5f5cf | 1213 | do |
81ecdfbb RW |
1214 | eval ac_val=\$$ac_var |
1215 | # Remove trailing slashes. | |
1216 | case $ac_val in | |
1217 | */ ) | |
1218 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1219 | eval $ac_var=\$ac_val;; | |
1220 | esac | |
1221 | # Be sure to have absolute directory names. | |
dae5f5cf | 1222 | case $ac_val in |
81ecdfbb RW |
1223 | [\\/$]* | ?:[\\/]* ) continue;; |
1224 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
d6e9fb05 | 1225 | esac |
d0ac1c44 | 1226 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
d6e9fb05 JK |
1227 | done |
1228 | ||
bec39cab AC |
1229 | # There might be people who depend on the old broken behavior: `$host' |
1230 | # used to hold the argument of --host etc. | |
1231 | # FIXME: To remove some day. | |
1232 | build=$build_alias | |
1233 | host=$host_alias | |
1234 | target=$target_alias | |
1235 | ||
1236 | # FIXME: To remove some day. | |
1237 | if test "x$host_alias" != x; then | |
1238 | if test "x$build_alias" = x; then | |
1239 | cross_compiling=maybe | |
bec39cab AC |
1240 | elif test "x$build_alias" != "x$host_alias"; then |
1241 | cross_compiling=yes | |
1242 | fi | |
1243 | fi | |
d6e9fb05 | 1244 | |
bec39cab AC |
1245 | ac_tool_prefix= |
1246 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1247 | ||
1248 | test "$silent" = yes && exec 6>/dev/null | |
d6e9fb05 | 1249 | |
d6e9fb05 | 1250 | |
81ecdfbb RW |
1251 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1252 | ac_ls_di=`ls -di .` && | |
1253 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1254 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1255 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1256 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1257 | |
1258 | ||
d6e9fb05 JK |
1259 | # Find the source files, if location was not specified. |
1260 | if test -z "$srcdir"; then | |
1261 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1262 | # Try the directory containing this script, then the parent directory. |
1263 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1264 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1265 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1266 | X"$as_myself" : 'X\(//\)$' \| \ | |
1267 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1268 | $as_echo X"$as_myself" | | |
1269 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1270 | s//\1/ | |
1271 | q | |
1272 | } | |
1273 | /^X\(\/\/\)[^/].*/{ | |
1274 | s//\1/ | |
1275 | q | |
1276 | } | |
1277 | /^X\(\/\/\)$/{ | |
1278 | s//\1/ | |
1279 | q | |
1280 | } | |
1281 | /^X\(\/\).*/{ | |
1282 | s//\1/ | |
1283 | q | |
1284 | } | |
1285 | s/.*/./; q'` | |
d6e9fb05 | 1286 | srcdir=$ac_confdir |
81ecdfbb | 1287 | if test ! -r "$srcdir/$ac_unique_file"; then |
d6e9fb05 JK |
1288 | srcdir=.. |
1289 | fi | |
1290 | else | |
1291 | ac_srcdir_defaulted=no | |
1292 | fi | |
81ecdfbb RW |
1293 | if test ! -r "$srcdir/$ac_unique_file"; then |
1294 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1295 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1296 | fi |
1297 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1298 | ac_abs_confdir=`( | |
d0ac1c44 | 1299 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1300 | pwd)` |
1301 | # When building in place, set srcdir=. | |
1302 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1303 | srcdir=. | |
1304 | fi | |
1305 | # Remove unnecessary trailing slashes from srcdir. | |
1306 | # Double slashes in file names in object file debugging info | |
1307 | # mess up M-x gdb in Emacs. | |
1308 | case $srcdir in | |
1309 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1310 | esac | |
1311 | for ac_var in $ac_precious_vars; do | |
1312 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1313 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1314 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1315 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1316 | done | |
d6e9fb05 | 1317 | |
bec39cab AC |
1318 | # |
1319 | # Report the --help message. | |
1320 | # | |
1321 | if test "$ac_init_help" = "long"; then | |
1322 | # Omit some internal or obsolete options to make the list less imposing. | |
1323 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1324 | cat <<_ACEOF | |
1325 | \`configure' configures this package to adapt to many kinds of systems. | |
1326 | ||
1327 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1328 | ||
1329 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1330 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1331 | ||
1332 | Defaults for the options are specified in brackets. | |
1333 | ||
1334 | Configuration: | |
1335 | -h, --help display this help and exit | |
1336 | --help=short display options specific to this package | |
1337 | --help=recursive display the short help of all the included packages | |
1338 | -V, --version display version information and exit | |
d0ac1c44 | 1339 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1340 | --cache-file=FILE cache test results in FILE [disabled] |
1341 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1342 | -n, --no-create do not create output files | |
1343 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1344 | ||
bec39cab AC |
1345 | Installation directories: |
1346 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1347 | [$ac_default_prefix] |
bec39cab | 1348 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1349 | [PREFIX] |
bec39cab AC |
1350 | |
1351 | By default, \`make install' will install all the files in | |
1352 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1353 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1354 | for instance \`--prefix=\$HOME'. | |
1355 | ||
1356 | For better control, use the options below. | |
1357 | ||
1358 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1359 | --bindir=DIR user executables [EPREFIX/bin] |
1360 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1361 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1362 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1363 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1364 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1365 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1366 | --includedir=DIR C header files [PREFIX/include] | |
1367 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1368 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1369 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1370 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1371 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1372 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1373 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1374 | --htmldir=DIR html documentation [DOCDIR] | |
1375 | --dvidir=DIR dvi documentation [DOCDIR] | |
1376 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1377 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1378 | _ACEOF |
1379 | ||
1380 | cat <<\_ACEOF | |
1381 | ||
dcdb98d2 DJ |
1382 | Program names: |
1383 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1384 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1385 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1386 | ||
bec39cab AC |
1387 | System types: |
1388 | --build=BUILD configure for building on BUILD [guessed] | |
1389 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1390 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1391 | _ACEOF | |
1392 | fi | |
1393 | ||
1394 | if test -n "$ac_init_help"; then | |
1395 | ||
1396 | cat <<\_ACEOF | |
1397 | ||
d4596a3d PA |
1398 | Optional Features: |
1399 | --disable-option-checking ignore unrecognized --enable/--with options | |
1400 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1401 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1402 | --enable-maintainer-mode |
1403 | enable make rules and dependencies not useful (and | |
1404 | sometimes confusing) to the casual installer | |
589bc927 | 1405 | --disable-largefile omit support for large files |
261b0748 LM |
1406 | --enable-threading include support for parallel processing of data |
1407 | (yes/no) | |
db6878ac | 1408 | --disable-rpath do not hardcode runtime library paths |
8ecfd7bd SDJ |
1409 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1410 | GDB | |
d4596a3d | 1411 | --enable-werror treat compile warnings as errors |
8f13a3ce MF |
1412 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
1413 | --enable-gdb-build-warnings | |
1414 | enable GDB specific build-time compiler warnings if | |
1415 | gcc is used | |
c2a66c29 NS |
1416 | --enable-inprocess-agent |
1417 | inprocess agent | |
d4596a3d | 1418 | |
c16158bc JM |
1419 | Optional Packages: |
1420 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1421 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
05ea2a05 TT |
1422 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
1423 | --with-gnu-ld assume the C compiler uses GNU ld default=no | |
1424 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib | |
1425 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1426 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
8b35ed1f SM |
1427 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1428 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1429 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
1430 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) | |
0fb4aa4b PA |
1431 | --with-ust=PATH Specify prefix directory for the installed UST package |
1432 | Equivalent to --with-ust-include=PATH/include | |
1433 | plus --with-ust-lib=PATH/lib | |
1434 | --with-ust-include=PATH Specify directory for installed UST include files | |
1435 | --with-ust-lib=PATH Specify the directory for the installed UST library | |
c16158bc JM |
1436 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1437 | --with-bugurl=URL Direct users to URL to report a bug | |
96f15937 PP |
1438 | --with-libthread-db=PATH |
1439 | use given libthread_db directly | |
c16158bc | 1440 | |
bec39cab AC |
1441 | Some influential environment variables: |
1442 | CC C compiler command | |
1443 | CFLAGS C compiler flags | |
1444 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1445 | nonstandard directory <lib dir> | |
81ecdfbb | 1446 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1447 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1448 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1449 | CXX C++ compiler command |
1450 | CXXFLAGS C++ compiler flags | |
bec39cab AC |
1451 | CPP C preprocessor |
1452 | ||
1453 | Use these variables to override the choices made by `configure' or to help | |
1454 | it to find libraries and programs with nonstandard names/locations. | |
1455 | ||
81ecdfbb | 1456 | Report bugs to the package provider. |
bec39cab | 1457 | _ACEOF |
81ecdfbb | 1458 | ac_status=$? |
bec39cab AC |
1459 | fi |
1460 | ||
1461 | if test "$ac_init_help" = "recursive"; then | |
1462 | # If there are subdirs, report their specific --help. | |
bec39cab | 1463 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1464 | test -d "$ac_dir" || |
1465 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1466 | continue | |
bec39cab AC |
1467 | ac_builddir=. |
1468 | ||
81ecdfbb RW |
1469 | case "$ac_dir" in |
1470 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1471 | *) | |
1472 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1473 | # A ".." for each directory in $ac_dir_suffix. | |
1474 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1475 | case $ac_top_builddir_sub in | |
1476 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1477 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1478 | esac ;; | |
1479 | esac | |
1480 | ac_abs_top_builddir=$ac_pwd | |
1481 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1482 | # for backward compatibility: | |
1483 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1484 | |
1485 | case $srcdir in | |
81ecdfbb | 1486 | .) # We are building in place. |
bec39cab | 1487 | ac_srcdir=. |
81ecdfbb RW |
1488 | ac_top_srcdir=$ac_top_builddir_sub |
1489 | ac_abs_top_srcdir=$ac_pwd ;; | |
1490 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1491 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1492 | ac_top_srcdir=$srcdir |
1493 | ac_abs_top_srcdir=$srcdir ;; | |
1494 | *) # Relative name. | |
1495 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1496 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1497 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
dae5f5cf | 1498 | esac |
81ecdfbb RW |
1499 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1500 | ||
1501 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1502 | # Check for guested configure. | |
1503 | if test -f "$ac_srcdir/configure.gnu"; then | |
1504 | echo && | |
1505 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1506 | elif test -f "$ac_srcdir/configure"; then | |
1507 | echo && | |
1508 | $SHELL "$ac_srcdir/configure" --help=recursive | |
434c4c77 | 1509 | else |
81ecdfbb RW |
1510 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1511 | fi || ac_status=$? | |
1512 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1513 | done |
1514 | fi | |
1515 | ||
81ecdfbb | 1516 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1517 | if $ac_init_version; then |
1518 | cat <<\_ACEOF | |
81ecdfbb | 1519 | configure |
d0ac1c44 | 1520 | generated by GNU Autoconf 2.69 |
bec39cab | 1521 | |
d0ac1c44 | 1522 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1523 | This configure script is free software; the Free Software Foundation |
1524 | gives unlimited permission to copy, distribute and modify it. | |
1525 | _ACEOF | |
81ecdfbb | 1526 | exit |
bec39cab | 1527 | fi |
bec39cab | 1528 | |
81ecdfbb RW |
1529 | ## ------------------------ ## |
1530 | ## Autoconf initialization. ## | |
1531 | ## ------------------------ ## | |
bec39cab | 1532 | |
81ecdfbb RW |
1533 | # ac_fn_c_try_compile LINENO |
1534 | # -------------------------- | |
1535 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1536 | ac_fn_c_try_compile () | |
bec39cab | 1537 | { |
81ecdfbb RW |
1538 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1539 | rm -f conftest.$ac_objext | |
1540 | if { { ac_try="$ac_compile" | |
1541 | case "(($ac_try" in | |
1542 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1543 | *) ac_try_echo=$ac_try;; | |
1544 | esac | |
1545 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1546 | $as_echo "$ac_try_echo"; } >&5 | |
1547 | (eval "$ac_compile") 2>conftest.err | |
1548 | ac_status=$? | |
1549 | if test -s conftest.err; then | |
1550 | grep -v '^ *+' conftest.err >conftest.er1 | |
1551 | cat conftest.er1 >&5 | |
1552 | mv -f conftest.er1 conftest.err | |
1553 | fi | |
1554 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1555 | test $ac_status = 0; } && { | |
1556 | test -z "$ac_c_werror_flag" || | |
1557 | test ! -s conftest.err | |
1558 | } && test -s conftest.$ac_objext; then : | |
1559 | ac_retval=0 | |
1560 | else | |
1561 | $as_echo "$as_me: failed program was:" >&5 | |
1562 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1563 | |
81ecdfbb RW |
1564 | ac_retval=1 |
1565 | fi | |
d0ac1c44 SM |
1566 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1567 | as_fn_set_status $ac_retval | |
bec39cab | 1568 | |
81ecdfbb | 1569 | } # ac_fn_c_try_compile |
bec39cab | 1570 | |
3bc3d82a PA |
1571 | # ac_fn_cxx_try_compile LINENO |
1572 | # ---------------------------- | |
1573 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1574 | ac_fn_cxx_try_compile () | |
1575 | { | |
1576 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1577 | rm -f conftest.$ac_objext | |
1578 | if { { ac_try="$ac_compile" | |
1579 | case "(($ac_try" in | |
1580 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1581 | *) ac_try_echo=$ac_try;; | |
1582 | esac | |
1583 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1584 | $as_echo "$ac_try_echo"; } >&5 | |
1585 | (eval "$ac_compile") 2>conftest.err | |
1586 | ac_status=$? | |
1587 | if test -s conftest.err; then | |
1588 | grep -v '^ *+' conftest.err >conftest.er1 | |
1589 | cat conftest.er1 >&5 | |
1590 | mv -f conftest.er1 conftest.err | |
1591 | fi | |
1592 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1593 | test $ac_status = 0; } && { | |
1594 | test -z "$ac_cxx_werror_flag" || | |
1595 | test ! -s conftest.err | |
1596 | } && test -s conftest.$ac_objext; then : | |
1597 | ac_retval=0 | |
1598 | else | |
1599 | $as_echo "$as_me: failed program was:" >&5 | |
1600 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1601 | ||
1602 | ac_retval=1 | |
1603 | fi | |
d0ac1c44 SM |
1604 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1605 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1606 | |
1607 | } # ac_fn_cxx_try_compile | |
1608 | ||
81ecdfbb RW |
1609 | # ac_fn_c_try_cpp LINENO |
1610 | # ---------------------- | |
1611 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1612 | ac_fn_c_try_cpp () | |
1613 | { | |
1614 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1615 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1616 | case "(($ac_try" in | |
1617 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1618 | *) ac_try_echo=$ac_try;; | |
1619 | esac | |
1620 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1621 | $as_echo "$ac_try_echo"; } >&5 | |
1622 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1623 | ac_status=$? | |
1624 | if test -s conftest.err; then | |
1625 | grep -v '^ *+' conftest.err >conftest.er1 | |
1626 | cat conftest.er1 >&5 | |
1627 | mv -f conftest.er1 conftest.err | |
1628 | fi | |
1629 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1630 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1631 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1632 | test ! -s conftest.err | |
1633 | }; then : | |
1634 | ac_retval=0 | |
1635 | else | |
1636 | $as_echo "$as_me: failed program was:" >&5 | |
1637 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1638 | |
81ecdfbb RW |
1639 | ac_retval=1 |
1640 | fi | |
d0ac1c44 SM |
1641 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1642 | as_fn_set_status $ac_retval | |
bec39cab | 1643 | |
81ecdfbb RW |
1644 | } # ac_fn_c_try_cpp |
1645 | ||
1646 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1647 | # ------------------------------------------------------- | |
1648 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1649 | # the include files in INCLUDES and setting the cache variable VAR | |
1650 | # accordingly. | |
1651 | ac_fn_c_check_header_mongrel () | |
1652 | { | |
1653 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1654 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1656 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1657 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1658 | $as_echo_n "(cached) " >&6 |
1659 | fi | |
1660 | eval ac_res=\$$3 | |
1661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1662 | $as_echo "$ac_res" >&6; } | |
1663 | else | |
1664 | # Is the header compilable? | |
1665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1666 | $as_echo_n "checking $2 usability... " >&6; } | |
1667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1668 | /* end confdefs.h. */ | |
1669 | $4 | |
1670 | #include <$2> | |
1671 | _ACEOF | |
1672 | if ac_fn_c_try_compile "$LINENO"; then : | |
1673 | ac_header_compiler=yes | |
1674 | else | |
1675 | ac_header_compiler=no | |
1676 | fi | |
1677 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1679 | $as_echo "$ac_header_compiler" >&6; } | |
1680 | ||
1681 | # Is the header present? | |
1682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1683 | $as_echo_n "checking $2 presence... " >&6; } | |
1684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1685 | /* end confdefs.h. */ | |
1686 | #include <$2> | |
1687 | _ACEOF | |
1688 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1689 | ac_header_preproc=yes | |
1690 | else | |
1691 | ac_header_preproc=no | |
1692 | fi | |
d0ac1c44 | 1693 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1694 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1695 | $as_echo "$ac_header_preproc" >&6; } | |
1696 | ||
1697 | # So? What about this header? | |
1698 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1699 | yes:no: ) | |
1700 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1701 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1702 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1703 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1704 | ;; | |
1705 | no:yes:* ) | |
1706 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1707 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1708 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1709 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1710 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1711 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1712 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1713 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1714 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1715 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1716 | ;; | |
1717 | esac | |
1718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1719 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1720 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1721 | $as_echo_n "(cached) " >&6 |
1722 | else | |
1723 | eval "$3=\$ac_header_compiler" | |
1724 | fi | |
1725 | eval ac_res=\$$3 | |
1726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1727 | $as_echo "$ac_res" >&6; } | |
1728 | fi | |
d0ac1c44 | 1729 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1730 | |
1731 | } # ac_fn_c_check_header_mongrel | |
1732 | ||
1733 | # ac_fn_c_try_run LINENO | |
1734 | # ---------------------- | |
1735 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1736 | # that executables *can* be run. | |
1737 | ac_fn_c_try_run () | |
1738 | { | |
1739 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1740 | if { { ac_try="$ac_link" | |
1741 | case "(($ac_try" in | |
1742 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1743 | *) ac_try_echo=$ac_try;; | |
1744 | esac | |
1745 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1746 | $as_echo "$ac_try_echo"; } >&5 | |
1747 | (eval "$ac_link") 2>&5 | |
1748 | ac_status=$? | |
1749 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1750 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1751 | { { case "(($ac_try" in | |
1752 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1753 | *) ac_try_echo=$ac_try;; | |
1754 | esac | |
1755 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1756 | $as_echo "$ac_try_echo"; } >&5 | |
1757 | (eval "$ac_try") 2>&5 | |
1758 | ac_status=$? | |
1759 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1760 | test $ac_status = 0; }; }; then : | |
1761 | ac_retval=0 | |
1762 | else | |
1763 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1764 | $as_echo "$as_me: failed program was:" >&5 | |
1765 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1766 | ||
1767 | ac_retval=$ac_status | |
1768 | fi | |
1769 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
1770 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1771 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1772 | |
1773 | } # ac_fn_c_try_run | |
1774 | ||
1775 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1776 | # ------------------------------------------------------- | |
1777 | # Tests whether HEADER exists and can be compiled using the include files in | |
1778 | # INCLUDES, setting the cache variable VAR accordingly. | |
1779 | ac_fn_c_check_header_compile () | |
1780 | { | |
1781 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1783 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1784 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1785 | $as_echo_n "(cached) " >&6 |
1786 | else | |
1787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1788 | /* end confdefs.h. */ | |
1789 | $4 | |
1790 | #include <$2> | |
1791 | _ACEOF | |
1792 | if ac_fn_c_try_compile "$LINENO"; then : | |
1793 | eval "$3=yes" | |
1794 | else | |
1795 | eval "$3=no" | |
1796 | fi | |
1797 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1798 | fi | |
1799 | eval ac_res=\$$3 | |
1800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1801 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1802 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1803 | |
1804 | } # ac_fn_c_check_header_compile | |
1805 | ||
eb0edac8 GB |
1806 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
1807 | # ------------------------------------------- | |
1808 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1809 | # variable VAR accordingly. | |
1810 | ac_fn_c_check_type () | |
1811 | { | |
1812 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1814 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1815 | if eval \${$3+:} false; then : |
eb0edac8 GB |
1816 | $as_echo_n "(cached) " >&6 |
1817 | else | |
1818 | eval "$3=no" | |
1819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1820 | /* end confdefs.h. */ | |
1821 | $4 | |
1822 | int | |
1823 | main () | |
1824 | { | |
1825 | if (sizeof ($2)) | |
1826 | return 0; | |
1827 | ; | |
1828 | return 0; | |
1829 | } | |
1830 | _ACEOF | |
1831 | if ac_fn_c_try_compile "$LINENO"; then : | |
1832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1833 | /* end confdefs.h. */ | |
1834 | $4 | |
1835 | int | |
1836 | main () | |
1837 | { | |
1838 | if (sizeof (($2))) | |
1839 | return 0; | |
1840 | ; | |
1841 | return 0; | |
1842 | } | |
1843 | _ACEOF | |
1844 | if ac_fn_c_try_compile "$LINENO"; then : | |
1845 | ||
1846 | else | |
1847 | eval "$3=yes" | |
1848 | fi | |
1849 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1850 | fi | |
1851 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1852 | fi | |
1853 | eval ac_res=\$$3 | |
1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1855 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1856 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
eb0edac8 GB |
1857 | |
1858 | } # ac_fn_c_check_type | |
1859 | ||
404f2902 FCE |
1860 | # ac_fn_c_try_link LINENO |
1861 | # ----------------------- | |
1862 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1863 | ac_fn_c_try_link () | |
1864 | { | |
1865 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1866 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1867 | if { { ac_try="$ac_link" | |
1868 | case "(($ac_try" in | |
1869 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1870 | *) ac_try_echo=$ac_try;; | |
1871 | esac | |
1872 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1873 | $as_echo "$ac_try_echo"; } >&5 | |
1874 | (eval "$ac_link") 2>conftest.err | |
1875 | ac_status=$? | |
1876 | if test -s conftest.err; then | |
1877 | grep -v '^ *+' conftest.err >conftest.er1 | |
1878 | cat conftest.er1 >&5 | |
1879 | mv -f conftest.er1 conftest.err | |
1880 | fi | |
1881 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1882 | test $ac_status = 0; } && { | |
1883 | test -z "$ac_c_werror_flag" || | |
1884 | test ! -s conftest.err | |
1885 | } && test -s conftest$ac_exeext && { | |
1886 | test "$cross_compiling" = yes || | |
1887 | test -x conftest$ac_exeext | |
1888 | }; then : | |
1889 | ac_retval=0 | |
1890 | else | |
1891 | $as_echo "$as_me: failed program was:" >&5 | |
1892 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1893 | ||
1894 | ac_retval=1 | |
1895 | fi | |
1896 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1897 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1898 | # interfere with the next link command; also delete a directory that is | |
1899 | # left behind by Apple's compiler. We do this before executing the actions. | |
1900 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1901 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1902 | as_fn_set_status $ac_retval | |
1903 | ||
1904 | } # ac_fn_c_try_link | |
1905 | ||
81ecdfbb RW |
1906 | # ac_fn_c_check_func LINENO FUNC VAR |
1907 | # ---------------------------------- | |
1908 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1909 | ac_fn_c_check_func () | |
1910 | { | |
1911 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1913 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1914 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1915 | $as_echo_n "(cached) " >&6 |
1916 | else | |
1917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1918 | /* end confdefs.h. */ | |
1919 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1920 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1921 | #define $2 innocuous_$2 | |
1922 | ||
1923 | /* System header to define __stub macros and hopefully few prototypes, | |
1924 | which can conflict with char $2 (); below. | |
1925 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1926 | <limits.h> exists even on freestanding compilers. */ | |
1927 | ||
1928 | #ifdef __STDC__ | |
1929 | # include <limits.h> | |
1930 | #else | |
1931 | # include <assert.h> | |
1932 | #endif | |
1933 | ||
1934 | #undef $2 | |
1935 | ||
1936 | /* Override any GCC internal prototype to avoid an error. | |
1937 | Use char because int might match the return type of a GCC | |
1938 | builtin and then its argument prototype would still apply. */ | |
1939 | #ifdef __cplusplus | |
1940 | extern "C" | |
1941 | #endif | |
1942 | char $2 (); | |
1943 | /* The GNU C library defines this for functions which it implements | |
1944 | to always fail with ENOSYS. Some functions are actually named | |
1945 | something starting with __ and the normal name is an alias. */ | |
1946 | #if defined __stub_$2 || defined __stub___$2 | |
1947 | choke me | |
1948 | #endif | |
1949 | ||
1950 | int | |
1951 | main () | |
1952 | { | |
1953 | return $2 (); | |
1954 | ; | |
1955 | return 0; | |
1956 | } | |
1957 | _ACEOF | |
1958 | if ac_fn_c_try_link "$LINENO"; then : | |
1959 | eval "$3=yes" | |
1960 | else | |
1961 | eval "$3=no" | |
1962 | fi | |
1963 | rm -f core conftest.err conftest.$ac_objext \ | |
1964 | conftest$ac_exeext conftest.$ac_ext | |
1965 | fi | |
1966 | eval ac_res=\$$3 | |
1967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1968 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1969 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1970 | |
1971 | } # ac_fn_c_check_func | |
1972 | ||
d0ac1c44 SM |
1973 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
1974 | # --------------------------------------------- | |
1975 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
1976 | # accordingly. | |
81ecdfbb RW |
1977 | ac_fn_c_check_decl () |
1978 | { | |
1979 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
0fb4aa4b PA |
1980 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
1981 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
1982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
1983 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d0ac1c44 | 1984 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1985 | $as_echo_n "(cached) " >&6 |
1986 | else | |
1987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1988 | /* end confdefs.h. */ | |
1989 | $4 | |
1990 | int | |
1991 | main () | |
1992 | { | |
0fb4aa4b PA |
1993 | #ifndef $as_decl_name |
1994 | #ifdef __cplusplus | |
1995 | (void) $as_decl_use; | |
1996 | #else | |
1997 | (void) $as_decl_name; | |
1998 | #endif | |
81ecdfbb RW |
1999 | #endif |
2000 | ||
2001 | ; | |
2002 | return 0; | |
2003 | } | |
2004 | _ACEOF | |
2005 | if ac_fn_c_try_compile "$LINENO"; then : | |
2006 | eval "$3=yes" | |
2007 | else | |
2008 | eval "$3=no" | |
2009 | fi | |
2010 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2011 | fi | |
2012 | eval ac_res=\$$3 | |
2013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2014 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2015 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
2016 | |
2017 | } # ac_fn_c_check_decl | |
2018 | ||
05ea2a05 TT |
2019 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2020 | # ---------------------------------------------------- | |
2021 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2022 | # INCLUDES, setting cache variable VAR accordingly. | |
2023 | ac_fn_c_check_member () | |
2024 | { | |
2025 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2027 | $as_echo_n "checking for $2.$3... " >&6; } | |
2028 | if eval \${$4+:} false; then : | |
2029 | $as_echo_n "(cached) " >&6 | |
2030 | else | |
2031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2032 | /* end confdefs.h. */ | |
2033 | $5 | |
2034 | int | |
2035 | main () | |
2036 | { | |
2037 | static $2 ac_aggr; | |
2038 | if (ac_aggr.$3) | |
2039 | return 0; | |
2040 | ; | |
2041 | return 0; | |
2042 | } | |
2043 | _ACEOF | |
2044 | if ac_fn_c_try_compile "$LINENO"; then : | |
2045 | eval "$4=yes" | |
2046 | else | |
2047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2048 | /* end confdefs.h. */ | |
2049 | $5 | |
2050 | int | |
2051 | main () | |
2052 | { | |
2053 | static $2 ac_aggr; | |
2054 | if (sizeof ac_aggr.$3) | |
2055 | return 0; | |
2056 | ; | |
2057 | return 0; | |
2058 | } | |
2059 | _ACEOF | |
2060 | if ac_fn_c_try_compile "$LINENO"; then : | |
2061 | eval "$4=yes" | |
2062 | else | |
2063 | eval "$4=no" | |
2064 | fi | |
2065 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2066 | fi | |
2067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2068 | fi | |
2069 | eval ac_res=\$$4 | |
2070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2071 | $as_echo "$ac_res" >&6; } | |
2072 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2073 | ||
2074 | } # ac_fn_c_check_member | |
2075 | ||
21987b9c TT |
2076 | # ac_fn_cxx_try_link LINENO |
2077 | # ------------------------- | |
2078 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2079 | ac_fn_cxx_try_link () | |
2080 | { | |
2081 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2082 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2083 | if { { ac_try="$ac_link" | |
2084 | case "(($ac_try" in | |
2085 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2086 | *) ac_try_echo=$ac_try;; | |
2087 | esac | |
2088 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2089 | $as_echo "$ac_try_echo"; } >&5 | |
2090 | (eval "$ac_link") 2>conftest.err | |
2091 | ac_status=$? | |
2092 | if test -s conftest.err; then | |
2093 | grep -v '^ *+' conftest.err >conftest.er1 | |
2094 | cat conftest.er1 >&5 | |
2095 | mv -f conftest.er1 conftest.err | |
2096 | fi | |
2097 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2098 | test $ac_status = 0; } && { | |
2099 | test -z "$ac_cxx_werror_flag" || | |
2100 | test ! -s conftest.err | |
2101 | } && test -s conftest$ac_exeext && { | |
2102 | test "$cross_compiling" = yes || | |
2103 | test -x conftest$ac_exeext | |
2104 | }; then : | |
2105 | ac_retval=0 | |
2106 | else | |
2107 | $as_echo "$as_me: failed program was:" >&5 | |
2108 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2109 | ||
2110 | ac_retval=1 | |
2111 | fi | |
2112 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2113 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2114 | # interfere with the next link command; also delete a directory that is | |
2115 | # left behind by Apple's compiler. We do this before executing the actions. | |
2116 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2117 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2118 | as_fn_set_status $ac_retval | |
2119 | ||
2120 | } # ac_fn_cxx_try_link | |
2121 | ||
2122 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2123 | # ------------------------------------ | |
2124 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2125 | ac_fn_cxx_check_func () | |
2126 | { | |
2127 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2129 | $as_echo_n "checking for $2... " >&6; } | |
2130 | if eval \${$3+:} false; then : | |
2131 | $as_echo_n "(cached) " >&6 | |
2132 | else | |
2133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2134 | /* end confdefs.h. */ | |
2135 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2136 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2137 | #define $2 innocuous_$2 | |
2138 | ||
2139 | /* System header to define __stub macros and hopefully few prototypes, | |
2140 | which can conflict with char $2 (); below. | |
2141 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2142 | <limits.h> exists even on freestanding compilers. */ | |
2143 | ||
2144 | #ifdef __STDC__ | |
2145 | # include <limits.h> | |
2146 | #else | |
2147 | # include <assert.h> | |
2148 | #endif | |
2149 | ||
2150 | #undef $2 | |
2151 | ||
2152 | /* Override any GCC internal prototype to avoid an error. | |
2153 | Use char because int might match the return type of a GCC | |
2154 | builtin and then its argument prototype would still apply. */ | |
2155 | #ifdef __cplusplus | |
2156 | extern "C" | |
2157 | #endif | |
2158 | char $2 (); | |
2159 | /* The GNU C library defines this for functions which it implements | |
2160 | to always fail with ENOSYS. Some functions are actually named | |
2161 | something starting with __ and the normal name is an alias. */ | |
2162 | #if defined __stub_$2 || defined __stub___$2 | |
2163 | choke me | |
2164 | #endif | |
2165 | ||
2166 | int | |
2167 | main () | |
2168 | { | |
2169 | return $2 (); | |
2170 | ; | |
2171 | return 0; | |
2172 | } | |
2173 | _ACEOF | |
2174 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2175 | eval "$3=yes" | |
2176 | else | |
2177 | eval "$3=no" | |
2178 | fi | |
2179 | rm -f core conftest.err conftest.$ac_objext \ | |
2180 | conftest$ac_exeext conftest.$ac_ext | |
2181 | fi | |
2182 | eval ac_res=\$$3 | |
2183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2184 | $as_echo "$ac_res" >&6; } | |
2185 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2186 | ||
2187 | } # ac_fn_cxx_check_func | |
2188 | ||
07697489 PA |
2189 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2190 | # -------------------------------------------- | |
2191 | # Tries to find the compile-time value of EXPR in a program that includes | |
2192 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2193 | # computed | |
2194 | ac_fn_c_compute_int () | |
2195 | { | |
2196 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2197 | if test "$cross_compiling" = yes; then | |
2198 | # Depending upon the size, compute the lo and hi bounds. | |
2199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2200 | /* end confdefs.h. */ | |
2201 | $4 | |
2202 | int | |
2203 | main () | |
2204 | { | |
2205 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2206 | test_array [0] = 0; |
2207 | return test_array [0]; | |
07697489 PA |
2208 | |
2209 | ; | |
2210 | return 0; | |
2211 | } | |
2212 | _ACEOF | |
2213 | if ac_fn_c_try_compile "$LINENO"; then : | |
2214 | ac_lo=0 ac_mid=0 | |
2215 | while :; do | |
2216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2217 | /* end confdefs.h. */ | |
2218 | $4 | |
2219 | int | |
2220 | main () | |
2221 | { | |
2222 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2223 | test_array [0] = 0; |
2224 | return test_array [0]; | |
07697489 PA |
2225 | |
2226 | ; | |
2227 | return 0; | |
2228 | } | |
2229 | _ACEOF | |
2230 | if ac_fn_c_try_compile "$LINENO"; then : | |
2231 | ac_hi=$ac_mid; break | |
2232 | else | |
2233 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2234 | if test $ac_lo -le $ac_mid; then | |
2235 | ac_lo= ac_hi= | |
2236 | break | |
2237 | fi | |
2238 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2239 | fi | |
2240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2241 | done | |
2242 | else | |
2243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2244 | /* end confdefs.h. */ | |
2245 | $4 | |
2246 | int | |
2247 | main () | |
2248 | { | |
2249 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2250 | test_array [0] = 0; |
2251 | return test_array [0]; | |
07697489 PA |
2252 | |
2253 | ; | |
2254 | return 0; | |
2255 | } | |
2256 | _ACEOF | |
2257 | if ac_fn_c_try_compile "$LINENO"; then : | |
2258 | ac_hi=-1 ac_mid=-1 | |
2259 | while :; do | |
2260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2261 | /* end confdefs.h. */ | |
2262 | $4 | |
2263 | int | |
2264 | main () | |
2265 | { | |
2266 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2267 | test_array [0] = 0; |
2268 | return test_array [0]; | |
07697489 PA |
2269 | |
2270 | ; | |
2271 | return 0; | |
2272 | } | |
2273 | _ACEOF | |
2274 | if ac_fn_c_try_compile "$LINENO"; then : | |
2275 | ac_lo=$ac_mid; break | |
2276 | else | |
2277 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2278 | if test $ac_mid -le $ac_hi; then | |
2279 | ac_lo= ac_hi= | |
2280 | break | |
2281 | fi | |
2282 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2283 | fi | |
2284 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2285 | done | |
2286 | else | |
2287 | ac_lo= ac_hi= | |
2288 | fi | |
2289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2290 | fi | |
2291 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2292 | # Binary search between lo and hi bounds. | |
2293 | while test "x$ac_lo" != "x$ac_hi"; do | |
2294 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2296 | /* end confdefs.h. */ | |
2297 | $4 | |
2298 | int | |
2299 | main () | |
2300 | { | |
2301 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2302 | test_array [0] = 0; |
2303 | return test_array [0]; | |
07697489 PA |
2304 | |
2305 | ; | |
2306 | return 0; | |
2307 | } | |
2308 | _ACEOF | |
2309 | if ac_fn_c_try_compile "$LINENO"; then : | |
2310 | ac_hi=$ac_mid | |
2311 | else | |
2312 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2313 | fi | |
2314 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2315 | done | |
2316 | case $ac_lo in #(( | |
2317 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2318 | '') ac_retval=1 ;; | |
2319 | esac | |
2320 | else | |
2321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2322 | /* end confdefs.h. */ | |
2323 | $4 | |
2324 | static long int longval () { return $2; } | |
2325 | static unsigned long int ulongval () { return $2; } | |
2326 | #include <stdio.h> | |
2327 | #include <stdlib.h> | |
2328 | int | |
2329 | main () | |
2330 | { | |
2331 | ||
2332 | FILE *f = fopen ("conftest.val", "w"); | |
2333 | if (! f) | |
2334 | return 1; | |
2335 | if (($2) < 0) | |
2336 | { | |
2337 | long int i = longval (); | |
2338 | if (i != ($2)) | |
2339 | return 1; | |
2340 | fprintf (f, "%ld", i); | |
2341 | } | |
2342 | else | |
2343 | { | |
2344 | unsigned long int i = ulongval (); | |
2345 | if (i != ($2)) | |
2346 | return 1; | |
2347 | fprintf (f, "%lu", i); | |
2348 | } | |
2349 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2350 | on some platforms. */ | |
2351 | return ferror (f) || fclose (f) != 0; | |
2352 | ||
2353 | ; | |
2354 | return 0; | |
2355 | } | |
2356 | _ACEOF | |
2357 | if ac_fn_c_try_run "$LINENO"; then : | |
2358 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2359 | else | |
2360 | ac_retval=1 | |
2361 | fi | |
2362 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2363 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2364 | rm -f conftest.val | |
2365 | ||
2366 | fi | |
d0ac1c44 SM |
2367 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2368 | as_fn_set_status $ac_retval | |
07697489 PA |
2369 | |
2370 | } # ac_fn_c_compute_int | |
81ecdfbb RW |
2371 | cat >config.log <<_ACEOF |
2372 | This file contains any messages produced by compilers while | |
2373 | running configure, to aid debugging if configure makes a mistake. | |
2374 | ||
2375 | It was created by $as_me, which was | |
d0ac1c44 | 2376 | generated by GNU Autoconf 2.69. Invocation command line was |
81ecdfbb RW |
2377 | |
2378 | $ $0 $@ | |
2379 | ||
2380 | _ACEOF | |
2381 | exec 5>>config.log | |
2382 | { | |
2383 | cat <<_ASUNAME | |
2384 | ## --------- ## | |
2385 | ## Platform. ## | |
2386 | ## --------- ## | |
2387 | ||
2388 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2389 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2390 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2391 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2392 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2393 | ||
2394 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2395 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2396 | ||
2397 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2398 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2399 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2400 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2401 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2402 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2403 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2404 | ||
2405 | _ASUNAME | |
2406 | ||
2407 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2408 | for as_dir in $PATH | |
2409 | do | |
2410 | IFS=$as_save_IFS | |
2411 | test -z "$as_dir" && as_dir=. | |
2412 | $as_echo "PATH: $as_dir" | |
2413 | done | |
2414 | IFS=$as_save_IFS | |
2415 | ||
2416 | } >&5 | |
2417 | ||
2418 | cat >&5 <<_ACEOF | |
2419 | ||
2420 | ||
2421 | ## ----------- ## | |
2422 | ## Core tests. ## | |
2423 | ## ----------- ## | |
bec39cab AC |
2424 | |
2425 | _ACEOF | |
2426 | ||
2427 | ||
2428 | # Keep a trace of the command line. | |
2429 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2430 | # Strip out --silent because we don't want to record it for future runs. | |
2431 | # Also quote any args containing shell meta-characters. | |
2432 | # Make two passes to allow for proper duplicate-argument suppression. | |
2433 | ac_configure_args= | |
2434 | ac_configure_args0= | |
2435 | ac_configure_args1= | |
bec39cab AC |
2436 | ac_must_keep_next=false |
2437 | for ac_pass in 1 2 | |
2438 | do | |
2439 | for ac_arg | |
2440 | do | |
2441 | case $ac_arg in | |
2442 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2443 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2444 | | -silent | --silent | --silen | --sile | --sil) | |
2445 | continue ;; | |
81ecdfbb RW |
2446 | *\'*) |
2447 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
bec39cab AC |
2448 | esac |
2449 | case $ac_pass in | |
81ecdfbb | 2450 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
bec39cab | 2451 | 2) |
81ecdfbb | 2452 | as_fn_append ac_configure_args1 " '$ac_arg'" |
bec39cab AC |
2453 | if test $ac_must_keep_next = true; then |
2454 | ac_must_keep_next=false # Got value, back to normal. | |
2455 | else | |
2456 | case $ac_arg in | |
2457 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2458 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2459 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2460 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2461 | case "$ac_configure_args0 " in | |
2462 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2463 | esac | |
2464 | ;; | |
2465 | -* ) ac_must_keep_next=true ;; | |
2466 | esac | |
2467 | fi | |
81ecdfbb | 2468 | as_fn_append ac_configure_args " '$ac_arg'" |
bec39cab AC |
2469 | ;; |
2470 | esac | |
2471 | done | |
2472 | done | |
81ecdfbb RW |
2473 | { ac_configure_args0=; unset ac_configure_args0;} |
2474 | { ac_configure_args1=; unset ac_configure_args1;} | |
bec39cab AC |
2475 | |
2476 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2477 | # config.log. We remove comments because anyway the quotes in there | |
2478 | # would cause problems or look ugly. | |
81ecdfbb RW |
2479 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
2480 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
bec39cab AC |
2481 | trap 'exit_status=$? |
2482 | # Save into config.log some information that might help in debugging. | |
2483 | { | |
2484 | echo | |
2485 | ||
d0ac1c44 | 2486 | $as_echo "## ---------------- ## |
bec39cab | 2487 | ## Cache variables. ## |
d0ac1c44 | 2488 | ## ---------------- ##" |
bec39cab AC |
2489 | echo |
2490 | # The following way of writing the cache mishandles newlines in values, | |
81ecdfbb RW |
2491 | ( |
2492 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2493 | eval ac_val=\$$ac_var | |
2494 | case $ac_val in #( | |
2495 | *${as_nl}*) | |
2496 | case $ac_var in #( | |
2497 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2498 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2499 | esac | |
2500 | case $ac_var in #( | |
2501 | _ | IFS | as_nl) ;; #( | |
2502 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2503 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2504 | esac ;; | |
2505 | esac | |
2506 | done | |
bec39cab | 2507 | (set) 2>&1 | |
81ecdfbb RW |
2508 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
2509 | *${as_nl}ac_space=\ *) | |
bec39cab | 2510 | sed -n \ |
81ecdfbb RW |
2511 | "s/'\''/'\''\\\\'\'''\''/g; |
2512 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2513 | ;; #( | |
bec39cab | 2514 | *) |
81ecdfbb | 2515 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 2516 | ;; |
81ecdfbb RW |
2517 | esac | |
2518 | sort | |
2519 | ) | |
bec39cab AC |
2520 | echo |
2521 | ||
d0ac1c44 | 2522 | $as_echo "## ----------------- ## |
bec39cab | 2523 | ## Output variables. ## |
d0ac1c44 | 2524 | ## ----------------- ##" |
bec39cab AC |
2525 | echo |
2526 | for ac_var in $ac_subst_vars | |
2527 | do | |
81ecdfbb RW |
2528 | eval ac_val=\$$ac_var |
2529 | case $ac_val in | |
2530 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2531 | esac | |
2532 | $as_echo "$ac_var='\''$ac_val'\''" | |
bec39cab AC |
2533 | done | sort |
2534 | echo | |
2535 | ||
2536 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2537 | $as_echo "## ------------------- ## |
81ecdfbb | 2538 | ## File substitutions. ## |
d0ac1c44 | 2539 | ## ------------------- ##" |
bec39cab AC |
2540 | echo |
2541 | for ac_var in $ac_subst_files | |
2542 | do | |
81ecdfbb RW |
2543 | eval ac_val=\$$ac_var |
2544 | case $ac_val in | |
2545 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2546 | esac | |
2547 | $as_echo "$ac_var='\''$ac_val'\''" | |
bec39cab AC |
2548 | done | sort |
2549 | echo | |
434c4c77 | 2550 | fi |
bec39cab AC |
2551 | |
2552 | if test -s confdefs.h; then | |
d0ac1c44 | 2553 | $as_echo "## ----------- ## |
bec39cab | 2554 | ## confdefs.h. ## |
d0ac1c44 | 2555 | ## ----------- ##" |
bec39cab | 2556 | echo |
81ecdfbb | 2557 | cat confdefs.h |
bec39cab AC |
2558 | echo |
2559 | fi | |
2560 | test "$ac_signal" != 0 && | |
81ecdfbb RW |
2561 | $as_echo "$as_me: caught signal $ac_signal" |
2562 | $as_echo "$as_me: exit $exit_status" | |
bec39cab | 2563 | } >&5 |
81ecdfbb RW |
2564 | rm -f core *.core core.conftest.* && |
2565 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
bec39cab | 2566 | exit $exit_status |
81ecdfbb | 2567 | ' 0 |
bec39cab | 2568 | for ac_signal in 1 2 13 15; do |
81ecdfbb | 2569 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
bec39cab AC |
2570 | done |
2571 | ac_signal=0 | |
2572 | ||
2573 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
81ecdfbb RW |
2574 | rm -f -r conftest* confdefs.h |
2575 | ||
2576 | $as_echo "/* confdefs.h */" > confdefs.h | |
bec39cab AC |
2577 | |
2578 | # Predefined preprocessor variables. | |
2579 | ||
2580 | cat >>confdefs.h <<_ACEOF | |
2581 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2582 | _ACEOF | |
2583 | ||
bec39cab AC |
2584 | cat >>confdefs.h <<_ACEOF |
2585 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2586 | _ACEOF | |
2587 | ||
bec39cab AC |
2588 | cat >>confdefs.h <<_ACEOF |
2589 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2590 | _ACEOF | |
2591 | ||
bec39cab AC |
2592 | cat >>confdefs.h <<_ACEOF |
2593 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2594 | _ACEOF | |
2595 | ||
bec39cab AC |
2596 | cat >>confdefs.h <<_ACEOF |
2597 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2598 | _ACEOF | |
2599 | ||
81ecdfbb RW |
2600 | cat >>confdefs.h <<_ACEOF |
2601 | #define PACKAGE_URL "$PACKAGE_URL" | |
2602 | _ACEOF | |
2603 | ||
bec39cab AC |
2604 | |
2605 | # Let the site file select an alternate cache file if it wants to. | |
81ecdfbb RW |
2606 | # Prefer an explicitly selected file to automatically selected ones. |
2607 | ac_site_file1=NONE | |
2608 | ac_site_file2=NONE | |
2609 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2610 | # We do not want a PATH search for config.site. |
2611 | case $CONFIG_SITE in #(( | |
2612 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2613 | */*) ac_site_file1=$CONFIG_SITE;; | |
2614 | *) ac_site_file1=./$CONFIG_SITE;; | |
2615 | esac | |
81ecdfbb RW |
2616 | elif test "x$prefix" != xNONE; then |
2617 | ac_site_file1=$prefix/share/config.site | |
2618 | ac_site_file2=$prefix/etc/config.site | |
2619 | else | |
2620 | ac_site_file1=$ac_default_prefix/share/config.site | |
2621 | ac_site_file2=$ac_default_prefix/etc/config.site | |
d6e9fb05 | 2622 | fi |
81ecdfbb RW |
2623 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
2624 | do | |
2625 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2626 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2627 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2628 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
bec39cab | 2629 | sed 's/^/| /' "$ac_site_file" >&5 |
d0ac1c44 SM |
2630 | . "$ac_site_file" \ |
2631 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2632 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2633 | as_fn_error $? "failed to load site script $ac_site_file | |
2634 | See \`config.log' for more details" "$LINENO" 5; } | |
d6e9fb05 JK |
2635 | fi |
2636 | done | |
2637 | ||
2638 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2639 | # Some versions of bash will fail to source /dev/null (special files |
2640 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2641 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2643 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
bec39cab | 2644 | case $cache_file in |
81ecdfbb RW |
2645 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
2646 | *) . "./$cache_file";; | |
bec39cab AC |
2647 | esac |
2648 | fi | |
d6e9fb05 | 2649 | else |
81ecdfbb RW |
2650 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2651 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
bec39cab | 2652 | >$cache_file |
d6e9fb05 JK |
2653 | fi |
2654 | ||
05ea2a05 TT |
2655 | as_fn_append ac_header_list " stdlib.h" |
2656 | as_fn_append ac_header_list " unistd.h" | |
2657 | as_fn_append ac_header_list " sys/param.h" | |
bec39cab AC |
2658 | # Check that the precious variables saved in the cache have kept the same |
2659 | # value. | |
2660 | ac_cache_corrupted=false | |
81ecdfbb | 2661 | for ac_var in $ac_precious_vars; do |
bec39cab AC |
2662 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
2663 | eval ac_new_set=\$ac_env_${ac_var}_set | |
81ecdfbb RW |
2664 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
2665 | eval ac_new_val=\$ac_env_${ac_var}_value | |
bec39cab AC |
2666 | case $ac_old_set,$ac_new_set in |
2667 | set,) | |
81ecdfbb RW |
2668 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
2669 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
bec39cab AC |
2670 | ac_cache_corrupted=: ;; |
2671 | ,set) | |
81ecdfbb RW |
2672 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
2673 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
bec39cab AC |
2674 | ac_cache_corrupted=: ;; |
2675 | ,);; | |
2676 | *) | |
2677 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
81ecdfbb RW |
2678 | # differences in whitespace do not lead to failure. |
2679 | ac_old_val_w=`echo x $ac_old_val` | |
2680 | ac_new_val_w=`echo x $ac_new_val` | |
2681 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2682 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2683 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2684 | ac_cache_corrupted=: | |
2685 | else | |
2686 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2687 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2688 | eval $ac_var=\$ac_old_val | |
2689 | fi | |
2690 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2691 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2692 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2693 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
bec39cab AC |
2694 | fi;; |
2695 | esac | |
2696 | # Pass precious variables to config.status. | |
2697 | if test "$ac_new_set" = set; then | |
2698 | case $ac_new_val in | |
81ecdfbb | 2699 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
bec39cab AC |
2700 | *) ac_arg=$ac_var=$ac_new_val ;; |
2701 | esac | |
2702 | case " $ac_configure_args " in | |
2703 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
81ecdfbb | 2704 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
bec39cab | 2705 | esac |
d6e9fb05 | 2706 | fi |
bec39cab AC |
2707 | done |
2708 | if $ac_cache_corrupted; then | |
81ecdfbb RW |
2709 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2710 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2711 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2712 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2713 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
d6e9fb05 | 2714 | fi |
81ecdfbb RW |
2715 | ## -------------------- ## |
2716 | ## Main body of script. ## | |
2717 | ## -------------------- ## | |
d6e9fb05 | 2718 | |
dae5f5cf DJ |
2719 | ac_ext=c |
2720 | ac_cpp='$CPP $CPPFLAGS' | |
2721 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2722 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2723 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2724 | ||
d6e9fb05 | 2725 | |
84563040 | 2726 | |
bec39cab AC |
2727 | |
2728 | ||
7e8c7130 | 2729 | |
7e3941ac | 2730 | |
81ecdfbb | 2731 | ac_config_headers="$ac_config_headers config.h:config.in" |
bec39cab AC |
2732 | |
2733 | ||
e28b3332 | 2734 | |
c9a1864a YQ |
2735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
2736 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2737 | # Check whether --enable-maintainer-mode was given. | |
2738 | if test "${enable_maintainer_mode+set}" = set; then : | |
2739 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2740 | else | |
2741 | USE_MAINTAINER_MODE=no | |
2742 | fi | |
2743 | ||
2744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2745 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2746 | if test $USE_MAINTAINER_MODE = yes; then | |
2747 | MAINTAINER_MODE_TRUE= | |
2748 | MAINTAINER_MODE_FALSE='#' | |
2749 | else | |
2750 | MAINTAINER_MODE_TRUE='#' | |
2751 | MAINTAINER_MODE_FALSE= | |
2752 | fi | |
2753 | ||
2754 | MAINT=$MAINTAINER_MODE_TRUE | |
2755 | ||
2756 | ||
2757 | ||
bec39cab AC |
2758 | ac_ext=c |
2759 | ac_cpp='$CPP $CPPFLAGS' | |
2760 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2761 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2762 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2763 | if test -n "$ac_tool_prefix"; then | |
2764 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2765 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
81ecdfbb RW |
2766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2767 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2768 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2769 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2770 | else |
2771 | if test -n "$CC"; then | |
2772 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2773 | else | |
bec39cab AC |
2774 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2775 | for as_dir in $PATH | |
2776 | do | |
2777 | IFS=$as_save_IFS | |
2778 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2779 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2780 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2781 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
81ecdfbb | 2782 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2783 | break 2 |
2784 | fi | |
2785 | done | |
81ecdfbb RW |
2786 | done |
2787 | IFS=$as_save_IFS | |
bec39cab | 2788 | |
84563040 DJ |
2789 | fi |
2790 | fi | |
bec39cab | 2791 | CC=$ac_cv_prog_CC |
84563040 | 2792 | if test -n "$CC"; then |
81ecdfbb RW |
2793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2794 | $as_echo "$CC" >&6; } | |
84563040 | 2795 | else |
81ecdfbb RW |
2796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2797 | $as_echo "no" >&6; } | |
84563040 DJ |
2798 | fi |
2799 | ||
81ecdfbb | 2800 | |
bec39cab AC |
2801 | fi |
2802 | if test -z "$ac_cv_prog_CC"; then | |
2803 | ac_ct_CC=$CC | |
2804 | # Extract the first word of "gcc", so it can be a program name with args. | |
2805 | set dummy gcc; ac_word=$2 | |
81ecdfbb RW |
2806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2807 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2808 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2809 | $as_echo_n "(cached) " >&6 |
84563040 | 2810 | else |
bec39cab AC |
2811 | if test -n "$ac_ct_CC"; then |
2812 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
84563040 | 2813 | else |
bec39cab AC |
2814 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2815 | for as_dir in $PATH | |
2816 | do | |
2817 | IFS=$as_save_IFS | |
2818 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2819 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2820 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2821 | ac_cv_prog_ac_ct_CC="gcc" |
81ecdfbb | 2822 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2823 | break 2 |
2824 | fi | |
2825 | done | |
81ecdfbb RW |
2826 | done |
2827 | IFS=$as_save_IFS | |
bec39cab AC |
2828 | |
2829 | fi | |
2830 | fi | |
2831 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2832 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2834 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2835 | else |
81ecdfbb RW |
2836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2837 | $as_echo "no" >&6; } | |
bec39cab AC |
2838 | fi |
2839 | ||
81ecdfbb RW |
2840 | if test "x$ac_ct_CC" = x; then |
2841 | CC="" | |
2842 | else | |
2843 | case $cross_compiling:$ac_tool_warned in | |
2844 | yes:) | |
2845 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2846 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2847 | ac_tool_warned=yes ;; | |
2848 | esac | |
2849 | CC=$ac_ct_CC | |
2850 | fi | |
bec39cab AC |
2851 | else |
2852 | CC="$ac_cv_prog_CC" | |
2853 | fi | |
2854 | ||
2855 | if test -z "$CC"; then | |
81ecdfbb RW |
2856 | if test -n "$ac_tool_prefix"; then |
2857 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
bec39cab | 2858 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
81ecdfbb RW |
2859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2860 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2861 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2862 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
2863 | else |
2864 | if test -n "$CC"; then | |
2865 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2866 | else | |
2867 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2868 | for as_dir in $PATH | |
2869 | do | |
2870 | IFS=$as_save_IFS | |
2871 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2872 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2873 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2874 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
81ecdfbb | 2875 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2876 | break 2 |
2877 | fi | |
2878 | done | |
81ecdfbb RW |
2879 | done |
2880 | IFS=$as_save_IFS | |
bec39cab AC |
2881 | |
2882 | fi | |
2883 | fi | |
2884 | CC=$ac_cv_prog_CC | |
2885 | if test -n "$CC"; then | |
81ecdfbb RW |
2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2887 | $as_echo "$CC" >&6; } | |
bec39cab | 2888 | else |
81ecdfbb RW |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2890 | $as_echo "no" >&6; } | |
bec39cab AC |
2891 | fi |
2892 | ||
81ecdfbb RW |
2893 | |
2894 | fi | |
dae5f5cf | 2895 | fi |
81ecdfbb | 2896 | if test -z "$CC"; then |
dae5f5cf DJ |
2897 | # Extract the first word of "cc", so it can be a program name with args. |
2898 | set dummy cc; ac_word=$2 | |
81ecdfbb RW |
2899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2900 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2901 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2902 | $as_echo_n "(cached) " >&6 |
dae5f5cf | 2903 | else |
81ecdfbb RW |
2904 | if test -n "$CC"; then |
2905 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
dae5f5cf | 2906 | else |
81ecdfbb | 2907 | ac_prog_rejected=no |
dae5f5cf DJ |
2908 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2909 | for as_dir in $PATH | |
2910 | do | |
2911 | IFS=$as_save_IFS | |
2912 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2913 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2914 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2915 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2916 | ac_prog_rejected=yes | |
2917 | continue | |
2918 | fi | |
2919 | ac_cv_prog_CC="cc" | |
2920 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
dae5f5cf | 2921 | break 2 |
b80864fb | 2922 | fi |
dae5f5cf | 2923 | done |
81ecdfbb RW |
2924 | done |
2925 | IFS=$as_save_IFS | |
bec39cab | 2926 | |
84563040 DJ |
2927 | if test $ac_prog_rejected = yes; then |
2928 | # We found a bogon in the path, so make sure we never use it. | |
2929 | set dummy $ac_cv_prog_CC | |
2930 | shift | |
bec39cab | 2931 | if test $# != 0; then |
84563040 DJ |
2932 | # We chose a different compiler from the bogus one. |
2933 | # However, it has the same basename, so the bogon will be chosen | |
2934 | # first if we set CC to just the basename; use the full file name. | |
2935 | shift | |
bec39cab | 2936 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
84563040 DJ |
2937 | fi |
2938 | fi | |
2939 | fi | |
2940 | fi | |
bec39cab | 2941 | CC=$ac_cv_prog_CC |
84563040 | 2942 | if test -n "$CC"; then |
81ecdfbb RW |
2943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2944 | $as_echo "$CC" >&6; } | |
84563040 | 2945 | else |
81ecdfbb RW |
2946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2947 | $as_echo "no" >&6; } | |
84563040 DJ |
2948 | fi |
2949 | ||
81ecdfbb | 2950 | |
bec39cab AC |
2951 | fi |
2952 | if test -z "$CC"; then | |
2953 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2954 | for ac_prog in cl.exe |
bec39cab AC |
2955 | do |
2956 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2957 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2959 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2960 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2961 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2962 | else |
2963 | if test -n "$CC"; then | |
2964 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2965 | else | |
bec39cab AC |
2966 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2967 | for as_dir in $PATH | |
2968 | do | |
2969 | IFS=$as_save_IFS | |
2970 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2971 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2972 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2973 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2974 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2975 | break 2 |
2976 | fi | |
2977 | done | |
81ecdfbb RW |
2978 | done |
2979 | IFS=$as_save_IFS | |
bec39cab | 2980 | |
84563040 DJ |
2981 | fi |
2982 | fi | |
bec39cab | 2983 | CC=$ac_cv_prog_CC |
84563040 | 2984 | if test -n "$CC"; then |
81ecdfbb RW |
2985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2986 | $as_echo "$CC" >&6; } | |
84563040 | 2987 | else |
81ecdfbb RW |
2988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2989 | $as_echo "no" >&6; } | |
84563040 | 2990 | fi |
bec39cab | 2991 | |
81ecdfbb | 2992 | |
bec39cab AC |
2993 | test -n "$CC" && break |
2994 | done | |
2995 | fi | |
2996 | if test -z "$CC"; then | |
2997 | ac_ct_CC=$CC | |
81ecdfbb | 2998 | for ac_prog in cl.exe |
bec39cab AC |
2999 | do |
3000 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3001 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3003 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3004 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3005 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3006 | else |
3007 | if test -n "$ac_ct_CC"; then | |
3008 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3009 | else | |
3010 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3011 | for as_dir in $PATH | |
3012 | do | |
3013 | IFS=$as_save_IFS | |
3014 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3015 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3016 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3017 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3018 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3019 | break 2 |
84563040 | 3020 | fi |
bec39cab | 3021 | done |
81ecdfbb RW |
3022 | done |
3023 | IFS=$as_save_IFS | |
bec39cab AC |
3024 | |
3025 | fi | |
3026 | fi | |
3027 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3028 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3030 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3031 | else |
81ecdfbb RW |
3032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3033 | $as_echo "no" >&6; } | |
84563040 DJ |
3034 | fi |
3035 | ||
81ecdfbb | 3036 | |
bec39cab AC |
3037 | test -n "$ac_ct_CC" && break |
3038 | done | |
84563040 | 3039 | |
81ecdfbb RW |
3040 | if test "x$ac_ct_CC" = x; then |
3041 | CC="" | |
3042 | else | |
3043 | case $cross_compiling:$ac_tool_warned in | |
3044 | yes:) | |
3045 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3046 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3047 | ac_tool_warned=yes ;; | |
3048 | esac | |
3049 | CC=$ac_ct_CC | |
3050 | fi | |
bec39cab AC |
3051 | fi |
3052 | ||
3053 | fi | |
3054 | ||
3055 | ||
81ecdfbb RW |
3056 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3057 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3058 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3059 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3060 | |
3061 | # Provide some information about the compiler. | |
81ecdfbb RW |
3062 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3063 | set X $ac_compile | |
3064 | ac_compiler=$2 | |
3065 | for ac_option in --version -v -V -qversion; do | |
3066 | { { ac_try="$ac_compiler $ac_option >&5" | |
3067 | case "(($ac_try" in | |
3068 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3069 | *) ac_try_echo=$ac_try;; | |
3070 | esac | |
3071 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3072 | $as_echo "$ac_try_echo"; } >&5 | |
3073 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3074 | ac_status=$? |
81ecdfbb RW |
3075 | if test -s conftest.err; then |
3076 | sed '10a\ | |
3077 | ... rest of stderr output deleted ... | |
3078 | 10q' conftest.err >conftest.er1 | |
3079 | cat conftest.er1 >&5 | |
81ecdfbb | 3080 | fi |
d0ac1c44 | 3081 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3082 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3083 | test $ac_status = 0; } | |
3084 | done | |
bec39cab | 3085 | |
81ecdfbb | 3086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3087 | /* end confdefs.h. */ |
3088 | ||
3089 | int | |
3090 | main () | |
3091 | { | |
3092 | ||
3093 | ; | |
3094 | return 0; | |
3095 | } | |
3096 | _ACEOF | |
3097 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3098 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3099 | # Try to create an executable without -o first, disregard a.out. |
3100 | # It will help us diagnose broken compilers, and finding out an intuition | |
3101 | # of exeext. | |
d0ac1c44 SM |
3102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3103 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3104 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3105 | ||
3106 | # The possible output files: | |
3107 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3108 | ||
3109 | ac_rmfiles= | |
3110 | for ac_file in $ac_files | |
3111 | do | |
3112 | case $ac_file in | |
3113 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3114 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3115 | esac | |
3116 | done | |
3117 | rm -f $ac_rmfiles | |
3118 | ||
3119 | if { { ac_try="$ac_link_default" | |
3120 | case "(($ac_try" in | |
3121 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3122 | *) ac_try_echo=$ac_try;; | |
3123 | esac | |
3124 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3125 | $as_echo "$ac_try_echo"; } >&5 | |
3126 | (eval "$ac_link_default") 2>&5 | |
bec39cab | 3127 | ac_status=$? |
81ecdfbb RW |
3128 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3129 | test $ac_status = 0; }; then : | |
3130 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3131 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3132 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3133 | # so that the user can short-circuit this test for compilers unknown to | |
3134 | # Autoconf. | |
3135 | for ac_file in $ac_files '' | |
bec39cab AC |
3136 | do |
3137 | test -f "$ac_file" || continue | |
3138 | case $ac_file in | |
81ecdfbb | 3139 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
bec39cab AC |
3140 | ;; |
3141 | [ab].out ) | |
3142 | # We found the default executable, but exeext='' is most | |
3143 | # certainly right. | |
3144 | break;; | |
3145 | *.* ) | |
81ecdfbb RW |
3146 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3147 | then :; else | |
3148 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3149 | fi | |
3150 | # We set ac_cv_exeext here because the later test for it is not | |
3151 | # safe: cross compilers may not add the suffix if given an `-o' | |
3152 | # argument, so we may need to know it at that point already. | |
3153 | # Even if this section looks crufty: it has the advantage of | |
3154 | # actually working. | |
bec39cab AC |
3155 | break;; |
3156 | * ) | |
3157 | break;; | |
3158 | esac | |
3159 | done | |
81ecdfbb RW |
3160 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3161 | ||
bec39cab | 3162 | else |
81ecdfbb RW |
3163 | ac_file='' |
3164 | fi | |
81ecdfbb | 3165 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3167 | $as_echo "no" >&6; } | |
3168 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3169 | sed 's/^/| /' conftest.$ac_ext >&5 |
3170 | ||
81ecdfbb RW |
3171 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3172 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3173 | as_fn_error 77 "C compiler cannot create executables |
3174 | See \`config.log' for more details" "$LINENO" 5; } | |
3175 | else | |
3176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3177 | $as_echo "yes" >&6; } | |
bec39cab | 3178 | fi |
d0ac1c44 SM |
3179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3180 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3182 | $as_echo "$ac_file" >&6; } | |
bec39cab | 3183 | ac_exeext=$ac_cv_exeext |
bec39cab | 3184 | |
d0ac1c44 | 3185 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
bec39cab | 3186 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3188 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3189 | if { { ac_try="$ac_link" | |
3190 | case "(($ac_try" in | |
3191 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3192 | *) ac_try_echo=$ac_try;; | |
3193 | esac | |
3194 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3195 | $as_echo "$ac_try_echo"; } >&5 | |
3196 | (eval "$ac_link") 2>&5 | |
bec39cab | 3197 | ac_status=$? |
81ecdfbb RW |
3198 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3199 | test $ac_status = 0; }; then : | |
bec39cab AC |
3200 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3201 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3202 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3203 | # `rm'. | |
3204 | for ac_file in conftest.exe conftest conftest.*; do | |
3205 | test -f "$ac_file" || continue | |
3206 | case $ac_file in | |
81ecdfbb | 3207 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
bec39cab | 3208 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
bec39cab AC |
3209 | break;; |
3210 | * ) break;; | |
3211 | esac | |
3212 | done | |
84563040 | 3213 | else |
81ecdfbb RW |
3214 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3215 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3216 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3217 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3218 | fi |
d0ac1c44 | 3219 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3221 | $as_echo "$ac_cv_exeext" >&6; } | |
bec39cab AC |
3222 | |
3223 | rm -f conftest.$ac_ext | |
3224 | EXEEXT=$ac_cv_exeext | |
3225 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3227 | /* end confdefs.h. */ | |
3228 | #include <stdio.h> | |
3229 | int | |
3230 | main () | |
3231 | { | |
3232 | FILE *f = fopen ("conftest.out", "w"); | |
3233 | return ferror (f) || fclose (f) != 0; | |
3234 | ||
3235 | ; | |
3236 | return 0; | |
3237 | } | |
3238 | _ACEOF | |
3239 | ac_clean_files="$ac_clean_files conftest.out" | |
3240 | # Check that the compiler produces executables we can run. If not, either | |
3241 | # the compiler is broken, or we cross compile. | |
3242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3243 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3244 | if test "$cross_compiling" != yes; then | |
3245 | { { ac_try="$ac_link" | |
3246 | case "(($ac_try" in | |
3247 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3248 | *) ac_try_echo=$ac_try;; | |
3249 | esac | |
3250 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3251 | $as_echo "$ac_try_echo"; } >&5 | |
3252 | (eval "$ac_link") 2>&5 | |
3253 | ac_status=$? | |
3254 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3255 | test $ac_status = 0; } | |
3256 | if { ac_try='./conftest$ac_cv_exeext' | |
3257 | { { case "(($ac_try" in | |
3258 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3259 | *) ac_try_echo=$ac_try;; | |
3260 | esac | |
3261 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3262 | $as_echo "$ac_try_echo"; } >&5 | |
3263 | (eval "$ac_try") 2>&5 | |
3264 | ac_status=$? | |
3265 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3266 | test $ac_status = 0; }; }; then | |
3267 | cross_compiling=no | |
3268 | else | |
3269 | if test "$cross_compiling" = maybe; then | |
3270 | cross_compiling=yes | |
3271 | else | |
3272 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3273 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3274 | as_fn_error $? "cannot run C compiled programs. | |
3275 | If you meant to cross compile, use \`--host'. | |
3276 | See \`config.log' for more details" "$LINENO" 5; } | |
3277 | fi | |
3278 | fi | |
3279 | fi | |
3280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3281 | $as_echo "$cross_compiling" >&6; } | |
3282 | ||
3283 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3284 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3286 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3287 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3288 | $as_echo_n "(cached) " >&6 |
bec39cab | 3289 | else |
81ecdfbb | 3290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3291 | /* end confdefs.h. */ |
3292 | ||
3293 | int | |
3294 | main () | |
3295 | { | |
3296 | ||
3297 | ; | |
3298 | return 0; | |
3299 | } | |
3300 | _ACEOF | |
3301 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3302 | if { { ac_try="$ac_compile" |
3303 | case "(($ac_try" in | |
3304 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3305 | *) ac_try_echo=$ac_try;; | |
3306 | esac | |
3307 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3308 | $as_echo "$ac_try_echo"; } >&5 | |
3309 | (eval "$ac_compile") 2>&5 | |
bec39cab | 3310 | ac_status=$? |
81ecdfbb RW |
3311 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3312 | test $ac_status = 0; }; then : | |
3313 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3314 | test -f "$ac_file" || continue; | |
bec39cab | 3315 | case $ac_file in |
81ecdfbb | 3316 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3317 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3318 | break;; | |
3319 | esac | |
3320 | done | |
3321 | else | |
81ecdfbb | 3322 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3323 | sed 's/^/| /' conftest.$ac_ext >&5 |
3324 | ||
81ecdfbb RW |
3325 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3326 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3327 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3328 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3329 | fi |
bec39cab AC |
3330 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
3331 | fi | |
81ecdfbb RW |
3332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3333 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3334 | OBJEXT=$ac_cv_objext |
3335 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3337 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3338 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3339 | $as_echo_n "(cached) " >&6 |
bec39cab | 3340 | else |
81ecdfbb | 3341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3342 | /* end confdefs.h. */ |
3343 | ||
3344 | int | |
3345 | main () | |
3346 | { | |
3347 | #ifndef __GNUC__ | |
3348 | choke me | |
3349 | #endif | |
84563040 | 3350 | |
bec39cab AC |
3351 | ; |
3352 | return 0; | |
3353 | } | |
3354 | _ACEOF | |
81ecdfbb | 3355 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab | 3356 | ac_compiler_gnu=yes |
84563040 | 3357 | else |
81ecdfbb | 3358 | ac_compiler_gnu=no |
84563040 | 3359 | fi |
81ecdfbb | 3360 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3361 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
84563040 | 3362 | |
bec39cab | 3363 | fi |
81ecdfbb RW |
3364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3365 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3366 | if test $ac_compiler_gnu = yes; then | |
3367 | GCC=yes | |
3368 | else | |
3369 | GCC= | |
3370 | fi | |
bec39cab AC |
3371 | ac_test_CFLAGS=${CFLAGS+set} |
3372 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3374 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3375 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb RW |
3376 | $as_echo_n "(cached) " >&6 |
3377 | else | |
3378 | ac_save_c_werror_flag=$ac_c_werror_flag | |
3379 | ac_c_werror_flag=yes | |
3380 | ac_cv_prog_cc_g=no | |
3381 | CFLAGS="-g" | |
3382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3383 | /* end confdefs.h. */ |
3384 | ||
3385 | int | |
3386 | main () | |
3387 | { | |
3388 | ||
3389 | ; | |
3390 | return 0; | |
3391 | } | |
3392 | _ACEOF | |
81ecdfbb | 3393 | if ac_fn_c_try_compile "$LINENO"; then : |
84563040 DJ |
3394 | ac_cv_prog_cc_g=yes |
3395 | else | |
81ecdfbb RW |
3396 | CFLAGS="" |
3397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3398 | /* end confdefs.h. */ | |
3399 | ||
3400 | int | |
3401 | main () | |
3402 | { | |
3403 | ||
3404 | ; | |
3405 | return 0; | |
3406 | } | |
3407 | _ACEOF | |
3408 | if ac_fn_c_try_compile "$LINENO"; then : | |
3409 | ||
3410 | else | |
3411 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3412 | CFLAGS="-g" | |
3413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3414 | /* end confdefs.h. */ | |
3415 | ||
3416 | int | |
3417 | main () | |
3418 | { | |
84563040 | 3419 | |
81ecdfbb RW |
3420 | ; |
3421 | return 0; | |
3422 | } | |
3423 | _ACEOF | |
3424 | if ac_fn_c_try_compile "$LINENO"; then : | |
3425 | ac_cv_prog_cc_g=yes | |
3426 | fi | |
3427 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 3428 | fi |
81ecdfbb | 3429 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3430 | fi |
81ecdfbb RW |
3431 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3432 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3433 | fi | |
3434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3435 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
84563040 | 3436 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3437 | CFLAGS=$ac_save_CFLAGS |
84563040 DJ |
3438 | elif test $ac_cv_prog_cc_g = yes; then |
3439 | if test "$GCC" = yes; then | |
3440 | CFLAGS="-g -O2" | |
3441 | else | |
3442 | CFLAGS="-g" | |
3443 | fi | |
3444 | else | |
3445 | if test "$GCC" = yes; then | |
3446 | CFLAGS="-O2" | |
3447 | else | |
3448 | CFLAGS= | |
3449 | fi | |
3450 | fi | |
81ecdfbb RW |
3451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3452 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3453 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3454 | $as_echo_n "(cached) " >&6 |
bec39cab | 3455 | else |
81ecdfbb | 3456 | ac_cv_prog_cc_c89=no |
bec39cab | 3457 | ac_save_CC=$CC |
81ecdfbb | 3458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3459 | /* end confdefs.h. */ |
3460 | #include <stdarg.h> | |
3461 | #include <stdio.h> | |
d0ac1c44 | 3462 | struct stat; |
bec39cab AC |
3463 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3464 | struct buf { int x; }; | |
3465 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3466 | static char *e (p, i) | |
3467 | char **p; | |
3468 | int i; | |
3469 | { | |
3470 | return p[i]; | |
3471 | } | |
3472 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3473 | { | |
3474 | char *s; | |
3475 | va_list v; | |
3476 | va_start (v,p); | |
3477 | s = g (p, va_arg (v,int)); | |
3478 | va_end (v); | |
3479 | return s; | |
3480 | } | |
3481 | ||
3482 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3483 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3484 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3485 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3486 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3487 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3488 | that's true only with -std. */ |
bec39cab AC |
3489 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3490 | ||
81ecdfbb RW |
3491 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3492 | inside strings and character constants. */ | |
3493 | #define FOO(x) 'x' | |
3494 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3495 | ||
bec39cab AC |
3496 | int test (int i, double x); |
3497 | struct s1 {int (*f) (int a);}; | |
3498 | struct s2 {int (*f) (double a);}; | |
3499 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3500 | int argc; | |
3501 | char **argv; | |
3502 | int | |
3503 | main () | |
3504 | { | |
3505 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3506 | ; | |
3507 | return 0; | |
3508 | } | |
3509 | _ACEOF | |
81ecdfbb RW |
3510 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3511 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3512 | do |
3513 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3514 | if ac_fn_c_try_compile "$LINENO"; then : |
3515 | ac_cv_prog_cc_c89=$ac_arg | |
bec39cab | 3516 | fi |
81ecdfbb RW |
3517 | rm -f core conftest.err conftest.$ac_objext |
3518 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
bec39cab | 3519 | done |
81ecdfbb | 3520 | rm -f conftest.$ac_ext |
bec39cab AC |
3521 | CC=$ac_save_CC |
3522 | ||
3523 | fi | |
81ecdfbb RW |
3524 | # AC_CACHE_VAL |
3525 | case "x$ac_cv_prog_cc_c89" in | |
3526 | x) | |
3527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3528 | $as_echo "none needed" >&6; } ;; | |
3529 | xno) | |
3530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3531 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3532 | *) |
81ecdfbb RW |
3533 | CC="$CC $ac_cv_prog_cc_c89" |
3534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3535 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
bec39cab | 3536 | esac |
81ecdfbb | 3537 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
bec39cab | 3538 | |
dae5f5cf DJ |
3539 | fi |
3540 | ||
dae5f5cf | 3541 | ac_ext=c |
bec39cab AC |
3542 | ac_cpp='$CPP $CPPFLAGS' |
3543 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3544 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3545 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
84563040 | 3546 | |
3bc3d82a PA |
3547 | ac_ext=cpp |
3548 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3549 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3550 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3551 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3552 | if test -z "$CXX"; then | |
3553 | if test -n "$CCC"; then | |
3554 | CXX=$CCC | |
3555 | else | |
3556 | if test -n "$ac_tool_prefix"; then | |
3557 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3558 | do | |
3559 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3560 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3562 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3563 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3564 | $as_echo_n "(cached) " >&6 |
3565 | else | |
3566 | if test -n "$CXX"; then | |
3567 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3568 | else | |
3569 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3570 | for as_dir in $PATH | |
3571 | do | |
3572 | IFS=$as_save_IFS | |
3573 | test -z "$as_dir" && as_dir=. | |
3574 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3575 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3576 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3577 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3578 | break 2 | |
3579 | fi | |
3580 | done | |
3581 | done | |
3582 | IFS=$as_save_IFS | |
3583 | ||
3584 | fi | |
3585 | fi | |
3586 | CXX=$ac_cv_prog_CXX | |
3587 | if test -n "$CXX"; then | |
3588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3589 | $as_echo "$CXX" >&6; } | |
3590 | else | |
3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3592 | $as_echo "no" >&6; } | |
3593 | fi | |
3594 | ||
3595 | ||
3596 | test -n "$CXX" && break | |
3597 | done | |
3598 | fi | |
3599 | if test -z "$CXX"; then | |
3600 | ac_ct_CXX=$CXX | |
3601 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3602 | do | |
3603 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3604 | set dummy $ac_prog; ac_word=$2 | |
3605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3606 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3607 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3608 | $as_echo_n "(cached) " >&6 |
3609 | else | |
3610 | if test -n "$ac_ct_CXX"; then | |
3611 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3612 | else | |
3613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3614 | for as_dir in $PATH | |
3615 | do | |
3616 | IFS=$as_save_IFS | |
3617 | test -z "$as_dir" && as_dir=. | |
3618 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3619 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3620 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3621 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3622 | break 2 | |
3623 | fi | |
3624 | done | |
3625 | done | |
3626 | IFS=$as_save_IFS | |
3627 | ||
3628 | fi | |
3629 | fi | |
3630 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3631 | if test -n "$ac_ct_CXX"; then | |
3632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3633 | $as_echo "$ac_ct_CXX" >&6; } | |
3634 | else | |
3635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3636 | $as_echo "no" >&6; } | |
3637 | fi | |
3638 | ||
3639 | ||
3640 | test -n "$ac_ct_CXX" && break | |
3641 | done | |
3642 | ||
3643 | if test "x$ac_ct_CXX" = x; then | |
3644 | CXX="g++" | |
3645 | else | |
3646 | case $cross_compiling:$ac_tool_warned in | |
3647 | yes:) | |
3648 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3649 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3650 | ac_tool_warned=yes ;; | |
3651 | esac | |
3652 | CXX=$ac_ct_CXX | |
3653 | fi | |
3654 | fi | |
3655 | ||
3656 | fi | |
3657 | fi | |
3658 | # Provide some information about the compiler. | |
3659 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3660 | set X $ac_compile | |
3661 | ac_compiler=$2 | |
3662 | for ac_option in --version -v -V -qversion; do | |
3663 | { { ac_try="$ac_compiler $ac_option >&5" | |
3664 | case "(($ac_try" in | |
3665 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3666 | *) ac_try_echo=$ac_try;; | |
3667 | esac | |
3668 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3669 | $as_echo "$ac_try_echo"; } >&5 | |
3670 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3671 | ac_status=$? | |
3672 | if test -s conftest.err; then | |
3673 | sed '10a\ | |
3674 | ... rest of stderr output deleted ... | |
3675 | 10q' conftest.err >conftest.er1 | |
3676 | cat conftest.er1 >&5 | |
3bc3d82a | 3677 | fi |
d0ac1c44 | 3678 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3679 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3680 | test $ac_status = 0; } | |
3681 | done | |
3682 | ||
3683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3684 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3685 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3686 | $as_echo_n "(cached) " >&6 |
3687 | else | |
3688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3689 | /* end confdefs.h. */ | |
3690 | ||
3691 | int | |
3692 | main () | |
3693 | { | |
3694 | #ifndef __GNUC__ | |
3695 | choke me | |
3696 | #endif | |
3697 | ||
3698 | ; | |
3699 | return 0; | |
3700 | } | |
3701 | _ACEOF | |
3702 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3703 | ac_compiler_gnu=yes | |
3704 | else | |
3705 | ac_compiler_gnu=no | |
3706 | fi | |
3707 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3708 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3709 | ||
3710 | fi | |
3711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3712 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3713 | if test $ac_compiler_gnu = yes; then | |
3714 | GXX=yes | |
3715 | else | |
3716 | GXX= | |
3717 | fi | |
3718 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3719 | ac_save_CXXFLAGS=$CXXFLAGS | |
3720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3721 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3722 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3723 | $as_echo_n "(cached) " >&6 |
3724 | else | |
3725 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3726 | ac_cxx_werror_flag=yes | |
3727 | ac_cv_prog_cxx_g=no | |
3728 | CXXFLAGS="-g" | |
3729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3730 | /* end confdefs.h. */ | |
3731 | ||
3732 | int | |
3733 | main () | |
3734 | { | |
3735 | ||
3736 | ; | |
3737 | return 0; | |
3738 | } | |
3739 | _ACEOF | |
3740 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3741 | ac_cv_prog_cxx_g=yes | |
3742 | else | |
3743 | CXXFLAGS="" | |
3744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3745 | /* end confdefs.h. */ | |
3746 | ||
3747 | int | |
3748 | main () | |
3749 | { | |
3750 | ||
3751 | ; | |
3752 | return 0; | |
3753 | } | |
3754 | _ACEOF | |
3755 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3756 | ||
3757 | else | |
3758 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3759 | CXXFLAGS="-g" | |
3760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3761 | /* end confdefs.h. */ | |
3762 | ||
3763 | int | |
3764 | main () | |
3765 | { | |
3766 | ||
3767 | ; | |
3768 | return 0; | |
3769 | } | |
3770 | _ACEOF | |
3771 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3772 | ac_cv_prog_cxx_g=yes | |
3773 | fi | |
3774 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3775 | fi | |
3776 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3777 | fi | |
3778 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3779 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3780 | fi | |
3781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3782 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3783 | if test "$ac_test_CXXFLAGS" = set; then | |
3784 | CXXFLAGS=$ac_save_CXXFLAGS | |
3785 | elif test $ac_cv_prog_cxx_g = yes; then | |
3786 | if test "$GXX" = yes; then | |
3787 | CXXFLAGS="-g -O2" | |
3788 | else | |
3789 | CXXFLAGS="-g" | |
3790 | fi | |
3791 | else | |
3792 | if test "$GXX" = yes; then | |
3793 | CXXFLAGS="-O2" | |
3794 | else | |
3795 | CXXFLAGS= | |
3796 | fi | |
3797 | fi | |
3798 | ac_ext=c | |
3799 | ac_cpp='$CPP $CPPFLAGS' | |
3800 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3801 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3802 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3803 | ||
c9a1864a YQ |
3804 | |
3805 | ac_ext=c | |
3806 | ac_cpp='$CPP $CPPFLAGS' | |
3807 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3808 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3809 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3811 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3812 | # On Suns, sometimes $CPP names a directory. | |
3813 | if test -n "$CPP" && test -d "$CPP"; then | |
3814 | CPP= | |
3815 | fi | |
3816 | if test -z "$CPP"; then | |
d0ac1c44 | 3817 | if ${ac_cv_prog_CPP+:} false; then : |
c9a1864a YQ |
3818 | $as_echo_n "(cached) " >&6 |
3819 | else | |
3820 | # Double quotes because CPP needs to be expanded | |
3821 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3822 | do | |
3823 | ac_preproc_ok=false | |
3824 | for ac_c_preproc_warn_flag in '' yes | |
3825 | do | |
3826 | # Use a header file that comes with gcc, so configuring glibc | |
3827 | # with a fresh cross-compiler works. | |
3828 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3829 | # <limits.h> exists even on freestanding compilers. | |
3830 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3831 | # not just through cpp. "Syntax error" is here to catch this case. | |
3832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3833 | /* end confdefs.h. */ | |
3834 | #ifdef __STDC__ | |
3835 | # include <limits.h> | |
3836 | #else | |
3837 | # include <assert.h> | |
3838 | #endif | |
3839 | Syntax error | |
3840 | _ACEOF | |
3841 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3842 | ||
3843 | else | |
3844 | # Broken: fails on valid input. | |
3845 | continue | |
3846 | fi | |
d0ac1c44 | 3847 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3848 | |
3849 | # OK, works on sane cases. Now check whether nonexistent headers | |
3850 | # can be detected and how. | |
3851 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3852 | /* end confdefs.h. */ | |
3853 | #include <ac_nonexistent.h> | |
3854 | _ACEOF | |
3855 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3856 | # Broken: success on invalid input. | |
3857 | continue | |
3858 | else | |
3859 | # Passes both tests. | |
3860 | ac_preproc_ok=: | |
3861 | break | |
3862 | fi | |
d0ac1c44 | 3863 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3864 | |
3865 | done | |
3866 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3867 | rm -f conftest.i conftest.err conftest.$ac_ext |
c9a1864a YQ |
3868 | if $ac_preproc_ok; then : |
3869 | break | |
3870 | fi | |
3871 | ||
3872 | done | |
3873 | ac_cv_prog_CPP=$CPP | |
3874 | ||
3875 | fi | |
3876 | CPP=$ac_cv_prog_CPP | |
3877 | else | |
3878 | ac_cv_prog_CPP=$CPP | |
3879 | fi | |
3880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3881 | $as_echo "$CPP" >&6; } | |
3882 | ac_preproc_ok=false | |
3883 | for ac_c_preproc_warn_flag in '' yes | |
3884 | do | |
3885 | # Use a header file that comes with gcc, so configuring glibc | |
3886 | # with a fresh cross-compiler works. | |
3887 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3888 | # <limits.h> exists even on freestanding compilers. | |
3889 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3890 | # not just through cpp. "Syntax error" is here to catch this case. | |
3891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3892 | /* end confdefs.h. */ | |
3893 | #ifdef __STDC__ | |
3894 | # include <limits.h> | |
3895 | #else | |
3896 | # include <assert.h> | |
3897 | #endif | |
3898 | Syntax error | |
3899 | _ACEOF | |
3900 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3901 | ||
3902 | else | |
3903 | # Broken: fails on valid input. | |
3904 | continue | |
3905 | fi | |
d0ac1c44 | 3906 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3907 | |
3908 | # OK, works on sane cases. Now check whether nonexistent headers | |
3909 | # can be detected and how. | |
81ecdfbb | 3910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3911 | /* end confdefs.h. */ |
3912 | #include <ac_nonexistent.h> | |
3913 | _ACEOF | |
81ecdfbb | 3914 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3915 | # Broken: success on invalid input. |
3916 | continue | |
3917 | else | |
bec39cab AC |
3918 | # Passes both tests. |
3919 | ac_preproc_ok=: | |
3920 | break | |
3921 | fi | |
d0ac1c44 | 3922 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab AC |
3923 | |
3924 | done | |
3925 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3926 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
3927 | if $ac_preproc_ok; then : |
3928 | ||
3929 | else | |
3930 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3931 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3932 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
3933 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3934 | fi |
3935 | ||
81ecdfbb RW |
3936 | ac_ext=c |
3937 | ac_cpp='$CPP $CPPFLAGS' | |
3938 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3939 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3940 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bec39cab | 3941 | |
81ecdfbb RW |
3942 | |
3943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
3944 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 3945 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 3946 | $as_echo_n "(cached) " >&6 |
bec39cab | 3947 | else |
81ecdfbb RW |
3948 | if test -z "$GREP"; then |
3949 | ac_path_GREP_found=false | |
3950 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3952 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
bec39cab | 3953 | do |
81ecdfbb RW |
3954 | IFS=$as_save_IFS |
3955 | test -z "$as_dir" && as_dir=. | |
3956 | for ac_prog in grep ggrep; do | |
3957 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3958 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 3959 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
3960 | # Check for GNU ac_path_GREP and select it if it is found. |
3961 | # Check for GNU $ac_path_GREP | |
3962 | case `"$ac_path_GREP" --version 2>&1` in | |
3963 | *GNU*) | |
3964 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3965 | *) | |
3966 | ac_count=0 | |
3967 | $as_echo_n 0123456789 >"conftest.in" | |
3968 | while : | |
3969 | do | |
3970 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3971 | mv "conftest.tmp" "conftest.in" | |
3972 | cp "conftest.in" "conftest.nl" | |
3973 | $as_echo 'GREP' >> "conftest.nl" | |
3974 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3975 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3976 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3977 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3978 | # Best one so far, save it but keep looking for a better one | |
3979 | ac_cv_path_GREP="$ac_path_GREP" | |
3980 | ac_path_GREP_max=$ac_count | |
3981 | fi | |
3982 | # 10*(2^10) chars as input seems more than enough | |
3983 | test $ac_count -gt 10 && break | |
3984 | done | |
3985 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3986 | esac | |
3987 | ||
3988 | $ac_path_GREP_found && break 3 | |
3989 | done | |
3990 | done | |
3991 | done | |
3992 | IFS=$as_save_IFS | |
3993 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 3994 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
bec39cab AC |
3995 | fi |
3996 | else | |
81ecdfbb | 3997 | ac_cv_path_GREP=$GREP |
bec39cab | 3998 | fi |
bec39cab | 3999 | |
84563040 | 4000 | fi |
81ecdfbb RW |
4001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
4002 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4003 | GREP="$ac_cv_path_GREP" | |
bec39cab | 4004 | |
bec39cab | 4005 | |
81ecdfbb RW |
4006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4007 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4008 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb RW |
4009 | $as_echo_n "(cached) " >&6 |
4010 | else | |
4011 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4012 | then ac_cv_path_EGREP="$GREP -E" | |
4013 | else | |
4014 | if test -z "$EGREP"; then | |
4015 | ac_path_EGREP_found=false | |
4016 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4017 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4018 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4019 | do | |
4020 | IFS=$as_save_IFS | |
4021 | test -z "$as_dir" && as_dir=. | |
4022 | for ac_prog in egrep; do | |
4023 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4024 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4025 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4026 | # Check for GNU ac_path_EGREP and select it if it is found. |
4027 | # Check for GNU $ac_path_EGREP | |
4028 | case `"$ac_path_EGREP" --version 2>&1` in | |
4029 | *GNU*) | |
4030 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4031 | *) | |
4032 | ac_count=0 | |
4033 | $as_echo_n 0123456789 >"conftest.in" | |
4034 | while : | |
4035 | do | |
4036 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4037 | mv "conftest.tmp" "conftest.in" | |
4038 | cp "conftest.in" "conftest.nl" | |
4039 | $as_echo 'EGREP' >> "conftest.nl" | |
4040 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4041 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4042 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4043 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4044 | # Best one so far, save it but keep looking for a better one | |
4045 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4046 | ac_path_EGREP_max=$ac_count | |
4047 | fi | |
4048 | # 10*(2^10) chars as input seems more than enough | |
4049 | test $ac_count -gt 10 && break | |
4050 | done | |
4051 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4052 | esac | |
bec39cab | 4053 | |
81ecdfbb RW |
4054 | $ac_path_EGREP_found && break 3 |
4055 | done | |
4056 | done | |
4057 | done | |
4058 | IFS=$as_save_IFS | |
4059 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4060 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4061 | fi |
bec39cab | 4062 | else |
81ecdfbb | 4063 | ac_cv_path_EGREP=$EGREP |
84563040 | 4064 | fi |
bec39cab | 4065 | |
81ecdfbb | 4066 | fi |
b80864fb | 4067 | fi |
81ecdfbb RW |
4068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4069 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4070 | EGREP="$ac_cv_path_EGREP" | |
b80864fb DJ |
4071 | |
4072 | ||
c971b7fa PA |
4073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4074 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4075 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
4076 | $as_echo_n "(cached) " >&6 |
4077 | else | |
4078 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4079 | /* end confdefs.h. */ | |
4080 | #include <stdlib.h> | |
4081 | #include <stdarg.h> | |
4082 | #include <string.h> | |
4083 | #include <float.h> | |
bec39cab | 4084 | |
c971b7fa PA |
4085 | int |
4086 | main () | |
4087 | { | |
bec39cab | 4088 | |
c971b7fa PA |
4089 | ; |
4090 | return 0; | |
4091 | } | |
4092 | _ACEOF | |
4093 | if ac_fn_c_try_compile "$LINENO"; then : | |
4094 | ac_cv_header_stdc=yes | |
84563040 | 4095 | else |
c971b7fa PA |
4096 | ac_cv_header_stdc=no |
4097 | fi | |
4098 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 4099 | |
c971b7fa PA |
4100 | if test $ac_cv_header_stdc = yes; then |
4101 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 4103 | /* end confdefs.h. */ |
c971b7fa | 4104 | #include <string.h> |
bec39cab AC |
4105 | |
4106 | _ACEOF | |
84563040 | 4107 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
c971b7fa PA |
4108 | $EGREP "memchr" >/dev/null 2>&1; then : |
4109 | ||
84563040 | 4110 | else |
c971b7fa | 4111 | ac_cv_header_stdc=no |
84563040 DJ |
4112 | fi |
4113 | rm -f conftest* | |
4114 | ||
770d76d7 | 4115 | fi |
81ecdfbb | 4116 | |
c971b7fa PA |
4117 | if test $ac_cv_header_stdc = yes; then |
4118 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4120 | /* end confdefs.h. */ | |
4121 | #include <stdlib.h> | |
4122 | ||
4123 | _ACEOF | |
4124 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4125 | $EGREP "free" >/dev/null 2>&1; then : | |
4126 | ||
770d76d7 | 4127 | else |
c971b7fa | 4128 | ac_cv_header_stdc=no |
bec39cab | 4129 | fi |
c971b7fa | 4130 | rm -f conftest* |
bec39cab AC |
4131 | |
4132 | fi | |
c971b7fa PA |
4133 | |
4134 | if test $ac_cv_header_stdc = yes; then | |
4135 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4136 | if test "$cross_compiling" = yes; then : | |
4137 | : | |
770d76d7 | 4138 | else |
c971b7fa PA |
4139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4140 | /* end confdefs.h. */ | |
4141 | #include <ctype.h> | |
4142 | #include <stdlib.h> | |
4143 | #if ((' ' & 0x0FF) == 0x020) | |
4144 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4145 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4146 | #else | |
4147 | # define ISLOWER(c) \ | |
4148 | (('a' <= (c) && (c) <= 'i') \ | |
4149 | || ('j' <= (c) && (c) <= 'r') \ | |
4150 | || ('s' <= (c) && (c) <= 'z')) | |
4151 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4152 | #endif | |
4153 | ||
4154 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4155 | int | |
4156 | main () | |
4157 | { | |
4158 | int i; | |
4159 | for (i = 0; i < 256; i++) | |
4160 | if (XOR (islower (i), ISLOWER (i)) | |
4161 | || toupper (i) != TOUPPER (i)) | |
4162 | return 2; | |
4163 | return 0; | |
4164 | } | |
4165 | _ACEOF | |
4166 | if ac_fn_c_try_run "$LINENO"; then : | |
4167 | ||
770d76d7 | 4168 | else |
c971b7fa PA |
4169 | ac_cv_header_stdc=no |
4170 | fi | |
4171 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4172 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4173 | fi | |
bec39cab | 4174 | |
770d76d7 PA |
4175 | fi |
4176 | fi | |
c971b7fa PA |
4177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4178 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4179 | if test $ac_cv_header_stdc = yes; then | |
4180 | ||
4181 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4182 | ||
770d76d7 | 4183 | fi |
bec39cab | 4184 | |
c971b7fa PA |
4185 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4186 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4187 | inttypes.h stdint.h unistd.h | |
4188 | do : | |
4189 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4190 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4191 | " | |
d0ac1c44 | 4192 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
c971b7fa PA |
4193 | cat >>confdefs.h <<_ACEOF |
4194 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4195 | _ACEOF | |
4196 | ||
81ecdfbb | 4197 | fi |
bec39cab | 4198 | |
c971b7fa | 4199 | done |
bec39cab AC |
4200 | |
4201 | ||
4202 | ||
c971b7fa | 4203 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4204 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
c971b7fa | 4205 | MINIX=yes |
770d76d7 | 4206 | else |
c971b7fa | 4207 | MINIX= |
770d76d7 | 4208 | fi |
bec39cab AC |
4209 | |
4210 | ||
c971b7fa PA |
4211 | if test "$MINIX" = yes; then |
4212 | ||
4213 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
4214 | ||
4215 | ||
4216 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
4217 | ||
4218 | ||
4219 | $as_echo "#define _MINIX 1" >>confdefs.h | |
4220 | ||
770d76d7 | 4221 | fi |
bec39cab | 4222 | |
c971b7fa PA |
4223 | |
4224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
4225 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4226 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
c971b7fa | 4227 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4228 | else |
c971b7fa PA |
4229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4230 | /* end confdefs.h. */ | |
bec39cab | 4231 | |
d0ac1c44 SM |
4232 | # define __EXTENSIONS__ 1 |
4233 | $ac_includes_default | |
c971b7fa PA |
4234 | int |
4235 | main () | |
4236 | { | |
4237 | ||
4238 | ; | |
4239 | return 0; | |
4240 | } | |
4241 | _ACEOF | |
4242 | if ac_fn_c_try_compile "$LINENO"; then : | |
4243 | ac_cv_safe_to_define___extensions__=yes | |
770d76d7 | 4244 | else |
c971b7fa PA |
4245 | ac_cv_safe_to_define___extensions__=no |
4246 | fi | |
4247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
770d76d7 | 4248 | fi |
c971b7fa PA |
4249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4250 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4251 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4252 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
4253 | ||
4254 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
4255 | ||
4256 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
4257 | ||
4258 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
4259 | ||
4260 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
4261 | ||
bec39cab | 4262 | |
589bc927 TT |
4263 | # Check whether --enable-largefile was given. |
4264 | if test "${enable_largefile+set}" = set; then : | |
4265 | enableval=$enable_largefile; | |
4266 | fi | |
4267 | ||
4268 | if test "$enable_largefile" != no; then | |
4269 | ||
4270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4271 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4272 | if ${ac_cv_sys_largefile_CC+:} false; then : |
589bc927 TT |
4273 | $as_echo_n "(cached) " >&6 |
4274 | else | |
4275 | ac_cv_sys_largefile_CC=no | |
4276 | if test "$GCC" != yes; then | |
4277 | ac_save_CC=$CC | |
4278 | while :; do | |
4279 | # IRIX 6.2 and later do not support large files by default, | |
4280 | # so use the C compiler's -n32 option if that helps. | |
4281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4282 | /* end confdefs.h. */ | |
4283 | #include <sys/types.h> | |
4284 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4285 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4286 | since some C++ compilers masquerading as C compilers | |
4287 | incorrectly reject 9223372036854775807. */ | |
4288 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4289 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4290 | && LARGE_OFF_T % 2147483647 == 1) | |
4291 | ? 1 : -1]; | |
4292 | int | |
4293 | main () | |
4294 | { | |
4295 | ||
4296 | ; | |
4297 | return 0; | |
4298 | } | |
4299 | _ACEOF | |
4300 | if ac_fn_c_try_compile "$LINENO"; then : | |
4301 | break | |
4302 | fi | |
4303 | rm -f core conftest.err conftest.$ac_objext | |
4304 | CC="$CC -n32" | |
4305 | if ac_fn_c_try_compile "$LINENO"; then : | |
4306 | ac_cv_sys_largefile_CC=' -n32'; break | |
4307 | fi | |
4308 | rm -f core conftest.err conftest.$ac_objext | |
4309 | break | |
4310 | done | |
4311 | CC=$ac_save_CC | |
4312 | rm -f conftest.$ac_ext | |
4313 | fi | |
4314 | fi | |
4315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4316 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4317 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4318 | CC=$CC$ac_cv_sys_largefile_CC | |
4319 | fi | |
4320 | ||
4321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4322 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4323 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
589bc927 TT |
4324 | $as_echo_n "(cached) " >&6 |
4325 | else | |
4326 | while :; do | |
4327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4328 | /* end confdefs.h. */ | |
4329 | #include <sys/types.h> | |
4330 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4331 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4332 | since some C++ compilers masquerading as C compilers | |
4333 | incorrectly reject 9223372036854775807. */ | |
4334 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4335 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4336 | && LARGE_OFF_T % 2147483647 == 1) | |
4337 | ? 1 : -1]; | |
4338 | int | |
4339 | main () | |
4340 | { | |
4341 | ||
4342 | ; | |
4343 | return 0; | |
4344 | } | |
4345 | _ACEOF | |
4346 | if ac_fn_c_try_compile "$LINENO"; then : | |
4347 | ac_cv_sys_file_offset_bits=no; break | |
4348 | fi | |
4349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4351 | /* end confdefs.h. */ | |
4352 | #define _FILE_OFFSET_BITS 64 | |
4353 | #include <sys/types.h> | |
4354 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4355 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4356 | since some C++ compilers masquerading as C compilers | |
4357 | incorrectly reject 9223372036854775807. */ | |
4358 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4359 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4360 | && LARGE_OFF_T % 2147483647 == 1) | |
4361 | ? 1 : -1]; | |
4362 | int | |
4363 | main () | |
4364 | { | |
4365 | ||
4366 | ; | |
4367 | return 0; | |
4368 | } | |
4369 | _ACEOF | |
4370 | if ac_fn_c_try_compile "$LINENO"; then : | |
4371 | ac_cv_sys_file_offset_bits=64; break | |
4372 | fi | |
4373 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4374 | ac_cv_sys_file_offset_bits=unknown | |
4375 | break | |
4376 | done | |
4377 | fi | |
4378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4379 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4380 | case $ac_cv_sys_file_offset_bits in #( | |
4381 | no | unknown) ;; | |
4382 | *) | |
4383 | cat >>confdefs.h <<_ACEOF | |
4384 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4385 | _ACEOF | |
4386 | ;; | |
4387 | esac | |
4388 | rm -rf conftest* | |
4389 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4391 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4392 | if ${ac_cv_sys_large_files+:} false; then : |
589bc927 TT |
4393 | $as_echo_n "(cached) " >&6 |
4394 | else | |
4395 | while :; do | |
4396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4397 | /* end confdefs.h. */ | |
4398 | #include <sys/types.h> | |
4399 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4400 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4401 | since some C++ compilers masquerading as C compilers | |
4402 | incorrectly reject 9223372036854775807. */ | |
4403 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4404 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4405 | && LARGE_OFF_T % 2147483647 == 1) | |
4406 | ? 1 : -1]; | |
4407 | int | |
4408 | main () | |
4409 | { | |
4410 | ||
4411 | ; | |
4412 | return 0; | |
4413 | } | |
4414 | _ACEOF | |
4415 | if ac_fn_c_try_compile "$LINENO"; then : | |
4416 | ac_cv_sys_large_files=no; break | |
4417 | fi | |
4418 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4420 | /* end confdefs.h. */ | |
4421 | #define _LARGE_FILES 1 | |
4422 | #include <sys/types.h> | |
4423 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4424 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4425 | since some C++ compilers masquerading as C compilers | |
4426 | incorrectly reject 9223372036854775807. */ | |
4427 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4428 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4429 | && LARGE_OFF_T % 2147483647 == 1) | |
4430 | ? 1 : -1]; | |
4431 | int | |
4432 | main () | |
4433 | { | |
4434 | ||
4435 | ; | |
4436 | return 0; | |
4437 | } | |
4438 | _ACEOF | |
4439 | if ac_fn_c_try_compile "$LINENO"; then : | |
4440 | ac_cv_sys_large_files=1; break | |
4441 | fi | |
4442 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4443 | ac_cv_sys_large_files=unknown | |
4444 | break | |
4445 | done | |
4446 | fi | |
4447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4448 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4449 | case $ac_cv_sys_large_files in #( | |
4450 | no | unknown) ;; | |
4451 | *) | |
4452 | cat >>confdefs.h <<_ACEOF | |
4453 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4454 | _ACEOF | |
4455 | ;; | |
4456 | esac | |
4457 | rm -rf conftest* | |
4458 | fi | |
d0ac1c44 SM |
4459 | |
4460 | ||
589bc927 TT |
4461 | fi |
4462 | ||
770d76d7 PA |
4463 | ac_aux_dir= |
4464 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4465 | if test -f "$ac_dir/install-sh"; then |
4466 | ac_aux_dir=$ac_dir | |
4467 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4468 | break | |
4469 | elif test -f "$ac_dir/install.sh"; then | |
4470 | ac_aux_dir=$ac_dir | |
4471 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4472 | break | |
4473 | elif test -f "$ac_dir/shtool"; then | |
4474 | ac_aux_dir=$ac_dir | |
4475 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4476 | break | |
4477 | fi | |
770d76d7 PA |
4478 | done |
4479 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4480 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
770d76d7 PA |
4481 | fi |
4482 | ||
4483 | # These three variables are undocumented and unsupported, | |
4484 | # and are intended to be withdrawn in a future Autoconf release. | |
4485 | # They can cause serious problems if a builder's source tree is in a directory | |
4486 | # whose full name contains unusual characters. | |
4487 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4488 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4489 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
c9a1864a | 4490 | |
bec39cab | 4491 | |
bdaed379 HD |
4492 | # Expand $ac_aux_dir to an absolute path. |
4493 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4494 | ||
4495 | if test x"${install_sh+set}" != xset; then | |
4496 | case $am_aux_dir in | |
4497 | *\ * | *\ *) | |
4498 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4499 | *) | |
4500 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4501 | esac | |
4502 | fi | |
4503 | ||
4504 | # Installed binaries are usually stripped using 'strip' when the user | |
4505 | # run "make install-strip". However 'strip' might not be the right | |
4506 | # tool to use in cross-compilation environments, therefore Automake | |
4507 | # will honor the 'STRIP' environment variable to overrule this program. | |
4508 | if test "$cross_compiling" != no; then | |
4509 | if test -n "$ac_tool_prefix"; then | |
4510 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4511 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4513 | $as_echo_n "checking for $ac_word... " >&6; } | |
4514 | if ${ac_cv_prog_STRIP+:} false; then : | |
4515 | $as_echo_n "(cached) " >&6 | |
4516 | else | |
4517 | if test -n "$STRIP"; then | |
4518 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4519 | else | |
4520 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4521 | for as_dir in $PATH | |
4522 | do | |
4523 | IFS=$as_save_IFS | |
4524 | test -z "$as_dir" && as_dir=. | |
4525 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4526 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4527 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4528 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4529 | break 2 | |
4530 | fi | |
4531 | done | |
4532 | done | |
4533 | IFS=$as_save_IFS | |
4534 | ||
4535 | fi | |
4536 | fi | |
4537 | STRIP=$ac_cv_prog_STRIP | |
4538 | if test -n "$STRIP"; then | |
4539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4540 | $as_echo "$STRIP" >&6; } | |
4541 | else | |
4542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4543 | $as_echo "no" >&6; } | |
4544 | fi | |
4545 | ||
4546 | ||
4547 | fi | |
4548 | if test -z "$ac_cv_prog_STRIP"; then | |
4549 | ac_ct_STRIP=$STRIP | |
4550 | # Extract the first word of "strip", so it can be a program name with args. | |
4551 | set dummy strip; ac_word=$2 | |
4552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4553 | $as_echo_n "checking for $ac_word... " >&6; } | |
4554 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
4555 | $as_echo_n "(cached) " >&6 | |
4556 | else | |
4557 | if test -n "$ac_ct_STRIP"; then | |
4558 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4559 | else | |
4560 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4561 | for as_dir in $PATH | |
4562 | do | |
4563 | IFS=$as_save_IFS | |
4564 | test -z "$as_dir" && as_dir=. | |
4565 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4566 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4567 | ac_cv_prog_ac_ct_STRIP="strip" | |
4568 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4569 | break 2 | |
4570 | fi | |
4571 | done | |
4572 | done | |
4573 | IFS=$as_save_IFS | |
4574 | ||
4575 | fi | |
4576 | fi | |
4577 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4578 | if test -n "$ac_ct_STRIP"; then | |
4579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4580 | $as_echo "$ac_ct_STRIP" >&6; } | |
4581 | else | |
4582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4583 | $as_echo "no" >&6; } | |
4584 | fi | |
4585 | ||
4586 | if test "x$ac_ct_STRIP" = x; then | |
4587 | STRIP=":" | |
4588 | else | |
4589 | case $cross_compiling:$ac_tool_warned in | |
4590 | yes:) | |
4591 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4592 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4593 | ac_tool_warned=yes ;; | |
4594 | esac | |
4595 | STRIP=$ac_ct_STRIP | |
4596 | fi | |
4597 | else | |
4598 | STRIP="$ac_cv_prog_STRIP" | |
4599 | fi | |
4600 | ||
4601 | fi | |
4602 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4603 | ||
4604 | ||
91e1a0ed | 4605 | # Set build, build_cpu, build_vendor and build_os. |
770d76d7 PA |
4606 | # Make sure we can run config.sub. |
4607 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4608 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 PA |
4609 | |
4610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4611 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4612 | if ${ac_cv_build+:} false; then : |
81ecdfbb RW |
4613 | $as_echo_n "(cached) " >&6 |
4614 | else | |
770d76d7 PA |
4615 | ac_build_alias=$build_alias |
4616 | test "x$ac_build_alias" = x && | |
4617 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4618 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4619 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
770d76d7 | 4620 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4621 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
770d76d7 PA |
4622 | |
4623 | fi | |
4624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4625 | $as_echo "$ac_cv_build" >&6; } | |
4626 | case $ac_cv_build in | |
4627 | *-*-*) ;; | |
d0ac1c44 | 4628 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 PA |
4629 | esac |
4630 | build=$ac_cv_build | |
4631 | ac_save_IFS=$IFS; IFS='-' | |
4632 | set x $ac_cv_build | |
4633 | shift | |
4634 | build_cpu=$1 | |
4635 | build_vendor=$2 | |
4636 | shift; shift | |
4637 | # Remember, the first character of IFS is used to create $*, | |
4638 | # except with old shells: | |
4639 | build_os=$* | |
4640 | IFS=$ac_save_IFS | |
4641 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4642 | ||
4643 | ||
91e1a0ed SM |
4644 | |
4645 | # Set host, host_cpu, host_vendor, and host_os. | |
770d76d7 PA |
4646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4647 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4648 | if ${ac_cv_host+:} false; then : |
770d76d7 PA |
4649 | $as_echo_n "(cached) " >&6 |
4650 | else | |
4651 | if test "x$host_alias" = x; then | |
4652 | ac_cv_host=$ac_cv_build | |
4653 | else | |
4654 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d0ac1c44 | 4655 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
770d76d7 PA |
4656 | fi |
4657 | ||
4658 | fi | |
4659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4660 | $as_echo "$ac_cv_host" >&6; } | |
4661 | case $ac_cv_host in | |
4662 | *-*-*) ;; | |
d0ac1c44 | 4663 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
770d76d7 PA |
4664 | esac |
4665 | host=$ac_cv_host | |
4666 | ac_save_IFS=$IFS; IFS='-' | |
4667 | set x $ac_cv_host | |
4668 | shift | |
4669 | host_cpu=$1 | |
4670 | host_vendor=$2 | |
4671 | shift; shift | |
4672 | # Remember, the first character of IFS is used to create $*, | |
4673 | # except with old shells: | |
4674 | host_os=$* | |
4675 | IFS=$ac_save_IFS | |
4676 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4677 | ||
4678 | ||
91e1a0ed SM |
4679 | |
4680 | # Set target, target_cpu, target_vendor, and target_os. | |
c971b7fa PA |
4681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
4682 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4683 | if ${ac_cv_target+:} false; then : |
770d76d7 PA |
4684 | $as_echo_n "(cached) " >&6 |
4685 | else | |
c971b7fa PA |
4686 | if test "x$target_alias" = x; then |
4687 | ac_cv_target=$ac_cv_host | |
770d76d7 | 4688 | else |
c971b7fa | 4689 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
d0ac1c44 | 4690 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
770d76d7 | 4691 | fi |
770d76d7 PA |
4692 | |
4693 | fi | |
c971b7fa PA |
4694 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
4695 | $as_echo "$ac_cv_target" >&6; } | |
4696 | case $ac_cv_target in | |
4697 | *-*-*) ;; | |
d0ac1c44 | 4698 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
c971b7fa PA |
4699 | esac |
4700 | target=$ac_cv_target | |
4701 | ac_save_IFS=$IFS; IFS='-' | |
4702 | set x $ac_cv_target | |
4703 | shift | |
4704 | target_cpu=$1 | |
4705 | target_vendor=$2 | |
4706 | shift; shift | |
4707 | # Remember, the first character of IFS is used to create $*, | |
4708 | # except with old shells: | |
4709 | target_os=$* | |
4710 | IFS=$ac_save_IFS | |
4711 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
770d76d7 | 4712 | |
770d76d7 | 4713 | |
c971b7fa PA |
4714 | # The aliases save the names the user supplied, while $host etc. |
4715 | # will get canonicalized. | |
4716 | test -n "$target_alias" && | |
4717 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4718 | NONENONEs,x,x, && | |
4719 | program_prefix=${target_alias}- | |
770d76d7 | 4720 | |
c971b7fa PA |
4721 | # Find a good install program. We prefer a C program (faster), |
4722 | # so one script is as good as another. But avoid the broken or | |
4723 | # incompatible versions: | |
4724 | # SysV /etc/install, /usr/sbin/install | |
4725 | # SunOS /usr/etc/install | |
4726 | # IRIX /sbin/install | |
4727 | # AIX /bin/install | |
4728 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
4729 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
4730 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4731 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4732 | # OS/2's system install, which has a completely different semantic | |
4733 | # ./install, which can be erroneously created by make from ./install.sh. | |
4734 | # Reject install programs that cannot install multiple files. | |
4735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
4736 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
4737 | if test -z "$INSTALL"; then | |
d0ac1c44 | 4738 | if ${ac_cv_path_install+:} false; then : |
c971b7fa | 4739 | $as_echo_n "(cached) " >&6 |
81ecdfbb RW |
4740 | else |
4741 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4742 | for as_dir in $PATH | |
fd462a61 | 4743 | do |
81ecdfbb RW |
4744 | IFS=$as_save_IFS |
4745 | test -z "$as_dir" && as_dir=. | |
4746 | # Account for people who put trailing slashes in PATH elements. | |
4747 | case $as_dir/ in #(( | |
4748 | ./ | .// | /[cC]/* | \ | |
4749 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
4750 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
4751 | /usr/ucb/* ) ;; | |
4752 | *) | |
4753 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4754 | # Don't use installbsd from OSF since it installs stuff as root | |
4755 | # by default. | |
4756 | for ac_prog in ginstall scoinst install; do | |
4757 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4758 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
81ecdfbb RW |
4759 | if test $ac_prog = install && |
4760 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4761 | # AIX install. It has an incompatible calling convention. | |
4762 | : | |
4763 | elif test $ac_prog = install && | |
4764 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4765 | # program-specific install script used by HP pwplus--don't use. | |
4766 | : | |
4767 | else | |
4768 | rm -rf conftest.one conftest.two conftest.dir | |
4769 | echo one > conftest.one | |
4770 | echo two > conftest.two | |
4771 | mkdir conftest.dir | |
4772 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
4773 | test -s conftest.one && test -s conftest.two && | |
4774 | test -s conftest.dir/conftest.one && | |
4775 | test -s conftest.dir/conftest.two | |
4776 | then | |
4777 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
4778 | break 3 | |
4779 | fi | |
4780 | fi | |
4781 | fi | |
4782 | done | |
4783 | done | |
4784 | ;; | |
4785 | esac | |
fd462a61 | 4786 | |
81ecdfbb RW |
4787 | done |
4788 | IFS=$as_save_IFS | |
fd462a61 | 4789 | |
81ecdfbb | 4790 | rm -rf conftest.one conftest.two conftest.dir |
fd462a61 | 4791 | |
fd462a61 | 4792 | fi |
81ecdfbb RW |
4793 | if test "${ac_cv_path_install+set}" = set; then |
4794 | INSTALL=$ac_cv_path_install | |
4795 | else | |
4796 | # As a last resort, use the slow shell script. Don't cache a | |
4797 | # value for INSTALL within a source directory, because that will | |
4798 | # break other packages using the cache if that directory is | |
4799 | # removed, or if the value is a relative name. | |
4800 | INSTALL=$ac_install_sh | |
4801 | fi | |
fd462a61 | 4802 | fi |
81ecdfbb RW |
4803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
4804 | $as_echo "$INSTALL" >&6; } | |
fd462a61 | 4805 | |
81ecdfbb RW |
4806 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
4807 | # It thinks the first close brace ends the variable substitution. | |
4808 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
fd462a61 | 4809 | |
81ecdfbb | 4810 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
fd462a61 | 4811 | |
81ecdfbb | 4812 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
e28b3332 | 4813 | |
e1d2394b MS |
4814 | if test -n "$ac_tool_prefix"; then |
4815 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
4816 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
4817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4818 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4819 | if ${ac_cv_prog_AR+:} false; then : |
e1d2394b MS |
4820 | $as_echo_n "(cached) " >&6 |
4821 | else | |
4822 | if test -n "$AR"; then | |
4823 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
4824 | else | |
4825 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4826 | for as_dir in $PATH | |
4827 | do | |
4828 | IFS=$as_save_IFS | |
4829 | test -z "$as_dir" && as_dir=. | |
4830 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4831 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4832 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
4833 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4834 | break 2 | |
4835 | fi | |
4836 | done | |
4837 | done | |
4838 | IFS=$as_save_IFS | |
4839 | ||
4840 | fi | |
4841 | fi | |
4842 | AR=$ac_cv_prog_AR | |
4843 | if test -n "$AR"; then | |
4844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
4845 | $as_echo "$AR" >&6; } | |
4846 | else | |
4847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4848 | $as_echo "no" >&6; } | |
4849 | fi | |
4850 | ||
4851 | ||
4852 | fi | |
4853 | if test -z "$ac_cv_prog_AR"; then | |
4854 | ac_ct_AR=$AR | |
4855 | # Extract the first word of "ar", so it can be a program name with args. | |
4856 | set dummy ar; ac_word=$2 | |
4857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4858 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4859 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
e1d2394b MS |
4860 | $as_echo_n "(cached) " >&6 |
4861 | else | |
4862 | if test -n "$ac_ct_AR"; then | |
4863 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
4864 | else | |
4865 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4866 | for as_dir in $PATH | |
4867 | do | |
4868 | IFS=$as_save_IFS | |
4869 | test -z "$as_dir" && as_dir=. | |
4870 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4871 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4872 | ac_cv_prog_ac_ct_AR="ar" |
4873 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4874 | break 2 | |
4875 | fi | |
4876 | done | |
4877 | done | |
4878 | IFS=$as_save_IFS | |
4879 | ||
4880 | fi | |
4881 | fi | |
4882 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
4883 | if test -n "$ac_ct_AR"; then | |
4884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
4885 | $as_echo "$ac_ct_AR" >&6; } | |
4886 | else | |
4887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4888 | $as_echo "no" >&6; } | |
4889 | fi | |
4890 | ||
4891 | if test "x$ac_ct_AR" = x; then | |
4892 | AR="" | |
4893 | else | |
4894 | case $cross_compiling:$ac_tool_warned in | |
4895 | yes:) | |
4896 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4897 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4898 | ac_tool_warned=yes ;; | |
4899 | esac | |
4900 | AR=$ac_ct_AR | |
4901 | fi | |
4902 | else | |
4903 | AR="$ac_cv_prog_AR" | |
4904 | fi | |
4905 | ||
c971b7fa PA |
4906 | if test -n "$ac_tool_prefix"; then |
4907 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4908 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4910 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4911 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb RW |
4912 | $as_echo_n "(cached) " >&6 |
4913 | else | |
c971b7fa PA |
4914 | if test -n "$RANLIB"; then |
4915 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
e28b3332 | 4916 | else |
c971b7fa PA |
4917 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4918 | for as_dir in $PATH | |
4919 | do | |
4920 | IFS=$as_save_IFS | |
4921 | test -z "$as_dir" && as_dir=. | |
4922 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4923 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4924 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
4925 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4926 | break 2 | |
4927 | fi | |
4928 | done | |
4929 | done | |
4930 | IFS=$as_save_IFS | |
4931 | ||
4932 | fi | |
4933 | fi | |
4934 | RANLIB=$ac_cv_prog_RANLIB | |
4935 | if test -n "$RANLIB"; then | |
4936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4937 | $as_echo "$RANLIB" >&6; } | |
4938 | else | |
4939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4940 | $as_echo "no" >&6; } | |
4941 | fi | |
4942 | ||
4943 | ||
4944 | fi | |
4945 | if test -z "$ac_cv_prog_RANLIB"; then | |
4946 | ac_ct_RANLIB=$RANLIB | |
4947 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4948 | set dummy ranlib; ac_word=$2 | |
4949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4950 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4951 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
c971b7fa PA |
4952 | $as_echo_n "(cached) " >&6 |
4953 | else | |
4954 | if test -n "$ac_ct_RANLIB"; then | |
4955 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4956 | else | |
4957 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4958 | for as_dir in $PATH | |
4959 | do | |
4960 | IFS=$as_save_IFS | |
4961 | test -z "$as_dir" && as_dir=. | |
4962 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4963 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4964 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
4965 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4966 | break 2 | |
4967 | fi | |
4968 | done | |
4969 | done | |
4970 | IFS=$as_save_IFS | |
4971 | ||
4972 | fi | |
4973 | fi | |
4974 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4975 | if test -n "$ac_ct_RANLIB"; then | |
4976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4977 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4978 | else | |
4979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4980 | $as_echo "no" >&6; } | |
4981 | fi | |
4982 | ||
4983 | if test "x$ac_ct_RANLIB" = x; then | |
4984 | RANLIB=":" | |
4985 | else | |
4986 | case $cross_compiling:$ac_tool_warned in | |
4987 | yes:) | |
4988 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4989 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4990 | ac_tool_warned=yes ;; | |
4991 | esac | |
4992 | RANLIB=$ac_ct_RANLIB | |
4993 | fi | |
4994 | else | |
4995 | RANLIB="$ac_cv_prog_RANLIB" | |
4996 | fi | |
4997 | ||
4998 | ||
4999 | test "$program_prefix" != NONE && | |
5000 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5001 | # Use a double $ so make ignores it. | |
5002 | test "$program_suffix" != NONE && | |
5003 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5004 | # Double any \ or $. | |
5005 | # By default was `s,x,x', remove it if useless. | |
5006 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5007 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5008 | ||
5009 | ||
0bcda685 PA |
5010 | # We require a C++11 compiler. Check if one is available, and if |
5011 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5012 | ||
458412c3 | 5013 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5014 | ac_ext=cpp |
5015 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5016 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5017 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5018 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5019 | CXX_DIALECT="" | |
5020 | ac_success=no | |
5021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5022 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5023 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5024 | $as_echo_n "(cached) " >&6 |
5025 | else | |
5026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5027 | /* end confdefs.h. */ | |
5028 | ||
5029 | ||
5030 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5031 | // Hopefully, this will speed up the test. | |
5032 | ||
5033 | #ifndef __cplusplus | |
5034 | ||
5035 | #error "This is not a C++ compiler" | |
5036 | ||
5037 | #elif __cplusplus < 201103L | |
5038 | ||
5039 | #error "This is not a C++11 compiler" | |
5040 | ||
5041 | #else | |
5042 | ||
5043 | namespace cxx11 | |
5044 | { | |
5045 | ||
5046 | namespace test_static_assert | |
5047 | { | |
5048 | ||
5049 | template <typename T> | |
5050 | struct check | |
5051 | { | |
5052 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5053 | }; | |
5054 | ||
5055 | } | |
5056 | ||
5057 | namespace test_final_override | |
5058 | { | |
5059 | ||
5060 | struct Base | |
5061 | { | |
5062 | virtual void f() {} | |
5063 | }; | |
5064 | ||
5065 | struct Derived : public Base | |
5066 | { | |
5067 | virtual void f() override {} | |
5068 | }; | |
5069 | ||
5070 | } | |
5071 | ||
5072 | namespace test_double_right_angle_brackets | |
5073 | { | |
5074 | ||
5075 | template < typename T > | |
5076 | struct check {}; | |
5077 | ||
5078 | typedef check<void> single_type; | |
5079 | typedef check<check<void>> double_type; | |
5080 | typedef check<check<check<void>>> triple_type; | |
5081 | typedef check<check<check<check<void>>>> quadruple_type; | |
5082 | ||
5083 | } | |
5084 | ||
5085 | namespace test_decltype | |
5086 | { | |
5087 | ||
5088 | int | |
5089 | f() | |
5090 | { | |
5091 | int a = 1; | |
5092 | decltype(a) b = 2; | |
5093 | return a + b; | |
5094 | } | |
5095 | ||
5096 | } | |
5097 | ||
5098 | namespace test_type_deduction | |
5099 | { | |
5100 | ||
5101 | template < typename T1, typename T2 > | |
5102 | struct is_same | |
5103 | { | |
5104 | static const bool value = false; | |
5105 | }; | |
5106 | ||
5107 | template < typename T > | |
5108 | struct is_same<T, T> | |
5109 | { | |
5110 | static const bool value = true; | |
5111 | }; | |
5112 | ||
5113 | template < typename T1, typename T2 > | |
5114 | auto | |
5115 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5116 | { | |
5117 | return a1 + a2; | |
5118 | } | |
5119 | ||
5120 | int | |
5121 | test(const int c, volatile int v) | |
5122 | { | |
5123 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5124 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5125 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5126 | auto ac = c; | |
5127 | auto av = v; | |
5128 | auto sumi = ac + av + 'x'; | |
5129 | auto sumf = ac + av + 1.0; | |
5130 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5131 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5132 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5133 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5134 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5135 | return (sumf > 0.0) ? sumi : add(c, v); | |
5136 | } | |
5137 | ||
5138 | } | |
5139 | ||
5140 | namespace test_noexcept | |
5141 | { | |
5142 | ||
5143 | int f() { return 0; } | |
5144 | int g() noexcept { return 0; } | |
5145 | ||
5146 | static_assert(noexcept(f()) == false, ""); | |
5147 | static_assert(noexcept(g()) == true, ""); | |
5148 | ||
5149 | } | |
5150 | ||
5151 | namespace test_constexpr | |
5152 | { | |
5153 | ||
5154 | template < typename CharT > | |
5155 | unsigned long constexpr | |
5156 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5157 | { | |
5158 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5159 | } | |
5160 | ||
5161 | template < typename CharT > | |
5162 | unsigned long constexpr | |
5163 | strlen_c(const CharT *const s) noexcept | |
5164 | { | |
5165 | return strlen_c_r(s, 0UL); | |
5166 | } | |
5167 | ||
5168 | static_assert(strlen_c("") == 0UL, ""); | |
5169 | static_assert(strlen_c("1") == 1UL, ""); | |
5170 | static_assert(strlen_c("example") == 7UL, ""); | |
5171 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5172 | ||
5173 | } | |
5174 | ||
5175 | namespace test_rvalue_references | |
5176 | { | |
5177 | ||
5178 | template < int N > | |
5179 | struct answer | |
5180 | { | |
5181 | static constexpr int value = N; | |
5182 | }; | |
5183 | ||
5184 | answer<1> f(int&) { return answer<1>(); } | |
5185 | answer<2> f(const int&) { return answer<2>(); } | |
5186 | answer<3> f(int&&) { return answer<3>(); } | |
5187 | ||
5188 | void | |
5189 | test() | |
5190 | { | |
5191 | int i = 0; | |
5192 | const int c = 0; | |
5193 | static_assert(decltype(f(i))::value == 1, ""); | |
5194 | static_assert(decltype(f(c))::value == 2, ""); | |
5195 | static_assert(decltype(f(0))::value == 3, ""); | |
5196 | } | |
5197 | ||
5198 | } | |
5199 | ||
5200 | namespace test_uniform_initialization | |
5201 | { | |
5202 | ||
5203 | struct test | |
5204 | { | |
5205 | static const int zero {}; | |
5206 | static const int one {1}; | |
5207 | }; | |
5208 | ||
5209 | static_assert(test::zero == 0, ""); | |
5210 | static_assert(test::one == 1, ""); | |
5211 | ||
5212 | } | |
5213 | ||
5214 | namespace test_lambdas | |
5215 | { | |
5216 | ||
5217 | void | |
5218 | test1() | |
5219 | { | |
5220 | auto lambda1 = [](){}; | |
5221 | auto lambda2 = lambda1; | |
5222 | lambda1(); | |
5223 | lambda2(); | |
5224 | } | |
5225 | ||
5226 | int | |
5227 | test2() | |
5228 | { | |
5229 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5230 | auto b = []() -> int { return '0'; }(); | |
5231 | auto c = [=](){ return a + b; }(); | |
5232 | auto d = [&](){ return c; }(); | |
5233 | auto e = [a, &b](int x) mutable { | |
5234 | const auto identity = [](int y){ return y; }; | |
5235 | for (auto i = 0; i < a; ++i) | |
5236 | a += b--; | |
5237 | return x + identity(a + b); | |
5238 | }(0); | |
5239 | return a + b + c + d + e; | |
5240 | } | |
5241 | ||
5242 | int | |
5243 | test3() | |
5244 | { | |
5245 | const auto nullary = [](){ return 0; }; | |
5246 | const auto unary = [](int x){ return x; }; | |
5247 | using nullary_t = decltype(nullary); | |
5248 | using unary_t = decltype(unary); | |
5249 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5250 | const auto higher2nd = [unary](nullary_t f1){ | |
5251 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5252 | }; | |
5253 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5254 | } | |
5255 | ||
5256 | } | |
5257 | ||
5258 | namespace test_variadic_templates | |
5259 | { | |
5260 | ||
5261 | template <int...> | |
5262 | struct sum; | |
5263 | ||
5264 | template <int N0, int... N1toN> | |
5265 | struct sum<N0, N1toN...> | |
5266 | { | |
5267 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5268 | }; | |
5269 | ||
5270 | template <> | |
5271 | struct sum<> | |
5272 | { | |
5273 | static constexpr auto value = 0; | |
5274 | }; | |
5275 | ||
5276 | static_assert(sum<>::value == 0, ""); | |
5277 | static_assert(sum<1>::value == 1, ""); | |
5278 | static_assert(sum<23>::value == 23, ""); | |
5279 | static_assert(sum<1, 2>::value == 3, ""); | |
5280 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5281 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5282 | ||
5283 | } | |
5284 | ||
5285 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5286 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5287 | // because of this. | |
5288 | namespace test_template_alias_sfinae | |
5289 | { | |
5290 | ||
5291 | struct foo {}; | |
5292 | ||
5293 | template<typename T> | |
5294 | using member = typename T::member_type; | |
5295 | ||
5296 | template<typename T> | |
5297 | void func(...) {} | |
5298 | ||
5299 | template<typename T> | |
5300 | void func(member<T>*) {} | |
5301 | ||
5302 | void test(); | |
5303 | ||
5304 | void test() { func<foo>(0); } | |
5305 | ||
5306 | } | |
5307 | ||
5308 | } // namespace cxx11 | |
5309 | ||
5310 | #endif // __cplusplus >= 201103L | |
5311 | ||
5312 | ||
5313 | ||
5314 | _ACEOF | |
5315 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5316 | ax_cv_cxx_compile_cxx11=yes | |
5317 | else | |
5318 | ax_cv_cxx_compile_cxx11=no | |
5319 | fi | |
5320 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5321 | fi | |
5322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5323 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5324 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5325 | ac_success=yes | |
5326 | fi | |
5327 | ||
5328 | if test x$ac_success = xno; then | |
458412c3 TT |
5329 | for alternative in ${ax_cxx_compile_alternatives}; do |
5330 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5331 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5333 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5334 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5335 | $as_echo_n "(cached) " >&6 |
5336 | else | |
5337 | ac_save_CXX="$CXX" | |
5338 | CXX="$CXX $switch" | |
5339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5340 | /* end confdefs.h. */ | |
5341 | ||
5342 | ||
5343 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5344 | // Hopefully, this will speed up the test. | |
5345 | ||
5346 | #ifndef __cplusplus | |
5347 | ||
5348 | #error "This is not a C++ compiler" | |
5349 | ||
5350 | #elif __cplusplus < 201103L | |
5351 | ||
5352 | #error "This is not a C++11 compiler" | |
5353 | ||
5354 | #else | |
5355 | ||
5356 | namespace cxx11 | |
5357 | { | |
5358 | ||
5359 | namespace test_static_assert | |
5360 | { | |
5361 | ||
5362 | template <typename T> | |
5363 | struct check | |
5364 | { | |
5365 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5366 | }; | |
5367 | ||
5368 | } | |
5369 | ||
5370 | namespace test_final_override | |
5371 | { | |
5372 | ||
5373 | struct Base | |
5374 | { | |
5375 | virtual void f() {} | |
5376 | }; | |
5377 | ||
5378 | struct Derived : public Base | |
5379 | { | |
5380 | virtual void f() override {} | |
5381 | }; | |
5382 | ||
5383 | } | |
5384 | ||
5385 | namespace test_double_right_angle_brackets | |
5386 | { | |
5387 | ||
5388 | template < typename T > | |
5389 | struct check {}; | |
5390 | ||
5391 | typedef check<void> single_type; | |
5392 | typedef check<check<void>> double_type; | |
5393 | typedef check<check<check<void>>> triple_type; | |
5394 | typedef check<check<check<check<void>>>> quadruple_type; | |
5395 | ||
5396 | } | |
5397 | ||
5398 | namespace test_decltype | |
5399 | { | |
5400 | ||
5401 | int | |
5402 | f() | |
5403 | { | |
5404 | int a = 1; | |
5405 | decltype(a) b = 2; | |
5406 | return a + b; | |
5407 | } | |
5408 | ||
5409 | } | |
5410 | ||
5411 | namespace test_type_deduction | |
5412 | { | |
5413 | ||
5414 | template < typename T1, typename T2 > | |
5415 | struct is_same | |
5416 | { | |
5417 | static const bool value = false; | |
5418 | }; | |
5419 | ||
5420 | template < typename T > | |
5421 | struct is_same<T, T> | |
5422 | { | |
5423 | static const bool value = true; | |
5424 | }; | |
5425 | ||
5426 | template < typename T1, typename T2 > | |
5427 | auto | |
5428 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5429 | { | |
5430 | return a1 + a2; | |
5431 | } | |
5432 | ||
5433 | int | |
5434 | test(const int c, volatile int v) | |
5435 | { | |
5436 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5437 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5438 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5439 | auto ac = c; | |
5440 | auto av = v; | |
5441 | auto sumi = ac + av + 'x'; | |
5442 | auto sumf = ac + av + 1.0; | |
5443 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5444 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5445 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5446 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5447 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5448 | return (sumf > 0.0) ? sumi : add(c, v); | |
5449 | } | |
5450 | ||
5451 | } | |
5452 | ||
5453 | namespace test_noexcept | |
5454 | { | |
5455 | ||
5456 | int f() { return 0; } | |
5457 | int g() noexcept { return 0; } | |
5458 | ||
5459 | static_assert(noexcept(f()) == false, ""); | |
5460 | static_assert(noexcept(g()) == true, ""); | |
5461 | ||
5462 | } | |
5463 | ||
5464 | namespace test_constexpr | |
5465 | { | |
5466 | ||
5467 | template < typename CharT > | |
5468 | unsigned long constexpr | |
5469 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5470 | { | |
5471 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5472 | } | |
5473 | ||
5474 | template < typename CharT > | |
5475 | unsigned long constexpr | |
5476 | strlen_c(const CharT *const s) noexcept | |
5477 | { | |
5478 | return strlen_c_r(s, 0UL); | |
5479 | } | |
5480 | ||
5481 | static_assert(strlen_c("") == 0UL, ""); | |
5482 | static_assert(strlen_c("1") == 1UL, ""); | |
5483 | static_assert(strlen_c("example") == 7UL, ""); | |
5484 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5485 | ||
5486 | } | |
5487 | ||
5488 | namespace test_rvalue_references | |
5489 | { | |
5490 | ||
5491 | template < int N > | |
5492 | struct answer | |
5493 | { | |
5494 | static constexpr int value = N; | |
5495 | }; | |
5496 | ||
5497 | answer<1> f(int&) { return answer<1>(); } | |
5498 | answer<2> f(const int&) { return answer<2>(); } | |
5499 | answer<3> f(int&&) { return answer<3>(); } | |
5500 | ||
5501 | void | |
5502 | test() | |
5503 | { | |
5504 | int i = 0; | |
5505 | const int c = 0; | |
5506 | static_assert(decltype(f(i))::value == 1, ""); | |
5507 | static_assert(decltype(f(c))::value == 2, ""); | |
5508 | static_assert(decltype(f(0))::value == 3, ""); | |
5509 | } | |
5510 | ||
5511 | } | |
5512 | ||
5513 | namespace test_uniform_initialization | |
5514 | { | |
5515 | ||
5516 | struct test | |
5517 | { | |
5518 | static const int zero {}; | |
5519 | static const int one {1}; | |
5520 | }; | |
5521 | ||
5522 | static_assert(test::zero == 0, ""); | |
5523 | static_assert(test::one == 1, ""); | |
5524 | ||
5525 | } | |
5526 | ||
5527 | namespace test_lambdas | |
5528 | { | |
5529 | ||
5530 | void | |
5531 | test1() | |
5532 | { | |
5533 | auto lambda1 = [](){}; | |
5534 | auto lambda2 = lambda1; | |
5535 | lambda1(); | |
5536 | lambda2(); | |
5537 | } | |
5538 | ||
5539 | int | |
5540 | test2() | |
5541 | { | |
5542 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5543 | auto b = []() -> int { return '0'; }(); | |
5544 | auto c = [=](){ return a + b; }(); | |
5545 | auto d = [&](){ return c; }(); | |
5546 | auto e = [a, &b](int x) mutable { | |
5547 | const auto identity = [](int y){ return y; }; | |
5548 | for (auto i = 0; i < a; ++i) | |
5549 | a += b--; | |
5550 | return x + identity(a + b); | |
5551 | }(0); | |
5552 | return a + b + c + d + e; | |
5553 | } | |
5554 | ||
5555 | int | |
5556 | test3() | |
5557 | { | |
5558 | const auto nullary = [](){ return 0; }; | |
5559 | const auto unary = [](int x){ return x; }; | |
5560 | using nullary_t = decltype(nullary); | |
5561 | using unary_t = decltype(unary); | |
5562 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5563 | const auto higher2nd = [unary](nullary_t f1){ | |
5564 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5565 | }; | |
5566 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5567 | } | |
5568 | ||
5569 | } | |
5570 | ||
5571 | namespace test_variadic_templates | |
5572 | { | |
5573 | ||
5574 | template <int...> | |
5575 | struct sum; | |
5576 | ||
5577 | template <int N0, int... N1toN> | |
5578 | struct sum<N0, N1toN...> | |
5579 | { | |
5580 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5581 | }; | |
5582 | ||
5583 | template <> | |
5584 | struct sum<> | |
5585 | { | |
5586 | static constexpr auto value = 0; | |
5587 | }; | |
5588 | ||
5589 | static_assert(sum<>::value == 0, ""); | |
5590 | static_assert(sum<1>::value == 1, ""); | |
5591 | static_assert(sum<23>::value == 23, ""); | |
5592 | static_assert(sum<1, 2>::value == 3, ""); | |
5593 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5594 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5595 | ||
5596 | } | |
5597 | ||
5598 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5599 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5600 | // because of this. | |
5601 | namespace test_template_alias_sfinae | |
5602 | { | |
5603 | ||
5604 | struct foo {}; | |
5605 | ||
5606 | template<typename T> | |
5607 | using member = typename T::member_type; | |
5608 | ||
5609 | template<typename T> | |
5610 | void func(...) {} | |
5611 | ||
5612 | template<typename T> | |
5613 | void func(member<T>*) {} | |
5614 | ||
5615 | void test(); | |
5616 | ||
5617 | void test() { func<foo>(0); } | |
5618 | ||
5619 | } | |
5620 | ||
5621 | } // namespace cxx11 | |
5622 | ||
5623 | #endif // __cplusplus >= 201103L | |
5624 | ||
5625 | ||
5626 | ||
5627 | _ACEOF | |
5628 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5629 | eval $cachevar=yes | |
5630 | else | |
5631 | eval $cachevar=no | |
5632 | fi | |
5633 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5634 | CXX="$ac_save_CXX" | |
5635 | fi | |
5636 | eval ac_res=\$$cachevar | |
5637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5638 | $as_echo "$ac_res" >&6; } | |
5639 | if eval test x\$$cachevar = xyes; then | |
5640 | CXX_DIALECT="$switch" | |
77252bf2 TV |
5641 | CXX="$CXX $switch" |
5642 | if test -n "$CXXCPP" ; then | |
5643 | CXXCPP="$CXXCPP $switch" | |
5644 | fi | |
0bcda685 PA |
5645 | ac_success=yes |
5646 | break | |
5647 | fi | |
5648 | done | |
5649 | fi | |
5650 | ||
5651 | if test x$ac_success = xno; then | |
458412c3 TT |
5652 | for alternative in ${ax_cxx_compile_alternatives}; do |
5653 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5654 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5656 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5657 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5658 | $as_echo_n "(cached) " >&6 |
5659 | else | |
5660 | ac_save_CXX="$CXX" | |
458412c3 TT |
5661 | CXX="$CXX $switch" |
5662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5663 | /* end confdefs.h. */ |
5664 | ||
5665 | ||
5666 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5667 | // Hopefully, this will speed up the test. | |
5668 | ||
5669 | #ifndef __cplusplus | |
5670 | ||
5671 | #error "This is not a C++ compiler" | |
5672 | ||
5673 | #elif __cplusplus < 201103L | |
5674 | ||
5675 | #error "This is not a C++11 compiler" | |
5676 | ||
5677 | #else | |
5678 | ||
5679 | namespace cxx11 | |
5680 | { | |
5681 | ||
5682 | namespace test_static_assert | |
5683 | { | |
5684 | ||
5685 | template <typename T> | |
5686 | struct check | |
5687 | { | |
5688 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5689 | }; | |
5690 | ||
5691 | } | |
5692 | ||
5693 | namespace test_final_override | |
5694 | { | |
5695 | ||
5696 | struct Base | |
5697 | { | |
5698 | virtual void f() {} | |
5699 | }; | |
5700 | ||
5701 | struct Derived : public Base | |
5702 | { | |
5703 | virtual void f() override {} | |
5704 | }; | |
5705 | ||
5706 | } | |
5707 | ||
5708 | namespace test_double_right_angle_brackets | |
5709 | { | |
5710 | ||
5711 | template < typename T > | |
5712 | struct check {}; | |
5713 | ||
5714 | typedef check<void> single_type; | |
5715 | typedef check<check<void>> double_type; | |
5716 | typedef check<check<check<void>>> triple_type; | |
5717 | typedef check<check<check<check<void>>>> quadruple_type; | |
5718 | ||
5719 | } | |
5720 | ||
5721 | namespace test_decltype | |
5722 | { | |
5723 | ||
5724 | int | |
5725 | f() | |
5726 | { | |
5727 | int a = 1; | |
5728 | decltype(a) b = 2; | |
5729 | return a + b; | |
5730 | } | |
5731 | ||
5732 | } | |
5733 | ||
5734 | namespace test_type_deduction | |
5735 | { | |
5736 | ||
5737 | template < typename T1, typename T2 > | |
5738 | struct is_same | |
5739 | { | |
5740 | static const bool value = false; | |
5741 | }; | |
5742 | ||
5743 | template < typename T > | |
5744 | struct is_same<T, T> | |
5745 | { | |
5746 | static const bool value = true; | |
5747 | }; | |
5748 | ||
5749 | template < typename T1, typename T2 > | |
5750 | auto | |
5751 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5752 | { | |
5753 | return a1 + a2; | |
5754 | } | |
5755 | ||
5756 | int | |
5757 | test(const int c, volatile int v) | |
5758 | { | |
5759 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5760 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5761 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5762 | auto ac = c; | |
5763 | auto av = v; | |
5764 | auto sumi = ac + av + 'x'; | |
5765 | auto sumf = ac + av + 1.0; | |
5766 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5767 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5768 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5769 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5770 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5771 | return (sumf > 0.0) ? sumi : add(c, v); | |
5772 | } | |
5773 | ||
5774 | } | |
5775 | ||
5776 | namespace test_noexcept | |
5777 | { | |
5778 | ||
5779 | int f() { return 0; } | |
5780 | int g() noexcept { return 0; } | |
5781 | ||
5782 | static_assert(noexcept(f()) == false, ""); | |
5783 | static_assert(noexcept(g()) == true, ""); | |
5784 | ||
5785 | } | |
5786 | ||
5787 | namespace test_constexpr | |
5788 | { | |
5789 | ||
5790 | template < typename CharT > | |
5791 | unsigned long constexpr | |
5792 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5793 | { | |
5794 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5795 | } | |
5796 | ||
5797 | template < typename CharT > | |
5798 | unsigned long constexpr | |
5799 | strlen_c(const CharT *const s) noexcept | |
5800 | { | |
5801 | return strlen_c_r(s, 0UL); | |
5802 | } | |
5803 | ||
5804 | static_assert(strlen_c("") == 0UL, ""); | |
5805 | static_assert(strlen_c("1") == 1UL, ""); | |
5806 | static_assert(strlen_c("example") == 7UL, ""); | |
5807 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5808 | ||
5809 | } | |
5810 | ||
5811 | namespace test_rvalue_references | |
5812 | { | |
5813 | ||
5814 | template < int N > | |
5815 | struct answer | |
5816 | { | |
5817 | static constexpr int value = N; | |
5818 | }; | |
5819 | ||
5820 | answer<1> f(int&) { return answer<1>(); } | |
5821 | answer<2> f(const int&) { return answer<2>(); } | |
5822 | answer<3> f(int&&) { return answer<3>(); } | |
5823 | ||
5824 | void | |
5825 | test() | |
5826 | { | |
5827 | int i = 0; | |
5828 | const int c = 0; | |
5829 | static_assert(decltype(f(i))::value == 1, ""); | |
5830 | static_assert(decltype(f(c))::value == 2, ""); | |
5831 | static_assert(decltype(f(0))::value == 3, ""); | |
5832 | } | |
5833 | ||
5834 | } | |
5835 | ||
5836 | namespace test_uniform_initialization | |
5837 | { | |
5838 | ||
5839 | struct test | |
5840 | { | |
5841 | static const int zero {}; | |
5842 | static const int one {1}; | |
5843 | }; | |
5844 | ||
5845 | static_assert(test::zero == 0, ""); | |
5846 | static_assert(test::one == 1, ""); | |
5847 | ||
5848 | } | |
5849 | ||
5850 | namespace test_lambdas | |
5851 | { | |
5852 | ||
5853 | void | |
5854 | test1() | |
5855 | { | |
5856 | auto lambda1 = [](){}; | |
5857 | auto lambda2 = lambda1; | |
5858 | lambda1(); | |
5859 | lambda2(); | |
5860 | } | |
5861 | ||
5862 | int | |
5863 | test2() | |
5864 | { | |
5865 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5866 | auto b = []() -> int { return '0'; }(); | |
5867 | auto c = [=](){ return a + b; }(); | |
5868 | auto d = [&](){ return c; }(); | |
5869 | auto e = [a, &b](int x) mutable { | |
5870 | const auto identity = [](int y){ return y; }; | |
5871 | for (auto i = 0; i < a; ++i) | |
5872 | a += b--; | |
5873 | return x + identity(a + b); | |
5874 | }(0); | |
5875 | return a + b + c + d + e; | |
5876 | } | |
5877 | ||
5878 | int | |
5879 | test3() | |
5880 | { | |
5881 | const auto nullary = [](){ return 0; }; | |
5882 | const auto unary = [](int x){ return x; }; | |
5883 | using nullary_t = decltype(nullary); | |
5884 | using unary_t = decltype(unary); | |
5885 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5886 | const auto higher2nd = [unary](nullary_t f1){ | |
5887 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5888 | }; | |
5889 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5890 | } | |
5891 | ||
5892 | } | |
5893 | ||
5894 | namespace test_variadic_templates | |
5895 | { | |
5896 | ||
5897 | template <int...> | |
5898 | struct sum; | |
5899 | ||
5900 | template <int N0, int... N1toN> | |
5901 | struct sum<N0, N1toN...> | |
5902 | { | |
5903 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5904 | }; | |
5905 | ||
5906 | template <> | |
5907 | struct sum<> | |
5908 | { | |
5909 | static constexpr auto value = 0; | |
5910 | }; | |
5911 | ||
5912 | static_assert(sum<>::value == 0, ""); | |
5913 | static_assert(sum<1>::value == 1, ""); | |
5914 | static_assert(sum<23>::value == 23, ""); | |
5915 | static_assert(sum<1, 2>::value == 3, ""); | |
5916 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5917 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5918 | ||
5919 | } | |
5920 | ||
5921 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5922 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5923 | // because of this. | |
5924 | namespace test_template_alias_sfinae | |
5925 | { | |
5926 | ||
5927 | struct foo {}; | |
5928 | ||
5929 | template<typename T> | |
5930 | using member = typename T::member_type; | |
5931 | ||
5932 | template<typename T> | |
5933 | void func(...) {} | |
5934 | ||
5935 | template<typename T> | |
5936 | void func(member<T>*) {} | |
5937 | ||
5938 | void test(); | |
5939 | ||
5940 | void test() { func<foo>(0); } | |
5941 | ||
5942 | } | |
5943 | ||
5944 | } // namespace cxx11 | |
5945 | ||
5946 | #endif // __cplusplus >= 201103L | |
5947 | ||
5948 | ||
5949 | ||
5950 | _ACEOF | |
5951 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5952 | eval $cachevar=yes | |
5953 | else | |
5954 | eval $cachevar=no | |
5955 | fi | |
5956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
458412c3 | 5957 | CXX="$ac_save_CXX" |
0bcda685 PA |
5958 | fi |
5959 | eval ac_res=\$$cachevar | |
5960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5961 | $as_echo "$ac_res" >&6; } | |
458412c3 TT |
5962 | if eval test x\$$cachevar = xyes; then |
5963 | CXX_DIALECT="$switch" | |
77252bf2 TV |
5964 | CXX="$CXX $switch" |
5965 | if test -n "$CXXCPP" ; then | |
5966 | CXXCPP="$CXXCPP $switch" | |
5967 | fi | |
458412c3 TT |
5968 | ac_success=yes |
5969 | break | |
5970 | fi | |
5971 | done | |
5972 | if test x$ac_success = xyes; then | |
0bcda685 PA |
5973 | break |
5974 | fi | |
5975 | done | |
5976 | fi | |
5977 | ac_ext=c | |
5978 | ac_cpp='$CPP $CPPFLAGS' | |
5979 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5980 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5981 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5982 | ||
5983 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5984 | if test x$ac_success = xno; then | |
d0ac1c44 | 5985 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
5986 | fi |
5987 | fi | |
5988 | if test x$ac_success = xno; then | |
5989 | HAVE_CXX11=0 | |
5990 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5991 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5992 | else | |
5993 | HAVE_CXX11=1 | |
5994 | ||
5995 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5996 | ||
5997 | fi | |
5998 | ||
5999 | ||
6000 | ||
6001 | ||
c971b7fa PA |
6002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6003 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 6004 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
6005 | $as_echo_n "(cached) " >&6 |
6006 | else | |
6007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6008 | /* end confdefs.h. */ | |
6009 | #include <stdlib.h> | |
6010 | #include <stdarg.h> | |
6011 | #include <string.h> | |
6012 | #include <float.h> | |
6013 | ||
6014 | int | |
6015 | main () | |
6016 | { | |
6017 | ||
6018 | ; | |
6019 | return 0; | |
6020 | } | |
6021 | _ACEOF | |
6022 | if ac_fn_c_try_compile "$LINENO"; then : | |
6023 | ac_cv_header_stdc=yes | |
6024 | else | |
6025 | ac_cv_header_stdc=no | |
6026 | fi | |
6027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6028 | ||
6029 | if test $ac_cv_header_stdc = yes; then | |
6030 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6032 | /* end confdefs.h. */ | |
6033 | #include <string.h> | |
6034 | ||
6035 | _ACEOF | |
6036 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
6037 | $EGREP "memchr" >/dev/null 2>&1; then : |
6038 | ||
68070c10 | 6039 | else |
81ecdfbb RW |
6040 | ac_cv_header_stdc=no |
6041 | fi | |
6042 | rm -f conftest* | |
68070c10 PA |
6043 | |
6044 | fi | |
68070c10 | 6045 | |
81ecdfbb RW |
6046 | if test $ac_cv_header_stdc = yes; then |
6047 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6049 | /* end confdefs.h. */ | |
6050 | #include <stdlib.h> | |
68070c10 | 6051 | |
68070c10 | 6052 | _ACEOF |
81ecdfbb RW |
6053 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6054 | $EGREP "free" >/dev/null 2>&1; then : | |
68070c10 PA |
6055 | |
6056 | else | |
81ecdfbb | 6057 | ac_cv_header_stdc=no |
68070c10 | 6058 | fi |
81ecdfbb RW |
6059 | rm -f conftest* |
6060 | ||
68070c10 PA |
6061 | fi |
6062 | ||
81ecdfbb RW |
6063 | if test $ac_cv_header_stdc = yes; then |
6064 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6065 | if test "$cross_compiling" = yes; then : | |
6066 | : | |
43d5792c | 6067 | else |
81ecdfbb | 6068 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6069 | /* end confdefs.h. */ |
81ecdfbb RW |
6070 | #include <ctype.h> |
6071 | #include <stdlib.h> | |
6072 | #if ((' ' & 0x0FF) == 0x020) | |
6073 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6074 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6075 | #else | |
6076 | # define ISLOWER(c) \ | |
6077 | (('a' <= (c) && (c) <= 'i') \ | |
6078 | || ('j' <= (c) && (c) <= 'r') \ | |
6079 | || ('s' <= (c) && (c) <= 'z')) | |
6080 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6081 | #endif | |
6082 | ||
6083 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
bec39cab AC |
6084 | int |
6085 | main () | |
6086 | { | |
81ecdfbb RW |
6087 | int i; |
6088 | for (i = 0; i < 256; i++) | |
6089 | if (XOR (islower (i), ISLOWER (i)) | |
6090 | || toupper (i) != TOUPPER (i)) | |
6091 | return 2; | |
bec39cab AC |
6092 | return 0; |
6093 | } | |
6094 | _ACEOF | |
81ecdfbb | 6095 | if ac_fn_c_try_run "$LINENO"; then : |
bec39cab | 6096 | |
81ecdfbb RW |
6097 | else |
6098 | ac_cv_header_stdc=no | |
43d5792c | 6099 | fi |
81ecdfbb RW |
6100 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6101 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
43d5792c | 6102 | fi |
e122f1f5 | 6103 | |
68070c10 | 6104 | fi |
81ecdfbb RW |
6105 | fi |
6106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6107 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6108 | if test $ac_cv_header_stdc = yes; then | |
68070c10 | 6109 | |
81ecdfbb | 6110 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
68070c10 | 6111 | |
68070c10 | 6112 | fi |
68070c10 | 6113 | |
68070c10 | 6114 | |
db6878ac SM |
6115 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6116 | if test "x$ac_cv_type_size_t" = xyes; then : | |
8ecfd7bd | 6117 | |
db6878ac | 6118 | else |
4d696a5c | 6119 | |
db6878ac SM |
6120 | cat >>confdefs.h <<_ACEOF |
6121 | #define size_t unsigned int | |
6122 | _ACEOF | |
4d696a5c | 6123 | |
8ecfd7bd SDJ |
6124 | fi |
6125 | ||
6126 | ||
6d580b63 | 6127 | |
8ecfd7bd | 6128 | |
db6878ac SM |
6129 | for ac_header in $ac_header_list |
6130 | do : | |
6131 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6132 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6133 | " | |
6134 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
6135 | cat >>confdefs.h <<_ACEOF | |
6136 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6137 | _ACEOF | |
8ecfd7bd | 6138 | |
6d580b63 YQ |
6139 | fi |
6140 | ||
db6878ac | 6141 | done |
8ecfd7bd | 6142 | |
bd885420 | 6143 | |
bd885420 YQ |
6144 | |
6145 | ||
6146 | ||
6147 | ||
6148 | ||
db6878ac SM |
6149 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
6150 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
bd885420 | 6151 | |
61c125b9 | 6152 | else |
60d6cfc9 | 6153 | |
db6878ac SM |
6154 | cat >>confdefs.h <<_ACEOF |
6155 | #define pid_t int | |
6156 | _ACEOF | |
60d6cfc9 | 6157 | |
db6878ac | 6158 | fi |
61c125b9 | 6159 | |
db6878ac SM |
6160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
6161 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
6162 | if ${ac_cv_path_SED+:} false; then : | |
61c125b9 TT |
6163 | $as_echo_n "(cached) " >&6 |
6164 | else | |
db6878ac SM |
6165 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ |
6166 | for ac_i in 1 2 3 4 5 6 7; do | |
6167 | ac_script="$ac_script$as_nl$ac_script" | |
6168 | done | |
6169 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
6170 | { ac_script=; unset ac_script;} | |
6171 | if test -z "$SED"; then | |
6172 | ac_path_SED_found=false | |
6173 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6174 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6175 | for as_dir in $PATH | |
6176 | do | |
6177 | IFS=$as_save_IFS | |
6178 | test -z "$as_dir" && as_dir=. | |
6179 | for ac_prog in sed gsed; do | |
6180 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6181 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
6182 | as_fn_executable_p "$ac_path_SED" || continue | |
6183 | # Check for GNU ac_path_SED and select it if it is found. | |
6184 | # Check for GNU $ac_path_SED | |
6185 | case `"$ac_path_SED" --version 2>&1` in | |
6186 | *GNU*) | |
6187 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
6188 | *) | |
6189 | ac_count=0 | |
6190 | $as_echo_n 0123456789 >"conftest.in" | |
6191 | while : | |
6192 | do | |
6193 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6194 | mv "conftest.tmp" "conftest.in" | |
6195 | cp "conftest.in" "conftest.nl" | |
6196 | $as_echo '' >> "conftest.nl" | |
6197 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6198 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6199 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6200 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
6201 | # Best one so far, save it but keep looking for a better one | |
6202 | ac_cv_path_SED="$ac_path_SED" | |
6203 | ac_path_SED_max=$ac_count | |
61c125b9 | 6204 | fi |
db6878ac SM |
6205 | # 10*(2^10) chars as input seems more than enough |
6206 | test $ac_count -gt 10 && break | |
61c125b9 | 6207 | done |
db6878ac SM |
6208 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
6209 | esac | |
61c125b9 | 6210 | |
db6878ac SM |
6211 | $ac_path_SED_found && break 3 |
6212 | done | |
6213 | done | |
6214 | done | |
6215 | IFS=$as_save_IFS | |
6216 | if test -z "$ac_cv_path_SED"; then | |
6217 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
6218 | fi | |
61c125b9 | 6219 | else |
db6878ac | 6220 | ac_cv_path_SED=$SED |
61c125b9 TT |
6221 | fi |
6222 | ||
6223 | fi | |
db6878ac SM |
6224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 |
6225 | $as_echo "$ac_cv_path_SED" >&6; } | |
6226 | SED="$ac_cv_path_SED" | |
6227 | rm -f conftest.sed | |
61c125b9 | 6228 | |
d0ac1c44 | 6229 | |
db6878ac SM |
6230 | if test "X$prefix" = "XNONE"; then |
6231 | acl_final_prefix="$ac_default_prefix" | |
6232 | else | |
6233 | acl_final_prefix="$prefix" | |
6234 | fi | |
6235 | if test "X$exec_prefix" = "XNONE"; then | |
6236 | acl_final_exec_prefix='${prefix}' | |
6237 | else | |
6238 | acl_final_exec_prefix="$exec_prefix" | |
6239 | fi | |
6240 | acl_save_prefix="$prefix" | |
6241 | prefix="$acl_final_prefix" | |
6242 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
6243 | prefix="$acl_save_prefix" | |
05ea2a05 TT |
6244 | |
6245 | ||
6246 | # Check whether --with-gnu-ld was given. | |
6247 | if test "${with_gnu_ld+set}" = set; then : | |
6248 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
6249 | else | |
6250 | with_gnu_ld=no | |
6251 | fi | |
6252 | ||
6253 | # Prepare PATH_SEPARATOR. | |
6254 | # The user is always right. | |
6255 | if test "${PATH_SEPARATOR+set}" != set; then | |
6256 | echo "#! /bin/sh" >conf$$.sh | |
6257 | echo "exit 0" >>conf$$.sh | |
6258 | chmod +x conf$$.sh | |
6259 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6260 | PATH_SEPARATOR=';' | |
6261 | else | |
6262 | PATH_SEPARATOR=: | |
6263 | fi | |
6264 | rm -f conf$$.sh | |
6265 | fi | |
6266 | ac_prog=ld | |
6267 | if test "$GCC" = yes; then | |
6268 | # Check if gcc -print-prog-name=ld gives a path. | |
6269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
6270 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
6271 | case $host in | |
6272 | *-*-mingw*) | |
6273 | # gcc leaves a trailing carriage return which upsets mingw | |
6274 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
6275 | *) | |
6276 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
6277 | esac | |
6278 | case $ac_prog in | |
6279 | # Accept absolute paths. | |
6280 | [\\/]* | [A-Za-z]:[\\/]*) | |
6281 | re_direlt='/[^/][^/]*/\.\./' | |
6282 | # Canonicalize the path of ld | |
6283 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
6284 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
6285 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
6286 | done | |
6287 | test -z "$LD" && LD="$ac_prog" | |
6288 | ;; | |
6289 | "") | |
6290 | # If it fails, then pretend we aren't using GCC. | |
6291 | ac_prog=ld | |
6292 | ;; | |
6293 | *) | |
6294 | # If it is relative, then search for the first ld in PATH. | |
6295 | with_gnu_ld=unknown | |
6296 | ;; | |
6297 | esac | |
6298 | elif test "$with_gnu_ld" = yes; then | |
6299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
6300 | $as_echo_n "checking for GNU ld... " >&6; } | |
6301 | else | |
6302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
6303 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
6304 | fi | |
6305 | if ${acl_cv_path_LD+:} false; then : | |
6306 | $as_echo_n "(cached) " >&6 | |
6307 | else | |
6308 | if test -z "$LD"; then | |
6309 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
6310 | for ac_dir in $PATH; do | |
6311 | test -z "$ac_dir" && ac_dir=. | |
6312 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
6313 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
6314 | # Check to see if the program is GNU ld. I'd rather use --version, | |
6315 | # but apparently some GNU ld's only accept -v. | |
6316 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
93362ef5 | 6317 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then |
05ea2a05 TT |
6318 | test "$with_gnu_ld" != no && break |
6319 | else | |
6320 | test "$with_gnu_ld" != yes && break | |
6321 | fi | |
6322 | fi | |
6323 | done | |
6324 | IFS="$ac_save_ifs" | |
6325 | else | |
6326 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
6327 | fi | |
6328 | fi | |
6329 | ||
6330 | LD="$acl_cv_path_LD" | |
6331 | if test -n "$LD"; then | |
6332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
6333 | $as_echo "$LD" >&6; } | |
6334 | else | |
6335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6336 | $as_echo "no" >&6; } | |
6337 | fi | |
6338 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
6339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
6340 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
6341 | if ${acl_cv_prog_gnu_ld+:} false; then : | |
6342 | $as_echo_n "(cached) " >&6 | |
6343 | else | |
6344 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
93362ef5 | 6345 | if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then |
05ea2a05 TT |
6346 | acl_cv_prog_gnu_ld=yes |
6347 | else | |
6348 | acl_cv_prog_gnu_ld=no | |
6349 | fi | |
6350 | fi | |
6351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
6352 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
6353 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
6354 | ||
6355 | ||
6356 | ||
6357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
6358 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
6359 | if ${acl_cv_rpath+:} false; then : | |
6360 | $as_echo_n "(cached) " >&6 | |
6361 | else | |
6362 | ||
6363 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
6364 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
6365 | . ./conftest.sh | |
6366 | rm -f ./conftest.sh | |
6367 | acl_cv_rpath=done | |
6368 | ||
6369 | fi | |
6370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
6371 | $as_echo "$acl_cv_rpath" >&6; } | |
6372 | wl="$acl_cv_wl" | |
6373 | libext="$acl_cv_libext" | |
6374 | shlibext="$acl_cv_shlibext" | |
6375 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
6376 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
6377 | hardcode_direct="$acl_cv_hardcode_direct" | |
6378 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
6379 | # Check whether --enable-rpath was given. | |
6380 | if test "${enable_rpath+set}" = set; then : | |
6381 | enableval=$enable_rpath; : | |
6382 | else | |
6383 | enable_rpath=yes | |
6384 | fi | |
6385 | ||
6386 | ||
6387 | ||
db6878ac SM |
6388 | # Set the 'development' global. |
6389 | . $srcdir/../bfd/development.sh | |
6390 | ||
3266f10b TT |
6391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6392 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 6393 | if ${ac_cv_header_stdc+:} false; then : |
3266f10b TT |
6394 | $as_echo_n "(cached) " >&6 |
6395 | else | |
6396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6397 | /* end confdefs.h. */ | |
6398 | #include <stdlib.h> | |
6399 | #include <stdarg.h> | |
6400 | #include <string.h> | |
6401 | #include <float.h> | |
6402 | ||
6403 | int | |
6404 | main () | |
6405 | { | |
6406 | ||
6407 | ; | |
6408 | return 0; | |
6409 | } | |
6410 | _ACEOF | |
6411 | if ac_fn_c_try_compile "$LINENO"; then : | |
6412 | ac_cv_header_stdc=yes | |
6413 | else | |
6414 | ac_cv_header_stdc=no | |
6415 | fi | |
6416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6417 | ||
6418 | if test $ac_cv_header_stdc = yes; then | |
6419 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6420 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6421 | /* end confdefs.h. */ | |
6422 | #include <string.h> | |
6423 | ||
6424 | _ACEOF | |
6425 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6426 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6427 | ||
6428 | else | |
6429 | ac_cv_header_stdc=no | |
6430 | fi | |
6431 | rm -f conftest* | |
6432 | ||
6433 | fi | |
6434 | ||
6435 | if test $ac_cv_header_stdc = yes; then | |
6436 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6438 | /* end confdefs.h. */ | |
6439 | #include <stdlib.h> | |
6440 | ||
6441 | _ACEOF | |
6442 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6443 | $EGREP "free" >/dev/null 2>&1; then : | |
6444 | ||
6445 | else | |
6446 | ac_cv_header_stdc=no | |
6447 | fi | |
6448 | rm -f conftest* | |
6449 | ||
6450 | fi | |
6451 | ||
6452 | if test $ac_cv_header_stdc = yes; then | |
6453 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6454 | if test "$cross_compiling" = yes; then : | |
6455 | : | |
6456 | else | |
6457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6458 | /* end confdefs.h. */ | |
6459 | #include <ctype.h> | |
6460 | #include <stdlib.h> | |
6461 | #if ((' ' & 0x0FF) == 0x020) | |
6462 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6463 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6464 | #else | |
6465 | # define ISLOWER(c) \ | |
6466 | (('a' <= (c) && (c) <= 'i') \ | |
6467 | || ('j' <= (c) && (c) <= 'r') \ | |
6468 | || ('s' <= (c) && (c) <= 'z')) | |
6469 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6470 | #endif | |
6471 | ||
6472 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6473 | int | |
6474 | main () | |
6475 | { | |
6476 | int i; | |
6477 | for (i = 0; i < 256; i++) | |
6478 | if (XOR (islower (i), ISLOWER (i)) | |
6479 | || toupper (i) != TOUPPER (i)) | |
6480 | return 2; | |
6481 | return 0; | |
6482 | } | |
6483 | _ACEOF | |
6484 | if ac_fn_c_try_run "$LINENO"; then : | |
6485 | ||
6486 | else | |
6487 | ac_cv_header_stdc=no | |
6488 | fi | |
6489 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6490 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6491 | fi | |
6492 | ||
6493 | fi | |
6494 | fi | |
6495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6496 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6497 | if test $ac_cv_header_stdc = yes; then | |
6498 | ||
6499 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6500 | ||
3266f10b TT |
6501 | fi |
6502 | ||
6503 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6504 | # for constant arguments. Useless! | |
6505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
6506 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d0ac1c44 | 6507 | if ${ac_cv_working_alloca_h+:} false; then : |
3266f10b TT |
6508 | $as_echo_n "(cached) " >&6 |
6509 | else | |
6510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6511 | /* end confdefs.h. */ | |
6512 | #include <alloca.h> | |
6513 | int | |
6514 | main () | |
6515 | { | |
6516 | char *p = (char *) alloca (2 * sizeof (int)); | |
6517 | if (p) return 0; | |
6518 | ; | |
6519 | return 0; | |
6520 | } | |
6521 | _ACEOF | |
6522 | if ac_fn_c_try_link "$LINENO"; then : | |
6523 | ac_cv_working_alloca_h=yes | |
6524 | else | |
6525 | ac_cv_working_alloca_h=no | |
6526 | fi | |
6527 | rm -f core conftest.err conftest.$ac_objext \ | |
6528 | conftest$ac_exeext conftest.$ac_ext | |
6529 | fi | |
6530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
6531 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
6532 | if test $ac_cv_working_alloca_h = yes; then | |
6533 | ||
6534 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
6535 | ||
6536 | fi | |
6537 | ||
6538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
6539 | $as_echo_n "checking for alloca... " >&6; } | |
d0ac1c44 | 6540 | if ${ac_cv_func_alloca_works+:} false; then : |
3266f10b TT |
6541 | $as_echo_n "(cached) " >&6 |
6542 | else | |
6543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6544 | /* end confdefs.h. */ | |
6545 | #ifdef __GNUC__ | |
6546 | # define alloca __builtin_alloca | |
6547 | #else | |
6548 | # ifdef _MSC_VER | |
6549 | # include <malloc.h> | |
6550 | # define alloca _alloca | |
6551 | # else | |
6552 | # ifdef HAVE_ALLOCA_H | |
6553 | # include <alloca.h> | |
6554 | # else | |
6555 | # ifdef _AIX | |
6556 | #pragma alloca | |
6557 | # else | |
6558 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d0ac1c44 | 6559 | void *alloca (size_t); |
3266f10b TT |
6560 | # endif |
6561 | # endif | |
6562 | # endif | |
6563 | # endif | |
6564 | #endif | |
6565 | ||
6566 | int | |
6567 | main () | |
6568 | { | |
6569 | char *p = (char *) alloca (1); | |
6570 | if (p) return 0; | |
6571 | ; | |
6572 | return 0; | |
6573 | } | |
6574 | _ACEOF | |
6575 | if ac_fn_c_try_link "$LINENO"; then : | |
6576 | ac_cv_func_alloca_works=yes | |
6577 | else | |
6578 | ac_cv_func_alloca_works=no | |
6579 | fi | |
6580 | rm -f core conftest.err conftest.$ac_objext \ | |
6581 | conftest$ac_exeext conftest.$ac_ext | |
6582 | fi | |
6583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
6584 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
6585 | ||
6586 | if test $ac_cv_func_alloca_works = yes; then | |
6587 | ||
6588 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
6589 | ||
6590 | else | |
6591 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6592 | # that cause trouble. Some versions do not even contain alloca or | |
6593 | # contain a buggy version. If you still want to use their alloca, | |
6594 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6595 | ||
6596 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
6597 | ||
6598 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
6599 | ||
6600 | ||
6601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
6602 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d0ac1c44 | 6603 | if ${ac_cv_os_cray+:} false; then : |
3266f10b TT |
6604 | $as_echo_n "(cached) " >&6 |
6605 | else | |
6606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6607 | /* end confdefs.h. */ | |
6608 | #if defined CRAY && ! defined CRAY2 | |
6609 | webecray | |
6610 | #else | |
6611 | wenotbecray | |
6612 | #endif | |
6613 | ||
6614 | _ACEOF | |
6615 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6616 | $EGREP "webecray" >/dev/null 2>&1; then : | |
6617 | ac_cv_os_cray=yes | |
6618 | else | |
6619 | ac_cv_os_cray=no | |
6620 | fi | |
6621 | rm -f conftest* | |
6622 | ||
6623 | fi | |
6624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
6625 | $as_echo "$ac_cv_os_cray" >&6; } | |
6626 | if test $ac_cv_os_cray = yes; then | |
6627 | for ac_func in _getb67 GETB67 getb67; do | |
6628 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6629 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6630 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
6631 | |
6632 | cat >>confdefs.h <<_ACEOF | |
6633 | #define CRAY_STACKSEG_END $ac_func | |
6634 | _ACEOF | |
6635 | ||
6636 | break | |
6637 | fi | |
6638 | ||
6639 | done | |
6640 | fi | |
6641 | ||
6642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
6643 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d0ac1c44 | 6644 | if ${ac_cv_c_stack_direction+:} false; then : |
3266f10b TT |
6645 | $as_echo_n "(cached) " >&6 |
6646 | else | |
6647 | if test "$cross_compiling" = yes; then : | |
6648 | ac_cv_c_stack_direction=0 | |
6649 | else | |
6650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6651 | /* end confdefs.h. */ | |
6652 | $ac_includes_default | |
6653 | int | |
d0ac1c44 | 6654 | find_stack_direction (int *addr, int depth) |
3266f10b | 6655 | { |
d0ac1c44 SM |
6656 | int dir, dummy = 0; |
6657 | if (! addr) | |
6658 | addr = &dummy; | |
6659 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
6660 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
6661 | return dir + dummy; | |
3266f10b TT |
6662 | } |
6663 | ||
6664 | int | |
d0ac1c44 | 6665 | main (int argc, char **argv) |
3266f10b | 6666 | { |
d0ac1c44 | 6667 | return find_stack_direction (0, argc + !argv + 20) < 0; |
3266f10b TT |
6668 | } |
6669 | _ACEOF | |
6670 | if ac_fn_c_try_run "$LINENO"; then : | |
6671 | ac_cv_c_stack_direction=1 | |
6672 | else | |
6673 | ac_cv_c_stack_direction=-1 | |
6674 | fi | |
6675 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6676 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6677 | fi | |
6678 | ||
6679 | fi | |
6680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
6681 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
6682 | cat >>confdefs.h <<_ACEOF | |
6683 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6684 | _ACEOF | |
6685 | ||
6686 | ||
6687 | fi | |
6688 | ||
6689 | ||
b2ceabe8 TT |
6690 | WIN32APILIBS= |
6691 | case ${host} in | |
6692 | *mingw32*) | |
6693 | ||
6694 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
6695 | ||
6696 | WIN32APILIBS="-lws2_32" | |
6697 | ;; | |
6698 | esac | |
6699 | ||
3266f10b TT |
6700 | |
6701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
6702 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 6703 | if ${am_cv_langinfo_codeset+:} false; then : |
3266f10b TT |
6704 | $as_echo_n "(cached) " >&6 |
6705 | else | |
6706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6707 | /* end confdefs.h. */ | |
6708 | #include <langinfo.h> | |
6709 | int | |
6710 | main () | |
6711 | { | |
6712 | char* cs = nl_langinfo(CODESET); | |
6713 | ; | |
6714 | return 0; | |
6715 | } | |
6716 | _ACEOF | |
6717 | if ac_fn_c_try_link "$LINENO"; then : | |
6718 | am_cv_langinfo_codeset=yes | |
6719 | else | |
6720 | am_cv_langinfo_codeset=no | |
6721 | fi | |
6722 | rm -f core conftest.err conftest.$ac_objext \ | |
6723 | conftest$ac_exeext conftest.$ac_ext | |
6724 | ||
6725 | fi | |
6726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
6727 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6728 | if test $am_cv_langinfo_codeset = yes; then | |
6729 | ||
6730 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
6731 | ||
6732 | fi | |
6733 | ||
6734 | ||
c8693053 | 6735 | 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 |
3266f10b TT |
6736 | do : |
6737 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6738 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 6739 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
3266f10b TT |
6740 | cat >>confdefs.h <<_ACEOF |
6741 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6742 | _ACEOF | |
6743 | ||
6744 | fi | |
6745 | ||
6746 | done | |
6747 | ||
6748 | ||
05ea2a05 TT |
6749 | |
6750 | for ac_func in getpagesize | |
3266f10b | 6751 | do : |
05ea2a05 TT |
6752 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
6753 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
3266f10b | 6754 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 6755 | #define HAVE_GETPAGESIZE 1 |
3266f10b TT |
6756 | _ACEOF |
6757 | ||
6758 | fi | |
6759 | done | |
6760 | ||
05ea2a05 TT |
6761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
6762 | $as_echo_n "checking for working mmap... " >&6; } | |
6763 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
6764 | $as_echo_n "(cached) " >&6 | |
3266f10b | 6765 | else |
05ea2a05 TT |
6766 | if test "$cross_compiling" = yes; then : |
6767 | ac_cv_func_mmap_fixed_mapped=no | |
6768 | else | |
6769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6770 | /* end confdefs.h. */ | |
6771 | $ac_includes_default | |
6772 | /* malloc might have been renamed as rpl_malloc. */ | |
6773 | #undef malloc | |
6774 | ||
6775 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6776 | Here is a matrix of mmap possibilities: | |
6777 | mmap private not fixed | |
6778 | mmap private fixed at somewhere currently unmapped | |
6779 | mmap private fixed at somewhere already mapped | |
6780 | mmap shared not fixed | |
6781 | mmap shared fixed at somewhere currently unmapped | |
6782 | mmap shared fixed at somewhere already mapped | |
6783 | For private mappings, we should verify that changes cannot be read() | |
6784 | back from the file, nor mmap's back from the file at a different | |
6785 | address. (There have been systems where private was not correctly | |
6786 | implemented like the infamous i386 svr4.0, and systems where the | |
6787 | VM page cache was not coherent with the file system buffer cache | |
6788 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6789 | For shared mappings, we should conversely verify that changes get | |
6790 | propagated back to all the places they're supposed to be. | |
6791 | ||
6792 | Grep wants private fixed already mapped. | |
6793 | The main things grep needs to know about mmap are: | |
6794 | * does it exist and is it safe to write into the mmap'd area | |
6795 | * how to use it (BSD variants) */ | |
6796 | ||
6797 | #include <fcntl.h> | |
6798 | #include <sys/mman.h> | |
6799 | ||
6800 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
6801 | char *malloc (); | |
6802 | #endif | |
3266f10b | 6803 | |
05ea2a05 TT |
6804 | /* This mess was copied from the GNU getpagesize.h. */ |
6805 | #ifndef HAVE_GETPAGESIZE | |
6806 | # ifdef _SC_PAGESIZE | |
6807 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6808 | # else /* no _SC_PAGESIZE */ | |
6809 | # ifdef HAVE_SYS_PARAM_H | |
6810 | # include <sys/param.h> | |
6811 | # ifdef EXEC_PAGESIZE | |
6812 | # define getpagesize() EXEC_PAGESIZE | |
6813 | # else /* no EXEC_PAGESIZE */ | |
6814 | # ifdef NBPG | |
6815 | # define getpagesize() NBPG * CLSIZE | |
6816 | # ifndef CLSIZE | |
6817 | # define CLSIZE 1 | |
6818 | # endif /* no CLSIZE */ | |
6819 | # else /* no NBPG */ | |
6820 | # ifdef NBPC | |
6821 | # define getpagesize() NBPC | |
6822 | # else /* no NBPC */ | |
6823 | # ifdef PAGESIZE | |
6824 | # define getpagesize() PAGESIZE | |
6825 | # endif /* PAGESIZE */ | |
6826 | # endif /* no NBPC */ | |
6827 | # endif /* no NBPG */ | |
6828 | # endif /* no EXEC_PAGESIZE */ | |
6829 | # else /* no HAVE_SYS_PARAM_H */ | |
6830 | # define getpagesize() 8192 /* punt totally */ | |
6831 | # endif /* no HAVE_SYS_PARAM_H */ | |
6832 | # endif /* no _SC_PAGESIZE */ | |
6833 | ||
6834 | #endif /* no HAVE_GETPAGESIZE */ | |
3266f10b | 6835 | |
05ea2a05 TT |
6836 | int |
6837 | main () | |
6838 | { | |
6839 | char *data, *data2, *data3; | |
6840 | const char *cdata2; | |
6841 | int i, pagesize; | |
6842 | int fd, fd2; | |
3266f10b | 6843 | |
05ea2a05 | 6844 | pagesize = getpagesize (); |
5e030278 | 6845 | |
05ea2a05 TT |
6846 | /* First, make a file with some known garbage in it. */ |
6847 | data = (char *) malloc (pagesize); | |
6848 | if (!data) | |
6849 | return 1; | |
6850 | for (i = 0; i < pagesize; ++i) | |
6851 | *(data + i) = rand (); | |
6852 | umask (0); | |
6853 | fd = creat ("conftest.mmap", 0600); | |
6854 | if (fd < 0) | |
6855 | return 2; | |
6856 | if (write (fd, data, pagesize) != pagesize) | |
6857 | return 3; | |
6858 | close (fd); | |
6859 | ||
6860 | /* Next, check that the tail of a page is zero-filled. File must have | |
6861 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
6862 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
6863 | if (fd2 < 0) | |
6864 | return 4; | |
6865 | cdata2 = ""; | |
6866 | if (write (fd2, cdata2, 1) != 1) | |
6867 | return 5; | |
6868 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
6869 | if (data2 == MAP_FAILED) | |
6870 | return 6; | |
6871 | for (i = 0; i < pagesize; ++i) | |
6872 | if (*(data2 + i)) | |
6873 | return 7; | |
6874 | close (fd2); | |
6875 | if (munmap (data2, pagesize)) | |
6876 | return 8; | |
6877 | ||
6878 | /* Next, try to mmap the file at a fixed address which already has | |
6879 | something else allocated at it. If we can, also make sure that | |
6880 | we see the same garbage. */ | |
6881 | fd = open ("conftest.mmap", O_RDWR); | |
6882 | if (fd < 0) | |
6883 | return 9; | |
6884 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
6885 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6886 | return 10; | |
6887 | for (i = 0; i < pagesize; ++i) | |
6888 | if (*(data + i) != *(data2 + i)) | |
6889 | return 11; | |
6890 | ||
6891 | /* Finally, make sure that changes to the mapped area do not | |
6892 | percolate back to the file as seen by read(). (This is a bug on | |
6893 | some variants of i386 svr4.0.) */ | |
6894 | for (i = 0; i < pagesize; ++i) | |
6895 | *(data2 + i) = *(data2 + i) + 1; | |
6896 | data3 = (char *) malloc (pagesize); | |
6897 | if (!data3) | |
6898 | return 12; | |
6899 | if (read (fd, data3, pagesize) != pagesize) | |
6900 | return 13; | |
6901 | for (i = 0; i < pagesize; ++i) | |
6902 | if (*(data + i) != *(data3 + i)) | |
6903 | return 14; | |
6904 | close (fd); | |
6905 | return 0; | |
6906 | } | |
6907 | _ACEOF | |
6908 | if ac_fn_c_try_run "$LINENO"; then : | |
6909 | ac_cv_func_mmap_fixed_mapped=yes | |
6910 | else | |
6911 | ac_cv_func_mmap_fixed_mapped=no | |
6912 | fi | |
6913 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6914 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6915 | fi | |
5e030278 | 6916 | |
05ea2a05 TT |
6917 | fi |
6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
6919 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
6920 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5e030278 | 6921 | |
05ea2a05 | 6922 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
5e030278 | 6923 | |
05ea2a05 TT |
6924 | fi |
6925 | rm -f conftest.mmap conftest.txt | |
5e030278 | 6926 | |
05ea2a05 TT |
6927 | for ac_header in vfork.h |
6928 | do : | |
6929 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
6930 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
6931 | cat >>confdefs.h <<_ACEOF | |
6932 | #define HAVE_VFORK_H 1 | |
6933 | _ACEOF | |
5e030278 | 6934 | |
05ea2a05 | 6935 | fi |
5e030278 | 6936 | |
05ea2a05 | 6937 | done |
5e030278 | 6938 | |
05ea2a05 TT |
6939 | for ac_func in fork vfork |
6940 | do : | |
6941 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6942 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6943 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
6944 | cat >>confdefs.h <<_ACEOF | |
6945 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6946 | _ACEOF | |
6947 | ||
6948 | fi | |
6949 | done | |
6950 | ||
6951 | if test "x$ac_cv_func_fork" = xyes; then | |
6952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
6953 | $as_echo_n "checking for working fork... " >&6; } | |
6954 | if ${ac_cv_func_fork_works+:} false; then : | |
6955 | $as_echo_n "(cached) " >&6 | |
6956 | else | |
6957 | if test "$cross_compiling" = yes; then : | |
6958 | ac_cv_func_fork_works=cross | |
6959 | else | |
6960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6961 | /* end confdefs.h. */ | |
6962 | $ac_includes_default | |
6963 | int | |
6964 | main () | |
6965 | { | |
6966 | ||
6967 | /* By Ruediger Kuhlmann. */ | |
6968 | return fork () < 0; | |
6969 | ||
6970 | ; | |
6971 | return 0; | |
6972 | } | |
6973 | _ACEOF | |
6974 | if ac_fn_c_try_run "$LINENO"; then : | |
6975 | ac_cv_func_fork_works=yes | |
6976 | else | |
6977 | ac_cv_func_fork_works=no | |
6978 | fi | |
6979 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6980 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6981 | fi | |
6982 | ||
6983 | fi | |
6984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
6985 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
6986 | ||
6987 | else | |
6988 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6989 | fi | |
6990 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6991 | case $host in | |
6992 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6993 | # Override, as these systems have only a dummy fork() stub | |
6994 | ac_cv_func_fork_works=no | |
6995 | ;; | |
6996 | *) | |
6997 | ac_cv_func_fork_works=yes | |
6998 | ;; | |
6999 | esac | |
7000 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7001 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
7002 | fi | |
7003 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7004 | if test "x$ac_cv_func_vfork" = xyes; then | |
7005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
7006 | $as_echo_n "checking for working vfork... " >&6; } | |
7007 | if ${ac_cv_func_vfork_works+:} false; then : | |
7008 | $as_echo_n "(cached) " >&6 | |
7009 | else | |
7010 | if test "$cross_compiling" = yes; then : | |
7011 | ac_cv_func_vfork_works=cross | |
7012 | else | |
7013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7014 | /* end confdefs.h. */ | |
7015 | /* Thanks to Paul Eggert for this test. */ | |
7016 | $ac_includes_default | |
7017 | #include <sys/wait.h> | |
7018 | #ifdef HAVE_VFORK_H | |
7019 | # include <vfork.h> | |
7020 | #endif | |
7021 | /* On some sparc systems, changes by the child to local and incoming | |
7022 | argument registers are propagated back to the parent. The compiler | |
7023 | is told about this with #include <vfork.h>, but some compilers | |
7024 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7025 | static variable whose address is put into a register that is | |
7026 | clobbered by the vfork. */ | |
7027 | static void | |
7028 | #ifdef __cplusplus | |
7029 | sparc_address_test (int arg) | |
7030 | # else | |
7031 | sparc_address_test (arg) int arg; | |
7032 | #endif | |
7033 | { | |
7034 | static pid_t child; | |
7035 | if (!child) { | |
7036 | child = vfork (); | |
7037 | if (child < 0) { | |
7038 | perror ("vfork"); | |
7039 | _exit(2); | |
7040 | } | |
7041 | if (!child) { | |
7042 | arg = getpid(); | |
7043 | write(-1, "", 0); | |
7044 | _exit (arg); | |
7045 | } | |
7046 | } | |
7047 | } | |
7048 | ||
7049 | int | |
7050 | main () | |
7051 | { | |
7052 | pid_t parent = getpid (); | |
7053 | pid_t child; | |
7054 | ||
7055 | sparc_address_test (0); | |
7056 | ||
7057 | child = vfork (); | |
7058 | ||
7059 | if (child == 0) { | |
7060 | /* Here is another test for sparc vfork register problems. This | |
7061 | test uses lots of local variables, at least as many local | |
7062 | variables as main has allocated so far including compiler | |
7063 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7064 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7065 | reuse the register of parent for one of the local variables, | |
7066 | since it will think that parent can't possibly be used any more | |
7067 | in this routine. Assigning to the local variable will thus | |
7068 | munge parent in the parent process. */ | |
7069 | pid_t | |
7070 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7071 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7072 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7073 | use the same hardware register for all 8 local variables. */ | |
7074 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7075 | || p != p5 || p != p6 || p != p7) | |
7076 | _exit(1); | |
7077 | ||
7078 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
7079 | from child file descriptors. If the child closes a descriptor | |
7080 | before it execs or exits, this munges the parent's descriptor | |
7081 | as well. Test for this by closing stdout in the child. */ | |
7082 | _exit(close(fileno(stdout)) != 0); | |
7083 | } else { | |
7084 | int status; | |
7085 | struct stat st; | |
7086 | ||
7087 | while (wait(&status) != child) | |
7088 | ; | |
7089 | return ( | |
7090 | /* Was there some problem with vforking? */ | |
7091 | child < 0 | |
7092 | ||
7093 | /* Did the child fail? (This shouldn't happen.) */ | |
7094 | || status | |
7095 | ||
7096 | /* Did the vfork/compiler bug occur? */ | |
7097 | || parent != getpid() | |
7098 | ||
7099 | /* Did the file descriptor bug occur? */ | |
7100 | || fstat(fileno(stdout), &st) != 0 | |
7101 | ); | |
7102 | } | |
7103 | } | |
7104 | _ACEOF | |
7105 | if ac_fn_c_try_run "$LINENO"; then : | |
7106 | ac_cv_func_vfork_works=yes | |
7107 | else | |
7108 | ac_cv_func_vfork_works=no | |
7109 | fi | |
7110 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7111 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7112 | fi | |
7113 | ||
7114 | fi | |
7115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
7116 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
7117 | ||
7118 | fi; | |
7119 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7120 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7121 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7122 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
7123 | fi | |
7124 | ||
7125 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
7126 | ||
7127 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
7128 | ||
7129 | else | |
7130 | ||
7131 | $as_echo "#define vfork fork" >>confdefs.h | |
7132 | ||
7133 | fi | |
7134 | if test "x$ac_cv_func_fork_works" = xyes; then | |
7135 | ||
7136 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
7137 | ||
7138 | fi | |
7139 | ||
8ae8e197 | 7140 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 | 7141 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
f4931779 | 7142 | setpgid setpgrp getrusage getauxval sigtimedwait |
05ea2a05 TT |
7143 | do : |
7144 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7145 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7146 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7147 | cat >>confdefs.h <<_ACEOF | |
7148 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7149 | _ACEOF | |
7150 | ||
7151 | fi | |
7152 | done | |
7153 | ||
7154 | ||
0b03c6f0 TT |
7155 | # This is needed for RHEL 5 and uclibc-ng < 1.0.39. |
7156 | # These did not define ADDR_NO_RANDOMIZE in sys/personality.h, | |
7157 | # only in linux/personality.h. | |
7158 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
7159 | " | |
7160 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
7161 | ac_have_decl=1 | |
7162 | else | |
7163 | ac_have_decl=0 | |
7164 | fi | |
7165 | ||
7166 | cat >>confdefs.h <<_ACEOF | |
7167 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
7168 | _ACEOF | |
7169 | ||
7170 | ||
05ea2a05 TT |
7171 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
7172 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
7173 | ac_have_decl=1 | |
7174 | else | |
7175 | ac_have_decl=0 | |
7176 | fi | |
7177 | ||
7178 | cat >>confdefs.h <<_ACEOF | |
7179 | #define HAVE_DECL_STRSTR $ac_have_decl | |
7180 | _ACEOF | |
7181 | ||
7182 | ||
7183 | # ----------------------- # | |
7184 | # Checks for structures. # | |
7185 | # ----------------------- # | |
7186 | ||
7187 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
7188 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
7189 | ||
7190 | cat >>confdefs.h <<_ACEOF | |
7191 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7192 | _ACEOF | |
7193 | ||
7194 | ||
7195 | fi | |
7196 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" | |
7197 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
7198 | ||
7199 | cat >>confdefs.h <<_ACEOF | |
7200 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7201 | _ACEOF | |
7202 | ||
7203 | ||
7204 | fi | |
7205 | ||
7206 | ||
92a048fd SM |
7207 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
7208 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
7209 | # Figure out which one to use. | |
05ea2a05 TT |
7210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
7211 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
7212 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7213 | $as_echo_n "(cached) " >&6 | |
7214 | else | |
7215 | ac_func_search_save_LIBS=$LIBS | |
7216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7217 | /* end confdefs.h. */ | |
7218 | ||
7219 | /* Override any GCC internal prototype to avoid an error. | |
7220 | Use char because int might match the return type of a GCC | |
7221 | builtin and then its argument prototype would still apply. */ | |
7222 | #ifdef __cplusplus | |
7223 | extern "C" | |
7224 | #endif | |
7225 | char kinfo_getfile (); | |
7226 | int | |
7227 | main () | |
7228 | { | |
7229 | return kinfo_getfile (); | |
7230 | ; | |
7231 | return 0; | |
7232 | } | |
7233 | _ACEOF | |
7234 | for ac_lib in '' util util-freebsd; do | |
7235 | if test -z "$ac_lib"; then | |
7236 | ac_res="none required" | |
7237 | else | |
7238 | ac_res=-l$ac_lib | |
7239 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7240 | fi | |
7241 | if ac_fn_c_try_link "$LINENO"; then : | |
7242 | ac_cv_search_kinfo_getfile=$ac_res | |
7243 | fi | |
7244 | rm -f core conftest.err conftest.$ac_objext \ | |
7245 | conftest$ac_exeext | |
7246 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7247 | break | |
7248 | fi | |
7249 | done | |
7250 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7251 | ||
7252 | else | |
7253 | ac_cv_search_kinfo_getfile=no | |
7254 | fi | |
7255 | rm conftest.$ac_ext | |
7256 | LIBS=$ac_func_search_save_LIBS | |
7257 | fi | |
7258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
7259 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
7260 | ac_res=$ac_cv_search_kinfo_getfile | |
7261 | if test "$ac_res" != no; then : | |
7262 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7263 | ||
92a048fd SM |
7264 | fi |
7265 | ||
7266 | ||
7267 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
7268 | for ac_func in kinfo_getfile | |
7269 | do : | |
7270 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
7271 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
7272 | cat >>confdefs.h <<_ACEOF | |
7273 | #define HAVE_KINFO_GETFILE 1 | |
7274 | _ACEOF | |
05ea2a05 TT |
7275 | |
7276 | fi | |
92a048fd | 7277 | done |
05ea2a05 TT |
7278 | |
7279 | ||
261b0748 LM |
7280 | # ----------------------- # |
7281 | # Check for threading. # | |
7282 | # ----------------------- # | |
7283 | ||
7284 | # Check whether --enable-threading was given. | |
7285 | if test "${enable_threading+set}" = set; then : | |
7286 | enableval=$enable_threading; case "$enableval" in | |
7287 | yes) want_threading=yes ;; | |
7288 | no) want_threading=no ;; | |
7289 | *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;; | |
7290 | esac | |
7291 | else | |
7292 | want_threading=yes | |
7293 | fi | |
7294 | ||
7295 | ||
05ea2a05 TT |
7296 | # Check for std::thread. This does not work on some platforms, like |
7297 | # mingw and DJGPP. | |
7298 | ac_ext=cpp | |
7299 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7300 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7301 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7302 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7303 | ||
7304 | ||
7305 | ||
7306 | ||
7307 | ||
7308 | ac_ext=c | |
7309 | ac_cpp='$CPP $CPPFLAGS' | |
7310 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7311 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7312 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7313 | ||
7314 | ax_pthread_ok=no | |
7315 | ||
7316 | # We used to check for pthread.h first, but this fails if pthread.h | |
7317 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
7318 | # It gets checked for in the link test anyway. | |
7319 | ||
7320 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
5e030278 TT |
7321 | # etcetera environment variables, and if threads linking works using |
7322 | # them: | |
7323 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
7324 | ax_pthread_save_CC="$CC" | |
7325 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7326 | ax_pthread_save_LIBS="$LIBS" | |
05ea2a05 TT |
7327 | if test "x$PTHREAD_CC" != "x"; then : |
7328 | CC="$PTHREAD_CC" | |
7329 | fi | |
7330 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7331 | LIBS="$PTHREAD_LIBS $LIBS" | |
7332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
7333 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
7334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7335 | /* end confdefs.h. */ | |
7336 | ||
7337 | /* Override any GCC internal prototype to avoid an error. | |
7338 | Use char because int might match the return type of a GCC | |
7339 | builtin and then its argument prototype would still apply. */ | |
7340 | #ifdef __cplusplus | |
7341 | extern "C" | |
7342 | #endif | |
7343 | char pthread_join (); | |
7344 | int | |
7345 | main () | |
7346 | { | |
7347 | return pthread_join (); | |
7348 | ; | |
7349 | return 0; | |
7350 | } | |
7351 | _ACEOF | |
7352 | if ac_fn_c_try_link "$LINENO"; then : | |
7353 | ax_pthread_ok=yes | |
7354 | fi | |
7355 | rm -f core conftest.err conftest.$ac_objext \ | |
7356 | conftest$ac_exeext conftest.$ac_ext | |
7357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7358 | $as_echo "$ax_pthread_ok" >&6; } | |
7359 | if test "x$ax_pthread_ok" = "xno"; then | |
7360 | PTHREAD_LIBS="" | |
7361 | PTHREAD_CFLAGS="" | |
7362 | fi | |
7363 | CC="$ax_pthread_save_CC" | |
7364 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7365 | LIBS="$ax_pthread_save_LIBS" | |
7366 | fi | |
7367 | ||
7368 | # We must check for the threads library under a number of different | |
7369 | # names; the ordering is very important because some systems | |
7370 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
7371 | # libraries is broken (non-POSIX). | |
7372 | ||
7373 | # Create a list of thread flags to try. Items starting with a "-" are | |
7374 | # C compiler flags, and other items are library names, except for "none" | |
7375 | # which indicates that we try without any flags at all, and "pthread-config" | |
7376 | # which is a program returning the flags for the Pth emulation library. | |
7377 | ||
7378 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
7379 | ||
7380 | # The ordering *is* (sometimes) important. Some notes on the | |
7381 | # individual items follow: | |
7382 | ||
7383 | # pthreads: AIX (must check this before -lpthread) | |
7384 | # none: in case threads are in libc; should be tried before -Kthread and | |
7385 | # other compiler flags to prevent continual compiler warnings | |
7386 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
7387 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
7388 | # (Note: HP C rejects this with "bad form for `-t' option") | |
7389 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
7390 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
7391 | # doesn't hurt to check since this sometimes defines pthreads and | |
7392 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
7393 | # is present but should not be used directly; and before -mthreads, | |
7394 | # because the compiler interprets this as "-mt" + "-hreads") | |
7395 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
7396 | # pthread: Linux, etcetera | |
7397 | # --thread-safe: KAI C++ | |
7398 | # pthread-config: use pthread-config program (for GNU Pth library) | |
7399 | ||
7400 | case $host_os in | |
7401 | ||
7402 | freebsd*) | |
7403 | ||
7404 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
7405 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
7406 | ||
7407 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" | |
7408 | ;; | |
7409 | ||
7410 | hpux*) | |
7411 | ||
7412 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable | |
7413 | # multi-threading and also sets -lpthread." | |
7414 | ||
7415 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
7416 | ;; | |
7417 | ||
7418 | openedition*) | |
7419 | ||
7420 | # IBM z/OS requires a feature-test macro to be defined in order to | |
7421 | # enable POSIX threads at all, so give the user a hint if this is | |
7422 | # not set. (We don't define these ourselves, as they can affect | |
7423 | # other portions of the system API in unpredictable ways.) | |
7424 | ||
7425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7426 | /* end confdefs.h. */ | |
7427 | ||
7428 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
7429 | AX_PTHREAD_ZOS_MISSING | |
7430 | # endif | |
7431 | ||
7432 | _ACEOF | |
7433 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7434 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : | |
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
7436 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
7437 | fi | |
7438 | rm -f conftest* | |
7439 | ||
7440 | ;; | |
7441 | ||
7442 | solaris*) | |
7443 | ||
7444 | # On Solaris (at least, for some versions), libc contains stubbed | |
7445 | # (non-functional) versions of the pthreads routines, so link-based | |
7446 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
7447 | # pthread_cleanup_push, or rather a function called by this macro, | |
7448 | # so we could check for that, but who knows whether they'll stub | |
7449 | # that too in a future libc.) So we'll check first for the | |
7450 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
7451 | ||
7452 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
7453 | ;; | |
7454 | esac | |
7455 | ||
7456 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
7457 | ||
7458 | if test "x$GCC" = "xyes"; then : | |
7459 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
7460 | fi | |
7461 | ||
7462 | # The presence of a feature test macro requesting re-entrant function | |
7463 | # definitions is, on some systems, a strong hint that pthreads support is | |
7464 | # correctly enabled | |
7465 | ||
7466 | case $host_os in | |
7467 | darwin* | hpux* | linux* | osf* | solaris*) | |
7468 | ax_pthread_check_macro="_REENTRANT" | |
7469 | ;; | |
7470 | ||
7471 | aix*) | |
7472 | ax_pthread_check_macro="_THREAD_SAFE" | |
7473 | ;; | |
7474 | ||
7475 | *) | |
7476 | ax_pthread_check_macro="--" | |
7477 | ;; | |
7478 | esac | |
7479 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
7480 | ax_pthread_check_cond=0 | |
7481 | else | |
7482 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
7483 | fi | |
7484 | ||
7485 | # Are we compiling with Clang? | |
7486 | ||
7487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
7488 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
7489 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
7490 | $as_echo_n "(cached) " >&6 | |
7491 | else | |
7492 | ax_cv_PTHREAD_CLANG=no | |
7493 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
7494 | if test "x$GCC" = "xyes"; then | |
7495 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7496 | /* end confdefs.h. */ | |
7497 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | |
7498 | # if defined(__clang__) && defined(__llvm__) | |
7499 | AX_PTHREAD_CC_IS_CLANG | |
7500 | # endif | |
7501 | ||
7502 | _ACEOF | |
7503 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7504 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
7505 | ax_cv_PTHREAD_CLANG=yes | |
7506 | fi | |
7507 | rm -f conftest* | |
7508 | ||
7509 | fi | |
7510 | ||
7511 | fi | |
7512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 | |
7513 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
7514 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
7515 | ||
7516 | ax_pthread_clang_warning=no | |
7517 | ||
7518 | # Clang needs special handling, because older versions handle the -pthread | |
7519 | # option in a rather... idiosyncratic way | |
7520 | ||
7521 | if test "x$ax_pthread_clang" = "xyes"; then | |
7522 | ||
7523 | # Clang takes -pthread; it has never supported any other flag | |
7524 | ||
7525 | # (Note 1: This will need to be revisited if a system that Clang | |
7526 | # supports has POSIX threads in a separate library. This tends not | |
7527 | # to be the way of modern systems, but it's conceivable.) | |
7528 | ||
7529 | # (Note 2: On some systems, notably Darwin, -pthread is not needed | |
7530 | # to get POSIX threads support; the API is always present and | |
7531 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
7532 | # -pthread does define _REENTRANT, and while the Darwin headers | |
7533 | # ignore this macro, third-party headers might not.) | |
7534 | ||
7535 | PTHREAD_CFLAGS="-pthread" | |
7536 | PTHREAD_LIBS= | |
7537 | ||
7538 | ax_pthread_ok=yes | |
7539 | ||
7540 | # However, older versions of Clang make a point of warning the user | |
7541 | # that, in an invocation where only linking and no compilation is | |
7542 | # taking place, the -pthread option has no effect ("argument unused | |
7543 | # during compilation"). They expect -pthread to be passed in only | |
7544 | # when source code is being compiled. | |
7545 | # | |
7546 | # Problem is, this is at odds with the way Automake and most other | |
7547 | # C build frameworks function, which is that the same flags used in | |
7548 | # compilation (CFLAGS) are also used in linking. Many systems | |
7549 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
7550 | # support, and in fact it is often not straightforward to specify a | |
7551 | # flag that is used only in the compilation phase and not in | |
7552 | # linking. Such a scenario is extremely rare in practice. | |
7553 | # | |
7554 | # Even though use of the -pthread flag in linking would only print | |
7555 | # a warning, this can be a nuisance for well-run software projects | |
7556 | # that build with -Werror. So if the active version of Clang has | |
7557 | # this misfeature, we search for an option to squash it. | |
7558 | ||
7559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
7560 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
7561 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
7562 | $as_echo_n "(cached) " >&6 | |
7563 | else | |
7564 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
7565 | # Create an alternate version of $ac_link that compiles and | |
7566 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
7567 | # (.c -> exe), because the warning occurs only in the second | |
7568 | # step | |
7569 | ax_pthread_save_ac_link="$ac_link" | |
7570 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
7571 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
7572 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
7573 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7574 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
7575 | if test "x$ax_pthread_try" = "xunknown"; then : | |
7576 | break | |
7577 | fi | |
7578 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
7579 | ac_link="$ax_pthread_save_ac_link" | |
7580 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7581 | /* end confdefs.h. */ | |
7582 | int main(void){return 0;} | |
7583 | _ACEOF | |
7584 | if ac_fn_c_try_link "$LINENO"; then : | |
7585 | ac_link="$ax_pthread_2step_ac_link" | |
7586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7587 | /* end confdefs.h. */ | |
7588 | int main(void){return 0;} | |
7589 | _ACEOF | |
7590 | if ac_fn_c_try_link "$LINENO"; then : | |
7591 | break | |
7592 | fi | |
7593 | rm -f core conftest.err conftest.$ac_objext \ | |
7594 | conftest$ac_exeext conftest.$ac_ext | |
7595 | ||
7596 | fi | |
7597 | rm -f core conftest.err conftest.$ac_objext \ | |
7598 | conftest$ac_exeext conftest.$ac_ext | |
7599 | done | |
7600 | ac_link="$ax_pthread_save_ac_link" | |
7601 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7602 | if test "x$ax_pthread_try" = "x"; then : | |
7603 | ax_pthread_try=no | |
7604 | fi | |
7605 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
7606 | ||
7607 | fi | |
7608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
7609 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
7610 | ||
7611 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | |
7612 | no | unknown) ;; | |
7613 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
7614 | esac | |
7615 | ||
7616 | fi # $ax_pthread_clang = yes | |
7617 | ||
7618 | if test "x$ax_pthread_ok" = "xno"; then | |
7619 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
7620 | ||
7621 | case $ax_pthread_try_flag in | |
7622 | none) | |
7623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
7624 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
7625 | ;; | |
7626 | ||
7627 | -mt,pthread) | |
7628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
7629 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
7630 | PTHREAD_CFLAGS="-mt" | |
7631 | PTHREAD_LIBS="-lpthread" | |
7632 | ;; | |
7633 | ||
7634 | -*) | |
7635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
7636 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
7637 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
7638 | ;; | |
7639 | ||
7640 | pthread-config) | |
7641 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
7642 | set dummy pthread-config; ac_word=$2 | |
7643 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7644 | $as_echo_n "checking for $ac_word... " >&6; } | |
7645 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
7646 | $as_echo_n "(cached) " >&6 | |
7647 | else | |
7648 | if test -n "$ax_pthread_config"; then | |
7649 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
7650 | else | |
7651 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7652 | for as_dir in $PATH | |
7653 | do | |
7654 | IFS=$as_save_IFS | |
7655 | test -z "$as_dir" && as_dir=. | |
7656 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7657 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7658 | ac_cv_prog_ax_pthread_config="yes" | |
7659 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7660 | break 2 | |
7661 | fi | |
7662 | done | |
7663 | done | |
7664 | IFS=$as_save_IFS | |
7665 | ||
7666 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" | |
7667 | fi | |
7668 | fi | |
7669 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
7670 | if test -n "$ax_pthread_config"; then | |
7671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
7672 | $as_echo "$ax_pthread_config" >&6; } | |
7673 | else | |
7674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7675 | $as_echo "no" >&6; } | |
7676 | fi | |
7677 | ||
7678 | ||
7679 | if test "x$ax_pthread_config" = "xno"; then : | |
7680 | continue | |
7681 | fi | |
7682 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
7683 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
7684 | ;; | |
7685 | ||
7686 | *) | |
7687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
7688 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
7689 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
7690 | ;; | |
7691 | esac | |
7692 | ||
7693 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7694 | ax_pthread_save_LIBS="$LIBS" | |
7695 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7696 | LIBS="$PTHREAD_LIBS $LIBS" | |
7697 | ||
7698 | # Check for various functions. We must include pthread.h, | |
7699 | # since some functions may be macros. (On the Sequent, we | |
7700 | # need a special flag -Kthread to make this header compile.) | |
7701 | # We check for pthread_join because it is in -lpthread on IRIX | |
7702 | # while pthread_create is in libc. We check for pthread_attr_init | |
7703 | # due to DEC craziness with -lpthreads. We check for | |
7704 | # pthread_cleanup_push because it is one of the few pthread | |
7705 | # functions on Solaris that doesn't have a non-functional libc stub. | |
7706 | # We try pthread_create on general principles. | |
7707 | ||
7708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7709 | /* end confdefs.h. */ | |
7710 | #include <pthread.h> | |
7711 | # if $ax_pthread_check_cond | |
7712 | # error "$ax_pthread_check_macro must be defined" | |
7713 | # endif | |
7714 | static void routine(void *a) { a = 0; } | |
7715 | static void *start_routine(void *a) { return a; } | |
7716 | int | |
7717 | main () | |
7718 | { | |
7719 | pthread_t th; pthread_attr_t attr; | |
7720 | pthread_create(&th, 0, start_routine, 0); | |
7721 | pthread_join(th, 0); | |
7722 | pthread_attr_init(&attr); | |
7723 | pthread_cleanup_push(routine, 0); | |
7724 | pthread_cleanup_pop(0) /* ; */ | |
7725 | ; | |
7726 | return 0; | |
7727 | } | |
7728 | _ACEOF | |
7729 | if ac_fn_c_try_link "$LINENO"; then : | |
7730 | ax_pthread_ok=yes | |
7731 | fi | |
7732 | rm -f core conftest.err conftest.$ac_objext \ | |
7733 | conftest$ac_exeext conftest.$ac_ext | |
7734 | ||
7735 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7736 | LIBS="$ax_pthread_save_LIBS" | |
7737 | ||
7738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7739 | $as_echo "$ax_pthread_ok" >&6; } | |
7740 | if test "x$ax_pthread_ok" = "xyes"; then : | |
7741 | break | |
7742 | fi | |
7743 | ||
7744 | PTHREAD_LIBS="" | |
7745 | PTHREAD_CFLAGS="" | |
7746 | done | |
7747 | fi | |
7748 | ||
7749 | # Various other checks: | |
7750 | if test "x$ax_pthread_ok" = "xyes"; then | |
7751 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7752 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
7753 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
7754 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
7755 | |
7756 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | |
7757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
7758 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
7759 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
7760 | $as_echo_n "(cached) " >&6 | |
7761 | else | |
7762 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
7763 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
7764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7765 | /* end confdefs.h. */ | |
7766 | #include <pthread.h> | |
7767 | int | |
7768 | main () | |
7769 | { | |
7770 | int attr = $ax_pthread_attr; return attr /* ; */ | |
7771 | ; | |
7772 | return 0; | |
7773 | } | |
7774 | _ACEOF | |
7775 | if ac_fn_c_try_link "$LINENO"; then : | |
7776 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
7777 | fi | |
7778 | rm -f core conftest.err conftest.$ac_objext \ | |
7779 | conftest$ac_exeext conftest.$ac_ext | |
7780 | done | |
7781 | ||
7782 | fi | |
7783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
7784 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
7785 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
7786 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
7787 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
7788 | ||
7789 | cat >>confdefs.h <<_ACEOF | |
7790 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
7791 | _ACEOF | |
7792 | ||
7793 | ax_pthread_joinable_attr_defined=yes | |
7794 | ||
7795 | fi | |
7796 | ||
7797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 | |
7798 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
7799 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
7800 | $as_echo_n "(cached) " >&6 | |
7801 | else | |
7802 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
7803 | case $host_os in | |
7804 | solaris*) | |
7805 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
7806 | ;; | |
7807 | esac | |
7808 | ||
7809 | fi | |
7810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
7811 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
7812 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
7813 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
7814 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
7815 | ax_pthread_special_flags_added=yes | |
7816 | fi | |
7817 | ||
7818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 | |
7819 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
7820 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
7821 | $as_echo_n "(cached) " >&6 | |
7822 | else | |
7823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7824 | /* end confdefs.h. */ | |
7825 | #include <pthread.h> | |
7826 | int | |
7827 | main () | |
7828 | { | |
7829 | int i = PTHREAD_PRIO_INHERIT; | |
7830 | ; | |
7831 | return 0; | |
7832 | } | |
7833 | _ACEOF | |
7834 | if ac_fn_c_try_link "$LINENO"; then : | |
7835 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
7836 | else | |
7837 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
7838 | fi | |
7839 | rm -f core conftest.err conftest.$ac_objext \ | |
7840 | conftest$ac_exeext conftest.$ac_ext | |
7841 | ||
7842 | fi | |
7843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
7844 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
7845 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
7846 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
7847 | ||
7848 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h | |
7849 | ||
7850 | ax_pthread_prio_inherit_defined=yes | |
7851 | ||
7852 | fi | |
7853 | ||
7854 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7855 | LIBS="$ax_pthread_save_LIBS" | |
7856 | ||
7857 | # More AIX lossage: compile with *_r variant | |
7858 | if test "x$GCC" != "xyes"; then | |
7859 | case $host_os in | |
7860 | aix*) | |
7861 | case "x/$CC" in #( | |
7862 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
7863 | #handle absolute path differently from PATH based program lookup | |
7864 | case "x$CC" in #( | |
7865 | x/*) : | |
7866 | if as_fn_executable_p ${CC}_r; then : | |
7867 | PTHREAD_CC="${CC}_r" | |
7868 | fi ;; #( | |
7869 | *) : | |
7870 | for ac_prog in ${CC}_r | |
7871 | do | |
7872 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7873 | set dummy $ac_prog; ac_word=$2 | |
7874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7875 | $as_echo_n "checking for $ac_word... " >&6; } | |
7876 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
7877 | $as_echo_n "(cached) " >&6 | |
7878 | else | |
7879 | if test -n "$PTHREAD_CC"; then | |
7880 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
7881 | else | |
7882 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7883 | for as_dir in $PATH | |
7884 | do | |
7885 | IFS=$as_save_IFS | |
7886 | test -z "$as_dir" && as_dir=. | |
7887 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7888 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7889 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
7890 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7891 | break 2 | |
7892 | fi | |
7893 | done | |
7894 | done | |
7895 | IFS=$as_save_IFS | |
7896 | ||
7897 | fi | |
7898 | fi | |
7899 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
7900 | if test -n "$PTHREAD_CC"; then | |
7901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
7902 | $as_echo "$PTHREAD_CC" >&6; } | |
7903 | else | |
7904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7905 | $as_echo "no" >&6; } | |
7906 | fi | |
7907 | ||
7908 | ||
7909 | test -n "$PTHREAD_CC" && break | |
7910 | done | |
7911 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
7912 | ;; | |
7913 | esac ;; #( | |
7914 | *) : | |
7915 | ;; | |
7916 | esac | |
7917 | ;; | |
7918 | esac | |
7919 | fi | |
7920 | fi | |
7921 | ||
7922 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
7923 | ||
7924 | ||
7925 | ||
7926 | ||
7927 | ||
7928 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
7929 | if test "x$ax_pthread_ok" = "xyes"; then | |
7930 | threads=yes | |
7931 | : | |
7932 | else | |
7933 | ax_pthread_ok=no | |
7934 | threads=no | |
7935 | fi | |
7936 | ac_ext=cpp | |
7937 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7938 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7939 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7940 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7941 | ||
7942 | ||
c560a5fb TT |
7943 | save_LIBS="$LIBS" |
7944 | LIBS="$PTHREAD_LIBS $LIBS" | |
7945 | save_CXXFLAGS="$CXXFLAGS" | |
7946 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
7947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
05ea2a05 TT |
7948 | $as_echo_n "checking for std::thread... " >&6; } |
7949 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
7950 | $as_echo_n "(cached) " >&6 | |
7951 | else | |
7952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7953 | /* end confdefs.h. */ | |
2124b2de TT |
7954 | #if defined (__MINGW32__) || defined (__CYGWIN__) |
7955 | # ifdef _WIN32_WINNT | |
7956 | # if _WIN32_WINNT < 0x0501 | |
7957 | # undef _WIN32_WINNT | |
7958 | # define _WIN32_WINNT 0x0501 | |
7959 | # endif | |
7960 | # else | |
7961 | # define _WIN32_WINNT 0x0501 | |
7962 | # endif | |
7963 | #endif /* __MINGW32__ || __CYGWIN__ */ | |
7964 | #include <thread> | |
c560a5fb | 7965 | void callback() { } |
05ea2a05 TT |
7966 | int |
7967 | main () | |
7968 | { | |
7969 | std::thread t(callback); | |
7970 | ; | |
7971 | return 0; | |
7972 | } | |
7973 | _ACEOF | |
7974 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
7975 | gdb_cv_cxx_std_thread=yes | |
7976 | else | |
7977 | gdb_cv_cxx_std_thread=no | |
7978 | fi | |
7979 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7980 | fi | |
7981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
7982 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
7983 | ||
c560a5fb | 7984 | if test "$threads" = "yes"; then |
05ea2a05 TT |
7985 | # This check must be here, while LIBS includes any necessary |
7986 | # threading library. | |
7987 | for ac_func in pthread_sigmask pthread_setname_np | |
7988 | do : | |
7989 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7990 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7991 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7992 | cat >>confdefs.h <<_ACEOF | |
7993 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7994 | _ACEOF | |
7995 | ||
7996 | fi | |
7997 | done | |
7998 | ||
05ea2a05 | 7999 | fi |
c560a5fb TT |
8000 | LIBS="$save_LIBS" |
8001 | CXXFLAGS="$save_CXXFLAGS" | |
261b0748 LM |
8002 | |
8003 | if test "$want_threading" = "yes"; then | |
8004 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
05ea2a05 TT |
8005 | |
8006 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h | |
8007 | ||
261b0748 | 8008 | fi |
05ea2a05 TT |
8009 | fi |
8010 | ac_ext=c | |
8011 | ac_cpp='$CPP $CPPFLAGS' | |
8012 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8013 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8014 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8015 | ||
8016 | ||
8017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
8018 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
8019 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
8020 | $as_echo_n "(cached) " >&6 | |
8021 | else | |
8022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8023 | /* end confdefs.h. */ |
b9442ec1 | 8024 | #include <setjmp.h> |
5e030278 TT |
8025 | int |
8026 | main () | |
8027 | { | |
b9442ec1 SM |
8028 | sigjmp_buf env; |
8029 | while (! sigsetjmp (env, 1)) | |
8030 | siglongjmp (env, 1); | |
8031 | ||
5e030278 TT |
8032 | ; |
8033 | return 0; | |
8034 | } | |
8035 | _ACEOF | |
05ea2a05 TT |
8036 | if ac_fn_c_try_compile "$LINENO"; then : |
8037 | gdb_cv_func_sigsetjmp=yes | |
8038 | else | |
8039 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 8040 | |
5e030278 | 8041 | fi |
05ea2a05 | 8042 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b9442ec1 | 8043 | |
5e030278 | 8044 | fi |
05ea2a05 TT |
8045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
8046 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
8047 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 8048 | |
05ea2a05 | 8049 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 8050 | |
05ea2a05 | 8051 | fi |
5e030278 | 8052 | |
5e030278 | 8053 | |
05ea2a05 TT |
8054 | # Check whether --with-intel_pt was given. |
8055 | if test "${with_intel_pt+set}" = set; then : | |
8056 | withval=$with_intel_pt; | |
8057 | else | |
8058 | with_intel_pt=auto | |
8059 | fi | |
5e030278 | 8060 | |
05ea2a05 TT |
8061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
8062 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
8063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
8064 | $as_echo "$with_intel_pt" >&6; } | |
5e030278 | 8065 | |
05ea2a05 TT |
8066 | if test "${with_intel_pt}" = no; then |
8067 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
8068 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
8069 | HAVE_LIBIPT=no | |
8070 | else | |
8071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8072 | /* end confdefs.h. */ |
8073 | ||
05ea2a05 TT |
8074 | #include <linux/perf_event.h> |
8075 | #ifndef PERF_ATTR_SIZE_VER5 | |
8076 | # error | |
8077 | #endif | |
5e030278 TT |
8078 | |
8079 | _ACEOF | |
05ea2a05 TT |
8080 | if ac_fn_c_try_cpp "$LINENO"; then : |
8081 | perf_event=yes | |
8082 | else | |
8083 | perf_event=no | |
5e030278 | 8084 | fi |
05ea2a05 TT |
8085 | rm -f conftest.err conftest.i conftest.$ac_ext |
8086 | if test "$perf_event" != yes; then | |
8087 | if test "$with_intel_pt" = yes; then | |
8088 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
8089 | else | |
8090 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
8091 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
8092 | fi | |
8093 | fi | |
5e030278 | 8094 | |
5e030278 | 8095 | |
5e030278 | 8096 | |
5e030278 | 8097 | |
5e030278 | 8098 | |
5e030278 | 8099 | |
5e030278 | 8100 | |
5e030278 | 8101 | |
5e030278 | 8102 | |
05ea2a05 | 8103 | use_additional=yes |
5e030278 | 8104 | |
05ea2a05 TT |
8105 | acl_save_prefix="$prefix" |
8106 | prefix="$acl_final_prefix" | |
8107 | acl_save_exec_prefix="$exec_prefix" | |
8108 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8109 | |
05ea2a05 TT |
8110 | eval additional_includedir=\"$includedir\" |
8111 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8112 | |
05ea2a05 TT |
8113 | exec_prefix="$acl_save_exec_prefix" |
8114 | prefix="$acl_save_prefix" | |
5e030278 | 8115 | |
5e030278 | 8116 | |
05ea2a05 TT |
8117 | # Check whether --with-libipt-prefix was given. |
8118 | if test "${with_libipt_prefix+set}" = set; then : | |
8119 | withval=$with_libipt_prefix; | |
8120 | if test "X$withval" = "Xno"; then | |
8121 | use_additional=no | |
8122 | else | |
8123 | if test "X$withval" = "X"; then | |
5e030278 | 8124 | |
05ea2a05 TT |
8125 | acl_save_prefix="$prefix" |
8126 | prefix="$acl_final_prefix" | |
8127 | acl_save_exec_prefix="$exec_prefix" | |
8128 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8129 | |
05ea2a05 TT |
8130 | eval additional_includedir=\"$includedir\" |
8131 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8132 | |
05ea2a05 TT |
8133 | exec_prefix="$acl_save_exec_prefix" |
8134 | prefix="$acl_save_prefix" | |
5e030278 | 8135 | |
05ea2a05 TT |
8136 | else |
8137 | additional_includedir="$withval/include" | |
8138 | additional_libdir="$withval/lib" | |
8139 | fi | |
8140 | fi | |
5e030278 | 8141 | |
05ea2a05 | 8142 | fi |
5e030278 | 8143 | |
9f1528a1 AB |
8144 | |
8145 | # Check whether --with-libipt-type was given. | |
8146 | if test "${with_libipt_type+set}" = set; then : | |
8147 | withval=$with_libipt_type; with_libipt_type=$withval | |
8148 | else | |
8149 | with_libipt_type=auto | |
8150 | fi | |
8151 | ||
8152 | lib_type=`eval echo \$with_libipt_type` | |
8153 | ||
05ea2a05 TT |
8154 | LIBIPT= |
8155 | LTLIBIPT= | |
8156 | INCIPT= | |
8157 | rpathdirs= | |
8158 | ltrpathdirs= | |
8159 | names_already_handled= | |
8160 | names_next_round='ipt ' | |
8161 | while test -n "$names_next_round"; do | |
8162 | names_this_round="$names_next_round" | |
8163 | names_next_round= | |
8164 | for name in $names_this_round; do | |
8165 | already_handled= | |
8166 | for n in $names_already_handled; do | |
8167 | if test "$n" = "$name"; then | |
8168 | already_handled=yes | |
8169 | break | |
8170 | fi | |
8171 | done | |
8172 | if test -z "$already_handled"; then | |
8173 | names_already_handled="$names_already_handled $name" | |
8174 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8175 | eval value=\"\$HAVE_LIB$uppername\" | |
8176 | if test -n "$value"; then | |
8177 | if test "$value" = yes; then | |
8178 | eval value=\"\$LIB$uppername\" | |
8179 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
8180 | eval value=\"\$LTLIB$uppername\" | |
8181 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
8182 | else | |
8183 | : | |
8184 | fi | |
8185 | else | |
8186 | found_dir= | |
8187 | found_la= | |
8188 | found_so= | |
8189 | found_a= | |
8190 | if test $use_additional = yes; then | |
9f1528a1 | 8191 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
8192 | found_dir="$additional_libdir" |
8193 | found_so="$additional_libdir/lib$name.$shlibext" | |
8194 | if test -f "$additional_libdir/lib$name.la"; then | |
8195 | found_la="$additional_libdir/lib$name.la" | |
8196 | fi | |
9f1528a1 | 8197 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
8198 | if test -f "$additional_libdir/lib$name.$libext"; then |
8199 | found_dir="$additional_libdir" | |
8200 | found_a="$additional_libdir/lib$name.$libext" | |
8201 | if test -f "$additional_libdir/lib$name.la"; then | |
8202 | found_la="$additional_libdir/lib$name.la" | |
8203 | fi | |
8204 | fi | |
8205 | fi | |
8206 | fi | |
8207 | if test "X$found_dir" = "X"; then | |
8208 | for x in $LDFLAGS $LTLIBIPT; do | |
8209 | ||
8210 | acl_save_prefix="$prefix" | |
8211 | prefix="$acl_final_prefix" | |
8212 | acl_save_exec_prefix="$exec_prefix" | |
8213 | exec_prefix="$acl_final_exec_prefix" | |
8214 | eval x=\"$x\" | |
8215 | exec_prefix="$acl_save_exec_prefix" | |
8216 | prefix="$acl_save_prefix" | |
8217 | ||
8218 | case "$x" in | |
8219 | -L*) | |
8220 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8221 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
8222 | found_dir="$dir" |
8223 | found_so="$dir/lib$name.$shlibext" | |
8224 | if test -f "$dir/lib$name.la"; then | |
8225 | found_la="$dir/lib$name.la" | |
8226 | fi | |
9f1528a1 | 8227 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
8228 | if test -f "$dir/lib$name.$libext"; then |
8229 | found_dir="$dir" | |
8230 | found_a="$dir/lib$name.$libext" | |
8231 | if test -f "$dir/lib$name.la"; then | |
8232 | found_la="$dir/lib$name.la" | |
8233 | fi | |
8234 | fi | |
8235 | fi | |
8236 | ;; | |
8237 | esac | |
8238 | if test "X$found_dir" != "X"; then | |
8239 | break | |
8240 | fi | |
8241 | done | |
8242 | fi | |
8243 | if test "X$found_dir" != "X"; then | |
8244 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
8245 | if test "X$found_so" != "X"; then | |
8246 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8247 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8248 | else | |
8249 | haveit= | |
8250 | for x in $ltrpathdirs; do | |
8251 | if test "X$x" = "X$found_dir"; then | |
8252 | haveit=yes | |
8253 | break | |
8254 | fi | |
8255 | done | |
8256 | if test -z "$haveit"; then | |
8257 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8258 | fi | |
8259 | if test "$hardcode_direct" = yes; then | |
8260 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8261 | else | |
8262 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8263 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8264 | haveit= | |
8265 | for x in $rpathdirs; do | |
8266 | if test "X$x" = "X$found_dir"; then | |
8267 | haveit=yes | |
8268 | break | |
8269 | fi | |
8270 | done | |
8271 | if test -z "$haveit"; then | |
8272 | rpathdirs="$rpathdirs $found_dir" | |
8273 | fi | |
8274 | else | |
8275 | haveit= | |
8276 | for x in $LDFLAGS $LIBIPT; do | |
8277 | ||
8278 | acl_save_prefix="$prefix" | |
8279 | prefix="$acl_final_prefix" | |
8280 | acl_save_exec_prefix="$exec_prefix" | |
8281 | exec_prefix="$acl_final_exec_prefix" | |
8282 | eval x=\"$x\" | |
8283 | exec_prefix="$acl_save_exec_prefix" | |
8284 | prefix="$acl_save_prefix" | |
8285 | ||
8286 | if test "X$x" = "X-L$found_dir"; then | |
8287 | haveit=yes | |
8288 | break | |
8289 | fi | |
8290 | done | |
8291 | if test -z "$haveit"; then | |
8292 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
8293 | fi | |
8294 | if test "$hardcode_minus_L" != no; then | |
8295 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8296 | else | |
8297 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8298 | fi | |
8299 | fi | |
8300 | fi | |
8301 | fi | |
8302 | else | |
8303 | if test "X$found_a" != "X"; then | |
8304 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
8305 | else | |
8306 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
8307 | fi | |
8308 | fi | |
8309 | additional_includedir= | |
8310 | case "$found_dir" in | |
8311 | */lib | */lib/) | |
8312 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8313 | additional_includedir="$basedir/include" | |
8314 | ;; | |
8315 | esac | |
8316 | if test "X$additional_includedir" != "X"; then | |
8317 | if test "X$additional_includedir" != "X/usr/include"; then | |
8318 | haveit= | |
8319 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8320 | if test -n "$GCC"; then | |
8321 | case $host_os in | |
8322 | linux*) haveit=yes;; | |
8323 | esac | |
8324 | fi | |
8325 | fi | |
8326 | if test -z "$haveit"; then | |
8327 | for x in $CPPFLAGS $INCIPT; do | |
8328 | ||
8329 | acl_save_prefix="$prefix" | |
8330 | prefix="$acl_final_prefix" | |
8331 | acl_save_exec_prefix="$exec_prefix" | |
8332 | exec_prefix="$acl_final_exec_prefix" | |
8333 | eval x=\"$x\" | |
8334 | exec_prefix="$acl_save_exec_prefix" | |
8335 | prefix="$acl_save_prefix" | |
8336 | ||
8337 | if test "X$x" = "X-I$additional_includedir"; then | |
8338 | haveit=yes | |
8339 | break | |
8340 | fi | |
8341 | done | |
8342 | if test -z "$haveit"; then | |
8343 | if test -d "$additional_includedir"; then | |
8344 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
8345 | fi | |
8346 | fi | |
8347 | fi | |
8348 | fi | |
8349 | fi | |
8350 | if test -n "$found_la"; then | |
8351 | save_libdir="$libdir" | |
8352 | case "$found_la" in | |
8353 | */* | *\\*) . "$found_la" ;; | |
8354 | *) . "./$found_la" ;; | |
8355 | esac | |
8356 | libdir="$save_libdir" | |
8357 | for dep in $dependency_libs; do | |
8358 | case "$dep" in | |
8359 | -L*) | |
8360 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8361 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8362 | haveit= | |
8363 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8364 | if test -n "$GCC"; then | |
8365 | case $host_os in | |
8366 | linux*) haveit=yes;; | |
8367 | esac | |
8368 | fi | |
8369 | fi | |
8370 | if test -z "$haveit"; then | |
8371 | haveit= | |
8372 | for x in $LDFLAGS $LIBIPT; do | |
8373 | ||
8374 | acl_save_prefix="$prefix" | |
8375 | prefix="$acl_final_prefix" | |
8376 | acl_save_exec_prefix="$exec_prefix" | |
8377 | exec_prefix="$acl_final_exec_prefix" | |
8378 | eval x=\"$x\" | |
8379 | exec_prefix="$acl_save_exec_prefix" | |
8380 | prefix="$acl_save_prefix" | |
8381 | ||
8382 | if test "X$x" = "X-L$additional_libdir"; then | |
8383 | haveit=yes | |
8384 | break | |
8385 | fi | |
8386 | done | |
8387 | if test -z "$haveit"; then | |
8388 | if test -d "$additional_libdir"; then | |
8389 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
8390 | fi | |
8391 | fi | |
8392 | haveit= | |
8393 | for x in $LDFLAGS $LTLIBIPT; do | |
8394 | ||
8395 | acl_save_prefix="$prefix" | |
8396 | prefix="$acl_final_prefix" | |
8397 | acl_save_exec_prefix="$exec_prefix" | |
8398 | exec_prefix="$acl_final_exec_prefix" | |
8399 | eval x=\"$x\" | |
8400 | exec_prefix="$acl_save_exec_prefix" | |
8401 | prefix="$acl_save_prefix" | |
8402 | ||
8403 | if test "X$x" = "X-L$additional_libdir"; then | |
8404 | haveit=yes | |
8405 | break | |
8406 | fi | |
8407 | done | |
8408 | if test -z "$haveit"; then | |
8409 | if test -d "$additional_libdir"; then | |
8410 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
8411 | fi | |
8412 | fi | |
8413 | fi | |
8414 | fi | |
8415 | ;; | |
8416 | -R*) | |
8417 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8418 | if test "$enable_rpath" != no; then | |
8419 | haveit= | |
8420 | for x in $rpathdirs; do | |
8421 | if test "X$x" = "X$dir"; then | |
8422 | haveit=yes | |
8423 | break | |
8424 | fi | |
8425 | done | |
8426 | if test -z "$haveit"; then | |
8427 | rpathdirs="$rpathdirs $dir" | |
8428 | fi | |
8429 | haveit= | |
8430 | for x in $ltrpathdirs; do | |
8431 | if test "X$x" = "X$dir"; then | |
8432 | haveit=yes | |
8433 | break | |
8434 | fi | |
8435 | done | |
8436 | if test -z "$haveit"; then | |
8437 | ltrpathdirs="$ltrpathdirs $dir" | |
8438 | fi | |
8439 | fi | |
8440 | ;; | |
8441 | -l*) | |
8442 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8443 | ;; | |
8444 | *.la) | |
8445 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8446 | ;; | |
8447 | *) | |
8448 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
8449 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
8450 | ;; | |
8451 | esac | |
8452 | done | |
8453 | fi | |
8454 | else | |
9f1528a1 AB |
8455 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8456 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8457 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
8458 | else | |
8459 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
8460 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
8461 | fi | |
05ea2a05 TT |
8462 | fi |
8463 | fi | |
8464 | fi | |
8465 | done | |
8466 | done | |
8467 | if test "X$rpathdirs" != "X"; then | |
8468 | if test -n "$hardcode_libdir_separator"; then | |
8469 | alldirs= | |
8470 | for found_dir in $rpathdirs; do | |
8471 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8472 | done | |
8473 | acl_save_libdir="$libdir" | |
8474 | libdir="$alldirs" | |
8475 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8476 | libdir="$acl_save_libdir" | |
8477 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8478 | else | |
8479 | for found_dir in $rpathdirs; do | |
8480 | acl_save_libdir="$libdir" | |
8481 | libdir="$found_dir" | |
8482 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8483 | libdir="$acl_save_libdir" | |
8484 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8485 | done | |
8486 | fi | |
8487 | fi | |
8488 | if test "X$ltrpathdirs" != "X"; then | |
8489 | for found_dir in $ltrpathdirs; do | |
8490 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
8491 | done | |
8492 | fi | |
5e030278 | 8493 | |
5e030278 | 8494 | |
05ea2a05 | 8495 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 8496 | |
05ea2a05 TT |
8497 | for element in $INCIPT; do |
8498 | haveit= | |
8499 | for x in $CPPFLAGS; do | |
5e030278 | 8500 | |
05ea2a05 TT |
8501 | acl_save_prefix="$prefix" |
8502 | prefix="$acl_final_prefix" | |
8503 | acl_save_exec_prefix="$exec_prefix" | |
8504 | exec_prefix="$acl_final_exec_prefix" | |
8505 | eval x=\"$x\" | |
8506 | exec_prefix="$acl_save_exec_prefix" | |
8507 | prefix="$acl_save_prefix" | |
8508 | ||
8509 | if test "X$x" = "X$element"; then | |
8510 | haveit=yes | |
8511 | break | |
8512 | fi | |
8513 | done | |
8514 | if test -z "$haveit"; then | |
8515 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8516 | fi | |
8517 | done | |
8518 | ||
8519 | ||
8520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
8521 | $as_echo_n "checking for libipt... " >&6; } | |
8522 | if ${ac_cv_libipt+:} false; then : | |
8523 | $as_echo_n "(cached) " >&6 | |
8524 | else | |
8525 | ||
8526 | ac_save_LIBS="$LIBS" | |
8527 | LIBS="$LIBS $LIBIPT" | |
8528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8529 | /* end confdefs.h. */ |
05ea2a05 TT |
8530 | #include "intel-pt.h" |
8531 | int | |
8532 | main () | |
8533 | { | |
8534 | pt_insn_alloc_decoder (0); | |
8535 | ; | |
8536 | return 0; | |
8537 | } | |
5e030278 TT |
8538 | _ACEOF |
8539 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
8540 | ac_cv_libipt=yes |
8541 | else | |
8542 | ac_cv_libipt=no | |
5e030278 TT |
8543 | fi |
8544 | rm -f core conftest.err conftest.$ac_objext \ | |
8545 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 8546 | LIBS="$ac_save_LIBS" |
5e030278 TT |
8547 | |
8548 | fi | |
05ea2a05 TT |
8549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
8550 | $as_echo "$ac_cv_libipt" >&6; } | |
8551 | if test "$ac_cv_libipt" = yes; then | |
8552 | HAVE_LIBIPT=yes | |
5e030278 | 8553 | |
05ea2a05 | 8554 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
5e030278 | 8555 | |
05ea2a05 TT |
8556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 |
8557 | $as_echo_n "checking how to link with libipt... " >&6; } | |
8558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
8559 | $as_echo "$LIBIPT" >&6; } | |
8560 | else | |
8561 | HAVE_LIBIPT=no | |
8562 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8563 | LIBIPT= | |
8564 | LTLIBIPT= | |
8565 | fi | |
5e030278 | 8566 | |
5e030278 | 8567 | |
5e030278 | 8568 | |
5e030278 | 8569 | |
5e030278 | 8570 | |
5e030278 | 8571 | |
05ea2a05 TT |
8572 | if test "$HAVE_LIBIPT" != yes; then |
8573 | if test "$with_intel_pt" = yes; then | |
8574 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
8575 | else | |
8576 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
8577 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
8578 | fi | |
8579 | else | |
8580 | save_LIBS=$LIBS | |
8581 | LIBS="$LIBS $LIBIPT" | |
8582 | for ac_func in pt_insn_event | |
8583 | do : | |
8584 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
8585 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
8586 | cat >>confdefs.h <<_ACEOF | |
8587 | #define HAVE_PT_INSN_EVENT 1 | |
8588 | _ACEOF | |
5e030278 | 8589 | |
5e030278 | 8590 | fi |
05ea2a05 TT |
8591 | done |
8592 | ||
8593 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
8594 | " | |
8595 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
8596 | ||
8597 | cat >>confdefs.h <<_ACEOF | |
8598 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
8599 | _ACEOF | |
5e030278 TT |
8600 | |
8601 | ||
5e030278 | 8602 | fi |
05ea2a05 TT |
8603 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
8604 | " | |
8605 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
5e030278 | 8606 | |
05ea2a05 TT |
8607 | cat >>confdefs.h <<_ACEOF |
8608 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
8609 | _ACEOF | |
5e030278 | 8610 | |
5e030278 | 8611 | |
05ea2a05 | 8612 | fi |
5e030278 | 8613 | |
05ea2a05 TT |
8614 | LIBS=$save_LIBS |
8615 | fi | |
8616 | fi | |
8617 | ||
6c130ba3 SM |
8618 | # Check if the compiler and runtime support printing long longs. |
8619 | ||
8620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 | |
8621 | $as_echo_n "checking for long long support in printf... " >&6; } | |
8622 | if ${gdb_cv_printf_has_long_long+:} false; then : | |
8623 | $as_echo_n "(cached) " >&6 | |
8624 | else | |
8625 | if test "$cross_compiling" = yes; then : | |
8626 | gdb_cv_printf_has_long_long=no | |
8627 | else | |
8628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8629 | /* end confdefs.h. */ | |
8630 | $ac_includes_default | |
8631 | int | |
8632 | main () | |
8633 | { | |
8634 | char buf[32]; | |
8635 | long long l = 0; | |
8636 | l = (l << 16) + 0x0123; | |
8637 | l = (l << 16) + 0x4567; | |
8638 | l = (l << 16) + 0x89ab; | |
8639 | l = (l << 16) + 0xcdef; | |
8640 | sprintf (buf, "0x%016llx", l); | |
8641 | return (strcmp ("0x0123456789abcdef", buf)); | |
8642 | ; | |
8643 | return 0; | |
8644 | } | |
8645 | _ACEOF | |
8646 | if ac_fn_c_try_run "$LINENO"; then : | |
8647 | gdb_cv_printf_has_long_long=yes | |
8648 | else | |
8649 | gdb_cv_printf_has_long_long=no | |
8650 | fi | |
8651 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8652 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8653 | fi | |
8654 | ||
8655 | fi | |
8656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 | |
8657 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
8658 | if test "$gdb_cv_printf_has_long_long" = yes; then | |
8659 | ||
8660 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h | |
8661 | ||
8662 | fi | |
8663 | ||
c8693053 RO |
8664 | |
8665 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
8666 | ||
8667 | for ac_header in sys/procfs.h | |
8668 | do : | |
8669 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
8670 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
8671 | cat >>confdefs.h <<_ACEOF | |
8672 | #define HAVE_SYS_PROCFS_H 1 | |
8673 | _ACEOF | |
8674 | ||
8675 | fi | |
8676 | ||
8677 | done | |
8678 | ||
05ea2a05 | 8679 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
8680 | |
8681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
8682 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
8683 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
8684 | $as_echo_n "(cached) " >&6 | |
8685 | else | |
8686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8687 | /* end confdefs.h. */ |
05ea2a05 TT |
8688 | |
8689 | #define _SYSCALL32 | |
05ea2a05 | 8690 | #include <sys/procfs.h> |
5e030278 TT |
8691 | int |
8692 | main () | |
8693 | { | |
05ea2a05 | 8694 | gregset_t avar |
5e030278 TT |
8695 | ; |
8696 | return 0; | |
8697 | } | |
8698 | _ACEOF | |
05ea2a05 TT |
8699 | if ac_fn_c_try_compile "$LINENO"; then : |
8700 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
8701 | else | |
8702 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
5e030278 | 8703 | |
5e030278 | 8704 | fi |
05ea2a05 | 8705 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
8706 | fi |
8707 | ||
05ea2a05 | 8708 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
5e030278 | 8709 | |
05ea2a05 TT |
8710 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
8711 | ||
8712 | fi | |
8713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
8714 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
8715 | ||
c8693053 RO |
8716 | |
8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
8718 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
8719 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
5e030278 TT |
8720 | $as_echo_n "(cached) " >&6 |
8721 | else | |
05ea2a05 | 8722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e030278 | 8723 | /* end confdefs.h. */ |
05ea2a05 TT |
8724 | |
8725 | #define _SYSCALL32 | |
05ea2a05 | 8726 | #include <sys/procfs.h> |
5e030278 TT |
8727 | int |
8728 | main () | |
8729 | { | |
05ea2a05 | 8730 | fpregset_t avar |
5e030278 TT |
8731 | ; |
8732 | return 0; | |
8733 | } | |
8734 | _ACEOF | |
05ea2a05 | 8735 | if ac_fn_c_try_compile "$LINENO"; then : |
db6878ac SM |
8736 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
8737 | else | |
8738 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8739 | ||
8740 | fi | |
8741 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8742 | fi | |
8743 | ||
8744 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
8745 | ||
8746 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
8747 | ||
8748 | fi | |
8749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
8750 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
8751 | ||
c8693053 RO |
8752 | |
8753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
db6878ac SM |
8754 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
8755 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
8756 | $as_echo_n "(cached) " >&6 | |
8757 | else | |
8758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8759 | /* end confdefs.h. */ | |
8760 | ||
8761 | #define _SYSCALL32 | |
db6878ac SM |
8762 | #include <sys/procfs.h> |
8763 | int | |
8764 | main () | |
8765 | { | |
8766 | prgregset_t avar | |
8767 | ; | |
8768 | return 0; | |
8769 | } | |
8770 | _ACEOF | |
8771 | if ac_fn_c_try_compile "$LINENO"; then : | |
8772 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
8773 | else | |
8774 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
8775 | ||
8776 | fi | |
8777 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8778 | fi | |
8779 | ||
8780 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
8781 | ||
8782 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h | |
8783 | ||
8784 | fi | |
8785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
8786 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
8787 | ||
c8693053 RO |
8788 | |
8789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
db6878ac SM |
8790 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
8791 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
8792 | $as_echo_n "(cached) " >&6 | |
8793 | else | |
8794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8795 | /* end confdefs.h. */ | |
8796 | ||
8797 | #define _SYSCALL32 | |
db6878ac SM |
8798 | #include <sys/procfs.h> |
8799 | int | |
8800 | main () | |
8801 | { | |
8802 | prfpregset_t avar | |
8803 | ; | |
8804 | return 0; | |
8805 | } | |
8806 | _ACEOF | |
8807 | if ac_fn_c_try_compile "$LINENO"; then : | |
8808 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
8809 | else | |
8810 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
8811 | ||
8812 | fi | |
8813 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8814 | fi | |
8815 | ||
8816 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8817 | ||
8818 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
8819 | ||
8820 | fi | |
8821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
8822 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
8823 | ||
c8693053 RO |
8824 | |
8825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
db6878ac SM |
8826 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
8827 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
8828 | $as_echo_n "(cached) " >&6 | |
8829 | else | |
8830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8831 | /* end confdefs.h. */ | |
8832 | ||
8833 | #define _SYSCALL32 | |
db6878ac SM |
8834 | #include <sys/procfs.h> |
8835 | int | |
8836 | main () | |
8837 | { | |
8838 | prgregset32_t avar | |
8839 | ; | |
8840 | return 0; | |
8841 | } | |
8842 | _ACEOF | |
8843 | if ac_fn_c_try_compile "$LINENO"; then : | |
8844 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
8845 | else | |
8846 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
8847 | ||
8848 | fi | |
8849 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8850 | fi | |
8851 | ||
8852 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
8853 | ||
8854 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h | |
8855 | ||
8856 | fi | |
8857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
8858 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
8859 | ||
c8693053 RO |
8860 | |
8861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
db6878ac SM |
8862 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
8863 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
8864 | $as_echo_n "(cached) " >&6 | |
8865 | else | |
8866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8867 | /* end confdefs.h. */ | |
8868 | ||
8869 | #define _SYSCALL32 | |
db6878ac SM |
8870 | #include <sys/procfs.h> |
8871 | int | |
8872 | main () | |
8873 | { | |
8874 | lwpid_t avar | |
8875 | ; | |
8876 | return 0; | |
8877 | } | |
8878 | _ACEOF | |
8879 | if ac_fn_c_try_compile "$LINENO"; then : | |
8880 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
05ea2a05 | 8881 | else |
db6878ac | 8882 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
5e030278 TT |
8883 | |
8884 | fi | |
05ea2a05 TT |
8885 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8886 | fi | |
5e030278 | 8887 | |
db6878ac | 8888 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
5e030278 | 8889 | |
db6878ac | 8890 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
5e030278 | 8891 | |
05ea2a05 | 8892 | fi |
db6878ac SM |
8893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
8894 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
5e030278 | 8895 | |
c8693053 RO |
8896 | |
8897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
db6878ac SM |
8898 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
8899 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
5e030278 TT |
8900 | $as_echo_n "(cached) " >&6 |
8901 | else | |
05ea2a05 TT |
8902 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8903 | /* end confdefs.h. */ | |
5e030278 | 8904 | |
05ea2a05 | 8905 | #define _SYSCALL32 |
05ea2a05 TT |
8906 | #include <sys/procfs.h> |
8907 | int | |
8908 | main () | |
8909 | { | |
db6878ac | 8910 | psaddr_t avar |
05ea2a05 TT |
8911 | ; |
8912 | return 0; | |
8913 | } | |
8914 | _ACEOF | |
8915 | if ac_fn_c_try_compile "$LINENO"; then : | |
db6878ac | 8916 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
05ea2a05 | 8917 | else |
db6878ac | 8918 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
05ea2a05 TT |
8919 | |
8920 | fi | |
8921 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5e030278 TT |
8922 | fi |
8923 | ||
db6878ac | 8924 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
05ea2a05 | 8925 | |
db6878ac | 8926 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
05ea2a05 TT |
8927 | |
8928 | fi | |
db6878ac SM |
8929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
8930 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
05ea2a05 | 8931 | |
c8693053 RO |
8932 | |
8933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
db6878ac SM |
8934 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
8935 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
5e030278 TT |
8936 | $as_echo_n "(cached) " >&6 |
8937 | else | |
8938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8939 | /* end confdefs.h. */ | |
05ea2a05 TT |
8940 | |
8941 | #define _SYSCALL32 | |
05ea2a05 | 8942 | #include <sys/procfs.h> |
5e030278 TT |
8943 | int |
8944 | main () | |
8945 | { | |
db6878ac | 8946 | elf_fpregset_t avar |
5e030278 TT |
8947 | ; |
8948 | return 0; | |
8949 | } | |
8950 | _ACEOF | |
05ea2a05 | 8951 | if ac_fn_c_try_compile "$LINENO"; then : |
db6878ac | 8952 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
5e030278 | 8953 | else |
db6878ac | 8954 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
5e030278 TT |
8955 | |
8956 | fi | |
05ea2a05 TT |
8957 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8958 | fi | |
5e030278 | 8959 | |
db6878ac | 8960 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
5e030278 | 8961 | |
db6878ac | 8962 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
5e030278 | 8963 | |
05ea2a05 | 8964 | fi |
db6878ac SM |
8965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 |
8966 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
5e030278 | 8967 | |
db6878ac SM |
8968 | fi |
8969 | ||
8b35ed1f SM |
8970 | # Check for xxhash |
8971 | ||
8972 | # Check whether --with-xxhash was given. | |
8973 | if test "${with_xxhash+set}" = set; then : | |
8974 | withval=$with_xxhash; | |
8975 | else | |
8976 | with_xxhash=auto | |
8977 | fi | |
8978 | ||
8979 | ||
8980 | if test "x$with_xxhash" != "xno"; then | |
8981 | ||
8982 | ||
8983 | ||
8984 | ||
8985 | ||
8986 | ||
8987 | ||
8988 | ||
8989 | use_additional=yes | |
8990 | ||
8991 | acl_save_prefix="$prefix" | |
8992 | prefix="$acl_final_prefix" | |
8993 | acl_save_exec_prefix="$exec_prefix" | |
8994 | exec_prefix="$acl_final_exec_prefix" | |
8995 | ||
8996 | eval additional_includedir=\"$includedir\" | |
8997 | eval additional_libdir=\"$libdir\" | |
8998 | ||
8999 | exec_prefix="$acl_save_exec_prefix" | |
9000 | prefix="$acl_save_prefix" | |
9001 | ||
9002 | ||
9003 | # Check whether --with-libxxhash-prefix was given. | |
9004 | if test "${with_libxxhash_prefix+set}" = set; then : | |
9005 | withval=$with_libxxhash_prefix; | |
9006 | if test "X$withval" = "Xno"; then | |
9007 | use_additional=no | |
9008 | else | |
9009 | if test "X$withval" = "X"; then | |
9010 | ||
9011 | acl_save_prefix="$prefix" | |
9012 | prefix="$acl_final_prefix" | |
9013 | acl_save_exec_prefix="$exec_prefix" | |
9014 | exec_prefix="$acl_final_exec_prefix" | |
9015 | ||
9016 | eval additional_includedir=\"$includedir\" | |
9017 | eval additional_libdir=\"$libdir\" | |
9018 | ||
9019 | exec_prefix="$acl_save_exec_prefix" | |
9020 | prefix="$acl_save_prefix" | |
9021 | ||
9022 | else | |
9023 | additional_includedir="$withval/include" | |
9024 | additional_libdir="$withval/lib" | |
9025 | fi | |
9026 | fi | |
9027 | ||
9028 | fi | |
9029 | ||
9030 | ||
9031 | # Check whether --with-libxxhash-type was given. | |
9032 | if test "${with_libxxhash_type+set}" = set; then : | |
9033 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
9034 | else | |
9035 | with_libxxhash_type=auto | |
9036 | fi | |
9037 | ||
9038 | lib_type=`eval echo \$with_libxxhash_type` | |
9039 | ||
9040 | LIBXXHASH= | |
9041 | LTLIBXXHASH= | |
9042 | INCXXHASH= | |
9043 | rpathdirs= | |
9044 | ltrpathdirs= | |
9045 | names_already_handled= | |
9046 | names_next_round='xxhash ' | |
9047 | while test -n "$names_next_round"; do | |
9048 | names_this_round="$names_next_round" | |
9049 | names_next_round= | |
9050 | for name in $names_this_round; do | |
9051 | already_handled= | |
9052 | for n in $names_already_handled; do | |
9053 | if test "$n" = "$name"; then | |
9054 | already_handled=yes | |
9055 | break | |
9056 | fi | |
9057 | done | |
9058 | if test -z "$already_handled"; then | |
9059 | names_already_handled="$names_already_handled $name" | |
9060 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9061 | eval value=\"\$HAVE_LIB$uppername\" | |
9062 | if test -n "$value"; then | |
9063 | if test "$value" = yes; then | |
9064 | eval value=\"\$LIB$uppername\" | |
9065 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
9066 | eval value=\"\$LTLIB$uppername\" | |
9067 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
9068 | else | |
9069 | : | |
9070 | fi | |
9071 | else | |
9072 | found_dir= | |
9073 | found_la= | |
9074 | found_so= | |
9075 | found_a= | |
9076 | if test $use_additional = yes; then | |
9077 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
9078 | found_dir="$additional_libdir" | |
9079 | found_so="$additional_libdir/lib$name.$shlibext" | |
9080 | if test -f "$additional_libdir/lib$name.la"; then | |
9081 | found_la="$additional_libdir/lib$name.la" | |
9082 | fi | |
9083 | elif test x$lib_type != xshared; then | |
9084 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9085 | found_dir="$additional_libdir" | |
9086 | found_a="$additional_libdir/lib$name.$libext" | |
9087 | if test -f "$additional_libdir/lib$name.la"; then | |
9088 | found_la="$additional_libdir/lib$name.la" | |
9089 | fi | |
9090 | fi | |
9091 | fi | |
9092 | fi | |
9093 | if test "X$found_dir" = "X"; then | |
9094 | for x in $LDFLAGS $LTLIBXXHASH; do | |
9095 | ||
9096 | acl_save_prefix="$prefix" | |
9097 | prefix="$acl_final_prefix" | |
9098 | acl_save_exec_prefix="$exec_prefix" | |
9099 | exec_prefix="$acl_final_exec_prefix" | |
9100 | eval x=\"$x\" | |
9101 | exec_prefix="$acl_save_exec_prefix" | |
9102 | prefix="$acl_save_prefix" | |
9103 | ||
9104 | case "$x" in | |
9105 | -L*) | |
9106 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9107 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
9108 | found_dir="$dir" | |
9109 | found_so="$dir/lib$name.$shlibext" | |
9110 | if test -f "$dir/lib$name.la"; then | |
9111 | found_la="$dir/lib$name.la" | |
9112 | fi | |
9113 | elif test x$lib_type != xshared; then | |
9114 | if test -f "$dir/lib$name.$libext"; then | |
9115 | found_dir="$dir" | |
9116 | found_a="$dir/lib$name.$libext" | |
9117 | if test -f "$dir/lib$name.la"; then | |
9118 | found_la="$dir/lib$name.la" | |
9119 | fi | |
9120 | fi | |
9121 | fi | |
9122 | ;; | |
9123 | esac | |
9124 | if test "X$found_dir" != "X"; then | |
9125 | break | |
9126 | fi | |
9127 | done | |
9128 | fi | |
9129 | if test "X$found_dir" != "X"; then | |
9130 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
9131 | if test "X$found_so" != "X"; then | |
9132 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9133 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
9134 | else | |
9135 | haveit= | |
9136 | for x in $ltrpathdirs; do | |
9137 | if test "X$x" = "X$found_dir"; then | |
9138 | haveit=yes | |
9139 | break | |
9140 | fi | |
9141 | done | |
9142 | if test -z "$haveit"; then | |
9143 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9144 | fi | |
9145 | if test "$hardcode_direct" = yes; then | |
9146 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
9147 | else | |
9148 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9149 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
9150 | haveit= | |
9151 | for x in $rpathdirs; do | |
9152 | if test "X$x" = "X$found_dir"; then | |
9153 | haveit=yes | |
9154 | break | |
9155 | fi | |
9156 | done | |
9157 | if test -z "$haveit"; then | |
9158 | rpathdirs="$rpathdirs $found_dir" | |
9159 | fi | |
9160 | else | |
9161 | haveit= | |
9162 | for x in $LDFLAGS $LIBXXHASH; do | |
9163 | ||
9164 | acl_save_prefix="$prefix" | |
9165 | prefix="$acl_final_prefix" | |
9166 | acl_save_exec_prefix="$exec_prefix" | |
9167 | exec_prefix="$acl_final_exec_prefix" | |
9168 | eval x=\"$x\" | |
9169 | exec_prefix="$acl_save_exec_prefix" | |
9170 | prefix="$acl_save_prefix" | |
9171 | ||
9172 | if test "X$x" = "X-L$found_dir"; then | |
9173 | haveit=yes | |
9174 | break | |
9175 | fi | |
9176 | done | |
9177 | if test -z "$haveit"; then | |
9178 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
9179 | fi | |
9180 | if test "$hardcode_minus_L" != no; then | |
9181 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
9182 | else | |
9183 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
9184 | fi | |
9185 | fi | |
9186 | fi | |
9187 | fi | |
9188 | else | |
9189 | if test "X$found_a" != "X"; then | |
9190 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
9191 | else | |
9192 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
9193 | fi | |
9194 | fi | |
9195 | additional_includedir= | |
9196 | case "$found_dir" in | |
9197 | */lib | */lib/) | |
9198 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9199 | additional_includedir="$basedir/include" | |
9200 | ;; | |
9201 | esac | |
9202 | if test "X$additional_includedir" != "X"; then | |
9203 | if test "X$additional_includedir" != "X/usr/include"; then | |
9204 | haveit= | |
9205 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9206 | if test -n "$GCC"; then | |
9207 | case $host_os in | |
9208 | linux*) haveit=yes;; | |
9209 | esac | |
9210 | fi | |
9211 | fi | |
9212 | if test -z "$haveit"; then | |
9213 | for x in $CPPFLAGS $INCXXHASH; do | |
9214 | ||
9215 | acl_save_prefix="$prefix" | |
9216 | prefix="$acl_final_prefix" | |
9217 | acl_save_exec_prefix="$exec_prefix" | |
9218 | exec_prefix="$acl_final_exec_prefix" | |
9219 | eval x=\"$x\" | |
9220 | exec_prefix="$acl_save_exec_prefix" | |
9221 | prefix="$acl_save_prefix" | |
9222 | ||
9223 | if test "X$x" = "X-I$additional_includedir"; then | |
9224 | haveit=yes | |
9225 | break | |
9226 | fi | |
9227 | done | |
9228 | if test -z "$haveit"; then | |
9229 | if test -d "$additional_includedir"; then | |
9230 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
9231 | fi | |
9232 | fi | |
9233 | fi | |
9234 | fi | |
9235 | fi | |
9236 | if test -n "$found_la"; then | |
9237 | save_libdir="$libdir" | |
9238 | case "$found_la" in | |
9239 | */* | *\\*) . "$found_la" ;; | |
9240 | *) . "./$found_la" ;; | |
9241 | esac | |
9242 | libdir="$save_libdir" | |
9243 | for dep in $dependency_libs; do | |
9244 | case "$dep" in | |
9245 | -L*) | |
9246 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9247 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9248 | haveit= | |
9249 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9250 | if test -n "$GCC"; then | |
9251 | case $host_os in | |
9252 | linux*) haveit=yes;; | |
9253 | esac | |
9254 | fi | |
9255 | fi | |
9256 | if test -z "$haveit"; then | |
9257 | haveit= | |
9258 | for x in $LDFLAGS $LIBXXHASH; do | |
9259 | ||
9260 | acl_save_prefix="$prefix" | |
9261 | prefix="$acl_final_prefix" | |
9262 | acl_save_exec_prefix="$exec_prefix" | |
9263 | exec_prefix="$acl_final_exec_prefix" | |
9264 | eval x=\"$x\" | |
9265 | exec_prefix="$acl_save_exec_prefix" | |
9266 | prefix="$acl_save_prefix" | |
9267 | ||
9268 | if test "X$x" = "X-L$additional_libdir"; then | |
9269 | haveit=yes | |
9270 | break | |
9271 | fi | |
9272 | done | |
9273 | if test -z "$haveit"; then | |
9274 | if test -d "$additional_libdir"; then | |
9275 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
9276 | fi | |
9277 | fi | |
9278 | haveit= | |
9279 | for x in $LDFLAGS $LTLIBXXHASH; do | |
9280 | ||
9281 | acl_save_prefix="$prefix" | |
9282 | prefix="$acl_final_prefix" | |
9283 | acl_save_exec_prefix="$exec_prefix" | |
9284 | exec_prefix="$acl_final_exec_prefix" | |
9285 | eval x=\"$x\" | |
9286 | exec_prefix="$acl_save_exec_prefix" | |
9287 | prefix="$acl_save_prefix" | |
9288 | ||
9289 | if test "X$x" = "X-L$additional_libdir"; then | |
9290 | haveit=yes | |
9291 | break | |
9292 | fi | |
9293 | done | |
9294 | if test -z "$haveit"; then | |
9295 | if test -d "$additional_libdir"; then | |
9296 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
9297 | fi | |
9298 | fi | |
9299 | fi | |
9300 | fi | |
9301 | ;; | |
9302 | -R*) | |
9303 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9304 | if test "$enable_rpath" != no; then | |
9305 | haveit= | |
9306 | for x in $rpathdirs; do | |
9307 | if test "X$x" = "X$dir"; then | |
9308 | haveit=yes | |
9309 | break | |
9310 | fi | |
9311 | done | |
9312 | if test -z "$haveit"; then | |
9313 | rpathdirs="$rpathdirs $dir" | |
9314 | fi | |
9315 | haveit= | |
9316 | for x in $ltrpathdirs; do | |
9317 | if test "X$x" = "X$dir"; then | |
9318 | haveit=yes | |
9319 | break | |
9320 | fi | |
9321 | done | |
9322 | if test -z "$haveit"; then | |
9323 | ltrpathdirs="$ltrpathdirs $dir" | |
9324 | fi | |
9325 | fi | |
9326 | ;; | |
9327 | -l*) | |
9328 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9329 | ;; | |
9330 | *.la) | |
9331 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9332 | ;; | |
9333 | *) | |
9334 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
9335 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
9336 | ;; | |
9337 | esac | |
9338 | done | |
9339 | fi | |
9340 | else | |
9341 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then | |
9342 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
9343 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
9344 | else | |
9345 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
9346 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
9347 | fi | |
9348 | fi | |
9349 | fi | |
9350 | fi | |
9351 | done | |
9352 | done | |
9353 | if test "X$rpathdirs" != "X"; then | |
9354 | if test -n "$hardcode_libdir_separator"; then | |
9355 | alldirs= | |
9356 | for found_dir in $rpathdirs; do | |
9357 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9358 | done | |
9359 | acl_save_libdir="$libdir" | |
9360 | libdir="$alldirs" | |
9361 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9362 | libdir="$acl_save_libdir" | |
9363 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
9364 | else | |
9365 | for found_dir in $rpathdirs; do | |
9366 | acl_save_libdir="$libdir" | |
9367 | libdir="$found_dir" | |
9368 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9369 | libdir="$acl_save_libdir" | |
9370 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
9371 | done | |
9372 | fi | |
9373 | fi | |
9374 | if test "X$ltrpathdirs" != "X"; then | |
9375 | for found_dir in $ltrpathdirs; do | |
9376 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
9377 | done | |
9378 | fi | |
9379 | ||
9380 | ||
9381 | ac_save_CPPFLAGS="$CPPFLAGS" | |
9382 | ||
9383 | for element in $INCXXHASH; do | |
9384 | haveit= | |
9385 | for x in $CPPFLAGS; do | |
9386 | ||
9387 | acl_save_prefix="$prefix" | |
9388 | prefix="$acl_final_prefix" | |
9389 | acl_save_exec_prefix="$exec_prefix" | |
9390 | exec_prefix="$acl_final_exec_prefix" | |
9391 | eval x=\"$x\" | |
9392 | exec_prefix="$acl_save_exec_prefix" | |
9393 | prefix="$acl_save_prefix" | |
9394 | ||
9395 | if test "X$x" = "X$element"; then | |
9396 | haveit=yes | |
9397 | break | |
9398 | fi | |
9399 | done | |
9400 | if test -z "$haveit"; then | |
9401 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9402 | fi | |
9403 | done | |
9404 | ||
9405 | ||
9406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
9407 | $as_echo_n "checking for libxxhash... " >&6; } | |
9408 | if ${ac_cv_libxxhash+:} false; then : | |
9409 | $as_echo_n "(cached) " >&6 | |
9410 | else | |
9411 | ||
9412 | ac_save_LIBS="$LIBS" | |
9413 | LIBS="$LIBS $LIBXXHASH" | |
9414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9415 | /* end confdefs.h. */ | |
9416 | #include <xxhash.h> | |
9417 | int | |
9418 | main () | |
9419 | { | |
9420 | XXH32("foo", 3, 0); | |
9421 | ||
9422 | ; | |
9423 | return 0; | |
9424 | } | |
9425 | _ACEOF | |
9426 | if ac_fn_c_try_link "$LINENO"; then : | |
9427 | ac_cv_libxxhash=yes | |
9428 | else | |
9429 | ac_cv_libxxhash=no | |
9430 | fi | |
9431 | rm -f core conftest.err conftest.$ac_objext \ | |
9432 | conftest$ac_exeext conftest.$ac_ext | |
9433 | LIBS="$ac_save_LIBS" | |
9434 | ||
9435 | fi | |
9436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
9437 | $as_echo "$ac_cv_libxxhash" >&6; } | |
9438 | if test "$ac_cv_libxxhash" = yes; then | |
9439 | HAVE_LIBXXHASH=yes | |
9440 | ||
9441 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
9442 | ||
9443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
9444 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
9445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
9446 | $as_echo "$LIBXXHASH" >&6; } | |
9447 | else | |
9448 | HAVE_LIBXXHASH=no | |
9449 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9450 | LIBXXHASH= | |
9451 | LTLIBXXHASH= | |
9452 | fi | |
9453 | ||
9454 | ||
9455 | ||
9456 | ||
9457 | ||
9458 | ||
9459 | if test "$HAVE_LIBXXHASH" != yes; then | |
9460 | if test "$with_xxhash" = yes; then | |
9461 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
9462 | fi | |
9463 | fi | |
9464 | if test "x$with_xxhash" = "xauto"; then | |
9465 | with_xxhash="$HAVE_LIBXXHASH" | |
9466 | fi | |
9467 | fi | |
9468 | ||
9469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
9470 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
9471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
9472 | $as_echo "$with_xxhash" >&6; } | |
9473 | ||
4635ff97 TT |
9474 | # This is set by GDB_AC_COMMON. |
9475 | ||
db6878ac SM |
9476 | |
9477 | ||
9478 | # Check whether we will enable the inclusion of unit tests when | |
9479 | # compiling GDB. | |
9480 | # | |
9481 | # The default value of this option changes depending whether we're on | |
9482 | # development mode (in which case it's "true") or not (in which case | |
9483 | # it's "false"). The $development variable is set by the GDB_AC_COMMON | |
9484 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
9485 | ||
9486 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
9487 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
9488 | fi | |
9489 | ||
9490 | # Check whether --enable-unit-tests was given. | |
9491 | if test "${enable_unit_tests+set}" = set; then : | |
9492 | enableval=$enable_unit_tests; case "${enableval}" in | |
9493 | yes) enable_unittests=true ;; | |
9494 | no) enable_unittests=false ;; | |
9495 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
9496 | esac | |
9497 | else | |
9498 | enable_unittests=$development | |
9499 | fi | |
9500 | ||
9501 | ||
9502 | if $enable_unittests; then | |
9503 | ||
9504 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
9505 | ||
9506 | ||
db6878ac SM |
9507 | fi |
9508 | ||
9509 | ||
9510 | case ${build_alias} in | |
9511 | "") build_noncanonical=${build} ;; | |
9512 | *) build_noncanonical=${build_alias} ;; | |
9513 | esac | |
9514 | ||
9515 | case ${host_alias} in | |
9516 | "") host_noncanonical=${build_noncanonical} ;; | |
9517 | *) host_noncanonical=${host_alias} ;; | |
9518 | esac | |
9519 | ||
9520 | case ${target_alias} in | |
9521 | "") target_noncanonical=${host_noncanonical} ;; | |
9522 | *) target_noncanonical=${target_alias} ;; | |
9523 | esac | |
9524 | ||
9525 | ||
9526 | ||
9527 | ||
9528 | ||
9529 | ||
9530 | # Dependency checking. | |
9531 | rm -rf .tst 2>/dev/null | |
9532 | mkdir .tst 2>/dev/null | |
9533 | if test -d .tst; then | |
9534 | am__leading_dot=. | |
9535 | else | |
9536 | am__leading_dot=_ | |
9537 | fi | |
9538 | rmdir .tst 2>/dev/null | |
9539 | ||
9540 | DEPDIR="${am__leading_dot}deps" | |
9541 | ||
9542 | ac_config_commands="$ac_config_commands depdir" | |
9543 | ||
9544 | ||
9545 | ||
9a665d62 TT |
9546 | # If we haven't got the data from the intl directory, |
9547 | # assume NLS is disabled. | |
9548 | USE_NLS=no | |
9549 | LIBINTL= | |
9550 | LIBINTL_DEP= | |
9551 | INCINTL= | |
9552 | XGETTEXT= | |
9553 | GMSGFMT= | |
9554 | POSUB= | |
9555 | ||
9556 | if test -f ../intl/config.intl; then | |
9557 | . ../intl/config.intl | |
9558 | fi | |
9559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 | |
9560 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
9561 | if test x"$USE_NLS" != xyes; then | |
9562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9563 | $as_echo "no" >&6; } | |
9564 | else | |
9565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9566 | $as_echo "yes" >&6; } | |
9567 | ||
9568 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h | |
9569 | ||
9570 | ||
9571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 | |
9572 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
9573 | # Look for .po and .gmo files in the source directory. | |
9574 | CATALOGS= | |
9575 | XLINGUAS= | |
9576 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
9577 | # If there aren't any .gmo files the shell will give us the | |
9578 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
9579 | # weeded out. | |
9580 | case "$cat" in *\**) | |
9581 | continue;; | |
9582 | esac | |
9583 | # The quadruple backslash is collapsed to a double backslash | |
9584 | # by the backticks, then collapsed again by the double quotes, | |
9585 | # leaving us with one backslash in the sed expression (right | |
9586 | # before the dot that mustn't act as a wildcard). | |
9587 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
9588 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
9589 | # The user is allowed to set LINGUAS to a list of languages to | |
9590 | # install catalogs for. If it's empty that means "all of them." | |
9591 | if test "x$LINGUAS" = x; then | |
9592 | CATALOGS="$CATALOGS $cat" | |
9593 | XLINGUAS="$XLINGUAS $lang" | |
9594 | else | |
9595 | case "$LINGUAS" in *$lang*) | |
9596 | CATALOGS="$CATALOGS $cat" | |
9597 | XLINGUAS="$XLINGUAS $lang" | |
9598 | ;; | |
9599 | esac | |
9600 | fi | |
9601 | done | |
9602 | LINGUAS="$XLINGUAS" | |
9603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
9604 | $as_echo "$LINGUAS" >&6; } | |
9605 | ||
9606 | ||
9607 | DATADIRNAME=share | |
9608 | ||
9609 | INSTOBJEXT=.mo | |
9610 | ||
9611 | GENCAT=gencat | |
9612 | ||
9613 | CATOBJEXT=.gmo | |
9614 | ||
9615 | fi | |
9616 | ||
db6878ac SM |
9617 | # Create sub-directories for objects and dependencies. |
9618 | CONFIG_SRC_SUBDIR="arch gdbsupport nat target" | |
9619 | ||
9620 | ||
9621 | ac_config_commands="$ac_config_commands gdbdepdir" | |
9622 | ||
9623 | ||
9624 | depcc="$CC" am_compiler_list= | |
9625 | ||
9626 | am_depcomp=$ac_aux_dir/depcomp | |
9627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
9628 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
9629 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
5e030278 TT |
9630 | $as_echo_n "(cached) " >&6 |
9631 | else | |
db6878ac SM |
9632 | if test -f "$am_depcomp"; then |
9633 | # We make a subdir and do the tests there. Otherwise we can end up | |
9634 | # making bogus files that we don't know about and never remove. For | |
9635 | # instance it was reported that on HP-UX the gcc test will end up | |
9636 | # making a dummy file named `D' -- because `-MD' means `put the output | |
9637 | # in D'. | |
9638 | mkdir conftest.dir | |
9639 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
9640 | # using a relative directory. | |
9641 | cp "$am_depcomp" conftest.dir | |
9642 | cd conftest.dir | |
9643 | # We will build objects and dependencies in a subdirectory because | |
9644 | # it helps to detect inapplicable dependency modes. For instance | |
9645 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
9646 | # side effect of compilation, but ICC will put the dependencies in | |
9647 | # the current directory while Tru64 will put them in the object | |
9648 | # directory. | |
9649 | mkdir sub | |
05ea2a05 | 9650 | |
db6878ac SM |
9651 | am_cv_CC_dependencies_compiler_type=none |
9652 | if test "$am_compiler_list" = ""; then | |
9653 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
9654 | fi | |
9655 | for depmode in $am_compiler_list; do | |
9656 | if test $depmode = none; then break; fi | |
9657 | ||
9658 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 | |
9659 | # Setup a source with many dependencies, because some compilers | |
9660 | # like to wrap large dependency lists on column 80 (with \), and | |
9661 | # we should not choose a depcomp mode which is confused by this. | |
9662 | # | |
9663 | # We need to recreate these files for each test, as the compiler may | |
9664 | # overwrite some of them when testing with obscure command lines. | |
9665 | # This happens at least with the AIX C compiler. | |
9666 | : > sub/conftest.c | |
9667 | for i in 1 2 3 4 5 6; do | |
9668 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
9669 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
9670 | # Solaris 8's {/usr,}/bin/sh. | |
9671 | touch sub/conftst$i.h | |
9672 | done | |
9673 | echo "include sub/conftest.Po" > confmf | |
9674 | ||
9675 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
9676 | # mode. It turns out that the SunPro C++ compiler does not properly | |
9677 | # handle `-M -o', and we need to detect this. | |
9678 | depcmd="depmode=$depmode \ | |
9679 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
9680 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
9681 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
9682 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
9683 | if env $depcmd > conftest.err 2>&1 && | |
9684 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
9685 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
9686 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
9687 | # icc doesn't choke on unknown options, it will just issue warnings | |
9688 | # or remarks (even with -Werror). So we grep stderr for any message | |
9689 | # that says an option was ignored or not supported. | |
9690 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
9691 | # icc: Command line warning: ignoring option '-M'; no argument required | |
9692 | # The diagnosis changed in icc 8.0: | |
9693 | # icc: Command line remark: option '-MP' not supported | |
9694 | if (grep 'ignoring option' conftest.err || | |
9695 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
9696 | am_cv_CC_dependencies_compiler_type=$depmode | |
9697 | $as_echo "$as_me:$LINENO: success" >&5 | |
9698 | break | |
9699 | fi | |
9700 | fi | |
9701 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 | |
9702 | sed -e 's/^/| /' < conftest.err >&5 | |
9703 | done | |
9704 | ||
9705 | cd .. | |
9706 | rm -rf conftest.dir | |
9707 | else | |
9708 | am_cv_CC_dependencies_compiler_type=none | |
9709 | fi | |
9710 | ||
9711 | fi | |
9712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
9713 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
9714 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone | |
9715 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 | |
9716 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
9717 | ||
9718 | fi | |
9719 | ||
9720 | ||
05a6b8c2 | 9721 | for ac_header in termios.h sys/reg.h string.h sys/procfs.h linux/elf.h fcntl.h signal.h sys/file.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h ws2tcpip.h |
db6878ac SM |
9722 | do : |
9723 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9724 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9725 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9726 | cat >>confdefs.h <<_ACEOF | |
9727 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9728 | _ACEOF | |
9729 | ||
9730 | fi | |
9731 | ||
9732 | done | |
9733 | ||
9734 | for ac_header in vfork.h | |
9735 | do : | |
9736 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9737 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
9738 | cat >>confdefs.h <<_ACEOF | |
9739 | #define HAVE_VFORK_H 1 | |
05ea2a05 | 9740 | _ACEOF |
5e030278 | 9741 | |
5e030278 TT |
9742 | fi |
9743 | ||
db6878ac | 9744 | done |
5e030278 | 9745 | |
db6878ac SM |
9746 | for ac_func in fork vfork |
9747 | do : | |
9748 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9749 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9750 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9751 | cat >>confdefs.h <<_ACEOF | |
9752 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9753 | _ACEOF | |
5e030278 | 9754 | |
db6878ac SM |
9755 | fi |
9756 | done | |
5e030278 | 9757 | |
db6878ac SM |
9758 | if test "x$ac_cv_func_fork" = xyes; then |
9759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
9760 | $as_echo_n "checking for working fork... " >&6; } | |
9761 | if ${ac_cv_func_fork_works+:} false; then : | |
05ea2a05 | 9762 | $as_echo_n "(cached) " >&6 |
db6878ac SM |
9763 | else |
9764 | if test "$cross_compiling" = yes; then : | |
9765 | ac_cv_func_fork_works=cross | |
05ea2a05 TT |
9766 | else |
9767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9768 | /* end confdefs.h. */ | |
db6878ac | 9769 | $ac_includes_default |
05ea2a05 TT |
9770 | int |
9771 | main () | |
9772 | { | |
db6878ac SM |
9773 | |
9774 | /* By Ruediger Kuhlmann. */ | |
9775 | return fork () < 0; | |
9776 | ||
05ea2a05 TT |
9777 | ; |
9778 | return 0; | |
9779 | } | |
9780 | _ACEOF | |
db6878ac SM |
9781 | if ac_fn_c_try_run "$LINENO"; then : |
9782 | ac_cv_func_fork_works=yes | |
05ea2a05 | 9783 | else |
db6878ac | 9784 | ac_cv_func_fork_works=no |
05ea2a05 | 9785 | fi |
db6878ac SM |
9786 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9787 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
05ea2a05 | 9788 | fi |
5e030278 | 9789 | |
db6878ac SM |
9790 | fi |
9791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
9792 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
5e030278 | 9793 | |
db6878ac SM |
9794 | else |
9795 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9796 | fi | |
9797 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9798 | case $host in | |
9799 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9800 | # Override, as these systems have only a dummy fork() stub | |
9801 | ac_cv_func_fork_works=no | |
9802 | ;; | |
9803 | *) | |
9804 | ac_cv_func_fork_works=yes | |
9805 | ;; | |
9806 | esac | |
9807 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
9808 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
9809 | fi | |
9810 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9811 | if test "x$ac_cv_func_vfork" = xyes; then | |
9812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
9813 | $as_echo_n "checking for working vfork... " >&6; } | |
9814 | if ${ac_cv_func_vfork_works+:} false; then : | |
5e030278 | 9815 | $as_echo_n "(cached) " >&6 |
db6878ac SM |
9816 | else |
9817 | if test "$cross_compiling" = yes; then : | |
9818 | ac_cv_func_vfork_works=cross | |
5e030278 TT |
9819 | else |
9820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9821 | /* end confdefs.h. */ | |
db6878ac SM |
9822 | /* Thanks to Paul Eggert for this test. */ |
9823 | $ac_includes_default | |
9824 | #include <sys/wait.h> | |
9825 | #ifdef HAVE_VFORK_H | |
9826 | # include <vfork.h> | |
9827 | #endif | |
9828 | /* On some sparc systems, changes by the child to local and incoming | |
9829 | argument registers are propagated back to the parent. The compiler | |
9830 | is told about this with #include <vfork.h>, but some compilers | |
9831 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9832 | static variable whose address is put into a register that is | |
9833 | clobbered by the vfork. */ | |
9834 | static void | |
9835 | #ifdef __cplusplus | |
9836 | sparc_address_test (int arg) | |
9837 | # else | |
9838 | sparc_address_test (arg) int arg; | |
9839 | #endif | |
9840 | { | |
9841 | static pid_t child; | |
9842 | if (!child) { | |
9843 | child = vfork (); | |
9844 | if (child < 0) { | |
9845 | perror ("vfork"); | |
9846 | _exit(2); | |
9847 | } | |
9848 | if (!child) { | |
9849 | arg = getpid(); | |
9850 | write(-1, "", 0); | |
9851 | _exit (arg); | |
9852 | } | |
9853 | } | |
9854 | } | |
05ea2a05 | 9855 | |
5e030278 TT |
9856 | int |
9857 | main () | |
9858 | { | |
db6878ac SM |
9859 | pid_t parent = getpid (); |
9860 | pid_t child; | |
9861 | ||
9862 | sparc_address_test (0); | |
9863 | ||
9864 | child = vfork (); | |
9865 | ||
9866 | if (child == 0) { | |
9867 | /* Here is another test for sparc vfork register problems. This | |
9868 | test uses lots of local variables, at least as many local | |
9869 | variables as main has allocated so far including compiler | |
9870 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
9871 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
9872 | reuse the register of parent for one of the local variables, | |
9873 | since it will think that parent can't possibly be used any more | |
9874 | in this routine. Assigning to the local variable will thus | |
9875 | munge parent in the parent process. */ | |
9876 | pid_t | |
9877 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
9878 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
9879 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
9880 | use the same hardware register for all 8 local variables. */ | |
9881 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
9882 | || p != p5 || p != p6 || p != p7) | |
9883 | _exit(1); | |
9884 | ||
9885 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
9886 | from child file descriptors. If the child closes a descriptor | |
9887 | before it execs or exits, this munges the parent's descriptor | |
9888 | as well. Test for this by closing stdout in the child. */ | |
9889 | _exit(close(fileno(stdout)) != 0); | |
9890 | } else { | |
9891 | int status; | |
9892 | struct stat st; | |
9893 | ||
9894 | while (wait(&status) != child) | |
9895 | ; | |
9896 | return ( | |
9897 | /* Was there some problem with vforking? */ | |
9898 | child < 0 | |
9899 | ||
9900 | /* Did the child fail? (This shouldn't happen.) */ | |
9901 | || status | |
9902 | ||
9903 | /* Did the vfork/compiler bug occur? */ | |
9904 | || parent != getpid() | |
9905 | ||
9906 | /* Did the file descriptor bug occur? */ | |
9907 | || fstat(fileno(stdout), &st) != 0 | |
9908 | ); | |
9909 | } | |
5e030278 TT |
9910 | } |
9911 | _ACEOF | |
db6878ac SM |
9912 | if ac_fn_c_try_run "$LINENO"; then : |
9913 | ac_cv_func_vfork_works=yes | |
5e030278 | 9914 | else |
db6878ac | 9915 | ac_cv_func_vfork_works=no |
5e030278 | 9916 | fi |
db6878ac SM |
9917 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9918 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e030278 | 9919 | fi |
5e030278 | 9920 | |
db6878ac SM |
9921 | fi |
9922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
9923 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
5e030278 | 9924 | |
db6878ac SM |
9925 | fi; |
9926 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9927 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9928 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
9929 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
9930 | fi | |
5e030278 | 9931 | |
db6878ac | 9932 | if test "x$ac_cv_func_vfork_works" = xyes; then |
5e030278 | 9933 | |
db6878ac | 9934 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
e9bcb658 | 9935 | |
e9bcb658 | 9936 | else |
db6878ac SM |
9937 | |
9938 | $as_echo "#define vfork fork" >>confdefs.h | |
05ea2a05 | 9939 | |
e9bcb658 | 9940 | fi |
db6878ac | 9941 | if test "x$ac_cv_func_fork_works" = xyes; then |
e9bcb658 | 9942 | |
db6878ac | 9943 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
05ea2a05 | 9944 | |
db6878ac | 9945 | fi |
05ea2a05 | 9946 | |
db6878ac SM |
9947 | for ac_func in pread pwrite pread64 |
9948 | do : | |
9949 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9950 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9951 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9952 | cat >>confdefs.h <<_ACEOF | |
9953 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9954 | _ACEOF | |
e9bcb658 | 9955 | |
db6878ac SM |
9956 | fi |
9957 | done | |
e9bcb658 | 9958 | |
3266f10b | 9959 | |
eb7aa561 PA |
9960 | # Check the return and argument types of ptrace. |
9961 | ||
9962 | ||
9963 | for ac_header in sys/ptrace.h ptrace.h | |
9964 | do : | |
9965 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9966 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 9967 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
eb7aa561 PA |
9968 | cat >>confdefs.h <<_ACEOF |
9969 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9970 | _ACEOF | |
9971 | ||
9972 | fi | |
9973 | ||
9974 | done | |
9975 | ||
9976 | ||
9977 | gdb_ptrace_headers=' | |
9978 | #include <sys/types.h> | |
9979 | #if HAVE_SYS_PTRACE_H | |
9980 | # include <sys/ptrace.h> | |
9981 | #endif | |
9982 | #if HAVE_UNISTD_H | |
9983 | # include <unistd.h> | |
9984 | #endif | |
9985 | ' | |
eb7aa561 PA |
9986 | |
9987 | # Check return type. Varargs (used on GNU/Linux) conflict with the | |
9988 | # empty argument list, so check for that explicitly. | |
9989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
9990 | $as_echo_n "checking return type of ptrace... " >&6; } | |
d0ac1c44 | 9991 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
eb7aa561 PA |
9992 | $as_echo_n "(cached) " >&6 |
9993 | else | |
9994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9995 | /* end confdefs.h. */ | |
5164c117 | 9996 | Â $gdb_ptrace_headers |
eb7aa561 PA |
9997 | int |
9998 | main () | |
9999 | { | |
10000 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 10001 | |
eb7aa561 PA |
10002 | ; |
10003 | return 0; | |
10004 | } | |
10005 | _ACEOF | |
9b30624b | 10006 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
10007 | gdb_cv_func_ptrace_ret='long' |
10008 | else | |
10009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10010 | /* end confdefs.h. */ | |
10011 | $gdb_ptrace_headers | |
10012 | int | |
10013 | main () | |
10014 | { | |
10015 | extern int ptrace (); | |
5164c117 | 10016 | |
eb7aa561 PA |
10017 | ; |
10018 | return 0; | |
10019 | } | |
10020 | _ACEOF | |
9b30624b | 10021 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
10022 | gdb_cv_func_ptrace_ret='int' |
10023 | else | |
10024 | gdb_cv_func_ptrace_ret='long' | |
b6fb30ed | 10025 | |
eb7aa561 PA |
10026 | fi |
10027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 10028 | |
eb7aa561 PA |
10029 | fi |
10030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 10031 | |
eb7aa561 PA |
10032 | fi |
10033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 | |
10034 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
10035 | ||
b6fb30ed | 10036 | |
eb7aa561 PA |
10037 | cat >>confdefs.h <<_ACEOF |
10038 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
10039 | _ACEOF | |
10040 | ||
b6fb30ed | 10041 | |
eb7aa561 PA |
10042 | # Check argument types. |
10043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
10044 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
d0ac1c44 | 10045 | if ${gdb_cv_func_ptrace_args+:} false; then : |
eb7aa561 PA |
10046 | $as_echo_n "(cached) " >&6 |
10047 | else | |
eb7aa561 PA |
10048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10049 | /* end confdefs.h. */ | |
10050 | $gdb_ptrace_headers | |
10051 | int | |
10052 | main () | |
10053 | { | |
10054 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 10055 | |
eb7aa561 PA |
10056 | ; |
10057 | return 0; | |
10058 | } | |
10059 | _ACEOF | |
9b30624b | 10060 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 10061 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
eb7aa561 | 10062 | else |
b6fb30ed SM |
10063 | for gdb_arg1 in 'int' 'long'; do |
10064 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
10065 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
10066 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
10067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
eb7aa561 PA |
10068 | /* end confdefs.h. */ |
10069 | $gdb_ptrace_headers | |
10070 | int | |
10071 | main () | |
10072 | { | |
b6fb30ed | 10073 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 10074 | |
eb7aa561 PA |
10075 | ; |
10076 | return 0; | |
10077 | } | |
10078 | _ACEOF | |
9b30624b | 10079 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 | 10080 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
b6fb30ed SM |
10081 | break 4; |
10082 | ||
eb7aa561 PA |
10083 | fi |
10084 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
10085 | |
10086 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
10087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
eb7aa561 PA |
10088 | /* end confdefs.h. */ |
10089 | $gdb_ptrace_headers | |
10090 | int | |
10091 | main () | |
10092 | { | |
b6fb30ed | 10093 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 10094 | |
eb7aa561 PA |
10095 | ; |
10096 | return 0; | |
10097 | } | |
10098 | _ACEOF | |
9b30624b | 10099 | if ac_fn_c_try_compile "$LINENO"; then : |
b6fb30ed SM |
10100 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
10101 | break 5; | |
eb7aa561 | 10102 | |
eb7aa561 PA |
10103 | fi |
10104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
10105 | done |
10106 | done | |
10107 | done | |
10108 | done | |
10109 | done | |
10110 | # Provide a safe default value. | |
10111 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
eb7aa561 PA |
10112 | |
10113 | fi | |
10114 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed | 10115 | |
eb7aa561 PA |
10116 | fi |
10117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
10118 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 10119 | |
eb7aa561 PA |
10120 | ac_save_IFS=$IFS; IFS=',' |
10121 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10122 | IFS=$ac_save_IFS | |
10123 | shift | |
10124 | ||
54019719 PA |
10125 | cat >>confdefs.h <<_ACEOF |
10126 | #define PTRACE_TYPE_ARG1 $1 | |
10127 | _ACEOF | |
10128 | ||
10129 | ||
eb7aa561 PA |
10130 | cat >>confdefs.h <<_ACEOF |
10131 | #define PTRACE_TYPE_ARG3 $3 | |
10132 | _ACEOF | |
10133 | ||
10134 | ||
10135 | cat >>confdefs.h <<_ACEOF | |
10136 | #define PTRACE_TYPE_ARG4 $4 | |
10137 | _ACEOF | |
10138 | ||
10139 | if test -n "$5"; then | |
10140 | ||
10141 | cat >>confdefs.h <<_ACEOF | |
10142 | #define PTRACE_TYPE_ARG5 $5 | |
10143 | _ACEOF | |
10144 | ||
10145 | fi | |
10146 | ||
10147 | ||
0fb4aa4b PA |
10148 | # Check for UST |
10149 | ustlibs="" | |
10150 | ustinc="" | |
10151 | ||
10152 | ||
10153 | # Check whether --with-ust was given. | |
10154 | if test "${with_ust+set}" = set; then : | |
10155 | withval=$with_ust; | |
10156 | fi | |
10157 | ||
10158 | ||
10159 | # Check whether --with-ust_include was given. | |
10160 | if test "${with_ust_include+set}" = set; then : | |
10161 | withval=$with_ust_include; | |
10162 | fi | |
10163 | ||
10164 | ||
10165 | # Check whether --with-ust_lib was given. | |
10166 | if test "${with_ust_lib+set}" = set; then : | |
10167 | withval=$with_ust_lib; | |
10168 | fi | |
10169 | ||
10170 | ||
10171 | case $with_ust in | |
10172 | no) | |
10173 | ustlibs= | |
10174 | ustinc= | |
10175 | ;; | |
10176 | "" | yes) | |
10177 | ustlibs=" -lust " | |
10178 | ustinc="" | |
10179 | ;; | |
10180 | *) | |
10181 | ustlibs="-L$with_ust/lib -lust" | |
10182 | ustinc="-I$with_ust/include " | |
10183 | ;; | |
10184 | esac | |
10185 | if test "x$with_ust_include" != x; then | |
10186 | ustinc="-I$with_ust_include " | |
10187 | fi | |
10188 | if test "x$with_ust_lib" != x; then | |
10189 | ustlibs="-L$with_ust_lib -lust" | |
10190 | fi | |
10191 | ||
10192 | if test "x$with_ust" != "xno"; then | |
10193 | saved_CFLAGS="$CFLAGS" | |
10194 | CFLAGS="$CFLAGS $ustinc" | |
10195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5 | |
10196 | $as_echo_n "checking for ust... " >&6; } | |
10197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10198 | /* end confdefs.h. */ | |
10199 | ||
10200 | #define CONFIG_UST_GDB_INTEGRATION | |
10201 | #include <ust/ust.h> | |
10202 | ||
10203 | int | |
10204 | main () | |
10205 | { | |
10206 | ||
7e8c7130 | 10207 | |
0fb4aa4b PA |
10208 | ; |
10209 | return 0; | |
10210 | } | |
10211 | _ACEOF | |
10212 | if ac_fn_c_try_compile "$LINENO"; then : | |
10213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10214 | $as_echo "yes" >&6; }; | |
7e8c7130 | 10215 | |
0fb4aa4b PA |
10216 | $as_echo "#define HAVE_UST 1" >>confdefs.h |
10217 | ||
10218 | else | |
10219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7e8c7130 SM |
10220 | $as_echo "no" >&6; } |
10221 | ustlibs= ; ustinc= | |
10222 | ||
0fb4aa4b PA |
10223 | fi |
10224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10225 | CFLAGS="$saved_CFLAGS" | |
10226 | fi | |
10227 | ||
10228 | # Flags needed for UST | |
10229 | ||
10230 | ||
10231 | ||
8f13a3ce | 10232 | |
4b74833d AB |
10233 | |
10234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5 | |
10235 | $as_echo_n "checking the compiler type... " >&6; } | |
10236 | if ${gdb_cv_compiler_type+:} false; then : | |
10237 | $as_echo_n "(cached) " >&6 | |
10238 | else | |
10239 | gdb_cv_compiler_type=unknown | |
10240 | if test "$gdb_cv_compiler_type" = unknown; then | |
10241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10242 | /* end confdefs.h. */ | |
10243 | ||
10244 | int | |
10245 | main () | |
10246 | { | |
10247 | ||
10248 | #if !defined __GNUC__ || defined __clang__ | |
10249 | #error not gcc | |
10250 | #endif | |
10251 | ||
10252 | ; | |
10253 | return 0; | |
10254 | } | |
10255 | _ACEOF | |
10256 | if ac_fn_c_try_compile "$LINENO"; then : | |
10257 | gdb_cv_compiler_type=gcc | |
10258 | fi | |
10259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10260 | fi | |
10261 | ||
10262 | if test "$gdb_cv_compiler_type" = unknown; then | |
10263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10264 | /* end confdefs.h. */ | |
10265 | ||
10266 | int | |
10267 | main () | |
10268 | { | |
10269 | ||
10270 | #ifndef __clang__ | |
10271 | #error not clang | |
10272 | #endif | |
10273 | ||
10274 | ; | |
10275 | return 0; | |
10276 | } | |
10277 | _ACEOF | |
10278 | if ac_fn_c_try_compile "$LINENO"; then : | |
10279 | gdb_cv_compiler_type=clang | |
10280 | fi | |
10281 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10282 | fi | |
10283 | ||
10284 | fi | |
10285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5 | |
10286 | $as_echo "$gdb_cv_compiler_type" >&6; } | |
10287 | ||
10288 | GDB_COMPILER_TYPE="$gdb_cv_compiler_type" | |
10289 | ||
10290 | ||
d4596a3d PA |
10291 | # Check whether --enable-werror was given. |
10292 | if test "${enable_werror+set}" = set; then : | |
10293 | enableval=$enable_werror; case "${enableval}" in | |
10294 | yes | y) ERROR_ON_WARNING="yes" ;; | |
10295 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 10296 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
d4596a3d PA |
10297 | esac |
10298 | fi | |
10299 | ||
10300 | ||
9a084706 | 10301 | # Enable -Werror by default when using gcc. Turn it off for releases. |
8f13a3ce | 10302 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
d4596a3d PA |
10303 | ERROR_ON_WARNING=yes |
10304 | fi | |
10305 | ||
10306 | WERROR_CFLAGS="" | |
10307 | if test "${ERROR_ON_WARNING}" = yes ; then | |
10308 | WERROR_CFLAGS="-Werror" | |
10309 | fi | |
10310 | ||
cf6de44d | 10311 | # The options we'll try to enable. |
aac331e4 | 10312 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 10313 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
8f13a3ce | 10314 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 10315 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 10316 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
458412c3 | 10317 | -Wno-mismatched-tags \ |
632e107b | 10318 | -Wno-error=deprecated-register \ |
85e26832 | 10319 | -Wsuggest-override \ |
1a34f210 | 10320 | -Wimplicit-fallthrough=3 \ |
96643e35 | 10321 | -Wduplicated-cond \ |
33a6bc35 TT |
10322 | -Wshadow=local \ |
10323 | -Wdeprecated-copy \ | |
10324 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 10325 | -Wredundant-move \ |
8ddd8e0e | 10326 | -Wmissing-declarations \ |
898e7f60 SM |
10327 | -Wstrict-null-sentinel \ |
10328 | " | |
8f13a3ce | 10329 | |
4b74833d AB |
10330 | # The -Wmissing-prototypes flag will be accepted by GCC, but results |
10331 | # in a warning being printed about the flag not being valid for C++, | |
10332 | # this is something to do with using ccache, and argument ordering. | |
10333 | if test "$GDB_COMPILER_TYPE" != gcc; then | |
10334 | build_warnings="$build_warnings -Wmissing-prototypes" | |
10335 | fi | |
10336 | ||
8f13a3ce | 10337 | case "${host}" in |
5bfda255 YQ |
10338 | *-*-mingw32*) |
10339 | # Enable -Wno-format by default when using gcc on mingw since many | |
10340 | # GCC versions complain about %I64. | |
10341 | build_warnings="$build_warnings -Wno-format" ;; | |
10342 | *-*-solaris*) | |
10343 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
10344 | # doesn't understand. | |
10345 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
10346 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
10347 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
10348 | *) |
10349 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
10350 | # but there's a special case for this below. | |
10351 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
8f13a3ce MF |
10352 | esac |
10353 | ||
10354 | # Check whether --enable-build-warnings was given. | |
10355 | if test "${enable_build_warnings+set}" = set; then : | |
10356 | enableval=$enable_build_warnings; case "${enableval}" in | |
10357 | yes) ;; | |
10358 | no) build_warnings="-w";; | |
10359 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10360 | build_warnings="${build_warnings} ${t}";; | |
10361 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10362 | build_warnings="${t} ${build_warnings}";; | |
10363 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
10364 | esac | |
10365 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
10366 | echo "Setting compiler warning flags = $build_warnings" 6>&1 | |
10367 | fi | |
10368 | fi | |
10369 | # Check whether --enable-gdb-build-warnings was given. | |
10370 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
10371 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
10372 | yes) ;; | |
10373 | no) build_warnings="-w";; | |
10374 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10375 | build_warnings="${build_warnings} ${t}";; | |
10376 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
10377 | build_warnings="${t} ${build_warnings}";; | |
10378 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
10379 | esac | |
10380 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
10381 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
10382 | fi | |
3bc3d82a PA |
10383 | fi |
10384 | ||
10385 | # The set of warnings supported by a C++ compiler is not the same as | |
10386 | # of the C compiler. | |
cf6de44d | 10387 | ac_ext=cpp |
3bc3d82a PA |
10388 | ac_cpp='$CXXCPP $CPPFLAGS' |
10389 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
10390 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
10391 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
10392 | ||
3bc3d82a | 10393 | |
d4596a3d | 10394 | WARN_CFLAGS="" |
8f13a3ce | 10395 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
d4596a3d PA |
10396 | then |
10397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 | |
10398 | $as_echo_n "checking compiler warning flags... " >&6; } | |
10399 | # Separate out the -Werror flag as some files just cannot be | |
10400 | # compiled with it enabled. | |
10401 | for w in ${build_warnings}; do | |
7544db95 PA |
10402 | # GCC does not complain about -Wno-unknown-warning. Invert |
10403 | # and test -Wunknown-warning instead. | |
10404 | case $w in | |
10405 | -Wno-*) | |
10406 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
10407 | -Wformat-nonliteral) |
10408 | # gcc requires -Wformat before -Wformat-nonliteral | |
10409 | # will work, so stick them together. | |
10410 | w="-Wformat $w" | |
10411 | wtest="$w" | |
10412 | ;; | |
7544db95 PA |
10413 | *) |
10414 | wtest=$w ;; | |
10415 | esac | |
10416 | ||
d4596a3d PA |
10417 | case $w in |
10418 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
10419 | *) |
10420 | # Check whether GCC accepts it. | |
d4596a3d | 10421 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 10422 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 10423 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 10424 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
10425 | if test "x$w" = "x-Wunused-variable"; then |
10426 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
10427 | # fixed in GCC 4.9. This test is derived from the gdb | |
10428 | # source code that triggered this bug in GCC. | |
10429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10430 | /* end confdefs.h. */ | |
10431 | struct scoped_restore_base {}; | |
864ca435 SM |
10432 | struct scoped_restore_tmpl : public scoped_restore_base { |
10433 | ~scoped_restore_tmpl() {} | |
10434 | }; | |
a0de763e TT |
10435 | int |
10436 | main () | |
10437 | { | |
10438 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 10439 | |
a0de763e TT |
10440 | ; |
10441 | return 0; | |
10442 | } | |
10443 | _ACEOF | |
10444 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
10445 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
10446 | fi | |
10447 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10448 | else | |
10449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d4596a3d PA |
10450 | /* end confdefs.h. */ |
10451 | ||
10452 | int | |
10453 | main () | |
10454 | { | |
10455 | ||
10456 | ; | |
10457 | return 0; | |
10458 | } | |
10459 | _ACEOF | |
3bc3d82a | 10460 | if ac_fn_cxx_try_compile "$LINENO"; then : |
d4596a3d PA |
10461 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
10462 | fi | |
10463 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a0de763e | 10464 | fi |
d4596a3d | 10465 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 10466 | CXXFLAGS="$saved_CXXFLAGS" |
d4596a3d PA |
10467 | esac |
10468 | done | |
10469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 | |
10470 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
10471 | fi | |
10472 | ||
10473 | ||
10474 | ||
cf6de44d | 10475 | ac_ext=c |
3bc3d82a PA |
10476 | ac_cpp='$CPP $CPPFLAGS' |
10477 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
10478 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
10479 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
10480 | ||
3bc3d82a | 10481 | |
8f13a3ce | 10482 | |
10e86dd7 DE |
10483 | old_LIBS="$LIBS" |
10484 | LIBS="$LIBS -ldl" | |
10485 | for ac_func in dladdr | |
10486 | do : | |
10487 | ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr" | |
d0ac1c44 | 10488 | if test "x$ac_cv_func_dladdr" = xyes; then : |
10e86dd7 DE |
10489 | cat >>confdefs.h <<_ACEOF |
10490 | #define HAVE_DLADDR 1 | |
10491 | _ACEOF | |
10492 | ||
10493 | fi | |
10494 | done | |
10495 | ||
10496 | LIBS="$old_LIBS" | |
10497 | ||
07697489 PA |
10498 | |
10499 | # Check for presence and size of long long. | |
10500 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
d0ac1c44 | 10501 | if test "x$ac_cv_type_long_long" = xyes; then : |
07697489 PA |
10502 | |
10503 | cat >>confdefs.h <<_ACEOF | |
10504 | #define HAVE_LONG_LONG 1 | |
10505 | _ACEOF | |
10506 | ||
10507 | # The cast to long int works around a bug in the HP C Compiler | |
10508 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
10509 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
10510 | # This bug is HP SR number 8606223364. | |
10511 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
10512 | $as_echo_n "checking size of long long... " >&6; } | |
d0ac1c44 | 10513 | if ${ac_cv_sizeof_long_long+:} false; then : |
07697489 PA |
10514 | $as_echo_n "(cached) " >&6 |
10515 | else | |
10516 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
10517 | ||
10518 | else | |
10519 | if test "$ac_cv_type_long_long" = yes; then | |
10520 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10521 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
10522 | as_fn_error 77 "cannot compute sizeof (long long) |
10523 | See \`config.log' for more details" "$LINENO" 5; } | |
07697489 PA |
10524 | else |
10525 | ac_cv_sizeof_long_long=0 | |
10526 | fi | |
10527 | fi | |
10528 | ||
10529 | fi | |
10530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
10531 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
10532 | ||
10533 | ||
10534 | ||
10535 | cat >>confdefs.h <<_ACEOF | |
10536 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
10537 | _ACEOF | |
10538 | ||
10539 | ||
10540 | fi | |
10541 | ||
10542 | ||
d0ac1c44 SM |
10543 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
10544 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
10545 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
07697489 PA |
10546 | ac_have_decl=1 |
10547 | else | |
10548 | ac_have_decl=0 | |
10549 | fi | |
10550 | ||
10551 | cat >>confdefs.h <<_ACEOF | |
10552 | #define HAVE_DECL_BASENAME $ac_have_decl | |
10553 | _ACEOF | |
10554 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
d0ac1c44 | 10555 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
07697489 PA |
10556 | ac_have_decl=1 |
10557 | else | |
10558 | ac_have_decl=0 | |
10559 | fi | |
10560 | ||
10561 | cat >>confdefs.h <<_ACEOF | |
10562 | #define HAVE_DECL_FFS $ac_have_decl | |
10563 | _ACEOF | |
10564 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
d0ac1c44 | 10565 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
07697489 PA |
10566 | ac_have_decl=1 |
10567 | else | |
10568 | ac_have_decl=0 | |
10569 | fi | |
10570 | ||
10571 | cat >>confdefs.h <<_ACEOF | |
10572 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
10573 | _ACEOF | |
10574 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
d0ac1c44 | 10575 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
07697489 PA |
10576 | ac_have_decl=1 |
10577 | else | |
10578 | ac_have_decl=0 | |
10579 | fi | |
10580 | ||
10581 | cat >>confdefs.h <<_ACEOF | |
10582 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10583 | _ACEOF | |
10584 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
d0ac1c44 | 10585 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
07697489 PA |
10586 | ac_have_decl=1 |
10587 | else | |
10588 | ac_have_decl=0 | |
10589 | fi | |
10590 | ||
10591 | cat >>confdefs.h <<_ACEOF | |
10592 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
10593 | _ACEOF | |
10594 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 10595 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
07697489 PA |
10596 | ac_have_decl=1 |
10597 | else | |
10598 | ac_have_decl=0 | |
10599 | fi | |
10600 | ||
10601 | cat >>confdefs.h <<_ACEOF | |
10602 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10603 | _ACEOF | |
10604 | ||
10605 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
d0ac1c44 | 10606 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
07697489 PA |
10607 | ac_have_decl=1 |
10608 | else | |
10609 | ac_have_decl=0 | |
10610 | fi | |
10611 | ||
10612 | cat >>confdefs.h <<_ACEOF | |
10613 | #define HAVE_DECL_STRTOL $ac_have_decl | |
10614 | _ACEOF | |
10615 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
d0ac1c44 | 10616 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
07697489 PA |
10617 | ac_have_decl=1 |
10618 | else | |
10619 | ac_have_decl=0 | |
10620 | fi | |
10621 | ||
10622 | cat >>confdefs.h <<_ACEOF | |
10623 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
10624 | _ACEOF | |
10625 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
d0ac1c44 | 10626 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
07697489 PA |
10627 | ac_have_decl=1 |
10628 | else | |
10629 | ac_have_decl=0 | |
10630 | fi | |
10631 | ||
10632 | cat >>confdefs.h <<_ACEOF | |
10633 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
10634 | _ACEOF | |
10635 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
d0ac1c44 | 10636 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
07697489 PA |
10637 | ac_have_decl=1 |
10638 | else | |
10639 | ac_have_decl=0 | |
10640 | fi | |
10641 | ||
10642 | cat >>confdefs.h <<_ACEOF | |
10643 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
10644 | _ACEOF | |
10645 | ||
10646 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
d0ac1c44 | 10647 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
07697489 PA |
10648 | ac_have_decl=1 |
10649 | else | |
10650 | ac_have_decl=0 | |
10651 | fi | |
10652 | ||
10653 | cat >>confdefs.h <<_ACEOF | |
10654 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
10655 | _ACEOF | |
10656 | ||
10657 | ||
10658 | ||
81ecdfbb | 10659 | ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default" |
d0ac1c44 | 10660 | if test "x$ac_cv_have_decl_perror" = xyes; then : |
81ecdfbb RW |
10661 | ac_have_decl=1 |
10662 | else | |
10663 | ac_have_decl=0 | |
f450004a | 10664 | fi |
81ecdfbb RW |
10665 | |
10666 | cat >>confdefs.h <<_ACEOF | |
10667 | #define HAVE_DECL_PERROR $ac_have_decl | |
10668 | _ACEOF | |
bb0116a4 | 10669 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
d0ac1c44 | 10670 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
bb0116a4 JB |
10671 | ac_have_decl=1 |
10672 | else | |
10673 | ac_have_decl=0 | |
10674 | fi | |
10675 | ||
10676 | cat >>confdefs.h <<_ACEOF | |
10677 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10678 | _ACEOF | |
10679 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 10680 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
bb0116a4 JB |
10681 | ac_have_decl=1 |
10682 | else | |
10683 | ac_have_decl=0 | |
10684 | fi | |
10685 | ||
10686 | cat >>confdefs.h <<_ACEOF | |
10687 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10688 | _ACEOF | |
81ecdfbb RW |
10689 | |
10690 | ||
10691 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
10692 | #if HAVE_SYS_SOCKET_H |
10693 | # include <sys/socket.h> | |
10694 | #elif HAVE_WS2TCPIP_H | |
10695 | # include <ws2tcpip.h> | |
10696 | #endif | |
81ecdfbb RW |
10697 | |
10698 | " | |
d0ac1c44 | 10699 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
f450004a | 10700 | |
ccbd4912 | 10701 | cat >>confdefs.h <<_ACEOF |
f450004a DJ |
10702 | #define HAVE_SOCKLEN_T 1 |
10703 | _ACEOF | |
10704 | ||
f450004a | 10705 | |
ccbd4912 | 10706 | fi |
f450004a | 10707 | |
fb1e4ffc | 10708 | |
64da5dd5 JB |
10709 | case "${target}" in |
10710 | *-android*) | |
10711 | # Starting with NDK version 9, <elf.h> actually includes definitions | |
10712 | # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes | |
10713 | # <sys/exec_elf.h> which defines some of the ELF types incorrectly, | |
10714 | # leading to conflicts with the defintions from <linux/elf.h>. | |
10715 | # This makes it impossible for us to include both <elf.h> and | |
10716 | # <linux/elf.h>, which means that, in practice, we do not have | |
10717 | # access to Elf32_auxv_t and Elf64_auxv_t on this platform. | |
10718 | # Therefore, do not try to auto-detect availability, as it would | |
10719 | # get it wrong on this platform. | |
10720 | ;; | |
10721 | *) | |
10722 | ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> | |
8365dcf5 TJB |
10723 | |
10724 | " | |
d0ac1c44 | 10725 | if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then : |
8365dcf5 TJB |
10726 | |
10727 | cat >>confdefs.h <<_ACEOF | |
10728 | #define HAVE_ELF32_AUXV_T 1 | |
10729 | _ACEOF | |
10730 | ||
10731 | ||
10732 | fi | |
10733 | ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h> | |
10734 | ||
10735 | " | |
d0ac1c44 | 10736 | if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then : |
8365dcf5 TJB |
10737 | |
10738 | cat >>confdefs.h <<_ACEOF | |
10739 | #define HAVE_ELF64_AUXV_T 1 | |
10740 | _ACEOF | |
10741 | ||
10742 | ||
10743 | fi | |
10744 | ||
64da5dd5 | 10745 | esac |
8365dcf5 | 10746 | |
c16158bc JM |
10747 | |
10748 | ||
81ecdfbb RW |
10749 | # Check whether --with-pkgversion was given. |
10750 | if test "${with_pkgversion+set}" = set; then : | |
10751 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 10752 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
10753 | no) PKGVERSION= ;; |
10754 | *) PKGVERSION="($withval) " ;; | |
10755 | esac | |
10756 | else | |
10757 | PKGVERSION="(GDB) " | |
10758 | ||
81ecdfbb RW |
10759 | fi |
10760 | ||
c16158bc JM |
10761 | |
10762 | ||
10763 | ||
10764 | ||
81ecdfbb RW |
10765 | # Check whether --with-bugurl was given. |
10766 | if test "${with_bugurl+set}" = set; then : | |
10767 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 10768 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
10769 | no) BUGURL= |
10770 | ;; | |
10771 | *) BUGURL="$withval" | |
10772 | ;; | |
10773 | esac | |
10774 | else | |
10775 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
10776 | ||
81ecdfbb RW |
10777 | fi |
10778 | ||
c16158bc JM |
10779 | case ${BUGURL} in |
10780 | "") | |
10781 | REPORT_BUGS_TO= | |
10782 | REPORT_BUGS_TEXI= | |
10783 | ;; | |
10784 | *) | |
10785 | REPORT_BUGS_TO="<$BUGURL>" | |
10786 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
10787 | ;; | |
10788 | esac; | |
10789 | ||
10790 | ||
10791 | ||
10792 | ||
10793 | cat >>confdefs.h <<_ACEOF | |
10794 | #define PKGVERSION "$PKGVERSION" | |
10795 | _ACEOF | |
10796 | ||
10797 | ||
10798 | cat >>confdefs.h <<_ACEOF | |
10799 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
10800 | _ACEOF | |
10801 | ||
10802 | ||
8838b45e NS |
10803 | # Check for various supplementary target information (beyond the |
10804 | # triplet) which might affect the choices in configure.srv. | |
10805 | case "${target}" in | |
10806 | i[34567]86-*-linux*) | |
10807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5 | |
10808 | $as_echo_n "checking if building for x86-64... " >&6; } | |
d0ac1c44 | 10809 | if ${gdb_cv_i386_is_x86_64+:} false; then : |
8838b45e NS |
10810 | $as_echo_n "(cached) " >&6 |
10811 | else | |
10812 | save_CPPFLAGS="$CPPFLAGS" | |
10813 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10815 | /* end confdefs.h. */ | |
10816 | ||
10817 | #if __x86_64__ | |
10818 | got it | |
10819 | #endif | |
10820 | ||
10821 | _ACEOF | |
10822 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10823 | $EGREP "got it" >/dev/null 2>&1; then : | |
10824 | gdb_cv_i386_is_x86_64=yes | |
10825 | else | |
10826 | gdb_cv_i386_is_x86_64=no | |
10827 | fi | |
10828 | rm -f conftest* | |
10829 | ||
10830 | CPPFLAGS="$save_CPPFLAGS" | |
10831 | fi | |
10832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5 | |
10833 | $as_echo "$gdb_cv_i386_is_x86_64" >&6; } | |
10834 | ;; | |
201506da PA |
10835 | |
10836 | x86_64-*-linux*) | |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5 | |
10838 | $as_echo_n "checking if building for x32... " >&6; } | |
d0ac1c44 | 10839 | if ${gdb_cv_x86_is_x32+:} false; then : |
201506da PA |
10840 | $as_echo_n "(cached) " >&6 |
10841 | else | |
10842 | save_CPPFLAGS="$CPPFLAGS" | |
10843 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10845 | /* end confdefs.h. */ | |
10846 | ||
10847 | #if __x86_64__ && __ILP32__ | |
10848 | got it | |
10849 | #endif | |
10850 | ||
10851 | _ACEOF | |
10852 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10853 | $EGREP "got it" >/dev/null 2>&1; then : | |
10854 | gdb_cv_x86_is_x32=yes | |
10855 | else | |
10856 | gdb_cv_x86_is_x32=no | |
10857 | fi | |
10858 | rm -f conftest* | |
10859 | ||
10860 | CPPFLAGS="$save_CPPFLAGS" | |
10861 | fi | |
10862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5 | |
10863 | $as_echo "$gdb_cv_x86_is_x32" >&6; } | |
10864 | ;; | |
10865 | ||
9ac544ce MK |
10866 | m68k-*-*) |
10867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5 | |
10868 | $as_echo_n "checking if building for Coldfire... " >&6; } | |
d0ac1c44 | 10869 | if ${gdb_cv_m68k_is_coldfire+:} false; then : |
9ac544ce MK |
10870 | $as_echo_n "(cached) " >&6 |
10871 | else | |
10872 | save_CPPFLAGS="$CPPFLAGS" | |
10873 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10875 | /* end confdefs.h. */ | |
10876 | ||
10877 | #ifdef __mcoldfire__ | |
10878 | got it | |
10879 | #endif | |
10880 | ||
10881 | _ACEOF | |
10882 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10883 | $EGREP "got it" >/dev/null 2>&1; then : | |
10884 | gdb_cv_m68k_is_coldfire=yes | |
10885 | else | |
10886 | gdb_cv_m68k_is_coldfire=no | |
10887 | fi | |
10888 | rm -f conftest* | |
10889 | ||
10890 | CPPFLAGS="$save_CPPFLAGS" | |
10891 | fi | |
10892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5 | |
10893 | $as_echo "$gdb_cv_m68k_is_coldfire" >&6; } | |
10894 | ;; | |
8838b45e NS |
10895 | esac |
10896 | ||
7ea81414 | 10897 | . ${srcdir}/configure.srv |
d6e9fb05 | 10898 | |
68070c10 PA |
10899 | if test "${srv_mingwce}" = "yes"; then |
10900 | LIBS="$LIBS -lws2" | |
10901 | elif test "${srv_mingw}" = "yes"; then | |
b2ceabe8 TT |
10902 | # WIN32APILIBS is set by GDB_AC_COMMON. |
10903 | LIBS="$LIBS $WIN32APILIBS" | |
68070c10 PA |
10904 | fi |
10905 | ||
58caa3dc | 10906 | if test "${srv_linux_usrregs}" = "yes"; then |
f450004a | 10907 | |
81ecdfbb | 10908 | $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h |
58caa3dc DJ |
10909 | |
10910 | fi | |
10911 | ||
10912 | if test "${srv_linux_regsets}" = "yes"; then | |
e9d25b98 | 10913 | |
81ecdfbb | 10914 | $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h |
e9d25b98 DJ |
10915 | |
10916 | ||
81ecdfbb RW |
10917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10918 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
d0ac1c44 | 10919 | if ${gdbsrv_cv_have_ptrace_getregs+:} false; then : |
81ecdfbb | 10920 | $as_echo_n "(cached) " >&6 |
bec39cab | 10921 | else |
81ecdfbb | 10922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10923 | /* end confdefs.h. */ |
58caa3dc | 10924 | #include <sys/ptrace.h> |
bec39cab AC |
10925 | int |
10926 | main () | |
10927 | { | |
58caa3dc | 10928 | PTRACE_GETREGS; |
bec39cab AC |
10929 | ; |
10930 | return 0; | |
10931 | } | |
10932 | _ACEOF | |
81ecdfbb | 10933 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10934 | gdbsrv_cv_have_ptrace_getregs=yes |
10935 | else | |
81ecdfbb | 10936 | gdbsrv_cv_have_ptrace_getregs=no |
7e8c7130 | 10937 | |
58caa3dc | 10938 | fi |
81ecdfbb | 10939 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7e8c7130 | 10940 | |
58caa3dc DJ |
10941 | fi |
10942 | ||
81ecdfbb RW |
10943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5 |
10944 | $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; } | |
58caa3dc | 10945 | if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then |
f450004a | 10946 | |
81ecdfbb | 10947 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
58caa3dc DJ |
10948 | |
10949 | fi | |
10950 | ||
81ecdfbb RW |
10951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10952 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
d0ac1c44 | 10953 | if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then : |
81ecdfbb | 10954 | $as_echo_n "(cached) " >&6 |
58caa3dc | 10955 | else |
81ecdfbb | 10956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10957 | /* end confdefs.h. */ |
58caa3dc | 10958 | #include <sys/ptrace.h> |
bec39cab AC |
10959 | int |
10960 | main () | |
10961 | { | |
58caa3dc | 10962 | PTRACE_GETFPXREGS; |
bec39cab AC |
10963 | ; |
10964 | return 0; | |
10965 | } | |
10966 | _ACEOF | |
81ecdfbb | 10967 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10968 | gdbsrv_cv_have_ptrace_getfpxregs=yes |
10969 | else | |
81ecdfbb | 10970 | gdbsrv_cv_have_ptrace_getfpxregs=no |
7e8c7130 | 10971 | |
58caa3dc | 10972 | fi |
81ecdfbb | 10973 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7e8c7130 | 10974 | |
58caa3dc DJ |
10975 | fi |
10976 | ||
81ecdfbb RW |
10977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5 |
10978 | $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; } | |
58caa3dc | 10979 | if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then |
f450004a | 10980 | |
81ecdfbb | 10981 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
58caa3dc DJ |
10982 | |
10983 | fi | |
10984 | fi | |
10985 | ||
9accd112 MM |
10986 | if test "${srv_linux_btrace}" = "yes"; then |
10987 | ||
10988 | $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h | |
10989 | ||
10990 | fi | |
10991 | ||
18f5fd81 TJB |
10992 | if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then |
10993 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5 | |
10994 | $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; } | |
19dd0ae5 | 10995 | if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then : |
18f5fd81 TJB |
10996 | $as_echo_n "(cached) " >&6 |
10997 | else | |
10998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10999 | /* end confdefs.h. */ | |
18f5fd81 TJB |
11000 | #include <thread_db.h> |
11001 | int | |
11002 | main () | |
11003 | { | |
11004 | lwpid_t avar | |
11005 | ; | |
11006 | return 0; | |
11007 | } | |
11008 | _ACEOF | |
11009 | if ac_fn_c_try_compile "$LINENO"; then : | |
11010 | gdbserver_cv_have_thread_db_type_lwpid_t=yes | |
11011 | else | |
11012 | gdbserver_cv_have_thread_db_type_lwpid_t=no | |
11013 | ||
11014 | fi | |
11015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19dd0ae5 | 11016 | |
18f5fd81 TJB |
11017 | fi |
11018 | ||
19dd0ae5 | 11019 | if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then |
18f5fd81 TJB |
11020 | |
11021 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h | |
11022 | ||
19dd0ae5 SM |
11023 | fi |
11024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5 | |
18f5fd81 TJB |
11025 | $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; } |
11026 | ||
11027 | fi | |
11028 | ||
11029 | if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then | |
11030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5 | |
11031 | $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; } | |
19dd0ae5 | 11032 | if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then : |
18f5fd81 TJB |
11033 | $as_echo_n "(cached) " >&6 |
11034 | else | |
11035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11036 | /* end confdefs.h. */ | |
18f5fd81 TJB |
11037 | #include <thread_db.h> |
11038 | int | |
11039 | main () | |
11040 | { | |
11041 | psaddr_t avar | |
11042 | ; | |
11043 | return 0; | |
11044 | } | |
11045 | _ACEOF | |
11046 | if ac_fn_c_try_compile "$LINENO"; then : | |
11047 | gdbserver_cv_have_thread_db_type_psaddr_t=yes | |
11048 | else | |
11049 | gdbserver_cv_have_thread_db_type_psaddr_t=no | |
11050 | ||
11051 | fi | |
11052 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19dd0ae5 | 11053 | |
18f5fd81 TJB |
11054 | fi |
11055 | ||
19dd0ae5 | 11056 | if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then |
18f5fd81 TJB |
11057 | |
11058 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h | |
11059 | ||
19dd0ae5 SM |
11060 | fi |
11061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5 | |
18f5fd81 TJB |
11062 | $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; } |
11063 | ||
11064 | fi | |
11065 | ||
193f13e6 MK |
11066 | old_LIBS="$LIBS" |
11067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
11068 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
d0ac1c44 | 11069 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
193f13e6 MK |
11070 | $as_echo_n "(cached) " >&6 |
11071 | else | |
11072 | ac_check_lib_save_LIBS=$LIBS | |
11073 | LIBS="-ldl $LIBS" | |
11074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11075 | /* end confdefs.h. */ | |
11076 | ||
11077 | /* Override any GCC internal prototype to avoid an error. | |
11078 | Use char because int might match the return type of a GCC | |
11079 | builtin and then its argument prototype would still apply. */ | |
11080 | #ifdef __cplusplus | |
11081 | extern "C" | |
11082 | #endif | |
11083 | char dlopen (); | |
11084 | int | |
11085 | main () | |
11086 | { | |
11087 | return dlopen (); | |
11088 | ; | |
11089 | return 0; | |
11090 | } | |
11091 | _ACEOF | |
11092 | if ac_fn_c_try_link "$LINENO"; then : | |
11093 | ac_cv_lib_dl_dlopen=yes | |
11094 | else | |
11095 | ac_cv_lib_dl_dlopen=no | |
11096 | fi | |
11097 | rm -f core conftest.err conftest.$ac_objext \ | |
11098 | conftest$ac_exeext conftest.$ac_ext | |
11099 | LIBS=$ac_check_lib_save_LIBS | |
11100 | fi | |
11101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 | |
11102 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
d0ac1c44 | 11103 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
193f13e6 MK |
11104 | cat >>confdefs.h <<_ACEOF |
11105 | #define HAVE_LIBDL 1 | |
11106 | _ACEOF | |
11107 | ||
11108 | LIBS="-ldl $LIBS" | |
11109 | ||
11110 | fi | |
11111 | ||
11112 | LIBS="$old_LIBS" | |
11113 | ||
0d62e5e8 DJ |
11114 | srv_thread_depfiles= |
11115 | srv_libs= | |
0d62e5e8 DJ |
11116 | |
11117 | if test "$srv_linux_thread_db" = "yes"; then | |
193f13e6 MK |
11118 | if test "$ac_cv_lib_dl_dlopen" = "yes"; then |
11119 | srv_libs="-ldl" | |
f6528abd JK |
11120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
11121 | $as_echo_n "checking for the dynamic export flag... " >&6; } | |
193f13e6 | 11122 | old_LDFLAGS="$LDFLAGS" |
f6528abd JK |
11123 | # Older GNU ld supports --export-dynamic but --dynamic-list may not be |
11124 | # supported there. | |
11125 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11126 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
193f13e6 | 11127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11128 | /* end confdefs.h. */ |
11129 | ||
11130 | int | |
11131 | main () | |
11132 | { | |
11133 | ||
11134 | ; | |
11135 | return 0; | |
11136 | } | |
11137 | _ACEOF | |
81ecdfbb | 11138 | if ac_fn_c_try_link "$LINENO"; then : |
f6528abd | 11139 | found="-Wl,--dynamic-list" |
7e8c7130 | 11140 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' |
f6de3c42 | 11141 | else |
f6528abd | 11142 | RDYNAMIC="-rdynamic" |
7e8c7130 SM |
11143 | LDFLAGS="$old_LDFLAGS $RDYNAMIC" |
11144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11145 | /* end confdefs.h. */ |
11146 | ||
11147 | int | |
11148 | main () | |
11149 | { | |
11150 | ||
11151 | ; | |
11152 | return 0; | |
11153 | } | |
11154 | _ACEOF | |
11155 | if ac_fn_c_try_link "$LINENO"; then : | |
11156 | found="-rdynamic" | |
11157 | else | |
11158 | found="no" | |
7e8c7130 SM |
11159 | RDYNAMIC="" |
11160 | ||
770d76d7 PA |
11161 | fi |
11162 | rm -f core conftest.err conftest.$ac_objext \ | |
11163 | conftest$ac_exeext conftest.$ac_ext | |
7e8c7130 | 11164 | |
770d76d7 PA |
11165 | fi |
11166 | rm -f core conftest.err conftest.$ac_objext \ | |
11167 | conftest$ac_exeext conftest.$ac_ext | |
11168 | ||
11169 | LDFLAGS="$old_LDFLAGS" | |
11170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 | |
11171 | $as_echo "$found" >&6; } | |
11172 | else | |
11173 | srv_libs="-lthread_db" | |
11174 | fi | |
55a8c076 | 11175 | |
770d76d7 | 11176 | srv_thread_depfiles="thread-db.o proc-service.o" |
7d4e5717 PA |
11177 | |
11178 | $as_echo "#define USE_THREAD_DB 1" >>confdefs.h | |
11179 | ||
770d76d7 PA |
11180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5 |
11181 | $as_echo_n "checking for TD_VERSION... " >&6; } | |
d0ac1c44 | 11182 | if ${gdbsrv_cv_have_td_version+:} false; then : |
770d76d7 PA |
11183 | $as_echo_n "(cached) " >&6 |
11184 | else | |
11185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11186 | /* end confdefs.h. */ | |
11187 | #include <thread_db.h> | |
55a8c076 YQ |
11188 | int |
11189 | main () | |
11190 | { | |
770d76d7 | 11191 | TD_VERSION; |
c9a1864a YQ |
11192 | ; |
11193 | return 0; | |
11194 | } | |
11195 | _ACEOF | |
55a8c076 | 11196 | if ac_fn_c_try_compile "$LINENO"; then : |
770d76d7 | 11197 | gdbsrv_cv_have_td_version=yes |
c9a1864a | 11198 | else |
770d76d7 | 11199 | gdbsrv_cv_have_td_version=no |
7e8c7130 | 11200 | |
770d76d7 PA |
11201 | fi |
11202 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7e8c7130 | 11203 | |
770d76d7 PA |
11204 | fi |
11205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5 | |
11206 | $as_echo "$gdbsrv_cv_have_td_version" >&6; } | |
0ad6b8ee | 11207 | if test "$gdbsrv_cv_have_td_version" = yes; then |
c9a1864a | 11208 | |
770d76d7 | 11209 | $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h |
55a8c076 | 11210 | |
770d76d7 PA |
11211 | fi |
11212 | fi | |
c9a1864a YQ |
11213 | |
11214 | ||
770d76d7 PA |
11215 | # Check whether --with-libthread-db was given. |
11216 | if test "${with_libthread_db+set}" = set; then : | |
11217 | withval=$with_libthread_db; srv_libthread_db_path="${withval}" | |
11218 | srv_libs="$srv_libthread_db_path" | |
c9a1864a | 11219 | |
770d76d7 | 11220 | fi |
c9a1864a YQ |
11221 | |
11222 | ||
770d76d7 | 11223 | if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then |
c9a1864a | 11224 | |
770d76d7 | 11225 | $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h |
c9a1864a | 11226 | |
55a8c076 | 11227 | fi |
c9a1864a | 11228 | |
770d76d7 PA |
11229 | if test "$srv_xmlfiles" != ""; then |
11230 | srv_xmlbuiltin="xml-builtin.o" | |
c9a1864a | 11231 | |
770d76d7 | 11232 | $as_echo "#define USE_XML 1" >>confdefs.h |
c9a1864a | 11233 | |
c9a1864a | 11234 | |
770d76d7 PA |
11235 | tmp_xmlfiles=$srv_xmlfiles |
11236 | srv_xmlfiles="" | |
11237 | for f in $tmp_xmlfiles; do | |
11238 | srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f" | |
11239 | done | |
c9a1864a YQ |
11240 | fi |
11241 | ||
0256da25 | 11242 | GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles" |
770d76d7 | 11243 | GDBSERVER_LIBS="$srv_libs" |
c9a1864a | 11244 | |
770d76d7 PA |
11245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5 |
11246 | $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; } | |
d0ac1c44 | 11247 | if ${gdbsrv_cv_have_sync_builtins+:} false; then : |
770d76d7 PA |
11248 | $as_echo_n "(cached) " >&6 |
11249 | else | |
7e8c7130 | 11250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
770d76d7 | 11251 | /* end confdefs.h. */ |
c9a1864a | 11252 | |
770d76d7 PA |
11253 | int |
11254 | main () | |
11255 | { | |
7e8c7130 SM |
11256 | int foo, bar; |
11257 | bar = __sync_val_compare_and_swap(&foo, 0, 1); | |
11258 | ||
770d76d7 PA |
11259 | ; |
11260 | return 0; | |
11261 | } | |
11262 | _ACEOF | |
11263 | if ac_fn_c_try_link "$LINENO"; then : | |
11264 | gdbsrv_cv_have_sync_builtins=yes | |
11265 | else | |
c971b7fa | 11266 | gdbsrv_cv_have_sync_builtins=no |
7e8c7130 | 11267 | |
c9a1864a | 11268 | fi |
c971b7fa PA |
11269 | rm -f core conftest.err conftest.$ac_objext \ |
11270 | conftest$ac_exeext conftest.$ac_ext | |
7e8c7130 | 11271 | |
c9a1864a | 11272 | fi |
c971b7fa PA |
11273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5 |
11274 | $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; } | |
0ad6b8ee | 11275 | if test "$gdbsrv_cv_have_sync_builtins" = yes; then |
c971b7fa PA |
11276 | |
11277 | $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h | |
11278 | ||
c9a1864a YQ |
11279 | fi |
11280 | ||
c971b7fa PA |
11281 | saved_cflags="$CFLAGS" |
11282 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
11283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11284 | /* end confdefs.h. */ | |
c9a1864a | 11285 | |
c971b7fa PA |
11286 | int |
11287 | main () | |
11288 | { | |
c9a1864a | 11289 | |
c971b7fa PA |
11290 | ; |
11291 | return 0; | |
11292 | } | |
c9a1864a | 11293 | _ACEOF |
c971b7fa PA |
11294 | if ac_fn_c_try_compile "$LINENO"; then : |
11295 | gdbsrv_cv_have_visibility_hidden=yes | |
11296 | else | |
11297 | gdbsrv_cv_have_visibility_hidden=no | |
c9a1864a | 11298 | fi |
c971b7fa PA |
11299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11300 | CFLAGS="$saved_cflags" | |
11301 | ||
c971b7fa PA |
11302 | IPA_DEPFILES="" |
11303 | extra_libraries="" | |
c2a66c29 | 11304 | |
c971b7fa PA |
11305 | # check whether to enable the inprocess agent |
11306 | if test "$ipa_obj" != "" \ | |
11307 | -a "$gdbsrv_cv_have_sync_builtins" = yes \ | |
11308 | -a "$gdbsrv_cv_have_visibility_hidden" = yes; then | |
11309 | have_ipa=true | |
11310 | else | |
11311 | have_ipa=false | |
11312 | fi | |
fa593d66 | 11313 | |
c971b7fa PA |
11314 | # Check whether --enable-inprocess-agent was given. |
11315 | if test "${enable_inprocess_agent+set}" = set; then : | |
11316 | enableval=$enable_inprocess_agent; case "$enableval" in | |
11317 | yes) want_ipa=true ;; | |
11318 | no) want_ipa=false ;; | |
d0ac1c44 | 11319 | *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;; |
c971b7fa PA |
11320 | esac |
11321 | else | |
11322 | want_ipa=$have_ipa | |
11323 | fi | |
c2a66c29 | 11324 | |
c9a1864a | 11325 | |
c971b7fa PA |
11326 | if $want_ipa ; then |
11327 | if $have_ipa ; then | |
11328 | IPA_DEPFILES="$ipa_obj" | |
11329 | extra_libraries="$extra_libraries libinproctrace.so" | |
11330 | else | |
d0ac1c44 | 11331 | as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5 |
c971b7fa PA |
11332 | fi |
11333 | fi | |
c9a1864a | 11334 | |
c9a1864a | 11335 | |
c2a66c29 NS |
11336 | |
11337 | ||
fa593d66 PA |
11338 | |
11339 | ||
11340 | ||
0d62e5e8 | 11341 | |
1a627e7e | 11342 | GNULIB=../gnulib/import |
d6e9fb05 | 11343 | |
c9a1864a YQ |
11344 | GNULIB_STDINT_H= |
11345 | if test x"$STDINT_H" != x; then | |
c971b7fa | 11346 | GNULIB_STDINT_H=$GNULIB/$STDINT_H |
c9a1864a | 11347 | fi |
d6e9fb05 | 11348 | |
fb1e4ffc | 11349 | |
c971b7fa | 11350 | ac_config_files="$ac_config_files Makefile" |
81ecdfbb | 11351 | |
81ecdfbb | 11352 | |
bec39cab | 11353 | cat >confcache <<\_ACEOF |
d6e9fb05 JK |
11354 | # This file is a shell script that caches the results of configure |
11355 | # tests run on this system so they can be shared between configure | |
bec39cab AC |
11356 | # scripts and configure runs, see configure's option --config-cache. |
11357 | # It is not useful on other systems. If it contains results you don't | |
11358 | # want to keep, you may remove or edit it. | |
d6e9fb05 | 11359 | # |
bec39cab AC |
11360 | # config.status only pays attention to the cache file if you give it |
11361 | # the --recheck option to rerun configure. | |
d6e9fb05 | 11362 | # |
bec39cab AC |
11363 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
11364 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
11365 | # following values. | |
11366 | ||
11367 | _ACEOF | |
11368 | ||
d6e9fb05 JK |
11369 | # The following way of writing the cache mishandles newlines in values, |
11370 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 11371 | # So, we kill variables containing newlines. |
d6e9fb05 JK |
11372 | # Ultrix sh set writes to stderr and can't be redirected directly, |
11373 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
11374 | ( |
11375 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
11376 | eval ac_val=\$$ac_var | |
11377 | case $ac_val in #( | |
11378 | *${as_nl}*) | |
11379 | case $ac_var in #( | |
11380 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
11381 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
11382 | esac | |
11383 | case $ac_var in #( | |
11384 | _ | IFS | as_nl) ;; #( | |
11385 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
11386 | *) { eval $ac_var=; unset $ac_var;} ;; | |
11387 | esac ;; | |
11388 | esac | |
11389 | done | |
11390 | ||
bec39cab | 11391 | (set) 2>&1 | |
81ecdfbb RW |
11392 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
11393 | *${as_nl}ac_space=\ *) | |
11394 | # `set' does not quote correctly, so add quotes: double-quote | |
11395 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
11396 | sed -n \ |
11397 | "s/'/'\\\\''/g; | |
11398 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 11399 | ;; #( |
bec39cab AC |
11400 | *) |
11401 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 11402 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 11403 | ;; |
81ecdfbb RW |
11404 | esac | |
11405 | sort | |
11406 | ) | | |
bec39cab | 11407 | sed ' |
81ecdfbb | 11408 | /^ac_cv_env_/b end |
bec39cab | 11409 | t clear |
81ecdfbb | 11410 | :clear |
bec39cab AC |
11411 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
11412 | t end | |
81ecdfbb RW |
11413 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
11414 | :end' >>confcache | |
11415 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
11416 | if test -w "$cache_file"; then | |
d0ac1c44 | 11417 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
11418 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
11419 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
11420 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
11421 | cat confcache >"$cache_file" | |
11422 | else | |
11423 | case $cache_file in #( | |
11424 | */* | ?:*) | |
11425 | mv -f confcache "$cache_file"$$ && | |
11426 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
11427 | *) | |
11428 | mv -f confcache "$cache_file" ;; | |
11429 | esac | |
11430 | fi | |
11431 | fi | |
d6e9fb05 | 11432 | else |
81ecdfbb RW |
11433 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
11434 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
d6e9fb05 JK |
11435 | fi |
11436 | fi | |
11437 | rm -f confcache | |
11438 | ||
d6e9fb05 JK |
11439 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
11440 | # Let make expand exec_prefix. | |
11441 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
11442 | ||
84563040 | 11443 | DEFS=-DHAVE_CONFIG_H |
d6e9fb05 | 11444 | |
bec39cab AC |
11445 | ac_libobjs= |
11446 | ac_ltlibobjs= | |
d0ac1c44 | 11447 | U= |
bec39cab AC |
11448 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
11449 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
11450 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
11451 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
11452 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
11453 | # will be set to the directory where LIBOBJS objects are built. | |
11454 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
11455 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
11456 | done |
11457 | LIBOBJS=$ac_libobjs | |
d6e9fb05 | 11458 | |
bec39cab AC |
11459 | LTLIBOBJS=$ac_ltlibobjs |
11460 | ||
11461 | ||
c9a1864a | 11462 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 11463 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c9a1864a YQ |
11464 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
11465 | fi | |
bec39cab | 11466 | |
d0ac1c44 | 11467 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 11468 | ac_write_fail=0 |
bec39cab AC |
11469 | ac_clean_files_save=$ac_clean_files |
11470 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
11471 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
11472 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
11473 | as_write_fail=0 | |
11474 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
11475 | #! $SHELL |
11476 | # Generated by $as_me. | |
d6e9fb05 | 11477 | # Run this file to recreate the current configuration. |
d6e9fb05 | 11478 | # Compiler output produced by configure, useful for debugging |
bec39cab AC |
11479 | # configure, is in config.log if it exists. |
11480 | ||
11481 | debug=false | |
11482 | ac_cs_recheck=false | |
11483 | ac_cs_silent=false | |
bec39cab | 11484 | |
81ecdfbb RW |
11485 | SHELL=\${CONFIG_SHELL-$SHELL} |
11486 | export SHELL | |
11487 | _ASEOF | |
11488 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
11489 | ## -------------------- ## | |
11490 | ## M4sh Initialization. ## | |
11491 | ## -------------------- ## | |
11492 | ||
11493 | # Be more Bourne compatible | |
11494 | DUALCASE=1; export DUALCASE # for MKS sh | |
11495 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
11496 | emulate sh |
11497 | NULLCMD=: | |
81ecdfbb | 11498 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
11499 | # is contrary to our usage. Disable this feature. |
11500 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
11501 | setopt NO_GLOB_SUBST |
11502 | else | |
11503 | case `(set -o) 2>/dev/null` in #( | |
11504 | *posix*) : | |
11505 | set -o posix ;; #( | |
11506 | *) : | |
11507 | ;; | |
11508 | esac | |
bec39cab | 11509 | fi |
d6e9fb05 | 11510 | |
81ecdfbb RW |
11511 | |
11512 | as_nl=' | |
11513 | ' | |
11514 | export as_nl | |
11515 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
11516 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
11517 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
11518 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
11519 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
11520 | # but without wasting forks for bash or zsh. | |
11521 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
11522 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
11523 | as_echo='print -r --' | |
11524 | as_echo_n='print -rn --' | |
11525 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
11526 | as_echo='printf %s\n' | |
11527 | as_echo_n='printf %s' | |
bec39cab | 11528 | else |
81ecdfbb RW |
11529 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
11530 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
11531 | as_echo_n='/usr/ucb/echo -n' | |
11532 | else | |
11533 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
11534 | as_echo_n_body='eval | |
11535 | arg=$1; | |
11536 | case $arg in #( | |
11537 | *"$as_nl"*) | |
11538 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
11539 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
11540 | esac; | |
11541 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
11542 | ' | |
11543 | export as_echo_n_body | |
11544 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
11545 | fi | |
11546 | export as_echo_body | |
11547 | as_echo='sh -c $as_echo_body as_echo' | |
11548 | fi | |
11549 | ||
11550 | # The user is always right. | |
11551 | if test "${PATH_SEPARATOR+set}" != set; then | |
11552 | PATH_SEPARATOR=: | |
11553 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
11554 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
11555 | PATH_SEPARATOR=';' | |
11556 | } | |
bec39cab AC |
11557 | fi |
11558 | ||
11559 | ||
81ecdfbb RW |
11560 | # IFS |
11561 | # We need space, tab and new line, in precisely that order. Quoting is | |
11562 | # there to prevent editors from complaining about space-tab. | |
11563 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
11564 | # splitting by setting IFS to empty value.) | |
11565 | IFS=" "" $as_nl" | |
11566 | ||
11567 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 11568 | as_myself= |
81ecdfbb RW |
11569 | case $0 in #(( |
11570 | *[\\/]* ) as_myself=$0 ;; | |
11571 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11572 | for as_dir in $PATH | |
11573 | do | |
11574 | IFS=$as_save_IFS | |
11575 | test -z "$as_dir" && as_dir=. | |
11576 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
11577 | done | |
11578 | IFS=$as_save_IFS | |
11579 | ||
11580 | ;; | |
11581 | esac | |
11582 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
11583 | # in which case we are not to be found in the path. | |
11584 | if test "x$as_myself" = x; then | |
11585 | as_myself=$0 | |
11586 | fi | |
11587 | if test ! -f "$as_myself"; then | |
11588 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
11589 | exit 1 | |
11590 | fi | |
11591 | ||
11592 | # Unset variables that we do not need and which cause bugs (e.g. in | |
11593 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
11594 | # suppresses any "Segmentation fault" message there. '((' could | |
11595 | # trigger a bug in pdksh 5.2.14. | |
11596 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
11597 | do eval test x\${$as_var+set} = xset \ | |
11598 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
11599 | done | |
bec39cab AC |
11600 | PS1='$ ' |
11601 | PS2='> ' | |
11602 | PS4='+ ' | |
11603 | ||
11604 | # NLS nuisances. | |
81ecdfbb RW |
11605 | LC_ALL=C |
11606 | export LC_ALL | |
11607 | LANGUAGE=C | |
11608 | export LANGUAGE | |
11609 | ||
11610 | # CDPATH. | |
11611 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
11612 | ||
11613 | ||
d0ac1c44 SM |
11614 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
11615 | # ---------------------------------------- | |
81ecdfbb RW |
11616 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
11617 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 11618 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
11619 | as_fn_error () |
11620 | { | |
d0ac1c44 SM |
11621 | as_status=$1; test $as_status -eq 0 && as_status=1 |
11622 | if test "$4"; then | |
11623 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
11624 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
bec39cab | 11625 | fi |
d0ac1c44 | 11626 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
11627 | as_fn_exit $as_status |
11628 | } # as_fn_error | |
11629 | ||
11630 | ||
11631 | # as_fn_set_status STATUS | |
11632 | # ----------------------- | |
11633 | # Set $? to STATUS, without forking. | |
11634 | as_fn_set_status () | |
11635 | { | |
11636 | return $1 | |
11637 | } # as_fn_set_status | |
11638 | ||
11639 | # as_fn_exit STATUS | |
11640 | # ----------------- | |
11641 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
11642 | as_fn_exit () | |
11643 | { | |
11644 | set +e | |
11645 | as_fn_set_status $1 | |
11646 | exit $1 | |
11647 | } # as_fn_exit | |
11648 | ||
11649 | # as_fn_unset VAR | |
11650 | # --------------- | |
11651 | # Portably unset VAR. | |
11652 | as_fn_unset () | |
11653 | { | |
11654 | { eval $1=; unset $1;} | |
11655 | } | |
11656 | as_unset=as_fn_unset | |
11657 | # as_fn_append VAR VALUE | |
11658 | # ---------------------- | |
11659 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
11660 | # advantage of any shell optimizations that allow amortized linear growth over | |
11661 | # repeated appends, instead of the typical quadratic growth present in naive | |
11662 | # implementations. | |
11663 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
11664 | eval 'as_fn_append () | |
11665 | { | |
11666 | eval $1+=\$2 | |
11667 | }' | |
11668 | else | |
11669 | as_fn_append () | |
11670 | { | |
11671 | eval $1=\$$1\$2 | |
11672 | } | |
11673 | fi # as_fn_append | |
11674 | ||
11675 | # as_fn_arith ARG... | |
11676 | # ------------------ | |
11677 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
11678 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
11679 | # must be portable across $(()) and expr. | |
11680 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
11681 | eval 'as_fn_arith () | |
11682 | { | |
11683 | as_val=$(( $* )) | |
11684 | }' | |
11685 | else | |
11686 | as_fn_arith () | |
11687 | { | |
11688 | as_val=`expr "$@" || test $? -eq 1` | |
11689 | } | |
11690 | fi # as_fn_arith | |
11691 | ||
d6e9fb05 | 11692 | |
81ecdfbb RW |
11693 | if expr a : '\(a\)' >/dev/null 2>&1 && |
11694 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
11695 | as_expr=expr |
11696 | else | |
11697 | as_expr=false | |
11698 | fi | |
d6e9fb05 | 11699 | |
81ecdfbb | 11700 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
11701 | as_basename=basename |
11702 | else | |
11703 | as_basename=false | |
11704 | fi | |
d6e9fb05 | 11705 | |
81ecdfbb RW |
11706 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
11707 | as_dirname=dirname | |
11708 | else | |
11709 | as_dirname=false | |
11710 | fi | |
d6e9fb05 | 11711 | |
81ecdfbb | 11712 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
11713 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
11714 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11715 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
11716 | $as_echo X/"$0" | | |
11717 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
11718 | s//\1/ | |
11719 | q | |
11720 | } | |
11721 | /^X\/\(\/\/\)$/{ | |
11722 | s//\1/ | |
11723 | q | |
11724 | } | |
11725 | /^X\/\(\/\).*/{ | |
11726 | s//\1/ | |
11727 | q | |
11728 | } | |
11729 | s/.*/./; q'` | |
bec39cab | 11730 | |
dae5f5cf DJ |
11731 | # Avoid depending upon Character Ranges. |
11732 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
11733 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
11734 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
11735 | as_cr_digits='0123456789' | |
11736 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
11737 | ||
81ecdfbb RW |
11738 | ECHO_C= ECHO_N= ECHO_T= |
11739 | case `echo -n x` in #((((( | |
11740 | -n*) | |
11741 | case `echo 'xy\c'` in | |
11742 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
11743 | xy) ECHO_C='\c';; | |
11744 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
11745 | ECHO_T=' ';; | |
11746 | esac;; | |
11747 | *) | |
11748 | ECHO_N='-n';; | |
bec39cab AC |
11749 | esac |
11750 | ||
81ecdfbb RW |
11751 | rm -f conf$$ conf$$.exe conf$$.file |
11752 | if test -d conf$$.dir; then | |
11753 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 11754 | else |
81ecdfbb RW |
11755 | rm -f conf$$.dir |
11756 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 11757 | fi |
81ecdfbb RW |
11758 | if (echo >conf$$.file) 2>/dev/null; then |
11759 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
dae5f5cf | 11760 | as_ln_s='ln -s' |
81ecdfbb RW |
11761 | # ... but there are two gotchas: |
11762 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
11763 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 11764 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 11765 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 11766 | as_ln_s='cp -pR' |
81ecdfbb RW |
11767 | elif ln conf$$.file conf$$ 2>/dev/null; then |
11768 | as_ln_s=ln | |
11769 | else | |
d0ac1c44 | 11770 | as_ln_s='cp -pR' |
dae5f5cf | 11771 | fi |
bec39cab | 11772 | else |
d0ac1c44 | 11773 | as_ln_s='cp -pR' |
bec39cab | 11774 | fi |
81ecdfbb RW |
11775 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
11776 | rmdir conf$$.dir 2>/dev/null | |
11777 | ||
11778 | ||
11779 | # as_fn_mkdir_p | |
11780 | # ------------- | |
11781 | # Create "$as_dir" as a directory, including parents if necessary. | |
11782 | as_fn_mkdir_p () | |
11783 | { | |
11784 | ||
11785 | case $as_dir in #( | |
11786 | -*) as_dir=./$as_dir;; | |
11787 | esac | |
11788 | test -d "$as_dir" || eval $as_mkdir_p || { | |
11789 | as_dirs= | |
11790 | while :; do | |
11791 | case $as_dir in #( | |
11792 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
11793 | *) as_qdir=$as_dir;; | |
11794 | esac | |
11795 | as_dirs="'$as_qdir' $as_dirs" | |
11796 | as_dir=`$as_dirname -- "$as_dir" || | |
11797 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11798 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
11799 | X"$as_dir" : 'X\(//\)$' \| \ | |
11800 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
11801 | $as_echo X"$as_dir" | | |
11802 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11803 | s//\1/ | |
11804 | q | |
11805 | } | |
11806 | /^X\(\/\/\)[^/].*/{ | |
11807 | s//\1/ | |
11808 | q | |
11809 | } | |
11810 | /^X\(\/\/\)$/{ | |
11811 | s//\1/ | |
11812 | q | |
11813 | } | |
11814 | /^X\(\/\).*/{ | |
11815 | s//\1/ | |
11816 | q | |
11817 | } | |
11818 | s/.*/./; q'` | |
11819 | test -d "$as_dir" && break | |
11820 | done | |
11821 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 11822 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
bec39cab | 11823 | |
81ecdfbb RW |
11824 | |
11825 | } # as_fn_mkdir_p | |
bec39cab | 11826 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 11827 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
11828 | else |
11829 | test -d ./-p && rmdir ./-p | |
11830 | as_mkdir_p=false | |
11831 | fi | |
11832 | ||
d0ac1c44 SM |
11833 | |
11834 | # as_fn_executable_p FILE | |
11835 | # ----------------------- | |
11836 | # Test if FILE is an executable regular file. | |
11837 | as_fn_executable_p () | |
11838 | { | |
11839 | test -f "$1" && test -x "$1" | |
11840 | } # as_fn_executable_p | |
11841 | as_test_x='test -x' | |
11842 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
11843 | |
11844 | # Sed expression to map a string onto a valid CPP name. | |
11845 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
11846 | ||
11847 | # Sed expression to map a string onto a valid variable name. | |
11848 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
11849 | ||
11850 | ||
bec39cab | 11851 | exec 6>&1 |
81ecdfbb RW |
11852 | ## ----------------------------------- ## |
11853 | ## Main body of $CONFIG_STATUS script. ## | |
11854 | ## ----------------------------------- ## | |
11855 | _ASEOF | |
11856 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
11857 | ||
11858 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11859 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 11860 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
11861 | # values after options handling. |
11862 | ac_log=" | |
bec39cab | 11863 | This file was extended by $as_me, which was |
d0ac1c44 | 11864 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
11865 | |
11866 | CONFIG_FILES = $CONFIG_FILES | |
11867 | CONFIG_HEADERS = $CONFIG_HEADERS | |
11868 | CONFIG_LINKS = $CONFIG_LINKS | |
11869 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
11870 | $ $0 $@ | |
11871 | ||
81ecdfbb RW |
11872 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
11873 | " | |
11874 | ||
bec39cab AC |
11875 | _ACEOF |
11876 | ||
81ecdfbb RW |
11877 | case $ac_config_files in *" |
11878 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
11879 | esac | |
bec39cab | 11880 | |
81ecdfbb RW |
11881 | case $ac_config_headers in *" |
11882 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
11883 | esac | |
dae5f5cf | 11884 | |
dae5f5cf | 11885 | |
81ecdfbb RW |
11886 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
11887 | # Files that config.status was made for. | |
11888 | config_files="$ac_config_files" | |
11889 | config_headers="$ac_config_headers" | |
11890 | config_commands="$ac_config_commands" | |
bec39cab | 11891 | |
81ecdfbb | 11892 | _ACEOF |
dae5f5cf | 11893 | |
81ecdfbb | 11894 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 11895 | ac_cs_usage="\ |
81ecdfbb RW |
11896 | \`$as_me' instantiates files and other configuration actions |
11897 | from templates according to the current configuration. Unless the files | |
11898 | and actions are specified as TAGs, all are instantiated by default. | |
bec39cab | 11899 | |
81ecdfbb | 11900 | Usage: $0 [OPTION]... [TAG]... |
bec39cab AC |
11901 | |
11902 | -h, --help print this help, then exit | |
81ecdfbb | 11903 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 11904 | --config print configuration, then exit |
81ecdfbb RW |
11905 | -q, --quiet, --silent |
11906 | do not print progress messages | |
bec39cab AC |
11907 | -d, --debug don't remove temporary files |
11908 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
11909 | --file=FILE[:TEMPLATE] |
11910 | instantiate the configuration file FILE | |
11911 | --header=FILE[:TEMPLATE] | |
11912 | instantiate the configuration header FILE | |
bec39cab AC |
11913 | |
11914 | Configuration files: | |
11915 | $config_files | |
11916 | ||
11917 | Configuration headers: | |
11918 | $config_headers | |
11919 | ||
11920 | Configuration commands: | |
11921 | $config_commands | |
11922 | ||
81ecdfbb | 11923 | Report bugs to the package provider." |
dae5f5cf | 11924 | |
81ecdfbb RW |
11925 | _ACEOF |
11926 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11927 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
11928 | ac_cs_version="\\ |
11929 | config.status | |
d0ac1c44 SM |
11930 | configured by $0, generated by GNU Autoconf 2.69, |
11931 | with options \\"\$ac_cs_config\\" | |
bec39cab | 11932 | |
d0ac1c44 | 11933 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
11934 | This config.status script is free software; the Free Software Foundation |
11935 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
11936 | |
11937 | ac_pwd='$ac_pwd' | |
11938 | srcdir='$srcdir' | |
11939 | INSTALL='$INSTALL' | |
11940 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
11941 | _ACEOF |
11942 | ||
81ecdfbb RW |
11943 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11944 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
11945 | ac_need_defaults=: |
11946 | while test $# != 0 | |
11947 | do | |
11948 | case $1 in | |
d0ac1c44 | 11949 | --*=?*) |
81ecdfbb RW |
11950 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
11951 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab AC |
11952 | ac_shift=: |
11953 | ;; | |
d0ac1c44 SM |
11954 | --*=) |
11955 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
11956 | ac_optarg= | |
11957 | ac_shift=: | |
11958 | ;; | |
81ecdfbb | 11959 | *) |
bec39cab AC |
11960 | ac_option=$1 |
11961 | ac_optarg=$2 | |
11962 | ac_shift=shift | |
11963 | ;; | |
bec39cab AC |
11964 | esac |
11965 | ||
11966 | case $ac_option in | |
11967 | # Handling of the options. | |
bec39cab AC |
11968 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
11969 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
11970 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
11971 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
11972 | --config | --confi | --conf | --con | --co | --c ) |
11973 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 11974 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
11975 | debug=: ;; |
11976 | --file | --fil | --fi | --f ) | |
11977 | $ac_shift | |
81ecdfbb RW |
11978 | case $ac_optarg in |
11979 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 11980 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
11981 | esac |
11982 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
11983 | ac_need_defaults=false;; |
11984 | --header | --heade | --head | --hea ) | |
11985 | $ac_shift | |
81ecdfbb RW |
11986 | case $ac_optarg in |
11987 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
11988 | esac | |
11989 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 11990 | ac_need_defaults=false;; |
81ecdfbb RW |
11991 | --he | --h) |
11992 | # Conflict between --help and --header | |
d0ac1c44 | 11993 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
11994 | Try \`$0 --help' for more information.";; |
11995 | --help | --hel | -h ) | |
11996 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
11997 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
11998 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
11999 | ac_cs_silent=: ;; | |
12000 | ||
12001 | # This is an error. | |
d0ac1c44 | 12002 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 12003 | Try \`$0 --help' for more information." ;; |
bec39cab | 12004 | |
81ecdfbb RW |
12005 | *) as_fn_append ac_config_targets " $1" |
12006 | ac_need_defaults=false ;; | |
bec39cab AC |
12007 | |
12008 | esac | |
12009 | shift | |
d6e9fb05 | 12010 | done |
bec39cab AC |
12011 | |
12012 | ac_configure_extra_args= | |
12013 | ||
12014 | if $ac_cs_silent; then | |
12015 | exec 6>/dev/null | |
12016 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
d6e9fb05 | 12017 | fi |
d6e9fb05 | 12018 | |
bec39cab | 12019 | _ACEOF |
81ecdfbb | 12020 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 12021 | if \$ac_cs_recheck; then |
d0ac1c44 | 12022 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
12023 | shift |
12024 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
12025 | CONFIG_SHELL='$SHELL' | |
12026 | export CONFIG_SHELL | |
12027 | exec "\$@" | |
bec39cab | 12028 | fi |
d6e9fb05 | 12029 | |
bec39cab | 12030 | _ACEOF |
81ecdfbb RW |
12031 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
12032 | exec 5>>config.log | |
12033 | { | |
12034 | echo | |
12035 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
12036 | ## Running $as_me. ## | |
12037 | _ASBOX | |
12038 | $as_echo "$ac_log" | |
12039 | } >&5 | |
bec39cab | 12040 | |
81ecdfbb RW |
12041 | _ACEOF |
12042 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
61c125b9 TT |
12043 | # |
12044 | # INIT-COMMANDS | |
12045 | # | |
12046 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR | |
60d6cfc9 | 12047 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR" |
61c125b9 | 12048 | |
81ecdfbb | 12049 | _ACEOF |
bec39cab | 12050 | |
81ecdfbb | 12051 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b80864fb | 12052 | |
81ecdfbb | 12053 | # Handling of arguments. |
bec39cab AC |
12054 | for ac_config_target in $ac_config_targets |
12055 | do | |
81ecdfbb RW |
12056 | case $ac_config_target in |
12057 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
61c125b9 | 12058 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
60d6cfc9 | 12059 | "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;; |
81ecdfbb | 12060 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
81ecdfbb | 12061 | |
d0ac1c44 | 12062 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
d6e9fb05 | 12063 | esac |
bec39cab AC |
12064 | done |
12065 | ||
81ecdfbb | 12066 | |
bec39cab AC |
12067 | # If the user did not use the arguments to specify the items to instantiate, |
12068 | # then the envvar interface is used. Set only those that are not. | |
12069 | # We use the long form for the default assignment because of an extremely | |
12070 | # bizarre bug on SunOS 4.1.3. | |
12071 | if $ac_need_defaults; then | |
12072 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
12073 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
12074 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
12075 | fi | |
d6e9fb05 | 12076 | |
bec39cab | 12077 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 12078 | # simply because there is no reason against having it here, and in addition, |
bec39cab | 12079 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
12080 | # Hook for its removal unless debugging. |
12081 | # Note that there is a small window in which the directory will not be cleaned: | |
12082 | # after its creation but before its name has been assigned to `$tmp'. | |
bec39cab AC |
12083 | $debug || |
12084 | { | |
d0ac1c44 | 12085 | tmp= ac_tmp= |
81ecdfbb | 12086 | trap 'exit_status=$? |
d0ac1c44 SM |
12087 | : "${ac_tmp:=$tmp}" |
12088 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
12089 | ' 0 |
12090 | trap 'as_fn_exit 1' 1 2 13 15 | |
bec39cab | 12091 | } |
bec39cab AC |
12092 | # Create a (secure) tmp directory for tmp files. |
12093 | ||
12094 | { | |
81ecdfbb | 12095 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
d0ac1c44 | 12096 | test -d "$tmp" |
bec39cab AC |
12097 | } || |
12098 | { | |
81ecdfbb RW |
12099 | tmp=./conf$$-$RANDOM |
12100 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
12101 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
12102 | ac_tmp=$tmp | |
81ecdfbb RW |
12103 | |
12104 | # Set up the scripts for CONFIG_FILES section. | |
12105 | # No need to generate them if there are no CONFIG_FILES. | |
12106 | # This happens for instance with `./config.status config.h'. | |
12107 | if test -n "$CONFIG_FILES"; then | |
12108 | ||
12109 | ||
12110 | ac_cr=`echo X | tr X '\015'` | |
12111 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
12112 | # But we know of no other shell where ac_cr would be empty at this | |
12113 | # point, so we can use a bashism as a fallback. | |
12114 | if test "x$ac_cr" = x; then | |
12115 | eval ac_cr=\$\'\\r\' | |
12116 | fi | |
12117 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
12118 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 12119 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
12120 | else |
12121 | ac_cs_awk_cr=$ac_cr | |
12122 | fi | |
12123 | ||
d0ac1c44 | 12124 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
12125 | _ACEOF |
12126 | ||
12127 | ||
12128 | { | |
12129 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
12130 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
12131 | echo "_ACEOF" | |
12132 | } >conf$$subs.sh || | |
d0ac1c44 SM |
12133 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
12134 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
12135 | ac_delim='%!_!# ' |
12136 | for ac_last_try in false false false false false :; do | |
12137 | . ./conf$$subs.sh || | |
d0ac1c44 | 12138 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
12139 | |
12140 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
12141 | if test $ac_delim_n = $ac_delim_num; then | |
12142 | break | |
12143 | elif $ac_last_try; then | |
d0ac1c44 | 12144 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
12145 | else |
12146 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
12147 | fi | |
12148 | done | |
12149 | rm -f conf$$subs.sh | |
12150 | ||
12151 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 12152 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
12153 | _ACEOF |
12154 | sed -n ' | |
12155 | h | |
12156 | s/^/S["/; s/!.*/"]=/ | |
12157 | p | |
12158 | g | |
12159 | s/^[^!]*!// | |
12160 | :repl | |
12161 | t repl | |
12162 | s/'"$ac_delim"'$// | |
12163 | t delim | |
12164 | :nl | |
12165 | h | |
d0ac1c44 | 12166 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
12167 | t more1 |
12168 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
12169 | p | |
12170 | n | |
12171 | b repl | |
12172 | :more1 | |
12173 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
12174 | p | |
12175 | g | |
12176 | s/.\{148\}// | |
12177 | t nl | |
12178 | :delim | |
12179 | h | |
d0ac1c44 | 12180 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
12181 | t more2 |
12182 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
12183 | p | |
12184 | b | |
12185 | :more2 | |
12186 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
12187 | p | |
12188 | g | |
12189 | s/.\{148\}// | |
12190 | t delim | |
12191 | ' <conf$$subs.awk | sed ' | |
12192 | /^[^""]/{ | |
12193 | N | |
12194 | s/\n// | |
12195 | } | |
12196 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
12197 | rm -f conf$$subs.awk | |
12198 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12199 | _ACAWK | |
d0ac1c44 | 12200 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
12201 | for (key in S) S_is_set[key] = 1 |
12202 | FS = "\a" | |
12203 | ||
12204 | } | |
bec39cab | 12205 | { |
81ecdfbb RW |
12206 | line = $ 0 |
12207 | nfields = split(line, field, "@") | |
12208 | substed = 0 | |
12209 | len = length(field[1]) | |
12210 | for (i = 2; i < nfields; i++) { | |
12211 | key = field[i] | |
12212 | keylen = length(key) | |
12213 | if (S_is_set[key]) { | |
12214 | value = S[key] | |
12215 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
12216 | len += length(value) + length(field[++i]) | |
12217 | substed = 1 | |
12218 | } else | |
12219 | len += 1 + keylen | |
12220 | } | |
12221 | ||
12222 | print line | |
bec39cab AC |
12223 | } |
12224 | ||
81ecdfbb RW |
12225 | _ACAWK |
12226 | _ACEOF | |
12227 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
12228 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
12229 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
12230 | else | |
12231 | cat | |
d0ac1c44 SM |
12232 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
12233 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
dae5f5cf DJ |
12234 | _ACEOF |
12235 | ||
d0ac1c44 SM |
12236 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
12237 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
12238 | # trailing colons and then remove the whole line if VPATH becomes empty |
12239 | # (actually we leave an empty line to preserve line numbers). | |
12240 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
12241 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
12242 | h | |
12243 | s/// | |
12244 | s/^/:/ | |
12245 | s/[ ]*$/:/ | |
12246 | s/:\$(srcdir):/:/g | |
12247 | s/:\${srcdir}:/:/g | |
12248 | s/:@srcdir@:/:/g | |
12249 | s/^:*// | |
81ecdfbb | 12250 | s/:*$// |
d0ac1c44 SM |
12251 | x |
12252 | s/\(=[ ]*\).*/\1/ | |
12253 | G | |
12254 | s/\n// | |
81ecdfbb RW |
12255 | s/^[^=]*=[ ]*$// |
12256 | }' | |
12257 | fi | |
bec39cab | 12258 | |
81ecdfbb RW |
12259 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
12260 | fi # test -n "$CONFIG_FILES" | |
bec39cab | 12261 | |
81ecdfbb RW |
12262 | # Set up the scripts for CONFIG_HEADERS section. |
12263 | # No need to generate them if there are no CONFIG_HEADERS. | |
12264 | # This happens for instance with `./config.status Makefile'. | |
12265 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 12266 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb | 12267 | BEGIN { |
b80864fb DJ |
12268 | _ACEOF |
12269 | ||
81ecdfbb RW |
12270 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
12271 | # here-document in config.status, that substitutes the proper values into | |
12272 | # config.h.in to produce config.h. | |
12273 | ||
12274 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
12275 | # handling of long lines. | |
12276 | ac_delim='%!_!# ' | |
12277 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
12278 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
12279 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
12280 | break |
12281 | elif $ac_last_try; then | |
d0ac1c44 | 12282 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
12283 | else |
12284 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
d6e9fb05 | 12285 | fi |
81ecdfbb | 12286 | done |
d6e9fb05 | 12287 | |
81ecdfbb RW |
12288 | # For the awk script, D is an array of macro values keyed by name, |
12289 | # likewise P contains macro parameters if any. Preserve backslash | |
12290 | # newline sequences. | |
12291 | ||
12292 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
12293 | sed -n ' | |
12294 | s/.\{148\}/&'"$ac_delim"'/g | |
12295 | t rset | |
12296 | :rset | |
12297 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
12298 | t def | |
12299 | d | |
12300 | :def | |
12301 | s/\\$// | |
12302 | t bsnl | |
12303 | s/["\\]/\\&/g | |
12304 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
12305 | D["\1"]=" \3"/p | |
12306 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
12307 | d | |
12308 | :bsnl | |
12309 | s/["\\]/\\&/g | |
12310 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
12311 | D["\1"]=" \3\\\\\\n"\\/p | |
12312 | t cont | |
12313 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
12314 | t cont | |
12315 | d | |
12316 | :cont | |
12317 | n | |
12318 | s/.\{148\}/&'"$ac_delim"'/g | |
12319 | t clear | |
12320 | :clear | |
12321 | s/\\$// | |
12322 | t bsnlc | |
12323 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
12324 | d | |
12325 | :bsnlc | |
12326 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
12327 | b cont | |
12328 | ' <confdefs.h | sed ' | |
12329 | s/'"$ac_delim"'/"\\\ | |
12330 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
12331 | ||
12332 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12333 | for (key in D) D_is_set[key] = 1 | |
12334 | FS = "\a" | |
12335 | } | |
12336 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
12337 | line = \$ 0 | |
12338 | split(line, arg, " ") | |
12339 | if (arg[1] == "#") { | |
12340 | defundef = arg[2] | |
12341 | mac1 = arg[3] | |
12342 | } else { | |
12343 | defundef = substr(arg[1], 2) | |
12344 | mac1 = arg[2] | |
12345 | } | |
12346 | split(mac1, mac2, "(") #) | |
12347 | macro = mac2[1] | |
12348 | prefix = substr(line, 1, index(line, defundef) - 1) | |
12349 | if (D_is_set[macro]) { | |
12350 | # Preserve the white space surrounding the "#". | |
12351 | print prefix "define", macro P[macro] D[macro] | |
12352 | next | |
12353 | } else { | |
12354 | # Replace #undef with comments. This is necessary, for example, | |
12355 | # in the case of _POSIX_SOURCE, which is predefined and required | |
12356 | # on some systems where configure will not decide to define it. | |
12357 | if (defundef == "undef") { | |
12358 | print "/*", prefix defundef, macro, "*/" | |
12359 | next | |
12360 | } | |
12361 | } | |
12362 | } | |
12363 | { print } | |
12364 | _ACAWK | |
bec39cab | 12365 | _ACEOF |
81ecdfbb | 12366 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 12367 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb RW |
12368 | fi # test -n "$CONFIG_HEADERS" |
12369 | ||
12370 | ||
12371 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
12372 | shift | |
12373 | for ac_tag | |
12374 | do | |
12375 | case $ac_tag in | |
12376 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
12377 | esac | |
12378 | case $ac_mode$ac_tag in | |
12379 | :[FHL]*:*);; | |
d0ac1c44 | 12380 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
12381 | :[FH]-) ac_tag=-:-;; |
12382 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
12383 | esac | |
12384 | ac_save_IFS=$IFS | |
12385 | IFS=: | |
12386 | set x $ac_tag | |
12387 | IFS=$ac_save_IFS | |
12388 | shift | |
12389 | ac_file=$1 | |
12390 | shift | |
12391 | ||
12392 | case $ac_mode in | |
12393 | :L) ac_source=$1;; | |
12394 | :[FH]) | |
12395 | ac_file_inputs= | |
12396 | for ac_f | |
12397 | do | |
12398 | case $ac_f in | |
d0ac1c44 | 12399 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
12400 | *) # Look for the file first in the build tree, then in the source tree |
12401 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
12402 | # because $ac_f cannot contain `:'. | |
12403 | test -f "$ac_f" || | |
12404 | case $ac_f in | |
12405 | [\\/$]*) false;; | |
12406 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
12407 | esac || | |
d0ac1c44 | 12408 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
12409 | esac |
12410 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
12411 | as_fn_append ac_file_inputs " '$ac_f'" | |
12412 | done | |
12413 | ||
12414 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
12415 | # use $as_me), people would be surprised to read: | |
12416 | # /* config.h. Generated by config.status. */ | |
12417 | configure_input='Generated from '` | |
12418 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
12419 | `' by configure.' | |
12420 | if test x"$ac_file" != x-; then | |
12421 | configure_input="$ac_file. $configure_input" | |
12422 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
12423 | $as_echo "$as_me: creating $ac_file" >&6;} | |
12424 | fi | |
12425 | # Neutralize special characters interpreted by sed in replacement strings. | |
12426 | case $configure_input in #( | |
12427 | *\&* | *\|* | *\\* ) | |
12428 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
12429 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
12430 | *) ac_sed_conf_input=$configure_input;; | |
12431 | esac | |
12432 | ||
12433 | case $ac_tag in | |
d0ac1c44 SM |
12434 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
12435 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
12436 | esac |
12437 | ;; | |
d6e9fb05 JK |
12438 | esac |
12439 | ||
81ecdfbb | 12440 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
12441 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
12442 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
12443 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
12444 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
12445 | $as_echo X"$ac_file" | | |
12446 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
12447 | s//\1/ | |
12448 | q | |
12449 | } | |
12450 | /^X\(\/\/\)[^/].*/{ | |
12451 | s//\1/ | |
12452 | q | |
12453 | } | |
12454 | /^X\(\/\/\)$/{ | |
12455 | s//\1/ | |
12456 | q | |
12457 | } | |
12458 | /^X\(\/\).*/{ | |
12459 | s//\1/ | |
12460 | q | |
12461 | } | |
12462 | s/.*/./; q'` | |
12463 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
12464 | ac_builddir=. |
12465 | ||
81ecdfbb RW |
12466 | case "$ac_dir" in |
12467 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
12468 | *) | |
12469 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
12470 | # A ".." for each directory in $ac_dir_suffix. | |
12471 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
12472 | case $ac_top_builddir_sub in | |
12473 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
12474 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
12475 | esac ;; | |
12476 | esac | |
12477 | ac_abs_top_builddir=$ac_pwd | |
12478 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
12479 | # for backward compatibility: | |
12480 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
12481 | |
12482 | case $srcdir in | |
81ecdfbb | 12483 | .) # We are building in place. |
bec39cab | 12484 | ac_srcdir=. |
81ecdfbb RW |
12485 | ac_top_srcdir=$ac_top_builddir_sub |
12486 | ac_abs_top_srcdir=$ac_pwd ;; | |
12487 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 12488 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
12489 | ac_top_srcdir=$srcdir |
12490 | ac_abs_top_srcdir=$srcdir ;; | |
12491 | *) # Relative name. | |
12492 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
12493 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
12494 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 12495 | esac |
81ecdfbb | 12496 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 12497 | |
bec39cab | 12498 | |
81ecdfbb RW |
12499 | case $ac_mode in |
12500 | :F) | |
12501 | # | |
12502 | # CONFIG_FILE | |
12503 | # | |
d6e9fb05 | 12504 | |
bec39cab AC |
12505 | case $INSTALL in |
12506 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 12507 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
d6e9fb05 | 12508 | esac |
81ecdfbb | 12509 | _ACEOF |
3db0444b | 12510 | |
81ecdfbb RW |
12511 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
12512 | # If the template does not know about datarootdir, expand it. | |
12513 | # FIXME: This hack should be removed a few years after 2.60. | |
12514 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
12515 | ac_sed_dataroot=' | |
12516 | /datarootdir/ { | |
12517 | p | |
12518 | q | |
12519 | } | |
12520 | /@datadir@/p | |
12521 | /@docdir@/p | |
12522 | /@infodir@/p | |
12523 | /@localedir@/p | |
12524 | /@mandir@/p' | |
12525 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
12526 | *datarootdir*) ac_datarootdir_seen=yes;; | |
12527 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
12528 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
12529 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
12530 | _ACEOF | |
12531 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12532 | ac_datarootdir_hack=' | |
12533 | s&@datadir@&$datadir&g | |
12534 | s&@docdir@&$docdir&g | |
12535 | s&@infodir@&$infodir&g | |
12536 | s&@localedir@&$localedir&g | |
12537 | s&@mandir@&$mandir&g | |
12538 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
12539 | esac | |
bec39cab | 12540 | _ACEOF |
81ecdfbb RW |
12541 | |
12542 | # Neutralize VPATH when `$srcdir' = `.'. | |
12543 | # Shell code in configure.ac might set extrasub. | |
12544 | # FIXME: do we really want to maintain this feature? | |
12545 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12546 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
12547 | $extrasub |
12548 | _ACEOF | |
81ecdfbb | 12549 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
12550 | :t |
12551 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
12552 | s|@configure_input@|$ac_sed_conf_input|;t t |
12553 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
12554 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
12555 | s&@srcdir@&$ac_srcdir&;t t | |
12556 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
12557 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
12558 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
12559 | s&@builddir@&$ac_builddir&;t t | |
12560 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
12561 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
12562 | s&@INSTALL@&$ac_INSTALL&;t t | |
12563 | $ac_datarootdir_hack | |
12564 | " | |
d0ac1c44 SM |
12565 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
12566 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
12567 | |
12568 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
12569 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
12570 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
12571 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 12572 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 12573 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 12574 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 12575 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 12576 | |
d0ac1c44 | 12577 | rm -f "$ac_tmp/stdin" |
bec39cab | 12578 | case $ac_file in |
d0ac1c44 SM |
12579 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
12580 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 12581 | esac \ |
d0ac1c44 | 12582 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
12583 | ;; |
12584 | :H) | |
12585 | # | |
12586 | # CONFIG_HEADER | |
12587 | # | |
bec39cab | 12588 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
12589 | { |
12590 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
12591 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
12592 | } >"$ac_tmp/config.h" \ | |
12593 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
12594 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
12595 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
12596 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 12597 | else |
81ecdfbb | 12598 | rm -f "$ac_file" |
d0ac1c44 SM |
12599 | mv "$ac_tmp/config.h" "$ac_file" \ |
12600 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
84563040 | 12601 | fi |
bec39cab | 12602 | else |
81ecdfbb | 12603 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
12604 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
12605 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
d6e9fb05 | 12606 | fi |
81ecdfbb | 12607 | ;; |
dae5f5cf | 12608 | |
81ecdfbb RW |
12609 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
12610 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
12611 | ;; | |
12612 | esac | |
dae5f5cf DJ |
12613 | |
12614 | ||
81ecdfbb | 12615 | case $ac_file$ac_mode in |
c5adaa19 | 12616 | "config.h":H) echo > stamp-h ;; |
61c125b9 | 12617 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
60d6cfc9 YQ |
12618 | "gdbdepdir":C) |
12619 | for subdir in ${CONFIG_SRC_SUBDIR} | |
12620 | do | |
12621 | $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
12622 | done ;; | |
81ecdfbb | 12623 | |
bec39cab | 12624 | esac |
81ecdfbb | 12625 | done # for ac_tag |
d6e9fb05 | 12626 | |
bec39cab | 12627 | |
81ecdfbb | 12628 | as_fn_exit 0 |
bec39cab | 12629 | _ACEOF |
bec39cab AC |
12630 | ac_clean_files=$ac_clean_files_save |
12631 | ||
81ecdfbb | 12632 | test $ac_write_fail = 0 || |
d0ac1c44 | 12633 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 12634 | |
bec39cab AC |
12635 | |
12636 | # configure is writing to config.log, and then calls config.status. | |
12637 | # config.status does its own redirection, appending to config.log. | |
12638 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
12639 | # by configure, so config.status won't be able to write to it; its | |
12640 | # output is simply discarded. So we exec the FD to /dev/null, | |
12641 | # effectively closing config.log, so it can be properly (re)opened and | |
12642 | # appended to by config.status. When coming back to configure, we | |
12643 | # need to make the FD available again. | |
12644 | if test "$no_create" != yes; then | |
12645 | ac_cs_success=: | |
12646 | ac_config_status_args= | |
12647 | test "$silent" = yes && | |
12648 | ac_config_status_args="$ac_config_status_args --quiet" | |
12649 | exec 5>/dev/null | |
12650 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
12651 | exec 5>>config.log | |
12652 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
12653 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 12654 | $ac_cs_success || as_fn_exit 1 |
81ecdfbb RW |
12655 | fi |
12656 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
12657 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
12658 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
bec39cab | 12659 | fi |
d6e9fb05 | 12660 |