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 AC |
584 | |
585 | ac_unique_file="server.c" | |
586 | # Factoring default headers for most tests. | |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
81ecdfbb | 589 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
590 | # include <sys/types.h> |
591 | #endif | |
81ecdfbb | 592 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
593 | # include <sys/stat.h> |
594 | #endif | |
81ecdfbb | 595 | #ifdef STDC_HEADERS |
bec39cab AC |
596 | # include <stdlib.h> |
597 | # include <stddef.h> | |
598 | #else | |
81ecdfbb | 599 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
600 | # include <stdlib.h> |
601 | # endif | |
602 | #endif | |
81ecdfbb RW |
603 | #ifdef HAVE_STRING_H |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
605 | # include <memory.h> |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
81ecdfbb | 609 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
610 | # include <strings.h> |
611 | #endif | |
81ecdfbb | 612 | #ifdef HAVE_INTTYPES_H |
bec39cab | 613 | # include <inttypes.h> |
bec39cab | 614 | #endif |
81ecdfbb RW |
615 | #ifdef HAVE_STDINT_H |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
619 | # include <unistd.h> |
620 | #endif" | |
621 | ||
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 | ||
648d586d JB |
6246 | gnulib_extra_configure_args= |
6247 | # If large-file support is disabled, make sure gnulib does the same. | |
6248 | if test "$enable_largefile" = no; then | |
6249 | gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" | |
6250 | fi | |
6251 | ||
c971b7fa PA |
6252 | # Configure gnulib. We can't use AC_CONFIG_SUBDIRS as that'd expect |
6253 | # to find the the source subdir to be configured directly under | |
6254 | # gdbserver/. We need to build gnulib under some other directory not | |
6255 | # "gnulib", to avoid the problem of both GDB and GDBserver wanting to | |
6256 | # build it in the same directory, when building in the source dir. | |
6257 | ||
919adfe8 | 6258 | in_src="../gnulib" |
c971b7fa | 6259 | in_build="build-gnulib-gdbserver" |
648d586d | 6260 | in_extra_args="$gnulib_extra_configure_args" |
c971b7fa PA |
6261 | |
6262 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6263 | # so they do not pile up. | |
6264 | ac_sub_configure_args= | |
6265 | ac_prev= | |
6266 | eval "set x $ac_configure_args" | |
6267 | shift | |
6268 | for ac_arg | |
6269 | do | |
6270 | if test -n "$ac_prev"; then | |
6271 | ac_prev= | |
6272 | continue | |
6273 | fi | |
6274 | case $ac_arg in | |
6275 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6276 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6277 | ac_prev=cache_file ;; | |
6278 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6279 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6280 | | --c=*) | |
6281 | ;; | |
6282 | --config-cache | -C) | |
6283 | ;; | |
6284 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6285 | ac_prev=srcdir ;; | |
6286 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6287 | ;; | |
6288 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6289 | ac_prev=prefix ;; | |
6290 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6291 | ;; | |
6292 | --disable-option-checking) | |
6293 | ;; | |
6294 | *) | |
6295 | case $ac_arg in | |
6296 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6297 | esac | |
6298 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6299 | esac | |
6300 | done | |
6301 | ||
6302 | # Always prepend --prefix to ensure using the same prefix | |
6303 | # in subdir configurations. | |
6304 | ac_arg="--prefix=$prefix" | |
6305 | case $ac_arg in | |
6306 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6307 | esac | |
6308 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6309 | ||
6310 | # Pass --silent | |
6311 | if test "$silent" = yes; then | |
6312 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6313 | fi | |
6314 | ||
6315 | # Always prepend --disable-option-checking to silence warnings, since | |
6316 | # different subdirs can have different --enable and --with options. | |
6317 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6318 | ||
6319 | ac_popdir=`pwd` | |
6320 | ac_dir=$in_build | |
6321 | ||
6322 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6323 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6324 | $as_echo "$ac_msg" >&6 | |
6325 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6326 | ||
38ea300a PA |
6327 | case $srcdir in |
6328 | [\\/]* | ?:[\\/]* ) | |
6329 | ac_srcdir=$srcdir/$in_src ;; | |
6330 | *) # Relative name. | |
6331 | ac_srcdir=../$srcdir/$in_src ;; | |
6332 | esac | |
c971b7fa PA |
6333 | |
6334 | cd "$ac_dir" | |
6335 | ||
6336 | ac_sub_configure=$ac_srcdir/configure | |
6337 | ||
6338 | # Make the cache file name correct relative to the subdirectory. | |
6339 | case $cache_file in | |
6340 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6341 | *) # Relative name. | |
6342 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6343 | esac | |
6344 | ||
648d586d JB |
6345 | if test -n "$in_extra_args"; then |
6346 | # Add the extra args at the end. | |
6347 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6348 | fi | |
6349 | ||
c971b7fa PA |
6350 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
6351 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6352 | # The eval makes quoting arguments work. | |
6353 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6354 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 6355 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c971b7fa PA |
6356 | |
6357 | cd "$ac_popdir" | |
6358 | ||
6359 | ||
0b04e523 | 6360 | |
919adfe8 | 6361 | in_src="../libiberty" |
0b04e523 | 6362 | in_build="build-libiberty-gdbserver" |
648d586d | 6363 | in_extra_args= |
0b04e523 TT |
6364 | |
6365 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
6366 | # so they do not pile up. | |
6367 | ac_sub_configure_args= | |
6368 | ac_prev= | |
6369 | eval "set x $ac_configure_args" | |
6370 | shift | |
6371 | for ac_arg | |
6372 | do | |
6373 | if test -n "$ac_prev"; then | |
6374 | ac_prev= | |
6375 | continue | |
6376 | fi | |
6377 | case $ac_arg in | |
6378 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
6379 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
6380 | ac_prev=cache_file ;; | |
6381 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
6382 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
6383 | | --c=*) | |
6384 | ;; | |
6385 | --config-cache | -C) | |
6386 | ;; | |
6387 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
6388 | ac_prev=srcdir ;; | |
6389 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6390 | ;; | |
6391 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
6392 | ac_prev=prefix ;; | |
6393 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6394 | ;; | |
6395 | --disable-option-checking) | |
6396 | ;; | |
6397 | *) | |
6398 | case $ac_arg in | |
6399 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6400 | esac | |
6401 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
6402 | esac | |
6403 | done | |
6404 | ||
6405 | # Always prepend --prefix to ensure using the same prefix | |
6406 | # in subdir configurations. | |
6407 | ac_arg="--prefix=$prefix" | |
6408 | case $ac_arg in | |
6409 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
6410 | esac | |
6411 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
6412 | ||
6413 | # Pass --silent | |
6414 | if test "$silent" = yes; then | |
6415 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
6416 | fi | |
6417 | ||
6418 | # Always prepend --disable-option-checking to silence warnings, since | |
6419 | # different subdirs can have different --enable and --with options. | |
6420 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
6421 | ||
6422 | ac_popdir=`pwd` | |
6423 | ac_dir=$in_build | |
6424 | ||
6425 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
6426 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
6427 | $as_echo "$ac_msg" >&6 | |
6428 | as_dir="$ac_dir"; as_fn_mkdir_p | |
6429 | ||
6430 | case $srcdir in | |
6431 | [\\/]* | ?:[\\/]* ) | |
6432 | ac_srcdir=$srcdir/$in_src ;; | |
6433 | *) # Relative name. | |
6434 | ac_srcdir=../$srcdir/$in_src ;; | |
6435 | esac | |
6436 | ||
6437 | cd "$ac_dir" | |
6438 | ||
6439 | ac_sub_configure=$ac_srcdir/configure | |
6440 | ||
6441 | # Make the cache file name correct relative to the subdirectory. | |
6442 | case $cache_file in | |
6443 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
6444 | *) # Relative name. | |
6445 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
6446 | esac | |
6447 | ||
648d586d JB |
6448 | if test -n "$in_extra_args"; then |
6449 | # Add the extra args at the end. | |
6450 | ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" | |
6451 | fi | |
6452 | ||
0b04e523 TT |
6453 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
6454 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
6455 | # The eval makes quoting arguments work. | |
6456 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
6457 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 6458 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
0b04e523 TT |
6459 | |
6460 | cd "$ac_popdir" | |
6461 | ||
6462 | ||
05ea2a05 | 6463 | 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 |
6464 | do : |
6465 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6466 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 6467 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
68070c10 | 6468 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6469 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
68070c10 PA |
6470 | _ACEOF |
6471 | ||
ec56be1b | 6472 | fi |
ec56be1b | 6473 | |
81ecdfbb RW |
6474 | done |
6475 | ||
eb0edac8 | 6476 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
d0ac1c44 | 6477 | if test "x$ac_cv_type_pid_t" = xyes; then : |
eb0edac8 GB |
6478 | |
6479 | else | |
6480 | ||
6481 | cat >>confdefs.h <<_ACEOF | |
6482 | #define pid_t int | |
6483 | _ACEOF | |
6484 | ||
6485 | fi | |
6486 | ||
6487 | for ac_header in vfork.h | |
6488 | do : | |
6489 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 6490 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
eb0edac8 GB |
6491 | cat >>confdefs.h <<_ACEOF |
6492 | #define HAVE_VFORK_H 1 | |
6493 | _ACEOF | |
6494 | ||
6495 | fi | |
6496 | ||
6497 | done | |
6498 | ||
6499 | for ac_func in fork vfork | |
6500 | do : | |
6501 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6502 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6503 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
eb0edac8 GB |
6504 | cat >>confdefs.h <<_ACEOF |
6505 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6506 | _ACEOF | |
6507 | ||
6508 | fi | |
6509 | done | |
6510 | ||
6511 | if test "x$ac_cv_func_fork" = xyes; then | |
6512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
6513 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 6514 | if ${ac_cv_func_fork_works+:} false; then : |
eb0edac8 GB |
6515 | $as_echo_n "(cached) " >&6 |
6516 | else | |
6517 | if test "$cross_compiling" = yes; then : | |
6518 | ac_cv_func_fork_works=cross | |
6519 | else | |
6520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6521 | /* end confdefs.h. */ | |
6522 | $ac_includes_default | |
6523 | int | |
6524 | main () | |
6525 | { | |
6526 | ||
6527 | /* By Ruediger Kuhlmann. */ | |
6528 | return fork () < 0; | |
6529 | ||
6530 | ; | |
6531 | return 0; | |
6532 | } | |
6533 | _ACEOF | |
6534 | if ac_fn_c_try_run "$LINENO"; then : | |
6535 | ac_cv_func_fork_works=yes | |
6536 | else | |
6537 | ac_cv_func_fork_works=no | |
6538 | fi | |
6539 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6540 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6541 | fi | |
6542 | ||
6543 | fi | |
6544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
6545 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
6546 | ||
6547 | else | |
6548 | ac_cv_func_fork_works=$ac_cv_func_fork | |
6549 | fi | |
6550 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6551 | case $host in | |
6552 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6553 | # Override, as these systems have only a dummy fork() stub | |
6554 | ac_cv_func_fork_works=no | |
6555 | ;; | |
6556 | *) | |
6557 | ac_cv_func_fork_works=yes | |
6558 | ;; | |
6559 | esac | |
6560 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6561 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
6562 | fi | |
6563 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6564 | if test "x$ac_cv_func_vfork" = xyes; then | |
6565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
6566 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 6567 | if ${ac_cv_func_vfork_works+:} false; then : |
eb0edac8 GB |
6568 | $as_echo_n "(cached) " >&6 |
6569 | else | |
6570 | if test "$cross_compiling" = yes; then : | |
6571 | ac_cv_func_vfork_works=cross | |
6572 | else | |
6573 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6574 | /* end confdefs.h. */ | |
6575 | /* Thanks to Paul Eggert for this test. */ | |
6576 | $ac_includes_default | |
6577 | #include <sys/wait.h> | |
6578 | #ifdef HAVE_VFORK_H | |
6579 | # include <vfork.h> | |
6580 | #endif | |
6581 | /* On some sparc systems, changes by the child to local and incoming | |
6582 | argument registers are propagated back to the parent. The compiler | |
6583 | is told about this with #include <vfork.h>, but some compilers | |
6584 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6585 | static variable whose address is put into a register that is | |
6586 | clobbered by the vfork. */ | |
6587 | static void | |
6588 | #ifdef __cplusplus | |
6589 | sparc_address_test (int arg) | |
6590 | # else | |
6591 | sparc_address_test (arg) int arg; | |
6592 | #endif | |
6593 | { | |
6594 | static pid_t child; | |
6595 | if (!child) { | |
6596 | child = vfork (); | |
6597 | if (child < 0) { | |
6598 | perror ("vfork"); | |
6599 | _exit(2); | |
6600 | } | |
6601 | if (!child) { | |
6602 | arg = getpid(); | |
6603 | write(-1, "", 0); | |
6604 | _exit (arg); | |
6605 | } | |
6606 | } | |
6607 | } | |
6608 | ||
6609 | int | |
6610 | main () | |
6611 | { | |
6612 | pid_t parent = getpid (); | |
6613 | pid_t child; | |
6614 | ||
6615 | sparc_address_test (0); | |
6616 | ||
6617 | child = vfork (); | |
6618 | ||
6619 | if (child == 0) { | |
6620 | /* Here is another test for sparc vfork register problems. This | |
6621 | test uses lots of local variables, at least as many local | |
6622 | variables as main has allocated so far including compiler | |
6623 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
6624 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
6625 | reuse the register of parent for one of the local variables, | |
6626 | since it will think that parent can't possibly be used any more | |
6627 | in this routine. Assigning to the local variable will thus | |
6628 | munge parent in the parent process. */ | |
6629 | pid_t | |
6630 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
6631 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
6632 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
6633 | use the same hardware register for all 8 local variables. */ | |
6634 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
6635 | || p != p5 || p != p6 || p != p7) | |
6636 | _exit(1); | |
6637 | ||
6638 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
6639 | from child file descriptors. If the child closes a descriptor | |
6640 | before it execs or exits, this munges the parent's descriptor | |
6641 | as well. Test for this by closing stdout in the child. */ | |
6642 | _exit(close(fileno(stdout)) != 0); | |
6643 | } else { | |
6644 | int status; | |
6645 | struct stat st; | |
6646 | ||
6647 | while (wait(&status) != child) | |
6648 | ; | |
6649 | return ( | |
6650 | /* Was there some problem with vforking? */ | |
6651 | child < 0 | |
6652 | ||
6653 | /* Did the child fail? (This shouldn't happen.) */ | |
6654 | || status | |
6655 | ||
6656 | /* Did the vfork/compiler bug occur? */ | |
6657 | || parent != getpid() | |
6658 | ||
6659 | /* Did the file descriptor bug occur? */ | |
6660 | || fstat(fileno(stdout), &st) != 0 | |
6661 | ); | |
6662 | } | |
6663 | } | |
6664 | _ACEOF | |
6665 | if ac_fn_c_try_run "$LINENO"; then : | |
6666 | ac_cv_func_vfork_works=yes | |
6667 | else | |
6668 | ac_cv_func_vfork_works=no | |
6669 | fi | |
6670 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6671 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6672 | fi | |
6673 | ||
6674 | fi | |
6675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
6676 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
6677 | ||
6678 | fi; | |
6679 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6680 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
6681 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
6682 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
6683 | fi | |
6684 | ||
6685 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
6686 | ||
6687 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
6688 | ||
6689 | else | |
6690 | ||
6691 | $as_echo "#define vfork fork" >>confdefs.h | |
6692 | ||
6693 | fi | |
6694 | if test "x$ac_cv_func_fork_works" = xyes; then | |
6695 | ||
6696 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
6697 | ||
6698 | fi | |
6699 | ||
05ea2a05 | 6700 | for ac_func in pread pwrite pread64 |
81ecdfbb RW |
6701 | do : |
6702 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6703 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6704 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
6705 | cat >>confdefs.h <<_ACEOF |
6706 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
ec56be1b PA |
6707 | _ACEOF |
6708 | ||
81ecdfbb RW |
6709 | fi |
6710 | done | |
ec56be1b | 6711 | |
e122f1f5 | 6712 | |
d0ac1c44 SM |
6713 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6714 | if test "x$ac_cv_type_size_t" = xyes; then : | |
6715 | ||
6716 | else | |
6717 | ||
6718 | cat >>confdefs.h <<_ACEOF | |
6719 | #define size_t unsigned int | |
6720 | _ACEOF | |
6721 | ||
6722 | fi | |
6723 | ||
05ea2a05 TT |
6724 | |
6725 | ||
6726 | ||
6727 | for ac_header in $ac_header_list | |
6728 | do : | |
6729 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6730 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6731 | " | |
6732 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
6733 | cat >>confdefs.h <<_ACEOF | |
6734 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6735 | _ACEOF | |
6736 | ||
6737 | fi | |
6738 | ||
6739 | done | |
6740 | ||
6741 | ||
6742 | ||
6743 | ||
6744 | ||
6745 | ||
6746 | ||
5e030278 TT |
6747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
6748 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
6749 | if ${ac_cv_path_SED+:} false; then : | |
6750 | $as_echo_n "(cached) " >&6 | |
6751 | else | |
6752 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
6753 | for ac_i in 1 2 3 4 5 6 7; do | |
6754 | ac_script="$ac_script$as_nl$ac_script" | |
6755 | done | |
6756 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
6757 | { ac_script=; unset ac_script;} | |
6758 | if test -z "$SED"; then | |
6759 | ac_path_SED_found=false | |
6760 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6761 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6762 | for as_dir in $PATH | |
6763 | do | |
6764 | IFS=$as_save_IFS | |
6765 | test -z "$as_dir" && as_dir=. | |
6766 | for ac_prog in sed gsed; do | |
6767 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6768 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
6769 | as_fn_executable_p "$ac_path_SED" || continue | |
6770 | # Check for GNU ac_path_SED and select it if it is found. | |
6771 | # Check for GNU $ac_path_SED | |
6772 | case `"$ac_path_SED" --version 2>&1` in | |
6773 | *GNU*) | |
6774 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
6775 | *) | |
6776 | ac_count=0 | |
6777 | $as_echo_n 0123456789 >"conftest.in" | |
6778 | while : | |
6779 | do | |
6780 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6781 | mv "conftest.tmp" "conftest.in" | |
6782 | cp "conftest.in" "conftest.nl" | |
6783 | $as_echo '' >> "conftest.nl" | |
6784 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6785 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6786 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6787 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
6788 | # Best one so far, save it but keep looking for a better one | |
6789 | ac_cv_path_SED="$ac_path_SED" | |
6790 | ac_path_SED_max=$ac_count | |
6791 | fi | |
6792 | # 10*(2^10) chars as input seems more than enough | |
6793 | test $ac_count -gt 10 && break | |
6794 | done | |
6795 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6796 | esac | |
6797 | ||
6798 | $ac_path_SED_found && break 3 | |
6799 | done | |
6800 | done | |
6801 | done | |
6802 | IFS=$as_save_IFS | |
6803 | if test -z "$ac_cv_path_SED"; then | |
6804 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
6805 | fi | |
6806 | else | |
6807 | ac_cv_path_SED=$SED | |
6808 | fi | |
6809 | ||
6810 | fi | |
6811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
6812 | $as_echo "$ac_cv_path_SED" >&6; } | |
6813 | SED="$ac_cv_path_SED" | |
6814 | rm -f conftest.sed | |
6815 | ||
3266f10b | 6816 | |
05ea2a05 TT |
6817 | if test "X$prefix" = "XNONE"; then |
6818 | acl_final_prefix="$ac_default_prefix" | |
6819 | else | |
6820 | acl_final_prefix="$prefix" | |
6821 | fi | |
6822 | if test "X$exec_prefix" = "XNONE"; then | |
6823 | acl_final_exec_prefix='${prefix}' | |
6824 | else | |
6825 | acl_final_exec_prefix="$exec_prefix" | |
6826 | fi | |
6827 | acl_save_prefix="$prefix" | |
6828 | prefix="$acl_final_prefix" | |
6829 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
6830 | prefix="$acl_save_prefix" | |
6831 | ||
6832 | ||
6833 | # Check whether --with-gnu-ld was given. | |
6834 | if test "${with_gnu_ld+set}" = set; then : | |
6835 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
6836 | else | |
6837 | with_gnu_ld=no | |
6838 | fi | |
6839 | ||
6840 | # Prepare PATH_SEPARATOR. | |
6841 | # The user is always right. | |
6842 | if test "${PATH_SEPARATOR+set}" != set; then | |
6843 | echo "#! /bin/sh" >conf$$.sh | |
6844 | echo "exit 0" >>conf$$.sh | |
6845 | chmod +x conf$$.sh | |
6846 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6847 | PATH_SEPARATOR=';' | |
6848 | else | |
6849 | PATH_SEPARATOR=: | |
6850 | fi | |
6851 | rm -f conf$$.sh | |
6852 | fi | |
6853 | ac_prog=ld | |
6854 | if test "$GCC" = yes; then | |
6855 | # Check if gcc -print-prog-name=ld gives a path. | |
6856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
6857 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
6858 | case $host in | |
6859 | *-*-mingw*) | |
6860 | # gcc leaves a trailing carriage return which upsets mingw | |
6861 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
6862 | *) | |
6863 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
6864 | esac | |
6865 | case $ac_prog in | |
6866 | # Accept absolute paths. | |
6867 | [\\/]* | [A-Za-z]:[\\/]*) | |
6868 | re_direlt='/[^/][^/]*/\.\./' | |
6869 | # Canonicalize the path of ld | |
6870 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
6871 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
6872 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
6873 | done | |
6874 | test -z "$LD" && LD="$ac_prog" | |
6875 | ;; | |
6876 | "") | |
6877 | # If it fails, then pretend we aren't using GCC. | |
6878 | ac_prog=ld | |
6879 | ;; | |
6880 | *) | |
6881 | # If it is relative, then search for the first ld in PATH. | |
6882 | with_gnu_ld=unknown | |
6883 | ;; | |
6884 | esac | |
6885 | elif test "$with_gnu_ld" = yes; then | |
6886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
6887 | $as_echo_n "checking for GNU ld... " >&6; } | |
6888 | else | |
6889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
6890 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
6891 | fi | |
6892 | if ${acl_cv_path_LD+:} false; then : | |
6893 | $as_echo_n "(cached) " >&6 | |
6894 | else | |
6895 | if test -z "$LD"; then | |
6896 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
6897 | for ac_dir in $PATH; do | |
6898 | test -z "$ac_dir" && ac_dir=. | |
6899 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
6900 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
6901 | # Check to see if the program is GNU ld. I'd rather use --version, | |
6902 | # but apparently some GNU ld's only accept -v. | |
6903 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
6904 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
6905 | test "$with_gnu_ld" != no && break | |
6906 | else | |
6907 | test "$with_gnu_ld" != yes && break | |
6908 | fi | |
6909 | fi | |
6910 | done | |
6911 | IFS="$ac_save_ifs" | |
6912 | else | |
6913 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
6914 | fi | |
6915 | fi | |
6916 | ||
6917 | LD="$acl_cv_path_LD" | |
6918 | if test -n "$LD"; then | |
6919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
6920 | $as_echo "$LD" >&6; } | |
6921 | else | |
6922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6923 | $as_echo "no" >&6; } | |
6924 | fi | |
6925 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
6926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
6927 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
6928 | if ${acl_cv_prog_gnu_ld+:} false; then : | |
6929 | $as_echo_n "(cached) " >&6 | |
6930 | else | |
6931 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
6932 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
6933 | acl_cv_prog_gnu_ld=yes | |
6934 | else | |
6935 | acl_cv_prog_gnu_ld=no | |
6936 | fi | |
6937 | fi | |
6938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
6939 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
6940 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
6941 | ||
6942 | ||
6943 | ||
6944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
6945 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
6946 | if ${acl_cv_rpath+:} false; then : | |
6947 | $as_echo_n "(cached) " >&6 | |
6948 | else | |
6949 | ||
6950 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
6951 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
6952 | . ./conftest.sh | |
6953 | rm -f ./conftest.sh | |
6954 | acl_cv_rpath=done | |
6955 | ||
6956 | fi | |
6957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
6958 | $as_echo "$acl_cv_rpath" >&6; } | |
6959 | wl="$acl_cv_wl" | |
6960 | libext="$acl_cv_libext" | |
6961 | shlibext="$acl_cv_shlibext" | |
6962 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
6963 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
6964 | hardcode_direct="$acl_cv_hardcode_direct" | |
6965 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
6966 | # Check whether --enable-rpath was given. | |
6967 | if test "${enable_rpath+set}" = set; then : | |
6968 | enableval=$enable_rpath; : | |
6969 | else | |
6970 | enable_rpath=yes | |
6971 | fi | |
6972 | ||
6973 | ||
6974 | ||
3266f10b TT |
6975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6976 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 6977 | if ${ac_cv_header_stdc+:} false; then : |
3266f10b TT |
6978 | $as_echo_n "(cached) " >&6 |
6979 | else | |
6980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6981 | /* end confdefs.h. */ | |
6982 | #include <stdlib.h> | |
6983 | #include <stdarg.h> | |
6984 | #include <string.h> | |
6985 | #include <float.h> | |
6986 | ||
6987 | int | |
6988 | main () | |
6989 | { | |
6990 | ||
6991 | ; | |
6992 | return 0; | |
6993 | } | |
6994 | _ACEOF | |
6995 | if ac_fn_c_try_compile "$LINENO"; then : | |
6996 | ac_cv_header_stdc=yes | |
6997 | else | |
6998 | ac_cv_header_stdc=no | |
6999 | fi | |
7000 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7001 | ||
7002 | if test $ac_cv_header_stdc = yes; then | |
7003 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
7004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7005 | /* end confdefs.h. */ | |
7006 | #include <string.h> | |
7007 | ||
7008 | _ACEOF | |
7009 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7010 | $EGREP "memchr" >/dev/null 2>&1; then : | |
7011 | ||
7012 | else | |
7013 | ac_cv_header_stdc=no | |
7014 | fi | |
7015 | rm -f conftest* | |
7016 | ||
7017 | fi | |
7018 | ||
7019 | if test $ac_cv_header_stdc = yes; then | |
7020 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
7021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7022 | /* end confdefs.h. */ | |
7023 | #include <stdlib.h> | |
7024 | ||
7025 | _ACEOF | |
7026 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7027 | $EGREP "free" >/dev/null 2>&1; then : | |
7028 | ||
7029 | else | |
7030 | ac_cv_header_stdc=no | |
7031 | fi | |
7032 | rm -f conftest* | |
7033 | ||
7034 | fi | |
7035 | ||
7036 | if test $ac_cv_header_stdc = yes; then | |
7037 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
7038 | if test "$cross_compiling" = yes; then : | |
7039 | : | |
7040 | else | |
7041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7042 | /* end confdefs.h. */ | |
7043 | #include <ctype.h> | |
7044 | #include <stdlib.h> | |
7045 | #if ((' ' & 0x0FF) == 0x020) | |
7046 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7047 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7048 | #else | |
7049 | # define ISLOWER(c) \ | |
7050 | (('a' <= (c) && (c) <= 'i') \ | |
7051 | || ('j' <= (c) && (c) <= 'r') \ | |
7052 | || ('s' <= (c) && (c) <= 'z')) | |
7053 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
7054 | #endif | |
7055 | ||
7056 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
7057 | int | |
7058 | main () | |
7059 | { | |
7060 | int i; | |
7061 | for (i = 0; i < 256; i++) | |
7062 | if (XOR (islower (i), ISLOWER (i)) | |
7063 | || toupper (i) != TOUPPER (i)) | |
7064 | return 2; | |
7065 | return 0; | |
7066 | } | |
7067 | _ACEOF | |
7068 | if ac_fn_c_try_run "$LINENO"; then : | |
7069 | ||
7070 | else | |
7071 | ac_cv_header_stdc=no | |
7072 | fi | |
7073 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7074 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7075 | fi | |
7076 | ||
7077 | fi | |
7078 | fi | |
7079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
7080 | $as_echo "$ac_cv_header_stdc" >&6; } | |
7081 | if test $ac_cv_header_stdc = yes; then | |
7082 | ||
7083 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
7084 | ||
3266f10b TT |
7085 | fi |
7086 | ||
7087 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
7088 | # for constant arguments. Useless! | |
7089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
7090 | $as_echo_n "checking for working alloca.h... " >&6; } | |
d0ac1c44 | 7091 | if ${ac_cv_working_alloca_h+:} false; then : |
3266f10b TT |
7092 | $as_echo_n "(cached) " >&6 |
7093 | else | |
7094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7095 | /* end confdefs.h. */ | |
7096 | #include <alloca.h> | |
7097 | int | |
7098 | main () | |
7099 | { | |
7100 | char *p = (char *) alloca (2 * sizeof (int)); | |
7101 | if (p) return 0; | |
7102 | ; | |
7103 | return 0; | |
7104 | } | |
7105 | _ACEOF | |
7106 | if ac_fn_c_try_link "$LINENO"; then : | |
7107 | ac_cv_working_alloca_h=yes | |
7108 | else | |
7109 | ac_cv_working_alloca_h=no | |
7110 | fi | |
7111 | rm -f core conftest.err conftest.$ac_objext \ | |
7112 | conftest$ac_exeext conftest.$ac_ext | |
7113 | fi | |
7114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
7115 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
7116 | if test $ac_cv_working_alloca_h = yes; then | |
7117 | ||
7118 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7119 | ||
7120 | fi | |
7121 | ||
7122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
7123 | $as_echo_n "checking for alloca... " >&6; } | |
d0ac1c44 | 7124 | if ${ac_cv_func_alloca_works+:} false; then : |
3266f10b TT |
7125 | $as_echo_n "(cached) " >&6 |
7126 | else | |
7127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7128 | /* end confdefs.h. */ | |
7129 | #ifdef __GNUC__ | |
7130 | # define alloca __builtin_alloca | |
7131 | #else | |
7132 | # ifdef _MSC_VER | |
7133 | # include <malloc.h> | |
7134 | # define alloca _alloca | |
7135 | # else | |
7136 | # ifdef HAVE_ALLOCA_H | |
7137 | # include <alloca.h> | |
7138 | # else | |
7139 | # ifdef _AIX | |
7140 | #pragma alloca | |
7141 | # else | |
7142 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
d0ac1c44 | 7143 | void *alloca (size_t); |
3266f10b TT |
7144 | # endif |
7145 | # endif | |
7146 | # endif | |
7147 | # endif | |
7148 | #endif | |
7149 | ||
7150 | int | |
7151 | main () | |
7152 | { | |
7153 | char *p = (char *) alloca (1); | |
7154 | if (p) return 0; | |
7155 | ; | |
7156 | return 0; | |
7157 | } | |
7158 | _ACEOF | |
7159 | if ac_fn_c_try_link "$LINENO"; then : | |
7160 | ac_cv_func_alloca_works=yes | |
7161 | else | |
7162 | ac_cv_func_alloca_works=no | |
7163 | fi | |
7164 | rm -f core conftest.err conftest.$ac_objext \ | |
7165 | conftest$ac_exeext conftest.$ac_ext | |
7166 | fi | |
7167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
7168 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
7169 | ||
7170 | if test $ac_cv_func_alloca_works = yes; then | |
7171 | ||
7172 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
7173 | ||
7174 | else | |
7175 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
7176 | # that cause trouble. Some versions do not even contain alloca or | |
7177 | # contain a buggy version. If you still want to use their alloca, | |
7178 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
7179 | ||
7180 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
7181 | ||
7182 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
7183 | ||
7184 | ||
7185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
7186 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
d0ac1c44 | 7187 | if ${ac_cv_os_cray+:} false; then : |
3266f10b TT |
7188 | $as_echo_n "(cached) " >&6 |
7189 | else | |
7190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7191 | /* end confdefs.h. */ | |
7192 | #if defined CRAY && ! defined CRAY2 | |
7193 | webecray | |
7194 | #else | |
7195 | wenotbecray | |
7196 | #endif | |
7197 | ||
7198 | _ACEOF | |
7199 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
7200 | $EGREP "webecray" >/dev/null 2>&1; then : | |
7201 | ac_cv_os_cray=yes | |
7202 | else | |
7203 | ac_cv_os_cray=no | |
7204 | fi | |
7205 | rm -f conftest* | |
7206 | ||
7207 | fi | |
7208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
7209 | $as_echo "$ac_cv_os_cray" >&6; } | |
7210 | if test $ac_cv_os_cray = yes; then | |
7211 | for ac_func in _getb67 GETB67 getb67; do | |
7212 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7213 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7214 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
3266f10b TT |
7215 | |
7216 | cat >>confdefs.h <<_ACEOF | |
7217 | #define CRAY_STACKSEG_END $ac_func | |
7218 | _ACEOF | |
7219 | ||
7220 | break | |
7221 | fi | |
7222 | ||
7223 | done | |
7224 | fi | |
7225 | ||
7226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
7227 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
d0ac1c44 | 7228 | if ${ac_cv_c_stack_direction+:} false; then : |
3266f10b TT |
7229 | $as_echo_n "(cached) " >&6 |
7230 | else | |
7231 | if test "$cross_compiling" = yes; then : | |
7232 | ac_cv_c_stack_direction=0 | |
7233 | else | |
7234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7235 | /* end confdefs.h. */ | |
7236 | $ac_includes_default | |
7237 | int | |
d0ac1c44 | 7238 | find_stack_direction (int *addr, int depth) |
3266f10b | 7239 | { |
d0ac1c44 SM |
7240 | int dir, dummy = 0; |
7241 | if (! addr) | |
7242 | addr = &dummy; | |
7243 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
7244 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
7245 | return dir + dummy; | |
3266f10b TT |
7246 | } |
7247 | ||
7248 | int | |
d0ac1c44 | 7249 | main (int argc, char **argv) |
3266f10b | 7250 | { |
d0ac1c44 | 7251 | return find_stack_direction (0, argc + !argv + 20) < 0; |
3266f10b TT |
7252 | } |
7253 | _ACEOF | |
7254 | if ac_fn_c_try_run "$LINENO"; then : | |
7255 | ac_cv_c_stack_direction=1 | |
7256 | else | |
7257 | ac_cv_c_stack_direction=-1 | |
7258 | fi | |
7259 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7260 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7261 | fi | |
7262 | ||
7263 | fi | |
7264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
7265 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
7266 | cat >>confdefs.h <<_ACEOF | |
7267 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
7268 | _ACEOF | |
7269 | ||
7270 | ||
7271 | fi | |
7272 | ||
7273 | ||
b2ceabe8 TT |
7274 | WIN32APILIBS= |
7275 | case ${host} in | |
7276 | *mingw32*) | |
7277 | ||
7278 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
7279 | ||
7280 | WIN32APILIBS="-lws2_32" | |
7281 | ;; | |
7282 | esac | |
7283 | ||
3266f10b TT |
7284 | |
7285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
7286 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
d0ac1c44 | 7287 | if ${am_cv_langinfo_codeset+:} false; then : |
3266f10b TT |
7288 | $as_echo_n "(cached) " >&6 |
7289 | else | |
7290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7291 | /* end confdefs.h. */ | |
7292 | #include <langinfo.h> | |
7293 | int | |
7294 | main () | |
7295 | { | |
7296 | char* cs = nl_langinfo(CODESET); | |
7297 | ; | |
7298 | return 0; | |
7299 | } | |
7300 | _ACEOF | |
7301 | if ac_fn_c_try_link "$LINENO"; then : | |
7302 | am_cv_langinfo_codeset=yes | |
7303 | else | |
7304 | am_cv_langinfo_codeset=no | |
7305 | fi | |
7306 | rm -f core conftest.err conftest.$ac_objext \ | |
7307 | conftest$ac_exeext conftest.$ac_ext | |
7308 | ||
7309 | fi | |
7310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
7311 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
7312 | if test $am_cv_langinfo_codeset = yes; then | |
7313 | ||
7314 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
7315 | ||
7316 | fi | |
7317 | ||
7318 | ||
05ea2a05 | 7319 | 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 |
7320 | do : |
7321 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7322 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 7323 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
3266f10b TT |
7324 | cat >>confdefs.h <<_ACEOF |
7325 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7326 | _ACEOF | |
7327 | ||
7328 | fi | |
7329 | ||
7330 | done | |
7331 | ||
7332 | ||
05ea2a05 TT |
7333 | |
7334 | for ac_func in getpagesize | |
3266f10b | 7335 | do : |
05ea2a05 TT |
7336 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
7337 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
3266f10b | 7338 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 7339 | #define HAVE_GETPAGESIZE 1 |
3266f10b TT |
7340 | _ACEOF |
7341 | ||
7342 | fi | |
7343 | done | |
7344 | ||
05ea2a05 TT |
7345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
7346 | $as_echo_n "checking for working mmap... " >&6; } | |
7347 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
7348 | $as_echo_n "(cached) " >&6 | |
3266f10b | 7349 | else |
05ea2a05 TT |
7350 | if test "$cross_compiling" = yes; then : |
7351 | ac_cv_func_mmap_fixed_mapped=no | |
7352 | else | |
7353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7354 | /* end confdefs.h. */ | |
7355 | $ac_includes_default | |
7356 | /* malloc might have been renamed as rpl_malloc. */ | |
7357 | #undef malloc | |
7358 | ||
7359 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
7360 | Here is a matrix of mmap possibilities: | |
7361 | mmap private not fixed | |
7362 | mmap private fixed at somewhere currently unmapped | |
7363 | mmap private fixed at somewhere already mapped | |
7364 | mmap shared not fixed | |
7365 | mmap shared fixed at somewhere currently unmapped | |
7366 | mmap shared fixed at somewhere already mapped | |
7367 | For private mappings, we should verify that changes cannot be read() | |
7368 | back from the file, nor mmap's back from the file at a different | |
7369 | address. (There have been systems where private was not correctly | |
7370 | implemented like the infamous i386 svr4.0, and systems where the | |
7371 | VM page cache was not coherent with the file system buffer cache | |
7372 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7373 | For shared mappings, we should conversely verify that changes get | |
7374 | propagated back to all the places they're supposed to be. | |
7375 | ||
7376 | Grep wants private fixed already mapped. | |
7377 | The main things grep needs to know about mmap are: | |
7378 | * does it exist and is it safe to write into the mmap'd area | |
7379 | * how to use it (BSD variants) */ | |
7380 | ||
7381 | #include <fcntl.h> | |
7382 | #include <sys/mman.h> | |
7383 | ||
7384 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
7385 | char *malloc (); | |
7386 | #endif | |
3266f10b | 7387 | |
05ea2a05 TT |
7388 | /* This mess was copied from the GNU getpagesize.h. */ |
7389 | #ifndef HAVE_GETPAGESIZE | |
7390 | # ifdef _SC_PAGESIZE | |
7391 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7392 | # else /* no _SC_PAGESIZE */ | |
7393 | # ifdef HAVE_SYS_PARAM_H | |
7394 | # include <sys/param.h> | |
7395 | # ifdef EXEC_PAGESIZE | |
7396 | # define getpagesize() EXEC_PAGESIZE | |
7397 | # else /* no EXEC_PAGESIZE */ | |
7398 | # ifdef NBPG | |
7399 | # define getpagesize() NBPG * CLSIZE | |
7400 | # ifndef CLSIZE | |
7401 | # define CLSIZE 1 | |
7402 | # endif /* no CLSIZE */ | |
7403 | # else /* no NBPG */ | |
7404 | # ifdef NBPC | |
7405 | # define getpagesize() NBPC | |
7406 | # else /* no NBPC */ | |
7407 | # ifdef PAGESIZE | |
7408 | # define getpagesize() PAGESIZE | |
7409 | # endif /* PAGESIZE */ | |
7410 | # endif /* no NBPC */ | |
7411 | # endif /* no NBPG */ | |
7412 | # endif /* no EXEC_PAGESIZE */ | |
7413 | # else /* no HAVE_SYS_PARAM_H */ | |
7414 | # define getpagesize() 8192 /* punt totally */ | |
7415 | # endif /* no HAVE_SYS_PARAM_H */ | |
7416 | # endif /* no _SC_PAGESIZE */ | |
7417 | ||
7418 | #endif /* no HAVE_GETPAGESIZE */ | |
3266f10b | 7419 | |
05ea2a05 TT |
7420 | int |
7421 | main () | |
7422 | { | |
7423 | char *data, *data2, *data3; | |
7424 | const char *cdata2; | |
7425 | int i, pagesize; | |
7426 | int fd, fd2; | |
3266f10b | 7427 | |
05ea2a05 | 7428 | pagesize = getpagesize (); |
5e030278 | 7429 | |
05ea2a05 TT |
7430 | /* First, make a file with some known garbage in it. */ |
7431 | data = (char *) malloc (pagesize); | |
7432 | if (!data) | |
7433 | return 1; | |
7434 | for (i = 0; i < pagesize; ++i) | |
7435 | *(data + i) = rand (); | |
7436 | umask (0); | |
7437 | fd = creat ("conftest.mmap", 0600); | |
7438 | if (fd < 0) | |
7439 | return 2; | |
7440 | if (write (fd, data, pagesize) != pagesize) | |
7441 | return 3; | |
7442 | close (fd); | |
7443 | ||
7444 | /* Next, check that the tail of a page is zero-filled. File must have | |
7445 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7446 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7447 | if (fd2 < 0) | |
7448 | return 4; | |
7449 | cdata2 = ""; | |
7450 | if (write (fd2, cdata2, 1) != 1) | |
7451 | return 5; | |
7452 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
7453 | if (data2 == MAP_FAILED) | |
7454 | return 6; | |
7455 | for (i = 0; i < pagesize; ++i) | |
7456 | if (*(data2 + i)) | |
7457 | return 7; | |
7458 | close (fd2); | |
7459 | if (munmap (data2, pagesize)) | |
7460 | return 8; | |
7461 | ||
7462 | /* Next, try to mmap the file at a fixed address which already has | |
7463 | something else allocated at it. If we can, also make sure that | |
7464 | we see the same garbage. */ | |
7465 | fd = open ("conftest.mmap", O_RDWR); | |
7466 | if (fd < 0) | |
7467 | return 9; | |
7468 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
7469 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
7470 | return 10; | |
7471 | for (i = 0; i < pagesize; ++i) | |
7472 | if (*(data + i) != *(data2 + i)) | |
7473 | return 11; | |
7474 | ||
7475 | /* Finally, make sure that changes to the mapped area do not | |
7476 | percolate back to the file as seen by read(). (This is a bug on | |
7477 | some variants of i386 svr4.0.) */ | |
7478 | for (i = 0; i < pagesize; ++i) | |
7479 | *(data2 + i) = *(data2 + i) + 1; | |
7480 | data3 = (char *) malloc (pagesize); | |
7481 | if (!data3) | |
7482 | return 12; | |
7483 | if (read (fd, data3, pagesize) != pagesize) | |
7484 | return 13; | |
7485 | for (i = 0; i < pagesize; ++i) | |
7486 | if (*(data + i) != *(data3 + i)) | |
7487 | return 14; | |
7488 | close (fd); | |
7489 | return 0; | |
7490 | } | |
7491 | _ACEOF | |
7492 | if ac_fn_c_try_run "$LINENO"; then : | |
7493 | ac_cv_func_mmap_fixed_mapped=yes | |
7494 | else | |
7495 | ac_cv_func_mmap_fixed_mapped=no | |
7496 | fi | |
7497 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7498 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7499 | fi | |
5e030278 | 7500 | |
05ea2a05 TT |
7501 | fi |
7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
7503 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
7504 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5e030278 | 7505 | |
05ea2a05 | 7506 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
5e030278 | 7507 | |
05ea2a05 TT |
7508 | fi |
7509 | rm -f conftest.mmap conftest.txt | |
5e030278 | 7510 | |
05ea2a05 TT |
7511 | for ac_header in vfork.h |
7512 | do : | |
7513 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
7514 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
7515 | cat >>confdefs.h <<_ACEOF | |
7516 | #define HAVE_VFORK_H 1 | |
7517 | _ACEOF | |
5e030278 | 7518 | |
05ea2a05 | 7519 | fi |
5e030278 | 7520 | |
05ea2a05 | 7521 | done |
5e030278 | 7522 | |
05ea2a05 TT |
7523 | for ac_func in fork vfork |
7524 | do : | |
7525 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7526 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7527 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7528 | cat >>confdefs.h <<_ACEOF | |
7529 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7530 | _ACEOF | |
7531 | ||
7532 | fi | |
7533 | done | |
7534 | ||
7535 | if test "x$ac_cv_func_fork" = xyes; then | |
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
7537 | $as_echo_n "checking for working fork... " >&6; } | |
7538 | if ${ac_cv_func_fork_works+:} false; then : | |
7539 | $as_echo_n "(cached) " >&6 | |
7540 | else | |
7541 | if test "$cross_compiling" = yes; then : | |
7542 | ac_cv_func_fork_works=cross | |
7543 | else | |
7544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7545 | /* end confdefs.h. */ | |
7546 | $ac_includes_default | |
7547 | int | |
7548 | main () | |
7549 | { | |
7550 | ||
7551 | /* By Ruediger Kuhlmann. */ | |
7552 | return fork () < 0; | |
7553 | ||
7554 | ; | |
7555 | return 0; | |
7556 | } | |
7557 | _ACEOF | |
7558 | if ac_fn_c_try_run "$LINENO"; then : | |
7559 | ac_cv_func_fork_works=yes | |
7560 | else | |
7561 | ac_cv_func_fork_works=no | |
7562 | fi | |
7563 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7564 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7565 | fi | |
7566 | ||
7567 | fi | |
7568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
7569 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
7570 | ||
7571 | else | |
7572 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7573 | fi | |
7574 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7575 | case $host in | |
7576 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7577 | # Override, as these systems have only a dummy fork() stub | |
7578 | ac_cv_func_fork_works=no | |
7579 | ;; | |
7580 | *) | |
7581 | ac_cv_func_fork_works=yes | |
7582 | ;; | |
7583 | esac | |
7584 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7585 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
7586 | fi | |
7587 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7588 | if test "x$ac_cv_func_vfork" = xyes; then | |
7589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
7590 | $as_echo_n "checking for working vfork... " >&6; } | |
7591 | if ${ac_cv_func_vfork_works+:} false; then : | |
7592 | $as_echo_n "(cached) " >&6 | |
7593 | else | |
7594 | if test "$cross_compiling" = yes; then : | |
7595 | ac_cv_func_vfork_works=cross | |
7596 | else | |
7597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7598 | /* end confdefs.h. */ | |
7599 | /* Thanks to Paul Eggert for this test. */ | |
7600 | $ac_includes_default | |
7601 | #include <sys/wait.h> | |
7602 | #ifdef HAVE_VFORK_H | |
7603 | # include <vfork.h> | |
7604 | #endif | |
7605 | /* On some sparc systems, changes by the child to local and incoming | |
7606 | argument registers are propagated back to the parent. The compiler | |
7607 | is told about this with #include <vfork.h>, but some compilers | |
7608 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7609 | static variable whose address is put into a register that is | |
7610 | clobbered by the vfork. */ | |
7611 | static void | |
7612 | #ifdef __cplusplus | |
7613 | sparc_address_test (int arg) | |
7614 | # else | |
7615 | sparc_address_test (arg) int arg; | |
7616 | #endif | |
7617 | { | |
7618 | static pid_t child; | |
7619 | if (!child) { | |
7620 | child = vfork (); | |
7621 | if (child < 0) { | |
7622 | perror ("vfork"); | |
7623 | _exit(2); | |
7624 | } | |
7625 | if (!child) { | |
7626 | arg = getpid(); | |
7627 | write(-1, "", 0); | |
7628 | _exit (arg); | |
7629 | } | |
7630 | } | |
7631 | } | |
7632 | ||
7633 | int | |
7634 | main () | |
7635 | { | |
7636 | pid_t parent = getpid (); | |
7637 | pid_t child; | |
7638 | ||
7639 | sparc_address_test (0); | |
7640 | ||
7641 | child = vfork (); | |
7642 | ||
7643 | if (child == 0) { | |
7644 | /* Here is another test for sparc vfork register problems. This | |
7645 | test uses lots of local variables, at least as many local | |
7646 | variables as main has allocated so far including compiler | |
7647 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7648 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7649 | reuse the register of parent for one of the local variables, | |
7650 | since it will think that parent can't possibly be used any more | |
7651 | in this routine. Assigning to the local variable will thus | |
7652 | munge parent in the parent process. */ | |
7653 | pid_t | |
7654 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7655 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7656 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7657 | use the same hardware register for all 8 local variables. */ | |
7658 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7659 | || p != p5 || p != p6 || p != p7) | |
7660 | _exit(1); | |
7661 | ||
7662 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
7663 | from child file descriptors. If the child closes a descriptor | |
7664 | before it execs or exits, this munges the parent's descriptor | |
7665 | as well. Test for this by closing stdout in the child. */ | |
7666 | _exit(close(fileno(stdout)) != 0); | |
7667 | } else { | |
7668 | int status; | |
7669 | struct stat st; | |
7670 | ||
7671 | while (wait(&status) != child) | |
7672 | ; | |
7673 | return ( | |
7674 | /* Was there some problem with vforking? */ | |
7675 | child < 0 | |
7676 | ||
7677 | /* Did the child fail? (This shouldn't happen.) */ | |
7678 | || status | |
7679 | ||
7680 | /* Did the vfork/compiler bug occur? */ | |
7681 | || parent != getpid() | |
7682 | ||
7683 | /* Did the file descriptor bug occur? */ | |
7684 | || fstat(fileno(stdout), &st) != 0 | |
7685 | ); | |
7686 | } | |
7687 | } | |
7688 | _ACEOF | |
7689 | if ac_fn_c_try_run "$LINENO"; then : | |
7690 | ac_cv_func_vfork_works=yes | |
7691 | else | |
7692 | ac_cv_func_vfork_works=no | |
7693 | fi | |
7694 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7695 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7696 | fi | |
7697 | ||
7698 | fi | |
7699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
7700 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
7701 | ||
7702 | fi; | |
7703 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7704 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7705 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7706 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
7707 | fi | |
7708 | ||
7709 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
7710 | ||
7711 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
7712 | ||
7713 | else | |
7714 | ||
7715 | $as_echo "#define vfork fork" >>confdefs.h | |
7716 | ||
7717 | fi | |
7718 | if test "x$ac_cv_func_fork_works" = xyes; then | |
7719 | ||
7720 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
7721 | ||
7722 | fi | |
7723 | ||
7724 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \ | |
7725 | ptrace64 sbrk setns sigaltstack sigprocmask \ | |
7726 | setpgid setpgrp getrusage getauxval | |
7727 | do : | |
7728 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7729 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7730 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7731 | cat >>confdefs.h <<_ACEOF | |
7732 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7733 | _ACEOF | |
7734 | ||
7735 | fi | |
7736 | done | |
7737 | ||
7738 | ||
7739 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
7740 | " | |
7741 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
7742 | ac_have_decl=1 | |
7743 | else | |
7744 | ac_have_decl=0 | |
7745 | fi | |
7746 | ||
7747 | cat >>confdefs.h <<_ACEOF | |
7748 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
7749 | _ACEOF | |
7750 | ||
7751 | ||
7752 | if test "$cross_compiling" = yes; then : | |
7753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7754 | /* end confdefs.h. */ | |
7755 | #include <sys/personality.h> | |
7756 | int | |
7757 | main () | |
7758 | { | |
7759 | ||
7760 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7761 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7762 | # endif | |
7763 | /* Test the flag could be set and stays set. */ | |
7764 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7765 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7766 | return 1 | |
7767 | ; | |
7768 | return 0; | |
7769 | } | |
7770 | _ACEOF | |
7771 | if ac_fn_c_try_link "$LINENO"; then : | |
7772 | have_personality=true | |
7773 | else | |
7774 | have_personality=false | |
7775 | fi | |
7776 | rm -f core conftest.err conftest.$ac_objext \ | |
7777 | conftest$ac_exeext conftest.$ac_ext | |
7778 | else | |
7779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7780 | /* end confdefs.h. */ | |
7781 | #include <sys/personality.h> | |
7782 | int | |
7783 | main () | |
7784 | { | |
7785 | ||
7786 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
7787 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
7788 | # endif | |
7789 | /* Test the flag could be set and stays set. */ | |
7790 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
7791 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
7792 | return 1 | |
7793 | ; | |
7794 | return 0; | |
7795 | } | |
7796 | _ACEOF | |
7797 | if ac_fn_c_try_run "$LINENO"; then : | |
7798 | have_personality=true | |
7799 | else | |
7800 | have_personality=false | |
7801 | fi | |
7802 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7803 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7804 | fi | |
7805 | ||
7806 | if $have_personality | |
7807 | then | |
7808 | ||
7809 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h | |
7810 | ||
7811 | fi | |
7812 | ||
7813 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" | |
7814 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
7815 | ac_have_decl=1 | |
7816 | else | |
7817 | ac_have_decl=0 | |
7818 | fi | |
7819 | ||
7820 | cat >>confdefs.h <<_ACEOF | |
7821 | #define HAVE_DECL_STRSTR $ac_have_decl | |
7822 | _ACEOF | |
7823 | ||
7824 | ||
7825 | # ----------------------- # | |
7826 | # Checks for structures. # | |
7827 | # ----------------------- # | |
7828 | ||
7829 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
7830 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
7831 | ||
7832 | cat >>confdefs.h <<_ACEOF | |
7833 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7834 | _ACEOF | |
7835 | ||
7836 | ||
7837 | fi | |
7838 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" | |
7839 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
7840 | ||
7841 | cat >>confdefs.h <<_ACEOF | |
7842 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7843 | _ACEOF | |
7844 | ||
7845 | ||
7846 | fi | |
7847 | ||
7848 | ||
7849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
7850 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
7851 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7852 | $as_echo_n "(cached) " >&6 | |
7853 | else | |
7854 | ac_func_search_save_LIBS=$LIBS | |
7855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7856 | /* end confdefs.h. */ | |
7857 | ||
7858 | /* Override any GCC internal prototype to avoid an error. | |
7859 | Use char because int might match the return type of a GCC | |
7860 | builtin and then its argument prototype would still apply. */ | |
7861 | #ifdef __cplusplus | |
7862 | extern "C" | |
7863 | #endif | |
7864 | char kinfo_getfile (); | |
7865 | int | |
7866 | main () | |
7867 | { | |
7868 | return kinfo_getfile (); | |
7869 | ; | |
7870 | return 0; | |
7871 | } | |
7872 | _ACEOF | |
7873 | for ac_lib in '' util util-freebsd; do | |
7874 | if test -z "$ac_lib"; then | |
7875 | ac_res="none required" | |
7876 | else | |
7877 | ac_res=-l$ac_lib | |
7878 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7879 | fi | |
7880 | if ac_fn_c_try_link "$LINENO"; then : | |
7881 | ac_cv_search_kinfo_getfile=$ac_res | |
7882 | fi | |
7883 | rm -f core conftest.err conftest.$ac_objext \ | |
7884 | conftest$ac_exeext | |
7885 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7886 | break | |
7887 | fi | |
7888 | done | |
7889 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
7890 | ||
7891 | else | |
7892 | ac_cv_search_kinfo_getfile=no | |
7893 | fi | |
7894 | rm conftest.$ac_ext | |
7895 | LIBS=$ac_func_search_save_LIBS | |
7896 | fi | |
7897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
7898 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
7899 | ac_res=$ac_cv_search_kinfo_getfile | |
7900 | if test "$ac_res" != no; then : | |
7901 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7902 | ||
7903 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
7904 | ||
7905 | fi | |
7906 | ||
7907 | ||
7908 | # Check for std::thread. This does not work on some platforms, like | |
7909 | # mingw and DJGPP. | |
7910 | ac_ext=cpp | |
7911 | ac_cpp='$CXXCPP $CPPFLAGS' | |
7912 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7913 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7914 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7915 | ||
7916 | ||
7917 | ||
7918 | ||
7919 | ||
7920 | ac_ext=c | |
7921 | ac_cpp='$CPP $CPPFLAGS' | |
7922 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7923 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7924 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7925 | ||
7926 | ax_pthread_ok=no | |
7927 | ||
7928 | # We used to check for pthread.h first, but this fails if pthread.h | |
7929 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
7930 | # It gets checked for in the link test anyway. | |
7931 | ||
7932 | # First of all, check if the user has set any of the PTHREAD_LIBS, | |
5e030278 TT |
7933 | # etcetera environment variables, and if threads linking works using |
7934 | # them: | |
7935 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
7936 | ax_pthread_save_CC="$CC" | |
7937 | ax_pthread_save_CFLAGS="$CFLAGS" | |
7938 | ax_pthread_save_LIBS="$LIBS" | |
05ea2a05 TT |
7939 | if test "x$PTHREAD_CC" != "x"; then : |
7940 | CC="$PTHREAD_CC" | |
7941 | fi | |
7942 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
7943 | LIBS="$PTHREAD_LIBS $LIBS" | |
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
7945 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
7946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7947 | /* end confdefs.h. */ | |
7948 | ||
7949 | /* Override any GCC internal prototype to avoid an error. | |
7950 | Use char because int might match the return type of a GCC | |
7951 | builtin and then its argument prototype would still apply. */ | |
7952 | #ifdef __cplusplus | |
7953 | extern "C" | |
7954 | #endif | |
7955 | char pthread_join (); | |
7956 | int | |
7957 | main () | |
7958 | { | |
7959 | return pthread_join (); | |
7960 | ; | |
7961 | return 0; | |
7962 | } | |
7963 | _ACEOF | |
7964 | if ac_fn_c_try_link "$LINENO"; then : | |
7965 | ax_pthread_ok=yes | |
7966 | fi | |
7967 | rm -f core conftest.err conftest.$ac_objext \ | |
7968 | conftest$ac_exeext conftest.$ac_ext | |
7969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
7970 | $as_echo "$ax_pthread_ok" >&6; } | |
7971 | if test "x$ax_pthread_ok" = "xno"; then | |
7972 | PTHREAD_LIBS="" | |
7973 | PTHREAD_CFLAGS="" | |
7974 | fi | |
7975 | CC="$ax_pthread_save_CC" | |
7976 | CFLAGS="$ax_pthread_save_CFLAGS" | |
7977 | LIBS="$ax_pthread_save_LIBS" | |
7978 | fi | |
7979 | ||
7980 | # We must check for the threads library under a number of different | |
7981 | # names; the ordering is very important because some systems | |
7982 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
7983 | # libraries is broken (non-POSIX). | |
7984 | ||
7985 | # Create a list of thread flags to try. Items starting with a "-" are | |
7986 | # C compiler flags, and other items are library names, except for "none" | |
7987 | # which indicates that we try without any flags at all, and "pthread-config" | |
7988 | # which is a program returning the flags for the Pth emulation library. | |
7989 | ||
7990 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | |
7991 | ||
7992 | # The ordering *is* (sometimes) important. Some notes on the | |
7993 | # individual items follow: | |
7994 | ||
7995 | # pthreads: AIX (must check this before -lpthread) | |
7996 | # none: in case threads are in libc; should be tried before -Kthread and | |
7997 | # other compiler flags to prevent continual compiler warnings | |
7998 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
7999 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
8000 | # (Note: HP C rejects this with "bad form for `-t' option") | |
8001 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
8002 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
8003 | # doesn't hurt to check since this sometimes defines pthreads and | |
8004 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
8005 | # is present but should not be used directly; and before -mthreads, | |
8006 | # because the compiler interprets this as "-mt" + "-hreads") | |
8007 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
8008 | # pthread: Linux, etcetera | |
8009 | # --thread-safe: KAI C++ | |
8010 | # pthread-config: use pthread-config program (for GNU Pth library) | |
8011 | ||
8012 | case $host_os in | |
8013 | ||
8014 | freebsd*) | |
8015 | ||
8016 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | |
8017 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
8018 | ||
8019 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" | |
8020 | ;; | |
8021 | ||
8022 | hpux*) | |
8023 | ||
8024 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable | |
8025 | # multi-threading and also sets -lpthread." | |
8026 | ||
8027 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
8028 | ;; | |
8029 | ||
8030 | openedition*) | |
8031 | ||
8032 | # IBM z/OS requires a feature-test macro to be defined in order to | |
8033 | # enable POSIX threads at all, so give the user a hint if this is | |
8034 | # not set. (We don't define these ourselves, as they can affect | |
8035 | # other portions of the system API in unpredictable ways.) | |
8036 | ||
8037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8038 | /* end confdefs.h. */ | |
8039 | ||
8040 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
8041 | AX_PTHREAD_ZOS_MISSING | |
8042 | # endif | |
8043 | ||
8044 | _ACEOF | |
8045 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8046 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : | |
8047 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
8048 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
8049 | fi | |
8050 | rm -f conftest* | |
8051 | ||
8052 | ;; | |
8053 | ||
8054 | solaris*) | |
8055 | ||
8056 | # On Solaris (at least, for some versions), libc contains stubbed | |
8057 | # (non-functional) versions of the pthreads routines, so link-based | |
8058 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
8059 | # pthread_cleanup_push, or rather a function called by this macro, | |
8060 | # so we could check for that, but who knows whether they'll stub | |
8061 | # that too in a future libc.) So we'll check first for the | |
8062 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
8063 | ||
8064 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
8065 | ;; | |
8066 | esac | |
8067 | ||
8068 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
8069 | ||
8070 | if test "x$GCC" = "xyes"; then : | |
8071 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
8072 | fi | |
8073 | ||
8074 | # The presence of a feature test macro requesting re-entrant function | |
8075 | # definitions is, on some systems, a strong hint that pthreads support is | |
8076 | # correctly enabled | |
8077 | ||
8078 | case $host_os in | |
8079 | darwin* | hpux* | linux* | osf* | solaris*) | |
8080 | ax_pthread_check_macro="_REENTRANT" | |
8081 | ;; | |
8082 | ||
8083 | aix*) | |
8084 | ax_pthread_check_macro="_THREAD_SAFE" | |
8085 | ;; | |
8086 | ||
8087 | *) | |
8088 | ax_pthread_check_macro="--" | |
8089 | ;; | |
8090 | esac | |
8091 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
8092 | ax_pthread_check_cond=0 | |
8093 | else | |
8094 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
8095 | fi | |
8096 | ||
8097 | # Are we compiling with Clang? | |
8098 | ||
8099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
8100 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
8101 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
8102 | $as_echo_n "(cached) " >&6 | |
8103 | else | |
8104 | ax_cv_PTHREAD_CLANG=no | |
8105 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
8106 | if test "x$GCC" = "xyes"; then | |
8107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8108 | /* end confdefs.h. */ | |
8109 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | |
8110 | # if defined(__clang__) && defined(__llvm__) | |
8111 | AX_PTHREAD_CC_IS_CLANG | |
8112 | # endif | |
8113 | ||
8114 | _ACEOF | |
8115 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8116 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
8117 | ax_cv_PTHREAD_CLANG=yes | |
8118 | fi | |
8119 | rm -f conftest* | |
8120 | ||
8121 | fi | |
8122 | ||
8123 | fi | |
8124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 | |
8125 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
8126 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
8127 | ||
8128 | ax_pthread_clang_warning=no | |
8129 | ||
8130 | # Clang needs special handling, because older versions handle the -pthread | |
8131 | # option in a rather... idiosyncratic way | |
8132 | ||
8133 | if test "x$ax_pthread_clang" = "xyes"; then | |
8134 | ||
8135 | # Clang takes -pthread; it has never supported any other flag | |
8136 | ||
8137 | # (Note 1: This will need to be revisited if a system that Clang | |
8138 | # supports has POSIX threads in a separate library. This tends not | |
8139 | # to be the way of modern systems, but it's conceivable.) | |
8140 | ||
8141 | # (Note 2: On some systems, notably Darwin, -pthread is not needed | |
8142 | # to get POSIX threads support; the API is always present and | |
8143 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
8144 | # -pthread does define _REENTRANT, and while the Darwin headers | |
8145 | # ignore this macro, third-party headers might not.) | |
8146 | ||
8147 | PTHREAD_CFLAGS="-pthread" | |
8148 | PTHREAD_LIBS= | |
8149 | ||
8150 | ax_pthread_ok=yes | |
8151 | ||
8152 | # However, older versions of Clang make a point of warning the user | |
8153 | # that, in an invocation where only linking and no compilation is | |
8154 | # taking place, the -pthread option has no effect ("argument unused | |
8155 | # during compilation"). They expect -pthread to be passed in only | |
8156 | # when source code is being compiled. | |
8157 | # | |
8158 | # Problem is, this is at odds with the way Automake and most other | |
8159 | # C build frameworks function, which is that the same flags used in | |
8160 | # compilation (CFLAGS) are also used in linking. Many systems | |
8161 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
8162 | # support, and in fact it is often not straightforward to specify a | |
8163 | # flag that is used only in the compilation phase and not in | |
8164 | # linking. Such a scenario is extremely rare in practice. | |
8165 | # | |
8166 | # Even though use of the -pthread flag in linking would only print | |
8167 | # a warning, this can be a nuisance for well-run software projects | |
8168 | # that build with -Werror. So if the active version of Clang has | |
8169 | # this misfeature, we search for an option to squash it. | |
8170 | ||
8171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
8172 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
8173 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
8174 | $as_echo_n "(cached) " >&6 | |
8175 | else | |
8176 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
8177 | # Create an alternate version of $ac_link that compiles and | |
8178 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
8179 | # (.c -> exe), because the warning occurs only in the second | |
8180 | # step | |
8181 | ax_pthread_save_ac_link="$ac_link" | |
8182 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
8183 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
8184 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
8185 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8186 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
8187 | if test "x$ax_pthread_try" = "xunknown"; then : | |
8188 | break | |
8189 | fi | |
8190 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
8191 | ac_link="$ax_pthread_save_ac_link" | |
8192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8193 | /* end confdefs.h. */ | |
8194 | int main(void){return 0;} | |
8195 | _ACEOF | |
8196 | if ac_fn_c_try_link "$LINENO"; then : | |
8197 | ac_link="$ax_pthread_2step_ac_link" | |
8198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8199 | /* end confdefs.h. */ | |
8200 | int main(void){return 0;} | |
8201 | _ACEOF | |
8202 | if ac_fn_c_try_link "$LINENO"; then : | |
8203 | break | |
8204 | fi | |
8205 | rm -f core conftest.err conftest.$ac_objext \ | |
8206 | conftest$ac_exeext conftest.$ac_ext | |
8207 | ||
8208 | fi | |
8209 | rm -f core conftest.err conftest.$ac_objext \ | |
8210 | conftest$ac_exeext conftest.$ac_ext | |
8211 | done | |
8212 | ac_link="$ax_pthread_save_ac_link" | |
8213 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8214 | if test "x$ax_pthread_try" = "x"; then : | |
8215 | ax_pthread_try=no | |
8216 | fi | |
8217 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
8218 | ||
8219 | fi | |
8220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
8221 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
8222 | ||
8223 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | |
8224 | no | unknown) ;; | |
8225 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
8226 | esac | |
8227 | ||
8228 | fi # $ax_pthread_clang = yes | |
8229 | ||
8230 | if test "x$ax_pthread_ok" = "xno"; then | |
8231 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
8232 | ||
8233 | case $ax_pthread_try_flag in | |
8234 | none) | |
8235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
8236 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
8237 | ;; | |
8238 | ||
8239 | -mt,pthread) | |
8240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
8241 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
8242 | PTHREAD_CFLAGS="-mt" | |
8243 | PTHREAD_LIBS="-lpthread" | |
8244 | ;; | |
8245 | ||
8246 | -*) | |
8247 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
8248 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
8249 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
8250 | ;; | |
8251 | ||
8252 | pthread-config) | |
8253 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
8254 | set dummy pthread-config; ac_word=$2 | |
8255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8256 | $as_echo_n "checking for $ac_word... " >&6; } | |
8257 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
8258 | $as_echo_n "(cached) " >&6 | |
8259 | else | |
8260 | if test -n "$ax_pthread_config"; then | |
8261 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
8262 | else | |
8263 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8264 | for as_dir in $PATH | |
8265 | do | |
8266 | IFS=$as_save_IFS | |
8267 | test -z "$as_dir" && as_dir=. | |
8268 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8269 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8270 | ac_cv_prog_ax_pthread_config="yes" | |
8271 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8272 | break 2 | |
8273 | fi | |
8274 | done | |
8275 | done | |
8276 | IFS=$as_save_IFS | |
8277 | ||
8278 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" | |
8279 | fi | |
8280 | fi | |
8281 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
8282 | if test -n "$ax_pthread_config"; then | |
8283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
8284 | $as_echo "$ax_pthread_config" >&6; } | |
8285 | else | |
8286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8287 | $as_echo "no" >&6; } | |
8288 | fi | |
8289 | ||
8290 | ||
8291 | if test "x$ax_pthread_config" = "xno"; then : | |
8292 | continue | |
8293 | fi | |
8294 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
8295 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
8296 | ;; | |
8297 | ||
8298 | *) | |
8299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
8300 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
8301 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
8302 | ;; | |
8303 | esac | |
8304 | ||
8305 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8306 | ax_pthread_save_LIBS="$LIBS" | |
8307 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
8308 | LIBS="$PTHREAD_LIBS $LIBS" | |
8309 | ||
8310 | # Check for various functions. We must include pthread.h, | |
8311 | # since some functions may be macros. (On the Sequent, we | |
8312 | # need a special flag -Kthread to make this header compile.) | |
8313 | # We check for pthread_join because it is in -lpthread on IRIX | |
8314 | # while pthread_create is in libc. We check for pthread_attr_init | |
8315 | # due to DEC craziness with -lpthreads. We check for | |
8316 | # pthread_cleanup_push because it is one of the few pthread | |
8317 | # functions on Solaris that doesn't have a non-functional libc stub. | |
8318 | # We try pthread_create on general principles. | |
8319 | ||
8320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8321 | /* end confdefs.h. */ | |
8322 | #include <pthread.h> | |
8323 | # if $ax_pthread_check_cond | |
8324 | # error "$ax_pthread_check_macro must be defined" | |
8325 | # endif | |
8326 | static void routine(void *a) { a = 0; } | |
8327 | static void *start_routine(void *a) { return a; } | |
8328 | int | |
8329 | main () | |
8330 | { | |
8331 | pthread_t th; pthread_attr_t attr; | |
8332 | pthread_create(&th, 0, start_routine, 0); | |
8333 | pthread_join(th, 0); | |
8334 | pthread_attr_init(&attr); | |
8335 | pthread_cleanup_push(routine, 0); | |
8336 | pthread_cleanup_pop(0) /* ; */ | |
8337 | ; | |
8338 | return 0; | |
8339 | } | |
8340 | _ACEOF | |
8341 | if ac_fn_c_try_link "$LINENO"; then : | |
8342 | ax_pthread_ok=yes | |
8343 | fi | |
8344 | rm -f core conftest.err conftest.$ac_objext \ | |
8345 | conftest$ac_exeext conftest.$ac_ext | |
8346 | ||
8347 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8348 | LIBS="$ax_pthread_save_LIBS" | |
8349 | ||
8350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
8351 | $as_echo "$ax_pthread_ok" >&6; } | |
8352 | if test "x$ax_pthread_ok" = "xyes"; then : | |
8353 | break | |
8354 | fi | |
8355 | ||
8356 | PTHREAD_LIBS="" | |
8357 | PTHREAD_CFLAGS="" | |
8358 | done | |
8359 | fi | |
8360 | ||
8361 | # Various other checks: | |
8362 | if test "x$ax_pthread_ok" = "xyes"; then | |
8363 | ax_pthread_save_CFLAGS="$CFLAGS" | |
8364 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
8365 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
8366 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
8367 | |
8368 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | |
8369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
8370 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
8371 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
8372 | $as_echo_n "(cached) " >&6 | |
8373 | else | |
8374 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
8375 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
8376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8377 | /* end confdefs.h. */ | |
8378 | #include <pthread.h> | |
8379 | int | |
8380 | main () | |
8381 | { | |
8382 | int attr = $ax_pthread_attr; return attr /* ; */ | |
8383 | ; | |
8384 | return 0; | |
8385 | } | |
8386 | _ACEOF | |
8387 | if ac_fn_c_try_link "$LINENO"; then : | |
8388 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
8389 | fi | |
8390 | rm -f core conftest.err conftest.$ac_objext \ | |
8391 | conftest$ac_exeext conftest.$ac_ext | |
8392 | done | |
8393 | ||
8394 | fi | |
8395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
8396 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
8397 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
8398 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
8399 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
8400 | ||
8401 | cat >>confdefs.h <<_ACEOF | |
8402 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
8403 | _ACEOF | |
8404 | ||
8405 | ax_pthread_joinable_attr_defined=yes | |
8406 | ||
8407 | fi | |
8408 | ||
8409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 | |
8410 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
8411 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
8412 | $as_echo_n "(cached) " >&6 | |
8413 | else | |
8414 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
8415 | case $host_os in | |
8416 | solaris*) | |
8417 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
8418 | ;; | |
8419 | esac | |
8420 | ||
8421 | fi | |
8422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
8423 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
8424 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
8425 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
8426 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
8427 | ax_pthread_special_flags_added=yes | |
8428 | fi | |
8429 | ||
8430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 | |
8431 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
8432 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
8433 | $as_echo_n "(cached) " >&6 | |
8434 | else | |
8435 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8436 | /* end confdefs.h. */ | |
8437 | #include <pthread.h> | |
8438 | int | |
8439 | main () | |
8440 | { | |
8441 | int i = PTHREAD_PRIO_INHERIT; | |
8442 | ; | |
8443 | return 0; | |
8444 | } | |
8445 | _ACEOF | |
8446 | if ac_fn_c_try_link "$LINENO"; then : | |
8447 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
8448 | else | |
8449 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
8450 | fi | |
8451 | rm -f core conftest.err conftest.$ac_objext \ | |
8452 | conftest$ac_exeext conftest.$ac_ext | |
8453 | ||
8454 | fi | |
8455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
8456 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
8457 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
8458 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
8459 | ||
8460 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h | |
8461 | ||
8462 | ax_pthread_prio_inherit_defined=yes | |
8463 | ||
8464 | fi | |
8465 | ||
8466 | CFLAGS="$ax_pthread_save_CFLAGS" | |
8467 | LIBS="$ax_pthread_save_LIBS" | |
8468 | ||
8469 | # More AIX lossage: compile with *_r variant | |
8470 | if test "x$GCC" != "xyes"; then | |
8471 | case $host_os in | |
8472 | aix*) | |
8473 | case "x/$CC" in #( | |
8474 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
8475 | #handle absolute path differently from PATH based program lookup | |
8476 | case "x$CC" in #( | |
8477 | x/*) : | |
8478 | if as_fn_executable_p ${CC}_r; then : | |
8479 | PTHREAD_CC="${CC}_r" | |
8480 | fi ;; #( | |
8481 | *) : | |
8482 | for ac_prog in ${CC}_r | |
8483 | do | |
8484 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8485 | set dummy $ac_prog; ac_word=$2 | |
8486 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8487 | $as_echo_n "checking for $ac_word... " >&6; } | |
8488 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
8489 | $as_echo_n "(cached) " >&6 | |
8490 | else | |
8491 | if test -n "$PTHREAD_CC"; then | |
8492 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
8493 | else | |
8494 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8495 | for as_dir in $PATH | |
8496 | do | |
8497 | IFS=$as_save_IFS | |
8498 | test -z "$as_dir" && as_dir=. | |
8499 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8500 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
8501 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
8502 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8503 | break 2 | |
8504 | fi | |
8505 | done | |
8506 | done | |
8507 | IFS=$as_save_IFS | |
8508 | ||
8509 | fi | |
8510 | fi | |
8511 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
8512 | if test -n "$PTHREAD_CC"; then | |
8513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
8514 | $as_echo "$PTHREAD_CC" >&6; } | |
8515 | else | |
8516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8517 | $as_echo "no" >&6; } | |
8518 | fi | |
8519 | ||
8520 | ||
8521 | test -n "$PTHREAD_CC" && break | |
8522 | done | |
8523 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8524 | ;; | |
8525 | esac ;; #( | |
8526 | *) : | |
8527 | ;; | |
8528 | esac | |
8529 | ;; | |
8530 | esac | |
8531 | fi | |
8532 | fi | |
8533 | ||
8534 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
8535 | ||
8536 | ||
8537 | ||
8538 | ||
8539 | ||
8540 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | |
8541 | if test "x$ax_pthread_ok" = "xyes"; then | |
8542 | threads=yes | |
8543 | : | |
8544 | else | |
8545 | ax_pthread_ok=no | |
8546 | threads=no | |
8547 | fi | |
8548 | ac_ext=cpp | |
8549 | ac_cpp='$CXXCPP $CPPFLAGS' | |
8550 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8551 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8552 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
8553 | ||
8554 | ||
8555 | if test "$threads" = "yes"; then | |
8556 | save_LIBS="$LIBS" | |
8557 | LIBS="$PTHREAD_LIBS $LIBS" | |
8558 | save_CXXFLAGS="$CXXFLAGS" | |
8559 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
8560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
8561 | $as_echo_n "checking for std::thread... " >&6; } | |
8562 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
8563 | $as_echo_n "(cached) " >&6 | |
8564 | else | |
8565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8566 | /* end confdefs.h. */ | |
8567 | #include <thread> | |
8568 | void callback() { } | |
8569 | int | |
8570 | main () | |
8571 | { | |
8572 | std::thread t(callback); | |
8573 | ; | |
8574 | return 0; | |
8575 | } | |
8576 | _ACEOF | |
8577 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
8578 | gdb_cv_cxx_std_thread=yes | |
8579 | else | |
8580 | gdb_cv_cxx_std_thread=no | |
8581 | fi | |
8582 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8583 | fi | |
8584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
8585 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
8586 | ||
8587 | # This check must be here, while LIBS includes any necessary | |
8588 | # threading library. | |
8589 | for ac_func in pthread_sigmask pthread_setname_np | |
8590 | do : | |
8591 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8592 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8593 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
8594 | cat >>confdefs.h <<_ACEOF | |
8595 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8596 | _ACEOF | |
8597 | ||
8598 | fi | |
8599 | done | |
8600 | ||
8601 | ||
8602 | LIBS="$save_LIBS" | |
8603 | CXXFLAGS="$save_CXXFLAGS" | |
8604 | fi | |
8605 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
8606 | ||
8607 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h | |
8608 | ||
8609 | fi | |
8610 | ac_ext=c | |
8611 | ac_cpp='$CPP $CPPFLAGS' | |
8612 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8613 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8614 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8615 | ||
8616 | ||
8617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
8618 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
8619 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
8620 | $as_echo_n "(cached) " >&6 | |
8621 | else | |
8622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8623 | /* end confdefs.h. */ |
8624 | ||
05ea2a05 TT |
8625 | #include <setjmp.h> |
8626 | ||
5e030278 TT |
8627 | int |
8628 | main () | |
8629 | { | |
05ea2a05 | 8630 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
5e030278 TT |
8631 | ; |
8632 | return 0; | |
8633 | } | |
8634 | _ACEOF | |
05ea2a05 TT |
8635 | if ac_fn_c_try_compile "$LINENO"; then : |
8636 | gdb_cv_func_sigsetjmp=yes | |
8637 | else | |
8638 | gdb_cv_func_sigsetjmp=no | |
5e030278 | 8639 | fi |
05ea2a05 | 8640 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 | 8641 | fi |
05ea2a05 TT |
8642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
8643 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
8644 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 8645 | |
05ea2a05 | 8646 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 8647 | |
05ea2a05 | 8648 | fi |
5e030278 | 8649 | |
5e030278 | 8650 | |
05ea2a05 TT |
8651 | # Check whether --with-intel_pt was given. |
8652 | if test "${with_intel_pt+set}" = set; then : | |
8653 | withval=$with_intel_pt; | |
8654 | else | |
8655 | with_intel_pt=auto | |
8656 | fi | |
5e030278 | 8657 | |
05ea2a05 TT |
8658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
8659 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
8660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
8661 | $as_echo "$with_intel_pt" >&6; } | |
5e030278 | 8662 | |
05ea2a05 TT |
8663 | if test "${with_intel_pt}" = no; then |
8664 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
8665 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
8666 | HAVE_LIBIPT=no | |
8667 | else | |
8668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 TT |
8669 | /* end confdefs.h. */ |
8670 | ||
05ea2a05 TT |
8671 | #include <linux/perf_event.h> |
8672 | #ifndef PERF_ATTR_SIZE_VER5 | |
8673 | # error | |
8674 | #endif | |
5e030278 TT |
8675 | |
8676 | _ACEOF | |
05ea2a05 TT |
8677 | if ac_fn_c_try_cpp "$LINENO"; then : |
8678 | perf_event=yes | |
8679 | else | |
8680 | perf_event=no | |
5e030278 | 8681 | fi |
05ea2a05 TT |
8682 | rm -f conftest.err conftest.i conftest.$ac_ext |
8683 | if test "$perf_event" != yes; then | |
8684 | if test "$with_intel_pt" = yes; then | |
8685 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
8686 | else | |
8687 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
8688 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
8689 | fi | |
8690 | fi | |
5e030278 | 8691 | |
5e030278 | 8692 | |
5e030278 | 8693 | |
5e030278 | 8694 | |
5e030278 | 8695 | |
5e030278 | 8696 | |
5e030278 | 8697 | |
5e030278 | 8698 | |
5e030278 | 8699 | |
05ea2a05 | 8700 | use_additional=yes |
5e030278 | 8701 | |
05ea2a05 TT |
8702 | acl_save_prefix="$prefix" |
8703 | prefix="$acl_final_prefix" | |
8704 | acl_save_exec_prefix="$exec_prefix" | |
8705 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8706 | |
05ea2a05 TT |
8707 | eval additional_includedir=\"$includedir\" |
8708 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8709 | |
05ea2a05 TT |
8710 | exec_prefix="$acl_save_exec_prefix" |
8711 | prefix="$acl_save_prefix" | |
5e030278 | 8712 | |
5e030278 | 8713 | |
05ea2a05 TT |
8714 | # Check whether --with-libipt-prefix was given. |
8715 | if test "${with_libipt_prefix+set}" = set; then : | |
8716 | withval=$with_libipt_prefix; | |
8717 | if test "X$withval" = "Xno"; then | |
8718 | use_additional=no | |
8719 | else | |
8720 | if test "X$withval" = "X"; then | |
5e030278 | 8721 | |
05ea2a05 TT |
8722 | acl_save_prefix="$prefix" |
8723 | prefix="$acl_final_prefix" | |
8724 | acl_save_exec_prefix="$exec_prefix" | |
8725 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 8726 | |
05ea2a05 TT |
8727 | eval additional_includedir=\"$includedir\" |
8728 | eval additional_libdir=\"$libdir\" | |
5e030278 | 8729 | |
05ea2a05 TT |
8730 | exec_prefix="$acl_save_exec_prefix" |
8731 | prefix="$acl_save_prefix" | |
5e030278 | 8732 | |
05ea2a05 TT |
8733 | else |
8734 | additional_includedir="$withval/include" | |
8735 | additional_libdir="$withval/lib" | |
8736 | fi | |
8737 | fi | |
5e030278 | 8738 | |
05ea2a05 | 8739 | fi |
5e030278 | 8740 | |
05ea2a05 TT |
8741 | LIBIPT= |
8742 | LTLIBIPT= | |
8743 | INCIPT= | |
8744 | rpathdirs= | |
8745 | ltrpathdirs= | |
8746 | names_already_handled= | |
8747 | names_next_round='ipt ' | |
8748 | while test -n "$names_next_round"; do | |
8749 | names_this_round="$names_next_round" | |
8750 | names_next_round= | |
8751 | for name in $names_this_round; do | |
8752 | already_handled= | |
8753 | for n in $names_already_handled; do | |
8754 | if test "$n" = "$name"; then | |
8755 | already_handled=yes | |
8756 | break | |
8757 | fi | |
8758 | done | |
8759 | if test -z "$already_handled"; then | |
8760 | names_already_handled="$names_already_handled $name" | |
8761 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8762 | eval value=\"\$HAVE_LIB$uppername\" | |
8763 | if test -n "$value"; then | |
8764 | if test "$value" = yes; then | |
8765 | eval value=\"\$LIB$uppername\" | |
8766 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
8767 | eval value=\"\$LTLIB$uppername\" | |
8768 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
8769 | else | |
8770 | : | |
8771 | fi | |
8772 | else | |
8773 | found_dir= | |
8774 | found_la= | |
8775 | found_so= | |
8776 | found_a= | |
8777 | if test $use_additional = yes; then | |
8778 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8779 | found_dir="$additional_libdir" | |
8780 | found_so="$additional_libdir/lib$name.$shlibext" | |
8781 | if test -f "$additional_libdir/lib$name.la"; then | |
8782 | found_la="$additional_libdir/lib$name.la" | |
8783 | fi | |
8784 | else | |
8785 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8786 | found_dir="$additional_libdir" | |
8787 | found_a="$additional_libdir/lib$name.$libext" | |
8788 | if test -f "$additional_libdir/lib$name.la"; then | |
8789 | found_la="$additional_libdir/lib$name.la" | |
8790 | fi | |
8791 | fi | |
8792 | fi | |
8793 | fi | |
8794 | if test "X$found_dir" = "X"; then | |
8795 | for x in $LDFLAGS $LTLIBIPT; do | |
8796 | ||
8797 | acl_save_prefix="$prefix" | |
8798 | prefix="$acl_final_prefix" | |
8799 | acl_save_exec_prefix="$exec_prefix" | |
8800 | exec_prefix="$acl_final_exec_prefix" | |
8801 | eval x=\"$x\" | |
8802 | exec_prefix="$acl_save_exec_prefix" | |
8803 | prefix="$acl_save_prefix" | |
8804 | ||
8805 | case "$x" in | |
8806 | -L*) | |
8807 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8808 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8809 | found_dir="$dir" | |
8810 | found_so="$dir/lib$name.$shlibext" | |
8811 | if test -f "$dir/lib$name.la"; then | |
8812 | found_la="$dir/lib$name.la" | |
8813 | fi | |
8814 | else | |
8815 | if test -f "$dir/lib$name.$libext"; then | |
8816 | found_dir="$dir" | |
8817 | found_a="$dir/lib$name.$libext" | |
8818 | if test -f "$dir/lib$name.la"; then | |
8819 | found_la="$dir/lib$name.la" | |
8820 | fi | |
8821 | fi | |
8822 | fi | |
8823 | ;; | |
8824 | esac | |
8825 | if test "X$found_dir" != "X"; then | |
8826 | break | |
8827 | fi | |
8828 | done | |
8829 | fi | |
8830 | if test "X$found_dir" != "X"; then | |
8831 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
8832 | if test "X$found_so" != "X"; then | |
8833 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8834 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8835 | else | |
8836 | haveit= | |
8837 | for x in $ltrpathdirs; do | |
8838 | if test "X$x" = "X$found_dir"; then | |
8839 | haveit=yes | |
8840 | break | |
8841 | fi | |
8842 | done | |
8843 | if test -z "$haveit"; then | |
8844 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8845 | fi | |
8846 | if test "$hardcode_direct" = yes; then | |
8847 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8848 | else | |
8849 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8850 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8851 | haveit= | |
8852 | for x in $rpathdirs; do | |
8853 | if test "X$x" = "X$found_dir"; then | |
8854 | haveit=yes | |
8855 | break | |
8856 | fi | |
8857 | done | |
8858 | if test -z "$haveit"; then | |
8859 | rpathdirs="$rpathdirs $found_dir" | |
8860 | fi | |
8861 | else | |
8862 | haveit= | |
8863 | for x in $LDFLAGS $LIBIPT; do | |
8864 | ||
8865 | acl_save_prefix="$prefix" | |
8866 | prefix="$acl_final_prefix" | |
8867 | acl_save_exec_prefix="$exec_prefix" | |
8868 | exec_prefix="$acl_final_exec_prefix" | |
8869 | eval x=\"$x\" | |
8870 | exec_prefix="$acl_save_exec_prefix" | |
8871 | prefix="$acl_save_prefix" | |
8872 | ||
8873 | if test "X$x" = "X-L$found_dir"; then | |
8874 | haveit=yes | |
8875 | break | |
8876 | fi | |
8877 | done | |
8878 | if test -z "$haveit"; then | |
8879 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
8880 | fi | |
8881 | if test "$hardcode_minus_L" != no; then | |
8882 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
8883 | else | |
8884 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
8885 | fi | |
8886 | fi | |
8887 | fi | |
8888 | fi | |
8889 | else | |
8890 | if test "X$found_a" != "X"; then | |
8891 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
8892 | else | |
8893 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
8894 | fi | |
8895 | fi | |
8896 | additional_includedir= | |
8897 | case "$found_dir" in | |
8898 | */lib | */lib/) | |
8899 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8900 | additional_includedir="$basedir/include" | |
8901 | ;; | |
8902 | esac | |
8903 | if test "X$additional_includedir" != "X"; then | |
8904 | if test "X$additional_includedir" != "X/usr/include"; then | |
8905 | haveit= | |
8906 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8907 | if test -n "$GCC"; then | |
8908 | case $host_os in | |
8909 | linux*) haveit=yes;; | |
8910 | esac | |
8911 | fi | |
8912 | fi | |
8913 | if test -z "$haveit"; then | |
8914 | for x in $CPPFLAGS $INCIPT; do | |
8915 | ||
8916 | acl_save_prefix="$prefix" | |
8917 | prefix="$acl_final_prefix" | |
8918 | acl_save_exec_prefix="$exec_prefix" | |
8919 | exec_prefix="$acl_final_exec_prefix" | |
8920 | eval x=\"$x\" | |
8921 | exec_prefix="$acl_save_exec_prefix" | |
8922 | prefix="$acl_save_prefix" | |
8923 | ||
8924 | if test "X$x" = "X-I$additional_includedir"; then | |
8925 | haveit=yes | |
8926 | break | |
8927 | fi | |
8928 | done | |
8929 | if test -z "$haveit"; then | |
8930 | if test -d "$additional_includedir"; then | |
8931 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
8932 | fi | |
8933 | fi | |
8934 | fi | |
8935 | fi | |
8936 | fi | |
8937 | if test -n "$found_la"; then | |
8938 | save_libdir="$libdir" | |
8939 | case "$found_la" in | |
8940 | */* | *\\*) . "$found_la" ;; | |
8941 | *) . "./$found_la" ;; | |
8942 | esac | |
8943 | libdir="$save_libdir" | |
8944 | for dep in $dependency_libs; do | |
8945 | case "$dep" in | |
8946 | -L*) | |
8947 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8948 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8949 | haveit= | |
8950 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8951 | if test -n "$GCC"; then | |
8952 | case $host_os in | |
8953 | linux*) haveit=yes;; | |
8954 | esac | |
8955 | fi | |
8956 | fi | |
8957 | if test -z "$haveit"; then | |
8958 | haveit= | |
8959 | for x in $LDFLAGS $LIBIPT; do | |
8960 | ||
8961 | acl_save_prefix="$prefix" | |
8962 | prefix="$acl_final_prefix" | |
8963 | acl_save_exec_prefix="$exec_prefix" | |
8964 | exec_prefix="$acl_final_exec_prefix" | |
8965 | eval x=\"$x\" | |
8966 | exec_prefix="$acl_save_exec_prefix" | |
8967 | prefix="$acl_save_prefix" | |
8968 | ||
8969 | if test "X$x" = "X-L$additional_libdir"; then | |
8970 | haveit=yes | |
8971 | break | |
8972 | fi | |
8973 | done | |
8974 | if test -z "$haveit"; then | |
8975 | if test -d "$additional_libdir"; then | |
8976 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
8977 | fi | |
8978 | fi | |
8979 | haveit= | |
8980 | for x in $LDFLAGS $LTLIBIPT; do | |
8981 | ||
8982 | acl_save_prefix="$prefix" | |
8983 | prefix="$acl_final_prefix" | |
8984 | acl_save_exec_prefix="$exec_prefix" | |
8985 | exec_prefix="$acl_final_exec_prefix" | |
8986 | eval x=\"$x\" | |
8987 | exec_prefix="$acl_save_exec_prefix" | |
8988 | prefix="$acl_save_prefix" | |
8989 | ||
8990 | if test "X$x" = "X-L$additional_libdir"; then | |
8991 | haveit=yes | |
8992 | break | |
8993 | fi | |
8994 | done | |
8995 | if test -z "$haveit"; then | |
8996 | if test -d "$additional_libdir"; then | |
8997 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
8998 | fi | |
8999 | fi | |
9000 | fi | |
9001 | fi | |
9002 | ;; | |
9003 | -R*) | |
9004 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9005 | if test "$enable_rpath" != no; then | |
9006 | haveit= | |
9007 | for x in $rpathdirs; do | |
9008 | if test "X$x" = "X$dir"; then | |
9009 | haveit=yes | |
9010 | break | |
9011 | fi | |
9012 | done | |
9013 | if test -z "$haveit"; then | |
9014 | rpathdirs="$rpathdirs $dir" | |
9015 | fi | |
9016 | haveit= | |
9017 | for x in $ltrpathdirs; do | |
9018 | if test "X$x" = "X$dir"; then | |
9019 | haveit=yes | |
9020 | break | |
9021 | fi | |
9022 | done | |
9023 | if test -z "$haveit"; then | |
9024 | ltrpathdirs="$ltrpathdirs $dir" | |
9025 | fi | |
9026 | fi | |
9027 | ;; | |
9028 | -l*) | |
9029 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9030 | ;; | |
9031 | *.la) | |
9032 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9033 | ;; | |
9034 | *) | |
9035 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
9036 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
9037 | ;; | |
9038 | esac | |
9039 | done | |
9040 | fi | |
9041 | else | |
9042 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
9043 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
9044 | fi | |
9045 | fi | |
9046 | fi | |
9047 | done | |
9048 | done | |
9049 | if test "X$rpathdirs" != "X"; then | |
9050 | if test -n "$hardcode_libdir_separator"; then | |
9051 | alldirs= | |
9052 | for found_dir in $rpathdirs; do | |
9053 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9054 | done | |
9055 | acl_save_libdir="$libdir" | |
9056 | libdir="$alldirs" | |
9057 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9058 | libdir="$acl_save_libdir" | |
9059 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
9060 | else | |
9061 | for found_dir in $rpathdirs; do | |
9062 | acl_save_libdir="$libdir" | |
9063 | libdir="$found_dir" | |
9064 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9065 | libdir="$acl_save_libdir" | |
9066 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
9067 | done | |
9068 | fi | |
9069 | fi | |
9070 | if test "X$ltrpathdirs" != "X"; then | |
9071 | for found_dir in $ltrpathdirs; do | |
9072 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
9073 | done | |
9074 | fi | |
5e030278 | 9075 | |
5e030278 | 9076 | |
05ea2a05 | 9077 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 9078 | |
05ea2a05 TT |
9079 | for element in $INCIPT; do |
9080 | haveit= | |
9081 | for x in $CPPFLAGS; do | |
5e030278 | 9082 | |
05ea2a05 TT |
9083 | acl_save_prefix="$prefix" |
9084 | prefix="$acl_final_prefix" | |
9085 | acl_save_exec_prefix="$exec_prefix" | |
9086 | exec_prefix="$acl_final_exec_prefix" | |
9087 | eval x=\"$x\" | |
9088 | exec_prefix="$acl_save_exec_prefix" | |
9089 | prefix="$acl_save_prefix" | |
9090 | ||
9091 | if test "X$x" = "X$element"; then | |
9092 | haveit=yes | |
9093 | break | |
9094 | fi | |
9095 | done | |
9096 | if test -z "$haveit"; then | |
9097 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9098 | fi | |
9099 | done | |
9100 | ||
9101 | ||
9102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 | |
9103 | $as_echo_n "checking for libipt... " >&6; } | |
9104 | if ${ac_cv_libipt+:} false; then : | |
9105 | $as_echo_n "(cached) " >&6 | |
9106 | else | |
9107 | ||
9108 | ac_save_LIBS="$LIBS" | |
9109 | LIBS="$LIBS $LIBIPT" | |
9110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 9111 | /* end confdefs.h. */ |
05ea2a05 TT |
9112 | #include "intel-pt.h" |
9113 | int | |
9114 | main () | |
9115 | { | |
9116 | pt_insn_alloc_decoder (0); | |
9117 | ; | |
9118 | return 0; | |
9119 | } | |
5e030278 TT |
9120 | _ACEOF |
9121 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
9122 | ac_cv_libipt=yes |
9123 | else | |
9124 | ac_cv_libipt=no | |
5e030278 TT |
9125 | fi |
9126 | rm -f core conftest.err conftest.$ac_objext \ | |
9127 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 9128 | LIBS="$ac_save_LIBS" |
5e030278 TT |
9129 | |
9130 | fi | |
05ea2a05 TT |
9131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
9132 | $as_echo "$ac_cv_libipt" >&6; } | |
9133 | if test "$ac_cv_libipt" = yes; then | |
9134 | HAVE_LIBIPT=yes | |
5e030278 | 9135 | |
05ea2a05 | 9136 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
5e030278 | 9137 | |
05ea2a05 TT |
9138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 |
9139 | $as_echo_n "checking how to link with libipt... " >&6; } | |
9140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
9141 | $as_echo "$LIBIPT" >&6; } | |
9142 | else | |
9143 | HAVE_LIBIPT=no | |
9144 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9145 | LIBIPT= | |
9146 | LTLIBIPT= | |
9147 | fi | |
5e030278 | 9148 | |
5e030278 | 9149 | |
5e030278 | 9150 | |
5e030278 | 9151 | |
5e030278 | 9152 | |
5e030278 | 9153 | |
05ea2a05 TT |
9154 | if test "$HAVE_LIBIPT" != yes; then |
9155 | if test "$with_intel_pt" = yes; then | |
9156 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
9157 | else | |
9158 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
9159 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
9160 | fi | |
9161 | else | |
9162 | save_LIBS=$LIBS | |
9163 | LIBS="$LIBS $LIBIPT" | |
9164 | for ac_func in pt_insn_event | |
9165 | do : | |
9166 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" | |
9167 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
9168 | cat >>confdefs.h <<_ACEOF | |
9169 | #define HAVE_PT_INSN_EVENT 1 | |
9170 | _ACEOF | |
5e030278 | 9171 | |
5e030278 | 9172 | fi |
05ea2a05 TT |
9173 | done |
9174 | ||
9175 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> | |
9176 | " | |
9177 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
9178 | ||
9179 | cat >>confdefs.h <<_ACEOF | |
9180 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
9181 | _ACEOF | |
5e030278 TT |
9182 | |
9183 | ||
5e030278 | 9184 | fi |
05ea2a05 TT |
9185 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
9186 | " | |
9187 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
5e030278 | 9188 | |
05ea2a05 TT |
9189 | cat >>confdefs.h <<_ACEOF |
9190 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
9191 | _ACEOF | |
5e030278 | 9192 | |
5e030278 | 9193 | |
05ea2a05 | 9194 | fi |
5e030278 | 9195 | |
05ea2a05 TT |
9196 | LIBS=$save_LIBS |
9197 | fi | |
9198 | fi | |
9199 | ||
9200 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
9201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
9202 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
9203 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
9204 | $as_echo_n "(cached) " >&6 | |
9205 | else | |
9206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 9207 | /* end confdefs.h. */ |
05ea2a05 TT |
9208 | |
9209 | #define _SYSCALL32 | |
9210 | /* Needed for new procfs interface on sparc-solaris. */ | |
9211 | #define _STRUCTURED_PROC 1 | |
9212 | #include <sys/procfs.h> | |
5e030278 TT |
9213 | int |
9214 | main () | |
9215 | { | |
05ea2a05 | 9216 | gregset_t avar |
5e030278 TT |
9217 | ; |
9218 | return 0; | |
9219 | } | |
9220 | _ACEOF | |
05ea2a05 TT |
9221 | if ac_fn_c_try_compile "$LINENO"; then : |
9222 | bfd_cv_have_sys_procfs_type_gregset_t=yes | |
9223 | else | |
9224 | bfd_cv_have_sys_procfs_type_gregset_t=no | |
5e030278 | 9225 | |
5e030278 | 9226 | fi |
05ea2a05 | 9227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
9228 | fi |
9229 | ||
05ea2a05 | 9230 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
5e030278 | 9231 | |
05ea2a05 TT |
9232 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
9233 | ||
9234 | fi | |
9235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
9236 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
9237 | ||
9238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
9239 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
9240 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
5e030278 TT |
9241 | $as_echo_n "(cached) " >&6 |
9242 | else | |
05ea2a05 | 9243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e030278 | 9244 | /* end confdefs.h. */ |
05ea2a05 TT |
9245 | |
9246 | #define _SYSCALL32 | |
9247 | /* Needed for new procfs interface on sparc-solaris. */ | |
9248 | #define _STRUCTURED_PROC 1 | |
9249 | #include <sys/procfs.h> | |
5e030278 TT |
9250 | int |
9251 | main () | |
9252 | { | |
05ea2a05 | 9253 | fpregset_t avar |
5e030278 TT |
9254 | ; |
9255 | return 0; | |
9256 | } | |
9257 | _ACEOF | |
05ea2a05 TT |
9258 | if ac_fn_c_try_compile "$LINENO"; then : |
9259 | bfd_cv_have_sys_procfs_type_fpregset_t=yes | |
9260 | else | |
9261 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
5e030278 TT |
9262 | |
9263 | fi | |
05ea2a05 TT |
9264 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9265 | fi | |
5e030278 | 9266 | |
05ea2a05 | 9267 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
5e030278 | 9268 | |
05ea2a05 | 9269 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
5e030278 | 9270 | |
05ea2a05 TT |
9271 | fi |
9272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
9273 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
5e030278 | 9274 | |
05ea2a05 TT |
9275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
9276 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
9277 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
5e030278 TT |
9278 | $as_echo_n "(cached) " >&6 |
9279 | else | |
05ea2a05 TT |
9280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9281 | /* end confdefs.h. */ | |
5e030278 | 9282 | |
05ea2a05 TT |
9283 | #define _SYSCALL32 |
9284 | /* Needed for new procfs interface on sparc-solaris. */ | |
9285 | #define _STRUCTURED_PROC 1 | |
9286 | #include <sys/procfs.h> | |
9287 | int | |
9288 | main () | |
9289 | { | |
9290 | prgregset_t avar | |
9291 | ; | |
9292 | return 0; | |
9293 | } | |
9294 | _ACEOF | |
9295 | if ac_fn_c_try_compile "$LINENO"; then : | |
9296 | bfd_cv_have_sys_procfs_type_prgregset_t=yes | |
9297 | else | |
9298 | bfd_cv_have_sys_procfs_type_prgregset_t=no | |
9299 | ||
9300 | fi | |
9301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5e030278 TT |
9302 | fi |
9303 | ||
05ea2a05 TT |
9304 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
9305 | ||
9306 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h | |
9307 | ||
9308 | fi | |
9309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
9310 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
9311 | ||
9312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
9313 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
9314 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
5e030278 TT |
9315 | $as_echo_n "(cached) " >&6 |
9316 | else | |
9317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9318 | /* end confdefs.h. */ | |
05ea2a05 TT |
9319 | |
9320 | #define _SYSCALL32 | |
9321 | /* Needed for new procfs interface on sparc-solaris. */ | |
9322 | #define _STRUCTURED_PROC 1 | |
9323 | #include <sys/procfs.h> | |
5e030278 TT |
9324 | int |
9325 | main () | |
9326 | { | |
05ea2a05 | 9327 | prfpregset_t avar |
5e030278 TT |
9328 | ; |
9329 | return 0; | |
9330 | } | |
9331 | _ACEOF | |
05ea2a05 TT |
9332 | if ac_fn_c_try_compile "$LINENO"; then : |
9333 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes | |
5e030278 | 9334 | else |
05ea2a05 | 9335 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
5e030278 TT |
9336 | |
9337 | fi | |
05ea2a05 TT |
9338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9339 | fi | |
5e030278 | 9340 | |
05ea2a05 | 9341 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
5e030278 | 9342 | |
05ea2a05 | 9343 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
5e030278 | 9344 | |
05ea2a05 TT |
9345 | fi |
9346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
9347 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
5e030278 | 9348 | |
05ea2a05 TT |
9349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
9350 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
9351 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
5e030278 TT |
9352 | $as_echo_n "(cached) " >&6 |
9353 | else | |
05ea2a05 TT |
9354 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9355 | /* end confdefs.h. */ | |
9356 | ||
9357 | #define _SYSCALL32 | |
9358 | /* Needed for new procfs interface on sparc-solaris. */ | |
9359 | #define _STRUCTURED_PROC 1 | |
9360 | #include <sys/procfs.h> | |
9361 | int | |
9362 | main () | |
9363 | { | |
9364 | prgregset32_t avar | |
9365 | ; | |
9366 | return 0; | |
9367 | } | |
9368 | _ACEOF | |
9369 | if ac_fn_c_try_compile "$LINENO"; then : | |
9370 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes | |
5e030278 | 9371 | else |
05ea2a05 | 9372 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
5e030278 TT |
9373 | |
9374 | fi | |
05ea2a05 | 9375 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e030278 TT |
9376 | fi |
9377 | ||
05ea2a05 | 9378 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
5e030278 | 9379 | |
05ea2a05 | 9380 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
5e030278 | 9381 | |
05ea2a05 TT |
9382 | fi |
9383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
9384 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
5e030278 | 9385 | |
05ea2a05 TT |
9386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
9387 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
9388 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
9389 | $as_echo_n "(cached) " >&6 | |
9390 | else | |
9391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9392 | /* end confdefs.h. */ | |
5e030278 | 9393 | |
05ea2a05 TT |
9394 | #define _SYSCALL32 |
9395 | /* Needed for new procfs interface on sparc-solaris. */ | |
9396 | #define _STRUCTURED_PROC 1 | |
9397 | #include <sys/procfs.h> | |
9398 | int | |
9399 | main () | |
9400 | { | |
9401 | lwpid_t avar | |
9402 | ; | |
9403 | return 0; | |
9404 | } | |
9405 | _ACEOF | |
9406 | if ac_fn_c_try_compile "$LINENO"; then : | |
9407 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
9408 | else | |
9409 | bfd_cv_have_sys_procfs_type_lwpid_t=no | |
5e030278 | 9410 | |
05ea2a05 TT |
9411 | fi |
9412 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9413 | fi | |
5e030278 | 9414 | |
05ea2a05 | 9415 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
5e030278 | 9416 | |
05ea2a05 | 9417 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
5e030278 | 9418 | |
05ea2a05 TT |
9419 | fi |
9420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
9421 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
5e030278 | 9422 | |
05ea2a05 TT |
9423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
9424 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
9425 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
5e030278 TT |
9426 | $as_echo_n "(cached) " >&6 |
9427 | else | |
9428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9429 | /* end confdefs.h. */ | |
05ea2a05 TT |
9430 | |
9431 | #define _SYSCALL32 | |
9432 | /* Needed for new procfs interface on sparc-solaris. */ | |
9433 | #define _STRUCTURED_PROC 1 | |
9434 | #include <sys/procfs.h> | |
5e030278 TT |
9435 | int |
9436 | main () | |
9437 | { | |
05ea2a05 | 9438 | psaddr_t avar |
5e030278 TT |
9439 | ; |
9440 | return 0; | |
9441 | } | |
9442 | _ACEOF | |
05ea2a05 TT |
9443 | if ac_fn_c_try_compile "$LINENO"; then : |
9444 | bfd_cv_have_sys_procfs_type_psaddr_t=yes | |
5e030278 | 9445 | else |
05ea2a05 TT |
9446 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
9447 | ||
5e030278 TT |
9448 | fi |
9449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9450 | fi | |
5e030278 | 9451 | |
05ea2a05 | 9452 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
5e030278 | 9453 | |
05ea2a05 | 9454 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
5e030278 | 9455 | |
05ea2a05 TT |
9456 | fi |
9457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
9458 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
5e030278 | 9459 | |
05ea2a05 TT |
9460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 |
9461 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } | |
9462 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
e9bcb658 GB |
9463 | $as_echo_n "(cached) " >&6 |
9464 | else | |
9465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9466 | /* end confdefs.h. */ | |
9467 | ||
05ea2a05 TT |
9468 | #define _SYSCALL32 |
9469 | /* Needed for new procfs interface on sparc-solaris. */ | |
9470 | #define _STRUCTURED_PROC 1 | |
9471 | #include <sys/procfs.h> | |
e9bcb658 GB |
9472 | int |
9473 | main () | |
9474 | { | |
05ea2a05 | 9475 | elf_fpregset_t avar |
e9bcb658 GB |
9476 | ; |
9477 | return 0; | |
9478 | } | |
9479 | _ACEOF | |
9480 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 9481 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
e9bcb658 | 9482 | else |
05ea2a05 TT |
9483 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
9484 | ||
e9bcb658 GB |
9485 | fi |
9486 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9487 | fi | |
e9bcb658 | 9488 | |
05ea2a05 TT |
9489 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
9490 | ||
9491 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h | |
9492 | ||
9493 | fi | |
9494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
9495 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
e9bcb658 | 9496 | |
25c51f71 | 9497 | fi |
e9bcb658 | 9498 | |
3266f10b | 9499 | |
eb7aa561 PA |
9500 | # Check the return and argument types of ptrace. |
9501 | ||
9502 | ||
9503 | for ac_header in sys/ptrace.h ptrace.h | |
9504 | do : | |
9505 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9506 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
d0ac1c44 | 9507 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
eb7aa561 PA |
9508 | cat >>confdefs.h <<_ACEOF |
9509 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9510 | _ACEOF | |
9511 | ||
9512 | fi | |
9513 | ||
9514 | done | |
9515 | ||
9516 | ||
9517 | gdb_ptrace_headers=' | |
9518 | #include <sys/types.h> | |
9519 | #if HAVE_SYS_PTRACE_H | |
9520 | # include <sys/ptrace.h> | |
9521 | #endif | |
9522 | #if HAVE_UNISTD_H | |
9523 | # include <unistd.h> | |
9524 | #endif | |
9525 | ' | |
9526 | # There is no point in checking if we don't have a prototype. | |
9b30624b | 9527 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
eb7aa561 | 9528 | " |
d0ac1c44 | 9529 | if test "x$ac_cv_have_decl_ptrace" = xyes; then : |
eb7aa561 PA |
9530 | ac_have_decl=1 |
9531 | else | |
9532 | ac_have_decl=0 | |
9533 | fi | |
9534 | ||
9535 | cat >>confdefs.h <<_ACEOF | |
9536 | #define HAVE_DECL_PTRACE $ac_have_decl | |
9537 | _ACEOF | |
9538 | if test $ac_have_decl = 1; then : | |
9539 | ||
9540 | else | |
9541 | ||
9542 | : ${gdb_cv_func_ptrace_ret='int'} | |
9543 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
9544 | ||
9545 | fi | |
9546 | ||
9547 | # Check return type. Varargs (used on GNU/Linux) conflict with the | |
9548 | # empty argument list, so check for that explicitly. | |
9549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
9550 | $as_echo_n "checking return type of ptrace... " >&6; } | |
d0ac1c44 | 9551 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
eb7aa561 PA |
9552 | $as_echo_n "(cached) " >&6 |
9553 | else | |
9554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9555 | /* end confdefs.h. */ | |
9556 | $gdb_ptrace_headers | |
9557 | int | |
9558 | main () | |
9559 | { | |
9560 | extern long ptrace (enum __ptrace_request, ...); | |
9561 | ; | |
9562 | return 0; | |
9563 | } | |
9564 | _ACEOF | |
9b30624b | 9565 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9566 | gdb_cv_func_ptrace_ret='long' |
9567 | else | |
9568 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9569 | /* end confdefs.h. */ | |
9570 | $gdb_ptrace_headers | |
9571 | int | |
9572 | main () | |
9573 | { | |
9574 | extern int ptrace (); | |
9575 | ; | |
9576 | return 0; | |
9577 | } | |
9578 | _ACEOF | |
9b30624b | 9579 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9580 | gdb_cv_func_ptrace_ret='int' |
9581 | else | |
9582 | gdb_cv_func_ptrace_ret='long' | |
9583 | fi | |
9584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9585 | fi | |
9586 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9587 | fi | |
9588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 | |
9589 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
9590 | ||
9591 | cat >>confdefs.h <<_ACEOF | |
9592 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
9593 | _ACEOF | |
9594 | ||
9595 | # Check argument types. | |
9596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
9597 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
d0ac1c44 | 9598 | if ${gdb_cv_func_ptrace_args+:} false; then : |
eb7aa561 PA |
9599 | $as_echo_n "(cached) " >&6 |
9600 | else | |
9601 | ||
9602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9603 | /* end confdefs.h. */ | |
9604 | $gdb_ptrace_headers | |
9605 | int | |
9606 | main () | |
9607 | { | |
9608 | extern long ptrace (enum __ptrace_request, ...); | |
9609 | ; | |
9610 | return 0; | |
9611 | } | |
9612 | _ACEOF | |
9b30624b | 9613 | if ac_fn_c_try_compile "$LINENO"; then : |
54019719 | 9614 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
eb7aa561 PA |
9615 | else |
9616 | ||
9617 | for gdb_arg1 in 'int' 'long'; do | |
9618 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
9619 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
9620 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
9621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9622 | /* end confdefs.h. */ | |
9623 | $gdb_ptrace_headers | |
9624 | int | |
9625 | main () | |
9626 | { | |
9627 | ||
9628 | extern $gdb_cv_func_ptrace_ret | |
9629 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
9630 | ||
9631 | ; | |
9632 | return 0; | |
9633 | } | |
9634 | _ACEOF | |
9b30624b | 9635 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9636 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
9637 | break 4; | |
9638 | fi | |
9639 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9640 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
9641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9642 | /* end confdefs.h. */ | |
9643 | $gdb_ptrace_headers | |
9644 | int | |
9645 | main () | |
9646 | { | |
9647 | ||
9648 | extern $gdb_cv_func_ptrace_ret | |
9649 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
9650 | ||
9651 | ; | |
9652 | return 0; | |
9653 | } | |
9654 | _ACEOF | |
9b30624b | 9655 | if ac_fn_c_try_compile "$LINENO"; then : |
eb7aa561 PA |
9656 | |
9657 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
9658 | break 5; | |
9659 | fi | |
9660 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9661 | done | |
9662 | done | |
9663 | done | |
9664 | done | |
9665 | done | |
9666 | # Provide a safe default value. | |
9667 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
9668 | ||
9669 | fi | |
9670 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9671 | fi | |
9672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
9673 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
9674 | ac_save_IFS=$IFS; IFS=',' | |
9675 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
9676 | IFS=$ac_save_IFS | |
9677 | shift | |
9678 | ||
54019719 PA |
9679 | cat >>confdefs.h <<_ACEOF |
9680 | #define PTRACE_TYPE_ARG1 $1 | |
9681 | _ACEOF | |
9682 | ||
9683 | ||
eb7aa561 PA |
9684 | cat >>confdefs.h <<_ACEOF |
9685 | #define PTRACE_TYPE_ARG3 $3 | |
9686 | _ACEOF | |
9687 | ||
9688 | ||
9689 | cat >>confdefs.h <<_ACEOF | |
9690 | #define PTRACE_TYPE_ARG4 $4 | |
9691 | _ACEOF | |
9692 | ||
9693 | if test -n "$5"; then | |
9694 | ||
9695 | cat >>confdefs.h <<_ACEOF | |
9696 | #define PTRACE_TYPE_ARG5 $5 | |
9697 | _ACEOF | |
9698 | ||
9699 | fi | |
9700 | ||
9701 | ||
0fb4aa4b PA |
9702 | # Check for UST |
9703 | ustlibs="" | |
9704 | ustinc="" | |
9705 | ||
9706 | ||
9707 | # Check whether --with-ust was given. | |
9708 | if test "${with_ust+set}" = set; then : | |
9709 | withval=$with_ust; | |
9710 | fi | |
9711 | ||
9712 | ||
9713 | # Check whether --with-ust_include was given. | |
9714 | if test "${with_ust_include+set}" = set; then : | |
9715 | withval=$with_ust_include; | |
9716 | fi | |
9717 | ||
9718 | ||
9719 | # Check whether --with-ust_lib was given. | |
9720 | if test "${with_ust_lib+set}" = set; then : | |
9721 | withval=$with_ust_lib; | |
9722 | fi | |
9723 | ||
9724 | ||
9725 | case $with_ust in | |
9726 | no) | |
9727 | ustlibs= | |
9728 | ustinc= | |
9729 | ;; | |
9730 | "" | yes) | |
9731 | ustlibs=" -lust " | |
9732 | ustinc="" | |
9733 | ;; | |
9734 | *) | |
9735 | ustlibs="-L$with_ust/lib -lust" | |
9736 | ustinc="-I$with_ust/include " | |
9737 | ;; | |
9738 | esac | |
9739 | if test "x$with_ust_include" != x; then | |
9740 | ustinc="-I$with_ust_include " | |
9741 | fi | |
9742 | if test "x$with_ust_lib" != x; then | |
9743 | ustlibs="-L$with_ust_lib -lust" | |
9744 | fi | |
9745 | ||
9746 | if test "x$with_ust" != "xno"; then | |
9747 | saved_CFLAGS="$CFLAGS" | |
9748 | CFLAGS="$CFLAGS $ustinc" | |
9749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5 | |
9750 | $as_echo_n "checking for ust... " >&6; } | |
9751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9752 | /* end confdefs.h. */ | |
9753 | ||
9754 | #define CONFIG_UST_GDB_INTEGRATION | |
9755 | #include <ust/ust.h> | |
9756 | ||
9757 | int | |
9758 | main () | |
9759 | { | |
9760 | ||
9761 | ; | |
9762 | return 0; | |
9763 | } | |
9764 | _ACEOF | |
9765 | if ac_fn_c_try_compile "$LINENO"; then : | |
9766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
9767 | $as_echo "yes" >&6; }; | |
9768 | $as_echo "#define HAVE_UST 1" >>confdefs.h | |
9769 | ||
9770 | else | |
9771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9772 | $as_echo "no" >&6; }; ustlibs= ; ustinc= | |
9773 | fi | |
9774 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9775 | CFLAGS="$saved_CFLAGS" | |
9776 | fi | |
9777 | ||
9778 | # Flags needed for UST | |
9779 | ||
9780 | ||
9781 | ||
8f13a3ce | 9782 | |
d4596a3d PA |
9783 | # Check whether --enable-werror was given. |
9784 | if test "${enable_werror+set}" = set; then : | |
9785 | enableval=$enable_werror; case "${enableval}" in | |
9786 | yes | y) ERROR_ON_WARNING="yes" ;; | |
9787 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 9788 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
d4596a3d PA |
9789 | esac |
9790 | fi | |
9791 | ||
9792 | ||
9a084706 | 9793 | # Enable -Werror by default when using gcc. Turn it off for releases. |
8f13a3ce | 9794 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
d4596a3d PA |
9795 | ERROR_ON_WARNING=yes |
9796 | fi | |
9797 | ||
9798 | WERROR_CFLAGS="" | |
9799 | if test "${ERROR_ON_WARNING}" = yes ; then | |
9800 | WERROR_CFLAGS="-Werror" | |
9801 | fi | |
9802 | ||
cf6de44d | 9803 | # The options we'll try to enable. |
aac331e4 | 9804 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 9805 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
8f13a3ce | 9806 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 9807 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 9808 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
458412c3 | 9809 | -Wno-mismatched-tags \ |
632e107b | 9810 | -Wno-error=deprecated-register \ |
85e26832 | 9811 | -Wsuggest-override \ |
1a34f210 | 9812 | -Wimplicit-fallthrough=3 \ |
96643e35 | 9813 | -Wduplicated-cond \ |
33a6bc35 TT |
9814 | -Wshadow=local \ |
9815 | -Wdeprecated-copy \ | |
9816 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 9817 | -Wredundant-move \ |
8ddd8e0e | 9818 | -Wmissing-declarations \ |
898e7f60 SM |
9819 | -Wstrict-null-sentinel \ |
9820 | " | |
8f13a3ce | 9821 | |
8f13a3ce | 9822 | case "${host}" in |
5bfda255 YQ |
9823 | *-*-mingw32*) |
9824 | # Enable -Wno-format by default when using gcc on mingw since many | |
9825 | # GCC versions complain about %I64. | |
9826 | build_warnings="$build_warnings -Wno-format" ;; | |
9827 | *-*-solaris*) | |
9828 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
9829 | # doesn't understand. | |
9830 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
9831 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
9832 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
9833 | *) |
9834 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
9835 | # but there's a special case for this below. | |
9836 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
8f13a3ce MF |
9837 | esac |
9838 | ||
9839 | # Check whether --enable-build-warnings was given. | |
9840 | if test "${enable_build_warnings+set}" = set; then : | |
9841 | enableval=$enable_build_warnings; case "${enableval}" in | |
9842 | yes) ;; | |
9843 | no) build_warnings="-w";; | |
9844 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9845 | build_warnings="${build_warnings} ${t}";; | |
9846 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9847 | build_warnings="${t} ${build_warnings}";; | |
9848 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9849 | esac | |
9850 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9851 | echo "Setting compiler warning flags = $build_warnings" 6>&1 | |
9852 | fi | |
9853 | fi | |
9854 | # Check whether --enable-gdb-build-warnings was given. | |
9855 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
9856 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
9857 | yes) ;; | |
9858 | no) build_warnings="-w";; | |
9859 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9860 | build_warnings="${build_warnings} ${t}";; | |
9861 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
9862 | build_warnings="${t} ${build_warnings}";; | |
9863 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
9864 | esac | |
9865 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
9866 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
9867 | fi | |
3bc3d82a PA |
9868 | fi |
9869 | ||
9870 | # The set of warnings supported by a C++ compiler is not the same as | |
9871 | # of the C compiler. | |
cf6de44d | 9872 | ac_ext=cpp |
3bc3d82a PA |
9873 | ac_cpp='$CXXCPP $CPPFLAGS' |
9874 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9875 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9876 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
9877 | ||
3bc3d82a | 9878 | |
d4596a3d | 9879 | WARN_CFLAGS="" |
8f13a3ce | 9880 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
d4596a3d PA |
9881 | then |
9882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 | |
9883 | $as_echo_n "checking compiler warning flags... " >&6; } | |
9884 | # Separate out the -Werror flag as some files just cannot be | |
9885 | # compiled with it enabled. | |
9886 | for w in ${build_warnings}; do | |
7544db95 PA |
9887 | # GCC does not complain about -Wno-unknown-warning. Invert |
9888 | # and test -Wunknown-warning instead. | |
9889 | case $w in | |
9890 | -Wno-*) | |
9891 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
9892 | -Wformat-nonliteral) |
9893 | # gcc requires -Wformat before -Wformat-nonliteral | |
9894 | # will work, so stick them together. | |
9895 | w="-Wformat $w" | |
9896 | wtest="$w" | |
9897 | ;; | |
7544db95 PA |
9898 | *) |
9899 | wtest=$w ;; | |
9900 | esac | |
9901 | ||
d4596a3d PA |
9902 | case $w in |
9903 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
9904 | *) |
9905 | # Check whether GCC accepts it. | |
d4596a3d | 9906 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 9907 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 9908 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 9909 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
9910 | if test "x$w" = "x-Wunused-variable"; then |
9911 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
9912 | # fixed in GCC 4.9. This test is derived from the gdb | |
9913 | # source code that triggered this bug in GCC. | |
9914 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9915 | /* end confdefs.h. */ | |
9916 | struct scoped_restore_base {}; | |
9917 | struct scoped_restore_tmpl : public scoped_restore_base { | |
9918 | ~scoped_restore_tmpl() {} | |
9919 | }; | |
9920 | int | |
9921 | main () | |
9922 | { | |
9923 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
9924 | ; | |
9925 | return 0; | |
9926 | } | |
9927 | _ACEOF | |
9928 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
9929 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
9930 | fi | |
9931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9932 | else | |
9933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d4596a3d PA |
9934 | /* end confdefs.h. */ |
9935 | ||
9936 | int | |
9937 | main () | |
9938 | { | |
9939 | ||
9940 | ; | |
9941 | return 0; | |
9942 | } | |
9943 | _ACEOF | |
3bc3d82a | 9944 | if ac_fn_cxx_try_compile "$LINENO"; then : |
d4596a3d PA |
9945 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
9946 | fi | |
9947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a0de763e | 9948 | fi |
d4596a3d | 9949 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 9950 | CXXFLAGS="$saved_CXXFLAGS" |
d4596a3d PA |
9951 | esac |
9952 | done | |
9953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 | |
9954 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
9955 | fi | |
9956 | ||
9957 | ||
9958 | ||
cf6de44d | 9959 | ac_ext=c |
3bc3d82a PA |
9960 | ac_cpp='$CPP $CPPFLAGS' |
9961 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
9962 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
9963 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
9964 | ||
3bc3d82a | 9965 | |
8f13a3ce | 9966 | |
10e86dd7 DE |
9967 | old_LIBS="$LIBS" |
9968 | LIBS="$LIBS -ldl" | |
9969 | for ac_func in dladdr | |
9970 | do : | |
9971 | ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr" | |
d0ac1c44 | 9972 | if test "x$ac_cv_func_dladdr" = xyes; then : |
10e86dd7 DE |
9973 | cat >>confdefs.h <<_ACEOF |
9974 | #define HAVE_DLADDR 1 | |
9975 | _ACEOF | |
9976 | ||
9977 | fi | |
9978 | done | |
9979 | ||
9980 | LIBS="$old_LIBS" | |
9981 | ||
07697489 PA |
9982 | |
9983 | # Check for presence and size of long long. | |
9984 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
d0ac1c44 | 9985 | if test "x$ac_cv_type_long_long" = xyes; then : |
07697489 PA |
9986 | |
9987 | cat >>confdefs.h <<_ACEOF | |
9988 | #define HAVE_LONG_LONG 1 | |
9989 | _ACEOF | |
9990 | ||
9991 | # The cast to long int works around a bug in the HP C Compiler | |
9992 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9993 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9994 | # This bug is HP SR number 8606223364. | |
9995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
9996 | $as_echo_n "checking size of long long... " >&6; } | |
d0ac1c44 | 9997 | if ${ac_cv_sizeof_long_long+:} false; then : |
07697489 PA |
9998 | $as_echo_n "(cached) " >&6 |
9999 | else | |
10000 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
10001 | ||
10002 | else | |
10003 | if test "$ac_cv_type_long_long" = yes; then | |
10004 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10005 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
10006 | as_fn_error 77 "cannot compute sizeof (long long) |
10007 | See \`config.log' for more details" "$LINENO" 5; } | |
07697489 PA |
10008 | else |
10009 | ac_cv_sizeof_long_long=0 | |
10010 | fi | |
10011 | fi | |
10012 | ||
10013 | fi | |
10014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
10015 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
10016 | ||
10017 | ||
10018 | ||
10019 | cat >>confdefs.h <<_ACEOF | |
10020 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
10021 | _ACEOF | |
10022 | ||
10023 | ||
10024 | fi | |
10025 | ||
10026 | ||
d0ac1c44 SM |
10027 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
10028 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
10029 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
07697489 PA |
10030 | ac_have_decl=1 |
10031 | else | |
10032 | ac_have_decl=0 | |
10033 | fi | |
10034 | ||
10035 | cat >>confdefs.h <<_ACEOF | |
10036 | #define HAVE_DECL_BASENAME $ac_have_decl | |
10037 | _ACEOF | |
10038 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" | |
d0ac1c44 | 10039 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
07697489 PA |
10040 | ac_have_decl=1 |
10041 | else | |
10042 | ac_have_decl=0 | |
10043 | fi | |
10044 | ||
10045 | cat >>confdefs.h <<_ACEOF | |
10046 | #define HAVE_DECL_FFS $ac_have_decl | |
10047 | _ACEOF | |
10048 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
d0ac1c44 | 10049 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
07697489 PA |
10050 | ac_have_decl=1 |
10051 | else | |
10052 | ac_have_decl=0 | |
10053 | fi | |
10054 | ||
10055 | cat >>confdefs.h <<_ACEOF | |
10056 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
10057 | _ACEOF | |
10058 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
d0ac1c44 | 10059 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
07697489 PA |
10060 | ac_have_decl=1 |
10061 | else | |
10062 | ac_have_decl=0 | |
10063 | fi | |
10064 | ||
10065 | cat >>confdefs.h <<_ACEOF | |
10066 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10067 | _ACEOF | |
10068 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
d0ac1c44 | 10069 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
07697489 PA |
10070 | ac_have_decl=1 |
10071 | else | |
10072 | ac_have_decl=0 | |
10073 | fi | |
10074 | ||
10075 | cat >>confdefs.h <<_ACEOF | |
10076 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
10077 | _ACEOF | |
10078 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 10079 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
07697489 PA |
10080 | ac_have_decl=1 |
10081 | else | |
10082 | ac_have_decl=0 | |
10083 | fi | |
10084 | ||
10085 | cat >>confdefs.h <<_ACEOF | |
10086 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10087 | _ACEOF | |
10088 | ||
10089 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" | |
d0ac1c44 | 10090 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
07697489 PA |
10091 | ac_have_decl=1 |
10092 | else | |
10093 | ac_have_decl=0 | |
10094 | fi | |
10095 | ||
10096 | cat >>confdefs.h <<_ACEOF | |
10097 | #define HAVE_DECL_STRTOL $ac_have_decl | |
10098 | _ACEOF | |
10099 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
d0ac1c44 | 10100 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
07697489 PA |
10101 | ac_have_decl=1 |
10102 | else | |
10103 | ac_have_decl=0 | |
10104 | fi | |
10105 | ||
10106 | cat >>confdefs.h <<_ACEOF | |
10107 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
10108 | _ACEOF | |
10109 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
d0ac1c44 | 10110 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
07697489 PA |
10111 | ac_have_decl=1 |
10112 | else | |
10113 | ac_have_decl=0 | |
10114 | fi | |
10115 | ||
10116 | cat >>confdefs.h <<_ACEOF | |
10117 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
10118 | _ACEOF | |
10119 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
d0ac1c44 | 10120 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
07697489 PA |
10121 | ac_have_decl=1 |
10122 | else | |
10123 | ac_have_decl=0 | |
10124 | fi | |
10125 | ||
10126 | cat >>confdefs.h <<_ACEOF | |
10127 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
10128 | _ACEOF | |
10129 | ||
10130 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" | |
d0ac1c44 | 10131 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
07697489 PA |
10132 | ac_have_decl=1 |
10133 | else | |
10134 | ac_have_decl=0 | |
10135 | fi | |
10136 | ||
10137 | cat >>confdefs.h <<_ACEOF | |
10138 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
10139 | _ACEOF | |
10140 | ||
10141 | ||
10142 | ||
81ecdfbb | 10143 | ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default" |
d0ac1c44 | 10144 | if test "x$ac_cv_have_decl_perror" = xyes; then : |
81ecdfbb RW |
10145 | ac_have_decl=1 |
10146 | else | |
10147 | ac_have_decl=0 | |
f450004a | 10148 | fi |
81ecdfbb RW |
10149 | |
10150 | cat >>confdefs.h <<_ACEOF | |
10151 | #define HAVE_DECL_PERROR $ac_have_decl | |
10152 | _ACEOF | |
bb0116a4 | 10153 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
d0ac1c44 | 10154 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
bb0116a4 JB |
10155 | ac_have_decl=1 |
10156 | else | |
10157 | ac_have_decl=0 | |
10158 | fi | |
10159 | ||
10160 | cat >>confdefs.h <<_ACEOF | |
10161 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
10162 | _ACEOF | |
10163 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
d0ac1c44 | 10164 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
bb0116a4 JB |
10165 | ac_have_decl=1 |
10166 | else | |
10167 | ac_have_decl=0 | |
10168 | fi | |
10169 | ||
10170 | cat >>confdefs.h <<_ACEOF | |
10171 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
10172 | _ACEOF | |
81ecdfbb RW |
10173 | |
10174 | ||
3e019bdc SM |
10175 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
10176 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
10177 | # `struct user_regs_struct'. | |
f517c180 EA |
10178 | 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> |
10179 | #include <sys/user.h> | |
239b6d10 | 10180 | " |
d0ac1c44 | 10181 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then : |
239b6d10 WT |
10182 | |
10183 | cat >>confdefs.h <<_ACEOF | |
10184 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
10185 | _ACEOF | |
10186 | ||
10187 | ||
10188 | fi | |
f517c180 EA |
10189 | 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> |
10190 | #include <sys/user.h> | |
239b6d10 | 10191 | " |
d0ac1c44 | 10192 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then : |
239b6d10 WT |
10193 | |
10194 | cat >>confdefs.h <<_ACEOF | |
10195 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
10196 | _ACEOF | |
10197 | ||
10198 | ||
10199 | fi | |
10200 | ||
10201 | ||
10202 | ||
81ecdfbb RW |
10203 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
10204 | #include <sys/socket.h> | |
10205 | ||
10206 | " | |
d0ac1c44 | 10207 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
f450004a | 10208 | |
ccbd4912 | 10209 | cat >>confdefs.h <<_ACEOF |
f450004a DJ |
10210 | #define HAVE_SOCKLEN_T 1 |
10211 | _ACEOF | |
10212 | ||
f450004a | 10213 | |
ccbd4912 | 10214 | fi |
f450004a | 10215 | |
fb1e4ffc | 10216 | |
64da5dd5 JB |
10217 | case "${target}" in |
10218 | *-android*) | |
10219 | # Starting with NDK version 9, <elf.h> actually includes definitions | |
10220 | # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes | |
10221 | # <sys/exec_elf.h> which defines some of the ELF types incorrectly, | |
10222 | # leading to conflicts with the defintions from <linux/elf.h>. | |
10223 | # This makes it impossible for us to include both <elf.h> and | |
10224 | # <linux/elf.h>, which means that, in practice, we do not have | |
10225 | # access to Elf32_auxv_t and Elf64_auxv_t on this platform. | |
10226 | # Therefore, do not try to auto-detect availability, as it would | |
10227 | # get it wrong on this platform. | |
10228 | ;; | |
10229 | *) | |
10230 | ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> | |
8365dcf5 TJB |
10231 | |
10232 | " | |
d0ac1c44 | 10233 | if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then : |
8365dcf5 TJB |
10234 | |
10235 | cat >>confdefs.h <<_ACEOF | |
10236 | #define HAVE_ELF32_AUXV_T 1 | |
10237 | _ACEOF | |
10238 | ||
10239 | ||
10240 | fi | |
10241 | ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h> | |
10242 | ||
10243 | " | |
d0ac1c44 | 10244 | if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then : |
8365dcf5 TJB |
10245 | |
10246 | cat >>confdefs.h <<_ACEOF | |
10247 | #define HAVE_ELF64_AUXV_T 1 | |
10248 | _ACEOF | |
10249 | ||
10250 | ||
10251 | fi | |
10252 | ||
64da5dd5 | 10253 | esac |
8365dcf5 | 10254 | |
c16158bc JM |
10255 | |
10256 | ||
81ecdfbb RW |
10257 | # Check whether --with-pkgversion was given. |
10258 | if test "${with_pkgversion+set}" = set; then : | |
10259 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 10260 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
10261 | no) PKGVERSION= ;; |
10262 | *) PKGVERSION="($withval) " ;; | |
10263 | esac | |
10264 | else | |
10265 | PKGVERSION="(GDB) " | |
10266 | ||
81ecdfbb RW |
10267 | fi |
10268 | ||
c16158bc JM |
10269 | |
10270 | ||
10271 | ||
10272 | ||
81ecdfbb RW |
10273 | # Check whether --with-bugurl was given. |
10274 | if test "${with_bugurl+set}" = set; then : | |
10275 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 10276 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
10277 | no) BUGURL= |
10278 | ;; | |
10279 | *) BUGURL="$withval" | |
10280 | ;; | |
10281 | esac | |
10282 | else | |
10283 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
10284 | ||
81ecdfbb RW |
10285 | fi |
10286 | ||
c16158bc JM |
10287 | case ${BUGURL} in |
10288 | "") | |
10289 | REPORT_BUGS_TO= | |
10290 | REPORT_BUGS_TEXI= | |
10291 | ;; | |
10292 | *) | |
10293 | REPORT_BUGS_TO="<$BUGURL>" | |
10294 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
10295 | ;; | |
10296 | esac; | |
10297 | ||
10298 | ||
10299 | ||
10300 | ||
10301 | cat >>confdefs.h <<_ACEOF | |
10302 | #define PKGVERSION "$PKGVERSION" | |
10303 | _ACEOF | |
10304 | ||
10305 | ||
10306 | cat >>confdefs.h <<_ACEOF | |
10307 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
10308 | _ACEOF | |
10309 | ||
10310 | ||
8838b45e NS |
10311 | # Check for various supplementary target information (beyond the |
10312 | # triplet) which might affect the choices in configure.srv. | |
10313 | case "${target}" in | |
10314 | i[34567]86-*-linux*) | |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5 | |
10316 | $as_echo_n "checking if building for x86-64... " >&6; } | |
d0ac1c44 | 10317 | if ${gdb_cv_i386_is_x86_64+:} false; then : |
8838b45e NS |
10318 | $as_echo_n "(cached) " >&6 |
10319 | else | |
10320 | save_CPPFLAGS="$CPPFLAGS" | |
10321 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10323 | /* end confdefs.h. */ | |
10324 | ||
10325 | #if __x86_64__ | |
10326 | got it | |
10327 | #endif | |
10328 | ||
10329 | _ACEOF | |
10330 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10331 | $EGREP "got it" >/dev/null 2>&1; then : | |
10332 | gdb_cv_i386_is_x86_64=yes | |
10333 | else | |
10334 | gdb_cv_i386_is_x86_64=no | |
10335 | fi | |
10336 | rm -f conftest* | |
10337 | ||
10338 | CPPFLAGS="$save_CPPFLAGS" | |
10339 | fi | |
10340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5 | |
10341 | $as_echo "$gdb_cv_i386_is_x86_64" >&6; } | |
10342 | ;; | |
201506da PA |
10343 | |
10344 | x86_64-*-linux*) | |
10345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5 | |
10346 | $as_echo_n "checking if building for x32... " >&6; } | |
d0ac1c44 | 10347 | if ${gdb_cv_x86_is_x32+:} false; then : |
201506da PA |
10348 | $as_echo_n "(cached) " >&6 |
10349 | else | |
10350 | save_CPPFLAGS="$CPPFLAGS" | |
10351 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10353 | /* end confdefs.h. */ | |
10354 | ||
10355 | #if __x86_64__ && __ILP32__ | |
10356 | got it | |
10357 | #endif | |
10358 | ||
10359 | _ACEOF | |
10360 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10361 | $EGREP "got it" >/dev/null 2>&1; then : | |
10362 | gdb_cv_x86_is_x32=yes | |
10363 | else | |
10364 | gdb_cv_x86_is_x32=no | |
10365 | fi | |
10366 | rm -f conftest* | |
10367 | ||
10368 | CPPFLAGS="$save_CPPFLAGS" | |
10369 | fi | |
10370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5 | |
10371 | $as_echo "$gdb_cv_x86_is_x32" >&6; } | |
10372 | ;; | |
10373 | ||
9ac544ce MK |
10374 | m68k-*-*) |
10375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5 | |
10376 | $as_echo_n "checking if building for Coldfire... " >&6; } | |
d0ac1c44 | 10377 | if ${gdb_cv_m68k_is_coldfire+:} false; then : |
9ac544ce MK |
10378 | $as_echo_n "(cached) " >&6 |
10379 | else | |
10380 | save_CPPFLAGS="$CPPFLAGS" | |
10381 | CPPFLAGS="$CPPFLAGS $CFLAGS" | |
10382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10383 | /* end confdefs.h. */ | |
10384 | ||
10385 | #ifdef __mcoldfire__ | |
10386 | got it | |
10387 | #endif | |
10388 | ||
10389 | _ACEOF | |
10390 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
10391 | $EGREP "got it" >/dev/null 2>&1; then : | |
10392 | gdb_cv_m68k_is_coldfire=yes | |
10393 | else | |
10394 | gdb_cv_m68k_is_coldfire=no | |
10395 | fi | |
10396 | rm -f conftest* | |
10397 | ||
10398 | CPPFLAGS="$save_CPPFLAGS" | |
10399 | fi | |
10400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5 | |
10401 | $as_echo "$gdb_cv_m68k_is_coldfire" >&6; } | |
10402 | ;; | |
8838b45e NS |
10403 | esac |
10404 | ||
7ea81414 | 10405 | . ${srcdir}/configure.srv |
d6e9fb05 | 10406 | |
68070c10 PA |
10407 | if test "${srv_mingwce}" = "yes"; then |
10408 | LIBS="$LIBS -lws2" | |
10409 | elif test "${srv_mingw}" = "yes"; then | |
b2ceabe8 TT |
10410 | # WIN32APILIBS is set by GDB_AC_COMMON. |
10411 | LIBS="$LIBS $WIN32APILIBS" | |
ac8c974e AR |
10412 | elif test "${srv_qnx}" = "yes"; then |
10413 | LIBS="$LIBS -lsocket" | |
8ed54b31 JB |
10414 | elif test "${srv_lynxos}" = "yes"; then |
10415 | LIBS="$LIBS -lnetinet" | |
68070c10 PA |
10416 | fi |
10417 | ||
58caa3dc | 10418 | if test "${srv_linux_usrregs}" = "yes"; then |
f450004a | 10419 | |
81ecdfbb | 10420 | $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h |
58caa3dc DJ |
10421 | |
10422 | fi | |
10423 | ||
10424 | if test "${srv_linux_regsets}" = "yes"; then | |
e9d25b98 | 10425 | |
81ecdfbb | 10426 | $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h |
e9d25b98 DJ |
10427 | |
10428 | ||
81ecdfbb RW |
10429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10430 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
d0ac1c44 | 10431 | if ${gdbsrv_cv_have_ptrace_getregs+:} false; then : |
81ecdfbb | 10432 | $as_echo_n "(cached) " >&6 |
bec39cab | 10433 | else |
81ecdfbb | 10434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10435 | /* end confdefs.h. */ |
58caa3dc | 10436 | #include <sys/ptrace.h> |
bec39cab AC |
10437 | int |
10438 | main () | |
10439 | { | |
58caa3dc | 10440 | PTRACE_GETREGS; |
bec39cab AC |
10441 | ; |
10442 | return 0; | |
10443 | } | |
10444 | _ACEOF | |
81ecdfbb | 10445 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10446 | gdbsrv_cv_have_ptrace_getregs=yes |
10447 | else | |
81ecdfbb | 10448 | gdbsrv_cv_have_ptrace_getregs=no |
58caa3dc | 10449 | fi |
81ecdfbb | 10450 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10451 | fi |
10452 | ||
81ecdfbb RW |
10453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5 |
10454 | $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; } | |
58caa3dc | 10455 | if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then |
f450004a | 10456 | |
81ecdfbb | 10457 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
58caa3dc DJ |
10458 | |
10459 | fi | |
10460 | ||
81ecdfbb RW |
10461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10462 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
d0ac1c44 | 10463 | if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then : |
81ecdfbb | 10464 | $as_echo_n "(cached) " >&6 |
58caa3dc | 10465 | else |
81ecdfbb | 10466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10467 | /* end confdefs.h. */ |
58caa3dc | 10468 | #include <sys/ptrace.h> |
bec39cab AC |
10469 | int |
10470 | main () | |
10471 | { | |
58caa3dc | 10472 | PTRACE_GETFPXREGS; |
bec39cab AC |
10473 | ; |
10474 | return 0; | |
10475 | } | |
10476 | _ACEOF | |
81ecdfbb | 10477 | if ac_fn_c_try_compile "$LINENO"; then : |
58caa3dc DJ |
10478 | gdbsrv_cv_have_ptrace_getfpxregs=yes |
10479 | else | |
81ecdfbb | 10480 | gdbsrv_cv_have_ptrace_getfpxregs=no |
58caa3dc | 10481 | fi |
81ecdfbb | 10482 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58caa3dc DJ |
10483 | fi |
10484 | ||
81ecdfbb RW |
10485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5 |
10486 | $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; } | |
58caa3dc | 10487 | if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then |
f450004a | 10488 | |
81ecdfbb | 10489 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
58caa3dc DJ |
10490 | |
10491 | fi | |
10492 | fi | |
10493 | ||
9accd112 MM |
10494 | if test "${srv_linux_btrace}" = "yes"; then |
10495 | ||
10496 | $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h | |
10497 | ||
10498 | fi | |
10499 | ||
18f5fd81 TJB |
10500 | if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then |
10501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5 | |
10502 | $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10503 | if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then : |
18f5fd81 TJB |
10504 | $as_echo_n "(cached) " >&6 |
10505 | else | |
10506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10507 | /* end confdefs.h. */ | |
10508 | ||
10509 | #include <thread_db.h> | |
10510 | int | |
10511 | main () | |
10512 | { | |
10513 | lwpid_t avar | |
10514 | ; | |
10515 | return 0; | |
10516 | } | |
10517 | _ACEOF | |
10518 | if ac_fn_c_try_compile "$LINENO"; then : | |
10519 | gdbserver_cv_have_thread_db_type_lwpid_t=yes | |
10520 | else | |
10521 | gdbserver_cv_have_thread_db_type_lwpid_t=no | |
10522 | ||
10523 | fi | |
10524 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10525 | fi | |
10526 | ||
10527 | if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then | |
10528 | ||
10529 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h | |
10530 | ||
10531 | fi | |
10532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5 | |
10533 | $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; } | |
10534 | ||
10535 | fi | |
10536 | ||
10537 | if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then | |
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5 | |
10539 | $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; } | |
d0ac1c44 | 10540 | if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then : |
18f5fd81 TJB |
10541 | $as_echo_n "(cached) " >&6 |
10542 | else | |
10543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10544 | /* end confdefs.h. */ | |
10545 | ||
10546 | #include <thread_db.h> | |
10547 | int | |
10548 | main () | |
10549 | { | |
10550 | psaddr_t avar | |
10551 | ; | |
10552 | return 0; | |
10553 | } | |
10554 | _ACEOF | |
10555 | if ac_fn_c_try_compile "$LINENO"; then : | |
10556 | gdbserver_cv_have_thread_db_type_psaddr_t=yes | |
10557 | else | |
10558 | gdbserver_cv_have_thread_db_type_psaddr_t=no | |
10559 | ||
10560 | fi | |
10561 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10562 | fi | |
10563 | ||
10564 | if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then | |
10565 | ||
10566 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h | |
10567 | ||
10568 | fi | |
10569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5 | |
10570 | $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; } | |
10571 | ||
10572 | fi | |
10573 | ||
193f13e6 MK |
10574 | old_LIBS="$LIBS" |
10575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
10576 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
d0ac1c44 | 10577 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
193f13e6 MK |
10578 | $as_echo_n "(cached) " >&6 |
10579 | else | |
10580 | ac_check_lib_save_LIBS=$LIBS | |
10581 | LIBS="-ldl $LIBS" | |
10582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10583 | /* end confdefs.h. */ | |
10584 | ||
10585 | /* Override any GCC internal prototype to avoid an error. | |
10586 | Use char because int might match the return type of a GCC | |
10587 | builtin and then its argument prototype would still apply. */ | |
10588 | #ifdef __cplusplus | |
10589 | extern "C" | |
10590 | #endif | |
10591 | char dlopen (); | |
10592 | int | |
10593 | main () | |
10594 | { | |
10595 | return dlopen (); | |
10596 | ; | |
10597 | return 0; | |
10598 | } | |
10599 | _ACEOF | |
10600 | if ac_fn_c_try_link "$LINENO"; then : | |
10601 | ac_cv_lib_dl_dlopen=yes | |
10602 | else | |
10603 | ac_cv_lib_dl_dlopen=no | |
10604 | fi | |
10605 | rm -f core conftest.err conftest.$ac_objext \ | |
10606 | conftest$ac_exeext conftest.$ac_ext | |
10607 | LIBS=$ac_check_lib_save_LIBS | |
10608 | fi | |
10609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 | |
10610 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
d0ac1c44 | 10611 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
193f13e6 MK |
10612 | cat >>confdefs.h <<_ACEOF |
10613 | #define HAVE_LIBDL 1 | |
10614 | _ACEOF | |
10615 | ||
10616 | LIBS="-ldl $LIBS" | |
10617 | ||
10618 | fi | |
10619 | ||
10620 | LIBS="$old_LIBS" | |
10621 | ||
0d62e5e8 DJ |
10622 | srv_thread_depfiles= |
10623 | srv_libs= | |
0d62e5e8 DJ |
10624 | |
10625 | if test "$srv_linux_thread_db" = "yes"; then | |
193f13e6 MK |
10626 | if test "$ac_cv_lib_dl_dlopen" = "yes"; then |
10627 | srv_libs="-ldl" | |
f6528abd JK |
10628 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
10629 | $as_echo_n "checking for the dynamic export flag... " >&6; } | |
193f13e6 | 10630 | old_LDFLAGS="$LDFLAGS" |
f6528abd JK |
10631 | # Older GNU ld supports --export-dynamic but --dynamic-list may not be |
10632 | # supported there. | |
10633 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
10634 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
193f13e6 | 10635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
10636 | /* end confdefs.h. */ |
10637 | ||
10638 | int | |
10639 | main () | |
10640 | { | |
10641 | ||
10642 | ; | |
10643 | return 0; | |
10644 | } | |
10645 | _ACEOF | |
81ecdfbb | 10646 | if ac_fn_c_try_link "$LINENO"; then : |
f6528abd JK |
10647 | found="-Wl,--dynamic-list" |
10648 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6de3c42 | 10649 | else |
f6528abd JK |
10650 | RDYNAMIC="-rdynamic" |
10651 | LDFLAGS="$old_LDFLAGS $RDYNAMIC" | |
10652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10653 | /* end confdefs.h. */ | |
10654 | ||
10655 | int | |
10656 | main () | |
10657 | { | |
10658 | ||
10659 | ; | |
10660 | return 0; | |
10661 | } | |
10662 | _ACEOF | |
10663 | if ac_fn_c_try_link "$LINENO"; then : | |
10664 | found="-rdynamic" | |
10665 | else | |
10666 | found="no" | |
10667 | RDYNAMIC="" | |
770d76d7 PA |
10668 | fi |
10669 | rm -f core conftest.err conftest.$ac_objext \ | |
10670 | conftest$ac_exeext conftest.$ac_ext | |
10671 | fi | |
10672 | rm -f core conftest.err conftest.$ac_objext \ | |
10673 | conftest$ac_exeext conftest.$ac_ext | |
10674 | ||
10675 | LDFLAGS="$old_LDFLAGS" | |
10676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 | |
10677 | $as_echo "$found" >&6; } | |
10678 | else | |
10679 | srv_libs="-lthread_db" | |
10680 | fi | |
55a8c076 | 10681 | |
770d76d7 | 10682 | srv_thread_depfiles="thread-db.o proc-service.o" |
7d4e5717 PA |
10683 | |
10684 | $as_echo "#define USE_THREAD_DB 1" >>confdefs.h | |
10685 | ||
770d76d7 PA |
10686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5 |
10687 | $as_echo_n "checking for TD_VERSION... " >&6; } | |
d0ac1c44 | 10688 | if ${gdbsrv_cv_have_td_version+:} false; then : |
770d76d7 PA |
10689 | $as_echo_n "(cached) " >&6 |
10690 | else | |
10691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10692 | /* end confdefs.h. */ | |
10693 | #include <thread_db.h> | |
55a8c076 YQ |
10694 | int |
10695 | main () | |
10696 | { | |
770d76d7 | 10697 | TD_VERSION; |
c9a1864a YQ |
10698 | ; |
10699 | return 0; | |
10700 | } | |
10701 | _ACEOF | |
55a8c076 | 10702 | if ac_fn_c_try_compile "$LINENO"; then : |
770d76d7 | 10703 | gdbsrv_cv_have_td_version=yes |
c9a1864a | 10704 | else |
770d76d7 PA |
10705 | gdbsrv_cv_have_td_version=no |
10706 | fi | |
10707 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10708 | fi | |
10709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5 | |
10710 | $as_echo "$gdbsrv_cv_have_td_version" >&6; } | |
0ad6b8ee | 10711 | if test "$gdbsrv_cv_have_td_version" = yes; then |
c9a1864a | 10712 | |
770d76d7 | 10713 | $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h |
55a8c076 | 10714 | |
770d76d7 PA |
10715 | fi |
10716 | fi | |
c9a1864a YQ |
10717 | |
10718 | ||
770d76d7 PA |
10719 | # Check whether --with-libthread-db was given. |
10720 | if test "${with_libthread_db+set}" = set; then : | |
10721 | withval=$with_libthread_db; srv_libthread_db_path="${withval}" | |
10722 | srv_libs="$srv_libthread_db_path" | |
c9a1864a | 10723 | |
770d76d7 | 10724 | fi |
c9a1864a YQ |
10725 | |
10726 | ||
770d76d7 | 10727 | if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then |
c9a1864a | 10728 | |
770d76d7 | 10729 | $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h |
c9a1864a | 10730 | |
55a8c076 | 10731 | fi |
c9a1864a | 10732 | |
770d76d7 PA |
10733 | if test "$srv_xmlfiles" != ""; then |
10734 | srv_xmlbuiltin="xml-builtin.o" | |
c9a1864a | 10735 | |
770d76d7 | 10736 | $as_echo "#define USE_XML 1" >>confdefs.h |
c9a1864a | 10737 | |
c9a1864a | 10738 | |
770d76d7 PA |
10739 | tmp_xmlfiles=$srv_xmlfiles |
10740 | srv_xmlfiles="" | |
10741 | for f in $tmp_xmlfiles; do | |
10742 | srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f" | |
10743 | done | |
c9a1864a YQ |
10744 | fi |
10745 | ||
cd850b40 | 10746 | GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs" |
770d76d7 | 10747 | GDBSERVER_LIBS="$srv_libs" |
c9a1864a | 10748 | |
770d76d7 PA |
10749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5 |
10750 | $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; } | |
d0ac1c44 | 10751 | if ${gdbsrv_cv_have_sync_builtins+:} false; then : |
770d76d7 PA |
10752 | $as_echo_n "(cached) " >&6 |
10753 | else | |
c9a1864a | 10754 | |
770d76d7 PA |
10755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10756 | /* end confdefs.h. */ | |
c9a1864a | 10757 | |
770d76d7 PA |
10758 | int |
10759 | main () | |
10760 | { | |
10761 | int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1); | |
10762 | ; | |
10763 | return 0; | |
10764 | } | |
10765 | _ACEOF | |
10766 | if ac_fn_c_try_link "$LINENO"; then : | |
10767 | gdbsrv_cv_have_sync_builtins=yes | |
10768 | else | |
c971b7fa | 10769 | gdbsrv_cv_have_sync_builtins=no |
c9a1864a | 10770 | fi |
c971b7fa PA |
10771 | rm -f core conftest.err conftest.$ac_objext \ |
10772 | conftest$ac_exeext conftest.$ac_ext | |
c9a1864a | 10773 | fi |
c971b7fa PA |
10774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5 |
10775 | $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; } | |
0ad6b8ee | 10776 | if test "$gdbsrv_cv_have_sync_builtins" = yes; then |
c971b7fa PA |
10777 | |
10778 | $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h | |
10779 | ||
c9a1864a YQ |
10780 | fi |
10781 | ||
c971b7fa PA |
10782 | saved_cflags="$CFLAGS" |
10783 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
10784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10785 | /* end confdefs.h. */ | |
c9a1864a | 10786 | |
c971b7fa PA |
10787 | int |
10788 | main () | |
10789 | { | |
c9a1864a | 10790 | |
c971b7fa PA |
10791 | ; |
10792 | return 0; | |
10793 | } | |
c9a1864a | 10794 | _ACEOF |
c971b7fa PA |
10795 | if ac_fn_c_try_compile "$LINENO"; then : |
10796 | gdbsrv_cv_have_visibility_hidden=yes | |
10797 | else | |
10798 | gdbsrv_cv_have_visibility_hidden=no | |
c9a1864a | 10799 | fi |
c971b7fa PA |
10800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10801 | CFLAGS="$saved_cflags" | |
10802 | ||
c971b7fa PA |
10803 | IPA_DEPFILES="" |
10804 | extra_libraries="" | |
c2a66c29 | 10805 | |
c971b7fa PA |
10806 | # check whether to enable the inprocess agent |
10807 | if test "$ipa_obj" != "" \ | |
10808 | -a "$gdbsrv_cv_have_sync_builtins" = yes \ | |
10809 | -a "$gdbsrv_cv_have_visibility_hidden" = yes; then | |
10810 | have_ipa=true | |
10811 | else | |
10812 | have_ipa=false | |
10813 | fi | |
fa593d66 | 10814 | |
c971b7fa PA |
10815 | # Check whether --enable-inprocess-agent was given. |
10816 | if test "${enable_inprocess_agent+set}" = set; then : | |
10817 | enableval=$enable_inprocess_agent; case "$enableval" in | |
10818 | yes) want_ipa=true ;; | |
10819 | no) want_ipa=false ;; | |
d0ac1c44 | 10820 | *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;; |
c971b7fa PA |
10821 | esac |
10822 | else | |
10823 | want_ipa=$have_ipa | |
10824 | fi | |
c2a66c29 | 10825 | |
c9a1864a | 10826 | |
c971b7fa PA |
10827 | if $want_ipa ; then |
10828 | if $have_ipa ; then | |
10829 | IPA_DEPFILES="$ipa_obj" | |
10830 | extra_libraries="$extra_libraries libinproctrace.so" | |
10831 | else | |
d0ac1c44 | 10832 | as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5 |
c971b7fa PA |
10833 | fi |
10834 | fi | |
c9a1864a | 10835 | |
c9a1864a | 10836 | |
c2a66c29 NS |
10837 | |
10838 | ||
fa593d66 PA |
10839 | |
10840 | ||
10841 | ||
0d62e5e8 | 10842 | |
c971b7fa | 10843 | GNULIB=build-gnulib-gdbserver/import |
d6e9fb05 | 10844 | |
c9a1864a YQ |
10845 | GNULIB_STDINT_H= |
10846 | if test x"$STDINT_H" != x; then | |
c971b7fa | 10847 | GNULIB_STDINT_H=$GNULIB/$STDINT_H |
c9a1864a | 10848 | fi |
d6e9fb05 | 10849 | |
fb1e4ffc | 10850 | |
c971b7fa | 10851 | ac_config_files="$ac_config_files Makefile" |
81ecdfbb | 10852 | |
81ecdfbb | 10853 | |
bec39cab | 10854 | cat >confcache <<\_ACEOF |
d6e9fb05 JK |
10855 | # This file is a shell script that caches the results of configure |
10856 | # tests run on this system so they can be shared between configure | |
bec39cab AC |
10857 | # scripts and configure runs, see configure's option --config-cache. |
10858 | # It is not useful on other systems. If it contains results you don't | |
10859 | # want to keep, you may remove or edit it. | |
d6e9fb05 | 10860 | # |
bec39cab AC |
10861 | # config.status only pays attention to the cache file if you give it |
10862 | # the --recheck option to rerun configure. | |
d6e9fb05 | 10863 | # |
bec39cab AC |
10864 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
10865 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
10866 | # following values. | |
10867 | ||
10868 | _ACEOF | |
10869 | ||
d6e9fb05 JK |
10870 | # The following way of writing the cache mishandles newlines in values, |
10871 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 10872 | # So, we kill variables containing newlines. |
d6e9fb05 JK |
10873 | # Ultrix sh set writes to stderr and can't be redirected directly, |
10874 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
10875 | ( |
10876 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
10877 | eval ac_val=\$$ac_var | |
10878 | case $ac_val in #( | |
10879 | *${as_nl}*) | |
10880 | case $ac_var in #( | |
10881 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
10882 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
10883 | esac | |
10884 | case $ac_var in #( | |
10885 | _ | IFS | as_nl) ;; #( | |
10886 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
10887 | *) { eval $ac_var=; unset $ac_var;} ;; | |
10888 | esac ;; | |
10889 | esac | |
10890 | done | |
10891 | ||
bec39cab | 10892 | (set) 2>&1 | |
81ecdfbb RW |
10893 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
10894 | *${as_nl}ac_space=\ *) | |
10895 | # `set' does not quote correctly, so add quotes: double-quote | |
10896 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
10897 | sed -n \ |
10898 | "s/'/'\\\\''/g; | |
10899 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 10900 | ;; #( |
bec39cab AC |
10901 | *) |
10902 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 10903 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 10904 | ;; |
81ecdfbb RW |
10905 | esac | |
10906 | sort | |
10907 | ) | | |
bec39cab | 10908 | sed ' |
81ecdfbb | 10909 | /^ac_cv_env_/b end |
bec39cab | 10910 | t clear |
81ecdfbb | 10911 | :clear |
bec39cab AC |
10912 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
10913 | t end | |
81ecdfbb RW |
10914 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
10915 | :end' >>confcache | |
10916 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
10917 | if test -w "$cache_file"; then | |
d0ac1c44 | 10918 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
10919 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
10920 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
10921 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
10922 | cat confcache >"$cache_file" | |
10923 | else | |
10924 | case $cache_file in #( | |
10925 | */* | ?:*) | |
10926 | mv -f confcache "$cache_file"$$ && | |
10927 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
10928 | *) | |
10929 | mv -f confcache "$cache_file" ;; | |
10930 | esac | |
10931 | fi | |
10932 | fi | |
d6e9fb05 | 10933 | else |
81ecdfbb RW |
10934 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
10935 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
d6e9fb05 JK |
10936 | fi |
10937 | fi | |
10938 | rm -f confcache | |
10939 | ||
d6e9fb05 JK |
10940 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
10941 | # Let make expand exec_prefix. | |
10942 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
10943 | ||
84563040 | 10944 | DEFS=-DHAVE_CONFIG_H |
d6e9fb05 | 10945 | |
bec39cab AC |
10946 | ac_libobjs= |
10947 | ac_ltlibobjs= | |
d0ac1c44 | 10948 | U= |
bec39cab AC |
10949 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
10950 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
10951 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
10952 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
10953 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
10954 | # will be set to the directory where LIBOBJS objects are built. | |
10955 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
10956 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
10957 | done |
10958 | LIBOBJS=$ac_libobjs | |
d6e9fb05 | 10959 | |
bec39cab AC |
10960 | LTLIBOBJS=$ac_ltlibobjs |
10961 | ||
10962 | ||
c9a1864a | 10963 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 10964 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c9a1864a YQ |
10965 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
10966 | fi | |
bec39cab | 10967 | |
d0ac1c44 | 10968 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 10969 | ac_write_fail=0 |
bec39cab AC |
10970 | ac_clean_files_save=$ac_clean_files |
10971 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
10972 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
10973 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
10974 | as_write_fail=0 | |
10975 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
10976 | #! $SHELL |
10977 | # Generated by $as_me. | |
d6e9fb05 | 10978 | # Run this file to recreate the current configuration. |
d6e9fb05 | 10979 | # Compiler output produced by configure, useful for debugging |
bec39cab AC |
10980 | # configure, is in config.log if it exists. |
10981 | ||
10982 | debug=false | |
10983 | ac_cs_recheck=false | |
10984 | ac_cs_silent=false | |
bec39cab | 10985 | |
81ecdfbb RW |
10986 | SHELL=\${CONFIG_SHELL-$SHELL} |
10987 | export SHELL | |
10988 | _ASEOF | |
10989 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
10990 | ## -------------------- ## | |
10991 | ## M4sh Initialization. ## | |
10992 | ## -------------------- ## | |
10993 | ||
10994 | # Be more Bourne compatible | |
10995 | DUALCASE=1; export DUALCASE # for MKS sh | |
10996 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
10997 | emulate sh |
10998 | NULLCMD=: | |
81ecdfbb | 10999 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
11000 | # is contrary to our usage. Disable this feature. |
11001 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
11002 | setopt NO_GLOB_SUBST |
11003 | else | |
11004 | case `(set -o) 2>/dev/null` in #( | |
11005 | *posix*) : | |
11006 | set -o posix ;; #( | |
11007 | *) : | |
11008 | ;; | |
11009 | esac | |
bec39cab | 11010 | fi |
d6e9fb05 | 11011 | |
81ecdfbb RW |
11012 | |
11013 | as_nl=' | |
11014 | ' | |
11015 | export as_nl | |
11016 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
11017 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
11018 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
11019 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
11020 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
11021 | # but without wasting forks for bash or zsh. | |
11022 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
11023 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
11024 | as_echo='print -r --' | |
11025 | as_echo_n='print -rn --' | |
11026 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
11027 | as_echo='printf %s\n' | |
11028 | as_echo_n='printf %s' | |
bec39cab | 11029 | else |
81ecdfbb RW |
11030 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
11031 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
11032 | as_echo_n='/usr/ucb/echo -n' | |
11033 | else | |
11034 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
11035 | as_echo_n_body='eval | |
11036 | arg=$1; | |
11037 | case $arg in #( | |
11038 | *"$as_nl"*) | |
11039 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
11040 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
11041 | esac; | |
11042 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
11043 | ' | |
11044 | export as_echo_n_body | |
11045 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
11046 | fi | |
11047 | export as_echo_body | |
11048 | as_echo='sh -c $as_echo_body as_echo' | |
11049 | fi | |
11050 | ||
11051 | # The user is always right. | |
11052 | if test "${PATH_SEPARATOR+set}" != set; then | |
11053 | PATH_SEPARATOR=: | |
11054 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
11055 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
11056 | PATH_SEPARATOR=';' | |
11057 | } | |
bec39cab AC |
11058 | fi |
11059 | ||
11060 | ||
81ecdfbb RW |
11061 | # IFS |
11062 | # We need space, tab and new line, in precisely that order. Quoting is | |
11063 | # there to prevent editors from complaining about space-tab. | |
11064 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
11065 | # splitting by setting IFS to empty value.) | |
11066 | IFS=" "" $as_nl" | |
11067 | ||
11068 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 11069 | as_myself= |
81ecdfbb RW |
11070 | case $0 in #(( |
11071 | *[\\/]* ) as_myself=$0 ;; | |
11072 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11073 | for as_dir in $PATH | |
11074 | do | |
11075 | IFS=$as_save_IFS | |
11076 | test -z "$as_dir" && as_dir=. | |
11077 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
11078 | done | |
11079 | IFS=$as_save_IFS | |
11080 | ||
11081 | ;; | |
11082 | esac | |
11083 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
11084 | # in which case we are not to be found in the path. | |
11085 | if test "x$as_myself" = x; then | |
11086 | as_myself=$0 | |
11087 | fi | |
11088 | if test ! -f "$as_myself"; then | |
11089 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
11090 | exit 1 | |
11091 | fi | |
11092 | ||
11093 | # Unset variables that we do not need and which cause bugs (e.g. in | |
11094 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
11095 | # suppresses any "Segmentation fault" message there. '((' could | |
11096 | # trigger a bug in pdksh 5.2.14. | |
11097 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
11098 | do eval test x\${$as_var+set} = xset \ | |
11099 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
11100 | done | |
bec39cab AC |
11101 | PS1='$ ' |
11102 | PS2='> ' | |
11103 | PS4='+ ' | |
11104 | ||
11105 | # NLS nuisances. | |
81ecdfbb RW |
11106 | LC_ALL=C |
11107 | export LC_ALL | |
11108 | LANGUAGE=C | |
11109 | export LANGUAGE | |
11110 | ||
11111 | # CDPATH. | |
11112 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
11113 | ||
11114 | ||
d0ac1c44 SM |
11115 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
11116 | # ---------------------------------------- | |
81ecdfbb RW |
11117 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
11118 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 11119 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
11120 | as_fn_error () |
11121 | { | |
d0ac1c44 SM |
11122 | as_status=$1; test $as_status -eq 0 && as_status=1 |
11123 | if test "$4"; then | |
11124 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
11125 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
bec39cab | 11126 | fi |
d0ac1c44 | 11127 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
11128 | as_fn_exit $as_status |
11129 | } # as_fn_error | |
11130 | ||
11131 | ||
11132 | # as_fn_set_status STATUS | |
11133 | # ----------------------- | |
11134 | # Set $? to STATUS, without forking. | |
11135 | as_fn_set_status () | |
11136 | { | |
11137 | return $1 | |
11138 | } # as_fn_set_status | |
11139 | ||
11140 | # as_fn_exit STATUS | |
11141 | # ----------------- | |
11142 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
11143 | as_fn_exit () | |
11144 | { | |
11145 | set +e | |
11146 | as_fn_set_status $1 | |
11147 | exit $1 | |
11148 | } # as_fn_exit | |
11149 | ||
11150 | # as_fn_unset VAR | |
11151 | # --------------- | |
11152 | # Portably unset VAR. | |
11153 | as_fn_unset () | |
11154 | { | |
11155 | { eval $1=; unset $1;} | |
11156 | } | |
11157 | as_unset=as_fn_unset | |
11158 | # as_fn_append VAR VALUE | |
11159 | # ---------------------- | |
11160 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
11161 | # advantage of any shell optimizations that allow amortized linear growth over | |
11162 | # repeated appends, instead of the typical quadratic growth present in naive | |
11163 | # implementations. | |
11164 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
11165 | eval 'as_fn_append () | |
11166 | { | |
11167 | eval $1+=\$2 | |
11168 | }' | |
11169 | else | |
11170 | as_fn_append () | |
11171 | { | |
11172 | eval $1=\$$1\$2 | |
11173 | } | |
11174 | fi # as_fn_append | |
11175 | ||
11176 | # as_fn_arith ARG... | |
11177 | # ------------------ | |
11178 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
11179 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
11180 | # must be portable across $(()) and expr. | |
11181 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
11182 | eval 'as_fn_arith () | |
11183 | { | |
11184 | as_val=$(( $* )) | |
11185 | }' | |
11186 | else | |
11187 | as_fn_arith () | |
11188 | { | |
11189 | as_val=`expr "$@" || test $? -eq 1` | |
11190 | } | |
11191 | fi # as_fn_arith | |
11192 | ||
d6e9fb05 | 11193 | |
81ecdfbb RW |
11194 | if expr a : '\(a\)' >/dev/null 2>&1 && |
11195 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
11196 | as_expr=expr |
11197 | else | |
11198 | as_expr=false | |
11199 | fi | |
d6e9fb05 | 11200 | |
81ecdfbb | 11201 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
11202 | as_basename=basename |
11203 | else | |
11204 | as_basename=false | |
11205 | fi | |
d6e9fb05 | 11206 | |
81ecdfbb RW |
11207 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
11208 | as_dirname=dirname | |
11209 | else | |
11210 | as_dirname=false | |
11211 | fi | |
d6e9fb05 | 11212 | |
81ecdfbb | 11213 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
11214 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
11215 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11216 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
11217 | $as_echo X/"$0" | | |
11218 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
11219 | s//\1/ | |
11220 | q | |
11221 | } | |
11222 | /^X\/\(\/\/\)$/{ | |
11223 | s//\1/ | |
11224 | q | |
11225 | } | |
11226 | /^X\/\(\/\).*/{ | |
11227 | s//\1/ | |
11228 | q | |
11229 | } | |
11230 | s/.*/./; q'` | |
bec39cab | 11231 | |
dae5f5cf DJ |
11232 | # Avoid depending upon Character Ranges. |
11233 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
11234 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
11235 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
11236 | as_cr_digits='0123456789' | |
11237 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
11238 | ||
81ecdfbb RW |
11239 | ECHO_C= ECHO_N= ECHO_T= |
11240 | case `echo -n x` in #((((( | |
11241 | -n*) | |
11242 | case `echo 'xy\c'` in | |
11243 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
11244 | xy) ECHO_C='\c';; | |
11245 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
11246 | ECHO_T=' ';; | |
11247 | esac;; | |
11248 | *) | |
11249 | ECHO_N='-n';; | |
bec39cab AC |
11250 | esac |
11251 | ||
81ecdfbb RW |
11252 | rm -f conf$$ conf$$.exe conf$$.file |
11253 | if test -d conf$$.dir; then | |
11254 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 11255 | else |
81ecdfbb RW |
11256 | rm -f conf$$.dir |
11257 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 11258 | fi |
81ecdfbb RW |
11259 | if (echo >conf$$.file) 2>/dev/null; then |
11260 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
dae5f5cf | 11261 | as_ln_s='ln -s' |
81ecdfbb RW |
11262 | # ... but there are two gotchas: |
11263 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
11264 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 11265 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 11266 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 11267 | as_ln_s='cp -pR' |
81ecdfbb RW |
11268 | elif ln conf$$.file conf$$ 2>/dev/null; then |
11269 | as_ln_s=ln | |
11270 | else | |
d0ac1c44 | 11271 | as_ln_s='cp -pR' |
dae5f5cf | 11272 | fi |
bec39cab | 11273 | else |
d0ac1c44 | 11274 | as_ln_s='cp -pR' |
bec39cab | 11275 | fi |
81ecdfbb RW |
11276 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
11277 | rmdir conf$$.dir 2>/dev/null | |
11278 | ||
11279 | ||
11280 | # as_fn_mkdir_p | |
11281 | # ------------- | |
11282 | # Create "$as_dir" as a directory, including parents if necessary. | |
11283 | as_fn_mkdir_p () | |
11284 | { | |
11285 | ||
11286 | case $as_dir in #( | |
11287 | -*) as_dir=./$as_dir;; | |
11288 | esac | |
11289 | test -d "$as_dir" || eval $as_mkdir_p || { | |
11290 | as_dirs= | |
11291 | while :; do | |
11292 | case $as_dir in #( | |
11293 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
11294 | *) as_qdir=$as_dir;; | |
11295 | esac | |
11296 | as_dirs="'$as_qdir' $as_dirs" | |
11297 | as_dir=`$as_dirname -- "$as_dir" || | |
11298 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
11299 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
11300 | X"$as_dir" : 'X\(//\)$' \| \ | |
11301 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
11302 | $as_echo X"$as_dir" | | |
11303 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11304 | s//\1/ | |
11305 | q | |
11306 | } | |
11307 | /^X\(\/\/\)[^/].*/{ | |
11308 | s//\1/ | |
11309 | q | |
11310 | } | |
11311 | /^X\(\/\/\)$/{ | |
11312 | s//\1/ | |
11313 | q | |
11314 | } | |
11315 | /^X\(\/\).*/{ | |
11316 | s//\1/ | |
11317 | q | |
11318 | } | |
11319 | s/.*/./; q'` | |
11320 | test -d "$as_dir" && break | |
11321 | done | |
11322 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 11323 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
bec39cab | 11324 | |
81ecdfbb RW |
11325 | |
11326 | } # as_fn_mkdir_p | |
bec39cab | 11327 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 11328 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
11329 | else |
11330 | test -d ./-p && rmdir ./-p | |
11331 | as_mkdir_p=false | |
11332 | fi | |
11333 | ||
d0ac1c44 SM |
11334 | |
11335 | # as_fn_executable_p FILE | |
11336 | # ----------------------- | |
11337 | # Test if FILE is an executable regular file. | |
11338 | as_fn_executable_p () | |
11339 | { | |
11340 | test -f "$1" && test -x "$1" | |
11341 | } # as_fn_executable_p | |
11342 | as_test_x='test -x' | |
11343 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
11344 | |
11345 | # Sed expression to map a string onto a valid CPP name. | |
11346 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
11347 | ||
11348 | # Sed expression to map a string onto a valid variable name. | |
11349 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
11350 | ||
11351 | ||
bec39cab | 11352 | exec 6>&1 |
81ecdfbb RW |
11353 | ## ----------------------------------- ## |
11354 | ## Main body of $CONFIG_STATUS script. ## | |
11355 | ## ----------------------------------- ## | |
11356 | _ASEOF | |
11357 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
11358 | ||
11359 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11360 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 11361 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
11362 | # values after options handling. |
11363 | ac_log=" | |
bec39cab | 11364 | This file was extended by $as_me, which was |
d0ac1c44 | 11365 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
11366 | |
11367 | CONFIG_FILES = $CONFIG_FILES | |
11368 | CONFIG_HEADERS = $CONFIG_HEADERS | |
11369 | CONFIG_LINKS = $CONFIG_LINKS | |
11370 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
11371 | $ $0 $@ | |
11372 | ||
81ecdfbb RW |
11373 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
11374 | " | |
11375 | ||
bec39cab AC |
11376 | _ACEOF |
11377 | ||
81ecdfbb RW |
11378 | case $ac_config_files in *" |
11379 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
11380 | esac | |
bec39cab | 11381 | |
81ecdfbb RW |
11382 | case $ac_config_headers in *" |
11383 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
11384 | esac | |
dae5f5cf | 11385 | |
dae5f5cf | 11386 | |
81ecdfbb RW |
11387 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
11388 | # Files that config.status was made for. | |
11389 | config_files="$ac_config_files" | |
11390 | config_headers="$ac_config_headers" | |
11391 | config_commands="$ac_config_commands" | |
bec39cab | 11392 | |
81ecdfbb | 11393 | _ACEOF |
dae5f5cf | 11394 | |
81ecdfbb | 11395 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 11396 | ac_cs_usage="\ |
81ecdfbb RW |
11397 | \`$as_me' instantiates files and other configuration actions |
11398 | from templates according to the current configuration. Unless the files | |
11399 | and actions are specified as TAGs, all are instantiated by default. | |
bec39cab | 11400 | |
81ecdfbb | 11401 | Usage: $0 [OPTION]... [TAG]... |
bec39cab AC |
11402 | |
11403 | -h, --help print this help, then exit | |
81ecdfbb | 11404 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 11405 | --config print configuration, then exit |
81ecdfbb RW |
11406 | -q, --quiet, --silent |
11407 | do not print progress messages | |
bec39cab AC |
11408 | -d, --debug don't remove temporary files |
11409 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
11410 | --file=FILE[:TEMPLATE] |
11411 | instantiate the configuration file FILE | |
11412 | --header=FILE[:TEMPLATE] | |
11413 | instantiate the configuration header FILE | |
bec39cab AC |
11414 | |
11415 | Configuration files: | |
11416 | $config_files | |
11417 | ||
11418 | Configuration headers: | |
11419 | $config_headers | |
11420 | ||
11421 | Configuration commands: | |
11422 | $config_commands | |
11423 | ||
81ecdfbb | 11424 | Report bugs to the package provider." |
dae5f5cf | 11425 | |
81ecdfbb RW |
11426 | _ACEOF |
11427 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11428 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
11429 | ac_cs_version="\\ |
11430 | config.status | |
d0ac1c44 SM |
11431 | configured by $0, generated by GNU Autoconf 2.69, |
11432 | with options \\"\$ac_cs_config\\" | |
bec39cab | 11433 | |
d0ac1c44 | 11434 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
11435 | This config.status script is free software; the Free Software Foundation |
11436 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
11437 | |
11438 | ac_pwd='$ac_pwd' | |
11439 | srcdir='$srcdir' | |
11440 | INSTALL='$INSTALL' | |
11441 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
11442 | _ACEOF |
11443 | ||
81ecdfbb RW |
11444 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11445 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
11446 | ac_need_defaults=: |
11447 | while test $# != 0 | |
11448 | do | |
11449 | case $1 in | |
d0ac1c44 | 11450 | --*=?*) |
81ecdfbb RW |
11451 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
11452 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab AC |
11453 | ac_shift=: |
11454 | ;; | |
d0ac1c44 SM |
11455 | --*=) |
11456 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
11457 | ac_optarg= | |
11458 | ac_shift=: | |
11459 | ;; | |
81ecdfbb | 11460 | *) |
bec39cab AC |
11461 | ac_option=$1 |
11462 | ac_optarg=$2 | |
11463 | ac_shift=shift | |
11464 | ;; | |
bec39cab AC |
11465 | esac |
11466 | ||
11467 | case $ac_option in | |
11468 | # Handling of the options. | |
bec39cab AC |
11469 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
11470 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
11471 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
11472 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
11473 | --config | --confi | --conf | --con | --co | --c ) |
11474 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 11475 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
11476 | debug=: ;; |
11477 | --file | --fil | --fi | --f ) | |
11478 | $ac_shift | |
81ecdfbb RW |
11479 | case $ac_optarg in |
11480 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 11481 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
11482 | esac |
11483 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
11484 | ac_need_defaults=false;; |
11485 | --header | --heade | --head | --hea ) | |
11486 | $ac_shift | |
81ecdfbb RW |
11487 | case $ac_optarg in |
11488 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
11489 | esac | |
11490 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 11491 | ac_need_defaults=false;; |
81ecdfbb RW |
11492 | --he | --h) |
11493 | # Conflict between --help and --header | |
d0ac1c44 | 11494 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
11495 | Try \`$0 --help' for more information.";; |
11496 | --help | --hel | -h ) | |
11497 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
11498 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
11499 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
11500 | ac_cs_silent=: ;; | |
11501 | ||
11502 | # This is an error. | |
d0ac1c44 | 11503 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 11504 | Try \`$0 --help' for more information." ;; |
bec39cab | 11505 | |
81ecdfbb RW |
11506 | *) as_fn_append ac_config_targets " $1" |
11507 | ac_need_defaults=false ;; | |
bec39cab AC |
11508 | |
11509 | esac | |
11510 | shift | |
d6e9fb05 | 11511 | done |
bec39cab AC |
11512 | |
11513 | ac_configure_extra_args= | |
11514 | ||
11515 | if $ac_cs_silent; then | |
11516 | exec 6>/dev/null | |
11517 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
d6e9fb05 | 11518 | fi |
d6e9fb05 | 11519 | |
bec39cab | 11520 | _ACEOF |
81ecdfbb | 11521 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 11522 | if \$ac_cs_recheck; then |
d0ac1c44 | 11523 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
11524 | shift |
11525 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
11526 | CONFIG_SHELL='$SHELL' | |
11527 | export CONFIG_SHELL | |
11528 | exec "\$@" | |
bec39cab | 11529 | fi |
d6e9fb05 | 11530 | |
bec39cab | 11531 | _ACEOF |
81ecdfbb RW |
11532 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11533 | exec 5>>config.log | |
11534 | { | |
11535 | echo | |
11536 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
11537 | ## Running $as_me. ## | |
11538 | _ASBOX | |
11539 | $as_echo "$ac_log" | |
11540 | } >&5 | |
bec39cab | 11541 | |
81ecdfbb RW |
11542 | _ACEOF |
11543 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
61c125b9 TT |
11544 | # |
11545 | # INIT-COMMANDS | |
11546 | # | |
11547 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR | |
60d6cfc9 | 11548 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR" |
61c125b9 | 11549 | |
81ecdfbb | 11550 | _ACEOF |
bec39cab | 11551 | |
81ecdfbb | 11552 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b80864fb | 11553 | |
81ecdfbb | 11554 | # Handling of arguments. |
bec39cab AC |
11555 | for ac_config_target in $ac_config_targets |
11556 | do | |
81ecdfbb RW |
11557 | case $ac_config_target in |
11558 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
61c125b9 | 11559 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
60d6cfc9 | 11560 | "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;; |
81ecdfbb | 11561 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
81ecdfbb | 11562 | |
d0ac1c44 | 11563 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
d6e9fb05 | 11564 | esac |
bec39cab AC |
11565 | done |
11566 | ||
81ecdfbb | 11567 | |
bec39cab AC |
11568 | # If the user did not use the arguments to specify the items to instantiate, |
11569 | # then the envvar interface is used. Set only those that are not. | |
11570 | # We use the long form for the default assignment because of an extremely | |
11571 | # bizarre bug on SunOS 4.1.3. | |
11572 | if $ac_need_defaults; then | |
11573 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
11574 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
11575 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
11576 | fi | |
d6e9fb05 | 11577 | |
bec39cab | 11578 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 11579 | # simply because there is no reason against having it here, and in addition, |
bec39cab | 11580 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
11581 | # Hook for its removal unless debugging. |
11582 | # Note that there is a small window in which the directory will not be cleaned: | |
11583 | # after its creation but before its name has been assigned to `$tmp'. | |
bec39cab AC |
11584 | $debug || |
11585 | { | |
d0ac1c44 | 11586 | tmp= ac_tmp= |
81ecdfbb | 11587 | trap 'exit_status=$? |
d0ac1c44 SM |
11588 | : "${ac_tmp:=$tmp}" |
11589 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
11590 | ' 0 |
11591 | trap 'as_fn_exit 1' 1 2 13 15 | |
bec39cab | 11592 | } |
bec39cab AC |
11593 | # Create a (secure) tmp directory for tmp files. |
11594 | ||
11595 | { | |
81ecdfbb | 11596 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
d0ac1c44 | 11597 | test -d "$tmp" |
bec39cab AC |
11598 | } || |
11599 | { | |
81ecdfbb RW |
11600 | tmp=./conf$$-$RANDOM |
11601 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
11602 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
11603 | ac_tmp=$tmp | |
81ecdfbb RW |
11604 | |
11605 | # Set up the scripts for CONFIG_FILES section. | |
11606 | # No need to generate them if there are no CONFIG_FILES. | |
11607 | # This happens for instance with `./config.status config.h'. | |
11608 | if test -n "$CONFIG_FILES"; then | |
11609 | ||
11610 | ||
11611 | ac_cr=`echo X | tr X '\015'` | |
11612 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
11613 | # But we know of no other shell where ac_cr would be empty at this | |
11614 | # point, so we can use a bashism as a fallback. | |
11615 | if test "x$ac_cr" = x; then | |
11616 | eval ac_cr=\$\'\\r\' | |
11617 | fi | |
11618 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
11619 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 11620 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
11621 | else |
11622 | ac_cs_awk_cr=$ac_cr | |
11623 | fi | |
11624 | ||
d0ac1c44 | 11625 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
11626 | _ACEOF |
11627 | ||
11628 | ||
11629 | { | |
11630 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
11631 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
11632 | echo "_ACEOF" | |
11633 | } >conf$$subs.sh || | |
d0ac1c44 SM |
11634 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
11635 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
11636 | ac_delim='%!_!# ' |
11637 | for ac_last_try in false false false false false :; do | |
11638 | . ./conf$$subs.sh || | |
d0ac1c44 | 11639 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11640 | |
11641 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
11642 | if test $ac_delim_n = $ac_delim_num; then | |
11643 | break | |
11644 | elif $ac_last_try; then | |
d0ac1c44 | 11645 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
11646 | else |
11647 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
11648 | fi | |
11649 | done | |
11650 | rm -f conf$$subs.sh | |
11651 | ||
11652 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 11653 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
11654 | _ACEOF |
11655 | sed -n ' | |
11656 | h | |
11657 | s/^/S["/; s/!.*/"]=/ | |
11658 | p | |
11659 | g | |
11660 | s/^[^!]*!// | |
11661 | :repl | |
11662 | t repl | |
11663 | s/'"$ac_delim"'$// | |
11664 | t delim | |
11665 | :nl | |
11666 | h | |
d0ac1c44 | 11667 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11668 | t more1 |
11669 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
11670 | p | |
11671 | n | |
11672 | b repl | |
11673 | :more1 | |
11674 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11675 | p | |
11676 | g | |
11677 | s/.\{148\}// | |
11678 | t nl | |
11679 | :delim | |
11680 | h | |
d0ac1c44 | 11681 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
11682 | t more2 |
11683 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
11684 | p | |
11685 | b | |
11686 | :more2 | |
11687 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
11688 | p | |
11689 | g | |
11690 | s/.\{148\}// | |
11691 | t delim | |
11692 | ' <conf$$subs.awk | sed ' | |
11693 | /^[^""]/{ | |
11694 | N | |
11695 | s/\n// | |
11696 | } | |
11697 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
11698 | rm -f conf$$subs.awk | |
11699 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11700 | _ACAWK | |
d0ac1c44 | 11701 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
11702 | for (key in S) S_is_set[key] = 1 |
11703 | FS = "\a" | |
11704 | ||
11705 | } | |
bec39cab | 11706 | { |
81ecdfbb RW |
11707 | line = $ 0 |
11708 | nfields = split(line, field, "@") | |
11709 | substed = 0 | |
11710 | len = length(field[1]) | |
11711 | for (i = 2; i < nfields; i++) { | |
11712 | key = field[i] | |
11713 | keylen = length(key) | |
11714 | if (S_is_set[key]) { | |
11715 | value = S[key] | |
11716 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
11717 | len += length(value) + length(field[++i]) | |
11718 | substed = 1 | |
11719 | } else | |
11720 | len += 1 + keylen | |
11721 | } | |
11722 | ||
11723 | print line | |
bec39cab AC |
11724 | } |
11725 | ||
81ecdfbb RW |
11726 | _ACAWK |
11727 | _ACEOF | |
11728 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
11729 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
11730 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
11731 | else | |
11732 | cat | |
d0ac1c44 SM |
11733 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
11734 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
dae5f5cf DJ |
11735 | _ACEOF |
11736 | ||
d0ac1c44 SM |
11737 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
11738 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
11739 | # trailing colons and then remove the whole line if VPATH becomes empty |
11740 | # (actually we leave an empty line to preserve line numbers). | |
11741 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
11742 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
11743 | h | |
11744 | s/// | |
11745 | s/^/:/ | |
11746 | s/[ ]*$/:/ | |
11747 | s/:\$(srcdir):/:/g | |
11748 | s/:\${srcdir}:/:/g | |
11749 | s/:@srcdir@:/:/g | |
11750 | s/^:*// | |
81ecdfbb | 11751 | s/:*$// |
d0ac1c44 SM |
11752 | x |
11753 | s/\(=[ ]*\).*/\1/ | |
11754 | G | |
11755 | s/\n// | |
81ecdfbb RW |
11756 | s/^[^=]*=[ ]*$// |
11757 | }' | |
11758 | fi | |
bec39cab | 11759 | |
81ecdfbb RW |
11760 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
11761 | fi # test -n "$CONFIG_FILES" | |
bec39cab | 11762 | |
81ecdfbb RW |
11763 | # Set up the scripts for CONFIG_HEADERS section. |
11764 | # No need to generate them if there are no CONFIG_HEADERS. | |
11765 | # This happens for instance with `./config.status Makefile'. | |
11766 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 11767 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb | 11768 | BEGIN { |
b80864fb DJ |
11769 | _ACEOF |
11770 | ||
81ecdfbb RW |
11771 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
11772 | # here-document in config.status, that substitutes the proper values into | |
11773 | # config.h.in to produce config.h. | |
11774 | ||
11775 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
11776 | # handling of long lines. | |
11777 | ac_delim='%!_!# ' | |
11778 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
11779 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
11780 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
11781 | break |
11782 | elif $ac_last_try; then | |
d0ac1c44 | 11783 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
11784 | else |
11785 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
d6e9fb05 | 11786 | fi |
81ecdfbb | 11787 | done |
d6e9fb05 | 11788 | |
81ecdfbb RW |
11789 | # For the awk script, D is an array of macro values keyed by name, |
11790 | # likewise P contains macro parameters if any. Preserve backslash | |
11791 | # newline sequences. | |
11792 | ||
11793 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
11794 | sed -n ' | |
11795 | s/.\{148\}/&'"$ac_delim"'/g | |
11796 | t rset | |
11797 | :rset | |
11798 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
11799 | t def | |
11800 | d | |
11801 | :def | |
11802 | s/\\$// | |
11803 | t bsnl | |
11804 | s/["\\]/\\&/g | |
11805 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11806 | D["\1"]=" \3"/p | |
11807 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
11808 | d | |
11809 | :bsnl | |
11810 | s/["\\]/\\&/g | |
11811 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
11812 | D["\1"]=" \3\\\\\\n"\\/p | |
11813 | t cont | |
11814 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
11815 | t cont | |
11816 | d | |
11817 | :cont | |
11818 | n | |
11819 | s/.\{148\}/&'"$ac_delim"'/g | |
11820 | t clear | |
11821 | :clear | |
11822 | s/\\$// | |
11823 | t bsnlc | |
11824 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
11825 | d | |
11826 | :bsnlc | |
11827 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
11828 | b cont | |
11829 | ' <confdefs.h | sed ' | |
11830 | s/'"$ac_delim"'/"\\\ | |
11831 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
11832 | ||
11833 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
11834 | for (key in D) D_is_set[key] = 1 | |
11835 | FS = "\a" | |
11836 | } | |
11837 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
11838 | line = \$ 0 | |
11839 | split(line, arg, " ") | |
11840 | if (arg[1] == "#") { | |
11841 | defundef = arg[2] | |
11842 | mac1 = arg[3] | |
11843 | } else { | |
11844 | defundef = substr(arg[1], 2) | |
11845 | mac1 = arg[2] | |
11846 | } | |
11847 | split(mac1, mac2, "(") #) | |
11848 | macro = mac2[1] | |
11849 | prefix = substr(line, 1, index(line, defundef) - 1) | |
11850 | if (D_is_set[macro]) { | |
11851 | # Preserve the white space surrounding the "#". | |
11852 | print prefix "define", macro P[macro] D[macro] | |
11853 | next | |
11854 | } else { | |
11855 | # Replace #undef with comments. This is necessary, for example, | |
11856 | # in the case of _POSIX_SOURCE, which is predefined and required | |
11857 | # on some systems where configure will not decide to define it. | |
11858 | if (defundef == "undef") { | |
11859 | print "/*", prefix defundef, macro, "*/" | |
11860 | next | |
11861 | } | |
11862 | } | |
11863 | } | |
11864 | { print } | |
11865 | _ACAWK | |
bec39cab | 11866 | _ACEOF |
81ecdfbb | 11867 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 11868 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb RW |
11869 | fi # test -n "$CONFIG_HEADERS" |
11870 | ||
11871 | ||
11872 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
11873 | shift | |
11874 | for ac_tag | |
11875 | do | |
11876 | case $ac_tag in | |
11877 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
11878 | esac | |
11879 | case $ac_mode$ac_tag in | |
11880 | :[FHL]*:*);; | |
d0ac1c44 | 11881 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
11882 | :[FH]-) ac_tag=-:-;; |
11883 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
11884 | esac | |
11885 | ac_save_IFS=$IFS | |
11886 | IFS=: | |
11887 | set x $ac_tag | |
11888 | IFS=$ac_save_IFS | |
11889 | shift | |
11890 | ac_file=$1 | |
11891 | shift | |
11892 | ||
11893 | case $ac_mode in | |
11894 | :L) ac_source=$1;; | |
11895 | :[FH]) | |
11896 | ac_file_inputs= | |
11897 | for ac_f | |
11898 | do | |
11899 | case $ac_f in | |
d0ac1c44 | 11900 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
11901 | *) # Look for the file first in the build tree, then in the source tree |
11902 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
11903 | # because $ac_f cannot contain `:'. | |
11904 | test -f "$ac_f" || | |
11905 | case $ac_f in | |
11906 | [\\/$]*) false;; | |
11907 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
11908 | esac || | |
d0ac1c44 | 11909 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
11910 | esac |
11911 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
11912 | as_fn_append ac_file_inputs " '$ac_f'" | |
11913 | done | |
11914 | ||
11915 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
11916 | # use $as_me), people would be surprised to read: | |
11917 | # /* config.h. Generated by config.status. */ | |
11918 | configure_input='Generated from '` | |
11919 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
11920 | `' by configure.' | |
11921 | if test x"$ac_file" != x-; then | |
11922 | configure_input="$ac_file. $configure_input" | |
11923 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
11924 | $as_echo "$as_me: creating $ac_file" >&6;} | |
11925 | fi | |
11926 | # Neutralize special characters interpreted by sed in replacement strings. | |
11927 | case $configure_input in #( | |
11928 | *\&* | *\|* | *\\* ) | |
11929 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
11930 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
11931 | *) ac_sed_conf_input=$configure_input;; | |
11932 | esac | |
11933 | ||
11934 | case $ac_tag in | |
d0ac1c44 SM |
11935 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
11936 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
11937 | esac |
11938 | ;; | |
d6e9fb05 JK |
11939 | esac |
11940 | ||
81ecdfbb | 11941 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
11942 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
11943 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
11944 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
11945 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
11946 | $as_echo X"$ac_file" | | |
11947 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
11948 | s//\1/ | |
11949 | q | |
11950 | } | |
11951 | /^X\(\/\/\)[^/].*/{ | |
11952 | s//\1/ | |
11953 | q | |
11954 | } | |
11955 | /^X\(\/\/\)$/{ | |
11956 | s//\1/ | |
11957 | q | |
11958 | } | |
11959 | /^X\(\/\).*/{ | |
11960 | s//\1/ | |
11961 | q | |
11962 | } | |
11963 | s/.*/./; q'` | |
11964 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
11965 | ac_builddir=. |
11966 | ||
81ecdfbb RW |
11967 | case "$ac_dir" in |
11968 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11969 | *) | |
11970 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
11971 | # A ".." for each directory in $ac_dir_suffix. | |
11972 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
11973 | case $ac_top_builddir_sub in | |
11974 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
11975 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
11976 | esac ;; | |
11977 | esac | |
11978 | ac_abs_top_builddir=$ac_pwd | |
11979 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
11980 | # for backward compatibility: | |
11981 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
11982 | |
11983 | case $srcdir in | |
81ecdfbb | 11984 | .) # We are building in place. |
bec39cab | 11985 | ac_srcdir=. |
81ecdfbb RW |
11986 | ac_top_srcdir=$ac_top_builddir_sub |
11987 | ac_abs_top_srcdir=$ac_pwd ;; | |
11988 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 11989 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
11990 | ac_top_srcdir=$srcdir |
11991 | ac_abs_top_srcdir=$srcdir ;; | |
11992 | *) # Relative name. | |
11993 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
11994 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
11995 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 11996 | esac |
81ecdfbb | 11997 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 11998 | |
bec39cab | 11999 | |
81ecdfbb RW |
12000 | case $ac_mode in |
12001 | :F) | |
12002 | # | |
12003 | # CONFIG_FILE | |
12004 | # | |
d6e9fb05 | 12005 | |
bec39cab AC |
12006 | case $INSTALL in |
12007 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 12008 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
d6e9fb05 | 12009 | esac |
81ecdfbb | 12010 | _ACEOF |
3db0444b | 12011 | |
81ecdfbb RW |
12012 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
12013 | # If the template does not know about datarootdir, expand it. | |
12014 | # FIXME: This hack should be removed a few years after 2.60. | |
12015 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
12016 | ac_sed_dataroot=' | |
12017 | /datarootdir/ { | |
12018 | p | |
12019 | q | |
12020 | } | |
12021 | /@datadir@/p | |
12022 | /@docdir@/p | |
12023 | /@infodir@/p | |
12024 | /@localedir@/p | |
12025 | /@mandir@/p' | |
12026 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
12027 | *datarootdir*) ac_datarootdir_seen=yes;; | |
12028 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
12029 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
12030 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
12031 | _ACEOF | |
12032 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12033 | ac_datarootdir_hack=' | |
12034 | s&@datadir@&$datadir&g | |
12035 | s&@docdir@&$docdir&g | |
12036 | s&@infodir@&$infodir&g | |
12037 | s&@localedir@&$localedir&g | |
12038 | s&@mandir@&$mandir&g | |
12039 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
12040 | esac | |
bec39cab | 12041 | _ACEOF |
81ecdfbb RW |
12042 | |
12043 | # Neutralize VPATH when `$srcdir' = `.'. | |
12044 | # Shell code in configure.ac might set extrasub. | |
12045 | # FIXME: do we really want to maintain this feature? | |
12046 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
12047 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
12048 | $extrasub |
12049 | _ACEOF | |
81ecdfbb | 12050 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
12051 | :t |
12052 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
12053 | s|@configure_input@|$ac_sed_conf_input|;t t |
12054 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
12055 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
12056 | s&@srcdir@&$ac_srcdir&;t t | |
12057 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
12058 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
12059 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
12060 | s&@builddir@&$ac_builddir&;t t | |
12061 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
12062 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
12063 | s&@INSTALL@&$ac_INSTALL&;t t | |
12064 | $ac_datarootdir_hack | |
12065 | " | |
d0ac1c44 SM |
12066 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
12067 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
12068 | |
12069 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
12070 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
12071 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
12072 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 12073 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 12074 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 12075 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 12076 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 12077 | |
d0ac1c44 | 12078 | rm -f "$ac_tmp/stdin" |
bec39cab | 12079 | case $ac_file in |
d0ac1c44 SM |
12080 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
12081 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 12082 | esac \ |
d0ac1c44 | 12083 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
12084 | ;; |
12085 | :H) | |
12086 | # | |
12087 | # CONFIG_HEADER | |
12088 | # | |
bec39cab | 12089 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
12090 | { |
12091 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
12092 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
12093 | } >"$ac_tmp/config.h" \ | |
12094 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
12095 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
12096 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
12097 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 12098 | else |
81ecdfbb | 12099 | rm -f "$ac_file" |
d0ac1c44 SM |
12100 | mv "$ac_tmp/config.h" "$ac_file" \ |
12101 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
84563040 | 12102 | fi |
bec39cab | 12103 | else |
81ecdfbb | 12104 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
12105 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
12106 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
d6e9fb05 | 12107 | fi |
81ecdfbb | 12108 | ;; |
dae5f5cf | 12109 | |
81ecdfbb RW |
12110 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
12111 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
12112 | ;; | |
12113 | esac | |
dae5f5cf DJ |
12114 | |
12115 | ||
81ecdfbb | 12116 | case $ac_file$ac_mode in |
c5adaa19 | 12117 | "config.h":H) echo > stamp-h ;; |
61c125b9 | 12118 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
60d6cfc9 YQ |
12119 | "gdbdepdir":C) |
12120 | for subdir in ${CONFIG_SRC_SUBDIR} | |
12121 | do | |
12122 | $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR | |
12123 | done ;; | |
81ecdfbb | 12124 | |
bec39cab | 12125 | esac |
81ecdfbb | 12126 | done # for ac_tag |
d6e9fb05 | 12127 | |
bec39cab | 12128 | |
81ecdfbb | 12129 | as_fn_exit 0 |
bec39cab | 12130 | _ACEOF |
bec39cab AC |
12131 | ac_clean_files=$ac_clean_files_save |
12132 | ||
81ecdfbb | 12133 | test $ac_write_fail = 0 || |
d0ac1c44 | 12134 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 12135 | |
bec39cab AC |
12136 | |
12137 | # configure is writing to config.log, and then calls config.status. | |
12138 | # config.status does its own redirection, appending to config.log. | |
12139 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
12140 | # by configure, so config.status won't be able to write to it; its | |
12141 | # output is simply discarded. So we exec the FD to /dev/null, | |
12142 | # effectively closing config.log, so it can be properly (re)opened and | |
12143 | # appended to by config.status. When coming back to configure, we | |
12144 | # need to make the FD available again. | |
12145 | if test "$no_create" != yes; then | |
12146 | ac_cs_success=: | |
12147 | ac_config_status_args= | |
12148 | test "$silent" = yes && | |
12149 | ac_config_status_args="$ac_config_status_args --quiet" | |
12150 | exec 5>/dev/null | |
12151 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
12152 | exec 5>>config.log | |
12153 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
12154 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 12155 | $ac_cs_success || as_fn_exit 1 |
81ecdfbb RW |
12156 | fi |
12157 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
12158 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
12159 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
bec39cab | 12160 | fi |
d6e9fb05 | 12161 |