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 |
05ea2a05 TT |
659 | LTLIBIPT |
660 | LIBIPT | |
661 | HAVE_LIBIPT | |
5e030278 TT |
662 | PTHREAD_CFLAGS |
663 | PTHREAD_LIBS | |
664 | PTHREAD_CC | |
665 | ax_pthread_config | |
666 | SED | |
9c232dda | 667 | ALLOCA |
0bcda685 PA |
668 | CXX_DIALECT |
669 | HAVE_CXX11 | |
c971b7fa | 670 | RANLIB |
e1d2394b | 671 | AR |
81ecdfbb RW |
672 | INSTALL_DATA |
673 | INSTALL_SCRIPT | |
674 | INSTALL_PROGRAM | |
675 | target_os | |
676 | target_vendor | |
677 | target_cpu | |
678 | target | |
679 | host_os | |
680 | host_vendor | |
681 | host_cpu | |
682 | host | |
683 | build_os | |
684 | build_vendor | |
685 | build_cpu | |
686 | build | |
bdaed379 HD |
687 | INSTALL_STRIP_PROGRAM |
688 | STRIP | |
689 | install_sh | |
770d76d7 PA |
690 | EGREP |
691 | GREP | |
692 | CPP | |
3bc3d82a PA |
693 | ac_ct_CXX |
694 | CXXFLAGS | |
695 | CXX | |
81ecdfbb RW |
696 | OBJEXT |
697 | EXEEXT | |
698 | ac_ct_CC | |
699 | CPPFLAGS | |
700 | LDFLAGS | |
701 | CFLAGS | |
702 | CC | |
c9a1864a YQ |
703 | MAINT |
704 | MAINTAINER_MODE_FALSE | |
705 | MAINTAINER_MODE_TRUE | |
81ecdfbb RW |
706 | target_alias |
707 | host_alias | |
708 | build_alias | |
709 | LIBS | |
710 | ECHO_T | |
711 | ECHO_N | |
712 | ECHO_C | |
713 | DEFS | |
714 | mandir | |
715 | localedir | |
716 | libdir | |
717 | psdir | |
718 | pdfdir | |
719 | dvidir | |
720 | htmldir | |
721 | infodir | |
722 | docdir | |
723 | oldincludedir | |
724 | includedir | |
725 | localstatedir | |
726 | sharedstatedir | |
727 | sysconfdir | |
728 | datadir | |
729 | datarootdir | |
730 | libexecdir | |
731 | sbindir | |
732 | bindir | |
733 | program_transform_name | |
734 | prefix | |
735 | exec_prefix | |
736 | PACKAGE_URL | |
737 | PACKAGE_BUGREPORT | |
738 | PACKAGE_STRING | |
739 | PACKAGE_VERSION | |
740 | PACKAGE_TARNAME | |
741 | PACKAGE_NAME | |
742 | PATH_SEPARATOR | |
743 | SHELL' | |
bec39cab | 744 | ac_subst_files='' |
81ecdfbb RW |
745 | ac_user_opts=' |
746 | enable_option_checking | |
c9a1864a | 747 | enable_maintainer_mode |
589bc927 | 748 | enable_largefile |
05ea2a05 TT |
749 | with_intel_pt |
750 | with_gnu_ld | |
751 | enable_rpath | |
752 | with_libipt_prefix | |
9f1528a1 | 753 | with_libipt_type |
db6878ac | 754 | enable_unit_tests |
0fb4aa4b PA |
755 | with_ust |
756 | with_ust_include | |
757 | with_ust_lib | |
d4596a3d | 758 | enable_werror |
8f13a3ce MF |
759 | enable_build_warnings |
760 | enable_gdb_build_warnings | |
81ecdfbb RW |
761 | with_pkgversion |
762 | with_bugurl | |
96f15937 | 763 | with_libthread_db |
c2a66c29 | 764 | enable_inprocess_agent |
81ecdfbb RW |
765 | ' |
766 | ac_precious_vars='build_alias | |
767 | host_alias | |
768 | target_alias | |
769 | CC | |
770 | CFLAGS | |
771 | LDFLAGS | |
772 | LIBS | |
773 | CPPFLAGS | |
3bc3d82a PA |
774 | CXX |
775 | CXXFLAGS | |
776 | CCC | |
81ecdfbb RW |
777 | CPP' |
778 | ||
d6e9fb05 JK |
779 | |
780 | # Initialize some variables set by options. | |
bec39cab AC |
781 | ac_init_help= |
782 | ac_init_version=false | |
81ecdfbb RW |
783 | ac_unrecognized_opts= |
784 | ac_unrecognized_sep= | |
d6e9fb05 JK |
785 | # The variables have the same names as the options, with |
786 | # dashes changed to underlines. | |
bec39cab | 787 | cache_file=/dev/null |
d6e9fb05 | 788 | exec_prefix=NONE |
d6e9fb05 | 789 | no_create= |
d6e9fb05 JK |
790 | no_recursion= |
791 | prefix=NONE | |
792 | program_prefix=NONE | |
793 | program_suffix=NONE | |
794 | program_transform_name=s,x,x, | |
795 | silent= | |
796 | site= | |
797 | srcdir= | |
d6e9fb05 JK |
798 | verbose= |
799 | x_includes=NONE | |
800 | x_libraries=NONE | |
bec39cab AC |
801 | |
802 | # Installation directory options. | |
803 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
804 | # and all the variables that are supposed to be based on exec_prefix | |
805 | # by default will actually change. | |
806 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 807 | # (The list follows the same order as the GNU Coding Standards.) |
d6e9fb05 JK |
808 | bindir='${exec_prefix}/bin' |
809 | sbindir='${exec_prefix}/sbin' | |
810 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
811 | datarootdir='${prefix}/share' |
812 | datadir='${datarootdir}' | |
d6e9fb05 JK |
813 | sysconfdir='${prefix}/etc' |
814 | sharedstatedir='${prefix}/com' | |
815 | localstatedir='${prefix}/var' | |
d6e9fb05 JK |
816 | includedir='${prefix}/include' |
817 | oldincludedir='/usr/include' | |
81ecdfbb RW |
818 | docdir='${datarootdir}/doc/${PACKAGE}' |
819 | infodir='${datarootdir}/info' | |
820 | htmldir='${docdir}' | |
821 | dvidir='${docdir}' | |
822 | pdfdir='${docdir}' | |
823 | psdir='${docdir}' | |
824 | libdir='${exec_prefix}/lib' | |
825 | localedir='${datarootdir}/locale' | |
826 | mandir='${datarootdir}/man' | |
d6e9fb05 | 827 | |
d6e9fb05 | 828 | ac_prev= |
81ecdfbb | 829 | ac_dashdash= |
d6e9fb05 JK |
830 | for ac_option |
831 | do | |
d6e9fb05 JK |
832 | # If the previous option needs an argument, assign it. |
833 | if test -n "$ac_prev"; then | |
81ecdfbb | 834 | eval $ac_prev=\$ac_option |
d6e9fb05 JK |
835 | ac_prev= |
836 | continue | |
837 | fi | |
838 | ||
81ecdfbb | 839 | case $ac_option in |
d0ac1c44 SM |
840 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
841 | *=) ac_optarg= ;; | |
842 | *) ac_optarg=yes ;; | |
81ecdfbb | 843 | esac |
d6e9fb05 JK |
844 | |
845 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
846 | ||
81ecdfbb RW |
847 | case $ac_dashdash$ac_option in |
848 | --) | |
849 | ac_dashdash=yes ;; | |
d6e9fb05 JK |
850 | |
851 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
852 | ac_prev=bindir ;; | |
853 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 854 | bindir=$ac_optarg ;; |
d6e9fb05 JK |
855 | |
856 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 857 | ac_prev=build_alias ;; |
d6e9fb05 | 858 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 859 | build_alias=$ac_optarg ;; |
d6e9fb05 JK |
860 | |
861 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
862 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
863 | ac_prev=cache_file ;; | |
864 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
865 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
866 | cache_file=$ac_optarg ;; |
867 | ||
868 | --config-cache | -C) | |
869 | cache_file=config.cache ;; | |
d6e9fb05 | 870 | |
81ecdfbb | 871 | -datadir | --datadir | --datadi | --datad) |
d6e9fb05 | 872 | ac_prev=datadir ;; |
81ecdfbb | 873 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 874 | datadir=$ac_optarg ;; |
d6e9fb05 | 875 | |
81ecdfbb RW |
876 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
877 | | --dataroo | --dataro | --datar) | |
878 | ac_prev=datarootdir ;; | |
879 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
880 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
881 | datarootdir=$ac_optarg ;; | |
882 | ||
d6e9fb05 | 883 | -disable-* | --disable-*) |
81ecdfbb | 884 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
d6e9fb05 | 885 | # Reject names that are not valid shell variable names. |
81ecdfbb | 886 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 887 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
888 | ac_useropt_orig=$ac_useropt |
889 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
890 | case $ac_user_opts in | |
891 | *" | |
892 | "enable_$ac_useropt" | |
893 | "*) ;; | |
894 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
895 | ac_unrecognized_sep=', ';; | |
896 | esac | |
897 | eval enable_$ac_useropt=no ;; | |
898 | ||
899 | -docdir | --docdir | --docdi | --doc | --do) | |
900 | ac_prev=docdir ;; | |
901 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
902 | docdir=$ac_optarg ;; | |
903 | ||
904 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
905 | ac_prev=dvidir ;; | |
906 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
907 | dvidir=$ac_optarg ;; | |
d6e9fb05 JK |
908 | |
909 | -enable-* | --enable-*) | |
81ecdfbb | 910 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
d6e9fb05 | 911 | # Reject names that are not valid shell variable names. |
81ecdfbb | 912 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 913 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
914 | ac_useropt_orig=$ac_useropt |
915 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
916 | case $ac_user_opts in | |
917 | *" | |
918 | "enable_$ac_useropt" | |
919 | "*) ;; | |
920 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
921 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 922 | esac |
81ecdfbb | 923 | eval enable_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
924 | |
925 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
926 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
927 | | --exec | --exe | --ex) | |
928 | ac_prev=exec_prefix ;; | |
929 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
930 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
931 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 932 | exec_prefix=$ac_optarg ;; |
d6e9fb05 JK |
933 | |
934 | -gas | --gas | --ga | --g) | |
935 | # Obsolete; use --with-gas. | |
936 | with_gas=yes ;; | |
937 | ||
bec39cab AC |
938 | -help | --help | --hel | --he | -h) |
939 | ac_init_help=long ;; | |
940 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
941 | ac_init_help=recursive ;; | |
942 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
943 | ac_init_help=short ;; | |
d6e9fb05 JK |
944 | |
945 | -host | --host | --hos | --ho) | |
bec39cab | 946 | ac_prev=host_alias ;; |
d6e9fb05 | 947 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 948 | host_alias=$ac_optarg ;; |
d6e9fb05 | 949 | |
81ecdfbb RW |
950 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
951 | ac_prev=htmldir ;; | |
952 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
953 | | --ht=*) | |
954 | htmldir=$ac_optarg ;; | |
955 | ||
d6e9fb05 JK |
956 | -includedir | --includedir | --includedi | --included | --include \ |
957 | | --includ | --inclu | --incl | --inc) | |
958 | ac_prev=includedir ;; | |
959 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
960 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 961 | includedir=$ac_optarg ;; |
d6e9fb05 JK |
962 | |
963 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
964 | ac_prev=infodir ;; | |
965 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 966 | infodir=$ac_optarg ;; |
d6e9fb05 JK |
967 | |
968 | -libdir | --libdir | --libdi | --libd) | |
969 | ac_prev=libdir ;; | |
970 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 971 | libdir=$ac_optarg ;; |
d6e9fb05 JK |
972 | |
973 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
974 | | --libexe | --libex | --libe) | |
975 | ac_prev=libexecdir ;; | |
976 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
977 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 978 | libexecdir=$ac_optarg ;; |
d6e9fb05 | 979 | |
81ecdfbb RW |
980 | -localedir | --localedir | --localedi | --localed | --locale) |
981 | ac_prev=localedir ;; | |
982 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
983 | localedir=$ac_optarg ;; | |
984 | ||
d6e9fb05 | 985 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 986 | | --localstate | --localstat | --localsta | --localst | --locals) |
d6e9fb05 JK |
987 | ac_prev=localstatedir ;; |
988 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 989 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 990 | localstatedir=$ac_optarg ;; |
d6e9fb05 JK |
991 | |
992 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
993 | ac_prev=mandir ;; | |
994 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 995 | mandir=$ac_optarg ;; |
d6e9fb05 JK |
996 | |
997 | -nfp | --nfp | --nf) | |
998 | # Obsolete; use --without-fp. | |
999 | with_fp=no ;; | |
1000 | ||
1001 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1002 | | --no-cr | --no-c | -n) |
d6e9fb05 JK |
1003 | no_create=yes ;; |
1004 | ||
1005 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1006 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1007 | no_recursion=yes ;; | |
1008 | ||
1009 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1010 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1011 | | --oldin | --oldi | --old | --ol | --o) | |
1012 | ac_prev=oldincludedir ;; | |
1013 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1014 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1015 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1016 | oldincludedir=$ac_optarg ;; |
d6e9fb05 JK |
1017 | |
1018 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1019 | ac_prev=prefix ;; | |
1020 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1021 | prefix=$ac_optarg ;; |
d6e9fb05 JK |
1022 | |
1023 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1024 | | --program-pre | --program-pr | --program-p) | |
1025 | ac_prev=program_prefix ;; | |
1026 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1027 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1028 | program_prefix=$ac_optarg ;; |
d6e9fb05 JK |
1029 | |
1030 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1031 | | --program-suf | --program-su | --program-s) | |
1032 | ac_prev=program_suffix ;; | |
1033 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1034 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1035 | program_suffix=$ac_optarg ;; |
d6e9fb05 JK |
1036 | |
1037 | -program-transform-name | --program-transform-name \ | |
1038 | | --program-transform-nam | --program-transform-na \ | |
1039 | | --program-transform-n | --program-transform- \ | |
1040 | | --program-transform | --program-transfor \ | |
1041 | | --program-transfo | --program-transf \ | |
1042 | | --program-trans | --program-tran \ | |
1043 | | --progr-tra | --program-tr | --program-t) | |
1044 | ac_prev=program_transform_name ;; | |
1045 | -program-transform-name=* | --program-transform-name=* \ | |
1046 | | --program-transform-nam=* | --program-transform-na=* \ | |
1047 | | --program-transform-n=* | --program-transform-=* \ | |
1048 | | --program-transform=* | --program-transfor=* \ | |
1049 | | --program-transfo=* | --program-transf=* \ | |
1050 | | --program-trans=* | --program-tran=* \ | |
1051 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1052 | program_transform_name=$ac_optarg ;; |
d6e9fb05 | 1053 | |
81ecdfbb RW |
1054 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1055 | ac_prev=pdfdir ;; | |
1056 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1057 | pdfdir=$ac_optarg ;; | |
1058 | ||
1059 | -psdir | --psdir | --psdi | --psd | --ps) | |
1060 | ac_prev=psdir ;; | |
1061 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1062 | psdir=$ac_optarg ;; | |
1063 | ||
d6e9fb05 JK |
1064 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1065 | | -silent | --silent | --silen | --sile | --sil) | |
1066 | silent=yes ;; | |
1067 | ||
1068 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1069 | ac_prev=sbindir ;; | |
1070 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1071 | | --sbi=* | --sb=*) | |
bec39cab | 1072 | sbindir=$ac_optarg ;; |
d6e9fb05 JK |
1073 | |
1074 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1075 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1076 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1077 | | --sha | --sh) | |
1078 | ac_prev=sharedstatedir ;; | |
1079 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1080 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1081 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1082 | | --sha=* | --sh=*) | |
bec39cab | 1083 | sharedstatedir=$ac_optarg ;; |
d6e9fb05 JK |
1084 | |
1085 | -site | --site | --sit) | |
1086 | ac_prev=site ;; | |
1087 | -site=* | --site=* | --sit=*) | |
bec39cab | 1088 | site=$ac_optarg ;; |
434c4c77 | 1089 | |
d6e9fb05 JK |
1090 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1091 | ac_prev=srcdir ;; | |
1092 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1093 | srcdir=$ac_optarg ;; |
d6e9fb05 JK |
1094 | |
1095 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1096 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1097 | ac_prev=sysconfdir ;; | |
1098 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1099 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1100 | sysconfdir=$ac_optarg ;; |
d6e9fb05 JK |
1101 | |
1102 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1103 | ac_prev=target_alias ;; |
d6e9fb05 | 1104 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1105 | target_alias=$ac_optarg ;; |
d6e9fb05 JK |
1106 | |
1107 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1108 | verbose=yes ;; | |
1109 | ||
bec39cab AC |
1110 | -version | --version | --versio | --versi | --vers | -V) |
1111 | ac_init_version=: ;; | |
d6e9fb05 JK |
1112 | |
1113 | -with-* | --with-*) | |
81ecdfbb | 1114 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
d6e9fb05 | 1115 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1116 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1117 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1118 | ac_useropt_orig=$ac_useropt |
1119 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1120 | case $ac_user_opts in | |
1121 | *" | |
1122 | "with_$ac_useropt" | |
1123 | "*) ;; | |
1124 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1125 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 1126 | esac |
81ecdfbb | 1127 | eval with_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
1128 | |
1129 | -without-* | --without-*) | |
81ecdfbb | 1130 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
d6e9fb05 | 1131 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1132 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1133 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1134 | ac_useropt_orig=$ac_useropt |
1135 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1136 | case $ac_user_opts in | |
1137 | *" | |
1138 | "with_$ac_useropt" | |
1139 | "*) ;; | |
1140 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1141 | ac_unrecognized_sep=', ';; | |
1142 | esac | |
1143 | eval with_$ac_useropt=no ;; | |
d6e9fb05 JK |
1144 | |
1145 | --x) | |
1146 | # Obsolete; use --with-x. | |
1147 | with_x=yes ;; | |
1148 | ||
1149 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1150 | | --x-incl | --x-inc | --x-in | --x-i) | |
1151 | ac_prev=x_includes ;; | |
1152 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1153 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1154 | x_includes=$ac_optarg ;; |
d6e9fb05 JK |
1155 | |
1156 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1157 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1158 | ac_prev=x_libraries ;; | |
1159 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1160 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1161 | x_libraries=$ac_optarg ;; |
d6e9fb05 | 1162 | |
d0ac1c44 SM |
1163 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1164 | Try \`$0 --help' for more information" | |
d6e9fb05 JK |
1165 | ;; |
1166 | ||
bec39cab AC |
1167 | *=*) |
1168 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1169 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1170 | case $ac_envvar in #( |
1171 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1172 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1173 | esac |
1174 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1175 | export $ac_envvar ;; |
1176 | ||
d6e9fb05 | 1177 | *) |
bec39cab | 1178 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1179 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1180 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1181 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1182 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
d6e9fb05 JK |
1183 | ;; |
1184 | ||
1185 | esac | |
1186 | done | |
1187 | ||
1188 | if test -n "$ac_prev"; then | |
bec39cab | 1189 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1190 | as_fn_error $? "missing argument to $ac_option" |
d6e9fb05 | 1191 | fi |
d6e9fb05 | 1192 | |
81ecdfbb RW |
1193 | if test -n "$ac_unrecognized_opts"; then |
1194 | case $enable_option_checking in | |
1195 | no) ;; | |
d0ac1c44 | 1196 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1197 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
dae5f5cf | 1198 | esac |
81ecdfbb | 1199 | fi |
dae5f5cf | 1200 | |
81ecdfbb RW |
1201 | # Check all directory arguments for consistency. |
1202 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1203 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1204 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1205 | libdir localedir mandir | |
dae5f5cf | 1206 | do |
81ecdfbb RW |
1207 | eval ac_val=\$$ac_var |
1208 | # Remove trailing slashes. | |
1209 | case $ac_val in | |
1210 | */ ) | |
1211 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1212 | eval $ac_var=\$ac_val;; | |
1213 | esac | |
1214 | # Be sure to have absolute directory names. | |
dae5f5cf | 1215 | case $ac_val in |
81ecdfbb RW |
1216 | [\\/$]* | ?:[\\/]* ) continue;; |
1217 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
d6e9fb05 | 1218 | esac |
d0ac1c44 | 1219 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
d6e9fb05 JK |
1220 | done |
1221 | ||
bec39cab AC |
1222 | # There might be people who depend on the old broken behavior: `$host' |
1223 | # used to hold the argument of --host etc. | |
1224 | # FIXME: To remove some day. | |
1225 | build=$build_alias | |
1226 | host=$host_alias | |
1227 | target=$target_alias | |
1228 | ||
1229 | # FIXME: To remove some day. | |
1230 | if test "x$host_alias" != x; then | |
1231 | if test "x$build_alias" = x; then | |
1232 | cross_compiling=maybe | |
bec39cab AC |
1233 | elif test "x$build_alias" != "x$host_alias"; then |
1234 | cross_compiling=yes | |
1235 | fi | |
1236 | fi | |
d6e9fb05 | 1237 | |
bec39cab AC |
1238 | ac_tool_prefix= |
1239 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1240 | ||
1241 | test "$silent" = yes && exec 6>/dev/null | |
d6e9fb05 | 1242 | |
d6e9fb05 | 1243 | |
81ecdfbb RW |
1244 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1245 | ac_ls_di=`ls -di .` && | |
1246 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1247 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1248 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1249 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1250 | |
1251 | ||
d6e9fb05 JK |
1252 | # Find the source files, if location was not specified. |
1253 | if test -z "$srcdir"; then | |
1254 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1255 | # Try the directory containing this script, then the parent directory. |
1256 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1257 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1258 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1259 | X"$as_myself" : 'X\(//\)$' \| \ | |
1260 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1261 | $as_echo X"$as_myself" | | |
1262 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1263 | s//\1/ | |
1264 | q | |
1265 | } | |
1266 | /^X\(\/\/\)[^/].*/{ | |
1267 | s//\1/ | |
1268 | q | |
1269 | } | |
1270 | /^X\(\/\/\)$/{ | |
1271 | s//\1/ | |
1272 | q | |
1273 | } | |
1274 | /^X\(\/\).*/{ | |
1275 | s//\1/ | |
1276 | q | |
1277 | } | |
1278 | s/.*/./; q'` | |
d6e9fb05 | 1279 | srcdir=$ac_confdir |
81ecdfbb | 1280 | if test ! -r "$srcdir/$ac_unique_file"; then |
d6e9fb05 JK |
1281 | srcdir=.. |
1282 | fi | |
1283 | else | |
1284 | ac_srcdir_defaulted=no | |
1285 | fi | |
81ecdfbb RW |
1286 | if test ! -r "$srcdir/$ac_unique_file"; then |
1287 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1288 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1289 | fi |
1290 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1291 | ac_abs_confdir=`( | |
d0ac1c44 | 1292 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1293 | pwd)` |
1294 | # When building in place, set srcdir=. | |
1295 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1296 | srcdir=. | |
1297 | fi | |
1298 | # Remove unnecessary trailing slashes from srcdir. | |
1299 | # Double slashes in file names in object file debugging info | |
1300 | # mess up M-x gdb in Emacs. | |
1301 | case $srcdir in | |
1302 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1303 | esac | |
1304 | for ac_var in $ac_precious_vars; do | |
1305 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1306 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1307 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1308 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1309 | done | |
d6e9fb05 | 1310 | |
bec39cab AC |
1311 | # |
1312 | # Report the --help message. | |
1313 | # | |
1314 | if test "$ac_init_help" = "long"; then | |
1315 | # Omit some internal or obsolete options to make the list less imposing. | |
1316 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1317 | cat <<_ACEOF | |
1318 | \`configure' configures this package to adapt to many kinds of systems. | |
1319 | ||
1320 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1321 | ||
1322 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1323 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1324 | ||
1325 | Defaults for the options are specified in brackets. | |
1326 | ||
1327 | Configuration: | |
1328 | -h, --help display this help and exit | |
1329 | --help=short display options specific to this package | |
1330 | --help=recursive display the short help of all the included packages | |
1331 | -V, --version display version information and exit | |
d0ac1c44 | 1332 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1333 | --cache-file=FILE cache test results in FILE [disabled] |
1334 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1335 | -n, --no-create do not create output files | |
1336 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1337 | ||
bec39cab AC |
1338 | Installation directories: |
1339 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1340 | [$ac_default_prefix] |
bec39cab | 1341 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1342 | [PREFIX] |
bec39cab AC |
1343 | |
1344 | By default, \`make install' will install all the files in | |
1345 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1346 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1347 | for instance \`--prefix=\$HOME'. | |
1348 | ||
1349 | For better control, use the options below. | |
1350 | ||
1351 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1352 | --bindir=DIR user executables [EPREFIX/bin] |
1353 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1354 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1355 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1356 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1357 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1358 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1359 | --includedir=DIR C header files [PREFIX/include] | |
1360 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1361 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1362 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1363 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1364 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1365 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1366 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1367 | --htmldir=DIR html documentation [DOCDIR] | |
1368 | --dvidir=DIR dvi documentation [DOCDIR] | |
1369 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1370 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1371 | _ACEOF |
1372 | ||
1373 | cat <<\_ACEOF | |
1374 | ||
dcdb98d2 DJ |
1375 | Program names: |
1376 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1377 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1378 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1379 | ||
bec39cab AC |
1380 | System types: |
1381 | --build=BUILD configure for building on BUILD [guessed] | |
1382 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1383 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1384 | _ACEOF | |
1385 | fi | |
1386 | ||
1387 | if test -n "$ac_init_help"; then | |
1388 | ||
1389 | cat <<\_ACEOF | |
1390 | ||
d4596a3d PA |
1391 | Optional Features: |
1392 | --disable-option-checking ignore unrecognized --enable/--with options | |
1393 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1394 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1395 | --enable-maintainer-mode |
1396 | enable make rules and dependencies not useful (and | |
1397 | sometimes confusing) to the casual installer | |
589bc927 | 1398 | --disable-largefile omit support for large files |
db6878ac | 1399 | --disable-rpath do not hardcode runtime library paths |
8ecfd7bd SDJ |
1400 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1401 | GDB | |
d4596a3d | 1402 | --enable-werror treat compile warnings as errors |
8f13a3ce MF |
1403 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
1404 | --enable-gdb-build-warnings | |
1405 | enable GDB specific build-time compiler warnings if | |
1406 | gcc is used | |
c2a66c29 NS |
1407 | --enable-inprocess-agent |
1408 | inprocess agent | |
d4596a3d | 1409 | |
c16158bc JM |
1410 | Optional Packages: |
1411 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1412 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
05ea2a05 TT |
1413 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
1414 | --with-gnu-ld assume the C compiler uses GNU ld default=no | |
1415 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib | |
1416 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1417 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
0fb4aa4b PA |
1418 | --with-ust=PATH Specify prefix directory for the installed UST package |
1419 | Equivalent to --with-ust-include=PATH/include | |
1420 | plus --with-ust-lib=PATH/lib | |
1421 | --with-ust-include=PATH Specify directory for installed UST include files | |
1422 | --with-ust-lib=PATH Specify the directory for the installed UST library | |
c16158bc JM |
1423 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1424 | --with-bugurl=URL Direct users to URL to report a bug | |
96f15937 PP |
1425 | --with-libthread-db=PATH |
1426 | use given libthread_db directly | |
c16158bc | 1427 | |
bec39cab AC |
1428 | Some influential environment variables: |
1429 | CC C compiler command | |
1430 | CFLAGS C compiler flags | |
1431 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1432 | nonstandard directory <lib dir> | |
81ecdfbb | 1433 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1434 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1435 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1436 | CXX C++ compiler command |
1437 | CXXFLAGS C++ compiler flags | |
bec39cab AC |
1438 | CPP C preprocessor |
1439 | ||
1440 | Use these variables to override the choices made by `configure' or to help | |
1441 | it to find libraries and programs with nonstandard names/locations. | |
1442 | ||
81ecdfbb | 1443 | Report bugs to the package provider. |
bec39cab | 1444 | _ACEOF |
81ecdfbb | 1445 | ac_status=$? |
bec39cab AC |
1446 | fi |
1447 | ||
1448 | if test "$ac_init_help" = "recursive"; then | |
1449 | # If there are subdirs, report their specific --help. | |
bec39cab | 1450 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1451 | test -d "$ac_dir" || |
1452 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1453 | continue | |
bec39cab AC |
1454 | ac_builddir=. |
1455 | ||
81ecdfbb RW |
1456 | case "$ac_dir" in |
1457 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1458 | *) | |
1459 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1460 | # A ".." for each directory in $ac_dir_suffix. | |
1461 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1462 | case $ac_top_builddir_sub in | |
1463 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1464 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1465 | esac ;; | |
1466 | esac | |
1467 | ac_abs_top_builddir=$ac_pwd | |
1468 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1469 | # for backward compatibility: | |
1470 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1471 | |
1472 | case $srcdir in | |
81ecdfbb | 1473 | .) # We are building in place. |
bec39cab | 1474 | ac_srcdir=. |
81ecdfbb RW |
1475 | ac_top_srcdir=$ac_top_builddir_sub |
1476 | ac_abs_top_srcdir=$ac_pwd ;; | |
1477 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1478 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1479 | ac_top_srcdir=$srcdir |
1480 | ac_abs_top_srcdir=$srcdir ;; | |
1481 | *) # Relative name. | |
1482 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1483 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1484 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
dae5f5cf | 1485 | esac |
81ecdfbb RW |
1486 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1487 | ||
1488 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1489 | # Check for guested configure. | |
1490 | if test -f "$ac_srcdir/configure.gnu"; then | |
1491 | echo && | |
1492 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1493 | elif test -f "$ac_srcdir/configure"; then | |
1494 | echo && | |
1495 | $SHELL "$ac_srcdir/configure" --help=recursive | |
434c4c77 | 1496 | else |
81ecdfbb RW |
1497 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1498 | fi || ac_status=$? | |
1499 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1500 | done |
1501 | fi | |
1502 | ||
81ecdfbb | 1503 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1504 | if $ac_init_version; then |
1505 | cat <<\_ACEOF | |
81ecdfbb | 1506 | configure |
d0ac1c44 | 1507 | generated by GNU Autoconf 2.69 |
bec39cab | 1508 | |
d0ac1c44 | 1509 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1510 | This configure script is free software; the Free Software Foundation |
1511 | gives unlimited permission to copy, distribute and modify it. | |
1512 | _ACEOF | |
81ecdfbb | 1513 | exit |
bec39cab | 1514 | fi |
bec39cab | 1515 | |
81ecdfbb RW |
1516 | ## ------------------------ ## |
1517 | ## Autoconf initialization. ## | |
1518 | ## ------------------------ ## | |
bec39cab | 1519 | |
81ecdfbb RW |
1520 | # ac_fn_c_try_compile LINENO |
1521 | # -------------------------- | |
1522 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1523 | ac_fn_c_try_compile () | |
bec39cab | 1524 | { |
81ecdfbb RW |
1525 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1526 | rm -f conftest.$ac_objext | |
1527 | if { { ac_try="$ac_compile" | |
1528 | case "(($ac_try" in | |
1529 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1530 | *) ac_try_echo=$ac_try;; | |
1531 | esac | |
1532 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1533 | $as_echo "$ac_try_echo"; } >&5 | |
1534 | (eval "$ac_compile") 2>conftest.err | |
1535 | ac_status=$? | |
1536 | if test -s conftest.err; then | |
1537 | grep -v '^ *+' conftest.err >conftest.er1 | |
1538 | cat conftest.er1 >&5 | |
1539 | mv -f conftest.er1 conftest.err | |
1540 | fi | |
1541 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1542 | test $ac_status = 0; } && { | |
1543 | test -z "$ac_c_werror_flag" || | |
1544 | test ! -s conftest.err | |
1545 | } && test -s conftest.$ac_objext; then : | |
1546 | ac_retval=0 | |
1547 | else | |
1548 | $as_echo "$as_me: failed program was:" >&5 | |
1549 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1550 | |
81ecdfbb RW |
1551 | ac_retval=1 |
1552 | fi | |
d0ac1c44 SM |
1553 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1554 | as_fn_set_status $ac_retval | |
bec39cab | 1555 | |
81ecdfbb | 1556 | } # ac_fn_c_try_compile |
bec39cab | 1557 | |
3bc3d82a PA |
1558 | # ac_fn_cxx_try_compile LINENO |
1559 | # ---------------------------- | |
1560 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1561 | ac_fn_cxx_try_compile () | |
1562 | { | |
1563 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1564 | rm -f conftest.$ac_objext | |
1565 | if { { ac_try="$ac_compile" | |
1566 | case "(($ac_try" in | |
1567 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1568 | *) ac_try_echo=$ac_try;; | |
1569 | esac | |
1570 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1571 | $as_echo "$ac_try_echo"; } >&5 | |
1572 | (eval "$ac_compile") 2>conftest.err | |
1573 | ac_status=$? | |
1574 | if test -s conftest.err; then | |
1575 | grep -v '^ *+' conftest.err >conftest.er1 | |
1576 | cat conftest.er1 >&5 | |
1577 | mv -f conftest.er1 conftest.err | |
1578 | fi | |
1579 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1580 | test $ac_status = 0; } && { | |
1581 | test -z "$ac_cxx_werror_flag" || | |
1582 | test ! -s conftest.err | |
1583 | } && test -s conftest.$ac_objext; then : | |
1584 | ac_retval=0 | |
1585 | else | |
1586 | $as_echo "$as_me: failed program was:" >&5 | |
1587 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1588 | ||
1589 | ac_retval=1 | |
1590 | fi | |
d0ac1c44 SM |
1591 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1592 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1593 | |
1594 | } # ac_fn_cxx_try_compile | |
1595 | ||
81ecdfbb RW |
1596 | # ac_fn_c_try_cpp LINENO |
1597 | # ---------------------- | |
1598 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1599 | ac_fn_c_try_cpp () | |
1600 | { | |
1601 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1602 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1603 | case "(($ac_try" in | |
1604 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1605 | *) ac_try_echo=$ac_try;; | |
1606 | esac | |
1607 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1608 | $as_echo "$ac_try_echo"; } >&5 | |
1609 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1610 | ac_status=$? | |
1611 | if test -s conftest.err; then | |
1612 | grep -v '^ *+' conftest.err >conftest.er1 | |
1613 | cat conftest.er1 >&5 | |
1614 | mv -f conftest.er1 conftest.err | |
1615 | fi | |
1616 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1617 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1618 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1619 | test ! -s conftest.err | |
1620 | }; then : | |
1621 | ac_retval=0 | |
1622 | else | |
1623 | $as_echo "$as_me: failed program was:" >&5 | |
1624 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1625 | |
81ecdfbb RW |
1626 | ac_retval=1 |
1627 | fi | |
d0ac1c44 SM |
1628 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1629 | as_fn_set_status $ac_retval | |
bec39cab | 1630 | |
81ecdfbb RW |
1631 | } # ac_fn_c_try_cpp |
1632 | ||
1633 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1634 | # ------------------------------------------------------- | |
1635 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1636 | # the include files in INCLUDES and setting the cache variable VAR | |
1637 | # accordingly. | |
1638 | ac_fn_c_check_header_mongrel () | |
1639 | { | |
1640 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1641 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1642 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1643 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1644 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1645 | $as_echo_n "(cached) " >&6 |
1646 | fi | |
1647 | eval ac_res=\$$3 | |
1648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1649 | $as_echo "$ac_res" >&6; } | |
1650 | else | |
1651 | # Is the header compilable? | |
1652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1653 | $as_echo_n "checking $2 usability... " >&6; } | |
1654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1655 | /* end confdefs.h. */ | |
1656 | $4 | |
1657 | #include <$2> | |
1658 | _ACEOF | |
1659 | if ac_fn_c_try_compile "$LINENO"; then : | |
1660 | ac_header_compiler=yes | |
1661 | else | |
1662 | ac_header_compiler=no | |
1663 | fi | |
1664 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1666 | $as_echo "$ac_header_compiler" >&6; } | |
1667 | ||
1668 | # Is the header present? | |
1669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1670 | $as_echo_n "checking $2 presence... " >&6; } | |
1671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1672 | /* end confdefs.h. */ | |
1673 | #include <$2> | |
1674 | _ACEOF | |
1675 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1676 | ac_header_preproc=yes | |
1677 | else | |
1678 | ac_header_preproc=no | |
1679 | fi | |
d0ac1c44 | 1680 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1682 | $as_echo "$ac_header_preproc" >&6; } | |
1683 | ||
1684 | # So? What about this header? | |
1685 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1686 | yes:no: ) | |
1687 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1688 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1689 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1690 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1691 | ;; | |
1692 | no:yes:* ) | |
1693 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1694 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1695 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1696 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1697 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1698 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1699 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1700 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1701 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1702 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1703 | ;; | |
1704 | esac | |
1705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1706 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1707 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1708 | $as_echo_n "(cached) " >&6 |
1709 | else | |
1710 | eval "$3=\$ac_header_compiler" | |
1711 | fi | |
1712 | eval ac_res=\$$3 | |
1713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1714 | $as_echo "$ac_res" >&6; } | |
1715 | fi | |
d0ac1c44 | 1716 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1717 | |
1718 | } # ac_fn_c_check_header_mongrel | |
1719 | ||
1720 | # ac_fn_c_try_run LINENO | |
1721 | # ---------------------- | |
1722 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1723 | # that executables *can* be run. | |
1724 | ac_fn_c_try_run () | |
1725 | { | |
1726 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1727 | if { { ac_try="$ac_link" | |
1728 | case "(($ac_try" in | |
1729 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1730 | *) ac_try_echo=$ac_try;; | |
1731 | esac | |
1732 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1733 | $as_echo "$ac_try_echo"; } >&5 | |
1734 | (eval "$ac_link") 2>&5 | |
1735 | ac_status=$? | |
1736 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1737 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1738 | { { case "(($ac_try" in | |
1739 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1740 | *) ac_try_echo=$ac_try;; | |
1741 | esac | |
1742 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1743 | $as_echo "$ac_try_echo"; } >&5 | |
1744 | (eval "$ac_try") 2>&5 | |
1745 | ac_status=$? | |
1746 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1747 | test $ac_status = 0; }; }; then : | |
1748 | ac_retval=0 | |
1749 | else | |
1750 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1751 | $as_echo "$as_me: failed program was:" >&5 | |
1752 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1753 | ||
1754 | ac_retval=$ac_status | |
1755 | fi | |
1756 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
1757 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1758 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1759 | |
1760 | } # ac_fn_c_try_run | |
1761 | ||
1762 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1763 | # ------------------------------------------------------- | |
1764 | # Tests whether HEADER exists and can be compiled using the include files in | |
1765 | # INCLUDES, setting the cache variable VAR accordingly. | |
1766 | ac_fn_c_check_header_compile () | |
1767 | { | |
1768 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1769 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1770 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1771 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1772 | $as_echo_n "(cached) " >&6 |
1773 | else | |
1774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1775 | /* end confdefs.h. */ | |
1776 | $4 | |
1777 | #include <$2> | |
1778 | _ACEOF | |
1779 | if ac_fn_c_try_compile "$LINENO"; then : | |
1780 | eval "$3=yes" | |
1781 | else | |
1782 | eval "$3=no" | |
1783 | fi | |
1784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1785 | fi | |
1786 | eval ac_res=\$$3 | |
1787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1788 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1789 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1790 | |
1791 | } # ac_fn_c_check_header_compile | |
1792 | ||
eb0edac8 GB |
1793 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
1794 | # ------------------------------------------- | |
1795 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1796 | # variable VAR accordingly. | |
1797 | ac_fn_c_check_type () | |
1798 | { | |
1799 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1801 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1802 | if eval \${$3+:} false; then : |
eb0edac8 GB |
1803 | $as_echo_n "(cached) " >&6 |
1804 | else | |
1805 | eval "$3=no" | |
1806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1807 | /* end confdefs.h. */ | |
1808 | $4 | |
1809 | int | |
1810 | main () | |
1811 | { | |
1812 | if (sizeof ($2)) | |
1813 | return 0; | |
1814 | ; | |
1815 | return 0; | |
1816 | } | |
1817 | _ACEOF | |
1818 | if ac_fn_c_try_compile "$LINENO"; then : | |
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 | ||
1833 | else | |
1834 | eval "$3=yes" | |
1835 | fi | |
1836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1837 | fi | |
1838 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1839 | fi | |
1840 | eval ac_res=\$$3 | |
1841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1842 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1843 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
eb0edac8 GB |
1844 | |
1845 | } # ac_fn_c_check_type | |
1846 | ||
404f2902 FCE |
1847 | # ac_fn_c_try_link LINENO |
1848 | # ----------------------- | |
1849 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1850 | ac_fn_c_try_link () | |
1851 | { | |
1852 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1853 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1854 | if { { ac_try="$ac_link" | |
1855 | case "(($ac_try" in | |
1856 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1857 | *) ac_try_echo=$ac_try;; | |
1858 | esac | |
1859 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1860 | $as_echo "$ac_try_echo"; } >&5 | |
1861 | (eval "$ac_link") 2>conftest.err | |
1862 | ac_status=$? | |
1863 | if test -s conftest.err; then | |
1864 | grep -v '^ *+' conftest.err >conftest.er1 | |
1865 | cat conftest.er1 >&5 | |
1866 | mv -f conftest.er1 conftest.err | |
1867 | fi | |
1868 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1869 | test $ac_status = 0; } && { | |
1870 | test -z "$ac_c_werror_flag" || | |
1871 | test ! -s conftest.err | |
1872 | } && test -s conftest$ac_exeext && { | |
1873 | test "$cross_compiling" = yes || | |
1874 | test -x conftest$ac_exeext | |
1875 | }; then : | |
1876 | ac_retval=0 | |
1877 | else | |
1878 | $as_echo "$as_me: failed program was:" >&5 | |
1879 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1880 | ||
1881 | ac_retval=1 | |
1882 | fi | |
1883 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1884 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1885 | # interfere with the next link command; also delete a directory that is | |
1886 | # left behind by Apple's compiler. We do this before executing the actions. | |
1887 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1888 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1889 | as_fn_set_status $ac_retval | |
1890 | ||
1891 | } # ac_fn_c_try_link | |
1892 | ||
81ecdfbb RW |
1893 | # ac_fn_c_check_func LINENO FUNC VAR |
1894 | # ---------------------------------- | |
1895 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1896 | ac_fn_c_check_func () | |
1897 | { | |
1898 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1900 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1901 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1902 | $as_echo_n "(cached) " >&6 |
1903 | else | |
1904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1905 | /* end confdefs.h. */ | |
1906 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1907 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1908 | #define $2 innocuous_$2 | |
1909 | ||
1910 | /* System header to define __stub macros and hopefully few prototypes, | |
1911 | which can conflict with char $2 (); below. | |
1912 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1913 | <limits.h> exists even on freestanding compilers. */ | |
1914 | ||
1915 | #ifdef __STDC__ | |
1916 | # include <limits.h> | |
1917 | #else | |
1918 | # include <assert.h> | |
1919 | #endif | |
1920 | ||
1921 | #undef $2 | |
1922 | ||
1923 | /* Override any GCC internal prototype to avoid an error. | |
1924 | Use char because int might match the return type of a GCC | |
1925 | builtin and then its argument prototype would still apply. */ | |
1926 | #ifdef __cplusplus | |
1927 | extern "C" | |
1928 | #endif | |
1929 | char $2 (); | |
1930 | /* The GNU C library defines this for functions which it implements | |
1931 | to always fail with ENOSYS. Some functions are actually named | |
1932 | something starting with __ and the normal name is an alias. */ | |
1933 | #if defined __stub_$2 || defined __stub___$2 | |
1934 | choke me | |
1935 | #endif | |
1936 | ||
1937 | int | |
1938 | main () | |
1939 | { | |
1940 | return $2 (); | |
1941 | ; | |
1942 | return 0; | |
1943 | } | |
1944 | _ACEOF | |
1945 | if ac_fn_c_try_link "$LINENO"; then : | |
1946 | eval "$3=yes" | |
1947 | else | |
1948 | eval "$3=no" | |
1949 | fi | |
1950 | rm -f core conftest.err conftest.$ac_objext \ | |
1951 | conftest$ac_exeext conftest.$ac_ext | |
1952 | fi | |
1953 | eval ac_res=\$$3 | |
1954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1955 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1956 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1957 | |
1958 | } # ac_fn_c_check_func | |
1959 | ||
d0ac1c44 SM |
1960 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
1961 | # --------------------------------------------- | |
1962 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
1963 | # accordingly. | |
81ecdfbb RW |
1964 | ac_fn_c_check_decl () |
1965 | { | |
1966 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
0fb4aa4b PA |
1967 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
1968 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
1969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
1970 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d0ac1c44 | 1971 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1972 | $as_echo_n "(cached) " >&6 |
1973 | else | |
1974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1975 | /* end confdefs.h. */ | |
1976 | $4 | |
1977 | int | |
1978 | main () | |
1979 | { | |
0fb4aa4b PA |
1980 | #ifndef $as_decl_name |
1981 | #ifdef __cplusplus | |
1982 | (void) $as_decl_use; | |
1983 | #else | |
1984 | (void) $as_decl_name; | |
1985 | #endif | |
81ecdfbb RW |
1986 | #endif |
1987 | ||
1988 | ; | |
1989 | return 0; | |
1990 | } | |
1991 | _ACEOF | |
1992 | if ac_fn_c_try_compile "$LINENO"; then : | |
1993 | eval "$3=yes" | |
1994 | else | |
1995 | eval "$3=no" | |
1996 | fi | |
1997 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1998 | fi | |
1999 | eval ac_res=\$$3 | |
2000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2001 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2002 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
2003 | |
2004 | } # ac_fn_c_check_decl | |
2005 | ||
05ea2a05 TT |
2006 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2007 | # ---------------------------------------------------- | |
2008 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2009 | # INCLUDES, setting cache variable VAR accordingly. | |
2010 | ac_fn_c_check_member () | |
2011 | { | |
2012 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2014 | $as_echo_n "checking for $2.$3... " >&6; } | |
2015 | if eval \${$4+:} false; then : | |
2016 | $as_echo_n "(cached) " >&6 | |
2017 | else | |
2018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2019 | /* end confdefs.h. */ | |
2020 | $5 | |
2021 | int | |
2022 | main () | |
2023 | { | |
2024 | static $2 ac_aggr; | |
2025 | if (ac_aggr.$3) | |
2026 | return 0; | |
2027 | ; | |
2028 | return 0; | |
2029 | } | |
2030 | _ACEOF | |
2031 | if ac_fn_c_try_compile "$LINENO"; then : | |
2032 | eval "$4=yes" | |
2033 | else | |
2034 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2035 | /* end confdefs.h. */ | |
2036 | $5 | |
2037 | int | |
2038 | main () | |
2039 | { | |
2040 | static $2 ac_aggr; | |
2041 | if (sizeof ac_aggr.$3) | |
2042 | return 0; | |
2043 | ; | |
2044 | return 0; | |
2045 | } | |
2046 | _ACEOF | |
2047 | if ac_fn_c_try_compile "$LINENO"; then : | |
2048 | eval "$4=yes" | |
2049 | else | |
2050 | eval "$4=no" | |
2051 | fi | |
2052 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2053 | fi | |
2054 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2055 | fi | |
2056 | eval ac_res=\$$4 | |
2057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2058 | $as_echo "$ac_res" >&6; } | |
2059 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2060 | ||
2061 | } # ac_fn_c_check_member | |
2062 | ||
21987b9c TT |
2063 | # ac_fn_cxx_try_link LINENO |
2064 | # ------------------------- | |
2065 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2066 | ac_fn_cxx_try_link () | |
2067 | { | |
2068 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2069 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2070 | if { { ac_try="$ac_link" | |
2071 | case "(($ac_try" in | |
2072 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2073 | *) ac_try_echo=$ac_try;; | |
2074 | esac | |
2075 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2076 | $as_echo "$ac_try_echo"; } >&5 | |
2077 | (eval "$ac_link") 2>conftest.err | |
2078 | ac_status=$? | |
2079 | if test -s conftest.err; then | |
2080 | grep -v '^ *+' conftest.err >conftest.er1 | |
2081 | cat conftest.er1 >&5 | |
2082 | mv -f conftest.er1 conftest.err | |
2083 | fi | |
2084 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2085 | test $ac_status = 0; } && { | |
2086 | test -z "$ac_cxx_werror_flag" || | |
2087 | test ! -s conftest.err | |
2088 | } && test -s conftest$ac_exeext && { | |
2089 | test "$cross_compiling" = yes || | |
2090 | test -x conftest$ac_exeext | |
2091 | }; then : | |
2092 | ac_retval=0 | |
2093 | else | |
2094 | $as_echo "$as_me: failed program was:" >&5 | |
2095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2096 | ||
2097 | ac_retval=1 | |
2098 | fi | |
2099 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2100 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2101 | # interfere with the next link command; also delete a directory that is | |
2102 | # left behind by Apple's compiler. We do this before executing the actions. | |
2103 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2104 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2105 | as_fn_set_status $ac_retval | |
2106 | ||
2107 | } # ac_fn_cxx_try_link | |
2108 | ||
2109 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2110 | # ------------------------------------ | |
2111 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2112 | ac_fn_cxx_check_func () | |
2113 | { | |
2114 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2116 | $as_echo_n "checking for $2... " >&6; } | |
2117 | if eval \${$3+:} false; then : | |
2118 | $as_echo_n "(cached) " >&6 | |
2119 | else | |
2120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2121 | /* end confdefs.h. */ | |
2122 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2123 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2124 | #define $2 innocuous_$2 | |
2125 | ||
2126 | /* System header to define __stub macros and hopefully few prototypes, | |
2127 | which can conflict with char $2 (); below. | |
2128 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2129 | <limits.h> exists even on freestanding compilers. */ | |
2130 | ||
2131 | #ifdef __STDC__ | |
2132 | # include <limits.h> | |
2133 | #else | |
2134 | # include <assert.h> | |
2135 | #endif | |
2136 | ||
2137 | #undef $2 | |
2138 | ||
2139 | /* Override any GCC internal prototype to avoid an error. | |
2140 | Use char because int might match the return type of a GCC | |
2141 | builtin and then its argument prototype would still apply. */ | |
2142 | #ifdef __cplusplus | |
2143 | extern "C" | |
2144 | #endif | |
2145 | char $2 (); | |
2146 | /* The GNU C library defines this for functions which it implements | |
2147 | to always fail with ENOSYS. Some functions are actually named | |
2148 | something starting with __ and the normal name is an alias. */ | |
2149 | #if defined __stub_$2 || defined __stub___$2 | |
2150 | choke me | |
2151 | #endif | |
2152 | ||
2153 | int | |
2154 | main () | |
2155 | { | |
2156 | return $2 (); | |
2157 | ; | |
2158 | return 0; | |
2159 | } | |
2160 | _ACEOF | |
2161 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2162 | eval "$3=yes" | |
2163 | else | |
2164 | eval "$3=no" | |
2165 | fi | |
2166 | rm -f core conftest.err conftest.$ac_objext \ | |
2167 | conftest$ac_exeext conftest.$ac_ext | |
2168 | fi | |
2169 | eval ac_res=\$$3 | |
2170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2171 | $as_echo "$ac_res" >&6; } | |
2172 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2173 | ||
2174 | } # ac_fn_cxx_check_func | |
2175 | ||
07697489 PA |
2176 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2177 | # -------------------------------------------- | |
2178 | # Tries to find the compile-time value of EXPR in a program that includes | |
2179 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2180 | # computed | |
2181 | ac_fn_c_compute_int () | |
2182 | { | |
2183 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2184 | if test "$cross_compiling" = yes; then | |
2185 | # Depending upon the size, compute the lo and hi bounds. | |
2186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2187 | /* end confdefs.h. */ | |
2188 | $4 | |
2189 | int | |
2190 | main () | |
2191 | { | |
2192 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2193 | test_array [0] = 0; |
2194 | return test_array [0]; | |
07697489 PA |
2195 | |
2196 | ; | |
2197 | return 0; | |
2198 | } | |
2199 | _ACEOF | |
2200 | if ac_fn_c_try_compile "$LINENO"; then : | |
2201 | ac_lo=0 ac_mid=0 | |
2202 | while :; do | |
2203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2204 | /* end confdefs.h. */ | |
2205 | $4 | |
2206 | int | |
2207 | main () | |
2208 | { | |
2209 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2210 | test_array [0] = 0; |
2211 | return test_array [0]; | |
07697489 PA |
2212 | |
2213 | ; | |
2214 | return 0; | |
2215 | } | |
2216 | _ACEOF | |
2217 | if ac_fn_c_try_compile "$LINENO"; then : | |
2218 | ac_hi=$ac_mid; break | |
2219 | else | |
2220 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2221 | if test $ac_lo -le $ac_mid; then | |
2222 | ac_lo= ac_hi= | |
2223 | break | |
2224 | fi | |
2225 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2226 | fi | |
2227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2228 | done | |
2229 | else | |
2230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2231 | /* end confdefs.h. */ | |
2232 | $4 | |
2233 | int | |
2234 | main () | |
2235 | { | |
2236 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2237 | test_array [0] = 0; |
2238 | return test_array [0]; | |
07697489 PA |
2239 | |
2240 | ; | |
2241 | return 0; | |
2242 | } | |
2243 | _ACEOF | |
2244 | if ac_fn_c_try_compile "$LINENO"; then : | |
2245 | ac_hi=-1 ac_mid=-1 | |
2246 | while :; do | |
2247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2248 | /* end confdefs.h. */ | |
2249 | $4 | |
2250 | int | |
2251 | main () | |
2252 | { | |
2253 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2254 | test_array [0] = 0; |
2255 | return test_array [0]; | |
07697489 PA |
2256 | |
2257 | ; | |
2258 | return 0; | |
2259 | } | |
2260 | _ACEOF | |
2261 | if ac_fn_c_try_compile "$LINENO"; then : | |
2262 | ac_lo=$ac_mid; break | |
2263 | else | |
2264 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2265 | if test $ac_mid -le $ac_hi; then | |
2266 | ac_lo= ac_hi= | |
2267 | break | |
2268 | fi | |
2269 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2270 | fi | |
2271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2272 | done | |
2273 | else | |
2274 | ac_lo= ac_hi= | |
2275 | fi | |
2276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2277 | fi | |
2278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2279 | # Binary search between lo and hi bounds. | |
2280 | while test "x$ac_lo" != "x$ac_hi"; do | |
2281 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2283 | /* end confdefs.h. */ | |
2284 | $4 | |
2285 | int | |
2286 | main () | |
2287 | { | |
2288 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2289 | test_array [0] = 0; |
2290 | return test_array [0]; | |
07697489 PA |
2291 | |
2292 | ; | |
2293 | return 0; | |
2294 | } | |
2295 | _ACEOF | |
2296 | if ac_fn_c_try_compile "$LINENO"; then : | |
2297 | ac_hi=$ac_mid | |
2298 | else | |
2299 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2300 | fi | |
2301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2302 | done | |
2303 | case $ac_lo in #(( | |
2304 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2305 | '') ac_retval=1 ;; | |
2306 | esac | |
2307 | else | |
2308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2309 | /* end confdefs.h. */ | |
2310 | $4 | |
2311 | static long int longval () { return $2; } | |
2312 | static unsigned long int ulongval () { return $2; } | |
2313 | #include <stdio.h> | |
2314 | #include <stdlib.h> | |
2315 | int | |
2316 | main () | |
2317 | { | |
2318 | ||
2319 | FILE *f = fopen ("conftest.val", "w"); | |
2320 | if (! f) | |
2321 | return 1; | |
2322 | if (($2) < 0) | |
2323 | { | |
2324 | long int i = longval (); | |
2325 | if (i != ($2)) | |
2326 | return 1; | |
2327 | fprintf (f, "%ld", i); | |
2328 | } | |
2329 | else | |
2330 | { | |
2331 | unsigned long int i = ulongval (); | |
2332 | if (i != ($2)) | |
2333 | return 1; | |
2334 | fprintf (f, "%lu", i); | |
2335 | } | |
2336 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2337 | on some platforms. */ | |
2338 | return ferror (f) || fclose (f) != 0; | |
2339 | ||
2340 | ; | |
2341 | return 0; | |
2342 | } | |
2343 | _ACEOF | |
2344 | if ac_fn_c_try_run "$LINENO"; then : | |
2345 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2346 | else | |
2347 | ac_retval=1 | |
2348 | fi | |
2349 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2350 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2351 | rm -f conftest.val | |
2352 | ||
2353 | fi | |
d0ac1c44 SM |
2354 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2355 | as_fn_set_status $ac_retval | |
07697489 PA |
2356 | |
2357 | } # ac_fn_c_compute_int | |
81ecdfbb RW |
2358 | cat >config.log <<_ACEOF |
2359 | This file contains any messages produced by compilers while | |
2360 | running configure, to aid debugging if configure makes a mistake. | |
2361 | ||
2362 | It was created by $as_me, which was | |
d0ac1c44 | 2363 | generated by GNU Autoconf 2.69. Invocation command line was |
81ecdfbb RW |
2364 | |
2365 | $ $0 $@ | |
2366 | ||
2367 | _ACEOF | |
2368 | exec 5>>config.log | |
2369 | { | |
2370 | cat <<_ASUNAME | |
2371 | ## --------- ## | |
2372 | ## Platform. ## | |
2373 | ## --------- ## | |
2374 | ||
2375 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2376 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2377 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2378 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2379 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2380 | ||
2381 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2382 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2383 | ||
2384 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2385 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2386 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2387 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2388 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2389 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2390 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2391 | ||
2392 | _ASUNAME | |
2393 | ||
2394 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2395 | for as_dir in $PATH | |
2396 | do | |
2397 | IFS=$as_save_IFS | |
2398 | test -z "$as_dir" && as_dir=. | |
2399 | $as_echo "PATH: $as_dir" | |
2400 | done | |
2401 | IFS=$as_save_IFS | |
2402 | ||
2403 | } >&5 | |
2404 | ||
2405 | cat >&5 <<_ACEOF | |
2406 | ||
2407 | ||
2408 | ## ----------- ## | |
2409 | ## Core tests. ## | |
2410 | ## ----------- ## | |
bec39cab AC |
2411 | |
2412 | _ACEOF | |
2413 | ||
2414 | ||
2415 | # Keep a trace of the command line. | |
2416 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2417 | # Strip out --silent because we don't want to record it for future runs. | |
2418 | # Also quote any args containing shell meta-characters. | |
2419 | # Make two passes to allow for proper duplicate-argument suppression. | |
2420 | ac_configure_args= | |
2421 | ac_configure_args0= | |
2422 | ac_configure_args1= | |
bec39cab AC |
2423 | ac_must_keep_next=false |
2424 | for ac_pass in 1 2 | |
2425 | do | |
2426 | for ac_arg | |
2427 | do | |
2428 | case $ac_arg in | |
2429 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2430 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2431 | | -silent | --silent | --silen | --sile | --sil) | |
2432 | continue ;; | |
81ecdfbb RW |
2433 | *\'*) |
2434 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
bec39cab AC |
2435 | esac |
2436 | case $ac_pass in | |
81ecdfbb | 2437 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
bec39cab | 2438 | 2) |
81ecdfbb | 2439 | as_fn_append ac_configure_args1 " '$ac_arg'" |
bec39cab AC |
2440 | if test $ac_must_keep_next = true; then |
2441 | ac_must_keep_next=false # Got value, back to normal. | |
2442 | else | |
2443 | case $ac_arg in | |
2444 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2445 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2446 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2447 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2448 | case "$ac_configure_args0 " in | |
2449 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2450 | esac | |
2451 | ;; | |
2452 | -* ) ac_must_keep_next=true ;; | |
2453 | esac | |
2454 | fi | |
81ecdfbb | 2455 | as_fn_append ac_configure_args " '$ac_arg'" |
bec39cab AC |
2456 | ;; |
2457 | esac | |
2458 | done | |
2459 | done | |
81ecdfbb RW |
2460 | { ac_configure_args0=; unset ac_configure_args0;} |
2461 | { ac_configure_args1=; unset ac_configure_args1;} | |
bec39cab AC |
2462 | |
2463 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2464 | # config.log. We remove comments because anyway the quotes in there | |
2465 | # would cause problems or look ugly. | |
81ecdfbb RW |
2466 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
2467 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
bec39cab AC |
2468 | trap 'exit_status=$? |
2469 | # Save into config.log some information that might help in debugging. | |
2470 | { | |
2471 | echo | |
2472 | ||
d0ac1c44 | 2473 | $as_echo "## ---------------- ## |
bec39cab | 2474 | ## Cache variables. ## |
d0ac1c44 | 2475 | ## ---------------- ##" |
bec39cab AC |
2476 | echo |
2477 | # The following way of writing the cache mishandles newlines in values, | |
81ecdfbb RW |
2478 | ( |
2479 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2480 | eval ac_val=\$$ac_var | |
2481 | case $ac_val in #( | |
2482 | *${as_nl}*) | |
2483 | case $ac_var in #( | |
2484 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2485 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2486 | esac | |
2487 | case $ac_var in #( | |
2488 | _ | IFS | as_nl) ;; #( | |
2489 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2490 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2491 | esac ;; | |
2492 | esac | |
2493 | done | |
bec39cab | 2494 | (set) 2>&1 | |
81ecdfbb RW |
2495 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
2496 | *${as_nl}ac_space=\ *) | |
bec39cab | 2497 | sed -n \ |
81ecdfbb RW |
2498 | "s/'\''/'\''\\\\'\'''\''/g; |
2499 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2500 | ;; #( | |
bec39cab | 2501 | *) |
81ecdfbb | 2502 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 2503 | ;; |
81ecdfbb RW |
2504 | esac | |
2505 | sort | |
2506 | ) | |
bec39cab AC |
2507 | echo |
2508 | ||
d0ac1c44 | 2509 | $as_echo "## ----------------- ## |
bec39cab | 2510 | ## Output variables. ## |
d0ac1c44 | 2511 | ## ----------------- ##" |
bec39cab AC |
2512 | echo |
2513 | for ac_var in $ac_subst_vars | |
2514 | do | |
81ecdfbb RW |
2515 | eval ac_val=\$$ac_var |
2516 | case $ac_val in | |
2517 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2518 | esac | |
2519 | $as_echo "$ac_var='\''$ac_val'\''" | |
bec39cab AC |
2520 | done | sort |
2521 | echo | |
2522 | ||
2523 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2524 | $as_echo "## ------------------- ## |
81ecdfbb | 2525 | ## File substitutions. ## |
d0ac1c44 | 2526 | ## ------------------- ##" |
bec39cab AC |
2527 | echo |
2528 | for ac_var in $ac_subst_files | |
2529 | do | |
81ecdfbb RW |
2530 | eval ac_val=\$$ac_var |
2531 | case $ac_val in | |
2532 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2533 | esac | |
2534 | $as_echo "$ac_var='\''$ac_val'\''" | |
bec39cab AC |
2535 | done | sort |
2536 | echo | |
434c4c77 | 2537 | fi |
bec39cab AC |
2538 | |
2539 | if test -s confdefs.h; then | |
d0ac1c44 | 2540 | $as_echo "## ----------- ## |
bec39cab | 2541 | ## confdefs.h. ## |
d0ac1c44 | 2542 | ## ----------- ##" |
bec39cab | 2543 | echo |
81ecdfbb | 2544 | cat confdefs.h |
bec39cab AC |
2545 | echo |
2546 | fi | |
2547 | test "$ac_signal" != 0 && | |
81ecdfbb RW |
2548 | $as_echo "$as_me: caught signal $ac_signal" |
2549 | $as_echo "$as_me: exit $exit_status" | |
bec39cab | 2550 | } >&5 |
81ecdfbb RW |
2551 | rm -f core *.core core.conftest.* && |
2552 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
bec39cab | 2553 | exit $exit_status |
81ecdfbb | 2554 | ' 0 |
bec39cab | 2555 | for ac_signal in 1 2 13 15; do |
81ecdfbb | 2556 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
bec39cab AC |
2557 | done |
2558 | ac_signal=0 | |
2559 | ||
2560 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
81ecdfbb RW |
2561 | rm -f -r conftest* confdefs.h |
2562 | ||
2563 | $as_echo "/* confdefs.h */" > confdefs.h | |
bec39cab AC |
2564 | |
2565 | # Predefined preprocessor variables. | |
2566 | ||
2567 | cat >>confdefs.h <<_ACEOF | |
2568 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2569 | _ACEOF | |
2570 | ||
bec39cab AC |
2571 | cat >>confdefs.h <<_ACEOF |
2572 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2573 | _ACEOF | |
2574 | ||
bec39cab AC |
2575 | cat >>confdefs.h <<_ACEOF |
2576 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2577 | _ACEOF | |
2578 | ||
bec39cab AC |
2579 | cat >>confdefs.h <<_ACEOF |
2580 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2581 | _ACEOF | |
2582 | ||
bec39cab AC |
2583 | cat >>confdefs.h <<_ACEOF |
2584 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2585 | _ACEOF | |
2586 | ||
81ecdfbb RW |
2587 | cat >>confdefs.h <<_ACEOF |
2588 | #define PACKAGE_URL "$PACKAGE_URL" | |
2589 | _ACEOF | |
2590 | ||
bec39cab AC |
2591 | |
2592 | # Let the site file select an alternate cache file if it wants to. | |
81ecdfbb RW |
2593 | # Prefer an explicitly selected file to automatically selected ones. |
2594 | ac_site_file1=NONE | |
2595 | ac_site_file2=NONE | |
2596 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2597 | # We do not want a PATH search for config.site. |
2598 | case $CONFIG_SITE in #(( | |
2599 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2600 | */*) ac_site_file1=$CONFIG_SITE;; | |
2601 | *) ac_site_file1=./$CONFIG_SITE;; | |
2602 | esac | |
81ecdfbb RW |
2603 | elif test "x$prefix" != xNONE; then |
2604 | ac_site_file1=$prefix/share/config.site | |
2605 | ac_site_file2=$prefix/etc/config.site | |
2606 | else | |
2607 | ac_site_file1=$ac_default_prefix/share/config.site | |
2608 | ac_site_file2=$ac_default_prefix/etc/config.site | |
d6e9fb05 | 2609 | fi |
81ecdfbb RW |
2610 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
2611 | do | |
2612 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2613 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2614 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2615 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
bec39cab | 2616 | sed 's/^/| /' "$ac_site_file" >&5 |
d0ac1c44 SM |
2617 | . "$ac_site_file" \ |
2618 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2619 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2620 | as_fn_error $? "failed to load site script $ac_site_file | |
2621 | See \`config.log' for more details" "$LINENO" 5; } | |
d6e9fb05 JK |
2622 | fi |
2623 | done | |
2624 | ||
2625 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2626 | # Some versions of bash will fail to source /dev/null (special files |
2627 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2628 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2629 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2630 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
bec39cab | 2631 | case $cache_file in |
81ecdfbb RW |
2632 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
2633 | *) . "./$cache_file";; | |
bec39cab AC |
2634 | esac |
2635 | fi | |
d6e9fb05 | 2636 | else |
81ecdfbb RW |
2637 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2638 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
bec39cab | 2639 | >$cache_file |
d6e9fb05 JK |
2640 | fi |
2641 | ||
05ea2a05 TT |
2642 | as_fn_append ac_header_list " stdlib.h" |
2643 | as_fn_append ac_header_list " unistd.h" | |
2644 | as_fn_append ac_header_list " sys/param.h" | |
bec39cab AC |
2645 | # Check that the precious variables saved in the cache have kept the same |
2646 | # value. | |
2647 | ac_cache_corrupted=false | |
81ecdfbb | 2648 | for ac_var in $ac_precious_vars; do |
bec39cab AC |
2649 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
2650 | eval ac_new_set=\$ac_env_${ac_var}_set | |
81ecdfbb RW |
2651 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
2652 | eval ac_new_val=\$ac_env_${ac_var}_value | |
bec39cab AC |
2653 | case $ac_old_set,$ac_new_set in |
2654 | set,) | |
81ecdfbb RW |
2655 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
2656 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
bec39cab AC |
2657 | ac_cache_corrupted=: ;; |
2658 | ,set) | |
81ecdfbb RW |
2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
2660 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
bec39cab AC |
2661 | ac_cache_corrupted=: ;; |
2662 | ,);; | |
2663 | *) | |
2664 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
81ecdfbb RW |
2665 | # differences in whitespace do not lead to failure. |
2666 | ac_old_val_w=`echo x $ac_old_val` | |
2667 | ac_new_val_w=`echo x $ac_new_val` | |
2668 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2669 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2670 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2671 | ac_cache_corrupted=: | |
2672 | else | |
2673 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2674 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2675 | eval $ac_var=\$ac_old_val | |
2676 | fi | |
2677 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2678 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2679 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2680 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
bec39cab AC |
2681 | fi;; |
2682 | esac | |
2683 | # Pass precious variables to config.status. | |
2684 | if test "$ac_new_set" = set; then | |
2685 | case $ac_new_val in | |
81ecdfbb | 2686 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
bec39cab AC |
2687 | *) ac_arg=$ac_var=$ac_new_val ;; |
2688 | esac | |
2689 | case " $ac_configure_args " in | |
2690 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
81ecdfbb | 2691 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
bec39cab | 2692 | esac |
d6e9fb05 | 2693 | fi |
bec39cab AC |
2694 | done |
2695 | if $ac_cache_corrupted; then | |
81ecdfbb RW |
2696 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2697 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2698 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2699 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2700 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
d6e9fb05 | 2701 | fi |
81ecdfbb RW |
2702 | ## -------------------- ## |
2703 | ## Main body of script. ## | |
2704 | ## -------------------- ## | |
d6e9fb05 | 2705 | |
dae5f5cf DJ |
2706 | ac_ext=c |
2707 | ac_cpp='$CPP $CPPFLAGS' | |
2708 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2709 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2710 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2711 | ||
d6e9fb05 | 2712 | |
84563040 | 2713 | |
bec39cab AC |
2714 | |
2715 | ||
81ecdfbb | 2716 | ac_config_headers="$ac_config_headers config.h:config.in" |
bec39cab AC |
2717 | |
2718 | ||
e28b3332 | 2719 | |
c9a1864a YQ |
2720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
2721 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2722 | # Check whether --enable-maintainer-mode was given. | |
2723 | if test "${enable_maintainer_mode+set}" = set; then : | |
2724 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2725 | else | |
2726 | USE_MAINTAINER_MODE=no | |
2727 | fi | |
2728 | ||
2729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2730 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2731 | if test $USE_MAINTAINER_MODE = yes; then | |
2732 | MAINTAINER_MODE_TRUE= | |
2733 | MAINTAINER_MODE_FALSE='#' | |
2734 | else | |
2735 | MAINTAINER_MODE_TRUE='#' | |
2736 | MAINTAINER_MODE_FALSE= | |
2737 | fi | |
2738 | ||
2739 | MAINT=$MAINTAINER_MODE_TRUE | |
2740 | ||
2741 | ||
2742 | ||
bec39cab AC |
2743 | ac_ext=c |
2744 | ac_cpp='$CPP $CPPFLAGS' | |
2745 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2746 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2747 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2748 | if test -n "$ac_tool_prefix"; then | |
2749 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2750 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
81ecdfbb RW |
2751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2752 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2753 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2754 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2755 | else |
2756 | if test -n "$CC"; then | |
2757 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2758 | else | |
bec39cab AC |
2759 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2760 | for as_dir in $PATH | |
2761 | do | |
2762 | IFS=$as_save_IFS | |
2763 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2764 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2765 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2766 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
81ecdfbb | 2767 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2768 | break 2 |
2769 | fi | |
2770 | done | |
81ecdfbb RW |
2771 | done |
2772 | IFS=$as_save_IFS | |
bec39cab | 2773 | |
84563040 DJ |
2774 | fi |
2775 | fi | |
bec39cab | 2776 | CC=$ac_cv_prog_CC |
84563040 | 2777 | if test -n "$CC"; then |
81ecdfbb RW |
2778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2779 | $as_echo "$CC" >&6; } | |
84563040 | 2780 | else |
81ecdfbb RW |
2781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2782 | $as_echo "no" >&6; } | |
84563040 DJ |
2783 | fi |
2784 | ||
81ecdfbb | 2785 | |
bec39cab AC |
2786 | fi |
2787 | if test -z "$ac_cv_prog_CC"; then | |
2788 | ac_ct_CC=$CC | |
2789 | # Extract the first word of "gcc", so it can be a program name with args. | |
2790 | set dummy gcc; ac_word=$2 | |
81ecdfbb RW |
2791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2792 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2793 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2794 | $as_echo_n "(cached) " >&6 |
84563040 | 2795 | else |
bec39cab AC |
2796 | if test -n "$ac_ct_CC"; then |
2797 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
84563040 | 2798 | else |
bec39cab AC |
2799 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2800 | for as_dir in $PATH | |
2801 | do | |
2802 | IFS=$as_save_IFS | |
2803 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2804 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2805 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2806 | ac_cv_prog_ac_ct_CC="gcc" |
81ecdfbb | 2807 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2808 | break 2 |
2809 | fi | |
2810 | done | |
81ecdfbb RW |
2811 | done |
2812 | IFS=$as_save_IFS | |
bec39cab AC |
2813 | |
2814 | fi | |
2815 | fi | |
2816 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2817 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2819 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2820 | else |
81ecdfbb RW |
2821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2822 | $as_echo "no" >&6; } | |
bec39cab AC |
2823 | fi |
2824 | ||
81ecdfbb RW |
2825 | if test "x$ac_ct_CC" = x; then |
2826 | CC="" | |
2827 | else | |
2828 | case $cross_compiling:$ac_tool_warned in | |
2829 | yes:) | |
2830 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2831 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2832 | ac_tool_warned=yes ;; | |
2833 | esac | |
2834 | CC=$ac_ct_CC | |
2835 | fi | |
bec39cab AC |
2836 | else |
2837 | CC="$ac_cv_prog_CC" | |
2838 | fi | |
2839 | ||
2840 | if test -z "$CC"; then | |
81ecdfbb RW |
2841 | if test -n "$ac_tool_prefix"; then |
2842 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
bec39cab | 2843 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
81ecdfbb RW |
2844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2845 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2846 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2847 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
2848 | else |
2849 | if test -n "$CC"; then | |
2850 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2851 | else | |
2852 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2853 | for as_dir in $PATH | |
2854 | do | |
2855 | IFS=$as_save_IFS | |
2856 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2857 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2858 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2859 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
81ecdfbb | 2860 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2861 | break 2 |
2862 | fi | |
2863 | done | |
81ecdfbb RW |
2864 | done |
2865 | IFS=$as_save_IFS | |
bec39cab AC |
2866 | |
2867 | fi | |
2868 | fi | |
2869 | CC=$ac_cv_prog_CC | |
2870 | if test -n "$CC"; then | |
81ecdfbb RW |
2871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2872 | $as_echo "$CC" >&6; } | |
bec39cab | 2873 | else |
81ecdfbb RW |
2874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2875 | $as_echo "no" >&6; } | |
bec39cab AC |
2876 | fi |
2877 | ||
81ecdfbb RW |
2878 | |
2879 | fi | |
dae5f5cf | 2880 | fi |
81ecdfbb | 2881 | if test -z "$CC"; then |
dae5f5cf DJ |
2882 | # Extract the first word of "cc", so it can be a program name with args. |
2883 | set dummy cc; ac_word=$2 | |
81ecdfbb RW |
2884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2885 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2886 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2887 | $as_echo_n "(cached) " >&6 |
dae5f5cf | 2888 | else |
81ecdfbb RW |
2889 | if test -n "$CC"; then |
2890 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
dae5f5cf | 2891 | else |
81ecdfbb | 2892 | ac_prog_rejected=no |
dae5f5cf DJ |
2893 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2894 | for as_dir in $PATH | |
2895 | do | |
2896 | IFS=$as_save_IFS | |
2897 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2898 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2899 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2900 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2901 | ac_prog_rejected=yes | |
2902 | continue | |
2903 | fi | |
2904 | ac_cv_prog_CC="cc" | |
2905 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
dae5f5cf | 2906 | break 2 |
b80864fb | 2907 | fi |
dae5f5cf | 2908 | done |
81ecdfbb RW |
2909 | done |
2910 | IFS=$as_save_IFS | |
bec39cab | 2911 | |
84563040 DJ |
2912 | if test $ac_prog_rejected = yes; then |
2913 | # We found a bogon in the path, so make sure we never use it. | |
2914 | set dummy $ac_cv_prog_CC | |
2915 | shift | |
bec39cab | 2916 | if test $# != 0; then |
84563040 DJ |
2917 | # We chose a different compiler from the bogus one. |
2918 | # However, it has the same basename, so the bogon will be chosen | |
2919 | # first if we set CC to just the basename; use the full file name. | |
2920 | shift | |
bec39cab | 2921 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
84563040 DJ |
2922 | fi |
2923 | fi | |
2924 | fi | |
2925 | fi | |
bec39cab | 2926 | CC=$ac_cv_prog_CC |
84563040 | 2927 | if test -n "$CC"; then |
81ecdfbb RW |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2929 | $as_echo "$CC" >&6; } | |
84563040 | 2930 | else |
81ecdfbb RW |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2932 | $as_echo "no" >&6; } | |
84563040 DJ |
2933 | fi |
2934 | ||
81ecdfbb | 2935 | |
bec39cab AC |
2936 | fi |
2937 | if test -z "$CC"; then | |
2938 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2939 | for ac_prog in cl.exe |
bec39cab AC |
2940 | do |
2941 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2942 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2944 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2945 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2946 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2947 | else |
2948 | if test -n "$CC"; then | |
2949 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2950 | else | |
bec39cab AC |
2951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2952 | for as_dir in $PATH | |
2953 | do | |
2954 | IFS=$as_save_IFS | |
2955 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2956 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2957 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2958 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2959 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2960 | break 2 |
2961 | fi | |
2962 | done | |
81ecdfbb RW |
2963 | done |
2964 | IFS=$as_save_IFS | |
bec39cab | 2965 | |
84563040 DJ |
2966 | fi |
2967 | fi | |
bec39cab | 2968 | CC=$ac_cv_prog_CC |
84563040 | 2969 | if test -n "$CC"; then |
81ecdfbb RW |
2970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2971 | $as_echo "$CC" >&6; } | |
84563040 | 2972 | else |
81ecdfbb RW |
2973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2974 | $as_echo "no" >&6; } | |
84563040 | 2975 | fi |
bec39cab | 2976 | |
81ecdfbb | 2977 | |
bec39cab AC |
2978 | test -n "$CC" && break |
2979 | done | |
2980 | fi | |
2981 | if test -z "$CC"; then | |
2982 | ac_ct_CC=$CC | |
81ecdfbb | 2983 | for ac_prog in cl.exe |
bec39cab AC |
2984 | do |
2985 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2986 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2988 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2989 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2990 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
2991 | else |
2992 | if test -n "$ac_ct_CC"; then | |
2993 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2994 | else | |
2995 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2996 | for as_dir in $PATH | |
2997 | do | |
2998 | IFS=$as_save_IFS | |
2999 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3000 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3001 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3002 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3003 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3004 | break 2 |
84563040 | 3005 | fi |
bec39cab | 3006 | done |
81ecdfbb RW |
3007 | done |
3008 | IFS=$as_save_IFS | |
bec39cab AC |
3009 | |
3010 | fi | |
3011 | fi | |
3012 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3013 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3015 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3016 | else |
81ecdfbb RW |
3017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3018 | $as_echo "no" >&6; } | |
84563040 DJ |
3019 | fi |
3020 | ||
81ecdfbb | 3021 | |
bec39cab AC |
3022 | test -n "$ac_ct_CC" && break |
3023 | done | |
84563040 | 3024 | |
81ecdfbb RW |
3025 | if test "x$ac_ct_CC" = x; then |
3026 | CC="" | |
3027 | else | |
3028 | case $cross_compiling:$ac_tool_warned in | |
3029 | yes:) | |
3030 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3031 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3032 | ac_tool_warned=yes ;; | |
3033 | esac | |
3034 | CC=$ac_ct_CC | |
3035 | fi | |
bec39cab AC |
3036 | fi |
3037 | ||
3038 | fi | |
3039 | ||
3040 | ||
81ecdfbb RW |
3041 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3042 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3043 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3044 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3045 | |
3046 | # Provide some information about the compiler. | |
81ecdfbb RW |
3047 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3048 | set X $ac_compile | |
3049 | ac_compiler=$2 | |
3050 | for ac_option in --version -v -V -qversion; do | |
3051 | { { ac_try="$ac_compiler $ac_option >&5" | |
3052 | case "(($ac_try" in | |
3053 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3054 | *) ac_try_echo=$ac_try;; | |
3055 | esac | |
3056 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3057 | $as_echo "$ac_try_echo"; } >&5 | |
3058 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3059 | ac_status=$? |
81ecdfbb RW |
3060 | if test -s conftest.err; then |
3061 | sed '10a\ | |
3062 | ... rest of stderr output deleted ... | |
3063 | 10q' conftest.err >conftest.er1 | |
3064 | cat conftest.er1 >&5 | |
81ecdfbb | 3065 | fi |
d0ac1c44 | 3066 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3067 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3068 | test $ac_status = 0; } | |
3069 | done | |
bec39cab | 3070 | |
81ecdfbb | 3071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3072 | /* end confdefs.h. */ |
3073 | ||
3074 | int | |
3075 | main () | |
3076 | { | |
3077 | ||
3078 | ; | |
3079 | return 0; | |
3080 | } | |
3081 | _ACEOF | |
3082 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3083 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3084 | # Try to create an executable without -o first, disregard a.out. |
3085 | # It will help us diagnose broken compilers, and finding out an intuition | |
3086 | # of exeext. | |
d0ac1c44 SM |
3087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3088 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3089 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3090 | ||
3091 | # The possible output files: | |
3092 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3093 | ||
3094 | ac_rmfiles= | |
3095 | for ac_file in $ac_files | |
3096 | do | |
3097 | case $ac_file in | |
3098 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3099 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3100 | esac | |
3101 | done | |
3102 | rm -f $ac_rmfiles | |
3103 | ||
3104 | if { { ac_try="$ac_link_default" | |
3105 | case "(($ac_try" in | |
3106 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3107 | *) ac_try_echo=$ac_try;; | |
3108 | esac | |
3109 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3110 | $as_echo "$ac_try_echo"; } >&5 | |
3111 | (eval "$ac_link_default") 2>&5 | |
bec39cab | 3112 | ac_status=$? |
81ecdfbb RW |
3113 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3114 | test $ac_status = 0; }; then : | |
3115 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3116 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3117 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3118 | # so that the user can short-circuit this test for compilers unknown to | |
3119 | # Autoconf. | |
3120 | for ac_file in $ac_files '' | |
bec39cab AC |
3121 | do |
3122 | test -f "$ac_file" || continue | |
3123 | case $ac_file in | |
81ecdfbb | 3124 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
bec39cab AC |
3125 | ;; |
3126 | [ab].out ) | |
3127 | # We found the default executable, but exeext='' is most | |
3128 | # certainly right. | |
3129 | break;; | |
3130 | *.* ) | |
81ecdfbb RW |
3131 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3132 | then :; else | |
3133 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3134 | fi | |
3135 | # We set ac_cv_exeext here because the later test for it is not | |
3136 | # safe: cross compilers may not add the suffix if given an `-o' | |
3137 | # argument, so we may need to know it at that point already. | |
3138 | # Even if this section looks crufty: it has the advantage of | |
3139 | # actually working. | |
bec39cab AC |
3140 | break;; |
3141 | * ) | |
3142 | break;; | |
3143 | esac | |
3144 | done | |
81ecdfbb RW |
3145 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3146 | ||
bec39cab | 3147 | else |
81ecdfbb RW |
3148 | ac_file='' |
3149 | fi | |
81ecdfbb | 3150 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3152 | $as_echo "no" >&6; } | |
3153 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3154 | sed 's/^/| /' conftest.$ac_ext >&5 |
3155 | ||
81ecdfbb RW |
3156 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3157 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3158 | as_fn_error 77 "C compiler cannot create executables |
3159 | See \`config.log' for more details" "$LINENO" 5; } | |
3160 | else | |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3162 | $as_echo "yes" >&6; } | |
bec39cab | 3163 | fi |
d0ac1c44 SM |
3164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3165 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3167 | $as_echo "$ac_file" >&6; } | |
bec39cab | 3168 | ac_exeext=$ac_cv_exeext |
bec39cab | 3169 | |
d0ac1c44 | 3170 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
bec39cab | 3171 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3173 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3174 | if { { ac_try="$ac_link" | |
3175 | case "(($ac_try" in | |
3176 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3177 | *) ac_try_echo=$ac_try;; | |
3178 | esac | |
3179 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3180 | $as_echo "$ac_try_echo"; } >&5 | |
3181 | (eval "$ac_link") 2>&5 | |
bec39cab | 3182 | ac_status=$? |
81ecdfbb RW |
3183 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3184 | test $ac_status = 0; }; then : | |
bec39cab AC |
3185 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3186 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3187 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3188 | # `rm'. | |
3189 | for ac_file in conftest.exe conftest conftest.*; do | |
3190 | test -f "$ac_file" || continue | |
3191 | case $ac_file in | |
81ecdfbb | 3192 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
bec39cab | 3193 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
bec39cab AC |
3194 | break;; |
3195 | * ) break;; | |
3196 | esac | |
3197 | done | |
84563040 | 3198 | else |
81ecdfbb RW |
3199 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3200 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3201 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3202 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3203 | fi |
d0ac1c44 | 3204 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3206 | $as_echo "$ac_cv_exeext" >&6; } | |
bec39cab AC |
3207 | |
3208 | rm -f conftest.$ac_ext | |
3209 | EXEEXT=$ac_cv_exeext | |
3210 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3212 | /* end confdefs.h. */ | |
3213 | #include <stdio.h> | |
3214 | int | |
3215 | main () | |
3216 | { | |
3217 | FILE *f = fopen ("conftest.out", "w"); | |
3218 | return ferror (f) || fclose (f) != 0; | |
3219 | ||
3220 | ; | |
3221 | return 0; | |
3222 | } | |
3223 | _ACEOF | |
3224 | ac_clean_files="$ac_clean_files conftest.out" | |
3225 | # Check that the compiler produces executables we can run. If not, either | |
3226 | # the compiler is broken, or we cross compile. | |
3227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3228 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3229 | if test "$cross_compiling" != yes; then | |
3230 | { { ac_try="$ac_link" | |
3231 | case "(($ac_try" in | |
3232 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3233 | *) ac_try_echo=$ac_try;; | |
3234 | esac | |
3235 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3236 | $as_echo "$ac_try_echo"; } >&5 | |
3237 | (eval "$ac_link") 2>&5 | |
3238 | ac_status=$? | |
3239 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3240 | test $ac_status = 0; } | |
3241 | if { ac_try='./conftest$ac_cv_exeext' | |
3242 | { { case "(($ac_try" in | |
3243 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3244 | *) ac_try_echo=$ac_try;; | |
3245 | esac | |
3246 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3247 | $as_echo "$ac_try_echo"; } >&5 | |
3248 | (eval "$ac_try") 2>&5 | |
3249 | ac_status=$? | |
3250 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3251 | test $ac_status = 0; }; }; then | |
3252 | cross_compiling=no | |
3253 | else | |
3254 | if test "$cross_compiling" = maybe; then | |
3255 | cross_compiling=yes | |
3256 | else | |
3257 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3258 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3259 | as_fn_error $? "cannot run C compiled programs. | |
3260 | If you meant to cross compile, use \`--host'. | |
3261 | See \`config.log' for more details" "$LINENO" 5; } | |
3262 | fi | |
3263 | fi | |
3264 | fi | |
3265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3266 | $as_echo "$cross_compiling" >&6; } | |
3267 | ||
3268 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3269 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3271 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3272 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3273 | $as_echo_n "(cached) " >&6 |
bec39cab | 3274 | else |
81ecdfbb | 3275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3276 | /* end confdefs.h. */ |
3277 | ||
3278 | int | |
3279 | main () | |
3280 | { | |
3281 | ||
3282 | ; | |
3283 | return 0; | |
3284 | } | |
3285 | _ACEOF | |
3286 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3287 | if { { ac_try="$ac_compile" |
3288 | case "(($ac_try" in | |
3289 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3290 | *) ac_try_echo=$ac_try;; | |
3291 | esac | |
3292 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3293 | $as_echo "$ac_try_echo"; } >&5 | |
3294 | (eval "$ac_compile") 2>&5 | |
bec39cab | 3295 | ac_status=$? |
81ecdfbb RW |
3296 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3297 | test $ac_status = 0; }; then : | |
3298 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3299 | test -f "$ac_file" || continue; | |
bec39cab | 3300 | case $ac_file in |
81ecdfbb | 3301 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3302 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3303 | break;; | |
3304 | esac | |
3305 | done | |
3306 | else | |
81ecdfbb | 3307 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3308 | sed 's/^/| /' conftest.$ac_ext >&5 |
3309 | ||
81ecdfbb RW |
3310 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3311 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3312 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3313 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3314 | fi |
bec39cab AC |
3315 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
3316 | fi | |
81ecdfbb RW |
3317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3318 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3319 | OBJEXT=$ac_cv_objext |
3320 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3322 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3323 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3324 | $as_echo_n "(cached) " >&6 |
bec39cab | 3325 | else |
81ecdfbb | 3326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3327 | /* end confdefs.h. */ |
3328 | ||
3329 | int | |
3330 | main () | |
3331 | { | |
3332 | #ifndef __GNUC__ | |
3333 | choke me | |
3334 | #endif | |
84563040 | 3335 | |
bec39cab AC |
3336 | ; |
3337 | return 0; | |
3338 | } | |
3339 | _ACEOF | |
81ecdfbb | 3340 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab | 3341 | ac_compiler_gnu=yes |
84563040 | 3342 | else |
81ecdfbb | 3343 | ac_compiler_gnu=no |
84563040 | 3344 | fi |
81ecdfbb | 3345 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3346 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
84563040 | 3347 | |
bec39cab | 3348 | fi |
81ecdfbb RW |
3349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3350 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3351 | if test $ac_compiler_gnu = yes; then | |
3352 | GCC=yes | |
3353 | else | |
3354 | GCC= | |
3355 | fi | |
bec39cab AC |
3356 | ac_test_CFLAGS=${CFLAGS+set} |
3357 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3359 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3360 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb RW |
3361 | $as_echo_n "(cached) " >&6 |
3362 | else | |
3363 | ac_save_c_werror_flag=$ac_c_werror_flag | |
3364 | ac_c_werror_flag=yes | |
3365 | ac_cv_prog_cc_g=no | |
3366 | CFLAGS="-g" | |
3367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3368 | /* end confdefs.h. */ |
3369 | ||
3370 | int | |
3371 | main () | |
3372 | { | |
3373 | ||
3374 | ; | |
3375 | return 0; | |
3376 | } | |
3377 | _ACEOF | |
81ecdfbb | 3378 | if ac_fn_c_try_compile "$LINENO"; then : |
84563040 DJ |
3379 | ac_cv_prog_cc_g=yes |
3380 | else | |
81ecdfbb RW |
3381 | CFLAGS="" |
3382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3383 | /* end confdefs.h. */ | |
3384 | ||
3385 | int | |
3386 | main () | |
3387 | { | |
3388 | ||
3389 | ; | |
3390 | return 0; | |
3391 | } | |
3392 | _ACEOF | |
3393 | if ac_fn_c_try_compile "$LINENO"; then : | |
3394 | ||
3395 | else | |
3396 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3397 | CFLAGS="-g" | |
3398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3399 | /* end confdefs.h. */ | |
3400 | ||
3401 | int | |
3402 | main () | |
3403 | { | |
84563040 | 3404 | |
81ecdfbb RW |
3405 | ; |
3406 | return 0; | |
3407 | } | |
3408 | _ACEOF | |
3409 | if ac_fn_c_try_compile "$LINENO"; then : | |
3410 | ac_cv_prog_cc_g=yes | |
3411 | fi | |
3412 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 3413 | fi |
81ecdfbb | 3414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3415 | fi |
81ecdfbb RW |
3416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3417 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3418 | fi | |
3419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3420 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
84563040 | 3421 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3422 | CFLAGS=$ac_save_CFLAGS |
84563040 DJ |
3423 | elif test $ac_cv_prog_cc_g = yes; then |
3424 | if test "$GCC" = yes; then | |
3425 | CFLAGS="-g -O2" | |
3426 | else | |
3427 | CFLAGS="-g" | |
3428 | fi | |
3429 | else | |
3430 | if test "$GCC" = yes; then | |
3431 | CFLAGS="-O2" | |
3432 | else | |
3433 | CFLAGS= | |
3434 | fi | |
3435 | fi | |
81ecdfbb RW |
3436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3437 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3438 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3439 | $as_echo_n "(cached) " >&6 |
bec39cab | 3440 | else |
81ecdfbb | 3441 | ac_cv_prog_cc_c89=no |
bec39cab | 3442 | ac_save_CC=$CC |
81ecdfbb | 3443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3444 | /* end confdefs.h. */ |
3445 | #include <stdarg.h> | |
3446 | #include <stdio.h> | |
d0ac1c44 | 3447 | struct stat; |
bec39cab AC |
3448 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3449 | struct buf { int x; }; | |
3450 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3451 | static char *e (p, i) | |
3452 | char **p; | |
3453 | int i; | |
3454 | { | |
3455 | return p[i]; | |
3456 | } | |
3457 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3458 | { | |
3459 | char *s; | |
3460 | va_list v; | |
3461 | va_start (v,p); | |
3462 | s = g (p, va_arg (v,int)); | |
3463 | va_end (v); | |
3464 | return s; | |
3465 | } | |
3466 | ||
3467 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3468 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3469 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3470 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3471 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3472 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3473 | that's true only with -std. */ |
bec39cab AC |
3474 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3475 | ||
81ecdfbb RW |
3476 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3477 | inside strings and character constants. */ | |
3478 | #define FOO(x) 'x' | |
3479 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3480 | ||
bec39cab AC |
3481 | int test (int i, double x); |
3482 | struct s1 {int (*f) (int a);}; | |
3483 | struct s2 {int (*f) (double a);}; | |
3484 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3485 | int argc; | |
3486 | char **argv; | |
3487 | int | |
3488 | main () | |
3489 | { | |
3490 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3491 | ; | |
3492 | return 0; | |
3493 | } | |
3494 | _ACEOF | |
81ecdfbb RW |
3495 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3496 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3497 | do |
3498 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3499 | if ac_fn_c_try_compile "$LINENO"; then : |
3500 | ac_cv_prog_cc_c89=$ac_arg | |
bec39cab | 3501 | fi |
81ecdfbb RW |
3502 | rm -f core conftest.err conftest.$ac_objext |
3503 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
bec39cab | 3504 | done |
81ecdfbb | 3505 | rm -f conftest.$ac_ext |
bec39cab AC |
3506 | CC=$ac_save_CC |
3507 | ||
3508 | fi | |
81ecdfbb RW |
3509 | # AC_CACHE_VAL |
3510 | case "x$ac_cv_prog_cc_c89" in | |
3511 | x) | |
3512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3513 | $as_echo "none needed" >&6; } ;; | |
3514 | xno) | |
3515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3516 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3517 | *) |
81ecdfbb RW |
3518 | CC="$CC $ac_cv_prog_cc_c89" |
3519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3520 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
bec39cab | 3521 | esac |
81ecdfbb | 3522 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
bec39cab | 3523 | |
dae5f5cf DJ |
3524 | fi |
3525 | ||
dae5f5cf | 3526 | ac_ext=c |
bec39cab AC |
3527 | ac_cpp='$CPP $CPPFLAGS' |
3528 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3529 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3530 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
84563040 | 3531 | |
3bc3d82a PA |
3532 | ac_ext=cpp |
3533 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3534 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3535 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3536 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3537 | if test -z "$CXX"; then | |
3538 | if test -n "$CCC"; then | |
3539 | CXX=$CCC | |
3540 | else | |
3541 | if test -n "$ac_tool_prefix"; then | |
3542 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3543 | do | |
3544 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3545 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3547 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3548 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3549 | $as_echo_n "(cached) " >&6 |
3550 | else | |
3551 | if test -n "$CXX"; then | |
3552 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3553 | else | |
3554 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3555 | for as_dir in $PATH | |
3556 | do | |
3557 | IFS=$as_save_IFS | |
3558 | test -z "$as_dir" && as_dir=. | |
3559 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3560 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3561 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3562 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3563 | break 2 | |
3564 | fi | |
3565 | done | |
3566 | done | |
3567 | IFS=$as_save_IFS | |
3568 | ||
3569 | fi | |
3570 | fi | |
3571 | CXX=$ac_cv_prog_CXX | |
3572 | if test -n "$CXX"; then | |
3573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3574 | $as_echo "$CXX" >&6; } | |
3575 | else | |
3576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3577 | $as_echo "no" >&6; } | |
3578 | fi | |
3579 | ||
3580 | ||
3581 | test -n "$CXX" && break | |
3582 | done | |
3583 | fi | |
3584 | if test -z "$CXX"; then | |
3585 | ac_ct_CXX=$CXX | |
3586 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3587 | do | |
3588 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3589 | set dummy $ac_prog; ac_word=$2 | |
3590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3591 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3592 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3593 | $as_echo_n "(cached) " >&6 |
3594 | else | |
3595 | if test -n "$ac_ct_CXX"; then | |
3596 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3597 | else | |
3598 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3599 | for as_dir in $PATH | |
3600 | do | |
3601 | IFS=$as_save_IFS | |
3602 | test -z "$as_dir" && as_dir=. | |
3603 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3604 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3605 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3606 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3607 | break 2 | |
3608 | fi | |
3609 | done | |
3610 | done | |
3611 | IFS=$as_save_IFS | |
3612 | ||
3613 | fi | |
3614 | fi | |
3615 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3616 | if test -n "$ac_ct_CXX"; then | |
3617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3618 | $as_echo "$ac_ct_CXX" >&6; } | |
3619 | else | |
3620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3621 | $as_echo "no" >&6; } | |
3622 | fi | |
3623 | ||
3624 | ||
3625 | test -n "$ac_ct_CXX" && break | |
3626 | done | |
3627 | ||
3628 | if test "x$ac_ct_CXX" = x; then | |
3629 | CXX="g++" | |
3630 | else | |
3631 | case $cross_compiling:$ac_tool_warned in | |
3632 | yes:) | |
3633 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3634 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3635 | ac_tool_warned=yes ;; | |
3636 | esac | |
3637 | CXX=$ac_ct_CXX | |
3638 | fi | |
3639 | fi | |
3640 | ||
3641 | fi | |
3642 | fi | |
3643 | # Provide some information about the compiler. | |
3644 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3645 | set X $ac_compile | |
3646 | ac_compiler=$2 | |
3647 | for ac_option in --version -v -V -qversion; do | |
3648 | { { ac_try="$ac_compiler $ac_option >&5" | |
3649 | case "(($ac_try" in | |
3650 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3651 | *) ac_try_echo=$ac_try;; | |
3652 | esac | |
3653 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3654 | $as_echo "$ac_try_echo"; } >&5 | |
3655 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3656 | ac_status=$? | |
3657 | if test -s conftest.err; then | |
3658 | sed '10a\ | |
3659 | ... rest of stderr output deleted ... | |
3660 | 10q' conftest.err >conftest.er1 | |
3661 | cat conftest.er1 >&5 | |
3bc3d82a | 3662 | fi |
d0ac1c44 | 3663 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3664 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3665 | test $ac_status = 0; } | |
3666 | done | |
3667 | ||
3668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3669 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3670 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3671 | $as_echo_n "(cached) " >&6 |
3672 | else | |
3673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3674 | /* end confdefs.h. */ | |
3675 | ||
3676 | int | |
3677 | main () | |
3678 | { | |
3679 | #ifndef __GNUC__ | |
3680 | choke me | |
3681 | #endif | |
3682 | ||
3683 | ; | |
3684 | return 0; | |
3685 | } | |
3686 | _ACEOF | |
3687 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3688 | ac_compiler_gnu=yes | |
3689 | else | |
3690 | ac_compiler_gnu=no | |
3691 | fi | |
3692 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3693 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3694 | ||
3695 | fi | |
3696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3697 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3698 | if test $ac_compiler_gnu = yes; then | |
3699 | GXX=yes | |
3700 | else | |
3701 | GXX= | |
3702 | fi | |
3703 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3704 | ac_save_CXXFLAGS=$CXXFLAGS | |
3705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3706 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3707 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3708 | $as_echo_n "(cached) " >&6 |
3709 | else | |
3710 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3711 | ac_cxx_werror_flag=yes | |
3712 | ac_cv_prog_cxx_g=no | |
3713 | CXXFLAGS="-g" | |
3714 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3715 | /* end confdefs.h. */ | |
3716 | ||
3717 | int | |
3718 | main () | |
3719 | { | |
3720 | ||
3721 | ; | |
3722 | return 0; | |
3723 | } | |
3724 | _ACEOF | |
3725 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3726 | ac_cv_prog_cxx_g=yes | |
3727 | else | |
3728 | CXXFLAGS="" | |
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 | ||
3742 | else | |
3743 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3744 | CXXFLAGS="-g" | |
3745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3746 | /* end confdefs.h. */ | |
3747 | ||
3748 | int | |
3749 | main () | |
3750 | { | |
3751 | ||
3752 | ; | |
3753 | return 0; | |
3754 | } | |
3755 | _ACEOF | |
3756 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3757 | ac_cv_prog_cxx_g=yes | |
3758 | fi | |
3759 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3760 | fi | |
3761 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3762 | fi | |
3763 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3764 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3765 | fi | |
3766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3767 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3768 | if test "$ac_test_CXXFLAGS" = set; then | |
3769 | CXXFLAGS=$ac_save_CXXFLAGS | |
3770 | elif test $ac_cv_prog_cxx_g = yes; then | |
3771 | if test "$GXX" = yes; then | |
3772 | CXXFLAGS="-g -O2" | |
3773 | else | |
3774 | CXXFLAGS="-g" | |
3775 | fi | |
3776 | else | |
3777 | if test "$GXX" = yes; then | |
3778 | CXXFLAGS="-O2" | |
3779 | else | |
3780 | CXXFLAGS= | |
3781 | fi | |
3782 | fi | |
3783 | ac_ext=c | |
3784 | ac_cpp='$CPP $CPPFLAGS' | |
3785 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3786 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3787 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3788 | ||
c9a1864a YQ |
3789 | |
3790 | ac_ext=c | |
3791 | ac_cpp='$CPP $CPPFLAGS' | |
3792 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3793 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3794 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3796 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3797 | # On Suns, sometimes $CPP names a directory. | |
3798 | if test -n "$CPP" && test -d "$CPP"; then | |
3799 | CPP= | |
3800 | fi | |
3801 | if test -z "$CPP"; then | |
d0ac1c44 | 3802 | if ${ac_cv_prog_CPP+:} false; then : |
c9a1864a YQ |
3803 | $as_echo_n "(cached) " >&6 |
3804 | else | |
3805 | # Double quotes because CPP needs to be expanded | |
3806 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3807 | do | |
3808 | ac_preproc_ok=false | |
3809 | for ac_c_preproc_warn_flag in '' yes | |
3810 | do | |
3811 | # Use a header file that comes with gcc, so configuring glibc | |
3812 | # with a fresh cross-compiler works. | |
3813 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3814 | # <limits.h> exists even on freestanding compilers. | |
3815 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3816 | # not just through cpp. "Syntax error" is here to catch this case. | |
3817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3818 | /* end confdefs.h. */ | |
3819 | #ifdef __STDC__ | |
3820 | # include <limits.h> | |
3821 | #else | |
3822 | # include <assert.h> | |
3823 | #endif | |
3824 | Syntax error | |
3825 | _ACEOF | |
3826 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3827 | ||
3828 | else | |
3829 | # Broken: fails on valid input. | |
3830 | continue | |
3831 | fi | |
d0ac1c44 | 3832 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3833 | |
3834 | # OK, works on sane cases. Now check whether nonexistent headers | |
3835 | # can be detected and how. | |
3836 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3837 | /* end confdefs.h. */ | |
3838 | #include <ac_nonexistent.h> | |
3839 | _ACEOF | |
3840 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3841 | # Broken: success on invalid input. | |
3842 | continue | |
3843 | else | |
3844 | # Passes both tests. | |
3845 | ac_preproc_ok=: | |
3846 | break | |
3847 | fi | |
d0ac1c44 | 3848 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3849 | |
3850 | done | |
3851 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3852 | rm -f conftest.i conftest.err conftest.$ac_ext |
c9a1864a YQ |
3853 | if $ac_preproc_ok; then : |
3854 | break | |
3855 | fi | |
3856 | ||
3857 | done | |
3858 | ac_cv_prog_CPP=$CPP | |
3859 | ||
3860 | fi | |
3861 | CPP=$ac_cv_prog_CPP | |
3862 | else | |
3863 | ac_cv_prog_CPP=$CPP | |
3864 | fi | |
3865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3866 | $as_echo "$CPP" >&6; } | |
3867 | ac_preproc_ok=false | |
3868 | for ac_c_preproc_warn_flag in '' yes | |
3869 | do | |
3870 | # Use a header file that comes with gcc, so configuring glibc | |
3871 | # with a fresh cross-compiler works. | |
3872 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3873 | # <limits.h> exists even on freestanding compilers. | |
3874 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3875 | # not just through cpp. "Syntax error" is here to catch this case. | |
3876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3877 | /* end confdefs.h. */ | |
3878 | #ifdef __STDC__ | |
3879 | # include <limits.h> | |
3880 | #else | |
3881 | # include <assert.h> | |
3882 | #endif | |
3883 | Syntax error | |
3884 | _ACEOF | |
3885 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3886 | ||
3887 | else | |
3888 | # Broken: fails on valid input. | |
3889 | continue | |
3890 | fi | |
d0ac1c44 | 3891 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3892 | |
3893 | # OK, works on sane cases. Now check whether nonexistent headers | |
3894 | # can be detected and how. | |
81ecdfbb | 3895 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3896 | /* end confdefs.h. */ |
3897 | #include <ac_nonexistent.h> | |
3898 | _ACEOF | |
81ecdfbb | 3899 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3900 | # Broken: success on invalid input. |
3901 | continue | |
3902 | else | |
bec39cab AC |
3903 | # Passes both tests. |
3904 | ac_preproc_ok=: | |
3905 | break | |
3906 | fi | |
d0ac1c44 | 3907 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab AC |
3908 | |
3909 | done | |
3910 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3911 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
3912 | if $ac_preproc_ok; then : |
3913 | ||
3914 | else | |
3915 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3916 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3917 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
3918 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3919 | fi |
3920 | ||
81ecdfbb RW |
3921 | ac_ext=c |
3922 | ac_cpp='$CPP $CPPFLAGS' | |
3923 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3924 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3925 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bec39cab | 3926 | |
81ecdfbb RW |
3927 | |
3928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
3929 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 3930 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 3931 | $as_echo_n "(cached) " >&6 |
bec39cab | 3932 | else |
81ecdfbb RW |
3933 | if test -z "$GREP"; then |
3934 | ac_path_GREP_found=false | |
3935 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3937 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
bec39cab | 3938 | do |
81ecdfbb RW |
3939 | IFS=$as_save_IFS |
3940 | test -z "$as_dir" && as_dir=. | |
3941 | for ac_prog in grep ggrep; do | |
3942 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3943 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 3944 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
3945 | # Check for GNU ac_path_GREP and select it if it is found. |
3946 | # Check for GNU $ac_path_GREP | |
3947 | case `"$ac_path_GREP" --version 2>&1` in | |
3948 | *GNU*) | |
3949 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3950 | *) | |
3951 | ac_count=0 | |
3952 | $as_echo_n 0123456789 >"conftest.in" | |
3953 | while : | |
3954 | do | |
3955 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3956 | mv "conftest.tmp" "conftest.in" | |
3957 | cp "conftest.in" "conftest.nl" | |
3958 | $as_echo 'GREP' >> "conftest.nl" | |
3959 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3960 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3961 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3962 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3963 | # Best one so far, save it but keep looking for a better one | |
3964 | ac_cv_path_GREP="$ac_path_GREP" | |
3965 | ac_path_GREP_max=$ac_count | |
3966 | fi | |
3967 | # 10*(2^10) chars as input seems more than enough | |
3968 | test $ac_count -gt 10 && break | |
3969 | done | |
3970 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3971 | esac | |
3972 | ||
3973 | $ac_path_GREP_found && break 3 | |
3974 | done | |
3975 | done | |
3976 | done | |
3977 | IFS=$as_save_IFS | |
3978 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 3979 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
bec39cab AC |
3980 | fi |
3981 | else | |
81ecdfbb | 3982 | ac_cv_path_GREP=$GREP |
bec39cab | 3983 | fi |
bec39cab | 3984 | |
84563040 | 3985 | fi |
81ecdfbb RW |
3986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
3987 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3988 | GREP="$ac_cv_path_GREP" | |
bec39cab | 3989 | |
bec39cab | 3990 | |
81ecdfbb RW |
3991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3992 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 3993 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb RW |
3994 | $as_echo_n "(cached) " >&6 |
3995 | else | |
3996 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
3997 | then ac_cv_path_EGREP="$GREP -E" | |
3998 | else | |
3999 | if test -z "$EGREP"; then | |
4000 | ac_path_EGREP_found=false | |
4001 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4002 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4003 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4004 | do | |
4005 | IFS=$as_save_IFS | |
4006 | test -z "$as_dir" && as_dir=. | |
4007 | for ac_prog in egrep; do | |
4008 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4009 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4010 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4011 | # Check for GNU ac_path_EGREP and select it if it is found. |
4012 | # Check for GNU $ac_path_EGREP | |
4013 | case `"$ac_path_EGREP" --version 2>&1` in | |
4014 | *GNU*) | |
4015 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4016 | *) | |
4017 | ac_count=0 | |
4018 | $as_echo_n 0123456789 >"conftest.in" | |
4019 | while : | |
4020 | do | |
4021 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4022 | mv "conftest.tmp" "conftest.in" | |
4023 | cp "conftest.in" "conftest.nl" | |
4024 | $as_echo 'EGREP' >> "conftest.nl" | |
4025 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4026 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4027 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4028 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4029 | # Best one so far, save it but keep looking for a better one | |
4030 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4031 | ac_path_EGREP_max=$ac_count | |
4032 | fi | |
4033 | # 10*(2^10) chars as input seems more than enough | |
4034 | test $ac_count -gt 10 && break | |
4035 | done | |
4036 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4037 | esac | |
bec39cab | 4038 | |
81ecdfbb RW |
4039 | $ac_path_EGREP_found && break 3 |
4040 | done | |
4041 | done | |
4042 | done | |
4043 | IFS=$as_save_IFS | |
4044 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4045 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4046 | fi |
bec39cab | 4047 | else |
81ecdfbb | 4048 | ac_cv_path_EGREP=$EGREP |
84563040 | 4049 | fi |
bec39cab | 4050 | |
81ecdfbb | 4051 | fi |
b80864fb | 4052 | fi |
81ecdfbb RW |
4053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4054 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4055 | EGREP="$ac_cv_path_EGREP" | |
b80864fb DJ |
4056 | |
4057 | ||
c971b7fa PA |
4058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4059 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4060 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
4061 | $as_echo_n "(cached) " >&6 |
4062 | else | |
4063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4064 | /* end confdefs.h. */ | |
4065 | #include <stdlib.h> | |
4066 | #include <stdarg.h> | |
4067 | #include <string.h> | |
4068 | #include <float.h> | |
bec39cab | 4069 | |
c971b7fa PA |
4070 | int |
4071 | main () | |
4072 | { | |
bec39cab | 4073 | |
c971b7fa PA |
4074 | ; |
4075 | return 0; | |
4076 | } | |
4077 | _ACEOF | |
4078 | if ac_fn_c_try_compile "$LINENO"; then : | |
4079 | ac_cv_header_stdc=yes | |
84563040 | 4080 | else |
c971b7fa PA |
4081 | ac_cv_header_stdc=no |
4082 | fi | |
4083 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 4084 | |
c971b7fa PA |
4085 | if test $ac_cv_header_stdc = yes; then |
4086 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 4088 | /* end confdefs.h. */ |
c971b7fa | 4089 | #include <string.h> |
bec39cab AC |
4090 | |
4091 | _ACEOF | |
84563040 | 4092 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
c971b7fa PA |
4093 | $EGREP "memchr" >/dev/null 2>&1; then : |
4094 | ||
84563040 | 4095 | else |
c971b7fa | 4096 | ac_cv_header_stdc=no |
84563040 DJ |
4097 | fi |
4098 | rm -f conftest* | |
4099 | ||
770d76d7 | 4100 | fi |
81ecdfbb | 4101 | |
c971b7fa PA |
4102 | if test $ac_cv_header_stdc = yes; then |
4103 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4105 | /* end confdefs.h. */ | |
4106 | #include <stdlib.h> | |
4107 | ||
4108 | _ACEOF | |
4109 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4110 | $EGREP "free" >/dev/null 2>&1; then : | |
4111 | ||
770d76d7 | 4112 | else |
c971b7fa | 4113 | ac_cv_header_stdc=no |
bec39cab | 4114 | fi |
c971b7fa | 4115 | rm -f conftest* |
bec39cab AC |
4116 | |
4117 | fi | |
c971b7fa PA |
4118 | |
4119 | if test $ac_cv_header_stdc = yes; then | |
4120 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4121 | if test "$cross_compiling" = yes; then : | |
4122 | : | |
770d76d7 | 4123 | else |
c971b7fa PA |
4124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4125 | /* end confdefs.h. */ | |
4126 | #include <ctype.h> | |
4127 | #include <stdlib.h> | |
4128 | #if ((' ' & 0x0FF) == 0x020) | |
4129 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4130 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4131 | #else | |
4132 | # define ISLOWER(c) \ | |
4133 | (('a' <= (c) && (c) <= 'i') \ | |
4134 | || ('j' <= (c) && (c) <= 'r') \ | |
4135 | || ('s' <= (c) && (c) <= 'z')) | |
4136 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4137 | #endif | |
4138 | ||
4139 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4140 | int | |
4141 | main () | |
4142 | { | |
4143 | int i; | |
4144 | for (i = 0; i < 256; i++) | |
4145 | if (XOR (islower (i), ISLOWER (i)) | |
4146 | || toupper (i) != TOUPPER (i)) | |
4147 | return 2; | |
4148 | return 0; | |
4149 | } | |
4150 | _ACEOF | |
4151 | if ac_fn_c_try_run "$LINENO"; then : | |
4152 | ||
770d76d7 | 4153 | else |
c971b7fa PA |
4154 | ac_cv_header_stdc=no |
4155 | fi | |
4156 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4157 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4158 | fi | |
bec39cab | 4159 | |
770d76d7 PA |
4160 | fi |
4161 | fi | |
c971b7fa PA |
4162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4163 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4164 | if test $ac_cv_header_stdc = yes; then | |
4165 | ||
4166 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4167 | ||
770d76d7 | 4168 | fi |
bec39cab | 4169 | |
c971b7fa PA |
4170 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4171 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4172 | inttypes.h stdint.h unistd.h | |
4173 | do : | |
4174 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4175 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4176 | " | |
d0ac1c44 | 4177 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
c971b7fa PA |
4178 | cat >>confdefs.h <<_ACEOF |
4179 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4180 | _ACEOF | |
4181 | ||
81ecdfbb | 4182 | fi |
bec39cab | 4183 | |
c971b7fa | 4184 | done |
bec39cab AC |
4185 | |
4186 | ||
4187 | ||
c971b7fa | 4188 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4189 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
c971b7fa | 4190 | MINIX=yes |
770d76d7 | 4191 | else |
c971b7fa | 4192 | MINIX= |
770d76d7 | 4193 | fi |
bec39cab AC |
4194 | |
4195 | ||
c971b7fa PA |
4196 | if test "$MINIX" = yes; then |
4197 | ||
4198 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
4199 | ||
4200 | ||
4201 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
4202 | ||
4203 | ||
4204 | $as_echo "#define _MINIX 1" >>confdefs.h | |
4205 | ||
770d76d7 | 4206 | fi |
bec39cab | 4207 | |
c971b7fa PA |
4208 | |
4209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
4210 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4211 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
c971b7fa | 4212 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4213 | else |
c971b7fa PA |
4214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4215 | /* end confdefs.h. */ | |
bec39cab | 4216 | |
d0ac1c44 SM |
4217 | # define __EXTENSIONS__ 1 |
4218 | $ac_includes_default | |
c971b7fa PA |
4219 | int |
4220 | main () | |
4221 | { | |
4222 | ||
4223 | ; | |
4224 | return 0; | |
4225 | } | |
4226 | _ACEOF | |
4227 | if ac_fn_c_try_compile "$LINENO"; then : | |
4228 | ac_cv_safe_to_define___extensions__=yes | |
770d76d7 | 4229 | else |
c971b7fa PA |
4230 | ac_cv_safe_to_define___extensions__=no |
4231 | fi | |
4232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
770d76d7 | 4233 | fi |
c971b7fa PA |
4234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4235 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4236 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4237 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
4238 | ||
4239 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
4240 | ||
4241 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
4242 | ||
4243 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
4244 | ||
4245 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
4246 | ||
bec39cab | 4247 | |
c9a1864a | 4248 | |
589bc927 TT |
4249 | # Check whether --enable-largefile was given. |
4250 | if test "${enable_largefile+set}" = set; then : | |
4251 | enableval=$enable_largefile; | |
4252 | fi | |
4253 | ||
4254 | if test "$enable_largefile" != no; then | |
4255 | ||
4256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4257 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4258 | if ${ac_cv_sys_largefile_CC+:} false; then : |
589bc927 TT |
4259 | $as_echo_n "(cached) " >&6 |
4260 | else | |
4261 | ac_cv_sys_largefile_CC=no | |
4262 | if test "$GCC" != yes; then | |
4263 | ac_save_CC=$CC | |
4264 | while :; do | |
4265 | # IRIX 6.2 and later do not support large files by default, | |
4266 | # so use the C compiler's -n32 option if that helps. | |
4267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4268 | /* end confdefs.h. */ | |
4269 | #include <sys/types.h> | |
4270 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4271 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4272 | since some C++ compilers masquerading as C compilers | |
4273 | incorrectly reject 9223372036854775807. */ | |
4274 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4275 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4276 | && LARGE_OFF_T % 2147483647 == 1) | |
4277 | ? 1 : -1]; | |
4278 | int | |
4279 | main () | |
4280 | { | |
4281 | ||
4282 | ; | |
4283 | return 0; | |
4284 | } | |
4285 | _ACEOF | |
4286 | if ac_fn_c_try_compile "$LINENO"; then : | |
4287 | break | |
4288 | fi | |
4289 | rm -f core conftest.err conftest.$ac_objext | |
4290 | CC="$CC -n32" | |
4291 | if ac_fn_c_try_compile "$LINENO"; then : | |
4292 | ac_cv_sys_largefile_CC=' -n32'; break | |
4293 | fi | |
4294 | rm -f core conftest.err conftest.$ac_objext | |
4295 | break | |
4296 | done | |
4297 | CC=$ac_save_CC | |
4298 | rm -f conftest.$ac_ext | |
4299 | fi | |
4300 | fi | |
4301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4302 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4303 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4304 | CC=$CC$ac_cv_sys_largefile_CC | |
4305 | fi | |
4306 | ||
4307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4308 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4309 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
589bc927 TT |
4310 | $as_echo_n "(cached) " >&6 |
4311 | else | |
4312 | while :; do | |
4313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4314 | /* end confdefs.h. */ | |
4315 | #include <sys/types.h> | |
4316 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4317 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4318 | since some C++ compilers masquerading as C compilers | |
4319 | incorrectly reject 9223372036854775807. */ | |
4320 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4321 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4322 | && LARGE_OFF_T % 2147483647 == 1) | |
4323 | ? 1 : -1]; | |
4324 | int | |
4325 | main () | |
4326 | { | |
4327 | ||
4328 | ; | |
4329 | return 0; | |
4330 | } | |
4331 | _ACEOF | |
4332 | if ac_fn_c_try_compile "$LINENO"; then : | |
4333 | ac_cv_sys_file_offset_bits=no; break | |
4334 | fi | |
4335 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4337 | /* end confdefs.h. */ | |
4338 | #define _FILE_OFFSET_BITS 64 | |
4339 | #include <sys/types.h> | |
4340 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4341 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4342 | since some C++ compilers masquerading as C compilers | |
4343 | incorrectly reject 9223372036854775807. */ | |
4344 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4345 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4346 | && LARGE_OFF_T % 2147483647 == 1) | |
4347 | ? 1 : -1]; | |
4348 | int | |
4349 | main () | |
4350 | { | |
4351 | ||
4352 | ; | |
4353 | return 0; | |
4354 | } | |
4355 | _ACEOF | |
4356 | if ac_fn_c_try_compile "$LINENO"; then : | |
4357 | ac_cv_sys_file_offset_bits=64; break | |
4358 | fi | |
4359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4360 | ac_cv_sys_file_offset_bits=unknown | |
4361 | break | |
4362 | done | |
4363 | fi | |
4364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4365 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4366 | case $ac_cv_sys_file_offset_bits in #( | |
4367 | no | unknown) ;; | |
4368 | *) | |
4369 | cat >>confdefs.h <<_ACEOF | |
4370 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4371 | _ACEOF | |
4372 | ;; | |
4373 | esac | |
4374 | rm -rf conftest* | |
4375 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4376 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4377 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4378 | if ${ac_cv_sys_large_files+:} false; then : |
589bc927 TT |
4379 | $as_echo_n "(cached) " >&6 |
4380 | else | |
4381 | while :; do | |
4382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4383 | /* end confdefs.h. */ | |
4384 | #include <sys/types.h> | |
4385 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4386 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4387 | since some C++ compilers masquerading as C compilers | |
4388 | incorrectly reject 9223372036854775807. */ | |
4389 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4390 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4391 | && LARGE_OFF_T % 2147483647 == 1) | |
4392 | ? 1 : -1]; | |
4393 | int | |
4394 | main () | |
4395 | { | |
4396 | ||
4397 | ; | |
4398 | return 0; | |
4399 | } | |
4400 | _ACEOF | |
4401 | if ac_fn_c_try_compile "$LINENO"; then : | |
4402 | ac_cv_sys_large_files=no; break | |
4403 | fi | |
4404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4406 | /* end confdefs.h. */ | |
4407 | #define _LARGE_FILES 1 | |
4408 | #include <sys/types.h> | |
4409 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4410 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4411 | since some C++ compilers masquerading as C compilers | |
4412 | incorrectly reject 9223372036854775807. */ | |
4413 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4414 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4415 | && LARGE_OFF_T % 2147483647 == 1) | |
4416 | ? 1 : -1]; | |
4417 | int | |
4418 | main () | |
4419 | { | |
4420 | ||
4421 | ; | |
4422 | return 0; | |
4423 | } | |
4424 | _ACEOF | |
4425 | if ac_fn_c_try_compile "$LINENO"; then : | |
4426 | ac_cv_sys_large_files=1; break | |
4427 | fi | |
4428 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4429 | ac_cv_sys_large_files=unknown | |
4430 | break | |
4431 | done | |
4432 | fi | |
4433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4434 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4435 | case $ac_cv_sys_large_files in #( | |
4436 | no | unknown) ;; | |
4437 | *) | |
4438 | cat >>confdefs.h <<_ACEOF | |
4439 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4440 | _ACEOF | |
4441 | ;; | |
4442 | esac | |
4443 | rm -rf conftest* | |
4444 | fi | |
d0ac1c44 SM |
4445 | |
4446 | ||
589bc927 TT |
4447 | fi |
4448 | ||
770d76d7 PA |
4449 | ac_aux_dir= |
4450 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4451 | if test -f "$ac_dir/install-sh"; then |
4452 | ac_aux_dir=$ac_dir | |
4453 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4454 | break | |
4455 | elif test -f "$ac_dir/install.sh"; then | |
4456 | ac_aux_dir=$ac_dir | |
4457 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4458 | break | |
4459 | elif test -f "$ac_dir/shtool"; then | |
4460 | ac_aux_dir=$ac_dir | |
4461 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4462 | break | |
4463 | fi | |
770d76d7 PA |
4464 | done |
4465 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4466 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
770d76d7 PA |
4467 | fi |
4468 | ||
4469 | # These three variables are undocumented and unsupported, | |
4470 | # and are intended to be withdrawn in a future Autoconf release. | |
4471 | # They can cause serious problems if a builder's source tree is in a directory | |
4472 | # whose full name contains unusual characters. | |
4473 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4474 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4475 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
c9a1864a | 4476 | |
bec39cab | 4477 | |
bdaed379 HD |
4478 | # Expand $ac_aux_dir to an absolute path. |
4479 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4480 | ||
4481 | if test x"${install_sh+set}" != xset; then | |
4482 | case $am_aux_dir in | |
4483 | *\ * | *\ *) | |
4484 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4485 | *) | |
4486 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4487 | esac | |
4488 | fi | |
4489 | ||
4490 | # Installed binaries are usually stripped using 'strip' when the user | |
4491 | # run "make install-strip". However 'strip' might not be the right | |
4492 | # tool to use in cross-compilation environments, therefore Automake | |
4493 | # will honor the 'STRIP' environment variable to overrule this program. | |
4494 | if test "$cross_compiling" != no; then | |
4495 | if test -n "$ac_tool_prefix"; then | |
4496 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4497 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4499 | $as_echo_n "checking for $ac_word... " >&6; } | |
4500 | if ${ac_cv_prog_STRIP+:} false; then : | |
4501 | $as_echo_n "(cached) " >&6 | |
4502 | else | |
4503 | if test -n "$STRIP"; then | |
4504 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4505 | else | |
4506 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4507 | for as_dir in $PATH | |
4508 | do | |
4509 | IFS=$as_save_IFS | |
4510 | test -z "$as_dir" && as_dir=. | |
4511 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4512 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4513 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4514 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4515 | break 2 | |
4516 | fi | |
4517 | done | |
4518 | done | |
4519 | IFS=$as_save_IFS | |
4520 | ||
4521 | fi | |
4522 | fi | |
4523 | STRIP=$ac_cv_prog_STRIP | |
4524 | if test -n "$STRIP"; then | |
4525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4526 | $as_echo "$STRIP" >&6; } | |
4527 | else | |
4528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4529 | $as_echo "no" >&6; } | |
4530 | fi | |
4531 | ||
4532 | ||
4533 | fi | |
4534 | if test -z "$ac_cv_prog_STRIP"; then | |
4535 | ac_ct_STRIP=$STRIP | |
4536 | # Extract the first word of "strip", so it can be a program name with args. | |
4537 | set dummy strip; ac_word=$2 | |
4538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4539 | $as_echo_n "checking for $ac_word... " >&6; } | |
4540 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
4541 | $as_echo_n "(cached) " >&6 | |
4542 | else | |
4543 | if test -n "$ac_ct_STRIP"; then | |
4544 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4545 | else | |
4546 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4547 | for as_dir in $PATH | |
4548 | do | |
4549 | IFS=$as_save_IFS | |
4550 | test -z "$as_dir" && as_dir=. | |
4551 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4552 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4553 | ac_cv_prog_ac_ct_STRIP="strip" | |
4554 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4555 | break 2 | |
4556 | fi | |
4557 | done | |
4558 | done | |
4559 | IFS=$as_save_IFS | |
4560 | ||
4561 | fi | |
4562 | fi | |
4563 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4564 | if test -n "$ac_ct_STRIP"; then | |
4565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4566 | $as_echo "$ac_ct_STRIP" >&6; } | |
4567 | else | |
4568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4569 | $as_echo "no" >&6; } | |
4570 | fi | |
4571 | ||
4572 | if test "x$ac_ct_STRIP" = x; then | |
4573 | STRIP=":" | |
4574 | else | |
4575 | case $cross_compiling:$ac_tool_warned in | |
4576 | yes:) | |
4577 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4578 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4579 | ac_tool_warned=yes ;; | |
4580 | esac | |
4581 | STRIP=$ac_ct_STRIP | |
4582 | fi | |
4583 | else | |
4584 | STRIP="$ac_cv_prog_STRIP" | |
4585 | fi | |
4586 | ||
4587 | fi | |
4588 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4589 | ||
4590 | ||
770d76d7 PA |
4591 | # Make sure we can run config.sub. |
4592 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4593 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 PA |
4594 | |
4595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4596 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4597 | if ${ac_cv_build+:} false; then : |
81ecdfbb RW |
4598 | $as_echo_n "(cached) " >&6 |
4599 | else | |
770d76d7 PA |
4600 | ac_build_alias=$build_alias |
4601 | test "x$ac_build_alias" = x && | |
4602 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4603 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4604 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
770d76d7 | 4605 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4606 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
770d76d7 PA |
4607 | |
4608 | fi | |
4609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4610 | $as_echo "$ac_cv_build" >&6; } | |
4611 | case $ac_cv_build in | |
4612 | *-*-*) ;; | |
d0ac1c44 | 4613 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 PA |
4614 | esac |
4615 | build=$ac_cv_build | |
4616 | ac_save_IFS=$IFS; IFS='-' | |
4617 | set x $ac_cv_build | |
4618 | shift | |
4619 | build_cpu=$1 | |
4620 | build_vendor=$2 | |
4621 | shift; shift | |
4622 | # Remember, the first character of IFS is used to create $*, | |
4623 | # except with old shells: | |
4624 | build_os=$* | |
4625 | IFS=$ac_save_IFS | |
4626 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4627 | ||
4628 | ||
4629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4630 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4631 | if ${ac_cv_host+:} false; then : |
770d76d7 PA |
4632 | $as_echo_n "(cached) " >&6 |
4633 | else | |
4634 | if test "x$host_alias" = x; then | |
4635 | ac_cv_host=$ac_cv_build | |
4636 | else | |
4637 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d0ac1c44 | 4638 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
770d76d7 PA |
4639 | fi |
4640 | ||
4641 | fi | |
4642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4643 | $as_echo "$ac_cv_host" >&6; } | |
4644 | case $ac_cv_host in | |
4645 | *-*-*) ;; | |
d0ac1c44 | 4646 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
770d76d7 PA |
4647 | esac |
4648 | host=$ac_cv_host | |
4649 | ac_save_IFS=$IFS; IFS='-' | |
4650 | set x $ac_cv_host | |
4651 | shift | |
4652 | host_cpu=$1 | |
4653 | host_vendor=$2 | |
4654 | shift; shift | |
4655 | # Remember, the first character of IFS is used to create $*, | |
4656 | # except with old shells: | |
4657 | host_os=$* | |
4658 | IFS=$ac_save_IFS | |
4659 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4660 | ||
4661 | ||
c971b7fa PA |
4662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
4663 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4664 | if ${ac_cv_target+:} false; then : |
770d76d7 PA |
4665 | $as_echo_n "(cached) " >&6 |
4666 | else | |
c971b7fa PA |
4667 | if test "x$target_alias" = x; then |
4668 | ac_cv_target=$ac_cv_host | |
770d76d7 | 4669 | else |
c971b7fa | 4670 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
d0ac1c44 | 4671 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
770d76d7 | 4672 | fi |
770d76d7 PA |
4673 | |
4674 | fi | |
c971b7fa PA |
4675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
4676 | $as_echo "$ac_cv_target" >&6; } | |
4677 | case $ac_cv_target in | |
4678 | *-*-*) ;; | |
d0ac1c44 | 4679 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
c971b7fa PA |
4680 | esac |
4681 | target=$ac_cv_target | |
4682 | ac_save_IFS=$IFS; IFS='-' | |
4683 | set x $ac_cv_target | |
4684 | shift | |
4685 | target_cpu=$1 | |
4686 | target_vendor=$2 | |
4687 | shift; shift | |
4688 | # Remember, the first character of IFS is used to create $*, | |
4689 | # except with old shells: | |
4690 | target_os=$* | |
4691 | IFS=$ac_save_IFS | |
4692 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
770d76d7 | 4693 | |
770d76d7 | 4694 | |
c971b7fa PA |
4695 | # The aliases save the names the user supplied, while $host etc. |
4696 | # will get canonicalized. | |
4697 | test -n "$target_alias" && | |
4698 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4699 | NONENONEs,x,x, && | |
4700 | program_prefix=${target_alias}- | |
770d76d7 | 4701 | |
770d76d7 | 4702 | |
c971b7fa PA |
4703 | # Find a good install program. We prefer a C program (faster), |
4704 | # so one script is as good as another. But avoid the broken or | |
4705 | # incompatible versions: | |
4706 | # SysV /etc/install, /usr/sbin/install | |
4707 | # SunOS /usr/etc/install | |
4708 | # IRIX /sbin/install | |
4709 | # AIX /bin/install | |
4710 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
4711 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
4712 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4713 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4714 | # OS/2's system install, which has a completely different semantic | |
4715 | # ./install, which can be erroneously created by make from ./install.sh. | |
4716 | # Reject install programs that cannot install multiple files. | |
4717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
4718 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
4719 | if test -z "$INSTALL"; then | |
d0ac1c44 | 4720 | if ${ac_cv_path_install+:} false; then : |
c971b7fa | 4721 | $as_echo_n "(cached) " >&6 |
81ecdfbb RW |
4722 | else |
4723 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4724 | for as_dir in $PATH | |
fd462a61 | 4725 | do |
81ecdfbb RW |
4726 | IFS=$as_save_IFS |
4727 | test -z "$as_dir" && as_dir=. | |
4728 | # Account for people who put trailing slashes in PATH elements. | |
4729 | case $as_dir/ in #(( | |
4730 | ./ | .// | /[cC]/* | \ | |
4731 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
4732 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
4733 | /usr/ucb/* ) ;; | |
4734 | *) | |
4735 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4736 | # Don't use installbsd from OSF since it installs stuff as root | |
4737 | # by default. | |
4738 | for ac_prog in ginstall scoinst install; do | |
4739 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4740 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
81ecdfbb RW |
4741 | if test $ac_prog = install && |
4742 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4743 | # AIX install. It has an incompatible calling convention. | |
4744 | : | |
4745 | elif test $ac_prog = install && | |
4746 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4747 | # program-specific install script used by HP pwplus--don't use. | |
4748 | : | |
4749 | else | |
4750 | rm -rf conftest.one conftest.two conftest.dir | |
4751 | echo one > conftest.one | |
4752 | echo two > conftest.two | |
4753 | mkdir conftest.dir | |
4754 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
4755 | test -s conftest.one && test -s conftest.two && | |
4756 | test -s conftest.dir/conftest.one && | |
4757 | test -s conftest.dir/conftest.two | |
4758 | then | |
4759 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
4760 | break 3 | |
4761 | fi | |
4762 | fi | |
4763 | fi | |
4764 | done | |
4765 | done | |
4766 | ;; | |
4767 | esac | |
fd462a61 | 4768 | |
81ecdfbb RW |
4769 | done |
4770 | IFS=$as_save_IFS | |
fd462a61 | 4771 | |
81ecdfbb | 4772 | rm -rf conftest.one conftest.two conftest.dir |
fd462a61 | 4773 | |
fd462a61 | 4774 | fi |
81ecdfbb RW |
4775 | if test "${ac_cv_path_install+set}" = set; then |
4776 | INSTALL=$ac_cv_path_install | |
4777 | else | |
4778 | # As a last resort, use the slow shell script. Don't cache a | |
4779 | # value for INSTALL within a source directory, because that will | |
4780 | # break other packages using the cache if that directory is | |
4781 | # removed, or if the value is a relative name. | |
4782 | INSTALL=$ac_install_sh | |
4783 | fi | |
fd462a61 | 4784 | fi |
81ecdfbb RW |
4785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
4786 | $as_echo "$INSTALL" >&6; } | |
fd462a61 | 4787 | |
81ecdfbb RW |
4788 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
4789 | # It thinks the first close brace ends the variable substitution. | |
4790 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
fd462a61 | 4791 | |
81ecdfbb | 4792 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
fd462a61 | 4793 | |
81ecdfbb | 4794 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
e28b3332 | 4795 | |
e1d2394b MS |
4796 | if test -n "$ac_tool_prefix"; then |
4797 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
4798 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
4799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4800 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4801 | if ${ac_cv_prog_AR+:} false; then : |
e1d2394b MS |
4802 | $as_echo_n "(cached) " >&6 |
4803 | else | |
4804 | if test -n "$AR"; then | |
4805 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
4806 | else | |
4807 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4808 | for as_dir in $PATH | |
4809 | do | |
4810 | IFS=$as_save_IFS | |
4811 | test -z "$as_dir" && as_dir=. | |
4812 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4813 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4814 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
4815 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4816 | break 2 | |
4817 | fi | |
4818 | done | |
4819 | done | |
4820 | IFS=$as_save_IFS | |
4821 | ||
4822 | fi | |
4823 | fi | |
4824 | AR=$ac_cv_prog_AR | |
4825 | if test -n "$AR"; then | |
4826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
4827 | $as_echo "$AR" >&6; } | |
4828 | else | |
4829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4830 | $as_echo "no" >&6; } | |
4831 | fi | |
4832 | ||
4833 | ||
4834 | fi | |
4835 | if test -z "$ac_cv_prog_AR"; then | |
4836 | ac_ct_AR=$AR | |
4837 | # Extract the first word of "ar", so it can be a program name with args. | |
4838 | set dummy ar; ac_word=$2 | |
4839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4840 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4841 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
e1d2394b MS |
4842 | $as_echo_n "(cached) " >&6 |
4843 | else | |
4844 | if test -n "$ac_ct_AR"; then | |
4845 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
4846 | else | |
4847 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4848 | for as_dir in $PATH | |
4849 | do | |
4850 | IFS=$as_save_IFS | |
4851 | test -z "$as_dir" && as_dir=. | |
4852 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4853 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4854 | ac_cv_prog_ac_ct_AR="ar" |
4855 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4856 | break 2 | |
4857 | fi | |
4858 | done | |
4859 | done | |
4860 | IFS=$as_save_IFS | |
4861 | ||
4862 | fi | |
4863 | fi | |
4864 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
4865 | if test -n "$ac_ct_AR"; then | |
4866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
4867 | $as_echo "$ac_ct_AR" >&6; } | |
4868 | else | |
4869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4870 | $as_echo "no" >&6; } | |
4871 | fi | |
4872 | ||
4873 | if test "x$ac_ct_AR" = x; then | |
4874 | AR="" | |
4875 | else | |
4876 | case $cross_compiling:$ac_tool_warned in | |
4877 | yes:) | |
4878 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4879 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4880 | ac_tool_warned=yes ;; | |
4881 | esac | |
4882 | AR=$ac_ct_AR | |
4883 | fi | |
4884 | else | |
4885 | AR="$ac_cv_prog_AR" | |
4886 | fi | |
4887 | ||
c971b7fa PA |
4888 | if test -n "$ac_tool_prefix"; then |
4889 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4890 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4892 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4893 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb RW |
4894 | $as_echo_n "(cached) " >&6 |
4895 | else | |
c971b7fa PA |
4896 | if test -n "$RANLIB"; then |
4897 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
e28b3332 | 4898 | else |
c971b7fa PA |
4899 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4900 | for as_dir in $PATH | |
4901 | do | |
4902 | IFS=$as_save_IFS | |
4903 | test -z "$as_dir" && as_dir=. | |
4904 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4905 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4906 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
4907 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4908 | break 2 | |
4909 | fi | |
4910 | done | |
4911 | done | |
4912 | IFS=$as_save_IFS | |
4913 | ||
4914 | fi | |
4915 | fi | |
4916 | RANLIB=$ac_cv_prog_RANLIB | |
4917 | if test -n "$RANLIB"; then | |
4918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4919 | $as_echo "$RANLIB" >&6; } | |
4920 | else | |
4921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4922 | $as_echo "no" >&6; } | |
4923 | fi | |
4924 | ||
4925 | ||
4926 | fi | |
4927 | if test -z "$ac_cv_prog_RANLIB"; then | |
4928 | ac_ct_RANLIB=$RANLIB | |
4929 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4930 | set dummy ranlib; ac_word=$2 | |
4931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4932 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4933 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
c971b7fa PA |
4934 | $as_echo_n "(cached) " >&6 |
4935 | else | |
4936 | if test -n "$ac_ct_RANLIB"; then | |
4937 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4938 | else | |
4939 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4940 | for as_dir in $PATH | |
4941 | do | |
4942 | IFS=$as_save_IFS | |
4943 | test -z "$as_dir" && as_dir=. | |
4944 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4945 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4946 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
4947 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4948 | break 2 | |
4949 | fi | |
4950 | done | |
4951 | done | |
4952 | IFS=$as_save_IFS | |
4953 | ||
4954 | fi | |
4955 | fi | |
4956 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4957 | if test -n "$ac_ct_RANLIB"; then | |
4958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4959 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4960 | else | |
4961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4962 | $as_echo "no" >&6; } | |
4963 | fi | |
4964 | ||
4965 | if test "x$ac_ct_RANLIB" = x; then | |
4966 | RANLIB=":" | |
4967 | else | |
4968 | case $cross_compiling:$ac_tool_warned in | |
4969 | yes:) | |
4970 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4971 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4972 | ac_tool_warned=yes ;; | |
4973 | esac | |
4974 | RANLIB=$ac_ct_RANLIB | |
4975 | fi | |
4976 | else | |
4977 | RANLIB="$ac_cv_prog_RANLIB" | |
4978 | fi | |
4979 | ||
4980 | ||
4981 | test "$program_prefix" != NONE && | |
4982 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4983 | # Use a double $ so make ignores it. | |
4984 | test "$program_suffix" != NONE && | |
4985 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4986 | # Double any \ or $. | |
4987 | # By default was `s,x,x', remove it if useless. | |
4988 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4989 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4990 | ||
4991 | ||
0bcda685 PA |
4992 | # We require a C++11 compiler. Check if one is available, and if |
4993 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
4994 | ||
458412c3 | 4995 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
4996 | ac_ext=cpp |
4997 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4998 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4999 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5000 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5001 | CXX_DIALECT="" | |
5002 | ac_success=no | |
5003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5004 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5005 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5006 | $as_echo_n "(cached) " >&6 |
5007 | else | |
5008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5009 | /* end confdefs.h. */ | |
5010 | ||
5011 | ||
5012 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5013 | // Hopefully, this will speed up the test. | |
5014 | ||
5015 | #ifndef __cplusplus | |
5016 | ||
5017 | #error "This is not a C++ compiler" | |
5018 | ||
5019 | #elif __cplusplus < 201103L | |
5020 | ||
5021 | #error "This is not a C++11 compiler" | |
5022 | ||
5023 | #else | |
5024 | ||
5025 | namespace cxx11 | |
5026 | { | |
5027 | ||
5028 | namespace test_static_assert | |
5029 | { | |
5030 | ||
5031 | template <typename T> | |
5032 | struct check | |
5033 | { | |
5034 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5035 | }; | |
5036 | ||
5037 | } | |
5038 | ||
5039 | namespace test_final_override | |
5040 | { | |
5041 | ||
5042 | struct Base | |
5043 | { | |
5044 | virtual void f() {} | |
5045 | }; | |
5046 | ||
5047 | struct Derived : public Base | |
5048 | { | |
5049 | virtual void f() override {} | |
5050 | }; | |
5051 | ||
5052 | } | |
5053 | ||
5054 | namespace test_double_right_angle_brackets | |
5055 | { | |
5056 | ||
5057 | template < typename T > | |
5058 | struct check {}; | |
5059 | ||
5060 | typedef check<void> single_type; | |
5061 | typedef check<check<void>> double_type; | |
5062 | typedef check<check<check<void>>> triple_type; | |
5063 | typedef check<check<check<check<void>>>> quadruple_type; | |
5064 | ||
5065 | } | |
5066 | ||
5067 | namespace test_decltype | |
5068 | { | |
5069 | ||
5070 | int | |
5071 | f() | |
5072 | { | |
5073 | int a = 1; | |
5074 | decltype(a) b = 2; | |
5075 | return a + b; | |
5076 | } | |
5077 | ||
5078 | } | |
5079 | ||
5080 | namespace test_type_deduction | |
5081 | { | |
5082 | ||
5083 | template < typename T1, typename T2 > | |
5084 | struct is_same | |
5085 | { | |
5086 | static const bool value = false; | |
5087 | }; | |
5088 | ||
5089 | template < typename T > | |
5090 | struct is_same<T, T> | |
5091 | { | |
5092 | static const bool value = true; | |
5093 | }; | |
5094 | ||
5095 | template < typename T1, typename T2 > | |
5096 | auto | |
5097 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5098 | { | |
5099 | return a1 + a2; | |
5100 | } | |
5101 | ||
5102 | int | |
5103 | test(const int c, volatile int v) | |
5104 | { | |
5105 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5106 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5107 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5108 | auto ac = c; | |
5109 | auto av = v; | |
5110 | auto sumi = ac + av + 'x'; | |
5111 | auto sumf = ac + av + 1.0; | |
5112 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5113 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5114 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5115 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5116 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5117 | return (sumf > 0.0) ? sumi : add(c, v); | |
5118 | } | |
5119 | ||
5120 | } | |
5121 | ||
5122 | namespace test_noexcept | |
5123 | { | |
5124 | ||
5125 | int f() { return 0; } | |
5126 | int g() noexcept { return 0; } | |
5127 | ||
5128 | static_assert(noexcept(f()) == false, ""); | |
5129 | static_assert(noexcept(g()) == true, ""); | |
5130 | ||
5131 | } | |
5132 | ||
5133 | namespace test_constexpr | |
5134 | { | |
5135 | ||
5136 | template < typename CharT > | |
5137 | unsigned long constexpr | |
5138 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5139 | { | |
5140 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5141 | } | |
5142 | ||
5143 | template < typename CharT > | |
5144 | unsigned long constexpr | |
5145 | strlen_c(const CharT *const s) noexcept | |
5146 | { | |
5147 | return strlen_c_r(s, 0UL); | |
5148 | } | |
5149 | ||
5150 | static_assert(strlen_c("") == 0UL, ""); | |
5151 | static_assert(strlen_c("1") == 1UL, ""); | |
5152 | static_assert(strlen_c("example") == 7UL, ""); | |
5153 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5154 | ||
5155 | } | |
5156 | ||
5157 | namespace test_rvalue_references | |
5158 | { | |
5159 | ||
5160 | template < int N > | |
5161 | struct answer | |
5162 | { | |
5163 | static constexpr int value = N; | |
5164 | }; | |
5165 | ||
5166 | answer<1> f(int&) { return answer<1>(); } | |
5167 | answer<2> f(const int&) { return answer<2>(); } | |
5168 | answer<3> f(int&&) { return answer<3>(); } | |
5169 | ||
5170 | void | |
5171 | test() | |
5172 | { | |
5173 | int i = 0; | |
5174 | const int c = 0; | |
5175 | static_assert(decltype(f(i))::value == 1, ""); | |
5176 | static_assert(decltype(f(c))::value == 2, ""); | |
5177 | static_assert(decltype(f(0))::value == 3, ""); | |
5178 | } | |
5179 | ||
5180 | } | |
5181 | ||
5182 | namespace test_uniform_initialization | |
5183 | { | |
5184 | ||
5185 | struct test | |
5186 | { | |
5187 | static const int zero {}; | |
5188 | static const int one {1}; | |
5189 | }; | |
5190 | ||
5191 | static_assert(test::zero == 0, ""); | |
5192 | static_assert(test::one == 1, ""); | |
5193 | ||
5194 | } | |
5195 | ||
5196 | namespace test_lambdas | |
5197 | { | |
5198 | ||
5199 | void | |
5200 | test1() | |
5201 | { | |
5202 | auto lambda1 = [](){}; | |
5203 | auto lambda2 = lambda1; | |
5204 | lambda1(); | |
5205 | lambda2(); | |
5206 | } | |
5207 | ||
5208 | int | |
5209 | test2() | |
5210 | { | |
5211 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5212 | auto b = []() -> int { return '0'; }(); | |
5213 | auto c = [=](){ return a + b; }(); | |
5214 | auto d = [&](){ return c; }(); | |
5215 | auto e = [a, &b](int x) mutable { | |
5216 | const auto identity = [](int y){ return y; }; | |
5217 | for (auto i = 0; i < a; ++i) | |
5218 | a += b--; | |
5219 | return x + identity(a + b); | |
5220 | }(0); | |
5221 | return a + b + c + d + e; | |
5222 | } | |
5223 | ||
5224 | int | |
5225 | test3() | |
5226 | { | |
5227 | const auto nullary = [](){ return 0; }; | |
5228 | const auto unary = [](int x){ return x; }; | |
5229 | using nullary_t = decltype(nullary); | |
5230 | using unary_t = decltype(unary); | |
5231 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5232 | const auto higher2nd = [unary](nullary_t f1){ | |
5233 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5234 | }; | |
5235 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5236 | } | |
5237 | ||
5238 | } | |
5239 | ||
5240 | namespace test_variadic_templates | |
5241 | { | |
5242 | ||
5243 | template <int...> | |
5244 | struct sum; | |
5245 | ||
5246 | template <int N0, int... N1toN> | |
5247 | struct sum<N0, N1toN...> | |
5248 | { | |
5249 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5250 | }; | |
5251 | ||
5252 | template <> | |
5253 | struct sum<> | |
5254 | { | |
5255 | static constexpr auto value = 0; | |
5256 | }; | |
5257 | ||
5258 | static_assert(sum<>::value == 0, ""); | |
5259 | static_assert(sum<1>::value == 1, ""); | |
5260 | static_assert(sum<23>::value == 23, ""); | |
5261 | static_assert(sum<1, 2>::value == 3, ""); | |
5262 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5263 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5264 | ||
5265 | } | |
5266 | ||
5267 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5268 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5269 | // because of this. | |
5270 | namespace test_template_alias_sfinae | |
5271 | { | |
5272 | ||
5273 | struct foo {}; | |
5274 | ||
5275 | template<typename T> | |
5276 | using member = typename T::member_type; | |
5277 | ||
5278 | template<typename T> | |
5279 | void func(...) {} | |
5280 | ||
5281 | template<typename T> | |
5282 | void func(member<T>*) {} | |
5283 | ||
5284 | void test(); | |
5285 | ||
5286 | void test() { func<foo>(0); } | |
5287 | ||
5288 | } | |
5289 | ||
5290 | } // namespace cxx11 | |
5291 | ||
5292 | #endif // __cplusplus >= 201103L | |
5293 | ||
5294 | ||
5295 | ||
5296 | _ACEOF | |
5297 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5298 | ax_cv_cxx_compile_cxx11=yes | |
5299 | else | |
5300 | ax_cv_cxx_compile_cxx11=no | |
5301 | fi | |
5302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5303 | fi | |
5304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5305 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5306 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5307 | ac_success=yes | |
5308 | fi | |
5309 | ||
5310 | if test x$ac_success = xno; then | |
458412c3 TT |
5311 | for alternative in ${ax_cxx_compile_alternatives}; do |
5312 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5313 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5315 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5316 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5317 | $as_echo_n "(cached) " >&6 |
5318 | else | |
5319 | ac_save_CXX="$CXX" | |
5320 | CXX="$CXX $switch" | |
5321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5322 | /* end confdefs.h. */ | |
5323 | ||
5324 | ||
5325 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5326 | // Hopefully, this will speed up the test. | |
5327 | ||
5328 | #ifndef __cplusplus | |
5329 | ||
5330 | #error "This is not a C++ compiler" | |
5331 | ||
5332 | #elif __cplusplus < 201103L | |
5333 | ||
5334 | #error "This is not a C++11 compiler" | |
5335 | ||
5336 | #else | |
5337 | ||
5338 | namespace cxx11 | |
5339 | { | |
5340 | ||
5341 | namespace test_static_assert | |
5342 | { | |
5343 | ||
5344 | template <typename T> | |
5345 | struct check | |
5346 | { | |
5347 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5348 | }; | |
5349 | ||
5350 | } | |
5351 | ||
5352 | namespace test_final_override | |
5353 | { | |
5354 | ||
5355 | struct Base | |
5356 | { | |
5357 | virtual void f() {} | |
5358 | }; | |
5359 | ||
5360 | struct Derived : public Base | |
5361 | { | |
5362 | virtual void f() override {} | |
5363 | }; | |
5364 | ||
5365 | } | |
5366 | ||
5367 | namespace test_double_right_angle_brackets | |
5368 | { | |
5369 | ||
5370 | template < typename T > | |
5371 | struct check {}; | |
5372 | ||
5373 | typedef check<void> single_type; | |
5374 | typedef check<check<void>> double_type; | |
5375 | typedef check<check<check<void>>> triple_type; | |
5376 | typedef check<check<check<check<void>>>> quadruple_type; | |
5377 | ||
5378 | } | |
5379 | ||
5380 | namespace test_decltype | |
5381 | { | |
5382 | ||
5383 | int | |
5384 | f() | |
5385 | { | |
5386 | int a = 1; | |
5387 | decltype(a) b = 2; | |
5388 | return a + b; | |
5389 | } | |
5390 | ||
5391 | } | |
5392 | ||
5393 | namespace test_type_deduction | |
5394 | { | |
5395 | ||
5396 | template < typename T1, typename T2 > | |
5397 | struct is_same | |
5398 | { | |
5399 | static const bool value = false; | |
5400 | }; | |
5401 | ||
5402 | template < typename T > | |
5403 | struct is_same<T, T> | |
5404 | { | |
5405 | static const bool value = true; | |
5406 | }; | |
5407 | ||
5408 | template < typename T1, typename T2 > | |
5409 | auto | |
5410 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5411 | { | |
5412 | return a1 + a2; | |
5413 | } | |
5414 | ||
5415 | int | |
5416 | test(const int c, volatile int v) | |
5417 | { | |
5418 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5419 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5420 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5421 | auto ac = c; | |
5422 | auto av = v; | |
5423 | auto sumi = ac + av + 'x'; | |
5424 | auto sumf = ac + av + 1.0; | |
5425 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5426 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5427 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5428 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5429 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5430 | return (sumf > 0.0) ? sumi : add(c, v); | |
5431 | } | |
5432 | ||
5433 | } | |
5434 | ||
5435 | namespace test_noexcept | |
5436 | { | |
5437 | ||
5438 | int f() { return 0; } | |
5439 | int g() noexcept { return 0; } | |
5440 | ||
5441 | static_assert(noexcept(f()) == false, ""); | |
5442 | static_assert(noexcept(g()) == true, ""); | |
5443 | ||
5444 | } | |
5445 | ||
5446 | namespace test_constexpr | |
5447 | { | |
5448 | ||
5449 | template < typename CharT > | |
5450 | unsigned long constexpr | |
5451 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5452 | { | |
5453 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5454 | } | |
5455 | ||
5456 | template < typename CharT > | |
5457 | unsigned long constexpr | |
5458 | strlen_c(const CharT *const s) noexcept | |
5459 | { | |
5460 | return strlen_c_r(s, 0UL); | |
5461 | } | |
5462 | ||
5463 | static_assert(strlen_c("") == 0UL, ""); | |
5464 | static_assert(strlen_c("1") == 1UL, ""); | |
5465 | static_assert(strlen_c("example") == 7UL, ""); | |
5466 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5467 | ||
5468 | } | |
5469 | ||
5470 | namespace test_rvalue_references | |
5471 | { | |
5472 | ||
5473 | template < int N > | |
5474 | struct answer | |
5475 | { | |
5476 | static constexpr int value = N; | |
5477 | }; | |
5478 | ||
5479 | answer<1> f(int&) { return answer<1>(); } | |
5480 | answer<2> f(const int&) { return answer<2>(); } | |
5481 | answer<3> f(int&&) { return answer<3>(); } | |
5482 | ||
5483 | void | |
5484 | test() | |
5485 | { | |
5486 | int i = 0; | |
5487 | const int c = 0; | |
5488 | static_assert(decltype(f(i))::value == 1, ""); | |
5489 | static_assert(decltype(f(c))::value == 2, ""); | |
5490 | static_assert(decltype(f(0))::value == 3, ""); | |
5491 | } | |
5492 | ||
5493 | } | |
5494 | ||
5495 | namespace test_uniform_initialization | |
5496 | { | |
5497 | ||
5498 | struct test | |
5499 | { | |
5500 | static const int zero {}; | |
5501 | static const int one {1}; | |
5502 | }; | |
5503 | ||
5504 | static_assert(test::zero == 0, ""); | |
5505 | static_assert(test::one == 1, ""); | |
5506 | ||
5507 | } | |
5508 | ||
5509 | namespace test_lambdas | |
5510 | { | |
5511 | ||
5512 | void | |
5513 | test1() | |
5514 | { | |
5515 | auto lambda1 = [](){}; | |
5516 | auto lambda2 = lambda1; | |
5517 | lambda1(); | |
5518 | lambda2(); | |
5519 | } | |
5520 | ||
5521 | int | |
5522 | test2() | |
5523 | { | |
5524 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5525 | auto b = []() -> int { return '0'; }(); | |
5526 | auto c = [=](){ return a + b; }(); | |
5527 | auto d = [&](){ return c; }(); | |
5528 | auto e = [a, &b](int x) mutable { | |
5529 | const auto identity = [](int y){ return y; }; | |
5530 | for (auto i = 0; i < a; ++i) | |
5531 | a += b--; | |
5532 | return x + identity(a + b); | |
5533 | }(0); | |
5534 | return a + b + c + d + e; | |
5535 | } | |
5536 | ||
5537 | int | |
5538 | test3() | |
5539 | { | |
5540 | const auto nullary = [](){ return 0; }; | |
5541 | const auto unary = [](int x){ return x; }; | |
5542 | using nullary_t = decltype(nullary); | |
5543 | using unary_t = decltype(unary); | |
5544 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5545 | const auto higher2nd = [unary](nullary_t f1){ | |
5546 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5547 | }; | |
5548 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5549 | } | |
5550 | ||
5551 | } | |
5552 | ||
5553 | namespace test_variadic_templates | |
5554 | { | |
5555 | ||
5556 | template <int...> | |
5557 | struct sum; | |
5558 | ||
5559 | template <int N0, int... N1toN> | |
5560 | struct sum<N0, N1toN...> | |
5561 | { | |
5562 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5563 | }; | |
5564 | ||
5565 | template <> | |
5566 | struct sum<> | |
5567 | { | |
5568 | static constexpr auto value = 0; | |
5569 | }; | |
5570 | ||
5571 | static_assert(sum<>::value == 0, ""); | |
5572 | static_assert(sum<1>::value == 1, ""); | |
5573 | static_assert(sum<23>::value == 23, ""); | |
5574 | static_assert(sum<1, 2>::value == 3, ""); | |
5575 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5576 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5577 | ||
5578 | } | |
5579 | ||
5580 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5581 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5582 | // because of this. | |
5583 | namespace test_template_alias_sfinae | |
5584 | { | |
5585 | ||
5586 | struct foo {}; | |
5587 | ||
5588 | template<typename T> | |
5589 | using member = typename T::member_type; | |
5590 | ||
5591 | template<typename T> | |
5592 | void func(...) {} | |
5593 | ||
5594 | template<typename T> | |
5595 | void func(member<T>*) {} | |
5596 | ||
5597 | void test(); | |
5598 | ||
5599 | void test() { func<foo>(0); } | |
5600 | ||
5601 | } | |
5602 | ||
5603 | } // namespace cxx11 | |
5604 | ||
5605 | #endif // __cplusplus >= 201103L | |
5606 | ||
5607 | ||
5608 | ||
5609 | _ACEOF | |
5610 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5611 | eval $cachevar=yes | |
5612 | else | |
5613 | eval $cachevar=no | |
5614 | fi | |
5615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5616 | CXX="$ac_save_CXX" | |
5617 | fi | |
5618 | eval ac_res=\$$cachevar | |
5619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5620 | $as_echo "$ac_res" >&6; } | |
5621 | if eval test x\$$cachevar = xyes; then | |
5622 | CXX_DIALECT="$switch" | |
5623 | ac_success=yes | |
5624 | break | |
5625 | fi | |
5626 | done | |
5627 | fi | |
5628 | ||
5629 | if test x$ac_success = xno; then | |
458412c3 TT |
5630 | for alternative in ${ax_cxx_compile_alternatives}; do |
5631 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5632 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5634 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5635 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5636 | $as_echo_n "(cached) " >&6 |
5637 | else | |
5638 | ac_save_CXX="$CXX" | |
458412c3 TT |
5639 | CXX="$CXX $switch" |
5640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5641 | /* end confdefs.h. */ |
5642 | ||
5643 | ||
5644 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5645 | // Hopefully, this will speed up the test. | |
5646 | ||
5647 | #ifndef __cplusplus | |
5648 | ||
5649 | #error "This is not a C++ compiler" | |
5650 | ||
5651 | #elif __cplusplus < 201103L | |
5652 | ||
5653 | #error "This is not a C++11 compiler" | |
5654 | ||
5655 | #else | |
5656 | ||
5657 | namespace cxx11 | |
5658 | { | |
5659 | ||
5660 | namespace test_static_assert | |
5661 | { | |
5662 | ||
5663 | template <typename T> | |
5664 | struct check | |
5665 | { | |
5666 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5667 | }; | |
5668 | ||
5669 | } | |
5670 | ||
5671 | namespace test_final_override | |
5672 | { | |
5673 | ||
5674 | struct Base | |
5675 | { | |
5676 | virtual void f() {} | |
5677 | }; | |
5678 | ||
5679 | struct Derived : public Base | |
5680 | { | |
5681 | virtual void f() override {} | |
5682 | }; | |
5683 | ||
5684 | } | |
5685 | ||
5686 | namespace test_double_right_angle_brackets | |
5687 | { | |
5688 | ||
5689 | template < typename T > | |
5690 | struct check {}; | |
5691 | ||
5692 | typedef check<void> single_type; | |
5693 | typedef check<check<void>> double_type; | |
5694 | typedef check<check<check<void>>> triple_type; | |
5695 | typedef check<check<check<check<void>>>> quadruple_type; | |
5696 | ||
5697 | } | |
5698 | ||
5699 | namespace test_decltype | |
5700 | { | |
5701 | ||
5702 | int | |
5703 | f() | |
5704 | { | |
5705 | int a = 1; | |
5706 | decltype(a) b = 2; | |
5707 | return a + b; | |
5708 | } | |
5709 | ||
5710 | } | |
5711 | ||
5712 | namespace test_type_deduction | |
5713 | { | |
5714 | ||
5715 | template < typename T1, typename T2 > | |
5716 | struct is_same | |
5717 | { | |
5718 | static const bool value = false; | |
5719 | }; | |
5720 | ||
5721 | template < typename T > | |
5722 | struct is_same<T, T> | |
5723 | { | |
5724 | static const bool value = true; | |
5725 | }; | |
5726 | ||
5727 | template < typename T1, typename T2 > | |
5728 | auto | |
5729 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5730 | { | |
5731 | return a1 + a2; | |
5732 | } | |
5733 | ||
5734 | int | |
5735 | test(const int c, volatile int v) | |
5736 | { | |
5737 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5738 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5739 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5740 | auto ac = c; | |
5741 | auto av = v; | |
5742 | auto sumi = ac + av + 'x'; | |
5743 | auto sumf = ac + av + 1.0; | |
5744 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5745 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5746 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5747 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5748 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5749 | return (sumf > 0.0) ? sumi : add(c, v); | |
5750 | } | |
5751 | ||
5752 | } | |
5753 | ||
5754 | namespace test_noexcept | |
5755 | { | |
5756 | ||
5757 | int f() { return 0; } | |
5758 | int g() noexcept { return 0; } | |
5759 | ||
5760 | static_assert(noexcept(f()) == false, ""); | |
5761 | static_assert(noexcept(g()) == true, ""); | |
5762 | ||
5763 | } | |
5764 | ||
5765 | namespace test_constexpr | |
5766 | { | |
5767 | ||
5768 | template < typename CharT > | |
5769 | unsigned long constexpr | |
5770 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5771 | { | |
5772 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5773 | } | |
5774 | ||
5775 | template < typename CharT > | |
5776 | unsigned long constexpr | |
5777 | strlen_c(const CharT *const s) noexcept | |
5778 | { | |
5779 | return strlen_c_r(s, 0UL); | |
5780 | } | |
5781 | ||
5782 | static_assert(strlen_c("") == 0UL, ""); | |
5783 | static_assert(strlen_c("1") == 1UL, ""); | |
5784 | static_assert(strlen_c("example") == 7UL, ""); | |
5785 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5786 | ||
5787 | } | |
5788 | ||
5789 | namespace test_rvalue_references | |
5790 | { | |
5791 | ||
5792 | template < int N > | |
5793 | struct answer | |
5794 | { | |
5795 | static constexpr int value = N; | |
5796 | }; | |
5797 | ||
5798 | answer<1> f(int&) { return answer<1>(); } | |
5799 | answer<2> f(const int&) { return answer<2>(); } | |
5800 | answer<3> f(int&&) { return answer<3>(); } | |
5801 | ||
5802 | void | |
5803 | test() | |
5804 | { | |
5805 | int i = 0; | |
5806 | const int c = 0; | |
5807 | static_assert(decltype(f(i))::value == 1, ""); | |
5808 | static_assert(decltype(f(c))::value == 2, ""); | |
5809 | static_assert(decltype(f(0))::value == 3, ""); | |
5810 | } | |
5811 | ||
5812 | } | |
5813 | ||
5814 | namespace test_uniform_initialization | |
5815 | { | |
5816 | ||
5817 | struct test | |
5818 | { | |
5819 | static const int zero {}; | |
5820 | static const int one {1}; | |
5821 | }; | |
5822 | ||
5823 | static_assert(test::zero == 0, ""); | |
5824 | static_assert(test::one == 1, ""); | |
5825 | ||
5826 | } | |
5827 | ||
5828 | namespace test_lambdas | |
5829 | { | |
5830 | ||
5831 | void | |
5832 | test1() | |
5833 | { | |
5834 | auto lambda1 = [](){}; | |
5835 | auto lambda2 = lambda1; | |
5836 | lambda1(); | |
5837 | lambda2(); | |
5838 | } | |
5839 | ||
5840 | int | |
5841 | test2() | |
5842 | { | |
5843 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5844 | auto b = []() -> int { return '0'; }(); | |
5845 | auto c = [=](){ return a + b; }(); | |
5846 | auto d = [&](){ return c; }(); | |
5847 | auto e = [a, &b](int x) mutable { | |
5848 | const auto identity = [](int y){ return y; }; | |
5849 | for (auto i = 0; i < a; ++i) | |
5850 | a += b--; | |
5851 | return x + identity(a + b); | |
5852 | }(0); | |
5853 | return a + b + c + d + e; | |
5854 | } | |
5855 | ||
5856 | int | |
5857 | test3() | |
5858 | { | |
5859 | const auto nullary = [](){ return 0; }; | |
5860 | const auto unary = [](int x){ return x; }; | |
5861 | using nullary_t = decltype(nullary); | |
5862 | using unary_t = decltype(unary); | |
5863 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5864 | const auto higher2nd = [unary](nullary_t f1){ | |
5865 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5866 | }; | |
5867 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5868 | } | |
5869 | ||
5870 | } | |
5871 | ||
5872 | namespace test_variadic_templates | |
5873 | { | |
5874 | ||
5875 | template <int...> | |
5876 | struct sum; | |
5877 | ||
5878 | template <int N0, int... N1toN> | |
5879 | struct sum<N0, N1toN...> | |
5880 | { | |
5881 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5882 | }; | |
5883 | ||
5884 | template <> | |
5885 | struct sum<> | |
5886 | { | |
5887 | static constexpr auto value = 0; | |
5888 | }; | |
5889 | ||
5890 | static_assert(sum<>::value == 0, ""); | |
5891 | static_assert(sum<1>::value == 1, ""); | |
5892 | static_assert(sum<23>::value == 23, ""); | |
5893 | static_assert(sum<1, 2>::value == 3, ""); | |
5894 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5895 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5896 | ||
5897 | } | |
5898 | ||
5899 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5900 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5901 | // because of this. | |
5902 | namespace test_template_alias_sfinae | |
5903 | { | |
5904 | ||
5905 | struct foo {}; | |
5906 | ||
5907 | template<typename T> | |
5908 | using member = typename T::member_type; | |
5909 | ||
5910 | template<typename T> | |
5911 | void func(...) {} | |
5912 | ||
5913 | template<typename T> | |
5914 | void func(member<T>*) {} | |
5915 | ||
5916 | void test(); | |
5917 | ||
5918 | void test() { func<foo>(0); } | |
5919 | ||
5920 | } | |
5921 | ||
5922 | } // namespace cxx11 | |
5923 | ||
5924 | #endif // __cplusplus >= 201103L | |
5925 | ||
5926 | ||
5927 | ||
5928 | _ACEOF | |
5929 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5930 | eval $cachevar=yes | |
5931 | else | |
5932 | eval $cachevar=no | |
5933 | fi | |
5934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
458412c3 | 5935 | CXX="$ac_save_CXX" |
0bcda685 PA |
5936 | fi |
5937 | eval ac_res=\$$cachevar | |
5938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5939 | $as_echo "$ac_res" >&6; } | |
458412c3 TT |
5940 | if eval test x\$$cachevar = xyes; then |
5941 | CXX_DIALECT="$switch" | |
5942 | ac_success=yes | |
5943 | break | |
5944 | fi | |
5945 | done | |
5946 | if test x$ac_success = xyes; then | |
0bcda685 PA |
5947 | break |
5948 | fi | |
5949 | done | |
5950 | fi | |
5951 | ac_ext=c | |
5952 | ac_cpp='$CPP $CPPFLAGS' | |
5953 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5954 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5955 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5956 | ||
5957 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5958 | if test x$ac_success = xno; then | |
d0ac1c44 | 5959 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
5960 | fi |
5961 | fi | |
5962 | if test x$ac_success = xno; then | |
5963 | HAVE_CXX11=0 | |
5964 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5965 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5966 | else | |
5967 | HAVE_CXX11=1 | |
5968 | ||
5969 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5970 | ||
5971 | fi | |
5972 | ||
5973 | ||
5974 | ||
5975 | ||
c971b7fa PA |
5976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
5977 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 5978 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
5979 | $as_echo_n "(cached) " >&6 |
5980 | else | |
5981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5982 | /* end confdefs.h. */ | |
5983 | #include <stdlib.h> | |
5984 | #include <stdarg.h> | |
5985 | #include <string.h> | |
5986 | #include <float.h> | |
5987 | ||
5988 | int | |
5989 | main () | |
5990 | { | |
5991 | ||
5992 | ; | |
5993 | return 0; | |
5994 | } | |
5995 | _ACEOF | |
5996 | if ac_fn_c_try_compile "$LINENO"; then : | |
5997 | ac_cv_header_stdc=yes | |
5998 | else | |
5999 | ac_cv_header_stdc=no | |
6000 | fi | |
6001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6002 | ||
6003 | if test $ac_cv_header_stdc = yes; then | |
6004 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6006 | /* end confdefs.h. */ | |
6007 | #include <string.h> | |
6008 | ||
6009 | _ACEOF | |
6010 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
6011 | $EGREP "memchr" >/dev/null 2>&1; then : |
6012 | ||
68070c10 | 6013 | else |
81ecdfbb RW |
6014 | ac_cv_header_stdc=no |
6015 | fi | |
6016 | rm -f conftest* | |
68070c10 PA |
6017 | |
6018 | fi | |
68070c10 | 6019 | |
81ecdfbb RW |
6020 | if test $ac_cv_header_stdc = yes; then |
6021 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6023 | /* end confdefs.h. */ | |
6024 | #include <stdlib.h> | |
68070c10 | 6025 | |
68070c10 | 6026 | _ACEOF |
81ecdfbb RW |
6027 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6028 | $EGREP "free" >/dev/null 2>&1; then : | |
68070c10 PA |
6029 | |
6030 | else | |
81ecdfbb | 6031 | ac_cv_header_stdc=no |
68070c10 | 6032 | fi |
81ecdfbb RW |
6033 | rm -f conftest* |
6034 | ||
68070c10 PA |
6035 | fi |
6036 | ||
81ecdfbb RW |
6037 | if test $ac_cv_header_stdc = yes; then |
6038 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6039 | if test "$cross_compiling" = yes; then : | |
6040 | : | |
43d5792c | 6041 | else |
81ecdfbb | 6042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6043 | /* end confdefs.h. */ |
81ecdfbb RW |
6044 | #include <ctype.h> |
6045 | #include <stdlib.h> | |
6046 | #if ((' ' & 0x0FF) == 0x020) | |
6047 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6048 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6049 | #else | |
6050 | # define ISLOWER(c) \ | |
6051 | (('a' <= (c) && (c) <= 'i') \ | |
6052 | || ('j' <= (c) && (c) <= 'r') \ | |
6053 | || ('s' <= (c) && (c) <= 'z')) | |
6054 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6055 | #endif | |
6056 | ||
6057 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
bec39cab AC |
6058 | int |
6059 | main () | |
6060 | { | |
81ecdfbb RW |
6061 | int i; |
6062 | for (i = 0; i < 256; i++) | |
6063 | if (XOR (islower (i), ISLOWER (i)) | |
6064 | || toupper (i) != TOUPPER (i)) | |
6065 | return 2; | |
bec39cab AC |
6066 | return 0; |
6067 | } | |
6068 | _ACEOF | |
81ecdfbb | 6069 | if ac_fn_c_try_run "$LINENO"; then : |
bec39cab | 6070 | |
81ecdfbb RW |
6071 | else |
6072 | ac_cv_header_stdc=no | |
43d5792c | 6073 | fi |
81ecdfbb RW |
6074 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6075 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
43d5792c | 6076 | fi |
e122f1f5 | 6077 | |
68070c10 | 6078 | fi |
81ecdfbb RW |
6079 | fi |
6080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6081 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6082 | if test $ac_cv_header_stdc = yes; then | |
68070c10 | 6083 | |
81ecdfbb | 6084 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
68070c10 | 6085 | |
68070c10 | 6086 | fi |
68070c10 | 6087 | |
68070c10 | 6088 | |
db6878ac SM |
6089 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6090 | if test "x$ac_cv_type_size_t" = xyes; then : | |
8ecfd7bd | 6091 | |
db6878ac | 6092 | else |
4d696a5c | 6093 | |
db6878ac SM |
6094 | cat >>confdefs.h <<_ACEOF |
6095 | #define size_t unsigned int | |
6096 | _ACEOF | |
4d696a5c | 6097 | |
8ecfd7bd SDJ |
6098 | fi |
6099 | ||
6100 | ||
6d580b63 | 6101 | |
8ecfd7bd | 6102 | |
db6878ac SM |
6103 | for ac_header in $ac_header_list |
6104 | do : | |
6105 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6106 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6107 | " | |
6108 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
6109 | cat >>confdefs.h <<_ACEOF | |
6110 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6111 | _ACEOF | |
8ecfd7bd | 6112 | |
6d580b63 YQ |
6113 | fi |
6114 | ||
db6878ac | 6115 | done |
8ecfd7bd | 6116 | |
bd885420 | 6117 | |
bd885420 YQ |
6118 | |
6119 | ||
6120 | ||
6121 | ||
6122 | ||
db6878ac SM |
6123 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
6124 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
bd885420 | 6125 | |
61c125b9 | 6126 | else |
60d6cfc9 | 6127 | |
db6878ac SM |
6128 | cat >>confdefs.h <<_ACEOF |
6129 | #define pid_t int | |
6130 | _ACEOF | |
60d6cfc9 | 6131 | |
db6878ac | 6132 | fi |
61c125b9 | 6133 | |
db6878ac SM |
6134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
6135 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
6136 | if ${ac_cv_path_SED+:} false; then : | |
61c125b9 TT |
6137 | $as_echo_n "(cached) " >&6 |
6138 | else | |
db6878ac SM |
6139 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ |
6140 | for ac_i in 1 2 3 4 5 6 7; do | |
6141 | ac_script="$ac_script$as_nl$ac_script" | |
6142 | done | |
6143 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
6144 | { ac_script=; unset ac_script;} | |
6145 | if test -z "$SED"; then | |
6146 | ac_path_SED_found=false | |
6147 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6148 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6149 | for as_dir in $PATH | |
6150 | do | |
6151 | IFS=$as_save_IFS | |
6152 | test -z "$as_dir" && as_dir=. | |
6153 | for ac_prog in sed gsed; do | |
6154 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6155 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
6156 | as_fn_executable_p "$ac_path_SED" || continue | |
6157 | # Check for GNU ac_path_SED and select it if it is found. | |
6158 | # Check for GNU $ac_path_SED | |
6159 | case `"$ac_path_SED" --version 2>&1` in | |
6160 | *GNU*) | |
6161 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
6162 | *) | |
6163 | ac_count=0 | |
6164 | $as_echo_n 0123456789 >"conftest.in" | |
6165 | while : | |
6166 | do | |
6167 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6168 | mv "conftest.tmp" "conftest.in" | |
6169 | cp "conftest.in" "conftest.nl" | |
6170 | $as_echo '' >> "conftest.nl" | |
6171 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6172 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6173 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6174 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
6175 | # Best one so far, save it but keep looking for a better one | |
6176 | ac_cv_path_SED="$ac_path_SED" | |
6177 | ac_path_SED_max=$ac_count | |
61c125b9 | 6178 | fi |
db6878ac SM |
6179 | # 10*(2^10) chars as input seems more than enough |
6180 | test $ac_count -gt 10 && break | |
61c125b9 | 6181 | done |
db6878ac SM |
6182 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
6183 | esac | |
61c125b9 | 6184 | |
db6878ac SM |
6185 | $ac_path_SED_found && break 3 |
6186 | done | |
6187 | done | |
6188 | done | |
6189 | IFS=$as_save_IFS | |
6190 | if test -z "$ac_cv_path_SED"; then | |
6191 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
6192 | fi | |
61c125b9 | 6193 | else |
db6878ac | 6194 | ac_cv_path_SED=$SED |
61c125b9 TT |
6195 | fi |
6196 | ||
6197 | fi | |
db6878ac SM |
6198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 |
6199 | $as_echo "$ac_cv_path_SED" >&6; } | |
6200 | SED="$ac_cv_path_SED" | |
6201 | rm -f conftest.sed | |
61c125b9 | 6202 | |
d0ac1c44 | 6203 | |
db6878ac SM |
6204 | if test "X$prefix" = "XNONE"; then |
6205 | acl_final_prefix="$ac_default_prefix" | |
6206 | else | |
6207 | acl_final_prefix="$prefix" | |
6208 | fi | |
6209 | if test "X$exec_prefix" = "XNONE"; then | |
6210 | acl_final_exec_prefix='${prefix}' | |
6211 | else | |
6212 | acl_final_exec_prefix="$exec_prefix" | |
6213 | fi | |
6214 | acl_save_prefix="$prefix" | |
6215 | prefix="$acl_final_prefix" | |
6216 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
6217 | prefix="$acl_save_prefix" | |
05ea2a05 TT |
6218 | |
6219 | ||
6220 | # Check whether --with-gnu-ld was given. | |
6221 | if test "${with_gnu_ld+set}" = set; then : | |
6222 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
6223 | else | |
6224 | with_gnu_ld=no | |
6225 | fi | |
6226 | ||
6227 | # Prepare PATH_SEPARATOR. | |
6228 | # The user is always right. | |
6229 | if test "${PATH_SEPARATOR+set}" != set; then | |
6230 | echo "#! /bin/sh" >conf$$.sh | |
6231 | echo "exit 0" >>conf$$.sh | |
6232 | chmod +x conf$$.sh | |
6233 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6234 | PATH_SEPARATOR=';' | |
6235 | else | |
6236 | PATH_SEPARATOR=: | |
6237 | fi | |
6238 | rm -f conf$$.sh | |
6239 | fi | |
6240 | ac_prog=ld | |
6241 | if test "$GCC" = yes; then | |
6242 | # Check if gcc -print-prog-name=ld gives a path. | |
6243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
6244 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
6245 | case $host in | |
6246 | *-*-mingw*) | |
6247 | # gcc leaves a trailing carriage return which upsets mingw | |
6248 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
6249 | *) | |
6250 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
6251 | esac | |
6252 | case $ac_prog in | |
6253 | # Accept absolute paths. | |
6254 | [\\/]* | [A-Za-z]:[\\/]*) | |
6255 | re_direlt='/[^/][^/]*/\.\./' | |
6256 | # Canonicalize the path of ld | |
6257 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
6258 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
6259 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
6260 | done | |
6261 | test -z "$LD" && LD="$ac_prog" | |
6262 | ;; | |
6263 | "") | |
6264 | # If it fails, then pretend we aren't using GCC. | |
6265 | ac_prog=ld | |
6266 | ;; | |
6267 | *) | |
6268 | # If it is relative, then search for the first ld in PATH. | |
6269 | with_gnu_ld=unknown | |
6270 | ;; | |
6271 | esac | |
6272 | elif test "$with_gnu_ld" = yes; then | |
6273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
6274 | $as_echo_n "checking for GNU ld... " >&6; } | |
6275 | else | |
6276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
6277 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
6278 | fi | |
6279 | if ${acl_cv_path_LD+:} false; then : | |
6280 | $as_echo_n "(cached) " >&6 | |
6281 | else | |
6282 | if test -z "$LD"; then | |
6283 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
6284 | for ac_dir in $PATH; do | |
6285 | test -z "$ac_dir" && ac_dir=. | |
6286 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
6287 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
6288 | # Check to see if the program is GNU ld. I'd rather use --version, | |
6289 | # but apparently some GNU ld's only accept -v. | |
6290 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
6291 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
6292 | test "$with_gnu_ld" != no && break | |
6293 | else | |
6294 | test "$with_gnu_ld" != yes && break | |
6295 | fi | |
6296 | fi | |
6297 | done | |
6298 | IFS="$ac_save_ifs" | |
6299 | else | |
6300 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
6301 | fi | |
6302 | fi | |
6303 | ||
6304 | LD="$acl_cv_path_LD" | |
6305 | if test -n "$LD"; then | |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
6307 | $as_echo "$LD" >&6; } | |
6308 | else | |
6309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6310 | $as_echo "no" >&6; } | |
6311 | fi | |
6312 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
6313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
6314 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
6315 | if ${acl_cv_prog_gnu_ld+:} false; then : | |
6316 | $as_echo_n "(cached) " >&6 | |
6317 | else | |
6318 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
6319 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
6320 | acl_cv_prog_gnu_ld=yes | |
6321 | else | |
6322 | acl_cv_prog_gnu_ld=no | |
6323 | fi | |
6324 | fi | |
6325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
6326 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
6327 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
6328 | ||
6329 | ||
6330 | ||
6331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
6332 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
6333 | if ${acl_cv_rpath+:} false; then : | |
6334 | $as_echo_n "(cached) " >&6 | |
6335 | else | |
6336 | ||
6337 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
6338 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
6339 | . ./conftest.sh | |
6340 | rm -f ./conftest.sh | |
6341 | acl_cv_rpath=done | |
6342 | ||
6343 | fi | |
6344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
6345 | $as_echo "$acl_cv_rpath" >&6; } | |
6346 | wl="$acl_cv_wl" | |
6347 | libext="$acl_cv_libext" | |
6348 | shlibext="$acl_cv_shlibext" | |
6349 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
6350 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
6351 | hardcode_direct="$acl_cv_hardcode_direct" | |
6352 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
6353 | # Check whether --enable-rpath was given. | |
6354 | if test "${enable_rpath+set}" = set; then : | |
6355 | enableval=$enable_rpath; : | |
6356 | else | |
6357 | enable_rpath=yes | |
6358 | fi | |
6359 | ||
6360 | ||
6361 | ||
db6878ac SM |
6362 | # Set the 'development' global. |
6363 | . $srcdir/../bfd/development.sh | |
6364 | ||
3266f10b TT |
6365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6366 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 6367 | if ${ac_cv_header_stdc+:} false; then : |
3266f10b TT |
6368 | $as_echo_n "(cached) " >&6 |
6369 | else | |
6370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6371 | /* end confdefs.h. */ | |
6372 | #include <stdlib.h> | |
6373 | #include <stdarg.h> | |
6374 | #include <string.h> | |
6375 | #include <float.h> | |
6376 | ||
6377 | int | |
6378 | main () | |
6379 | { | |
6380 | ||
6381 | ; | |
6382 | return 0; | |
6383 | } | |
6384 | _ACEOF | |
6385 | if ac_fn_c_try_compile "$LINENO"; then : | |
6386 | ac_cv_header_stdc=yes | |
6387 | else | |
6388 | ac_cv_header_stdc=no | |
6389 | fi | |
6390 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6391 | ||
6392 | if test $ac_cv_header_stdc = yes; then | |
6393 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6395 | /* end confdefs.h. */ | |
6396 | #include <string.h> | |
6397 | ||
6398 | _ACEOF | |
6399 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6400 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6401 | ||
6402 | else | |
6403 | ac_cv_header_stdc=no | |
6404 | fi | |
6405 | rm -f conftest* | |
6406 | ||
6407 | fi | |
6408 | ||
6409 | if test $ac_cv_header_stdc = yes; then | |
6410 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6412 | /* end confdefs.h. */ | |
6413 | #include <stdlib.h> | |
6414 | ||
6415 | _ACEOF | |
6416 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6417 | $EGREP "free" >/dev/null 2>&1; then : | |
6418 | ||
6419 | else | |
6420 | ac_cv_header_stdc=no | |
6421 | fi | |
6422 | rm -f conftest* | |
6423 | ||
6424 | fi | |
6425 | ||
6426 | if test $ac_cv_header_stdc = yes; then | |
6427 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6428 | if test "$cross_compiling" = yes; then : | |
6429 | : | |
6430 | else | |
6431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6432 | /* end confdefs.h. */ | |
6433 | #include <ctype.h> | |
6434 | #include <stdlib.h> | |
6435 | #if ((' ' & 0x0FF) == 0x020) | |
6436 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6437 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6438 | #else | |
6439 | # define ISLOWER(c) \ | |
6440 | (('a' <= (c) && (c) <= 'i') \ | |
6441 | || ('j' <= (c) && (c) <= 'r') \ | |
6442 | || ('s' <= (c) && (c) <= 'z')) | |
6443 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6444 | #endif | |
6445 | ||
6446 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6447 | int | |
6448 | main () | |
6449 | { | |
6450 | int i; | |
6451 | for (i = 0; i < 256; i++) | |
6452 | if (XOR (islower (i), ISLOWER (i)) | |
6453 | || toupper (i) != TOUPPER (i)) | |
6454 | return 2; | |
6455 | return 0; | |
6456 | } | |
6457 | _ACEOF | |
6458 | if ac_fn_c_try_run "$LINENO"; then : | |
6459 | ||
6460 | else | |
6461 | ac_cv_header_stdc=no | |
6462 | fi | |
6463 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6464 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6465 | fi | |
6466 | ||
6467 | fi | |
6468 | fi | |
6469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6470 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6471 | if test $ac_cv_header_stdc = yes; then | |
6472 | ||
6473 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6474 | ||
3266f10b TT |
6475 | fi |
6476 | ||
6477 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6478 | # for constant arguments. Useless! | |
6479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
6480 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d0ac1c44 | 6481 | if ${ac_cv_working_alloca_h+:} false; then : |
3266f10b TT |
6482 | $as_echo_n "(cached) " >&6 |
6483 | else | |
6484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6485 | /* end confdefs.h. */ | |
6486 | #include <alloca.h> | |
6487 | int | |
6488 | main () | |
6489 | { | |
6490 | char *p = (char *) alloca (2 * sizeof (int)); | |
6491 | if (p) return 0; | |
6492 | ; | |
6493 | return 0; | |
6494 | } | |
6495 | _ACEOF | |
6496 | if ac_fn_c_try_link "$LINENO"; then : | |
6497 | ac_cv_working_alloca_h=yes | |
6498 | else | |
6499 | ac_cv_working_alloca_h=no | |
6500 | fi | |
6501 | rm -f core conftest.err conftest.$ac_objext \ | |
6502 | conftest$ac_exeext conftest.$ac_ext | |
6503 | fi | |
6504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
6505 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
6506 | if test $ac_cv_working_alloca_h = yes; then | |
6507 | ||
6508 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
6509 | ||
6510 | fi | |
6511 | ||
6512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
6513 | $as_echo_n "checking for alloca... " >&6; } | |
d0ac1c44 | 6514 | if ${ac_cv_func_alloca_works+:} false; then : |
3266f10b TT |
6515 | $as_echo_n "(cached) " >&6 |
6516 | else | |
6517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6518 | /* end confdefs.h. */ | |
6519 | #ifdef __GNUC__ | |
6520 | # define alloca __builtin_alloca | |
6521 | #else | |
6522 | # ifdef _MSC_VER | |
6523 | # include <malloc.h> | |
6524 | # define alloca _alloca | |
6525 | # else | |
6526 | # ifdef HAVE_ALLOCA_H | |
6527 | # include <alloca.h> | |
6528 | # else | |
6529 | # ifdef _AIX | |
6530 | #pragma alloca | |
6531 | # else | |
6532 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d0ac1c44 | 6533 | void *alloca (size_t); |
3266f10b TT |
6534 | # endif |
6535 | # endif | |
6536 | # endif | |
6537 | # endif | |
6538 | #endif | |
6539 | ||
6540 | int | |
6541 | main () | |
6542 | { | |
6543 | char *p = (char *) alloca (1); | |
6544 | if (p) return 0; | |
6545 | ; | |
6546 | return 0; | |
6547 | } | |
6548 | _ACEOF | |
6549 | if ac_fn_c_try_link "$LINENO"; then : | |
6550 | ac_cv_func_alloca_works=yes | |
6551 | else | |
6552 | ac_cv_func_alloca_works=no | |
6553 | fi | |
6554 | rm -f core conftest.err conftest.$ac_objext \ | |
6555 | conftest$ac_exeext conftest.$ac_ext | |
6556 | fi | |
6557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
6558 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
6559 | ||
6560 | if test $ac_cv_func_alloca_works = yes; then | |
6561 | ||
6562 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
6563 | ||
6564 | else | |
6565 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6566 | # that cause trouble. Some versions do not even contain alloca or | |
6567 | # contain a buggy version. If you still want to use their alloca, | |
6568 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6569 | ||
6570 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
6571 | ||
6572 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
6573 | ||
6574 | ||
6575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
6576 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d0ac1c44 | 6577 | if ${ac_cv_os_cray+:} false; then : |
3266f10b TT |
6578 | $as_echo_n "(cached) " >&6 |
6579 | else | |
6580 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6581 | /* end confdefs.h. */ | |
6582 | #if defined CRAY && ! defined CRAY2 | |
6583 | webecray | |
6584 | #else | |
6585 | wenotbecray | |
6586 | #endif | |
6587 | ||
6588 | _ACEOF | |
6589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6590 | $EGREP "webecray" >/dev/null 2>&1; then : | |
6591 | ac_cv_os_cray=yes | |
6592 | else | |
6593 | ac_cv_os_cray=no | |
6594 | fi | |
6595 | rm -f conftest* | |
6596 | ||
6597 | fi | |
6598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
6599 | $as_echo "$ac_cv_os_cray" >&6; } | |
6600 | if test $ac_cv_os_cray = yes; then | |
6601 | for ac_func in _getb67 GETB67 getb67; do | |
6602 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6603 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6604 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
6605 | |
6606 | cat >>confdefs.h <<_ACEOF | |
6607 | #define CRAY_STACKSEG_END $ac_func | |
6608 | _ACEOF | |
6609 | ||
6610 | break | |
6611 | fi | |
6612 | ||
6613 | done | |
6614 | fi | |
6615 | ||
6616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
6617 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d0ac1c44 | 6618 | if ${ac_cv_c_stack_direction+:} false; then : |
3266f10b TT |
6619 | $as_echo_n "(cached) " >&6 |
6620 | else | |
6621 | if test "$cross_compiling" = yes; then : | |
6622 | ac_cv_c_stack_direction=0 | |
6623 | else | |
6624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6625 | /* end confdefs.h. */ | |
6626 | $ac_includes_default | |
6627 | int | |
d0ac1c44 | 6628 | find_stack_direction (int *addr, int depth) |
3266f10b | 6629 | { |
d0ac1c44 SM |
6630 | int dir, dummy = 0; |
6631 | if (! addr) | |
6632 | addr = &dummy; | |
6633 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
6634 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
6635 | return dir + dummy; | |
3266f10b TT |
6636 | } |
6637 | ||
6638 | int | |
d0ac1c44 | 6639 | main (int argc, char **argv) |
3266f10b | 6640 | { |
d0ac1c44 | 6641 | return find_stack_direction (0, argc + !argv + 20) < 0; |
3266f10b TT |
6642 | } |
6643 | _ACEOF | |
6644 | if ac_fn_c_try_run "$LINENO"; then : | |
6645 | ac_cv_c_stack_direction=1 | |
6646 | else | |
6647 | ac_cv_c_stack_direction=-1 | |
6648 | fi | |
6649 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6650 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6651 | fi | |
6652 | ||
6653 | fi | |
6654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
6655 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
6656 | cat >>confdefs.h <<_ACEOF | |
6657 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6658 | _ACEOF | |
6659 | ||
6660 | ||
6661 | fi | |
6662 | ||
6663 | ||
b2ceabe8 TT |
6664 | WIN32APILIBS= |
6665 | case ${host} in | |
6666 | *mingw32*) | |
6667 | ||
6668 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
6669 | ||
6670 | WIN32APILIBS="-lws2_32" | |
6671 | ;; | |
6672 | esac | |
6673 | ||
3266f10b TT |
6674 | |
6675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
6676 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 6677 | if ${am_cv_langinfo_codeset+:} false; then : |
3266f10b TT |
6678 | $as_echo_n "(cached) " >&6 |
6679 | else | |
6680 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6681 | /* end confdefs.h. */ | |
6682 | #include <langinfo.h> | |
6683 | int | |
6684 | main () | |
6685 | { | |
6686 | char* cs = nl_langinfo(CODESET); | |
6687 | ; | |
6688 | return 0; | |
6689 | } | |
6690 | _ACEOF | |
6691 | if ac_fn_c_try_link "$LINENO"; then : | |
6692 | am_cv_langinfo_codeset=yes | |
6693 | else | |
6694 | am_cv_langinfo_codeset=no | |
6695 | fi | |
6696 | rm -f core conftest.err conftest.$ac_objext \ | |
6697 | conftest$ac_exeext conftest.$ac_ext | |
6698 | ||
6699 | fi | |
6700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
6701 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6702 | if test $am_cv_langinfo_codeset = yes; then | |
6703 | ||
6704 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
6705 | ||
6706 | fi | |
6707 | ||
6708 | ||
8ae8e197 | 6709 | 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 sys/procfs.h proc_service.h poll.h sys/poll.h sys/select.h |
3266f10b TT |
6710 | do : |
6711 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6712 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 6713 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
3266f10b TT |
6714 | cat >>confdefs.h <<_ACEOF |
6715 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6716 | _ACEOF | |
6717 | ||
6718 | fi | |
6719 | ||
6720 | done | |
6721 | ||
6722 | ||
05ea2a05 TT |
6723 | |
6724 | for ac_func in getpagesize | |
3266f10b | 6725 | do : |
05ea2a05 TT |
6726 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
6727 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
3266f10b | 6728 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 6729 | #define HAVE_GETPAGESIZE 1 |
3266f10b TT |
6730 | _ACEOF |
6731 | ||
6732 | fi | |
6733 | done | |
6734 | ||
05ea2a05 TT |
6735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
6736 | $as_echo_n "checking for working mmap... " >&6; } | |
6737 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
6738 | $as_echo_n "(cached) " >&6 | |
3266f10b | 6739 | else |
05ea2a05 TT |
6740 | if test "$cross_compiling" = yes; then : |
6741 | ac_cv_func_mmap_fixed_mapped=no | |
6742 | else | |
6743 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6744 | /* end confdefs.h. */ | |
6745 | $ac_includes_default | |
6746 | /* malloc might have been renamed as rpl_malloc. */ | |
6747 | #undef malloc | |
6748 | ||
6749 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
6750 | Here is a matrix of mmap possibilities: | |
6751 | mmap private not fixed | |
6752 | mmap private fixed at somewhere currently unmapped | |
6753 | mmap private fixed at somewhere already mapped | |
6754 | mmap shared not fixed | |
6755 | mmap shared fixed at somewhere currently unmapped | |
6756 | mmap shared fixed at somewhere already mapped | |
6757 | For private mappings, we should verify that changes cannot be read() | |
6758 | back from the file, nor mmap's back from the file at a different | |
6759 | address. (There have been systems where private was not correctly | |
6760 | implemented like the infamous i386 svr4.0, and systems where the | |
6761 | VM page cache was not coherent with the file system buffer cache | |
6762 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
6763 | For shared mappings, we should conversely verify that changes get | |
6764 | propagated back to all the places they're supposed to be. | |
6765 | ||
6766 | Grep wants private fixed already mapped. | |
6767 | The main things grep needs to know about mmap are: | |
6768 | * does it exist and is it safe to write into the mmap'd area | |
6769 | * how to use it (BSD variants) */ | |
6770 | ||
6771 | #include <fcntl.h> | |
6772 | #include <sys/mman.h> | |
6773 | ||
6774 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
6775 | char *malloc (); | |
6776 | #endif | |
3266f10b | 6777 | |
05ea2a05 TT |
6778 | /* This mess was copied from the GNU getpagesize.h. */ |
6779 | #ifndef HAVE_GETPAGESIZE | |
6780 | # ifdef _SC_PAGESIZE | |
6781 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6782 | # else /* no _SC_PAGESIZE */ | |
6783 | # ifdef HAVE_SYS_PARAM_H | |
6784 | # include <sys/param.h> | |
6785 | # ifdef EXEC_PAGESIZE | |
6786 | # define getpagesize() EXEC_PAGESIZE | |
6787 | # else /* no EXEC_PAGESIZE */ | |
6788 | # ifdef NBPG | |
6789 | # define getpagesize() NBPG * CLSIZE | |
6790 | # ifndef CLSIZE | |
6791 | # define CLSIZE 1 | |
6792 | # endif /* no CLSIZE */ | |
6793 | # else /* no NBPG */ | |
6794 | # ifdef NBPC | |
6795 | # define getpagesize() NBPC | |
6796 | # else /* no NBPC */ | |
6797 | # ifdef PAGESIZE | |
6798 | # define getpagesize() PAGESIZE | |
6799 | # endif /* PAGESIZE */ | |
6800 | # endif /* no NBPC */ | |
6801 | # endif /* no NBPG */ | |
6802 | # endif /* no EXEC_PAGESIZE */ | |
6803 | # else /* no HAVE_SYS_PARAM_H */ | |
6804 | # define getpagesize() 8192 /* punt totally */ | |
6805 | # endif /* no HAVE_SYS_PARAM_H */ | |
6806 | # endif /* no _SC_PAGESIZE */ | |
6807 | ||
6808 | #endif /* no HAVE_GETPAGESIZE */ | |
3266f10b | 6809 | |
05ea2a05 TT |
6810 | int |
6811 | main () | |
6812 | { | |
6813 | char *data, *data2, *data3; | |
6814 | const char *cdata2; | |
6815 | int i, pagesize; | |
6816 | int fd, fd2; | |
3266f10b | 6817 | |
05ea2a05 | 6818 | pagesize = getpagesize (); |
5e030278 | 6819 | |
05ea2a05 TT |
6820 | /* First, make a file with some known garbage in it. */ |
6821 | data = (char *) malloc (pagesize); | |
6822 | if (!data) | |
6823 | return 1; | |
6824 | for (i = 0; i < pagesize; ++i) | |
6825 | *(data + i) = rand (); | |
6826 | umask (0); | |
6827 | fd = creat ("conftest.mmap", 0600); | |
6828 | if (fd < 0) | |
6829 | return 2; | |
6830 | if (write (fd, data, pagesize) != pagesize) | |
6831 | return 3; | |
6832 | close (fd); | |
6833 | ||
6834 | /* Next, check that the tail of a page is zero-filled. File must have | |
6835 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
6836 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
6837 | if (fd2 < 0) | |
6838 | return 4; | |
6839 | cdata2 = ""; | |
6840 | if (write (fd2, cdata2, 1) != 1) | |
6841 | return 5; | |
6842 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
6843 | if (data2 == MAP_FAILED) | |
6844 | return 6; | |
6845 | for (i = 0; i < pagesize; ++i) | |
6846 | if (*(data2 + i)) | |
6847 | return 7; | |
6848 | close (fd2); | |
6849 | if (munmap (data2, pagesize)) | |
6850 | return 8; | |
6851 | ||
6852 | /* Next, try to mmap the file at a fixed address which already has | |
6853 | something else allocated at it. If we can, also make sure that | |
6854 | we see the same garbage. */ | |
6855 | fd = open ("conftest.mmap", O_RDWR); | |
6856 | if (fd < 0) | |
6857 | return 9; | |
6858 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
6859 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6860 | return 10; | |
6861 | for (i = 0; i < pagesize; ++i) | |
6862 | if (*(data + i) != *(data2 + i)) | |
6863 | return 11; | |
6864 | ||
6865 | /* Finally, make sure that changes to the mapped area do not | |
6866 | percolate back to the file as seen by read(). (This is a bug on | |
6867 | some variants of i386 svr4.0.) */ | |
6868 | for (i = 0; i < pagesize; ++i) | |
6869 | *(data2 + i) = *(data2 + i) + 1; | |
6870 | data3 = (char *) malloc (pagesize); | |
6871 | if (!data3) | |
6872 | return 12; | |
6873 | if (read (fd, data3, pagesize) != pagesize) | |
6874 | return 13; | |
6875 | for (i = 0; i < pagesize; ++i) | |
6876 | if (*(data + i) != *(data3 + i)) | |
6877 | return 14; | |
6878 | close (fd); | |
6879 | return 0; | |
6880 | } | |
6881 | _ACEOF | |
6882 | if ac_fn_c_try_run "$LINENO"; then : | |
6883 | ac_cv_func_mmap_fixed_mapped=yes | |
6884 | else | |
6885 | ac_cv_func_mmap_fixed_mapped=no | |
6886 | fi | |
6887 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6888 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6889 | fi | |
5e030278 | 6890 | |
05ea2a05 TT |
6891 | fi |
6892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
6893 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
6894 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5e030278 | 6895 | |
05ea2a05 | 6896 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
5e030278 | 6897 | |
05ea2a05 TT |
6898 | fi |
6899 | rm -f conftest.mmap conftest.txt | |
5e030278 | 6900 | |
05ea2a05 TT |
6901 | for ac_header in vfork.h |
6902 | do : | |
6903 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
6904 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
6905 | cat >>confdefs.h <<_ACEOF | |
6906 | #define HAVE_VFORK_H 1 | |
6907 | _ACEOF | |
5e030278 | 6908 | |
05ea2a05 | 6909 | fi |
5e030278 | 6910 | |
05ea2a05 | 6911 | done |
5e030278 | 6912 | |
05ea2a05 TT |
6913 | for ac_func in fork vfork |
6914 | do : | |
6915 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6916 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6917 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
6918 | cat >>confdefs.h <<_ACEOF | |
6919 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6920 | _ACEOF | |
6921 | ||
6922 | fi | |
6923 | done | |
6924 | ||
6925 | if test "x$ac_cv_func_fork" = xyes; then | |
6926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
6927 | $as_echo_n "checking for working fork... " >&6; } | |
6928 | if ${ac_cv_func_fork_works+:} false; then : | |
6929 | $as_echo_n "(cached) " >&6 | |
6930 | else | |
6931 | if test "$cross_compiling" = yes; then : | |
6932 | ac_cv_func_fork_works=cross | |
6933 | else | |
6934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6935 | /* end confdefs.h. */ | |
6936 | $ac_includes_default | |
6937 | int | |
6938 | main () | |
6939 | { | |
6940 | ||
6941 | /* By Ruediger Kuhlmann. */ | |
6942 | return fork () < 0; | |
6943 | ||
6944 | ; | |
6945 | return 0; | |
6946 | } | |
6947 | _ACEOF | |
6948 | if ac_fn_c_try_run "$LINENO"; then : | |
6949 | ac_cv_func_fork_works=yes | |
6950 | else | |
6951 | ac_cv_func_fork_works=no | |
6952 | fi | |
6953 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6954 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6955 | fi | |
6956 | ||
6957 | fi | |
6958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
6959 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
6960 | ||
6961 | else | |
6962 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6963 | fi | |
6964 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6965 | case $host in | |
6966 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6967 | # Override, as these systems have only a dummy fork() stub | |
6968 | ac_cv_func_fork_works=no | |
6969 | ;; | |
6970 | *) | |
6971 | ac_cv_func_fork_works=yes | |
6972 | ;; | |
6973 | esac | |
6974 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6975 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
6976 | fi | |
6977 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6978 | if test "x$ac_cv_func_vfork" = xyes; then | |
6979 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
6980 | $as_echo_n "checking for working vfork... " >&6; } | |
6981 | if ${ac_cv_func_vfork_works+:} false; then : | |
6982 | $as_echo_n "(cached) " >&6 | |
6983 | else | |
6984 | if test "$cross_compiling" = yes; then : | |
6985 | ac_cv_func_vfork_works=cross | |
6986 | else | |
6987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6988 | /* end confdefs.h. */ | |
6989 | /* Thanks to Paul Eggert for this test. */ | |
6990 | $ac_includes_default | |
6991 | #include <sys/wait.h> | |
6992 | #ifdef HAVE_VFORK_H | |
6993 | # include <vfork.h> | |
6994 | #endif | |
6995 | /* On some sparc systems, changes by the child to local and incoming | |
6996 | argument registers are propagated back to the parent. The compiler | |
6997 | is told about this with #include <vfork.h>, but some compilers | |
6998 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6999 | static variable whose address is put into a register that is | |
7000 | clobbered by the vfork. */ | |
7001 | static void | |
7002 | #ifdef __cplusplus | |
7003 | sparc_address_test (int arg) | |
7004 | # else | |
7005 | sparc_address_test (arg) int arg; | |
7006 | #endif | |
7007 | { | |
7008 | static pid_t child; | |
7009 | if (!child) { | |
7010 | child = vfork (); | |
7011 | if (child < 0) { | |
7012 | perror ("vfork"); | |
7013 | _exit(2); | |
7014 | } | |
7015 | if (!child) { | |
7016 | arg = getpid(); | |
7017 | write(-1, "", 0); | |
7018 | _exit (arg); | |
7019 | } | |
7020 | } | |
7021 | } | |
7022 | ||
7023 | int | |
7024 | main () | |
7025 | { | |
7026 | pid_t parent = getpid (); | |
7027 | pid_t child; | |
7028 | ||
7029 | sparc_address_test (0); | |
7030 | ||
7031 | child = vfork (); | |
7032 | ||
7033 | if (child == 0) { | |
7034 | /* Here is another test for sparc vfork register problems. This | |
7035 | test uses lots of local variables, at least as many local | |
7036 | variables as main has allocated so far including compiler | |
7037 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7038 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7039 | reuse the register of parent for one of the local variables, | |
7040 | since it will think that parent can't possibly be used any more | |
7041 | in this routine. Assigning to the local variable will thus | |
7042 | munge parent in the parent process. */ | |
7043 | pid_t | |
7044 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7045 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7046 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7047 | use the same hardware register for all 8 local variables. */ | |
7048 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7049 | || p != p5 || p != p6 || p != p7) | |
7050 | _exit(1); | |
7051 | ||
7052 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
7053 | from child file descriptors. If the child closes a descriptor | |
7054 | before it execs or exits, this munges the parent's descriptor | |
7055 | as well. Test for this by closing stdout in the child. */ | |
7056 | _exit(close(fileno(stdout)) != 0); | |
7057 | } else { | |
7058 | int status; | |
7059 | struct stat st; | |
7060 | ||
7061 | while (wait(&status) != child) | |
7062 | ; | |
7063 | return ( | |
7064 | /* Was there some problem with vforking? */ | |
7065 | child < 0 | |
7066 | ||
7067 | /* Did the child fail? (This shouldn't happen.) */ | |
7068 | || status | |
7069 | ||
7070 | /* Did the vfork/compiler bug occur? */ | |
7071 | || parent != getpid() | |
7072 | ||
7073 | /* Did the file descriptor bug occur? */ | |
7074 | || fstat(fileno(stdout), &st) != 0 | |
7075 | ); | |
7076 | } | |
7077 | } | |
7078 | _ACEOF | |
7079 | if ac_fn_c_try_run "$LINENO"; then : | |
7080 | ac_cv_func_vfork_works=yes | |
7081 | else | |
7082 | ac_cv_func_vfork_works=no | |
7083 | fi | |
7084 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7085 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7086 | fi | |
7087 | ||
7088 | fi | |
7089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
7090 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
7091 | ||
7092 | fi; | |
7093 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7094 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7095 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7096 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
7097 | fi | |
7098 | ||
7099 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
7100 | ||
7101 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
7102 | ||
7103 | else | |
7104 | ||
7105 | $as_echo "#define vfork fork" >>confdefs.h | |
7106 | ||
7107 | fi | |
7108 | if test "x$ac_cv_func_fork_works" = xyes; then | |
7109 | ||
7110 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
7111 | ||
7112 | fi | |
7113 | ||
8ae8e197 | 7114 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 TT |
7115 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
7116 | setpgid setpgrp getrusage getauxval | |
7117 | do : | |
7118 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7119 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7120 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7121 | cat >>confdefs.h <<_ACEOF | |
7122 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7123 | _ACEOF | |
7124 | ||
7125 | fi | |
7126 | done | |
7127 | ||
7128 | ||
7129 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
7130 | " | |
7131 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
7132 | ac_have_decl=1 | |
7133 | else | |
7134 | ac_have_decl=0 | |
7135 | fi | |
7136 | ||
7137 | cat >>confdefs.h <<_ACEOF | |
7138 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
7139 | _ACEOF | |
7140 | ||
7141 | ||
7142 | if test "$cross_compiling" = yes; then : | |
7143 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7144 | /* end confdefs.h. */ | |
7145 | #include <sys/personality.h> | |
7146 | int | |
7147 | main () | |
7148 | { | |
7149 | ||
7150 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7151 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7152 | # endif | |
7153 | /* Test the flag could be set and stays set. */ | |
7154 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7155 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7156 | return 1 | |
7157 | ; | |
7158 | return 0; | |
7159 | } | |
7160 | _ACEOF | |
7161 | if ac_fn_c_try_link "$LINENO"; then : | |
7162 | have_personality=true | |
7163 | else | |
7164 | have_personality=false | |
7165 | fi | |
7166 | rm -f core conftest.err conftest.$ac_objext \ | |
7167 | conftest$ac_exeext conftest.$ac_ext | |
7168 | else | |
7169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7170 | /* end confdefs.h. */ | |
7171 | #include <sys/personality.h> | |
7172 | int | |
7173 | main () | |
7174 | { | |
7175 | ||
7176 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7177 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7178 | # endif | |
7179 | /* Test the flag could be set and stays set. */ | |
7180 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7181 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7182 | return 1 | |
7183 | ; | |
7184 | return 0; | |
7185 | } | |
7186 | _ACEOF | |
7187 | if ac_fn_c_try_run "$LINENO"; then : | |
7188 | have_personality=true | |
7189 | else | |
7190 | have_personality=false | |
7191 | fi | |
7192 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7193 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7194 | fi | |
7195 | ||
7196 | if $have_personality | |
7197 | then | |
7198 | ||
7199 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h | |
7200 | ||
7201 | fi | |
7202 | ||
7203 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
7204 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
7205 | ac_have_decl=1 | |
7206 | else | |
7207 | ac_have_decl=0 | |
7208 | fi | |
7209 | ||
7210 | cat >>confdefs.h <<_ACEOF | |
7211 | #define HAVE_DECL_STRSTR $ac_have_decl | |
7212 | _ACEOF | |
7213 | ||
7214 | ||
7215 | # ----------------------- # | |
7216 | # Checks for structures. # | |
7217 | # ----------------------- # | |
7218 | ||
7219 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
7220 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
7221 | ||
7222 | cat >>confdefs.h <<_ACEOF | |
7223 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7224 | _ACEOF | |
7225 | ||
7226 | ||
7227 | fi | |
7228 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" | |
7229 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
7230 | ||
7231 | cat >>confdefs.h <<_ACEOF | |
7232 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7233 | _ACEOF | |
7234 | ||
7235 | ||
7236 | fi | |
7237 | ||
7238 | ||
7239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
7240 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
7241 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7242 | $as_echo_n "(cached) " >&6 | |
7243 | else | |
7244 | ac_func_search_save_LIBS=$LIBS | |
7245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7246 | /* end confdefs.h. */ | |
7247 | ||
7248 | /* Override any GCC internal prototype to avoid an error. | |
7249 | Use char because int might match the return type of a GCC | |
7250 | builtin and then its argument prototype would still apply. */ | |
7251 | #ifdef __cplusplus | |
7252 | extern "C" | |
7253 | #endif | |
7254 | char kinfo_getfile (); | |
7255 | int | |
7256 | main () | |
7257 | { | |
7258 | return kinfo_getfile (); | |
7259 | ; | |
7260 | return 0; | |
7261 | } | |
7262 | _ACEOF | |
7263 | for ac_lib in '' util util-freebsd; do | |
7264 | if test -z "$ac_lib"; then | |
7265 | ac_res="none required" | |
7266 | else | |
7267 | ac_res=-l$ac_lib | |
7268 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7269 | fi | |
7270 | if ac_fn_c_try_link "$LINENO"; then : | |
7271 | ac_cv_search_kinfo_getfile=$ac_res | |
7272 | fi | |
7273 | rm -f core conftest.err conftest.$ac_objext \ | |
7274 | conftest$ac_exeext | |
7275 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7276 | break | |
7277 | fi | |
7278 | done | |
7279 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7280 | ||
7281 | else | |
7282 | ac_cv_search_kinfo_getfile=no | |
7283 | fi | |
7284 | rm conftest.$ac_ext | |
7285 | LIBS=$ac_func_search_save_LIBS | |
7286 | fi | |
7287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
7288 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
7289 | ac_res=$ac_cv_search_kinfo_getfile | |
7290 | if test "$ac_res" != no; then : | |
7291 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7292 | ||
7293 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
7294 | ||
7295 | fi | |
7296 | ||
7297 | ||
7298 | # Check for std::thread. This does not work on some platforms, like | |
7299 | # mingw and DJGPP. | |
7300 | ac_ext=cpp | |
7301 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7302 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7303 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7304 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7305 | ||
7306 | ||
7307 | ||
7308 | ||
7309 | ||
7310 | ac_ext=c | |
7311 | ac_cpp='$CPP $CPPFLAGS' | |
7312 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7313 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7314 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7315 | ||
7316 | ax_pthread_ok=no | |
7317 | ||
7318 | # We used to check for pthread.h first, but this fails if pthread.h | |
7319 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
7320 | # It gets checked for in the link test anyway. | |
7321 | ||
7322 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
5e030278 TT |
7323 | # etcetera environment variables, and if threads linking works using |
7324 | # them: | |
7325 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
7326 | ax_pthread_save_CC="$CC" | |
7327 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7328 | ax_pthread_save_LIBS="$LIBS" | |
05ea2a05 TT |
7329 | if test "x$PTHREAD_CC" != "x"; then : |
7330 | CC="$PTHREAD_CC" | |
7331 | fi | |
7332 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7333 | LIBS="$PTHREAD_LIBS $LIBS" | |
7334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
7335 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
7336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7337 | /* end confdefs.h. */ | |
7338 | ||
7339 | /* Override any GCC internal prototype to avoid an error. | |
7340 | Use char because int might match the return type of a GCC | |
7341 | builtin and then its argument prototype would still apply. */ | |
7342 | #ifdef __cplusplus | |
7343 | extern "C" | |
7344 | #endif | |
7345 | char pthread_join (); | |
7346 | int | |
7347 | main () | |
7348 | { | |
7349 | return pthread_join (); | |
7350 | ; | |
7351 | return 0; | |
7352 | } | |
7353 | _ACEOF | |
7354 | if ac_fn_c_try_link "$LINENO"; then : | |
7355 | ax_pthread_ok=yes | |
7356 | fi | |
7357 | rm -f core conftest.err conftest.$ac_objext \ | |
7358 | conftest$ac_exeext conftest.$ac_ext | |
7359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7360 | $as_echo "$ax_pthread_ok" >&6; } | |
7361 | if test "x$ax_pthread_ok" = "xno"; then | |
7362 | PTHREAD_LIBS="" | |
7363 | PTHREAD_CFLAGS="" | |
7364 | fi | |
7365 | CC="$ax_pthread_save_CC" | |
7366 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7367 | LIBS="$ax_pthread_save_LIBS" | |
7368 | fi | |
7369 | ||
7370 | # We must check for the threads library under a number of different | |
7371 | # names; the ordering is very important because some systems | |
7372 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
7373 | # libraries is broken (non-POSIX). | |
7374 | ||
7375 | # Create a list of thread flags to try. Items starting with a "-" are | |
7376 | # C compiler flags, and other items are library names, except for "none" | |
7377 | # which indicates that we try without any flags at all, and "pthread-config" | |
7378 | # which is a program returning the flags for the Pth emulation library. | |
7379 | ||
7380 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
7381 | ||
7382 | # The ordering *is* (sometimes) important. Some notes on the | |
7383 | # individual items follow: | |
7384 | ||
7385 | # pthreads: AIX (must check this before -lpthread) | |
7386 | # none: in case threads are in libc; should be tried before -Kthread and | |
7387 | # other compiler flags to prevent continual compiler warnings | |
7388 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
7389 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
7390 | # (Note: HP C rejects this with "bad form for `-t' option") | |
7391 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
7392 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
7393 | # doesn't hurt to check since this sometimes defines pthreads and | |
7394 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
7395 | # is present but should not be used directly; and before -mthreads, | |
7396 | # because the compiler interprets this as "-mt" + "-hreads") | |
7397 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
7398 | # pthread: Linux, etcetera | |
7399 | # --thread-safe: KAI C++ | |
7400 | # pthread-config: use pthread-config program (for GNU Pth library) | |
7401 | ||
7402 | case $host_os in | |
7403 | ||
7404 | freebsd*) | |
7405 | ||
7406 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
7407 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
7408 | ||
7409 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" | |
7410 | ;; | |
7411 | ||
7412 | hpux*) | |
7413 | ||
7414 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable | |
7415 | # multi-threading and also sets -lpthread." | |
7416 | ||
7417 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
7418 | ;; | |
7419 | ||
7420 | openedition*) | |
7421 | ||
7422 | # IBM z/OS requires a feature-test macro to be defined in order to | |
7423 | # enable POSIX threads at all, so give the user a hint if this is | |
7424 | # not set. (We don't define these ourselves, as they can affect | |
7425 | # other portions of the system API in unpredictable ways.) | |
7426 | ||
7427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7428 | /* end confdefs.h. */ | |
7429 | ||
7430 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
7431 | AX_PTHREAD_ZOS_MISSING | |
7432 | # endif | |
7433 | ||
7434 | _ACEOF | |
7435 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7436 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : | |
7437 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
7438 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
7439 | fi | |
7440 | rm -f conftest* | |
7441 | ||
7442 | ;; | |
7443 | ||
7444 | solaris*) | |
7445 | ||
7446 | # On Solaris (at least, for some versions), libc contains stubbed | |
7447 | # (non-functional) versions of the pthreads routines, so link-based | |
7448 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
7449 | # pthread_cleanup_push, or rather a function called by this macro, | |
7450 | # so we could check for that, but who knows whether they'll stub | |
7451 | # that too in a future libc.) So we'll check first for the | |
7452 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
7453 | ||
7454 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
7455 | ;; | |
7456 | esac | |
7457 | ||
7458 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
7459 | ||
7460 | if test "x$GCC" = "xyes"; then : | |
7461 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
7462 | fi | |
7463 | ||
7464 | # The presence of a feature test macro requesting re-entrant function | |
7465 | # definitions is, on some systems, a strong hint that pthreads support is | |
7466 | # correctly enabled | |
7467 | ||
7468 | case $host_os in | |
7469 | darwin* | hpux* | linux* | osf* | solaris*) | |
7470 | ax_pthread_check_macro="_REENTRANT" | |
7471 | ;; | |
7472 | ||
7473 | aix*) | |
7474 | ax_pthread_check_macro="_THREAD_SAFE" | |
7475 | ;; | |
7476 | ||
7477 | *) | |
7478 | ax_pthread_check_macro="--" | |
7479 | ;; | |
7480 | esac | |
7481 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
7482 | ax_pthread_check_cond=0 | |
7483 | else | |
7484 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
7485 | fi | |
7486 | ||
7487 | # Are we compiling with Clang? | |
7488 | ||
7489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
7490 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
7491 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
7492 | $as_echo_n "(cached) " >&6 | |
7493 | else | |
7494 | ax_cv_PTHREAD_CLANG=no | |
7495 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
7496 | if test "x$GCC" = "xyes"; then | |
7497 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7498 | /* end confdefs.h. */ | |
7499 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | |
7500 | # if defined(__clang__) && defined(__llvm__) | |
7501 | AX_PTHREAD_CC_IS_CLANG | |
7502 | # endif | |
7503 | ||
7504 | _ACEOF | |
7505 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7506 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
7507 | ax_cv_PTHREAD_CLANG=yes | |
7508 | fi | |
7509 | rm -f conftest* | |
7510 | ||
7511 | fi | |
7512 | ||
7513 | fi | |
7514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 | |
7515 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
7516 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
7517 | ||
7518 | ax_pthread_clang_warning=no | |
7519 | ||
7520 | # Clang needs special handling, because older versions handle the -pthread | |
7521 | # option in a rather... idiosyncratic way | |
7522 | ||
7523 | if test "x$ax_pthread_clang" = "xyes"; then | |
7524 | ||
7525 | # Clang takes -pthread; it has never supported any other flag | |
7526 | ||
7527 | # (Note 1: This will need to be revisited if a system that Clang | |
7528 | # supports has POSIX threads in a separate library. This tends not | |
7529 | # to be the way of modern systems, but it's conceivable.) | |
7530 | ||
7531 | # (Note 2: On some systems, notably Darwin, -pthread is not needed | |
7532 | # to get POSIX threads support; the API is always present and | |
7533 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
7534 | # -pthread does define _REENTRANT, and while the Darwin headers | |
7535 | # ignore this macro, third-party headers might not.) | |
7536 | ||
7537 | PTHREAD_CFLAGS="-pthread" | |
7538 | PTHREAD_LIBS= | |
7539 | ||
7540 | ax_pthread_ok=yes | |
7541 | ||
7542 | # However, older versions of Clang make a point of warning the user | |
7543 | # that, in an invocation where only linking and no compilation is | |
7544 | # taking place, the -pthread option has no effect ("argument unused | |
7545 | # during compilation"). They expect -pthread to be passed in only | |
7546 | # when source code is being compiled. | |
7547 | # | |
7548 | # Problem is, this is at odds with the way Automake and most other | |
7549 | # C build frameworks function, which is that the same flags used in | |
7550 | # compilation (CFLAGS) are also used in linking. Many systems | |
7551 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
7552 | # support, and in fact it is often not straightforward to specify a | |
7553 | # flag that is used only in the compilation phase and not in | |
7554 | # linking. Such a scenario is extremely rare in practice. | |
7555 | # | |
7556 | # Even though use of the -pthread flag in linking would only print | |
7557 | # a warning, this can be a nuisance for well-run software projects | |
7558 | # that build with -Werror. So if the active version of Clang has | |
7559 | # this misfeature, we search for an option to squash it. | |
7560 | ||
7561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
7562 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
7563 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
7564 | $as_echo_n "(cached) " >&6 | |
7565 | else | |
7566 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
7567 | # Create an alternate version of $ac_link that compiles and | |
7568 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
7569 | # (.c -> exe), because the warning occurs only in the second | |
7570 | # step | |
7571 | ax_pthread_save_ac_link="$ac_link" | |
7572 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
7573 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
7574 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
7575 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7576 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
7577 | if test "x$ax_pthread_try" = "xunknown"; then : | |
7578 | break | |
7579 | fi | |
7580 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
7581 | ac_link="$ax_pthread_save_ac_link" | |
7582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7583 | /* end confdefs.h. */ | |
7584 | int main(void){return 0;} | |
7585 | _ACEOF | |
7586 | if ac_fn_c_try_link "$LINENO"; then : | |
7587 | ac_link="$ax_pthread_2step_ac_link" | |
7588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7589 | /* end confdefs.h. */ | |
7590 | int main(void){return 0;} | |
7591 | _ACEOF | |
7592 | if ac_fn_c_try_link "$LINENO"; then : | |
7593 | break | |
7594 | fi | |
7595 | rm -f core conftest.err conftest.$ac_objext \ | |
7596 | conftest$ac_exeext conftest.$ac_ext | |
7597 | ||
7598 | fi | |
7599 | rm -f core conftest.err conftest.$ac_objext \ | |
7600 | conftest$ac_exeext conftest.$ac_ext | |
7601 | done | |
7602 | ac_link="$ax_pthread_save_ac_link" | |
7603 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7604 | if test "x$ax_pthread_try" = "x"; then : | |
7605 | ax_pthread_try=no | |
7606 | fi | |
7607 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
7608 | ||
7609 | fi | |
7610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
7611 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
7612 | ||
7613 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | |
7614 | no | unknown) ;; | |
7615 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
7616 | esac | |
7617 | ||
7618 | fi # $ax_pthread_clang = yes | |
7619 | ||
7620 | if test "x$ax_pthread_ok" = "xno"; then | |
7621 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
7622 | ||
7623 | case $ax_pthread_try_flag in | |
7624 | none) | |
7625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
7626 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
7627 | ;; | |
7628 | ||
7629 | -mt,pthread) | |
7630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
7631 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
7632 | PTHREAD_CFLAGS="-mt" | |
7633 | PTHREAD_LIBS="-lpthread" | |
7634 | ;; | |
7635 | ||
7636 | -*) | |
7637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
7638 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
7639 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
7640 | ;; | |
7641 | ||
7642 | pthread-config) | |
7643 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
7644 | set dummy pthread-config; ac_word=$2 | |
7645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7646 | $as_echo_n "checking for $ac_word... " >&6; } | |
7647 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
7648 | $as_echo_n "(cached) " >&6 | |
7649 | else | |
7650 | if test -n "$ax_pthread_config"; then | |
7651 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
7652 | else | |
7653 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7654 | for as_dir in $PATH | |
7655 | do | |
7656 | IFS=$as_save_IFS | |
7657 | test -z "$as_dir" && as_dir=. | |
7658 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7659 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7660 | ac_cv_prog_ax_pthread_config="yes" | |
7661 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7662 | break 2 | |
7663 | fi | |
7664 | done | |
7665 | done | |
7666 | IFS=$as_save_IFS | |
7667 | ||
7668 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" | |
7669 | fi | |
7670 | fi | |
7671 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
7672 | if test -n "$ax_pthread_config"; then | |
7673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
7674 | $as_echo "$ax_pthread_config" >&6; } | |
7675 | else | |
7676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7677 | $as_echo "no" >&6; } | |
7678 | fi | |
7679 | ||
7680 | ||
7681 | if test "x$ax_pthread_config" = "xno"; then : | |
7682 | continue | |
7683 | fi | |
7684 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
7685 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
7686 | ;; | |
7687 | ||
7688 | *) | |
7689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
7690 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
7691 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
7692 | ;; | |
7693 | esac | |
7694 | ||
7695 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7696 | ax_pthread_save_LIBS="$LIBS" | |
7697 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7698 | LIBS="$PTHREAD_LIBS $LIBS" | |
7699 | ||
7700 | # Check for various functions. We must include pthread.h, | |
7701 | # since some functions may be macros. (On the Sequent, we | |
7702 | # need a special flag -Kthread to make this header compile.) | |
7703 | # We check for pthread_join because it is in -lpthread on IRIX | |
7704 | # while pthread_create is in libc. We check for pthread_attr_init | |
7705 | # due to DEC craziness with -lpthreads. We check for | |
7706 | # pthread_cleanup_push because it is one of the few pthread | |
7707 | # functions on Solaris that doesn't have a non-functional libc stub. | |
7708 | # We try pthread_create on general principles. | |
7709 | ||
7710 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7711 | /* end confdefs.h. */ | |
7712 | #include <pthread.h> | |
7713 | # if $ax_pthread_check_cond | |
7714 | # error "$ax_pthread_check_macro must be defined" | |
7715 | # endif | |
7716 | static void routine(void *a) { a = 0; } | |
7717 | static void *start_routine(void *a) { return a; } | |
7718 | int | |
7719 | main () | |
7720 | { | |
7721 | pthread_t th; pthread_attr_t attr; | |
7722 | pthread_create(&th, 0, start_routine, 0); | |
7723 | pthread_join(th, 0); | |
7724 | pthread_attr_init(&attr); | |
7725 | pthread_cleanup_push(routine, 0); | |
7726 | pthread_cleanup_pop(0) /* ; */ | |
7727 | ; | |
7728 | return 0; | |
7729 | } | |
7730 | _ACEOF | |
7731 | if ac_fn_c_try_link "$LINENO"; then : | |
7732 | ax_pthread_ok=yes | |
7733 | fi | |
7734 | rm -f core conftest.err conftest.$ac_objext \ | |
7735 | conftest$ac_exeext conftest.$ac_ext | |
7736 | ||
7737 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7738 | LIBS="$ax_pthread_save_LIBS" | |
7739 | ||
7740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7741 | $as_echo "$ax_pthread_ok" >&6; } | |
7742 | if test "x$ax_pthread_ok" = "xyes"; then : | |
7743 | break | |
7744 | fi | |
7745 | ||
7746 | PTHREAD_LIBS="" | |
7747 | PTHREAD_CFLAGS="" | |
7748 | done | |
7749 | fi | |
7750 | ||
7751 | # Various other checks: | |
7752 | if test "x$ax_pthread_ok" = "xyes"; then | |
7753 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7754 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
7755 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
7756 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
7757 | |
7758 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | |
7759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
7760 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
7761 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
7762 | $as_echo_n "(cached) " >&6 | |
7763 | else | |
7764 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
7765 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
7766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7767 | /* end confdefs.h. */ | |
7768 | #include <pthread.h> | |
7769 | int | |
7770 | main () | |
7771 | { | |
7772 | int attr = $ax_pthread_attr; return attr /* ; */ | |
7773 | ; | |
7774 | return 0; | |
7775 | } | |
7776 | _ACEOF | |
7777 | if ac_fn_c_try_link "$LINENO"; then : | |
7778 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
7779 | fi | |
7780 | rm -f core conftest.err conftest.$ac_objext \ | |
7781 | conftest$ac_exeext conftest.$ac_ext | |
7782 | done | |
7783 | ||
7784 | fi | |
7785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
7786 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
7787 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
7788 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
7789 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
7790 | ||
7791 | cat >>confdefs.h <<_ACEOF | |
7792 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
7793 | _ACEOF | |
7794 | ||
7795 | ax_pthread_joinable_attr_defined=yes | |
7796 | ||
7797 | fi | |
7798 | ||
7799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 | |
7800 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
7801 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
7802 | $as_echo_n "(cached) " >&6 | |
7803 | else | |
7804 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
7805 | case $host_os in | |
7806 | solaris*) | |
7807 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
7808 | ;; | |
7809 | esac | |
7810 | ||
7811 | fi | |
7812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
7813 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
7814 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
7815 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
7816 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
7817 | ax_pthread_special_flags_added=yes | |
7818 | fi | |
7819 | ||
7820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 | |
7821 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
7822 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
7823 | $as_echo_n "(cached) " >&6 | |
7824 | else | |
7825 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7826 | /* end confdefs.h. */ | |
7827 | #include <pthread.h> | |
7828 | int | |
7829 | main () | |
7830 | { | |
7831 | int i = PTHREAD_PRIO_INHERIT; | |
7832 | ; | |
7833 | return 0; | |
7834 | } | |
7835 | _ACEOF | |
7836 | if ac_fn_c_try_link "$LINENO"; then : | |
7837 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
7838 | else | |
7839 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
7840 | fi | |
7841 | rm -f core conftest.err conftest.$ac_objext \ | |
7842 | conftest$ac_exeext conftest.$ac_ext | |
7843 | ||
7844 | fi | |
7845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
7846 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
7847 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
7848 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
7849 | ||
7850 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h | |
7851 | ||
7852 | ax_pthread_prio_inherit_defined=yes | |
7853 | ||
7854 | fi | |
7855 | ||
7856 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7857 | LIBS="$ax_pthread_save_LIBS" | |
7858 | ||
7859 | # More AIX lossage: compile with *_r variant | |
7860 | if test "x$GCC" != "xyes"; then | |
7861 | case $host_os in | |
7862 | aix*) | |
7863 | case "x/$CC" in #( | |
7864 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
7865 | #handle absolute path differently from PATH based program lookup | |
7866 | case "x$CC" in #( | |
7867 | x/*) : | |
7868 | if as_fn_executable_p ${CC}_r; then : | |
7869 | PTHREAD_CC="${CC}_r" | |
7870 | fi ;; #( | |
7871 | *) : | |
7872 | for ac_prog in ${CC}_r | |
7873 | do | |
7874 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7875 | set dummy $ac_prog; ac_word=$2 | |
7876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7877 | $as_echo_n "checking for $ac_word... " >&6; } | |
7878 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
7879 | $as_echo_n "(cached) " >&6 | |
7880 | else | |
7881 | if test -n "$PTHREAD_CC"; then | |
7882 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
7883 | else | |
7884 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7885 | for as_dir in $PATH | |
7886 | do | |
7887 | IFS=$as_save_IFS | |
7888 | test -z "$as_dir" && as_dir=. | |
7889 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7890 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7891 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
7892 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7893 | break 2 | |
7894 | fi | |
7895 | done | |
7896 | done | |
7897 | IFS=$as_save_IFS | |
7898 | ||
7899 | fi | |
7900 | fi | |
7901 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
7902 | if test -n "$PTHREAD_CC"; then | |
7903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
7904 | $as_echo "$PTHREAD_CC" >&6; } | |
7905 | else | |
7906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7907 | $as_echo "no" >&6; } | |
7908 | fi | |
7909 | ||
7910 | ||
7911 | test -n "$PTHREAD_CC" && break | |
7912 | done | |
7913 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
7914 | ;; | |
7915 | esac ;; #( | |
7916 | *) : | |
7917 | ;; | |
7918 | esac | |
7919 | ;; | |
7920 | esac | |
7921 | fi | |
7922 | fi | |
7923 | ||
7924 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
7925 | ||
7926 | ||
7927 | ||
7928 | ||
7929 | ||
7930 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
7931 | if test "x$ax_pthread_ok" = "xyes"; then | |
7932 | threads=yes | |
7933 | : | |
7934 | else | |
7935 | ax_pthread_ok=no | |
7936 | threads=no | |
7937 | fi | |
7938 | ac_ext=cpp | |
7939 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7940 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7941 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7942 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7943 | ||
7944 | ||
7945 | if test "$threads" = "yes"; then | |
7946 | save_LIBS="$LIBS" | |
7947 | LIBS="$PTHREAD_LIBS $LIBS" | |
7948 | save_CXXFLAGS="$CXXFLAGS" | |
7949 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
7950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
7951 | $as_echo_n "checking for std::thread... " >&6; } | |
7952 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
7953 | $as_echo_n "(cached) " >&6 | |
7954 | else | |
7955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7956 | /* end confdefs.h. */ | |
7957 | #include <thread> | |
7958 | void callback() { } | |
7959 | int | |
7960 | main () | |
7961 | { | |
7962 | std::thread t(callback); | |
7963 | ; | |
7964 | return 0; | |
7965 | } | |
7966 | _ACEOF | |
7967 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
7968 | gdb_cv_cxx_std_thread=yes | |
7969 | else | |
7970 | gdb_cv_cxx_std_thread=no | |
7971 | fi | |
7972 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7973 | fi | |
7974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
7975 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
7976 | ||
7977 | # This check must be here, while LIBS includes any necessary | |
7978 | # threading library. | |
7979 | for ac_func in pthread_sigmask pthread_setname_np | |
7980 | do : | |
7981 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7982 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7983 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7984 | cat >>confdefs.h <<_ACEOF | |
7985 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7986 | _ACEOF | |
7987 | ||
7988 | fi | |
7989 | done | |
7990 | ||
7991 | ||
7992 | LIBS="$save_LIBS" | |
7993 | CXXFLAGS="$save_CXXFLAGS" | |
7994 | fi | |
7995 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
7996 | ||
7997 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h | |
7998 | ||
7999 | fi | |
8000 | ac_ext=c | |
8001 | ac_cpp='$CPP $CPPFLAGS' | |
8002 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8003 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8004 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8005 | ||
8006 | ||
8007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
8008 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
8009 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
8010 | $as_echo_n "(cached) " >&6 | |
8011 | else | |
8012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8013 | /* end confdefs.h. */ |
8014 | ||
05ea2a05 TT |
8015 | #include <setjmp.h> |
8016 | ||
5e030278 TT |
8017 | int |
8018 | main () | |
8019 | { | |
05ea2a05 | 8020 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
5e030278 TT |
8021 | ; |
8022 | return 0; | |
8023 | } | |
8024 | _ACEOF | |
05ea2a05 TT |
8025 | if ac_fn_c_try_compile "$LINENO"; then : |
8026 | gdb_cv_func_sigsetjmp=yes | |
8027 | else | |
8028 | gdb_cv_func_sigsetjmp=no | |
5e030278 | 8029 | fi |
05ea2a05 | 8030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 | 8031 | fi |
05ea2a05 TT |
8032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
8033 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
8034 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 8035 | |
05ea2a05 | 8036 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 8037 | |
05ea2a05 | 8038 | fi |
5e030278 | 8039 | |
5e030278 | 8040 | |
05ea2a05 TT |
8041 | # Check whether --with-intel_pt was given. |
8042 | if test "${with_intel_pt+set}" = set; then : | |
8043 | withval=$with_intel_pt; | |
8044 | else | |
8045 | with_intel_pt=auto | |
8046 | fi | |
5e030278 | 8047 | |
05ea2a05 TT |
8048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
8049 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
8050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
8051 | $as_echo "$with_intel_pt" >&6; } | |
5e030278 | 8052 | |
05ea2a05 TT |
8053 | if test "${with_intel_pt}" = no; then |
8054 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
8055 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
8056 | HAVE_LIBIPT=no | |
8057 | else | |
8058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8059 | /* end confdefs.h. */ |
8060 | ||
05ea2a05 TT |
8061 | #include <linux/perf_event.h> |
8062 | #ifndef PERF_ATTR_SIZE_VER5 | |
8063 | # error | |
8064 | #endif | |
5e030278 TT |
8065 | |
8066 | _ACEOF | |
05ea2a05 TT |
8067 | if ac_fn_c_try_cpp "$LINENO"; then : |
8068 | perf_event=yes | |
8069 | else | |
8070 | perf_event=no | |
5e030278 | 8071 | fi |
05ea2a05 TT |
8072 | rm -f conftest.err conftest.i conftest.$ac_ext |
8073 | if test "$perf_event" != yes; then | |
8074 | if test "$with_intel_pt" = yes; then | |
8075 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
8076 | else | |
8077 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
8078 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
8079 | fi | |
8080 | fi | |
5e030278 | 8081 | |
5e030278 | 8082 | |
5e030278 | 8083 | |
5e030278 | 8084 | |
5e030278 | 8085 | |
5e030278 | 8086 | |
5e030278 | 8087 | |
5e030278 | 8088 | |
5e030278 | 8089 | |
05ea2a05 | 8090 | use_additional=yes |
5e030278 | 8091 | |
05ea2a05 TT |
8092 | acl_save_prefix="$prefix" |
8093 | prefix="$acl_final_prefix" | |
8094 | acl_save_exec_prefix="$exec_prefix" | |
8095 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8096 | |
05ea2a05 TT |
8097 | eval additional_includedir=\"$includedir\" |
8098 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8099 | |
05ea2a05 TT |
8100 | exec_prefix="$acl_save_exec_prefix" |
8101 | prefix="$acl_save_prefix" | |
5e030278 | 8102 | |
5e030278 | 8103 | |
05ea2a05 TT |
8104 | # Check whether --with-libipt-prefix was given. |
8105 | if test "${with_libipt_prefix+set}" = set; then : | |
8106 | withval=$with_libipt_prefix; | |
8107 | if test "X$withval" = "Xno"; then | |
8108 | use_additional=no | |
8109 | else | |
8110 | if test "X$withval" = "X"; then | |
5e030278 | 8111 | |
05ea2a05 TT |
8112 | acl_save_prefix="$prefix" |
8113 | prefix="$acl_final_prefix" | |
8114 | acl_save_exec_prefix="$exec_prefix" | |
8115 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8116 | |
05ea2a05 TT |
8117 | eval additional_includedir=\"$includedir\" |
8118 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8119 | |
05ea2a05 TT |
8120 | exec_prefix="$acl_save_exec_prefix" |
8121 | prefix="$acl_save_prefix" | |
5e030278 | 8122 | |
05ea2a05 TT |
8123 | else |
8124 | additional_includedir="$withval/include" | |
8125 | additional_libdir="$withval/lib" | |
8126 | fi | |
8127 | fi | |
5e030278 | 8128 | |
05ea2a05 | 8129 | fi |
5e030278 | 8130 | |
9f1528a1 AB |
8131 | |
8132 | # Check whether --with-libipt-type was given. | |
8133 | if test "${with_libipt_type+set}" = set; then : | |
8134 | withval=$with_libipt_type; with_libipt_type=$withval | |
8135 | else | |
8136 | with_libipt_type=auto | |
8137 | fi | |
8138 | ||
8139 | lib_type=`eval echo \$with_libipt_type` | |
8140 | ||
05ea2a05 TT |
8141 | LIBIPT= |
8142 | LTLIBIPT= | |
8143 | INCIPT= | |
8144 | rpathdirs= | |
8145 | ltrpathdirs= | |
8146 | names_already_handled= | |
8147 | names_next_round='ipt ' | |
8148 | while test -n "$names_next_round"; do | |
8149 | names_this_round="$names_next_round" | |
8150 | names_next_round= | |
8151 | for name in $names_this_round; do | |
8152 | already_handled= | |
8153 | for n in $names_already_handled; do | |
8154 | if test "$n" = "$name"; then | |
8155 | already_handled=yes | |
8156 | break | |
8157 | fi | |
8158 | done | |
8159 | if test -z "$already_handled"; then | |
8160 | names_already_handled="$names_already_handled $name" | |
8161 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8162 | eval value=\"\$HAVE_LIB$uppername\" | |
8163 | if test -n "$value"; then | |
8164 | if test "$value" = yes; then | |
8165 | eval value=\"\$LIB$uppername\" | |
8166 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
8167 | eval value=\"\$LTLIB$uppername\" | |
8168 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
8169 | else | |
8170 | : | |
8171 | fi | |
8172 | else | |
8173 | found_dir= | |
8174 | found_la= | |
8175 | found_so= | |
8176 | found_a= | |
8177 | if test $use_additional = yes; then | |
9f1528a1 | 8178 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
8179 | found_dir="$additional_libdir" |
8180 | found_so="$additional_libdir/lib$name.$shlibext" | |
8181 | if test -f "$additional_libdir/lib$name.la"; then | |
8182 | found_la="$additional_libdir/lib$name.la" | |
8183 | fi | |
9f1528a1 | 8184 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
8185 | if test -f "$additional_libdir/lib$name.$libext"; then |
8186 | found_dir="$additional_libdir" | |
8187 | found_a="$additional_libdir/lib$name.$libext" | |
8188 | if test -f "$additional_libdir/lib$name.la"; then | |
8189 | found_la="$additional_libdir/lib$name.la" | |
8190 | fi | |
8191 | fi | |
8192 | fi | |
8193 | fi | |
8194 | if test "X$found_dir" = "X"; then | |
8195 | for x in $LDFLAGS $LTLIBIPT; do | |
8196 | ||
8197 | acl_save_prefix="$prefix" | |
8198 | prefix="$acl_final_prefix" | |
8199 | acl_save_exec_prefix="$exec_prefix" | |
8200 | exec_prefix="$acl_final_exec_prefix" | |
8201 | eval x=\"$x\" | |
8202 | exec_prefix="$acl_save_exec_prefix" | |
8203 | prefix="$acl_save_prefix" | |
8204 | ||
8205 | case "$x" in | |
8206 | -L*) | |
8207 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8208 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
8209 | found_dir="$dir" |
8210 | found_so="$dir/lib$name.$shlibext" | |
8211 | if test -f "$dir/lib$name.la"; then | |
8212 | found_la="$dir/lib$name.la" | |
8213 | fi | |
9f1528a1 | 8214 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
8215 | if test -f "$dir/lib$name.$libext"; then |
8216 | found_dir="$dir" | |
8217 | found_a="$dir/lib$name.$libext" | |
8218 | if test -f "$dir/lib$name.la"; then | |
8219 | found_la="$dir/lib$name.la" | |
8220 | fi | |
8221 | fi | |
8222 | fi | |
8223 | ;; | |
8224 | esac | |
8225 | if test "X$found_dir" != "X"; then | |
8226 | break | |
8227 | fi | |
8228 | done | |
8229 | fi | |
8230 | if test "X$found_dir" != "X"; then | |
8231 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
8232 | if test "X$found_so" != "X"; then | |
8233 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8234 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8235 | else | |
8236 | haveit= | |
8237 | for x in $ltrpathdirs; do | |
8238 | if test "X$x" = "X$found_dir"; then | |
8239 | haveit=yes | |
8240 | break | |
8241 | fi | |
8242 | done | |
8243 | if test -z "$haveit"; then | |
8244 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8245 | fi | |
8246 | if test "$hardcode_direct" = yes; then | |
8247 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8248 | else | |
8249 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8250 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8251 | haveit= | |
8252 | for x in $rpathdirs; do | |
8253 | if test "X$x" = "X$found_dir"; then | |
8254 | haveit=yes | |
8255 | break | |
8256 | fi | |
8257 | done | |
8258 | if test -z "$haveit"; then | |
8259 | rpathdirs="$rpathdirs $found_dir" | |
8260 | fi | |
8261 | else | |
8262 | haveit= | |
8263 | for x in $LDFLAGS $LIBIPT; do | |
8264 | ||
8265 | acl_save_prefix="$prefix" | |
8266 | prefix="$acl_final_prefix" | |
8267 | acl_save_exec_prefix="$exec_prefix" | |
8268 | exec_prefix="$acl_final_exec_prefix" | |
8269 | eval x=\"$x\" | |
8270 | exec_prefix="$acl_save_exec_prefix" | |
8271 | prefix="$acl_save_prefix" | |
8272 | ||
8273 | if test "X$x" = "X-L$found_dir"; then | |
8274 | haveit=yes | |
8275 | break | |
8276 | fi | |
8277 | done | |
8278 | if test -z "$haveit"; then | |
8279 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
8280 | fi | |
8281 | if test "$hardcode_minus_L" != no; then | |
8282 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8283 | else | |
8284 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8285 | fi | |
8286 | fi | |
8287 | fi | |
8288 | fi | |
8289 | else | |
8290 | if test "X$found_a" != "X"; then | |
8291 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
8292 | else | |
8293 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
8294 | fi | |
8295 | fi | |
8296 | additional_includedir= | |
8297 | case "$found_dir" in | |
8298 | */lib | */lib/) | |
8299 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8300 | additional_includedir="$basedir/include" | |
8301 | ;; | |
8302 | esac | |
8303 | if test "X$additional_includedir" != "X"; then | |
8304 | if test "X$additional_includedir" != "X/usr/include"; then | |
8305 | haveit= | |
8306 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8307 | if test -n "$GCC"; then | |
8308 | case $host_os in | |
8309 | linux*) haveit=yes;; | |
8310 | esac | |
8311 | fi | |
8312 | fi | |
8313 | if test -z "$haveit"; then | |
8314 | for x in $CPPFLAGS $INCIPT; do | |
8315 | ||
8316 | acl_save_prefix="$prefix" | |
8317 | prefix="$acl_final_prefix" | |
8318 | acl_save_exec_prefix="$exec_prefix" | |
8319 | exec_prefix="$acl_final_exec_prefix" | |
8320 | eval x=\"$x\" | |
8321 | exec_prefix="$acl_save_exec_prefix" | |
8322 | prefix="$acl_save_prefix" | |
8323 | ||
8324 | if test "X$x" = "X-I$additional_includedir"; then | |
8325 | haveit=yes | |
8326 | break | |
8327 | fi | |
8328 | done | |
8329 | if test -z "$haveit"; then | |
8330 | if test -d "$additional_includedir"; then | |
8331 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
8332 | fi | |
8333 | fi | |
8334 | fi | |
8335 | fi | |
8336 | fi | |
8337 | if test -n "$found_la"; then | |
8338 | save_libdir="$libdir" | |
8339 | case "$found_la" in | |
8340 | */* | *\\*) . "$found_la" ;; | |
8341 | *) . "./$found_la" ;; | |
8342 | esac | |
8343 | libdir="$save_libdir" | |
8344 | for dep in $dependency_libs; do | |
8345 | case "$dep" in | |
8346 | -L*) | |
8347 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8348 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8349 | haveit= | |
8350 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8351 | if test -n "$GCC"; then | |
8352 | case $host_os in | |
8353 | linux*) haveit=yes;; | |
8354 | esac | |
8355 | fi | |
8356 | fi | |
8357 | if test -z "$haveit"; then | |
8358 | haveit= | |
8359 | for x in $LDFLAGS $LIBIPT; do | |
8360 | ||
8361 | acl_save_prefix="$prefix" | |
8362 | prefix="$acl_final_prefix" | |
8363 | acl_save_exec_prefix="$exec_prefix" | |
8364 | exec_prefix="$acl_final_exec_prefix" | |
8365 | eval x=\"$x\" | |
8366 | exec_prefix="$acl_save_exec_prefix" | |
8367 | prefix="$acl_save_prefix" | |
8368 | ||
8369 | if test "X$x" = "X-L$additional_libdir"; then | |
8370 | haveit=yes | |
8371 | break | |
8372 | fi | |
8373 | done | |
8374 | if test -z "$haveit"; then | |
8375 | if test -d "$additional_libdir"; then | |
8376 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
8377 | fi | |
8378 | fi | |
8379 | haveit= | |
8380 | for x in $LDFLAGS $LTLIBIPT; do | |
8381 | ||
8382 | acl_save_prefix="$prefix" | |
8383 | prefix="$acl_final_prefix" | |
8384 | acl_save_exec_prefix="$exec_prefix" | |
8385 | exec_prefix="$acl_final_exec_prefix" | |
8386 | eval x=\"$x\" | |
8387 | exec_prefix="$acl_save_exec_prefix" | |
8388 | prefix="$acl_save_prefix" | |
8389 | ||
8390 | if test "X$x" = "X-L$additional_libdir"; then | |
8391 | haveit=yes | |
8392 | break | |
8393 | fi | |
8394 | done | |
8395 | if test -z "$haveit"; then | |
8396 | if test -d "$additional_libdir"; then | |
8397 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
8398 | fi | |
8399 | fi | |
8400 | fi | |
8401 | fi | |
8402 | ;; | |
8403 | -R*) | |
8404 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8405 | if test "$enable_rpath" != no; then | |
8406 | haveit= | |
8407 | for x in $rpathdirs; do | |
8408 | if test "X$x" = "X$dir"; then | |
8409 | haveit=yes | |
8410 | break | |
8411 | fi | |
8412 | done | |
8413 | if test -z "$haveit"; then | |
8414 | rpathdirs="$rpathdirs $dir" | |
8415 | fi | |
8416 | haveit= | |
8417 | for x in $ltrpathdirs; do | |
8418 | if test "X$x" = "X$dir"; then | |
8419 | haveit=yes | |
8420 | break | |
8421 | fi | |
8422 | done | |
8423 | if test -z "$haveit"; then | |
8424 | ltrpathdirs="$ltrpathdirs $dir" | |
8425 | fi | |
8426 | fi | |
8427 | ;; | |
8428 | -l*) | |
8429 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8430 | ;; | |
8431 | *.la) | |
8432 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8433 | ;; | |
8434 | *) | |
8435 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
8436 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
8437 | ;; | |
8438 | esac | |
8439 | done | |
8440 | fi | |
8441 | else | |
9f1528a1 AB |
8442 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8443 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8444 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
8445 | else | |
8446 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
8447 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
8448 | fi | |
05ea2a05 TT |
8449 | fi |
8450 | fi | |
8451 | fi | |
8452 | done | |
8453 | done | |
8454 | if test "X$rpathdirs" != "X"; then | |
8455 | if test -n "$hardcode_libdir_separator"; then | |
8456 | alldirs= | |
8457 | for found_dir in $rpathdirs; do | |
8458 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8459 | done | |
8460 | acl_save_libdir="$libdir" | |
8461 | libdir="$alldirs" | |
8462 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8463 | libdir="$acl_save_libdir" | |
8464 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8465 | else | |
8466 | for found_dir in $rpathdirs; do | |
8467 | acl_save_libdir="$libdir" | |
8468 | libdir="$found_dir" | |
8469 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8470 | libdir="$acl_save_libdir" | |
8471 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8472 | done | |
8473 | fi | |
8474 | fi | |
8475 | if test "X$ltrpathdirs" != "X"; then | |
8476 | for found_dir in $ltrpathdirs; do | |
8477 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
8478 | done | |
8479 | fi | |
5e030278 | 8480 | |
5e030278 | 8481 | |
05ea2a05 | 8482 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 8483 | |
05ea2a05 TT |
8484 | for element in $INCIPT; do |
8485 | haveit= | |
8486 | for x in $CPPFLAGS; do | |
5e030278 | 8487 | |
05ea2a05 TT |
8488 | acl_save_prefix="$prefix" |
8489 | prefix="$acl_final_prefix" | |
8490 | acl_save_exec_prefix="$exec_prefix" | |
8491 | exec_prefix="$acl_final_exec_prefix" | |
8492 | eval x=\"$x\" | |
8493 | exec_prefix="$acl_save_exec_prefix" | |
8494 | prefix="$acl_save_prefix" | |
8495 | ||
8496 | if test "X$x" = "X$element"; then | |
8497 | haveit=yes | |
8498 | break | |
8499 | fi | |
8500 | done | |
8501 | if test -z "$haveit"; then | |
8502 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8503 | fi | |
8504 | done | |
8505 | ||
8506 | ||
8507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
8508 | $as_echo_n "checking for libipt... " >&6; } | |
8509 | if ${ac_cv_libipt+:} false; then : | |
8510 | $as_echo_n "(cached) " >&6 | |
8511 | else | |
8512 | ||
8513 | ac_save_LIBS="$LIBS" | |
8514 | LIBS="$LIBS $LIBIPT" | |
8515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8516 | /* end confdefs.h. */ |
05ea2a05 TT |
8517 | #include "intel-pt.h" |
8518 | int | |
8519 | main () | |
8520 | { | |
8521 | pt_insn_alloc_decoder (0); | |
8522 | ; | |
8523 | return 0; | |
8524 | } | |
5e030278 TT |
8525 | _ACEOF |
8526 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
8527 | ac_cv_libipt=yes |
8528 | else | |
8529 | ac_cv_libipt=no | |
5e030278 TT |
8530 | fi |
8531 | rm -f core conftest.err conftest.$ac_objext \ | |
8532 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 8533 | LIBS="$ac_save_LIBS" |
5e030278 TT |
8534 | |
8535 | fi | |
05ea2a05 TT |
8536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
8537 | $as_echo "$ac_cv_libipt" >&6; } | |
8538 | if test "$ac_cv_libipt" = yes; then | |
8539 | HAVE_LIBIPT=yes | |
5e030278 | 8540 | |
05ea2a05 | 8541 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
5e030278 | 8542 | |
05ea2a05 TT |
8543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 |
8544 | $as_echo_n "checking how to link with libipt... " >&6; } | |
8545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
8546 | $as_echo "$LIBIPT" >&6; } | |
8547 | else | |
8548 | HAVE_LIBIPT=no | |
8549 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8550 | LIBIPT= | |
8551 | LTLIBIPT= | |
8552 | fi | |
5e030278 | 8553 | |
5e030278 | 8554 | |
5e030278 | 8555 | |
5e030278 | 8556 | |
5e030278 | 8557 | |
5e030278 | 8558 | |
05ea2a05 TT |
8559 | if test "$HAVE_LIBIPT" != yes; then |
8560 | if test "$with_intel_pt" = yes; then | |
8561 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
8562 | else | |
8563 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
8564 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
8565 | fi | |
8566 | else | |
8567 | save_LIBS=$LIBS | |
8568 | LIBS="$LIBS $LIBIPT" | |
8569 | for ac_func in pt_insn_event | |
8570 | do : | |
8571 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
8572 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
8573 | cat >>confdefs.h <<_ACEOF | |
8574 | #define HAVE_PT_INSN_EVENT 1 | |
8575 | _ACEOF | |
5e030278 | 8576 | |
5e030278 | 8577 | fi |
05ea2a05 TT |
8578 | done |
8579 | ||
8580 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
8581 | " | |
8582 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
8583 | ||
8584 | cat >>confdefs.h <<_ACEOF | |
8585 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
8586 | _ACEOF | |
5e030278 TT |
8587 | |
8588 | ||
5e030278 | 8589 | fi |
05ea2a05 TT |
8590 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
8591 | " | |
8592 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
5e030278 | 8593 | |
05ea2a05 TT |
8594 | cat >>confdefs.h <<_ACEOF |
8595 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
8596 | _ACEOF | |
5e030278 | 8597 | |
5e030278 | 8598 | |
05ea2a05 | 8599 | fi |
5e030278 | 8600 | |
05ea2a05 TT |
8601 | LIBS=$save_LIBS |
8602 | fi | |
8603 | fi | |
8604 | ||
8605 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
8606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
8607 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
8608 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
8609 | $as_echo_n "(cached) " >&6 | |
8610 | else | |
8611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8612 | /* end confdefs.h. */ |
05ea2a05 TT |
8613 | |
8614 | #define _SYSCALL32 | |
8615 | /* Needed for new procfs interface on sparc-solaris. */ | |
8616 | #define _STRUCTURED_PROC 1 | |
8617 | #include <sys/procfs.h> | |
5e030278 TT |
8618 | int |
8619 | main () | |
8620 | { | |
05ea2a05 | 8621 | gregset_t avar |
5e030278 TT |
8622 | ; |
8623 | return 0; | |
8624 | } | |
8625 | _ACEOF | |
05ea2a05 TT |
8626 | if ac_fn_c_try_compile "$LINENO"; then : |
8627 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
8628 | else | |
8629 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
5e030278 | 8630 | |
5e030278 | 8631 | fi |
05ea2a05 | 8632 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
8633 | fi |
8634 | ||
05ea2a05 | 8635 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
5e030278 | 8636 | |
05ea2a05 TT |
8637 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
8638 | ||
8639 | fi | |
8640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
8641 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
8642 | ||
8643 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
8644 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
8645 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
5e030278 TT |
8646 | $as_echo_n "(cached) " >&6 |
8647 | else | |
05ea2a05 | 8648 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e030278 | 8649 | /* end confdefs.h. */ |
05ea2a05 TT |
8650 | |
8651 | #define _SYSCALL32 | |
8652 | /* Needed for new procfs interface on sparc-solaris. */ | |
8653 | #define _STRUCTURED_PROC 1 | |
8654 | #include <sys/procfs.h> | |
5e030278 TT |
8655 | int |
8656 | main () | |
8657 | { | |
05ea2a05 | 8658 | fpregset_t avar |
5e030278 TT |
8659 | ; |
8660 | return 0; | |
8661 | } | |
8662 | _ACEOF | |
05ea2a05 | 8663 | if ac_fn_c_try_compile "$LINENO"; then : |
db6878ac SM |
8664 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
8665 | else | |
8666 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
8667 | ||
8668 | fi | |
8669 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8670 | fi | |
8671 | ||
8672 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
8673 | ||
8674 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
8675 | ||
8676 | fi | |
8677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
8678 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
8679 | ||
8680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
8681 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
8682 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
8683 | $as_echo_n "(cached) " >&6 | |
8684 | else | |
8685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8686 | /* end confdefs.h. */ | |
8687 | ||
8688 | #define _SYSCALL32 | |
8689 | /* Needed for new procfs interface on sparc-solaris. */ | |
8690 | #define _STRUCTURED_PROC 1 | |
8691 | #include <sys/procfs.h> | |
8692 | int | |
8693 | main () | |
8694 | { | |
8695 | prgregset_t avar | |
8696 | ; | |
8697 | return 0; | |
8698 | } | |
8699 | _ACEOF | |
8700 | if ac_fn_c_try_compile "$LINENO"; then : | |
8701 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
8702 | else | |
8703 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
8704 | ||
8705 | fi | |
8706 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8707 | fi | |
8708 | ||
8709 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then | |
8710 | ||
8711 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h | |
8712 | ||
8713 | fi | |
8714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
8715 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
8716 | ||
8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
8718 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
8719 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
8720 | $as_echo_n "(cached) " >&6 | |
8721 | else | |
8722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8723 | /* end confdefs.h. */ | |
8724 | ||
8725 | #define _SYSCALL32 | |
8726 | /* Needed for new procfs interface on sparc-solaris. */ | |
8727 | #define _STRUCTURED_PROC 1 | |
8728 | #include <sys/procfs.h> | |
8729 | int | |
8730 | main () | |
8731 | { | |
8732 | prfpregset_t avar | |
8733 | ; | |
8734 | return 0; | |
8735 | } | |
8736 | _ACEOF | |
8737 | if ac_fn_c_try_compile "$LINENO"; then : | |
8738 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
8739 | else | |
8740 | bfd_cv_have_sys_procfs_type_prfpregset_t=no | |
8741 | ||
8742 | fi | |
8743 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8744 | fi | |
8745 | ||
8746 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
8747 | ||
8748 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
8749 | ||
8750 | fi | |
8751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
8752 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
8753 | ||
8754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
8755 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
8756 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
8757 | $as_echo_n "(cached) " >&6 | |
8758 | else | |
8759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8760 | /* end confdefs.h. */ | |
8761 | ||
8762 | #define _SYSCALL32 | |
8763 | /* Needed for new procfs interface on sparc-solaris. */ | |
8764 | #define _STRUCTURED_PROC 1 | |
8765 | #include <sys/procfs.h> | |
8766 | int | |
8767 | main () | |
8768 | { | |
8769 | prgregset32_t avar | |
8770 | ; | |
8771 | return 0; | |
8772 | } | |
8773 | _ACEOF | |
8774 | if ac_fn_c_try_compile "$LINENO"; then : | |
8775 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
8776 | else | |
8777 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
8778 | ||
8779 | fi | |
8780 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8781 | fi | |
8782 | ||
8783 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then | |
8784 | ||
8785 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h | |
8786 | ||
8787 | fi | |
8788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
8789 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
8790 | ||
8791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
8792 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
8793 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
8794 | $as_echo_n "(cached) " >&6 | |
8795 | else | |
8796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8797 | /* end confdefs.h. */ | |
8798 | ||
8799 | #define _SYSCALL32 | |
8800 | /* Needed for new procfs interface on sparc-solaris. */ | |
8801 | #define _STRUCTURED_PROC 1 | |
8802 | #include <sys/procfs.h> | |
8803 | int | |
8804 | main () | |
8805 | { | |
8806 | lwpid_t avar | |
8807 | ; | |
8808 | return 0; | |
8809 | } | |
8810 | _ACEOF | |
8811 | if ac_fn_c_try_compile "$LINENO"; then : | |
8812 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
05ea2a05 | 8813 | else |
db6878ac | 8814 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
5e030278 TT |
8815 | |
8816 | fi | |
05ea2a05 TT |
8817 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8818 | fi | |
5e030278 | 8819 | |
db6878ac | 8820 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
5e030278 | 8821 | |
db6878ac | 8822 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
5e030278 | 8823 | |
05ea2a05 | 8824 | fi |
db6878ac SM |
8825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
8826 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
5e030278 | 8827 | |
db6878ac SM |
8828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
8829 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
8830 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
5e030278 TT |
8831 | $as_echo_n "(cached) " >&6 |
8832 | else | |
05ea2a05 TT |
8833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8834 | /* end confdefs.h. */ | |
5e030278 | 8835 | |
05ea2a05 TT |
8836 | #define _SYSCALL32 |
8837 | /* Needed for new procfs interface on sparc-solaris. */ | |
8838 | #define _STRUCTURED_PROC 1 | |
8839 | #include <sys/procfs.h> | |
8840 | int | |
8841 | main () | |
8842 | { | |
db6878ac | 8843 | psaddr_t avar |
05ea2a05 TT |
8844 | ; |
8845 | return 0; | |
8846 | } | |
8847 | _ACEOF | |
8848 | if ac_fn_c_try_compile "$LINENO"; then : | |
db6878ac | 8849 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
05ea2a05 | 8850 | else |
db6878ac | 8851 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
05ea2a05 TT |
8852 | |
8853 | fi | |
8854 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5e030278 TT |
8855 | fi |
8856 | ||
db6878ac | 8857 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
05ea2a05 | 8858 | |
db6878ac | 8859 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
05ea2a05 TT |
8860 | |
8861 | fi | |
db6878ac SM |
8862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
8863 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
05ea2a05 | 8864 | |
db6878ac SM |
8865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 |
8866 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } | |
8867 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
5e030278 TT |
8868 | $as_echo_n "(cached) " >&6 |
8869 | else | |
8870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8871 | /* end confdefs.h. */ | |
05ea2a05 TT |
8872 | |
8873 | #define _SYSCALL32 | |
8874 | /* Needed for new procfs interface on sparc-solaris. */ | |
8875 | #define _STRUCTURED_PROC 1 | |
8876 | #include <sys/procfs.h> | |
5e030278 TT |
8877 | int |
8878 | main () | |
8879 | { | |
db6878ac | 8880 | elf_fpregset_t avar |
5e030278 TT |
8881 | ; |
8882 | return 0; | |
8883 | } | |
8884 | _ACEOF | |
05ea2a05 | 8885 | if ac_fn_c_try_compile "$LINENO"; then : |
db6878ac | 8886 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
5e030278 | 8887 | else |
db6878ac | 8888 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
5e030278 TT |
8889 | |
8890 | fi | |
05ea2a05 TT |
8891 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8892 | fi | |
5e030278 | 8893 | |
db6878ac | 8894 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
5e030278 | 8895 | |
db6878ac | 8896 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
5e030278 | 8897 | |
05ea2a05 | 8898 | fi |
db6878ac SM |
8899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 |
8900 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
5e030278 | 8901 | |
db6878ac SM |
8902 | fi |
8903 | ||
4635ff97 TT |
8904 | # This is set by GDB_AC_COMMON. |
8905 | ||
db6878ac SM |
8906 | |
8907 | ||
8908 | # Check whether we will enable the inclusion of unit tests when | |
8909 | # compiling GDB. | |
8910 | # | |
8911 | # The default value of this option changes depending whether we're on | |
8912 | # development mode (in which case it's "true") or not (in which case | |
8913 | # it's "false"). The $development variable is set by the GDB_AC_COMMON | |
8914 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
8915 | ||
8916 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
8917 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
8918 | fi | |
8919 | ||
8920 | # Check whether --enable-unit-tests was given. | |
8921 | if test "${enable_unit_tests+set}" = set; then : | |
8922 | enableval=$enable_unit_tests; case "${enableval}" in | |
8923 | yes) enable_unittests=true ;; | |
8924 | no) enable_unittests=false ;; | |
8925 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
8926 | esac | |
8927 | else | |
8928 | enable_unittests=$development | |
8929 | fi | |
8930 | ||
8931 | ||
8932 | if $enable_unittests; then | |
8933 | ||
8934 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
8935 | ||
8936 | ||
db6878ac SM |
8937 | fi |
8938 | ||
8939 | ||
8940 | case ${build_alias} in | |
8941 | "") build_noncanonical=${build} ;; | |
8942 | *) build_noncanonical=${build_alias} ;; | |
8943 | esac | |
8944 | ||
8945 | case ${host_alias} in | |
8946 | "") host_noncanonical=${build_noncanonical} ;; | |
8947 | *) host_noncanonical=${host_alias} ;; | |
8948 | esac | |
8949 | ||
8950 | case ${target_alias} in | |
8951 | "") target_noncanonical=${host_noncanonical} ;; | |
8952 | *) target_noncanonical=${target_alias} ;; | |
8953 | esac | |
8954 | ||
8955 | ||
8956 | ||
8957 | ||
8958 | ||
8959 | ||
8960 | # Dependency checking. | |
8961 | rm -rf .tst 2>/dev/null | |
8962 | mkdir .tst 2>/dev/null | |
8963 | if test -d .tst; then | |
8964 | am__leading_dot=. | |
8965 | else | |
8966 | am__leading_dot=_ | |
8967 | fi | |
8968 | rmdir .tst 2>/dev/null | |
8969 | ||
8970 | DEPDIR="${am__leading_dot}deps" | |
8971 | ||
8972 | ac_config_commands="$ac_config_commands depdir" | |
8973 | ||
8974 | ||
8975 | ||
9a665d62 TT |
8976 | # If we haven't got the data from the intl directory, |
8977 | # assume NLS is disabled. | |
8978 | USE_NLS=no | |
8979 | LIBINTL= | |
8980 | LIBINTL_DEP= | |
8981 | INCINTL= | |
8982 | XGETTEXT= | |
8983 | GMSGFMT= | |
8984 | POSUB= | |
8985 | ||
8986 | if test -f ../intl/config.intl; then | |
8987 | . ../intl/config.intl | |
8988 | fi | |
8989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 | |
8990 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
8991 | if test x"$USE_NLS" != xyes; then | |
8992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8993 | $as_echo "no" >&6; } | |
8994 | else | |
8995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8996 | $as_echo "yes" >&6; } | |
8997 | ||
8998 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h | |
8999 | ||
9000 | ||
9001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 | |
9002 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
9003 | # Look for .po and .gmo files in the source directory. | |
9004 | CATALOGS= | |
9005 | XLINGUAS= | |
9006 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
9007 | # If there aren't any .gmo files the shell will give us the | |
9008 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
9009 | # weeded out. | |
9010 | case "$cat" in *\**) | |
9011 | continue;; | |
9012 | esac | |
9013 | # The quadruple backslash is collapsed to a double backslash | |
9014 | # by the backticks, then collapsed again by the double quotes, | |
9015 | # leaving us with one backslash in the sed expression (right | |
9016 | # before the dot that mustn't act as a wildcard). | |
9017 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
9018 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
9019 | # The user is allowed to set LINGUAS to a list of languages to | |
9020 | # install catalogs for. If it's empty that means "all of them." | |
9021 | if test "x$LINGUAS" = x; then | |
9022 | CATALOGS="$CATALOGS $cat" | |
9023 | XLINGUAS="$XLINGUAS $lang" | |
9024 | else | |
9025 | case "$LINGUAS" in *$lang*) | |
9026 | CATALOGS="$CATALOGS $cat" | |
9027 | XLINGUAS="$XLINGUAS $lang" | |
9028 | ;; | |
9029 | esac | |
9030 | fi | |
9031 | done | |
9032 | LINGUAS="$XLINGUAS" | |
9033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
9034 | $as_echo "$LINGUAS" >&6; } | |
9035 | ||
9036 | ||
9037 | DATADIRNAME=share | |
9038 | ||
9039 | INSTOBJEXT=.mo | |
9040 | ||
9041 | GENCAT=gencat | |
9042 | ||
9043 | CATOBJEXT=.gmo | |
9044 | ||
9045 | fi | |
9046 | ||
db6878ac SM |
9047 | # Create sub-directories for objects and dependencies. |
9048 | CONFIG_SRC_SUBDIR="arch gdbsupport nat target" | |
9049 | ||
9050 | ||
9051 | ac_config_commands="$ac_config_commands gdbdepdir" | |
9052 | ||
9053 | ||
9054 | depcc="$CC" am_compiler_list= | |
9055 | ||
9056 | am_depcomp=$ac_aux_dir/depcomp | |
9057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
9058 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
9059 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
5e030278 TT |
9060 | $as_echo_n "(cached) " >&6 |
9061 | else | |
db6878ac SM |
9062 | if test -f "$am_depcomp"; then |
9063 | # We make a subdir and do the tests there. Otherwise we can end up | |
9064 | # making bogus files that we don't know about and never remove. For | |
9065 | # instance it was reported that on HP-UX the gcc test will end up | |
9066 | # making a dummy file named `D' -- because `-MD' means `put the output | |
9067 | # in D'. | |
9068 | mkdir conftest.dir | |
9069 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
9070 | # using a relative directory. | |
9071 | cp "$am_depcomp" conftest.dir | |
9072 | cd conftest.dir | |
9073 | # We will build objects and dependencies in a subdirectory because | |
9074 | # it helps to detect inapplicable dependency modes. For instance | |
9075 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
9076 | # side effect of compilation, but ICC will put the dependencies in | |
9077 | # the current directory while Tru64 will put them in the object | |
9078 | # directory. | |
9079 | mkdir sub | |
05ea2a05 | 9080 | |
db6878ac SM |
9081 | am_cv_CC_dependencies_compiler_type=none |
9082 | if test "$am_compiler_list" = ""; then | |
9083 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
9084 | fi | |
9085 | for depmode in $am_compiler_list; do | |
9086 | if test $depmode = none; then break; fi | |
9087 | ||
9088 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 | |
9089 | # Setup a source with many dependencies, because some compilers | |
9090 | # like to wrap large dependency lists on column 80 (with \), and | |
9091 | # we should not choose a depcomp mode which is confused by this. | |
9092 | # | |
9093 | # We need to recreate these files for each test, as the compiler may | |
9094 | # overwrite some of them when testing with obscure command lines. | |
9095 | # This happens at least with the AIX C compiler. | |
9096 | : > sub/conftest.c | |
9097 | for i in 1 2 3 4 5 6; do | |
9098 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
9099 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
9100 | # Solaris 8's {/usr,}/bin/sh. | |
9101 | touch sub/conftst$i.h | |
9102 | done | |
9103 | echo "include sub/conftest.Po" > confmf | |
9104 | ||
9105 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
9106 | # mode. It turns out that the SunPro C++ compiler does not properly | |
9107 | # handle `-M -o', and we need to detect this. | |
9108 | depcmd="depmode=$depmode \ | |
9109 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
9110 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
9111 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
9112 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
9113 | if env $depcmd > conftest.err 2>&1 && | |
9114 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
9115 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
9116 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
9117 | # icc doesn't choke on unknown options, it will just issue warnings | |
9118 | # or remarks (even with -Werror). So we grep stderr for any message | |
9119 | # that says an option was ignored or not supported. | |
9120 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
9121 | # icc: Command line warning: ignoring option '-M'; no argument required | |
9122 | # The diagnosis changed in icc 8.0: | |
9123 | # icc: Command line remark: option '-MP' not supported | |
9124 | if (grep 'ignoring option' conftest.err || | |
9125 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
9126 | am_cv_CC_dependencies_compiler_type=$depmode | |
9127 | $as_echo "$as_me:$LINENO: success" >&5 | |
9128 | break | |
9129 | fi | |
9130 | fi | |
9131 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 | |
9132 | sed -e 's/^/| /' < conftest.err >&5 | |
9133 | done | |
9134 | ||
9135 | cd .. | |
9136 | rm -rf conftest.dir | |
9137 | else | |
9138 | am_cv_CC_dependencies_compiler_type=none | |
9139 | fi | |
9140 | ||
9141 | fi | |
9142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
9143 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
9144 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone | |
9145 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 | |
9146 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
9147 | ||
9148 | fi | |
9149 | ||
9150 | ||
9151 | 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 | |
9152 | do : | |
9153 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9154 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9155 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9156 | cat >>confdefs.h <<_ACEOF | |
9157 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9158 | _ACEOF | |
9159 | ||
9160 | fi | |
9161 | ||
9162 | done | |
9163 | ||
9164 | for ac_header in vfork.h | |
9165 | do : | |
9166 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9167 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
9168 | cat >>confdefs.h <<_ACEOF | |
9169 | #define HAVE_VFORK_H 1 | |
05ea2a05 | 9170 | _ACEOF |
5e030278 | 9171 | |
5e030278 TT |
9172 | fi |
9173 | ||
db6878ac | 9174 | done |
5e030278 | 9175 | |
db6878ac SM |
9176 | for ac_func in fork vfork |
9177 | do : | |
9178 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9179 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9180 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9181 | cat >>confdefs.h <<_ACEOF | |
9182 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9183 | _ACEOF | |
5e030278 | 9184 | |
db6878ac SM |
9185 | fi |
9186 | done | |
5e030278 | 9187 | |
db6878ac SM |
9188 | if test "x$ac_cv_func_fork" = xyes; then |
9189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
9190 | $as_echo_n "checking for working fork... " >&6; } | |
9191 | if ${ac_cv_func_fork_works+:} false; then : | |
05ea2a05 | 9192 | $as_echo_n "(cached) " >&6 |
db6878ac SM |
9193 | else |
9194 | if test "$cross_compiling" = yes; then : | |
9195 | ac_cv_func_fork_works=cross | |
05ea2a05 TT |
9196 | else |
9197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9198 | /* end confdefs.h. */ | |
db6878ac | 9199 | $ac_includes_default |
05ea2a05 TT |
9200 | int |
9201 | main () | |
9202 | { | |
db6878ac SM |
9203 | |
9204 | /* By Ruediger Kuhlmann. */ | |
9205 | return fork () < 0; | |
9206 | ||
05ea2a05 TT |
9207 | ; |
9208 | return 0; | |
9209 | } | |
9210 | _ACEOF | |
db6878ac SM |
9211 | if ac_fn_c_try_run "$LINENO"; then : |
9212 | ac_cv_func_fork_works=yes | |
05ea2a05 | 9213 | else |
db6878ac | 9214 | ac_cv_func_fork_works=no |
05ea2a05 | 9215 | fi |
db6878ac SM |
9216 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9217 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
05ea2a05 | 9218 | fi |
5e030278 | 9219 | |
db6878ac SM |
9220 | fi |
9221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
9222 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
5e030278 | 9223 | |
db6878ac SM |
9224 | else |
9225 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9226 | fi | |
9227 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9228 | case $host in | |
9229 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9230 | # Override, as these systems have only a dummy fork() stub | |
9231 | ac_cv_func_fork_works=no | |
9232 | ;; | |
9233 | *) | |
9234 | ac_cv_func_fork_works=yes | |
9235 | ;; | |
9236 | esac | |
9237 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
9238 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
9239 | fi | |
9240 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9241 | if test "x$ac_cv_func_vfork" = xyes; then | |
9242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
9243 | $as_echo_n "checking for working vfork... " >&6; } | |
9244 | if ${ac_cv_func_vfork_works+:} false; then : | |
5e030278 | 9245 | $as_echo_n "(cached) " >&6 |
db6878ac SM |
9246 | else |
9247 | if test "$cross_compiling" = yes; then : | |
9248 | ac_cv_func_vfork_works=cross | |
5e030278 TT |
9249 | else |
9250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9251 | /* end confdefs.h. */ | |
db6878ac SM |
9252 | /* Thanks to Paul Eggert for this test. */ |
9253 | $ac_includes_default | |
9254 | #include <sys/wait.h> | |
9255 | #ifdef HAVE_VFORK_H | |
9256 | # include <vfork.h> | |
9257 | #endif | |
9258 | /* On some sparc systems, changes by the child to local and incoming | |
9259 | argument registers are propagated back to the parent. The compiler | |
9260 | is told about this with #include <vfork.h>, but some compilers | |
9261 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9262 | static variable whose address is put into a register that is | |
9263 | clobbered by the vfork. */ | |
9264 | static void | |
9265 | #ifdef __cplusplus | |
9266 | sparc_address_test (int arg) | |
9267 | # else | |
9268 | sparc_address_test (arg) int arg; | |
9269 | #endif | |
9270 | { | |
9271 | static pid_t child; | |
9272 | if (!child) { | |
9273 | child = vfork (); | |
9274 | if (child < 0) { | |
9275 | perror ("vfork"); | |
9276 | _exit(2); | |
9277 | } | |
9278 | if (!child) { | |
9279 | arg = getpid(); | |
9280 | write(-1, "", 0); | |
9281 | _exit (arg); | |
9282 | } | |
9283 | } | |
9284 | } | |
05ea2a05 | 9285 | |
5e030278 TT |
9286 | int |
9287 | main () | |
9288 | { | |
db6878ac SM |
9289 | pid_t parent = getpid (); |
9290 | pid_t child; | |
9291 | ||
9292 | sparc_address_test (0); | |
9293 | ||
9294 | child = vfork (); | |
9295 | ||
9296 | if (child == 0) { | |
9297 | /* Here is another test for sparc vfork register problems. This | |
9298 | test uses lots of local variables, at least as many local | |
9299 | variables as main has allocated so far including compiler | |
9300 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
9301 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
9302 | reuse the register of parent for one of the local variables, | |
9303 | since it will think that parent can't possibly be used any more | |
9304 | in this routine. Assigning to the local variable will thus | |
9305 | munge parent in the parent process. */ | |
9306 | pid_t | |
9307 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
9308 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
9309 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
9310 | use the same hardware register for all 8 local variables. */ | |
9311 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
9312 | || p != p5 || p != p6 || p != p7) | |
9313 | _exit(1); | |
9314 | ||
9315 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
9316 | from child file descriptors. If the child closes a descriptor | |
9317 | before it execs or exits, this munges the parent's descriptor | |
9318 | as well. Test for this by closing stdout in the child. */ | |
9319 | _exit(close(fileno(stdout)) != 0); | |
9320 | } else { | |
9321 | int status; | |
9322 | struct stat st; | |
9323 | ||
9324 | while (wait(&status) != child) | |
9325 | ; | |
9326 | return ( | |
9327 | /* Was there some problem with vforking? */ | |
9328 | child < 0 | |
9329 | ||
9330 | /* Did the child fail? (This shouldn't happen.) */ | |
9331 | || status | |
9332 | ||
9333 | /* Did the vfork/compiler bug occur? */ | |
9334 | || parent != getpid() | |
9335 | ||
9336 | /* Did the file descriptor bug occur? */ | |
9337 | || fstat(fileno(stdout), &st) != 0 | |
9338 | ); | |
9339 | } | |
5e030278 TT |
9340 | } |
9341 | _ACEOF | |
db6878ac SM |
9342 | if ac_fn_c_try_run "$LINENO"; then : |
9343 | ac_cv_func_vfork_works=yes | |
5e030278 | 9344 | else |
db6878ac | 9345 | ac_cv_func_vfork_works=no |
5e030278 | 9346 | fi |
db6878ac SM |
9347 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9348 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e030278 | 9349 | fi |
5e030278 | 9350 | |
db6878ac SM |
9351 | fi |
9352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
9353 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
5e030278 | 9354 | |
db6878ac SM |
9355 | fi; |
9356 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9357 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9358 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
9359 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
9360 | fi | |
5e030278 | 9361 | |
db6878ac | 9362 | if test "x$ac_cv_func_vfork_works" = xyes; then |
5e030278 | 9363 | |
db6878ac | 9364 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
e9bcb658 | 9365 | |
e9bcb658 | 9366 | else |
db6878ac SM |
9367 | |
9368 | $as_echo "#define vfork fork" >>confdefs.h | |
05ea2a05 | 9369 | |
e9bcb658 | 9370 | fi |
db6878ac | 9371 | if test "x$ac_cv_func_fork_works" = xyes; then |
e9bcb658 | 9372 | |
db6878ac | 9373 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
05ea2a05 | 9374 | |
db6878ac | 9375 | fi |
05ea2a05 | 9376 | |
db6878ac SM |
9377 | for ac_func in pread pwrite pread64 |
9378 | do : | |
9379 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9380 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9381 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9382 | cat >>confdefs.h <<_ACEOF | |
9383 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9384 | _ACEOF | |
e9bcb658 | 9385 | |
db6878ac SM |
9386 | fi |
9387 | done | |
e9bcb658 | 9388 | |
3266f10b | 9389 | |
eb7aa561 PA |
9390 | # Check the return and argument types of ptrace. |
9391 | ||
9392 | ||
9393 | for ac_header in sys/ptrace.h ptrace.h | |
9394 | do : | |
9395 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9396 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 9397 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
eb7aa561 PA |
9398 | cat >>confdefs.h <<_ACEOF |
9399 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9400 | _ACEOF | |
9401 | ||
9402 | fi | |
9403 | ||
9404 | done | |
9405 | ||
9406 | ||
9407 | gdb_ptrace_headers=' | |
9408 | #include <sys/types.h> | |
9409 | #if HAVE_SYS_PTRACE_H | |
9410 | # include <sys/ptrace.h> | |
9411 | #endif | |
9412 | #if HAVE_UNISTD_H | |
9413 | # include <unistd.h> | |
9414 | #endif | |
9415 | ' | |
eb7aa561 PA |
9416 | |
9417 | # Check return type. Varargs (used on GNU/Linux) conflict with the | |
9418 | # empty argument list, so check for that explicitly. | |
9419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
9420 | $as_echo_n "checking return type of ptrace... " >&6; } | |
d0ac1c44 | 9421 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
eb7aa561 PA |
9422 | $as_echo_n "(cached) " >&6 |
9423 | else | |
9424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9425 | /* end confdefs.h. */ | |
9426 | $gdb_ptrace_headers | |
9427 | int | |
9428 | main () | |
9429 | { | |
9430 | extern long ptrace (enum __ptrace_request, ...); | |
9431 | ; | |
9432 | return 0; | |
9433 | } | |
9434 | _ACEOF | |
9b30624b | 9435 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9436 | gdb_cv_func_ptrace_ret='long' |
9437 | else | |
9438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9439 | /* end confdefs.h. */ | |
9440 | $gdb_ptrace_headers | |
9441 | int | |
9442 | main () | |
9443 | { | |
9444 | extern int ptrace (); | |
9445 | ; | |
9446 | return 0; | |
9447 | } | |
9448 | _ACEOF | |
9b30624b | 9449 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9450 | gdb_cv_func_ptrace_ret='int' |
9451 | else | |
9452 | gdb_cv_func_ptrace_ret='long' | |
9453 | fi | |
9454 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9455 | fi | |
9456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9457 | fi | |
9458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 | |
9459 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
9460 | ||
9461 | cat >>confdefs.h <<_ACEOF | |
9462 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
9463 | _ACEOF | |
9464 | ||
9465 | # Check argument types. | |
9466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
9467 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
d0ac1c44 | 9468 | if ${gdb_cv_func_ptrace_args+:} false; then : |
eb7aa561 PA |
9469 | $as_echo_n "(cached) " >&6 |
9470 | else | |
9471 | ||
9472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9473 | /* end confdefs.h. */ | |
9474 | $gdb_ptrace_headers | |
9475 | int | |
9476 | main () | |
9477 | { | |
9478 | extern long ptrace (enum __ptrace_request, ...); | |
9479 | ; | |
9480 | return 0; | |
9481 | } | |
9482 | _ACEOF | |
9b30624b | 9483 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 9484 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
eb7aa561 PA |
9485 | else |
9486 | ||
9487 | for gdb_arg1 in 'int' 'long'; do | |
9488 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
9489 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
9490 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
9491 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9492 | /* end confdefs.h. */ | |
9493 | $gdb_ptrace_headers | |
9494 | int | |
9495 | main () | |
9496 | { | |
9497 | ||
9498 | extern $gdb_cv_func_ptrace_ret | |
9499 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
9500 | ||
9501 | ; | |
9502 | return 0; | |
9503 | } | |
9504 | _ACEOF | |
9b30624b | 9505 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9506 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
9507 | break 4; | |
9508 | fi | |
9509 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9510 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
9511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9512 | /* end confdefs.h. */ | |
9513 | $gdb_ptrace_headers | |
9514 | int | |
9515 | main () | |
9516 | { | |
9517 | ||
9518 | extern $gdb_cv_func_ptrace_ret | |
9519 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
9520 | ||
9521 | ; | |
9522 | return 0; | |
9523 | } | |
9524 | _ACEOF | |
9b30624b | 9525 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9526 | |
9527 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
9528 | break 5; | |
9529 | fi | |
9530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9531 | done | |
9532 | done | |
9533 | done | |
9534 | done | |
9535 | done | |
9536 | # Provide a safe default value. | |
9537 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
9538 | ||
9539 | fi | |
9540 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9541 | fi | |
9542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
9543 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
9544 | ac_save_IFS=$IFS; IFS=',' | |
9545 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
9546 | IFS=$ac_save_IFS | |
9547 | shift | |
9548 | ||
54019719 PA |
9549 | cat >>confdefs.h <<_ACEOF |
9550 | #define PTRACE_TYPE_ARG1 $1 | |
9551 | _ACEOF | |
9552 | ||
9553 | ||
eb7aa561 PA |
9554 | cat >>confdefs.h <<_ACEOF |
9555 | #define PTRACE_TYPE_ARG3 $3 | |
9556 | _ACEOF | |
9557 | ||
9558 | ||
9559 | cat >>confdefs.h <<_ACEOF | |
9560 | #define PTRACE_TYPE_ARG4 $4 | |
9561 | _ACEOF | |
9562 | ||
9563 | if test -n "$5"; then | |
9564 | ||
9565 | cat >>confdefs.h <<_ACEOF | |
9566 | #define PTRACE_TYPE_ARG5 $5 | |
9567 | _ACEOF | |
9568 | ||
9569 | fi | |
9570 | ||
9571 | ||
0fb4aa4b PA |
9572 | # Check for UST |
9573 | ustlibs="" | |
9574 | ustinc="" | |
9575 | ||
9576 | ||
9577 | # Check whether --with-ust was given. | |
9578 | if test "${with_ust+set}" = set; then : | |
9579 | withval=$with_ust; | |
9580 | fi | |
9581 | ||
9582 | ||
9583 | # Check whether --with-ust_include was given. | |
9584 | if test "${with_ust_include+set}" = set; then : | |
9585 | withval=$with_ust_include; | |
9586 | fi | |
9587 | ||
9588 | ||
9589 | # Check whether --with-ust_lib was given. | |
9590 | if test "${with_ust_lib+set}" = set; then : | |
9591 | withval=$with_ust_lib; | |
9592 | fi | |
9593 | ||
9594 | ||
9595 | case $with_ust in | |
9596 | no) | |
9597 | ustlibs= | |
9598 | ustinc= | |
9599 | ;; | |
9600 | "" | yes) | |
9601 | ustlibs=" -lust " | |
9602 | ustinc="" | |
9603 | ;; | |
9604 | *) | |
9605 | ustlibs="-L$with_ust/lib -lust" | |
9606 | ustinc="-I$with_ust/include " | |
9607 | ;; | |
9608 | esac | |
9609 | if test "x$with_ust_include" != x; then | |
9610 | ustinc="-I$with_ust_include " | |
9611 | fi | |
9612 | if test "x$with_ust_lib" != x; then | |
9613 | ustlibs="-L$with_ust_lib -lust" | |
9614 | fi | |
9615 | ||
9616 | if test "x$with_ust" != "xno"; then | |
9617 | saved_CFLAGS="$CFLAGS" | |
9618 | CFLAGS="$CFLAGS $ustinc" | |
9619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5 | |
9620 | $as_echo_n "checking for ust... " >&6; } | |
9621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9622 | /* end confdefs.h. */ | |
9623 | ||
9624 | #define CONFIG_UST_GDB_INTEGRATION | |
9625 | #include <ust/ust.h> | |
9626 | ||
9627 | int | |
9628 | main () | |
9629 | { | |
9630 | ||
9631 | ; | |
9632 | return 0; | |
9633 | } | |
9634 | _ACEOF | |
9635 | if ac_fn_c_try_compile "$LINENO"; then : | |
9636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9637 | $as_echo "yes" >&6; }; | |
9638 | $as_echo "#define HAVE_UST 1" >>confdefs.h | |
9639 | ||
9640 | else | |
9641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9642 | $as_echo "no" >&6; }; ustlibs= ; ustinc= | |
9643 | fi | |
9644 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9645 | CFLAGS="$saved_CFLAGS" | |
9646 | fi | |
9647 | ||
9648 | # Flags needed for UST | |
9649 | ||
9650 | ||
9651 | ||
8f13a3ce | 9652 | |
d4596a3d PA |
9653 | # Check whether --enable-werror was given. |
9654 | if test "${enable_werror+set}" = set; then : | |
9655 | enableval=$enable_werror; case "${enableval}" in | |
9656 | yes | y) ERROR_ON_WARNING="yes" ;; | |
9657 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 9658 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
d4596a3d PA |
9659 | esac |
9660 | fi | |
9661 | ||
9662 | ||
9a084706 | 9663 | # Enable -Werror by default when using gcc. Turn it off for releases. |
8f13a3ce | 9664 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
d4596a3d PA |
9665 | ERROR_ON_WARNING=yes |
9666 | fi | |
9667 | ||
9668 | WERROR_CFLAGS="" | |
9669 | if test "${ERROR_ON_WARNING}" = yes ; then | |
9670 | WERROR_CFLAGS="-Werror" | |
9671 | fi | |
9672 | ||
cf6de44d | 9673 | # The options we'll try to enable. |
aac331e4 | 9674 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 9675 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
8f13a3ce | 9676 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 9677 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 9678 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
458412c3 | 9679 | -Wno-mismatched-tags \ |
632e107b | 9680 | -Wno-error=deprecated-register \ |
85e26832 | 9681 | -Wsuggest-override \ |
1a34f210 | 9682 | -Wimplicit-fallthrough=3 \ |
96643e35 | 9683 | -Wduplicated-cond \ |
33a6bc35 TT |
9684 | -Wshadow=local \ |
9685 | -Wdeprecated-copy \ | |
9686 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 9687 | -Wredundant-move \ |
8ddd8e0e | 9688 | -Wmissing-declarations \ |
a0761e34 | 9689 | -Wmissing-prototypes \ |
898e7f60 SM |
9690 | -Wstrict-null-sentinel \ |
9691 | " | |
8f13a3ce | 9692 | |
8f13a3ce | 9693 | case "${host}" in |
5bfda255 YQ |
9694 | *-*-mingw32*) |
9695 | # Enable -Wno-format by default when using gcc on mingw since many | |
9696 | # GCC versions complain about %I64. | |
9697 | build_warnings="$build_warnings -Wno-format" ;; | |
9698 | *-*-solaris*) | |
9699 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
9700 | # doesn't understand. | |
9701 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
9702 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
9703 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
9704 | *) |
9705 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
9706 | # but there's a special case for this below. | |
9707 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
8f13a3ce MF |
9708 | esac |
9709 | ||
9710 | # Check whether --enable-build-warnings was given. | |
9711 | if test "${enable_build_warnings+set}" = set; then : | |
9712 | enableval=$enable_build_warnings; case "${enableval}" in | |
9713 | yes) ;; | |
9714 | no) build_warnings="-w";; | |
9715 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9716 | build_warnings="${build_warnings} ${t}";; | |
9717 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9718 | build_warnings="${t} ${build_warnings}";; | |
9719 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9720 | esac | |
9721 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9722 | echo "Setting compiler warning flags = $build_warnings" 6>&1 | |
9723 | fi | |
9724 | fi | |
9725 | # Check whether --enable-gdb-build-warnings was given. | |
9726 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
9727 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
9728 | yes) ;; | |
9729 | no) build_warnings="-w";; | |
9730 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9731 | build_warnings="${build_warnings} ${t}";; | |
9732 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9733 | build_warnings="${t} ${build_warnings}";; | |
9734 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9735 | esac | |
9736 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9737 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9738 | fi | |
3bc3d82a PA |
9739 | fi |
9740 | ||
9741 | # The set of warnings supported by a C++ compiler is not the same as | |
9742 | # of the C compiler. | |
cf6de44d | 9743 | ac_ext=cpp |
3bc3d82a PA |
9744 | ac_cpp='$CXXCPP $CPPFLAGS' |
9745 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9746 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9747 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
9748 | ||
3bc3d82a | 9749 | |
d4596a3d | 9750 | WARN_CFLAGS="" |
8f13a3ce | 9751 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
d4596a3d PA |
9752 | then |
9753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 | |
9754 | $as_echo_n "checking compiler warning flags... " >&6; } | |
9755 | # Separate out the -Werror flag as some files just cannot be | |
9756 | # compiled with it enabled. | |
9757 | for w in ${build_warnings}; do | |
7544db95 PA |
9758 | # GCC does not complain about -Wno-unknown-warning. Invert |
9759 | # and test -Wunknown-warning instead. | |
9760 | case $w in | |
9761 | -Wno-*) | |
9762 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
9763 | -Wformat-nonliteral) |
9764 | # gcc requires -Wformat before -Wformat-nonliteral | |
9765 | # will work, so stick them together. | |
9766 | w="-Wformat $w" | |
9767 | wtest="$w" | |
9768 | ;; | |
7544db95 PA |
9769 | *) |
9770 | wtest=$w ;; | |
9771 | esac | |
9772 | ||
d4596a3d PA |
9773 | case $w in |
9774 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
9775 | *) |
9776 | # Check whether GCC accepts it. | |
d4596a3d | 9777 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 9778 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 9779 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 9780 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
9781 | if test "x$w" = "x-Wunused-variable"; then |
9782 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
9783 | # fixed in GCC 4.9. This test is derived from the gdb | |
9784 | # source code that triggered this bug in GCC. | |
9785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9786 | /* end confdefs.h. */ | |
9787 | struct scoped_restore_base {}; | |
9788 | struct scoped_restore_tmpl : public scoped_restore_base { | |
9789 | ~scoped_restore_tmpl() {} | |
9790 | }; | |
9791 | int | |
9792 | main () | |
9793 | { | |
9794 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
9795 | ; | |
9796 | return 0; | |
9797 | } | |
9798 | _ACEOF | |
9799 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
9800 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9801 | fi | |
9802 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9803 | else | |
9804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d4596a3d PA |
9805 | /* end confdefs.h. */ |
9806 | ||
9807 | int | |
9808 | main () | |
9809 | { | |
9810 | ||
9811 | ; | |
9812 | return 0; | |
9813 | } | |
9814 | _ACEOF | |
3bc3d82a | 9815 | if ac_fn_cxx_try_compile "$LINENO"; then : |
d4596a3d PA |
9816 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
9817 | fi | |
9818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a0de763e | 9819 | fi |
d4596a3d | 9820 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 9821 | CXXFLAGS="$saved_CXXFLAGS" |
d4596a3d PA |
9822 | esac |
9823 | done | |
9824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 | |
9825 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
9826 | fi | |
9827 | ||
9828 | ||
9829 | ||
cf6de44d | 9830 | ac_ext=c |
3bc3d82a PA |
9831 | ac_cpp='$CPP $CPPFLAGS' |
9832 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9833 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9834 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
9835 | ||
3bc3d82a | 9836 | |
8f13a3ce | 9837 | |
10e86dd7 DE |
9838 | old_LIBS="$LIBS" |
9839 | LIBS="$LIBS -ldl" | |
9840 | for ac_func in dladdr | |
9841 | do : | |
9842 | ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr" | |
d0ac1c44 | 9843 | if test "x$ac_cv_func_dladdr" = xyes; then : |
10e86dd7 DE |
9844 | cat >>confdefs.h <<_ACEOF |
9845 | #define HAVE_DLADDR 1 | |
9846 | _ACEOF | |
9847 | ||
9848 | fi | |
9849 | done | |
9850 | ||
9851 | LIBS="$old_LIBS" | |
9852 | ||
07697489 PA |
9853 | |
9854 | # Check for presence and size of long long. | |
9855 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
d0ac1c44 | 9856 | if test "x$ac_cv_type_long_long" = xyes; then : |
07697489 PA |
9857 | |
9858 | cat >>confdefs.h <<_ACEOF | |
9859 | #define HAVE_LONG_LONG 1 | |
9860 | _ACEOF | |
9861 | ||
9862 | # The cast to long int works around a bug in the HP C Compiler | |
9863 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9864 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9865 | # This bug is HP SR number 8606223364. | |
9866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
9867 | $as_echo_n "checking size of long long... " >&6; } | |
d0ac1c44 | 9868 | if ${ac_cv_sizeof_long_long+:} false; then : |
07697489 PA |
9869 | $as_echo_n "(cached) " >&6 |
9870 | else | |
9871 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
9872 | ||
9873 | else | |
9874 | if test "$ac_cv_type_long_long" = yes; then | |
9875 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9876 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9877 | as_fn_error 77 "cannot compute sizeof (long long) |
9878 | See \`config.log' for more details" "$LINENO" 5; } | |
07697489 PA |
9879 | else |
9880 | ac_cv_sizeof_long_long=0 | |
9881 | fi | |
9882 | fi | |
9883 | ||
9884 | fi | |
9885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
9886 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
9887 | ||
9888 | ||
9889 | ||
9890 | cat >>confdefs.h <<_ACEOF | |
9891 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
9892 | _ACEOF | |
9893 | ||
9894 | ||
9895 | fi | |
9896 | ||
9897 | ||
d0ac1c44 SM |
9898 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
9899 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
9900 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
07697489 PA |
9901 | ac_have_decl=1 |
9902 | else | |
9903 | ac_have_decl=0 | |
9904 | fi | |
9905 | ||
9906 | cat >>confdefs.h <<_ACEOF | |
9907 | #define HAVE_DECL_BASENAME $ac_have_decl | |
9908 | _ACEOF | |
9909 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
d0ac1c44 | 9910 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
07697489 PA |
9911 | ac_have_decl=1 |
9912 | else | |
9913 | ac_have_decl=0 | |
9914 | fi | |
9915 | ||
9916 | cat >>confdefs.h <<_ACEOF | |
9917 | #define HAVE_DECL_FFS $ac_have_decl | |
9918 | _ACEOF | |
9919 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
d0ac1c44 | 9920 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
07697489 PA |
9921 | ac_have_decl=1 |
9922 | else | |
9923 | ac_have_decl=0 | |
9924 | fi | |
9925 | ||
9926 | cat >>confdefs.h <<_ACEOF | |
9927 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
9928 | _ACEOF | |
9929 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
d0ac1c44 | 9930 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
07697489 PA |
9931 | ac_have_decl=1 |
9932 | else | |
9933 | ac_have_decl=0 | |
9934 | fi | |
9935 | ||
9936 | cat >>confdefs.h <<_ACEOF | |
9937 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
9938 | _ACEOF | |
9939 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
d0ac1c44 | 9940 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
07697489 PA |
9941 | ac_have_decl=1 |
9942 | else | |
9943 | ac_have_decl=0 | |
9944 | fi | |
9945 | ||
9946 | cat >>confdefs.h <<_ACEOF | |
9947 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9948 | _ACEOF | |
9949 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 9950 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
07697489 PA |
9951 | ac_have_decl=1 |
9952 | else | |
9953 | ac_have_decl=0 | |
9954 | fi | |
9955 | ||
9956 | cat >>confdefs.h <<_ACEOF | |
9957 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
9958 | _ACEOF | |
9959 | ||
9960 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
d0ac1c44 | 9961 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
07697489 PA |
9962 | ac_have_decl=1 |
9963 | else | |
9964 | ac_have_decl=0 | |
9965 | fi | |
9966 | ||
9967 | cat >>confdefs.h <<_ACEOF | |
9968 | #define HAVE_DECL_STRTOL $ac_have_decl | |
9969 | _ACEOF | |
9970 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
d0ac1c44 | 9971 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
07697489 PA |
9972 | ac_have_decl=1 |
9973 | else | |
9974 | ac_have_decl=0 | |
9975 | fi | |
9976 | ||
9977 | cat >>confdefs.h <<_ACEOF | |
9978 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
9979 | _ACEOF | |
9980 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
d0ac1c44 | 9981 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
07697489 PA |
9982 | ac_have_decl=1 |
9983 | else | |
9984 | ac_have_decl=0 | |
9985 | fi | |
9986 | ||
9987 | cat >>confdefs.h <<_ACEOF | |
9988 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
9989 | _ACEOF | |
9990 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
d0ac1c44 | 9991 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
07697489 PA |
9992 | ac_have_decl=1 |
9993 | else | |
9994 | ac_have_decl=0 | |
9995 | fi | |
9996 | ||
9997 | cat >>confdefs.h <<_ACEOF | |
9998 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
9999 | _ACEOF | |
10000 | ||
10001 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
d0ac1c44 | 10002 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
07697489 PA |
10003 | ac_have_decl=1 |
10004 | else | |
10005 | ac_have_decl=0 | |
10006 | fi | |
10007 | ||
10008 | cat >>confdefs.h <<_ACEOF | |
10009 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
10010 | _ACEOF | |
10011 | ||
10012 | ||
10013 | ||
81ecdfbb | 10014 | ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default" |
d0ac1c44 | 10015 | if test "x$ac_cv_have_decl_perror" = xyes; then : |
81ecdfbb RW |
10016 | ac_have_decl=1 |
10017 | else | |
10018 | ac_have_decl=0 | |
f450004a | 10019 | fi |
81ecdfbb RW |
10020 | |
10021 | cat >>confdefs.h <<_ACEOF | |
10022 | #define HAVE_DECL_PERROR $ac_have_decl | |
10023 | _ACEOF | |
bb0116a4 | 10024 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
d0ac1c44 | 10025 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
bb0116a4 JB |
10026 | ac_have_decl=1 |
10027 | else | |
10028 | ac_have_decl=0 | |
10029 | fi | |
10030 | ||
10031 | cat >>confdefs.h <<_ACEOF | |
10032 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10033 | _ACEOF | |
10034 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 10035 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
bb0116a4 JB |
10036 | ac_have_decl=1 |
10037 | else | |
10038 | ac_have_decl=0 | |
10039 | fi | |
10040 | ||
10041 | cat >>confdefs.h <<_ACEOF | |
10042 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10043 | _ACEOF | |
81ecdfbb RW |
10044 | |
10045 | ||
10046 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
10047 | #include <sys/socket.h> | |
10048 | ||
10049 | " | |
d0ac1c44 | 10050 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
f450004a | 10051 | |
ccbd4912 | 10052 | cat >>confdefs.h <<_ACEOF |
f450004a DJ |
10053 | #define HAVE_SOCKLEN_T 1 |
10054 | _ACEOF | |
10055 | ||
f450004a | 10056 | |
ccbd4912 | 10057 | fi |
f450004a | 10058 | |
fb1e4ffc | 10059 | |
64da5dd5 JB |
10060 | case "${target}" in |
10061 | *-android*) | |
10062 | # Starting with NDK version 9, <elf.h> actually includes definitions | |
10063 | # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes | |
10064 | # <sys/exec_elf.h> which defines some of the ELF types incorrectly, | |
10065 | # leading to conflicts with the defintions from <linux/elf.h>. | |
10066 | # This makes it impossible for us to include both <elf.h> and | |
10067 | # <linux/elf.h>, which means that, in practice, we do not have | |
10068 | # access to Elf32_auxv_t and Elf64_auxv_t on this platform. | |
10069 | # Therefore, do not try to auto-detect availability, as it would | |
10070 | # get it wrong on this platform. | |
10071 | ;; | |
10072 | *) | |
10073 | ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> | |
8365dcf5 TJB |
10074 | |
10075 | " | |
d0ac1c44 | 10076 | if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then : |
8365dcf5 TJB |
10077 | |
10078 | cat >>confdefs.h <<_ACEOF | |
10079 | #define HAVE_ELF32_AUXV_T 1 | |
10080 | _ACEOF | |
10081 | ||
10082 | ||
10083 | fi | |
10084 | ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h> | |
10085 | ||
10086 | " | |
d0ac1c44 | 10087 | if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then : |
8365dcf5 TJB |
10088 | |
10089 | cat >>confdefs.h <<_ACEOF | |
10090 | #define HAVE_ELF64_AUXV_T 1 | |
10091 | _ACEOF | |
10092 | ||
10093 | ||
10094 | fi | |
10095 | ||
64da5dd5 | 10096 | esac |
8365dcf5 | 10097 | |
c16158bc JM |
10098 | |
10099 | ||
81ecdfbb RW |
10100 | # Check whether --with-pkgversion was given. |
10101 | if test "${with_pkgversion+set}" = set; then : | |
10102 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 10103 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
10104 | no) PKGVERSION= ;; |
10105 | *) PKGVERSION="($withval) " ;; | |
10106 | esac | |
10107 | else | |
10108 | PKGVERSION="(GDB) " | |
10109 | ||
81ecdfbb RW |
10110 | fi |
10111 | ||
c16158bc JM |
10112 | |
10113 | ||
10114 | ||
10115 | ||
81ecdfbb RW |
10116 | # Check whether --with-bugurl was given. |
10117 | if test "${with_bugurl+set}" = set; then : | |
10118 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 10119 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
10120 | no) BUGURL= |
10121 | ;; | |
10122 | *) BUGURL="$withval" | |
10123 | ;; | |
10124 | esac | |
10125 | else | |
10126 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
10127 | ||
81ecdfbb RW |
10128 | fi |
10129 | ||
c16158bc JM |
10130 | case ${BUGURL} in |
10131 | "") | |
10132 | REPORT_BUGS_TO= | |
10133 | REPORT_BUGS_TEXI= | |
10134 | ;; | |
10135 | *) | |
10136 | REPORT_BUGS_TO="<$BUGURL>" | |
10137 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
10138 | ;; | |
10139 | esac; | |
10140 | ||
10141 | ||
10142 | ||
10143 | ||
10144 | cat >>confdefs.h <<_ACEOF | |
10145 | #define PKGVERSION "$PKGVERSION" | |
10146 | _ACEOF | |
10147 | ||
10148 | ||
10149 | cat >>confdefs.h <<_ACEOF | |
10150 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
10151 | _ACEOF | |
10152 | ||
10153 | ||
8838b45e NS |
10154 | # Check for various supplementary target information (beyond the |
10155 | # triplet) which might affect the choices in configure.srv. | |
10156 | case "${target}" in | |
10157 | i[34567]86-*-linux*) | |
10158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5 | |
10159 | $as_echo_n "checking if building for x86-64... " >&6; } | |
d0ac1c44 | 10160 | if ${gdb_cv_i386_is_x86_64+:} false; then : |
8838b45e NS |
10161 | $as_echo_n "(cached) " >&6 |
10162 | else | |
10163 | save_CPPFLAGS="$CPPFLAGS" | |
10164 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10166 | /* end confdefs.h. */ | |
10167 | ||
10168 | #if __x86_64__ | |
10169 | got it | |
10170 | #endif | |
10171 | ||
10172 | _ACEOF | |
10173 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10174 | $EGREP "got it" >/dev/null 2>&1; then : | |
10175 | gdb_cv_i386_is_x86_64=yes | |
10176 | else | |
10177 | gdb_cv_i386_is_x86_64=no | |
10178 | fi | |
10179 | rm -f conftest* | |
10180 | ||
10181 | CPPFLAGS="$save_CPPFLAGS" | |
10182 | fi | |
10183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5 | |
10184 | $as_echo "$gdb_cv_i386_is_x86_64" >&6; } | |
10185 | ;; | |
201506da PA |
10186 | |
10187 | x86_64-*-linux*) | |
10188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5 | |
10189 | $as_echo_n "checking if building for x32... " >&6; } | |
d0ac1c44 | 10190 | if ${gdb_cv_x86_is_x32+:} false; then : |
201506da PA |
10191 | $as_echo_n "(cached) " >&6 |
10192 | else | |
10193 | save_CPPFLAGS="$CPPFLAGS" | |
10194 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10196 | /* end confdefs.h. */ | |
10197 | ||
10198 | #if __x86_64__ && __ILP32__ | |
10199 | got it | |
10200 | #endif | |
10201 | ||
10202 | _ACEOF | |
10203 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10204 | $EGREP "got it" >/dev/null 2>&1; then : | |
10205 | gdb_cv_x86_is_x32=yes | |
10206 | else | |
10207 | gdb_cv_x86_is_x32=no | |
10208 | fi | |
10209 | rm -f conftest* | |
10210 | ||
10211 | CPPFLAGS="$save_CPPFLAGS" | |
10212 | fi | |
10213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5 | |
10214 | $as_echo "$gdb_cv_x86_is_x32" >&6; } | |
10215 | ;; | |
10216 | ||
9ac544ce MK |
10217 | m68k-*-*) |
10218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5 | |
10219 | $as_echo_n "checking if building for Coldfire... " >&6; } | |
d0ac1c44 | 10220 | if ${gdb_cv_m68k_is_coldfire+:} false; then : |
9ac544ce MK |
10221 | $as_echo_n "(cached) " >&6 |
10222 | else | |
10223 | save_CPPFLAGS="$CPPFLAGS" | |
10224 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10226 | /* end confdefs.h. */ | |
10227 | ||
10228 | #ifdef __mcoldfire__ | |
10229 | got it | |
10230 | #endif | |
10231 | ||
10232 | _ACEOF | |
10233 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10234 | $EGREP "got it" >/dev/null 2>&1; then : | |
10235 | gdb_cv_m68k_is_coldfire=yes | |
10236 | else | |
10237 | gdb_cv_m68k_is_coldfire=no | |
10238 | fi | |
10239 | rm -f conftest* | |
10240 | ||
10241 | CPPFLAGS="$save_CPPFLAGS" | |
10242 | fi | |
10243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5 | |
10244 | $as_echo "$gdb_cv_m68k_is_coldfire" >&6; } | |
10245 | ;; | |
8838b45e NS |
10246 | esac |
10247 | ||
7ea81414 | 10248 | . ${srcdir}/configure.srv |
d6e9fb05 | 10249 | |
68070c10 PA |
10250 | if test "${srv_mingwce}" = "yes"; then |
10251 | LIBS="$LIBS -lws2" | |
10252 | elif test "${srv_mingw}" = "yes"; then | |
b2ceabe8 TT |
10253 | # WIN32APILIBS is set by GDB_AC_COMMON. |
10254 | LIBS="$LIBS $WIN32APILIBS" | |
ac8c974e AR |
10255 | elif test "${srv_qnx}" = "yes"; then |
10256 | LIBS="$LIBS -lsocket" | |
8ed54b31 JB |
10257 | elif test "${srv_lynxos}" = "yes"; then |
10258 | LIBS="$LIBS -lnetinet" | |
68070c10 PA |
10259 | fi |
10260 | ||
58caa3dc | 10261 | if test "${srv_linux_usrregs}" = "yes"; then |
f450004a | 10262 | |
81ecdfbb | 10263 | $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h |
58caa3dc DJ |
10264 | |
10265 | fi | |
10266 | ||
10267 | if test "${srv_linux_regsets}" = "yes"; then | |
e9d25b98 | 10268 | |
81ecdfbb | 10269 | $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h |
e9d25b98 DJ |
10270 | |
10271 | ||
81ecdfbb RW |
10272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10273 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
d0ac1c44 | 10274 | if ${gdbsrv_cv_have_ptrace_getregs+:} false; then : |
81ecdfbb | 10275 | $as_echo_n "(cached) " >&6 |
bec39cab | 10276 | else |
81ecdfbb | 10277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10278 | /* end confdefs.h. */ |
58caa3dc | 10279 | #include <sys/ptrace.h> |
bec39cab AC |
10280 | int |
10281 | main () | |
10282 | { | |
58caa3dc | 10283 | PTRACE_GETREGS; |
bec39cab AC |
10284 | ; |
10285 | return 0; | |
10286 | } | |
10287 | _ACEOF | |
81ecdfbb | 10288 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10289 | gdbsrv_cv_have_ptrace_getregs=yes |
10290 | else | |
81ecdfbb | 10291 | gdbsrv_cv_have_ptrace_getregs=no |
58caa3dc | 10292 | fi |
81ecdfbb | 10293 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10294 | fi |
10295 | ||
81ecdfbb RW |
10296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5 |
10297 | $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; } | |
58caa3dc | 10298 | if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then |
f450004a | 10299 | |
81ecdfbb | 10300 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
58caa3dc DJ |
10301 | |
10302 | fi | |
10303 | ||
81ecdfbb RW |
10304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10305 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
d0ac1c44 | 10306 | if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then : |
81ecdfbb | 10307 | $as_echo_n "(cached) " >&6 |
58caa3dc | 10308 | else |
81ecdfbb | 10309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10310 | /* end confdefs.h. */ |
58caa3dc | 10311 | #include <sys/ptrace.h> |
bec39cab AC |
10312 | int |
10313 | main () | |
10314 | { | |
58caa3dc | 10315 | PTRACE_GETFPXREGS; |
bec39cab AC |
10316 | ; |
10317 | return 0; | |
10318 | } | |
10319 | _ACEOF | |
81ecdfbb | 10320 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10321 | gdbsrv_cv_have_ptrace_getfpxregs=yes |
10322 | else | |
81ecdfbb | 10323 | gdbsrv_cv_have_ptrace_getfpxregs=no |
58caa3dc | 10324 | fi |
81ecdfbb | 10325 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10326 | fi |
10327 | ||
81ecdfbb RW |
10328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5 |
10329 | $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; } | |
58caa3dc | 10330 | if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then |
f450004a | 10331 | |
81ecdfbb | 10332 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
58caa3dc DJ |
10333 | |
10334 | fi | |
10335 | fi | |
10336 | ||
9accd112 MM |
10337 | if test "${srv_linux_btrace}" = "yes"; then |
10338 | ||
10339 | $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h | |
10340 | ||
10341 | fi | |
10342 | ||
18f5fd81 TJB |
10343 | if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then |
10344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5 | |
10345 | $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10346 | if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then : |
18f5fd81 TJB |
10347 | $as_echo_n "(cached) " >&6 |
10348 | else | |
10349 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10350 | /* end confdefs.h. */ | |
10351 | ||
10352 | #include <thread_db.h> | |
10353 | int | |
10354 | main () | |
10355 | { | |
10356 | lwpid_t avar | |
10357 | ; | |
10358 | return 0; | |
10359 | } | |
10360 | _ACEOF | |
10361 | if ac_fn_c_try_compile "$LINENO"; then : | |
10362 | gdbserver_cv_have_thread_db_type_lwpid_t=yes | |
10363 | else | |
10364 | gdbserver_cv_have_thread_db_type_lwpid_t=no | |
10365 | ||
10366 | fi | |
10367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10368 | fi | |
10369 | ||
10370 | if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then | |
10371 | ||
10372 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h | |
10373 | ||
10374 | fi | |
10375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5 | |
10376 | $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; } | |
10377 | ||
10378 | fi | |
10379 | ||
10380 | if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then | |
10381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5 | |
10382 | $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10383 | if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then : |
18f5fd81 TJB |
10384 | $as_echo_n "(cached) " >&6 |
10385 | else | |
10386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10387 | /* end confdefs.h. */ | |
10388 | ||
10389 | #include <thread_db.h> | |
10390 | int | |
10391 | main () | |
10392 | { | |
10393 | psaddr_t avar | |
10394 | ; | |
10395 | return 0; | |
10396 | } | |
10397 | _ACEOF | |
10398 | if ac_fn_c_try_compile "$LINENO"; then : | |
10399 | gdbserver_cv_have_thread_db_type_psaddr_t=yes | |
10400 | else | |
10401 | gdbserver_cv_have_thread_db_type_psaddr_t=no | |
10402 | ||
10403 | fi | |
10404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10405 | fi | |
10406 | ||
10407 | if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then | |
10408 | ||
10409 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h | |
10410 | ||
10411 | fi | |
10412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5 | |
10413 | $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; } | |
10414 | ||
10415 | fi | |
10416 | ||
193f13e6 MK |
10417 | old_LIBS="$LIBS" |
10418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
10419 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
d0ac1c44 | 10420 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
193f13e6 MK |
10421 | $as_echo_n "(cached) " >&6 |
10422 | else | |
10423 | ac_check_lib_save_LIBS=$LIBS | |
10424 | LIBS="-ldl $LIBS" | |
10425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10426 | /* end confdefs.h. */ | |
10427 | ||
10428 | /* Override any GCC internal prototype to avoid an error. | |
10429 | Use char because int might match the return type of a GCC | |
10430 | builtin and then its argument prototype would still apply. */ | |
10431 | #ifdef __cplusplus | |
10432 | extern "C" | |
10433 | #endif | |
10434 | char dlopen (); | |
10435 | int | |
10436 | main () | |
10437 | { | |
10438 | return dlopen (); | |
10439 | ; | |
10440 | return 0; | |
10441 | } | |
10442 | _ACEOF | |
10443 | if ac_fn_c_try_link "$LINENO"; then : | |
10444 | ac_cv_lib_dl_dlopen=yes | |
10445 | else | |
10446 | ac_cv_lib_dl_dlopen=no | |
10447 | fi | |
10448 | rm -f core conftest.err conftest.$ac_objext \ | |
10449 | conftest$ac_exeext conftest.$ac_ext | |
10450 | LIBS=$ac_check_lib_save_LIBS | |
10451 | fi | |
10452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 | |
10453 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
d0ac1c44 | 10454 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
193f13e6 MK |
10455 | cat >>confdefs.h <<_ACEOF |
10456 | #define HAVE_LIBDL 1 | |
10457 | _ACEOF | |
10458 | ||
10459 | LIBS="-ldl $LIBS" | |
10460 | ||
10461 | fi | |
10462 | ||
10463 | LIBS="$old_LIBS" | |
10464 | ||
0d62e5e8 DJ |
10465 | srv_thread_depfiles= |
10466 | srv_libs= | |
0d62e5e8 DJ |
10467 | |
10468 | if test "$srv_linux_thread_db" = "yes"; then | |
193f13e6 MK |
10469 | if test "$ac_cv_lib_dl_dlopen" = "yes"; then |
10470 | srv_libs="-ldl" | |
f6528abd JK |
10471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
10472 | $as_echo_n "checking for the dynamic export flag... " >&6; } | |
193f13e6 | 10473 | old_LDFLAGS="$LDFLAGS" |
f6528abd JK |
10474 | # Older GNU ld supports --export-dynamic but --dynamic-list may not be |
10475 | # supported there. | |
10476 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
10477 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
193f13e6 | 10478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
10479 | /* end confdefs.h. */ |
10480 | ||
10481 | int | |
10482 | main () | |
10483 | { | |
10484 | ||
10485 | ; | |
10486 | return 0; | |
10487 | } | |
10488 | _ACEOF | |
81ecdfbb | 10489 | if ac_fn_c_try_link "$LINENO"; then : |
f6528abd JK |
10490 | found="-Wl,--dynamic-list" |
10491 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6de3c42 | 10492 | else |
f6528abd JK |
10493 | RDYNAMIC="-rdynamic" |
10494 | LDFLAGS="$old_LDFLAGS $RDYNAMIC" | |
10495 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10496 | /* end confdefs.h. */ | |
10497 | ||
10498 | int | |
10499 | main () | |
10500 | { | |
10501 | ||
10502 | ; | |
10503 | return 0; | |
10504 | } | |
10505 | _ACEOF | |
10506 | if ac_fn_c_try_link "$LINENO"; then : | |
10507 | found="-rdynamic" | |
10508 | else | |
10509 | found="no" | |
10510 | RDYNAMIC="" | |
770d76d7 PA |
10511 | fi |
10512 | rm -f core conftest.err conftest.$ac_objext \ | |
10513 | conftest$ac_exeext conftest.$ac_ext | |
10514 | fi | |
10515 | rm -f core conftest.err conftest.$ac_objext \ | |
10516 | conftest$ac_exeext conftest.$ac_ext | |
10517 | ||
10518 | LDFLAGS="$old_LDFLAGS" | |
10519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 | |
10520 | $as_echo "$found" >&6; } | |
10521 | else | |
10522 | srv_libs="-lthread_db" | |
10523 | fi | |
55a8c076 | 10524 | |
770d76d7 | 10525 | srv_thread_depfiles="thread-db.o proc-service.o" |
7d4e5717 PA |
10526 | |
10527 | $as_echo "#define USE_THREAD_DB 1" >>confdefs.h | |
10528 | ||
770d76d7 PA |
10529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5 |
10530 | $as_echo_n "checking for TD_VERSION... " >&6; } | |
d0ac1c44 | 10531 | if ${gdbsrv_cv_have_td_version+:} false; then : |
770d76d7 PA |
10532 | $as_echo_n "(cached) " >&6 |
10533 | else | |
10534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10535 | /* end confdefs.h. */ | |
10536 | #include <thread_db.h> | |
55a8c076 YQ |
10537 | int |
10538 | main () | |
10539 | { | |
770d76d7 | 10540 | TD_VERSION; |
c9a1864a YQ |
10541 | ; |
10542 | return 0; | |
10543 | } | |
10544 | _ACEOF | |
55a8c076 | 10545 | if ac_fn_c_try_compile "$LINENO"; then : |
770d76d7 | 10546 | gdbsrv_cv_have_td_version=yes |
c9a1864a | 10547 | else |
770d76d7 PA |
10548 | gdbsrv_cv_have_td_version=no |
10549 | fi | |
10550 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10551 | fi | |
10552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5 | |
10553 | $as_echo "$gdbsrv_cv_have_td_version" >&6; } | |
0ad6b8ee | 10554 | if test "$gdbsrv_cv_have_td_version" = yes; then |
c9a1864a | 10555 | |
770d76d7 | 10556 | $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h |
55a8c076 | 10557 | |
770d76d7 PA |
10558 | fi |
10559 | fi | |
c9a1864a YQ |
10560 | |
10561 | ||
770d76d7 PA |
10562 | # Check whether --with-libthread-db was given. |
10563 | if test "${with_libthread_db+set}" = set; then : | |
10564 | withval=$with_libthread_db; srv_libthread_db_path="${withval}" | |
10565 | srv_libs="$srv_libthread_db_path" | |
c9a1864a | 10566 | |
770d76d7 | 10567 | fi |
c9a1864a YQ |
10568 | |
10569 | ||
770d76d7 | 10570 | if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then |
c9a1864a | 10571 | |
770d76d7 | 10572 | $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h |
c9a1864a | 10573 | |
55a8c076 | 10574 | fi |
c9a1864a | 10575 | |
770d76d7 PA |
10576 | if test "$srv_xmlfiles" != ""; then |
10577 | srv_xmlbuiltin="xml-builtin.o" | |
c9a1864a | 10578 | |
770d76d7 | 10579 | $as_echo "#define USE_XML 1" >>confdefs.h |
c9a1864a | 10580 | |
c9a1864a | 10581 | |
770d76d7 PA |
10582 | tmp_xmlfiles=$srv_xmlfiles |
10583 | srv_xmlfiles="" | |
10584 | for f in $tmp_xmlfiles; do | |
10585 | srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f" | |
10586 | done | |
c9a1864a YQ |
10587 | fi |
10588 | ||
4635ff97 | 10589 | GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles" |
770d76d7 | 10590 | GDBSERVER_LIBS="$srv_libs" |
c9a1864a | 10591 | |
770d76d7 PA |
10592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5 |
10593 | $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; } | |
d0ac1c44 | 10594 | if ${gdbsrv_cv_have_sync_builtins+:} false; then : |
770d76d7 PA |
10595 | $as_echo_n "(cached) " >&6 |
10596 | else | |
c9a1864a | 10597 | |
770d76d7 PA |
10598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10599 | /* end confdefs.h. */ | |
c9a1864a | 10600 | |
770d76d7 PA |
10601 | int |
10602 | main () | |
10603 | { | |
10604 | int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1); | |
10605 | ; | |
10606 | return 0; | |
10607 | } | |
10608 | _ACEOF | |
10609 | if ac_fn_c_try_link "$LINENO"; then : | |
10610 | gdbsrv_cv_have_sync_builtins=yes | |
10611 | else | |
c971b7fa | 10612 | gdbsrv_cv_have_sync_builtins=no |
c9a1864a | 10613 | fi |
c971b7fa PA |
10614 | rm -f core conftest.err conftest.$ac_objext \ |
10615 | conftest$ac_exeext conftest.$ac_ext | |
c9a1864a | 10616 | fi |
c971b7fa PA |
10617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5 |
10618 | $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; } | |
0ad6b8ee | 10619 | if test "$gdbsrv_cv_have_sync_builtins" = yes; then |
c971b7fa PA |
10620 | |
10621 | $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h | |
10622 | ||
c9a1864a YQ |
10623 | fi |
10624 | ||
c971b7fa PA |
10625 | saved_cflags="$CFLAGS" |
10626 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
10627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10628 | /* end confdefs.h. */ | |
c9a1864a | 10629 | |
c971b7fa PA |
10630 | int |
10631 | main () | |
10632 | { | |
c9a1864a | 10633 | |
c971b7fa PA |
10634 | ; |
10635 | return 0; | |
10636 | } | |
c9a1864a | 10637 | _ACEOF |
c971b7fa PA |
10638 | if ac_fn_c_try_compile "$LINENO"; then : |
10639 | gdbsrv_cv_have_visibility_hidden=yes | |
10640 | else | |
10641 | gdbsrv_cv_have_visibility_hidden=no | |
c9a1864a | 10642 | fi |
c971b7fa PA |
10643 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10644 | CFLAGS="$saved_cflags" | |
10645 | ||
c971b7fa PA |
10646 | IPA_DEPFILES="" |
10647 | extra_libraries="" | |
c2a66c29 | 10648 | |
c971b7fa PA |
10649 | # check whether to enable the inprocess agent |
10650 | if test "$ipa_obj" != "" \ | |
10651 | -a "$gdbsrv_cv_have_sync_builtins" = yes \ | |
10652 | -a "$gdbsrv_cv_have_visibility_hidden" = yes; then | |
10653 | have_ipa=true | |
10654 | else | |
10655 | have_ipa=false | |
10656 | fi | |
fa593d66 | 10657 | |
c971b7fa PA |
10658 | # Check whether --enable-inprocess-agent was given. |
10659 | if test "${enable_inprocess_agent+set}" = set; then : | |
10660 | enableval=$enable_inprocess_agent; case "$enableval" in | |
10661 | yes) want_ipa=true ;; | |
10662 | no) want_ipa=false ;; | |
d0ac1c44 | 10663 | *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;; |
c971b7fa PA |
10664 | esac |
10665 | else | |
10666 | want_ipa=$have_ipa | |
10667 | fi | |
c2a66c29 | 10668 | |
c9a1864a | 10669 | |
c971b7fa PA |
10670 | if $want_ipa ; then |
10671 | if $have_ipa ; then | |
10672 | IPA_DEPFILES="$ipa_obj" | |
10673 | extra_libraries="$extra_libraries libinproctrace.so" | |
10674 | else | |
d0ac1c44 | 10675 | as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5 |
c971b7fa PA |
10676 | fi |
10677 | fi | |
c9a1864a | 10678 | |
c9a1864a | 10679 | |
c2a66c29 NS |
10680 | |
10681 | ||
fa593d66 PA |
10682 | |
10683 | ||
10684 | ||
0d62e5e8 | 10685 | |
1a627e7e | 10686 | GNULIB=../gnulib/import |
d6e9fb05 | 10687 | |
c9a1864a YQ |
10688 | GNULIB_STDINT_H= |
10689 | if test x"$STDINT_H" != x; then | |
c971b7fa | 10690 | GNULIB_STDINT_H=$GNULIB/$STDINT_H |
c9a1864a | 10691 | fi |
d6e9fb05 | 10692 | |
fb1e4ffc | 10693 | |
c971b7fa | 10694 | ac_config_files="$ac_config_files Makefile" |
81ecdfbb | 10695 | |
81ecdfbb | 10696 | |
bec39cab | 10697 | cat >confcache <<\_ACEOF |
d6e9fb05 JK |
10698 | # This file is a shell script that caches the results of configure |
10699 | # tests run on this system so they can be shared between configure | |
bec39cab AC |
10700 | # scripts and configure runs, see configure's option --config-cache. |
10701 | # It is not useful on other systems. If it contains results you don't | |
10702 | # want to keep, you may remove or edit it. | |
d6e9fb05 | 10703 | # |
bec39cab AC |
10704 | # config.status only pays attention to the cache file if you give it |
10705 | # the --recheck option to rerun configure. | |
d6e9fb05 | 10706 | # |
bec39cab AC |
10707 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
10708 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
10709 | # following values. | |
10710 | ||
10711 | _ACEOF | |
10712 | ||
d6e9fb05 JK |
10713 | # The following way of writing the cache mishandles newlines in values, |
10714 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 10715 | # So, we kill variables containing newlines. |
d6e9fb05 JK |
10716 | # Ultrix sh set writes to stderr and can't be redirected directly, |
10717 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
10718 | ( |
10719 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
10720 | eval ac_val=\$$ac_var | |
10721 | case $ac_val in #( | |
10722 | *${as_nl}*) | |
10723 | case $ac_var in #( | |
10724 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
10725 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
10726 | esac | |
10727 | case $ac_var in #( | |
10728 | _ | IFS | as_nl) ;; #( | |
10729 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
10730 | *) { eval $ac_var=; unset $ac_var;} ;; | |
10731 | esac ;; | |
10732 | esac | |
10733 | done | |
10734 | ||
bec39cab | 10735 | (set) 2>&1 | |
81ecdfbb RW |
10736 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
10737 | *${as_nl}ac_space=\ *) | |
10738 | # `set' does not quote correctly, so add quotes: double-quote | |
10739 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
10740 | sed -n \ |
10741 | "s/'/'\\\\''/g; | |
10742 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 10743 | ;; #( |
bec39cab AC |
10744 | *) |
10745 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 10746 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 10747 | ;; |
81ecdfbb RW |
10748 | esac | |
10749 | sort | |
10750 | ) | | |
bec39cab | 10751 | sed ' |
81ecdfbb | 10752 | /^ac_cv_env_/b end |
bec39cab | 10753 | t clear |
81ecdfbb | 10754 | :clear |
bec39cab AC |
10755 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
10756 | t end | |
81ecdfbb RW |
10757 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
10758 | :end' >>confcache | |
10759 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
10760 | if test -w "$cache_file"; then | |
d0ac1c44 | 10761 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
10762 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
10763 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
10764 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
10765 | cat confcache >"$cache_file" | |
10766 | else | |
10767 | case $cache_file in #( | |
10768 | */* | ?:*) | |
10769 | mv -f confcache "$cache_file"$$ && | |
10770 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
10771 | *) | |
10772 | mv -f confcache "$cache_file" ;; | |
10773 | esac | |
10774 | fi | |
10775 | fi | |
d6e9fb05 | 10776 | else |
81ecdfbb RW |
10777 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
10778 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
d6e9fb05 JK |
10779 | fi |
10780 | fi | |
10781 | rm -f confcache | |
10782 | ||
d6e9fb05 JK |
10783 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
10784 | # Let make expand exec_prefix. | |
10785 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10786 | ||
84563040 | 10787 | DEFS=-DHAVE_CONFIG_H |
d6e9fb05 | 10788 | |
bec39cab AC |
10789 | ac_libobjs= |
10790 | ac_ltlibobjs= | |
d0ac1c44 | 10791 | U= |
bec39cab AC |
10792 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
10793 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
10794 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
10795 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
10796 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
10797 | # will be set to the directory where LIBOBJS objects are built. | |
10798 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
10799 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
10800 | done |
10801 | LIBOBJS=$ac_libobjs | |
d6e9fb05 | 10802 | |
bec39cab AC |
10803 | LTLIBOBJS=$ac_ltlibobjs |
10804 | ||
10805 | ||
c9a1864a | 10806 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 10807 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c9a1864a YQ |
10808 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
10809 | fi | |
bec39cab | 10810 | |
d0ac1c44 | 10811 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 10812 | ac_write_fail=0 |
bec39cab AC |
10813 | ac_clean_files_save=$ac_clean_files |
10814 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
10815 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
10816 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
10817 | as_write_fail=0 | |
10818 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
10819 | #! $SHELL |
10820 | # Generated by $as_me. | |
d6e9fb05 | 10821 | # Run this file to recreate the current configuration. |
d6e9fb05 | 10822 | # Compiler output produced by configure, useful for debugging |
bec39cab AC |
10823 | # configure, is in config.log if it exists. |
10824 | ||
10825 | debug=false | |
10826 | ac_cs_recheck=false | |
10827 | ac_cs_silent=false | |
bec39cab | 10828 | |
81ecdfbb RW |
10829 | SHELL=\${CONFIG_SHELL-$SHELL} |
10830 | export SHELL | |
10831 | _ASEOF | |
10832 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
10833 | ## -------------------- ## | |
10834 | ## M4sh Initialization. ## | |
10835 | ## -------------------- ## | |
10836 | ||
10837 | # Be more Bourne compatible | |
10838 | DUALCASE=1; export DUALCASE # for MKS sh | |
10839 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
10840 | emulate sh |
10841 | NULLCMD=: | |
81ecdfbb | 10842 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
10843 | # is contrary to our usage. Disable this feature. |
10844 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
10845 | setopt NO_GLOB_SUBST |
10846 | else | |
10847 | case `(set -o) 2>/dev/null` in #( | |
10848 | *posix*) : | |
10849 | set -o posix ;; #( | |
10850 | *) : | |
10851 | ;; | |
10852 | esac | |
bec39cab | 10853 | fi |
d6e9fb05 | 10854 | |
81ecdfbb RW |
10855 | |
10856 | as_nl=' | |
10857 | ' | |
10858 | export as_nl | |
10859 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
10860 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
10861 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
10862 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
10863 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
10864 | # but without wasting forks for bash or zsh. | |
10865 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
10866 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10867 | as_echo='print -r --' | |
10868 | as_echo_n='print -rn --' | |
10869 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10870 | as_echo='printf %s\n' | |
10871 | as_echo_n='printf %s' | |
bec39cab | 10872 | else |
81ecdfbb RW |
10873 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
10874 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
10875 | as_echo_n='/usr/ucb/echo -n' | |
10876 | else | |
10877 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
10878 | as_echo_n_body='eval | |
10879 | arg=$1; | |
10880 | case $arg in #( | |
10881 | *"$as_nl"*) | |
10882 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
10883 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
10884 | esac; | |
10885 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
10886 | ' | |
10887 | export as_echo_n_body | |
10888 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
10889 | fi | |
10890 | export as_echo_body | |
10891 | as_echo='sh -c $as_echo_body as_echo' | |
10892 | fi | |
10893 | ||
10894 | # The user is always right. | |
10895 | if test "${PATH_SEPARATOR+set}" != set; then | |
10896 | PATH_SEPARATOR=: | |
10897 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
10898 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
10899 | PATH_SEPARATOR=';' | |
10900 | } | |
bec39cab AC |
10901 | fi |
10902 | ||
10903 | ||
81ecdfbb RW |
10904 | # IFS |
10905 | # We need space, tab and new line, in precisely that order. Quoting is | |
10906 | # there to prevent editors from complaining about space-tab. | |
10907 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
10908 | # splitting by setting IFS to empty value.) | |
10909 | IFS=" "" $as_nl" | |
10910 | ||
10911 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 10912 | as_myself= |
81ecdfbb RW |
10913 | case $0 in #(( |
10914 | *[\\/]* ) as_myself=$0 ;; | |
10915 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10916 | for as_dir in $PATH | |
10917 | do | |
10918 | IFS=$as_save_IFS | |
10919 | test -z "$as_dir" && as_dir=. | |
10920 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
10921 | done | |
10922 | IFS=$as_save_IFS | |
10923 | ||
10924 | ;; | |
10925 | esac | |
10926 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
10927 | # in which case we are not to be found in the path. | |
10928 | if test "x$as_myself" = x; then | |
10929 | as_myself=$0 | |
10930 | fi | |
10931 | if test ! -f "$as_myself"; then | |
10932 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
10933 | exit 1 | |
10934 | fi | |
10935 | ||
10936 | # Unset variables that we do not need and which cause bugs (e.g. in | |
10937 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
10938 | # suppresses any "Segmentation fault" message there. '((' could | |
10939 | # trigger a bug in pdksh 5.2.14. | |
10940 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
10941 | do eval test x\${$as_var+set} = xset \ | |
10942 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
10943 | done | |
bec39cab AC |
10944 | PS1='$ ' |
10945 | PS2='> ' | |
10946 | PS4='+ ' | |
10947 | ||
10948 | # NLS nuisances. | |
81ecdfbb RW |
10949 | LC_ALL=C |
10950 | export LC_ALL | |
10951 | LANGUAGE=C | |
10952 | export LANGUAGE | |
10953 | ||
10954 | # CDPATH. | |
10955 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
10956 | ||
10957 | ||
d0ac1c44 SM |
10958 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
10959 | # ---------------------------------------- | |
81ecdfbb RW |
10960 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
10961 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 10962 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
10963 | as_fn_error () |
10964 | { | |
d0ac1c44 SM |
10965 | as_status=$1; test $as_status -eq 0 && as_status=1 |
10966 | if test "$4"; then | |
10967 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
10968 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
bec39cab | 10969 | fi |
d0ac1c44 | 10970 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
10971 | as_fn_exit $as_status |
10972 | } # as_fn_error | |
10973 | ||
10974 | ||
10975 | # as_fn_set_status STATUS | |
10976 | # ----------------------- | |
10977 | # Set $? to STATUS, without forking. | |
10978 | as_fn_set_status () | |
10979 | { | |
10980 | return $1 | |
10981 | } # as_fn_set_status | |
10982 | ||
10983 | # as_fn_exit STATUS | |
10984 | # ----------------- | |
10985 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
10986 | as_fn_exit () | |
10987 | { | |
10988 | set +e | |
10989 | as_fn_set_status $1 | |
10990 | exit $1 | |
10991 | } # as_fn_exit | |
10992 | ||
10993 | # as_fn_unset VAR | |
10994 | # --------------- | |
10995 | # Portably unset VAR. | |
10996 | as_fn_unset () | |
10997 | { | |
10998 | { eval $1=; unset $1;} | |
10999 | } | |
11000 | as_unset=as_fn_unset | |
11001 | # as_fn_append VAR VALUE | |
11002 | # ---------------------- | |
11003 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
11004 | # advantage of any shell optimizations that allow amortized linear growth over | |
11005 | # repeated appends, instead of the typical quadratic growth present in naive | |
11006 | # implementations. | |
11007 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
11008 | eval 'as_fn_append () | |
11009 | { | |
11010 | eval $1+=\$2 | |
11011 | }' | |
11012 | else | |
11013 | as_fn_append () | |
11014 | { | |
11015 | eval $1=\$$1\$2 | |
11016 | } | |
11017 | fi # as_fn_append | |
11018 | ||
11019 | # as_fn_arith ARG... | |
11020 | # ------------------ | |
11021 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
11022 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
11023 | # must be portable across $(()) and expr. | |
11024 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
11025 | eval 'as_fn_arith () | |
11026 | { | |
11027 | as_val=$(( $* )) | |
11028 | }' | |
11029 | else | |
11030 | as_fn_arith () | |
11031 | { | |
11032 | as_val=`expr "$@" || test $? -eq 1` | |
11033 | } | |
11034 | fi # as_fn_arith | |
11035 | ||
d6e9fb05 | 11036 | |
81ecdfbb RW |
11037 | if expr a : '\(a\)' >/dev/null 2>&1 && |
11038 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
11039 | as_expr=expr |
11040 | else | |
11041 | as_expr=false | |
11042 | fi | |
d6e9fb05 | 11043 | |
81ecdfbb | 11044 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
11045 | as_basename=basename |
11046 | else | |
11047 | as_basename=false | |
11048 | fi | |
d6e9fb05 | 11049 | |
81ecdfbb RW |
11050 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
11051 | as_dirname=dirname | |
11052 | else | |
11053 | as_dirname=false | |
11054 | fi | |
d6e9fb05 | 11055 | |
81ecdfbb | 11056 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
11057 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
11058 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11059 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
11060 | $as_echo X/"$0" | | |
11061 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
11062 | s//\1/ | |
11063 | q | |
11064 | } | |
11065 | /^X\/\(\/\/\)$/{ | |
11066 | s//\1/ | |
11067 | q | |
11068 | } | |
11069 | /^X\/\(\/\).*/{ | |
11070 | s//\1/ | |
11071 | q | |
11072 | } | |
11073 | s/.*/./; q'` | |
bec39cab | 11074 | |
dae5f5cf DJ |
11075 | # Avoid depending upon Character Ranges. |
11076 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
11077 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
11078 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
11079 | as_cr_digits='0123456789' | |
11080 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
11081 | ||
81ecdfbb RW |
11082 | ECHO_C= ECHO_N= ECHO_T= |
11083 | case `echo -n x` in #((((( | |
11084 | -n*) | |
11085 | case `echo 'xy\c'` in | |
11086 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
11087 | xy) ECHO_C='\c';; | |
11088 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
11089 | ECHO_T=' ';; | |
11090 | esac;; | |
11091 | *) | |
11092 | ECHO_N='-n';; | |
bec39cab AC |
11093 | esac |
11094 | ||
81ecdfbb RW |
11095 | rm -f conf$$ conf$$.exe conf$$.file |
11096 | if test -d conf$$.dir; then | |
11097 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 11098 | else |
81ecdfbb RW |
11099 | rm -f conf$$.dir |
11100 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 11101 | fi |
81ecdfbb RW |
11102 | if (echo >conf$$.file) 2>/dev/null; then |
11103 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
dae5f5cf | 11104 | as_ln_s='ln -s' |
81ecdfbb RW |
11105 | # ... but there are two gotchas: |
11106 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
11107 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 11108 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 11109 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 11110 | as_ln_s='cp -pR' |
81ecdfbb RW |
11111 | elif ln conf$$.file conf$$ 2>/dev/null; then |
11112 | as_ln_s=ln | |
11113 | else | |
d0ac1c44 | 11114 | as_ln_s='cp -pR' |
dae5f5cf | 11115 | fi |
bec39cab | 11116 | else |
d0ac1c44 | 11117 | as_ln_s='cp -pR' |
bec39cab | 11118 | fi |
81ecdfbb RW |
11119 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
11120 | rmdir conf$$.dir 2>/dev/null | |
11121 | ||
11122 | ||
11123 | # as_fn_mkdir_p | |
11124 | # ------------- | |
11125 | # Create "$as_dir" as a directory, including parents if necessary. | |
11126 | as_fn_mkdir_p () | |
11127 | { | |
11128 | ||
11129 | case $as_dir in #( | |
11130 | -*) as_dir=./$as_dir;; | |
11131 | esac | |
11132 | test -d "$as_dir" || eval $as_mkdir_p || { | |
11133 | as_dirs= | |
11134 | while :; do | |
11135 | case $as_dir in #( | |
11136 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
11137 | *) as_qdir=$as_dir;; | |
11138 | esac | |
11139 | as_dirs="'$as_qdir' $as_dirs" | |
11140 | as_dir=`$as_dirname -- "$as_dir" || | |
11141 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11142 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
11143 | X"$as_dir" : 'X\(//\)$' \| \ | |
11144 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
11145 | $as_echo X"$as_dir" | | |
11146 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11147 | s//\1/ | |
11148 | q | |
11149 | } | |
11150 | /^X\(\/\/\)[^/].*/{ | |
11151 | s//\1/ | |
11152 | q | |
11153 | } | |
11154 | /^X\(\/\/\)$/{ | |
11155 | s//\1/ | |
11156 | q | |
11157 | } | |
11158 | /^X\(\/\).*/{ | |
11159 | s//\1/ | |
11160 | q | |
11161 | } | |
11162 | s/.*/./; q'` | |
11163 | test -d "$as_dir" && break | |
11164 | done | |
11165 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 11166 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
bec39cab | 11167 | |
81ecdfbb RW |
11168 | |
11169 | } # as_fn_mkdir_p | |
bec39cab | 11170 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 11171 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
11172 | else |
11173 | test -d ./-p && rmdir ./-p | |
11174 | as_mkdir_p=false | |
11175 | fi | |
11176 | ||
d0ac1c44 SM |
11177 | |
11178 | # as_fn_executable_p FILE | |
11179 | # ----------------------- | |
11180 | # Test if FILE is an executable regular file. | |
11181 | as_fn_executable_p () | |
11182 | { | |
11183 | test -f "$1" && test -x "$1" | |
11184 | } # as_fn_executable_p | |
11185 | as_test_x='test -x' | |
11186 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
11187 | |
11188 | # Sed expression to map a string onto a valid CPP name. | |
11189 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
11190 | ||
11191 | # Sed expression to map a string onto a valid variable name. | |
11192 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
11193 | ||
11194 | ||
bec39cab | 11195 | exec 6>&1 |
81ecdfbb RW |
11196 | ## ----------------------------------- ## |
11197 | ## Main body of $CONFIG_STATUS script. ## | |
11198 | ## ----------------------------------- ## | |
11199 | _ASEOF | |
11200 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
11201 | ||
11202 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11203 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 11204 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
11205 | # values after options handling. |
11206 | ac_log=" | |
bec39cab | 11207 | This file was extended by $as_me, which was |
d0ac1c44 | 11208 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
11209 | |
11210 | CONFIG_FILES = $CONFIG_FILES | |
11211 | CONFIG_HEADERS = $CONFIG_HEADERS | |
11212 | CONFIG_LINKS = $CONFIG_LINKS | |
11213 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
11214 | $ $0 $@ | |
11215 | ||
81ecdfbb RW |
11216 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
11217 | " | |
11218 | ||
bec39cab AC |
11219 | _ACEOF |
11220 | ||
81ecdfbb RW |
11221 | case $ac_config_files in *" |
11222 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
11223 | esac | |
bec39cab | 11224 | |
81ecdfbb RW |
11225 | case $ac_config_headers in *" |
11226 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
11227 | esac | |
dae5f5cf | 11228 | |
dae5f5cf | 11229 | |
81ecdfbb RW |
11230 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
11231 | # Files that config.status was made for. | |
11232 | config_files="$ac_config_files" | |
11233 | config_headers="$ac_config_headers" | |
11234 | config_commands="$ac_config_commands" | |
bec39cab | 11235 | |
81ecdfbb | 11236 | _ACEOF |
dae5f5cf | 11237 | |
81ecdfbb | 11238 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 11239 | ac_cs_usage="\ |
81ecdfbb RW |
11240 | \`$as_me' instantiates files and other configuration actions |
11241 | from templates according to the current configuration. Unless the files | |
11242 | and actions are specified as TAGs, all are instantiated by default. | |
bec39cab | 11243 | |
81ecdfbb | 11244 | Usage: $0 [OPTION]... [TAG]... |
bec39cab AC |
11245 | |
11246 | -h, --help print this help, then exit | |
81ecdfbb | 11247 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 11248 | --config print configuration, then exit |
81ecdfbb RW |
11249 | -q, --quiet, --silent |
11250 | do not print progress messages | |
bec39cab AC |
11251 | -d, --debug don't remove temporary files |
11252 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
11253 | --file=FILE[:TEMPLATE] |
11254 | instantiate the configuration file FILE | |
11255 | --header=FILE[:TEMPLATE] | |
11256 | instantiate the configuration header FILE | |
bec39cab AC |
11257 | |
11258 | Configuration files: | |
11259 | $config_files | |
11260 | ||
11261 | Configuration headers: | |
11262 | $config_headers | |
11263 | ||
11264 | Configuration commands: | |
11265 | $config_commands | |
11266 | ||
81ecdfbb | 11267 | Report bugs to the package provider." |
dae5f5cf | 11268 | |
81ecdfbb RW |
11269 | _ACEOF |
11270 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11271 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
11272 | ac_cs_version="\\ |
11273 | config.status | |
d0ac1c44 SM |
11274 | configured by $0, generated by GNU Autoconf 2.69, |
11275 | with options \\"\$ac_cs_config\\" | |
bec39cab | 11276 | |
d0ac1c44 | 11277 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
11278 | This config.status script is free software; the Free Software Foundation |
11279 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
11280 | |
11281 | ac_pwd='$ac_pwd' | |
11282 | srcdir='$srcdir' | |
11283 | INSTALL='$INSTALL' | |
11284 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
11285 | _ACEOF |
11286 | ||
81ecdfbb RW |
11287 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11288 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
11289 | ac_need_defaults=: |
11290 | while test $# != 0 | |
11291 | do | |
11292 | case $1 in | |
d0ac1c44 | 11293 | --*=?*) |
81ecdfbb RW |
11294 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
11295 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab AC |
11296 | ac_shift=: |
11297 | ;; | |
d0ac1c44 SM |
11298 | --*=) |
11299 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
11300 | ac_optarg= | |
11301 | ac_shift=: | |
11302 | ;; | |
81ecdfbb | 11303 | *) |
bec39cab AC |
11304 | ac_option=$1 |
11305 | ac_optarg=$2 | |
11306 | ac_shift=shift | |
11307 | ;; | |
bec39cab AC |
11308 | esac |
11309 | ||
11310 | case $ac_option in | |
11311 | # Handling of the options. | |
bec39cab AC |
11312 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
11313 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
11314 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
11315 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
11316 | --config | --confi | --conf | --con | --co | --c ) |
11317 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 11318 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
11319 | debug=: ;; |
11320 | --file | --fil | --fi | --f ) | |
11321 | $ac_shift | |
81ecdfbb RW |
11322 | case $ac_optarg in |
11323 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 11324 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
11325 | esac |
11326 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
11327 | ac_need_defaults=false;; |
11328 | --header | --heade | --head | --hea ) | |
11329 | $ac_shift | |
81ecdfbb RW |
11330 | case $ac_optarg in |
11331 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
11332 | esac | |
11333 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 11334 | ac_need_defaults=false;; |
81ecdfbb RW |
11335 | --he | --h) |
11336 | # Conflict between --help and --header | |
d0ac1c44 | 11337 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
11338 | Try \`$0 --help' for more information.";; |
11339 | --help | --hel | -h ) | |
11340 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
11341 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
11342 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
11343 | ac_cs_silent=: ;; | |
11344 | ||
11345 | # This is an error. | |
d0ac1c44 | 11346 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 11347 | Try \`$0 --help' for more information." ;; |
bec39cab | 11348 | |
81ecdfbb RW |
11349 | *) as_fn_append ac_config_targets " $1" |
11350 | ac_need_defaults=false ;; | |
bec39cab AC |
11351 | |
11352 | esac | |
11353 | shift | |
d6e9fb05 | 11354 | done |
bec39cab AC |
11355 | |
11356 | ac_configure_extra_args= | |
11357 | ||
11358 | if $ac_cs_silent; then | |
11359 | exec 6>/dev/null | |
11360 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
d6e9fb05 | 11361 | fi |
d6e9fb05 | 11362 | |
bec39cab | 11363 | _ACEOF |
81ecdfbb | 11364 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 11365 | if \$ac_cs_recheck; then |
d0ac1c44 | 11366 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
11367 | shift |
11368 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
11369 | CONFIG_SHELL='$SHELL' | |
11370 | export CONFIG_SHELL | |
11371 | exec "\$@" | |
bec39cab | 11372 | fi |
d6e9fb05 | 11373 | |
bec39cab | 11374 | _ACEOF |
81ecdfbb RW |
11375 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11376 | exec 5>>config.log | |
11377 | { | |
11378 | echo | |
11379 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
11380 | ## Running $as_me. ## | |
11381 | _ASBOX | |
11382 | $as_echo "$ac_log" | |
11383 | } >&5 | |
bec39cab | 11384 | |
81ecdfbb RW |
11385 | _ACEOF |
11386 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
61c125b9 TT |
11387 | # |
11388 | # INIT-COMMANDS | |
11389 | # | |
11390 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR | |
60d6cfc9 | 11391 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR" |
61c125b9 | 11392 | |
81ecdfbb | 11393 | _ACEOF |
bec39cab | 11394 | |
81ecdfbb | 11395 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b80864fb | 11396 | |
81ecdfbb | 11397 | # Handling of arguments. |
bec39cab AC |
11398 | for ac_config_target in $ac_config_targets |
11399 | do | |
81ecdfbb RW |
11400 | case $ac_config_target in |
11401 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
61c125b9 | 11402 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
60d6cfc9 | 11403 | "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;; |
81ecdfbb | 11404 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
81ecdfbb | 11405 | |
d0ac1c44 | 11406 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
d6e9fb05 | 11407 | esac |
bec39cab AC |
11408 | done |
11409 | ||
81ecdfbb | 11410 | |
bec39cab AC |
11411 | # If the user did not use the arguments to specify the items to instantiate, |
11412 | # then the envvar interface is used. Set only those that are not. | |
11413 | # We use the long form for the default assignment because of an extremely | |
11414 | # bizarre bug on SunOS 4.1.3. | |
11415 | if $ac_need_defaults; then | |
11416 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
11417 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
11418 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
11419 | fi | |
d6e9fb05 | 11420 | |
bec39cab | 11421 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 11422 | # simply because there is no reason against having it here, and in addition, |
bec39cab | 11423 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
11424 | # Hook for its removal unless debugging. |
11425 | # Note that there is a small window in which the directory will not be cleaned: | |
11426 | # after its creation but before its name has been assigned to `$tmp'. | |
bec39cab AC |
11427 | $debug || |
11428 | { | |
d0ac1c44 | 11429 | tmp= ac_tmp= |
81ecdfbb | 11430 | trap 'exit_status=$? |
d0ac1c44 SM |
11431 | : "${ac_tmp:=$tmp}" |
11432 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
11433 | ' 0 |
11434 | trap 'as_fn_exit 1' 1 2 13 15 | |
bec39cab | 11435 | } |
bec39cab AC |
11436 | # Create a (secure) tmp directory for tmp files. |
11437 | ||
11438 | { | |
81ecdfbb | 11439 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
d0ac1c44 | 11440 | test -d "$tmp" |
bec39cab AC |
11441 | } || |
11442 | { | |
81ecdfbb RW |
11443 | tmp=./conf$$-$RANDOM |
11444 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
11445 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
11446 | ac_tmp=$tmp | |
81ecdfbb RW |
11447 | |
11448 | # Set up the scripts for CONFIG_FILES section. | |
11449 | # No need to generate them if there are no CONFIG_FILES. | |
11450 | # This happens for instance with `./config.status config.h'. | |
11451 | if test -n "$CONFIG_FILES"; then | |
11452 | ||
11453 | ||
11454 | ac_cr=`echo X | tr X '\015'` | |
11455 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
11456 | # But we know of no other shell where ac_cr would be empty at this | |
11457 | # point, so we can use a bashism as a fallback. | |
11458 | if test "x$ac_cr" = x; then | |
11459 | eval ac_cr=\$\'\\r\' | |
11460 | fi | |
11461 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
11462 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 11463 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
11464 | else |
11465 | ac_cs_awk_cr=$ac_cr | |
11466 | fi | |
11467 | ||
d0ac1c44 | 11468 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
11469 | _ACEOF |
11470 | ||
11471 | ||
11472 | { | |
11473 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
11474 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
11475 | echo "_ACEOF" | |
11476 | } >conf$$subs.sh || | |
d0ac1c44 SM |
11477 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
11478 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
11479 | ac_delim='%!_!# ' |
11480 | for ac_last_try in false false false false false :; do | |
11481 | . ./conf$$subs.sh || | |
d0ac1c44 | 11482 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11483 | |
11484 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
11485 | if test $ac_delim_n = $ac_delim_num; then | |
11486 | break | |
11487 | elif $ac_last_try; then | |
d0ac1c44 | 11488 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11489 | else |
11490 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
11491 | fi | |
11492 | done | |
11493 | rm -f conf$$subs.sh | |
11494 | ||
11495 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11496 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
11497 | _ACEOF |
11498 | sed -n ' | |
11499 | h | |
11500 | s/^/S["/; s/!.*/"]=/ | |
11501 | p | |
11502 | g | |
11503 | s/^[^!]*!// | |
11504 | :repl | |
11505 | t repl | |
11506 | s/'"$ac_delim"'$// | |
11507 | t delim | |
11508 | :nl | |
11509 | h | |
d0ac1c44 | 11510 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11511 | t more1 |
11512 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
11513 | p | |
11514 | n | |
11515 | b repl | |
11516 | :more1 | |
11517 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11518 | p | |
11519 | g | |
11520 | s/.\{148\}// | |
11521 | t nl | |
11522 | :delim | |
11523 | h | |
d0ac1c44 | 11524 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11525 | t more2 |
11526 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
11527 | p | |
11528 | b | |
11529 | :more2 | |
11530 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11531 | p | |
11532 | g | |
11533 | s/.\{148\}// | |
11534 | t delim | |
11535 | ' <conf$$subs.awk | sed ' | |
11536 | /^[^""]/{ | |
11537 | N | |
11538 | s/\n// | |
11539 | } | |
11540 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
11541 | rm -f conf$$subs.awk | |
11542 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11543 | _ACAWK | |
d0ac1c44 | 11544 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
11545 | for (key in S) S_is_set[key] = 1 |
11546 | FS = "\a" | |
11547 | ||
11548 | } | |
bec39cab | 11549 | { |
81ecdfbb RW |
11550 | line = $ 0 |
11551 | nfields = split(line, field, "@") | |
11552 | substed = 0 | |
11553 | len = length(field[1]) | |
11554 | for (i = 2; i < nfields; i++) { | |
11555 | key = field[i] | |
11556 | keylen = length(key) | |
11557 | if (S_is_set[key]) { | |
11558 | value = S[key] | |
11559 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
11560 | len += length(value) + length(field[++i]) | |
11561 | substed = 1 | |
11562 | } else | |
11563 | len += 1 + keylen | |
11564 | } | |
11565 | ||
11566 | print line | |
bec39cab AC |
11567 | } |
11568 | ||
81ecdfbb RW |
11569 | _ACAWK |
11570 | _ACEOF | |
11571 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11572 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
11573 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
11574 | else | |
11575 | cat | |
d0ac1c44 SM |
11576 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
11577 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
dae5f5cf DJ |
11578 | _ACEOF |
11579 | ||
d0ac1c44 SM |
11580 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
11581 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
11582 | # trailing colons and then remove the whole line if VPATH becomes empty |
11583 | # (actually we leave an empty line to preserve line numbers). | |
11584 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
11585 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
11586 | h | |
11587 | s/// | |
11588 | s/^/:/ | |
11589 | s/[ ]*$/:/ | |
11590 | s/:\$(srcdir):/:/g | |
11591 | s/:\${srcdir}:/:/g | |
11592 | s/:@srcdir@:/:/g | |
11593 | s/^:*// | |
81ecdfbb | 11594 | s/:*$// |
d0ac1c44 SM |
11595 | x |
11596 | s/\(=[ ]*\).*/\1/ | |
11597 | G | |
11598 | s/\n// | |
81ecdfbb RW |
11599 | s/^[^=]*=[ ]*$// |
11600 | }' | |
11601 | fi | |
bec39cab | 11602 | |
81ecdfbb RW |
11603 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11604 | fi # test -n "$CONFIG_FILES" | |
bec39cab | 11605 | |
81ecdfbb RW |
11606 | # Set up the scripts for CONFIG_HEADERS section. |
11607 | # No need to generate them if there are no CONFIG_HEADERS. | |
11608 | # This happens for instance with `./config.status Makefile'. | |
11609 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 11610 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb | 11611 | BEGIN { |
b80864fb DJ |
11612 | _ACEOF |
11613 | ||
81ecdfbb RW |
11614 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
11615 | # here-document in config.status, that substitutes the proper values into | |
11616 | # config.h.in to produce config.h. | |
11617 | ||
11618 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
11619 | # handling of long lines. | |
11620 | ac_delim='%!_!# ' | |
11621 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
11622 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
11623 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
11624 | break |
11625 | elif $ac_last_try; then | |
d0ac1c44 | 11626 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
11627 | else |
11628 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
d6e9fb05 | 11629 | fi |
81ecdfbb | 11630 | done |
d6e9fb05 | 11631 | |
81ecdfbb RW |
11632 | # For the awk script, D is an array of macro values keyed by name, |
11633 | # likewise P contains macro parameters if any. Preserve backslash | |
11634 | # newline sequences. | |
11635 | ||
11636 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
11637 | sed -n ' | |
11638 | s/.\{148\}/&'"$ac_delim"'/g | |
11639 | t rset | |
11640 | :rset | |
11641 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
11642 | t def | |
11643 | d | |
11644 | :def | |
11645 | s/\\$// | |
11646 | t bsnl | |
11647 | s/["\\]/\\&/g | |
11648 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11649 | D["\1"]=" \3"/p | |
11650 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
11651 | d | |
11652 | :bsnl | |
11653 | s/["\\]/\\&/g | |
11654 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11655 | D["\1"]=" \3\\\\\\n"\\/p | |
11656 | t cont | |
11657 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
11658 | t cont | |
11659 | d | |
11660 | :cont | |
11661 | n | |
11662 | s/.\{148\}/&'"$ac_delim"'/g | |
11663 | t clear | |
11664 | :clear | |
11665 | s/\\$// | |
11666 | t bsnlc | |
11667 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
11668 | d | |
11669 | :bsnlc | |
11670 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
11671 | b cont | |
11672 | ' <confdefs.h | sed ' | |
11673 | s/'"$ac_delim"'/"\\\ | |
11674 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
11675 | ||
11676 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11677 | for (key in D) D_is_set[key] = 1 | |
11678 | FS = "\a" | |
11679 | } | |
11680 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
11681 | line = \$ 0 | |
11682 | split(line, arg, " ") | |
11683 | if (arg[1] == "#") { | |
11684 | defundef = arg[2] | |
11685 | mac1 = arg[3] | |
11686 | } else { | |
11687 | defundef = substr(arg[1], 2) | |
11688 | mac1 = arg[2] | |
11689 | } | |
11690 | split(mac1, mac2, "(") #) | |
11691 | macro = mac2[1] | |
11692 | prefix = substr(line, 1, index(line, defundef) - 1) | |
11693 | if (D_is_set[macro]) { | |
11694 | # Preserve the white space surrounding the "#". | |
11695 | print prefix "define", macro P[macro] D[macro] | |
11696 | next | |
11697 | } else { | |
11698 | # Replace #undef with comments. This is necessary, for example, | |
11699 | # in the case of _POSIX_SOURCE, which is predefined and required | |
11700 | # on some systems where configure will not decide to define it. | |
11701 | if (defundef == "undef") { | |
11702 | print "/*", prefix defundef, macro, "*/" | |
11703 | next | |
11704 | } | |
11705 | } | |
11706 | } | |
11707 | { print } | |
11708 | _ACAWK | |
bec39cab | 11709 | _ACEOF |
81ecdfbb | 11710 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 11711 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb RW |
11712 | fi # test -n "$CONFIG_HEADERS" |
11713 | ||
11714 | ||
11715 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
11716 | shift | |
11717 | for ac_tag | |
11718 | do | |
11719 | case $ac_tag in | |
11720 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
11721 | esac | |
11722 | case $ac_mode$ac_tag in | |
11723 | :[FHL]*:*);; | |
d0ac1c44 | 11724 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
11725 | :[FH]-) ac_tag=-:-;; |
11726 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
11727 | esac | |
11728 | ac_save_IFS=$IFS | |
11729 | IFS=: | |
11730 | set x $ac_tag | |
11731 | IFS=$ac_save_IFS | |
11732 | shift | |
11733 | ac_file=$1 | |
11734 | shift | |
11735 | ||
11736 | case $ac_mode in | |
11737 | :L) ac_source=$1;; | |
11738 | :[FH]) | |
11739 | ac_file_inputs= | |
11740 | for ac_f | |
11741 | do | |
11742 | case $ac_f in | |
d0ac1c44 | 11743 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
11744 | *) # Look for the file first in the build tree, then in the source tree |
11745 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
11746 | # because $ac_f cannot contain `:'. | |
11747 | test -f "$ac_f" || | |
11748 | case $ac_f in | |
11749 | [\\/$]*) false;; | |
11750 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
11751 | esac || | |
d0ac1c44 | 11752 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
11753 | esac |
11754 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
11755 | as_fn_append ac_file_inputs " '$ac_f'" | |
11756 | done | |
11757 | ||
11758 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
11759 | # use $as_me), people would be surprised to read: | |
11760 | # /* config.h. Generated by config.status. */ | |
11761 | configure_input='Generated from '` | |
11762 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
11763 | `' by configure.' | |
11764 | if test x"$ac_file" != x-; then | |
11765 | configure_input="$ac_file. $configure_input" | |
11766 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
11767 | $as_echo "$as_me: creating $ac_file" >&6;} | |
11768 | fi | |
11769 | # Neutralize special characters interpreted by sed in replacement strings. | |
11770 | case $configure_input in #( | |
11771 | *\&* | *\|* | *\\* ) | |
11772 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
11773 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
11774 | *) ac_sed_conf_input=$configure_input;; | |
11775 | esac | |
11776 | ||
11777 | case $ac_tag in | |
d0ac1c44 SM |
11778 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
11779 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
11780 | esac |
11781 | ;; | |
d6e9fb05 JK |
11782 | esac |
11783 | ||
81ecdfbb | 11784 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
11785 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
11786 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
11787 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11788 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
11789 | $as_echo X"$ac_file" | | |
11790 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11791 | s//\1/ | |
11792 | q | |
11793 | } | |
11794 | /^X\(\/\/\)[^/].*/{ | |
11795 | s//\1/ | |
11796 | q | |
11797 | } | |
11798 | /^X\(\/\/\)$/{ | |
11799 | s//\1/ | |
11800 | q | |
11801 | } | |
11802 | /^X\(\/\).*/{ | |
11803 | s//\1/ | |
11804 | q | |
11805 | } | |
11806 | s/.*/./; q'` | |
11807 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
11808 | ac_builddir=. |
11809 | ||
81ecdfbb RW |
11810 | case "$ac_dir" in |
11811 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11812 | *) | |
11813 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
11814 | # A ".." for each directory in $ac_dir_suffix. | |
11815 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
11816 | case $ac_top_builddir_sub in | |
11817 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11818 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
11819 | esac ;; | |
11820 | esac | |
11821 | ac_abs_top_builddir=$ac_pwd | |
11822 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
11823 | # for backward compatibility: | |
11824 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
11825 | |
11826 | case $srcdir in | |
81ecdfbb | 11827 | .) # We are building in place. |
bec39cab | 11828 | ac_srcdir=. |
81ecdfbb RW |
11829 | ac_top_srcdir=$ac_top_builddir_sub |
11830 | ac_abs_top_srcdir=$ac_pwd ;; | |
11831 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 11832 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
11833 | ac_top_srcdir=$srcdir |
11834 | ac_abs_top_srcdir=$srcdir ;; | |
11835 | *) # Relative name. | |
11836 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
11837 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
11838 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 11839 | esac |
81ecdfbb | 11840 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 11841 | |
bec39cab | 11842 | |
81ecdfbb RW |
11843 | case $ac_mode in |
11844 | :F) | |
11845 | # | |
11846 | # CONFIG_FILE | |
11847 | # | |
d6e9fb05 | 11848 | |
bec39cab AC |
11849 | case $INSTALL in |
11850 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 11851 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
d6e9fb05 | 11852 | esac |
81ecdfbb | 11853 | _ACEOF |
3db0444b | 11854 | |
81ecdfbb RW |
11855 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11856 | # If the template does not know about datarootdir, expand it. | |
11857 | # FIXME: This hack should be removed a few years after 2.60. | |
11858 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
11859 | ac_sed_dataroot=' | |
11860 | /datarootdir/ { | |
11861 | p | |
11862 | q | |
11863 | } | |
11864 | /@datadir@/p | |
11865 | /@docdir@/p | |
11866 | /@infodir@/p | |
11867 | /@localedir@/p | |
11868 | /@mandir@/p' | |
11869 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
11870 | *datarootdir*) ac_datarootdir_seen=yes;; | |
11871 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
11872 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
11873 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
11874 | _ACEOF | |
11875 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11876 | ac_datarootdir_hack=' | |
11877 | s&@datadir@&$datadir&g | |
11878 | s&@docdir@&$docdir&g | |
11879 | s&@infodir@&$infodir&g | |
11880 | s&@localedir@&$localedir&g | |
11881 | s&@mandir@&$mandir&g | |
11882 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
11883 | esac | |
bec39cab | 11884 | _ACEOF |
81ecdfbb RW |
11885 | |
11886 | # Neutralize VPATH when `$srcdir' = `.'. | |
11887 | # Shell code in configure.ac might set extrasub. | |
11888 | # FIXME: do we really want to maintain this feature? | |
11889 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11890 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
11891 | $extrasub |
11892 | _ACEOF | |
81ecdfbb | 11893 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
11894 | :t |
11895 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
11896 | s|@configure_input@|$ac_sed_conf_input|;t t |
11897 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
11898 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
11899 | s&@srcdir@&$ac_srcdir&;t t | |
11900 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
11901 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
11902 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
11903 | s&@builddir@&$ac_builddir&;t t | |
11904 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
11905 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
11906 | s&@INSTALL@&$ac_INSTALL&;t t | |
11907 | $ac_datarootdir_hack | |
11908 | " | |
d0ac1c44 SM |
11909 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
11910 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
11911 | |
11912 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
11913 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
11914 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
11915 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 11916 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 11917 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 11918 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 11919 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 11920 | |
d0ac1c44 | 11921 | rm -f "$ac_tmp/stdin" |
bec39cab | 11922 | case $ac_file in |
d0ac1c44 SM |
11923 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
11924 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 11925 | esac \ |
d0ac1c44 | 11926 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
11927 | ;; |
11928 | :H) | |
11929 | # | |
11930 | # CONFIG_HEADER | |
11931 | # | |
bec39cab | 11932 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
11933 | { |
11934 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
11935 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
11936 | } >"$ac_tmp/config.h" \ | |
11937 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11938 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
11939 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
11940 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 11941 | else |
81ecdfbb | 11942 | rm -f "$ac_file" |
d0ac1c44 SM |
11943 | mv "$ac_tmp/config.h" "$ac_file" \ |
11944 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
84563040 | 11945 | fi |
bec39cab | 11946 | else |
81ecdfbb | 11947 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
11948 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
11949 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
d6e9fb05 | 11950 | fi |
81ecdfbb | 11951 | ;; |
dae5f5cf | 11952 | |
81ecdfbb RW |
11953 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
11954 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
11955 | ;; | |
11956 | esac | |
dae5f5cf DJ |
11957 | |
11958 | ||
81ecdfbb | 11959 | case $ac_file$ac_mode in |
c5adaa19 | 11960 | "config.h":H) echo > stamp-h ;; |
61c125b9 | 11961 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
60d6cfc9 YQ |
11962 | "gdbdepdir":C) |
11963 | for subdir in ${CONFIG_SRC_SUBDIR} | |
11964 | do | |
11965 | $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
11966 | done ;; | |
81ecdfbb | 11967 | |
bec39cab | 11968 | esac |
81ecdfbb | 11969 | done # for ac_tag |
d6e9fb05 | 11970 | |
bec39cab | 11971 | |
81ecdfbb | 11972 | as_fn_exit 0 |
bec39cab | 11973 | _ACEOF |
bec39cab AC |
11974 | ac_clean_files=$ac_clean_files_save |
11975 | ||
81ecdfbb | 11976 | test $ac_write_fail = 0 || |
d0ac1c44 | 11977 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 11978 | |
bec39cab AC |
11979 | |
11980 | # configure is writing to config.log, and then calls config.status. | |
11981 | # config.status does its own redirection, appending to config.log. | |
11982 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
11983 | # by configure, so config.status won't be able to write to it; its | |
11984 | # output is simply discarded. So we exec the FD to /dev/null, | |
11985 | # effectively closing config.log, so it can be properly (re)opened and | |
11986 | # appended to by config.status. When coming back to configure, we | |
11987 | # need to make the FD available again. | |
11988 | if test "$no_create" != yes; then | |
11989 | ac_cs_success=: | |
11990 | ac_config_status_args= | |
11991 | test "$silent" = yes && | |
11992 | ac_config_status_args="$ac_config_status_args --quiet" | |
11993 | exec 5>/dev/null | |
11994 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
11995 | exec 5>>config.log | |
11996 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
11997 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 11998 | $ac_cs_success || as_fn_exit 1 |
81ecdfbb RW |
11999 | fi |
12000 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
12001 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
12002 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
bec39cab | 12003 | fi |
d6e9fb05 | 12004 |