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 | |
05ea2a05 TT |
640 | LTLIBIPT |
641 | LIBIPT | |
642 | HAVE_LIBIPT | |
5e030278 TT |
643 | PTHREAD_CFLAGS |
644 | PTHREAD_LIBS | |
645 | PTHREAD_CC | |
646 | ax_pthread_config | |
647 | SED | |
9c232dda | 648 | ALLOCA |
61c125b9 | 649 | CCDEPMODE |
60d6cfc9 | 650 | CONFIG_SRC_SUBDIR |
61c125b9 TT |
651 | DEPDIR |
652 | am__leading_dot | |
bd885420 YQ |
653 | host_noncanonical |
654 | target_noncanonical | |
0bcda685 PA |
655 | CXX_DIALECT |
656 | HAVE_CXX11 | |
c971b7fa | 657 | RANLIB |
e1d2394b | 658 | AR |
81ecdfbb RW |
659 | INSTALL_DATA |
660 | INSTALL_SCRIPT | |
661 | INSTALL_PROGRAM | |
662 | target_os | |
663 | target_vendor | |
664 | target_cpu | |
665 | target | |
666 | host_os | |
667 | host_vendor | |
668 | host_cpu | |
669 | host | |
670 | build_os | |
671 | build_vendor | |
672 | build_cpu | |
673 | build | |
bdaed379 HD |
674 | INSTALL_STRIP_PROGRAM |
675 | STRIP | |
676 | install_sh | |
770d76d7 PA |
677 | EGREP |
678 | GREP | |
679 | CPP | |
3bc3d82a PA |
680 | ac_ct_CXX |
681 | CXXFLAGS | |
682 | CXX | |
81ecdfbb RW |
683 | OBJEXT |
684 | EXEEXT | |
685 | ac_ct_CC | |
686 | CPPFLAGS | |
687 | LDFLAGS | |
688 | CFLAGS | |
689 | CC | |
c9a1864a YQ |
690 | MAINT |
691 | MAINTAINER_MODE_FALSE | |
692 | MAINTAINER_MODE_TRUE | |
81ecdfbb RW |
693 | target_alias |
694 | host_alias | |
695 | build_alias | |
696 | LIBS | |
697 | ECHO_T | |
698 | ECHO_N | |
699 | ECHO_C | |
700 | DEFS | |
701 | mandir | |
702 | localedir | |
703 | libdir | |
704 | psdir | |
705 | pdfdir | |
706 | dvidir | |
707 | htmldir | |
708 | infodir | |
709 | docdir | |
710 | oldincludedir | |
711 | includedir | |
712 | localstatedir | |
713 | sharedstatedir | |
714 | sysconfdir | |
715 | datadir | |
716 | datarootdir | |
717 | libexecdir | |
718 | sbindir | |
719 | bindir | |
720 | program_transform_name | |
721 | prefix | |
722 | exec_prefix | |
723 | PACKAGE_URL | |
724 | PACKAGE_BUGREPORT | |
725 | PACKAGE_STRING | |
726 | PACKAGE_VERSION | |
727 | PACKAGE_TARNAME | |
728 | PACKAGE_NAME | |
729 | PATH_SEPARATOR | |
730 | SHELL' | |
bec39cab | 731 | ac_subst_files='' |
81ecdfbb RW |
732 | ac_user_opts=' |
733 | enable_option_checking | |
c9a1864a | 734 | enable_maintainer_mode |
589bc927 | 735 | enable_largefile |
8ecfd7bd | 736 | enable_unit_tests |
05ea2a05 TT |
737 | with_intel_pt |
738 | with_gnu_ld | |
739 | enable_rpath | |
740 | with_libipt_prefix | |
0fb4aa4b PA |
741 | with_ust |
742 | with_ust_include | |
743 | with_ust_lib | |
d4596a3d | 744 | enable_werror |
8f13a3ce MF |
745 | enable_build_warnings |
746 | enable_gdb_build_warnings | |
81ecdfbb RW |
747 | with_pkgversion |
748 | with_bugurl | |
96f15937 | 749 | with_libthread_db |
c2a66c29 | 750 | enable_inprocess_agent |
81ecdfbb RW |
751 | ' |
752 | ac_precious_vars='build_alias | |
753 | host_alias | |
754 | target_alias | |
755 | CC | |
756 | CFLAGS | |
757 | LDFLAGS | |
758 | LIBS | |
759 | CPPFLAGS | |
3bc3d82a PA |
760 | CXX |
761 | CXXFLAGS | |
762 | CCC | |
81ecdfbb RW |
763 | CPP' |
764 | ||
d6e9fb05 JK |
765 | |
766 | # Initialize some variables set by options. | |
bec39cab AC |
767 | ac_init_help= |
768 | ac_init_version=false | |
81ecdfbb RW |
769 | ac_unrecognized_opts= |
770 | ac_unrecognized_sep= | |
d6e9fb05 JK |
771 | # The variables have the same names as the options, with |
772 | # dashes changed to underlines. | |
bec39cab | 773 | cache_file=/dev/null |
d6e9fb05 | 774 | exec_prefix=NONE |
d6e9fb05 | 775 | no_create= |
d6e9fb05 JK |
776 | no_recursion= |
777 | prefix=NONE | |
778 | program_prefix=NONE | |
779 | program_suffix=NONE | |
780 | program_transform_name=s,x,x, | |
781 | silent= | |
782 | site= | |
783 | srcdir= | |
d6e9fb05 JK |
784 | verbose= |
785 | x_includes=NONE | |
786 | x_libraries=NONE | |
bec39cab AC |
787 | |
788 | # Installation directory options. | |
789 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
790 | # and all the variables that are supposed to be based on exec_prefix | |
791 | # by default will actually change. | |
792 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 793 | # (The list follows the same order as the GNU Coding Standards.) |
d6e9fb05 JK |
794 | bindir='${exec_prefix}/bin' |
795 | sbindir='${exec_prefix}/sbin' | |
796 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
797 | datarootdir='${prefix}/share' |
798 | datadir='${datarootdir}' | |
d6e9fb05 JK |
799 | sysconfdir='${prefix}/etc' |
800 | sharedstatedir='${prefix}/com' | |
801 | localstatedir='${prefix}/var' | |
d6e9fb05 JK |
802 | includedir='${prefix}/include' |
803 | oldincludedir='/usr/include' | |
81ecdfbb RW |
804 | docdir='${datarootdir}/doc/${PACKAGE}' |
805 | infodir='${datarootdir}/info' | |
806 | htmldir='${docdir}' | |
807 | dvidir='${docdir}' | |
808 | pdfdir='${docdir}' | |
809 | psdir='${docdir}' | |
810 | libdir='${exec_prefix}/lib' | |
811 | localedir='${datarootdir}/locale' | |
812 | mandir='${datarootdir}/man' | |
d6e9fb05 | 813 | |
d6e9fb05 | 814 | ac_prev= |
81ecdfbb | 815 | ac_dashdash= |
d6e9fb05 JK |
816 | for ac_option |
817 | do | |
d6e9fb05 JK |
818 | # If the previous option needs an argument, assign it. |
819 | if test -n "$ac_prev"; then | |
81ecdfbb | 820 | eval $ac_prev=\$ac_option |
d6e9fb05 JK |
821 | ac_prev= |
822 | continue | |
823 | fi | |
824 | ||
81ecdfbb | 825 | case $ac_option in |
d0ac1c44 SM |
826 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
827 | *=) ac_optarg= ;; | |
828 | *) ac_optarg=yes ;; | |
81ecdfbb | 829 | esac |
d6e9fb05 JK |
830 | |
831 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
832 | ||
81ecdfbb RW |
833 | case $ac_dashdash$ac_option in |
834 | --) | |
835 | ac_dashdash=yes ;; | |
d6e9fb05 JK |
836 | |
837 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
838 | ac_prev=bindir ;; | |
839 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 840 | bindir=$ac_optarg ;; |
d6e9fb05 JK |
841 | |
842 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 843 | ac_prev=build_alias ;; |
d6e9fb05 | 844 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 845 | build_alias=$ac_optarg ;; |
d6e9fb05 JK |
846 | |
847 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
848 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
849 | ac_prev=cache_file ;; | |
850 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
851 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
852 | cache_file=$ac_optarg ;; |
853 | ||
854 | --config-cache | -C) | |
855 | cache_file=config.cache ;; | |
d6e9fb05 | 856 | |
81ecdfbb | 857 | -datadir | --datadir | --datadi | --datad) |
d6e9fb05 | 858 | ac_prev=datadir ;; |
81ecdfbb | 859 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 860 | datadir=$ac_optarg ;; |
d6e9fb05 | 861 | |
81ecdfbb RW |
862 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
863 | | --dataroo | --dataro | --datar) | |
864 | ac_prev=datarootdir ;; | |
865 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
866 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
867 | datarootdir=$ac_optarg ;; | |
868 | ||
d6e9fb05 | 869 | -disable-* | --disable-*) |
81ecdfbb | 870 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
d6e9fb05 | 871 | # Reject names that are not valid shell variable names. |
81ecdfbb | 872 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 873 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
874 | ac_useropt_orig=$ac_useropt |
875 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
876 | case $ac_user_opts in | |
877 | *" | |
878 | "enable_$ac_useropt" | |
879 | "*) ;; | |
880 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
881 | ac_unrecognized_sep=', ';; | |
882 | esac | |
883 | eval enable_$ac_useropt=no ;; | |
884 | ||
885 | -docdir | --docdir | --docdi | --doc | --do) | |
886 | ac_prev=docdir ;; | |
887 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
888 | docdir=$ac_optarg ;; | |
889 | ||
890 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
891 | ac_prev=dvidir ;; | |
892 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
893 | dvidir=$ac_optarg ;; | |
d6e9fb05 JK |
894 | |
895 | -enable-* | --enable-*) | |
81ecdfbb | 896 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
d6e9fb05 | 897 | # Reject names that are not valid shell variable names. |
81ecdfbb | 898 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 899 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
900 | ac_useropt_orig=$ac_useropt |
901 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
902 | case $ac_user_opts in | |
903 | *" | |
904 | "enable_$ac_useropt" | |
905 | "*) ;; | |
906 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
907 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 908 | esac |
81ecdfbb | 909 | eval enable_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
910 | |
911 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
912 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
913 | | --exec | --exe | --ex) | |
914 | ac_prev=exec_prefix ;; | |
915 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
916 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
917 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 918 | exec_prefix=$ac_optarg ;; |
d6e9fb05 JK |
919 | |
920 | -gas | --gas | --ga | --g) | |
921 | # Obsolete; use --with-gas. | |
922 | with_gas=yes ;; | |
923 | ||
bec39cab AC |
924 | -help | --help | --hel | --he | -h) |
925 | ac_init_help=long ;; | |
926 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
927 | ac_init_help=recursive ;; | |
928 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
929 | ac_init_help=short ;; | |
d6e9fb05 JK |
930 | |
931 | -host | --host | --hos | --ho) | |
bec39cab | 932 | ac_prev=host_alias ;; |
d6e9fb05 | 933 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 934 | host_alias=$ac_optarg ;; |
d6e9fb05 | 935 | |
81ecdfbb RW |
936 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
937 | ac_prev=htmldir ;; | |
938 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
939 | | --ht=*) | |
940 | htmldir=$ac_optarg ;; | |
941 | ||
d6e9fb05 JK |
942 | -includedir | --includedir | --includedi | --included | --include \ |
943 | | --includ | --inclu | --incl | --inc) | |
944 | ac_prev=includedir ;; | |
945 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
946 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 947 | includedir=$ac_optarg ;; |
d6e9fb05 JK |
948 | |
949 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
950 | ac_prev=infodir ;; | |
951 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 952 | infodir=$ac_optarg ;; |
d6e9fb05 JK |
953 | |
954 | -libdir | --libdir | --libdi | --libd) | |
955 | ac_prev=libdir ;; | |
956 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 957 | libdir=$ac_optarg ;; |
d6e9fb05 JK |
958 | |
959 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
960 | | --libexe | --libex | --libe) | |
961 | ac_prev=libexecdir ;; | |
962 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
963 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 964 | libexecdir=$ac_optarg ;; |
d6e9fb05 | 965 | |
81ecdfbb RW |
966 | -localedir | --localedir | --localedi | --localed | --locale) |
967 | ac_prev=localedir ;; | |
968 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
969 | localedir=$ac_optarg ;; | |
970 | ||
d6e9fb05 | 971 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 972 | | --localstate | --localstat | --localsta | --localst | --locals) |
d6e9fb05 JK |
973 | ac_prev=localstatedir ;; |
974 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 975 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 976 | localstatedir=$ac_optarg ;; |
d6e9fb05 JK |
977 | |
978 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
979 | ac_prev=mandir ;; | |
980 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 981 | mandir=$ac_optarg ;; |
d6e9fb05 JK |
982 | |
983 | -nfp | --nfp | --nf) | |
984 | # Obsolete; use --without-fp. | |
985 | with_fp=no ;; | |
986 | ||
987 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 988 | | --no-cr | --no-c | -n) |
d6e9fb05 JK |
989 | no_create=yes ;; |
990 | ||
991 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
992 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
993 | no_recursion=yes ;; | |
994 | ||
995 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
996 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
997 | | --oldin | --oldi | --old | --ol | --o) | |
998 | ac_prev=oldincludedir ;; | |
999 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1000 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1001 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1002 | oldincludedir=$ac_optarg ;; |
d6e9fb05 JK |
1003 | |
1004 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1005 | ac_prev=prefix ;; | |
1006 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1007 | prefix=$ac_optarg ;; |
d6e9fb05 JK |
1008 | |
1009 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1010 | | --program-pre | --program-pr | --program-p) | |
1011 | ac_prev=program_prefix ;; | |
1012 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1013 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1014 | program_prefix=$ac_optarg ;; |
d6e9fb05 JK |
1015 | |
1016 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1017 | | --program-suf | --program-su | --program-s) | |
1018 | ac_prev=program_suffix ;; | |
1019 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1020 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1021 | program_suffix=$ac_optarg ;; |
d6e9fb05 JK |
1022 | |
1023 | -program-transform-name | --program-transform-name \ | |
1024 | | --program-transform-nam | --program-transform-na \ | |
1025 | | --program-transform-n | --program-transform- \ | |
1026 | | --program-transform | --program-transfor \ | |
1027 | | --program-transfo | --program-transf \ | |
1028 | | --program-trans | --program-tran \ | |
1029 | | --progr-tra | --program-tr | --program-t) | |
1030 | ac_prev=program_transform_name ;; | |
1031 | -program-transform-name=* | --program-transform-name=* \ | |
1032 | | --program-transform-nam=* | --program-transform-na=* \ | |
1033 | | --program-transform-n=* | --program-transform-=* \ | |
1034 | | --program-transform=* | --program-transfor=* \ | |
1035 | | --program-transfo=* | --program-transf=* \ | |
1036 | | --program-trans=* | --program-tran=* \ | |
1037 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1038 | program_transform_name=$ac_optarg ;; |
d6e9fb05 | 1039 | |
81ecdfbb RW |
1040 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1041 | ac_prev=pdfdir ;; | |
1042 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1043 | pdfdir=$ac_optarg ;; | |
1044 | ||
1045 | -psdir | --psdir | --psdi | --psd | --ps) | |
1046 | ac_prev=psdir ;; | |
1047 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1048 | psdir=$ac_optarg ;; | |
1049 | ||
d6e9fb05 JK |
1050 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1051 | | -silent | --silent | --silen | --sile | --sil) | |
1052 | silent=yes ;; | |
1053 | ||
1054 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1055 | ac_prev=sbindir ;; | |
1056 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1057 | | --sbi=* | --sb=*) | |
bec39cab | 1058 | sbindir=$ac_optarg ;; |
d6e9fb05 JK |
1059 | |
1060 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1061 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1062 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1063 | | --sha | --sh) | |
1064 | ac_prev=sharedstatedir ;; | |
1065 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1066 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1067 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1068 | | --sha=* | --sh=*) | |
bec39cab | 1069 | sharedstatedir=$ac_optarg ;; |
d6e9fb05 JK |
1070 | |
1071 | -site | --site | --sit) | |
1072 | ac_prev=site ;; | |
1073 | -site=* | --site=* | --sit=*) | |
bec39cab | 1074 | site=$ac_optarg ;; |
434c4c77 | 1075 | |
d6e9fb05 JK |
1076 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1077 | ac_prev=srcdir ;; | |
1078 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1079 | srcdir=$ac_optarg ;; |
d6e9fb05 JK |
1080 | |
1081 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1082 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1083 | ac_prev=sysconfdir ;; | |
1084 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1085 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1086 | sysconfdir=$ac_optarg ;; |
d6e9fb05 JK |
1087 | |
1088 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1089 | ac_prev=target_alias ;; |
d6e9fb05 | 1090 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1091 | target_alias=$ac_optarg ;; |
d6e9fb05 JK |
1092 | |
1093 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1094 | verbose=yes ;; | |
1095 | ||
bec39cab AC |
1096 | -version | --version | --versio | --versi | --vers | -V) |
1097 | ac_init_version=: ;; | |
d6e9fb05 JK |
1098 | |
1099 | -with-* | --with-*) | |
81ecdfbb | 1100 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
d6e9fb05 | 1101 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1102 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1103 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1104 | ac_useropt_orig=$ac_useropt |
1105 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1106 | case $ac_user_opts in | |
1107 | *" | |
1108 | "with_$ac_useropt" | |
1109 | "*) ;; | |
1110 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1111 | ac_unrecognized_sep=', ';; | |
dae5f5cf | 1112 | esac |
81ecdfbb | 1113 | eval with_$ac_useropt=\$ac_optarg ;; |
d6e9fb05 JK |
1114 | |
1115 | -without-* | --without-*) | |
81ecdfbb | 1116 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
d6e9fb05 | 1117 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1118 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1119 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1120 | ac_useropt_orig=$ac_useropt |
1121 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1122 | case $ac_user_opts in | |
1123 | *" | |
1124 | "with_$ac_useropt" | |
1125 | "*) ;; | |
1126 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1127 | ac_unrecognized_sep=', ';; | |
1128 | esac | |
1129 | eval with_$ac_useropt=no ;; | |
d6e9fb05 JK |
1130 | |
1131 | --x) | |
1132 | # Obsolete; use --with-x. | |
1133 | with_x=yes ;; | |
1134 | ||
1135 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1136 | | --x-incl | --x-inc | --x-in | --x-i) | |
1137 | ac_prev=x_includes ;; | |
1138 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1139 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1140 | x_includes=$ac_optarg ;; |
d6e9fb05 JK |
1141 | |
1142 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1143 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1144 | ac_prev=x_libraries ;; | |
1145 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1146 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1147 | x_libraries=$ac_optarg ;; |
d6e9fb05 | 1148 | |
d0ac1c44 SM |
1149 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1150 | Try \`$0 --help' for more information" | |
d6e9fb05 JK |
1151 | ;; |
1152 | ||
bec39cab AC |
1153 | *=*) |
1154 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1155 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1156 | case $ac_envvar in #( |
1157 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1158 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1159 | esac |
1160 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1161 | export $ac_envvar ;; |
1162 | ||
d6e9fb05 | 1163 | *) |
bec39cab | 1164 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1165 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1166 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1167 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1168 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
d6e9fb05 JK |
1169 | ;; |
1170 | ||
1171 | esac | |
1172 | done | |
1173 | ||
1174 | if test -n "$ac_prev"; then | |
bec39cab | 1175 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1176 | as_fn_error $? "missing argument to $ac_option" |
d6e9fb05 | 1177 | fi |
d6e9fb05 | 1178 | |
81ecdfbb RW |
1179 | if test -n "$ac_unrecognized_opts"; then |
1180 | case $enable_option_checking in | |
1181 | no) ;; | |
d0ac1c44 | 1182 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1183 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
dae5f5cf | 1184 | esac |
81ecdfbb | 1185 | fi |
dae5f5cf | 1186 | |
81ecdfbb RW |
1187 | # Check all directory arguments for consistency. |
1188 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1189 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1190 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1191 | libdir localedir mandir | |
dae5f5cf | 1192 | do |
81ecdfbb RW |
1193 | eval ac_val=\$$ac_var |
1194 | # Remove trailing slashes. | |
1195 | case $ac_val in | |
1196 | */ ) | |
1197 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1198 | eval $ac_var=\$ac_val;; | |
1199 | esac | |
1200 | # Be sure to have absolute directory names. | |
dae5f5cf | 1201 | case $ac_val in |
81ecdfbb RW |
1202 | [\\/$]* | ?:[\\/]* ) continue;; |
1203 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
d6e9fb05 | 1204 | esac |
d0ac1c44 | 1205 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
d6e9fb05 JK |
1206 | done |
1207 | ||
bec39cab AC |
1208 | # There might be people who depend on the old broken behavior: `$host' |
1209 | # used to hold the argument of --host etc. | |
1210 | # FIXME: To remove some day. | |
1211 | build=$build_alias | |
1212 | host=$host_alias | |
1213 | target=$target_alias | |
1214 | ||
1215 | # FIXME: To remove some day. | |
1216 | if test "x$host_alias" != x; then | |
1217 | if test "x$build_alias" = x; then | |
1218 | cross_compiling=maybe | |
bec39cab AC |
1219 | elif test "x$build_alias" != "x$host_alias"; then |
1220 | cross_compiling=yes | |
1221 | fi | |
1222 | fi | |
d6e9fb05 | 1223 | |
bec39cab AC |
1224 | ac_tool_prefix= |
1225 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1226 | ||
1227 | test "$silent" = yes && exec 6>/dev/null | |
d6e9fb05 | 1228 | |
d6e9fb05 | 1229 | |
81ecdfbb RW |
1230 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1231 | ac_ls_di=`ls -di .` && | |
1232 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1233 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1234 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1235 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1236 | |
1237 | ||
d6e9fb05 JK |
1238 | # Find the source files, if location was not specified. |
1239 | if test -z "$srcdir"; then | |
1240 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1241 | # Try the directory containing this script, then the parent directory. |
1242 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1243 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1244 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1245 | X"$as_myself" : 'X\(//\)$' \| \ | |
1246 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1247 | $as_echo X"$as_myself" | | |
1248 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1249 | s//\1/ | |
1250 | q | |
1251 | } | |
1252 | /^X\(\/\/\)[^/].*/{ | |
1253 | s//\1/ | |
1254 | q | |
1255 | } | |
1256 | /^X\(\/\/\)$/{ | |
1257 | s//\1/ | |
1258 | q | |
1259 | } | |
1260 | /^X\(\/\).*/{ | |
1261 | s//\1/ | |
1262 | q | |
1263 | } | |
1264 | s/.*/./; q'` | |
d6e9fb05 | 1265 | srcdir=$ac_confdir |
81ecdfbb | 1266 | if test ! -r "$srcdir/$ac_unique_file"; then |
d6e9fb05 JK |
1267 | srcdir=.. |
1268 | fi | |
1269 | else | |
1270 | ac_srcdir_defaulted=no | |
1271 | fi | |
81ecdfbb RW |
1272 | if test ! -r "$srcdir/$ac_unique_file"; then |
1273 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1274 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1275 | fi |
1276 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1277 | ac_abs_confdir=`( | |
d0ac1c44 | 1278 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1279 | pwd)` |
1280 | # When building in place, set srcdir=. | |
1281 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1282 | srcdir=. | |
1283 | fi | |
1284 | # Remove unnecessary trailing slashes from srcdir. | |
1285 | # Double slashes in file names in object file debugging info | |
1286 | # mess up M-x gdb in Emacs. | |
1287 | case $srcdir in | |
1288 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1289 | esac | |
1290 | for ac_var in $ac_precious_vars; do | |
1291 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1292 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1293 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1294 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1295 | done | |
d6e9fb05 | 1296 | |
bec39cab AC |
1297 | # |
1298 | # Report the --help message. | |
1299 | # | |
1300 | if test "$ac_init_help" = "long"; then | |
1301 | # Omit some internal or obsolete options to make the list less imposing. | |
1302 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1303 | cat <<_ACEOF | |
1304 | \`configure' configures this package to adapt to many kinds of systems. | |
1305 | ||
1306 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1307 | ||
1308 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1309 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1310 | ||
1311 | Defaults for the options are specified in brackets. | |
1312 | ||
1313 | Configuration: | |
1314 | -h, --help display this help and exit | |
1315 | --help=short display options specific to this package | |
1316 | --help=recursive display the short help of all the included packages | |
1317 | -V, --version display version information and exit | |
d0ac1c44 | 1318 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1319 | --cache-file=FILE cache test results in FILE [disabled] |
1320 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1321 | -n, --no-create do not create output files | |
1322 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1323 | ||
bec39cab AC |
1324 | Installation directories: |
1325 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1326 | [$ac_default_prefix] |
bec39cab | 1327 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1328 | [PREFIX] |
bec39cab AC |
1329 | |
1330 | By default, \`make install' will install all the files in | |
1331 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1332 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1333 | for instance \`--prefix=\$HOME'. | |
1334 | ||
1335 | For better control, use the options below. | |
1336 | ||
1337 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1338 | --bindir=DIR user executables [EPREFIX/bin] |
1339 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1340 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1341 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1342 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1343 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1344 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1345 | --includedir=DIR C header files [PREFIX/include] | |
1346 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1347 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1348 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1349 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1350 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1351 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1352 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1353 | --htmldir=DIR html documentation [DOCDIR] | |
1354 | --dvidir=DIR dvi documentation [DOCDIR] | |
1355 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1356 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1357 | _ACEOF |
1358 | ||
1359 | cat <<\_ACEOF | |
1360 | ||
dcdb98d2 DJ |
1361 | Program names: |
1362 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1363 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1364 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1365 | ||
bec39cab AC |
1366 | System types: |
1367 | --build=BUILD configure for building on BUILD [guessed] | |
1368 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1369 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1370 | _ACEOF | |
1371 | fi | |
1372 | ||
1373 | if test -n "$ac_init_help"; then | |
1374 | ||
1375 | cat <<\_ACEOF | |
1376 | ||
d4596a3d PA |
1377 | Optional Features: |
1378 | --disable-option-checking ignore unrecognized --enable/--with options | |
1379 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1380 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1381 | --enable-maintainer-mode |
1382 | enable make rules and dependencies not useful (and | |
1383 | sometimes confusing) to the casual installer | |
589bc927 | 1384 | --disable-largefile omit support for large files |
8ecfd7bd SDJ |
1385 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1386 | GDB | |
05ea2a05 | 1387 | --disable-rpath do not hardcode runtime library paths |
d4596a3d | 1388 | --enable-werror treat compile warnings as errors |
8f13a3ce MF |
1389 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
1390 | --enable-gdb-build-warnings | |
1391 | enable GDB specific build-time compiler warnings if | |
1392 | gcc is used | |
c2a66c29 NS |
1393 | --enable-inprocess-agent |
1394 | inprocess agent | |
d4596a3d | 1395 | |
c16158bc JM |
1396 | Optional Packages: |
1397 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1398 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
05ea2a05 TT |
1399 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
1400 | --with-gnu-ld assume the C compiler uses GNU ld default=no | |
1401 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib | |
1402 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
0fb4aa4b PA |
1403 | --with-ust=PATH Specify prefix directory for the installed UST package |
1404 | Equivalent to --with-ust-include=PATH/include | |
1405 | plus --with-ust-lib=PATH/lib | |
1406 | --with-ust-include=PATH Specify directory for installed UST include files | |
1407 | --with-ust-lib=PATH Specify the directory for the installed UST library | |
c16158bc JM |
1408 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1409 | --with-bugurl=URL Direct users to URL to report a bug | |
96f15937 PP |
1410 | --with-libthread-db=PATH |
1411 | use given libthread_db directly | |
c16158bc | 1412 | |
bec39cab AC |
1413 | Some influential environment variables: |
1414 | CC C compiler command | |
1415 | CFLAGS C compiler flags | |
1416 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1417 | nonstandard directory <lib dir> | |
81ecdfbb | 1418 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1419 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1420 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1421 | CXX C++ compiler command |
1422 | CXXFLAGS C++ compiler flags | |
bec39cab AC |
1423 | CPP C preprocessor |
1424 | ||
1425 | Use these variables to override the choices made by `configure' or to help | |
1426 | it to find libraries and programs with nonstandard names/locations. | |
1427 | ||
81ecdfbb | 1428 | Report bugs to the package provider. |
bec39cab | 1429 | _ACEOF |
81ecdfbb | 1430 | ac_status=$? |
bec39cab AC |
1431 | fi |
1432 | ||
1433 | if test "$ac_init_help" = "recursive"; then | |
1434 | # If there are subdirs, report their specific --help. | |
bec39cab | 1435 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1436 | test -d "$ac_dir" || |
1437 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1438 | continue | |
bec39cab AC |
1439 | ac_builddir=. |
1440 | ||
81ecdfbb RW |
1441 | case "$ac_dir" in |
1442 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1443 | *) | |
1444 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1445 | # A ".." for each directory in $ac_dir_suffix. | |
1446 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1447 | case $ac_top_builddir_sub in | |
1448 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1449 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1450 | esac ;; | |
1451 | esac | |
1452 | ac_abs_top_builddir=$ac_pwd | |
1453 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1454 | # for backward compatibility: | |
1455 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1456 | |
1457 | case $srcdir in | |
81ecdfbb | 1458 | .) # We are building in place. |
bec39cab | 1459 | ac_srcdir=. |
81ecdfbb RW |
1460 | ac_top_srcdir=$ac_top_builddir_sub |
1461 | ac_abs_top_srcdir=$ac_pwd ;; | |
1462 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1463 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1464 | ac_top_srcdir=$srcdir |
1465 | ac_abs_top_srcdir=$srcdir ;; | |
1466 | *) # Relative name. | |
1467 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1468 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1469 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
dae5f5cf | 1470 | esac |
81ecdfbb RW |
1471 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1472 | ||
1473 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1474 | # Check for guested configure. | |
1475 | if test -f "$ac_srcdir/configure.gnu"; then | |
1476 | echo && | |
1477 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1478 | elif test -f "$ac_srcdir/configure"; then | |
1479 | echo && | |
1480 | $SHELL "$ac_srcdir/configure" --help=recursive | |
434c4c77 | 1481 | else |
81ecdfbb RW |
1482 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1483 | fi || ac_status=$? | |
1484 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1485 | done |
1486 | fi | |
1487 | ||
81ecdfbb | 1488 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1489 | if $ac_init_version; then |
1490 | cat <<\_ACEOF | |
81ecdfbb | 1491 | configure |
d0ac1c44 | 1492 | generated by GNU Autoconf 2.69 |
bec39cab | 1493 | |
d0ac1c44 | 1494 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1495 | This configure script is free software; the Free Software Foundation |
1496 | gives unlimited permission to copy, distribute and modify it. | |
1497 | _ACEOF | |
81ecdfbb | 1498 | exit |
bec39cab | 1499 | fi |
bec39cab | 1500 | |
81ecdfbb RW |
1501 | ## ------------------------ ## |
1502 | ## Autoconf initialization. ## | |
1503 | ## ------------------------ ## | |
bec39cab | 1504 | |
81ecdfbb RW |
1505 | # ac_fn_c_try_compile LINENO |
1506 | # -------------------------- | |
1507 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1508 | ac_fn_c_try_compile () | |
bec39cab | 1509 | { |
81ecdfbb RW |
1510 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1511 | rm -f conftest.$ac_objext | |
1512 | if { { ac_try="$ac_compile" | |
1513 | case "(($ac_try" in | |
1514 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1515 | *) ac_try_echo=$ac_try;; | |
1516 | esac | |
1517 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1518 | $as_echo "$ac_try_echo"; } >&5 | |
1519 | (eval "$ac_compile") 2>conftest.err | |
1520 | ac_status=$? | |
1521 | if test -s conftest.err; then | |
1522 | grep -v '^ *+' conftest.err >conftest.er1 | |
1523 | cat conftest.er1 >&5 | |
1524 | mv -f conftest.er1 conftest.err | |
1525 | fi | |
1526 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1527 | test $ac_status = 0; } && { | |
1528 | test -z "$ac_c_werror_flag" || | |
1529 | test ! -s conftest.err | |
1530 | } && test -s conftest.$ac_objext; then : | |
1531 | ac_retval=0 | |
1532 | else | |
1533 | $as_echo "$as_me: failed program was:" >&5 | |
1534 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1535 | |
81ecdfbb RW |
1536 | ac_retval=1 |
1537 | fi | |
d0ac1c44 SM |
1538 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1539 | as_fn_set_status $ac_retval | |
bec39cab | 1540 | |
81ecdfbb | 1541 | } # ac_fn_c_try_compile |
bec39cab | 1542 | |
3bc3d82a PA |
1543 | # ac_fn_cxx_try_compile LINENO |
1544 | # ---------------------------- | |
1545 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1546 | ac_fn_cxx_try_compile () | |
1547 | { | |
1548 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1549 | rm -f conftest.$ac_objext | |
1550 | if { { ac_try="$ac_compile" | |
1551 | case "(($ac_try" in | |
1552 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1553 | *) ac_try_echo=$ac_try;; | |
1554 | esac | |
1555 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1556 | $as_echo "$ac_try_echo"; } >&5 | |
1557 | (eval "$ac_compile") 2>conftest.err | |
1558 | ac_status=$? | |
1559 | if test -s conftest.err; then | |
1560 | grep -v '^ *+' conftest.err >conftest.er1 | |
1561 | cat conftest.er1 >&5 | |
1562 | mv -f conftest.er1 conftest.err | |
1563 | fi | |
1564 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1565 | test $ac_status = 0; } && { | |
1566 | test -z "$ac_cxx_werror_flag" || | |
1567 | test ! -s conftest.err | |
1568 | } && test -s conftest.$ac_objext; then : | |
1569 | ac_retval=0 | |
1570 | else | |
1571 | $as_echo "$as_me: failed program was:" >&5 | |
1572 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1573 | ||
1574 | ac_retval=1 | |
1575 | fi | |
d0ac1c44 SM |
1576 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1577 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1578 | |
1579 | } # ac_fn_cxx_try_compile | |
1580 | ||
81ecdfbb RW |
1581 | # ac_fn_c_try_cpp LINENO |
1582 | # ---------------------- | |
1583 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1584 | ac_fn_c_try_cpp () | |
1585 | { | |
1586 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1587 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1588 | case "(($ac_try" in | |
1589 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1590 | *) ac_try_echo=$ac_try;; | |
1591 | esac | |
1592 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1593 | $as_echo "$ac_try_echo"; } >&5 | |
1594 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1595 | ac_status=$? | |
1596 | if test -s conftest.err; then | |
1597 | grep -v '^ *+' conftest.err >conftest.er1 | |
1598 | cat conftest.er1 >&5 | |
1599 | mv -f conftest.er1 conftest.err | |
1600 | fi | |
1601 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1602 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1603 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1604 | test ! -s conftest.err | |
1605 | }; then : | |
1606 | ac_retval=0 | |
1607 | else | |
1608 | $as_echo "$as_me: failed program was:" >&5 | |
1609 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1610 | |
81ecdfbb RW |
1611 | ac_retval=1 |
1612 | fi | |
d0ac1c44 SM |
1613 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1614 | as_fn_set_status $ac_retval | |
bec39cab | 1615 | |
81ecdfbb RW |
1616 | } # ac_fn_c_try_cpp |
1617 | ||
1618 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1619 | # ------------------------------------------------------- | |
1620 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1621 | # the include files in INCLUDES and setting the cache variable VAR | |
1622 | # accordingly. | |
1623 | ac_fn_c_check_header_mongrel () | |
1624 | { | |
1625 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1626 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1628 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1629 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1630 | $as_echo_n "(cached) " >&6 |
1631 | fi | |
1632 | eval ac_res=\$$3 | |
1633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1634 | $as_echo "$ac_res" >&6; } | |
1635 | else | |
1636 | # Is the header compilable? | |
1637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1638 | $as_echo_n "checking $2 usability... " >&6; } | |
1639 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1640 | /* end confdefs.h. */ | |
1641 | $4 | |
1642 | #include <$2> | |
1643 | _ACEOF | |
1644 | if ac_fn_c_try_compile "$LINENO"; then : | |
1645 | ac_header_compiler=yes | |
1646 | else | |
1647 | ac_header_compiler=no | |
1648 | fi | |
1649 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1651 | $as_echo "$ac_header_compiler" >&6; } | |
1652 | ||
1653 | # Is the header present? | |
1654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1655 | $as_echo_n "checking $2 presence... " >&6; } | |
1656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1657 | /* end confdefs.h. */ | |
1658 | #include <$2> | |
1659 | _ACEOF | |
1660 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1661 | ac_header_preproc=yes | |
1662 | else | |
1663 | ac_header_preproc=no | |
1664 | fi | |
d0ac1c44 | 1665 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1667 | $as_echo "$ac_header_preproc" >&6; } | |
1668 | ||
1669 | # So? What about this header? | |
1670 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1671 | yes:no: ) | |
1672 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1673 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1674 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1675 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1676 | ;; | |
1677 | no:yes:* ) | |
1678 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1679 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1680 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1681 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1682 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1683 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1684 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1685 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1686 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1687 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1688 | ;; | |
1689 | esac | |
1690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1691 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1692 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1693 | $as_echo_n "(cached) " >&6 |
1694 | else | |
1695 | eval "$3=\$ac_header_compiler" | |
1696 | fi | |
1697 | eval ac_res=\$$3 | |
1698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1699 | $as_echo "$ac_res" >&6; } | |
1700 | fi | |
d0ac1c44 | 1701 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1702 | |
1703 | } # ac_fn_c_check_header_mongrel | |
1704 | ||
1705 | # ac_fn_c_try_run LINENO | |
1706 | # ---------------------- | |
1707 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1708 | # that executables *can* be run. | |
1709 | ac_fn_c_try_run () | |
1710 | { | |
1711 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1712 | if { { ac_try="$ac_link" | |
1713 | case "(($ac_try" in | |
1714 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1715 | *) ac_try_echo=$ac_try;; | |
1716 | esac | |
1717 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1718 | $as_echo "$ac_try_echo"; } >&5 | |
1719 | (eval "$ac_link") 2>&5 | |
1720 | ac_status=$? | |
1721 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1722 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1723 | { { case "(($ac_try" in | |
1724 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1725 | *) ac_try_echo=$ac_try;; | |
1726 | esac | |
1727 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1728 | $as_echo "$ac_try_echo"; } >&5 | |
1729 | (eval "$ac_try") 2>&5 | |
1730 | ac_status=$? | |
1731 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1732 | test $ac_status = 0; }; }; then : | |
1733 | ac_retval=0 | |
1734 | else | |
1735 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1736 | $as_echo "$as_me: failed program was:" >&5 | |
1737 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1738 | ||
1739 | ac_retval=$ac_status | |
1740 | fi | |
1741 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
1742 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1743 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1744 | |
1745 | } # ac_fn_c_try_run | |
1746 | ||
1747 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1748 | # ------------------------------------------------------- | |
1749 | # Tests whether HEADER exists and can be compiled using the include files in | |
1750 | # INCLUDES, setting the cache variable VAR accordingly. | |
1751 | ac_fn_c_check_header_compile () | |
1752 | { | |
1753 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1755 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1756 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1757 | $as_echo_n "(cached) " >&6 |
1758 | else | |
1759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1760 | /* end confdefs.h. */ | |
1761 | $4 | |
1762 | #include <$2> | |
1763 | _ACEOF | |
1764 | if ac_fn_c_try_compile "$LINENO"; then : | |
1765 | eval "$3=yes" | |
1766 | else | |
1767 | eval "$3=no" | |
1768 | fi | |
1769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1770 | fi | |
1771 | eval ac_res=\$$3 | |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1773 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1774 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1775 | |
1776 | } # ac_fn_c_check_header_compile | |
1777 | ||
eb0edac8 GB |
1778 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
1779 | # ------------------------------------------- | |
1780 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1781 | # variable VAR accordingly. | |
1782 | ac_fn_c_check_type () | |
1783 | { | |
1784 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1786 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1787 | if eval \${$3+:} false; then : |
eb0edac8 GB |
1788 | $as_echo_n "(cached) " >&6 |
1789 | else | |
1790 | eval "$3=no" | |
1791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1792 | /* end confdefs.h. */ | |
1793 | $4 | |
1794 | int | |
1795 | main () | |
1796 | { | |
1797 | if (sizeof ($2)) | |
1798 | return 0; | |
1799 | ; | |
1800 | return 0; | |
1801 | } | |
1802 | _ACEOF | |
1803 | if ac_fn_c_try_compile "$LINENO"; then : | |
1804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1805 | /* end confdefs.h. */ | |
1806 | $4 | |
1807 | int | |
1808 | main () | |
1809 | { | |
1810 | if (sizeof (($2))) | |
1811 | return 0; | |
1812 | ; | |
1813 | return 0; | |
1814 | } | |
1815 | _ACEOF | |
1816 | if ac_fn_c_try_compile "$LINENO"; then : | |
1817 | ||
1818 | else | |
1819 | eval "$3=yes" | |
1820 | fi | |
1821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1822 | fi | |
1823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1824 | fi | |
1825 | eval ac_res=\$$3 | |
1826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1827 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1828 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
eb0edac8 GB |
1829 | |
1830 | } # ac_fn_c_check_type | |
1831 | ||
404f2902 FCE |
1832 | # ac_fn_c_try_link LINENO |
1833 | # ----------------------- | |
1834 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1835 | ac_fn_c_try_link () | |
1836 | { | |
1837 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1838 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1839 | if { { ac_try="$ac_link" | |
1840 | case "(($ac_try" in | |
1841 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1842 | *) ac_try_echo=$ac_try;; | |
1843 | esac | |
1844 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1845 | $as_echo "$ac_try_echo"; } >&5 | |
1846 | (eval "$ac_link") 2>conftest.err | |
1847 | ac_status=$? | |
1848 | if test -s conftest.err; then | |
1849 | grep -v '^ *+' conftest.err >conftest.er1 | |
1850 | cat conftest.er1 >&5 | |
1851 | mv -f conftest.er1 conftest.err | |
1852 | fi | |
1853 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1854 | test $ac_status = 0; } && { | |
1855 | test -z "$ac_c_werror_flag" || | |
1856 | test ! -s conftest.err | |
1857 | } && test -s conftest$ac_exeext && { | |
1858 | test "$cross_compiling" = yes || | |
1859 | test -x conftest$ac_exeext | |
1860 | }; then : | |
1861 | ac_retval=0 | |
1862 | else | |
1863 | $as_echo "$as_me: failed program was:" >&5 | |
1864 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1865 | ||
1866 | ac_retval=1 | |
1867 | fi | |
1868 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1869 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1870 | # interfere with the next link command; also delete a directory that is | |
1871 | # left behind by Apple's compiler. We do this before executing the actions. | |
1872 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1873 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1874 | as_fn_set_status $ac_retval | |
1875 | ||
1876 | } # ac_fn_c_try_link | |
1877 | ||
81ecdfbb RW |
1878 | # ac_fn_c_check_func LINENO FUNC VAR |
1879 | # ---------------------------------- | |
1880 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1881 | ac_fn_c_check_func () | |
1882 | { | |
1883 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1885 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1886 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1887 | $as_echo_n "(cached) " >&6 |
1888 | else | |
1889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1890 | /* end confdefs.h. */ | |
1891 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1892 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1893 | #define $2 innocuous_$2 | |
1894 | ||
1895 | /* System header to define __stub macros and hopefully few prototypes, | |
1896 | which can conflict with char $2 (); below. | |
1897 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1898 | <limits.h> exists even on freestanding compilers. */ | |
1899 | ||
1900 | #ifdef __STDC__ | |
1901 | # include <limits.h> | |
1902 | #else | |
1903 | # include <assert.h> | |
1904 | #endif | |
1905 | ||
1906 | #undef $2 | |
1907 | ||
1908 | /* Override any GCC internal prototype to avoid an error. | |
1909 | Use char because int might match the return type of a GCC | |
1910 | builtin and then its argument prototype would still apply. */ | |
1911 | #ifdef __cplusplus | |
1912 | extern "C" | |
1913 | #endif | |
1914 | char $2 (); | |
1915 | /* The GNU C library defines this for functions which it implements | |
1916 | to always fail with ENOSYS. Some functions are actually named | |
1917 | something starting with __ and the normal name is an alias. */ | |
1918 | #if defined __stub_$2 || defined __stub___$2 | |
1919 | choke me | |
1920 | #endif | |
1921 | ||
1922 | int | |
1923 | main () | |
1924 | { | |
1925 | return $2 (); | |
1926 | ; | |
1927 | return 0; | |
1928 | } | |
1929 | _ACEOF | |
1930 | if ac_fn_c_try_link "$LINENO"; then : | |
1931 | eval "$3=yes" | |
1932 | else | |
1933 | eval "$3=no" | |
1934 | fi | |
1935 | rm -f core conftest.err conftest.$ac_objext \ | |
1936 | conftest$ac_exeext conftest.$ac_ext | |
1937 | fi | |
1938 | eval ac_res=\$$3 | |
1939 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1940 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1941 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1942 | |
1943 | } # ac_fn_c_check_func | |
1944 | ||
d0ac1c44 SM |
1945 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
1946 | # --------------------------------------------- | |
1947 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
1948 | # accordingly. | |
81ecdfbb RW |
1949 | ac_fn_c_check_decl () |
1950 | { | |
1951 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
0fb4aa4b PA |
1952 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
1953 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
1954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
1955 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d0ac1c44 | 1956 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1957 | $as_echo_n "(cached) " >&6 |
1958 | else | |
1959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1960 | /* end confdefs.h. */ | |
1961 | $4 | |
1962 | int | |
1963 | main () | |
1964 | { | |
0fb4aa4b PA |
1965 | #ifndef $as_decl_name |
1966 | #ifdef __cplusplus | |
1967 | (void) $as_decl_use; | |
1968 | #else | |
1969 | (void) $as_decl_name; | |
1970 | #endif | |
81ecdfbb RW |
1971 | #endif |
1972 | ||
1973 | ; | |
1974 | return 0; | |
1975 | } | |
1976 | _ACEOF | |
1977 | if ac_fn_c_try_compile "$LINENO"; then : | |
1978 | eval "$3=yes" | |
1979 | else | |
1980 | eval "$3=no" | |
1981 | fi | |
1982 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1983 | fi | |
1984 | eval ac_res=\$$3 | |
1985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1986 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 1987 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
81ecdfbb RW |
1988 | |
1989 | } # ac_fn_c_check_decl | |
1990 | ||
05ea2a05 TT |
1991 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
1992 | # ---------------------------------------------------- | |
1993 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
1994 | # INCLUDES, setting cache variable VAR accordingly. | |
1995 | ac_fn_c_check_member () | |
1996 | { | |
1997 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
1999 | $as_echo_n "checking for $2.$3... " >&6; } | |
2000 | if eval \${$4+:} false; then : | |
2001 | $as_echo_n "(cached) " >&6 | |
2002 | else | |
2003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2004 | /* end confdefs.h. */ | |
2005 | $5 | |
2006 | int | |
2007 | main () | |
2008 | { | |
2009 | static $2 ac_aggr; | |
2010 | if (ac_aggr.$3) | |
2011 | return 0; | |
2012 | ; | |
2013 | return 0; | |
2014 | } | |
2015 | _ACEOF | |
2016 | if ac_fn_c_try_compile "$LINENO"; then : | |
2017 | eval "$4=yes" | |
2018 | else | |
2019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2020 | /* end confdefs.h. */ | |
2021 | $5 | |
2022 | int | |
2023 | main () | |
2024 | { | |
2025 | static $2 ac_aggr; | |
2026 | if (sizeof ac_aggr.$3) | |
2027 | return 0; | |
2028 | ; | |
2029 | return 0; | |
2030 | } | |
2031 | _ACEOF | |
2032 | if ac_fn_c_try_compile "$LINENO"; then : | |
2033 | eval "$4=yes" | |
2034 | else | |
2035 | eval "$4=no" | |
2036 | fi | |
2037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2038 | fi | |
2039 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2040 | fi | |
2041 | eval ac_res=\$$4 | |
2042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2043 | $as_echo "$ac_res" >&6; } | |
2044 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2045 | ||
2046 | } # ac_fn_c_check_member | |
2047 | ||
21987b9c TT |
2048 | # ac_fn_cxx_try_link LINENO |
2049 | # ------------------------- | |
2050 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2051 | ac_fn_cxx_try_link () | |
2052 | { | |
2053 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2054 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2055 | if { { ac_try="$ac_link" | |
2056 | case "(($ac_try" in | |
2057 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2058 | *) ac_try_echo=$ac_try;; | |
2059 | esac | |
2060 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2061 | $as_echo "$ac_try_echo"; } >&5 | |
2062 | (eval "$ac_link") 2>conftest.err | |
2063 | ac_status=$? | |
2064 | if test -s conftest.err; then | |
2065 | grep -v '^ *+' conftest.err >conftest.er1 | |
2066 | cat conftest.er1 >&5 | |
2067 | mv -f conftest.er1 conftest.err | |
2068 | fi | |
2069 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2070 | test $ac_status = 0; } && { | |
2071 | test -z "$ac_cxx_werror_flag" || | |
2072 | test ! -s conftest.err | |
2073 | } && test -s conftest$ac_exeext && { | |
2074 | test "$cross_compiling" = yes || | |
2075 | test -x conftest$ac_exeext | |
2076 | }; then : | |
2077 | ac_retval=0 | |
2078 | else | |
2079 | $as_echo "$as_me: failed program was:" >&5 | |
2080 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2081 | ||
2082 | ac_retval=1 | |
2083 | fi | |
2084 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2085 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2086 | # interfere with the next link command; also delete a directory that is | |
2087 | # left behind by Apple's compiler. We do this before executing the actions. | |
2088 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2089 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2090 | as_fn_set_status $ac_retval | |
2091 | ||
2092 | } # ac_fn_cxx_try_link | |
2093 | ||
2094 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2095 | # ------------------------------------ | |
2096 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2097 | ac_fn_cxx_check_func () | |
2098 | { | |
2099 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2101 | $as_echo_n "checking for $2... " >&6; } | |
2102 | if eval \${$3+:} false; then : | |
2103 | $as_echo_n "(cached) " >&6 | |
2104 | else | |
2105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2106 | /* end confdefs.h. */ | |
2107 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2108 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2109 | #define $2 innocuous_$2 | |
2110 | ||
2111 | /* System header to define __stub macros and hopefully few prototypes, | |
2112 | which can conflict with char $2 (); below. | |
2113 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2114 | <limits.h> exists even on freestanding compilers. */ | |
2115 | ||
2116 | #ifdef __STDC__ | |
2117 | # include <limits.h> | |
2118 | #else | |
2119 | # include <assert.h> | |
2120 | #endif | |
2121 | ||
2122 | #undef $2 | |
2123 | ||
2124 | /* Override any GCC internal prototype to avoid an error. | |
2125 | Use char because int might match the return type of a GCC | |
2126 | builtin and then its argument prototype would still apply. */ | |
2127 | #ifdef __cplusplus | |
2128 | extern "C" | |
2129 | #endif | |
2130 | char $2 (); | |
2131 | /* The GNU C library defines this for functions which it implements | |
2132 | to always fail with ENOSYS. Some functions are actually named | |
2133 | something starting with __ and the normal name is an alias. */ | |
2134 | #if defined __stub_$2 || defined __stub___$2 | |
2135 | choke me | |
2136 | #endif | |
2137 | ||
2138 | int | |
2139 | main () | |
2140 | { | |
2141 | return $2 (); | |
2142 | ; | |
2143 | return 0; | |
2144 | } | |
2145 | _ACEOF | |
2146 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2147 | eval "$3=yes" | |
2148 | else | |
2149 | eval "$3=no" | |
2150 | fi | |
2151 | rm -f core conftest.err conftest.$ac_objext \ | |
2152 | conftest$ac_exeext conftest.$ac_ext | |
2153 | fi | |
2154 | eval ac_res=\$$3 | |
2155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2156 | $as_echo "$ac_res" >&6; } | |
2157 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2158 | ||
2159 | } # ac_fn_cxx_check_func | |
2160 | ||
07697489 PA |
2161 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2162 | # -------------------------------------------- | |
2163 | # Tries to find the compile-time value of EXPR in a program that includes | |
2164 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2165 | # computed | |
2166 | ac_fn_c_compute_int () | |
2167 | { | |
2168 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2169 | if test "$cross_compiling" = yes; then | |
2170 | # Depending upon the size, compute the lo and hi bounds. | |
2171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2172 | /* end confdefs.h. */ | |
2173 | $4 | |
2174 | int | |
2175 | main () | |
2176 | { | |
2177 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2178 | test_array [0] = 0; |
2179 | return test_array [0]; | |
07697489 PA |
2180 | |
2181 | ; | |
2182 | return 0; | |
2183 | } | |
2184 | _ACEOF | |
2185 | if ac_fn_c_try_compile "$LINENO"; then : | |
2186 | ac_lo=0 ac_mid=0 | |
2187 | while :; do | |
2188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2189 | /* end confdefs.h. */ | |
2190 | $4 | |
2191 | int | |
2192 | main () | |
2193 | { | |
2194 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2195 | test_array [0] = 0; |
2196 | return test_array [0]; | |
07697489 PA |
2197 | |
2198 | ; | |
2199 | return 0; | |
2200 | } | |
2201 | _ACEOF | |
2202 | if ac_fn_c_try_compile "$LINENO"; then : | |
2203 | ac_hi=$ac_mid; break | |
2204 | else | |
2205 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2206 | if test $ac_lo -le $ac_mid; then | |
2207 | ac_lo= ac_hi= | |
2208 | break | |
2209 | fi | |
2210 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2211 | fi | |
2212 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2213 | done | |
2214 | else | |
2215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2216 | /* end confdefs.h. */ | |
2217 | $4 | |
2218 | int | |
2219 | main () | |
2220 | { | |
2221 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2222 | test_array [0] = 0; |
2223 | return test_array [0]; | |
07697489 PA |
2224 | |
2225 | ; | |
2226 | return 0; | |
2227 | } | |
2228 | _ACEOF | |
2229 | if ac_fn_c_try_compile "$LINENO"; then : | |
2230 | ac_hi=-1 ac_mid=-1 | |
2231 | while :; do | |
2232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2233 | /* end confdefs.h. */ | |
2234 | $4 | |
2235 | int | |
2236 | main () | |
2237 | { | |
2238 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2239 | test_array [0] = 0; |
2240 | return test_array [0]; | |
07697489 PA |
2241 | |
2242 | ; | |
2243 | return 0; | |
2244 | } | |
2245 | _ACEOF | |
2246 | if ac_fn_c_try_compile "$LINENO"; then : | |
2247 | ac_lo=$ac_mid; break | |
2248 | else | |
2249 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2250 | if test $ac_mid -le $ac_hi; then | |
2251 | ac_lo= ac_hi= | |
2252 | break | |
2253 | fi | |
2254 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2255 | fi | |
2256 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2257 | done | |
2258 | else | |
2259 | ac_lo= ac_hi= | |
2260 | fi | |
2261 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2262 | fi | |
2263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2264 | # Binary search between lo and hi bounds. | |
2265 | while test "x$ac_lo" != "x$ac_hi"; do | |
2266 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2268 | /* end confdefs.h. */ | |
2269 | $4 | |
2270 | int | |
2271 | main () | |
2272 | { | |
2273 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2274 | test_array [0] = 0; |
2275 | return test_array [0]; | |
07697489 PA |
2276 | |
2277 | ; | |
2278 | return 0; | |
2279 | } | |
2280 | _ACEOF | |
2281 | if ac_fn_c_try_compile "$LINENO"; then : | |
2282 | ac_hi=$ac_mid | |
2283 | else | |
2284 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2285 | fi | |
2286 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2287 | done | |
2288 | case $ac_lo in #(( | |
2289 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2290 | '') ac_retval=1 ;; | |
2291 | esac | |
2292 | else | |
2293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2294 | /* end confdefs.h. */ | |
2295 | $4 | |
2296 | static long int longval () { return $2; } | |
2297 | static unsigned long int ulongval () { return $2; } | |
2298 | #include <stdio.h> | |
2299 | #include <stdlib.h> | |
2300 | int | |
2301 | main () | |
2302 | { | |
2303 | ||
2304 | FILE *f = fopen ("conftest.val", "w"); | |
2305 | if (! f) | |
2306 | return 1; | |
2307 | if (($2) < 0) | |
2308 | { | |
2309 | long int i = longval (); | |
2310 | if (i != ($2)) | |
2311 | return 1; | |
2312 | fprintf (f, "%ld", i); | |
2313 | } | |
2314 | else | |
2315 | { | |
2316 | unsigned long int i = ulongval (); | |
2317 | if (i != ($2)) | |
2318 | return 1; | |
2319 | fprintf (f, "%lu", i); | |
2320 | } | |
2321 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2322 | on some platforms. */ | |
2323 | return ferror (f) || fclose (f) != 0; | |
2324 | ||
2325 | ; | |
2326 | return 0; | |
2327 | } | |
2328 | _ACEOF | |
2329 | if ac_fn_c_try_run "$LINENO"; then : | |
2330 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2331 | else | |
2332 | ac_retval=1 | |
2333 | fi | |
2334 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2335 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2336 | rm -f conftest.val | |
2337 | ||
2338 | fi | |
d0ac1c44 SM |
2339 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2340 | as_fn_set_status $ac_retval | |
07697489 PA |
2341 | |
2342 | } # ac_fn_c_compute_int | |
81ecdfbb RW |
2343 | cat >config.log <<_ACEOF |
2344 | This file contains any messages produced by compilers while | |
2345 | running configure, to aid debugging if configure makes a mistake. | |
2346 | ||
2347 | It was created by $as_me, which was | |
d0ac1c44 | 2348 | generated by GNU Autoconf 2.69. Invocation command line was |
81ecdfbb RW |
2349 | |
2350 | $ $0 $@ | |
2351 | ||
2352 | _ACEOF | |
2353 | exec 5>>config.log | |
2354 | { | |
2355 | cat <<_ASUNAME | |
2356 | ## --------- ## | |
2357 | ## Platform. ## | |
2358 | ## --------- ## | |
2359 | ||
2360 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
2361 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2362 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2363 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2364 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2365 | ||
2366 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
2367 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2368 | ||
2369 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
2370 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2371 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2372 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2373 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2374 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2375 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2376 | ||
2377 | _ASUNAME | |
2378 | ||
2379 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2380 | for as_dir in $PATH | |
2381 | do | |
2382 | IFS=$as_save_IFS | |
2383 | test -z "$as_dir" && as_dir=. | |
2384 | $as_echo "PATH: $as_dir" | |
2385 | done | |
2386 | IFS=$as_save_IFS | |
2387 | ||
2388 | } >&5 | |
2389 | ||
2390 | cat >&5 <<_ACEOF | |
2391 | ||
2392 | ||
2393 | ## ----------- ## | |
2394 | ## Core tests. ## | |
2395 | ## ----------- ## | |
bec39cab AC |
2396 | |
2397 | _ACEOF | |
2398 | ||
2399 | ||
2400 | # Keep a trace of the command line. | |
2401 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2402 | # Strip out --silent because we don't want to record it for future runs. | |
2403 | # Also quote any args containing shell meta-characters. | |
2404 | # Make two passes to allow for proper duplicate-argument suppression. | |
2405 | ac_configure_args= | |
2406 | ac_configure_args0= | |
2407 | ac_configure_args1= | |
bec39cab AC |
2408 | ac_must_keep_next=false |
2409 | for ac_pass in 1 2 | |
2410 | do | |
2411 | for ac_arg | |
2412 | do | |
2413 | case $ac_arg in | |
2414 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2415 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2416 | | -silent | --silent | --silen | --sile | --sil) | |
2417 | continue ;; | |
81ecdfbb RW |
2418 | *\'*) |
2419 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
bec39cab AC |
2420 | esac |
2421 | case $ac_pass in | |
81ecdfbb | 2422 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
bec39cab | 2423 | 2) |
81ecdfbb | 2424 | as_fn_append ac_configure_args1 " '$ac_arg'" |
bec39cab AC |
2425 | if test $ac_must_keep_next = true; then |
2426 | ac_must_keep_next=false # Got value, back to normal. | |
2427 | else | |
2428 | case $ac_arg in | |
2429 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2430 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2431 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2432 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2433 | case "$ac_configure_args0 " in | |
2434 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2435 | esac | |
2436 | ;; | |
2437 | -* ) ac_must_keep_next=true ;; | |
2438 | esac | |
2439 | fi | |
81ecdfbb | 2440 | as_fn_append ac_configure_args " '$ac_arg'" |
bec39cab AC |
2441 | ;; |
2442 | esac | |
2443 | done | |
2444 | done | |
81ecdfbb RW |
2445 | { ac_configure_args0=; unset ac_configure_args0;} |
2446 | { ac_configure_args1=; unset ac_configure_args1;} | |
bec39cab AC |
2447 | |
2448 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2449 | # config.log. We remove comments because anyway the quotes in there | |
2450 | # would cause problems or look ugly. | |
81ecdfbb RW |
2451 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
2452 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
bec39cab AC |
2453 | trap 'exit_status=$? |
2454 | # Save into config.log some information that might help in debugging. | |
2455 | { | |
2456 | echo | |
2457 | ||
d0ac1c44 | 2458 | $as_echo "## ---------------- ## |
bec39cab | 2459 | ## Cache variables. ## |
d0ac1c44 | 2460 | ## ---------------- ##" |
bec39cab AC |
2461 | echo |
2462 | # The following way of writing the cache mishandles newlines in values, | |
81ecdfbb RW |
2463 | ( |
2464 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2465 | eval ac_val=\$$ac_var | |
2466 | case $ac_val in #( | |
2467 | *${as_nl}*) | |
2468 | case $ac_var in #( | |
2469 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2470 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2471 | esac | |
2472 | case $ac_var in #( | |
2473 | _ | IFS | as_nl) ;; #( | |
2474 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2475 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2476 | esac ;; | |
2477 | esac | |
2478 | done | |
bec39cab | 2479 | (set) 2>&1 | |
81ecdfbb RW |
2480 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
2481 | *${as_nl}ac_space=\ *) | |
bec39cab | 2482 | sed -n \ |
81ecdfbb RW |
2483 | "s/'\''/'\''\\\\'\'''\''/g; |
2484 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2485 | ;; #( | |
bec39cab | 2486 | *) |
81ecdfbb | 2487 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 2488 | ;; |
81ecdfbb RW |
2489 | esac | |
2490 | sort | |
2491 | ) | |
bec39cab AC |
2492 | echo |
2493 | ||
d0ac1c44 | 2494 | $as_echo "## ----------------- ## |
bec39cab | 2495 | ## Output variables. ## |
d0ac1c44 | 2496 | ## ----------------- ##" |
bec39cab AC |
2497 | echo |
2498 | for ac_var in $ac_subst_vars | |
2499 | do | |
81ecdfbb RW |
2500 | eval ac_val=\$$ac_var |
2501 | case $ac_val in | |
2502 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2503 | esac | |
2504 | $as_echo "$ac_var='\''$ac_val'\''" | |
bec39cab AC |
2505 | done | sort |
2506 | echo | |
2507 | ||
2508 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2509 | $as_echo "## ------------------- ## |
81ecdfbb | 2510 | ## File substitutions. ## |
d0ac1c44 | 2511 | ## ------------------- ##" |
bec39cab AC |
2512 | echo |
2513 | for ac_var in $ac_subst_files | |
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 | |
434c4c77 | 2522 | fi |
bec39cab AC |
2523 | |
2524 | if test -s confdefs.h; then | |
d0ac1c44 | 2525 | $as_echo "## ----------- ## |
bec39cab | 2526 | ## confdefs.h. ## |
d0ac1c44 | 2527 | ## ----------- ##" |
bec39cab | 2528 | echo |
81ecdfbb | 2529 | cat confdefs.h |
bec39cab AC |
2530 | echo |
2531 | fi | |
2532 | test "$ac_signal" != 0 && | |
81ecdfbb RW |
2533 | $as_echo "$as_me: caught signal $ac_signal" |
2534 | $as_echo "$as_me: exit $exit_status" | |
bec39cab | 2535 | } >&5 |
81ecdfbb RW |
2536 | rm -f core *.core core.conftest.* && |
2537 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
bec39cab | 2538 | exit $exit_status |
81ecdfbb | 2539 | ' 0 |
bec39cab | 2540 | for ac_signal in 1 2 13 15; do |
81ecdfbb | 2541 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
bec39cab AC |
2542 | done |
2543 | ac_signal=0 | |
2544 | ||
2545 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
81ecdfbb RW |
2546 | rm -f -r conftest* confdefs.h |
2547 | ||
2548 | $as_echo "/* confdefs.h */" > confdefs.h | |
bec39cab AC |
2549 | |
2550 | # Predefined preprocessor variables. | |
2551 | ||
2552 | cat >>confdefs.h <<_ACEOF | |
2553 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2554 | _ACEOF | |
2555 | ||
bec39cab AC |
2556 | cat >>confdefs.h <<_ACEOF |
2557 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2558 | _ACEOF | |
2559 | ||
bec39cab AC |
2560 | cat >>confdefs.h <<_ACEOF |
2561 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2562 | _ACEOF | |
2563 | ||
bec39cab AC |
2564 | cat >>confdefs.h <<_ACEOF |
2565 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2566 | _ACEOF | |
2567 | ||
bec39cab AC |
2568 | cat >>confdefs.h <<_ACEOF |
2569 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2570 | _ACEOF | |
2571 | ||
81ecdfbb RW |
2572 | cat >>confdefs.h <<_ACEOF |
2573 | #define PACKAGE_URL "$PACKAGE_URL" | |
2574 | _ACEOF | |
2575 | ||
bec39cab AC |
2576 | |
2577 | # Let the site file select an alternate cache file if it wants to. | |
81ecdfbb RW |
2578 | # Prefer an explicitly selected file to automatically selected ones. |
2579 | ac_site_file1=NONE | |
2580 | ac_site_file2=NONE | |
2581 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2582 | # We do not want a PATH search for config.site. |
2583 | case $CONFIG_SITE in #(( | |
2584 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2585 | */*) ac_site_file1=$CONFIG_SITE;; | |
2586 | *) ac_site_file1=./$CONFIG_SITE;; | |
2587 | esac | |
81ecdfbb RW |
2588 | elif test "x$prefix" != xNONE; then |
2589 | ac_site_file1=$prefix/share/config.site | |
2590 | ac_site_file2=$prefix/etc/config.site | |
2591 | else | |
2592 | ac_site_file1=$ac_default_prefix/share/config.site | |
2593 | ac_site_file2=$ac_default_prefix/etc/config.site | |
d6e9fb05 | 2594 | fi |
81ecdfbb RW |
2595 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
2596 | do | |
2597 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2598 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2599 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2600 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
bec39cab | 2601 | sed 's/^/| /' "$ac_site_file" >&5 |
d0ac1c44 SM |
2602 | . "$ac_site_file" \ |
2603 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2604 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2605 | as_fn_error $? "failed to load site script $ac_site_file | |
2606 | See \`config.log' for more details" "$LINENO" 5; } | |
d6e9fb05 JK |
2607 | fi |
2608 | done | |
2609 | ||
2610 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2611 | # Some versions of bash will fail to source /dev/null (special files |
2612 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2613 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2614 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2615 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
bec39cab | 2616 | case $cache_file in |
81ecdfbb RW |
2617 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
2618 | *) . "./$cache_file";; | |
bec39cab AC |
2619 | esac |
2620 | fi | |
d6e9fb05 | 2621 | else |
81ecdfbb RW |
2622 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
2623 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
bec39cab | 2624 | >$cache_file |
d6e9fb05 JK |
2625 | fi |
2626 | ||
05ea2a05 TT |
2627 | as_fn_append ac_header_list " stdlib.h" |
2628 | as_fn_append ac_header_list " unistd.h" | |
2629 | as_fn_append ac_header_list " sys/param.h" | |
bec39cab AC |
2630 | # Check that the precious variables saved in the cache have kept the same |
2631 | # value. | |
2632 | ac_cache_corrupted=false | |
81ecdfbb | 2633 | for ac_var in $ac_precious_vars; do |
bec39cab AC |
2634 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
2635 | eval ac_new_set=\$ac_env_${ac_var}_set | |
81ecdfbb RW |
2636 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
2637 | eval ac_new_val=\$ac_env_${ac_var}_value | |
bec39cab AC |
2638 | case $ac_old_set,$ac_new_set in |
2639 | set,) | |
81ecdfbb RW |
2640 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
2641 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
bec39cab AC |
2642 | ac_cache_corrupted=: ;; |
2643 | ,set) | |
81ecdfbb RW |
2644 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
2645 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
bec39cab AC |
2646 | ac_cache_corrupted=: ;; |
2647 | ,);; | |
2648 | *) | |
2649 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
81ecdfbb RW |
2650 | # differences in whitespace do not lead to failure. |
2651 | ac_old_val_w=`echo x $ac_old_val` | |
2652 | ac_new_val_w=`echo x $ac_new_val` | |
2653 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2654 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2655 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2656 | ac_cache_corrupted=: | |
2657 | else | |
2658 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2659 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2660 | eval $ac_var=\$ac_old_val | |
2661 | fi | |
2662 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2663 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2664 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2665 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
bec39cab AC |
2666 | fi;; |
2667 | esac | |
2668 | # Pass precious variables to config.status. | |
2669 | if test "$ac_new_set" = set; then | |
2670 | case $ac_new_val in | |
81ecdfbb | 2671 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
bec39cab AC |
2672 | *) ac_arg=$ac_var=$ac_new_val ;; |
2673 | esac | |
2674 | case " $ac_configure_args " in | |
2675 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
81ecdfbb | 2676 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
bec39cab | 2677 | esac |
d6e9fb05 | 2678 | fi |
bec39cab AC |
2679 | done |
2680 | if $ac_cache_corrupted; then | |
81ecdfbb RW |
2681 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2682 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2683 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2684 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2685 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
d6e9fb05 | 2686 | fi |
81ecdfbb RW |
2687 | ## -------------------- ## |
2688 | ## Main body of script. ## | |
2689 | ## -------------------- ## | |
d6e9fb05 | 2690 | |
dae5f5cf DJ |
2691 | ac_ext=c |
2692 | ac_cpp='$CPP $CPPFLAGS' | |
2693 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2694 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2695 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2696 | ||
d6e9fb05 | 2697 | |
84563040 | 2698 | |
bec39cab AC |
2699 | |
2700 | ||
81ecdfbb | 2701 | ac_config_headers="$ac_config_headers config.h:config.in" |
bec39cab AC |
2702 | |
2703 | ||
e28b3332 | 2704 | |
c9a1864a YQ |
2705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
2706 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2707 | # Check whether --enable-maintainer-mode was given. | |
2708 | if test "${enable_maintainer_mode+set}" = set; then : | |
2709 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2710 | else | |
2711 | USE_MAINTAINER_MODE=no | |
2712 | fi | |
2713 | ||
2714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2715 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2716 | if test $USE_MAINTAINER_MODE = yes; then | |
2717 | MAINTAINER_MODE_TRUE= | |
2718 | MAINTAINER_MODE_FALSE='#' | |
2719 | else | |
2720 | MAINTAINER_MODE_TRUE='#' | |
2721 | MAINTAINER_MODE_FALSE= | |
2722 | fi | |
2723 | ||
2724 | MAINT=$MAINTAINER_MODE_TRUE | |
2725 | ||
2726 | ||
2727 | ||
bec39cab AC |
2728 | ac_ext=c |
2729 | ac_cpp='$CPP $CPPFLAGS' | |
2730 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2731 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2732 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2733 | if test -n "$ac_tool_prefix"; then | |
2734 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2735 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
81ecdfbb RW |
2736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2737 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2738 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2739 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2740 | else |
2741 | if test -n "$CC"; then | |
2742 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2743 | else | |
bec39cab AC |
2744 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2745 | for as_dir in $PATH | |
2746 | do | |
2747 | IFS=$as_save_IFS | |
2748 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2749 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2750 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2751 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
81ecdfbb | 2752 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2753 | break 2 |
2754 | fi | |
2755 | done | |
81ecdfbb RW |
2756 | done |
2757 | IFS=$as_save_IFS | |
bec39cab | 2758 | |
84563040 DJ |
2759 | fi |
2760 | fi | |
bec39cab | 2761 | CC=$ac_cv_prog_CC |
84563040 | 2762 | if test -n "$CC"; then |
81ecdfbb RW |
2763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2764 | $as_echo "$CC" >&6; } | |
84563040 | 2765 | else |
81ecdfbb RW |
2766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2767 | $as_echo "no" >&6; } | |
84563040 DJ |
2768 | fi |
2769 | ||
81ecdfbb | 2770 | |
bec39cab AC |
2771 | fi |
2772 | if test -z "$ac_cv_prog_CC"; then | |
2773 | ac_ct_CC=$CC | |
2774 | # Extract the first word of "gcc", so it can be a program name with args. | |
2775 | set dummy gcc; ac_word=$2 | |
81ecdfbb RW |
2776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2777 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2778 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2779 | $as_echo_n "(cached) " >&6 |
84563040 | 2780 | else |
bec39cab AC |
2781 | if test -n "$ac_ct_CC"; then |
2782 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
84563040 | 2783 | else |
bec39cab AC |
2784 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2785 | for as_dir in $PATH | |
2786 | do | |
2787 | IFS=$as_save_IFS | |
2788 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2789 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2790 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2791 | ac_cv_prog_ac_ct_CC="gcc" |
81ecdfbb | 2792 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2793 | break 2 |
2794 | fi | |
2795 | done | |
81ecdfbb RW |
2796 | done |
2797 | IFS=$as_save_IFS | |
bec39cab AC |
2798 | |
2799 | fi | |
2800 | fi | |
2801 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2802 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2804 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2805 | else |
81ecdfbb RW |
2806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2807 | $as_echo "no" >&6; } | |
bec39cab AC |
2808 | fi |
2809 | ||
81ecdfbb RW |
2810 | if test "x$ac_ct_CC" = x; then |
2811 | CC="" | |
2812 | else | |
2813 | case $cross_compiling:$ac_tool_warned in | |
2814 | yes:) | |
2815 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2816 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2817 | ac_tool_warned=yes ;; | |
2818 | esac | |
2819 | CC=$ac_ct_CC | |
2820 | fi | |
bec39cab AC |
2821 | else |
2822 | CC="$ac_cv_prog_CC" | |
2823 | fi | |
2824 | ||
2825 | if test -z "$CC"; then | |
81ecdfbb RW |
2826 | if test -n "$ac_tool_prefix"; then |
2827 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
bec39cab | 2828 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
81ecdfbb RW |
2829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2830 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2831 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2832 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
2833 | else |
2834 | if test -n "$CC"; then | |
2835 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2836 | else | |
2837 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2838 | for as_dir in $PATH | |
2839 | do | |
2840 | IFS=$as_save_IFS | |
2841 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2842 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2843 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2844 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
81ecdfbb | 2845 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2846 | break 2 |
2847 | fi | |
2848 | done | |
81ecdfbb RW |
2849 | done |
2850 | IFS=$as_save_IFS | |
bec39cab AC |
2851 | |
2852 | fi | |
2853 | fi | |
2854 | CC=$ac_cv_prog_CC | |
2855 | if test -n "$CC"; then | |
81ecdfbb RW |
2856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2857 | $as_echo "$CC" >&6; } | |
bec39cab | 2858 | else |
81ecdfbb RW |
2859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2860 | $as_echo "no" >&6; } | |
bec39cab AC |
2861 | fi |
2862 | ||
81ecdfbb RW |
2863 | |
2864 | fi | |
dae5f5cf | 2865 | fi |
81ecdfbb | 2866 | if test -z "$CC"; then |
dae5f5cf DJ |
2867 | # Extract the first word of "cc", so it can be a program name with args. |
2868 | set dummy cc; ac_word=$2 | |
81ecdfbb RW |
2869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2870 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2871 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2872 | $as_echo_n "(cached) " >&6 |
dae5f5cf | 2873 | else |
81ecdfbb RW |
2874 | if test -n "$CC"; then |
2875 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
dae5f5cf | 2876 | else |
81ecdfbb | 2877 | ac_prog_rejected=no |
dae5f5cf DJ |
2878 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2879 | for as_dir in $PATH | |
2880 | do | |
2881 | IFS=$as_save_IFS | |
2882 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2883 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2884 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2885 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2886 | ac_prog_rejected=yes | |
2887 | continue | |
2888 | fi | |
2889 | ac_cv_prog_CC="cc" | |
2890 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
dae5f5cf | 2891 | break 2 |
b80864fb | 2892 | fi |
dae5f5cf | 2893 | done |
81ecdfbb RW |
2894 | done |
2895 | IFS=$as_save_IFS | |
bec39cab | 2896 | |
84563040 DJ |
2897 | if test $ac_prog_rejected = yes; then |
2898 | # We found a bogon in the path, so make sure we never use it. | |
2899 | set dummy $ac_cv_prog_CC | |
2900 | shift | |
bec39cab | 2901 | if test $# != 0; then |
84563040 DJ |
2902 | # We chose a different compiler from the bogus one. |
2903 | # However, it has the same basename, so the bogon will be chosen | |
2904 | # first if we set CC to just the basename; use the full file name. | |
2905 | shift | |
bec39cab | 2906 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
84563040 DJ |
2907 | fi |
2908 | fi | |
2909 | fi | |
2910 | fi | |
bec39cab | 2911 | CC=$ac_cv_prog_CC |
84563040 | 2912 | if test -n "$CC"; then |
81ecdfbb RW |
2913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2914 | $as_echo "$CC" >&6; } | |
84563040 | 2915 | else |
81ecdfbb RW |
2916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2917 | $as_echo "no" >&6; } | |
84563040 DJ |
2918 | fi |
2919 | ||
81ecdfbb | 2920 | |
bec39cab AC |
2921 | fi |
2922 | if test -z "$CC"; then | |
2923 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2924 | for ac_prog in cl.exe |
bec39cab AC |
2925 | do |
2926 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2927 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2929 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2930 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2931 | $as_echo_n "(cached) " >&6 |
84563040 DJ |
2932 | else |
2933 | if test -n "$CC"; then | |
2934 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2935 | else | |
bec39cab AC |
2936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2937 | for as_dir in $PATH | |
2938 | do | |
2939 | IFS=$as_save_IFS | |
2940 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2941 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2942 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2943 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2944 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2945 | break 2 |
2946 | fi | |
2947 | done | |
81ecdfbb RW |
2948 | done |
2949 | IFS=$as_save_IFS | |
bec39cab | 2950 | |
84563040 DJ |
2951 | fi |
2952 | fi | |
bec39cab | 2953 | CC=$ac_cv_prog_CC |
84563040 | 2954 | if test -n "$CC"; then |
81ecdfbb RW |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2956 | $as_echo "$CC" >&6; } | |
84563040 | 2957 | else |
81ecdfbb RW |
2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2959 | $as_echo "no" >&6; } | |
84563040 | 2960 | fi |
bec39cab | 2961 | |
81ecdfbb | 2962 | |
bec39cab AC |
2963 | test -n "$CC" && break |
2964 | done | |
2965 | fi | |
2966 | if test -z "$CC"; then | |
2967 | ac_ct_CC=$CC | |
81ecdfbb | 2968 | for ac_prog in cl.exe |
bec39cab AC |
2969 | do |
2970 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2971 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2973 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2974 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 2975 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
2976 | else |
2977 | if test -n "$ac_ct_CC"; then | |
2978 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2979 | else | |
2980 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2981 | for as_dir in $PATH | |
2982 | do | |
2983 | IFS=$as_save_IFS | |
2984 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2985 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2986 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 2987 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2988 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2989 | break 2 |
84563040 | 2990 | fi |
bec39cab | 2991 | done |
81ecdfbb RW |
2992 | done |
2993 | IFS=$as_save_IFS | |
bec39cab AC |
2994 | |
2995 | fi | |
2996 | fi | |
2997 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2998 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3000 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3001 | else |
81ecdfbb RW |
3002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3003 | $as_echo "no" >&6; } | |
84563040 DJ |
3004 | fi |
3005 | ||
81ecdfbb | 3006 | |
bec39cab AC |
3007 | test -n "$ac_ct_CC" && break |
3008 | done | |
84563040 | 3009 | |
81ecdfbb RW |
3010 | if test "x$ac_ct_CC" = x; then |
3011 | CC="" | |
3012 | else | |
3013 | case $cross_compiling:$ac_tool_warned in | |
3014 | yes:) | |
3015 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3016 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3017 | ac_tool_warned=yes ;; | |
3018 | esac | |
3019 | CC=$ac_ct_CC | |
3020 | fi | |
bec39cab AC |
3021 | fi |
3022 | ||
3023 | fi | |
3024 | ||
3025 | ||
81ecdfbb RW |
3026 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3027 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3028 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3029 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3030 | |
3031 | # Provide some information about the compiler. | |
81ecdfbb RW |
3032 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3033 | set X $ac_compile | |
3034 | ac_compiler=$2 | |
3035 | for ac_option in --version -v -V -qversion; do | |
3036 | { { ac_try="$ac_compiler $ac_option >&5" | |
3037 | case "(($ac_try" in | |
3038 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3039 | *) ac_try_echo=$ac_try;; | |
3040 | esac | |
3041 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3042 | $as_echo "$ac_try_echo"; } >&5 | |
3043 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3044 | ac_status=$? |
81ecdfbb RW |
3045 | if test -s conftest.err; then |
3046 | sed '10a\ | |
3047 | ... rest of stderr output deleted ... | |
3048 | 10q' conftest.err >conftest.er1 | |
3049 | cat conftest.er1 >&5 | |
81ecdfbb | 3050 | fi |
d0ac1c44 | 3051 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3052 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3053 | test $ac_status = 0; } | |
3054 | done | |
bec39cab | 3055 | |
81ecdfbb | 3056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3057 | /* end confdefs.h. */ |
3058 | ||
3059 | int | |
3060 | main () | |
3061 | { | |
3062 | ||
3063 | ; | |
3064 | return 0; | |
3065 | } | |
3066 | _ACEOF | |
3067 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3068 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3069 | # Try to create an executable without -o first, disregard a.out. |
3070 | # It will help us diagnose broken compilers, and finding out an intuition | |
3071 | # of exeext. | |
d0ac1c44 SM |
3072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3073 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3074 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3075 | ||
3076 | # The possible output files: | |
3077 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3078 | ||
3079 | ac_rmfiles= | |
3080 | for ac_file in $ac_files | |
3081 | do | |
3082 | case $ac_file in | |
3083 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3084 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3085 | esac | |
3086 | done | |
3087 | rm -f $ac_rmfiles | |
3088 | ||
3089 | if { { ac_try="$ac_link_default" | |
3090 | case "(($ac_try" in | |
3091 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3092 | *) ac_try_echo=$ac_try;; | |
3093 | esac | |
3094 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3095 | $as_echo "$ac_try_echo"; } >&5 | |
3096 | (eval "$ac_link_default") 2>&5 | |
bec39cab | 3097 | ac_status=$? |
81ecdfbb RW |
3098 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3099 | test $ac_status = 0; }; then : | |
3100 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3101 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3102 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3103 | # so that the user can short-circuit this test for compilers unknown to | |
3104 | # Autoconf. | |
3105 | for ac_file in $ac_files '' | |
bec39cab AC |
3106 | do |
3107 | test -f "$ac_file" || continue | |
3108 | case $ac_file in | |
81ecdfbb | 3109 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
bec39cab AC |
3110 | ;; |
3111 | [ab].out ) | |
3112 | # We found the default executable, but exeext='' is most | |
3113 | # certainly right. | |
3114 | break;; | |
3115 | *.* ) | |
81ecdfbb RW |
3116 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3117 | then :; else | |
3118 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3119 | fi | |
3120 | # We set ac_cv_exeext here because the later test for it is not | |
3121 | # safe: cross compilers may not add the suffix if given an `-o' | |
3122 | # argument, so we may need to know it at that point already. | |
3123 | # Even if this section looks crufty: it has the advantage of | |
3124 | # actually working. | |
bec39cab AC |
3125 | break;; |
3126 | * ) | |
3127 | break;; | |
3128 | esac | |
3129 | done | |
81ecdfbb RW |
3130 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3131 | ||
bec39cab | 3132 | else |
81ecdfbb RW |
3133 | ac_file='' |
3134 | fi | |
81ecdfbb | 3135 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3137 | $as_echo "no" >&6; } | |
3138 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3139 | sed 's/^/| /' conftest.$ac_ext >&5 |
3140 | ||
81ecdfbb RW |
3141 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3142 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3143 | as_fn_error 77 "C compiler cannot create executables |
3144 | See \`config.log' for more details" "$LINENO" 5; } | |
3145 | else | |
3146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3147 | $as_echo "yes" >&6; } | |
bec39cab | 3148 | fi |
d0ac1c44 SM |
3149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3150 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3152 | $as_echo "$ac_file" >&6; } | |
bec39cab | 3153 | ac_exeext=$ac_cv_exeext |
bec39cab | 3154 | |
d0ac1c44 | 3155 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
bec39cab | 3156 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3158 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3159 | if { { ac_try="$ac_link" | |
3160 | case "(($ac_try" in | |
3161 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3162 | *) ac_try_echo=$ac_try;; | |
3163 | esac | |
3164 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3165 | $as_echo "$ac_try_echo"; } >&5 | |
3166 | (eval "$ac_link") 2>&5 | |
bec39cab | 3167 | ac_status=$? |
81ecdfbb RW |
3168 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3169 | test $ac_status = 0; }; then : | |
bec39cab AC |
3170 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3171 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3172 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3173 | # `rm'. | |
3174 | for ac_file in conftest.exe conftest conftest.*; do | |
3175 | test -f "$ac_file" || continue | |
3176 | case $ac_file in | |
81ecdfbb | 3177 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
bec39cab | 3178 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
bec39cab AC |
3179 | break;; |
3180 | * ) break;; | |
3181 | esac | |
3182 | done | |
84563040 | 3183 | else |
81ecdfbb RW |
3184 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3185 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3186 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3187 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3188 | fi |
d0ac1c44 | 3189 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3191 | $as_echo "$ac_cv_exeext" >&6; } | |
bec39cab AC |
3192 | |
3193 | rm -f conftest.$ac_ext | |
3194 | EXEEXT=$ac_cv_exeext | |
3195 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3197 | /* end confdefs.h. */ | |
3198 | #include <stdio.h> | |
3199 | int | |
3200 | main () | |
3201 | { | |
3202 | FILE *f = fopen ("conftest.out", "w"); | |
3203 | return ferror (f) || fclose (f) != 0; | |
3204 | ||
3205 | ; | |
3206 | return 0; | |
3207 | } | |
3208 | _ACEOF | |
3209 | ac_clean_files="$ac_clean_files conftest.out" | |
3210 | # Check that the compiler produces executables we can run. If not, either | |
3211 | # the compiler is broken, or we cross compile. | |
3212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3213 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3214 | if test "$cross_compiling" != yes; then | |
3215 | { { ac_try="$ac_link" | |
3216 | case "(($ac_try" in | |
3217 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3218 | *) ac_try_echo=$ac_try;; | |
3219 | esac | |
3220 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3221 | $as_echo "$ac_try_echo"; } >&5 | |
3222 | (eval "$ac_link") 2>&5 | |
3223 | ac_status=$? | |
3224 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3225 | test $ac_status = 0; } | |
3226 | if { ac_try='./conftest$ac_cv_exeext' | |
3227 | { { case "(($ac_try" in | |
3228 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3229 | *) ac_try_echo=$ac_try;; | |
3230 | esac | |
3231 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3232 | $as_echo "$ac_try_echo"; } >&5 | |
3233 | (eval "$ac_try") 2>&5 | |
3234 | ac_status=$? | |
3235 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3236 | test $ac_status = 0; }; }; then | |
3237 | cross_compiling=no | |
3238 | else | |
3239 | if test "$cross_compiling" = maybe; then | |
3240 | cross_compiling=yes | |
3241 | else | |
3242 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3243 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3244 | as_fn_error $? "cannot run C compiled programs. | |
3245 | If you meant to cross compile, use \`--host'. | |
3246 | See \`config.log' for more details" "$LINENO" 5; } | |
3247 | fi | |
3248 | fi | |
3249 | fi | |
3250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3251 | $as_echo "$cross_compiling" >&6; } | |
3252 | ||
3253 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3254 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3256 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3257 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3258 | $as_echo_n "(cached) " >&6 |
bec39cab | 3259 | else |
81ecdfbb | 3260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3261 | /* end confdefs.h. */ |
3262 | ||
3263 | int | |
3264 | main () | |
3265 | { | |
3266 | ||
3267 | ; | |
3268 | return 0; | |
3269 | } | |
3270 | _ACEOF | |
3271 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3272 | if { { ac_try="$ac_compile" |
3273 | case "(($ac_try" in | |
3274 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3275 | *) ac_try_echo=$ac_try;; | |
3276 | esac | |
3277 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3278 | $as_echo "$ac_try_echo"; } >&5 | |
3279 | (eval "$ac_compile") 2>&5 | |
bec39cab | 3280 | ac_status=$? |
81ecdfbb RW |
3281 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3282 | test $ac_status = 0; }; then : | |
3283 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3284 | test -f "$ac_file" || continue; | |
bec39cab | 3285 | case $ac_file in |
81ecdfbb | 3286 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3287 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3288 | break;; | |
3289 | esac | |
3290 | done | |
3291 | else | |
81ecdfbb | 3292 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3293 | sed 's/^/| /' conftest.$ac_ext >&5 |
3294 | ||
81ecdfbb RW |
3295 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3296 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3297 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3298 | See \`config.log' for more details" "$LINENO" 5; } | |
84563040 | 3299 | fi |
bec39cab AC |
3300 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
3301 | fi | |
81ecdfbb RW |
3302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3303 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3304 | OBJEXT=$ac_cv_objext |
3305 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3307 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3308 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3309 | $as_echo_n "(cached) " >&6 |
bec39cab | 3310 | else |
81ecdfbb | 3311 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3312 | /* end confdefs.h. */ |
3313 | ||
3314 | int | |
3315 | main () | |
3316 | { | |
3317 | #ifndef __GNUC__ | |
3318 | choke me | |
3319 | #endif | |
84563040 | 3320 | |
bec39cab AC |
3321 | ; |
3322 | return 0; | |
3323 | } | |
3324 | _ACEOF | |
81ecdfbb | 3325 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab | 3326 | ac_compiler_gnu=yes |
84563040 | 3327 | else |
81ecdfbb | 3328 | ac_compiler_gnu=no |
84563040 | 3329 | fi |
81ecdfbb | 3330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3331 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
84563040 | 3332 | |
bec39cab | 3333 | fi |
81ecdfbb RW |
3334 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3335 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3336 | if test $ac_compiler_gnu = yes; then | |
3337 | GCC=yes | |
3338 | else | |
3339 | GCC= | |
3340 | fi | |
bec39cab AC |
3341 | ac_test_CFLAGS=${CFLAGS+set} |
3342 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3344 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3345 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb RW |
3346 | $as_echo_n "(cached) " >&6 |
3347 | else | |
3348 | ac_save_c_werror_flag=$ac_c_werror_flag | |
3349 | ac_c_werror_flag=yes | |
3350 | ac_cv_prog_cc_g=no | |
3351 | CFLAGS="-g" | |
3352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3353 | /* end confdefs.h. */ |
3354 | ||
3355 | int | |
3356 | main () | |
3357 | { | |
3358 | ||
3359 | ; | |
3360 | return 0; | |
3361 | } | |
3362 | _ACEOF | |
81ecdfbb | 3363 | if ac_fn_c_try_compile "$LINENO"; then : |
84563040 DJ |
3364 | ac_cv_prog_cc_g=yes |
3365 | else | |
81ecdfbb RW |
3366 | CFLAGS="" |
3367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3368 | /* end confdefs.h. */ | |
3369 | ||
3370 | int | |
3371 | main () | |
3372 | { | |
3373 | ||
3374 | ; | |
3375 | return 0; | |
3376 | } | |
3377 | _ACEOF | |
3378 | if ac_fn_c_try_compile "$LINENO"; then : | |
3379 | ||
3380 | else | |
3381 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3382 | CFLAGS="-g" | |
3383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3384 | /* end confdefs.h. */ | |
3385 | ||
3386 | int | |
3387 | main () | |
3388 | { | |
84563040 | 3389 | |
81ecdfbb RW |
3390 | ; |
3391 | return 0; | |
3392 | } | |
3393 | _ACEOF | |
3394 | if ac_fn_c_try_compile "$LINENO"; then : | |
3395 | ac_cv_prog_cc_g=yes | |
3396 | fi | |
3397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 3398 | fi |
81ecdfbb | 3399 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 3400 | fi |
81ecdfbb RW |
3401 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3402 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3403 | fi | |
3404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3405 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
84563040 | 3406 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3407 | CFLAGS=$ac_save_CFLAGS |
84563040 DJ |
3408 | elif test $ac_cv_prog_cc_g = yes; then |
3409 | if test "$GCC" = yes; then | |
3410 | CFLAGS="-g -O2" | |
3411 | else | |
3412 | CFLAGS="-g" | |
3413 | fi | |
3414 | else | |
3415 | if test "$GCC" = yes; then | |
3416 | CFLAGS="-O2" | |
3417 | else | |
3418 | CFLAGS= | |
3419 | fi | |
3420 | fi | |
81ecdfbb RW |
3421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3422 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3423 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3424 | $as_echo_n "(cached) " >&6 |
bec39cab | 3425 | else |
81ecdfbb | 3426 | ac_cv_prog_cc_c89=no |
bec39cab | 3427 | ac_save_CC=$CC |
81ecdfbb | 3428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3429 | /* end confdefs.h. */ |
3430 | #include <stdarg.h> | |
3431 | #include <stdio.h> | |
d0ac1c44 | 3432 | struct stat; |
bec39cab AC |
3433 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3434 | struct buf { int x; }; | |
3435 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3436 | static char *e (p, i) | |
3437 | char **p; | |
3438 | int i; | |
3439 | { | |
3440 | return p[i]; | |
3441 | } | |
3442 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3443 | { | |
3444 | char *s; | |
3445 | va_list v; | |
3446 | va_start (v,p); | |
3447 | s = g (p, va_arg (v,int)); | |
3448 | va_end (v); | |
3449 | return s; | |
3450 | } | |
3451 | ||
3452 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3453 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3454 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3455 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3456 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3457 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3458 | that's true only with -std. */ |
bec39cab AC |
3459 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3460 | ||
81ecdfbb RW |
3461 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3462 | inside strings and character constants. */ | |
3463 | #define FOO(x) 'x' | |
3464 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3465 | ||
bec39cab AC |
3466 | int test (int i, double x); |
3467 | struct s1 {int (*f) (int a);}; | |
3468 | struct s2 {int (*f) (double a);}; | |
3469 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3470 | int argc; | |
3471 | char **argv; | |
3472 | int | |
3473 | main () | |
3474 | { | |
3475 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3476 | ; | |
3477 | return 0; | |
3478 | } | |
3479 | _ACEOF | |
81ecdfbb RW |
3480 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3481 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3482 | do |
3483 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3484 | if ac_fn_c_try_compile "$LINENO"; then : |
3485 | ac_cv_prog_cc_c89=$ac_arg | |
bec39cab | 3486 | fi |
81ecdfbb RW |
3487 | rm -f core conftest.err conftest.$ac_objext |
3488 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
bec39cab | 3489 | done |
81ecdfbb | 3490 | rm -f conftest.$ac_ext |
bec39cab AC |
3491 | CC=$ac_save_CC |
3492 | ||
3493 | fi | |
81ecdfbb RW |
3494 | # AC_CACHE_VAL |
3495 | case "x$ac_cv_prog_cc_c89" in | |
3496 | x) | |
3497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3498 | $as_echo "none needed" >&6; } ;; | |
3499 | xno) | |
3500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3501 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3502 | *) |
81ecdfbb RW |
3503 | CC="$CC $ac_cv_prog_cc_c89" |
3504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3505 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
bec39cab | 3506 | esac |
81ecdfbb | 3507 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
bec39cab | 3508 | |
dae5f5cf DJ |
3509 | fi |
3510 | ||
dae5f5cf | 3511 | ac_ext=c |
bec39cab AC |
3512 | ac_cpp='$CPP $CPPFLAGS' |
3513 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3514 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3515 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
84563040 | 3516 | |
3bc3d82a PA |
3517 | ac_ext=cpp |
3518 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3519 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3520 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3521 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3522 | if test -z "$CXX"; then | |
3523 | if test -n "$CCC"; then | |
3524 | CXX=$CCC | |
3525 | else | |
3526 | if test -n "$ac_tool_prefix"; then | |
3527 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3528 | do | |
3529 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3530 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3532 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3533 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3534 | $as_echo_n "(cached) " >&6 |
3535 | else | |
3536 | if test -n "$CXX"; then | |
3537 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3538 | else | |
3539 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3540 | for as_dir in $PATH | |
3541 | do | |
3542 | IFS=$as_save_IFS | |
3543 | test -z "$as_dir" && as_dir=. | |
3544 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3545 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3546 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3547 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3548 | break 2 | |
3549 | fi | |
3550 | done | |
3551 | done | |
3552 | IFS=$as_save_IFS | |
3553 | ||
3554 | fi | |
3555 | fi | |
3556 | CXX=$ac_cv_prog_CXX | |
3557 | if test -n "$CXX"; then | |
3558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3559 | $as_echo "$CXX" >&6; } | |
3560 | else | |
3561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3562 | $as_echo "no" >&6; } | |
3563 | fi | |
3564 | ||
3565 | ||
3566 | test -n "$CXX" && break | |
3567 | done | |
3568 | fi | |
3569 | if test -z "$CXX"; then | |
3570 | ac_ct_CXX=$CXX | |
3571 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3572 | do | |
3573 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3574 | set dummy $ac_prog; ac_word=$2 | |
3575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3576 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3577 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3578 | $as_echo_n "(cached) " >&6 |
3579 | else | |
3580 | if test -n "$ac_ct_CXX"; then | |
3581 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3582 | else | |
3583 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3584 | for as_dir in $PATH | |
3585 | do | |
3586 | IFS=$as_save_IFS | |
3587 | test -z "$as_dir" && as_dir=. | |
3588 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3589 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3590 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3591 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3592 | break 2 | |
3593 | fi | |
3594 | done | |
3595 | done | |
3596 | IFS=$as_save_IFS | |
3597 | ||
3598 | fi | |
3599 | fi | |
3600 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3601 | if test -n "$ac_ct_CXX"; then | |
3602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3603 | $as_echo "$ac_ct_CXX" >&6; } | |
3604 | else | |
3605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3606 | $as_echo "no" >&6; } | |
3607 | fi | |
3608 | ||
3609 | ||
3610 | test -n "$ac_ct_CXX" && break | |
3611 | done | |
3612 | ||
3613 | if test "x$ac_ct_CXX" = x; then | |
3614 | CXX="g++" | |
3615 | else | |
3616 | case $cross_compiling:$ac_tool_warned in | |
3617 | yes:) | |
3618 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3619 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3620 | ac_tool_warned=yes ;; | |
3621 | esac | |
3622 | CXX=$ac_ct_CXX | |
3623 | fi | |
3624 | fi | |
3625 | ||
3626 | fi | |
3627 | fi | |
3628 | # Provide some information about the compiler. | |
3629 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3630 | set X $ac_compile | |
3631 | ac_compiler=$2 | |
3632 | for ac_option in --version -v -V -qversion; do | |
3633 | { { ac_try="$ac_compiler $ac_option >&5" | |
3634 | case "(($ac_try" in | |
3635 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3636 | *) ac_try_echo=$ac_try;; | |
3637 | esac | |
3638 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3639 | $as_echo "$ac_try_echo"; } >&5 | |
3640 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3641 | ac_status=$? | |
3642 | if test -s conftest.err; then | |
3643 | sed '10a\ | |
3644 | ... rest of stderr output deleted ... | |
3645 | 10q' conftest.err >conftest.er1 | |
3646 | cat conftest.er1 >&5 | |
3bc3d82a | 3647 | fi |
d0ac1c44 | 3648 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3649 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3650 | test $ac_status = 0; } | |
3651 | done | |
3652 | ||
3653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3654 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3655 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3656 | $as_echo_n "(cached) " >&6 |
3657 | else | |
3658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3659 | /* end confdefs.h. */ | |
3660 | ||
3661 | int | |
3662 | main () | |
3663 | { | |
3664 | #ifndef __GNUC__ | |
3665 | choke me | |
3666 | #endif | |
3667 | ||
3668 | ; | |
3669 | return 0; | |
3670 | } | |
3671 | _ACEOF | |
3672 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3673 | ac_compiler_gnu=yes | |
3674 | else | |
3675 | ac_compiler_gnu=no | |
3676 | fi | |
3677 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3678 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3679 | ||
3680 | fi | |
3681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3682 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3683 | if test $ac_compiler_gnu = yes; then | |
3684 | GXX=yes | |
3685 | else | |
3686 | GXX= | |
3687 | fi | |
3688 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3689 | ac_save_CXXFLAGS=$CXXFLAGS | |
3690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3691 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3692 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3693 | $as_echo_n "(cached) " >&6 |
3694 | else | |
3695 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3696 | ac_cxx_werror_flag=yes | |
3697 | ac_cv_prog_cxx_g=no | |
3698 | CXXFLAGS="-g" | |
3699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3700 | /* end confdefs.h. */ | |
3701 | ||
3702 | int | |
3703 | main () | |
3704 | { | |
3705 | ||
3706 | ; | |
3707 | return 0; | |
3708 | } | |
3709 | _ACEOF | |
3710 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3711 | ac_cv_prog_cxx_g=yes | |
3712 | else | |
3713 | CXXFLAGS="" | |
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 | ||
3727 | else | |
3728 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3729 | CXXFLAGS="-g" | |
3730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3731 | /* end confdefs.h. */ | |
3732 | ||
3733 | int | |
3734 | main () | |
3735 | { | |
3736 | ||
3737 | ; | |
3738 | return 0; | |
3739 | } | |
3740 | _ACEOF | |
3741 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3742 | ac_cv_prog_cxx_g=yes | |
3743 | fi | |
3744 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3745 | fi | |
3746 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3747 | fi | |
3748 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3749 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3750 | fi | |
3751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3752 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3753 | if test "$ac_test_CXXFLAGS" = set; then | |
3754 | CXXFLAGS=$ac_save_CXXFLAGS | |
3755 | elif test $ac_cv_prog_cxx_g = yes; then | |
3756 | if test "$GXX" = yes; then | |
3757 | CXXFLAGS="-g -O2" | |
3758 | else | |
3759 | CXXFLAGS="-g" | |
3760 | fi | |
3761 | else | |
3762 | if test "$GXX" = yes; then | |
3763 | CXXFLAGS="-O2" | |
3764 | else | |
3765 | CXXFLAGS= | |
3766 | fi | |
3767 | fi | |
3768 | ac_ext=c | |
3769 | ac_cpp='$CPP $CPPFLAGS' | |
3770 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3771 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3772 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3773 | ||
c9a1864a YQ |
3774 | |
3775 | ac_ext=c | |
3776 | ac_cpp='$CPP $CPPFLAGS' | |
3777 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3778 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3779 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3781 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3782 | # On Suns, sometimes $CPP names a directory. | |
3783 | if test -n "$CPP" && test -d "$CPP"; then | |
3784 | CPP= | |
3785 | fi | |
3786 | if test -z "$CPP"; then | |
d0ac1c44 | 3787 | if ${ac_cv_prog_CPP+:} false; then : |
c9a1864a YQ |
3788 | $as_echo_n "(cached) " >&6 |
3789 | else | |
3790 | # Double quotes because CPP needs to be expanded | |
3791 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3792 | do | |
3793 | ac_preproc_ok=false | |
3794 | for ac_c_preproc_warn_flag in '' yes | |
3795 | do | |
3796 | # Use a header file that comes with gcc, so configuring glibc | |
3797 | # with a fresh cross-compiler works. | |
3798 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3799 | # <limits.h> exists even on freestanding compilers. | |
3800 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3801 | # not just through cpp. "Syntax error" is here to catch this case. | |
3802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3803 | /* end confdefs.h. */ | |
3804 | #ifdef __STDC__ | |
3805 | # include <limits.h> | |
3806 | #else | |
3807 | # include <assert.h> | |
3808 | #endif | |
3809 | Syntax error | |
3810 | _ACEOF | |
3811 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3812 | ||
3813 | else | |
3814 | # Broken: fails on valid input. | |
3815 | continue | |
3816 | fi | |
d0ac1c44 | 3817 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3818 | |
3819 | # OK, works on sane cases. Now check whether nonexistent headers | |
3820 | # can be detected and how. | |
3821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3822 | /* end confdefs.h. */ | |
3823 | #include <ac_nonexistent.h> | |
3824 | _ACEOF | |
3825 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3826 | # Broken: success on invalid input. | |
3827 | continue | |
3828 | else | |
3829 | # Passes both tests. | |
3830 | ac_preproc_ok=: | |
3831 | break | |
3832 | fi | |
d0ac1c44 | 3833 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3834 | |
3835 | done | |
3836 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3837 | rm -f conftest.i conftest.err conftest.$ac_ext |
c9a1864a YQ |
3838 | if $ac_preproc_ok; then : |
3839 | break | |
3840 | fi | |
3841 | ||
3842 | done | |
3843 | ac_cv_prog_CPP=$CPP | |
3844 | ||
3845 | fi | |
3846 | CPP=$ac_cv_prog_CPP | |
3847 | else | |
3848 | ac_cv_prog_CPP=$CPP | |
3849 | fi | |
3850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3851 | $as_echo "$CPP" >&6; } | |
3852 | ac_preproc_ok=false | |
3853 | for ac_c_preproc_warn_flag in '' yes | |
3854 | do | |
3855 | # Use a header file that comes with gcc, so configuring glibc | |
3856 | # with a fresh cross-compiler works. | |
3857 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3858 | # <limits.h> exists even on freestanding compilers. | |
3859 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3860 | # not just through cpp. "Syntax error" is here to catch this case. | |
3861 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3862 | /* end confdefs.h. */ | |
3863 | #ifdef __STDC__ | |
3864 | # include <limits.h> | |
3865 | #else | |
3866 | # include <assert.h> | |
3867 | #endif | |
3868 | Syntax error | |
3869 | _ACEOF | |
3870 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3871 | ||
3872 | else | |
3873 | # Broken: fails on valid input. | |
3874 | continue | |
3875 | fi | |
d0ac1c44 | 3876 | rm -f conftest.err conftest.i conftest.$ac_ext |
c9a1864a YQ |
3877 | |
3878 | # OK, works on sane cases. Now check whether nonexistent headers | |
3879 | # can be detected and how. | |
81ecdfbb | 3880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3881 | /* end confdefs.h. */ |
3882 | #include <ac_nonexistent.h> | |
3883 | _ACEOF | |
81ecdfbb | 3884 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3885 | # Broken: success on invalid input. |
3886 | continue | |
3887 | else | |
bec39cab AC |
3888 | # Passes both tests. |
3889 | ac_preproc_ok=: | |
3890 | break | |
3891 | fi | |
d0ac1c44 | 3892 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab AC |
3893 | |
3894 | done | |
3895 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 3896 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
3897 | if $ac_preproc_ok; then : |
3898 | ||
3899 | else | |
3900 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3901 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3902 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
3903 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3904 | fi |
3905 | ||
81ecdfbb RW |
3906 | ac_ext=c |
3907 | ac_cpp='$CPP $CPPFLAGS' | |
3908 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3909 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3910 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bec39cab | 3911 | |
81ecdfbb RW |
3912 | |
3913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
3914 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 3915 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 3916 | $as_echo_n "(cached) " >&6 |
bec39cab | 3917 | else |
81ecdfbb RW |
3918 | if test -z "$GREP"; then |
3919 | ac_path_GREP_found=false | |
3920 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3921 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3922 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
bec39cab | 3923 | do |
81ecdfbb RW |
3924 | IFS=$as_save_IFS |
3925 | test -z "$as_dir" && as_dir=. | |
3926 | for ac_prog in grep ggrep; do | |
3927 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3928 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 3929 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
3930 | # Check for GNU ac_path_GREP and select it if it is found. |
3931 | # Check for GNU $ac_path_GREP | |
3932 | case `"$ac_path_GREP" --version 2>&1` in | |
3933 | *GNU*) | |
3934 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3935 | *) | |
3936 | ac_count=0 | |
3937 | $as_echo_n 0123456789 >"conftest.in" | |
3938 | while : | |
3939 | do | |
3940 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3941 | mv "conftest.tmp" "conftest.in" | |
3942 | cp "conftest.in" "conftest.nl" | |
3943 | $as_echo 'GREP' >> "conftest.nl" | |
3944 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3945 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3946 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3947 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3948 | # Best one so far, save it but keep looking for a better one | |
3949 | ac_cv_path_GREP="$ac_path_GREP" | |
3950 | ac_path_GREP_max=$ac_count | |
3951 | fi | |
3952 | # 10*(2^10) chars as input seems more than enough | |
3953 | test $ac_count -gt 10 && break | |
3954 | done | |
3955 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3956 | esac | |
3957 | ||
3958 | $ac_path_GREP_found && break 3 | |
3959 | done | |
3960 | done | |
3961 | done | |
3962 | IFS=$as_save_IFS | |
3963 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 3964 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
bec39cab AC |
3965 | fi |
3966 | else | |
81ecdfbb | 3967 | ac_cv_path_GREP=$GREP |
bec39cab | 3968 | fi |
bec39cab | 3969 | |
84563040 | 3970 | fi |
81ecdfbb RW |
3971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
3972 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3973 | GREP="$ac_cv_path_GREP" | |
bec39cab | 3974 | |
bec39cab | 3975 | |
81ecdfbb RW |
3976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3977 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 3978 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb RW |
3979 | $as_echo_n "(cached) " >&6 |
3980 | else | |
3981 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
3982 | then ac_cv_path_EGREP="$GREP -E" | |
3983 | else | |
3984 | if test -z "$EGREP"; then | |
3985 | ac_path_EGREP_found=false | |
3986 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3987 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3988 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3989 | do | |
3990 | IFS=$as_save_IFS | |
3991 | test -z "$as_dir" && as_dir=. | |
3992 | for ac_prog in egrep; do | |
3993 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3994 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 3995 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
3996 | # Check for GNU ac_path_EGREP and select it if it is found. |
3997 | # Check for GNU $ac_path_EGREP | |
3998 | case `"$ac_path_EGREP" --version 2>&1` in | |
3999 | *GNU*) | |
4000 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4001 | *) | |
4002 | ac_count=0 | |
4003 | $as_echo_n 0123456789 >"conftest.in" | |
4004 | while : | |
4005 | do | |
4006 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4007 | mv "conftest.tmp" "conftest.in" | |
4008 | cp "conftest.in" "conftest.nl" | |
4009 | $as_echo 'EGREP' >> "conftest.nl" | |
4010 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4011 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4012 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4013 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4014 | # Best one so far, save it but keep looking for a better one | |
4015 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4016 | ac_path_EGREP_max=$ac_count | |
4017 | fi | |
4018 | # 10*(2^10) chars as input seems more than enough | |
4019 | test $ac_count -gt 10 && break | |
4020 | done | |
4021 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4022 | esac | |
bec39cab | 4023 | |
81ecdfbb RW |
4024 | $ac_path_EGREP_found && break 3 |
4025 | done | |
4026 | done | |
4027 | done | |
4028 | IFS=$as_save_IFS | |
4029 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4030 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4031 | fi |
bec39cab | 4032 | else |
81ecdfbb | 4033 | ac_cv_path_EGREP=$EGREP |
84563040 | 4034 | fi |
bec39cab | 4035 | |
81ecdfbb | 4036 | fi |
b80864fb | 4037 | fi |
81ecdfbb RW |
4038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4039 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4040 | EGREP="$ac_cv_path_EGREP" | |
b80864fb DJ |
4041 | |
4042 | ||
c971b7fa PA |
4043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4044 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4045 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
4046 | $as_echo_n "(cached) " >&6 |
4047 | else | |
4048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4049 | /* end confdefs.h. */ | |
4050 | #include <stdlib.h> | |
4051 | #include <stdarg.h> | |
4052 | #include <string.h> | |
4053 | #include <float.h> | |
bec39cab | 4054 | |
c971b7fa PA |
4055 | int |
4056 | main () | |
4057 | { | |
bec39cab | 4058 | |
c971b7fa PA |
4059 | ; |
4060 | return 0; | |
4061 | } | |
4062 | _ACEOF | |
4063 | if ac_fn_c_try_compile "$LINENO"; then : | |
4064 | ac_cv_header_stdc=yes | |
84563040 | 4065 | else |
c971b7fa PA |
4066 | ac_cv_header_stdc=no |
4067 | fi | |
4068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
84563040 | 4069 | |
c971b7fa PA |
4070 | if test $ac_cv_header_stdc = yes; then |
4071 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4072 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 4073 | /* end confdefs.h. */ |
c971b7fa | 4074 | #include <string.h> |
bec39cab AC |
4075 | |
4076 | _ACEOF | |
84563040 | 4077 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
c971b7fa PA |
4078 | $EGREP "memchr" >/dev/null 2>&1; then : |
4079 | ||
84563040 | 4080 | else |
c971b7fa | 4081 | ac_cv_header_stdc=no |
84563040 DJ |
4082 | fi |
4083 | rm -f conftest* | |
4084 | ||
770d76d7 | 4085 | fi |
81ecdfbb | 4086 | |
c971b7fa PA |
4087 | if test $ac_cv_header_stdc = yes; then |
4088 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4090 | /* end confdefs.h. */ | |
4091 | #include <stdlib.h> | |
4092 | ||
4093 | _ACEOF | |
4094 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4095 | $EGREP "free" >/dev/null 2>&1; then : | |
4096 | ||
770d76d7 | 4097 | else |
c971b7fa | 4098 | ac_cv_header_stdc=no |
bec39cab | 4099 | fi |
c971b7fa | 4100 | rm -f conftest* |
bec39cab AC |
4101 | |
4102 | fi | |
c971b7fa PA |
4103 | |
4104 | if test $ac_cv_header_stdc = yes; then | |
4105 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4106 | if test "$cross_compiling" = yes; then : | |
4107 | : | |
770d76d7 | 4108 | else |
c971b7fa PA |
4109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4110 | /* end confdefs.h. */ | |
4111 | #include <ctype.h> | |
4112 | #include <stdlib.h> | |
4113 | #if ((' ' & 0x0FF) == 0x020) | |
4114 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4115 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4116 | #else | |
4117 | # define ISLOWER(c) \ | |
4118 | (('a' <= (c) && (c) <= 'i') \ | |
4119 | || ('j' <= (c) && (c) <= 'r') \ | |
4120 | || ('s' <= (c) && (c) <= 'z')) | |
4121 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4122 | #endif | |
4123 | ||
4124 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4125 | int | |
4126 | main () | |
4127 | { | |
4128 | int i; | |
4129 | for (i = 0; i < 256; i++) | |
4130 | if (XOR (islower (i), ISLOWER (i)) | |
4131 | || toupper (i) != TOUPPER (i)) | |
4132 | return 2; | |
4133 | return 0; | |
4134 | } | |
4135 | _ACEOF | |
4136 | if ac_fn_c_try_run "$LINENO"; then : | |
4137 | ||
770d76d7 | 4138 | else |
c971b7fa PA |
4139 | ac_cv_header_stdc=no |
4140 | fi | |
4141 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4142 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4143 | fi | |
bec39cab | 4144 | |
770d76d7 PA |
4145 | fi |
4146 | fi | |
c971b7fa PA |
4147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4148 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4149 | if test $ac_cv_header_stdc = yes; then | |
4150 | ||
4151 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4152 | ||
770d76d7 | 4153 | fi |
bec39cab | 4154 | |
c971b7fa PA |
4155 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4156 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4157 | inttypes.h stdint.h unistd.h | |
4158 | do : | |
4159 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4160 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4161 | " | |
d0ac1c44 | 4162 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
c971b7fa PA |
4163 | cat >>confdefs.h <<_ACEOF |
4164 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4165 | _ACEOF | |
4166 | ||
81ecdfbb | 4167 | fi |
bec39cab | 4168 | |
c971b7fa | 4169 | done |
bec39cab AC |
4170 | |
4171 | ||
4172 | ||
c971b7fa | 4173 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4174 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
c971b7fa | 4175 | MINIX=yes |
770d76d7 | 4176 | else |
c971b7fa | 4177 | MINIX= |
770d76d7 | 4178 | fi |
bec39cab AC |
4179 | |
4180 | ||
c971b7fa PA |
4181 | if test "$MINIX" = yes; then |
4182 | ||
4183 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
4184 | ||
4185 | ||
4186 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
4187 | ||
4188 | ||
4189 | $as_echo "#define _MINIX 1" >>confdefs.h | |
4190 | ||
770d76d7 | 4191 | fi |
bec39cab | 4192 | |
c971b7fa PA |
4193 | |
4194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
4195 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4196 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
c971b7fa | 4197 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4198 | else |
c971b7fa PA |
4199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4200 | /* end confdefs.h. */ | |
bec39cab | 4201 | |
d0ac1c44 SM |
4202 | # define __EXTENSIONS__ 1 |
4203 | $ac_includes_default | |
c971b7fa PA |
4204 | int |
4205 | main () | |
4206 | { | |
4207 | ||
4208 | ; | |
4209 | return 0; | |
4210 | } | |
4211 | _ACEOF | |
4212 | if ac_fn_c_try_compile "$LINENO"; then : | |
4213 | ac_cv_safe_to_define___extensions__=yes | |
770d76d7 | 4214 | else |
c971b7fa PA |
4215 | ac_cv_safe_to_define___extensions__=no |
4216 | fi | |
4217 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
770d76d7 | 4218 | fi |
c971b7fa PA |
4219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4220 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4221 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4222 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
4223 | ||
4224 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
4225 | ||
4226 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
4227 | ||
4228 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
4229 | ||
4230 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
4231 | ||
bec39cab | 4232 | |
c9a1864a | 4233 | |
589bc927 TT |
4234 | # Check whether --enable-largefile was given. |
4235 | if test "${enable_largefile+set}" = set; then : | |
4236 | enableval=$enable_largefile; | |
4237 | fi | |
4238 | ||
4239 | if test "$enable_largefile" != no; then | |
4240 | ||
4241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4242 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4243 | if ${ac_cv_sys_largefile_CC+:} false; then : |
589bc927 TT |
4244 | $as_echo_n "(cached) " >&6 |
4245 | else | |
4246 | ac_cv_sys_largefile_CC=no | |
4247 | if test "$GCC" != yes; then | |
4248 | ac_save_CC=$CC | |
4249 | while :; do | |
4250 | # IRIX 6.2 and later do not support large files by default, | |
4251 | # so use the C compiler's -n32 option if that helps. | |
4252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4253 | /* end confdefs.h. */ | |
4254 | #include <sys/types.h> | |
4255 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4256 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4257 | since some C++ compilers masquerading as C compilers | |
4258 | incorrectly reject 9223372036854775807. */ | |
4259 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4260 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4261 | && LARGE_OFF_T % 2147483647 == 1) | |
4262 | ? 1 : -1]; | |
4263 | int | |
4264 | main () | |
4265 | { | |
4266 | ||
4267 | ; | |
4268 | return 0; | |
4269 | } | |
4270 | _ACEOF | |
4271 | if ac_fn_c_try_compile "$LINENO"; then : | |
4272 | break | |
4273 | fi | |
4274 | rm -f core conftest.err conftest.$ac_objext | |
4275 | CC="$CC -n32" | |
4276 | if ac_fn_c_try_compile "$LINENO"; then : | |
4277 | ac_cv_sys_largefile_CC=' -n32'; break | |
4278 | fi | |
4279 | rm -f core conftest.err conftest.$ac_objext | |
4280 | break | |
4281 | done | |
4282 | CC=$ac_save_CC | |
4283 | rm -f conftest.$ac_ext | |
4284 | fi | |
4285 | fi | |
4286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4287 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4288 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4289 | CC=$CC$ac_cv_sys_largefile_CC | |
4290 | fi | |
4291 | ||
4292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4293 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4294 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
589bc927 TT |
4295 | $as_echo_n "(cached) " >&6 |
4296 | else | |
4297 | while :; do | |
4298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4299 | /* end confdefs.h. */ | |
4300 | #include <sys/types.h> | |
4301 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4302 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4303 | since some C++ compilers masquerading as C compilers | |
4304 | incorrectly reject 9223372036854775807. */ | |
4305 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4306 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4307 | && LARGE_OFF_T % 2147483647 == 1) | |
4308 | ? 1 : -1]; | |
4309 | int | |
4310 | main () | |
4311 | { | |
4312 | ||
4313 | ; | |
4314 | return 0; | |
4315 | } | |
4316 | _ACEOF | |
4317 | if ac_fn_c_try_compile "$LINENO"; then : | |
4318 | ac_cv_sys_file_offset_bits=no; break | |
4319 | fi | |
4320 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4322 | /* end confdefs.h. */ | |
4323 | #define _FILE_OFFSET_BITS 64 | |
4324 | #include <sys/types.h> | |
4325 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4326 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4327 | since some C++ compilers masquerading as C compilers | |
4328 | incorrectly reject 9223372036854775807. */ | |
4329 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4330 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4331 | && LARGE_OFF_T % 2147483647 == 1) | |
4332 | ? 1 : -1]; | |
4333 | int | |
4334 | main () | |
4335 | { | |
4336 | ||
4337 | ; | |
4338 | return 0; | |
4339 | } | |
4340 | _ACEOF | |
4341 | if ac_fn_c_try_compile "$LINENO"; then : | |
4342 | ac_cv_sys_file_offset_bits=64; break | |
4343 | fi | |
4344 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4345 | ac_cv_sys_file_offset_bits=unknown | |
4346 | break | |
4347 | done | |
4348 | fi | |
4349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4350 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4351 | case $ac_cv_sys_file_offset_bits in #( | |
4352 | no | unknown) ;; | |
4353 | *) | |
4354 | cat >>confdefs.h <<_ACEOF | |
4355 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4356 | _ACEOF | |
4357 | ;; | |
4358 | esac | |
4359 | rm -rf conftest* | |
4360 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4362 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4363 | if ${ac_cv_sys_large_files+:} false; then : |
589bc927 TT |
4364 | $as_echo_n "(cached) " >&6 |
4365 | else | |
4366 | while :; do | |
4367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4368 | /* end confdefs.h. */ | |
4369 | #include <sys/types.h> | |
4370 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4371 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4372 | since some C++ compilers masquerading as C compilers | |
4373 | incorrectly reject 9223372036854775807. */ | |
4374 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4375 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4376 | && LARGE_OFF_T % 2147483647 == 1) | |
4377 | ? 1 : -1]; | |
4378 | int | |
4379 | main () | |
4380 | { | |
4381 | ||
4382 | ; | |
4383 | return 0; | |
4384 | } | |
4385 | _ACEOF | |
4386 | if ac_fn_c_try_compile "$LINENO"; then : | |
4387 | ac_cv_sys_large_files=no; break | |
4388 | fi | |
4389 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4391 | /* end confdefs.h. */ | |
4392 | #define _LARGE_FILES 1 | |
4393 | #include <sys/types.h> | |
4394 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4395 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4396 | since some C++ compilers masquerading as C compilers | |
4397 | incorrectly reject 9223372036854775807. */ | |
4398 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4399 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4400 | && LARGE_OFF_T % 2147483647 == 1) | |
4401 | ? 1 : -1]; | |
4402 | int | |
4403 | main () | |
4404 | { | |
4405 | ||
4406 | ; | |
4407 | return 0; | |
4408 | } | |
4409 | _ACEOF | |
4410 | if ac_fn_c_try_compile "$LINENO"; then : | |
4411 | ac_cv_sys_large_files=1; break | |
4412 | fi | |
4413 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4414 | ac_cv_sys_large_files=unknown | |
4415 | break | |
4416 | done | |
4417 | fi | |
4418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4419 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4420 | case $ac_cv_sys_large_files in #( | |
4421 | no | unknown) ;; | |
4422 | *) | |
4423 | cat >>confdefs.h <<_ACEOF | |
4424 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4425 | _ACEOF | |
4426 | ;; | |
4427 | esac | |
4428 | rm -rf conftest* | |
4429 | fi | |
d0ac1c44 SM |
4430 | |
4431 | ||
589bc927 TT |
4432 | fi |
4433 | ||
770d76d7 PA |
4434 | ac_aux_dir= |
4435 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4436 | if test -f "$ac_dir/install-sh"; then |
4437 | ac_aux_dir=$ac_dir | |
4438 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4439 | break | |
4440 | elif test -f "$ac_dir/install.sh"; then | |
4441 | ac_aux_dir=$ac_dir | |
4442 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4443 | break | |
4444 | elif test -f "$ac_dir/shtool"; then | |
4445 | ac_aux_dir=$ac_dir | |
4446 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4447 | break | |
4448 | fi | |
770d76d7 PA |
4449 | done |
4450 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4451 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
770d76d7 PA |
4452 | fi |
4453 | ||
4454 | # These three variables are undocumented and unsupported, | |
4455 | # and are intended to be withdrawn in a future Autoconf release. | |
4456 | # They can cause serious problems if a builder's source tree is in a directory | |
4457 | # whose full name contains unusual characters. | |
4458 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4459 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4460 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
c9a1864a | 4461 | |
bec39cab | 4462 | |
bdaed379 HD |
4463 | # Expand $ac_aux_dir to an absolute path. |
4464 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4465 | ||
4466 | if test x"${install_sh+set}" != xset; then | |
4467 | case $am_aux_dir in | |
4468 | *\ * | *\ *) | |
4469 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
4470 | *) | |
4471 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
4472 | esac | |
4473 | fi | |
4474 | ||
4475 | # Installed binaries are usually stripped using 'strip' when the user | |
4476 | # run "make install-strip". However 'strip' might not be the right | |
4477 | # tool to use in cross-compilation environments, therefore Automake | |
4478 | # will honor the 'STRIP' environment variable to overrule this program. | |
4479 | if test "$cross_compiling" != no; then | |
4480 | if test -n "$ac_tool_prefix"; then | |
4481 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
4482 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
4483 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4484 | $as_echo_n "checking for $ac_word... " >&6; } | |
4485 | if ${ac_cv_prog_STRIP+:} false; then : | |
4486 | $as_echo_n "(cached) " >&6 | |
4487 | else | |
4488 | if test -n "$STRIP"; then | |
4489 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
4490 | else | |
4491 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4492 | for as_dir in $PATH | |
4493 | do | |
4494 | IFS=$as_save_IFS | |
4495 | test -z "$as_dir" && as_dir=. | |
4496 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4497 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4498 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
4499 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4500 | break 2 | |
4501 | fi | |
4502 | done | |
4503 | done | |
4504 | IFS=$as_save_IFS | |
4505 | ||
4506 | fi | |
4507 | fi | |
4508 | STRIP=$ac_cv_prog_STRIP | |
4509 | if test -n "$STRIP"; then | |
4510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
4511 | $as_echo "$STRIP" >&6; } | |
4512 | else | |
4513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4514 | $as_echo "no" >&6; } | |
4515 | fi | |
4516 | ||
4517 | ||
4518 | fi | |
4519 | if test -z "$ac_cv_prog_STRIP"; then | |
4520 | ac_ct_STRIP=$STRIP | |
4521 | # Extract the first word of "strip", so it can be a program name with args. | |
4522 | set dummy strip; ac_word=$2 | |
4523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4524 | $as_echo_n "checking for $ac_word... " >&6; } | |
4525 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
4526 | $as_echo_n "(cached) " >&6 | |
4527 | else | |
4528 | if test -n "$ac_ct_STRIP"; then | |
4529 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
4530 | else | |
4531 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4532 | for as_dir in $PATH | |
4533 | do | |
4534 | IFS=$as_save_IFS | |
4535 | test -z "$as_dir" && as_dir=. | |
4536 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4537 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4538 | ac_cv_prog_ac_ct_STRIP="strip" | |
4539 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4540 | break 2 | |
4541 | fi | |
4542 | done | |
4543 | done | |
4544 | IFS=$as_save_IFS | |
4545 | ||
4546 | fi | |
4547 | fi | |
4548 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
4549 | if test -n "$ac_ct_STRIP"; then | |
4550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
4551 | $as_echo "$ac_ct_STRIP" >&6; } | |
4552 | else | |
4553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4554 | $as_echo "no" >&6; } | |
4555 | fi | |
4556 | ||
4557 | if test "x$ac_ct_STRIP" = x; then | |
4558 | STRIP=":" | |
4559 | else | |
4560 | case $cross_compiling:$ac_tool_warned in | |
4561 | yes:) | |
4562 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4563 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4564 | ac_tool_warned=yes ;; | |
4565 | esac | |
4566 | STRIP=$ac_ct_STRIP | |
4567 | fi | |
4568 | else | |
4569 | STRIP="$ac_cv_prog_STRIP" | |
4570 | fi | |
4571 | ||
4572 | fi | |
4573 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
4574 | ||
4575 | ||
770d76d7 PA |
4576 | # Make sure we can run config.sub. |
4577 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4578 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 PA |
4579 | |
4580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4581 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4582 | if ${ac_cv_build+:} false; then : |
81ecdfbb RW |
4583 | $as_echo_n "(cached) " >&6 |
4584 | else | |
770d76d7 PA |
4585 | ac_build_alias=$build_alias |
4586 | test "x$ac_build_alias" = x && | |
4587 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4588 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4589 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
770d76d7 | 4590 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4591 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
770d76d7 PA |
4592 | |
4593 | fi | |
4594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4595 | $as_echo "$ac_cv_build" >&6; } | |
4596 | case $ac_cv_build in | |
4597 | *-*-*) ;; | |
d0ac1c44 | 4598 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 PA |
4599 | esac |
4600 | build=$ac_cv_build | |
4601 | ac_save_IFS=$IFS; IFS='-' | |
4602 | set x $ac_cv_build | |
4603 | shift | |
4604 | build_cpu=$1 | |
4605 | build_vendor=$2 | |
4606 | shift; shift | |
4607 | # Remember, the first character of IFS is used to create $*, | |
4608 | # except with old shells: | |
4609 | build_os=$* | |
4610 | IFS=$ac_save_IFS | |
4611 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4612 | ||
4613 | ||
4614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4615 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4616 | if ${ac_cv_host+:} false; then : |
770d76d7 PA |
4617 | $as_echo_n "(cached) " >&6 |
4618 | else | |
4619 | if test "x$host_alias" = x; then | |
4620 | ac_cv_host=$ac_cv_build | |
4621 | else | |
4622 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d0ac1c44 | 4623 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
770d76d7 PA |
4624 | fi |
4625 | ||
4626 | fi | |
4627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4628 | $as_echo "$ac_cv_host" >&6; } | |
4629 | case $ac_cv_host in | |
4630 | *-*-*) ;; | |
d0ac1c44 | 4631 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
770d76d7 PA |
4632 | esac |
4633 | host=$ac_cv_host | |
4634 | ac_save_IFS=$IFS; IFS='-' | |
4635 | set x $ac_cv_host | |
4636 | shift | |
4637 | host_cpu=$1 | |
4638 | host_vendor=$2 | |
4639 | shift; shift | |
4640 | # Remember, the first character of IFS is used to create $*, | |
4641 | # except with old shells: | |
4642 | host_os=$* | |
4643 | IFS=$ac_save_IFS | |
4644 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4645 | ||
4646 | ||
c971b7fa PA |
4647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
4648 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4649 | if ${ac_cv_target+:} false; then : |
770d76d7 PA |
4650 | $as_echo_n "(cached) " >&6 |
4651 | else | |
c971b7fa PA |
4652 | if test "x$target_alias" = x; then |
4653 | ac_cv_target=$ac_cv_host | |
770d76d7 | 4654 | else |
c971b7fa | 4655 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
d0ac1c44 | 4656 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
770d76d7 | 4657 | fi |
770d76d7 PA |
4658 | |
4659 | fi | |
c971b7fa PA |
4660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
4661 | $as_echo "$ac_cv_target" >&6; } | |
4662 | case $ac_cv_target in | |
4663 | *-*-*) ;; | |
d0ac1c44 | 4664 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
c971b7fa PA |
4665 | esac |
4666 | target=$ac_cv_target | |
4667 | ac_save_IFS=$IFS; IFS='-' | |
4668 | set x $ac_cv_target | |
4669 | shift | |
4670 | target_cpu=$1 | |
4671 | target_vendor=$2 | |
4672 | shift; shift | |
4673 | # Remember, the first character of IFS is used to create $*, | |
4674 | # except with old shells: | |
4675 | target_os=$* | |
4676 | IFS=$ac_save_IFS | |
4677 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
770d76d7 | 4678 | |
770d76d7 | 4679 | |
c971b7fa PA |
4680 | # The aliases save the names the user supplied, while $host etc. |
4681 | # will get canonicalized. | |
4682 | test -n "$target_alias" && | |
4683 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4684 | NONENONEs,x,x, && | |
4685 | program_prefix=${target_alias}- | |
770d76d7 | 4686 | |
770d76d7 | 4687 | |
c971b7fa PA |
4688 | # Find a good install program. We prefer a C program (faster), |
4689 | # so one script is as good as another. But avoid the broken or | |
4690 | # incompatible versions: | |
4691 | # SysV /etc/install, /usr/sbin/install | |
4692 | # SunOS /usr/etc/install | |
4693 | # IRIX /sbin/install | |
4694 | # AIX /bin/install | |
4695 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
4696 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
4697 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4698 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4699 | # OS/2's system install, which has a completely different semantic | |
4700 | # ./install, which can be erroneously created by make from ./install.sh. | |
4701 | # Reject install programs that cannot install multiple files. | |
4702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
4703 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
4704 | if test -z "$INSTALL"; then | |
d0ac1c44 | 4705 | if ${ac_cv_path_install+:} false; then : |
c971b7fa | 4706 | $as_echo_n "(cached) " >&6 |
81ecdfbb RW |
4707 | else |
4708 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4709 | for as_dir in $PATH | |
fd462a61 | 4710 | do |
81ecdfbb RW |
4711 | IFS=$as_save_IFS |
4712 | test -z "$as_dir" && as_dir=. | |
4713 | # Account for people who put trailing slashes in PATH elements. | |
4714 | case $as_dir/ in #(( | |
4715 | ./ | .// | /[cC]/* | \ | |
4716 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
4717 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
4718 | /usr/ucb/* ) ;; | |
4719 | *) | |
4720 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4721 | # Don't use installbsd from OSF since it installs stuff as root | |
4722 | # by default. | |
4723 | for ac_prog in ginstall scoinst install; do | |
4724 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4725 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
81ecdfbb RW |
4726 | if test $ac_prog = install && |
4727 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4728 | # AIX install. It has an incompatible calling convention. | |
4729 | : | |
4730 | elif test $ac_prog = install && | |
4731 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
4732 | # program-specific install script used by HP pwplus--don't use. | |
4733 | : | |
4734 | else | |
4735 | rm -rf conftest.one conftest.two conftest.dir | |
4736 | echo one > conftest.one | |
4737 | echo two > conftest.two | |
4738 | mkdir conftest.dir | |
4739 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
4740 | test -s conftest.one && test -s conftest.two && | |
4741 | test -s conftest.dir/conftest.one && | |
4742 | test -s conftest.dir/conftest.two | |
4743 | then | |
4744 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
4745 | break 3 | |
4746 | fi | |
4747 | fi | |
4748 | fi | |
4749 | done | |
4750 | done | |
4751 | ;; | |
4752 | esac | |
fd462a61 | 4753 | |
81ecdfbb RW |
4754 | done |
4755 | IFS=$as_save_IFS | |
fd462a61 | 4756 | |
81ecdfbb | 4757 | rm -rf conftest.one conftest.two conftest.dir |
fd462a61 | 4758 | |
fd462a61 | 4759 | fi |
81ecdfbb RW |
4760 | if test "${ac_cv_path_install+set}" = set; then |
4761 | INSTALL=$ac_cv_path_install | |
4762 | else | |
4763 | # As a last resort, use the slow shell script. Don't cache a | |
4764 | # value for INSTALL within a source directory, because that will | |
4765 | # break other packages using the cache if that directory is | |
4766 | # removed, or if the value is a relative name. | |
4767 | INSTALL=$ac_install_sh | |
4768 | fi | |
fd462a61 | 4769 | fi |
81ecdfbb RW |
4770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
4771 | $as_echo "$INSTALL" >&6; } | |
fd462a61 | 4772 | |
81ecdfbb RW |
4773 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
4774 | # It thinks the first close brace ends the variable substitution. | |
4775 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
fd462a61 | 4776 | |
81ecdfbb | 4777 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
fd462a61 | 4778 | |
81ecdfbb | 4779 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
e28b3332 | 4780 | |
e1d2394b MS |
4781 | if test -n "$ac_tool_prefix"; then |
4782 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
4783 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
4784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4785 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4786 | if ${ac_cv_prog_AR+:} false; then : |
e1d2394b MS |
4787 | $as_echo_n "(cached) " >&6 |
4788 | else | |
4789 | if test -n "$AR"; then | |
4790 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
4791 | else | |
4792 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4793 | for as_dir in $PATH | |
4794 | do | |
4795 | IFS=$as_save_IFS | |
4796 | test -z "$as_dir" && as_dir=. | |
4797 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4798 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4799 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
4800 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4801 | break 2 | |
4802 | fi | |
4803 | done | |
4804 | done | |
4805 | IFS=$as_save_IFS | |
4806 | ||
4807 | fi | |
4808 | fi | |
4809 | AR=$ac_cv_prog_AR | |
4810 | if test -n "$AR"; then | |
4811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
4812 | $as_echo "$AR" >&6; } | |
4813 | else | |
4814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4815 | $as_echo "no" >&6; } | |
4816 | fi | |
4817 | ||
4818 | ||
4819 | fi | |
4820 | if test -z "$ac_cv_prog_AR"; then | |
4821 | ac_ct_AR=$AR | |
4822 | # Extract the first word of "ar", so it can be a program name with args. | |
4823 | set dummy ar; ac_word=$2 | |
4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4825 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4826 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
e1d2394b MS |
4827 | $as_echo_n "(cached) " >&6 |
4828 | else | |
4829 | if test -n "$ac_ct_AR"; then | |
4830 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
4831 | else | |
4832 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4833 | for as_dir in $PATH | |
4834 | do | |
4835 | IFS=$as_save_IFS | |
4836 | test -z "$as_dir" && as_dir=. | |
4837 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4838 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e1d2394b MS |
4839 | ac_cv_prog_ac_ct_AR="ar" |
4840 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4841 | break 2 | |
4842 | fi | |
4843 | done | |
4844 | done | |
4845 | IFS=$as_save_IFS | |
4846 | ||
4847 | fi | |
4848 | fi | |
4849 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
4850 | if test -n "$ac_ct_AR"; then | |
4851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
4852 | $as_echo "$ac_ct_AR" >&6; } | |
4853 | else | |
4854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4855 | $as_echo "no" >&6; } | |
4856 | fi | |
4857 | ||
4858 | if test "x$ac_ct_AR" = x; then | |
4859 | AR="" | |
4860 | else | |
4861 | case $cross_compiling:$ac_tool_warned in | |
4862 | yes:) | |
4863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4864 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4865 | ac_tool_warned=yes ;; | |
4866 | esac | |
4867 | AR=$ac_ct_AR | |
4868 | fi | |
4869 | else | |
4870 | AR="$ac_cv_prog_AR" | |
4871 | fi | |
4872 | ||
c971b7fa PA |
4873 | if test -n "$ac_tool_prefix"; then |
4874 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4875 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4877 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4878 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb RW |
4879 | $as_echo_n "(cached) " >&6 |
4880 | else | |
c971b7fa PA |
4881 | if test -n "$RANLIB"; then |
4882 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
e28b3332 | 4883 | else |
c971b7fa PA |
4884 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4885 | for as_dir in $PATH | |
4886 | do | |
4887 | IFS=$as_save_IFS | |
4888 | test -z "$as_dir" && as_dir=. | |
4889 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4890 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4891 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
4892 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4893 | break 2 | |
4894 | fi | |
4895 | done | |
4896 | done | |
4897 | IFS=$as_save_IFS | |
4898 | ||
4899 | fi | |
4900 | fi | |
4901 | RANLIB=$ac_cv_prog_RANLIB | |
4902 | if test -n "$RANLIB"; then | |
4903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4904 | $as_echo "$RANLIB" >&6; } | |
4905 | else | |
4906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4907 | $as_echo "no" >&6; } | |
4908 | fi | |
4909 | ||
4910 | ||
4911 | fi | |
4912 | if test -z "$ac_cv_prog_RANLIB"; then | |
4913 | ac_ct_RANLIB=$RANLIB | |
4914 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4915 | set dummy ranlib; ac_word=$2 | |
4916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4917 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4918 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
c971b7fa PA |
4919 | $as_echo_n "(cached) " >&6 |
4920 | else | |
4921 | if test -n "$ac_ct_RANLIB"; then | |
4922 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4923 | else | |
4924 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4925 | for as_dir in $PATH | |
4926 | do | |
4927 | IFS=$as_save_IFS | |
4928 | test -z "$as_dir" && as_dir=. | |
4929 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4930 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4931 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
4932 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4933 | break 2 | |
4934 | fi | |
4935 | done | |
4936 | done | |
4937 | IFS=$as_save_IFS | |
4938 | ||
4939 | fi | |
4940 | fi | |
4941 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4942 | if test -n "$ac_ct_RANLIB"; then | |
4943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4944 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4945 | else | |
4946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4947 | $as_echo "no" >&6; } | |
4948 | fi | |
4949 | ||
4950 | if test "x$ac_ct_RANLIB" = x; then | |
4951 | RANLIB=":" | |
4952 | else | |
4953 | case $cross_compiling:$ac_tool_warned in | |
4954 | yes:) | |
4955 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4956 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4957 | ac_tool_warned=yes ;; | |
4958 | esac | |
4959 | RANLIB=$ac_ct_RANLIB | |
4960 | fi | |
4961 | else | |
4962 | RANLIB="$ac_cv_prog_RANLIB" | |
4963 | fi | |
4964 | ||
4965 | ||
4966 | test "$program_prefix" != NONE && | |
4967 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4968 | # Use a double $ so make ignores it. | |
4969 | test "$program_suffix" != NONE && | |
4970 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4971 | # Double any \ or $. | |
4972 | # By default was `s,x,x', remove it if useless. | |
4973 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4974 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4975 | ||
4976 | ||
0bcda685 PA |
4977 | # We require a C++11 compiler. Check if one is available, and if |
4978 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
4979 | ||
458412c3 | 4980 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
4981 | ac_ext=cpp |
4982 | ac_cpp='$CXXCPP $CPPFLAGS' | |
4983 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4984 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4985 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
4986 | CXX_DIALECT="" | |
4987 | ac_success=no | |
4988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
4989 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 4990 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
4991 | $as_echo_n "(cached) " >&6 |
4992 | else | |
4993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4994 | /* end confdefs.h. */ | |
4995 | ||
4996 | ||
4997 | // If the compiler admits that it is not ready for C++11, why torture it? | |
4998 | // Hopefully, this will speed up the test. | |
4999 | ||
5000 | #ifndef __cplusplus | |
5001 | ||
5002 | #error "This is not a C++ compiler" | |
5003 | ||
5004 | #elif __cplusplus < 201103L | |
5005 | ||
5006 | #error "This is not a C++11 compiler" | |
5007 | ||
5008 | #else | |
5009 | ||
5010 | namespace cxx11 | |
5011 | { | |
5012 | ||
5013 | namespace test_static_assert | |
5014 | { | |
5015 | ||
5016 | template <typename T> | |
5017 | struct check | |
5018 | { | |
5019 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5020 | }; | |
5021 | ||
5022 | } | |
5023 | ||
5024 | namespace test_final_override | |
5025 | { | |
5026 | ||
5027 | struct Base | |
5028 | { | |
5029 | virtual void f() {} | |
5030 | }; | |
5031 | ||
5032 | struct Derived : public Base | |
5033 | { | |
5034 | virtual void f() override {} | |
5035 | }; | |
5036 | ||
5037 | } | |
5038 | ||
5039 | namespace test_double_right_angle_brackets | |
5040 | { | |
5041 | ||
5042 | template < typename T > | |
5043 | struct check {}; | |
5044 | ||
5045 | typedef check<void> single_type; | |
5046 | typedef check<check<void>> double_type; | |
5047 | typedef check<check<check<void>>> triple_type; | |
5048 | typedef check<check<check<check<void>>>> quadruple_type; | |
5049 | ||
5050 | } | |
5051 | ||
5052 | namespace test_decltype | |
5053 | { | |
5054 | ||
5055 | int | |
5056 | f() | |
5057 | { | |
5058 | int a = 1; | |
5059 | decltype(a) b = 2; | |
5060 | return a + b; | |
5061 | } | |
5062 | ||
5063 | } | |
5064 | ||
5065 | namespace test_type_deduction | |
5066 | { | |
5067 | ||
5068 | template < typename T1, typename T2 > | |
5069 | struct is_same | |
5070 | { | |
5071 | static const bool value = false; | |
5072 | }; | |
5073 | ||
5074 | template < typename T > | |
5075 | struct is_same<T, T> | |
5076 | { | |
5077 | static const bool value = true; | |
5078 | }; | |
5079 | ||
5080 | template < typename T1, typename T2 > | |
5081 | auto | |
5082 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5083 | { | |
5084 | return a1 + a2; | |
5085 | } | |
5086 | ||
5087 | int | |
5088 | test(const int c, volatile int v) | |
5089 | { | |
5090 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5091 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5092 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5093 | auto ac = c; | |
5094 | auto av = v; | |
5095 | auto sumi = ac + av + 'x'; | |
5096 | auto sumf = ac + av + 1.0; | |
5097 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5098 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5099 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5100 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5101 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5102 | return (sumf > 0.0) ? sumi : add(c, v); | |
5103 | } | |
5104 | ||
5105 | } | |
5106 | ||
5107 | namespace test_noexcept | |
5108 | { | |
5109 | ||
5110 | int f() { return 0; } | |
5111 | int g() noexcept { return 0; } | |
5112 | ||
5113 | static_assert(noexcept(f()) == false, ""); | |
5114 | static_assert(noexcept(g()) == true, ""); | |
5115 | ||
5116 | } | |
5117 | ||
5118 | namespace test_constexpr | |
5119 | { | |
5120 | ||
5121 | template < typename CharT > | |
5122 | unsigned long constexpr | |
5123 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5124 | { | |
5125 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5126 | } | |
5127 | ||
5128 | template < typename CharT > | |
5129 | unsigned long constexpr | |
5130 | strlen_c(const CharT *const s) noexcept | |
5131 | { | |
5132 | return strlen_c_r(s, 0UL); | |
5133 | } | |
5134 | ||
5135 | static_assert(strlen_c("") == 0UL, ""); | |
5136 | static_assert(strlen_c("1") == 1UL, ""); | |
5137 | static_assert(strlen_c("example") == 7UL, ""); | |
5138 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5139 | ||
5140 | } | |
5141 | ||
5142 | namespace test_rvalue_references | |
5143 | { | |
5144 | ||
5145 | template < int N > | |
5146 | struct answer | |
5147 | { | |
5148 | static constexpr int value = N; | |
5149 | }; | |
5150 | ||
5151 | answer<1> f(int&) { return answer<1>(); } | |
5152 | answer<2> f(const int&) { return answer<2>(); } | |
5153 | answer<3> f(int&&) { return answer<3>(); } | |
5154 | ||
5155 | void | |
5156 | test() | |
5157 | { | |
5158 | int i = 0; | |
5159 | const int c = 0; | |
5160 | static_assert(decltype(f(i))::value == 1, ""); | |
5161 | static_assert(decltype(f(c))::value == 2, ""); | |
5162 | static_assert(decltype(f(0))::value == 3, ""); | |
5163 | } | |
5164 | ||
5165 | } | |
5166 | ||
5167 | namespace test_uniform_initialization | |
5168 | { | |
5169 | ||
5170 | struct test | |
5171 | { | |
5172 | static const int zero {}; | |
5173 | static const int one {1}; | |
5174 | }; | |
5175 | ||
5176 | static_assert(test::zero == 0, ""); | |
5177 | static_assert(test::one == 1, ""); | |
5178 | ||
5179 | } | |
5180 | ||
5181 | namespace test_lambdas | |
5182 | { | |
5183 | ||
5184 | void | |
5185 | test1() | |
5186 | { | |
5187 | auto lambda1 = [](){}; | |
5188 | auto lambda2 = lambda1; | |
5189 | lambda1(); | |
5190 | lambda2(); | |
5191 | } | |
5192 | ||
5193 | int | |
5194 | test2() | |
5195 | { | |
5196 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5197 | auto b = []() -> int { return '0'; }(); | |
5198 | auto c = [=](){ return a + b; }(); | |
5199 | auto d = [&](){ return c; }(); | |
5200 | auto e = [a, &b](int x) mutable { | |
5201 | const auto identity = [](int y){ return y; }; | |
5202 | for (auto i = 0; i < a; ++i) | |
5203 | a += b--; | |
5204 | return x + identity(a + b); | |
5205 | }(0); | |
5206 | return a + b + c + d + e; | |
5207 | } | |
5208 | ||
5209 | int | |
5210 | test3() | |
5211 | { | |
5212 | const auto nullary = [](){ return 0; }; | |
5213 | const auto unary = [](int x){ return x; }; | |
5214 | using nullary_t = decltype(nullary); | |
5215 | using unary_t = decltype(unary); | |
5216 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5217 | const auto higher2nd = [unary](nullary_t f1){ | |
5218 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5219 | }; | |
5220 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5221 | } | |
5222 | ||
5223 | } | |
5224 | ||
5225 | namespace test_variadic_templates | |
5226 | { | |
5227 | ||
5228 | template <int...> | |
5229 | struct sum; | |
5230 | ||
5231 | template <int N0, int... N1toN> | |
5232 | struct sum<N0, N1toN...> | |
5233 | { | |
5234 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5235 | }; | |
5236 | ||
5237 | template <> | |
5238 | struct sum<> | |
5239 | { | |
5240 | static constexpr auto value = 0; | |
5241 | }; | |
5242 | ||
5243 | static_assert(sum<>::value == 0, ""); | |
5244 | static_assert(sum<1>::value == 1, ""); | |
5245 | static_assert(sum<23>::value == 23, ""); | |
5246 | static_assert(sum<1, 2>::value == 3, ""); | |
5247 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5248 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5249 | ||
5250 | } | |
5251 | ||
5252 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5253 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5254 | // because of this. | |
5255 | namespace test_template_alias_sfinae | |
5256 | { | |
5257 | ||
5258 | struct foo {}; | |
5259 | ||
5260 | template<typename T> | |
5261 | using member = typename T::member_type; | |
5262 | ||
5263 | template<typename T> | |
5264 | void func(...) {} | |
5265 | ||
5266 | template<typename T> | |
5267 | void func(member<T>*) {} | |
5268 | ||
5269 | void test(); | |
5270 | ||
5271 | void test() { func<foo>(0); } | |
5272 | ||
5273 | } | |
5274 | ||
5275 | } // namespace cxx11 | |
5276 | ||
5277 | #endif // __cplusplus >= 201103L | |
5278 | ||
5279 | ||
5280 | ||
5281 | _ACEOF | |
5282 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5283 | ax_cv_cxx_compile_cxx11=yes | |
5284 | else | |
5285 | ax_cv_cxx_compile_cxx11=no | |
5286 | fi | |
5287 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5288 | fi | |
5289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5290 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5291 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5292 | ac_success=yes | |
5293 | fi | |
5294 | ||
5295 | if test x$ac_success = xno; then | |
458412c3 TT |
5296 | for alternative in ${ax_cxx_compile_alternatives}; do |
5297 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5298 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5300 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5301 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5302 | $as_echo_n "(cached) " >&6 |
5303 | else | |
5304 | ac_save_CXX="$CXX" | |
5305 | CXX="$CXX $switch" | |
5306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5307 | /* end confdefs.h. */ | |
5308 | ||
5309 | ||
5310 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5311 | // Hopefully, this will speed up the test. | |
5312 | ||
5313 | #ifndef __cplusplus | |
5314 | ||
5315 | #error "This is not a C++ compiler" | |
5316 | ||
5317 | #elif __cplusplus < 201103L | |
5318 | ||
5319 | #error "This is not a C++11 compiler" | |
5320 | ||
5321 | #else | |
5322 | ||
5323 | namespace cxx11 | |
5324 | { | |
5325 | ||
5326 | namespace test_static_assert | |
5327 | { | |
5328 | ||
5329 | template <typename T> | |
5330 | struct check | |
5331 | { | |
5332 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5333 | }; | |
5334 | ||
5335 | } | |
5336 | ||
5337 | namespace test_final_override | |
5338 | { | |
5339 | ||
5340 | struct Base | |
5341 | { | |
5342 | virtual void f() {} | |
5343 | }; | |
5344 | ||
5345 | struct Derived : public Base | |
5346 | { | |
5347 | virtual void f() override {} | |
5348 | }; | |
5349 | ||
5350 | } | |
5351 | ||
5352 | namespace test_double_right_angle_brackets | |
5353 | { | |
5354 | ||
5355 | template < typename T > | |
5356 | struct check {}; | |
5357 | ||
5358 | typedef check<void> single_type; | |
5359 | typedef check<check<void>> double_type; | |
5360 | typedef check<check<check<void>>> triple_type; | |
5361 | typedef check<check<check<check<void>>>> quadruple_type; | |
5362 | ||
5363 | } | |
5364 | ||
5365 | namespace test_decltype | |
5366 | { | |
5367 | ||
5368 | int | |
5369 | f() | |
5370 | { | |
5371 | int a = 1; | |
5372 | decltype(a) b = 2; | |
5373 | return a + b; | |
5374 | } | |
5375 | ||
5376 | } | |
5377 | ||
5378 | namespace test_type_deduction | |
5379 | { | |
5380 | ||
5381 | template < typename T1, typename T2 > | |
5382 | struct is_same | |
5383 | { | |
5384 | static const bool value = false; | |
5385 | }; | |
5386 | ||
5387 | template < typename T > | |
5388 | struct is_same<T, T> | |
5389 | { | |
5390 | static const bool value = true; | |
5391 | }; | |
5392 | ||
5393 | template < typename T1, typename T2 > | |
5394 | auto | |
5395 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5396 | { | |
5397 | return a1 + a2; | |
5398 | } | |
5399 | ||
5400 | int | |
5401 | test(const int c, volatile int v) | |
5402 | { | |
5403 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5404 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5405 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5406 | auto ac = c; | |
5407 | auto av = v; | |
5408 | auto sumi = ac + av + 'x'; | |
5409 | auto sumf = ac + av + 1.0; | |
5410 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5411 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5412 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5413 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5414 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5415 | return (sumf > 0.0) ? sumi : add(c, v); | |
5416 | } | |
5417 | ||
5418 | } | |
5419 | ||
5420 | namespace test_noexcept | |
5421 | { | |
5422 | ||
5423 | int f() { return 0; } | |
5424 | int g() noexcept { return 0; } | |
5425 | ||
5426 | static_assert(noexcept(f()) == false, ""); | |
5427 | static_assert(noexcept(g()) == true, ""); | |
5428 | ||
5429 | } | |
5430 | ||
5431 | namespace test_constexpr | |
5432 | { | |
5433 | ||
5434 | template < typename CharT > | |
5435 | unsigned long constexpr | |
5436 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5437 | { | |
5438 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5439 | } | |
5440 | ||
5441 | template < typename CharT > | |
5442 | unsigned long constexpr | |
5443 | strlen_c(const CharT *const s) noexcept | |
5444 | { | |
5445 | return strlen_c_r(s, 0UL); | |
5446 | } | |
5447 | ||
5448 | static_assert(strlen_c("") == 0UL, ""); | |
5449 | static_assert(strlen_c("1") == 1UL, ""); | |
5450 | static_assert(strlen_c("example") == 7UL, ""); | |
5451 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5452 | ||
5453 | } | |
5454 | ||
5455 | namespace test_rvalue_references | |
5456 | { | |
5457 | ||
5458 | template < int N > | |
5459 | struct answer | |
5460 | { | |
5461 | static constexpr int value = N; | |
5462 | }; | |
5463 | ||
5464 | answer<1> f(int&) { return answer<1>(); } | |
5465 | answer<2> f(const int&) { return answer<2>(); } | |
5466 | answer<3> f(int&&) { return answer<3>(); } | |
5467 | ||
5468 | void | |
5469 | test() | |
5470 | { | |
5471 | int i = 0; | |
5472 | const int c = 0; | |
5473 | static_assert(decltype(f(i))::value == 1, ""); | |
5474 | static_assert(decltype(f(c))::value == 2, ""); | |
5475 | static_assert(decltype(f(0))::value == 3, ""); | |
5476 | } | |
5477 | ||
5478 | } | |
5479 | ||
5480 | namespace test_uniform_initialization | |
5481 | { | |
5482 | ||
5483 | struct test | |
5484 | { | |
5485 | static const int zero {}; | |
5486 | static const int one {1}; | |
5487 | }; | |
5488 | ||
5489 | static_assert(test::zero == 0, ""); | |
5490 | static_assert(test::one == 1, ""); | |
5491 | ||
5492 | } | |
5493 | ||
5494 | namespace test_lambdas | |
5495 | { | |
5496 | ||
5497 | void | |
5498 | test1() | |
5499 | { | |
5500 | auto lambda1 = [](){}; | |
5501 | auto lambda2 = lambda1; | |
5502 | lambda1(); | |
5503 | lambda2(); | |
5504 | } | |
5505 | ||
5506 | int | |
5507 | test2() | |
5508 | { | |
5509 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5510 | auto b = []() -> int { return '0'; }(); | |
5511 | auto c = [=](){ return a + b; }(); | |
5512 | auto d = [&](){ return c; }(); | |
5513 | auto e = [a, &b](int x) mutable { | |
5514 | const auto identity = [](int y){ return y; }; | |
5515 | for (auto i = 0; i < a; ++i) | |
5516 | a += b--; | |
5517 | return x + identity(a + b); | |
5518 | }(0); | |
5519 | return a + b + c + d + e; | |
5520 | } | |
5521 | ||
5522 | int | |
5523 | test3() | |
5524 | { | |
5525 | const auto nullary = [](){ return 0; }; | |
5526 | const auto unary = [](int x){ return x; }; | |
5527 | using nullary_t = decltype(nullary); | |
5528 | using unary_t = decltype(unary); | |
5529 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5530 | const auto higher2nd = [unary](nullary_t f1){ | |
5531 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5532 | }; | |
5533 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5534 | } | |
5535 | ||
5536 | } | |
5537 | ||
5538 | namespace test_variadic_templates | |
5539 | { | |
5540 | ||
5541 | template <int...> | |
5542 | struct sum; | |
5543 | ||
5544 | template <int N0, int... N1toN> | |
5545 | struct sum<N0, N1toN...> | |
5546 | { | |
5547 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5548 | }; | |
5549 | ||
5550 | template <> | |
5551 | struct sum<> | |
5552 | { | |
5553 | static constexpr auto value = 0; | |
5554 | }; | |
5555 | ||
5556 | static_assert(sum<>::value == 0, ""); | |
5557 | static_assert(sum<1>::value == 1, ""); | |
5558 | static_assert(sum<23>::value == 23, ""); | |
5559 | static_assert(sum<1, 2>::value == 3, ""); | |
5560 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5561 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5562 | ||
5563 | } | |
5564 | ||
5565 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5566 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5567 | // because of this. | |
5568 | namespace test_template_alias_sfinae | |
5569 | { | |
5570 | ||
5571 | struct foo {}; | |
5572 | ||
5573 | template<typename T> | |
5574 | using member = typename T::member_type; | |
5575 | ||
5576 | template<typename T> | |
5577 | void func(...) {} | |
5578 | ||
5579 | template<typename T> | |
5580 | void func(member<T>*) {} | |
5581 | ||
5582 | void test(); | |
5583 | ||
5584 | void test() { func<foo>(0); } | |
5585 | ||
5586 | } | |
5587 | ||
5588 | } // namespace cxx11 | |
5589 | ||
5590 | #endif // __cplusplus >= 201103L | |
5591 | ||
5592 | ||
5593 | ||
5594 | _ACEOF | |
5595 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5596 | eval $cachevar=yes | |
5597 | else | |
5598 | eval $cachevar=no | |
5599 | fi | |
5600 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5601 | CXX="$ac_save_CXX" | |
5602 | fi | |
5603 | eval ac_res=\$$cachevar | |
5604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5605 | $as_echo "$ac_res" >&6; } | |
5606 | if eval test x\$$cachevar = xyes; then | |
5607 | CXX_DIALECT="$switch" | |
5608 | ac_success=yes | |
5609 | break | |
5610 | fi | |
5611 | done | |
5612 | fi | |
5613 | ||
5614 | if test x$ac_success = xno; then | |
458412c3 TT |
5615 | for alternative in ${ax_cxx_compile_alternatives}; do |
5616 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5617 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5619 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5620 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5621 | $as_echo_n "(cached) " >&6 |
5622 | else | |
5623 | ac_save_CXX="$CXX" | |
458412c3 TT |
5624 | CXX="$CXX $switch" |
5625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5626 | /* end confdefs.h. */ |
5627 | ||
5628 | ||
5629 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5630 | // Hopefully, this will speed up the test. | |
5631 | ||
5632 | #ifndef __cplusplus | |
5633 | ||
5634 | #error "This is not a C++ compiler" | |
5635 | ||
5636 | #elif __cplusplus < 201103L | |
5637 | ||
5638 | #error "This is not a C++11 compiler" | |
5639 | ||
5640 | #else | |
5641 | ||
5642 | namespace cxx11 | |
5643 | { | |
5644 | ||
5645 | namespace test_static_assert | |
5646 | { | |
5647 | ||
5648 | template <typename T> | |
5649 | struct check | |
5650 | { | |
5651 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5652 | }; | |
5653 | ||
5654 | } | |
5655 | ||
5656 | namespace test_final_override | |
5657 | { | |
5658 | ||
5659 | struct Base | |
5660 | { | |
5661 | virtual void f() {} | |
5662 | }; | |
5663 | ||
5664 | struct Derived : public Base | |
5665 | { | |
5666 | virtual void f() override {} | |
5667 | }; | |
5668 | ||
5669 | } | |
5670 | ||
5671 | namespace test_double_right_angle_brackets | |
5672 | { | |
5673 | ||
5674 | template < typename T > | |
5675 | struct check {}; | |
5676 | ||
5677 | typedef check<void> single_type; | |
5678 | typedef check<check<void>> double_type; | |
5679 | typedef check<check<check<void>>> triple_type; | |
5680 | typedef check<check<check<check<void>>>> quadruple_type; | |
5681 | ||
5682 | } | |
5683 | ||
5684 | namespace test_decltype | |
5685 | { | |
5686 | ||
5687 | int | |
5688 | f() | |
5689 | { | |
5690 | int a = 1; | |
5691 | decltype(a) b = 2; | |
5692 | return a + b; | |
5693 | } | |
5694 | ||
5695 | } | |
5696 | ||
5697 | namespace test_type_deduction | |
5698 | { | |
5699 | ||
5700 | template < typename T1, typename T2 > | |
5701 | struct is_same | |
5702 | { | |
5703 | static const bool value = false; | |
5704 | }; | |
5705 | ||
5706 | template < typename T > | |
5707 | struct is_same<T, T> | |
5708 | { | |
5709 | static const bool value = true; | |
5710 | }; | |
5711 | ||
5712 | template < typename T1, typename T2 > | |
5713 | auto | |
5714 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5715 | { | |
5716 | return a1 + a2; | |
5717 | } | |
5718 | ||
5719 | int | |
5720 | test(const int c, volatile int v) | |
5721 | { | |
5722 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5723 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5724 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5725 | auto ac = c; | |
5726 | auto av = v; | |
5727 | auto sumi = ac + av + 'x'; | |
5728 | auto sumf = ac + av + 1.0; | |
5729 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5730 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5731 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5732 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5733 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5734 | return (sumf > 0.0) ? sumi : add(c, v); | |
5735 | } | |
5736 | ||
5737 | } | |
5738 | ||
5739 | namespace test_noexcept | |
5740 | { | |
5741 | ||
5742 | int f() { return 0; } | |
5743 | int g() noexcept { return 0; } | |
5744 | ||
5745 | static_assert(noexcept(f()) == false, ""); | |
5746 | static_assert(noexcept(g()) == true, ""); | |
5747 | ||
5748 | } | |
5749 | ||
5750 | namespace test_constexpr | |
5751 | { | |
5752 | ||
5753 | template < typename CharT > | |
5754 | unsigned long constexpr | |
5755 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5756 | { | |
5757 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5758 | } | |
5759 | ||
5760 | template < typename CharT > | |
5761 | unsigned long constexpr | |
5762 | strlen_c(const CharT *const s) noexcept | |
5763 | { | |
5764 | return strlen_c_r(s, 0UL); | |
5765 | } | |
5766 | ||
5767 | static_assert(strlen_c("") == 0UL, ""); | |
5768 | static_assert(strlen_c("1") == 1UL, ""); | |
5769 | static_assert(strlen_c("example") == 7UL, ""); | |
5770 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5771 | ||
5772 | } | |
5773 | ||
5774 | namespace test_rvalue_references | |
5775 | { | |
5776 | ||
5777 | template < int N > | |
5778 | struct answer | |
5779 | { | |
5780 | static constexpr int value = N; | |
5781 | }; | |
5782 | ||
5783 | answer<1> f(int&) { return answer<1>(); } | |
5784 | answer<2> f(const int&) { return answer<2>(); } | |
5785 | answer<3> f(int&&) { return answer<3>(); } | |
5786 | ||
5787 | void | |
5788 | test() | |
5789 | { | |
5790 | int i = 0; | |
5791 | const int c = 0; | |
5792 | static_assert(decltype(f(i))::value == 1, ""); | |
5793 | static_assert(decltype(f(c))::value == 2, ""); | |
5794 | static_assert(decltype(f(0))::value == 3, ""); | |
5795 | } | |
5796 | ||
5797 | } | |
5798 | ||
5799 | namespace test_uniform_initialization | |
5800 | { | |
5801 | ||
5802 | struct test | |
5803 | { | |
5804 | static const int zero {}; | |
5805 | static const int one {1}; | |
5806 | }; | |
5807 | ||
5808 | static_assert(test::zero == 0, ""); | |
5809 | static_assert(test::one == 1, ""); | |
5810 | ||
5811 | } | |
5812 | ||
5813 | namespace test_lambdas | |
5814 | { | |
5815 | ||
5816 | void | |
5817 | test1() | |
5818 | { | |
5819 | auto lambda1 = [](){}; | |
5820 | auto lambda2 = lambda1; | |
5821 | lambda1(); | |
5822 | lambda2(); | |
5823 | } | |
5824 | ||
5825 | int | |
5826 | test2() | |
5827 | { | |
5828 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5829 | auto b = []() -> int { return '0'; }(); | |
5830 | auto c = [=](){ return a + b; }(); | |
5831 | auto d = [&](){ return c; }(); | |
5832 | auto e = [a, &b](int x) mutable { | |
5833 | const auto identity = [](int y){ return y; }; | |
5834 | for (auto i = 0; i < a; ++i) | |
5835 | a += b--; | |
5836 | return x + identity(a + b); | |
5837 | }(0); | |
5838 | return a + b + c + d + e; | |
5839 | } | |
5840 | ||
5841 | int | |
5842 | test3() | |
5843 | { | |
5844 | const auto nullary = [](){ return 0; }; | |
5845 | const auto unary = [](int x){ return x; }; | |
5846 | using nullary_t = decltype(nullary); | |
5847 | using unary_t = decltype(unary); | |
5848 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5849 | const auto higher2nd = [unary](nullary_t f1){ | |
5850 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5851 | }; | |
5852 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5853 | } | |
5854 | ||
5855 | } | |
5856 | ||
5857 | namespace test_variadic_templates | |
5858 | { | |
5859 | ||
5860 | template <int...> | |
5861 | struct sum; | |
5862 | ||
5863 | template <int N0, int... N1toN> | |
5864 | struct sum<N0, N1toN...> | |
5865 | { | |
5866 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5867 | }; | |
5868 | ||
5869 | template <> | |
5870 | struct sum<> | |
5871 | { | |
5872 | static constexpr auto value = 0; | |
5873 | }; | |
5874 | ||
5875 | static_assert(sum<>::value == 0, ""); | |
5876 | static_assert(sum<1>::value == 1, ""); | |
5877 | static_assert(sum<23>::value == 23, ""); | |
5878 | static_assert(sum<1, 2>::value == 3, ""); | |
5879 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5880 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5881 | ||
5882 | } | |
5883 | ||
5884 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5885 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5886 | // because of this. | |
5887 | namespace test_template_alias_sfinae | |
5888 | { | |
5889 | ||
5890 | struct foo {}; | |
5891 | ||
5892 | template<typename T> | |
5893 | using member = typename T::member_type; | |
5894 | ||
5895 | template<typename T> | |
5896 | void func(...) {} | |
5897 | ||
5898 | template<typename T> | |
5899 | void func(member<T>*) {} | |
5900 | ||
5901 | void test(); | |
5902 | ||
5903 | void test() { func<foo>(0); } | |
5904 | ||
5905 | } | |
5906 | ||
5907 | } // namespace cxx11 | |
5908 | ||
5909 | #endif // __cplusplus >= 201103L | |
5910 | ||
5911 | ||
5912 | ||
5913 | _ACEOF | |
5914 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5915 | eval $cachevar=yes | |
5916 | else | |
5917 | eval $cachevar=no | |
5918 | fi | |
5919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
458412c3 | 5920 | CXX="$ac_save_CXX" |
0bcda685 PA |
5921 | fi |
5922 | eval ac_res=\$$cachevar | |
5923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5924 | $as_echo "$ac_res" >&6; } | |
458412c3 TT |
5925 | if eval test x\$$cachevar = xyes; then |
5926 | CXX_DIALECT="$switch" | |
5927 | ac_success=yes | |
5928 | break | |
5929 | fi | |
5930 | done | |
5931 | if test x$ac_success = xyes; then | |
0bcda685 PA |
5932 | break |
5933 | fi | |
5934 | done | |
5935 | fi | |
5936 | ac_ext=c | |
5937 | ac_cpp='$CPP $CPPFLAGS' | |
5938 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5939 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5940 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5941 | ||
5942 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
5943 | if test x$ac_success = xno; then | |
d0ac1c44 | 5944 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
5945 | fi |
5946 | fi | |
5947 | if test x$ac_success = xno; then | |
5948 | HAVE_CXX11=0 | |
5949 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
5950 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
5951 | else | |
5952 | HAVE_CXX11=1 | |
5953 | ||
5954 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
5955 | ||
5956 | fi | |
5957 | ||
5958 | ||
5959 | ||
5960 | ||
c971b7fa PA |
5961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
5962 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 5963 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
5964 | $as_echo_n "(cached) " >&6 |
5965 | else | |
5966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5967 | /* end confdefs.h. */ | |
5968 | #include <stdlib.h> | |
5969 | #include <stdarg.h> | |
5970 | #include <string.h> | |
5971 | #include <float.h> | |
5972 | ||
5973 | int | |
5974 | main () | |
5975 | { | |
5976 | ||
5977 | ; | |
5978 | return 0; | |
5979 | } | |
5980 | _ACEOF | |
5981 | if ac_fn_c_try_compile "$LINENO"; then : | |
5982 | ac_cv_header_stdc=yes | |
5983 | else | |
5984 | ac_cv_header_stdc=no | |
5985 | fi | |
5986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5987 | ||
5988 | if test $ac_cv_header_stdc = yes; then | |
5989 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5991 | /* end confdefs.h. */ | |
5992 | #include <string.h> | |
5993 | ||
5994 | _ACEOF | |
5995 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
5996 | $EGREP "memchr" >/dev/null 2>&1; then : |
5997 | ||
68070c10 | 5998 | else |
81ecdfbb RW |
5999 | ac_cv_header_stdc=no |
6000 | fi | |
6001 | rm -f conftest* | |
68070c10 PA |
6002 | |
6003 | fi | |
68070c10 | 6004 | |
81ecdfbb RW |
6005 | if test $ac_cv_header_stdc = yes; then |
6006 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6008 | /* end confdefs.h. */ | |
6009 | #include <stdlib.h> | |
68070c10 | 6010 | |
68070c10 | 6011 | _ACEOF |
81ecdfbb RW |
6012 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6013 | $EGREP "free" >/dev/null 2>&1; then : | |
68070c10 PA |
6014 | |
6015 | else | |
81ecdfbb | 6016 | ac_cv_header_stdc=no |
68070c10 | 6017 | fi |
81ecdfbb RW |
6018 | rm -f conftest* |
6019 | ||
68070c10 PA |
6020 | fi |
6021 | ||
81ecdfbb RW |
6022 | if test $ac_cv_header_stdc = yes; then |
6023 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6024 | if test "$cross_compiling" = yes; then : | |
6025 | : | |
43d5792c | 6026 | else |
81ecdfbb | 6027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6028 | /* end confdefs.h. */ |
81ecdfbb RW |
6029 | #include <ctype.h> |
6030 | #include <stdlib.h> | |
6031 | #if ((' ' & 0x0FF) == 0x020) | |
6032 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6033 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6034 | #else | |
6035 | # define ISLOWER(c) \ | |
6036 | (('a' <= (c) && (c) <= 'i') \ | |
6037 | || ('j' <= (c) && (c) <= 'r') \ | |
6038 | || ('s' <= (c) && (c) <= 'z')) | |
6039 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6040 | #endif | |
6041 | ||
6042 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
bec39cab AC |
6043 | int |
6044 | main () | |
6045 | { | |
81ecdfbb RW |
6046 | int i; |
6047 | for (i = 0; i < 256; i++) | |
6048 | if (XOR (islower (i), ISLOWER (i)) | |
6049 | || toupper (i) != TOUPPER (i)) | |
6050 | return 2; | |
bec39cab AC |
6051 | return 0; |
6052 | } | |
6053 | _ACEOF | |
81ecdfbb | 6054 | if ac_fn_c_try_run "$LINENO"; then : |
bec39cab | 6055 | |
81ecdfbb RW |
6056 | else |
6057 | ac_cv_header_stdc=no | |
43d5792c | 6058 | fi |
81ecdfbb RW |
6059 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6060 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
43d5792c | 6061 | fi |
e122f1f5 | 6062 | |
68070c10 | 6063 | fi |
81ecdfbb RW |
6064 | fi |
6065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6066 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6067 | if test $ac_cv_header_stdc = yes; then | |
68070c10 | 6068 | |
81ecdfbb | 6069 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
68070c10 | 6070 | |
68070c10 | 6071 | fi |
68070c10 | 6072 | |
68070c10 | 6073 | |
17ef446e | 6074 | # Set the 'development' global. |
919adfe8 | 6075 | . $srcdir/../bfd/development.sh |
17ef446e | 6076 | |
8ecfd7bd SDJ |
6077 | |
6078 | # Check whether we will enable the inclusion of unit tests when | |
6079 | # compiling GDB. | |
6080 | # | |
6081 | # The default value of this option changes depending whether we're on | |
6082 | # development mode (in which case it's "true") or not (in which case | |
6083 | # it's "false"). | |
6084 | # Check whether --enable-unit-tests was given. | |
6085 | if test "${enable_unit_tests+set}" = set; then : | |
6086 | enableval=$enable_unit_tests; case "${enableval}" in | |
6087 | yes) enable_unittests=true ;; | |
6088 | no) enable_unittests=false ;; | |
6089 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
6090 | esac | |
6091 | else | |
6092 | enable_unittests=$development | |
6093 | fi | |
6094 | ||
6095 | ||
6096 | if $enable_unittests; then | |
6d580b63 YQ |
6097 | |
6098 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
6099 | ||
8ecfd7bd | 6100 | |
268a13a5 | 6101 | srv_selftest_objs="gdbsupport/selftest.o" |
8ecfd7bd | 6102 | |
6d580b63 YQ |
6103 | fi |
6104 | ||
8ecfd7bd | 6105 | |
bd885420 YQ |
6106 | case ${build_alias} in |
6107 | "") build_noncanonical=${build} ;; | |
6108 | *) build_noncanonical=${build_alias} ;; | |
6109 | esac | |
6110 | ||
6111 | case ${host_alias} in | |
6112 | "") host_noncanonical=${build_noncanonical} ;; | |
6113 | *) host_noncanonical=${host_alias} ;; | |
6114 | esac | |
6115 | ||
6116 | case ${target_alias} in | |
6117 | "") target_noncanonical=${host_noncanonical} ;; | |
6118 | *) target_noncanonical=${target_alias} ;; | |
6119 | esac | |
6120 | ||
6121 | ||
6122 | ||
6123 | ||
6124 | ||
6125 | ||
61c125b9 TT |
6126 | # Dependency checking. |
6127 | rm -rf .tst 2>/dev/null | |
6128 | mkdir .tst 2>/dev/null | |
6129 | if test -d .tst; then | |
6130 | am__leading_dot=. | |
6131 | else | |
6132 | am__leading_dot=_ | |
6133 | fi | |
6134 | rmdir .tst 2>/dev/null | |
6135 | ||
6136 | DEPDIR="${am__leading_dot}deps" | |
6137 | ||
6138 | ac_config_commands="$ac_config_commands depdir" | |
6139 | ||
6140 | ||
60d6cfc9 YQ |
6141 | |
6142 | # Create sub-directories for objects and dependencies. | |
42cd72aa | 6143 | CONFIG_SRC_SUBDIR="arch gdbsupport nat target" |
60d6cfc9 YQ |
6144 | |
6145 | ||
6146 | ac_config_commands="$ac_config_commands gdbdepdir" | |
6147 | ||
6148 | ||
61c125b9 TT |
6149 | depcc="$CC" am_compiler_list= |
6150 | ||
6151 | am_depcomp=$ac_aux_dir/depcomp | |
6152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
6153 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6154 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
61c125b9 TT |
6155 | $as_echo_n "(cached) " >&6 |
6156 | else | |
6157 | if test -f "$am_depcomp"; then | |
6158 | # We make a subdir and do the tests there. Otherwise we can end up | |
6159 | # making bogus files that we don't know about and never remove. For | |
6160 | # instance it was reported that on HP-UX the gcc test will end up | |
6161 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6162 | # in D'. | |
6163 | mkdir conftest.dir | |
6164 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6165 | # using a relative directory. | |
6166 | cp "$am_depcomp" conftest.dir | |
6167 | cd conftest.dir | |
6168 | # We will build objects and dependencies in a subdirectory because | |
6169 | # it helps to detect inapplicable dependency modes. For instance | |
6170 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6171 | # side effect of compilation, but ICC will put the dependencies in | |
6172 | # the current directory while Tru64 will put them in the object | |
6173 | # directory. | |
6174 | mkdir sub | |
6175 | ||
6176 | am_cv_CC_dependencies_compiler_type=none | |
6177 | if test "$am_compiler_list" = ""; then | |
6178 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6179 | fi | |
6180 | for depmode in $am_compiler_list; do | |
6181 | if test $depmode = none; then break; fi | |
6182 | ||
6183 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 | |
6184 | # Setup a source with many dependencies, because some compilers | |
6185 | # like to wrap large dependency lists on column 80 (with \), and | |
6186 | # we should not choose a depcomp mode which is confused by this. | |
6187 | # | |
6188 | # We need to recreate these files for each test, as the compiler may | |
6189 | # overwrite some of them when testing with obscure command lines. | |
6190 | # This happens at least with the AIX C compiler. | |
6191 | : > sub/conftest.c | |
6192 | for i in 1 2 3 4 5 6; do | |
6193 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6194 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6195 | # Solaris 8's {/usr,}/bin/sh. | |
6196 | touch sub/conftst$i.h | |
6197 | done | |
6198 | echo "include sub/conftest.Po" > confmf | |
6199 | ||
6200 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6201 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6202 | # handle `-M -o', and we need to detect this. | |
6203 | depcmd="depmode=$depmode \ | |
6204 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6205 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6206 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6207 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6208 | if env $depcmd > conftest.err 2>&1 && | |
6209 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6210 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6211 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6212 | # icc doesn't choke on unknown options, it will just issue warnings | |
6213 | # or remarks (even with -Werror). So we grep stderr for any message | |
6214 | # that says an option was ignored or not supported. | |
6215 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6216 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6217 | # The diagnosis changed in icc 8.0: | |
6218 | # icc: Command line remark: option '-MP' not supported | |
6219 | if (grep 'ignoring option' conftest.err || | |
6220 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6221 | am_cv_CC_dependencies_compiler_type=$depmode | |
6222 | $as_echo "$as_me:$LINENO: success" >&5 | |
6223 | break | |
6224 | fi | |
6225 | fi | |
6226 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 | |
6227 | sed -e 's/^/| /' < conftest.err >&5 | |
6228 | done | |
6229 | ||
6230 | cd .. | |
6231 | rm -rf conftest.dir | |
6232 | else | |
6233 | am_cv_CC_dependencies_compiler_type=none | |
6234 | fi | |
6235 | ||
6236 | fi | |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
6238 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
6239 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone | |
d0ac1c44 | 6240 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
61c125b9 TT |
6241 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6242 | ||
6243 | fi | |
6244 | ||
6245 | ||
05ea2a05 | 6246 | 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 |
81ecdfbb RW |
6247 | do : |
6248 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6249 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 6250 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
68070c10 | 6251 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6252 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
68070c10 PA |
6253 | _ACEOF |
6254 | ||
ec56be1b | 6255 | fi |
ec56be1b | 6256 | |
81ecdfbb RW |
6257 | done |
6258 | ||
eb0edac8 | 6259 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
d0ac1c44 | 6260 | if test "x$ac_cv_type_pid_t" = xyes; then : |
eb0edac8 GB |
6261 | |
6262 | else | |
6263 | ||
6264 | cat >>confdefs.h <<_ACEOF | |
6265 | #define pid_t int | |
6266 | _ACEOF | |
6267 | ||
6268 | fi | |
6269 | ||
6270 | for ac_header in vfork.h | |
6271 | do : | |
6272 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 6273 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
eb0edac8 GB |
6274 | cat >>confdefs.h <<_ACEOF |
6275 | #define HAVE_VFORK_H 1 | |
6276 | _ACEOF | |
6277 | ||
6278 | fi | |
6279 | ||
6280 | done | |
6281 | ||
6282 | for ac_func in fork vfork | |
6283 | do : | |
6284 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6285 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6286 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
eb0edac8 GB |
6287 | cat >>confdefs.h <<_ACEOF |
6288 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6289 | _ACEOF | |
6290 | ||
6291 | fi | |
6292 | done | |
6293 | ||
6294 | if test "x$ac_cv_func_fork" = xyes; then | |
6295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
6296 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 6297 | if ${ac_cv_func_fork_works+:} false; then : |
eb0edac8 GB |
6298 | $as_echo_n "(cached) " >&6 |
6299 | else | |
6300 | if test "$cross_compiling" = yes; then : | |
6301 | ac_cv_func_fork_works=cross | |
6302 | else | |
6303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6304 | /* end confdefs.h. */ | |
6305 | $ac_includes_default | |
6306 | int | |
6307 | main () | |
6308 | { | |
6309 | ||
6310 | /* By Ruediger Kuhlmann. */ | |
6311 | return fork () < 0; | |
6312 | ||
6313 | ; | |
6314 | return 0; | |
6315 | } | |
6316 | _ACEOF | |
6317 | if ac_fn_c_try_run "$LINENO"; then : | |
6318 | ac_cv_func_fork_works=yes | |
6319 | else | |
6320 | ac_cv_func_fork_works=no | |
6321 | fi | |
6322 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6323 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6324 | fi | |
6325 | ||
6326 | fi | |
6327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
6328 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
6329 | ||
6330 | else | |
6331 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6332 | fi | |
6333 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6334 | case $host in | |
6335 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6336 | # Override, as these systems have only a dummy fork() stub | |
6337 | ac_cv_func_fork_works=no | |
6338 | ;; | |
6339 | *) | |
6340 | ac_cv_func_fork_works=yes | |
6341 | ;; | |
6342 | esac | |
6343 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6344 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
6345 | fi | |
6346 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6347 | if test "x$ac_cv_func_vfork" = xyes; then | |
6348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
6349 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 6350 | if ${ac_cv_func_vfork_works+:} false; then : |
eb0edac8 GB |
6351 | $as_echo_n "(cached) " >&6 |
6352 | else | |
6353 | if test "$cross_compiling" = yes; then : | |
6354 | ac_cv_func_vfork_works=cross | |
6355 | else | |
6356 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6357 | /* end confdefs.h. */ | |
6358 | /* Thanks to Paul Eggert for this test. */ | |
6359 | $ac_includes_default | |
6360 | #include <sys/wait.h> | |
6361 | #ifdef HAVE_VFORK_H | |
6362 | # include <vfork.h> | |
6363 | #endif | |
6364 | /* On some sparc systems, changes by the child to local and incoming | |
6365 | argument registers are propagated back to the parent. The compiler | |
6366 | is told about this with #include <vfork.h>, but some compilers | |
6367 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6368 | static variable whose address is put into a register that is | |
6369 | clobbered by the vfork. */ | |
6370 | static void | |
6371 | #ifdef __cplusplus | |
6372 | sparc_address_test (int arg) | |
6373 | # else | |
6374 | sparc_address_test (arg) int arg; | |
6375 | #endif | |
6376 | { | |
6377 | static pid_t child; | |
6378 | if (!child) { | |
6379 | child = vfork (); | |
6380 | if (child < 0) { | |
6381 | perror ("vfork"); | |
6382 | _exit(2); | |
6383 | } | |
6384 | if (!child) { | |
6385 | arg = getpid(); | |
6386 | write(-1, "", 0); | |
6387 | _exit (arg); | |
6388 | } | |
6389 | } | |
6390 | } | |
6391 | ||
6392 | int | |
6393 | main () | |
6394 | { | |
6395 | pid_t parent = getpid (); | |
6396 | pid_t child; | |
6397 | ||
6398 | sparc_address_test (0); | |
6399 | ||
6400 | child = vfork (); | |
6401 | ||
6402 | if (child == 0) { | |
6403 | /* Here is another test for sparc vfork register problems. This | |
6404 | test uses lots of local variables, at least as many local | |
6405 | variables as main has allocated so far including compiler | |
6406 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
6407 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
6408 | reuse the register of parent for one of the local variables, | |
6409 | since it will think that parent can't possibly be used any more | |
6410 | in this routine. Assigning to the local variable will thus | |
6411 | munge parent in the parent process. */ | |
6412 | pid_t | |
6413 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6414 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6415 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6416 | use the same hardware register for all 8 local variables. */ | |
6417 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6418 | || p != p5 || p != p6 || p != p7) | |
6419 | _exit(1); | |
6420 | ||
6421 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
6422 | from child file descriptors. If the child closes a descriptor | |
6423 | before it execs or exits, this munges the parent's descriptor | |
6424 | as well. Test for this by closing stdout in the child. */ | |
6425 | _exit(close(fileno(stdout)) != 0); | |
6426 | } else { | |
6427 | int status; | |
6428 | struct stat st; | |
6429 | ||
6430 | while (wait(&status) != child) | |
6431 | ; | |
6432 | return ( | |
6433 | /* Was there some problem with vforking? */ | |
6434 | child < 0 | |
6435 | ||
6436 | /* Did the child fail? (This shouldn't happen.) */ | |
6437 | || status | |
6438 | ||
6439 | /* Did the vfork/compiler bug occur? */ | |
6440 | || parent != getpid() | |
6441 | ||
6442 | /* Did the file descriptor bug occur? */ | |
6443 | || fstat(fileno(stdout), &st) != 0 | |
6444 | ); | |
6445 | } | |
6446 | } | |
6447 | _ACEOF | |
6448 | if ac_fn_c_try_run "$LINENO"; then : | |
6449 | ac_cv_func_vfork_works=yes | |
6450 | else | |
6451 | ac_cv_func_vfork_works=no | |
6452 | fi | |
6453 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6454 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6455 | fi | |
6456 | ||
6457 | fi | |
6458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
6459 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
6460 | ||
6461 | fi; | |
6462 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6463 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6464 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
6465 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
6466 | fi | |
6467 | ||
6468 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
6469 | ||
6470 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
6471 | ||
6472 | else | |
6473 | ||
6474 | $as_echo "#define vfork fork" >>confdefs.h | |
6475 | ||
6476 | fi | |
6477 | if test "x$ac_cv_func_fork_works" = xyes; then | |
6478 | ||
6479 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
6480 | ||
6481 | fi | |
6482 | ||
05ea2a05 | 6483 | for ac_func in pread pwrite pread64 |
81ecdfbb RW |
6484 | do : |
6485 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6486 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6487 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
6488 | cat >>confdefs.h <<_ACEOF |
6489 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
ec56be1b PA |
6490 | _ACEOF |
6491 | ||
81ecdfbb RW |
6492 | fi |
6493 | done | |
ec56be1b | 6494 | |
e122f1f5 | 6495 | |
d0ac1c44 SM |
6496 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6497 | if test "x$ac_cv_type_size_t" = xyes; then : | |
6498 | ||
6499 | else | |
6500 | ||
6501 | cat >>confdefs.h <<_ACEOF | |
6502 | #define size_t unsigned int | |
6503 | _ACEOF | |
6504 | ||
6505 | fi | |
6506 | ||
05ea2a05 TT |
6507 | |
6508 | ||
6509 | ||
6510 | for ac_header in $ac_header_list | |
6511 | do : | |
6512 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6513 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6514 | " | |
6515 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
6516 | cat >>confdefs.h <<_ACEOF | |
6517 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6518 | _ACEOF | |
6519 | ||
6520 | fi | |
6521 | ||
6522 | done | |
6523 | ||
6524 | ||
6525 | ||
6526 | ||
6527 | ||
6528 | ||
6529 | ||
5e030278 TT |
6530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
6531 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
6532 | if ${ac_cv_path_SED+:} false; then : | |
6533 | $as_echo_n "(cached) " >&6 | |
6534 | else | |
6535 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
6536 | for ac_i in 1 2 3 4 5 6 7; do | |
6537 | ac_script="$ac_script$as_nl$ac_script" | |
6538 | done | |
6539 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
6540 | { ac_script=; unset ac_script;} | |
6541 | if test -z "$SED"; then | |
6542 | ac_path_SED_found=false | |
6543 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6544 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6545 | for as_dir in $PATH | |
6546 | do | |
6547 | IFS=$as_save_IFS | |
6548 | test -z "$as_dir" && as_dir=. | |
6549 | for ac_prog in sed gsed; do | |
6550 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6551 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
6552 | as_fn_executable_p "$ac_path_SED" || continue | |
6553 | # Check for GNU ac_path_SED and select it if it is found. | |
6554 | # Check for GNU $ac_path_SED | |
6555 | case `"$ac_path_SED" --version 2>&1` in | |
6556 | *GNU*) | |
6557 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
6558 | *) | |
6559 | ac_count=0 | |
6560 | $as_echo_n 0123456789 >"conftest.in" | |
6561 | while : | |
6562 | do | |
6563 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6564 | mv "conftest.tmp" "conftest.in" | |
6565 | cp "conftest.in" "conftest.nl" | |
6566 | $as_echo '' >> "conftest.nl" | |
6567 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6568 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6569 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6570 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
6571 | # Best one so far, save it but keep looking for a better one | |
6572 | ac_cv_path_SED="$ac_path_SED" | |
6573 | ac_path_SED_max=$ac_count | |
6574 | fi | |
6575 | # 10*(2^10) chars as input seems more than enough | |
6576 | test $ac_count -gt 10 && break | |
6577 | done | |
6578 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6579 | esac | |
6580 | ||
6581 | $ac_path_SED_found && break 3 | |
6582 | done | |
6583 | done | |
6584 | done | |
6585 | IFS=$as_save_IFS | |
6586 | if test -z "$ac_cv_path_SED"; then | |
6587 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
6588 | fi | |
6589 | else | |
6590 | ac_cv_path_SED=$SED | |
6591 | fi | |
6592 | ||
6593 | fi | |
6594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
6595 | $as_echo "$ac_cv_path_SED" >&6; } | |
6596 | SED="$ac_cv_path_SED" | |
6597 | rm -f conftest.sed | |
6598 | ||
3266f10b | 6599 | |
05ea2a05 TT |
6600 | if test "X$prefix" = "XNONE"; then |
6601 | acl_final_prefix="$ac_default_prefix" | |
6602 | else | |
6603 | acl_final_prefix="$prefix" | |
6604 | fi | |
6605 | if test "X$exec_prefix" = "XNONE"; then | |
6606 | acl_final_exec_prefix='${prefix}' | |
6607 | else | |
6608 | acl_final_exec_prefix="$exec_prefix" | |
6609 | fi | |
6610 | acl_save_prefix="$prefix" | |
6611 | prefix="$acl_final_prefix" | |
6612 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
6613 | prefix="$acl_save_prefix" | |
6614 | ||
6615 | ||
6616 | # Check whether --with-gnu-ld was given. | |
6617 | if test "${with_gnu_ld+set}" = set; then : | |
6618 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
6619 | else | |
6620 | with_gnu_ld=no | |
6621 | fi | |
6622 | ||
6623 | # Prepare PATH_SEPARATOR. | |
6624 | # The user is always right. | |
6625 | if test "${PATH_SEPARATOR+set}" != set; then | |
6626 | echo "#! /bin/sh" >conf$$.sh | |
6627 | echo "exit 0" >>conf$$.sh | |
6628 | chmod +x conf$$.sh | |
6629 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6630 | PATH_SEPARATOR=';' | |
6631 | else | |
6632 | PATH_SEPARATOR=: | |
6633 | fi | |
6634 | rm -f conf$$.sh | |
6635 | fi | |
6636 | ac_prog=ld | |
6637 | if test "$GCC" = yes; then | |
6638 | # Check if gcc -print-prog-name=ld gives a path. | |
6639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
6640 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
6641 | case $host in | |
6642 | *-*-mingw*) | |
6643 | # gcc leaves a trailing carriage return which upsets mingw | |
6644 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
6645 | *) | |
6646 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
6647 | esac | |
6648 | case $ac_prog in | |
6649 | # Accept absolute paths. | |
6650 | [\\/]* | [A-Za-z]:[\\/]*) | |
6651 | re_direlt='/[^/][^/]*/\.\./' | |
6652 | # Canonicalize the path of ld | |
6653 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
6654 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
6655 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
6656 | done | |
6657 | test -z "$LD" && LD="$ac_prog" | |
6658 | ;; | |
6659 | "") | |
6660 | # If it fails, then pretend we aren't using GCC. | |
6661 | ac_prog=ld | |
6662 | ;; | |
6663 | *) | |
6664 | # If it is relative, then search for the first ld in PATH. | |
6665 | with_gnu_ld=unknown | |
6666 | ;; | |
6667 | esac | |
6668 | elif test "$with_gnu_ld" = yes; then | |
6669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
6670 | $as_echo_n "checking for GNU ld... " >&6; } | |
6671 | else | |
6672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
6673 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
6674 | fi | |
6675 | if ${acl_cv_path_LD+:} false; then : | |
6676 | $as_echo_n "(cached) " >&6 | |
6677 | else | |
6678 | if test -z "$LD"; then | |
6679 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
6680 | for ac_dir in $PATH; do | |
6681 | test -z "$ac_dir" && ac_dir=. | |
6682 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
6683 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
6684 | # Check to see if the program is GNU ld. I'd rather use --version, | |
6685 | # but apparently some GNU ld's only accept -v. | |
6686 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
6687 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
6688 | test "$with_gnu_ld" != no && break | |
6689 | else | |
6690 | test "$with_gnu_ld" != yes && break | |
6691 | fi | |
6692 | fi | |
6693 | done | |
6694 | IFS="$ac_save_ifs" | |
6695 | else | |
6696 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
6697 | fi | |
6698 | fi | |
6699 | ||
6700 | LD="$acl_cv_path_LD" | |
6701 | if test -n "$LD"; then | |
6702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
6703 | $as_echo "$LD" >&6; } | |
6704 | else | |
6705 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6706 | $as_echo "no" >&6; } | |
6707 | fi | |
6708 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
6709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
6710 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
6711 | if ${acl_cv_prog_gnu_ld+:} false; then : | |
6712 | $as_echo_n "(cached) " >&6 | |
6713 | else | |
6714 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
6715 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
6716 | acl_cv_prog_gnu_ld=yes | |
6717 | else | |
6718 | acl_cv_prog_gnu_ld=no | |
6719 | fi | |
6720 | fi | |
6721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
6722 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
6723 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
6724 | ||
6725 | ||
6726 | ||
6727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
6728 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
6729 | if ${acl_cv_rpath+:} false; then : | |
6730 | $as_echo_n "(cached) " >&6 | |
6731 | else | |
6732 | ||
6733 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
6734 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
6735 | . ./conftest.sh | |
6736 | rm -f ./conftest.sh | |
6737 | acl_cv_rpath=done | |
6738 | ||
6739 | fi | |
6740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
6741 | $as_echo "$acl_cv_rpath" >&6; } | |
6742 | wl="$acl_cv_wl" | |
6743 | libext="$acl_cv_libext" | |
6744 | shlibext="$acl_cv_shlibext" | |
6745 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
6746 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
6747 | hardcode_direct="$acl_cv_hardcode_direct" | |
6748 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
6749 | # Check whether --enable-rpath was given. | |
6750 | if test "${enable_rpath+set}" = set; then : | |
6751 | enableval=$enable_rpath; : | |
6752 | else | |
6753 | enable_rpath=yes | |
6754 | fi | |
6755 | ||
6756 | ||
6757 | ||
3266f10b TT |
6758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6759 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 6760 | if ${ac_cv_header_stdc+:} false; then : |
3266f10b TT |
6761 | $as_echo_n "(cached) " >&6 |
6762 | else | |
6763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6764 | /* end confdefs.h. */ | |
6765 | #include <stdlib.h> | |
6766 | #include <stdarg.h> | |
6767 | #include <string.h> | |
6768 | #include <float.h> | |
6769 | ||
6770 | int | |
6771 | main () | |
6772 | { | |
6773 | ||
6774 | ; | |
6775 | return 0; | |
6776 | } | |
6777 | _ACEOF | |
6778 | if ac_fn_c_try_compile "$LINENO"; then : | |
6779 | ac_cv_header_stdc=yes | |
6780 | else | |
6781 | ac_cv_header_stdc=no | |
6782 | fi | |
6783 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6784 | ||
6785 | if test $ac_cv_header_stdc = yes; then | |
6786 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6788 | /* end confdefs.h. */ | |
6789 | #include <string.h> | |
6790 | ||
6791 | _ACEOF | |
6792 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6793 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6794 | ||
6795 | else | |
6796 | ac_cv_header_stdc=no | |
6797 | fi | |
6798 | rm -f conftest* | |
6799 | ||
6800 | fi | |
6801 | ||
6802 | if test $ac_cv_header_stdc = yes; then | |
6803 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6805 | /* end confdefs.h. */ | |
6806 | #include <stdlib.h> | |
6807 | ||
6808 | _ACEOF | |
6809 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6810 | $EGREP "free" >/dev/null 2>&1; then : | |
6811 | ||
6812 | else | |
6813 | ac_cv_header_stdc=no | |
6814 | fi | |
6815 | rm -f conftest* | |
6816 | ||
6817 | fi | |
6818 | ||
6819 | if test $ac_cv_header_stdc = yes; then | |
6820 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6821 | if test "$cross_compiling" = yes; then : | |
6822 | : | |
6823 | else | |
6824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6825 | /* end confdefs.h. */ | |
6826 | #include <ctype.h> | |
6827 | #include <stdlib.h> | |
6828 | #if ((' ' & 0x0FF) == 0x020) | |
6829 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6830 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6831 | #else | |
6832 | # define ISLOWER(c) \ | |
6833 | (('a' <= (c) && (c) <= 'i') \ | |
6834 | || ('j' <= (c) && (c) <= 'r') \ | |
6835 | || ('s' <= (c) && (c) <= 'z')) | |
6836 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6837 | #endif | |
6838 | ||
6839 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6840 | int | |
6841 | main () | |
6842 | { | |
6843 | int i; | |
6844 | for (i = 0; i < 256; i++) | |
6845 | if (XOR (islower (i), ISLOWER (i)) | |
6846 | || toupper (i) != TOUPPER (i)) | |
6847 | return 2; | |
6848 | return 0; | |
6849 | } | |
6850 | _ACEOF | |
6851 | if ac_fn_c_try_run "$LINENO"; then : | |
6852 | ||
6853 | else | |
6854 | ac_cv_header_stdc=no | |
6855 | fi | |
6856 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6857 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6858 | fi | |
6859 | ||
6860 | fi | |
6861 | fi | |
6862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6863 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6864 | if test $ac_cv_header_stdc = yes; then | |
6865 | ||
6866 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6867 | ||
3266f10b TT |
6868 | fi |
6869 | ||
6870 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6871 | # for constant arguments. Useless! | |
6872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
6873 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d0ac1c44 | 6874 | if ${ac_cv_working_alloca_h+:} false; then : |
3266f10b TT |
6875 | $as_echo_n "(cached) " >&6 |
6876 | else | |
6877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6878 | /* end confdefs.h. */ | |
6879 | #include <alloca.h> | |
6880 | int | |
6881 | main () | |
6882 | { | |
6883 | char *p = (char *) alloca (2 * sizeof (int)); | |
6884 | if (p) return 0; | |
6885 | ; | |
6886 | return 0; | |
6887 | } | |
6888 | _ACEOF | |
6889 | if ac_fn_c_try_link "$LINENO"; then : | |
6890 | ac_cv_working_alloca_h=yes | |
6891 | else | |
6892 | ac_cv_working_alloca_h=no | |
6893 | fi | |
6894 | rm -f core conftest.err conftest.$ac_objext \ | |
6895 | conftest$ac_exeext conftest.$ac_ext | |
6896 | fi | |
6897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
6898 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
6899 | if test $ac_cv_working_alloca_h = yes; then | |
6900 | ||
6901 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
6902 | ||
6903 | fi | |
6904 | ||
6905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
6906 | $as_echo_n "checking for alloca... " >&6; } | |
d0ac1c44 | 6907 | if ${ac_cv_func_alloca_works+:} false; then : |
3266f10b TT |
6908 | $as_echo_n "(cached) " >&6 |
6909 | else | |
6910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6911 | /* end confdefs.h. */ | |
6912 | #ifdef __GNUC__ | |
6913 | # define alloca __builtin_alloca | |
6914 | #else | |
6915 | # ifdef _MSC_VER | |
6916 | # include <malloc.h> | |
6917 | # define alloca _alloca | |
6918 | # else | |
6919 | # ifdef HAVE_ALLOCA_H | |
6920 | # include <alloca.h> | |
6921 | # else | |
6922 | # ifdef _AIX | |
6923 | #pragma alloca | |
6924 | # else | |
6925 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d0ac1c44 | 6926 | void *alloca (size_t); |
3266f10b TT |
6927 | # endif |
6928 | # endif | |
6929 | # endif | |
6930 | # endif | |
6931 | #endif | |
6932 | ||
6933 | int | |
6934 | main () | |
6935 | { | |
6936 | char *p = (char *) alloca (1); | |
6937 | if (p) return 0; | |
6938 | ; | |
6939 | return 0; | |
6940 | } | |
6941 | _ACEOF | |
6942 | if ac_fn_c_try_link "$LINENO"; then : | |
6943 | ac_cv_func_alloca_works=yes | |
6944 | else | |
6945 | ac_cv_func_alloca_works=no | |
6946 | fi | |
6947 | rm -f core conftest.err conftest.$ac_objext \ | |
6948 | conftest$ac_exeext conftest.$ac_ext | |
6949 | fi | |
6950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
6951 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
6952 | ||
6953 | if test $ac_cv_func_alloca_works = yes; then | |
6954 | ||
6955 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
6956 | ||
6957 | else | |
6958 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6959 | # that cause trouble. Some versions do not even contain alloca or | |
6960 | # contain a buggy version. If you still want to use their alloca, | |
6961 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6962 | ||
6963 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
6964 | ||
6965 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
6966 | ||
6967 | ||
6968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
6969 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d0ac1c44 | 6970 | if ${ac_cv_os_cray+:} false; then : |
3266f10b TT |
6971 | $as_echo_n "(cached) " >&6 |
6972 | else | |
6973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6974 | /* end confdefs.h. */ | |
6975 | #if defined CRAY && ! defined CRAY2 | |
6976 | webecray | |
6977 | #else | |
6978 | wenotbecray | |
6979 | #endif | |
6980 | ||
6981 | _ACEOF | |
6982 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6983 | $EGREP "webecray" >/dev/null 2>&1; then : | |
6984 | ac_cv_os_cray=yes | |
6985 | else | |
6986 | ac_cv_os_cray=no | |
6987 | fi | |
6988 | rm -f conftest* | |
6989 | ||
6990 | fi | |
6991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
6992 | $as_echo "$ac_cv_os_cray" >&6; } | |
6993 | if test $ac_cv_os_cray = yes; then | |
6994 | for ac_func in _getb67 GETB67 getb67; do | |
6995 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6996 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6997 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
6998 | |
6999 | cat >>confdefs.h <<_ACEOF | |
7000 | #define CRAY_STACKSEG_END $ac_func | |
7001 | _ACEOF | |
7002 | ||
7003 | break | |
7004 | fi | |
7005 | ||
7006 | done | |
7007 | fi | |
7008 | ||
7009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
7010 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d0ac1c44 | 7011 | if ${ac_cv_c_stack_direction+:} false; then : |
3266f10b TT |
7012 | $as_echo_n "(cached) " >&6 |
7013 | else | |
7014 | if test "$cross_compiling" = yes; then : | |
7015 | ac_cv_c_stack_direction=0 | |
7016 | else | |
7017 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7018 | /* end confdefs.h. */ | |
7019 | $ac_includes_default | |
7020 | int | |
d0ac1c44 | 7021 | find_stack_direction (int *addr, int depth) |
3266f10b | 7022 | { |
d0ac1c44 SM |
7023 | int dir, dummy = 0; |
7024 | if (! addr) | |
7025 | addr = &dummy; | |
7026 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
7027 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
7028 | return dir + dummy; | |
3266f10b TT |
7029 | } |
7030 | ||
7031 | int | |
d0ac1c44 | 7032 | main (int argc, char **argv) |
3266f10b | 7033 | { |
d0ac1c44 | 7034 | return find_stack_direction (0, argc + !argv + 20) < 0; |
3266f10b TT |
7035 | } |
7036 | _ACEOF | |
7037 | if ac_fn_c_try_run "$LINENO"; then : | |
7038 | ac_cv_c_stack_direction=1 | |
7039 | else | |
7040 | ac_cv_c_stack_direction=-1 | |
7041 | fi | |
7042 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7043 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7044 | fi | |
7045 | ||
7046 | fi | |
7047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
7048 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
7049 | cat >>confdefs.h <<_ACEOF | |
7050 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
7051 | _ACEOF | |
7052 | ||
7053 | ||
7054 | fi | |
7055 | ||
7056 | ||
b2ceabe8 TT |
7057 | WIN32APILIBS= |
7058 | case ${host} in | |
7059 | *mingw32*) | |
7060 | ||
7061 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
7062 | ||
7063 | WIN32APILIBS="-lws2_32" | |
7064 | ;; | |
7065 | esac | |
7066 | ||
3266f10b TT |
7067 | |
7068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
7069 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 7070 | if ${am_cv_langinfo_codeset+:} false; then : |
3266f10b TT |
7071 | $as_echo_n "(cached) " >&6 |
7072 | else | |
7073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7074 | /* end confdefs.h. */ | |
7075 | #include <langinfo.h> | |
7076 | int | |
7077 | main () | |
7078 | { | |
7079 | char* cs = nl_langinfo(CODESET); | |
7080 | ; | |
7081 | return 0; | |
7082 | } | |
7083 | _ACEOF | |
7084 | if ac_fn_c_try_link "$LINENO"; then : | |
7085 | am_cv_langinfo_codeset=yes | |
7086 | else | |
7087 | am_cv_langinfo_codeset=no | |
7088 | fi | |
7089 | rm -f core conftest.err conftest.$ac_objext \ | |
7090 | conftest$ac_exeext conftest.$ac_ext | |
7091 | ||
7092 | fi | |
7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
7094 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
7095 | if test $am_cv_langinfo_codeset = yes; then | |
7096 | ||
7097 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
7098 | ||
7099 | fi | |
7100 | ||
7101 | ||
05ea2a05 | 7102 | 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 |
3266f10b TT |
7103 | do : |
7104 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7105 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 7106 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
3266f10b TT |
7107 | cat >>confdefs.h <<_ACEOF |
7108 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7109 | _ACEOF | |
7110 | ||
7111 | fi | |
7112 | ||
7113 | done | |
7114 | ||
7115 | ||
05ea2a05 TT |
7116 | |
7117 | for ac_func in getpagesize | |
3266f10b | 7118 | do : |
05ea2a05 TT |
7119 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
7120 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
3266f10b | 7121 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 7122 | #define HAVE_GETPAGESIZE 1 |
3266f10b TT |
7123 | _ACEOF |
7124 | ||
7125 | fi | |
7126 | done | |
7127 | ||
05ea2a05 TT |
7128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
7129 | $as_echo_n "checking for working mmap... " >&6; } | |
7130 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
7131 | $as_echo_n "(cached) " >&6 | |
3266f10b | 7132 | else |
05ea2a05 TT |
7133 | if test "$cross_compiling" = yes; then : |
7134 | ac_cv_func_mmap_fixed_mapped=no | |
7135 | else | |
7136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7137 | /* end confdefs.h. */ | |
7138 | $ac_includes_default | |
7139 | /* malloc might have been renamed as rpl_malloc. */ | |
7140 | #undef malloc | |
7141 | ||
7142 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
7143 | Here is a matrix of mmap possibilities: | |
7144 | mmap private not fixed | |
7145 | mmap private fixed at somewhere currently unmapped | |
7146 | mmap private fixed at somewhere already mapped | |
7147 | mmap shared not fixed | |
7148 | mmap shared fixed at somewhere currently unmapped | |
7149 | mmap shared fixed at somewhere already mapped | |
7150 | For private mappings, we should verify that changes cannot be read() | |
7151 | back from the file, nor mmap's back from the file at a different | |
7152 | address. (There have been systems where private was not correctly | |
7153 | implemented like the infamous i386 svr4.0, and systems where the | |
7154 | VM page cache was not coherent with the file system buffer cache | |
7155 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7156 | For shared mappings, we should conversely verify that changes get | |
7157 | propagated back to all the places they're supposed to be. | |
7158 | ||
7159 | Grep wants private fixed already mapped. | |
7160 | The main things grep needs to know about mmap are: | |
7161 | * does it exist and is it safe to write into the mmap'd area | |
7162 | * how to use it (BSD variants) */ | |
7163 | ||
7164 | #include <fcntl.h> | |
7165 | #include <sys/mman.h> | |
7166 | ||
7167 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
7168 | char *malloc (); | |
7169 | #endif | |
3266f10b | 7170 | |
05ea2a05 TT |
7171 | /* This mess was copied from the GNU getpagesize.h. */ |
7172 | #ifndef HAVE_GETPAGESIZE | |
7173 | # ifdef _SC_PAGESIZE | |
7174 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7175 | # else /* no _SC_PAGESIZE */ | |
7176 | # ifdef HAVE_SYS_PARAM_H | |
7177 | # include <sys/param.h> | |
7178 | # ifdef EXEC_PAGESIZE | |
7179 | # define getpagesize() EXEC_PAGESIZE | |
7180 | # else /* no EXEC_PAGESIZE */ | |
7181 | # ifdef NBPG | |
7182 | # define getpagesize() NBPG * CLSIZE | |
7183 | # ifndef CLSIZE | |
7184 | # define CLSIZE 1 | |
7185 | # endif /* no CLSIZE */ | |
7186 | # else /* no NBPG */ | |
7187 | # ifdef NBPC | |
7188 | # define getpagesize() NBPC | |
7189 | # else /* no NBPC */ | |
7190 | # ifdef PAGESIZE | |
7191 | # define getpagesize() PAGESIZE | |
7192 | # endif /* PAGESIZE */ | |
7193 | # endif /* no NBPC */ | |
7194 | # endif /* no NBPG */ | |
7195 | # endif /* no EXEC_PAGESIZE */ | |
7196 | # else /* no HAVE_SYS_PARAM_H */ | |
7197 | # define getpagesize() 8192 /* punt totally */ | |
7198 | # endif /* no HAVE_SYS_PARAM_H */ | |
7199 | # endif /* no _SC_PAGESIZE */ | |
7200 | ||
7201 | #endif /* no HAVE_GETPAGESIZE */ | |
3266f10b | 7202 | |
05ea2a05 TT |
7203 | int |
7204 | main () | |
7205 | { | |
7206 | char *data, *data2, *data3; | |
7207 | const char *cdata2; | |
7208 | int i, pagesize; | |
7209 | int fd, fd2; | |
3266f10b | 7210 | |
05ea2a05 | 7211 | pagesize = getpagesize (); |
5e030278 | 7212 | |
05ea2a05 TT |
7213 | /* First, make a file with some known garbage in it. */ |
7214 | data = (char *) malloc (pagesize); | |
7215 | if (!data) | |
7216 | return 1; | |
7217 | for (i = 0; i < pagesize; ++i) | |
7218 | *(data + i) = rand (); | |
7219 | umask (0); | |
7220 | fd = creat ("conftest.mmap", 0600); | |
7221 | if (fd < 0) | |
7222 | return 2; | |
7223 | if (write (fd, data, pagesize) != pagesize) | |
7224 | return 3; | |
7225 | close (fd); | |
7226 | ||
7227 | /* Next, check that the tail of a page is zero-filled. File must have | |
7228 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7229 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7230 | if (fd2 < 0) | |
7231 | return 4; | |
7232 | cdata2 = ""; | |
7233 | if (write (fd2, cdata2, 1) != 1) | |
7234 | return 5; | |
7235 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
7236 | if (data2 == MAP_FAILED) | |
7237 | return 6; | |
7238 | for (i = 0; i < pagesize; ++i) | |
7239 | if (*(data2 + i)) | |
7240 | return 7; | |
7241 | close (fd2); | |
7242 | if (munmap (data2, pagesize)) | |
7243 | return 8; | |
7244 | ||
7245 | /* Next, try to mmap the file at a fixed address which already has | |
7246 | something else allocated at it. If we can, also make sure that | |
7247 | we see the same garbage. */ | |
7248 | fd = open ("conftest.mmap", O_RDWR); | |
7249 | if (fd < 0) | |
7250 | return 9; | |
7251 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
7252 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
7253 | return 10; | |
7254 | for (i = 0; i < pagesize; ++i) | |
7255 | if (*(data + i) != *(data2 + i)) | |
7256 | return 11; | |
7257 | ||
7258 | /* Finally, make sure that changes to the mapped area do not | |
7259 | percolate back to the file as seen by read(). (This is a bug on | |
7260 | some variants of i386 svr4.0.) */ | |
7261 | for (i = 0; i < pagesize; ++i) | |
7262 | *(data2 + i) = *(data2 + i) + 1; | |
7263 | data3 = (char *) malloc (pagesize); | |
7264 | if (!data3) | |
7265 | return 12; | |
7266 | if (read (fd, data3, pagesize) != pagesize) | |
7267 | return 13; | |
7268 | for (i = 0; i < pagesize; ++i) | |
7269 | if (*(data + i) != *(data3 + i)) | |
7270 | return 14; | |
7271 | close (fd); | |
7272 | return 0; | |
7273 | } | |
7274 | _ACEOF | |
7275 | if ac_fn_c_try_run "$LINENO"; then : | |
7276 | ac_cv_func_mmap_fixed_mapped=yes | |
7277 | else | |
7278 | ac_cv_func_mmap_fixed_mapped=no | |
7279 | fi | |
7280 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7281 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7282 | fi | |
5e030278 | 7283 | |
05ea2a05 TT |
7284 | fi |
7285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
7286 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
7287 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5e030278 | 7288 | |
05ea2a05 | 7289 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
5e030278 | 7290 | |
05ea2a05 TT |
7291 | fi |
7292 | rm -f conftest.mmap conftest.txt | |
5e030278 | 7293 | |
05ea2a05 TT |
7294 | for ac_header in vfork.h |
7295 | do : | |
7296 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
7297 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
7298 | cat >>confdefs.h <<_ACEOF | |
7299 | #define HAVE_VFORK_H 1 | |
7300 | _ACEOF | |
5e030278 | 7301 | |
05ea2a05 | 7302 | fi |
5e030278 | 7303 | |
05ea2a05 | 7304 | done |
5e030278 | 7305 | |
05ea2a05 TT |
7306 | for ac_func in fork vfork |
7307 | do : | |
7308 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7309 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7310 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7311 | cat >>confdefs.h <<_ACEOF | |
7312 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7313 | _ACEOF | |
7314 | ||
7315 | fi | |
7316 | done | |
7317 | ||
7318 | if test "x$ac_cv_func_fork" = xyes; then | |
7319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
7320 | $as_echo_n "checking for working fork... " >&6; } | |
7321 | if ${ac_cv_func_fork_works+:} false; then : | |
7322 | $as_echo_n "(cached) " >&6 | |
7323 | else | |
7324 | if test "$cross_compiling" = yes; then : | |
7325 | ac_cv_func_fork_works=cross | |
7326 | else | |
7327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7328 | /* end confdefs.h. */ | |
7329 | $ac_includes_default | |
7330 | int | |
7331 | main () | |
7332 | { | |
7333 | ||
7334 | /* By Ruediger Kuhlmann. */ | |
7335 | return fork () < 0; | |
7336 | ||
7337 | ; | |
7338 | return 0; | |
7339 | } | |
7340 | _ACEOF | |
7341 | if ac_fn_c_try_run "$LINENO"; then : | |
7342 | ac_cv_func_fork_works=yes | |
7343 | else | |
7344 | ac_cv_func_fork_works=no | |
7345 | fi | |
7346 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7347 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7348 | fi | |
7349 | ||
7350 | fi | |
7351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
7352 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
7353 | ||
7354 | else | |
7355 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7356 | fi | |
7357 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7358 | case $host in | |
7359 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7360 | # Override, as these systems have only a dummy fork() stub | |
7361 | ac_cv_func_fork_works=no | |
7362 | ;; | |
7363 | *) | |
7364 | ac_cv_func_fork_works=yes | |
7365 | ;; | |
7366 | esac | |
7367 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7368 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
7369 | fi | |
7370 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7371 | if test "x$ac_cv_func_vfork" = xyes; then | |
7372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
7373 | $as_echo_n "checking for working vfork... " >&6; } | |
7374 | if ${ac_cv_func_vfork_works+:} false; then : | |
7375 | $as_echo_n "(cached) " >&6 | |
7376 | else | |
7377 | if test "$cross_compiling" = yes; then : | |
7378 | ac_cv_func_vfork_works=cross | |
7379 | else | |
7380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7381 | /* end confdefs.h. */ | |
7382 | /* Thanks to Paul Eggert for this test. */ | |
7383 | $ac_includes_default | |
7384 | #include <sys/wait.h> | |
7385 | #ifdef HAVE_VFORK_H | |
7386 | # include <vfork.h> | |
7387 | #endif | |
7388 | /* On some sparc systems, changes by the child to local and incoming | |
7389 | argument registers are propagated back to the parent. The compiler | |
7390 | is told about this with #include <vfork.h>, but some compilers | |
7391 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7392 | static variable whose address is put into a register that is | |
7393 | clobbered by the vfork. */ | |
7394 | static void | |
7395 | #ifdef __cplusplus | |
7396 | sparc_address_test (int arg) | |
7397 | # else | |
7398 | sparc_address_test (arg) int arg; | |
7399 | #endif | |
7400 | { | |
7401 | static pid_t child; | |
7402 | if (!child) { | |
7403 | child = vfork (); | |
7404 | if (child < 0) { | |
7405 | perror ("vfork"); | |
7406 | _exit(2); | |
7407 | } | |
7408 | if (!child) { | |
7409 | arg = getpid(); | |
7410 | write(-1, "", 0); | |
7411 | _exit (arg); | |
7412 | } | |
7413 | } | |
7414 | } | |
7415 | ||
7416 | int | |
7417 | main () | |
7418 | { | |
7419 | pid_t parent = getpid (); | |
7420 | pid_t child; | |
7421 | ||
7422 | sparc_address_test (0); | |
7423 | ||
7424 | child = vfork (); | |
7425 | ||
7426 | if (child == 0) { | |
7427 | /* Here is another test for sparc vfork register problems. This | |
7428 | test uses lots of local variables, at least as many local | |
7429 | variables as main has allocated so far including compiler | |
7430 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7431 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7432 | reuse the register of parent for one of the local variables, | |
7433 | since it will think that parent can't possibly be used any more | |
7434 | in this routine. Assigning to the local variable will thus | |
7435 | munge parent in the parent process. */ | |
7436 | pid_t | |
7437 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7438 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7439 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7440 | use the same hardware register for all 8 local variables. */ | |
7441 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7442 | || p != p5 || p != p6 || p != p7) | |
7443 | _exit(1); | |
7444 | ||
7445 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
7446 | from child file descriptors. If the child closes a descriptor | |
7447 | before it execs or exits, this munges the parent's descriptor | |
7448 | as well. Test for this by closing stdout in the child. */ | |
7449 | _exit(close(fileno(stdout)) != 0); | |
7450 | } else { | |
7451 | int status; | |
7452 | struct stat st; | |
7453 | ||
7454 | while (wait(&status) != child) | |
7455 | ; | |
7456 | return ( | |
7457 | /* Was there some problem with vforking? */ | |
7458 | child < 0 | |
7459 | ||
7460 | /* Did the child fail? (This shouldn't happen.) */ | |
7461 | || status | |
7462 | ||
7463 | /* Did the vfork/compiler bug occur? */ | |
7464 | || parent != getpid() | |
7465 | ||
7466 | /* Did the file descriptor bug occur? */ | |
7467 | || fstat(fileno(stdout), &st) != 0 | |
7468 | ); | |
7469 | } | |
7470 | } | |
7471 | _ACEOF | |
7472 | if ac_fn_c_try_run "$LINENO"; then : | |
7473 | ac_cv_func_vfork_works=yes | |
7474 | else | |
7475 | ac_cv_func_vfork_works=no | |
7476 | fi | |
7477 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7478 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7479 | fi | |
7480 | ||
7481 | fi | |
7482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
7483 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
7484 | ||
7485 | fi; | |
7486 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7487 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7488 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7489 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
7490 | fi | |
7491 | ||
7492 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
7493 | ||
7494 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
7495 | ||
7496 | else | |
7497 | ||
7498 | $as_echo "#define vfork fork" >>confdefs.h | |
7499 | ||
7500 | fi | |
7501 | if test "x$ac_cv_func_fork_works" = xyes; then | |
7502 | ||
7503 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
7504 | ||
7505 | fi | |
7506 | ||
7507 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \ | |
7508 | ptrace64 sbrk setns sigaltstack sigprocmask \ | |
7509 | setpgid setpgrp getrusage getauxval | |
7510 | do : | |
7511 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7512 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7513 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7514 | cat >>confdefs.h <<_ACEOF | |
7515 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7516 | _ACEOF | |
7517 | ||
7518 | fi | |
7519 | done | |
7520 | ||
7521 | ||
7522 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
7523 | " | |
7524 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
7525 | ac_have_decl=1 | |
7526 | else | |
7527 | ac_have_decl=0 | |
7528 | fi | |
7529 | ||
7530 | cat >>confdefs.h <<_ACEOF | |
7531 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
7532 | _ACEOF | |
7533 | ||
7534 | ||
7535 | if test "$cross_compiling" = yes; then : | |
7536 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7537 | /* end confdefs.h. */ | |
7538 | #include <sys/personality.h> | |
7539 | int | |
7540 | main () | |
7541 | { | |
7542 | ||
7543 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7544 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7545 | # endif | |
7546 | /* Test the flag could be set and stays set. */ | |
7547 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7548 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7549 | return 1 | |
7550 | ; | |
7551 | return 0; | |
7552 | } | |
7553 | _ACEOF | |
7554 | if ac_fn_c_try_link "$LINENO"; then : | |
7555 | have_personality=true | |
7556 | else | |
7557 | have_personality=false | |
7558 | fi | |
7559 | rm -f core conftest.err conftest.$ac_objext \ | |
7560 | conftest$ac_exeext conftest.$ac_ext | |
7561 | else | |
7562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7563 | /* end confdefs.h. */ | |
7564 | #include <sys/personality.h> | |
7565 | int | |
7566 | main () | |
7567 | { | |
7568 | ||
7569 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7570 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7571 | # endif | |
7572 | /* Test the flag could be set and stays set. */ | |
7573 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7574 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7575 | return 1 | |
7576 | ; | |
7577 | return 0; | |
7578 | } | |
7579 | _ACEOF | |
7580 | if ac_fn_c_try_run "$LINENO"; then : | |
7581 | have_personality=true | |
7582 | else | |
7583 | have_personality=false | |
7584 | fi | |
7585 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7586 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7587 | fi | |
7588 | ||
7589 | if $have_personality | |
7590 | then | |
7591 | ||
7592 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h | |
7593 | ||
7594 | fi | |
7595 | ||
7596 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
7597 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
7598 | ac_have_decl=1 | |
7599 | else | |
7600 | ac_have_decl=0 | |
7601 | fi | |
7602 | ||
7603 | cat >>confdefs.h <<_ACEOF | |
7604 | #define HAVE_DECL_STRSTR $ac_have_decl | |
7605 | _ACEOF | |
7606 | ||
7607 | ||
7608 | # ----------------------- # | |
7609 | # Checks for structures. # | |
7610 | # ----------------------- # | |
7611 | ||
7612 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
7613 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
7614 | ||
7615 | cat >>confdefs.h <<_ACEOF | |
7616 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7617 | _ACEOF | |
7618 | ||
7619 | ||
7620 | fi | |
7621 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" | |
7622 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
7623 | ||
7624 | cat >>confdefs.h <<_ACEOF | |
7625 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7626 | _ACEOF | |
7627 | ||
7628 | ||
7629 | fi | |
7630 | ||
7631 | ||
7632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
7633 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
7634 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7635 | $as_echo_n "(cached) " >&6 | |
7636 | else | |
7637 | ac_func_search_save_LIBS=$LIBS | |
7638 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7639 | /* end confdefs.h. */ | |
7640 | ||
7641 | /* Override any GCC internal prototype to avoid an error. | |
7642 | Use char because int might match the return type of a GCC | |
7643 | builtin and then its argument prototype would still apply. */ | |
7644 | #ifdef __cplusplus | |
7645 | extern "C" | |
7646 | #endif | |
7647 | char kinfo_getfile (); | |
7648 | int | |
7649 | main () | |
7650 | { | |
7651 | return kinfo_getfile (); | |
7652 | ; | |
7653 | return 0; | |
7654 | } | |
7655 | _ACEOF | |
7656 | for ac_lib in '' util util-freebsd; do | |
7657 | if test -z "$ac_lib"; then | |
7658 | ac_res="none required" | |
7659 | else | |
7660 | ac_res=-l$ac_lib | |
7661 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7662 | fi | |
7663 | if ac_fn_c_try_link "$LINENO"; then : | |
7664 | ac_cv_search_kinfo_getfile=$ac_res | |
7665 | fi | |
7666 | rm -f core conftest.err conftest.$ac_objext \ | |
7667 | conftest$ac_exeext | |
7668 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7669 | break | |
7670 | fi | |
7671 | done | |
7672 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7673 | ||
7674 | else | |
7675 | ac_cv_search_kinfo_getfile=no | |
7676 | fi | |
7677 | rm conftest.$ac_ext | |
7678 | LIBS=$ac_func_search_save_LIBS | |
7679 | fi | |
7680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
7681 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
7682 | ac_res=$ac_cv_search_kinfo_getfile | |
7683 | if test "$ac_res" != no; then : | |
7684 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7685 | ||
7686 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
7687 | ||
7688 | fi | |
7689 | ||
7690 | ||
7691 | # Check for std::thread. This does not work on some platforms, like | |
7692 | # mingw and DJGPP. | |
7693 | ac_ext=cpp | |
7694 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7695 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7696 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7697 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7698 | ||
7699 | ||
7700 | ||
7701 | ||
7702 | ||
7703 | ac_ext=c | |
7704 | ac_cpp='$CPP $CPPFLAGS' | |
7705 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7706 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7707 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7708 | ||
7709 | ax_pthread_ok=no | |
7710 | ||
7711 | # We used to check for pthread.h first, but this fails if pthread.h | |
7712 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
7713 | # It gets checked for in the link test anyway. | |
7714 | ||
7715 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
5e030278 TT |
7716 | # etcetera environment variables, and if threads linking works using |
7717 | # them: | |
7718 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
7719 | ax_pthread_save_CC="$CC" | |
7720 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7721 | ax_pthread_save_LIBS="$LIBS" | |
05ea2a05 TT |
7722 | if test "x$PTHREAD_CC" != "x"; then : |
7723 | CC="$PTHREAD_CC" | |
7724 | fi | |
7725 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7726 | LIBS="$PTHREAD_LIBS $LIBS" | |
7727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
7728 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
7729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7730 | /* end confdefs.h. */ | |
7731 | ||
7732 | /* Override any GCC internal prototype to avoid an error. | |
7733 | Use char because int might match the return type of a GCC | |
7734 | builtin and then its argument prototype would still apply. */ | |
7735 | #ifdef __cplusplus | |
7736 | extern "C" | |
7737 | #endif | |
7738 | char pthread_join (); | |
7739 | int | |
7740 | main () | |
7741 | { | |
7742 | return pthread_join (); | |
7743 | ; | |
7744 | return 0; | |
7745 | } | |
7746 | _ACEOF | |
7747 | if ac_fn_c_try_link "$LINENO"; then : | |
7748 | ax_pthread_ok=yes | |
7749 | fi | |
7750 | rm -f core conftest.err conftest.$ac_objext \ | |
7751 | conftest$ac_exeext conftest.$ac_ext | |
7752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7753 | $as_echo "$ax_pthread_ok" >&6; } | |
7754 | if test "x$ax_pthread_ok" = "xno"; then | |
7755 | PTHREAD_LIBS="" | |
7756 | PTHREAD_CFLAGS="" | |
7757 | fi | |
7758 | CC="$ax_pthread_save_CC" | |
7759 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7760 | LIBS="$ax_pthread_save_LIBS" | |
7761 | fi | |
7762 | ||
7763 | # We must check for the threads library under a number of different | |
7764 | # names; the ordering is very important because some systems | |
7765 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
7766 | # libraries is broken (non-POSIX). | |
7767 | ||
7768 | # Create a list of thread flags to try. Items starting with a "-" are | |
7769 | # C compiler flags, and other items are library names, except for "none" | |
7770 | # which indicates that we try without any flags at all, and "pthread-config" | |
7771 | # which is a program returning the flags for the Pth emulation library. | |
7772 | ||
7773 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
7774 | ||
7775 | # The ordering *is* (sometimes) important. Some notes on the | |
7776 | # individual items follow: | |
7777 | ||
7778 | # pthreads: AIX (must check this before -lpthread) | |
7779 | # none: in case threads are in libc; should be tried before -Kthread and | |
7780 | # other compiler flags to prevent continual compiler warnings | |
7781 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
7782 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
7783 | # (Note: HP C rejects this with "bad form for `-t' option") | |
7784 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
7785 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
7786 | # doesn't hurt to check since this sometimes defines pthreads and | |
7787 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
7788 | # is present but should not be used directly; and before -mthreads, | |
7789 | # because the compiler interprets this as "-mt" + "-hreads") | |
7790 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
7791 | # pthread: Linux, etcetera | |
7792 | # --thread-safe: KAI C++ | |
7793 | # pthread-config: use pthread-config program (for GNU Pth library) | |
7794 | ||
7795 | case $host_os in | |
7796 | ||
7797 | freebsd*) | |
7798 | ||
7799 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
7800 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
7801 | ||
7802 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" | |
7803 | ;; | |
7804 | ||
7805 | hpux*) | |
7806 | ||
7807 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable | |
7808 | # multi-threading and also sets -lpthread." | |
7809 | ||
7810 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
7811 | ;; | |
7812 | ||
7813 | openedition*) | |
7814 | ||
7815 | # IBM z/OS requires a feature-test macro to be defined in order to | |
7816 | # enable POSIX threads at all, so give the user a hint if this is | |
7817 | # not set. (We don't define these ourselves, as they can affect | |
7818 | # other portions of the system API in unpredictable ways.) | |
7819 | ||
7820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7821 | /* end confdefs.h. */ | |
7822 | ||
7823 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
7824 | AX_PTHREAD_ZOS_MISSING | |
7825 | # endif | |
7826 | ||
7827 | _ACEOF | |
7828 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7829 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : | |
7830 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
7831 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
7832 | fi | |
7833 | rm -f conftest* | |
7834 | ||
7835 | ;; | |
7836 | ||
7837 | solaris*) | |
7838 | ||
7839 | # On Solaris (at least, for some versions), libc contains stubbed | |
7840 | # (non-functional) versions of the pthreads routines, so link-based | |
7841 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
7842 | # pthread_cleanup_push, or rather a function called by this macro, | |
7843 | # so we could check for that, but who knows whether they'll stub | |
7844 | # that too in a future libc.) So we'll check first for the | |
7845 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
7846 | ||
7847 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
7848 | ;; | |
7849 | esac | |
7850 | ||
7851 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
7852 | ||
7853 | if test "x$GCC" = "xyes"; then : | |
7854 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
7855 | fi | |
7856 | ||
7857 | # The presence of a feature test macro requesting re-entrant function | |
7858 | # definitions is, on some systems, a strong hint that pthreads support is | |
7859 | # correctly enabled | |
7860 | ||
7861 | case $host_os in | |
7862 | darwin* | hpux* | linux* | osf* | solaris*) | |
7863 | ax_pthread_check_macro="_REENTRANT" | |
7864 | ;; | |
7865 | ||
7866 | aix*) | |
7867 | ax_pthread_check_macro="_THREAD_SAFE" | |
7868 | ;; | |
7869 | ||
7870 | *) | |
7871 | ax_pthread_check_macro="--" | |
7872 | ;; | |
7873 | esac | |
7874 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
7875 | ax_pthread_check_cond=0 | |
7876 | else | |
7877 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
7878 | fi | |
7879 | ||
7880 | # Are we compiling with Clang? | |
7881 | ||
7882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
7883 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
7884 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
7885 | $as_echo_n "(cached) " >&6 | |
7886 | else | |
7887 | ax_cv_PTHREAD_CLANG=no | |
7888 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
7889 | if test "x$GCC" = "xyes"; then | |
7890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7891 | /* end confdefs.h. */ | |
7892 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | |
7893 | # if defined(__clang__) && defined(__llvm__) | |
7894 | AX_PTHREAD_CC_IS_CLANG | |
7895 | # endif | |
7896 | ||
7897 | _ACEOF | |
7898 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7899 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
7900 | ax_cv_PTHREAD_CLANG=yes | |
7901 | fi | |
7902 | rm -f conftest* | |
7903 | ||
7904 | fi | |
7905 | ||
7906 | fi | |
7907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 | |
7908 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
7909 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
7910 | ||
7911 | ax_pthread_clang_warning=no | |
7912 | ||
7913 | # Clang needs special handling, because older versions handle the -pthread | |
7914 | # option in a rather... idiosyncratic way | |
7915 | ||
7916 | if test "x$ax_pthread_clang" = "xyes"; then | |
7917 | ||
7918 | # Clang takes -pthread; it has never supported any other flag | |
7919 | ||
7920 | # (Note 1: This will need to be revisited if a system that Clang | |
7921 | # supports has POSIX threads in a separate library. This tends not | |
7922 | # to be the way of modern systems, but it's conceivable.) | |
7923 | ||
7924 | # (Note 2: On some systems, notably Darwin, -pthread is not needed | |
7925 | # to get POSIX threads support; the API is always present and | |
7926 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
7927 | # -pthread does define _REENTRANT, and while the Darwin headers | |
7928 | # ignore this macro, third-party headers might not.) | |
7929 | ||
7930 | PTHREAD_CFLAGS="-pthread" | |
7931 | PTHREAD_LIBS= | |
7932 | ||
7933 | ax_pthread_ok=yes | |
7934 | ||
7935 | # However, older versions of Clang make a point of warning the user | |
7936 | # that, in an invocation where only linking and no compilation is | |
7937 | # taking place, the -pthread option has no effect ("argument unused | |
7938 | # during compilation"). They expect -pthread to be passed in only | |
7939 | # when source code is being compiled. | |
7940 | # | |
7941 | # Problem is, this is at odds with the way Automake and most other | |
7942 | # C build frameworks function, which is that the same flags used in | |
7943 | # compilation (CFLAGS) are also used in linking. Many systems | |
7944 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
7945 | # support, and in fact it is often not straightforward to specify a | |
7946 | # flag that is used only in the compilation phase and not in | |
7947 | # linking. Such a scenario is extremely rare in practice. | |
7948 | # | |
7949 | # Even though use of the -pthread flag in linking would only print | |
7950 | # a warning, this can be a nuisance for well-run software projects | |
7951 | # that build with -Werror. So if the active version of Clang has | |
7952 | # this misfeature, we search for an option to squash it. | |
7953 | ||
7954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
7955 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
7956 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
7957 | $as_echo_n "(cached) " >&6 | |
7958 | else | |
7959 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
7960 | # Create an alternate version of $ac_link that compiles and | |
7961 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
7962 | # (.c -> exe), because the warning occurs only in the second | |
7963 | # step | |
7964 | ax_pthread_save_ac_link="$ac_link" | |
7965 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
7966 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
7967 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
7968 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7969 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
7970 | if test "x$ax_pthread_try" = "xunknown"; then : | |
7971 | break | |
7972 | fi | |
7973 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
7974 | ac_link="$ax_pthread_save_ac_link" | |
7975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7976 | /* end confdefs.h. */ | |
7977 | int main(void){return 0;} | |
7978 | _ACEOF | |
7979 | if ac_fn_c_try_link "$LINENO"; then : | |
7980 | ac_link="$ax_pthread_2step_ac_link" | |
7981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7982 | /* end confdefs.h. */ | |
7983 | int main(void){return 0;} | |
7984 | _ACEOF | |
7985 | if ac_fn_c_try_link "$LINENO"; then : | |
7986 | break | |
7987 | fi | |
7988 | rm -f core conftest.err conftest.$ac_objext \ | |
7989 | conftest$ac_exeext conftest.$ac_ext | |
7990 | ||
7991 | fi | |
7992 | rm -f core conftest.err conftest.$ac_objext \ | |
7993 | conftest$ac_exeext conftest.$ac_ext | |
7994 | done | |
7995 | ac_link="$ax_pthread_save_ac_link" | |
7996 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7997 | if test "x$ax_pthread_try" = "x"; then : | |
7998 | ax_pthread_try=no | |
7999 | fi | |
8000 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
8001 | ||
8002 | fi | |
8003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
8004 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
8005 | ||
8006 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | |
8007 | no | unknown) ;; | |
8008 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
8009 | esac | |
8010 | ||
8011 | fi # $ax_pthread_clang = yes | |
8012 | ||
8013 | if test "x$ax_pthread_ok" = "xno"; then | |
8014 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
8015 | ||
8016 | case $ax_pthread_try_flag in | |
8017 | none) | |
8018 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
8019 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
8020 | ;; | |
8021 | ||
8022 | -mt,pthread) | |
8023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
8024 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
8025 | PTHREAD_CFLAGS="-mt" | |
8026 | PTHREAD_LIBS="-lpthread" | |
8027 | ;; | |
8028 | ||
8029 | -*) | |
8030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
8031 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
8032 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
8033 | ;; | |
8034 | ||
8035 | pthread-config) | |
8036 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
8037 | set dummy pthread-config; ac_word=$2 | |
8038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8039 | $as_echo_n "checking for $ac_word... " >&6; } | |
8040 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
8041 | $as_echo_n "(cached) " >&6 | |
8042 | else | |
8043 | if test -n "$ax_pthread_config"; then | |
8044 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
8045 | else | |
8046 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8047 | for as_dir in $PATH | |
8048 | do | |
8049 | IFS=$as_save_IFS | |
8050 | test -z "$as_dir" && as_dir=. | |
8051 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8052 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8053 | ac_cv_prog_ax_pthread_config="yes" | |
8054 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8055 | break 2 | |
8056 | fi | |
8057 | done | |
8058 | done | |
8059 | IFS=$as_save_IFS | |
8060 | ||
8061 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" | |
8062 | fi | |
8063 | fi | |
8064 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
8065 | if test -n "$ax_pthread_config"; then | |
8066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
8067 | $as_echo "$ax_pthread_config" >&6; } | |
8068 | else | |
8069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8070 | $as_echo "no" >&6; } | |
8071 | fi | |
8072 | ||
8073 | ||
8074 | if test "x$ax_pthread_config" = "xno"; then : | |
8075 | continue | |
8076 | fi | |
8077 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
8078 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
8079 | ;; | |
8080 | ||
8081 | *) | |
8082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
8083 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
8084 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
8085 | ;; | |
8086 | esac | |
8087 | ||
8088 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8089 | ax_pthread_save_LIBS="$LIBS" | |
8090 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
8091 | LIBS="$PTHREAD_LIBS $LIBS" | |
8092 | ||
8093 | # Check for various functions. We must include pthread.h, | |
8094 | # since some functions may be macros. (On the Sequent, we | |
8095 | # need a special flag -Kthread to make this header compile.) | |
8096 | # We check for pthread_join because it is in -lpthread on IRIX | |
8097 | # while pthread_create is in libc. We check for pthread_attr_init | |
8098 | # due to DEC craziness with -lpthreads. We check for | |
8099 | # pthread_cleanup_push because it is one of the few pthread | |
8100 | # functions on Solaris that doesn't have a non-functional libc stub. | |
8101 | # We try pthread_create on general principles. | |
8102 | ||
8103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8104 | /* end confdefs.h. */ | |
8105 | #include <pthread.h> | |
8106 | # if $ax_pthread_check_cond | |
8107 | # error "$ax_pthread_check_macro must be defined" | |
8108 | # endif | |
8109 | static void routine(void *a) { a = 0; } | |
8110 | static void *start_routine(void *a) { return a; } | |
8111 | int | |
8112 | main () | |
8113 | { | |
8114 | pthread_t th; pthread_attr_t attr; | |
8115 | pthread_create(&th, 0, start_routine, 0); | |
8116 | pthread_join(th, 0); | |
8117 | pthread_attr_init(&attr); | |
8118 | pthread_cleanup_push(routine, 0); | |
8119 | pthread_cleanup_pop(0) /* ; */ | |
8120 | ; | |
8121 | return 0; | |
8122 | } | |
8123 | _ACEOF | |
8124 | if ac_fn_c_try_link "$LINENO"; then : | |
8125 | ax_pthread_ok=yes | |
8126 | fi | |
8127 | rm -f core conftest.err conftest.$ac_objext \ | |
8128 | conftest$ac_exeext conftest.$ac_ext | |
8129 | ||
8130 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8131 | LIBS="$ax_pthread_save_LIBS" | |
8132 | ||
8133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
8134 | $as_echo "$ax_pthread_ok" >&6; } | |
8135 | if test "x$ax_pthread_ok" = "xyes"; then : | |
8136 | break | |
8137 | fi | |
8138 | ||
8139 | PTHREAD_LIBS="" | |
8140 | PTHREAD_CFLAGS="" | |
8141 | done | |
8142 | fi | |
8143 | ||
8144 | # Various other checks: | |
8145 | if test "x$ax_pthread_ok" = "xyes"; then | |
8146 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8147 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
8148 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
8149 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
8150 | |
8151 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | |
8152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
8153 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
8154 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
8155 | $as_echo_n "(cached) " >&6 | |
8156 | else | |
8157 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
8158 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
8159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8160 | /* end confdefs.h. */ | |
8161 | #include <pthread.h> | |
8162 | int | |
8163 | main () | |
8164 | { | |
8165 | int attr = $ax_pthread_attr; return attr /* ; */ | |
8166 | ; | |
8167 | return 0; | |
8168 | } | |
8169 | _ACEOF | |
8170 | if ac_fn_c_try_link "$LINENO"; then : | |
8171 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
8172 | fi | |
8173 | rm -f core conftest.err conftest.$ac_objext \ | |
8174 | conftest$ac_exeext conftest.$ac_ext | |
8175 | done | |
8176 | ||
8177 | fi | |
8178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
8179 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
8180 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
8181 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
8182 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
8183 | ||
8184 | cat >>confdefs.h <<_ACEOF | |
8185 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
8186 | _ACEOF | |
8187 | ||
8188 | ax_pthread_joinable_attr_defined=yes | |
8189 | ||
8190 | fi | |
8191 | ||
8192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 | |
8193 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
8194 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
8195 | $as_echo_n "(cached) " >&6 | |
8196 | else | |
8197 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
8198 | case $host_os in | |
8199 | solaris*) | |
8200 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
8201 | ;; | |
8202 | esac | |
8203 | ||
8204 | fi | |
8205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
8206 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
8207 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
8208 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
8209 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
8210 | ax_pthread_special_flags_added=yes | |
8211 | fi | |
8212 | ||
8213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 | |
8214 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
8215 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
8216 | $as_echo_n "(cached) " >&6 | |
8217 | else | |
8218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8219 | /* end confdefs.h. */ | |
8220 | #include <pthread.h> | |
8221 | int | |
8222 | main () | |
8223 | { | |
8224 | int i = PTHREAD_PRIO_INHERIT; | |
8225 | ; | |
8226 | return 0; | |
8227 | } | |
8228 | _ACEOF | |
8229 | if ac_fn_c_try_link "$LINENO"; then : | |
8230 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
8231 | else | |
8232 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
8233 | fi | |
8234 | rm -f core conftest.err conftest.$ac_objext \ | |
8235 | conftest$ac_exeext conftest.$ac_ext | |
8236 | ||
8237 | fi | |
8238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
8239 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
8240 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
8241 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
8242 | ||
8243 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h | |
8244 | ||
8245 | ax_pthread_prio_inherit_defined=yes | |
8246 | ||
8247 | fi | |
8248 | ||
8249 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8250 | LIBS="$ax_pthread_save_LIBS" | |
8251 | ||
8252 | # More AIX lossage: compile with *_r variant | |
8253 | if test "x$GCC" != "xyes"; then | |
8254 | case $host_os in | |
8255 | aix*) | |
8256 | case "x/$CC" in #( | |
8257 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
8258 | #handle absolute path differently from PATH based program lookup | |
8259 | case "x$CC" in #( | |
8260 | x/*) : | |
8261 | if as_fn_executable_p ${CC}_r; then : | |
8262 | PTHREAD_CC="${CC}_r" | |
8263 | fi ;; #( | |
8264 | *) : | |
8265 | for ac_prog in ${CC}_r | |
8266 | do | |
8267 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8268 | set dummy $ac_prog; ac_word=$2 | |
8269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8270 | $as_echo_n "checking for $ac_word... " >&6; } | |
8271 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
8272 | $as_echo_n "(cached) " >&6 | |
8273 | else | |
8274 | if test -n "$PTHREAD_CC"; then | |
8275 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
8276 | else | |
8277 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8278 | for as_dir in $PATH | |
8279 | do | |
8280 | IFS=$as_save_IFS | |
8281 | test -z "$as_dir" && as_dir=. | |
8282 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8283 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8284 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
8285 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8286 | break 2 | |
8287 | fi | |
8288 | done | |
8289 | done | |
8290 | IFS=$as_save_IFS | |
8291 | ||
8292 | fi | |
8293 | fi | |
8294 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
8295 | if test -n "$PTHREAD_CC"; then | |
8296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
8297 | $as_echo "$PTHREAD_CC" >&6; } | |
8298 | else | |
8299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8300 | $as_echo "no" >&6; } | |
8301 | fi | |
8302 | ||
8303 | ||
8304 | test -n "$PTHREAD_CC" && break | |
8305 | done | |
8306 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8307 | ;; | |
8308 | esac ;; #( | |
8309 | *) : | |
8310 | ;; | |
8311 | esac | |
8312 | ;; | |
8313 | esac | |
8314 | fi | |
8315 | fi | |
8316 | ||
8317 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8318 | ||
8319 | ||
8320 | ||
8321 | ||
8322 | ||
8323 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
8324 | if test "x$ax_pthread_ok" = "xyes"; then | |
8325 | threads=yes | |
8326 | : | |
8327 | else | |
8328 | ax_pthread_ok=no | |
8329 | threads=no | |
8330 | fi | |
8331 | ac_ext=cpp | |
8332 | ac_cpp='$CXXCPP $CPPFLAGS' | |
8333 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8334 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8335 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
8336 | ||
8337 | ||
8338 | if test "$threads" = "yes"; then | |
8339 | save_LIBS="$LIBS" | |
8340 | LIBS="$PTHREAD_LIBS $LIBS" | |
8341 | save_CXXFLAGS="$CXXFLAGS" | |
8342 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
8343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
8344 | $as_echo_n "checking for std::thread... " >&6; } | |
8345 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
8346 | $as_echo_n "(cached) " >&6 | |
8347 | else | |
8348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8349 | /* end confdefs.h. */ | |
8350 | #include <thread> | |
8351 | void callback() { } | |
8352 | int | |
8353 | main () | |
8354 | { | |
8355 | std::thread t(callback); | |
8356 | ; | |
8357 | return 0; | |
8358 | } | |
8359 | _ACEOF | |
8360 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
8361 | gdb_cv_cxx_std_thread=yes | |
8362 | else | |
8363 | gdb_cv_cxx_std_thread=no | |
8364 | fi | |
8365 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8366 | fi | |
8367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
8368 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
8369 | ||
8370 | # This check must be here, while LIBS includes any necessary | |
8371 | # threading library. | |
8372 | for ac_func in pthread_sigmask pthread_setname_np | |
8373 | do : | |
8374 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8375 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8376 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
8377 | cat >>confdefs.h <<_ACEOF | |
8378 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8379 | _ACEOF | |
8380 | ||
8381 | fi | |
8382 | done | |
8383 | ||
8384 | ||
8385 | LIBS="$save_LIBS" | |
8386 | CXXFLAGS="$save_CXXFLAGS" | |
8387 | fi | |
8388 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
8389 | ||
8390 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h | |
8391 | ||
8392 | fi | |
8393 | ac_ext=c | |
8394 | ac_cpp='$CPP $CPPFLAGS' | |
8395 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8396 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8397 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8398 | ||
8399 | ||
8400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
8401 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
8402 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
8403 | $as_echo_n "(cached) " >&6 | |
8404 | else | |
8405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8406 | /* end confdefs.h. */ |
8407 | ||
05ea2a05 TT |
8408 | #include <setjmp.h> |
8409 | ||
5e030278 TT |
8410 | int |
8411 | main () | |
8412 | { | |
05ea2a05 | 8413 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
5e030278 TT |
8414 | ; |
8415 | return 0; | |
8416 | } | |
8417 | _ACEOF | |
05ea2a05 TT |
8418 | if ac_fn_c_try_compile "$LINENO"; then : |
8419 | gdb_cv_func_sigsetjmp=yes | |
8420 | else | |
8421 | gdb_cv_func_sigsetjmp=no | |
5e030278 | 8422 | fi |
05ea2a05 | 8423 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 | 8424 | fi |
05ea2a05 TT |
8425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
8426 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
8427 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 8428 | |
05ea2a05 | 8429 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 8430 | |
05ea2a05 | 8431 | fi |
5e030278 | 8432 | |
5e030278 | 8433 | |
05ea2a05 TT |
8434 | # Check whether --with-intel_pt was given. |
8435 | if test "${with_intel_pt+set}" = set; then : | |
8436 | withval=$with_intel_pt; | |
8437 | else | |
8438 | with_intel_pt=auto | |
8439 | fi | |
5e030278 | 8440 | |
05ea2a05 TT |
8441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
8442 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
8443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
8444 | $as_echo "$with_intel_pt" >&6; } | |
5e030278 | 8445 | |
05ea2a05 TT |
8446 | if test "${with_intel_pt}" = no; then |
8447 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
8448 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
8449 | HAVE_LIBIPT=no | |
8450 | else | |
8451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8452 | /* end confdefs.h. */ |
8453 | ||
05ea2a05 TT |
8454 | #include <linux/perf_event.h> |
8455 | #ifndef PERF_ATTR_SIZE_VER5 | |
8456 | # error | |
8457 | #endif | |
5e030278 TT |
8458 | |
8459 | _ACEOF | |
05ea2a05 TT |
8460 | if ac_fn_c_try_cpp "$LINENO"; then : |
8461 | perf_event=yes | |
8462 | else | |
8463 | perf_event=no | |
5e030278 | 8464 | fi |
05ea2a05 TT |
8465 | rm -f conftest.err conftest.i conftest.$ac_ext |
8466 | if test "$perf_event" != yes; then | |
8467 | if test "$with_intel_pt" = yes; then | |
8468 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
8469 | else | |
8470 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
8471 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
8472 | fi | |
8473 | fi | |
5e030278 | 8474 | |
5e030278 | 8475 | |
5e030278 | 8476 | |
5e030278 | 8477 | |
5e030278 | 8478 | |
5e030278 | 8479 | |
5e030278 | 8480 | |
5e030278 | 8481 | |
5e030278 | 8482 | |
05ea2a05 | 8483 | use_additional=yes |
5e030278 | 8484 | |
05ea2a05 TT |
8485 | acl_save_prefix="$prefix" |
8486 | prefix="$acl_final_prefix" | |
8487 | acl_save_exec_prefix="$exec_prefix" | |
8488 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8489 | |
05ea2a05 TT |
8490 | eval additional_includedir=\"$includedir\" |
8491 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8492 | |
05ea2a05 TT |
8493 | exec_prefix="$acl_save_exec_prefix" |
8494 | prefix="$acl_save_prefix" | |
5e030278 | 8495 | |
5e030278 | 8496 | |
05ea2a05 TT |
8497 | # Check whether --with-libipt-prefix was given. |
8498 | if test "${with_libipt_prefix+set}" = set; then : | |
8499 | withval=$with_libipt_prefix; | |
8500 | if test "X$withval" = "Xno"; then | |
8501 | use_additional=no | |
8502 | else | |
8503 | if test "X$withval" = "X"; then | |
5e030278 | 8504 | |
05ea2a05 TT |
8505 | acl_save_prefix="$prefix" |
8506 | prefix="$acl_final_prefix" | |
8507 | acl_save_exec_prefix="$exec_prefix" | |
8508 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8509 | |
05ea2a05 TT |
8510 | eval additional_includedir=\"$includedir\" |
8511 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8512 | |
05ea2a05 TT |
8513 | exec_prefix="$acl_save_exec_prefix" |
8514 | prefix="$acl_save_prefix" | |
5e030278 | 8515 | |
05ea2a05 TT |
8516 | else |
8517 | additional_includedir="$withval/include" | |
8518 | additional_libdir="$withval/lib" | |
8519 | fi | |
8520 | fi | |
5e030278 | 8521 | |
05ea2a05 | 8522 | fi |
5e030278 | 8523 | |
05ea2a05 TT |
8524 | LIBIPT= |
8525 | LTLIBIPT= | |
8526 | INCIPT= | |
8527 | rpathdirs= | |
8528 | ltrpathdirs= | |
8529 | names_already_handled= | |
8530 | names_next_round='ipt ' | |
8531 | while test -n "$names_next_round"; do | |
8532 | names_this_round="$names_next_round" | |
8533 | names_next_round= | |
8534 | for name in $names_this_round; do | |
8535 | already_handled= | |
8536 | for n in $names_already_handled; do | |
8537 | if test "$n" = "$name"; then | |
8538 | already_handled=yes | |
8539 | break | |
8540 | fi | |
8541 | done | |
8542 | if test -z "$already_handled"; then | |
8543 | names_already_handled="$names_already_handled $name" | |
8544 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8545 | eval value=\"\$HAVE_LIB$uppername\" | |
8546 | if test -n "$value"; then | |
8547 | if test "$value" = yes; then | |
8548 | eval value=\"\$LIB$uppername\" | |
8549 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
8550 | eval value=\"\$LTLIB$uppername\" | |
8551 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
8552 | else | |
8553 | : | |
8554 | fi | |
8555 | else | |
8556 | found_dir= | |
8557 | found_la= | |
8558 | found_so= | |
8559 | found_a= | |
8560 | if test $use_additional = yes; then | |
8561 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8562 | found_dir="$additional_libdir" | |
8563 | found_so="$additional_libdir/lib$name.$shlibext" | |
8564 | if test -f "$additional_libdir/lib$name.la"; then | |
8565 | found_la="$additional_libdir/lib$name.la" | |
8566 | fi | |
8567 | else | |
8568 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8569 | found_dir="$additional_libdir" | |
8570 | found_a="$additional_libdir/lib$name.$libext" | |
8571 | if test -f "$additional_libdir/lib$name.la"; then | |
8572 | found_la="$additional_libdir/lib$name.la" | |
8573 | fi | |
8574 | fi | |
8575 | fi | |
8576 | fi | |
8577 | if test "X$found_dir" = "X"; then | |
8578 | for x in $LDFLAGS $LTLIBIPT; do | |
8579 | ||
8580 | acl_save_prefix="$prefix" | |
8581 | prefix="$acl_final_prefix" | |
8582 | acl_save_exec_prefix="$exec_prefix" | |
8583 | exec_prefix="$acl_final_exec_prefix" | |
8584 | eval x=\"$x\" | |
8585 | exec_prefix="$acl_save_exec_prefix" | |
8586 | prefix="$acl_save_prefix" | |
8587 | ||
8588 | case "$x" in | |
8589 | -L*) | |
8590 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8591 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8592 | found_dir="$dir" | |
8593 | found_so="$dir/lib$name.$shlibext" | |
8594 | if test -f "$dir/lib$name.la"; then | |
8595 | found_la="$dir/lib$name.la" | |
8596 | fi | |
8597 | else | |
8598 | if test -f "$dir/lib$name.$libext"; then | |
8599 | found_dir="$dir" | |
8600 | found_a="$dir/lib$name.$libext" | |
8601 | if test -f "$dir/lib$name.la"; then | |
8602 | found_la="$dir/lib$name.la" | |
8603 | fi | |
8604 | fi | |
8605 | fi | |
8606 | ;; | |
8607 | esac | |
8608 | if test "X$found_dir" != "X"; then | |
8609 | break | |
8610 | fi | |
8611 | done | |
8612 | fi | |
8613 | if test "X$found_dir" != "X"; then | |
8614 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
8615 | if test "X$found_so" != "X"; then | |
8616 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8617 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8618 | else | |
8619 | haveit= | |
8620 | for x in $ltrpathdirs; do | |
8621 | if test "X$x" = "X$found_dir"; then | |
8622 | haveit=yes | |
8623 | break | |
8624 | fi | |
8625 | done | |
8626 | if test -z "$haveit"; then | |
8627 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8628 | fi | |
8629 | if test "$hardcode_direct" = yes; then | |
8630 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8631 | else | |
8632 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8633 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8634 | haveit= | |
8635 | for x in $rpathdirs; do | |
8636 | if test "X$x" = "X$found_dir"; then | |
8637 | haveit=yes | |
8638 | break | |
8639 | fi | |
8640 | done | |
8641 | if test -z "$haveit"; then | |
8642 | rpathdirs="$rpathdirs $found_dir" | |
8643 | fi | |
8644 | else | |
8645 | haveit= | |
8646 | for x in $LDFLAGS $LIBIPT; do | |
8647 | ||
8648 | acl_save_prefix="$prefix" | |
8649 | prefix="$acl_final_prefix" | |
8650 | acl_save_exec_prefix="$exec_prefix" | |
8651 | exec_prefix="$acl_final_exec_prefix" | |
8652 | eval x=\"$x\" | |
8653 | exec_prefix="$acl_save_exec_prefix" | |
8654 | prefix="$acl_save_prefix" | |
8655 | ||
8656 | if test "X$x" = "X-L$found_dir"; then | |
8657 | haveit=yes | |
8658 | break | |
8659 | fi | |
8660 | done | |
8661 | if test -z "$haveit"; then | |
8662 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
8663 | fi | |
8664 | if test "$hardcode_minus_L" != no; then | |
8665 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8666 | else | |
8667 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8668 | fi | |
8669 | fi | |
8670 | fi | |
8671 | fi | |
8672 | else | |
8673 | if test "X$found_a" != "X"; then | |
8674 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
8675 | else | |
8676 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
8677 | fi | |
8678 | fi | |
8679 | additional_includedir= | |
8680 | case "$found_dir" in | |
8681 | */lib | */lib/) | |
8682 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8683 | additional_includedir="$basedir/include" | |
8684 | ;; | |
8685 | esac | |
8686 | if test "X$additional_includedir" != "X"; then | |
8687 | if test "X$additional_includedir" != "X/usr/include"; then | |
8688 | haveit= | |
8689 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8690 | if test -n "$GCC"; then | |
8691 | case $host_os in | |
8692 | linux*) haveit=yes;; | |
8693 | esac | |
8694 | fi | |
8695 | fi | |
8696 | if test -z "$haveit"; then | |
8697 | for x in $CPPFLAGS $INCIPT; do | |
8698 | ||
8699 | acl_save_prefix="$prefix" | |
8700 | prefix="$acl_final_prefix" | |
8701 | acl_save_exec_prefix="$exec_prefix" | |
8702 | exec_prefix="$acl_final_exec_prefix" | |
8703 | eval x=\"$x\" | |
8704 | exec_prefix="$acl_save_exec_prefix" | |
8705 | prefix="$acl_save_prefix" | |
8706 | ||
8707 | if test "X$x" = "X-I$additional_includedir"; then | |
8708 | haveit=yes | |
8709 | break | |
8710 | fi | |
8711 | done | |
8712 | if test -z "$haveit"; then | |
8713 | if test -d "$additional_includedir"; then | |
8714 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
8715 | fi | |
8716 | fi | |
8717 | fi | |
8718 | fi | |
8719 | fi | |
8720 | if test -n "$found_la"; then | |
8721 | save_libdir="$libdir" | |
8722 | case "$found_la" in | |
8723 | */* | *\\*) . "$found_la" ;; | |
8724 | *) . "./$found_la" ;; | |
8725 | esac | |
8726 | libdir="$save_libdir" | |
8727 | for dep in $dependency_libs; do | |
8728 | case "$dep" in | |
8729 | -L*) | |
8730 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8731 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8732 | haveit= | |
8733 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8734 | if test -n "$GCC"; then | |
8735 | case $host_os in | |
8736 | linux*) haveit=yes;; | |
8737 | esac | |
8738 | fi | |
8739 | fi | |
8740 | if test -z "$haveit"; then | |
8741 | haveit= | |
8742 | for x in $LDFLAGS $LIBIPT; do | |
8743 | ||
8744 | acl_save_prefix="$prefix" | |
8745 | prefix="$acl_final_prefix" | |
8746 | acl_save_exec_prefix="$exec_prefix" | |
8747 | exec_prefix="$acl_final_exec_prefix" | |
8748 | eval x=\"$x\" | |
8749 | exec_prefix="$acl_save_exec_prefix" | |
8750 | prefix="$acl_save_prefix" | |
8751 | ||
8752 | if test "X$x" = "X-L$additional_libdir"; then | |
8753 | haveit=yes | |
8754 | break | |
8755 | fi | |
8756 | done | |
8757 | if test -z "$haveit"; then | |
8758 | if test -d "$additional_libdir"; then | |
8759 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
8760 | fi | |
8761 | fi | |
8762 | haveit= | |
8763 | for x in $LDFLAGS $LTLIBIPT; do | |
8764 | ||
8765 | acl_save_prefix="$prefix" | |
8766 | prefix="$acl_final_prefix" | |
8767 | acl_save_exec_prefix="$exec_prefix" | |
8768 | exec_prefix="$acl_final_exec_prefix" | |
8769 | eval x=\"$x\" | |
8770 | exec_prefix="$acl_save_exec_prefix" | |
8771 | prefix="$acl_save_prefix" | |
8772 | ||
8773 | if test "X$x" = "X-L$additional_libdir"; then | |
8774 | haveit=yes | |
8775 | break | |
8776 | fi | |
8777 | done | |
8778 | if test -z "$haveit"; then | |
8779 | if test -d "$additional_libdir"; then | |
8780 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
8781 | fi | |
8782 | fi | |
8783 | fi | |
8784 | fi | |
8785 | ;; | |
8786 | -R*) | |
8787 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8788 | if test "$enable_rpath" != no; then | |
8789 | haveit= | |
8790 | for x in $rpathdirs; do | |
8791 | if test "X$x" = "X$dir"; then | |
8792 | haveit=yes | |
8793 | break | |
8794 | fi | |
8795 | done | |
8796 | if test -z "$haveit"; then | |
8797 | rpathdirs="$rpathdirs $dir" | |
8798 | fi | |
8799 | haveit= | |
8800 | for x in $ltrpathdirs; do | |
8801 | if test "X$x" = "X$dir"; then | |
8802 | haveit=yes | |
8803 | break | |
8804 | fi | |
8805 | done | |
8806 | if test -z "$haveit"; then | |
8807 | ltrpathdirs="$ltrpathdirs $dir" | |
8808 | fi | |
8809 | fi | |
8810 | ;; | |
8811 | -l*) | |
8812 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8813 | ;; | |
8814 | *.la) | |
8815 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8816 | ;; | |
8817 | *) | |
8818 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
8819 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
8820 | ;; | |
8821 | esac | |
8822 | done | |
8823 | fi | |
8824 | else | |
8825 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8826 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
8827 | fi | |
8828 | fi | |
8829 | fi | |
8830 | done | |
8831 | done | |
8832 | if test "X$rpathdirs" != "X"; then | |
8833 | if test -n "$hardcode_libdir_separator"; then | |
8834 | alldirs= | |
8835 | for found_dir in $rpathdirs; do | |
8836 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8837 | done | |
8838 | acl_save_libdir="$libdir" | |
8839 | libdir="$alldirs" | |
8840 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8841 | libdir="$acl_save_libdir" | |
8842 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8843 | else | |
8844 | for found_dir in $rpathdirs; do | |
8845 | acl_save_libdir="$libdir" | |
8846 | libdir="$found_dir" | |
8847 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8848 | libdir="$acl_save_libdir" | |
8849 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
8850 | done | |
8851 | fi | |
8852 | fi | |
8853 | if test "X$ltrpathdirs" != "X"; then | |
8854 | for found_dir in $ltrpathdirs; do | |
8855 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
8856 | done | |
8857 | fi | |
5e030278 | 8858 | |
5e030278 | 8859 | |
05ea2a05 | 8860 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 8861 | |
05ea2a05 TT |
8862 | for element in $INCIPT; do |
8863 | haveit= | |
8864 | for x in $CPPFLAGS; do | |
5e030278 | 8865 | |
05ea2a05 TT |
8866 | acl_save_prefix="$prefix" |
8867 | prefix="$acl_final_prefix" | |
8868 | acl_save_exec_prefix="$exec_prefix" | |
8869 | exec_prefix="$acl_final_exec_prefix" | |
8870 | eval x=\"$x\" | |
8871 | exec_prefix="$acl_save_exec_prefix" | |
8872 | prefix="$acl_save_prefix" | |
8873 | ||
8874 | if test "X$x" = "X$element"; then | |
8875 | haveit=yes | |
8876 | break | |
8877 | fi | |
8878 | done | |
8879 | if test -z "$haveit"; then | |
8880 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8881 | fi | |
8882 | done | |
8883 | ||
8884 | ||
8885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
8886 | $as_echo_n "checking for libipt... " >&6; } | |
8887 | if ${ac_cv_libipt+:} false; then : | |
8888 | $as_echo_n "(cached) " >&6 | |
8889 | else | |
8890 | ||
8891 | ac_save_LIBS="$LIBS" | |
8892 | LIBS="$LIBS $LIBIPT" | |
8893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8894 | /* end confdefs.h. */ |
05ea2a05 TT |
8895 | #include "intel-pt.h" |
8896 | int | |
8897 | main () | |
8898 | { | |
8899 | pt_insn_alloc_decoder (0); | |
8900 | ; | |
8901 | return 0; | |
8902 | } | |
5e030278 TT |
8903 | _ACEOF |
8904 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
8905 | ac_cv_libipt=yes |
8906 | else | |
8907 | ac_cv_libipt=no | |
5e030278 TT |
8908 | fi |
8909 | rm -f core conftest.err conftest.$ac_objext \ | |
8910 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 8911 | LIBS="$ac_save_LIBS" |
5e030278 TT |
8912 | |
8913 | fi | |
05ea2a05 TT |
8914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
8915 | $as_echo "$ac_cv_libipt" >&6; } | |
8916 | if test "$ac_cv_libipt" = yes; then | |
8917 | HAVE_LIBIPT=yes | |
5e030278 | 8918 | |
05ea2a05 | 8919 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
5e030278 | 8920 | |
05ea2a05 TT |
8921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 |
8922 | $as_echo_n "checking how to link with libipt... " >&6; } | |
8923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
8924 | $as_echo "$LIBIPT" >&6; } | |
8925 | else | |
8926 | HAVE_LIBIPT=no | |
8927 | CPPFLAGS="$ac_save_CPPFLAGS" | |
8928 | LIBIPT= | |
8929 | LTLIBIPT= | |
8930 | fi | |
5e030278 | 8931 | |
5e030278 | 8932 | |
5e030278 | 8933 | |
5e030278 | 8934 | |
5e030278 | 8935 | |
5e030278 | 8936 | |
05ea2a05 TT |
8937 | if test "$HAVE_LIBIPT" != yes; then |
8938 | if test "$with_intel_pt" = yes; then | |
8939 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
8940 | else | |
8941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
8942 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
8943 | fi | |
8944 | else | |
8945 | save_LIBS=$LIBS | |
8946 | LIBS="$LIBS $LIBIPT" | |
8947 | for ac_func in pt_insn_event | |
8948 | do : | |
8949 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
8950 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
8951 | cat >>confdefs.h <<_ACEOF | |
8952 | #define HAVE_PT_INSN_EVENT 1 | |
8953 | _ACEOF | |
5e030278 | 8954 | |
5e030278 | 8955 | fi |
05ea2a05 TT |
8956 | done |
8957 | ||
8958 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
8959 | " | |
8960 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
8961 | ||
8962 | cat >>confdefs.h <<_ACEOF | |
8963 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
8964 | _ACEOF | |
5e030278 TT |
8965 | |
8966 | ||
5e030278 | 8967 | fi |
05ea2a05 TT |
8968 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
8969 | " | |
8970 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
5e030278 | 8971 | |
05ea2a05 TT |
8972 | cat >>confdefs.h <<_ACEOF |
8973 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
8974 | _ACEOF | |
5e030278 | 8975 | |
5e030278 | 8976 | |
05ea2a05 | 8977 | fi |
5e030278 | 8978 | |
05ea2a05 TT |
8979 | LIBS=$save_LIBS |
8980 | fi | |
8981 | fi | |
8982 | ||
8983 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
8984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
8985 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
8986 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
8987 | $as_echo_n "(cached) " >&6 | |
8988 | else | |
8989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 8990 | /* end confdefs.h. */ |
05ea2a05 TT |
8991 | |
8992 | #define _SYSCALL32 | |
8993 | /* Needed for new procfs interface on sparc-solaris. */ | |
8994 | #define _STRUCTURED_PROC 1 | |
8995 | #include <sys/procfs.h> | |
5e030278 TT |
8996 | int |
8997 | main () | |
8998 | { | |
05ea2a05 | 8999 | gregset_t avar |
5e030278 TT |
9000 | ; |
9001 | return 0; | |
9002 | } | |
9003 | _ACEOF | |
05ea2a05 TT |
9004 | if ac_fn_c_try_compile "$LINENO"; then : |
9005 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
9006 | else | |
9007 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
5e030278 | 9008 | |
5e030278 | 9009 | fi |
05ea2a05 | 9010 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
9011 | fi |
9012 | ||
05ea2a05 | 9013 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
5e030278 | 9014 | |
05ea2a05 TT |
9015 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
9016 | ||
9017 | fi | |
9018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
9019 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
9020 | ||
9021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
9022 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
9023 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
5e030278 TT |
9024 | $as_echo_n "(cached) " >&6 |
9025 | else | |
05ea2a05 | 9026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e030278 | 9027 | /* end confdefs.h. */ |
05ea2a05 TT |
9028 | |
9029 | #define _SYSCALL32 | |
9030 | /* Needed for new procfs interface on sparc-solaris. */ | |
9031 | #define _STRUCTURED_PROC 1 | |
9032 | #include <sys/procfs.h> | |
5e030278 TT |
9033 | int |
9034 | main () | |
9035 | { | |
05ea2a05 | 9036 | fpregset_t avar |
5e030278 TT |
9037 | ; |
9038 | return 0; | |
9039 | } | |
9040 | _ACEOF | |
05ea2a05 TT |
9041 | if ac_fn_c_try_compile "$LINENO"; then : |
9042 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
9043 | else | |
9044 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
5e030278 TT |
9045 | |
9046 | fi | |
05ea2a05 TT |
9047 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9048 | fi | |
5e030278 | 9049 | |
05ea2a05 | 9050 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
5e030278 | 9051 | |
05ea2a05 | 9052 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
5e030278 | 9053 | |
05ea2a05 TT |
9054 | fi |
9055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
9056 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
5e030278 | 9057 | |
05ea2a05 TT |
9058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
9059 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
9060 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
5e030278 TT |
9061 | $as_echo_n "(cached) " >&6 |
9062 | else | |
05ea2a05 TT |
9063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9064 | /* end confdefs.h. */ | |
5e030278 | 9065 | |
05ea2a05 TT |
9066 | #define _SYSCALL32 |
9067 | /* Needed for new procfs interface on sparc-solaris. */ | |
9068 | #define _STRUCTURED_PROC 1 | |
9069 | #include <sys/procfs.h> | |
9070 | int | |
9071 | main () | |
9072 | { | |
9073 | prgregset_t avar | |
9074 | ; | |
9075 | return 0; | |
9076 | } | |
9077 | _ACEOF | |
9078 | if ac_fn_c_try_compile "$LINENO"; then : | |
9079 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
9080 | else | |
9081 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
9082 | ||
9083 | fi | |
9084 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5e030278 TT |
9085 | fi |
9086 | ||
05ea2a05 TT |
9087 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
9088 | ||
9089 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h | |
9090 | ||
9091 | fi | |
9092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
9093 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
9094 | ||
9095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
9096 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
9097 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
5e030278 TT |
9098 | $as_echo_n "(cached) " >&6 |
9099 | else | |
9100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9101 | /* end confdefs.h. */ | |
05ea2a05 TT |
9102 | |
9103 | #define _SYSCALL32 | |
9104 | /* Needed for new procfs interface on sparc-solaris. */ | |
9105 | #define _STRUCTURED_PROC 1 | |
9106 | #include <sys/procfs.h> | |
5e030278 TT |
9107 | int |
9108 | main () | |
9109 | { | |
05ea2a05 | 9110 | prfpregset_t avar |
5e030278 TT |
9111 | ; |
9112 | return 0; | |
9113 | } | |
9114 | _ACEOF | |
05ea2a05 TT |
9115 | if ac_fn_c_try_compile "$LINENO"; then : |
9116 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
5e030278 | 9117 | else |
05ea2a05 | 9118 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
5e030278 TT |
9119 | |
9120 | fi | |
05ea2a05 TT |
9121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9122 | fi | |
5e030278 | 9123 | |
05ea2a05 | 9124 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
5e030278 | 9125 | |
05ea2a05 | 9126 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
5e030278 | 9127 | |
05ea2a05 TT |
9128 | fi |
9129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
9130 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
5e030278 | 9131 | |
05ea2a05 TT |
9132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
9133 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
9134 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
5e030278 TT |
9135 | $as_echo_n "(cached) " >&6 |
9136 | else | |
05ea2a05 TT |
9137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9138 | /* end confdefs.h. */ | |
9139 | ||
9140 | #define _SYSCALL32 | |
9141 | /* Needed for new procfs interface on sparc-solaris. */ | |
9142 | #define _STRUCTURED_PROC 1 | |
9143 | #include <sys/procfs.h> | |
9144 | int | |
9145 | main () | |
9146 | { | |
9147 | prgregset32_t avar | |
9148 | ; | |
9149 | return 0; | |
9150 | } | |
9151 | _ACEOF | |
9152 | if ac_fn_c_try_compile "$LINENO"; then : | |
9153 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
5e030278 | 9154 | else |
05ea2a05 | 9155 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
5e030278 TT |
9156 | |
9157 | fi | |
05ea2a05 | 9158 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
9159 | fi |
9160 | ||
05ea2a05 | 9161 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
5e030278 | 9162 | |
05ea2a05 | 9163 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
5e030278 | 9164 | |
05ea2a05 TT |
9165 | fi |
9166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
9167 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
5e030278 | 9168 | |
05ea2a05 TT |
9169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
9170 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
9171 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
9172 | $as_echo_n "(cached) " >&6 | |
9173 | else | |
9174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9175 | /* end confdefs.h. */ | |
5e030278 | 9176 | |
05ea2a05 TT |
9177 | #define _SYSCALL32 |
9178 | /* Needed for new procfs interface on sparc-solaris. */ | |
9179 | #define _STRUCTURED_PROC 1 | |
9180 | #include <sys/procfs.h> | |
9181 | int | |
9182 | main () | |
9183 | { | |
9184 | lwpid_t avar | |
9185 | ; | |
9186 | return 0; | |
9187 | } | |
9188 | _ACEOF | |
9189 | if ac_fn_c_try_compile "$LINENO"; then : | |
9190 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
9191 | else | |
9192 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
5e030278 | 9193 | |
05ea2a05 TT |
9194 | fi |
9195 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9196 | fi | |
5e030278 | 9197 | |
05ea2a05 | 9198 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
5e030278 | 9199 | |
05ea2a05 | 9200 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
5e030278 | 9201 | |
05ea2a05 TT |
9202 | fi |
9203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
9204 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
5e030278 | 9205 | |
05ea2a05 TT |
9206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
9207 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
9208 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
5e030278 TT |
9209 | $as_echo_n "(cached) " >&6 |
9210 | else | |
9211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9212 | /* end confdefs.h. */ | |
05ea2a05 TT |
9213 | |
9214 | #define _SYSCALL32 | |
9215 | /* Needed for new procfs interface on sparc-solaris. */ | |
9216 | #define _STRUCTURED_PROC 1 | |
9217 | #include <sys/procfs.h> | |
5e030278 TT |
9218 | int |
9219 | main () | |
9220 | { | |
05ea2a05 | 9221 | psaddr_t avar |
5e030278 TT |
9222 | ; |
9223 | return 0; | |
9224 | } | |
9225 | _ACEOF | |
05ea2a05 TT |
9226 | if ac_fn_c_try_compile "$LINENO"; then : |
9227 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
5e030278 | 9228 | else |
05ea2a05 TT |
9229 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
9230 | ||
5e030278 TT |
9231 | fi |
9232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9233 | fi | |
5e030278 | 9234 | |
05ea2a05 | 9235 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
5e030278 | 9236 | |
05ea2a05 | 9237 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
5e030278 | 9238 | |
05ea2a05 TT |
9239 | fi |
9240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
9241 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
5e030278 | 9242 | |
05ea2a05 TT |
9243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 |
9244 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } | |
9245 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
e9bcb658 GB |
9246 | $as_echo_n "(cached) " >&6 |
9247 | else | |
9248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9249 | /* end confdefs.h. */ | |
9250 | ||
05ea2a05 TT |
9251 | #define _SYSCALL32 |
9252 | /* Needed for new procfs interface on sparc-solaris. */ | |
9253 | #define _STRUCTURED_PROC 1 | |
9254 | #include <sys/procfs.h> | |
e9bcb658 GB |
9255 | int |
9256 | main () | |
9257 | { | |
05ea2a05 | 9258 | elf_fpregset_t avar |
e9bcb658 GB |
9259 | ; |
9260 | return 0; | |
9261 | } | |
9262 | _ACEOF | |
9263 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 9264 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
e9bcb658 | 9265 | else |
05ea2a05 TT |
9266 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
9267 | ||
e9bcb658 GB |
9268 | fi |
9269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9270 | fi | |
e9bcb658 | 9271 | |
05ea2a05 TT |
9272 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
9273 | ||
9274 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h | |
9275 | ||
9276 | fi | |
9277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
9278 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
e9bcb658 | 9279 | |
25c51f71 | 9280 | fi |
e9bcb658 | 9281 | |
3266f10b | 9282 | |
eb7aa561 PA |
9283 | # Check the return and argument types of ptrace. |
9284 | ||
9285 | ||
9286 | for ac_header in sys/ptrace.h ptrace.h | |
9287 | do : | |
9288 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9289 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 9290 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
eb7aa561 PA |
9291 | cat >>confdefs.h <<_ACEOF |
9292 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9293 | _ACEOF | |
9294 | ||
9295 | fi | |
9296 | ||
9297 | done | |
9298 | ||
9299 | ||
9300 | gdb_ptrace_headers=' | |
9301 | #include <sys/types.h> | |
9302 | #if HAVE_SYS_PTRACE_H | |
9303 | # include <sys/ptrace.h> | |
9304 | #endif | |
9305 | #if HAVE_UNISTD_H | |
9306 | # include <unistd.h> | |
9307 | #endif | |
9308 | ' | |
9309 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 9310 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
eb7aa561 | 9311 | " |
d0ac1c44 | 9312 | if test "x$ac_cv_have_decl_ptrace" = xyes; then : |
eb7aa561 PA |
9313 | ac_have_decl=1 |
9314 | else | |
9315 | ac_have_decl=0 | |
9316 | fi | |
9317 | ||
9318 | cat >>confdefs.h <<_ACEOF | |
9319 | #define HAVE_DECL_PTRACE $ac_have_decl | |
9320 | _ACEOF | |
9321 | if test $ac_have_decl = 1; then : | |
9322 | ||
9323 | else | |
9324 | ||
9325 | : ${gdb_cv_func_ptrace_ret='int'} | |
9326 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
9327 | ||
9328 | fi | |
9329 | ||
9330 | # Check return type. Varargs (used on GNU/Linux) conflict with the | |
9331 | # empty argument list, so check for that explicitly. | |
9332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
9333 | $as_echo_n "checking return type of ptrace... " >&6; } | |
d0ac1c44 | 9334 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
eb7aa561 PA |
9335 | $as_echo_n "(cached) " >&6 |
9336 | else | |
9337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9338 | /* end confdefs.h. */ | |
9339 | $gdb_ptrace_headers | |
9340 | int | |
9341 | main () | |
9342 | { | |
9343 | extern long ptrace (enum __ptrace_request, ...); | |
9344 | ; | |
9345 | return 0; | |
9346 | } | |
9347 | _ACEOF | |
9b30624b | 9348 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9349 | gdb_cv_func_ptrace_ret='long' |
9350 | else | |
9351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9352 | /* end confdefs.h. */ | |
9353 | $gdb_ptrace_headers | |
9354 | int | |
9355 | main () | |
9356 | { | |
9357 | extern int ptrace (); | |
9358 | ; | |
9359 | return 0; | |
9360 | } | |
9361 | _ACEOF | |
9b30624b | 9362 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9363 | gdb_cv_func_ptrace_ret='int' |
9364 | else | |
9365 | gdb_cv_func_ptrace_ret='long' | |
9366 | fi | |
9367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9368 | fi | |
9369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9370 | fi | |
9371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 | |
9372 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
9373 | ||
9374 | cat >>confdefs.h <<_ACEOF | |
9375 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
9376 | _ACEOF | |
9377 | ||
9378 | # Check argument types. | |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
9380 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
d0ac1c44 | 9381 | if ${gdb_cv_func_ptrace_args+:} false; then : |
eb7aa561 PA |
9382 | $as_echo_n "(cached) " >&6 |
9383 | else | |
9384 | ||
9385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9386 | /* end confdefs.h. */ | |
9387 | $gdb_ptrace_headers | |
9388 | int | |
9389 | main () | |
9390 | { | |
9391 | extern long ptrace (enum __ptrace_request, ...); | |
9392 | ; | |
9393 | return 0; | |
9394 | } | |
9395 | _ACEOF | |
9b30624b | 9396 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 9397 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
eb7aa561 PA |
9398 | else |
9399 | ||
9400 | for gdb_arg1 in 'int' 'long'; do | |
9401 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
9402 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
9403 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
9404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9405 | /* end confdefs.h. */ | |
9406 | $gdb_ptrace_headers | |
9407 | int | |
9408 | main () | |
9409 | { | |
9410 | ||
9411 | extern $gdb_cv_func_ptrace_ret | |
9412 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
9413 | ||
9414 | ; | |
9415 | return 0; | |
9416 | } | |
9417 | _ACEOF | |
9b30624b | 9418 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9419 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
9420 | break 4; | |
9421 | fi | |
9422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9423 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
9424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9425 | /* end confdefs.h. */ | |
9426 | $gdb_ptrace_headers | |
9427 | int | |
9428 | main () | |
9429 | { | |
9430 | ||
9431 | extern $gdb_cv_func_ptrace_ret | |
9432 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
9433 | ||
9434 | ; | |
9435 | return 0; | |
9436 | } | |
9437 | _ACEOF | |
9b30624b | 9438 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9439 | |
9440 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
9441 | break 5; | |
9442 | fi | |
9443 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9444 | done | |
9445 | done | |
9446 | done | |
9447 | done | |
9448 | done | |
9449 | # Provide a safe default value. | |
9450 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
9451 | ||
9452 | fi | |
9453 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9454 | fi | |
9455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
9456 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
9457 | ac_save_IFS=$IFS; IFS=',' | |
9458 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
9459 | IFS=$ac_save_IFS | |
9460 | shift | |
9461 | ||
54019719 PA |
9462 | cat >>confdefs.h <<_ACEOF |
9463 | #define PTRACE_TYPE_ARG1 $1 | |
9464 | _ACEOF | |
9465 | ||
9466 | ||
eb7aa561 PA |
9467 | cat >>confdefs.h <<_ACEOF |
9468 | #define PTRACE_TYPE_ARG3 $3 | |
9469 | _ACEOF | |
9470 | ||
9471 | ||
9472 | cat >>confdefs.h <<_ACEOF | |
9473 | #define PTRACE_TYPE_ARG4 $4 | |
9474 | _ACEOF | |
9475 | ||
9476 | if test -n "$5"; then | |
9477 | ||
9478 | cat >>confdefs.h <<_ACEOF | |
9479 | #define PTRACE_TYPE_ARG5 $5 | |
9480 | _ACEOF | |
9481 | ||
9482 | fi | |
9483 | ||
9484 | ||
0fb4aa4b PA |
9485 | # Check for UST |
9486 | ustlibs="" | |
9487 | ustinc="" | |
9488 | ||
9489 | ||
9490 | # Check whether --with-ust was given. | |
9491 | if test "${with_ust+set}" = set; then : | |
9492 | withval=$with_ust; | |
9493 | fi | |
9494 | ||
9495 | ||
9496 | # Check whether --with-ust_include was given. | |
9497 | if test "${with_ust_include+set}" = set; then : | |
9498 | withval=$with_ust_include; | |
9499 | fi | |
9500 | ||
9501 | ||
9502 | # Check whether --with-ust_lib was given. | |
9503 | if test "${with_ust_lib+set}" = set; then : | |
9504 | withval=$with_ust_lib; | |
9505 | fi | |
9506 | ||
9507 | ||
9508 | case $with_ust in | |
9509 | no) | |
9510 | ustlibs= | |
9511 | ustinc= | |
9512 | ;; | |
9513 | "" | yes) | |
9514 | ustlibs=" -lust " | |
9515 | ustinc="" | |
9516 | ;; | |
9517 | *) | |
9518 | ustlibs="-L$with_ust/lib -lust" | |
9519 | ustinc="-I$with_ust/include " | |
9520 | ;; | |
9521 | esac | |
9522 | if test "x$with_ust_include" != x; then | |
9523 | ustinc="-I$with_ust_include " | |
9524 | fi | |
9525 | if test "x$with_ust_lib" != x; then | |
9526 | ustlibs="-L$with_ust_lib -lust" | |
9527 | fi | |
9528 | ||
9529 | if test "x$with_ust" != "xno"; then | |
9530 | saved_CFLAGS="$CFLAGS" | |
9531 | CFLAGS="$CFLAGS $ustinc" | |
9532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5 | |
9533 | $as_echo_n "checking for ust... " >&6; } | |
9534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9535 | /* end confdefs.h. */ | |
9536 | ||
9537 | #define CONFIG_UST_GDB_INTEGRATION | |
9538 | #include <ust/ust.h> | |
9539 | ||
9540 | int | |
9541 | main () | |
9542 | { | |
9543 | ||
9544 | ; | |
9545 | return 0; | |
9546 | } | |
9547 | _ACEOF | |
9548 | if ac_fn_c_try_compile "$LINENO"; then : | |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9550 | $as_echo "yes" >&6; }; | |
9551 | $as_echo "#define HAVE_UST 1" >>confdefs.h | |
9552 | ||
9553 | else | |
9554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9555 | $as_echo "no" >&6; }; ustlibs= ; ustinc= | |
9556 | fi | |
9557 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9558 | CFLAGS="$saved_CFLAGS" | |
9559 | fi | |
9560 | ||
9561 | # Flags needed for UST | |
9562 | ||
9563 | ||
9564 | ||
8f13a3ce | 9565 | |
d4596a3d PA |
9566 | # Check whether --enable-werror was given. |
9567 | if test "${enable_werror+set}" = set; then : | |
9568 | enableval=$enable_werror; case "${enableval}" in | |
9569 | yes | y) ERROR_ON_WARNING="yes" ;; | |
9570 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 9571 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
d4596a3d PA |
9572 | esac |
9573 | fi | |
9574 | ||
9575 | ||
9a084706 | 9576 | # Enable -Werror by default when using gcc. Turn it off for releases. |
8f13a3ce | 9577 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
d4596a3d PA |
9578 | ERROR_ON_WARNING=yes |
9579 | fi | |
9580 | ||
9581 | WERROR_CFLAGS="" | |
9582 | if test "${ERROR_ON_WARNING}" = yes ; then | |
9583 | WERROR_CFLAGS="-Werror" | |
9584 | fi | |
9585 | ||
cf6de44d | 9586 | # The options we'll try to enable. |
aac331e4 | 9587 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 9588 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
8f13a3ce | 9589 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 9590 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 9591 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
458412c3 | 9592 | -Wno-mismatched-tags \ |
632e107b | 9593 | -Wno-error=deprecated-register \ |
85e26832 | 9594 | -Wsuggest-override \ |
1a34f210 | 9595 | -Wimplicit-fallthrough=3 \ |
96643e35 | 9596 | -Wduplicated-cond \ |
33a6bc35 TT |
9597 | -Wshadow=local \ |
9598 | -Wdeprecated-copy \ | |
9599 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 9600 | -Wredundant-move \ |
8ddd8e0e | 9601 | -Wmissing-declarations \ |
898e7f60 SM |
9602 | -Wstrict-null-sentinel \ |
9603 | " | |
8f13a3ce | 9604 | |
8f13a3ce | 9605 | case "${host}" in |
5bfda255 YQ |
9606 | *-*-mingw32*) |
9607 | # Enable -Wno-format by default when using gcc on mingw since many | |
9608 | # GCC versions complain about %I64. | |
9609 | build_warnings="$build_warnings -Wno-format" ;; | |
9610 | *-*-solaris*) | |
9611 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
9612 | # doesn't understand. | |
9613 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
9614 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
9615 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
9616 | *) |
9617 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
9618 | # but there's a special case for this below. | |
9619 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
8f13a3ce MF |
9620 | esac |
9621 | ||
9622 | # Check whether --enable-build-warnings was given. | |
9623 | if test "${enable_build_warnings+set}" = set; then : | |
9624 | enableval=$enable_build_warnings; case "${enableval}" in | |
9625 | yes) ;; | |
9626 | no) build_warnings="-w";; | |
9627 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9628 | build_warnings="${build_warnings} ${t}";; | |
9629 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9630 | build_warnings="${t} ${build_warnings}";; | |
9631 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9632 | esac | |
9633 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9634 | echo "Setting compiler warning flags = $build_warnings" 6>&1 | |
9635 | fi | |
9636 | fi | |
9637 | # Check whether --enable-gdb-build-warnings was given. | |
9638 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
9639 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
9640 | yes) ;; | |
9641 | no) build_warnings="-w";; | |
9642 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9643 | build_warnings="${build_warnings} ${t}";; | |
9644 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9645 | build_warnings="${t} ${build_warnings}";; | |
9646 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9647 | esac | |
9648 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9649 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9650 | fi | |
3bc3d82a PA |
9651 | fi |
9652 | ||
9653 | # The set of warnings supported by a C++ compiler is not the same as | |
9654 | # of the C compiler. | |
cf6de44d | 9655 | ac_ext=cpp |
3bc3d82a PA |
9656 | ac_cpp='$CXXCPP $CPPFLAGS' |
9657 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9658 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9659 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
9660 | ||
3bc3d82a | 9661 | |
d4596a3d | 9662 | WARN_CFLAGS="" |
8f13a3ce | 9663 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
d4596a3d PA |
9664 | then |
9665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 | |
9666 | $as_echo_n "checking compiler warning flags... " >&6; } | |
9667 | # Separate out the -Werror flag as some files just cannot be | |
9668 | # compiled with it enabled. | |
9669 | for w in ${build_warnings}; do | |
7544db95 PA |
9670 | # GCC does not complain about -Wno-unknown-warning. Invert |
9671 | # and test -Wunknown-warning instead. | |
9672 | case $w in | |
9673 | -Wno-*) | |
9674 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
9675 | -Wformat-nonliteral) |
9676 | # gcc requires -Wformat before -Wformat-nonliteral | |
9677 | # will work, so stick them together. | |
9678 | w="-Wformat $w" | |
9679 | wtest="$w" | |
9680 | ;; | |
7544db95 PA |
9681 | *) |
9682 | wtest=$w ;; | |
9683 | esac | |
9684 | ||
d4596a3d PA |
9685 | case $w in |
9686 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
9687 | *) |
9688 | # Check whether GCC accepts it. | |
d4596a3d | 9689 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 9690 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 9691 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 9692 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
9693 | if test "x$w" = "x-Wunused-variable"; then |
9694 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
9695 | # fixed in GCC 4.9. This test is derived from the gdb | |
9696 | # source code that triggered this bug in GCC. | |
9697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9698 | /* end confdefs.h. */ | |
9699 | struct scoped_restore_base {}; | |
9700 | struct scoped_restore_tmpl : public scoped_restore_base { | |
9701 | ~scoped_restore_tmpl() {} | |
9702 | }; | |
9703 | int | |
9704 | main () | |
9705 | { | |
9706 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
9707 | ; | |
9708 | return 0; | |
9709 | } | |
9710 | _ACEOF | |
9711 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
9712 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9713 | fi | |
9714 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9715 | else | |
9716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d4596a3d PA |
9717 | /* end confdefs.h. */ |
9718 | ||
9719 | int | |
9720 | main () | |
9721 | { | |
9722 | ||
9723 | ; | |
9724 | return 0; | |
9725 | } | |
9726 | _ACEOF | |
3bc3d82a | 9727 | if ac_fn_cxx_try_compile "$LINENO"; then : |
d4596a3d PA |
9728 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
9729 | fi | |
9730 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a0de763e | 9731 | fi |
d4596a3d | 9732 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 9733 | CXXFLAGS="$saved_CXXFLAGS" |
d4596a3d PA |
9734 | esac |
9735 | done | |
9736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 | |
9737 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
9738 | fi | |
9739 | ||
9740 | ||
9741 | ||
cf6de44d | 9742 | ac_ext=c |
3bc3d82a PA |
9743 | ac_cpp='$CPP $CPPFLAGS' |
9744 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9745 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9746 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
9747 | ||
3bc3d82a | 9748 | |
8f13a3ce | 9749 | |
10e86dd7 DE |
9750 | old_LIBS="$LIBS" |
9751 | LIBS="$LIBS -ldl" | |
9752 | for ac_func in dladdr | |
9753 | do : | |
9754 | ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr" | |
d0ac1c44 | 9755 | if test "x$ac_cv_func_dladdr" = xyes; then : |
10e86dd7 DE |
9756 | cat >>confdefs.h <<_ACEOF |
9757 | #define HAVE_DLADDR 1 | |
9758 | _ACEOF | |
9759 | ||
9760 | fi | |
9761 | done | |
9762 | ||
9763 | LIBS="$old_LIBS" | |
9764 | ||
07697489 PA |
9765 | |
9766 | # Check for presence and size of long long. | |
9767 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
d0ac1c44 | 9768 | if test "x$ac_cv_type_long_long" = xyes; then : |
07697489 PA |
9769 | |
9770 | cat >>confdefs.h <<_ACEOF | |
9771 | #define HAVE_LONG_LONG 1 | |
9772 | _ACEOF | |
9773 | ||
9774 | # The cast to long int works around a bug in the HP C Compiler | |
9775 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9776 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9777 | # This bug is HP SR number 8606223364. | |
9778 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
9779 | $as_echo_n "checking size of long long... " >&6; } | |
d0ac1c44 | 9780 | if ${ac_cv_sizeof_long_long+:} false; then : |
07697489 PA |
9781 | $as_echo_n "(cached) " >&6 |
9782 | else | |
9783 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
9784 | ||
9785 | else | |
9786 | if test "$ac_cv_type_long_long" = yes; then | |
9787 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9788 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9789 | as_fn_error 77 "cannot compute sizeof (long long) |
9790 | See \`config.log' for more details" "$LINENO" 5; } | |
07697489 PA |
9791 | else |
9792 | ac_cv_sizeof_long_long=0 | |
9793 | fi | |
9794 | fi | |
9795 | ||
9796 | fi | |
9797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
9798 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
9799 | ||
9800 | ||
9801 | ||
9802 | cat >>confdefs.h <<_ACEOF | |
9803 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
9804 | _ACEOF | |
9805 | ||
9806 | ||
9807 | fi | |
9808 | ||
9809 | ||
d0ac1c44 SM |
9810 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
9811 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
9812 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
07697489 PA |
9813 | ac_have_decl=1 |
9814 | else | |
9815 | ac_have_decl=0 | |
9816 | fi | |
9817 | ||
9818 | cat >>confdefs.h <<_ACEOF | |
9819 | #define HAVE_DECL_BASENAME $ac_have_decl | |
9820 | _ACEOF | |
9821 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
d0ac1c44 | 9822 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
07697489 PA |
9823 | ac_have_decl=1 |
9824 | else | |
9825 | ac_have_decl=0 | |
9826 | fi | |
9827 | ||
9828 | cat >>confdefs.h <<_ACEOF | |
9829 | #define HAVE_DECL_FFS $ac_have_decl | |
9830 | _ACEOF | |
9831 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
d0ac1c44 | 9832 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
07697489 PA |
9833 | ac_have_decl=1 |
9834 | else | |
9835 | ac_have_decl=0 | |
9836 | fi | |
9837 | ||
9838 | cat >>confdefs.h <<_ACEOF | |
9839 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
9840 | _ACEOF | |
9841 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
d0ac1c44 | 9842 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
07697489 PA |
9843 | ac_have_decl=1 |
9844 | else | |
9845 | ac_have_decl=0 | |
9846 | fi | |
9847 | ||
9848 | cat >>confdefs.h <<_ACEOF | |
9849 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
9850 | _ACEOF | |
9851 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
d0ac1c44 | 9852 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
07697489 PA |
9853 | ac_have_decl=1 |
9854 | else | |
9855 | ac_have_decl=0 | |
9856 | fi | |
9857 | ||
9858 | cat >>confdefs.h <<_ACEOF | |
9859 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9860 | _ACEOF | |
9861 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 9862 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
07697489 PA |
9863 | ac_have_decl=1 |
9864 | else | |
9865 | ac_have_decl=0 | |
9866 | fi | |
9867 | ||
9868 | cat >>confdefs.h <<_ACEOF | |
9869 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
9870 | _ACEOF | |
9871 | ||
9872 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
d0ac1c44 | 9873 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
07697489 PA |
9874 | ac_have_decl=1 |
9875 | else | |
9876 | ac_have_decl=0 | |
9877 | fi | |
9878 | ||
9879 | cat >>confdefs.h <<_ACEOF | |
9880 | #define HAVE_DECL_STRTOL $ac_have_decl | |
9881 | _ACEOF | |
9882 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
d0ac1c44 | 9883 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
07697489 PA |
9884 | ac_have_decl=1 |
9885 | else | |
9886 | ac_have_decl=0 | |
9887 | fi | |
9888 | ||
9889 | cat >>confdefs.h <<_ACEOF | |
9890 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
9891 | _ACEOF | |
9892 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
d0ac1c44 | 9893 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
07697489 PA |
9894 | ac_have_decl=1 |
9895 | else | |
9896 | ac_have_decl=0 | |
9897 | fi | |
9898 | ||
9899 | cat >>confdefs.h <<_ACEOF | |
9900 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
9901 | _ACEOF | |
9902 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
d0ac1c44 | 9903 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
07697489 PA |
9904 | ac_have_decl=1 |
9905 | else | |
9906 | ac_have_decl=0 | |
9907 | fi | |
9908 | ||
9909 | cat >>confdefs.h <<_ACEOF | |
9910 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
9911 | _ACEOF | |
9912 | ||
9913 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
d0ac1c44 | 9914 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
07697489 PA |
9915 | ac_have_decl=1 |
9916 | else | |
9917 | ac_have_decl=0 | |
9918 | fi | |
9919 | ||
9920 | cat >>confdefs.h <<_ACEOF | |
9921 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
9922 | _ACEOF | |
9923 | ||
9924 | ||
9925 | ||
81ecdfbb | 9926 | ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default" |
d0ac1c44 | 9927 | if test "x$ac_cv_have_decl_perror" = xyes; then : |
81ecdfbb RW |
9928 | ac_have_decl=1 |
9929 | else | |
9930 | ac_have_decl=0 | |
f450004a | 9931 | fi |
81ecdfbb RW |
9932 | |
9933 | cat >>confdefs.h <<_ACEOF | |
9934 | #define HAVE_DECL_PERROR $ac_have_decl | |
9935 | _ACEOF | |
bb0116a4 | 9936 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
d0ac1c44 | 9937 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
bb0116a4 JB |
9938 | ac_have_decl=1 |
9939 | else | |
9940 | ac_have_decl=0 | |
9941 | fi | |
9942 | ||
9943 | cat >>confdefs.h <<_ACEOF | |
9944 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
9945 | _ACEOF | |
9946 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 9947 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
bb0116a4 JB |
9948 | ac_have_decl=1 |
9949 | else | |
9950 | ac_have_decl=0 | |
9951 | fi | |
9952 | ||
9953 | cat >>confdefs.h <<_ACEOF | |
9954 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
9955 | _ACEOF | |
81ecdfbb RW |
9956 | |
9957 | ||
3e019bdc SM |
9958 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
9959 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
9960 | # `struct user_regs_struct'. | |
f517c180 EA |
9961 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h> |
9962 | #include <sys/user.h> | |
239b6d10 | 9963 | " |
d0ac1c44 | 9964 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then : |
239b6d10 WT |
9965 | |
9966 | cat >>confdefs.h <<_ACEOF | |
9967 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
9968 | _ACEOF | |
9969 | ||
9970 | ||
9971 | fi | |
f517c180 EA |
9972 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h> |
9973 | #include <sys/user.h> | |
239b6d10 | 9974 | " |
d0ac1c44 | 9975 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then : |
239b6d10 WT |
9976 | |
9977 | cat >>confdefs.h <<_ACEOF | |
9978 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
9979 | _ACEOF | |
9980 | ||
9981 | ||
9982 | fi | |
9983 | ||
9984 | ||
9985 | ||
81ecdfbb RW |
9986 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
9987 | #include <sys/socket.h> | |
9988 | ||
9989 | " | |
d0ac1c44 | 9990 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
f450004a | 9991 | |
ccbd4912 | 9992 | cat >>confdefs.h <<_ACEOF |
f450004a DJ |
9993 | #define HAVE_SOCKLEN_T 1 |
9994 | _ACEOF | |
9995 | ||
f450004a | 9996 | |
ccbd4912 | 9997 | fi |
f450004a | 9998 | |
fb1e4ffc | 9999 | |
64da5dd5 JB |
10000 | case "${target}" in |
10001 | *-android*) | |
10002 | # Starting with NDK version 9, <elf.h> actually includes definitions | |
10003 | # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes | |
10004 | # <sys/exec_elf.h> which defines some of the ELF types incorrectly, | |
10005 | # leading to conflicts with the defintions from <linux/elf.h>. | |
10006 | # This makes it impossible for us to include both <elf.h> and | |
10007 | # <linux/elf.h>, which means that, in practice, we do not have | |
10008 | # access to Elf32_auxv_t and Elf64_auxv_t on this platform. | |
10009 | # Therefore, do not try to auto-detect availability, as it would | |
10010 | # get it wrong on this platform. | |
10011 | ;; | |
10012 | *) | |
10013 | ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> | |
8365dcf5 TJB |
10014 | |
10015 | " | |
d0ac1c44 | 10016 | if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then : |
8365dcf5 TJB |
10017 | |
10018 | cat >>confdefs.h <<_ACEOF | |
10019 | #define HAVE_ELF32_AUXV_T 1 | |
10020 | _ACEOF | |
10021 | ||
10022 | ||
10023 | fi | |
10024 | ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h> | |
10025 | ||
10026 | " | |
d0ac1c44 | 10027 | if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then : |
8365dcf5 TJB |
10028 | |
10029 | cat >>confdefs.h <<_ACEOF | |
10030 | #define HAVE_ELF64_AUXV_T 1 | |
10031 | _ACEOF | |
10032 | ||
10033 | ||
10034 | fi | |
10035 | ||
64da5dd5 | 10036 | esac |
8365dcf5 | 10037 | |
c16158bc JM |
10038 | |
10039 | ||
81ecdfbb RW |
10040 | # Check whether --with-pkgversion was given. |
10041 | if test "${with_pkgversion+set}" = set; then : | |
10042 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 10043 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
10044 | no) PKGVERSION= ;; |
10045 | *) PKGVERSION="($withval) " ;; | |
10046 | esac | |
10047 | else | |
10048 | PKGVERSION="(GDB) " | |
10049 | ||
81ecdfbb RW |
10050 | fi |
10051 | ||
c16158bc JM |
10052 | |
10053 | ||
10054 | ||
10055 | ||
81ecdfbb RW |
10056 | # Check whether --with-bugurl was given. |
10057 | if test "${with_bugurl+set}" = set; then : | |
10058 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 10059 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
10060 | no) BUGURL= |
10061 | ;; | |
10062 | *) BUGURL="$withval" | |
10063 | ;; | |
10064 | esac | |
10065 | else | |
10066 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
10067 | ||
81ecdfbb RW |
10068 | fi |
10069 | ||
c16158bc JM |
10070 | case ${BUGURL} in |
10071 | "") | |
10072 | REPORT_BUGS_TO= | |
10073 | REPORT_BUGS_TEXI= | |
10074 | ;; | |
10075 | *) | |
10076 | REPORT_BUGS_TO="<$BUGURL>" | |
10077 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
10078 | ;; | |
10079 | esac; | |
10080 | ||
10081 | ||
10082 | ||
10083 | ||
10084 | cat >>confdefs.h <<_ACEOF | |
10085 | #define PKGVERSION "$PKGVERSION" | |
10086 | _ACEOF | |
10087 | ||
10088 | ||
10089 | cat >>confdefs.h <<_ACEOF | |
10090 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
10091 | _ACEOF | |
10092 | ||
10093 | ||
8838b45e NS |
10094 | # Check for various supplementary target information (beyond the |
10095 | # triplet) which might affect the choices in configure.srv. | |
10096 | case "${target}" in | |
10097 | i[34567]86-*-linux*) | |
10098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5 | |
10099 | $as_echo_n "checking if building for x86-64... " >&6; } | |
d0ac1c44 | 10100 | if ${gdb_cv_i386_is_x86_64+:} false; then : |
8838b45e NS |
10101 | $as_echo_n "(cached) " >&6 |
10102 | else | |
10103 | save_CPPFLAGS="$CPPFLAGS" | |
10104 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10106 | /* end confdefs.h. */ | |
10107 | ||
10108 | #if __x86_64__ | |
10109 | got it | |
10110 | #endif | |
10111 | ||
10112 | _ACEOF | |
10113 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10114 | $EGREP "got it" >/dev/null 2>&1; then : | |
10115 | gdb_cv_i386_is_x86_64=yes | |
10116 | else | |
10117 | gdb_cv_i386_is_x86_64=no | |
10118 | fi | |
10119 | rm -f conftest* | |
10120 | ||
10121 | CPPFLAGS="$save_CPPFLAGS" | |
10122 | fi | |
10123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5 | |
10124 | $as_echo "$gdb_cv_i386_is_x86_64" >&6; } | |
10125 | ;; | |
201506da PA |
10126 | |
10127 | x86_64-*-linux*) | |
10128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5 | |
10129 | $as_echo_n "checking if building for x32... " >&6; } | |
d0ac1c44 | 10130 | if ${gdb_cv_x86_is_x32+:} false; then : |
201506da PA |
10131 | $as_echo_n "(cached) " >&6 |
10132 | else | |
10133 | save_CPPFLAGS="$CPPFLAGS" | |
10134 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10136 | /* end confdefs.h. */ | |
10137 | ||
10138 | #if __x86_64__ && __ILP32__ | |
10139 | got it | |
10140 | #endif | |
10141 | ||
10142 | _ACEOF | |
10143 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10144 | $EGREP "got it" >/dev/null 2>&1; then : | |
10145 | gdb_cv_x86_is_x32=yes | |
10146 | else | |
10147 | gdb_cv_x86_is_x32=no | |
10148 | fi | |
10149 | rm -f conftest* | |
10150 | ||
10151 | CPPFLAGS="$save_CPPFLAGS" | |
10152 | fi | |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5 | |
10154 | $as_echo "$gdb_cv_x86_is_x32" >&6; } | |
10155 | ;; | |
10156 | ||
9ac544ce MK |
10157 | m68k-*-*) |
10158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5 | |
10159 | $as_echo_n "checking if building for Coldfire... " >&6; } | |
d0ac1c44 | 10160 | if ${gdb_cv_m68k_is_coldfire+:} false; then : |
9ac544ce MK |
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 | #ifdef __mcoldfire__ | |
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_m68k_is_coldfire=yes | |
10176 | else | |
10177 | gdb_cv_m68k_is_coldfire=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_m68k_is_coldfire" >&5 | |
10184 | $as_echo "$gdb_cv_m68k_is_coldfire" >&6; } | |
10185 | ;; | |
8838b45e NS |
10186 | esac |
10187 | ||
7ea81414 | 10188 | . ${srcdir}/configure.srv |
d6e9fb05 | 10189 | |
68070c10 PA |
10190 | if test "${srv_mingwce}" = "yes"; then |
10191 | LIBS="$LIBS -lws2" | |
10192 | elif test "${srv_mingw}" = "yes"; then | |
b2ceabe8 TT |
10193 | # WIN32APILIBS is set by GDB_AC_COMMON. |
10194 | LIBS="$LIBS $WIN32APILIBS" | |
ac8c974e AR |
10195 | elif test "${srv_qnx}" = "yes"; then |
10196 | LIBS="$LIBS -lsocket" | |
8ed54b31 JB |
10197 | elif test "${srv_lynxos}" = "yes"; then |
10198 | LIBS="$LIBS -lnetinet" | |
68070c10 PA |
10199 | fi |
10200 | ||
58caa3dc | 10201 | if test "${srv_linux_usrregs}" = "yes"; then |
f450004a | 10202 | |
81ecdfbb | 10203 | $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h |
58caa3dc DJ |
10204 | |
10205 | fi | |
10206 | ||
10207 | if test "${srv_linux_regsets}" = "yes"; then | |
e9d25b98 | 10208 | |
81ecdfbb | 10209 | $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h |
e9d25b98 DJ |
10210 | |
10211 | ||
81ecdfbb RW |
10212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10213 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
d0ac1c44 | 10214 | if ${gdbsrv_cv_have_ptrace_getregs+:} false; then : |
81ecdfbb | 10215 | $as_echo_n "(cached) " >&6 |
bec39cab | 10216 | else |
81ecdfbb | 10217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10218 | /* end confdefs.h. */ |
58caa3dc | 10219 | #include <sys/ptrace.h> |
bec39cab AC |
10220 | int |
10221 | main () | |
10222 | { | |
58caa3dc | 10223 | PTRACE_GETREGS; |
bec39cab AC |
10224 | ; |
10225 | return 0; | |
10226 | } | |
10227 | _ACEOF | |
81ecdfbb | 10228 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10229 | gdbsrv_cv_have_ptrace_getregs=yes |
10230 | else | |
81ecdfbb | 10231 | gdbsrv_cv_have_ptrace_getregs=no |
58caa3dc | 10232 | fi |
81ecdfbb | 10233 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10234 | fi |
10235 | ||
81ecdfbb RW |
10236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5 |
10237 | $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; } | |
58caa3dc | 10238 | if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then |
f450004a | 10239 | |
81ecdfbb | 10240 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
58caa3dc DJ |
10241 | |
10242 | fi | |
10243 | ||
81ecdfbb RW |
10244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10245 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
d0ac1c44 | 10246 | if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then : |
81ecdfbb | 10247 | $as_echo_n "(cached) " >&6 |
58caa3dc | 10248 | else |
81ecdfbb | 10249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10250 | /* end confdefs.h. */ |
58caa3dc | 10251 | #include <sys/ptrace.h> |
bec39cab AC |
10252 | int |
10253 | main () | |
10254 | { | |
58caa3dc | 10255 | PTRACE_GETFPXREGS; |
bec39cab AC |
10256 | ; |
10257 | return 0; | |
10258 | } | |
10259 | _ACEOF | |
81ecdfbb | 10260 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10261 | gdbsrv_cv_have_ptrace_getfpxregs=yes |
10262 | else | |
81ecdfbb | 10263 | gdbsrv_cv_have_ptrace_getfpxregs=no |
58caa3dc | 10264 | fi |
81ecdfbb | 10265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10266 | fi |
10267 | ||
81ecdfbb RW |
10268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5 |
10269 | $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; } | |
58caa3dc | 10270 | if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then |
f450004a | 10271 | |
81ecdfbb | 10272 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
58caa3dc DJ |
10273 | |
10274 | fi | |
10275 | fi | |
10276 | ||
9accd112 MM |
10277 | if test "${srv_linux_btrace}" = "yes"; then |
10278 | ||
10279 | $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h | |
10280 | ||
10281 | fi | |
10282 | ||
18f5fd81 TJB |
10283 | if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then |
10284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5 | |
10285 | $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10286 | if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then : |
18f5fd81 TJB |
10287 | $as_echo_n "(cached) " >&6 |
10288 | else | |
10289 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10290 | /* end confdefs.h. */ | |
10291 | ||
10292 | #include <thread_db.h> | |
10293 | int | |
10294 | main () | |
10295 | { | |
10296 | lwpid_t avar | |
10297 | ; | |
10298 | return 0; | |
10299 | } | |
10300 | _ACEOF | |
10301 | if ac_fn_c_try_compile "$LINENO"; then : | |
10302 | gdbserver_cv_have_thread_db_type_lwpid_t=yes | |
10303 | else | |
10304 | gdbserver_cv_have_thread_db_type_lwpid_t=no | |
10305 | ||
10306 | fi | |
10307 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10308 | fi | |
10309 | ||
10310 | if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then | |
10311 | ||
10312 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h | |
10313 | ||
10314 | fi | |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5 | |
10316 | $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; } | |
10317 | ||
10318 | fi | |
10319 | ||
10320 | if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then | |
10321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5 | |
10322 | $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10323 | if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then : |
18f5fd81 TJB |
10324 | $as_echo_n "(cached) " >&6 |
10325 | else | |
10326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10327 | /* end confdefs.h. */ | |
10328 | ||
10329 | #include <thread_db.h> | |
10330 | int | |
10331 | main () | |
10332 | { | |
10333 | psaddr_t avar | |
10334 | ; | |
10335 | return 0; | |
10336 | } | |
10337 | _ACEOF | |
10338 | if ac_fn_c_try_compile "$LINENO"; then : | |
10339 | gdbserver_cv_have_thread_db_type_psaddr_t=yes | |
10340 | else | |
10341 | gdbserver_cv_have_thread_db_type_psaddr_t=no | |
10342 | ||
10343 | fi | |
10344 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10345 | fi | |
10346 | ||
10347 | if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then | |
10348 | ||
10349 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h | |
10350 | ||
10351 | fi | |
10352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5 | |
10353 | $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; } | |
10354 | ||
10355 | fi | |
10356 | ||
193f13e6 MK |
10357 | old_LIBS="$LIBS" |
10358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
10359 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
d0ac1c44 | 10360 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
193f13e6 MK |
10361 | $as_echo_n "(cached) " >&6 |
10362 | else | |
10363 | ac_check_lib_save_LIBS=$LIBS | |
10364 | LIBS="-ldl $LIBS" | |
10365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10366 | /* end confdefs.h. */ | |
10367 | ||
10368 | /* Override any GCC internal prototype to avoid an error. | |
10369 | Use char because int might match the return type of a GCC | |
10370 | builtin and then its argument prototype would still apply. */ | |
10371 | #ifdef __cplusplus | |
10372 | extern "C" | |
10373 | #endif | |
10374 | char dlopen (); | |
10375 | int | |
10376 | main () | |
10377 | { | |
10378 | return dlopen (); | |
10379 | ; | |
10380 | return 0; | |
10381 | } | |
10382 | _ACEOF | |
10383 | if ac_fn_c_try_link "$LINENO"; then : | |
10384 | ac_cv_lib_dl_dlopen=yes | |
10385 | else | |
10386 | ac_cv_lib_dl_dlopen=no | |
10387 | fi | |
10388 | rm -f core conftest.err conftest.$ac_objext \ | |
10389 | conftest$ac_exeext conftest.$ac_ext | |
10390 | LIBS=$ac_check_lib_save_LIBS | |
10391 | fi | |
10392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 | |
10393 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
d0ac1c44 | 10394 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
193f13e6 MK |
10395 | cat >>confdefs.h <<_ACEOF |
10396 | #define HAVE_LIBDL 1 | |
10397 | _ACEOF | |
10398 | ||
10399 | LIBS="-ldl $LIBS" | |
10400 | ||
10401 | fi | |
10402 | ||
10403 | LIBS="$old_LIBS" | |
10404 | ||
0d62e5e8 DJ |
10405 | srv_thread_depfiles= |
10406 | srv_libs= | |
0d62e5e8 DJ |
10407 | |
10408 | if test "$srv_linux_thread_db" = "yes"; then | |
193f13e6 MK |
10409 | if test "$ac_cv_lib_dl_dlopen" = "yes"; then |
10410 | srv_libs="-ldl" | |
f6528abd JK |
10411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
10412 | $as_echo_n "checking for the dynamic export flag... " >&6; } | |
193f13e6 | 10413 | old_LDFLAGS="$LDFLAGS" |
f6528abd JK |
10414 | # Older GNU ld supports --export-dynamic but --dynamic-list may not be |
10415 | # supported there. | |
10416 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
10417 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
193f13e6 | 10418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
10419 | /* end confdefs.h. */ |
10420 | ||
10421 | int | |
10422 | main () | |
10423 | { | |
10424 | ||
10425 | ; | |
10426 | return 0; | |
10427 | } | |
10428 | _ACEOF | |
81ecdfbb | 10429 | if ac_fn_c_try_link "$LINENO"; then : |
f6528abd JK |
10430 | found="-Wl,--dynamic-list" |
10431 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6de3c42 | 10432 | else |
f6528abd JK |
10433 | RDYNAMIC="-rdynamic" |
10434 | LDFLAGS="$old_LDFLAGS $RDYNAMIC" | |
10435 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10436 | /* end confdefs.h. */ | |
10437 | ||
10438 | int | |
10439 | main () | |
10440 | { | |
10441 | ||
10442 | ; | |
10443 | return 0; | |
10444 | } | |
10445 | _ACEOF | |
10446 | if ac_fn_c_try_link "$LINENO"; then : | |
10447 | found="-rdynamic" | |
10448 | else | |
10449 | found="no" | |
10450 | RDYNAMIC="" | |
770d76d7 PA |
10451 | fi |
10452 | rm -f core conftest.err conftest.$ac_objext \ | |
10453 | conftest$ac_exeext conftest.$ac_ext | |
10454 | fi | |
10455 | rm -f core conftest.err conftest.$ac_objext \ | |
10456 | conftest$ac_exeext conftest.$ac_ext | |
10457 | ||
10458 | LDFLAGS="$old_LDFLAGS" | |
10459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 | |
10460 | $as_echo "$found" >&6; } | |
10461 | else | |
10462 | srv_libs="-lthread_db" | |
10463 | fi | |
55a8c076 | 10464 | |
770d76d7 | 10465 | srv_thread_depfiles="thread-db.o proc-service.o" |
7d4e5717 PA |
10466 | |
10467 | $as_echo "#define USE_THREAD_DB 1" >>confdefs.h | |
10468 | ||
770d76d7 PA |
10469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5 |
10470 | $as_echo_n "checking for TD_VERSION... " >&6; } | |
d0ac1c44 | 10471 | if ${gdbsrv_cv_have_td_version+:} false; then : |
770d76d7 PA |
10472 | $as_echo_n "(cached) " >&6 |
10473 | else | |
10474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10475 | /* end confdefs.h. */ | |
10476 | #include <thread_db.h> | |
55a8c076 YQ |
10477 | int |
10478 | main () | |
10479 | { | |
770d76d7 | 10480 | TD_VERSION; |
c9a1864a YQ |
10481 | ; |
10482 | return 0; | |
10483 | } | |
10484 | _ACEOF | |
55a8c076 | 10485 | if ac_fn_c_try_compile "$LINENO"; then : |
770d76d7 | 10486 | gdbsrv_cv_have_td_version=yes |
c9a1864a | 10487 | else |
770d76d7 PA |
10488 | gdbsrv_cv_have_td_version=no |
10489 | fi | |
10490 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10491 | fi | |
10492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5 | |
10493 | $as_echo "$gdbsrv_cv_have_td_version" >&6; } | |
0ad6b8ee | 10494 | if test "$gdbsrv_cv_have_td_version" = yes; then |
c9a1864a | 10495 | |
770d76d7 | 10496 | $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h |
55a8c076 | 10497 | |
770d76d7 PA |
10498 | fi |
10499 | fi | |
c9a1864a YQ |
10500 | |
10501 | ||
770d76d7 PA |
10502 | # Check whether --with-libthread-db was given. |
10503 | if test "${with_libthread_db+set}" = set; then : | |
10504 | withval=$with_libthread_db; srv_libthread_db_path="${withval}" | |
10505 | srv_libs="$srv_libthread_db_path" | |
c9a1864a | 10506 | |
770d76d7 | 10507 | fi |
c9a1864a YQ |
10508 | |
10509 | ||
770d76d7 | 10510 | if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then |
c9a1864a | 10511 | |
770d76d7 | 10512 | $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h |
c9a1864a | 10513 | |
55a8c076 | 10514 | fi |
c9a1864a | 10515 | |
770d76d7 PA |
10516 | if test "$srv_xmlfiles" != ""; then |
10517 | srv_xmlbuiltin="xml-builtin.o" | |
c9a1864a | 10518 | |
770d76d7 | 10519 | $as_echo "#define USE_XML 1" >>confdefs.h |
c9a1864a | 10520 | |
c9a1864a | 10521 | |
770d76d7 PA |
10522 | tmp_xmlfiles=$srv_xmlfiles |
10523 | srv_xmlfiles="" | |
10524 | for f in $tmp_xmlfiles; do | |
10525 | srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f" | |
10526 | done | |
c9a1864a YQ |
10527 | fi |
10528 | ||
cd850b40 | 10529 | GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs" |
770d76d7 | 10530 | GDBSERVER_LIBS="$srv_libs" |
c9a1864a | 10531 | |
770d76d7 PA |
10532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5 |
10533 | $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; } | |
d0ac1c44 | 10534 | if ${gdbsrv_cv_have_sync_builtins+:} false; then : |
770d76d7 PA |
10535 | $as_echo_n "(cached) " >&6 |
10536 | else | |
c9a1864a | 10537 | |
770d76d7 PA |
10538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10539 | /* end confdefs.h. */ | |
c9a1864a | 10540 | |
770d76d7 PA |
10541 | int |
10542 | main () | |
10543 | { | |
10544 | int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1); | |
10545 | ; | |
10546 | return 0; | |
10547 | } | |
10548 | _ACEOF | |
10549 | if ac_fn_c_try_link "$LINENO"; then : | |
10550 | gdbsrv_cv_have_sync_builtins=yes | |
10551 | else | |
c971b7fa | 10552 | gdbsrv_cv_have_sync_builtins=no |
c9a1864a | 10553 | fi |
c971b7fa PA |
10554 | rm -f core conftest.err conftest.$ac_objext \ |
10555 | conftest$ac_exeext conftest.$ac_ext | |
c9a1864a | 10556 | fi |
c971b7fa PA |
10557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5 |
10558 | $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; } | |
0ad6b8ee | 10559 | if test "$gdbsrv_cv_have_sync_builtins" = yes; then |
c971b7fa PA |
10560 | |
10561 | $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h | |
10562 | ||
c9a1864a YQ |
10563 | fi |
10564 | ||
c971b7fa PA |
10565 | saved_cflags="$CFLAGS" |
10566 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
10567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568 | /* end confdefs.h. */ | |
c9a1864a | 10569 | |
c971b7fa PA |
10570 | int |
10571 | main () | |
10572 | { | |
c9a1864a | 10573 | |
c971b7fa PA |
10574 | ; |
10575 | return 0; | |
10576 | } | |
c9a1864a | 10577 | _ACEOF |
c971b7fa PA |
10578 | if ac_fn_c_try_compile "$LINENO"; then : |
10579 | gdbsrv_cv_have_visibility_hidden=yes | |
10580 | else | |
10581 | gdbsrv_cv_have_visibility_hidden=no | |
c9a1864a | 10582 | fi |
c971b7fa PA |
10583 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10584 | CFLAGS="$saved_cflags" | |
10585 | ||
c971b7fa PA |
10586 | IPA_DEPFILES="" |
10587 | extra_libraries="" | |
c2a66c29 | 10588 | |
c971b7fa PA |
10589 | # check whether to enable the inprocess agent |
10590 | if test "$ipa_obj" != "" \ | |
10591 | -a "$gdbsrv_cv_have_sync_builtins" = yes \ | |
10592 | -a "$gdbsrv_cv_have_visibility_hidden" = yes; then | |
10593 | have_ipa=true | |
10594 | else | |
10595 | have_ipa=false | |
10596 | fi | |
fa593d66 | 10597 | |
c971b7fa PA |
10598 | # Check whether --enable-inprocess-agent was given. |
10599 | if test "${enable_inprocess_agent+set}" = set; then : | |
10600 | enableval=$enable_inprocess_agent; case "$enableval" in | |
10601 | yes) want_ipa=true ;; | |
10602 | no) want_ipa=false ;; | |
d0ac1c44 | 10603 | *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;; |
c971b7fa PA |
10604 | esac |
10605 | else | |
10606 | want_ipa=$have_ipa | |
10607 | fi | |
c2a66c29 | 10608 | |
c9a1864a | 10609 | |
c971b7fa PA |
10610 | if $want_ipa ; then |
10611 | if $have_ipa ; then | |
10612 | IPA_DEPFILES="$ipa_obj" | |
10613 | extra_libraries="$extra_libraries libinproctrace.so" | |
10614 | else | |
d0ac1c44 | 10615 | as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5 |
c971b7fa PA |
10616 | fi |
10617 | fi | |
c9a1864a | 10618 | |
c9a1864a | 10619 | |
c2a66c29 NS |
10620 | |
10621 | ||
fa593d66 PA |
10622 | |
10623 | ||
10624 | ||
0d62e5e8 | 10625 | |
1a627e7e | 10626 | GNULIB=../gnulib/import |
d6e9fb05 | 10627 | |
c9a1864a YQ |
10628 | GNULIB_STDINT_H= |
10629 | if test x"$STDINT_H" != x; then | |
c971b7fa | 10630 | GNULIB_STDINT_H=$GNULIB/$STDINT_H |
c9a1864a | 10631 | fi |
d6e9fb05 | 10632 | |
fb1e4ffc | 10633 | |
c971b7fa | 10634 | ac_config_files="$ac_config_files Makefile" |
81ecdfbb | 10635 | |
81ecdfbb | 10636 | |
bec39cab | 10637 | cat >confcache <<\_ACEOF |
d6e9fb05 JK |
10638 | # This file is a shell script that caches the results of configure |
10639 | # tests run on this system so they can be shared between configure | |
bec39cab AC |
10640 | # scripts and configure runs, see configure's option --config-cache. |
10641 | # It is not useful on other systems. If it contains results you don't | |
10642 | # want to keep, you may remove or edit it. | |
d6e9fb05 | 10643 | # |
bec39cab AC |
10644 | # config.status only pays attention to the cache file if you give it |
10645 | # the --recheck option to rerun configure. | |
d6e9fb05 | 10646 | # |
bec39cab AC |
10647 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
10648 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
10649 | # following values. | |
10650 | ||
10651 | _ACEOF | |
10652 | ||
d6e9fb05 JK |
10653 | # The following way of writing the cache mishandles newlines in values, |
10654 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 10655 | # So, we kill variables containing newlines. |
d6e9fb05 JK |
10656 | # Ultrix sh set writes to stderr and can't be redirected directly, |
10657 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
10658 | ( |
10659 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
10660 | eval ac_val=\$$ac_var | |
10661 | case $ac_val in #( | |
10662 | *${as_nl}*) | |
10663 | case $ac_var in #( | |
10664 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
10665 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
10666 | esac | |
10667 | case $ac_var in #( | |
10668 | _ | IFS | as_nl) ;; #( | |
10669 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
10670 | *) { eval $ac_var=; unset $ac_var;} ;; | |
10671 | esac ;; | |
10672 | esac | |
10673 | done | |
10674 | ||
bec39cab | 10675 | (set) 2>&1 | |
81ecdfbb RW |
10676 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
10677 | *${as_nl}ac_space=\ *) | |
10678 | # `set' does not quote correctly, so add quotes: double-quote | |
10679 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
10680 | sed -n \ |
10681 | "s/'/'\\\\''/g; | |
10682 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 10683 | ;; #( |
bec39cab AC |
10684 | *) |
10685 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 10686 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 10687 | ;; |
81ecdfbb RW |
10688 | esac | |
10689 | sort | |
10690 | ) | | |
bec39cab | 10691 | sed ' |
81ecdfbb | 10692 | /^ac_cv_env_/b end |
bec39cab | 10693 | t clear |
81ecdfbb | 10694 | :clear |
bec39cab AC |
10695 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
10696 | t end | |
81ecdfbb RW |
10697 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
10698 | :end' >>confcache | |
10699 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
10700 | if test -w "$cache_file"; then | |
d0ac1c44 | 10701 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
10702 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
10703 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
10704 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
10705 | cat confcache >"$cache_file" | |
10706 | else | |
10707 | case $cache_file in #( | |
10708 | */* | ?:*) | |
10709 | mv -f confcache "$cache_file"$$ && | |
10710 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
10711 | *) | |
10712 | mv -f confcache "$cache_file" ;; | |
10713 | esac | |
10714 | fi | |
10715 | fi | |
d6e9fb05 | 10716 | else |
81ecdfbb RW |
10717 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
10718 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
d6e9fb05 JK |
10719 | fi |
10720 | fi | |
10721 | rm -f confcache | |
10722 | ||
d6e9fb05 JK |
10723 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
10724 | # Let make expand exec_prefix. | |
10725 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10726 | ||
84563040 | 10727 | DEFS=-DHAVE_CONFIG_H |
d6e9fb05 | 10728 | |
bec39cab AC |
10729 | ac_libobjs= |
10730 | ac_ltlibobjs= | |
d0ac1c44 | 10731 | U= |
bec39cab AC |
10732 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
10733 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
10734 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
10735 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
10736 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
10737 | # will be set to the directory where LIBOBJS objects are built. | |
10738 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
10739 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
10740 | done |
10741 | LIBOBJS=$ac_libobjs | |
d6e9fb05 | 10742 | |
bec39cab AC |
10743 | LTLIBOBJS=$ac_ltlibobjs |
10744 | ||
10745 | ||
c9a1864a | 10746 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 10747 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c9a1864a YQ |
10748 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
10749 | fi | |
bec39cab | 10750 | |
d0ac1c44 | 10751 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 10752 | ac_write_fail=0 |
bec39cab AC |
10753 | ac_clean_files_save=$ac_clean_files |
10754 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
10755 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
10756 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
10757 | as_write_fail=0 | |
10758 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
10759 | #! $SHELL |
10760 | # Generated by $as_me. | |
d6e9fb05 | 10761 | # Run this file to recreate the current configuration. |
d6e9fb05 | 10762 | # Compiler output produced by configure, useful for debugging |
bec39cab AC |
10763 | # configure, is in config.log if it exists. |
10764 | ||
10765 | debug=false | |
10766 | ac_cs_recheck=false | |
10767 | ac_cs_silent=false | |
bec39cab | 10768 | |
81ecdfbb RW |
10769 | SHELL=\${CONFIG_SHELL-$SHELL} |
10770 | export SHELL | |
10771 | _ASEOF | |
10772 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
10773 | ## -------------------- ## | |
10774 | ## M4sh Initialization. ## | |
10775 | ## -------------------- ## | |
10776 | ||
10777 | # Be more Bourne compatible | |
10778 | DUALCASE=1; export DUALCASE # for MKS sh | |
10779 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
10780 | emulate sh |
10781 | NULLCMD=: | |
81ecdfbb | 10782 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
10783 | # is contrary to our usage. Disable this feature. |
10784 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
10785 | setopt NO_GLOB_SUBST |
10786 | else | |
10787 | case `(set -o) 2>/dev/null` in #( | |
10788 | *posix*) : | |
10789 | set -o posix ;; #( | |
10790 | *) : | |
10791 | ;; | |
10792 | esac | |
bec39cab | 10793 | fi |
d6e9fb05 | 10794 | |
81ecdfbb RW |
10795 | |
10796 | as_nl=' | |
10797 | ' | |
10798 | export as_nl | |
10799 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
10800 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
10801 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
10802 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
10803 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
10804 | # but without wasting forks for bash or zsh. | |
10805 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
10806 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10807 | as_echo='print -r --' | |
10808 | as_echo_n='print -rn --' | |
10809 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
10810 | as_echo='printf %s\n' | |
10811 | as_echo_n='printf %s' | |
bec39cab | 10812 | else |
81ecdfbb RW |
10813 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
10814 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
10815 | as_echo_n='/usr/ucb/echo -n' | |
10816 | else | |
10817 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
10818 | as_echo_n_body='eval | |
10819 | arg=$1; | |
10820 | case $arg in #( | |
10821 | *"$as_nl"*) | |
10822 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
10823 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
10824 | esac; | |
10825 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
10826 | ' | |
10827 | export as_echo_n_body | |
10828 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
10829 | fi | |
10830 | export as_echo_body | |
10831 | as_echo='sh -c $as_echo_body as_echo' | |
10832 | fi | |
10833 | ||
10834 | # The user is always right. | |
10835 | if test "${PATH_SEPARATOR+set}" != set; then | |
10836 | PATH_SEPARATOR=: | |
10837 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
10838 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
10839 | PATH_SEPARATOR=';' | |
10840 | } | |
bec39cab AC |
10841 | fi |
10842 | ||
10843 | ||
81ecdfbb RW |
10844 | # IFS |
10845 | # We need space, tab and new line, in precisely that order. Quoting is | |
10846 | # there to prevent editors from complaining about space-tab. | |
10847 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
10848 | # splitting by setting IFS to empty value.) | |
10849 | IFS=" "" $as_nl" | |
10850 | ||
10851 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 10852 | as_myself= |
81ecdfbb RW |
10853 | case $0 in #(( |
10854 | *[\\/]* ) as_myself=$0 ;; | |
10855 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10856 | for as_dir in $PATH | |
10857 | do | |
10858 | IFS=$as_save_IFS | |
10859 | test -z "$as_dir" && as_dir=. | |
10860 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
10861 | done | |
10862 | IFS=$as_save_IFS | |
10863 | ||
10864 | ;; | |
10865 | esac | |
10866 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
10867 | # in which case we are not to be found in the path. | |
10868 | if test "x$as_myself" = x; then | |
10869 | as_myself=$0 | |
10870 | fi | |
10871 | if test ! -f "$as_myself"; then | |
10872 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
10873 | exit 1 | |
10874 | fi | |
10875 | ||
10876 | # Unset variables that we do not need and which cause bugs (e.g. in | |
10877 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
10878 | # suppresses any "Segmentation fault" message there. '((' could | |
10879 | # trigger a bug in pdksh 5.2.14. | |
10880 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
10881 | do eval test x\${$as_var+set} = xset \ | |
10882 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
10883 | done | |
bec39cab AC |
10884 | PS1='$ ' |
10885 | PS2='> ' | |
10886 | PS4='+ ' | |
10887 | ||
10888 | # NLS nuisances. | |
81ecdfbb RW |
10889 | LC_ALL=C |
10890 | export LC_ALL | |
10891 | LANGUAGE=C | |
10892 | export LANGUAGE | |
10893 | ||
10894 | # CDPATH. | |
10895 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
10896 | ||
10897 | ||
d0ac1c44 SM |
10898 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
10899 | # ---------------------------------------- | |
81ecdfbb RW |
10900 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
10901 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 10902 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
10903 | as_fn_error () |
10904 | { | |
d0ac1c44 SM |
10905 | as_status=$1; test $as_status -eq 0 && as_status=1 |
10906 | if test "$4"; then | |
10907 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
10908 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
bec39cab | 10909 | fi |
d0ac1c44 | 10910 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
10911 | as_fn_exit $as_status |
10912 | } # as_fn_error | |
10913 | ||
10914 | ||
10915 | # as_fn_set_status STATUS | |
10916 | # ----------------------- | |
10917 | # Set $? to STATUS, without forking. | |
10918 | as_fn_set_status () | |
10919 | { | |
10920 | return $1 | |
10921 | } # as_fn_set_status | |
10922 | ||
10923 | # as_fn_exit STATUS | |
10924 | # ----------------- | |
10925 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
10926 | as_fn_exit () | |
10927 | { | |
10928 | set +e | |
10929 | as_fn_set_status $1 | |
10930 | exit $1 | |
10931 | } # as_fn_exit | |
10932 | ||
10933 | # as_fn_unset VAR | |
10934 | # --------------- | |
10935 | # Portably unset VAR. | |
10936 | as_fn_unset () | |
10937 | { | |
10938 | { eval $1=; unset $1;} | |
10939 | } | |
10940 | as_unset=as_fn_unset | |
10941 | # as_fn_append VAR VALUE | |
10942 | # ---------------------- | |
10943 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
10944 | # advantage of any shell optimizations that allow amortized linear growth over | |
10945 | # repeated appends, instead of the typical quadratic growth present in naive | |
10946 | # implementations. | |
10947 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
10948 | eval 'as_fn_append () | |
10949 | { | |
10950 | eval $1+=\$2 | |
10951 | }' | |
10952 | else | |
10953 | as_fn_append () | |
10954 | { | |
10955 | eval $1=\$$1\$2 | |
10956 | } | |
10957 | fi # as_fn_append | |
10958 | ||
10959 | # as_fn_arith ARG... | |
10960 | # ------------------ | |
10961 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
10962 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
10963 | # must be portable across $(()) and expr. | |
10964 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
10965 | eval 'as_fn_arith () | |
10966 | { | |
10967 | as_val=$(( $* )) | |
10968 | }' | |
10969 | else | |
10970 | as_fn_arith () | |
10971 | { | |
10972 | as_val=`expr "$@" || test $? -eq 1` | |
10973 | } | |
10974 | fi # as_fn_arith | |
10975 | ||
d6e9fb05 | 10976 | |
81ecdfbb RW |
10977 | if expr a : '\(a\)' >/dev/null 2>&1 && |
10978 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
10979 | as_expr=expr |
10980 | else | |
10981 | as_expr=false | |
10982 | fi | |
d6e9fb05 | 10983 | |
81ecdfbb | 10984 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
10985 | as_basename=basename |
10986 | else | |
10987 | as_basename=false | |
10988 | fi | |
d6e9fb05 | 10989 | |
81ecdfbb RW |
10990 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
10991 | as_dirname=dirname | |
10992 | else | |
10993 | as_dirname=false | |
10994 | fi | |
d6e9fb05 | 10995 | |
81ecdfbb | 10996 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
10997 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
10998 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
10999 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
11000 | $as_echo X/"$0" | | |
11001 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
11002 | s//\1/ | |
11003 | q | |
11004 | } | |
11005 | /^X\/\(\/\/\)$/{ | |
11006 | s//\1/ | |
11007 | q | |
11008 | } | |
11009 | /^X\/\(\/\).*/{ | |
11010 | s//\1/ | |
11011 | q | |
11012 | } | |
11013 | s/.*/./; q'` | |
bec39cab | 11014 | |
dae5f5cf DJ |
11015 | # Avoid depending upon Character Ranges. |
11016 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
11017 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
11018 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
11019 | as_cr_digits='0123456789' | |
11020 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
11021 | ||
81ecdfbb RW |
11022 | ECHO_C= ECHO_N= ECHO_T= |
11023 | case `echo -n x` in #((((( | |
11024 | -n*) | |
11025 | case `echo 'xy\c'` in | |
11026 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
11027 | xy) ECHO_C='\c';; | |
11028 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
11029 | ECHO_T=' ';; | |
11030 | esac;; | |
11031 | *) | |
11032 | ECHO_N='-n';; | |
bec39cab AC |
11033 | esac |
11034 | ||
81ecdfbb RW |
11035 | rm -f conf$$ conf$$.exe conf$$.file |
11036 | if test -d conf$$.dir; then | |
11037 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 11038 | else |
81ecdfbb RW |
11039 | rm -f conf$$.dir |
11040 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 11041 | fi |
81ecdfbb RW |
11042 | if (echo >conf$$.file) 2>/dev/null; then |
11043 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
dae5f5cf | 11044 | as_ln_s='ln -s' |
81ecdfbb RW |
11045 | # ... but there are two gotchas: |
11046 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
11047 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 11048 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 11049 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 11050 | as_ln_s='cp -pR' |
81ecdfbb RW |
11051 | elif ln conf$$.file conf$$ 2>/dev/null; then |
11052 | as_ln_s=ln | |
11053 | else | |
d0ac1c44 | 11054 | as_ln_s='cp -pR' |
dae5f5cf | 11055 | fi |
bec39cab | 11056 | else |
d0ac1c44 | 11057 | as_ln_s='cp -pR' |
bec39cab | 11058 | fi |
81ecdfbb RW |
11059 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
11060 | rmdir conf$$.dir 2>/dev/null | |
11061 | ||
11062 | ||
11063 | # as_fn_mkdir_p | |
11064 | # ------------- | |
11065 | # Create "$as_dir" as a directory, including parents if necessary. | |
11066 | as_fn_mkdir_p () | |
11067 | { | |
11068 | ||
11069 | case $as_dir in #( | |
11070 | -*) as_dir=./$as_dir;; | |
11071 | esac | |
11072 | test -d "$as_dir" || eval $as_mkdir_p || { | |
11073 | as_dirs= | |
11074 | while :; do | |
11075 | case $as_dir in #( | |
11076 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
11077 | *) as_qdir=$as_dir;; | |
11078 | esac | |
11079 | as_dirs="'$as_qdir' $as_dirs" | |
11080 | as_dir=`$as_dirname -- "$as_dir" || | |
11081 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11082 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
11083 | X"$as_dir" : 'X\(//\)$' \| \ | |
11084 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
11085 | $as_echo X"$as_dir" | | |
11086 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11087 | s//\1/ | |
11088 | q | |
11089 | } | |
11090 | /^X\(\/\/\)[^/].*/{ | |
11091 | s//\1/ | |
11092 | q | |
11093 | } | |
11094 | /^X\(\/\/\)$/{ | |
11095 | s//\1/ | |
11096 | q | |
11097 | } | |
11098 | /^X\(\/\).*/{ | |
11099 | s//\1/ | |
11100 | q | |
11101 | } | |
11102 | s/.*/./; q'` | |
11103 | test -d "$as_dir" && break | |
11104 | done | |
11105 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 11106 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
bec39cab | 11107 | |
81ecdfbb RW |
11108 | |
11109 | } # as_fn_mkdir_p | |
bec39cab | 11110 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 11111 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
11112 | else |
11113 | test -d ./-p && rmdir ./-p | |
11114 | as_mkdir_p=false | |
11115 | fi | |
11116 | ||
d0ac1c44 SM |
11117 | |
11118 | # as_fn_executable_p FILE | |
11119 | # ----------------------- | |
11120 | # Test if FILE is an executable regular file. | |
11121 | as_fn_executable_p () | |
11122 | { | |
11123 | test -f "$1" && test -x "$1" | |
11124 | } # as_fn_executable_p | |
11125 | as_test_x='test -x' | |
11126 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
11127 | |
11128 | # Sed expression to map a string onto a valid CPP name. | |
11129 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
11130 | ||
11131 | # Sed expression to map a string onto a valid variable name. | |
11132 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
11133 | ||
11134 | ||
bec39cab | 11135 | exec 6>&1 |
81ecdfbb RW |
11136 | ## ----------------------------------- ## |
11137 | ## Main body of $CONFIG_STATUS script. ## | |
11138 | ## ----------------------------------- ## | |
11139 | _ASEOF | |
11140 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
11141 | ||
11142 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11143 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 11144 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
11145 | # values after options handling. |
11146 | ac_log=" | |
bec39cab | 11147 | This file was extended by $as_me, which was |
d0ac1c44 | 11148 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
11149 | |
11150 | CONFIG_FILES = $CONFIG_FILES | |
11151 | CONFIG_HEADERS = $CONFIG_HEADERS | |
11152 | CONFIG_LINKS = $CONFIG_LINKS | |
11153 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
11154 | $ $0 $@ | |
11155 | ||
81ecdfbb RW |
11156 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
11157 | " | |
11158 | ||
bec39cab AC |
11159 | _ACEOF |
11160 | ||
81ecdfbb RW |
11161 | case $ac_config_files in *" |
11162 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
11163 | esac | |
bec39cab | 11164 | |
81ecdfbb RW |
11165 | case $ac_config_headers in *" |
11166 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
11167 | esac | |
dae5f5cf | 11168 | |
dae5f5cf | 11169 | |
81ecdfbb RW |
11170 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
11171 | # Files that config.status was made for. | |
11172 | config_files="$ac_config_files" | |
11173 | config_headers="$ac_config_headers" | |
11174 | config_commands="$ac_config_commands" | |
bec39cab | 11175 | |
81ecdfbb | 11176 | _ACEOF |
dae5f5cf | 11177 | |
81ecdfbb | 11178 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 11179 | ac_cs_usage="\ |
81ecdfbb RW |
11180 | \`$as_me' instantiates files and other configuration actions |
11181 | from templates according to the current configuration. Unless the files | |
11182 | and actions are specified as TAGs, all are instantiated by default. | |
bec39cab | 11183 | |
81ecdfbb | 11184 | Usage: $0 [OPTION]... [TAG]... |
bec39cab AC |
11185 | |
11186 | -h, --help print this help, then exit | |
81ecdfbb | 11187 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 11188 | --config print configuration, then exit |
81ecdfbb RW |
11189 | -q, --quiet, --silent |
11190 | do not print progress messages | |
bec39cab AC |
11191 | -d, --debug don't remove temporary files |
11192 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
11193 | --file=FILE[:TEMPLATE] |
11194 | instantiate the configuration file FILE | |
11195 | --header=FILE[:TEMPLATE] | |
11196 | instantiate the configuration header FILE | |
bec39cab AC |
11197 | |
11198 | Configuration files: | |
11199 | $config_files | |
11200 | ||
11201 | Configuration headers: | |
11202 | $config_headers | |
11203 | ||
11204 | Configuration commands: | |
11205 | $config_commands | |
11206 | ||
81ecdfbb | 11207 | Report bugs to the package provider." |
dae5f5cf | 11208 | |
81ecdfbb RW |
11209 | _ACEOF |
11210 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11211 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
11212 | ac_cs_version="\\ |
11213 | config.status | |
d0ac1c44 SM |
11214 | configured by $0, generated by GNU Autoconf 2.69, |
11215 | with options \\"\$ac_cs_config\\" | |
bec39cab | 11216 | |
d0ac1c44 | 11217 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
11218 | This config.status script is free software; the Free Software Foundation |
11219 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
11220 | |
11221 | ac_pwd='$ac_pwd' | |
11222 | srcdir='$srcdir' | |
11223 | INSTALL='$INSTALL' | |
11224 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
11225 | _ACEOF |
11226 | ||
81ecdfbb RW |
11227 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11228 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
11229 | ac_need_defaults=: |
11230 | while test $# != 0 | |
11231 | do | |
11232 | case $1 in | |
d0ac1c44 | 11233 | --*=?*) |
81ecdfbb RW |
11234 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
11235 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab AC |
11236 | ac_shift=: |
11237 | ;; | |
d0ac1c44 SM |
11238 | --*=) |
11239 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
11240 | ac_optarg= | |
11241 | ac_shift=: | |
11242 | ;; | |
81ecdfbb | 11243 | *) |
bec39cab AC |
11244 | ac_option=$1 |
11245 | ac_optarg=$2 | |
11246 | ac_shift=shift | |
11247 | ;; | |
bec39cab AC |
11248 | esac |
11249 | ||
11250 | case $ac_option in | |
11251 | # Handling of the options. | |
bec39cab AC |
11252 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
11253 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
11254 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
11255 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
11256 | --config | --confi | --conf | --con | --co | --c ) |
11257 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 11258 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
11259 | debug=: ;; |
11260 | --file | --fil | --fi | --f ) | |
11261 | $ac_shift | |
81ecdfbb RW |
11262 | case $ac_optarg in |
11263 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 11264 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
11265 | esac |
11266 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
11267 | ac_need_defaults=false;; |
11268 | --header | --heade | --head | --hea ) | |
11269 | $ac_shift | |
81ecdfbb RW |
11270 | case $ac_optarg in |
11271 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
11272 | esac | |
11273 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 11274 | ac_need_defaults=false;; |
81ecdfbb RW |
11275 | --he | --h) |
11276 | # Conflict between --help and --header | |
d0ac1c44 | 11277 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
11278 | Try \`$0 --help' for more information.";; |
11279 | --help | --hel | -h ) | |
11280 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
11281 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
11282 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
11283 | ac_cs_silent=: ;; | |
11284 | ||
11285 | # This is an error. | |
d0ac1c44 | 11286 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 11287 | Try \`$0 --help' for more information." ;; |
bec39cab | 11288 | |
81ecdfbb RW |
11289 | *) as_fn_append ac_config_targets " $1" |
11290 | ac_need_defaults=false ;; | |
bec39cab AC |
11291 | |
11292 | esac | |
11293 | shift | |
d6e9fb05 | 11294 | done |
bec39cab AC |
11295 | |
11296 | ac_configure_extra_args= | |
11297 | ||
11298 | if $ac_cs_silent; then | |
11299 | exec 6>/dev/null | |
11300 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
d6e9fb05 | 11301 | fi |
d6e9fb05 | 11302 | |
bec39cab | 11303 | _ACEOF |
81ecdfbb | 11304 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 11305 | if \$ac_cs_recheck; then |
d0ac1c44 | 11306 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
11307 | shift |
11308 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
11309 | CONFIG_SHELL='$SHELL' | |
11310 | export CONFIG_SHELL | |
11311 | exec "\$@" | |
bec39cab | 11312 | fi |
d6e9fb05 | 11313 | |
bec39cab | 11314 | _ACEOF |
81ecdfbb RW |
11315 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11316 | exec 5>>config.log | |
11317 | { | |
11318 | echo | |
11319 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
11320 | ## Running $as_me. ## | |
11321 | _ASBOX | |
11322 | $as_echo "$ac_log" | |
11323 | } >&5 | |
bec39cab | 11324 | |
81ecdfbb RW |
11325 | _ACEOF |
11326 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
61c125b9 TT |
11327 | # |
11328 | # INIT-COMMANDS | |
11329 | # | |
11330 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR | |
60d6cfc9 | 11331 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR" |
61c125b9 | 11332 | |
81ecdfbb | 11333 | _ACEOF |
bec39cab | 11334 | |
81ecdfbb | 11335 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b80864fb | 11336 | |
81ecdfbb | 11337 | # Handling of arguments. |
bec39cab AC |
11338 | for ac_config_target in $ac_config_targets |
11339 | do | |
81ecdfbb RW |
11340 | case $ac_config_target in |
11341 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
61c125b9 | 11342 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
60d6cfc9 | 11343 | "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;; |
81ecdfbb | 11344 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
81ecdfbb | 11345 | |
d0ac1c44 | 11346 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
d6e9fb05 | 11347 | esac |
bec39cab AC |
11348 | done |
11349 | ||
81ecdfbb | 11350 | |
bec39cab AC |
11351 | # If the user did not use the arguments to specify the items to instantiate, |
11352 | # then the envvar interface is used. Set only those that are not. | |
11353 | # We use the long form for the default assignment because of an extremely | |
11354 | # bizarre bug on SunOS 4.1.3. | |
11355 | if $ac_need_defaults; then | |
11356 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
11357 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
11358 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
11359 | fi | |
d6e9fb05 | 11360 | |
bec39cab | 11361 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 11362 | # simply because there is no reason against having it here, and in addition, |
bec39cab | 11363 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
11364 | # Hook for its removal unless debugging. |
11365 | # Note that there is a small window in which the directory will not be cleaned: | |
11366 | # after its creation but before its name has been assigned to `$tmp'. | |
bec39cab AC |
11367 | $debug || |
11368 | { | |
d0ac1c44 | 11369 | tmp= ac_tmp= |
81ecdfbb | 11370 | trap 'exit_status=$? |
d0ac1c44 SM |
11371 | : "${ac_tmp:=$tmp}" |
11372 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
11373 | ' 0 |
11374 | trap 'as_fn_exit 1' 1 2 13 15 | |
bec39cab | 11375 | } |
bec39cab AC |
11376 | # Create a (secure) tmp directory for tmp files. |
11377 | ||
11378 | { | |
81ecdfbb | 11379 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
d0ac1c44 | 11380 | test -d "$tmp" |
bec39cab AC |
11381 | } || |
11382 | { | |
81ecdfbb RW |
11383 | tmp=./conf$$-$RANDOM |
11384 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
11385 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
11386 | ac_tmp=$tmp | |
81ecdfbb RW |
11387 | |
11388 | # Set up the scripts for CONFIG_FILES section. | |
11389 | # No need to generate them if there are no CONFIG_FILES. | |
11390 | # This happens for instance with `./config.status config.h'. | |
11391 | if test -n "$CONFIG_FILES"; then | |
11392 | ||
11393 | ||
11394 | ac_cr=`echo X | tr X '\015'` | |
11395 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
11396 | # But we know of no other shell where ac_cr would be empty at this | |
11397 | # point, so we can use a bashism as a fallback. | |
11398 | if test "x$ac_cr" = x; then | |
11399 | eval ac_cr=\$\'\\r\' | |
11400 | fi | |
11401 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
11402 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 11403 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
11404 | else |
11405 | ac_cs_awk_cr=$ac_cr | |
11406 | fi | |
11407 | ||
d0ac1c44 | 11408 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
11409 | _ACEOF |
11410 | ||
11411 | ||
11412 | { | |
11413 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
11414 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
11415 | echo "_ACEOF" | |
11416 | } >conf$$subs.sh || | |
d0ac1c44 SM |
11417 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
11418 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
11419 | ac_delim='%!_!# ' |
11420 | for ac_last_try in false false false false false :; do | |
11421 | . ./conf$$subs.sh || | |
d0ac1c44 | 11422 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11423 | |
11424 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
11425 | if test $ac_delim_n = $ac_delim_num; then | |
11426 | break | |
11427 | elif $ac_last_try; then | |
d0ac1c44 | 11428 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11429 | else |
11430 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
11431 | fi | |
11432 | done | |
11433 | rm -f conf$$subs.sh | |
11434 | ||
11435 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11436 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
11437 | _ACEOF |
11438 | sed -n ' | |
11439 | h | |
11440 | s/^/S["/; s/!.*/"]=/ | |
11441 | p | |
11442 | g | |
11443 | s/^[^!]*!// | |
11444 | :repl | |
11445 | t repl | |
11446 | s/'"$ac_delim"'$// | |
11447 | t delim | |
11448 | :nl | |
11449 | h | |
d0ac1c44 | 11450 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11451 | t more1 |
11452 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
11453 | p | |
11454 | n | |
11455 | b repl | |
11456 | :more1 | |
11457 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11458 | p | |
11459 | g | |
11460 | s/.\{148\}// | |
11461 | t nl | |
11462 | :delim | |
11463 | h | |
d0ac1c44 | 11464 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11465 | t more2 |
11466 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
11467 | p | |
11468 | b | |
11469 | :more2 | |
11470 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11471 | p | |
11472 | g | |
11473 | s/.\{148\}// | |
11474 | t delim | |
11475 | ' <conf$$subs.awk | sed ' | |
11476 | /^[^""]/{ | |
11477 | N | |
11478 | s/\n// | |
11479 | } | |
11480 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
11481 | rm -f conf$$subs.awk | |
11482 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11483 | _ACAWK | |
d0ac1c44 | 11484 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
11485 | for (key in S) S_is_set[key] = 1 |
11486 | FS = "\a" | |
11487 | ||
11488 | } | |
bec39cab | 11489 | { |
81ecdfbb RW |
11490 | line = $ 0 |
11491 | nfields = split(line, field, "@") | |
11492 | substed = 0 | |
11493 | len = length(field[1]) | |
11494 | for (i = 2; i < nfields; i++) { | |
11495 | key = field[i] | |
11496 | keylen = length(key) | |
11497 | if (S_is_set[key]) { | |
11498 | value = S[key] | |
11499 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
11500 | len += length(value) + length(field[++i]) | |
11501 | substed = 1 | |
11502 | } else | |
11503 | len += 1 + keylen | |
11504 | } | |
11505 | ||
11506 | print line | |
bec39cab AC |
11507 | } |
11508 | ||
81ecdfbb RW |
11509 | _ACAWK |
11510 | _ACEOF | |
11511 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11512 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
11513 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
11514 | else | |
11515 | cat | |
d0ac1c44 SM |
11516 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
11517 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
dae5f5cf DJ |
11518 | _ACEOF |
11519 | ||
d0ac1c44 SM |
11520 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
11521 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
11522 | # trailing colons and then remove the whole line if VPATH becomes empty |
11523 | # (actually we leave an empty line to preserve line numbers). | |
11524 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
11525 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
11526 | h | |
11527 | s/// | |
11528 | s/^/:/ | |
11529 | s/[ ]*$/:/ | |
11530 | s/:\$(srcdir):/:/g | |
11531 | s/:\${srcdir}:/:/g | |
11532 | s/:@srcdir@:/:/g | |
11533 | s/^:*// | |
81ecdfbb | 11534 | s/:*$// |
d0ac1c44 SM |
11535 | x |
11536 | s/\(=[ ]*\).*/\1/ | |
11537 | G | |
11538 | s/\n// | |
81ecdfbb RW |
11539 | s/^[^=]*=[ ]*$// |
11540 | }' | |
11541 | fi | |
bec39cab | 11542 | |
81ecdfbb RW |
11543 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11544 | fi # test -n "$CONFIG_FILES" | |
bec39cab | 11545 | |
81ecdfbb RW |
11546 | # Set up the scripts for CONFIG_HEADERS section. |
11547 | # No need to generate them if there are no CONFIG_HEADERS. | |
11548 | # This happens for instance with `./config.status Makefile'. | |
11549 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 11550 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb | 11551 | BEGIN { |
b80864fb DJ |
11552 | _ACEOF |
11553 | ||
81ecdfbb RW |
11554 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
11555 | # here-document in config.status, that substitutes the proper values into | |
11556 | # config.h.in to produce config.h. | |
11557 | ||
11558 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
11559 | # handling of long lines. | |
11560 | ac_delim='%!_!# ' | |
11561 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
11562 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
11563 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
11564 | break |
11565 | elif $ac_last_try; then | |
d0ac1c44 | 11566 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
11567 | else |
11568 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
d6e9fb05 | 11569 | fi |
81ecdfbb | 11570 | done |
d6e9fb05 | 11571 | |
81ecdfbb RW |
11572 | # For the awk script, D is an array of macro values keyed by name, |
11573 | # likewise P contains macro parameters if any. Preserve backslash | |
11574 | # newline sequences. | |
11575 | ||
11576 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
11577 | sed -n ' | |
11578 | s/.\{148\}/&'"$ac_delim"'/g | |
11579 | t rset | |
11580 | :rset | |
11581 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
11582 | t def | |
11583 | d | |
11584 | :def | |
11585 | s/\\$// | |
11586 | t bsnl | |
11587 | s/["\\]/\\&/g | |
11588 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11589 | D["\1"]=" \3"/p | |
11590 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
11591 | d | |
11592 | :bsnl | |
11593 | s/["\\]/\\&/g | |
11594 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11595 | D["\1"]=" \3\\\\\\n"\\/p | |
11596 | t cont | |
11597 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
11598 | t cont | |
11599 | d | |
11600 | :cont | |
11601 | n | |
11602 | s/.\{148\}/&'"$ac_delim"'/g | |
11603 | t clear | |
11604 | :clear | |
11605 | s/\\$// | |
11606 | t bsnlc | |
11607 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
11608 | d | |
11609 | :bsnlc | |
11610 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
11611 | b cont | |
11612 | ' <confdefs.h | sed ' | |
11613 | s/'"$ac_delim"'/"\\\ | |
11614 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
11615 | ||
11616 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11617 | for (key in D) D_is_set[key] = 1 | |
11618 | FS = "\a" | |
11619 | } | |
11620 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
11621 | line = \$ 0 | |
11622 | split(line, arg, " ") | |
11623 | if (arg[1] == "#") { | |
11624 | defundef = arg[2] | |
11625 | mac1 = arg[3] | |
11626 | } else { | |
11627 | defundef = substr(arg[1], 2) | |
11628 | mac1 = arg[2] | |
11629 | } | |
11630 | split(mac1, mac2, "(") #) | |
11631 | macro = mac2[1] | |
11632 | prefix = substr(line, 1, index(line, defundef) - 1) | |
11633 | if (D_is_set[macro]) { | |
11634 | # Preserve the white space surrounding the "#". | |
11635 | print prefix "define", macro P[macro] D[macro] | |
11636 | next | |
11637 | } else { | |
11638 | # Replace #undef with comments. This is necessary, for example, | |
11639 | # in the case of _POSIX_SOURCE, which is predefined and required | |
11640 | # on some systems where configure will not decide to define it. | |
11641 | if (defundef == "undef") { | |
11642 | print "/*", prefix defundef, macro, "*/" | |
11643 | next | |
11644 | } | |
11645 | } | |
11646 | } | |
11647 | { print } | |
11648 | _ACAWK | |
bec39cab | 11649 | _ACEOF |
81ecdfbb | 11650 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 11651 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb RW |
11652 | fi # test -n "$CONFIG_HEADERS" |
11653 | ||
11654 | ||
11655 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
11656 | shift | |
11657 | for ac_tag | |
11658 | do | |
11659 | case $ac_tag in | |
11660 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
11661 | esac | |
11662 | case $ac_mode$ac_tag in | |
11663 | :[FHL]*:*);; | |
d0ac1c44 | 11664 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
11665 | :[FH]-) ac_tag=-:-;; |
11666 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
11667 | esac | |
11668 | ac_save_IFS=$IFS | |
11669 | IFS=: | |
11670 | set x $ac_tag | |
11671 | IFS=$ac_save_IFS | |
11672 | shift | |
11673 | ac_file=$1 | |
11674 | shift | |
11675 | ||
11676 | case $ac_mode in | |
11677 | :L) ac_source=$1;; | |
11678 | :[FH]) | |
11679 | ac_file_inputs= | |
11680 | for ac_f | |
11681 | do | |
11682 | case $ac_f in | |
d0ac1c44 | 11683 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
11684 | *) # Look for the file first in the build tree, then in the source tree |
11685 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
11686 | # because $ac_f cannot contain `:'. | |
11687 | test -f "$ac_f" || | |
11688 | case $ac_f in | |
11689 | [\\/$]*) false;; | |
11690 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
11691 | esac || | |
d0ac1c44 | 11692 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
11693 | esac |
11694 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
11695 | as_fn_append ac_file_inputs " '$ac_f'" | |
11696 | done | |
11697 | ||
11698 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
11699 | # use $as_me), people would be surprised to read: | |
11700 | # /* config.h. Generated by config.status. */ | |
11701 | configure_input='Generated from '` | |
11702 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
11703 | `' by configure.' | |
11704 | if test x"$ac_file" != x-; then | |
11705 | configure_input="$ac_file. $configure_input" | |
11706 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
11707 | $as_echo "$as_me: creating $ac_file" >&6;} | |
11708 | fi | |
11709 | # Neutralize special characters interpreted by sed in replacement strings. | |
11710 | case $configure_input in #( | |
11711 | *\&* | *\|* | *\\* ) | |
11712 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
11713 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
11714 | *) ac_sed_conf_input=$configure_input;; | |
11715 | esac | |
11716 | ||
11717 | case $ac_tag in | |
d0ac1c44 SM |
11718 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
11719 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
11720 | esac |
11721 | ;; | |
d6e9fb05 JK |
11722 | esac |
11723 | ||
81ecdfbb | 11724 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
11725 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
11726 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
11727 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11728 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
11729 | $as_echo X"$ac_file" | | |
11730 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11731 | s//\1/ | |
11732 | q | |
11733 | } | |
11734 | /^X\(\/\/\)[^/].*/{ | |
11735 | s//\1/ | |
11736 | q | |
11737 | } | |
11738 | /^X\(\/\/\)$/{ | |
11739 | s//\1/ | |
11740 | q | |
11741 | } | |
11742 | /^X\(\/\).*/{ | |
11743 | s//\1/ | |
11744 | q | |
11745 | } | |
11746 | s/.*/./; q'` | |
11747 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
11748 | ac_builddir=. |
11749 | ||
81ecdfbb RW |
11750 | case "$ac_dir" in |
11751 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11752 | *) | |
11753 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
11754 | # A ".." for each directory in $ac_dir_suffix. | |
11755 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
11756 | case $ac_top_builddir_sub in | |
11757 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11758 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
11759 | esac ;; | |
11760 | esac | |
11761 | ac_abs_top_builddir=$ac_pwd | |
11762 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
11763 | # for backward compatibility: | |
11764 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
11765 | |
11766 | case $srcdir in | |
81ecdfbb | 11767 | .) # We are building in place. |
bec39cab | 11768 | ac_srcdir=. |
81ecdfbb RW |
11769 | ac_top_srcdir=$ac_top_builddir_sub |
11770 | ac_abs_top_srcdir=$ac_pwd ;; | |
11771 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 11772 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
11773 | ac_top_srcdir=$srcdir |
11774 | ac_abs_top_srcdir=$srcdir ;; | |
11775 | *) # Relative name. | |
11776 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
11777 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
11778 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 11779 | esac |
81ecdfbb | 11780 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 11781 | |
bec39cab | 11782 | |
81ecdfbb RW |
11783 | case $ac_mode in |
11784 | :F) | |
11785 | # | |
11786 | # CONFIG_FILE | |
11787 | # | |
d6e9fb05 | 11788 | |
bec39cab AC |
11789 | case $INSTALL in |
11790 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 11791 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
d6e9fb05 | 11792 | esac |
81ecdfbb | 11793 | _ACEOF |
3db0444b | 11794 | |
81ecdfbb RW |
11795 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11796 | # If the template does not know about datarootdir, expand it. | |
11797 | # FIXME: This hack should be removed a few years after 2.60. | |
11798 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
11799 | ac_sed_dataroot=' | |
11800 | /datarootdir/ { | |
11801 | p | |
11802 | q | |
11803 | } | |
11804 | /@datadir@/p | |
11805 | /@docdir@/p | |
11806 | /@infodir@/p | |
11807 | /@localedir@/p | |
11808 | /@mandir@/p' | |
11809 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
11810 | *datarootdir*) ac_datarootdir_seen=yes;; | |
11811 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
11812 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
11813 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
11814 | _ACEOF | |
11815 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11816 | ac_datarootdir_hack=' | |
11817 | s&@datadir@&$datadir&g | |
11818 | s&@docdir@&$docdir&g | |
11819 | s&@infodir@&$infodir&g | |
11820 | s&@localedir@&$localedir&g | |
11821 | s&@mandir@&$mandir&g | |
11822 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
11823 | esac | |
bec39cab | 11824 | _ACEOF |
81ecdfbb RW |
11825 | |
11826 | # Neutralize VPATH when `$srcdir' = `.'. | |
11827 | # Shell code in configure.ac might set extrasub. | |
11828 | # FIXME: do we really want to maintain this feature? | |
11829 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11830 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
11831 | $extrasub |
11832 | _ACEOF | |
81ecdfbb | 11833 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
11834 | :t |
11835 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
11836 | s|@configure_input@|$ac_sed_conf_input|;t t |
11837 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
11838 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
11839 | s&@srcdir@&$ac_srcdir&;t t | |
11840 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
11841 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
11842 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
11843 | s&@builddir@&$ac_builddir&;t t | |
11844 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
11845 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
11846 | s&@INSTALL@&$ac_INSTALL&;t t | |
11847 | $ac_datarootdir_hack | |
11848 | " | |
d0ac1c44 SM |
11849 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
11850 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
11851 | |
11852 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
11853 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
11854 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
11855 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 11856 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 11857 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 11858 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 11859 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 11860 | |
d0ac1c44 | 11861 | rm -f "$ac_tmp/stdin" |
bec39cab | 11862 | case $ac_file in |
d0ac1c44 SM |
11863 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
11864 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 11865 | esac \ |
d0ac1c44 | 11866 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
11867 | ;; |
11868 | :H) | |
11869 | # | |
11870 | # CONFIG_HEADER | |
11871 | # | |
bec39cab | 11872 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
11873 | { |
11874 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
11875 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
11876 | } >"$ac_tmp/config.h" \ | |
11877 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
11878 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
11879 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
11880 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 11881 | else |
81ecdfbb | 11882 | rm -f "$ac_file" |
d0ac1c44 SM |
11883 | mv "$ac_tmp/config.h" "$ac_file" \ |
11884 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
84563040 | 11885 | fi |
bec39cab | 11886 | else |
81ecdfbb | 11887 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
11888 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
11889 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
d6e9fb05 | 11890 | fi |
81ecdfbb | 11891 | ;; |
dae5f5cf | 11892 | |
81ecdfbb RW |
11893 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
11894 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
11895 | ;; | |
11896 | esac | |
dae5f5cf DJ |
11897 | |
11898 | ||
81ecdfbb | 11899 | case $ac_file$ac_mode in |
c5adaa19 | 11900 | "config.h":H) echo > stamp-h ;; |
61c125b9 | 11901 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
60d6cfc9 YQ |
11902 | "gdbdepdir":C) |
11903 | for subdir in ${CONFIG_SRC_SUBDIR} | |
11904 | do | |
11905 | $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
11906 | done ;; | |
81ecdfbb | 11907 | |
bec39cab | 11908 | esac |
81ecdfbb | 11909 | done # for ac_tag |
d6e9fb05 | 11910 | |
bec39cab | 11911 | |
81ecdfbb | 11912 | as_fn_exit 0 |
bec39cab | 11913 | _ACEOF |
bec39cab AC |
11914 | ac_clean_files=$ac_clean_files_save |
11915 | ||
81ecdfbb | 11916 | test $ac_write_fail = 0 || |
d0ac1c44 | 11917 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 11918 | |
bec39cab AC |
11919 | |
11920 | # configure is writing to config.log, and then calls config.status. | |
11921 | # config.status does its own redirection, appending to config.log. | |
11922 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
11923 | # by configure, so config.status won't be able to write to it; its | |
11924 | # output is simply discarded. So we exec the FD to /dev/null, | |
11925 | # effectively closing config.log, so it can be properly (re)opened and | |
11926 | # appended to by config.status. When coming back to configure, we | |
11927 | # need to make the FD available again. | |
11928 | if test "$no_create" != yes; then | |
11929 | ac_cs_success=: | |
11930 | ac_config_status_args= | |
11931 | test "$silent" = yes && | |
11932 | ac_config_status_args="$ac_config_status_args --quiet" | |
11933 | exec 5>/dev/null | |
11934 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
11935 | exec 5>>config.log | |
11936 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
11937 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 11938 | $ac_cs_success || as_fn_exit 1 |
81ecdfbb RW |
11939 | fi |
11940 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
11941 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
11942 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
bec39cab | 11943 | fi |
d6e9fb05 | 11944 |