Commit | Line | Data |
---|---|---|
c971b7fa PA |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
d0ac1c44 SM |
3 | # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION. |
4 | # | |
5 | # | |
6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
c971b7fa | 7 | # |
c971b7fa PA |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
11 | ## -------------------- ## | |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
14 | ||
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 : | |
18 | emulate sh | |
19 | NULLCMD=: | |
20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
21 | # is contrary to our usage. Disable this feature. | |
22 | alias -g '${1+"$@"}'='"$@"' | |
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 | |
31 | fi | |
32 | ||
33 | ||
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
79 | fi | |
80 | ||
81 | ||
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= |
c971b7fa PA |
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 | |
122 | PS1='$ ' | |
123 | PS2='> ' | |
124 | PS4='+ ' | |
125 | ||
126 | # NLS nuisances. | |
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;} | |
c971b7fa PA |
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" | |
c971b7fa PA |
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 | |
211 | do | |
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 | |
c971b7fa PA |
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." | |
266 | else | |
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." | |
271 | fi | |
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" |
c971b7fa PA |
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 | |
c971b7fa PA |
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 | # ---------------------------------------- | |
c971b7fa PA |
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. |
c971b7fa PA |
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 | |
c971b7fa | 414 | fi |
d0ac1c44 | 415 | $as_echo "$as_me: error: $2" >&2 |
c971b7fa PA |
416 | as_fn_exit $as_status |
417 | } # as_fn_error | |
418 | ||
419 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
421 | as_expr=expr | |
422 | else | |
423 | as_expr=false | |
424 | fi | |
425 | ||
426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
427 | as_basename=basename | |
428 | else | |
429 | as_basename=false | |
430 | fi | |
431 | ||
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 | |
437 | ||
438 | as_me=`$as_basename -- "$0" || | |
439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
440 | X"$0" : 'X\(//\)$' \| \ | |
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'` | |
456 | ||
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 | |
463 | ||
464 | ||
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 | | |
474 | sed ' | |
475 | s/[$]LINENO.*/&-/ | |
476 | t lineno | |
477 | b | |
478 | :lineno | |
479 | N | |
480 | :loop | |
481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
482 | t loop | |
483 | s/-\n.*// | |
484 | ' >$as_me.lineno && | |
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; } | |
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 | |
c971b7fa PA |
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 | |
494 | # original and so on. Autoconf is especially sensitive to this). | |
495 | . "./$as_me.lineno" | |
496 | # Exit status is that of the last command. | |
497 | exit | |
498 | } | |
499 | ||
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';; | |
511 | esac | |
512 | ||
513 | rm -f conf$$ conf$$.exe conf$$.file | |
514 | if test -d conf$$.dir; then | |
515 | rm -f conf$$.dir/conf$$.file | |
516 | else | |
517 | rm -f conf$$.dir | |
518 | mkdir conf$$.dir 2>/dev/null | |
519 | fi | |
520 | if (echo >conf$$.file) 2>/dev/null; then | |
521 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
522 | as_ln_s='ln -s' | |
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'. |
c971b7fa | 527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 528 | as_ln_s='cp -pR' |
c971b7fa PA |
529 | elif ln conf$$.file conf$$ 2>/dev/null; then |
530 | as_ln_s=ln | |
531 | else | |
d0ac1c44 | 532 | as_ln_s='cp -pR' |
c971b7fa PA |
533 | fi |
534 | else | |
d0ac1c44 | 535 | as_ln_s='cp -pR' |
c971b7fa PA |
536 | fi |
537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
538 | rmdir conf$$.dir 2>/dev/null | |
539 | ||
540 | if mkdir -p . 2>/dev/null; then | |
541 | as_mkdir_p='mkdir -p "$as_dir"' | |
542 | else | |
543 | test -d ./-p && rmdir ./-p | |
544 | as_mkdir_p=false | |
545 | fi | |
546 | ||
d0ac1c44 SM |
547 | as_test_x='test -x' |
548 | as_executable_p=as_fn_executable_p | |
c971b7fa PA |
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 | |
c971b7fa PA |
559 | |
560 | # Name of the host. | |
d0ac1c44 | 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
c971b7fa PA |
562 | # so uname gets run too. |
563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
564 | ||
565 | # | |
566 | # Initializations. | |
567 | # | |
568 | ac_default_prefix=/usr/local | |
569 | ac_clean_files= | |
570 | ac_config_libobj_dir=. | |
571 | LIBOBJS= | |
572 | cross_compiling=no | |
573 | subdirs= | |
574 | MFLAGS= | |
575 | MAKEFLAGS= | |
576 | ||
577 | # Identity of this package. | |
d0ac1c44 SM |
578 | PACKAGE_NAME='libgnu' |
579 | PACKAGE_TARNAME='libgnu' | |
580 | PACKAGE_VERSION='UNUSED-VERSION' | |
581 | PACKAGE_STRING='libgnu UNUSED-VERSION' | |
582 | PACKAGE_BUGREPORT='' | |
583 | PACKAGE_URL='' | |
c971b7fa | 584 | |
8690e634 | 585 | ac_unique_file="import/memmem.c" |
c971b7fa PA |
586 | # Factoring default headers for most tests. |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
589 | #ifdef HAVE_SYS_TYPES_H | |
590 | # include <sys/types.h> | |
591 | #endif | |
592 | #ifdef HAVE_SYS_STAT_H | |
593 | # include <sys/stat.h> | |
594 | #endif | |
595 | #ifdef STDC_HEADERS | |
596 | # include <stdlib.h> | |
597 | # include <stddef.h> | |
598 | #else | |
599 | # ifdef HAVE_STDLIB_H | |
600 | # include <stdlib.h> | |
601 | # endif | |
602 | #endif | |
603 | #ifdef HAVE_STRING_H | |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
605 | # include <memory.h> | |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
609 | #ifdef HAVE_STRINGS_H | |
610 | # include <strings.h> | |
611 | #endif | |
612 | #ifdef HAVE_INTTYPES_H | |
613 | # include <inttypes.h> | |
614 | #endif | |
615 | #ifdef HAVE_STDINT_H | |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
619 | # include <unistd.h> | |
620 | #endif" | |
621 | ||
5abebf3c | 622 | gl_use_threads_default= |
c0c3707f CB |
623 | gl_use_winpthreads_default= |
624 | ac_header_list= | |
625 | ac_func_list= | |
8690e634 | 626 | gl_fnmatch_required=POSIX |
c971b7fa PA |
627 | ac_subst_vars='am__EXEEXT_FALSE |
628 | am__EXEEXT_TRUE | |
629 | gltests_LTLIBOBJS | |
630 | gltests_LIBOBJS | |
631 | gl_LTLIBOBJS | |
632 | gl_LIBOBJS | |
633 | LTLIBOBJS | |
634 | LIBOBJS | |
635 | LN_S | |
39be3c7e SM |
636 | AM_BACKSLASH |
637 | AM_DEFAULT_VERBOSITY | |
d0ac1c44 SM |
638 | AM_DEFAULT_V |
639 | AM_V | |
c971b7fa PA |
640 | am__fastdepCC_FALSE |
641 | am__fastdepCC_TRUE | |
642 | CCDEPMODE | |
d0ac1c44 | 643 | am__nodep |
c971b7fa PA |
644 | AMDEPBACKSLASH |
645 | AMDEP_FALSE | |
646 | AMDEP_TRUE | |
647 | am__quote | |
648 | am__include | |
649 | DEPDIR | |
650 | am__untar | |
651 | am__tar | |
652 | AMTAR | |
653 | am__leading_dot | |
654 | SET_MAKE | |
655 | AWK | |
656 | mkdir_p | |
c971b7fa PA |
657 | INSTALL_STRIP_PROGRAM |
658 | STRIP | |
659 | install_sh | |
660 | MAKEINFO | |
661 | AUTOHEADER | |
662 | AUTOMAKE | |
663 | AUTOCONF | |
664 | ACLOCAL | |
665 | VERSION | |
666 | PACKAGE | |
667 | CYGPATH_W | |
668 | am__isrc | |
669 | INSTALL_DATA | |
670 | INSTALL_SCRIPT | |
671 | INSTALL_PROGRAM | |
672 | LIBGNU_LTLIBDEPS | |
673 | LIBGNU_LIBDEPS | |
674 | gltests_WITNESS | |
8690e634 JK |
675 | REPLACE_TOWLOWER |
676 | REPLACE_ISWCNTRL | |
677 | HAVE_WCTYPE_H | |
678 | NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H | |
679 | NEXT_WCTYPE_H | |
680 | HAVE_ISWCNTRL | |
5df4cba6 SM |
681 | REPLACE_ISWXDIGIT |
682 | REPLACE_ISWDIGIT | |
8690e634 JK |
683 | REPLACE_ISWBLANK |
684 | HAVE_WCTRANS_T | |
685 | HAVE_WCTYPE_T | |
686 | HAVE_ISWBLANK | |
687 | GNULIB_TOWCTRANS | |
688 | GNULIB_WCTRANS | |
689 | GNULIB_ISWCTYPE | |
690 | GNULIB_WCTYPE | |
5df4cba6 SM |
691 | GNULIB_ISWXDIGIT |
692 | GNULIB_ISWDIGIT | |
8690e634 | 693 | GNULIB_ISWBLANK |
c0c3707f | 694 | HAVE_CRTDEFS_H |
8690e634 | 695 | HAVE_WINT_T |
8690e634 JK |
696 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H |
697 | NEXT_WCHAR_H | |
8839a007 PA |
698 | HAVE_UNISTD_H |
699 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
700 | NEXT_UNISTD_H | |
4a626d0a | 701 | UNISTD_H_DEFINES_STRUCT_TIMESPEC |
09607c9e TT |
702 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
703 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
704 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
705 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
706 | NEXT_TIME_H | |
725e2999 JB |
707 | HAVE_SYS_UIO_H |
708 | NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H | |
709 | NEXT_SYS_UIO_H | |
c0c3707f | 710 | WINDOWS_STAT_INODES |
63ce7108 TT |
711 | WINDOWS_64_BIT_OFF_T |
712 | NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H | |
713 | NEXT_SYS_TYPES_H | |
698be2d8 CB |
714 | HAVE_SYS_RANDOM_H |
715 | NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H | |
716 | NEXT_SYS_RANDOM_H | |
2196f55f YQ |
717 | NEXT_AS_FIRST_DIRECTIVE_STRING_H |
718 | NEXT_STRING_H | |
98399780 YQ |
719 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
720 | NEXT_STDLIB_H | |
6a29c58e YQ |
721 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
722 | NEXT_STDIO_H | |
2196f55f YQ |
723 | HAVE__BOOL |
724 | GL_GENERATE_STDBOOL_H_FALSE | |
725 | GL_GENERATE_STDBOOL_H_TRUE | |
726 | STDBOOL_H | |
725e2999 JB |
727 | GL_GENERATE_STDALIGN_H_FALSE |
728 | GL_GENERATE_STDALIGN_H_TRUE | |
729 | STDALIGN_H | |
0750520d PA |
730 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
731 | NEXT_SIGNAL_H | |
732 | REPLACE_RAISE | |
733 | REPLACE_PTHREAD_SIGMASK | |
734 | HAVE_SIGHANDLER_T | |
735 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
736 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
737 | HAVE_SIGACTION | |
738 | HAVE_SIGINFO_T | |
739 | HAVE_SIGSET_T | |
740 | HAVE_RAISE | |
741 | HAVE_PTHREAD_SIGMASK | |
742 | HAVE_POSIX_SIGNALBLOCKING | |
743 | GNULIB_SIGACTION | |
744 | GNULIB_SIGPROCMASK | |
745 | GNULIB_SIGNAL_H_SIGPIPE | |
746 | GNULIB_RAISE | |
747 | GNULIB_PTHREAD_SIGMASK | |
6a29c58e YQ |
748 | REPLACE_VSPRINTF |
749 | REPLACE_VSNPRINTF | |
750 | REPLACE_VPRINTF | |
751 | REPLACE_VFPRINTF | |
752 | REPLACE_VDPRINTF | |
753 | REPLACE_VASPRINTF | |
754 | REPLACE_TMPFILE | |
755 | REPLACE_STDIO_WRITE_FUNCS | |
756 | REPLACE_STDIO_READ_FUNCS | |
757 | REPLACE_SPRINTF | |
758 | REPLACE_SNPRINTF | |
759 | REPLACE_RENAMEAT | |
760 | REPLACE_RENAME | |
761 | REPLACE_REMOVE | |
762 | REPLACE_PRINTF | |
763 | REPLACE_POPEN | |
764 | REPLACE_PERROR | |
765 | REPLACE_OBSTACK_PRINTF | |
766 | REPLACE_GETLINE | |
767 | REPLACE_GETDELIM | |
768 | REPLACE_FTELLO | |
769 | REPLACE_FTELL | |
770 | REPLACE_FSEEKO | |
771 | REPLACE_FSEEK | |
772 | REPLACE_FREOPEN | |
773 | REPLACE_FPURGE | |
774 | REPLACE_FPRINTF | |
775 | REPLACE_FOPEN | |
776 | REPLACE_FFLUSH | |
777 | REPLACE_FDOPEN | |
778 | REPLACE_FCLOSE | |
779 | REPLACE_DPRINTF | |
780 | HAVE_VDPRINTF | |
781 | HAVE_VASPRINTF | |
782 | HAVE_RENAMEAT | |
783 | HAVE_POPEN | |
784 | HAVE_PCLOSE | |
785 | HAVE_FTELLO | |
786 | HAVE_FSEEKO | |
787 | HAVE_DPRINTF | |
788 | HAVE_DECL_VSNPRINTF | |
789 | HAVE_DECL_SNPRINTF | |
790 | HAVE_DECL_OBSTACK_PRINTF | |
791 | HAVE_DECL_GETLINE | |
792 | HAVE_DECL_GETDELIM | |
793 | HAVE_DECL_FTELLO | |
794 | HAVE_DECL_FSEEKO | |
795 | HAVE_DECL_FPURGE | |
796 | GNULIB_VSPRINTF_POSIX | |
797 | GNULIB_VSNPRINTF | |
798 | GNULIB_VPRINTF_POSIX | |
799 | GNULIB_VPRINTF | |
800 | GNULIB_VFPRINTF_POSIX | |
801 | GNULIB_VFPRINTF | |
802 | GNULIB_VDPRINTF | |
803 | GNULIB_VSCANF | |
804 | GNULIB_VFSCANF | |
805 | GNULIB_VASPRINTF | |
806 | GNULIB_TMPFILE | |
807 | GNULIB_STDIO_H_SIGPIPE | |
808 | GNULIB_STDIO_H_NONBLOCKING | |
809 | GNULIB_SPRINTF_POSIX | |
810 | GNULIB_SNPRINTF | |
811 | GNULIB_SCANF | |
812 | GNULIB_RENAMEAT | |
813 | GNULIB_RENAME | |
814 | GNULIB_REMOVE | |
815 | GNULIB_PUTS | |
816 | GNULIB_PUTCHAR | |
817 | GNULIB_PUTC | |
818 | GNULIB_PRINTF_POSIX | |
819 | GNULIB_PRINTF | |
820 | GNULIB_POPEN | |
821 | GNULIB_PERROR | |
822 | GNULIB_PCLOSE | |
823 | GNULIB_OBSTACK_PRINTF_POSIX | |
824 | GNULIB_OBSTACK_PRINTF | |
825 | GNULIB_GETLINE | |
826 | GNULIB_GETDELIM | |
827 | GNULIB_GETCHAR | |
828 | GNULIB_GETC | |
829 | GNULIB_FWRITE | |
830 | GNULIB_FTELLO | |
831 | GNULIB_FTELL | |
832 | GNULIB_FSEEKO | |
833 | GNULIB_FSEEK | |
834 | GNULIB_FSCANF | |
835 | GNULIB_FREOPEN | |
836 | GNULIB_FREAD | |
837 | GNULIB_FPUTS | |
838 | GNULIB_FPUTC | |
839 | GNULIB_FPURGE | |
840 | GNULIB_FPRINTF_POSIX | |
841 | GNULIB_FPRINTF | |
842 | GNULIB_FOPEN | |
843 | GNULIB_FGETS | |
844 | GNULIB_FGETC | |
845 | GNULIB_FFLUSH | |
846 | GNULIB_FDOPEN | |
847 | GNULIB_FCLOSE | |
848 | GNULIB_DPRINTF | |
725e2999 JB |
849 | GL_GENERATE_NETINET_IN_H_FALSE |
850 | GL_GENERATE_NETINET_IN_H_TRUE | |
851 | NETINET_IN_H | |
852 | HAVE_NETINET_IN_H | |
853 | NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H | |
854 | NEXT_NETINET_IN_H | |
c971b7fa | 855 | UNDEFINE_STRTOK_R |
c971b7fa | 856 | REPLACE_STRSIGNAL |
c971b7fa PA |
857 | REPLACE_STRERROR_R |
858 | REPLACE_STRERROR | |
c0c3707f | 859 | REPLACE_STRTOK_R |
c971b7fa PA |
860 | REPLACE_STRCASESTR |
861 | REPLACE_STRSTR | |
c0c3707f CB |
862 | REPLACE_STRNLEN |
863 | REPLACE_STRNDUP | |
864 | REPLACE_STRNCAT | |
c971b7fa | 865 | REPLACE_STRDUP |
c0c3707f | 866 | REPLACE_STRCHRNUL |
c971b7fa PA |
867 | REPLACE_STPNCPY |
868 | REPLACE_MEMMEM | |
869 | REPLACE_MEMCHR | |
870 | HAVE_STRVERSCMP | |
871 | HAVE_DECL_STRSIGNAL | |
872 | HAVE_DECL_STRERROR_R | |
873 | HAVE_DECL_STRTOK_R | |
874 | HAVE_STRCASESTR | |
875 | HAVE_STRSEP | |
876 | HAVE_STRPBRK | |
877 | HAVE_DECL_STRNLEN | |
878 | HAVE_DECL_STRNDUP | |
879 | HAVE_DECL_STRDUP | |
880 | HAVE_STRCHRNUL | |
881 | HAVE_STPNCPY | |
882 | HAVE_STPCPY | |
883 | HAVE_RAWMEMCHR | |
884 | HAVE_DECL_MEMRCHR | |
885 | HAVE_MEMPCPY | |
886 | HAVE_DECL_MEMMEM | |
887 | HAVE_MEMCHR | |
888 | HAVE_FFSLL | |
889 | HAVE_FFSL | |
c0c3707f | 890 | HAVE_EXPLICIT_BZERO |
c971b7fa PA |
891 | HAVE_MBSLEN |
892 | GNULIB_STRVERSCMP | |
893 | GNULIB_STRSIGNAL | |
894 | GNULIB_STRERROR_R | |
895 | GNULIB_STRERROR | |
896 | GNULIB_MBSTOK_R | |
897 | GNULIB_MBSSEP | |
898 | GNULIB_MBSSPN | |
899 | GNULIB_MBSPBRK | |
900 | GNULIB_MBSCSPN | |
901 | GNULIB_MBSCASESTR | |
902 | GNULIB_MBSPCASECMP | |
903 | GNULIB_MBSNCASECMP | |
904 | GNULIB_MBSCASECMP | |
905 | GNULIB_MBSSTR | |
906 | GNULIB_MBSRCHR | |
907 | GNULIB_MBSCHR | |
908 | GNULIB_MBSNLEN | |
909 | GNULIB_MBSLEN | |
910 | GNULIB_STRTOK_R | |
911 | GNULIB_STRCASESTR | |
912 | GNULIB_STRSTR | |
913 | GNULIB_STRSEP | |
914 | GNULIB_STRPBRK | |
915 | GNULIB_STRNLEN | |
916 | GNULIB_STRNDUP | |
917 | GNULIB_STRNCAT | |
918 | GNULIB_STRDUP | |
919 | GNULIB_STRCHRNUL | |
920 | GNULIB_STPNCPY | |
921 | GNULIB_STPCPY | |
922 | GNULIB_RAWMEMCHR | |
923 | GNULIB_MEMRCHR | |
924 | GNULIB_MEMPCPY | |
925 | GNULIB_MEMMEM | |
926 | GNULIB_MEMCHR | |
927 | GNULIB_FFSLL | |
928 | GNULIB_FFSL | |
c0c3707f | 929 | GNULIB_EXPLICIT_BZERO |
5df4cba6 SM |
930 | HAVE_VISIBILITY |
931 | CFLAG_VISIBILITY | |
932 | LIB_MBRTOWC | |
8690e634 | 933 | LOCALE_ZH_CN |
c0c3707f | 934 | LOCALE_FR_UTF8 |
8690e634 | 935 | LOCALE_JA |
88b48903 WN |
936 | NEXT_AS_FIRST_DIRECTIVE_MATH_H |
937 | NEXT_MATH_H | |
5abebf3c CB |
938 | LTLIBMULTITHREAD |
939 | LIBMULTITHREAD | |
940 | LTLIBTHREAD | |
941 | LIBTHREAD | |
5df4cba6 SM |
942 | LIBSTDTHREAD |
943 | NEXT_AS_FIRST_DIRECTIVE_LOCALE_H | |
944 | NEXT_LOCALE_H | |
945 | HAVE_XLOCALE_H | |
946 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H | |
947 | NEXT_STDDEF_H | |
948 | GL_GENERATE_STDDEF_H_FALSE | |
949 | GL_GENERATE_STDDEF_H_TRUE | |
950 | STDDEF_H | |
951 | HAVE_WCHAR_T | |
952 | HAVE_MAX_ALIGN_T | |
953 | REPLACE_NULL | |
954 | REPLACE_STRUCT_LCONV | |
955 | REPLACE_FREELOCALE | |
956 | REPLACE_DUPLOCALE | |
957 | REPLACE_NEWLOCALE | |
958 | REPLACE_SETLOCALE | |
959 | REPLACE_LOCALECONV | |
960 | HAVE_FREELOCALE | |
961 | HAVE_DUPLOCALE | |
962 | HAVE_NEWLOCALE | |
963 | GNULIB_LOCALENAME | |
964 | GNULIB_DUPLOCALE | |
965 | GNULIB_SETLOCALE_NULL | |
966 | GNULIB_SETLOCALE | |
967 | GNULIB_LOCALECONV | |
8690e634 | 968 | LOCALCHARSET_TESTS_ENVIRONMENT |
c971b7fa PA |
969 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
970 | NEXT_INTTYPES_H | |
971 | UINT64_MAX_EQ_ULONG_MAX | |
972 | UINT32_MAX_LT_UINTMAX_MAX | |
973 | PRIPTR_PREFIX | |
974 | PRI_MACROS_BROKEN | |
975 | INT64_MAX_EQ_LONG_MAX | |
976 | INT32_MAX_LT_INTMAX_MAX | |
4a626d0a | 977 | REPLACE_STRTOUMAX |
c971b7fa | 978 | REPLACE_STRTOIMAX |
c0c3707f | 979 | HAVE_IMAXDIV_T |
c971b7fa PA |
980 | HAVE_DECL_STRTOUMAX |
981 | HAVE_DECL_STRTOIMAX | |
982 | HAVE_DECL_IMAXDIV | |
983 | HAVE_DECL_IMAXABS | |
984 | GNULIB_STRTOUMAX | |
985 | GNULIB_STRTOIMAX | |
986 | GNULIB_IMAXDIV | |
987 | GNULIB_IMAXABS | |
988 | GL_GENERATE_STDINT_H_FALSE | |
989 | GL_GENERATE_STDINT_H_TRUE | |
990 | STDINT_H | |
49e4877c PA |
991 | HAVE_SYS_INTTYPES_H |
992 | HAVE_SYS_BITYPES_H | |
993 | HAVE_C99_STDINT_H | |
c971b7fa PA |
994 | WINT_T_SUFFIX |
995 | WCHAR_T_SUFFIX | |
996 | SIG_ATOMIC_T_SUFFIX | |
997 | SIZE_T_SUFFIX | |
998 | PTRDIFF_T_SUFFIX | |
999 | HAVE_SIGNED_WINT_T | |
1000 | HAVE_SIGNED_WCHAR_T | |
1001 | HAVE_SIGNED_SIG_ATOMIC_T | |
1002 | BITSIZEOF_WINT_T | |
1003 | BITSIZEOF_WCHAR_T | |
1004 | BITSIZEOF_SIG_ATOMIC_T | |
1005 | BITSIZEOF_SIZE_T | |
1006 | BITSIZEOF_PTRDIFF_T | |
1007 | APPLE_UNIVERSAL_BUILD | |
c971b7fa PA |
1008 | HAVE_STDINT_H |
1009 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
1010 | NEXT_STDINT_H | |
c971b7fa PA |
1011 | HAVE_SYS_TYPES_H |
1012 | HAVE_INTTYPES_H | |
1013 | HAVE_WCHAR_H | |
c0c3707f | 1014 | GNULIB_OVERRIDES_WINT_T |
49e4877c PA |
1015 | GL_GENERATE_LIMITS_H_FALSE |
1016 | GL_GENERATE_LIMITS_H_TRUE | |
1017 | LIMITS_H | |
1018 | NEXT_AS_FIRST_DIRECTIVE_LIMITS_H | |
1019 | NEXT_LIMITS_H | |
725e2999 JB |
1020 | HAVE_SYS_SOCKET_H |
1021 | NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H | |
1022 | NEXT_SYS_SOCKET_H | |
1023 | HAVE_ACCEPT4 | |
1024 | HAVE_SA_FAMILY_T | |
1025 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY | |
1026 | HAVE_STRUCT_SOCKADDR_STORAGE | |
1027 | GNULIB_ACCEPT4 | |
1028 | GNULIB_SHUTDOWN | |
1029 | GNULIB_SETSOCKOPT | |
1030 | GNULIB_SENDTO | |
1031 | GNULIB_RECVFROM | |
1032 | GNULIB_SEND | |
1033 | GNULIB_RECV | |
1034 | GNULIB_LISTEN | |
1035 | GNULIB_GETSOCKOPT | |
1036 | GNULIB_GETSOCKNAME | |
1037 | GNULIB_GETPEERNAME | |
1038 | GNULIB_BIND | |
1039 | GNULIB_ACCEPT | |
1040 | GNULIB_CONNECT | |
1041 | GNULIB_SOCKET | |
1042 | INET_NTOP_LIB | |
5df4cba6 SM |
1043 | LIB_HARD_LOCALE |
1044 | LIB_SETLOCALE_NULL | |
1045 | LIB_SCHED_YIELD | |
1046 | LIBPMULTITHREAD | |
1047 | LIBPTHREAD | |
6ec2e0f5 SDJ |
1048 | GL_GENERATE_GLOB_H_FALSE |
1049 | GL_GENERATE_GLOB_H_TRUE | |
1050 | GLOB_H | |
c0c3707f CB |
1051 | HAVE_GLOB_H |
1052 | NEXT_AS_FIRST_DIRECTIVE_GLOB_H | |
1053 | NEXT_GLOB_H | |
1054 | REPLACE_GLOB_PATTERN_P | |
1055 | REPLACE_GLOB | |
1056 | HAVE_GLOB_PATTERN_P | |
1057 | HAVE_GLOB | |
1058 | GNULIB_GLOB | |
1059 | REPLACE_LOCALTIME | |
1060 | REPLACE_GMTIME | |
1061 | REPLACE_TZSET | |
1062 | REPLACE_TIMEGM | |
1063 | REPLACE_STRFTIME | |
1064 | REPLACE_NANOSLEEP | |
1065 | REPLACE_MKTIME | |
1066 | REPLACE_LOCALTIME_R | |
1067 | REPLACE_CTIME | |
1068 | HAVE_TIMEZONE_T | |
1069 | HAVE_TZSET | |
1070 | HAVE_TIMEGM | |
1071 | HAVE_STRPTIME | |
1072 | HAVE_NANOSLEEP | |
1073 | HAVE_DECL_LOCALTIME_R | |
1074 | GNULIB_TZSET | |
1075 | GNULIB_TIME_RZ | |
1076 | GNULIB_TIME_R | |
1077 | GNULIB_TIMEGM | |
1078 | GNULIB_STRPTIME | |
1079 | GNULIB_STRFTIME | |
1080 | GNULIB_NANOSLEEP | |
1081 | GNULIB_LOCALTIME | |
1082 | GNULIB_MKTIME | |
1083 | GNULIB_CTIME | |
4a626d0a PA |
1084 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H |
1085 | NEXT_SYS_TIME_H | |
1086 | REPLACE_STRUCT_TIMEVAL | |
1087 | REPLACE_GETTIMEOFDAY | |
4a626d0a PA |
1088 | HAVE_SYS_TIME_H |
1089 | HAVE_STRUCT_TIMEVAL | |
1090 | HAVE_GETTIMEOFDAY | |
1091 | GNULIB_GETTIMEOFDAY | |
6ec2e0f5 SDJ |
1092 | LTLIBINTL |
1093 | LIBINTL | |
698be2d8 CB |
1094 | LIB_GETRANDOM |
1095 | REPLACE_GETRANDOM | |
1096 | HAVE_GETRANDOM | |
1097 | GNULIB_GETRANDOM | |
c0c3707f | 1098 | LIB_GETLOGIN |
6ec2e0f5 | 1099 | WINDOWS_64_BIT_ST_SIZE |
c0c3707f | 1100 | WINDOWS_STAT_TIMESPEC |
6ec2e0f5 SDJ |
1101 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
1102 | NEXT_SYS_STAT_H | |
1103 | REPLACE_UTIMENSAT | |
1104 | REPLACE_STAT | |
1105 | REPLACE_MKNOD | |
1106 | REPLACE_MKFIFO | |
1107 | REPLACE_MKDIR | |
1108 | REPLACE_LSTAT | |
1109 | REPLACE_FUTIMENS | |
1110 | REPLACE_FSTATAT | |
1111 | REPLACE_FSTAT | |
5df4cba6 | 1112 | REPLACE_FCHMODAT |
6ec2e0f5 SDJ |
1113 | HAVE_UTIMENSAT |
1114 | HAVE_MKNODAT | |
1115 | HAVE_MKNOD | |
1116 | HAVE_MKFIFOAT | |
1117 | HAVE_MKFIFO | |
1118 | HAVE_MKDIRAT | |
1119 | HAVE_LSTAT | |
1120 | HAVE_LCHMOD | |
1121 | HAVE_FUTIMENS | |
1122 | HAVE_FSTATAT | |
1123 | HAVE_FCHMODAT | |
c0c3707f | 1124 | GNULIB_OVERRIDES_STRUCT_STAT |
6ec2e0f5 SDJ |
1125 | GNULIB_UTIMENSAT |
1126 | GNULIB_STAT | |
1127 | GNULIB_MKNODAT | |
1128 | GNULIB_MKNOD | |
1129 | GNULIB_MKFIFOAT | |
1130 | GNULIB_MKFIFO | |
1131 | GNULIB_MKDIRAT | |
1132 | GNULIB_LSTAT | |
1133 | GNULIB_LCHMOD | |
1134 | GNULIB_FUTIMENS | |
1135 | GNULIB_FSTATAT | |
1136 | GNULIB_FSTAT | |
1137 | GNULIB_FCHMODAT | |
88b48903 WN |
1138 | FREXPL_LIBM |
1139 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE | |
1140 | FREXP_LIBM | |
1141 | REPLACE_TRUNCL | |
1142 | REPLACE_TRUNCF | |
1143 | REPLACE_TRUNC | |
c0c3707f CB |
1144 | REPLACE_TANHF |
1145 | REPLACE_TANF | |
88b48903 | 1146 | REPLACE_SQRTL |
c0c3707f CB |
1147 | REPLACE_SQRTF |
1148 | REPLACE_SINHF | |
1149 | REPLACE_SINF | |
88b48903 WN |
1150 | REPLACE_SIGNBIT_USING_GCC |
1151 | REPLACE_SIGNBIT | |
1152 | REPLACE_ROUNDL | |
1153 | REPLACE_ROUNDF | |
1154 | REPLACE_ROUND | |
c0c3707f | 1155 | REPLACE_RINTL |
88b48903 WN |
1156 | REPLACE_REMAINDERL |
1157 | REPLACE_REMAINDERF | |
1158 | REPLACE_REMAINDER | |
1159 | REPLACE_NAN | |
1160 | REPLACE_MODFL | |
1161 | REPLACE_MODFF | |
1162 | REPLACE_MODF | |
1163 | REPLACE_LOGBL | |
1164 | REPLACE_LOGBF | |
1165 | REPLACE_LOGB | |
1166 | REPLACE_LOG2L | |
1167 | REPLACE_LOG2F | |
1168 | REPLACE_LOG2 | |
1169 | REPLACE_LOG1PL | |
1170 | REPLACE_LOG1PF | |
1171 | REPLACE_LOG1P | |
1172 | REPLACE_LOG10L | |
1173 | REPLACE_LOG10F | |
1174 | REPLACE_LOG10 | |
1175 | REPLACE_LOGL | |
1176 | REPLACE_LOGF | |
1177 | REPLACE_LOG | |
1178 | REPLACE_LDEXPL | |
1179 | REPLACE_ISNAN | |
1180 | REPLACE_ISINF | |
1181 | REPLACE_ISFINITE | |
c0c3707f | 1182 | REPLACE_ILOGBL |
88b48903 WN |
1183 | REPLACE_ILOGBF |
1184 | REPLACE_ILOGB | |
1185 | REPLACE_HYPOTL | |
1186 | REPLACE_HYPOTF | |
1187 | REPLACE_HYPOT | |
1188 | REPLACE_HUGE_VAL | |
1189 | REPLACE_FREXPL | |
1190 | REPLACE_FREXP | |
1191 | REPLACE_FREXPF | |
1192 | REPLACE_FMODL | |
1193 | REPLACE_FMODF | |
1194 | REPLACE_FMOD | |
1195 | REPLACE_FMAL | |
1196 | REPLACE_FMAF | |
1197 | REPLACE_FMA | |
1198 | REPLACE_FLOORL | |
1199 | REPLACE_FLOORF | |
1200 | REPLACE_FLOOR | |
1201 | REPLACE_FABSL | |
1202 | REPLACE_EXP2L | |
1203 | REPLACE_EXP2 | |
c0c3707f | 1204 | REPLACE_EXPM1L |
88b48903 WN |
1205 | REPLACE_EXPM1F |
1206 | REPLACE_EXPM1 | |
c0c3707f CB |
1207 | REPLACE_EXPL |
1208 | REPLACE_EXPF | |
1209 | REPLACE_COSHF | |
1210 | REPLACE_COSF | |
88b48903 WN |
1211 | REPLACE_CEILL |
1212 | REPLACE_CEILF | |
1213 | REPLACE_CEIL | |
1214 | REPLACE_CBRTL | |
1215 | REPLACE_CBRTF | |
c0c3707f CB |
1216 | REPLACE_ATAN2F |
1217 | REPLACE_ATANF | |
1218 | REPLACE_ASINF | |
1219 | REPLACE_ACOSF | |
88b48903 WN |
1220 | HAVE_DECL_TRUNCL |
1221 | HAVE_DECL_TRUNCF | |
1222 | HAVE_DECL_TRUNC | |
1223 | HAVE_DECL_TANL | |
1224 | HAVE_DECL_SQRTL | |
1225 | HAVE_DECL_SINL | |
1226 | HAVE_DECL_ROUNDL | |
1227 | HAVE_DECL_ROUNDF | |
1228 | HAVE_DECL_ROUND | |
1229 | HAVE_DECL_RINTF | |
1230 | HAVE_DECL_REMAINDERL | |
1231 | HAVE_DECL_REMAINDER | |
1232 | HAVE_DECL_LOGB | |
1233 | HAVE_DECL_LOG2L | |
1234 | HAVE_DECL_LOG2F | |
1235 | HAVE_DECL_LOG2 | |
1236 | HAVE_DECL_LOG10L | |
1237 | HAVE_DECL_LOGL | |
1238 | HAVE_DECL_LDEXPL | |
1239 | HAVE_DECL_FREXPL | |
1240 | HAVE_DECL_FLOORL | |
1241 | HAVE_DECL_FLOORF | |
1242 | HAVE_DECL_EXPM1L | |
1243 | HAVE_DECL_EXP2L | |
1244 | HAVE_DECL_EXP2F | |
1245 | HAVE_DECL_EXP2 | |
1246 | HAVE_DECL_EXPL | |
1247 | HAVE_DECL_COSL | |
1248 | HAVE_DECL_COPYSIGNF | |
1249 | HAVE_DECL_CEILL | |
1250 | HAVE_DECL_CEILF | |
1251 | HAVE_DECL_CBRTL | |
1252 | HAVE_DECL_CBRTF | |
1253 | HAVE_DECL_ATANL | |
1254 | HAVE_DECL_ASINL | |
1255 | HAVE_DECL_ACOSL | |
1256 | HAVE_TANHF | |
1257 | HAVE_TANL | |
1258 | HAVE_TANF | |
1259 | HAVE_SQRTL | |
1260 | HAVE_SQRTF | |
1261 | HAVE_SINHF | |
1262 | HAVE_SINL | |
1263 | HAVE_SINF | |
1264 | HAVE_RINTL | |
1265 | HAVE_RINT | |
1266 | HAVE_REMAINDERF | |
1267 | HAVE_REMAINDER | |
1268 | HAVE_POWF | |
1269 | HAVE_MODFL | |
1270 | HAVE_MODFF | |
1271 | HAVE_LOGBL | |
1272 | HAVE_LOGBF | |
1273 | HAVE_LOG1PL | |
1274 | HAVE_LOG1PF | |
1275 | HAVE_LOG1P | |
1276 | HAVE_LOG10L | |
1277 | HAVE_LOG10F | |
1278 | HAVE_LOGL | |
1279 | HAVE_LOGF | |
1280 | HAVE_LDEXPF | |
1281 | HAVE_ISNANL | |
1282 | HAVE_ISNAND | |
1283 | HAVE_ISNANF | |
1284 | HAVE_ILOGBL | |
1285 | HAVE_ILOGBF | |
1286 | HAVE_ILOGB | |
1287 | HAVE_HYPOTL | |
1288 | HAVE_HYPOTF | |
1289 | HAVE_FREXPF | |
1290 | HAVE_FMODL | |
1291 | HAVE_FMODF | |
1292 | HAVE_FMAL | |
1293 | HAVE_FMAF | |
1294 | HAVE_FMA | |
1295 | HAVE_FABSL | |
1296 | HAVE_FABSF | |
1297 | HAVE_EXPM1F | |
1298 | HAVE_EXPM1 | |
1299 | HAVE_EXPL | |
1300 | HAVE_EXPF | |
1301 | HAVE_COSHF | |
1302 | HAVE_COSL | |
1303 | HAVE_COSF | |
1304 | HAVE_COPYSIGNL | |
1305 | HAVE_COPYSIGN | |
1306 | HAVE_CBRTL | |
1307 | HAVE_CBRTF | |
1308 | HAVE_CBRT | |
1309 | HAVE_ATAN2F | |
1310 | HAVE_ATANL | |
1311 | HAVE_ATANF | |
1312 | HAVE_ASINL | |
1313 | HAVE_ASINF | |
1314 | HAVE_ACOSL | |
1315 | HAVE_ACOSF | |
1316 | GNULIB_TRUNCL | |
1317 | GNULIB_TRUNCF | |
1318 | GNULIB_TRUNC | |
1319 | GNULIB_TANHF | |
1320 | GNULIB_TANL | |
1321 | GNULIB_TANF | |
1322 | GNULIB_SQRTL | |
1323 | GNULIB_SQRTF | |
1324 | GNULIB_SINHF | |
1325 | GNULIB_SINL | |
1326 | GNULIB_SINF | |
1327 | GNULIB_SIGNBIT | |
1328 | GNULIB_ROUNDL | |
1329 | GNULIB_ROUNDF | |
1330 | GNULIB_ROUND | |
1331 | GNULIB_RINTL | |
1332 | GNULIB_RINTF | |
1333 | GNULIB_RINT | |
1334 | GNULIB_REMAINDERL | |
1335 | GNULIB_REMAINDERF | |
1336 | GNULIB_REMAINDER | |
1337 | GNULIB_POWF | |
1338 | GNULIB_MODFL | |
1339 | GNULIB_MODFF | |
1340 | GNULIB_MODF | |
1341 | GNULIB_LOGBL | |
1342 | GNULIB_LOGBF | |
1343 | GNULIB_LOGB | |
1344 | GNULIB_LOG2L | |
1345 | GNULIB_LOG2F | |
1346 | GNULIB_LOG2 | |
1347 | GNULIB_LOG1PL | |
1348 | GNULIB_LOG1PF | |
1349 | GNULIB_LOG1P | |
1350 | GNULIB_LOG10L | |
1351 | GNULIB_LOG10F | |
1352 | GNULIB_LOG10 | |
1353 | GNULIB_LOGL | |
1354 | GNULIB_LOGF | |
1355 | GNULIB_LOG | |
1356 | GNULIB_LDEXPL | |
1357 | GNULIB_LDEXPF | |
1358 | GNULIB_ISNANL | |
1359 | GNULIB_ISNAND | |
1360 | GNULIB_ISNANF | |
1361 | GNULIB_ISNAN | |
1362 | GNULIB_ISINF | |
1363 | GNULIB_ISFINITE | |
1364 | GNULIB_ILOGBL | |
1365 | GNULIB_ILOGBF | |
1366 | GNULIB_ILOGB | |
1367 | GNULIB_HYPOTL | |
1368 | GNULIB_HYPOTF | |
1369 | GNULIB_HYPOT | |
1370 | GNULIB_FREXPL | |
1371 | GNULIB_FREXP | |
1372 | GNULIB_FREXPF | |
1373 | GNULIB_FMODL | |
1374 | GNULIB_FMODF | |
1375 | GNULIB_FMOD | |
1376 | GNULIB_FMAL | |
1377 | GNULIB_FMAF | |
1378 | GNULIB_FMA | |
1379 | GNULIB_FLOORL | |
1380 | GNULIB_FLOORF | |
1381 | GNULIB_FLOOR | |
1382 | GNULIB_FABSL | |
1383 | GNULIB_FABSF | |
1384 | GNULIB_EXPM1L | |
1385 | GNULIB_EXPM1F | |
1386 | GNULIB_EXPM1 | |
1387 | GNULIB_EXP2L | |
1388 | GNULIB_EXP2F | |
1389 | GNULIB_EXP2 | |
1390 | GNULIB_EXPL | |
1391 | GNULIB_EXPF | |
1392 | GNULIB_COSHF | |
1393 | GNULIB_COSL | |
1394 | GNULIB_COSF | |
1395 | GNULIB_COPYSIGNL | |
1396 | GNULIB_COPYSIGNF | |
1397 | GNULIB_COPYSIGN | |
1398 | GNULIB_CEILL | |
1399 | GNULIB_CEILF | |
1400 | GNULIB_CEIL | |
1401 | GNULIB_CBRTL | |
1402 | GNULIB_CBRTF | |
1403 | GNULIB_CBRT | |
1404 | GNULIB_ATAN2F | |
1405 | GNULIB_ATANL | |
1406 | GNULIB_ATANF | |
1407 | GNULIB_ASINL | |
1408 | GNULIB_ASINF | |
1409 | GNULIB_ACOSL | |
1410 | GNULIB_ACOSF | |
8690e634 JK |
1411 | GL_GENERATE_FNMATCH_H_FALSE |
1412 | GL_GENERATE_FNMATCH_H_TRUE | |
1413 | FNMATCH_H | |
c0c3707f CB |
1414 | HAVE_FNMATCH_H |
1415 | NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H | |
1416 | NEXT_FNMATCH_H | |
1417 | REPLACE_FNMATCH | |
1418 | HAVE_FNMATCH | |
1419 | GNULIB_FNMATCH | |
88b48903 WN |
1420 | REPLACE_ITOLD |
1421 | GL_GENERATE_FLOAT_H_FALSE | |
1422 | GL_GENERATE_FLOAT_H_TRUE | |
1423 | FLOAT_H | |
1424 | NEXT_AS_FIRST_DIRECTIVE_FLOAT_H | |
1425 | NEXT_FLOAT_H | |
6ec2e0f5 SDJ |
1426 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H |
1427 | NEXT_FCNTL_H | |
1428 | REPLACE_OPENAT | |
1429 | REPLACE_OPEN | |
1430 | REPLACE_FCNTL | |
c0c3707f | 1431 | REPLACE_CREAT |
6ec2e0f5 SDJ |
1432 | HAVE_OPENAT |
1433 | HAVE_FCNTL | |
1434 | GNULIB_OPENAT | |
1435 | GNULIB_OPEN | |
1436 | GNULIB_NONBLOCKING | |
1437 | GNULIB_FCNTL | |
c0c3707f | 1438 | GNULIB_CREAT |
18848e28 GF |
1439 | EOVERFLOW_VALUE |
1440 | EOVERFLOW_HIDDEN | |
1441 | ENOLINK_VALUE | |
1442 | ENOLINK_HIDDEN | |
1443 | EMULTIHOP_VALUE | |
1444 | EMULTIHOP_HIDDEN | |
1445 | GL_GENERATE_ERRNO_H_FALSE | |
1446 | GL_GENERATE_ERRNO_H_TRUE | |
1447 | ERRNO_H | |
1448 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H | |
1449 | NEXT_ERRNO_H | |
e26b6bb0 TT |
1450 | HAVE_DIRENT_H |
1451 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H | |
1452 | NEXT_DIRENT_H | |
698be2d8 CB |
1453 | NEXT_AS_FIRST_DIRECTIVE_CTYPE_H |
1454 | NEXT_CTYPE_H | |
1455 | HAVE_ISBLANK | |
1456 | GNULIB_ISBLANK | |
e26b6bb0 TT |
1457 | REPLACE_FDOPENDIR |
1458 | REPLACE_DIRFD | |
1459 | REPLACE_CLOSEDIR | |
1460 | REPLACE_OPENDIR | |
1461 | HAVE_ALPHASORT | |
1462 | HAVE_SCANDIR | |
1463 | HAVE_FDOPENDIR | |
1464 | HAVE_DECL_FDOPENDIR | |
1465 | HAVE_DECL_DIRFD | |
1466 | HAVE_CLOSEDIR | |
1467 | HAVE_REWINDDIR | |
1468 | HAVE_READDIR | |
1469 | HAVE_OPENDIR | |
1470 | GNULIB_ALPHASORT | |
1471 | GNULIB_SCANDIR | |
1472 | GNULIB_FDOPENDIR | |
1473 | GNULIB_DIRFD | |
1474 | GNULIB_CLOSEDIR | |
1475 | GNULIB_REWINDDIR | |
1476 | GNULIB_READDIR | |
1477 | GNULIB_OPENDIR | |
6ec2e0f5 SDJ |
1478 | HAVE_WINSOCK2_H |
1479 | HAVE_MSVC_INVALID_PARAMETER_HANDLER | |
e26b6bb0 TT |
1480 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
1481 | UNISTD_H_HAVE_WINSOCK2_H | |
698be2d8 | 1482 | UNISTD_H_HAVE_SYS_RANDOM_H |
e26b6bb0 TT |
1483 | REPLACE_WRITE |
1484 | REPLACE_USLEEP | |
1485 | REPLACE_UNLINKAT | |
1486 | REPLACE_UNLINK | |
1487 | REPLACE_TTYNAME_R | |
c0c3707f | 1488 | REPLACE_TRUNCATE |
4a626d0a | 1489 | REPLACE_SYMLINKAT |
e26b6bb0 TT |
1490 | REPLACE_SYMLINK |
1491 | REPLACE_SLEEP | |
1492 | REPLACE_RMDIR | |
4a626d0a | 1493 | REPLACE_READLINKAT |
e26b6bb0 TT |
1494 | REPLACE_READLINK |
1495 | REPLACE_READ | |
1496 | REPLACE_PWRITE | |
1497 | REPLACE_PREAD | |
1498 | REPLACE_LSEEK | |
1499 | REPLACE_LINKAT | |
1500 | REPLACE_LINK | |
1501 | REPLACE_LCHOWN | |
1502 | REPLACE_ISATTY | |
c0c3707f | 1503 | REPLACE_GETPASS |
e26b6bb0 TT |
1504 | REPLACE_GETPAGESIZE |
1505 | REPLACE_GETGROUPS | |
1506 | REPLACE_GETLOGIN_R | |
4a626d0a | 1507 | REPLACE_GETDTABLESIZE |
e26b6bb0 TT |
1508 | REPLACE_GETDOMAINNAME |
1509 | REPLACE_GETCWD | |
1510 | REPLACE_FTRUNCATE | |
1511 | REPLACE_FCHOWNAT | |
c0c3707f | 1512 | REPLACE_FACCESSAT |
e26b6bb0 TT |
1513 | REPLACE_DUP2 |
1514 | REPLACE_DUP | |
1515 | REPLACE_CLOSE | |
1516 | REPLACE_CHOWN | |
c0c3707f | 1517 | REPLACE_ACCESS |
e26b6bb0 TT |
1518 | HAVE_SYS_PARAM_H |
1519 | HAVE_OS_H | |
1520 | HAVE_DECL_TTYNAME_R | |
c0c3707f | 1521 | HAVE_DECL_TRUNCATE |
e26b6bb0 TT |
1522 | HAVE_DECL_SETHOSTNAME |
1523 | HAVE_DECL_GETUSERSHELL | |
1524 | HAVE_DECL_GETPAGESIZE | |
1525 | HAVE_DECL_GETLOGIN_R | |
c0c3707f | 1526 | HAVE_DECL_GETLOGIN |
e26b6bb0 TT |
1527 | HAVE_DECL_GETDOMAINNAME |
1528 | HAVE_DECL_FDATASYNC | |
1529 | HAVE_DECL_FCHDIR | |
1530 | HAVE_DECL_ENVIRON | |
1531 | HAVE_USLEEP | |
1532 | HAVE_UNLINKAT | |
1533 | HAVE_SYMLINKAT | |
1534 | HAVE_SYMLINK | |
1535 | HAVE_SLEEP | |
1536 | HAVE_SETHOSTNAME | |
1537 | HAVE_READLINKAT | |
1538 | HAVE_READLINK | |
1539 | HAVE_PWRITE | |
1540 | HAVE_PREAD | |
1541 | HAVE_PIPE2 | |
1542 | HAVE_PIPE | |
1543 | HAVE_LINKAT | |
1544 | HAVE_LINK | |
1545 | HAVE_LCHOWN | |
1546 | HAVE_GROUP_MEMBER | |
c0c3707f | 1547 | HAVE_GETPASS |
e26b6bb0 TT |
1548 | HAVE_GETPAGESIZE |
1549 | HAVE_GETLOGIN | |
1550 | HAVE_GETHOSTNAME | |
1551 | HAVE_GETGROUPS | |
698be2d8 | 1552 | HAVE_GETENTROPY |
e26b6bb0 TT |
1553 | HAVE_GETDTABLESIZE |
1554 | HAVE_FTRUNCATE | |
1555 | HAVE_FSYNC | |
1556 | HAVE_FDATASYNC | |
1557 | HAVE_FCHOWNAT | |
1558 | HAVE_FCHDIR | |
1559 | HAVE_FACCESSAT | |
1560 | HAVE_EUIDACCESS | |
1561 | HAVE_DUP3 | |
1562 | HAVE_DUP2 | |
c0c3707f | 1563 | HAVE_COPY_FILE_RANGE |
e26b6bb0 TT |
1564 | HAVE_CHOWN |
1565 | GNULIB_WRITE | |
1566 | GNULIB_USLEEP | |
1567 | GNULIB_UNLINKAT | |
1568 | GNULIB_UNLINK | |
1569 | GNULIB_UNISTD_H_SIGPIPE | |
1570 | GNULIB_UNISTD_H_NONBLOCKING | |
1571 | GNULIB_TTYNAME_R | |
c0c3707f | 1572 | GNULIB_TRUNCATE |
e26b6bb0 TT |
1573 | GNULIB_SYMLINKAT |
1574 | GNULIB_SYMLINK | |
1575 | GNULIB_SLEEP | |
1576 | GNULIB_SETHOSTNAME | |
1577 | GNULIB_RMDIR | |
1578 | GNULIB_READLINKAT | |
1579 | GNULIB_READLINK | |
1580 | GNULIB_READ | |
1581 | GNULIB_PWRITE | |
1582 | GNULIB_PREAD | |
1583 | GNULIB_PIPE2 | |
1584 | GNULIB_PIPE | |
1585 | GNULIB_LSEEK | |
1586 | GNULIB_LINKAT | |
1587 | GNULIB_LINK | |
1588 | GNULIB_LCHOWN | |
1589 | GNULIB_ISATTY | |
1590 | GNULIB_GROUP_MEMBER | |
1591 | GNULIB_GETUSERSHELL | |
c0c3707f | 1592 | GNULIB_GETPASS |
e26b6bb0 | 1593 | GNULIB_GETPAGESIZE |
5df4cba6 | 1594 | GNULIB_GETOPT_POSIX |
e26b6bb0 TT |
1595 | GNULIB_GETLOGIN_R |
1596 | GNULIB_GETLOGIN | |
1597 | GNULIB_GETHOSTNAME | |
1598 | GNULIB_GETGROUPS | |
698be2d8 | 1599 | GNULIB_GETENTROPY |
e26b6bb0 TT |
1600 | GNULIB_GETDTABLESIZE |
1601 | GNULIB_GETDOMAINNAME | |
1602 | GNULIB_GETCWD | |
1603 | GNULIB_FTRUNCATE | |
1604 | GNULIB_FSYNC | |
1605 | GNULIB_FDATASYNC | |
1606 | GNULIB_FCHOWNAT | |
1607 | GNULIB_FCHDIR | |
1608 | GNULIB_FACCESSAT | |
1609 | GNULIB_EUIDACCESS | |
1610 | GNULIB_ENVIRON | |
1611 | GNULIB_DUP3 | |
1612 | GNULIB_DUP2 | |
1613 | GNULIB_DUP | |
c0c3707f | 1614 | GNULIB_COPY_FILE_RANGE |
e26b6bb0 TT |
1615 | GNULIB_CLOSE |
1616 | GNULIB_CHOWN | |
1617 | GNULIB_CHDIR | |
c0c3707f | 1618 | GNULIB_ACCESS |
98399780 YQ |
1619 | REPLACE_WCTOMB |
1620 | REPLACE_UNSETENV | |
c0c3707f | 1621 | REPLACE_STRTOLD |
98399780 | 1622 | REPLACE_STRTOD |
c0c3707f | 1623 | REPLACE_SETSTATE |
98399780 YQ |
1624 | REPLACE_SETENV |
1625 | REPLACE_REALPATH | |
1626 | REPLACE_REALLOC | |
1627 | REPLACE_RANDOM_R | |
c0c3707f | 1628 | REPLACE_RANDOM |
4a626d0a | 1629 | REPLACE_QSORT_R |
98399780 YQ |
1630 | REPLACE_PUTENV |
1631 | REPLACE_PTSNAME_R | |
1632 | REPLACE_PTSNAME | |
1633 | REPLACE_MKSTEMP | |
1634 | REPLACE_MBTOWC | |
1635 | REPLACE_MALLOC | |
c0c3707f | 1636 | REPLACE_INITSTATE |
98399780 YQ |
1637 | REPLACE_CANONICALIZE_FILE_NAME |
1638 | REPLACE_CALLOC | |
1639 | HAVE_DECL_UNSETENV | |
1640 | HAVE_UNLOCKPT | |
1641 | HAVE_SYS_LOADAVG_H | |
1642 | HAVE_STRUCT_RANDOM_DATA | |
1643 | HAVE_STRTOULL | |
1644 | HAVE_STRTOLL | |
c0c3707f | 1645 | HAVE_STRTOLD |
98399780 | 1646 | HAVE_STRTOD |
c0c3707f CB |
1647 | HAVE_DECL_SETSTATE |
1648 | HAVE_SETSTATE | |
98399780 YQ |
1649 | HAVE_DECL_SETENV |
1650 | HAVE_SETENV | |
4a626d0a | 1651 | HAVE_SECURE_GETENV |
98399780 YQ |
1652 | HAVE_RPMATCH |
1653 | HAVE_REALPATH | |
c0c3707f | 1654 | HAVE_REALLOCARRAY |
98399780 YQ |
1655 | HAVE_RANDOM_R |
1656 | HAVE_RANDOM_H | |
1657 | HAVE_RANDOM | |
4c62b19f | 1658 | HAVE_QSORT_R |
98399780 YQ |
1659 | HAVE_PTSNAME_R |
1660 | HAVE_PTSNAME | |
1661 | HAVE_POSIX_OPENPT | |
1662 | HAVE_MKSTEMPS | |
1663 | HAVE_MKSTEMP | |
1664 | HAVE_MKOSTEMPS | |
1665 | HAVE_MKOSTEMP | |
1666 | HAVE_MKDTEMP | |
c0c3707f CB |
1667 | HAVE_MBTOWC |
1668 | HAVE_DECL_INITSTATE | |
1669 | HAVE_INITSTATE | |
98399780 YQ |
1670 | HAVE_GRANTPT |
1671 | HAVE_GETSUBOPT | |
1672 | HAVE_DECL_GETLOADAVG | |
1673 | HAVE_CANONICALIZE_FILE_NAME | |
1674 | HAVE_ATOLL | |
1675 | HAVE__EXIT | |
1676 | GNULIB_WCTOMB | |
1677 | GNULIB_UNSETENV | |
1678 | GNULIB_UNLOCKPT | |
1679 | GNULIB_SYSTEM_POSIX | |
1680 | GNULIB_STRTOULL | |
1681 | GNULIB_STRTOLL | |
c0c3707f | 1682 | GNULIB_STRTOLD |
98399780 YQ |
1683 | GNULIB_STRTOD |
1684 | GNULIB_SETENV | |
4a626d0a | 1685 | GNULIB_SECURE_GETENV |
98399780 YQ |
1686 | GNULIB_RPMATCH |
1687 | GNULIB_REALPATH | |
1688 | GNULIB_REALLOC_POSIX | |
c0c3707f | 1689 | GNULIB_REALLOCARRAY |
98399780 YQ |
1690 | GNULIB_RANDOM_R |
1691 | GNULIB_RANDOM | |
4a626d0a | 1692 | GNULIB_QSORT_R |
98399780 YQ |
1693 | GNULIB_PUTENV |
1694 | GNULIB_PTSNAME_R | |
1695 | GNULIB_PTSNAME | |
1696 | GNULIB_POSIX_OPENPT | |
1697 | GNULIB_MKSTEMPS | |
1698 | GNULIB_MKSTEMP | |
1699 | GNULIB_MKOSTEMPS | |
1700 | GNULIB_MKOSTEMP | |
1701 | GNULIB_MKDTEMP | |
1702 | GNULIB_MBTOWC | |
1703 | GNULIB_MALLOC_POSIX | |
1704 | GNULIB_GRANTPT | |
1705 | GNULIB_GETSUBOPT | |
1706 | GNULIB_GETLOADAVG | |
1707 | GNULIB_CANONICALIZE_FILE_NAME | |
1708 | GNULIB_CALLOC_POSIX | |
1709 | GNULIB_ATOLL | |
1710 | GNULIB__EXIT | |
698be2d8 CB |
1711 | LOCALE_FR |
1712 | REPLACE_WCSTOK | |
1713 | REPLACE_WCSFTIME | |
1714 | REPLACE_WCSWIDTH | |
1715 | REPLACE_WCWIDTH | |
1716 | REPLACE_WCSNRTOMBS | |
1717 | REPLACE_WCSRTOMBS | |
1718 | REPLACE_WCRTOMB | |
1719 | REPLACE_MBSNRTOWCS | |
1720 | REPLACE_MBSRTOWCS | |
1721 | REPLACE_MBRLEN | |
1722 | REPLACE_MBRTOWC | |
1723 | REPLACE_MBSINIT | |
1724 | REPLACE_WCTOB | |
1725 | REPLACE_BTOWC | |
1726 | REPLACE_MBSTATE_T | |
1727 | HAVE_DECL_WCWIDTH | |
1728 | HAVE_DECL_WCTOB | |
1729 | HAVE_WCSFTIME | |
1730 | HAVE_WCSWIDTH | |
1731 | HAVE_WCSTOK | |
1732 | HAVE_WCSSTR | |
1733 | HAVE_WCSPBRK | |
1734 | HAVE_WCSSPN | |
1735 | HAVE_WCSCSPN | |
1736 | HAVE_WCSRCHR | |
1737 | HAVE_WCSCHR | |
1738 | HAVE_WCSDUP | |
1739 | HAVE_WCSXFRM | |
1740 | HAVE_WCSCOLL | |
1741 | HAVE_WCSNCASECMP | |
1742 | HAVE_WCSCASECMP | |
1743 | HAVE_WCSNCMP | |
1744 | HAVE_WCSCMP | |
1745 | HAVE_WCSNCAT | |
1746 | HAVE_WCSCAT | |
1747 | HAVE_WCPNCPY | |
1748 | HAVE_WCSNCPY | |
1749 | HAVE_WCPCPY | |
1750 | HAVE_WCSCPY | |
1751 | HAVE_WCSNLEN | |
1752 | HAVE_WCSLEN | |
1753 | HAVE_WMEMSET | |
1754 | HAVE_WMEMPCPY | |
1755 | HAVE_WMEMMOVE | |
1756 | HAVE_WMEMCPY | |
1757 | HAVE_WMEMCMP | |
1758 | HAVE_WMEMCHR | |
1759 | HAVE_WCSNRTOMBS | |
1760 | HAVE_WCSRTOMBS | |
1761 | HAVE_WCRTOMB | |
1762 | HAVE_MBSNRTOWCS | |
1763 | HAVE_MBSRTOWCS | |
1764 | HAVE_MBRLEN | |
1765 | HAVE_MBRTOWC | |
1766 | HAVE_MBSINIT | |
1767 | HAVE_BTOWC | |
1768 | GNULIB_WCSFTIME | |
1769 | GNULIB_WCSWIDTH | |
1770 | GNULIB_WCSTOK | |
1771 | GNULIB_WCSSTR | |
1772 | GNULIB_WCSPBRK | |
1773 | GNULIB_WCSSPN | |
1774 | GNULIB_WCSCSPN | |
1775 | GNULIB_WCSRCHR | |
1776 | GNULIB_WCSCHR | |
1777 | GNULIB_WCSDUP | |
1778 | GNULIB_WCSXFRM | |
1779 | GNULIB_WCSCOLL | |
1780 | GNULIB_WCSNCASECMP | |
1781 | GNULIB_WCSCASECMP | |
1782 | GNULIB_WCSNCMP | |
1783 | GNULIB_WCSCMP | |
1784 | GNULIB_WCSNCAT | |
1785 | GNULIB_WCSCAT | |
1786 | GNULIB_WCPNCPY | |
1787 | GNULIB_WCSNCPY | |
1788 | GNULIB_WCPCPY | |
1789 | GNULIB_WCSCPY | |
1790 | GNULIB_WCSNLEN | |
1791 | GNULIB_WCSLEN | |
1792 | GNULIB_WMEMSET | |
1793 | GNULIB_WMEMPCPY | |
1794 | GNULIB_WMEMMOVE | |
1795 | GNULIB_WMEMCPY | |
1796 | GNULIB_WMEMCMP | |
1797 | GNULIB_WMEMCHR | |
1798 | GNULIB_WCWIDTH | |
1799 | GNULIB_WCSNRTOMBS | |
1800 | GNULIB_WCSRTOMBS | |
1801 | GNULIB_WCRTOMB | |
1802 | GNULIB_MBSNRTOWCS | |
1803 | GNULIB_MBSRTOWCS | |
1804 | GNULIB_MBRLEN | |
1805 | GNULIB_MBRTOWC | |
1806 | GNULIB_MBSINIT | |
1807 | GNULIB_WCTOB | |
1808 | GNULIB_BTOWC | |
725e2999 | 1809 | MKDIR_P |
c0c3707f | 1810 | HAVE_WS2TCPIP_H |
725e2999 JB |
1811 | HAVE_FEATURES_H |
1812 | NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H | |
1813 | NEXT_ARPA_INET_H | |
1814 | PRAGMA_COLUMNS | |
1815 | PRAGMA_SYSTEM_HEADER | |
1816 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
1817 | INCLUDE_NEXT | |
1818 | HAVE_ARPA_INET_H | |
1819 | REPLACE_INET_PTON | |
1820 | REPLACE_INET_NTOP | |
1821 | HAVE_DECL_INET_PTON | |
1822 | HAVE_DECL_INET_NTOP | |
1823 | GNULIB_INET_PTON | |
1824 | GNULIB_INET_NTOP | |
c0c3707f | 1825 | HAVE_ALLOCA_H |
8690e634 JK |
1826 | GL_GENERATE_ALLOCA_H_FALSE |
1827 | GL_GENERATE_ALLOCA_H_TRUE | |
1828 | ALLOCA_H | |
1829 | ALLOCA | |
c971b7fa PA |
1830 | GL_COND_LIBTOOL_FALSE |
1831 | GL_COND_LIBTOOL_TRUE | |
c8693053 RO |
1832 | RANLIB |
1833 | ARFLAGS | |
1834 | AR | |
1835 | LARGEFILE_CPPFLAGS | |
c971b7fa PA |
1836 | target_os |
1837 | target_vendor | |
1838 | target_cpu | |
1839 | target | |
c971b7fa PA |
1840 | host_os |
1841 | host_vendor | |
1842 | host_cpu | |
1843 | host | |
1844 | build_os | |
1845 | build_vendor | |
1846 | build_cpu | |
1847 | build | |
4a626d0a PA |
1848 | EGREP |
1849 | GREP | |
1850 | CPP | |
c971b7fa PA |
1851 | OBJEXT |
1852 | EXEEXT | |
1853 | ac_ct_CC | |
1854 | CPPFLAGS | |
1855 | LDFLAGS | |
1856 | CFLAGS | |
1857 | CC | |
1858 | MAINT | |
1859 | MAINTAINER_MODE_FALSE | |
1860 | MAINTAINER_MODE_TRUE | |
1861 | target_alias | |
1862 | host_alias | |
1863 | build_alias | |
1864 | LIBS | |
1865 | ECHO_T | |
1866 | ECHO_N | |
1867 | ECHO_C | |
1868 | DEFS | |
1869 | mandir | |
1870 | localedir | |
1871 | libdir | |
1872 | psdir | |
1873 | pdfdir | |
1874 | dvidir | |
1875 | htmldir | |
1876 | infodir | |
1877 | docdir | |
1878 | oldincludedir | |
1879 | includedir | |
1880 | localstatedir | |
1881 | sharedstatedir | |
1882 | sysconfdir | |
1883 | datadir | |
1884 | datarootdir | |
1885 | libexecdir | |
1886 | sbindir | |
1887 | bindir | |
1888 | program_transform_name | |
1889 | prefix | |
1890 | exec_prefix | |
1891 | PACKAGE_URL | |
1892 | PACKAGE_BUGREPORT | |
1893 | PACKAGE_STRING | |
1894 | PACKAGE_VERSION | |
1895 | PACKAGE_TARNAME | |
1896 | PACKAGE_NAME | |
1897 | PATH_SEPARATOR | |
1898 | SHELL' | |
1899 | ac_subst_files='' | |
1900 | ac_user_opts=' | |
1901 | enable_option_checking | |
1902 | enable_maintainer_mode | |
c8693053 | 1903 | enable_plugins |
2196f55f | 1904 | enable_largefile |
5abebf3c | 1905 | enable_threads |
c0c3707f | 1906 | enable_cross_guesses |
c971b7fa | 1907 | enable_dependency_tracking |
39be3c7e | 1908 | enable_silent_rules |
c971b7fa PA |
1909 | ' |
1910 | ac_precious_vars='build_alias | |
1911 | host_alias | |
1912 | target_alias | |
1913 | CC | |
1914 | CFLAGS | |
1915 | LDFLAGS | |
1916 | LIBS | |
1917 | CPPFLAGS | |
1918 | CPP' | |
1919 | ||
1920 | ||
1921 | # Initialize some variables set by options. | |
1922 | ac_init_help= | |
1923 | ac_init_version=false | |
1924 | ac_unrecognized_opts= | |
1925 | ac_unrecognized_sep= | |
1926 | # The variables have the same names as the options, with | |
1927 | # dashes changed to underlines. | |
1928 | cache_file=/dev/null | |
1929 | exec_prefix=NONE | |
1930 | no_create= | |
1931 | no_recursion= | |
1932 | prefix=NONE | |
1933 | program_prefix=NONE | |
1934 | program_suffix=NONE | |
1935 | program_transform_name=s,x,x, | |
1936 | silent= | |
1937 | site= | |
1938 | srcdir= | |
1939 | verbose= | |
1940 | x_includes=NONE | |
1941 | x_libraries=NONE | |
1942 | ||
1943 | # Installation directory options. | |
1944 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1945 | # and all the variables that are supposed to be based on exec_prefix | |
1946 | # by default will actually change. | |
1947 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1948 | # (The list follows the same order as the GNU Coding Standards.) | |
1949 | bindir='${exec_prefix}/bin' | |
1950 | sbindir='${exec_prefix}/sbin' | |
1951 | libexecdir='${exec_prefix}/libexec' | |
1952 | datarootdir='${prefix}/share' | |
1953 | datadir='${datarootdir}' | |
1954 | sysconfdir='${prefix}/etc' | |
1955 | sharedstatedir='${prefix}/com' | |
1956 | localstatedir='${prefix}/var' | |
1957 | includedir='${prefix}/include' | |
1958 | oldincludedir='/usr/include' | |
d0ac1c44 | 1959 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
c971b7fa PA |
1960 | infodir='${datarootdir}/info' |
1961 | htmldir='${docdir}' | |
1962 | dvidir='${docdir}' | |
1963 | pdfdir='${docdir}' | |
1964 | psdir='${docdir}' | |
1965 | libdir='${exec_prefix}/lib' | |
1966 | localedir='${datarootdir}/locale' | |
1967 | mandir='${datarootdir}/man' | |
1968 | ||
1969 | ac_prev= | |
1970 | ac_dashdash= | |
1971 | for ac_option | |
1972 | do | |
1973 | # If the previous option needs an argument, assign it. | |
1974 | if test -n "$ac_prev"; then | |
1975 | eval $ac_prev=\$ac_option | |
1976 | ac_prev= | |
1977 | continue | |
1978 | fi | |
1979 | ||
1980 | case $ac_option in | |
d0ac1c44 SM |
1981 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1982 | *=) ac_optarg= ;; | |
1983 | *) ac_optarg=yes ;; | |
c971b7fa PA |
1984 | esac |
1985 | ||
1986 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1987 | ||
1988 | case $ac_dashdash$ac_option in | |
1989 | --) | |
1990 | ac_dashdash=yes ;; | |
1991 | ||
1992 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1993 | ac_prev=bindir ;; | |
1994 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1995 | bindir=$ac_optarg ;; | |
1996 | ||
1997 | -build | --build | --buil | --bui | --bu) | |
1998 | ac_prev=build_alias ;; | |
1999 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
2000 | build_alias=$ac_optarg ;; | |
2001 | ||
2002 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
2003 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
2004 | ac_prev=cache_file ;; | |
2005 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
2006 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
2007 | cache_file=$ac_optarg ;; | |
2008 | ||
2009 | --config-cache | -C) | |
2010 | cache_file=config.cache ;; | |
2011 | ||
2012 | -datadir | --datadir | --datadi | --datad) | |
2013 | ac_prev=datadir ;; | |
2014 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
2015 | datadir=$ac_optarg ;; | |
2016 | ||
2017 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
2018 | | --dataroo | --dataro | --datar) | |
2019 | ac_prev=datarootdir ;; | |
2020 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
2021 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
2022 | datarootdir=$ac_optarg ;; | |
2023 | ||
2024 | -disable-* | --disable-*) | |
2025 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
2026 | # Reject names that are not valid shell variable names. | |
2027 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2028 | as_fn_error $? "invalid feature name: $ac_useropt" |
c971b7fa PA |
2029 | ac_useropt_orig=$ac_useropt |
2030 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2031 | case $ac_user_opts in | |
2032 | *" | |
2033 | "enable_$ac_useropt" | |
2034 | "*) ;; | |
2035 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
2036 | ac_unrecognized_sep=', ';; | |
2037 | esac | |
2038 | eval enable_$ac_useropt=no ;; | |
2039 | ||
2040 | -docdir | --docdir | --docdi | --doc | --do) | |
2041 | ac_prev=docdir ;; | |
2042 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
2043 | docdir=$ac_optarg ;; | |
2044 | ||
2045 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
2046 | ac_prev=dvidir ;; | |
2047 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
2048 | dvidir=$ac_optarg ;; | |
2049 | ||
2050 | -enable-* | --enable-*) | |
2051 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
2052 | # Reject names that are not valid shell variable names. | |
2053 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2054 | as_fn_error $? "invalid feature name: $ac_useropt" |
c971b7fa PA |
2055 | ac_useropt_orig=$ac_useropt |
2056 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2057 | case $ac_user_opts in | |
2058 | *" | |
2059 | "enable_$ac_useropt" | |
2060 | "*) ;; | |
2061 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
2062 | ac_unrecognized_sep=', ';; | |
2063 | esac | |
2064 | eval enable_$ac_useropt=\$ac_optarg ;; | |
2065 | ||
2066 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
2067 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
2068 | | --exec | --exe | --ex) | |
2069 | ac_prev=exec_prefix ;; | |
2070 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
2071 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
2072 | | --exec=* | --exe=* | --ex=*) | |
2073 | exec_prefix=$ac_optarg ;; | |
2074 | ||
2075 | -gas | --gas | --ga | --g) | |
2076 | # Obsolete; use --with-gas. | |
2077 | with_gas=yes ;; | |
2078 | ||
2079 | -help | --help | --hel | --he | -h) | |
2080 | ac_init_help=long ;; | |
2081 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
2082 | ac_init_help=recursive ;; | |
2083 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
2084 | ac_init_help=short ;; | |
2085 | ||
2086 | -host | --host | --hos | --ho) | |
2087 | ac_prev=host_alias ;; | |
2088 | -host=* | --host=* | --hos=* | --ho=*) | |
2089 | host_alias=$ac_optarg ;; | |
2090 | ||
2091 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
2092 | ac_prev=htmldir ;; | |
2093 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
2094 | | --ht=*) | |
2095 | htmldir=$ac_optarg ;; | |
2096 | ||
2097 | -includedir | --includedir | --includedi | --included | --include \ | |
2098 | | --includ | --inclu | --incl | --inc) | |
2099 | ac_prev=includedir ;; | |
2100 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
2101 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
2102 | includedir=$ac_optarg ;; | |
2103 | ||
2104 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
2105 | ac_prev=infodir ;; | |
2106 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
2107 | infodir=$ac_optarg ;; | |
2108 | ||
2109 | -libdir | --libdir | --libdi | --libd) | |
2110 | ac_prev=libdir ;; | |
2111 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
2112 | libdir=$ac_optarg ;; | |
2113 | ||
2114 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
2115 | | --libexe | --libex | --libe) | |
2116 | ac_prev=libexecdir ;; | |
2117 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
2118 | | --libexe=* | --libex=* | --libe=*) | |
2119 | libexecdir=$ac_optarg ;; | |
2120 | ||
2121 | -localedir | --localedir | --localedi | --localed | --locale) | |
2122 | ac_prev=localedir ;; | |
2123 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
2124 | localedir=$ac_optarg ;; | |
2125 | ||
2126 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
2127 | | --localstate | --localstat | --localsta | --localst | --locals) | |
2128 | ac_prev=localstatedir ;; | |
2129 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
2130 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
2131 | localstatedir=$ac_optarg ;; | |
2132 | ||
2133 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
2134 | ac_prev=mandir ;; | |
2135 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
2136 | mandir=$ac_optarg ;; | |
2137 | ||
2138 | -nfp | --nfp | --nf) | |
2139 | # Obsolete; use --without-fp. | |
2140 | with_fp=no ;; | |
2141 | ||
2142 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
2143 | | --no-cr | --no-c | -n) | |
2144 | no_create=yes ;; | |
2145 | ||
2146 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
2147 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
2148 | no_recursion=yes ;; | |
2149 | ||
2150 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
2151 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
2152 | | --oldin | --oldi | --old | --ol | --o) | |
2153 | ac_prev=oldincludedir ;; | |
2154 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
2155 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
2156 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
2157 | oldincludedir=$ac_optarg ;; | |
2158 | ||
2159 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
2160 | ac_prev=prefix ;; | |
2161 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
2162 | prefix=$ac_optarg ;; | |
2163 | ||
2164 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
2165 | | --program-pre | --program-pr | --program-p) | |
2166 | ac_prev=program_prefix ;; | |
2167 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
2168 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
2169 | program_prefix=$ac_optarg ;; | |
2170 | ||
2171 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
2172 | | --program-suf | --program-su | --program-s) | |
2173 | ac_prev=program_suffix ;; | |
2174 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
2175 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
2176 | program_suffix=$ac_optarg ;; | |
2177 | ||
2178 | -program-transform-name | --program-transform-name \ | |
2179 | | --program-transform-nam | --program-transform-na \ | |
2180 | | --program-transform-n | --program-transform- \ | |
2181 | | --program-transform | --program-transfor \ | |
2182 | | --program-transfo | --program-transf \ | |
2183 | | --program-trans | --program-tran \ | |
2184 | | --progr-tra | --program-tr | --program-t) | |
2185 | ac_prev=program_transform_name ;; | |
2186 | -program-transform-name=* | --program-transform-name=* \ | |
2187 | | --program-transform-nam=* | --program-transform-na=* \ | |
2188 | | --program-transform-n=* | --program-transform-=* \ | |
2189 | | --program-transform=* | --program-transfor=* \ | |
2190 | | --program-transfo=* | --program-transf=* \ | |
2191 | | --program-trans=* | --program-tran=* \ | |
2192 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
2193 | program_transform_name=$ac_optarg ;; | |
2194 | ||
2195 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
2196 | ac_prev=pdfdir ;; | |
2197 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
2198 | pdfdir=$ac_optarg ;; | |
2199 | ||
2200 | -psdir | --psdir | --psdi | --psd | --ps) | |
2201 | ac_prev=psdir ;; | |
2202 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
2203 | psdir=$ac_optarg ;; | |
2204 | ||
2205 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2206 | | -silent | --silent | --silen | --sile | --sil) | |
2207 | silent=yes ;; | |
2208 | ||
2209 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
2210 | ac_prev=sbindir ;; | |
2211 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
2212 | | --sbi=* | --sb=*) | |
2213 | sbindir=$ac_optarg ;; | |
2214 | ||
2215 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
2216 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
2217 | | --sharedst | --shareds | --shared | --share | --shar \ | |
2218 | | --sha | --sh) | |
2219 | ac_prev=sharedstatedir ;; | |
2220 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
2221 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
2222 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
2223 | | --sha=* | --sh=*) | |
2224 | sharedstatedir=$ac_optarg ;; | |
2225 | ||
2226 | -site | --site | --sit) | |
2227 | ac_prev=site ;; | |
2228 | -site=* | --site=* | --sit=*) | |
2229 | site=$ac_optarg ;; | |
2230 | ||
2231 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
2232 | ac_prev=srcdir ;; | |
2233 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
2234 | srcdir=$ac_optarg ;; | |
2235 | ||
2236 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
2237 | | --syscon | --sysco | --sysc | --sys | --sy) | |
2238 | ac_prev=sysconfdir ;; | |
2239 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
2240 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
2241 | sysconfdir=$ac_optarg ;; | |
2242 | ||
2243 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
2244 | ac_prev=target_alias ;; | |
2245 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
2246 | target_alias=$ac_optarg ;; | |
2247 | ||
2248 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
2249 | verbose=yes ;; | |
2250 | ||
2251 | -version | --version | --versio | --versi | --vers | -V) | |
2252 | ac_init_version=: ;; | |
2253 | ||
2254 | -with-* | --with-*) | |
2255 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
2256 | # Reject names that are not valid shell variable names. | |
2257 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2258 | as_fn_error $? "invalid package name: $ac_useropt" |
c971b7fa PA |
2259 | ac_useropt_orig=$ac_useropt |
2260 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2261 | case $ac_user_opts in | |
2262 | *" | |
2263 | "with_$ac_useropt" | |
2264 | "*) ;; | |
2265 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
2266 | ac_unrecognized_sep=', ';; | |
2267 | esac | |
2268 | eval with_$ac_useropt=\$ac_optarg ;; | |
2269 | ||
2270 | -without-* | --without-*) | |
2271 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
2272 | # Reject names that are not valid shell variable names. | |
2273 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2274 | as_fn_error $? "invalid package name: $ac_useropt" |
c971b7fa PA |
2275 | ac_useropt_orig=$ac_useropt |
2276 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2277 | case $ac_user_opts in | |
2278 | *" | |
2279 | "with_$ac_useropt" | |
2280 | "*) ;; | |
2281 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
2282 | ac_unrecognized_sep=', ';; | |
2283 | esac | |
2284 | eval with_$ac_useropt=no ;; | |
2285 | ||
2286 | --x) | |
2287 | # Obsolete; use --with-x. | |
2288 | with_x=yes ;; | |
2289 | ||
2290 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
2291 | | --x-incl | --x-inc | --x-in | --x-i) | |
2292 | ac_prev=x_includes ;; | |
2293 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
2294 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
2295 | x_includes=$ac_optarg ;; | |
2296 | ||
2297 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
2298 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
2299 | ac_prev=x_libraries ;; | |
2300 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
2301 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
2302 | x_libraries=$ac_optarg ;; | |
2303 | ||
d0ac1c44 SM |
2304 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
2305 | Try \`$0 --help' for more information" | |
c971b7fa PA |
2306 | ;; |
2307 | ||
2308 | *=*) | |
2309 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
2310 | # Reject names that are not valid shell variable names. | |
2311 | case $ac_envvar in #( | |
2312 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 2313 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
c971b7fa PA |
2314 | esac |
2315 | eval $ac_envvar=\$ac_optarg | |
2316 | export $ac_envvar ;; | |
2317 | ||
2318 | *) | |
2319 | # FIXME: should be removed in autoconf 3.0. | |
2320 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
2321 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
2322 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
d0ac1c44 | 2323 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c971b7fa PA |
2324 | ;; |
2325 | ||
2326 | esac | |
2327 | done | |
2328 | ||
2329 | if test -n "$ac_prev"; then | |
2330 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
d0ac1c44 | 2331 | as_fn_error $? "missing argument to $ac_option" |
c971b7fa PA |
2332 | fi |
2333 | ||
2334 | if test -n "$ac_unrecognized_opts"; then | |
2335 | case $enable_option_checking in | |
2336 | no) ;; | |
d0ac1c44 | 2337 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
c971b7fa PA |
2338 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
2339 | esac | |
2340 | fi | |
2341 | ||
2342 | # Check all directory arguments for consistency. | |
2343 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
2344 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
2345 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
2346 | libdir localedir mandir | |
2347 | do | |
2348 | eval ac_val=\$$ac_var | |
2349 | # Remove trailing slashes. | |
2350 | case $ac_val in | |
2351 | */ ) | |
2352 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
2353 | eval $ac_var=\$ac_val;; | |
2354 | esac | |
2355 | # Be sure to have absolute directory names. | |
2356 | case $ac_val in | |
2357 | [\\/$]* | ?:[\\/]* ) continue;; | |
2358 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
2359 | esac | |
d0ac1c44 | 2360 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c971b7fa PA |
2361 | done |
2362 | ||
2363 | # There might be people who depend on the old broken behavior: `$host' | |
2364 | # used to hold the argument of --host etc. | |
2365 | # FIXME: To remove some day. | |
2366 | build=$build_alias | |
2367 | host=$host_alias | |
2368 | target=$target_alias | |
2369 | ||
2370 | # FIXME: To remove some day. | |
2371 | if test "x$host_alias" != x; then | |
2372 | if test "x$build_alias" = x; then | |
2373 | cross_compiling=maybe | |
c971b7fa PA |
2374 | elif test "x$build_alias" != "x$host_alias"; then |
2375 | cross_compiling=yes | |
2376 | fi | |
2377 | fi | |
2378 | ||
2379 | ac_tool_prefix= | |
2380 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
2381 | ||
2382 | test "$silent" = yes && exec 6>/dev/null | |
2383 | ||
2384 | ||
2385 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
2386 | ac_ls_di=`ls -di .` && | |
2387 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 2388 | as_fn_error $? "working directory cannot be determined" |
c971b7fa | 2389 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 2390 | as_fn_error $? "pwd does not report name of working directory" |
c971b7fa PA |
2391 | |
2392 | ||
2393 | # Find the source files, if location was not specified. | |
2394 | if test -z "$srcdir"; then | |
2395 | ac_srcdir_defaulted=yes | |
2396 | # Try the directory containing this script, then the parent directory. | |
2397 | ac_confdir=`$as_dirname -- "$as_myself" || | |
2398 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
2399 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
2400 | X"$as_myself" : 'X\(//\)$' \| \ | |
2401 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
2402 | $as_echo X"$as_myself" | | |
2403 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
2404 | s//\1/ | |
2405 | q | |
2406 | } | |
2407 | /^X\(\/\/\)[^/].*/{ | |
2408 | s//\1/ | |
2409 | q | |
2410 | } | |
2411 | /^X\(\/\/\)$/{ | |
2412 | s//\1/ | |
2413 | q | |
2414 | } | |
2415 | /^X\(\/\).*/{ | |
2416 | s//\1/ | |
2417 | q | |
2418 | } | |
2419 | s/.*/./; q'` | |
2420 | srcdir=$ac_confdir | |
2421 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2422 | srcdir=.. | |
2423 | fi | |
2424 | else | |
2425 | ac_srcdir_defaulted=no | |
2426 | fi | |
2427 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2428 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 2429 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
c971b7fa PA |
2430 | fi |
2431 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
2432 | ac_abs_confdir=`( | |
d0ac1c44 | 2433 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
c971b7fa PA |
2434 | pwd)` |
2435 | # When building in place, set srcdir=. | |
2436 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
2437 | srcdir=. | |
2438 | fi | |
2439 | # Remove unnecessary trailing slashes from srcdir. | |
2440 | # Double slashes in file names in object file debugging info | |
2441 | # mess up M-x gdb in Emacs. | |
2442 | case $srcdir in | |
2443 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
2444 | esac | |
2445 | for ac_var in $ac_precious_vars; do | |
2446 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
2447 | eval ac_env_${ac_var}_value=\$${ac_var} | |
2448 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
2449 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
2450 | done | |
2451 | ||
2452 | # | |
2453 | # Report the --help message. | |
2454 | # | |
2455 | if test "$ac_init_help" = "long"; then | |
2456 | # Omit some internal or obsolete options to make the list less imposing. | |
2457 | # This message is too long to be a string in the A/UX 3.1 sh. | |
2458 | cat <<_ACEOF | |
d0ac1c44 | 2459 | \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems. |
c971b7fa PA |
2460 | |
2461 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
2462 | ||
2463 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
2464 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
2465 | ||
2466 | Defaults for the options are specified in brackets. | |
2467 | ||
2468 | Configuration: | |
2469 | -h, --help display this help and exit | |
2470 | --help=short display options specific to this package | |
2471 | --help=recursive display the short help of all the included packages | |
2472 | -V, --version display version information and exit | |
d0ac1c44 | 2473 | -q, --quiet, --silent do not print \`checking ...' messages |
c971b7fa PA |
2474 | --cache-file=FILE cache test results in FILE [disabled] |
2475 | -C, --config-cache alias for \`--cache-file=config.cache' | |
2476 | -n, --no-create do not create output files | |
2477 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
2478 | ||
2479 | Installation directories: | |
2480 | --prefix=PREFIX install architecture-independent files in PREFIX | |
2481 | [$ac_default_prefix] | |
2482 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
2483 | [PREFIX] | |
2484 | ||
2485 | By default, \`make install' will install all the files in | |
2486 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
2487 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
2488 | for instance \`--prefix=\$HOME'. | |
2489 | ||
2490 | For better control, use the options below. | |
2491 | ||
2492 | Fine tuning of the installation directories: | |
2493 | --bindir=DIR user executables [EPREFIX/bin] | |
2494 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
2495 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
2496 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
2497 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
2498 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
2499 | --libdir=DIR object code libraries [EPREFIX/lib] | |
2500 | --includedir=DIR C header files [PREFIX/include] | |
2501 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
2502 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
2503 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
2504 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
2505 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
2506 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
d0ac1c44 | 2507 | --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu] |
c971b7fa PA |
2508 | --htmldir=DIR html documentation [DOCDIR] |
2509 | --dvidir=DIR dvi documentation [DOCDIR] | |
2510 | --pdfdir=DIR pdf documentation [DOCDIR] | |
2511 | --psdir=DIR ps documentation [DOCDIR] | |
2512 | _ACEOF | |
2513 | ||
2514 | cat <<\_ACEOF | |
2515 | ||
2516 | Program names: | |
2517 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
2518 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
2519 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
2520 | ||
2521 | System types: | |
2522 | --build=BUILD configure for building on BUILD [guessed] | |
2523 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
2524 | --target=TARGET configure for building compilers for TARGET [HOST] | |
2525 | _ACEOF | |
2526 | fi | |
2527 | ||
2528 | if test -n "$ac_init_help"; then | |
d0ac1c44 SM |
2529 | case $ac_init_help in |
2530 | short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";; | |
2531 | esac | |
c971b7fa PA |
2532 | cat <<\_ACEOF |
2533 | ||
2534 | Optional Features: | |
2535 | --disable-option-checking ignore unrecognized --enable/--with options | |
2536 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2537 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
2538 | --enable-maintainer-mode |
2539 | enable make rules and dependencies not useful (and | |
2540 | sometimes confusing) to the casual installer | |
c8693053 | 2541 | --enable-plugins Enable support for plugins |
2196f55f | 2542 | --disable-largefile omit support for large files |
c0c3707f | 2543 | --enable-threads={isoc|posix|isoc+posix|windows} |
5abebf3c CB |
2544 | specify multithreading API |
2545 | --disable-threads build without multithread safety | |
c0c3707f CB |
2546 | --enable-cross-guesses={conservative|risky} |
2547 | specify policy for cross-compilation guesses | |
d0ac1c44 SM |
2548 | --enable-dependency-tracking |
2549 | do not reject slow dependency extractors | |
2550 | --disable-dependency-tracking | |
2551 | speeds up one-time build | |
2552 | --enable-silent-rules less verbose build output (undo: "make V=1") | |
2553 | --disable-silent-rules verbose build output (undo: "make V=0") | |
c971b7fa PA |
2554 | |
2555 | Some influential environment variables: | |
2556 | CC C compiler command | |
2557 | CFLAGS C compiler flags | |
2558 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2559 | nonstandard directory <lib dir> | |
2560 | LIBS libraries to pass to the linker, e.g. -l<library> | |
d0ac1c44 | 2561 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
c971b7fa PA |
2562 | you have headers in a nonstandard directory <include dir> |
2563 | CPP C preprocessor | |
2564 | ||
2565 | Use these variables to override the choices made by `configure' or to help | |
2566 | it to find libraries and programs with nonstandard names/locations. | |
2567 | ||
2568 | Report bugs to the package provider. | |
2569 | _ACEOF | |
2570 | ac_status=$? | |
2571 | fi | |
2572 | ||
2573 | if test "$ac_init_help" = "recursive"; then | |
2574 | # If there are subdirs, report their specific --help. | |
2575 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2576 | test -d "$ac_dir" || | |
2577 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2578 | continue | |
2579 | ac_builddir=. | |
2580 | ||
2581 | case "$ac_dir" in | |
2582 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2583 | *) | |
2584 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2585 | # A ".." for each directory in $ac_dir_suffix. | |
2586 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2587 | case $ac_top_builddir_sub in | |
2588 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2589 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2590 | esac ;; | |
2591 | esac | |
2592 | ac_abs_top_builddir=$ac_pwd | |
2593 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2594 | # for backward compatibility: | |
2595 | ac_top_builddir=$ac_top_build_prefix | |
2596 | ||
2597 | case $srcdir in | |
2598 | .) # We are building in place. | |
2599 | ac_srcdir=. | |
2600 | ac_top_srcdir=$ac_top_builddir_sub | |
2601 | ac_abs_top_srcdir=$ac_pwd ;; | |
2602 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2603 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2604 | ac_top_srcdir=$srcdir | |
2605 | ac_abs_top_srcdir=$srcdir ;; | |
2606 | *) # Relative name. | |
2607 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2608 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2609 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2610 | esac | |
2611 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2612 | ||
2613 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2614 | # Check for guested configure. | |
2615 | if test -f "$ac_srcdir/configure.gnu"; then | |
2616 | echo && | |
2617 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2618 | elif test -f "$ac_srcdir/configure"; then | |
2619 | echo && | |
2620 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2621 | else | |
2622 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2623 | fi || ac_status=$? | |
2624 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2625 | done | |
2626 | fi | |
2627 | ||
2628 | test -n "$ac_init_help" && exit $ac_status | |
2629 | if $ac_init_version; then | |
2630 | cat <<\_ACEOF | |
d0ac1c44 SM |
2631 | libgnu configure UNUSED-VERSION |
2632 | generated by GNU Autoconf 2.69 | |
c971b7fa | 2633 | |
d0ac1c44 | 2634 | Copyright (C) 2012 Free Software Foundation, Inc. |
c971b7fa PA |
2635 | This configure script is free software; the Free Software Foundation |
2636 | gives unlimited permission to copy, distribute and modify it. | |
2637 | _ACEOF | |
2638 | exit | |
2639 | fi | |
2640 | ||
2641 | ## ------------------------ ## | |
2642 | ## Autoconf initialization. ## | |
2643 | ## ------------------------ ## | |
2644 | ||
2645 | # ac_fn_c_try_compile LINENO | |
2646 | # -------------------------- | |
2647 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2648 | ac_fn_c_try_compile () | |
2649 | { | |
2650 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2651 | rm -f conftest.$ac_objext | |
2652 | if { { ac_try="$ac_compile" | |
2653 | case "(($ac_try" in | |
2654 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2655 | *) ac_try_echo=$ac_try;; | |
2656 | esac | |
2657 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2658 | $as_echo "$ac_try_echo"; } >&5 | |
2659 | (eval "$ac_compile") 2>conftest.err | |
2660 | ac_status=$? | |
2661 | if test -s conftest.err; then | |
2662 | grep -v '^ *+' conftest.err >conftest.er1 | |
2663 | cat conftest.er1 >&5 | |
2664 | mv -f conftest.er1 conftest.err | |
2665 | fi | |
2666 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2667 | test $ac_status = 0; } && { | |
2668 | test -z "$ac_c_werror_flag" || | |
2669 | test ! -s conftest.err | |
2670 | } && test -s conftest.$ac_objext; then : | |
2671 | ac_retval=0 | |
2672 | else | |
2673 | $as_echo "$as_me: failed program was:" >&5 | |
2674 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2675 | ||
2676 | ac_retval=1 | |
2677 | fi | |
d0ac1c44 SM |
2678 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2679 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2680 | |
2681 | } # ac_fn_c_try_compile | |
2682 | ||
2683 | # ac_fn_c_try_cpp LINENO | |
2684 | # ---------------------- | |
2685 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2686 | ac_fn_c_try_cpp () | |
2687 | { | |
2688 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2689 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2690 | case "(($ac_try" in | |
2691 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2692 | *) ac_try_echo=$ac_try;; | |
2693 | esac | |
2694 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2695 | $as_echo "$ac_try_echo"; } >&5 | |
2696 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2697 | ac_status=$? | |
2698 | if test -s conftest.err; then | |
2699 | grep -v '^ *+' conftest.err >conftest.er1 | |
2700 | cat conftest.er1 >&5 | |
2701 | mv -f conftest.er1 conftest.err | |
2702 | fi | |
2703 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 2704 | test $ac_status = 0; } > conftest.i && { |
c971b7fa PA |
2705 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2706 | test ! -s conftest.err | |
2707 | }; then : | |
2708 | ac_retval=0 | |
2709 | else | |
2710 | $as_echo "$as_me: failed program was:" >&5 | |
2711 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2712 | ||
2713 | ac_retval=1 | |
2714 | fi | |
d0ac1c44 SM |
2715 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2716 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2717 | |
2718 | } # ac_fn_c_try_cpp | |
2719 | ||
2720 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2721 | # ------------------------------------------------------- | |
2722 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2723 | # the include files in INCLUDES and setting the cache variable VAR | |
2724 | # accordingly. | |
2725 | ac_fn_c_check_header_mongrel () | |
2726 | { | |
2727 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 2728 | if eval \${$3+:} false; then : |
c971b7fa PA |
2729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2730 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2731 | if eval \${$3+:} false; then : |
c971b7fa PA |
2732 | $as_echo_n "(cached) " >&6 |
2733 | fi | |
2734 | eval ac_res=\$$3 | |
2735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2736 | $as_echo "$ac_res" >&6; } | |
2737 | else | |
2738 | # Is the header compilable? | |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2740 | $as_echo_n "checking $2 usability... " >&6; } | |
2741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2742 | /* end confdefs.h. */ | |
2743 | $4 | |
2744 | #include <$2> | |
2745 | _ACEOF | |
2746 | if ac_fn_c_try_compile "$LINENO"; then : | |
2747 | ac_header_compiler=yes | |
2748 | else | |
2749 | ac_header_compiler=no | |
2750 | fi | |
2751 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2753 | $as_echo "$ac_header_compiler" >&6; } | |
2754 | ||
2755 | # Is the header present? | |
2756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2757 | $as_echo_n "checking $2 presence... " >&6; } | |
2758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2759 | /* end confdefs.h. */ | |
2760 | #include <$2> | |
2761 | _ACEOF | |
2762 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2763 | ac_header_preproc=yes | |
2764 | else | |
2765 | ac_header_preproc=no | |
2766 | fi | |
d0ac1c44 | 2767 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
2768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2769 | $as_echo "$ac_header_preproc" >&6; } | |
2770 | ||
2771 | # So? What about this header? | |
2772 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2773 | yes:no: ) | |
2774 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2775 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2776 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2777 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2778 | ;; | |
2779 | no:yes:* ) | |
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2781 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2782 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2783 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2784 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2785 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2786 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2787 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2788 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2789 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2790 | ;; | |
2791 | esac | |
2792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2793 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2794 | if eval \${$3+:} false; then : |
c971b7fa PA |
2795 | $as_echo_n "(cached) " >&6 |
2796 | else | |
2797 | eval "$3=\$ac_header_compiler" | |
2798 | fi | |
2799 | eval ac_res=\$$3 | |
2800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2801 | $as_echo "$ac_res" >&6; } | |
2802 | fi | |
d0ac1c44 | 2803 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
c971b7fa PA |
2804 | |
2805 | } # ac_fn_c_check_header_mongrel | |
2806 | ||
2807 | # ac_fn_c_try_run LINENO | |
2808 | # ---------------------- | |
2809 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2810 | # that executables *can* be run. | |
2811 | ac_fn_c_try_run () | |
2812 | { | |
2813 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2814 | if { { ac_try="$ac_link" | |
2815 | case "(($ac_try" in | |
2816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2817 | *) ac_try_echo=$ac_try;; | |
2818 | esac | |
2819 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2820 | $as_echo "$ac_try_echo"; } >&5 | |
2821 | (eval "$ac_link") 2>&5 | |
2822 | ac_status=$? | |
2823 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2824 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2825 | { { case "(($ac_try" in | |
2826 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2827 | *) ac_try_echo=$ac_try;; | |
2828 | esac | |
2829 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2830 | $as_echo "$ac_try_echo"; } >&5 | |
2831 | (eval "$ac_try") 2>&5 | |
2832 | ac_status=$? | |
2833 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2834 | test $ac_status = 0; }; }; then : | |
2835 | ac_retval=0 | |
2836 | else | |
2837 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2838 | $as_echo "$as_me: failed program was:" >&5 | |
2839 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2840 | ||
2841 | ac_retval=$ac_status | |
2842 | fi | |
2843 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2844 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2845 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2846 | |
2847 | } # ac_fn_c_try_run | |
2848 | ||
2849 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2850 | # ------------------------------------------------------- | |
2851 | # Tests whether HEADER exists and can be compiled using the include files in | |
2852 | # INCLUDES, setting the cache variable VAR accordingly. | |
2853 | ac_fn_c_check_header_compile () | |
2854 | { | |
2855 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2857 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2858 | if eval \${$3+:} false; then : |
c971b7fa PA |
2859 | $as_echo_n "(cached) " >&6 |
2860 | else | |
2861 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2862 | /* end confdefs.h. */ | |
2863 | $4 | |
2864 | #include <$2> | |
2865 | _ACEOF | |
2866 | if ac_fn_c_try_compile "$LINENO"; then : | |
2867 | eval "$3=yes" | |
2868 | else | |
2869 | eval "$3=no" | |
2870 | fi | |
2871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2872 | fi | |
2873 | eval ac_res=\$$3 | |
2874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2875 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2876 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
c971b7fa PA |
2877 | |
2878 | } # ac_fn_c_check_header_compile | |
2879 | ||
73cc7272 TT |
2880 | # ac_fn_c_try_link LINENO |
2881 | # ----------------------- | |
2882 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2883 | ac_fn_c_try_link () | |
2884 | { | |
2885 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2886 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2887 | if { { ac_try="$ac_link" | |
2888 | case "(($ac_try" in | |
2889 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2890 | *) ac_try_echo=$ac_try;; | |
2891 | esac | |
2892 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2893 | $as_echo "$ac_try_echo"; } >&5 | |
2894 | (eval "$ac_link") 2>conftest.err | |
2895 | ac_status=$? | |
2896 | if test -s conftest.err; then | |
2897 | grep -v '^ *+' conftest.err >conftest.er1 | |
2898 | cat conftest.er1 >&5 | |
2899 | mv -f conftest.er1 conftest.err | |
2900 | fi | |
2901 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2902 | test $ac_status = 0; } && { | |
2903 | test -z "$ac_c_werror_flag" || | |
2904 | test ! -s conftest.err | |
2905 | } && test -s conftest$ac_exeext && { | |
2906 | test "$cross_compiling" = yes || | |
2907 | test -x conftest$ac_exeext | |
2908 | }; then : | |
2909 | ac_retval=0 | |
2910 | else | |
2911 | $as_echo "$as_me: failed program was:" >&5 | |
2912 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2913 | ||
2914 | ac_retval=1 | |
2915 | fi | |
2916 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2917 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2918 | # interfere with the next link command; also delete a directory that is | |
2919 | # left behind by Apple's compiler. We do this before executing the actions. | |
2920 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2921 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2922 | as_fn_set_status $ac_retval | |
2923 | ||
2924 | } # ac_fn_c_try_link | |
2925 | ||
d0ac1c44 SM |
2926 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2927 | # ------------------------------------------- | |
2928 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2929 | # variable VAR accordingly. | |
2930 | ac_fn_c_check_type () | |
2931 | { | |
2932 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2934 | $as_echo_n "checking for $2... " >&6; } | |
2935 | if eval \${$3+:} false; then : | |
2936 | $as_echo_n "(cached) " >&6 | |
2937 | else | |
2938 | eval "$3=no" | |
2939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2940 | /* end confdefs.h. */ | |
2941 | $4 | |
2942 | int | |
2943 | main () | |
2944 | { | |
2945 | if (sizeof ($2)) | |
2946 | return 0; | |
2947 | ; | |
2948 | return 0; | |
2949 | } | |
2950 | _ACEOF | |
2951 | if ac_fn_c_try_compile "$LINENO"; then : | |
2952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2953 | /* end confdefs.h. */ | |
2954 | $4 | |
2955 | int | |
2956 | main () | |
2957 | { | |
2958 | if (sizeof (($2))) | |
2959 | return 0; | |
2960 | ; | |
2961 | return 0; | |
2962 | } | |
2963 | _ACEOF | |
2964 | if ac_fn_c_try_compile "$LINENO"; then : | |
2965 | ||
2966 | else | |
2967 | eval "$3=yes" | |
2968 | fi | |
2969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2970 | fi | |
2971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2972 | fi | |
2973 | eval ac_res=\$$3 | |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2975 | $as_echo "$ac_res" >&6; } | |
2976 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2977 | ||
2978 | } # ac_fn_c_check_type | |
2979 | ||
8690e634 JK |
2980 | # ac_fn_c_check_func LINENO FUNC VAR |
2981 | # ---------------------------------- | |
2982 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2983 | ac_fn_c_check_func () | |
2984 | { | |
2985 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2987 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2988 | if eval \${$3+:} false; then : |
8690e634 JK |
2989 | $as_echo_n "(cached) " >&6 |
2990 | else | |
2991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2992 | /* end confdefs.h. */ | |
2993 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2994 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2995 | #define $2 innocuous_$2 | |
2996 | ||
2997 | /* System header to define __stub macros and hopefully few prototypes, | |
2998 | which can conflict with char $2 (); below. | |
2999 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3000 | <limits.h> exists even on freestanding compilers. */ | |
3001 | ||
3002 | #ifdef __STDC__ | |
3003 | # include <limits.h> | |
3004 | #else | |
3005 | # include <assert.h> | |
3006 | #endif | |
3007 | ||
3008 | #undef $2 | |
3009 | ||
3010 | /* Override any GCC internal prototype to avoid an error. | |
3011 | Use char because int might match the return type of a GCC | |
3012 | builtin and then its argument prototype would still apply. */ | |
3013 | #ifdef __cplusplus | |
3014 | extern "C" | |
3015 | #endif | |
3016 | char $2 (); | |
3017 | /* The GNU C library defines this for functions which it implements | |
3018 | to always fail with ENOSYS. Some functions are actually named | |
3019 | something starting with __ and the normal name is an alias. */ | |
3020 | #if defined __stub_$2 || defined __stub___$2 | |
3021 | choke me | |
3022 | #endif | |
3023 | ||
3024 | int | |
3025 | main () | |
3026 | { | |
3027 | return $2 (); | |
3028 | ; | |
3029 | return 0; | |
3030 | } | |
3031 | _ACEOF | |
3032 | if ac_fn_c_try_link "$LINENO"; then : | |
3033 | eval "$3=yes" | |
3034 | else | |
3035 | eval "$3=no" | |
3036 | fi | |
3037 | rm -f core conftest.err conftest.$ac_objext \ | |
3038 | conftest$ac_exeext conftest.$ac_ext | |
3039 | fi | |
3040 | eval ac_res=\$$3 | |
3041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3042 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 3043 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
8690e634 JK |
3044 | |
3045 | } # ac_fn_c_check_func | |
3046 | ||
d0ac1c44 SM |
3047 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
3048 | # --------------------------------------------- | |
3049 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
3050 | # accordingly. | |
8986e351 TT |
3051 | ac_fn_c_check_decl () |
3052 | { | |
5df4cba6 SM |
3053 | ac_save_ac_compile="$ac_compile" |
3054 | if test -n "$ac_compile_for_check_decl"; then | |
3055 | ac_compile="$ac_compile_for_check_decl" | |
3056 | fi | |
8986e351 | 3057 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
d0ac1c44 SM |
3058 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
3059 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
3060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
3061 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
3062 | if eval \${$3+:} false; then : | |
8986e351 TT |
3063 | $as_echo_n "(cached) " >&6 |
3064 | else | |
3065 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3066 | /* end confdefs.h. */ | |
3067 | $4 | |
3068 | int | |
3069 | main () | |
3070 | { | |
d0ac1c44 SM |
3071 | #ifndef $as_decl_name |
3072 | #ifdef __cplusplus | |
3073 | (void) $as_decl_use; | |
3074 | #else | |
3075 | (void) $as_decl_name; | |
3076 | #endif | |
8986e351 TT |
3077 | #endif |
3078 | ||
3079 | ; | |
3080 | return 0; | |
3081 | } | |
3082 | _ACEOF | |
3083 | if ac_fn_c_try_compile "$LINENO"; then : | |
3084 | eval "$3=yes" | |
3085 | else | |
3086 | eval "$3=no" | |
3087 | fi | |
3088 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3089 | fi | |
3090 | eval ac_res=\$$3 | |
3091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3092 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 3093 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
5df4cba6 | 3094 | ac_compile="$ac_save_ac_compile" |
8986e351 TT |
3095 | |
3096 | } # ac_fn_c_check_decl | |
3097 | ||
c971b7fa PA |
3098 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
3099 | # -------------------------------------------- | |
3100 | # Tries to find the compile-time value of EXPR in a program that includes | |
3101 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
3102 | # computed | |
3103 | ac_fn_c_compute_int () | |
3104 | { | |
3105 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3106 | if test "$cross_compiling" = yes; then | |
3107 | # Depending upon the size, compute the lo and hi bounds. | |
3108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3109 | /* end confdefs.h. */ | |
3110 | $4 | |
3111 | int | |
3112 | main () | |
3113 | { | |
3114 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
3115 | test_array [0] = 0; |
3116 | return test_array [0]; | |
c971b7fa PA |
3117 | |
3118 | ; | |
3119 | return 0; | |
3120 | } | |
3121 | _ACEOF | |
3122 | if ac_fn_c_try_compile "$LINENO"; then : | |
3123 | ac_lo=0 ac_mid=0 | |
3124 | while :; do | |
3125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3126 | /* end confdefs.h. */ | |
3127 | $4 | |
3128 | int | |
3129 | main () | |
3130 | { | |
3131 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
3132 | test_array [0] = 0; |
3133 | return test_array [0]; | |
c971b7fa PA |
3134 | |
3135 | ; | |
3136 | return 0; | |
3137 | } | |
3138 | _ACEOF | |
3139 | if ac_fn_c_try_compile "$LINENO"; then : | |
3140 | ac_hi=$ac_mid; break | |
3141 | else | |
3142 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
3143 | if test $ac_lo -le $ac_mid; then | |
3144 | ac_lo= ac_hi= | |
3145 | break | |
3146 | fi | |
3147 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
3148 | fi | |
3149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3150 | done | |
3151 | else | |
3152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3153 | /* end confdefs.h. */ | |
3154 | $4 | |
3155 | int | |
3156 | main () | |
3157 | { | |
3158 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
3159 | test_array [0] = 0; |
3160 | return test_array [0]; | |
c971b7fa PA |
3161 | |
3162 | ; | |
3163 | return 0; | |
3164 | } | |
3165 | _ACEOF | |
3166 | if ac_fn_c_try_compile "$LINENO"; then : | |
3167 | ac_hi=-1 ac_mid=-1 | |
3168 | while :; do | |
3169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3170 | /* end confdefs.h. */ | |
3171 | $4 | |
3172 | int | |
3173 | main () | |
3174 | { | |
3175 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
3176 | test_array [0] = 0; |
3177 | return test_array [0]; | |
c971b7fa PA |
3178 | |
3179 | ; | |
3180 | return 0; | |
3181 | } | |
3182 | _ACEOF | |
3183 | if ac_fn_c_try_compile "$LINENO"; then : | |
3184 | ac_lo=$ac_mid; break | |
3185 | else | |
3186 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
3187 | if test $ac_mid -le $ac_hi; then | |
3188 | ac_lo= ac_hi= | |
3189 | break | |
3190 | fi | |
3191 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
3192 | fi | |
3193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3194 | done | |
3195 | else | |
3196 | ac_lo= ac_hi= | |
3197 | fi | |
3198 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3199 | fi | |
3200 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3201 | # Binary search between lo and hi bounds. | |
3202 | while test "x$ac_lo" != "x$ac_hi"; do | |
3203 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
3204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3205 | /* end confdefs.h. */ | |
3206 | $4 | |
3207 | int | |
3208 | main () | |
3209 | { | |
3210 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
3211 | test_array [0] = 0; |
3212 | return test_array [0]; | |
c971b7fa PA |
3213 | |
3214 | ; | |
3215 | return 0; | |
3216 | } | |
3217 | _ACEOF | |
3218 | if ac_fn_c_try_compile "$LINENO"; then : | |
3219 | ac_hi=$ac_mid | |
3220 | else | |
3221 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
3222 | fi | |
3223 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3224 | done | |
3225 | case $ac_lo in #(( | |
3226 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
3227 | '') ac_retval=1 ;; | |
3228 | esac | |
3229 | else | |
3230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3231 | /* end confdefs.h. */ | |
3232 | $4 | |
3233 | static long int longval () { return $2; } | |
3234 | static unsigned long int ulongval () { return $2; } | |
3235 | #include <stdio.h> | |
3236 | #include <stdlib.h> | |
3237 | int | |
3238 | main () | |
3239 | { | |
3240 | ||
3241 | FILE *f = fopen ("conftest.val", "w"); | |
3242 | if (! f) | |
3243 | return 1; | |
3244 | if (($2) < 0) | |
3245 | { | |
3246 | long int i = longval (); | |
3247 | if (i != ($2)) | |
3248 | return 1; | |
3249 | fprintf (f, "%ld", i); | |
3250 | } | |
3251 | else | |
3252 | { | |
3253 | unsigned long int i = ulongval (); | |
3254 | if (i != ($2)) | |
3255 | return 1; | |
3256 | fprintf (f, "%lu", i); | |
3257 | } | |
3258 | /* Do not output a trailing newline, as this causes \r\n confusion | |
3259 | on some platforms. */ | |
3260 | return ferror (f) || fclose (f) != 0; | |
3261 | ||
3262 | ; | |
3263 | return 0; | |
3264 | } | |
3265 | _ACEOF | |
3266 | if ac_fn_c_try_run "$LINENO"; then : | |
3267 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
3268 | else | |
3269 | ac_retval=1 | |
3270 | fi | |
3271 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
3272 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3273 | rm -f conftest.val | |
3274 | ||
3275 | fi | |
d0ac1c44 SM |
3276 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
3277 | as_fn_set_status $ac_retval | |
c971b7fa PA |
3278 | |
3279 | } # ac_fn_c_compute_int | |
725e2999 JB |
3280 | |
3281 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
3282 | # ---------------------------------------------------- | |
3283 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
3284 | # INCLUDES, setting cache variable VAR accordingly. | |
3285 | ac_fn_c_check_member () | |
3286 | { | |
3287 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
3289 | $as_echo_n "checking for $2.$3... " >&6; } | |
3290 | if eval \${$4+:} false; then : | |
3291 | $as_echo_n "(cached) " >&6 | |
3292 | else | |
3293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3294 | /* end confdefs.h. */ | |
3295 | $5 | |
3296 | int | |
3297 | main () | |
3298 | { | |
3299 | static $2 ac_aggr; | |
3300 | if (ac_aggr.$3) | |
3301 | return 0; | |
3302 | ; | |
3303 | return 0; | |
3304 | } | |
3305 | _ACEOF | |
3306 | if ac_fn_c_try_compile "$LINENO"; then : | |
3307 | eval "$4=yes" | |
3308 | else | |
3309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3310 | /* end confdefs.h. */ | |
3311 | $5 | |
3312 | int | |
3313 | main () | |
3314 | { | |
3315 | static $2 ac_aggr; | |
3316 | if (sizeof ac_aggr.$3) | |
3317 | return 0; | |
3318 | ; | |
3319 | return 0; | |
3320 | } | |
3321 | _ACEOF | |
3322 | if ac_fn_c_try_compile "$LINENO"; then : | |
3323 | eval "$4=yes" | |
3324 | else | |
3325 | eval "$4=no" | |
3326 | fi | |
3327 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3328 | fi | |
3329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3330 | fi | |
3331 | eval ac_res=\$$4 | |
3332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3333 | $as_echo "$ac_res" >&6; } | |
3334 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
3335 | ||
3336 | } # ac_fn_c_check_member | |
c971b7fa PA |
3337 | cat >config.log <<_ACEOF |
3338 | This file contains any messages produced by compilers while | |
3339 | running configure, to aid debugging if configure makes a mistake. | |
3340 | ||
d0ac1c44 SM |
3341 | It was created by libgnu $as_me UNUSED-VERSION, which was |
3342 | generated by GNU Autoconf 2.69. Invocation command line was | |
c971b7fa PA |
3343 | |
3344 | $ $0 $@ | |
3345 | ||
3346 | _ACEOF | |
3347 | exec 5>>config.log | |
3348 | { | |
3349 | cat <<_ASUNAME | |
3350 | ## --------- ## | |
3351 | ## Platform. ## | |
3352 | ## --------- ## | |
3353 | ||
3354 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
3355 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
3356 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
3357 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
3358 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
3359 | ||
3360 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
3361 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
3362 | ||
3363 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
3364 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
3365 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
3366 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
3367 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
3368 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
3369 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
3370 | ||
3371 | _ASUNAME | |
3372 | ||
3373 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3374 | for as_dir in $PATH | |
3375 | do | |
3376 | IFS=$as_save_IFS | |
3377 | test -z "$as_dir" && as_dir=. | |
3378 | $as_echo "PATH: $as_dir" | |
3379 | done | |
3380 | IFS=$as_save_IFS | |
3381 | ||
3382 | } >&5 | |
3383 | ||
3384 | cat >&5 <<_ACEOF | |
3385 | ||
3386 | ||
3387 | ## ----------- ## | |
3388 | ## Core tests. ## | |
3389 | ## ----------- ## | |
3390 | ||
3391 | _ACEOF | |
3392 | ||
3393 | ||
3394 | # Keep a trace of the command line. | |
3395 | # Strip out --no-create and --no-recursion so they do not pile up. | |
3396 | # Strip out --silent because we don't want to record it for future runs. | |
3397 | # Also quote any args containing shell meta-characters. | |
3398 | # Make two passes to allow for proper duplicate-argument suppression. | |
3399 | ac_configure_args= | |
3400 | ac_configure_args0= | |
3401 | ac_configure_args1= | |
3402 | ac_must_keep_next=false | |
3403 | for ac_pass in 1 2 | |
3404 | do | |
3405 | for ac_arg | |
3406 | do | |
3407 | case $ac_arg in | |
3408 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
3409 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
3410 | | -silent | --silent | --silen | --sile | --sil) | |
3411 | continue ;; | |
3412 | *\'*) | |
3413 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3414 | esac | |
3415 | case $ac_pass in | |
3416 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
3417 | 2) | |
3418 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
3419 | if test $ac_must_keep_next = true; then | |
3420 | ac_must_keep_next=false # Got value, back to normal. | |
3421 | else | |
3422 | case $ac_arg in | |
3423 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
3424 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
3425 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
3426 | | -with-* | --with-* | -without-* | --without-* | --x) | |
3427 | case "$ac_configure_args0 " in | |
3428 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
3429 | esac | |
3430 | ;; | |
3431 | -* ) ac_must_keep_next=true ;; | |
3432 | esac | |
3433 | fi | |
3434 | as_fn_append ac_configure_args " '$ac_arg'" | |
3435 | ;; | |
3436 | esac | |
3437 | done | |
3438 | done | |
3439 | { ac_configure_args0=; unset ac_configure_args0;} | |
3440 | { ac_configure_args1=; unset ac_configure_args1;} | |
3441 | ||
3442 | # When interrupted or exit'd, cleanup temporary files, and complete | |
3443 | # config.log. We remove comments because anyway the quotes in there | |
3444 | # would cause problems or look ugly. | |
3445 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
3446 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
3447 | trap 'exit_status=$? | |
3448 | # Save into config.log some information that might help in debugging. | |
3449 | { | |
3450 | echo | |
3451 | ||
d0ac1c44 | 3452 | $as_echo "## ---------------- ## |
c971b7fa | 3453 | ## Cache variables. ## |
d0ac1c44 | 3454 | ## ---------------- ##" |
c971b7fa PA |
3455 | echo |
3456 | # The following way of writing the cache mishandles newlines in values, | |
3457 | ( | |
3458 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
3459 | eval ac_val=\$$ac_var | |
3460 | case $ac_val in #( | |
3461 | *${as_nl}*) | |
3462 | case $ac_var in #( | |
3463 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
3464 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
3465 | esac | |
3466 | case $ac_var in #( | |
3467 | _ | IFS | as_nl) ;; #( | |
3468 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
3469 | *) { eval $ac_var=; unset $ac_var;} ;; | |
3470 | esac ;; | |
3471 | esac | |
3472 | done | |
3473 | (set) 2>&1 | | |
3474 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
3475 | *${as_nl}ac_space=\ *) | |
3476 | sed -n \ | |
3477 | "s/'\''/'\''\\\\'\'''\''/g; | |
3478 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
3479 | ;; #( | |
3480 | *) | |
3481 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
3482 | ;; | |
3483 | esac | | |
3484 | sort | |
3485 | ) | |
3486 | echo | |
3487 | ||
d0ac1c44 | 3488 | $as_echo "## ----------------- ## |
c971b7fa | 3489 | ## Output variables. ## |
d0ac1c44 | 3490 | ## ----------------- ##" |
c971b7fa PA |
3491 | echo |
3492 | for ac_var in $ac_subst_vars | |
3493 | do | |
3494 | eval ac_val=\$$ac_var | |
3495 | case $ac_val in | |
3496 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3497 | esac | |
3498 | $as_echo "$ac_var='\''$ac_val'\''" | |
3499 | done | sort | |
3500 | echo | |
3501 | ||
3502 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 3503 | $as_echo "## ------------------- ## |
c971b7fa | 3504 | ## File substitutions. ## |
d0ac1c44 | 3505 | ## ------------------- ##" |
c971b7fa PA |
3506 | echo |
3507 | for ac_var in $ac_subst_files | |
3508 | do | |
3509 | eval ac_val=\$$ac_var | |
3510 | case $ac_val in | |
3511 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3512 | esac | |
3513 | $as_echo "$ac_var='\''$ac_val'\''" | |
3514 | done | sort | |
3515 | echo | |
3516 | fi | |
3517 | ||
3518 | if test -s confdefs.h; then | |
d0ac1c44 | 3519 | $as_echo "## ----------- ## |
c971b7fa | 3520 | ## confdefs.h. ## |
d0ac1c44 | 3521 | ## ----------- ##" |
c971b7fa PA |
3522 | echo |
3523 | cat confdefs.h | |
3524 | echo | |
3525 | fi | |
3526 | test "$ac_signal" != 0 && | |
3527 | $as_echo "$as_me: caught signal $ac_signal" | |
3528 | $as_echo "$as_me: exit $exit_status" | |
3529 | } >&5 | |
3530 | rm -f core *.core core.conftest.* && | |
3531 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3532 | exit $exit_status | |
3533 | ' 0 | |
3534 | for ac_signal in 1 2 13 15; do | |
3535 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3536 | done | |
3537 | ac_signal=0 | |
3538 | ||
3539 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3540 | rm -f -r conftest* confdefs.h | |
3541 | ||
3542 | $as_echo "/* confdefs.h */" > confdefs.h | |
3543 | ||
3544 | # Predefined preprocessor variables. | |
3545 | ||
3546 | cat >>confdefs.h <<_ACEOF | |
3547 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3548 | _ACEOF | |
3549 | ||
3550 | cat >>confdefs.h <<_ACEOF | |
3551 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3552 | _ACEOF | |
3553 | ||
3554 | cat >>confdefs.h <<_ACEOF | |
3555 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3556 | _ACEOF | |
3557 | ||
3558 | cat >>confdefs.h <<_ACEOF | |
3559 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3560 | _ACEOF | |
3561 | ||
3562 | cat >>confdefs.h <<_ACEOF | |
3563 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3564 | _ACEOF | |
3565 | ||
3566 | cat >>confdefs.h <<_ACEOF | |
3567 | #define PACKAGE_URL "$PACKAGE_URL" | |
3568 | _ACEOF | |
3569 | ||
3570 | ||
3571 | # Let the site file select an alternate cache file if it wants to. | |
3572 | # Prefer an explicitly selected file to automatically selected ones. | |
3573 | ac_site_file1=NONE | |
3574 | ac_site_file2=NONE | |
3575 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
3576 | # We do not want a PATH search for config.site. |
3577 | case $CONFIG_SITE in #(( | |
3578 | -*) ac_site_file1=./$CONFIG_SITE;; | |
3579 | */*) ac_site_file1=$CONFIG_SITE;; | |
3580 | *) ac_site_file1=./$CONFIG_SITE;; | |
3581 | esac | |
c971b7fa PA |
3582 | elif test "x$prefix" != xNONE; then |
3583 | ac_site_file1=$prefix/share/config.site | |
3584 | ac_site_file2=$prefix/etc/config.site | |
3585 | else | |
3586 | ac_site_file1=$ac_default_prefix/share/config.site | |
3587 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3588 | fi | |
3589 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3590 | do | |
3591 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 3592 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
c971b7fa PA |
3593 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
3594 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3595 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
3596 | . "$ac_site_file" \ |
3597 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3598 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3599 | as_fn_error $? "failed to load site script $ac_site_file | |
3600 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
3601 | fi |
3602 | done | |
3603 | ||
3604 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
3605 | # Some versions of bash will fail to source /dev/null (special files |
3606 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3607 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
c971b7fa PA |
3608 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
3609 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3610 | case $cache_file in | |
3611 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3612 | *) . "./$cache_file";; | |
3613 | esac | |
3614 | fi | |
3615 | else | |
3616 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3617 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3618 | >$cache_file | |
3619 | fi | |
3620 | ||
c0c3707f CB |
3621 | as_fn_append ac_header_list " arpa/inet.h" |
3622 | as_fn_append ac_header_list " features.h" | |
3623 | as_fn_append ac_header_list " sys/socket.h" | |
698be2d8 | 3624 | as_fn_append ac_func_list " btowc" |
c0c3707f CB |
3625 | as_fn_append ac_func_list " canonicalize_file_name" |
3626 | as_fn_append ac_func_list " getcwd" | |
3627 | as_fn_append ac_func_list " readlink" | |
3628 | as_fn_append ac_func_list " realpath" | |
3629 | as_fn_append ac_header_list " sys/param.h" | |
3630 | as_fn_append ac_header_list " unistd.h" | |
3631 | as_fn_append ac_func_list " _set_invalid_parameter_handler" | |
3632 | as_fn_append ac_func_list " fchdir" | |
3633 | as_fn_append ac_header_list " dirent.h" | |
3634 | as_fn_append ac_func_list " fcntl" | |
3635 | as_fn_append ac_func_list " symlink" | |
3636 | as_fn_append ac_func_list " fdopendir" | |
3637 | as_fn_append ac_func_list " mempcpy" | |
3638 | as_fn_append ac_header_list " fnmatch.h" | |
3639 | as_fn_append ac_func_list " fnmatch" | |
c0c3707f | 3640 | as_fn_append ac_func_list " mbsrtowcs" |
8690e634 | 3641 | gl_fnmatch_required=GNU |
c0c3707f CB |
3642 | as_fn_append ac_header_list " sys/stat.h" |
3643 | as_fn_append ac_func_list " fstatat" | |
3644 | as_fn_append ac_func_list " getdtablesize" | |
3645 | as_fn_append ac_func_list " getlogin_r" | |
3646 | as_fn_append ac_func_list " getprogname" | |
3647 | as_fn_append ac_func_list " getexecname" | |
698be2d8 | 3648 | as_fn_append ac_func_list " getrandom" |
c0c3707f CB |
3649 | as_fn_append ac_header_list " sys/time.h" |
3650 | as_fn_append ac_func_list " gettimeofday" | |
3651 | as_fn_append ac_header_list " glob.h" | |
3652 | as_fn_append ac_func_list " glob" | |
3653 | as_fn_append ac_func_list " glob_pattern_p" | |
3654 | as_fn_append ac_func_list " getpwnam_r" | |
5df4cba6 | 3655 | as_fn_append ac_header_list " threads.h" |
c0c3707f CB |
3656 | as_fn_append ac_header_list " netdb.h" |
3657 | as_fn_append ac_header_list " netinet/in.h" | |
3658 | as_fn_append ac_header_list " limits.h" | |
3659 | as_fn_append ac_header_list " wchar.h" | |
3660 | as_fn_append ac_header_list " stdint.h" | |
3661 | as_fn_append ac_header_list " inttypes.h" | |
698be2d8 | 3662 | as_fn_append ac_func_list " isblank" |
5df4cba6 | 3663 | as_fn_append ac_header_list " xlocale.h" |
c0c3707f CB |
3664 | as_fn_append ac_func_list " lstat" |
3665 | as_fn_append ac_header_list " math.h" | |
3666 | as_fn_append ac_func_list " mbsinit" | |
3667 | as_fn_append ac_func_list " mbrtowc" | |
3668 | as_fn_append ac_header_list " sys/mman.h" | |
3669 | as_fn_append ac_func_list " mprotect" | |
3670 | as_fn_append ac_func_list " mkostemp" | |
3671 | as_fn_append ac_func_list " openat" | |
3672 | as_fn_append ac_func_list " link" | |
3673 | as_fn_append ac_func_list " setenv" | |
3674 | as_fn_append ac_func_list " strdup" | |
3675 | as_fn_append ac_func_list " strerror_r" | |
3676 | as_fn_append ac_func_list " __xpg_strerror_r" | |
3677 | as_fn_append ac_func_list " catgets" | |
3678 | as_fn_append ac_func_list " snprintf" | |
698be2d8 | 3679 | as_fn_append ac_header_list " sys/random.h" |
c0c3707f CB |
3680 | as_fn_append ac_header_list " sys/uio.h" |
3681 | as_fn_append ac_func_list " localtime_r" | |
3682 | as_fn_append ac_func_list " pipe" | |
3683 | as_fn_append ac_header_list " crtdefs.h" | |
3684 | as_fn_append ac_func_list " iswcntrl" | |
698be2d8 CB |
3685 | as_fn_append ac_header_list " wctype.h" |
3686 | as_fn_append ac_func_list " wmempcpy" | |
c971b7fa PA |
3687 | # Check that the precious variables saved in the cache have kept the same |
3688 | # value. | |
3689 | ac_cache_corrupted=false | |
3690 | for ac_var in $ac_precious_vars; do | |
3691 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3692 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3693 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3694 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3695 | case $ac_old_set,$ac_new_set in | |
3696 | set,) | |
3697 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3698 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3699 | ac_cache_corrupted=: ;; | |
3700 | ,set) | |
3701 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3702 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3703 | ac_cache_corrupted=: ;; | |
3704 | ,);; | |
3705 | *) | |
3706 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3707 | # differences in whitespace do not lead to failure. | |
3708 | ac_old_val_w=`echo x $ac_old_val` | |
3709 | ac_new_val_w=`echo x $ac_new_val` | |
3710 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3711 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3712 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3713 | ac_cache_corrupted=: | |
3714 | else | |
3715 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3716 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3717 | eval $ac_var=\$ac_old_val | |
3718 | fi | |
3719 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3720 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3721 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3722 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3723 | fi;; | |
3724 | esac | |
3725 | # Pass precious variables to config.status. | |
3726 | if test "$ac_new_set" = set; then | |
3727 | case $ac_new_val in | |
3728 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3729 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3730 | esac | |
3731 | case " $ac_configure_args " in | |
3732 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3733 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3734 | esac | |
3735 | fi | |
3736 | done | |
3737 | if $ac_cache_corrupted; then | |
3738 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3739 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3740 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3741 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 3742 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
c971b7fa PA |
3743 | fi |
3744 | ## -------------------- ## | |
3745 | ## Main body of script. ## | |
3746 | ## -------------------- ## | |
3747 | ||
3748 | ac_ext=c | |
3749 | ac_cpp='$CPP $CPPFLAGS' | |
3750 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3751 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3752 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3753 | ||
3754 | ||
d0ac1c44 | 3755 | |
73cc7272 TT |
3756 | |
3757 | ||
3758 | ||
c971b7fa PA |
3759 | ac_config_headers="$ac_config_headers config.h:config.in" |
3760 | ||
3761 | ||
5abebf3c CB |
3762 | |
3763 | ||
c971b7fa PA |
3764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
3765 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3766 | # Check whether --enable-maintainer-mode was given. | |
3767 | if test "${enable_maintainer_mode+set}" = set; then : | |
3768 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3769 | else | |
3770 | USE_MAINTAINER_MODE=no | |
3771 | fi | |
3772 | ||
3773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3774 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3775 | if test $USE_MAINTAINER_MODE = yes; then | |
3776 | MAINTAINER_MODE_TRUE= | |
3777 | MAINTAINER_MODE_FALSE='#' | |
3778 | else | |
3779 | MAINTAINER_MODE_TRUE='#' | |
3780 | MAINTAINER_MODE_FALSE= | |
3781 | fi | |
3782 | ||
3783 | MAINT=$MAINTAINER_MODE_TRUE | |
3784 | ||
3785 | ||
3786 | ||
3787 | ac_ext=c | |
3788 | ac_cpp='$CPP $CPPFLAGS' | |
3789 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3790 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3791 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3792 | if test -n "$ac_tool_prefix"; then | |
3793 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3794 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3796 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3797 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
3798 | $as_echo_n "(cached) " >&6 |
3799 | else | |
3800 | if test -n "$CC"; then | |
3801 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3802 | else | |
3803 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3804 | for as_dir in $PATH | |
3805 | do | |
3806 | IFS=$as_save_IFS | |
3807 | test -z "$as_dir" && as_dir=. | |
3808 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3809 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3810 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3811 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3812 | break 2 | |
3813 | fi | |
3814 | done | |
3815 | done | |
3816 | IFS=$as_save_IFS | |
3817 | ||
3818 | fi | |
3819 | fi | |
3820 | CC=$ac_cv_prog_CC | |
3821 | if test -n "$CC"; then | |
3822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3823 | $as_echo "$CC" >&6; } | |
3824 | else | |
3825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3826 | $as_echo "no" >&6; } | |
3827 | fi | |
3828 | ||
3829 | ||
3830 | fi | |
3831 | if test -z "$ac_cv_prog_CC"; then | |
3832 | ac_ct_CC=$CC | |
3833 | # Extract the first word of "gcc", so it can be a program name with args. | |
3834 | set dummy gcc; ac_word=$2 | |
3835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3836 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3837 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
c971b7fa PA |
3838 | $as_echo_n "(cached) " >&6 |
3839 | else | |
3840 | if test -n "$ac_ct_CC"; then | |
3841 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3842 | else | |
3843 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3844 | for as_dir in $PATH | |
3845 | do | |
3846 | IFS=$as_save_IFS | |
3847 | test -z "$as_dir" && as_dir=. | |
3848 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3849 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3850 | ac_cv_prog_ac_ct_CC="gcc" |
3851 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3852 | break 2 | |
3853 | fi | |
3854 | done | |
3855 | done | |
3856 | IFS=$as_save_IFS | |
3857 | ||
3858 | fi | |
3859 | fi | |
3860 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3861 | if test -n "$ac_ct_CC"; then | |
3862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3863 | $as_echo "$ac_ct_CC" >&6; } | |
3864 | else | |
3865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3866 | $as_echo "no" >&6; } | |
3867 | fi | |
3868 | ||
3869 | if test "x$ac_ct_CC" = x; then | |
3870 | CC="" | |
3871 | else | |
3872 | case $cross_compiling:$ac_tool_warned in | |
3873 | yes:) | |
3874 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3875 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3876 | ac_tool_warned=yes ;; | |
3877 | esac | |
3878 | CC=$ac_ct_CC | |
3879 | fi | |
3880 | else | |
3881 | CC="$ac_cv_prog_CC" | |
3882 | fi | |
3883 | ||
3884 | if test -z "$CC"; then | |
3885 | if test -n "$ac_tool_prefix"; then | |
3886 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3887 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3889 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3890 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
3891 | $as_echo_n "(cached) " >&6 |
3892 | else | |
3893 | if test -n "$CC"; then | |
3894 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3895 | else | |
3896 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3897 | for as_dir in $PATH | |
3898 | do | |
3899 | IFS=$as_save_IFS | |
3900 | test -z "$as_dir" && as_dir=. | |
3901 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3902 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3903 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3904 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3905 | break 2 | |
3906 | fi | |
3907 | done | |
3908 | done | |
3909 | IFS=$as_save_IFS | |
3910 | ||
3911 | fi | |
3912 | fi | |
3913 | CC=$ac_cv_prog_CC | |
3914 | if test -n "$CC"; then | |
3915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3916 | $as_echo "$CC" >&6; } | |
3917 | else | |
3918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3919 | $as_echo "no" >&6; } | |
3920 | fi | |
3921 | ||
3922 | ||
3923 | fi | |
3924 | fi | |
3925 | if test -z "$CC"; then | |
3926 | # Extract the first word of "cc", so it can be a program name with args. | |
3927 | set dummy cc; ac_word=$2 | |
3928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3929 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3930 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
3931 | $as_echo_n "(cached) " >&6 |
3932 | else | |
3933 | if test -n "$CC"; then | |
3934 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3935 | else | |
3936 | ac_prog_rejected=no | |
3937 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3938 | for as_dir in $PATH | |
3939 | do | |
3940 | IFS=$as_save_IFS | |
3941 | test -z "$as_dir" && as_dir=. | |
3942 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3943 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3944 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3945 | ac_prog_rejected=yes | |
3946 | continue | |
3947 | fi | |
3948 | ac_cv_prog_CC="cc" | |
3949 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3950 | break 2 | |
3951 | fi | |
3952 | done | |
3953 | done | |
3954 | IFS=$as_save_IFS | |
3955 | ||
3956 | if test $ac_prog_rejected = yes; then | |
3957 | # We found a bogon in the path, so make sure we never use it. | |
3958 | set dummy $ac_cv_prog_CC | |
3959 | shift | |
3960 | if test $# != 0; then | |
3961 | # We chose a different compiler from the bogus one. | |
3962 | # However, it has the same basename, so the bogon will be chosen | |
3963 | # first if we set CC to just the basename; use the full file name. | |
3964 | shift | |
3965 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3966 | fi | |
3967 | fi | |
3968 | fi | |
3969 | fi | |
3970 | CC=$ac_cv_prog_CC | |
3971 | if test -n "$CC"; then | |
3972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3973 | $as_echo "$CC" >&6; } | |
3974 | else | |
3975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3976 | $as_echo "no" >&6; } | |
3977 | fi | |
3978 | ||
3979 | ||
3980 | fi | |
3981 | if test -z "$CC"; then | |
3982 | if test -n "$ac_tool_prefix"; then | |
3983 | for ac_prog in cl.exe | |
3984 | do | |
3985 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3986 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3988 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3989 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
3990 | $as_echo_n "(cached) " >&6 |
3991 | else | |
3992 | if test -n "$CC"; then | |
3993 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3994 | else | |
3995 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3996 | for as_dir in $PATH | |
3997 | do | |
3998 | IFS=$as_save_IFS | |
3999 | test -z "$as_dir" && as_dir=. | |
4000 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4001 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4002 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
4003 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4004 | break 2 | |
4005 | fi | |
4006 | done | |
4007 | done | |
4008 | IFS=$as_save_IFS | |
4009 | ||
4010 | fi | |
4011 | fi | |
4012 | CC=$ac_cv_prog_CC | |
4013 | if test -n "$CC"; then | |
4014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4015 | $as_echo "$CC" >&6; } | |
4016 | else | |
4017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4018 | $as_echo "no" >&6; } | |
4019 | fi | |
4020 | ||
4021 | ||
4022 | test -n "$CC" && break | |
4023 | done | |
4024 | fi | |
4025 | if test -z "$CC"; then | |
4026 | ac_ct_CC=$CC | |
4027 | for ac_prog in cl.exe | |
4028 | do | |
4029 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4030 | set dummy $ac_prog; ac_word=$2 | |
4031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4032 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4033 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
c971b7fa PA |
4034 | $as_echo_n "(cached) " >&6 |
4035 | else | |
4036 | if test -n "$ac_ct_CC"; then | |
4037 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4038 | else | |
4039 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4040 | for as_dir in $PATH | |
4041 | do | |
4042 | IFS=$as_save_IFS | |
4043 | test -z "$as_dir" && as_dir=. | |
4044 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4045 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4046 | ac_cv_prog_ac_ct_CC="$ac_prog" |
4047 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4048 | break 2 | |
4049 | fi | |
4050 | done | |
4051 | done | |
4052 | IFS=$as_save_IFS | |
4053 | ||
4054 | fi | |
4055 | fi | |
4056 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4057 | if test -n "$ac_ct_CC"; then | |
4058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4059 | $as_echo "$ac_ct_CC" >&6; } | |
4060 | else | |
4061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4062 | $as_echo "no" >&6; } | |
4063 | fi | |
4064 | ||
4065 | ||
4066 | test -n "$ac_ct_CC" && break | |
4067 | done | |
4068 | ||
4069 | if test "x$ac_ct_CC" = x; then | |
4070 | CC="" | |
4071 | else | |
4072 | case $cross_compiling:$ac_tool_warned in | |
4073 | yes:) | |
4074 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4075 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4076 | ac_tool_warned=yes ;; | |
4077 | esac | |
4078 | CC=$ac_ct_CC | |
4079 | fi | |
4080 | fi | |
4081 | ||
c0c3707f CB |
4082 | fi |
4083 | if test -z "$CC"; then | |
4084 | if test -n "$ac_tool_prefix"; then | |
4085 | # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. | |
4086 | set dummy ${ac_tool_prefix}clang; ac_word=$2 | |
4087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4088 | $as_echo_n "checking for $ac_word... " >&6; } | |
4089 | if ${ac_cv_prog_CC+:} false; then : | |
4090 | $as_echo_n "(cached) " >&6 | |
4091 | else | |
4092 | if test -n "$CC"; then | |
4093 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4094 | else | |
4095 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4096 | for as_dir in $PATH | |
4097 | do | |
4098 | IFS=$as_save_IFS | |
4099 | test -z "$as_dir" && as_dir=. | |
4100 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4101 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4102 | ac_cv_prog_CC="${ac_tool_prefix}clang" | |
4103 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4104 | break 2 | |
4105 | fi | |
4106 | done | |
4107 | done | |
4108 | IFS=$as_save_IFS | |
4109 | ||
4110 | fi | |
4111 | fi | |
4112 | CC=$ac_cv_prog_CC | |
4113 | if test -n "$CC"; then | |
4114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4115 | $as_echo "$CC" >&6; } | |
4116 | else | |
4117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4118 | $as_echo "no" >&6; } | |
4119 | fi | |
4120 | ||
4121 | ||
4122 | fi | |
4123 | if test -z "$ac_cv_prog_CC"; then | |
4124 | ac_ct_CC=$CC | |
4125 | # Extract the first word of "clang", so it can be a program name with args. | |
4126 | set dummy clang; ac_word=$2 | |
4127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4128 | $as_echo_n "checking for $ac_word... " >&6; } | |
4129 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
4130 | $as_echo_n "(cached) " >&6 | |
4131 | else | |
4132 | if test -n "$ac_ct_CC"; then | |
4133 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4134 | else | |
4135 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4136 | for as_dir in $PATH | |
4137 | do | |
4138 | IFS=$as_save_IFS | |
4139 | test -z "$as_dir" && as_dir=. | |
4140 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4141 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4142 | ac_cv_prog_ac_ct_CC="clang" | |
4143 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4144 | break 2 | |
4145 | fi | |
4146 | done | |
4147 | done | |
4148 | IFS=$as_save_IFS | |
4149 | ||
4150 | fi | |
4151 | fi | |
4152 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4153 | if test -n "$ac_ct_CC"; then | |
4154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4155 | $as_echo "$ac_ct_CC" >&6; } | |
4156 | else | |
4157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4158 | $as_echo "no" >&6; } | |
4159 | fi | |
4160 | ||
4161 | if test "x$ac_ct_CC" = x; then | |
4162 | CC="" | |
4163 | else | |
4164 | case $cross_compiling:$ac_tool_warned in | |
4165 | yes:) | |
4166 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4167 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4168 | ac_tool_warned=yes ;; | |
4169 | esac | |
4170 | CC=$ac_ct_CC | |
4171 | fi | |
4172 | else | |
4173 | CC="$ac_cv_prog_CC" | |
4174 | fi | |
4175 | ||
c971b7fa PA |
4176 | fi |
4177 | ||
4178 | ||
4179 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4180 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4181 | as_fn_error $? "no acceptable C compiler found in \$PATH |
4182 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
4183 | |
4184 | # Provide some information about the compiler. | |
4185 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4186 | set X $ac_compile | |
4187 | ac_compiler=$2 | |
c0c3707f | 4188 | for ac_option in --version -v -V -qversion -version; do |
c971b7fa PA |
4189 | { { ac_try="$ac_compiler $ac_option >&5" |
4190 | case "(($ac_try" in | |
4191 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4192 | *) ac_try_echo=$ac_try;; | |
4193 | esac | |
4194 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4195 | $as_echo "$ac_try_echo"; } >&5 | |
4196 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4197 | ac_status=$? | |
4198 | if test -s conftest.err; then | |
4199 | sed '10a\ | |
4200 | ... rest of stderr output deleted ... | |
4201 | 10q' conftest.err >conftest.er1 | |
4202 | cat conftest.er1 >&5 | |
c971b7fa | 4203 | fi |
d0ac1c44 | 4204 | rm -f conftest.er1 conftest.err |
c971b7fa PA |
4205 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4206 | test $ac_status = 0; } | |
4207 | done | |
4208 | ||
4209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4210 | /* end confdefs.h. */ | |
d0ac1c44 | 4211 | |
c971b7fa PA |
4212 | int |
4213 | main () | |
4214 | { | |
c971b7fa PA |
4215 | |
4216 | ; | |
4217 | return 0; | |
4218 | } | |
4219 | _ACEOF | |
4220 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 4221 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
c971b7fa PA |
4222 | # Try to create an executable without -o first, disregard a.out. |
4223 | # It will help us diagnose broken compilers, and finding out an intuition | |
4224 | # of exeext. | |
d0ac1c44 SM |
4225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
4226 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
c971b7fa PA |
4227 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
4228 | ||
4229 | # The possible output files: | |
4230 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4231 | ||
4232 | ac_rmfiles= | |
4233 | for ac_file in $ac_files | |
4234 | do | |
4235 | case $ac_file in | |
4236 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4237 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4238 | esac | |
4239 | done | |
4240 | rm -f $ac_rmfiles | |
4241 | ||
4242 | if { { ac_try="$ac_link_default" | |
4243 | case "(($ac_try" in | |
4244 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4245 | *) ac_try_echo=$ac_try;; | |
4246 | esac | |
4247 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4248 | $as_echo "$ac_try_echo"; } >&5 | |
4249 | (eval "$ac_link_default") 2>&5 | |
4250 | ac_status=$? | |
4251 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4252 | test $ac_status = 0; }; then : | |
4253 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4254 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4255 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4256 | # so that the user can short-circuit this test for compilers unknown to | |
4257 | # Autoconf. | |
4258 | for ac_file in $ac_files '' | |
4259 | do | |
4260 | test -f "$ac_file" || continue | |
4261 | case $ac_file in | |
4262 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4263 | ;; | |
4264 | [ab].out ) | |
4265 | # We found the default executable, but exeext='' is most | |
4266 | # certainly right. | |
4267 | break;; | |
4268 | *.* ) | |
4269 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4270 | then :; else | |
4271 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4272 | fi | |
4273 | # We set ac_cv_exeext here because the later test for it is not | |
4274 | # safe: cross compilers may not add the suffix if given an `-o' | |
4275 | # argument, so we may need to know it at that point already. | |
4276 | # Even if this section looks crufty: it has the advantage of | |
4277 | # actually working. | |
4278 | break;; | |
4279 | * ) | |
4280 | break;; | |
4281 | esac | |
4282 | done | |
4283 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
4284 | ||
4285 | else | |
4286 | ac_file='' | |
4287 | fi | |
c971b7fa | 4288 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
4289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4290 | $as_echo "no" >&6; } | |
4291 | $as_echo "$as_me: failed program was:" >&5 | |
c971b7fa PA |
4292 | sed 's/^/| /' conftest.$ac_ext >&5 |
4293 | ||
4294 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4295 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4296 | as_fn_error 77 "C compiler cannot create executables |
4297 | See \`config.log' for more details" "$LINENO" 5; } | |
4298 | else | |
4299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4300 | $as_echo "yes" >&6; } | |
c971b7fa | 4301 | fi |
d0ac1c44 SM |
4302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
4303 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
4304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
4305 | $as_echo "$ac_file" >&6; } | |
c971b7fa PA |
4306 | ac_exeext=$ac_cv_exeext |
4307 | ||
d0ac1c44 | 4308 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
c971b7fa | 4309 | ac_clean_files=$ac_clean_files_save |
c971b7fa PA |
4310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
4311 | $as_echo_n "checking for suffix of executables... " >&6; } | |
4312 | if { { ac_try="$ac_link" | |
4313 | case "(($ac_try" in | |
4314 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4315 | *) ac_try_echo=$ac_try;; | |
4316 | esac | |
4317 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4318 | $as_echo "$ac_try_echo"; } >&5 | |
4319 | (eval "$ac_link") 2>&5 | |
4320 | ac_status=$? | |
4321 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4322 | test $ac_status = 0; }; then : | |
4323 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
4324 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
4325 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
4326 | # `rm'. | |
4327 | for ac_file in conftest.exe conftest conftest.*; do | |
4328 | test -f "$ac_file" || continue | |
4329 | case $ac_file in | |
4330 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4331 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4332 | break;; | |
4333 | * ) break;; | |
4334 | esac | |
4335 | done | |
4336 | else | |
4337 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4338 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4339 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
4340 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa | 4341 | fi |
d0ac1c44 | 4342 | rm -f conftest conftest$ac_cv_exeext |
c971b7fa PA |
4343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
4344 | $as_echo "$ac_cv_exeext" >&6; } | |
4345 | ||
4346 | rm -f conftest.$ac_ext | |
4347 | EXEEXT=$ac_cv_exeext | |
4348 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
4349 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4350 | /* end confdefs.h. */ | |
4351 | #include <stdio.h> | |
4352 | int | |
4353 | main () | |
4354 | { | |
4355 | FILE *f = fopen ("conftest.out", "w"); | |
4356 | return ferror (f) || fclose (f) != 0; | |
4357 | ||
4358 | ; | |
4359 | return 0; | |
4360 | } | |
4361 | _ACEOF | |
4362 | ac_clean_files="$ac_clean_files conftest.out" | |
4363 | # Check that the compiler produces executables we can run. If not, either | |
4364 | # the compiler is broken, or we cross compile. | |
4365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4366 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4367 | if test "$cross_compiling" != yes; then | |
4368 | { { ac_try="$ac_link" | |
4369 | case "(($ac_try" in | |
4370 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4371 | *) ac_try_echo=$ac_try;; | |
4372 | esac | |
4373 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4374 | $as_echo "$ac_try_echo"; } >&5 | |
4375 | (eval "$ac_link") 2>&5 | |
4376 | ac_status=$? | |
4377 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4378 | test $ac_status = 0; } | |
4379 | if { ac_try='./conftest$ac_cv_exeext' | |
4380 | { { case "(($ac_try" in | |
4381 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4382 | *) ac_try_echo=$ac_try;; | |
4383 | esac | |
4384 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4385 | $as_echo "$ac_try_echo"; } >&5 | |
4386 | (eval "$ac_try") 2>&5 | |
4387 | ac_status=$? | |
4388 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4389 | test $ac_status = 0; }; }; then | |
4390 | cross_compiling=no | |
4391 | else | |
4392 | if test "$cross_compiling" = maybe; then | |
4393 | cross_compiling=yes | |
4394 | else | |
4395 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4396 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4397 | as_fn_error $? "cannot run C compiled programs. | |
4398 | If you meant to cross compile, use \`--host'. | |
4399 | See \`config.log' for more details" "$LINENO" 5; } | |
4400 | fi | |
4401 | fi | |
4402 | fi | |
4403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4404 | $as_echo "$cross_compiling" >&6; } | |
4405 | ||
4406 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4407 | ac_clean_files=$ac_clean_files_save | |
c971b7fa PA |
4408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
4409 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 4410 | if ${ac_cv_objext+:} false; then : |
c971b7fa PA |
4411 | $as_echo_n "(cached) " >&6 |
4412 | else | |
4413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4414 | /* end confdefs.h. */ | |
4415 | ||
4416 | int | |
4417 | main () | |
4418 | { | |
4419 | ||
4420 | ; | |
4421 | return 0; | |
4422 | } | |
4423 | _ACEOF | |
4424 | rm -f conftest.o conftest.obj | |
4425 | if { { ac_try="$ac_compile" | |
4426 | case "(($ac_try" in | |
4427 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4428 | *) ac_try_echo=$ac_try;; | |
4429 | esac | |
4430 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4431 | $as_echo "$ac_try_echo"; } >&5 | |
4432 | (eval "$ac_compile") 2>&5 | |
4433 | ac_status=$? | |
4434 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4435 | test $ac_status = 0; }; then : | |
4436 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4437 | test -f "$ac_file" || continue; | |
4438 | case $ac_file in | |
4439 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4440 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4441 | break;; | |
4442 | esac | |
4443 | done | |
4444 | else | |
4445 | $as_echo "$as_me: failed program was:" >&5 | |
4446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4447 | ||
4448 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4449 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4450 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
4451 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
4452 | fi |
4453 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4454 | fi | |
4455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4456 | $as_echo "$ac_cv_objext" >&6; } | |
4457 | OBJEXT=$ac_cv_objext | |
4458 | ac_objext=$OBJEXT | |
4459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4460 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 4461 | if ${ac_cv_c_compiler_gnu+:} false; then : |
c971b7fa PA |
4462 | $as_echo_n "(cached) " >&6 |
4463 | else | |
4464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4465 | /* end confdefs.h. */ | |
4466 | ||
4467 | int | |
4468 | main () | |
4469 | { | |
4470 | #ifndef __GNUC__ | |
4471 | choke me | |
4472 | #endif | |
4473 | ||
4474 | ; | |
4475 | return 0; | |
4476 | } | |
4477 | _ACEOF | |
4478 | if ac_fn_c_try_compile "$LINENO"; then : | |
4479 | ac_compiler_gnu=yes | |
4480 | else | |
4481 | ac_compiler_gnu=no | |
4482 | fi | |
4483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4484 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4485 | ||
4486 | fi | |
4487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4488 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4489 | if test $ac_compiler_gnu = yes; then | |
4490 | GCC=yes | |
4491 | else | |
4492 | GCC= | |
4493 | fi | |
4494 | ac_test_CFLAGS=${CFLAGS+set} | |
4495 | ac_save_CFLAGS=$CFLAGS | |
4496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4497 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 4498 | if ${ac_cv_prog_cc_g+:} false; then : |
c971b7fa PA |
4499 | $as_echo_n "(cached) " >&6 |
4500 | else | |
4501 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4502 | ac_c_werror_flag=yes | |
4503 | ac_cv_prog_cc_g=no | |
4504 | CFLAGS="-g" | |
4505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4506 | /* end confdefs.h. */ | |
4507 | ||
4508 | int | |
4509 | main () | |
4510 | { | |
4511 | ||
4512 | ; | |
4513 | return 0; | |
4514 | } | |
4515 | _ACEOF | |
4516 | if ac_fn_c_try_compile "$LINENO"; then : | |
4517 | ac_cv_prog_cc_g=yes | |
4518 | else | |
4519 | CFLAGS="" | |
4520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4521 | /* end confdefs.h. */ | |
4522 | ||
4523 | int | |
4524 | main () | |
4525 | { | |
4526 | ||
4527 | ; | |
4528 | return 0; | |
4529 | } | |
4530 | _ACEOF | |
4531 | if ac_fn_c_try_compile "$LINENO"; then : | |
4532 | ||
4533 | else | |
4534 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4535 | CFLAGS="-g" | |
4536 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4537 | /* end confdefs.h. */ | |
4538 | ||
4539 | int | |
4540 | main () | |
4541 | { | |
4542 | ||
4543 | ; | |
4544 | return 0; | |
4545 | } | |
4546 | _ACEOF | |
4547 | if ac_fn_c_try_compile "$LINENO"; then : | |
4548 | ac_cv_prog_cc_g=yes | |
4549 | fi | |
4550 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4551 | fi | |
4552 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4553 | fi | |
4554 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4555 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4556 | fi | |
4557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4558 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4559 | if test "$ac_test_CFLAGS" = set; then | |
4560 | CFLAGS=$ac_save_CFLAGS | |
4561 | elif test $ac_cv_prog_cc_g = yes; then | |
4562 | if test "$GCC" = yes; then | |
4563 | CFLAGS="-g -O2" | |
4564 | else | |
4565 | CFLAGS="-g" | |
4566 | fi | |
4567 | else | |
4568 | if test "$GCC" = yes; then | |
4569 | CFLAGS="-O2" | |
4570 | else | |
4571 | CFLAGS= | |
4572 | fi | |
4573 | fi | |
c0c3707f CB |
4574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 |
4575 | $as_echo_n "checking for $CC option to enable C11 features... " >&6; } | |
4576 | if ${ac_cv_prog_cc_c11+:} false; then : | |
c971b7fa PA |
4577 | $as_echo_n "(cached) " >&6 |
4578 | else | |
c0c3707f | 4579 | ac_cv_prog_cc_c11=no |
c971b7fa PA |
4580 | ac_save_CC=$CC |
4581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4582 | /* end confdefs.h. */ | |
4583 | #include <stdarg.h> | |
c0c3707f CB |
4584 | #include <stdbool.h> |
4585 | #include <stddef.h> | |
4586 | #include <stdlib.h> | |
4587 | #include <wchar.h> | |
c971b7fa | 4588 | #include <stdio.h> |
c0c3707f CB |
4589 | |
4590 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
4591 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
4592 | #define showlist(...) puts (#__VA_ARGS__) | |
4593 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
4594 | static void | |
4595 | test_varargs_macros (void) | |
7a6dbc2f | 4596 | { |
c0c3707f CB |
4597 | int x = 1234; |
4598 | int y = 5678; | |
4599 | debug ("Flag"); | |
4600 | debug ("X = %d\n", x); | |
4601 | showlist (The first, second, and third items.); | |
4602 | report (x>y, "x is %d but y is %d", x, y); | |
c971b7fa | 4603 | } |
c0c3707f CB |
4604 | |
4605 | // Check long long types. | |
4606 | #define BIG64 18446744073709551615ull | |
4607 | #define BIG32 4294967295ul | |
4608 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
4609 | #if !BIG_OK | |
4610 | your preprocessor is broken; | |
4611 | #endif | |
4612 | #if BIG_OK | |
4613 | #else | |
4614 | your preprocessor is broken; | |
4615 | #endif | |
4616 | static long long int bignum = -9223372036854775807LL; | |
4617 | static unsigned long long int ubignum = BIG64; | |
4618 | ||
4619 | struct incomplete_array | |
7a6dbc2f | 4620 | { |
c0c3707f CB |
4621 | int datasize; |
4622 | double data[]; | |
4623 | }; | |
4624 | ||
4625 | struct named_init { | |
4626 | int number; | |
4627 | const wchar_t *name; | |
4628 | double average; | |
4629 | }; | |
4630 | ||
4631 | typedef const char *ccp; | |
4632 | ||
4633 | static inline int | |
4634 | test_restrict (ccp restrict text) | |
4635 | { | |
4636 | // See if C++-style comments work. | |
4637 | // Iterate through items via the restricted pointer. | |
4638 | // Also check for declarations in for loops. | |
4639 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
4640 | continue; | |
4641 | return 0; | |
7a6dbc2f | 4642 | } |
7a6dbc2f | 4643 | |
c0c3707f CB |
4644 | // Check varargs and va_copy. |
4645 | static bool | |
4646 | test_varargs (const char *format, ...) | |
4647 | { | |
4648 | va_list args; | |
4649 | va_start (args, format); | |
4650 | va_list args_copy; | |
4651 | va_copy (args_copy, args); | |
7a6dbc2f | 4652 | |
c0c3707f CB |
4653 | const char *str = ""; |
4654 | int number = 0; | |
4655 | float fnumber = 0; | |
4656 | ||
4657 | while (*format) | |
4658 | { | |
4659 | switch (*format++) | |
4660 | { | |
4661 | case 's': // string | |
4662 | str = va_arg (args_copy, const char *); | |
4663 | break; | |
4664 | case 'd': // int | |
4665 | number = va_arg (args_copy, int); | |
4666 | break; | |
4667 | case 'f': // float | |
4668 | fnumber = va_arg (args_copy, double); | |
4669 | break; | |
4670 | default: | |
4671 | break; | |
4672 | } | |
4673 | } | |
4674 | va_end (args_copy); | |
4675 | va_end (args); | |
4676 | ||
4677 | return *str && number && fnumber; | |
4678 | } | |
4679 | // Check _Alignas. | |
4680 | char _Alignas (double) aligned_as_double; | |
4681 | char _Alignas (0) no_special_alignment; | |
4682 | extern char aligned_as_int; | |
4683 | char _Alignas (0) _Alignas (int) aligned_as_int; | |
4684 | ||
4685 | // Check _Alignof. | |
4686 | enum | |
4687 | { | |
4688 | int_alignment = _Alignof (int), | |
4689 | int_array_alignment = _Alignof (int[100]), | |
4690 | char_alignment = _Alignof (char) | |
4691 | }; | |
4692 | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); | |
4693 | ||
4694 | // Check _Noreturn. | |
4695 | int _Noreturn does_not_return (void) { for (;;) continue; } | |
4696 | ||
4697 | // Check _Static_assert. | |
4698 | struct test_static_assert | |
4699 | { | |
4700 | int x; | |
4701 | _Static_assert (sizeof (int) <= sizeof (long int), | |
4702 | "_Static_assert does not work in struct"); | |
4703 | long int y; | |
4704 | }; | |
4705 | ||
4706 | // Check UTF-8 literals. | |
4707 | #define u8 syntax error! | |
4708 | char const utf8_literal[] = u8"happens to be ASCII" "another string"; | |
4709 | ||
4710 | // Check duplicate typedefs. | |
4711 | typedef long *long_ptr; | |
4712 | typedef long int *long_ptr; | |
4713 | typedef long_ptr long_ptr; | |
4714 | ||
4715 | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. | |
4716 | struct anonymous | |
4717 | { | |
4718 | union { | |
4719 | struct { int i; int j; }; | |
4720 | struct { int k; long int l; } w; | |
4721 | }; | |
4722 | int m; | |
4723 | } v1; | |
c971b7fa | 4724 | |
c971b7fa PA |
4725 | int |
4726 | main () | |
4727 | { | |
c0c3707f CB |
4728 | |
4729 | // Check bool. | |
4730 | _Bool success = false; | |
4731 | ||
4732 | // Check restrict. | |
4733 | if (test_restrict ("String literal") == 0) | |
4734 | success = true; | |
4735 | char *restrict newvar = "Another string"; | |
4736 | ||
4737 | // Check varargs. | |
4738 | success &= test_varargs ("s, d' f .", "string", 65, 34.234); | |
4739 | test_varargs_macros (); | |
4740 | ||
4741 | // Check flexible array members. | |
4742 | struct incomplete_array *ia = | |
4743 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
4744 | ia->datasize = 10; | |
4745 | for (int i = 0; i < ia->datasize; ++i) | |
4746 | ia->data[i] = i * 1.234; | |
4747 | ||
4748 | // Check named initializers. | |
4749 | struct named_init ni = { | |
4750 | .number = 34, | |
4751 | .name = L"Test wide string", | |
4752 | .average = 543.34343, | |
4753 | }; | |
4754 | ||
4755 | ni.number = 58; | |
4756 | ||
4757 | int dynamic_array[ni.number]; | |
4758 | dynamic_array[ni.number - 1] = 543; | |
4759 | ||
4760 | // work around unused variable warnings | |
4761 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
4762 | || dynamic_array[ni.number - 1] != 543); | |
4763 | ||
4764 | v1.i = 2; | |
4765 | v1.w.k = 5; | |
4766 | _Static_assert ((offsetof (struct anonymous, i) | |
4767 | == offsetof (struct anonymous, w.k)), | |
4768 | "Anonymous union alignment botch"); | |
4769 | ||
c971b7fa PA |
4770 | ; |
4771 | return 0; | |
4772 | } | |
4773 | _ACEOF | |
c0c3707f | 4774 | for ac_arg in '' -std=gnu11 |
c971b7fa PA |
4775 | do |
4776 | CC="$ac_save_CC $ac_arg" | |
4777 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 4778 | ac_cv_prog_cc_c11=$ac_arg |
c971b7fa PA |
4779 | fi |
4780 | rm -f core conftest.err conftest.$ac_objext | |
c0c3707f | 4781 | test "x$ac_cv_prog_cc_c11" != "xno" && break |
c971b7fa PA |
4782 | done |
4783 | rm -f conftest.$ac_ext | |
4784 | CC=$ac_save_CC | |
4785 | ||
4786 | fi | |
4787 | # AC_CACHE_VAL | |
c0c3707f CB |
4788 | ac_prog_cc_stdc_options= |
4789 | case "x$ac_cv_prog_cc_c11" in | |
c971b7fa PA |
4790 | x) |
4791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4792 | $as_echo "none needed" >&6; } ;; | |
4793 | xno) | |
4794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4795 | $as_echo "unsupported" >&6; } ;; | |
4796 | *) | |
c0c3707f CB |
4797 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11" |
4798 | CC=$CC$ac_prog_cc_stdc_options | |
4799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 | |
4800 | $as_echo "$ac_cv_prog_cc_c11" >&6; } ;; | |
c971b7fa | 4801 | esac |
c0c3707f CB |
4802 | if test "x$ac_cv_prog_cc_c11" != xno; then : |
4803 | ac_prog_cc_stdc=c11 | |
4804 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 | |
4805 | else | |
4806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 | |
4807 | $as_echo_n "checking for $CC option to enable C99 features... " >&6; } | |
4808 | if ${ac_cv_prog_cc_c99+:} false; then : | |
4809 | $as_echo_n "(cached) " >&6 | |
4810 | else | |
4811 | ac_cv_prog_cc_c99=no | |
4812 | ac_save_CC=$CC | |
4813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4814 | /* end confdefs.h. */ | |
4815 | #include <stdarg.h> | |
4816 | #include <stdbool.h> | |
4817 | #include <stddef.h> | |
4818 | #include <stdlib.h> | |
4819 | #include <wchar.h> | |
4820 | #include <stdio.h> | |
7a6dbc2f | 4821 | |
c0c3707f CB |
4822 | // Check varargs macros. These examples are taken from C99 6.10.3.5. |
4823 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
4824 | #define showlist(...) puts (#__VA_ARGS__) | |
4825 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
4826 | static void | |
4827 | test_varargs_macros (void) | |
4828 | { | |
4829 | int x = 1234; | |
4830 | int y = 5678; | |
4831 | debug ("Flag"); | |
4832 | debug ("X = %d\n", x); | |
4833 | showlist (The first, second, and third items.); | |
4834 | report (x>y, "x is %d but y is %d", x, y); | |
4835 | } | |
7a6dbc2f | 4836 | |
c0c3707f CB |
4837 | // Check long long types. |
4838 | #define BIG64 18446744073709551615ull | |
4839 | #define BIG32 4294967295ul | |
4840 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
4841 | #if !BIG_OK | |
4842 | your preprocessor is broken; | |
4843 | #endif | |
4844 | #if BIG_OK | |
4845 | #else | |
4846 | your preprocessor is broken; | |
4847 | #endif | |
4848 | static long long int bignum = -9223372036854775807LL; | |
4849 | static unsigned long long int ubignum = BIG64; | |
7a6dbc2f | 4850 | |
c0c3707f CB |
4851 | struct incomplete_array |
4852 | { | |
4853 | int datasize; | |
4854 | double data[]; | |
4855 | }; | |
7a6dbc2f | 4856 | |
c0c3707f CB |
4857 | struct named_init { |
4858 | int number; | |
4859 | const wchar_t *name; | |
4860 | double average; | |
4861 | }; | |
7a6dbc2f | 4862 | |
c0c3707f | 4863 | typedef const char *ccp; |
7a6dbc2f | 4864 | |
c0c3707f CB |
4865 | static inline int |
4866 | test_restrict (ccp restrict text) | |
4867 | { | |
4868 | // See if C++-style comments work. | |
4869 | // Iterate through items via the restricted pointer. | |
4870 | // Also check for declarations in for loops. | |
4871 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
4872 | continue; | |
4873 | return 0; | |
4874 | } | |
7a6dbc2f | 4875 | |
c0c3707f CB |
4876 | // Check varargs and va_copy. |
4877 | static bool | |
4878 | test_varargs (const char *format, ...) | |
4879 | { | |
4880 | va_list args; | |
4881 | va_start (args, format); | |
4882 | va_list args_copy; | |
4883 | va_copy (args_copy, args); | |
4884 | ||
4885 | const char *str = ""; | |
4886 | int number = 0; | |
4887 | float fnumber = 0; | |
4888 | ||
4889 | while (*format) | |
4890 | { | |
4891 | switch (*format++) | |
4892 | { | |
4893 | case 's': // string | |
4894 | str = va_arg (args_copy, const char *); | |
4895 | break; | |
4896 | case 'd': // int | |
4897 | number = va_arg (args_copy, int); | |
4898 | break; | |
4899 | case 'f': // float | |
4900 | fnumber = va_arg (args_copy, double); | |
4901 | break; | |
4902 | default: | |
4903 | break; | |
4904 | } | |
4905 | } | |
4906 | va_end (args_copy); | |
4907 | va_end (args); | |
4908 | ||
4909 | return *str && number && fnumber; | |
4910 | } | |
4911 | int | |
4912 | main () | |
4913 | { | |
4914 | ||
4915 | // Check bool. | |
4916 | _Bool success = false; | |
4917 | ||
4918 | // Check restrict. | |
4919 | if (test_restrict ("String literal") == 0) | |
4920 | success = true; | |
4921 | char *restrict newvar = "Another string"; | |
4922 | ||
4923 | // Check varargs. | |
4924 | success &= test_varargs ("s, d' f .", "string", 65, 34.234); | |
4925 | test_varargs_macros (); | |
4926 | ||
4927 | // Check flexible array members. | |
4928 | struct incomplete_array *ia = | |
4929 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
4930 | ia->datasize = 10; | |
4931 | for (int i = 0; i < ia->datasize; ++i) | |
4932 | ia->data[i] = i * 1.234; | |
4933 | ||
4934 | // Check named initializers. | |
4935 | struct named_init ni = { | |
4936 | .number = 34, | |
4937 | .name = L"Test wide string", | |
4938 | .average = 543.34343, | |
4939 | }; | |
4940 | ||
4941 | ni.number = 58; | |
4942 | ||
4943 | int dynamic_array[ni.number]; | |
4944 | dynamic_array[ni.number - 1] = 543; | |
4945 | ||
4946 | // work around unused variable warnings | |
4947 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
4948 | || dynamic_array[ni.number - 1] != 543); | |
4949 | ||
4950 | ; | |
4951 | return 0; | |
4952 | } | |
4953 | _ACEOF | |
4954 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99 | |
4955 | do | |
4956 | CC="$ac_save_CC $ac_arg" | |
4957 | if ac_fn_c_try_compile "$LINENO"; then : | |
4958 | ac_cv_prog_cc_c99=$ac_arg | |
4959 | fi | |
4960 | rm -f core conftest.err conftest.$ac_objext | |
4961 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
4962 | done | |
4963 | rm -f conftest.$ac_ext | |
4964 | CC=$ac_save_CC | |
4965 | ||
4966 | fi | |
4967 | # AC_CACHE_VAL | |
4968 | ac_prog_cc_stdc_options= | |
4969 | case "x$ac_cv_prog_cc_c99" in | |
4970 | x) | |
4971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4972 | $as_echo "none needed" >&6; } ;; | |
4973 | xno) | |
4974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4975 | $as_echo "unsupported" >&6; } ;; | |
4976 | *) | |
4977 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99" | |
4978 | CC=$CC$ac_prog_cc_stdc_options | |
4979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
4980 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
4981 | esac | |
4982 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
4983 | ac_prog_cc_stdc=c99 | |
4984 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
4985 | else | |
4986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 | |
4987 | $as_echo_n "checking for $CC option to enable C89 features... " >&6; } | |
4988 | if ${ac_cv_prog_cc_c89+:} false; then : | |
d0ac1c44 SM |
4989 | $as_echo_n "(cached) " >&6 |
4990 | else | |
c0c3707f CB |
4991 | ac_cv_prog_cc_c89=no |
4992 | ac_save_CC=$CC | |
4993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d0ac1c44 | 4994 | /* end confdefs.h. */ |
c0c3707f CB |
4995 | #include <stdarg.h> |
4996 | #include <stdio.h> | |
4997 | struct stat; | |
4998 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4999 | struct buf { int x; }; | |
5000 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5001 | static char *e (p, i) | |
5002 | char **p; | |
5003 | int i; | |
5004 | { | |
5005 | return p[i]; | |
5006 | } | |
5007 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5008 | { | |
5009 | char *s; | |
5010 | va_list v; | |
5011 | va_start (v,p); | |
5012 | s = g (p, va_arg (v,int)); | |
5013 | va_end (v); | |
5014 | return s; | |
5015 | } | |
5016 | ||
5017 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5018 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5019 | These don't provoke an error unfortunately, instead are silently treated | |
5020 | as 'x'. The following induces an error, until -std is added to get | |
5021 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5022 | array size at least. It's necessary to write '\x00'==0 to get something | |
5023 | that's true only with -std. */ | |
5024 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5025 | ||
5026 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5027 | inside strings and character constants. */ | |
5028 | #define FOO(x) 'x' | |
5029 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
d0ac1c44 | 5030 | |
c0c3707f CB |
5031 | int test (int i, double x); |
5032 | struct s1 {int (*f) (int a);}; | |
5033 | struct s2 {int (*f) (double a);}; | |
5034 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5035 | int argc; | |
5036 | char **argv; | |
d0ac1c44 SM |
5037 | int |
5038 | main () | |
5039 | { | |
c0c3707f | 5040 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
d0ac1c44 SM |
5041 | ; |
5042 | return 0; | |
5043 | } | |
5044 | _ACEOF | |
c0c3707f CB |
5045 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
5046 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5047 | do | |
5048 | CC="$ac_save_CC $ac_arg" | |
5049 | if ac_fn_c_try_compile "$LINENO"; then : | |
5050 | ac_cv_prog_cc_c89=$ac_arg | |
5051 | fi | |
5052 | rm -f core conftest.err conftest.$ac_objext | |
5053 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5054 | done | |
5055 | rm -f conftest.$ac_ext | |
5056 | CC=$ac_save_CC | |
5057 | ||
5058 | fi | |
5059 | # AC_CACHE_VAL | |
5060 | ac_prog_cc_stdc_options= | |
5061 | case "x$ac_cv_prog_cc_c89" in | |
5062 | x) | |
5063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5064 | $as_echo "none needed" >&6; } ;; | |
5065 | xno) | |
5066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5067 | $as_echo "unsupported" >&6; } ;; | |
5068 | *) | |
5069 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89" | |
5070 | CC=$CC$ac_prog_cc_stdc_options | |
5071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5072 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5073 | esac | |
5074 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5075 | ac_prog_cc_stdc=c89 | |
5076 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
5077 | else | |
5078 | ac_prog_cc_stdc=no | |
5079 | ac_cv_prog_cc_stdc=no | |
5080 | fi | |
5081 | ||
5082 | fi | |
5083 | ||
7a6dbc2f | 5084 | fi |
c0c3707f | 5085 | |
d0ac1c44 SM |
5086 | ac_ext=c |
5087 | ac_cpp='$CPP $CPPFLAGS' | |
5088 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5089 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5090 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5091 | ||
5092 | ||
5df4cba6 SM |
5093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 |
5094 | $as_echo_n "checking whether the compiler is clang... " >&6; } | |
5095 | if ${gl_cv_compiler_clang+:} false; then : | |
5096 | $as_echo_n "(cached) " >&6 | |
5097 | else | |
5098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5099 | /* end confdefs.h. */ | |
5100 | ||
5101 | #ifdef __clang__ | |
5102 | barfbarf | |
5103 | #endif | |
5104 | ||
5105 | int | |
5106 | main () | |
5107 | { | |
5108 | ||
5109 | ; | |
5110 | return 0; | |
5111 | } | |
5112 | ||
5113 | _ACEOF | |
5114 | if ac_fn_c_try_compile "$LINENO"; then : | |
5115 | gl_cv_compiler_clang=no | |
5116 | else | |
5117 | gl_cv_compiler_clang=yes | |
5118 | fi | |
5119 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5120 | ||
5121 | fi | |
5122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5 | |
5123 | $as_echo "$gl_cv_compiler_clang" >&6; } | |
5124 | ||
5125 | ||
5126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5 | |
5127 | $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; } | |
5128 | if ${gl_cv_compiler_check_decl_option+:} false; then : | |
5129 | $as_echo_n "(cached) " >&6 | |
5130 | else | |
5131 | if test $gl_cv_compiler_clang = yes; then | |
5132 | save_ac_compile="$ac_compile" | |
5133 | ac_compile="$ac_compile -Werror=implicit-function-declaration" | |
5134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5135 | /* end confdefs.h. */ | |
5136 | ||
5137 | int | |
5138 | main () | |
5139 | { | |
5140 | ||
5141 | ; | |
5142 | return 0; | |
5143 | } | |
5144 | _ACEOF | |
5145 | if ac_fn_c_try_compile "$LINENO"; then : | |
5146 | gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration' | |
5147 | else | |
5148 | gl_cv_compiler_check_decl_option=none | |
5149 | fi | |
5150 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5151 | ac_compile="$save_ac_compile" | |
5152 | else | |
5153 | gl_cv_compiler_check_decl_option=none | |
5154 | fi | |
5155 | ||
5156 | fi | |
5157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5 | |
5158 | $as_echo "$gl_cv_compiler_check_decl_option" >&6; } | |
5159 | if test "x$gl_cv_compiler_check_decl_option" != xnone; then | |
5160 | ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" | |
5161 | else | |
5162 | ac_compile_for_check_decl="$ac_compile" | |
5163 | fi | |
5164 | ||
5165 | ||
5166 | ||
c971b7fa PA |
5167 | ac_ext=c |
5168 | ac_cpp='$CPP $CPPFLAGS' | |
5169 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5170 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5171 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5173 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5174 | # On Suns, sometimes $CPP names a directory. | |
5175 | if test -n "$CPP" && test -d "$CPP"; then | |
5176 | CPP= | |
5177 | fi | |
5178 | if test -z "$CPP"; then | |
d0ac1c44 | 5179 | if ${ac_cv_prog_CPP+:} false; then : |
c971b7fa PA |
5180 | $as_echo_n "(cached) " >&6 |
5181 | else | |
5182 | # Double quotes because CPP needs to be expanded | |
5183 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5184 | do | |
5185 | ac_preproc_ok=false | |
5186 | for ac_c_preproc_warn_flag in '' yes | |
5187 | do | |
5188 | # Use a header file that comes with gcc, so configuring glibc | |
5189 | # with a fresh cross-compiler works. | |
5190 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5191 | # <limits.h> exists even on freestanding compilers. | |
5192 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5193 | # not just through cpp. "Syntax error" is here to catch this case. | |
5194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5195 | /* end confdefs.h. */ | |
5196 | #ifdef __STDC__ | |
5197 | # include <limits.h> | |
5198 | #else | |
5199 | # include <assert.h> | |
5200 | #endif | |
5201 | Syntax error | |
5202 | _ACEOF | |
5203 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5204 | ||
5205 | else | |
5206 | # Broken: fails on valid input. | |
5207 | continue | |
5208 | fi | |
d0ac1c44 | 5209 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5210 | |
5211 | # OK, works on sane cases. Now check whether nonexistent headers | |
5212 | # can be detected and how. | |
5213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5214 | /* end confdefs.h. */ | |
5215 | #include <ac_nonexistent.h> | |
5216 | _ACEOF | |
5217 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5218 | # Broken: success on invalid input. | |
5219 | continue | |
5220 | else | |
5221 | # Passes both tests. | |
5222 | ac_preproc_ok=: | |
5223 | break | |
5224 | fi | |
d0ac1c44 | 5225 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5226 | |
5227 | done | |
5228 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 5229 | rm -f conftest.i conftest.err conftest.$ac_ext |
c971b7fa PA |
5230 | if $ac_preproc_ok; then : |
5231 | break | |
5232 | fi | |
5233 | ||
5234 | done | |
5235 | ac_cv_prog_CPP=$CPP | |
5236 | ||
5237 | fi | |
5238 | CPP=$ac_cv_prog_CPP | |
5239 | else | |
5240 | ac_cv_prog_CPP=$CPP | |
5241 | fi | |
5242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5243 | $as_echo "$CPP" >&6; } | |
5244 | ac_preproc_ok=false | |
5245 | for ac_c_preproc_warn_flag in '' yes | |
5246 | do | |
5247 | # Use a header file that comes with gcc, so configuring glibc | |
5248 | # with a fresh cross-compiler works. | |
5249 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5250 | # <limits.h> exists even on freestanding compilers. | |
5251 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5252 | # not just through cpp. "Syntax error" is here to catch this case. | |
5253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5254 | /* end confdefs.h. */ | |
5255 | #ifdef __STDC__ | |
5256 | # include <limits.h> | |
5257 | #else | |
5258 | # include <assert.h> | |
5259 | #endif | |
5260 | Syntax error | |
5261 | _ACEOF | |
5262 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5263 | ||
5264 | else | |
5265 | # Broken: fails on valid input. | |
5266 | continue | |
5267 | fi | |
d0ac1c44 | 5268 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5269 | |
5270 | # OK, works on sane cases. Now check whether nonexistent headers | |
5271 | # can be detected and how. | |
5272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5273 | /* end confdefs.h. */ | |
5274 | #include <ac_nonexistent.h> | |
5275 | _ACEOF | |
5276 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5277 | # Broken: success on invalid input. | |
5278 | continue | |
5279 | else | |
5280 | # Passes both tests. | |
5281 | ac_preproc_ok=: | |
5282 | break | |
5283 | fi | |
d0ac1c44 | 5284 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5285 | |
5286 | done | |
5287 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 5288 | rm -f conftest.i conftest.err conftest.$ac_ext |
c971b7fa PA |
5289 | if $ac_preproc_ok; then : |
5290 | ||
5291 | else | |
5292 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5293 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
5294 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
5295 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
5296 | fi |
5297 | ||
5298 | ac_ext=c | |
5299 | ac_cpp='$CPP $CPPFLAGS' | |
5300 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5301 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5302 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5303 | ||
5304 | ||
5305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5306 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 5307 | if ${ac_cv_path_GREP+:} false; then : |
c971b7fa PA |
5308 | $as_echo_n "(cached) " >&6 |
5309 | else | |
5310 | if test -z "$GREP"; then | |
5311 | ac_path_GREP_found=false | |
5312 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5313 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5314 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5315 | do | |
5316 | IFS=$as_save_IFS | |
5317 | test -z "$as_dir" && as_dir=. | |
5318 | for ac_prog in grep ggrep; do | |
5319 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5320 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 5321 | as_fn_executable_p "$ac_path_GREP" || continue |
c971b7fa PA |
5322 | # Check for GNU ac_path_GREP and select it if it is found. |
5323 | # Check for GNU $ac_path_GREP | |
5324 | case `"$ac_path_GREP" --version 2>&1` in | |
5325 | *GNU*) | |
5326 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5327 | *) | |
5328 | ac_count=0 | |
5329 | $as_echo_n 0123456789 >"conftest.in" | |
5330 | while : | |
5331 | do | |
5332 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5333 | mv "conftest.tmp" "conftest.in" | |
5334 | cp "conftest.in" "conftest.nl" | |
5335 | $as_echo 'GREP' >> "conftest.nl" | |
5336 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5337 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5338 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5339 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5340 | # Best one so far, save it but keep looking for a better one | |
5341 | ac_cv_path_GREP="$ac_path_GREP" | |
5342 | ac_path_GREP_max=$ac_count | |
5343 | fi | |
5344 | # 10*(2^10) chars as input seems more than enough | |
5345 | test $ac_count -gt 10 && break | |
5346 | done | |
5347 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5348 | esac | |
5349 | ||
5350 | $ac_path_GREP_found && break 3 | |
5351 | done | |
5352 | done | |
5353 | done | |
5354 | IFS=$as_save_IFS | |
5355 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 5356 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
c971b7fa PA |
5357 | fi |
5358 | else | |
5359 | ac_cv_path_GREP=$GREP | |
5360 | fi | |
5361 | ||
5362 | fi | |
5363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5364 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5365 | GREP="$ac_cv_path_GREP" | |
5366 | ||
5367 | ||
5368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5369 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 5370 | if ${ac_cv_path_EGREP+:} false; then : |
c971b7fa PA |
5371 | $as_echo_n "(cached) " >&6 |
5372 | else | |
5373 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5374 | then ac_cv_path_EGREP="$GREP -E" | |
5375 | else | |
5376 | if test -z "$EGREP"; then | |
5377 | ac_path_EGREP_found=false | |
5378 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5379 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5380 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5381 | do | |
5382 | IFS=$as_save_IFS | |
5383 | test -z "$as_dir" && as_dir=. | |
5384 | for ac_prog in egrep; do | |
5385 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5386 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 5387 | as_fn_executable_p "$ac_path_EGREP" || continue |
c971b7fa PA |
5388 | # Check for GNU ac_path_EGREP and select it if it is found. |
5389 | # Check for GNU $ac_path_EGREP | |
5390 | case `"$ac_path_EGREP" --version 2>&1` in | |
5391 | *GNU*) | |
5392 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5393 | *) | |
5394 | ac_count=0 | |
5395 | $as_echo_n 0123456789 >"conftest.in" | |
5396 | while : | |
5397 | do | |
5398 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5399 | mv "conftest.tmp" "conftest.in" | |
5400 | cp "conftest.in" "conftest.nl" | |
5401 | $as_echo 'EGREP' >> "conftest.nl" | |
5402 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5403 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5404 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5405 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5406 | # Best one so far, save it but keep looking for a better one | |
5407 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5408 | ac_path_EGREP_max=$ac_count | |
5409 | fi | |
5410 | # 10*(2^10) chars as input seems more than enough | |
5411 | test $ac_count -gt 10 && break | |
5412 | done | |
5413 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5414 | esac | |
5415 | ||
5416 | $ac_path_EGREP_found && break 3 | |
5417 | done | |
5418 | done | |
5419 | done | |
5420 | IFS=$as_save_IFS | |
5421 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 5422 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
c971b7fa PA |
5423 | fi |
5424 | else | |
5425 | ac_cv_path_EGREP=$EGREP | |
5426 | fi | |
5427 | ||
5428 | fi | |
5429 | fi | |
5430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5431 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5432 | EGREP="$ac_cv_path_EGREP" | |
5433 | ||
5434 | ||
5435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5436 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 5437 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
5438 | $as_echo_n "(cached) " >&6 |
5439 | else | |
5440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5441 | /* end confdefs.h. */ | |
5442 | #include <stdlib.h> | |
5443 | #include <stdarg.h> | |
5444 | #include <string.h> | |
5445 | #include <float.h> | |
5446 | ||
5447 | int | |
5448 | main () | |
5449 | { | |
5450 | ||
5451 | ; | |
5452 | return 0; | |
5453 | } | |
5454 | _ACEOF | |
5455 | if ac_fn_c_try_compile "$LINENO"; then : | |
5456 | ac_cv_header_stdc=yes | |
5457 | else | |
5458 | ac_cv_header_stdc=no | |
5459 | fi | |
5460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5461 | ||
5462 | if test $ac_cv_header_stdc = yes; then | |
5463 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5465 | /* end confdefs.h. */ | |
5466 | #include <string.h> | |
5467 | ||
5468 | _ACEOF | |
5469 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5470 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5471 | ||
5472 | else | |
5473 | ac_cv_header_stdc=no | |
5474 | fi | |
5475 | rm -f conftest* | |
5476 | ||
5477 | fi | |
5478 | ||
5479 | if test $ac_cv_header_stdc = yes; then | |
5480 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5482 | /* end confdefs.h. */ | |
5483 | #include <stdlib.h> | |
5484 | ||
5485 | _ACEOF | |
5486 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5487 | $EGREP "free" >/dev/null 2>&1; then : | |
5488 | ||
5489 | else | |
5490 | ac_cv_header_stdc=no | |
5491 | fi | |
5492 | rm -f conftest* | |
5493 | ||
5494 | fi | |
5495 | ||
5496 | if test $ac_cv_header_stdc = yes; then | |
5497 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5498 | if test "$cross_compiling" = yes; then : | |
5499 | : | |
5500 | else | |
5501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5502 | /* end confdefs.h. */ | |
5503 | #include <ctype.h> | |
5504 | #include <stdlib.h> | |
5505 | #if ((' ' & 0x0FF) == 0x020) | |
5506 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5507 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5508 | #else | |
5509 | # define ISLOWER(c) \ | |
5510 | (('a' <= (c) && (c) <= 'i') \ | |
5511 | || ('j' <= (c) && (c) <= 'r') \ | |
5512 | || ('s' <= (c) && (c) <= 'z')) | |
5513 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5514 | #endif | |
5515 | ||
5516 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5517 | int | |
5518 | main () | |
5519 | { | |
5520 | int i; | |
5521 | for (i = 0; i < 256; i++) | |
5522 | if (XOR (islower (i), ISLOWER (i)) | |
5523 | || toupper (i) != TOUPPER (i)) | |
5524 | return 2; | |
5525 | return 0; | |
5526 | } | |
5527 | _ACEOF | |
5528 | if ac_fn_c_try_run "$LINENO"; then : | |
5529 | ||
5530 | else | |
5531 | ac_cv_header_stdc=no | |
5532 | fi | |
5533 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5534 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5535 | fi | |
5536 | ||
5537 | fi | |
5538 | fi | |
5539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5540 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5541 | if test $ac_cv_header_stdc = yes; then | |
5542 | ||
5543 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5544 | ||
5545 | fi | |
5546 | ||
5547 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5548 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5549 | inttypes.h stdint.h unistd.h | |
5550 | do : | |
5551 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5552 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5553 | " | |
d0ac1c44 | 5554 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
c971b7fa PA |
5555 | cat >>confdefs.h <<_ACEOF |
5556 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5557 | _ACEOF | |
5558 | ||
5559 | fi | |
5560 | ||
5561 | done | |
5562 | ||
5563 | ||
5564 | ||
c971b7fa | 5565 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 5566 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
c971b7fa PA |
5567 | MINIX=yes |
5568 | else | |
5569 | MINIX= | |
5570 | fi | |
5571 | ||
5572 | ||
5573 | if test "$MINIX" = yes; then | |
5574 | ||
5575 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5576 | ||
5577 | ||
5578 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5579 | ||
5580 | ||
5581 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5582 | ||
c971b7fa | 5583 | |
4a626d0a | 5584 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
c971b7fa | 5585 | |
4a626d0a | 5586 | fi |
c971b7fa PA |
5587 | |
5588 | ||
5589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5590 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 5591 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
c971b7fa PA |
5592 | $as_echo_n "(cached) " >&6 |
5593 | else | |
5594 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5595 | /* end confdefs.h. */ | |
5596 | ||
5597 | # define __EXTENSIONS__ 1 | |
5598 | $ac_includes_default | |
5599 | int | |
5600 | main () | |
5601 | { | |
5602 | ||
5603 | ; | |
5604 | return 0; | |
5605 | } | |
5606 | _ACEOF | |
5607 | if ac_fn_c_try_compile "$LINENO"; then : | |
5608 | ac_cv_safe_to_define___extensions__=yes | |
5609 | else | |
5610 | ac_cv_safe_to_define___extensions__=no | |
5611 | fi | |
5612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5613 | fi | |
5614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5615 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5616 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5617 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5618 | ||
5619 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5620 | ||
5621 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
5622 | ||
5623 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
5624 | ||
c0c3707f CB |
5625 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
5626 | ||
5627 | $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h | |
5628 | ||
c971b7fa PA |
5629 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
5630 | ||
49e4877c PA |
5631 | $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h |
5632 | ||
5633 | $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h | |
5634 | ||
5635 | $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h | |
5636 | ||
5637 | $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h | |
5638 | ||
5639 | $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h | |
5640 | ||
5641 | $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h | |
5642 | ||
5643 | $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h | |
5644 | ||
c971b7fa PA |
5645 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
5646 | ||
4a626d0a PA |
5647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 |
5648 | $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } | |
d0ac1c44 | 5649 | if ${ac_cv_should_define__xopen_source+:} false; then : |
4a626d0a PA |
5650 | $as_echo_n "(cached) " >&6 |
5651 | else | |
5652 | ac_cv_should_define__xopen_source=no | |
5653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5654 | /* end confdefs.h. */ | |
5655 | ||
5656 | #include <wchar.h> | |
5657 | mbstate_t x; | |
5658 | int | |
5659 | main () | |
5660 | { | |
5661 | ||
5662 | ; | |
5663 | return 0; | |
5664 | } | |
5665 | _ACEOF | |
5666 | if ac_fn_c_try_compile "$LINENO"; then : | |
5667 | ||
5668 | else | |
5669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5670 | /* end confdefs.h. */ | |
5671 | ||
5672 | #define _XOPEN_SOURCE 500 | |
5673 | #include <wchar.h> | |
5674 | mbstate_t x; | |
5675 | int | |
5676 | main () | |
5677 | { | |
5678 | ||
5679 | ; | |
5680 | return 0; | |
5681 | } | |
5682 | _ACEOF | |
5683 | if ac_fn_c_try_compile "$LINENO"; then : | |
5684 | ac_cv_should_define__xopen_source=yes | |
5685 | fi | |
d0ac1c44 SM |
5686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5687 | fi | |
5688 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5689 | fi | |
5690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 | |
5691 | $as_echo "$ac_cv_should_define__xopen_source" >&6; } | |
5692 | test $ac_cv_should_define__xopen_source = yes && | |
5693 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
5694 | ||
c0c3707f CB |
5695 | $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h |
5696 | ||
d0ac1c44 | 5697 | |
c8693053 RO |
5698 | # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included |
5699 | # there. | |
c0c3707f CB |
5700 | ac_aux_dir= |
5701 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
5702 | if test -f "$ac_dir/install-sh"; then | |
5703 | ac_aux_dir=$ac_dir | |
5704 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5705 | break | |
5706 | elif test -f "$ac_dir/install.sh"; then | |
5707 | ac_aux_dir=$ac_dir | |
5708 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5709 | break | |
5710 | elif test -f "$ac_dir/shtool"; then | |
5711 | ac_aux_dir=$ac_dir | |
5712 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5713 | break | |
5714 | fi | |
5715 | done | |
5716 | if test -z "$ac_aux_dir"; then | |
5717 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
5718 | fi | |
5719 | ||
5720 | # These three variables are undocumented and unsupported, | |
5721 | # and are intended to be withdrawn in a future Autoconf release. | |
5722 | # They can cause serious problems if a builder's source tree is in a directory | |
5723 | # whose full name contains unusual characters. | |
5724 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5725 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5726 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5727 | ||
5728 | ||
4a626d0a PA |
5729 | # Make sure we can run config.sub. |
5730 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 5731 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
4a626d0a PA |
5732 | |
5733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
5734 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 5735 | if ${ac_cv_build+:} false; then : |
4a626d0a PA |
5736 | $as_echo_n "(cached) " >&6 |
5737 | else | |
5738 | ac_build_alias=$build_alias | |
5739 | test "x$ac_build_alias" = x && | |
5740 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
5741 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 5742 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
4a626d0a | 5743 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 5744 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
4a626d0a PA |
5745 | |
5746 | fi | |
5747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
5748 | $as_echo "$ac_cv_build" >&6; } | |
5749 | case $ac_cv_build in | |
5750 | *-*-*) ;; | |
d0ac1c44 | 5751 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
4a626d0a PA |
5752 | esac |
5753 | build=$ac_cv_build | |
5754 | ac_save_IFS=$IFS; IFS='-' | |
5755 | set x $ac_cv_build | |
5756 | shift | |
5757 | build_cpu=$1 | |
5758 | build_vendor=$2 | |
5759 | shift; shift | |
5760 | # Remember, the first character of IFS is used to create $*, | |
5761 | # except with old shells: | |
5762 | build_os=$* | |
5763 | IFS=$ac_save_IFS | |
5764 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
5765 | ||
5766 | ||
5767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
5768 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 5769 | if ${ac_cv_host+:} false; then : |
4a626d0a PA |
5770 | $as_echo_n "(cached) " >&6 |
5771 | else | |
5772 | if test "x$host_alias" = x; then | |
5773 | ac_cv_host=$ac_cv_build | |
5774 | else | |
5775 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d0ac1c44 | 5776 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
4a626d0a PA |
5777 | fi |
5778 | ||
5779 | fi | |
5780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
5781 | $as_echo "$ac_cv_host" >&6; } | |
5782 | case $ac_cv_host in | |
5783 | *-*-*) ;; | |
d0ac1c44 | 5784 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
4a626d0a PA |
5785 | esac |
5786 | host=$ac_cv_host | |
5787 | ac_save_IFS=$IFS; IFS='-' | |
5788 | set x $ac_cv_host | |
5789 | shift | |
5790 | host_cpu=$1 | |
5791 | host_vendor=$2 | |
5792 | shift; shift | |
5793 | # Remember, the first character of IFS is used to create $*, | |
5794 | # except with old shells: | |
5795 | host_os=$* | |
5796 | IFS=$ac_save_IFS | |
5797 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
5798 | ||
5799 | ||
c8693053 RO |
5800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
5801 | $as_echo_n "checking target system type... " >&6; } | |
5802 | if ${ac_cv_target+:} false; then : | |
5803 | $as_echo_n "(cached) " >&6 | |
5804 | else | |
5805 | if test "x$target_alias" = x; then | |
5806 | ac_cv_target=$ac_cv_host | |
5807 | else | |
5808 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
5809 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
5810 | fi | |
c971b7fa | 5811 | |
c8693053 RO |
5812 | fi |
5813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
5814 | $as_echo "$ac_cv_target" >&6; } | |
5815 | case $ac_cv_target in | |
5816 | *-*-*) ;; | |
5817 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; | |
5818 | esac | |
5819 | target=$ac_cv_target | |
5820 | ac_save_IFS=$IFS; IFS='-' | |
5821 | set x $ac_cv_target | |
5822 | shift | |
5823 | target_cpu=$1 | |
5824 | target_vendor=$2 | |
5825 | shift; shift | |
5826 | # Remember, the first character of IFS is used to create $*, | |
5827 | # except with old shells: | |
5828 | target_os=$* | |
5829 | IFS=$ac_save_IFS | |
5830 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
c971b7fa | 5831 | |
88b48903 | 5832 | |
c8693053 RO |
5833 | # The aliases save the names the user supplied, while $host etc. |
5834 | # will get canonicalized. | |
5835 | test -n "$target_alias" && | |
5836 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
5837 | NONENONEs,x,x, && | |
5838 | program_prefix=${target_alias}- | |
5839 | ||
5840 | # The tests for host and target for $enable_largefile require | |
5841 | # canonical names. | |
5842 | ||
5843 | ||
5844 | ||
5845 | # As the $enable_largefile decision depends on --enable-plugins we must set it | |
5846 | # even in directories otherwise not depending on the $plugins option. | |
5847 | ||
5848 | ||
5849 | maybe_plugins=no | |
5850 | for ac_header in dlfcn.h | |
5851 | do : | |
5852 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
5853 | " | |
5854 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : | |
5855 | cat >>confdefs.h <<_ACEOF | |
5856 | #define HAVE_DLFCN_H 1 | |
5857 | _ACEOF | |
5858 | maybe_plugins=yes | |
5859 | fi | |
5860 | ||
5861 | done | |
5862 | ||
5863 | for ac_header in windows.h | |
5864 | do : | |
5865 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
5866 | " | |
5867 | if test "x$ac_cv_header_windows_h" = xyes; then : | |
5868 | cat >>confdefs.h <<_ACEOF | |
5869 | #define HAVE_WINDOWS_H 1 | |
5870 | _ACEOF | |
5871 | maybe_plugins=yes | |
5872 | fi | |
5873 | ||
5874 | done | |
5875 | ||
5876 | ||
5877 | # Check whether --enable-plugins was given. | |
5878 | if test "${enable_plugins+set}" = set; then : | |
5879 | enableval=$enable_plugins; case "${enableval}" in | |
5880 | no) plugins=no ;; | |
5881 | *) plugins=yes | |
5882 | if test "$maybe_plugins" != "yes" ; then | |
5883 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
5884 | fi ;; | |
5885 | esac | |
5886 | else | |
5887 | plugins=$maybe_plugins | |
5888 | ||
5889 | fi | |
5890 | ||
5891 | if test "$plugins" = "yes"; then | |
5892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 | |
5893 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
5894 | if ${ac_cv_search_dlsym+:} false; then : | |
5895 | $as_echo_n "(cached) " >&6 | |
5896 | else | |
5897 | ac_func_search_save_LIBS=$LIBS | |
5898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5899 | /* end confdefs.h. */ | |
5900 | ||
5901 | /* Override any GCC internal prototype to avoid an error. | |
5902 | Use char because int might match the return type of a GCC | |
5903 | builtin and then its argument prototype would still apply. */ | |
5904 | #ifdef __cplusplus | |
5905 | extern "C" | |
5906 | #endif | |
5907 | char dlsym (); | |
5908 | int | |
5909 | main () | |
5910 | { | |
5911 | return dlsym (); | |
5912 | ; | |
5913 | return 0; | |
5914 | } | |
5915 | _ACEOF | |
5916 | for ac_lib in '' dl; do | |
5917 | if test -z "$ac_lib"; then | |
5918 | ac_res="none required" | |
5919 | else | |
5920 | ac_res=-l$ac_lib | |
5921 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5922 | fi | |
5923 | if ac_fn_c_try_link "$LINENO"; then : | |
5924 | ac_cv_search_dlsym=$ac_res | |
5925 | fi | |
5926 | rm -f core conftest.err conftest.$ac_objext \ | |
5927 | conftest$ac_exeext | |
5928 | if ${ac_cv_search_dlsym+:} false; then : | |
5929 | break | |
5930 | fi | |
5931 | done | |
5932 | if ${ac_cv_search_dlsym+:} false; then : | |
5933 | ||
5934 | else | |
5935 | ac_cv_search_dlsym=no | |
5936 | fi | |
5937 | rm conftest.$ac_ext | |
5938 | LIBS=$ac_func_search_save_LIBS | |
5939 | fi | |
5940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 | |
5941 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
5942 | ac_res=$ac_cv_search_dlsym | |
5943 | if test "$ac_res" != no; then : | |
5944 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5945 | ||
5946 | fi | |
5947 | ||
5948 | fi | |
5949 | ||
5950 | ||
5951 | case "${host}" in | |
5952 | sparc-*-solaris*|i?86-*-solaris*) | |
5953 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
5954 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
5955 | # the bfd/ elf module cannot provide certain routines such as | |
5956 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
5957 | # explicitly requested large-file support through the | |
5958 | # --enable-largefile switch, disable large-file support in favor of | |
5959 | # procfs support. | |
5960 | # | |
5961 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
5962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5963 | /* end confdefs.h. */ | |
5964 | #define _FILE_OFFSET_BITS 64 | |
5965 | #define _STRUCTURED_PROC 1 | |
5966 | #include <sys/procfs.h> | |
5967 | int | |
5968 | main () | |
5969 | { | |
5970 | ||
5971 | ; | |
5972 | return 0; | |
5973 | } | |
5974 | _ACEOF | |
5975 | if ac_fn_c_try_compile "$LINENO"; then : | |
5976 | acx_cv_procfs_lfs=yes | |
5977 | else | |
5978 | acx_cv_procfs_lfs=no | |
5979 | fi | |
5980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5981 | # | |
5982 | # Forcefully disable large-file support only if necessary, gdb is in | |
5983 | # tree and enabled. | |
5984 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
5985 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
5986 | : ${enable_largefile="no"} | |
5987 | if test "$plugins" = yes; then | |
5988 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
5989 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
5990 | $as_echo "$as_me: WARNING: | |
5991 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
5992 | plugins=no | |
88b48903 | 5993 | fi |
c8693053 RO |
5994 | fi |
5995 | # | |
5996 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
5997 | # benefit of g++ 9+ which predefines it on Solaris. | |
5998 | if test "$enable_largefile" = no; then | |
5999 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
6000 | ||
6001 | fi | |
6002 | ;; | |
6003 | esac | |
88b48903 | 6004 | |
2196f55f YQ |
6005 | # Check whether --enable-largefile was given. |
6006 | if test "${enable_largefile+set}" = set; then : | |
6007 | enableval=$enable_largefile; | |
6008 | fi | |
6009 | ||
6010 | if test "$enable_largefile" != no; then | |
6011 | ||
6012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6013 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 6014 | if ${ac_cv_sys_largefile_CC+:} false; then : |
2196f55f YQ |
6015 | $as_echo_n "(cached) " >&6 |
6016 | else | |
6017 | ac_cv_sys_largefile_CC=no | |
6018 | if test "$GCC" != yes; then | |
6019 | ac_save_CC=$CC | |
6020 | while :; do | |
6021 | # IRIX 6.2 and later do not support large files by default, | |
6022 | # so use the C compiler's -n32 option if that helps. | |
6023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6024 | /* end confdefs.h. */ | |
6025 | #include <sys/types.h> | |
6026 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6027 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6028 | since some C++ compilers masquerading as C compilers | |
6029 | incorrectly reject 9223372036854775807. */ | |
6030 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6031 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6032 | && LARGE_OFF_T % 2147483647 == 1) | |
6033 | ? 1 : -1]; | |
6034 | int | |
6035 | main () | |
6036 | { | |
6037 | ||
6038 | ; | |
6039 | return 0; | |
6040 | } | |
6041 | _ACEOF | |
6042 | if ac_fn_c_try_compile "$LINENO"; then : | |
6043 | break | |
6044 | fi | |
6045 | rm -f core conftest.err conftest.$ac_objext | |
6046 | CC="$CC -n32" | |
6047 | if ac_fn_c_try_compile "$LINENO"; then : | |
6048 | ac_cv_sys_largefile_CC=' -n32'; break | |
6049 | fi | |
6050 | rm -f core conftest.err conftest.$ac_objext | |
6051 | break | |
6052 | done | |
6053 | CC=$ac_save_CC | |
6054 | rm -f conftest.$ac_ext | |
6055 | fi | |
6056 | fi | |
6057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6058 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6059 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6060 | CC=$CC$ac_cv_sys_largefile_CC | |
6061 | fi | |
6062 | ||
6063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6064 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 6065 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
2196f55f YQ |
6066 | $as_echo_n "(cached) " >&6 |
6067 | else | |
6068 | while :; do | |
6069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6070 | /* end confdefs.h. */ | |
6071 | #include <sys/types.h> | |
6072 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6073 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6074 | since some C++ compilers masquerading as C compilers | |
6075 | incorrectly reject 9223372036854775807. */ | |
6076 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6077 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6078 | && LARGE_OFF_T % 2147483647 == 1) | |
6079 | ? 1 : -1]; | |
6080 | int | |
6081 | main () | |
6082 | { | |
6083 | ||
6084 | ; | |
6085 | return 0; | |
6086 | } | |
6087 | _ACEOF | |
6088 | if ac_fn_c_try_compile "$LINENO"; then : | |
6089 | ac_cv_sys_file_offset_bits=no; break | |
6090 | fi | |
6091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6093 | /* end confdefs.h. */ | |
6094 | #define _FILE_OFFSET_BITS 64 | |
6095 | #include <sys/types.h> | |
6096 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6097 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6098 | since some C++ compilers masquerading as C compilers | |
6099 | incorrectly reject 9223372036854775807. */ | |
6100 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6101 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6102 | && LARGE_OFF_T % 2147483647 == 1) | |
6103 | ? 1 : -1]; | |
6104 | int | |
6105 | main () | |
6106 | { | |
6107 | ||
6108 | ; | |
6109 | return 0; | |
6110 | } | |
6111 | _ACEOF | |
6112 | if ac_fn_c_try_compile "$LINENO"; then : | |
6113 | ac_cv_sys_file_offset_bits=64; break | |
6114 | fi | |
6115 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6116 | ac_cv_sys_file_offset_bits=unknown | |
6117 | break | |
6118 | done | |
6119 | fi | |
6120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6121 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6122 | case $ac_cv_sys_file_offset_bits in #( | |
6123 | no | unknown) ;; | |
6124 | *) | |
6125 | cat >>confdefs.h <<_ACEOF | |
6126 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6127 | _ACEOF | |
6128 | ;; | |
6129 | esac | |
6130 | rm -rf conftest* | |
6131 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6133 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 6134 | if ${ac_cv_sys_large_files+:} false; then : |
2196f55f YQ |
6135 | $as_echo_n "(cached) " >&6 |
6136 | else | |
6137 | while :; do | |
6138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6139 | /* end confdefs.h. */ | |
6140 | #include <sys/types.h> | |
6141 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6142 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6143 | since some C++ compilers masquerading as C compilers | |
6144 | incorrectly reject 9223372036854775807. */ | |
6145 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6146 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6147 | && LARGE_OFF_T % 2147483647 == 1) | |
6148 | ? 1 : -1]; | |
6149 | int | |
6150 | main () | |
6151 | { | |
6152 | ||
6153 | ; | |
6154 | return 0; | |
6155 | } | |
6156 | _ACEOF | |
6157 | if ac_fn_c_try_compile "$LINENO"; then : | |
6158 | ac_cv_sys_large_files=no; break | |
6159 | fi | |
6160 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6162 | /* end confdefs.h. */ | |
6163 | #define _LARGE_FILES 1 | |
6164 | #include <sys/types.h> | |
6165 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6166 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6167 | since some C++ compilers masquerading as C compilers | |
6168 | incorrectly reject 9223372036854775807. */ | |
6169 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6170 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6171 | && LARGE_OFF_T % 2147483647 == 1) | |
6172 | ? 1 : -1]; | |
6173 | int | |
6174 | main () | |
6175 | { | |
6176 | ||
6177 | ; | |
6178 | return 0; | |
6179 | } | |
6180 | _ACEOF | |
6181 | if ac_fn_c_try_compile "$LINENO"; then : | |
6182 | ac_cv_sys_large_files=1; break | |
6183 | fi | |
6184 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6185 | ac_cv_sys_large_files=unknown | |
6186 | break | |
6187 | done | |
6188 | fi | |
6189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
6190 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6191 | case $ac_cv_sys_large_files in #( | |
6192 | no | unknown) ;; | |
6193 | *) | |
6194 | cat >>confdefs.h <<_ACEOF | |
6195 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6196 | _ACEOF | |
6197 | ;; | |
6198 | esac | |
6199 | rm -rf conftest* | |
6200 | fi | |
2196f55f YQ |
6201 | fi |
6202 | ||
88b48903 WN |
6203 | |
6204 | ||
5abebf3c CB |
6205 | |
6206 | ||
6207 | ||
c0c3707f | 6208 | |
5abebf3c | 6209 | |
5abebf3c | 6210 | |
c0c3707f CB |
6211 | |
6212 | ||
c8693053 RO |
6213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 |
6214 | $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } | |
6215 | if ${gl_cv_c_amsterdam_compiler+:} false; then : | |
6216 | $as_echo_n "(cached) " >&6 | |
6217 | else | |
c0c3707f | 6218 | |
c8693053 RO |
6219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6220 | /* end confdefs.h. */ | |
5abebf3c | 6221 | |
c8693053 RO |
6222 | #ifdef __ACK__ |
6223 | Amsterdam | |
6224 | #endif | |
5abebf3c | 6225 | |
c8693053 RO |
6226 | _ACEOF |
6227 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6228 | $EGREP "Amsterdam" >/dev/null 2>&1; then : | |
6229 | gl_cv_c_amsterdam_compiler=yes | |
6230 | else | |
6231 | gl_cv_c_amsterdam_compiler=no | |
6232 | fi | |
6233 | rm -f conftest* | |
5abebf3c CB |
6234 | |
6235 | ||
c8693053 RO |
6236 | fi |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 | |
6238 | $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } | |
5abebf3c | 6239 | |
c8693053 RO |
6240 | if test $gl_cv_c_amsterdam_compiler = yes; then |
6241 | if test -z "$AR"; then | |
6242 | AR='cc -c.a' | |
6243 | fi | |
6244 | if test -z "$ARFLAGS"; then | |
6245 | ARFLAGS='-o' | |
6246 | fi | |
6247 | else | |
6248 | : | |
6249 | fi | |
c971b7fa | 6250 | |
c8693053 RO |
6251 | if test -n "$ac_tool_prefix"; then |
6252 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6253 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
6254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6255 | $as_echo_n "checking for $ac_word... " >&6; } | |
6256 | if ${ac_cv_prog_AR+:} false; then : | |
6257 | $as_echo_n "(cached) " >&6 | |
6258 | else | |
6259 | if test -n "$AR"; then | |
6260 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6261 | else | |
6262 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6263 | for as_dir in $PATH | |
6264 | do | |
6265 | IFS=$as_save_IFS | |
6266 | test -z "$as_dir" && as_dir=. | |
6267 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6268 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6269 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
6270 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6271 | break 2 | |
6272 | fi | |
6273 | done | |
6274 | done | |
6275 | IFS=$as_save_IFS | |
c971b7fa | 6276 | |
c8693053 RO |
6277 | fi |
6278 | fi | |
6279 | AR=$ac_cv_prog_AR | |
6280 | if test -n "$AR"; then | |
6281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
6282 | $as_echo "$AR" >&6; } | |
6283 | else | |
6284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6285 | $as_echo "no" >&6; } | |
6286 | fi | |
c971b7fa | 6287 | |
c971b7fa | 6288 | |
c8693053 RO |
6289 | fi |
6290 | if test -z "$ac_cv_prog_AR"; then | |
6291 | ac_ct_AR=$AR | |
6292 | # Extract the first word of "ar", so it can be a program name with args. | |
6293 | set dummy ar; ac_word=$2 | |
6294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6295 | $as_echo_n "checking for $ac_word... " >&6; } | |
6296 | if ${ac_cv_prog_ac_ct_AR+:} false; then : | |
c971b7fa PA |
6297 | $as_echo_n "(cached) " >&6 |
6298 | else | |
c8693053 RO |
6299 | if test -n "$ac_ct_AR"; then |
6300 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5e8754f9 | 6301 | else |
c8693053 RO |
6302 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
6303 | for as_dir in $PATH | |
6304 | do | |
6305 | IFS=$as_save_IFS | |
6306 | test -z "$as_dir" && as_dir=. | |
6307 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6308 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6309 | ac_cv_prog_ac_ct_AR="ar" | |
6310 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6311 | break 2 | |
6312 | fi | |
6313 | done | |
6314 | done | |
6315 | IFS=$as_save_IFS | |
7a6dbc2f | 6316 | |
c971b7fa | 6317 | fi |
c8693053 RO |
6318 | fi |
6319 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6320 | if test -n "$ac_ct_AR"; then | |
6321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
6322 | $as_echo "$ac_ct_AR" >&6; } | |
6323 | else | |
6324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6325 | $as_echo "no" >&6; } | |
6326 | fi | |
5e8754f9 | 6327 | |
c8693053 RO |
6328 | if test "x$ac_ct_AR" = x; then |
6329 | AR="ar" | |
6330 | else | |
6331 | case $cross_compiling:$ac_tool_warned in | |
6332 | yes:) | |
6333 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6334 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6335 | ac_tool_warned=yes ;; | |
6336 | esac | |
6337 | AR=$ac_ct_AR | |
6338 | fi | |
6339 | else | |
6340 | AR="$ac_cv_prog_AR" | |
6341 | fi | |
c0c3707f | 6342 | |
c8693053 RO |
6343 | if test -z "$ARFLAGS"; then |
6344 | ARFLAGS='cr' | |
6345 | fi | |
7a6dbc2f | 6346 | |
7a6dbc2f | 6347 | |
c0c3707f | 6348 | |
c8693053 RO |
6349 | if test -z "$RANLIB"; then |
6350 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6351 | RANLIB=':' | |
6352 | else | |
6353 | if test -n "$ac_tool_prefix"; then | |
6354 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6355 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6357 | $as_echo_n "checking for $ac_word... " >&6; } | |
6358 | if ${ac_cv_prog_RANLIB+:} false; then : | |
6359 | $as_echo_n "(cached) " >&6 | |
6360 | else | |
6361 | if test -n "$RANLIB"; then | |
6362 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6363 | else | |
6364 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6365 | for as_dir in $PATH | |
6366 | do | |
6367 | IFS=$as_save_IFS | |
6368 | test -z "$as_dir" && as_dir=. | |
6369 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6370 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6371 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6372 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6373 | break 2 | |
6374 | fi | |
5e8754f9 | 6375 | done |
c8693053 RO |
6376 | done |
6377 | IFS=$as_save_IFS | |
5e8754f9 | 6378 | |
c971b7fa | 6379 | fi |
c8693053 RO |
6380 | fi |
6381 | RANLIB=$ac_cv_prog_RANLIB | |
6382 | if test -n "$RANLIB"; then | |
6383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6384 | $as_echo "$RANLIB" >&6; } | |
c0c3707f | 6385 | else |
c8693053 RO |
6386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6387 | $as_echo "no" >&6; } | |
5e8754f9 | 6388 | fi |
c0c3707f | 6389 | |
c8693053 RO |
6390 | |
6391 | fi | |
6392 | if test -z "$ac_cv_prog_RANLIB"; then | |
6393 | ac_ct_RANLIB=$RANLIB | |
6394 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6395 | set dummy ranlib; ac_word=$2 | |
6396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6397 | $as_echo_n "checking for $ac_word... " >&6; } | |
6398 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : | |
c971b7fa PA |
6399 | $as_echo_n "(cached) " >&6 |
6400 | else | |
c8693053 RO |
6401 | if test -n "$ac_ct_RANLIB"; then |
6402 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6403 | else | |
6404 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6405 | for as_dir in $PATH | |
6406 | do | |
6407 | IFS=$as_save_IFS | |
6408 | test -z "$as_dir" && as_dir=. | |
6409 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6410 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6411 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6412 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6413 | break 2 | |
5e8754f9 SDJ |
6414 | fi |
6415 | done | |
c8693053 RO |
6416 | done |
6417 | IFS=$as_save_IFS | |
5e8754f9 SDJ |
6418 | |
6419 | fi | |
6420 | fi | |
c8693053 RO |
6421 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
6422 | if test -n "$ac_ct_RANLIB"; then | |
6423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6424 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6425 | else | |
6426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6427 | $as_echo "no" >&6; } | |
6428 | fi | |
c0c3707f | 6429 | |
c8693053 RO |
6430 | if test "x$ac_ct_RANLIB" = x; then |
6431 | RANLIB=":" | |
6432 | else | |
6433 | case $cross_compiling:$ac_tool_warned in | |
6434 | yes:) | |
6435 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6436 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6437 | ac_tool_warned=yes ;; | |
6438 | esac | |
6439 | RANLIB=$ac_ct_RANLIB | |
6440 | fi | |
6441 | else | |
6442 | RANLIB="$ac_cv_prog_RANLIB" | |
5e8754f9 SDJ |
6443 | fi |
6444 | ||
c8693053 | 6445 | fi |
c0c3707f | 6446 | fi |
5e8754f9 | 6447 | |
5e8754f9 | 6448 | |
5e8754f9 | 6449 | |
5e8754f9 SDJ |
6450 | |
6451 | ||
5e8754f9 | 6452 | |
c8693053 RO |
6453 | # IEEE behaviour is the default on all CPUs except Alpha and SH |
6454 | # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 | |
6455 | # and the GCC 4.1.2 manual). | |
6456 | case "$host_cpu" in | |
6457 | alpha*) | |
6458 | # On Alpha systems, a compiler option provides the behaviour. | |
6459 | # See the ieee(3) manual page, also available at | |
6460 | # <https://backdrift.org/man/tru64/man3/ieee.3.html> | |
6461 | if test -n "$GCC"; then | |
6462 | # GCC has the option -mieee. | |
6463 | # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. | |
6464 | CPPFLAGS="$CPPFLAGS -mieee" | |
6465 | else | |
6466 | # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. | |
6467 | # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. | |
6468 | CPPFLAGS="$CPPFLAGS -ieee" | |
6469 | fi | |
6470 | ;; | |
6471 | sh*) | |
6472 | if test -n "$GCC"; then | |
6473 | # GCC has the option -mieee. | |
6474 | CPPFLAGS="$CPPFLAGS -mieee" | |
6475 | fi | |
6476 | ;; | |
6477 | esac | |
c0c3707f | 6478 | |
c971b7fa | 6479 | |
c971b7fa | 6480 | |
c8693053 RO |
6481 | |
6482 | ||
6483 | ||
6484 | ||
6485 | # Check whether --enable-threads was given. | |
6486 | if test "${enable_threads+set}" = set; then : | |
6487 | enableval=$enable_threads; gl_use_threads=$enableval | |
5e8754f9 | 6488 | else |
c8693053 RO |
6489 | if test -n "$gl_use_threads_default"; then |
6490 | gl_use_threads="$gl_use_threads_default" | |
6491 | else | |
6492 | case "$host_os" in | |
6493 | osf*) gl_use_threads=no ;; | |
6494 | cygwin*) | |
6495 | case `uname -r` in | |
6496 | 1.[0-5].*) gl_use_threads=no ;; | |
6497 | *) gl_use_threads=yes ;; | |
6498 | esac | |
6499 | ;; | |
6500 | mingw*) | |
6501 | case "$gl_use_winpthreads_default" in | |
6502 | yes) gl_use_threads=posix ;; | |
6503 | no) gl_use_threads=windows ;; | |
6504 | *) gl_use_threads=yes ;; | |
6505 | esac | |
6506 | ;; | |
6507 | *) gl_use_threads=yes ;; | |
6508 | esac | |
6509 | fi | |
c971b7fa | 6510 | |
5e8754f9 | 6511 | fi |
c0c3707f | 6512 | |
c8693053 RO |
6513 | if test "$gl_use_threads" = yes \ |
6514 | || test "$gl_use_threads" = isoc \ | |
6515 | || test "$gl_use_threads" = posix \ | |
6516 | || test "$gl_use_threads" = isoc+posix; then | |
6517 | # For using <threads.h> or <pthread.h>: | |
6518 | ||
6519 | ||
6520 | if test -z "$gl_anythreadlib_early_done"; then | |
6521 | case "$host_os" in | |
6522 | osf*) | |
6523 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | |
6524 | # groks <pthread.h>. cc also understands the flag -pthread, but | |
6525 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | |
6526 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | |
6527 | # causes the AC_LINK_IFELSE test below to succeed unexpectedly, | |
6528 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | |
6529 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | |
6530 | ;; | |
6531 | esac | |
6532 | # Some systems optimize for single-threaded programs by default, and | |
6533 | # need special flags to disable these optimizations. For example, the | |
6534 | # definition of 'errno' in <errno.h>. | |
6535 | case "$host_os" in | |
6536 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | |
6537 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | |
6538 | esac | |
6539 | gl_anythreadlib_early_done=done | |
5e8754f9 | 6540 | fi |
c0c3707f | 6541 | |
c8693053 | 6542 | fi |
c0c3707f | 6543 | |
c0c3707f | 6544 | |
c971b7fa | 6545 | |
c8693053 RO |
6546 | # Pre-early section. |
6547 | ||
6548 | ||
6549 | ||
6550 | ||
6551 | # Code from module absolute-header: | |
6552 | # Code from module alloca: | |
6553 | # Code from module alloca-opt: | |
6554 | # Code from module arpa_inet: | |
6555 | # Code from module assure: | |
6556 | # Code from module at-internal: | |
698be2d8 CB |
6557 | # Code from module attribute: |
6558 | # Code from module btowc: | |
c8693053 RO |
6559 | # Code from module builtin-expect: |
6560 | # Code from module c99: | |
6561 | # Code from module canonicalize-lgpl: | |
6562 | # Code from module chdir: | |
6563 | # Code from module chdir-long: | |
6564 | # Code from module cloexec: | |
6565 | # Code from module close: | |
6566 | # Code from module closedir: | |
6567 | # Code from module count-one-bits: | |
698be2d8 | 6568 | # Code from module ctype: |
c8693053 RO |
6569 | # Code from module d-ino: |
6570 | # Code from module d-type: | |
6571 | # Code from module dirent: | |
6572 | # Code from module dirfd: | |
6573 | # Code from module dirname-lgpl: | |
c8693053 RO |
6574 | # Code from module double-slash-root: |
6575 | # Code from module dup: | |
6576 | # Code from module dup2: | |
6577 | # Code from module environ: | |
6578 | # Code from module errno: | |
6579 | # Code from module error: | |
6580 | # Code from module exitfail: | |
6581 | # Code from module extensions: | |
6582 | # Code from module extern-inline: | |
6583 | # Code from module fchdir: | |
6584 | # Code from module fcntl: | |
6585 | # Code from module fcntl-h: | |
6586 | # Code from module fd-hook: | |
6587 | # Code from module fd-safer-flag: | |
6588 | # Code from module fdopendir: | |
6589 | # Code from module filename: | |
6590 | # Code from module filenamecat-lgpl: | |
6591 | # Code from module flexmember: | |
6592 | # Code from module float: | |
6593 | # Code from module fnmatch: | |
6594 | # Code from module fnmatch-gnu: | |
6595 | # Code from module fnmatch-h: | |
6596 | # Code from module fpieee: | |
6597 | ||
6598 | # Code from module fpucw: | |
6599 | # Code from module frexp: | |
6600 | # Code from module frexpl: | |
6601 | # Code from module fstat: | |
6602 | # Code from module fstatat: | |
6603 | # Code from module getcwd: | |
6604 | # Code from module getcwd-lgpl: | |
6605 | # Code from module getdtablesize: | |
6606 | # Code from module getlogin_r: | |
6607 | # Code from module getprogname: | |
698be2d8 | 6608 | # Code from module getrandom: |
c8693053 RO |
6609 | # Code from module gettext-h: |
6610 | # Code from module gettimeofday: | |
6611 | # Code from module glob: | |
6612 | # Code from module glob-h: | |
6613 | # Code from module hard-locale: | |
6614 | # Code from module include_next: | |
6615 | # Code from module inet_ntop: | |
6616 | # Code from module intprops: | |
6617 | # Code from module inttypes: | |
6618 | # Code from module inttypes-incomplete: | |
698be2d8 | 6619 | # Code from module isblank: |
c8693053 RO |
6620 | # Code from module isnand-nolibm: |
6621 | # Code from module isnanl-nolibm: | |
6622 | # Code from module largefile: | |
6623 | ||
6624 | # Code from module libc-config: | |
6625 | # Code from module limits-h: | |
6626 | # Code from module localcharset: | |
6627 | # Code from module locale: | |
6628 | # Code from module localtime-buffer: | |
6629 | # Code from module lock: | |
6630 | # Code from module lstat: | |
6631 | # Code from module malloc-posix: | |
6632 | # Code from module malloca: | |
6633 | # Code from module math: | |
6634 | # Code from module mbrtowc: | |
6635 | # Code from module mbsinit: | |
6636 | # Code from module mbsrtowcs: | |
698be2d8 | 6637 | # Code from module mbtowc: |
c8693053 RO |
6638 | # Code from module memchr: |
6639 | # Code from module memmem: | |
6640 | # Code from module memmem-simple: | |
6641 | # Code from module mempcpy: | |
6642 | # Code from module memrchr: | |
698be2d8 | 6643 | # Code from module minmax: |
c8693053 RO |
6644 | # Code from module mkdir: |
6645 | # Code from module mkdtemp: | |
6646 | # Code from module mkostemp: | |
6647 | # Code from module msvc-inval: | |
6648 | # Code from module msvc-nothrow: | |
6649 | # Code from module multiarch: | |
6650 | # Code from module netinet_in: | |
6651 | # Code from module nocrash: | |
6652 | # Code from module open: | |
6653 | # Code from module openat: | |
6654 | # Code from module openat-die: | |
6655 | # Code from module openat-h: | |
6656 | # Code from module opendir: | |
6657 | # Code from module pathmax: | |
6658 | # Code from module rawmemchr: | |
6659 | # Code from module readdir: | |
6660 | # Code from module readlink: | |
6661 | # Code from module realloc-posix: | |
6662 | # Code from module rename: | |
6663 | # Code from module rewinddir: | |
6664 | # Code from module rmdir: | |
6665 | # Code from module same-inode: | |
6666 | # Code from module save-cwd: | |
6667 | # Code from module scratch_buffer: | |
6668 | # Code from module setenv: | |
6669 | # Code from module setlocale-null: | |
6670 | # Code from module signal-h: | |
6671 | # Code from module snippet/_Noreturn: | |
6672 | # Code from module snippet/arg-nonnull: | |
6673 | # Code from module snippet/c++defs: | |
6674 | # Code from module snippet/warn-on-use: | |
6675 | # Code from module socklen: | |
6676 | # Code from module ssize_t: | |
6677 | # Code from module stat: | |
6678 | # Code from module stat-time: | |
6679 | # Code from module std-gnu11: | |
6680 | # Code from module stdalign: | |
6681 | # Code from module stdbool: | |
6682 | # Code from module stddef: | |
6683 | # Code from module stdint: | |
6684 | # Code from module stdio: | |
6685 | # Code from module stdlib: | |
6686 | # Code from module strchrnul: | |
6687 | # Code from module strdup-posix: | |
6688 | # Code from module streq: | |
6689 | # Code from module strerror: | |
6690 | # Code from module strerror-override: | |
6691 | # Code from module strerror_r-posix: | |
6692 | # Code from module string: | |
698be2d8 | 6693 | # Code from module strnlen: |
c8693053 RO |
6694 | # Code from module strnlen1: |
6695 | # Code from module strstr: | |
6696 | # Code from module strstr-simple: | |
6697 | # Code from module strtok_r: | |
698be2d8 | 6698 | # Code from module sys_random: |
c8693053 RO |
6699 | # Code from module sys_socket: |
6700 | # Code from module sys_stat: | |
6701 | # Code from module sys_time: | |
6702 | # Code from module sys_types: | |
6703 | # Code from module sys_uio: | |
6704 | # Code from module tempname: | |
6705 | # Code from module threadlib: | |
6706 | ||
6707 | ||
6708 | ||
6709 | # Code from module time: | |
6710 | # Code from module time_r: | |
6711 | # Code from module unistd: | |
6712 | # Code from module unistd-safer: | |
6713 | # Code from module unsetenv: | |
6714 | # Code from module update-copyright: | |
6715 | # Code from module verify: | |
6716 | # Code from module wchar: | |
6717 | # Code from module wctype-h: | |
6718 | # Code from module windows-mutex: | |
6719 | # Code from module windows-once: | |
6720 | # Code from module windows-recmutex: | |
6721 | # Code from module windows-rwlock: | |
698be2d8 CB |
6722 | # Code from module wmemchr: |
6723 | # Code from module wmempcpy: | |
c8693053 RO |
6724 | # Code from module xalloc-oversized: |
6725 | ||
6726 | ||
6727 | am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc | |
c971b7fa PA |
6728 | |
6729 | ||
c0c3707f CB |
6730 | ac_aux_dir= |
6731 | for ac_dir in .. "$srcdir"/..; do | |
6732 | if test -f "$ac_dir/install-sh"; then | |
6733 | ac_aux_dir=$ac_dir | |
6734 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
6735 | break | |
6736 | elif test -f "$ac_dir/install.sh"; then | |
6737 | ac_aux_dir=$ac_dir | |
6738 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
6739 | break | |
6740 | elif test -f "$ac_dir/shtool"; then | |
6741 | ac_aux_dir=$ac_dir | |
6742 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
6743 | break | |
6744 | fi | |
6745 | done | |
6746 | if test -z "$ac_aux_dir"; then | |
6747 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 | |
6748 | fi | |
6749 | ||
6750 | # These three variables are undocumented and unsupported, | |
6751 | # and are intended to be withdrawn in a future Autoconf release. | |
6752 | # They can cause serious problems if a builder's source tree is in a directory | |
6753 | # whose full name contains unusual characters. | |
6754 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
6755 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
6756 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
6757 | ||
6758 | ||
6759 | ||
6760 | ||
6761 | ||
6762 | ||
6763 | ||
6764 | ||
6765 | ||
6766 | ||
698be2d8 | 6767 | |
c0c3707f CB |
6768 | # Check whether --enable-cross-guesses was given. |
6769 | if test "${enable_cross_guesses+set}" = set; then : | |
6770 | enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then | |
6771 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5 | |
6772 | $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;} | |
6773 | enableval=conservative | |
6774 | fi | |
6775 | gl_cross_guesses="$enableval" | |
6776 | else | |
6777 | gl_cross_guesses=conservative | |
6778 | fi | |
6779 | ||
6780 | if test $gl_cross_guesses = risky; then | |
6781 | gl_cross_guess_normal="guessing yes" | |
6782 | gl_cross_guess_inverted="guessing no" | |
6783 | else | |
6784 | gl_cross_guess_normal="guessing no" | |
6785 | gl_cross_guess_inverted="guessing yes" | |
6786 | fi | |
6787 | LIBC_FATAL_STDERR_=1 | |
6788 | export LIBC_FATAL_STDERR_ | |
6789 | ||
5df4cba6 | 6790 | |
c0c3707f CB |
6791 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6792 | if test "x$ac_cv_type_size_t" = xyes; then : | |
6793 | ||
6794 | else | |
6795 | ||
6796 | cat >>confdefs.h <<_ACEOF | |
6797 | #define size_t unsigned int | |
6798 | _ACEOF | |
6799 | ||
6800 | fi | |
6801 | ||
6802 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6803 | # for constant arguments. Useless! | |
6804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
6805 | $as_echo_n "checking for working alloca.h... " >&6; } | |
6806 | if ${ac_cv_working_alloca_h+:} false; then : | |
6807 | $as_echo_n "(cached) " >&6 | |
6808 | else | |
6809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6810 | /* end confdefs.h. */ | |
6811 | #include <alloca.h> | |
5e8754f9 SDJ |
6812 | int |
6813 | main () | |
6814 | { | |
c0c3707f CB |
6815 | char *p = (char *) alloca (2 * sizeof (int)); |
6816 | if (p) return 0; | |
5e8754f9 SDJ |
6817 | ; |
6818 | return 0; | |
6819 | } | |
6820 | _ACEOF | |
c0c3707f CB |
6821 | if ac_fn_c_try_link "$LINENO"; then : |
6822 | ac_cv_working_alloca_h=yes | |
6823 | else | |
6824 | ac_cv_working_alloca_h=no | |
5e8754f9 | 6825 | fi |
c0c3707f CB |
6826 | rm -f core conftest.err conftest.$ac_objext \ |
6827 | conftest$ac_exeext conftest.$ac_ext | |
5e8754f9 | 6828 | fi |
c0c3707f CB |
6829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
6830 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
6831 | if test $ac_cv_working_alloca_h = yes; then | |
c971b7fa | 6832 | |
c0c3707f | 6833 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c971b7fa | 6834 | |
c0c3707f | 6835 | fi |
d0ac1c44 | 6836 | |
c0c3707f CB |
6837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
6838 | $as_echo_n "checking for alloca... " >&6; } | |
6839 | if ${ac_cv_func_alloca_works+:} false; then : | |
5e8754f9 SDJ |
6840 | $as_echo_n "(cached) " >&6 |
6841 | else | |
6842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6843 | /* end confdefs.h. */ | |
c0c3707f CB |
6844 | #ifdef __GNUC__ |
6845 | # define alloca __builtin_alloca | |
6846 | #else | |
6847 | # ifdef _MSC_VER | |
6848 | # include <malloc.h> | |
6849 | # define alloca _alloca | |
6850 | # else | |
6851 | # ifdef HAVE_ALLOCA_H | |
6852 | # include <alloca.h> | |
6853 | # else | |
6854 | # ifdef _AIX | |
6855 | #pragma alloca | |
6856 | # else | |
6857 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
6858 | void *alloca (size_t); | |
6859 | # endif | |
6860 | # endif | |
6861 | # endif | |
6862 | # endif | |
6863 | #endif | |
d0ac1c44 | 6864 | |
5e8754f9 SDJ |
6865 | int |
6866 | main () | |
6867 | { | |
c0c3707f CB |
6868 | char *p = (char *) alloca (1); |
6869 | if (p) return 0; | |
5e8754f9 SDJ |
6870 | ; |
6871 | return 0; | |
6872 | } | |
6873 | _ACEOF | |
c0c3707f CB |
6874 | if ac_fn_c_try_link "$LINENO"; then : |
6875 | ac_cv_func_alloca_works=yes | |
6876 | else | |
6877 | ac_cv_func_alloca_works=no | |
5e8754f9 | 6878 | fi |
c0c3707f CB |
6879 | rm -f core conftest.err conftest.$ac_objext \ |
6880 | conftest$ac_exeext conftest.$ac_ext | |
6881 | fi | |
6882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
6883 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
7a6dbc2f | 6884 | |
c0c3707f | 6885 | if test $ac_cv_func_alloca_works = yes; then |
7a6dbc2f | 6886 | |
c0c3707f | 6887 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
7a6dbc2f | 6888 | |
5e8754f9 | 6889 | else |
c0c3707f CB |
6890 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
6891 | # that cause trouble. Some versions do not even contain alloca or | |
6892 | # contain a buggy version. If you still want to use their alloca, | |
6893 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
c971b7fa PA |
6894 | |
6895 | ||
7a6dbc2f | 6896 | |
73cc7272 TT |
6897 | |
6898 | ||
c0c3707f | 6899 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
73cc7272 | 6900 | |
c0c3707f | 6901 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
73cc7272 TT |
6902 | |
6903 | ||
c0c3707f CB |
6904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
6905 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
6906 | if ${ac_cv_os_cray+:} false; then : | |
6907 | $as_echo_n "(cached) " >&6 | |
6908 | else | |
6909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6910 | /* end confdefs.h. */ | |
6911 | #if defined CRAY && ! defined CRAY2 | |
6912 | webecray | |
6913 | #else | |
6914 | wenotbecray | |
6915 | #endif | |
73cc7272 | 6916 | |
73cc7272 | 6917 | _ACEOF |
c0c3707f CB |
6918 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
6919 | $EGREP "webecray" >/dev/null 2>&1; then : | |
6920 | ac_cv_os_cray=yes | |
6921 | else | |
6922 | ac_cv_os_cray=no | |
73cc7272 | 6923 | fi |
c0c3707f | 6924 | rm -f conftest* |
73cc7272 | 6925 | |
c0c3707f CB |
6926 | fi |
6927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
6928 | $as_echo "$ac_cv_os_cray" >&6; } | |
6929 | if test $ac_cv_os_cray = yes; then | |
6930 | for ac_func in _getb67 GETB67 getb67; do | |
6931 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6932 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6933 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
73cc7272 | 6934 | |
c0c3707f CB |
6935 | cat >>confdefs.h <<_ACEOF |
6936 | #define CRAY_STACKSEG_END $ac_func | |
6937 | _ACEOF | |
73cc7272 | 6938 | |
c0c3707f CB |
6939 | break |
6940 | fi | |
73cc7272 | 6941 | |
c0c3707f | 6942 | done |
73cc7272 TT |
6943 | fi |
6944 | ||
c0c3707f CB |
6945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
6946 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
6947 | if ${ac_cv_c_stack_direction+:} false; then : | |
73cc7272 TT |
6948 | $as_echo_n "(cached) " >&6 |
6949 | else | |
c0c3707f CB |
6950 | if test "$cross_compiling" = yes; then : |
6951 | ac_cv_c_stack_direction=0 | |
6952 | else | |
6953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
73cc7272 | 6954 | /* end confdefs.h. */ |
c0c3707f CB |
6955 | $ac_includes_default |
6956 | int | |
6957 | find_stack_direction (int *addr, int depth) | |
6958 | { | |
6959 | int dir, dummy = 0; | |
6960 | if (! addr) | |
6961 | addr = &dummy; | |
6962 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
6963 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
6964 | return dir + dummy; | |
6965 | } | |
73cc7272 | 6966 | |
73cc7272 | 6967 | int |
c0c3707f | 6968 | main (int argc, char **argv) |
73cc7272 | 6969 | { |
c0c3707f | 6970 | return find_stack_direction (0, argc + !argv + 20) < 0; |
73cc7272 TT |
6971 | } |
6972 | _ACEOF | |
c0c3707f CB |
6973 | if ac_fn_c_try_run "$LINENO"; then : |
6974 | ac_cv_c_stack_direction=1 | |
6975 | else | |
6976 | ac_cv_c_stack_direction=-1 | |
73cc7272 | 6977 | fi |
c0c3707f CB |
6978 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6979 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
73cc7272 | 6980 | fi |
73cc7272 | 6981 | |
73cc7272 | 6982 | fi |
c0c3707f CB |
6983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
6984 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
6985 | cat >>confdefs.h <<_ACEOF | |
6986 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6987 | _ACEOF | |
6988 | ||
73cc7272 TT |
6989 | |
6990 | fi | |
6991 | ||
73cc7272 | 6992 | |
c0c3707f CB |
6993 | GNULIB_INET_NTOP=0; |
6994 | GNULIB_INET_PTON=0; | |
6995 | HAVE_DECL_INET_NTOP=1; | |
6996 | HAVE_DECL_INET_PTON=1; | |
6997 | REPLACE_INET_NTOP=0; | |
6998 | REPLACE_INET_PTON=0; | |
73cc7272 | 6999 | |
73cc7272 | 7000 | |
c0c3707f CB |
7001 | |
7002 | ||
7003 | for ac_header in $ac_header_list | |
7004 | do : | |
7005 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7006 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
7007 | " | |
7008 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7009 | cat >>confdefs.h <<_ACEOF | |
7010 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7011 | _ACEOF | |
7012 | ||
73cc7272 TT |
7013 | fi |
7014 | ||
c0c3707f | 7015 | done |
73cc7272 | 7016 | |
c0c3707f CB |
7017 | |
7018 | ||
7019 | ||
7020 | ||
7021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
7022 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
7023 | if ${gl_cv_have_include_next+:} false; then : | |
73cc7272 TT |
7024 | $as_echo_n "(cached) " >&6 |
7025 | else | |
c0c3707f CB |
7026 | rm -rf conftestd1a conftestd1b conftestd2 |
7027 | mkdir conftestd1a conftestd1b conftestd2 | |
7028 | cat <<EOF > conftestd1a/conftest.h | |
7029 | #define DEFINED_IN_CONFTESTD1 | |
7030 | #include_next <conftest.h> | |
7031 | #ifdef DEFINED_IN_CONFTESTD2 | |
7032 | int foo; | |
7033 | #else | |
7034 | #error "include_next doesn't work" | |
7035 | #endif | |
7036 | EOF | |
7037 | cat <<EOF > conftestd1b/conftest.h | |
7038 | #define DEFINED_IN_CONFTESTD1 | |
7039 | #include <stdio.h> | |
7040 | #include_next <conftest.h> | |
7041 | #ifdef DEFINED_IN_CONFTESTD2 | |
7042 | int foo; | |
7043 | #else | |
7044 | #error "include_next doesn't work" | |
7045 | #endif | |
7046 | EOF | |
7047 | cat <<EOF > conftestd2/conftest.h | |
7048 | #ifndef DEFINED_IN_CONFTESTD1 | |
7049 | #error "include_next test doesn't work" | |
7050 | #endif | |
7051 | #define DEFINED_IN_CONFTESTD2 | |
7052 | EOF | |
7053 | gl_save_CPPFLAGS="$CPPFLAGS" | |
7054 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
7055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
73cc7272 | 7056 | /* end confdefs.h. */ |
c0c3707f | 7057 | #include <conftest.h> |
73cc7272 | 7058 | _ACEOF |
c0c3707f CB |
7059 | if ac_fn_c_try_compile "$LINENO"; then : |
7060 | gl_cv_have_include_next=yes | |
7061 | else | |
7062 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
7063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7064 | /* end confdefs.h. */ | |
7065 | #include <conftest.h> | |
7066 | _ACEOF | |
7067 | if ac_fn_c_try_compile "$LINENO"; then : | |
7068 | gl_cv_have_include_next=buggy | |
7069 | else | |
7070 | gl_cv_have_include_next=no | |
73cc7272 | 7071 | fi |
c0c3707f CB |
7072 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7073 | ||
73cc7272 | 7074 | fi |
c0c3707f CB |
7075 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7076 | CPPFLAGS="$gl_save_CPPFLAGS" | |
7077 | rm -rf conftestd1a conftestd1b conftestd2 | |
7078 | ||
73cc7272 | 7079 | fi |
c0c3707f CB |
7080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 |
7081 | $as_echo "$gl_cv_have_include_next" >&6; } | |
7082 | PRAGMA_SYSTEM_HEADER= | |
7083 | if test $gl_cv_have_include_next = yes; then | |
7084 | INCLUDE_NEXT=include_next | |
7085 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
7086 | if test -n "$GCC"; then | |
7087 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
7088 | fi | |
7089 | else | |
7090 | if test $gl_cv_have_include_next = buggy; then | |
7091 | INCLUDE_NEXT=include | |
7092 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
7093 | else | |
7094 | INCLUDE_NEXT=include | |
7095 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
7096 | fi | |
73cc7272 TT |
7097 | fi |
7098 | ||
73cc7272 | 7099 | |
73cc7272 | 7100 | |
c0c3707f CB |
7101 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 |
7102 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
7103 | if ${gl_cv_pragma_columns+:} false; then : | |
73cc7272 TT |
7104 | $as_echo_n "(cached) " >&6 |
7105 | else | |
c0c3707f | 7106 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
73cc7272 | 7107 | /* end confdefs.h. */ |
73cc7272 | 7108 | |
c0c3707f CB |
7109 | #ifdef __TANDEM |
7110 | choke me | |
7111 | #endif | |
73cc7272 | 7112 | |
73cc7272 | 7113 | _ACEOF |
c0c3707f CB |
7114 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
7115 | $EGREP "choke me" >/dev/null 2>&1; then : | |
7116 | gl_cv_pragma_columns=yes | |
7117 | else | |
7118 | gl_cv_pragma_columns=no | |
73cc7272 | 7119 | fi |
c0c3707f | 7120 | rm -f conftest* |
73cc7272 | 7121 | |
73cc7272 TT |
7122 | |
7123 | fi | |
c0c3707f CB |
7124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 |
7125 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
7126 | if test $gl_cv_pragma_columns = yes; then | |
7127 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
7128 | else | |
7129 | PRAGMA_COLUMNS= | |
7130 | fi | |
73cc7272 TT |
7131 | |
7132 | ||
7133 | ||
73cc7272 | 7134 | |
73cc7272 TT |
7135 | |
7136 | ||
c0c3707f CB |
7137 | if test $ac_cv_header_features_h = yes; then |
7138 | HAVE_FEATURES_H=1 | |
7139 | else | |
7140 | HAVE_FEATURES_H=0 | |
7141 | fi | |
73cc7272 | 7142 | |
7a6dbc2f SDJ |
7143 | |
7144 | ||
7145 | ||
7146 | ||
c0c3707f CB |
7147 | if test $ac_cv_header_sys_socket_h = no; then |
7148 | for ac_header in ws2tcpip.h | |
7149 | do : | |
7150 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
7151 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
7152 | cat >>confdefs.h <<_ACEOF | |
7153 | #define HAVE_WS2TCPIP_H 1 | |
7154 | _ACEOF | |
7a6dbc2f | 7155 | |
c0c3707f | 7156 | fi |
7a6dbc2f | 7157 | |
c0c3707f | 7158 | done |
7a6dbc2f | 7159 | |
c0c3707f | 7160 | fi |
7a6dbc2f | 7161 | |
c0c3707f CB |
7162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 |
7163 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7164 | if test -z "$MKDIR_P"; then | |
7165 | if ${ac_cv_path_mkdir+:} false; then : | |
7166 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 7167 | else |
c0c3707f CB |
7168 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7169 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7170 | do | |
7171 | IFS=$as_save_IFS | |
7172 | test -z "$as_dir" && as_dir=. | |
7173 | for ac_prog in mkdir gmkdir; do | |
7174 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7175 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue | |
7176 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7177 | 'mkdir (GNU coreutils) '* | \ | |
7178 | 'mkdir (coreutils) '* | \ | |
7179 | 'mkdir (fileutils) '4.1*) | |
7180 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7181 | break 3;; | |
7182 | esac | |
7183 | done | |
7184 | done | |
7185 | done | |
7186 | IFS=$as_save_IFS | |
7a6dbc2f | 7187 | |
5e8754f9 | 7188 | fi |
7a6dbc2f | 7189 | |
c0c3707f CB |
7190 | test -d ./--version && rmdir ./--version |
7191 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7192 | MKDIR_P="$ac_cv_path_mkdir -p" | |
7193 | else | |
7194 | # As a last resort, use the slow shell script. Don't cache a | |
7195 | # value for MKDIR_P within a source directory, because that will | |
7196 | # break other packages using the cache if that directory is | |
7197 | # removed, or if the value is a relative name. | |
7198 | MKDIR_P="$ac_install_sh -d" | |
7199 | fi | |
5e8754f9 | 7200 | fi |
c0c3707f CB |
7201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7202 | $as_echo "$MKDIR_P" >&6; } | |
7a6dbc2f | 7203 | |
5e8754f9 | 7204 | |
698be2d8 CB |
7205 | GNULIB_BTOWC=0; |
7206 | GNULIB_WCTOB=0; | |
7207 | GNULIB_MBSINIT=0; | |
7208 | GNULIB_MBRTOWC=0; | |
7209 | GNULIB_MBRLEN=0; | |
7210 | GNULIB_MBSRTOWCS=0; | |
7211 | GNULIB_MBSNRTOWCS=0; | |
7212 | GNULIB_WCRTOMB=0; | |
7213 | GNULIB_WCSRTOMBS=0; | |
7214 | GNULIB_WCSNRTOMBS=0; | |
7215 | GNULIB_WCWIDTH=0; | |
7216 | GNULIB_WMEMCHR=0; | |
7217 | GNULIB_WMEMCMP=0; | |
7218 | GNULIB_WMEMCPY=0; | |
7219 | GNULIB_WMEMMOVE=0; | |
7220 | GNULIB_WMEMPCPY=0; | |
7221 | GNULIB_WMEMSET=0; | |
7222 | GNULIB_WCSLEN=0; | |
7223 | GNULIB_WCSNLEN=0; | |
7224 | GNULIB_WCSCPY=0; | |
7225 | GNULIB_WCPCPY=0; | |
7226 | GNULIB_WCSNCPY=0; | |
7227 | GNULIB_WCPNCPY=0; | |
7228 | GNULIB_WCSCAT=0; | |
7229 | GNULIB_WCSNCAT=0; | |
7230 | GNULIB_WCSCMP=0; | |
7231 | GNULIB_WCSNCMP=0; | |
7232 | GNULIB_WCSCASECMP=0; | |
7233 | GNULIB_WCSNCASECMP=0; | |
7234 | GNULIB_WCSCOLL=0; | |
7235 | GNULIB_WCSXFRM=0; | |
7236 | GNULIB_WCSDUP=0; | |
7237 | GNULIB_WCSCHR=0; | |
7238 | GNULIB_WCSRCHR=0; | |
7239 | GNULIB_WCSCSPN=0; | |
7240 | GNULIB_WCSSPN=0; | |
7241 | GNULIB_WCSPBRK=0; | |
7242 | GNULIB_WCSSTR=0; | |
7243 | GNULIB_WCSTOK=0; | |
7244 | GNULIB_WCSWIDTH=0; | |
7245 | GNULIB_WCSFTIME=0; | |
7246 | HAVE_BTOWC=1; | |
7247 | HAVE_MBSINIT=1; | |
7248 | HAVE_MBRTOWC=1; | |
7249 | HAVE_MBRLEN=1; | |
7250 | HAVE_MBSRTOWCS=1; | |
7251 | HAVE_MBSNRTOWCS=1; | |
7252 | HAVE_WCRTOMB=1; | |
7253 | HAVE_WCSRTOMBS=1; | |
7254 | HAVE_WCSNRTOMBS=1; | |
7255 | HAVE_WMEMCHR=1; | |
7256 | HAVE_WMEMCMP=1; | |
7257 | HAVE_WMEMCPY=1; | |
7258 | HAVE_WMEMMOVE=1; | |
7259 | HAVE_WMEMPCPY=1; | |
7260 | HAVE_WMEMSET=1; | |
7261 | HAVE_WCSLEN=1; | |
7262 | HAVE_WCSNLEN=1; | |
7263 | HAVE_WCSCPY=1; | |
7264 | HAVE_WCPCPY=1; | |
7265 | HAVE_WCSNCPY=1; | |
7266 | HAVE_WCPNCPY=1; | |
7267 | HAVE_WCSCAT=1; | |
7268 | HAVE_WCSNCAT=1; | |
7269 | HAVE_WCSCMP=1; | |
7270 | HAVE_WCSNCMP=1; | |
7271 | HAVE_WCSCASECMP=1; | |
7272 | HAVE_WCSNCASECMP=1; | |
7273 | HAVE_WCSCOLL=1; | |
7274 | HAVE_WCSXFRM=1; | |
7275 | HAVE_WCSDUP=1; | |
7276 | HAVE_WCSCHR=1; | |
7277 | HAVE_WCSRCHR=1; | |
7278 | HAVE_WCSCSPN=1; | |
7279 | HAVE_WCSSPN=1; | |
7280 | HAVE_WCSPBRK=1; | |
7281 | HAVE_WCSSTR=1; | |
7282 | HAVE_WCSTOK=1; | |
7283 | HAVE_WCSWIDTH=1; | |
7284 | HAVE_WCSFTIME=1; | |
7285 | HAVE_DECL_WCTOB=1; | |
7286 | HAVE_DECL_WCWIDTH=1; | |
7287 | REPLACE_MBSTATE_T=0; | |
7288 | REPLACE_BTOWC=0; | |
7289 | REPLACE_WCTOB=0; | |
7290 | REPLACE_MBSINIT=0; | |
7291 | REPLACE_MBRTOWC=0; | |
7292 | REPLACE_MBRLEN=0; | |
7293 | REPLACE_MBSRTOWCS=0; | |
7294 | REPLACE_MBSNRTOWCS=0; | |
7295 | REPLACE_WCRTOMB=0; | |
7296 | REPLACE_WCSRTOMBS=0; | |
7297 | REPLACE_WCSNRTOMBS=0; | |
7298 | REPLACE_WCWIDTH=0; | |
7299 | REPLACE_WCSWIDTH=0; | |
7300 | REPLACE_WCSFTIME=0; | |
7301 | REPLACE_WCSTOK=0; | |
7302 | ||
7303 | ||
7304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
7305 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
7306 | if ${gl_cv_header_wchar_h_correct_inline+:} false; then : | |
7307 | $as_echo_n "(cached) " >&6 | |
7308 | else | |
7309 | gl_cv_header_wchar_h_correct_inline=yes | |
7310 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7311 | /* end confdefs.h. */ | |
7312 | ||
7313 | #define wcstod renamed_wcstod | |
7314 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
7315 | <wchar.h>. | |
7316 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
7317 | included before <wchar.h>. */ | |
7318 | #include <stddef.h> | |
7319 | #include <stdio.h> | |
7320 | #include <time.h> | |
7321 | #include <wchar.h> | |
7322 | extern int zero (void); | |
7323 | int main () { return zero(); } | |
7324 | ||
7325 | _ACEOF | |
7326 | save_ac_compile="$ac_compile" | |
7327 | ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` | |
7328 | if echo '#include "conftest.c"' >conftest1.c && | |
7329 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
7330 | (eval $ac_compile) 2>&5 | |
7331 | ac_status=$? | |
7332 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7333 | test $ac_status = 0; }; then | |
7334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7335 | /* end confdefs.h. */ | |
7336 | ||
7337 | #define wcstod renamed_wcstod | |
7338 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
7339 | <wchar.h>. | |
7340 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
7341 | included before <wchar.h>. */ | |
7342 | #include <stddef.h> | |
7343 | #include <stdio.h> | |
7344 | #include <time.h> | |
7345 | #include <wchar.h> | |
7346 | int zero (void) { return 0; } | |
7347 | ||
7348 | _ACEOF | |
7349 | ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` | |
7350 | if echo '#include "conftest.c"' >conftest2.c && | |
7351 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
7352 | (eval $ac_compile) 2>&5 | |
7353 | ac_status=$? | |
7354 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7355 | test $ac_status = 0; }; then | |
7356 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
7357 | : | |
7358 | else | |
7359 | gl_cv_header_wchar_h_correct_inline=no | |
7360 | fi | |
7361 | fi | |
7362 | fi | |
7363 | ac_compile="$save_ac_compile" | |
7364 | rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext | |
7365 | ||
7366 | fi | |
7367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 | |
7368 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
7369 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
7370 | as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
7371 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
7372 | C99 mode. You have four options: | |
7373 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
7374 | - Fix your include files, using parts of | |
7375 | <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
7376 | - Use a gcc version older than 4.3, or | |
7377 | - Don't use the flags -std=c99 or -std=gnu99. | |
7378 | Configuration aborted." "$LINENO" 5 | |
7379 | fi | |
7380 | ||
7381 | ||
7382 | ||
7383 | ||
7384 | for ac_func in $ac_func_list | |
7385 | do : | |
7386 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7387 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7388 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7389 | cat >>confdefs.h <<_ACEOF | |
7390 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7391 | _ACEOF | |
7392 | ||
7393 | fi | |
7394 | done | |
7395 | ||
7396 | ||
7397 | ||
7398 | ||
7399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
7400 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
7401 | if ${am_cv_langinfo_codeset+:} false; then : | |
7402 | $as_echo_n "(cached) " >&6 | |
7403 | else | |
7404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7405 | /* end confdefs.h. */ | |
7406 | #include <langinfo.h> | |
7407 | int | |
7408 | main () | |
7409 | { | |
7410 | char* cs = nl_langinfo(CODESET); return !cs; | |
7411 | ; | |
7412 | return 0; | |
7413 | } | |
7414 | _ACEOF | |
7415 | if ac_fn_c_try_link "$LINENO"; then : | |
7416 | am_cv_langinfo_codeset=yes | |
7417 | else | |
7418 | am_cv_langinfo_codeset=no | |
7419 | fi | |
7420 | rm -f core conftest.err conftest.$ac_objext \ | |
7421 | conftest$ac_exeext conftest.$ac_ext | |
7422 | ||
7423 | fi | |
7424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
7425 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
7426 | if test $am_cv_langinfo_codeset = yes; then | |
7427 | ||
7428 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
7429 | ||
7430 | fi | |
7431 | ||
7432 | ||
7433 | ||
7434 | ||
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 | |
7436 | $as_echo_n "checking for a traditional french locale... " >&6; } | |
7437 | if ${gt_cv_locale_fr+:} false; then : | |
7438 | $as_echo_n "(cached) " >&6 | |
7439 | else | |
7440 | ||
7441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7442 | /* end confdefs.h. */ | |
7443 | ||
7444 | #include <locale.h> | |
7445 | #include <time.h> | |
7446 | #if HAVE_LANGINFO_CODESET | |
7447 | # include <langinfo.h> | |
7448 | #endif | |
7449 | #include <stdlib.h> | |
7450 | #include <string.h> | |
7451 | struct tm t; | |
7452 | char buf[16]; | |
7453 | int main () { | |
7454 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl | |
7455 | imitates locale dependent behaviour by looking at the environment | |
7456 | variables, and all locales use the UTF-8 encoding. */ | |
7457 | #if defined __BEOS__ || defined __HAIKU__ | |
7458 | return 1; | |
7459 | #else | |
7460 | /* Check whether the given locale name is recognized by the system. */ | |
7461 | # if defined _WIN32 && !defined __CYGWIN__ | |
7462 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
7463 | not at the environment variables. Also, when an encoding suffix such | |
7464 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
7465 | category of the locale to "C". */ | |
7466 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
7467 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
7468 | return 1; | |
7469 | # else | |
7470 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
7471 | # endif | |
7472 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
7473 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
7474 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
7475 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
7476 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
7477 | some unit tests fail. | |
7478 | On MirBSD 10, when an unsupported locale is specified, setlocale() | |
7479 | succeeds but then nl_langinfo(CODESET) is "UTF-8". */ | |
7480 | # if HAVE_LANGINFO_CODESET | |
7481 | { | |
7482 | const char *cs = nl_langinfo (CODESET); | |
7483 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 | |
7484 | || strcmp (cs, "UTF-8") == 0) | |
7485 | return 1; | |
7486 | } | |
7487 | # endif | |
7488 | # ifdef __CYGWIN__ | |
7489 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
7490 | locale_charset() function relies on the encoding suffix. Note that | |
7491 | LC_ALL is set on the command line. */ | |
7492 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
7493 | # endif | |
7494 | /* Check whether in the abbreviation of the second month, the second | |
7495 | character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only | |
7496 | one byte long. This excludes the UTF-8 encoding. */ | |
7497 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
7498 | if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; | |
7499 | # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ | |
7500 | /* Check whether the decimal separator is a comma. | |
7501 | On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point | |
7502 | are nl_langinfo(RADIXCHAR) are both ".". */ | |
7503 | if (localeconv () ->decimal_point[0] != ',') return 1; | |
7504 | # endif | |
7505 | return 0; | |
7506 | #endif | |
7507 | } | |
7508 | ||
7509 | _ACEOF | |
7510 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | |
7511 | (eval $ac_link) 2>&5 | |
7512 | ac_status=$? | |
7513 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7514 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
7515 | case "$host_os" in | |
7516 | # Handle native Windows specially, because there setlocale() interprets | |
7517 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
7518 | # "fr" or "fra" as "French" or "French_France.1252", | |
7519 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
7520 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
7521 | # and similar. | |
7522 | mingw*) | |
7523 | # Test for the native Windows locale name. | |
7524 | if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7525 | gt_cv_locale_fr=French_France.1252 | |
7526 | else | |
7527 | # None found. | |
7528 | gt_cv_locale_fr=none | |
7529 | fi | |
7530 | ;; | |
7531 | *) | |
7532 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
7533 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
7534 | # configure script would override the LC_ALL setting. Likewise for | |
7535 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
7536 | # Test for the usual locale name. | |
7537 | if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7538 | gt_cv_locale_fr=fr_FR | |
7539 | else | |
7540 | # Test for the locale name with explicit encoding suffix. | |
7541 | if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7542 | gt_cv_locale_fr=fr_FR.ISO-8859-1 | |
7543 | else | |
7544 | # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. | |
7545 | if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7546 | gt_cv_locale_fr=fr_FR.ISO8859-1 | |
7547 | else | |
7548 | # Test for the HP-UX locale name. | |
7549 | if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7550 | gt_cv_locale_fr=fr_FR.iso88591 | |
7551 | else | |
7552 | # Test for the Solaris 7 locale name. | |
7553 | if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7554 | gt_cv_locale_fr=fr | |
7555 | else | |
7556 | # None found. | |
7557 | gt_cv_locale_fr=none | |
7558 | fi | |
7559 | fi | |
7560 | fi | |
7561 | fi | |
7562 | fi | |
7563 | ;; | |
7564 | esac | |
7565 | fi | |
7566 | rm -fr conftest* | |
7567 | ||
7568 | fi | |
7569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 | |
7570 | $as_echo "$gt_cv_locale_fr" >&6; } | |
7571 | LOCALE_FR=$gt_cv_locale_fr | |
7572 | ||
7573 | ||
7574 | ||
7575 | GNULIB__EXIT=0; | |
7576 | GNULIB_ATOLL=0; | |
7577 | GNULIB_CALLOC_POSIX=0; | |
7578 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
7579 | GNULIB_GETLOADAVG=0; | |
7580 | GNULIB_GETSUBOPT=0; | |
7581 | GNULIB_GRANTPT=0; | |
7582 | GNULIB_MALLOC_POSIX=0; | |
7583 | GNULIB_MBTOWC=0; | |
7584 | GNULIB_MKDTEMP=0; | |
7585 | GNULIB_MKOSTEMP=0; | |
7586 | GNULIB_MKOSTEMPS=0; | |
7587 | GNULIB_MKSTEMP=0; | |
7588 | GNULIB_MKSTEMPS=0; | |
7589 | GNULIB_POSIX_OPENPT=0; | |
7590 | GNULIB_PTSNAME=0; | |
7591 | GNULIB_PTSNAME_R=0; | |
7592 | GNULIB_PUTENV=0; | |
7593 | GNULIB_QSORT_R=0; | |
7594 | GNULIB_RANDOM=0; | |
7595 | GNULIB_RANDOM_R=0; | |
7596 | GNULIB_REALLOCARRAY=0; | |
7597 | GNULIB_REALLOC_POSIX=0; | |
7598 | GNULIB_REALPATH=0; | |
7599 | GNULIB_RPMATCH=0; | |
7600 | GNULIB_SECURE_GETENV=0; | |
7601 | GNULIB_SETENV=0; | |
7602 | GNULIB_STRTOD=0; | |
7603 | GNULIB_STRTOLD=0; | |
7604 | GNULIB_STRTOLL=0; | |
7605 | GNULIB_STRTOULL=0; | |
7606 | GNULIB_SYSTEM_POSIX=0; | |
7607 | GNULIB_UNLOCKPT=0; | |
7608 | GNULIB_UNSETENV=0; | |
7609 | GNULIB_WCTOMB=0; | |
7610 | HAVE__EXIT=1; | |
7611 | HAVE_ATOLL=1; | |
7612 | HAVE_CANONICALIZE_FILE_NAME=1; | |
7613 | HAVE_DECL_GETLOADAVG=1; | |
7614 | HAVE_GETSUBOPT=1; | |
7615 | HAVE_GRANTPT=1; | |
7616 | HAVE_INITSTATE=1; | |
7617 | HAVE_DECL_INITSTATE=1; | |
7618 | HAVE_MBTOWC=1; | |
7619 | HAVE_MKDTEMP=1; | |
7620 | HAVE_MKOSTEMP=1; | |
7621 | HAVE_MKOSTEMPS=1; | |
7622 | HAVE_MKSTEMP=1; | |
7623 | HAVE_MKSTEMPS=1; | |
7624 | HAVE_POSIX_OPENPT=1; | |
7625 | HAVE_PTSNAME=1; | |
7626 | HAVE_PTSNAME_R=1; | |
c0c3707f CB |
7627 | HAVE_QSORT_R=1; |
7628 | HAVE_RANDOM=1; | |
7629 | HAVE_RANDOM_H=1; | |
7630 | HAVE_RANDOM_R=1; | |
7631 | HAVE_REALLOCARRAY=1; | |
7632 | HAVE_REALPATH=1; | |
7633 | HAVE_RPMATCH=1; | |
7634 | HAVE_SECURE_GETENV=1; | |
7635 | HAVE_SETENV=1; | |
7636 | HAVE_DECL_SETENV=1; | |
7637 | HAVE_SETSTATE=1; | |
7638 | HAVE_DECL_SETSTATE=1; | |
7639 | HAVE_STRTOD=1; | |
7640 | HAVE_STRTOLD=1; | |
7641 | HAVE_STRTOLL=1; | |
7642 | HAVE_STRTOULL=1; | |
7643 | HAVE_STRUCT_RANDOM_DATA=1; | |
7644 | HAVE_SYS_LOADAVG_H=0; | |
7645 | HAVE_UNLOCKPT=1; | |
7646 | HAVE_DECL_UNSETENV=1; | |
7647 | REPLACE_CALLOC=0; | |
7648 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
7649 | REPLACE_INITSTATE=0; | |
7650 | REPLACE_MALLOC=0; | |
7651 | REPLACE_MBTOWC=0; | |
7652 | REPLACE_MKSTEMP=0; | |
7653 | REPLACE_PTSNAME=0; | |
7654 | REPLACE_PTSNAME_R=0; | |
7655 | REPLACE_PUTENV=0; | |
7656 | REPLACE_QSORT_R=0; | |
7657 | REPLACE_RANDOM=0; | |
7658 | REPLACE_RANDOM_R=0; | |
7659 | REPLACE_REALLOC=0; | |
7660 | REPLACE_REALPATH=0; | |
7661 | REPLACE_SETENV=0; | |
7662 | REPLACE_SETSTATE=0; | |
7663 | REPLACE_STRTOD=0; | |
7664 | REPLACE_STRTOLD=0; | |
7665 | REPLACE_UNSETENV=0; | |
7666 | REPLACE_WCTOMB=0; | |
7a6dbc2f | 7667 | |
7a6dbc2f | 7668 | |
98399780 | 7669 | |
98399780 | 7670 | |
472fa5ee SM |
7671 | |
7672 | ||
7673 | ||
7674 | ||
7675 | ||
c0c3707f CB |
7676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 |
7677 | $as_echo_n "checking whether // is distinct from /... " >&6; } | |
7678 | if ${gl_cv_double_slash_root+:} false; then : | |
7679 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 7680 | else |
c0c3707f CB |
7681 | if test x"$cross_compiling" = xyes ; then |
7682 | # When cross-compiling, there is no way to tell whether // is special | |
7683 | # short of a list of hosts. However, the only known hosts to date | |
7684 | # that have a distinct // are Apollo DomainOS (too old to port to), | |
7685 | # Cygwin, and z/OS. If anyone knows of another system for which // has | |
7686 | # special semantics and is distinct from /, please report it to | |
7687 | # <bug-gnulib@gnu.org>. | |
7688 | case $host in | |
7689 | *-cygwin | i370-ibm-openedition) | |
7690 | gl_cv_double_slash_root=yes ;; | |
7691 | *) | |
7692 | # Be optimistic and assume that / and // are the same when we | |
7693 | # don't know. | |
7694 | gl_cv_double_slash_root='unknown, assuming no' ;; | |
7695 | esac | |
7696 | else | |
7697 | set x `ls -di / // 2>/dev/null` | |
7698 | if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then | |
7699 | gl_cv_double_slash_root=no | |
7700 | else | |
7701 | gl_cv_double_slash_root=yes | |
7702 | fi | |
7703 | fi | |
5e8754f9 | 7704 | fi |
c0c3707f CB |
7705 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 |
7706 | $as_echo "$gl_cv_double_slash_root" >&6; } | |
7707 | if test "$gl_cv_double_slash_root" = yes; then | |
472fa5ee | 7708 | |
c0c3707f | 7709 | $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h |
472fa5ee | 7710 | |
c0c3707f | 7711 | fi |
472fa5ee SM |
7712 | |
7713 | ||
472fa5ee | 7714 | |
c0c3707f CB |
7715 | |
7716 | ||
7717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 | |
7718 | $as_echo_n "checking whether realpath works... " >&6; } | |
7719 | if ${gl_cv_func_realpath_works+:} false; then : | |
5e8754f9 SDJ |
7720 | $as_echo_n "(cached) " >&6 |
7721 | else | |
c0c3707f CB |
7722 | |
7723 | touch conftest.a | |
7724 | mkdir conftest.d | |
7725 | if test "$cross_compiling" = yes; then : | |
7726 | case "$host_os" in | |
7727 | # Guess yes on glibc systems. | |
7728 | *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; | |
7729 | # Guess yes on musl systems. | |
7730 | *-musl*) gl_cv_func_realpath_works="guessing yes" ;; | |
7731 | # Guess no on native Windows. | |
7732 | mingw*) gl_cv_func_realpath_works="guessing no" ;; | |
7733 | # If we don't know, obey --enable-cross-guesses. | |
7734 | *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;; | |
7735 | esac | |
7736 | ||
5e8754f9 SDJ |
7737 | else |
7738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7739 | /* end confdefs.h. */ | |
c0c3707f CB |
7740 | |
7741 | ||
7742 | ||
7743 | #include <stdlib.h> | |
7744 | #if defined __MACH__ && defined __APPLE__ | |
7745 | /* Avoid a crash on Mac OS X. */ | |
7746 | #include <mach/mach.h> | |
7747 | #include <mach/mach_error.h> | |
7748 | #include <mach/thread_status.h> | |
7749 | #include <mach/exception.h> | |
7750 | #include <mach/task.h> | |
7751 | #include <pthread.h> | |
7752 | /* The exception port on which our thread listens. */ | |
7753 | static mach_port_t our_exception_port; | |
7754 | /* The main function of the thread listening for exceptions of type | |
7755 | EXC_BAD_ACCESS. */ | |
7756 | static void * | |
7757 | mach_exception_thread (void *arg) | |
5e8754f9 | 7758 | { |
c0c3707f CB |
7759 | /* Buffer for a message to be received. */ |
7760 | struct { | |
7761 | mach_msg_header_t head; | |
7762 | mach_msg_body_t msgh_body; | |
7763 | char data[1024]; | |
7764 | } msg; | |
7765 | mach_msg_return_t retval; | |
7766 | /* Wait for a message on the exception port. */ | |
7767 | retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), | |
7768 | our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | |
7769 | if (retval != MACH_MSG_SUCCESS) | |
7770 | abort (); | |
7771 | exit (1); | |
7772 | } | |
7773 | static void | |
7774 | nocrash_init (void) | |
7775 | { | |
7776 | mach_port_t self = mach_task_self (); | |
7777 | /* Allocate a port on which the thread shall listen for exceptions. */ | |
7778 | if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) | |
7779 | == KERN_SUCCESS) { | |
7780 | /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ | |
7781 | if (mach_port_insert_right (self, our_exception_port, our_exception_port, | |
7782 | MACH_MSG_TYPE_MAKE_SEND) | |
7783 | == KERN_SUCCESS) { | |
7784 | /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting | |
7785 | for us. */ | |
7786 | exception_mask_t mask = EXC_MASK_BAD_ACCESS; | |
7787 | /* Create the thread listening on the exception port. */ | |
7788 | pthread_attr_t attr; | |
7789 | pthread_t thread; | |
7790 | if (pthread_attr_init (&attr) == 0 | |
7791 | && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 | |
7792 | && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { | |
7793 | pthread_attr_destroy (&attr); | |
7794 | /* Replace the exception port info for these exceptions with our own. | |
7795 | Note that we replace the exception port for the entire task, not only | |
7796 | for a particular thread. This has the effect that when our exception | |
7797 | port gets the message, the thread specific exception port has already | |
7798 | been asked, and we don't need to bother about it. | |
7799 | See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ | |
7800 | task_set_exception_ports (self, mask, our_exception_port, | |
7801 | EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); | |
7802 | } | |
7803 | } | |
7804 | } | |
7805 | } | |
7806 | #elif defined _WIN32 && ! defined __CYGWIN__ | |
7807 | /* Avoid a crash on native Windows. */ | |
7808 | #define WIN32_LEAN_AND_MEAN | |
7809 | #include <windows.h> | |
7810 | #include <winerror.h> | |
7811 | static LONG WINAPI | |
7812 | exception_filter (EXCEPTION_POINTERS *ExceptionInfo) | |
7813 | { | |
7814 | switch (ExceptionInfo->ExceptionRecord->ExceptionCode) | |
7815 | { | |
7816 | case EXCEPTION_ACCESS_VIOLATION: | |
7817 | case EXCEPTION_IN_PAGE_ERROR: | |
7818 | case EXCEPTION_STACK_OVERFLOW: | |
7819 | case EXCEPTION_GUARD_PAGE: | |
7820 | case EXCEPTION_PRIV_INSTRUCTION: | |
7821 | case EXCEPTION_ILLEGAL_INSTRUCTION: | |
7822 | case EXCEPTION_DATATYPE_MISALIGNMENT: | |
7823 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: | |
7824 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: | |
7825 | exit (1); | |
7826 | } | |
7827 | return EXCEPTION_CONTINUE_SEARCH; | |
7828 | } | |
7829 | static void | |
7830 | nocrash_init (void) | |
7831 | { | |
7832 | SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); | |
7833 | } | |
7834 | #else | |
7835 | /* Avoid a crash on POSIX systems. */ | |
7836 | #include <signal.h> | |
7837 | #include <unistd.h> | |
7838 | /* A POSIX signal handler. */ | |
7839 | static void | |
7840 | exception_handler (int sig) | |
7841 | { | |
7842 | _exit (1); | |
7843 | } | |
7844 | static void | |
7845 | nocrash_init (void) | |
7846 | { | |
7847 | #ifdef SIGSEGV | |
7848 | signal (SIGSEGV, exception_handler); | |
7849 | #endif | |
7850 | #ifdef SIGBUS | |
7851 | signal (SIGBUS, exception_handler); | |
7852 | #endif | |
5e8754f9 | 7853 | } |
c0c3707f CB |
7854 | #endif |
7855 | ||
7856 | #include <stdlib.h> | |
7857 | #include <string.h> | |
472fa5ee | 7858 | |
5e8754f9 | 7859 | int |
c0c3707f | 7860 | main () |
5e8754f9 | 7861 | { |
c0c3707f CB |
7862 | |
7863 | int result = 0; | |
7864 | { | |
7865 | char *name = realpath ("conftest.a", NULL); | |
7866 | if (!(name && *name == '/')) | |
7867 | result |= 1; | |
7868 | free (name); | |
7869 | } | |
7870 | { | |
7871 | char *name = realpath ("conftest.b/../conftest.a", NULL); | |
7872 | if (name != NULL) | |
7873 | result |= 2; | |
7874 | free (name); | |
7875 | } | |
7876 | { | |
7877 | char *name = realpath ("conftest.a/", NULL); | |
7878 | if (name != NULL) | |
7879 | result |= 4; | |
7880 | free (name); | |
7881 | } | |
7882 | { | |
7883 | char *name1 = realpath (".", NULL); | |
7884 | char *name2 = realpath ("conftest.d//./..", NULL); | |
7885 | if (! name1 || ! name2 || strcmp (name1, name2)) | |
7886 | result |= 8; | |
7887 | free (name1); | |
7888 | free (name2); | |
7889 | } | |
7890 | return result; | |
7891 | ||
7892 | ; | |
7893 | return 0; | |
5e8754f9 | 7894 | } |
c0c3707f | 7895 | |
5e8754f9 SDJ |
7896 | _ACEOF |
7897 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 7898 | gl_cv_func_realpath_works=yes |
5e8754f9 | 7899 | else |
c0c3707f | 7900 | gl_cv_func_realpath_works=no |
5e8754f9 SDJ |
7901 | fi |
7902 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7903 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7904 | fi | |
472fa5ee | 7905 | |
c0c3707f | 7906 | rm -rf conftest.a conftest.d |
98399780 | 7907 | |
5e8754f9 | 7908 | fi |
c0c3707f CB |
7909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 |
7910 | $as_echo "$gl_cv_func_realpath_works" >&6; } | |
7911 | case "$gl_cv_func_realpath_works" in | |
7912 | *yes) | |
98399780 | 7913 | |
c0c3707f | 7914 | $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h |
98399780 | 7915 | |
c0c3707f CB |
7916 | ;; |
7917 | esac | |
725e2999 JB |
7918 | |
7919 | ||
725e2999 | 7920 | |
725e2999 | 7921 | |
725e2999 JB |
7922 | |
7923 | ||
7924 | ||
7925 | ||
7926 | ||
7927 | ||
7928 | ||
c0c3707f CB |
7929 | GNULIB_ACCESS=0; |
7930 | GNULIB_CHDIR=0; | |
7931 | GNULIB_CHOWN=0; | |
7932 | GNULIB_CLOSE=0; | |
7933 | GNULIB_COPY_FILE_RANGE=0; | |
7934 | GNULIB_DUP=0; | |
7935 | GNULIB_DUP2=0; | |
7936 | GNULIB_DUP3=0; | |
7937 | GNULIB_ENVIRON=0; | |
7938 | GNULIB_EUIDACCESS=0; | |
7939 | GNULIB_FACCESSAT=0; | |
7940 | GNULIB_FCHDIR=0; | |
7941 | GNULIB_FCHOWNAT=0; | |
7942 | GNULIB_FDATASYNC=0; | |
7943 | GNULIB_FSYNC=0; | |
7944 | GNULIB_FTRUNCATE=0; | |
7945 | GNULIB_GETCWD=0; | |
7946 | GNULIB_GETDOMAINNAME=0; | |
7947 | GNULIB_GETDTABLESIZE=0; | |
698be2d8 | 7948 | GNULIB_GETENTROPY=0; |
c0c3707f CB |
7949 | GNULIB_GETGROUPS=0; |
7950 | GNULIB_GETHOSTNAME=0; | |
7951 | GNULIB_GETLOGIN=0; | |
7952 | GNULIB_GETLOGIN_R=0; | |
5df4cba6 | 7953 | GNULIB_GETOPT_POSIX=0; |
c0c3707f CB |
7954 | GNULIB_GETPAGESIZE=0; |
7955 | GNULIB_GETPASS=0; | |
7956 | GNULIB_GETUSERSHELL=0; | |
7957 | GNULIB_GROUP_MEMBER=0; | |
7958 | GNULIB_ISATTY=0; | |
7959 | GNULIB_LCHOWN=0; | |
7960 | GNULIB_LINK=0; | |
7961 | GNULIB_LINKAT=0; | |
7962 | GNULIB_LSEEK=0; | |
7963 | GNULIB_PIPE=0; | |
7964 | GNULIB_PIPE2=0; | |
7965 | GNULIB_PREAD=0; | |
7966 | GNULIB_PWRITE=0; | |
7967 | GNULIB_READ=0; | |
7968 | GNULIB_READLINK=0; | |
7969 | GNULIB_READLINKAT=0; | |
7970 | GNULIB_RMDIR=0; | |
7971 | GNULIB_SETHOSTNAME=0; | |
7972 | GNULIB_SLEEP=0; | |
7973 | GNULIB_SYMLINK=0; | |
7974 | GNULIB_SYMLINKAT=0; | |
7975 | GNULIB_TRUNCATE=0; | |
7976 | GNULIB_TTYNAME_R=0; | |
7977 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
7978 | GNULIB_UNISTD_H_SIGPIPE=0; | |
7979 | GNULIB_UNLINK=0; | |
7980 | GNULIB_UNLINKAT=0; | |
7981 | GNULIB_USLEEP=0; | |
7982 | GNULIB_WRITE=0; | |
7983 | HAVE_CHOWN=1; | |
7984 | HAVE_COPY_FILE_RANGE=1; | |
7985 | HAVE_DUP2=1; | |
7986 | HAVE_DUP3=1; | |
7987 | HAVE_EUIDACCESS=1; | |
7988 | HAVE_FACCESSAT=1; | |
7989 | HAVE_FCHDIR=1; | |
7990 | HAVE_FCHOWNAT=1; | |
7991 | HAVE_FDATASYNC=1; | |
7992 | HAVE_FSYNC=1; | |
7993 | HAVE_FTRUNCATE=1; | |
7994 | HAVE_GETDTABLESIZE=1; | |
698be2d8 | 7995 | HAVE_GETENTROPY=1; |
c0c3707f CB |
7996 | HAVE_GETGROUPS=1; |
7997 | HAVE_GETHOSTNAME=1; | |
7998 | HAVE_GETLOGIN=1; | |
7999 | HAVE_GETPAGESIZE=1; | |
8000 | HAVE_GETPASS=1; | |
8001 | HAVE_GROUP_MEMBER=1; | |
8002 | HAVE_LCHOWN=1; | |
8003 | HAVE_LINK=1; | |
8004 | HAVE_LINKAT=1; | |
8005 | HAVE_PIPE=1; | |
8006 | HAVE_PIPE2=1; | |
8007 | HAVE_PREAD=1; | |
8008 | HAVE_PWRITE=1; | |
8009 | HAVE_READLINK=1; | |
8010 | HAVE_READLINKAT=1; | |
8011 | HAVE_SETHOSTNAME=1; | |
8012 | HAVE_SLEEP=1; | |
8013 | HAVE_SYMLINK=1; | |
8014 | HAVE_SYMLINKAT=1; | |
8015 | HAVE_UNLINKAT=1; | |
8016 | HAVE_USLEEP=1; | |
8017 | HAVE_DECL_ENVIRON=1; | |
8018 | HAVE_DECL_FCHDIR=1; | |
8019 | HAVE_DECL_FDATASYNC=1; | |
8020 | HAVE_DECL_GETDOMAINNAME=1; | |
8021 | HAVE_DECL_GETLOGIN=1; | |
8022 | HAVE_DECL_GETLOGIN_R=1; | |
8023 | HAVE_DECL_GETPAGESIZE=1; | |
8024 | HAVE_DECL_GETUSERSHELL=1; | |
8025 | HAVE_DECL_SETHOSTNAME=1; | |
8026 | HAVE_DECL_TRUNCATE=1; | |
8027 | HAVE_DECL_TTYNAME_R=1; | |
8028 | HAVE_OS_H=0; | |
8029 | HAVE_SYS_PARAM_H=0; | |
8030 | REPLACE_ACCESS=0; | |
8031 | REPLACE_CHOWN=0; | |
8032 | REPLACE_CLOSE=0; | |
8033 | REPLACE_DUP=0; | |
8034 | REPLACE_DUP2=0; | |
8035 | REPLACE_FACCESSAT=0; | |
8036 | REPLACE_FCHOWNAT=0; | |
8037 | REPLACE_FTRUNCATE=0; | |
8038 | REPLACE_GETCWD=0; | |
8039 | REPLACE_GETDOMAINNAME=0; | |
8040 | REPLACE_GETDTABLESIZE=0; | |
8041 | REPLACE_GETLOGIN_R=0; | |
8042 | REPLACE_GETGROUPS=0; | |
8043 | REPLACE_GETPAGESIZE=0; | |
8044 | REPLACE_GETPASS=0; | |
8045 | REPLACE_ISATTY=0; | |
8046 | REPLACE_LCHOWN=0; | |
8047 | REPLACE_LINK=0; | |
8048 | REPLACE_LINKAT=0; | |
8049 | REPLACE_LSEEK=0; | |
8050 | REPLACE_PREAD=0; | |
8051 | REPLACE_PWRITE=0; | |
8052 | REPLACE_READ=0; | |
8053 | REPLACE_READLINK=0; | |
8054 | REPLACE_READLINKAT=0; | |
8055 | REPLACE_RMDIR=0; | |
8056 | REPLACE_SLEEP=0; | |
8057 | REPLACE_SYMLINK=0; | |
8058 | REPLACE_SYMLINKAT=0; | |
8059 | REPLACE_TRUNCATE=0; | |
8060 | REPLACE_TTYNAME_R=0; | |
8061 | REPLACE_UNLINK=0; | |
8062 | REPLACE_UNLINKAT=0; | |
8063 | REPLACE_USLEEP=0; | |
8064 | REPLACE_WRITE=0; | |
698be2d8 | 8065 | UNISTD_H_HAVE_SYS_RANDOM_H=0; |
c0c3707f CB |
8066 | UNISTD_H_HAVE_WINSOCK2_H=0; |
8067 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
725e2999 | 8068 | |
725e2999 | 8069 | |
725e2999 JB |
8070 | |
8071 | ||
8072 | ||
725e2999 | 8073 | |
725e2999 | 8074 | |
725e2999 JB |
8075 | |
8076 | ||
c0c3707f CB |
8077 | |
8078 | ||
8079 | if test $ac_cv_func__set_invalid_parameter_handler = yes; then | |
8080 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 | |
8081 | ||
8082 | $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h | |
8083 | ||
725e2999 | 8084 | else |
c0c3707f | 8085 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 |
725e2999 JB |
8086 | fi |
8087 | ||
8088 | ||
8089 | ||
8090 | ||
8091 | ||
c0c3707f CB |
8092 | GNULIB_OPENDIR=0; |
8093 | GNULIB_READDIR=0; | |
8094 | GNULIB_REWINDDIR=0; | |
8095 | GNULIB_CLOSEDIR=0; | |
8096 | GNULIB_DIRFD=0; | |
8097 | GNULIB_FDOPENDIR=0; | |
8098 | GNULIB_SCANDIR=0; | |
8099 | GNULIB_ALPHASORT=0; | |
8100 | HAVE_OPENDIR=1; | |
8101 | HAVE_READDIR=1; | |
8102 | HAVE_REWINDDIR=1; | |
8103 | HAVE_CLOSEDIR=1; | |
8104 | HAVE_DECL_DIRFD=1; | |
8105 | HAVE_DECL_FDOPENDIR=1; | |
8106 | HAVE_FDOPENDIR=1; | |
8107 | HAVE_SCANDIR=1; | |
8108 | HAVE_ALPHASORT=1; | |
8109 | REPLACE_OPENDIR=0; | |
8110 | REPLACE_CLOSEDIR=0; | |
8111 | REPLACE_DIRFD=0; | |
8112 | REPLACE_FDOPENDIR=0; | |
725e2999 JB |
8113 | |
8114 | ||
698be2d8 CB |
8115 | GNULIB_ISBLANK=0; |
8116 | HAVE_ISBLANK=1; | |
8117 | ||
8118 | ||
725e2999 JB |
8119 | |
8120 | ||
725e2999 JB |
8121 | |
8122 | ||
8123 | ||
8124 | ||
725e2999 JB |
8125 | |
8126 | ||
c0c3707f CB |
8127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 |
8128 | $as_echo_n "checking if environ is properly declared... " >&6; } | |
8129 | if ${gt_cv_var_environ_declaration+:} false; then : | |
725e2999 JB |
8130 | $as_echo_n "(cached) " >&6 |
8131 | else | |
c0c3707f CB |
8132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8133 | /* end confdefs.h. */ | |
8134 | #if HAVE_UNISTD_H | |
8135 | #include <unistd.h> | |
8136 | #endif | |
8137 | /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ | |
8138 | #include <stdlib.h> | |
725e2999 | 8139 | |
c0c3707f CB |
8140 | extern struct { int foo; } environ; |
8141 | int | |
8142 | main () | |
8143 | { | |
8144 | environ.foo = 1; | |
8145 | ; | |
8146 | return 0; | |
8147 | } | |
8148 | _ACEOF | |
8149 | if ac_fn_c_try_compile "$LINENO"; then : | |
8150 | gt_cv_var_environ_declaration=no | |
8151 | else | |
8152 | gt_cv_var_environ_declaration=yes | |
725e2999 | 8153 | fi |
c0c3707f CB |
8154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8155 | fi | |
8156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 | |
8157 | $as_echo "$gt_cv_var_environ_declaration" >&6; } | |
8158 | if test $gt_cv_var_environ_declaration = yes; then | |
8159 | ||
8160 | $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |
725e2999 | 8161 | |
725e2999 | 8162 | fi |
725e2999 JB |
8163 | |
8164 | ||
c0c3707f CB |
8165 | if test $gt_cv_var_environ_declaration != yes; then |
8166 | HAVE_DECL_ENVIRON=0 | |
8167 | fi | |
6ec2e0f5 SDJ |
8168 | |
8169 | ||
8170 | ||
c0c3707f CB |
8171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 |
8172 | $as_echo_n "checking for complete errno.h... " >&6; } | |
8173 | if ${gl_cv_header_errno_h_complete+:} false; then : | |
8174 | $as_echo_n "(cached) " >&6 | |
8175 | else | |
6ec2e0f5 | 8176 | |
c0c3707f CB |
8177 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8178 | /* end confdefs.h. */ | |
472fa5ee | 8179 | |
c0c3707f CB |
8180 | #include <errno.h> |
8181 | #if !defined ETXTBSY | |
8182 | booboo | |
8183 | #endif | |
8184 | #if !defined ENOMSG | |
8185 | booboo | |
8186 | #endif | |
8187 | #if !defined EIDRM | |
8188 | booboo | |
8189 | #endif | |
8190 | #if !defined ENOLINK | |
8191 | booboo | |
8192 | #endif | |
8193 | #if !defined EPROTO | |
8194 | booboo | |
8195 | #endif | |
8196 | #if !defined EMULTIHOP | |
8197 | booboo | |
8198 | #endif | |
8199 | #if !defined EBADMSG | |
8200 | booboo | |
8201 | #endif | |
8202 | #if !defined EOVERFLOW | |
8203 | booboo | |
8204 | #endif | |
8205 | #if !defined ENOTSUP | |
8206 | booboo | |
8207 | #endif | |
8208 | #if !defined ENETRESET | |
8209 | booboo | |
8210 | #endif | |
8211 | #if !defined ECONNABORTED | |
8212 | booboo | |
8213 | #endif | |
8214 | #if !defined ESTALE | |
8215 | booboo | |
8216 | #endif | |
8217 | #if !defined EDQUOT | |
8218 | booboo | |
8219 | #endif | |
8220 | #if !defined ECANCELED | |
8221 | booboo | |
8222 | #endif | |
8223 | #if !defined EOWNERDEAD | |
8224 | booboo | |
8225 | #endif | |
8226 | #if !defined ENOTRECOVERABLE | |
8227 | booboo | |
8228 | #endif | |
8229 | #if !defined EILSEQ | |
8230 | booboo | |
8231 | #endif | |
472fa5ee | 8232 | |
c0c3707f CB |
8233 | _ACEOF |
8234 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8235 | $EGREP "booboo" >/dev/null 2>&1; then : | |
8236 | gl_cv_header_errno_h_complete=no | |
8237 | else | |
8238 | gl_cv_header_errno_h_complete=yes | |
5e8754f9 | 8239 | fi |
c0c3707f | 8240 | rm -f conftest* |
472fa5ee SM |
8241 | |
8242 | ||
c0c3707f CB |
8243 | fi |
8244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 | |
8245 | $as_echo "$gl_cv_header_errno_h_complete" >&6; } | |
8246 | if test $gl_cv_header_errno_h_complete = yes; then | |
8247 | ERRNO_H='' | |
8248 | else | |
472fa5ee SM |
8249 | |
8250 | ||
8251 | ||
8252 | ||
8253 | ||
472fa5ee SM |
8254 | |
8255 | ||
8256 | ||
c0c3707f CB |
8257 | if test $gl_cv_have_include_next = yes; then |
8258 | gl_cv_next_errno_h='<'errno.h'>' | |
8259 | else | |
8260 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5 | |
8261 | $as_echo_n "checking absolute name of <errno.h>... " >&6; } | |
8262 | if ${gl_cv_next_errno_h+:} false; then : | |
5e8754f9 SDJ |
8263 | $as_echo_n "(cached) " >&6 |
8264 | else | |
6ec2e0f5 | 8265 | |
6ec2e0f5 | 8266 | |
6ec2e0f5 | 8267 | |
c0c3707f CB |
8268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8269 | /* end confdefs.h. */ | |
8270 | #include <errno.h> | |
8271 | _ACEOF | |
8272 | case "$host_os" in | |
8273 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
8274 | *) gl_absname_cpp="$ac_cpp" ;; | |
8275 | esac | |
6ec2e0f5 | 8276 | |
c0c3707f CB |
8277 | case "$host_os" in |
8278 | mingw*) | |
8279 | gl_dirsep_regex='[/\\]' | |
8280 | ;; | |
8281 | *) | |
8282 | gl_dirsep_regex='\/' | |
8283 | ;; | |
8284 | esac | |
8285 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
8286 | gl_header_literal_regex=`echo 'errno.h' \ | |
8287 | | sed -e "$gl_make_literal_regex_sed"` | |
8288 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
8289 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
8290 | s|^/[^/]|//&| | |
8291 | p | |
8292 | q | |
8293 | }' | |
6ec2e0f5 | 8294 | |
c0c3707f CB |
8295 | gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
8296 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 8297 | |
c0c3707f CB |
8298 | gl_header=$gl_cv_absolute_errno_h |
8299 | gl_cv_next_errno_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
8300 | |
8301 | ||
c0c3707f CB |
8302 | fi |
8303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 | |
8304 | $as_echo "$gl_cv_next_errno_h" >&6; } | |
8305 | fi | |
8306 | NEXT_ERRNO_H=$gl_cv_next_errno_h | |
6ec2e0f5 | 8307 | |
c0c3707f CB |
8308 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
8309 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
8310 | gl_next_as_first_directive='<'errno.h'>' | |
8311 | else | |
8312 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
8313 | gl_next_as_first_directive=$gl_cv_next_errno_h | |
8314 | fi | |
8315 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive | |
6ec2e0f5 | 8316 | |
472fa5ee SM |
8317 | |
8318 | ||
8319 | ||
c0c3707f CB |
8320 | ERRNO_H='errno.h' |
8321 | fi | |
472fa5ee | 8322 | |
c0c3707f CB |
8323 | if test -n "$ERRNO_H"; then |
8324 | GL_GENERATE_ERRNO_H_TRUE= | |
8325 | GL_GENERATE_ERRNO_H_FALSE='#' | |
5e8754f9 | 8326 | else |
c0c3707f CB |
8327 | GL_GENERATE_ERRNO_H_TRUE='#' |
8328 | GL_GENERATE_ERRNO_H_FALSE= | |
8329 | fi | |
472fa5ee SM |
8330 | |
8331 | ||
c0c3707f CB |
8332 | if test -n "$ERRNO_H"; then |
8333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 | |
8334 | $as_echo_n "checking for EMULTIHOP value... " >&6; } | |
8335 | if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : | |
8336 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 8337 | else |
e26b6bb0 | 8338 | |
c0c3707f CB |
8339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8340 | /* end confdefs.h. */ | |
e26b6bb0 | 8341 | |
c0c3707f CB |
8342 | #include <errno.h> |
8343 | #ifdef EMULTIHOP | |
8344 | yes | |
88b48903 | 8345 | #endif |
88b48903 | 8346 | |
c0c3707f CB |
8347 | _ACEOF |
8348 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8349 | $EGREP "yes" >/dev/null 2>&1; then : | |
8350 | gl_cv_header_errno_h_EMULTIHOP=yes | |
8351 | else | |
8352 | gl_cv_header_errno_h_EMULTIHOP=no | |
8353 | fi | |
8354 | rm -f conftest* | |
88b48903 | 8355 | |
c0c3707f CB |
8356 | if test $gl_cv_header_errno_h_EMULTIHOP = no; then |
8357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8358 | /* end confdefs.h. */ | |
88b48903 | 8359 | |
c0c3707f CB |
8360 | #define _XOPEN_SOURCE_EXTENDED 1 |
8361 | #include <errno.h> | |
8362 | #ifdef EMULTIHOP | |
8363 | yes | |
8364 | #endif | |
88b48903 WN |
8365 | |
8366 | _ACEOF | |
c0c3707f CB |
8367 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8368 | $EGREP "yes" >/dev/null 2>&1; then : | |
8369 | gl_cv_header_errno_h_EMULTIHOP=hidden | |
88b48903 | 8370 | fi |
c0c3707f | 8371 | rm -f conftest* |
88b48903 | 8372 | |
c0c3707f CB |
8373 | if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then |
8374 | if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " | |
8375 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8376 | #include <errno.h> | |
8377 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8378 | #include <stdio.h> | |
8379 | #include <stdlib.h> | |
8380 | "; then : | |
88b48903 WN |
8381 | |
8382 | fi | |
88b48903 | 8383 | |
c0c3707f CB |
8384 | fi |
8385 | fi | |
88b48903 | 8386 | |
c0c3707f CB |
8387 | fi |
8388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 | |
8389 | $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } | |
8390 | case $gl_cv_header_errno_h_EMULTIHOP in | |
8391 | yes | no) | |
8392 | EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= | |
8393 | ;; | |
8394 | *) | |
8395 | EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" | |
8396 | ;; | |
8397 | esac | |
88b48903 | 8398 | |
e26b6bb0 | 8399 | |
c0c3707f | 8400 | fi |
e26b6bb0 | 8401 | |
3d99e817 | 8402 | |
c0c3707f CB |
8403 | if test -n "$ERRNO_H"; then |
8404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 | |
8405 | $as_echo_n "checking for ENOLINK value... " >&6; } | |
8406 | if ${gl_cv_header_errno_h_ENOLINK+:} false; then : | |
8407 | $as_echo_n "(cached) " >&6 | |
8408 | else | |
472fa5ee | 8409 | |
c0c3707f CB |
8410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8411 | /* end confdefs.h. */ | |
472fa5ee | 8412 | |
c0c3707f CB |
8413 | #include <errno.h> |
8414 | #ifdef ENOLINK | |
8415 | yes | |
8416 | #endif | |
472fa5ee | 8417 | |
c0c3707f CB |
8418 | _ACEOF |
8419 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8420 | $EGREP "yes" >/dev/null 2>&1; then : | |
8421 | gl_cv_header_errno_h_ENOLINK=yes | |
8422 | else | |
8423 | gl_cv_header_errno_h_ENOLINK=no | |
8424 | fi | |
8425 | rm -f conftest* | |
472fa5ee | 8426 | |
c0c3707f CB |
8427 | if test $gl_cv_header_errno_h_ENOLINK = no; then |
8428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8429 | /* end confdefs.h. */ | |
3d99e817 | 8430 | |
c0c3707f CB |
8431 | #define _XOPEN_SOURCE_EXTENDED 1 |
8432 | #include <errno.h> | |
8433 | #ifdef ENOLINK | |
8434 | yes | |
8435 | #endif | |
3d99e817 | 8436 | |
c0c3707f CB |
8437 | _ACEOF |
8438 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8439 | $EGREP "yes" >/dev/null 2>&1; then : | |
8440 | gl_cv_header_errno_h_ENOLINK=hidden | |
8441 | fi | |
8442 | rm -f conftest* | |
3d99e817 | 8443 | |
c0c3707f CB |
8444 | if test $gl_cv_header_errno_h_ENOLINK = hidden; then |
8445 | if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " | |
8446 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8447 | #include <errno.h> | |
8448 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8449 | #include <stdio.h> | |
8450 | #include <stdlib.h> | |
8451 | "; then : | |
3d99e817 | 8452 | |
c0c3707f | 8453 | fi |
3d99e817 | 8454 | |
c0c3707f CB |
8455 | fi |
8456 | fi | |
3d99e817 | 8457 | |
c0c3707f CB |
8458 | fi |
8459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 | |
8460 | $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } | |
8461 | case $gl_cv_header_errno_h_ENOLINK in | |
8462 | yes | no) | |
8463 | ENOLINK_HIDDEN=0; ENOLINK_VALUE= | |
8464 | ;; | |
8465 | *) | |
8466 | ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" | |
8467 | ;; | |
8468 | esac | |
18848e28 | 8469 | |
18848e28 | 8470 | |
c0c3707f | 8471 | fi |
18848e28 | 8472 | |
18848e28 | 8473 | |
c0c3707f CB |
8474 | if test -n "$ERRNO_H"; then |
8475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 | |
8476 | $as_echo_n "checking for EOVERFLOW value... " >&6; } | |
8477 | if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : | |
8478 | $as_echo_n "(cached) " >&6 | |
8479 | else | |
18848e28 | 8480 | |
c0c3707f CB |
8481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8482 | /* end confdefs.h. */ | |
18848e28 | 8483 | |
c0c3707f CB |
8484 | #include <errno.h> |
8485 | #ifdef EOVERFLOW | |
8486 | yes | |
8487 | #endif | |
18848e28 | 8488 | |
c0c3707f CB |
8489 | _ACEOF |
8490 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8491 | $EGREP "yes" >/dev/null 2>&1; then : | |
8492 | gl_cv_header_errno_h_EOVERFLOW=yes | |
8493 | else | |
8494 | gl_cv_header_errno_h_EOVERFLOW=no | |
8495 | fi | |
8496 | rm -f conftest* | |
18848e28 | 8497 | |
c0c3707f CB |
8498 | if test $gl_cv_header_errno_h_EOVERFLOW = no; then |
8499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8500 | /* end confdefs.h. */ | |
18848e28 | 8501 | |
c0c3707f CB |
8502 | #define _XOPEN_SOURCE_EXTENDED 1 |
8503 | #include <errno.h> | |
8504 | #ifdef EOVERFLOW | |
8505 | yes | |
8506 | #endif | |
18848e28 | 8507 | |
c0c3707f CB |
8508 | _ACEOF |
8509 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8510 | $EGREP "yes" >/dev/null 2>&1; then : | |
8511 | gl_cv_header_errno_h_EOVERFLOW=hidden | |
8512 | fi | |
8513 | rm -f conftest* | |
18848e28 | 8514 | |
c0c3707f CB |
8515 | if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then |
8516 | if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " | |
8517 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8518 | #include <errno.h> | |
8519 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8520 | #include <stdio.h> | |
8521 | #include <stdlib.h> | |
8522 | "; then : | |
18848e28 | 8523 | |
c0c3707f | 8524 | fi |
18848e28 | 8525 | |
c0c3707f CB |
8526 | fi |
8527 | fi | |
18848e28 | 8528 | |
c0c3707f CB |
8529 | fi |
8530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 | |
8531 | $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } | |
8532 | case $gl_cv_header_errno_h_EOVERFLOW in | |
8533 | yes | no) | |
8534 | EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= | |
8535 | ;; | |
8536 | *) | |
8537 | EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" | |
8538 | ;; | |
8539 | esac | |
4a626d0a PA |
8540 | |
8541 | ||
c0c3707f | 8542 | fi |
18848e28 | 8543 | |
4a626d0a | 8544 | |
c0c3707f CB |
8545 | ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" |
8546 | if test "x$ac_cv_have_decl_strerror_r" = xyes; then : | |
8547 | ac_have_decl=1 | |
8548 | else | |
8549 | ac_have_decl=0 | |
8550 | fi | |
4a626d0a | 8551 | |
c0c3707f CB |
8552 | cat >>confdefs.h <<_ACEOF |
8553 | #define HAVE_DECL_STRERROR_R $ac_have_decl | |
8554 | _ACEOF | |
4a626d0a | 8555 | |
c0c3707f CB |
8556 | for ac_func in strerror_r |
8557 | do : | |
8558 | ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" | |
8559 | if test "x$ac_cv_func_strerror_r" = xyes; then : | |
8560 | cat >>confdefs.h <<_ACEOF | |
8561 | #define HAVE_STRERROR_R 1 | |
8562 | _ACEOF | |
4a626d0a | 8563 | |
c0c3707f CB |
8564 | fi |
8565 | done | |
18848e28 | 8566 | |
c0c3707f CB |
8567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 |
8568 | $as_echo_n "checking whether strerror_r returns char *... " >&6; } | |
8569 | if ${ac_cv_func_strerror_r_char_p+:} false; then : | |
8570 | $as_echo_n "(cached) " >&6 | |
8571 | else | |
18848e28 | 8572 | |
c0c3707f CB |
8573 | ac_cv_func_strerror_r_char_p=no |
8574 | if test $ac_cv_have_decl_strerror_r = yes; then | |
8575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8576 | /* end confdefs.h. */ | |
8577 | $ac_includes_default | |
8578 | int | |
8579 | main () | |
8580 | { | |
18848e28 | 8581 | |
c0c3707f CB |
8582 | char buf[100]; |
8583 | char x = *strerror_r (0, buf, sizeof buf); | |
8584 | char *p = strerror_r (0, buf, sizeof buf); | |
8585 | return !p || x; | |
18848e28 | 8586 | |
c0c3707f CB |
8587 | ; |
8588 | return 0; | |
8589 | } | |
8590 | _ACEOF | |
8591 | if ac_fn_c_try_compile "$LINENO"; then : | |
8592 | ac_cv_func_strerror_r_char_p=yes | |
8593 | fi | |
8594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8595 | else | |
8596 | # strerror_r is not declared. Choose between | |
8597 | # systems that have relatively inaccessible declarations for the | |
8598 | # function. BeOS and DEC UNIX 4.0 fall in this category, but the | |
8599 | # former has a strerror_r that returns char*, while the latter | |
8600 | # has a strerror_r that returns `int'. | |
8601 | # This test should segfault on the DEC system. | |
8602 | if test "$cross_compiling" = yes; then : | |
8603 | : | |
8604 | else | |
8605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8606 | /* end confdefs.h. */ | |
8607 | $ac_includes_default | |
8608 | extern char *strerror_r (); | |
8609 | int | |
8610 | main () | |
8611 | { | |
8612 | char buf[100]; | |
8613 | char x = *strerror_r (0, buf, sizeof buf); | |
8614 | return ! isalpha (x); | |
8615 | ; | |
8616 | return 0; | |
8617 | } | |
8618 | _ACEOF | |
8619 | if ac_fn_c_try_run "$LINENO"; then : | |
8620 | ac_cv_func_strerror_r_char_p=yes | |
8621 | fi | |
8622 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8623 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8624 | fi | |
18848e28 | 8625 | |
c0c3707f | 8626 | fi |
18848e28 | 8627 | |
c0c3707f CB |
8628 | fi |
8629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 | |
8630 | $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } | |
8631 | if test $ac_cv_func_strerror_r_char_p = yes; then | |
18848e28 | 8632 | |
c0c3707f | 8633 | $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h |
18848e28 | 8634 | |
c0c3707f | 8635 | fi |
18848e28 | 8636 | |
18848e28 | 8637 | |
18848e28 | 8638 | |
18848e28 | 8639 | |
c0c3707f CB |
8640 | ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" |
8641 | if test "x$ac_cv_have_decl_fchdir" = xyes; then : | |
8642 | ac_have_decl=1 | |
8643 | else | |
8644 | ac_have_decl=0 | |
8645 | fi | |
18848e28 | 8646 | |
c0c3707f CB |
8647 | cat >>confdefs.h <<_ACEOF |
8648 | #define HAVE_DECL_FCHDIR $ac_have_decl | |
8649 | _ACEOF | |
18848e28 | 8650 | |
18848e28 | 8651 | |
c0c3707f CB |
8652 | GNULIB_CREAT=0; |
8653 | GNULIB_FCNTL=0; | |
8654 | GNULIB_NONBLOCKING=0; | |
8655 | GNULIB_OPEN=0; | |
8656 | GNULIB_OPENAT=0; | |
8657 | HAVE_FCNTL=1; | |
8658 | HAVE_OPENAT=1; | |
8659 | REPLACE_CREAT=0; | |
8660 | REPLACE_FCNTL=0; | |
8661 | REPLACE_OPEN=0; | |
8662 | REPLACE_OPENAT=0; | |
18848e28 | 8663 | |
18848e28 | 8664 | |
18848e28 | 8665 | |
18848e28 GF |
8666 | |
8667 | ||
18848e28 GF |
8668 | |
8669 | ||
18848e28 | 8670 | |
18848e28 | 8671 | |
18848e28 | 8672 | |
c0c3707f CB |
8673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 |
8674 | $as_echo_n "checking for working fcntl.h... " >&6; } | |
8675 | if ${gl_cv_header_working_fcntl_h+:} false; then : | |
8676 | $as_echo_n "(cached) " >&6 | |
8677 | else | |
8678 | if test "$cross_compiling" = yes; then : | |
8679 | case "$host_os" in | |
8680 | # Guess 'no' on native Windows. | |
8681 | mingw*) gl_cv_header_working_fcntl_h='no' ;; | |
8682 | *) gl_cv_header_working_fcntl_h=cross-compiling ;; | |
8683 | esac | |
18848e28 | 8684 | |
c0c3707f CB |
8685 | else |
8686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8687 | /* end confdefs.h. */ | |
8688 | #include <sys/types.h> | |
8689 | #include <sys/stat.h> | |
8690 | #if HAVE_UNISTD_H | |
8691 | # include <unistd.h> | |
8692 | #else /* on Windows with MSVC */ | |
8693 | # include <io.h> | |
8694 | # include <stdlib.h> | |
8695 | # defined sleep(n) _sleep ((n) * 1000) | |
8696 | #endif | |
8697 | #include <fcntl.h> | |
8698 | #ifndef O_NOATIME | |
8699 | #define O_NOATIME 0 | |
8700 | #endif | |
8701 | #ifndef O_NOFOLLOW | |
8702 | #define O_NOFOLLOW 0 | |
8703 | #endif | |
8704 | static int const constants[] = | |
8705 | { | |
8706 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, | |
8707 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY | |
8708 | }; | |
18848e28 | 8709 | |
c0c3707f CB |
8710 | int |
8711 | main () | |
8712 | { | |
18848e28 | 8713 | |
c0c3707f CB |
8714 | int result = !constants; |
8715 | #if HAVE_SYMLINK | |
8716 | { | |
8717 | static char const sym[] = "conftest.sym"; | |
8718 | if (symlink ("/dev/null", sym) != 0) | |
8719 | result |= 2; | |
8720 | else | |
8721 | { | |
8722 | int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); | |
8723 | if (fd >= 0) | |
8724 | { | |
8725 | close (fd); | |
8726 | result |= 4; | |
8727 | } | |
8728 | } | |
8729 | if (unlink (sym) != 0 || symlink (".", sym) != 0) | |
8730 | result |= 2; | |
8731 | else | |
8732 | { | |
8733 | int fd = open (sym, O_RDONLY | O_NOFOLLOW); | |
8734 | if (fd >= 0) | |
8735 | { | |
8736 | close (fd); | |
8737 | result |= 4; | |
8738 | } | |
8739 | } | |
8740 | unlink (sym); | |
8741 | } | |
8742 | #endif | |
8743 | { | |
8744 | static char const file[] = "confdefs.h"; | |
8745 | int fd = open (file, O_RDONLY | O_NOATIME); | |
8746 | if (fd < 0) | |
8747 | result |= 8; | |
8748 | else | |
8749 | { | |
8750 | struct stat st0; | |
8751 | if (fstat (fd, &st0) != 0) | |
8752 | result |= 16; | |
8753 | else | |
8754 | { | |
8755 | char c; | |
8756 | sleep (1); | |
8757 | if (read (fd, &c, 1) != 1) | |
8758 | result |= 24; | |
8759 | else | |
8760 | { | |
8761 | if (close (fd) != 0) | |
8762 | result |= 32; | |
8763 | else | |
8764 | { | |
8765 | struct stat st1; | |
8766 | if (stat (file, &st1) != 0) | |
8767 | result |= 40; | |
8768 | else | |
8769 | if (st0.st_atime != st1.st_atime) | |
8770 | result |= 64; | |
8771 | } | |
8772 | } | |
8773 | } | |
8774 | } | |
8775 | } | |
8776 | return result; | |
8777 | ; | |
8778 | return 0; | |
8779 | } | |
8780 | _ACEOF | |
8781 | if ac_fn_c_try_run "$LINENO"; then : | |
8782 | gl_cv_header_working_fcntl_h=yes | |
8783 | else | |
8784 | case $? in #( | |
8785 | 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( | |
8786 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( | |
8787 | 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( | |
8788 | *) gl_cv_header_working_fcntl_h='no';; | |
8789 | esac | |
8790 | fi | |
8791 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8792 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8793 | fi | |
18848e28 | 8794 | |
18848e28 | 8795 | |
c0c3707f CB |
8796 | fi |
8797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 | |
8798 | $as_echo "$gl_cv_header_working_fcntl_h" >&6; } | |
18848e28 | 8799 | |
c0c3707f CB |
8800 | case $gl_cv_header_working_fcntl_h in #( |
8801 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( | |
8802 | *) ac_val=1;; | |
8803 | esac | |
18848e28 | 8804 | |
c0c3707f CB |
8805 | cat >>confdefs.h <<_ACEOF |
8806 | #define HAVE_WORKING_O_NOATIME $ac_val | |
8807 | _ACEOF | |
18848e28 GF |
8808 | |
8809 | ||
c0c3707f CB |
8810 | case $gl_cv_header_working_fcntl_h in #( |
8811 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( | |
8812 | *) ac_val=1;; | |
8813 | esac | |
18848e28 | 8814 | |
c0c3707f CB |
8815 | cat >>confdefs.h <<_ACEOF |
8816 | #define HAVE_WORKING_O_NOFOLLOW $ac_val | |
8817 | _ACEOF | |
18848e28 | 8818 | |
63ce7108 | 8819 | |
c0c3707f CB |
8820 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
8821 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
63ce7108 | 8822 | |
c0c3707f | 8823 | else |
63ce7108 | 8824 | |
c0c3707f CB |
8825 | cat >>confdefs.h <<_ACEOF |
8826 | #define pid_t int | |
8827 | _ACEOF | |
63ce7108 | 8828 | |
c0c3707f | 8829 | fi |
63ce7108 | 8830 | |
c0c3707f CB |
8831 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
8832 | if test "x$ac_cv_type_mode_t" = xyes; then : | |
63ce7108 | 8833 | |
c0c3707f | 8834 | else |
63ce7108 | 8835 | |
c0c3707f CB |
8836 | cat >>confdefs.h <<_ACEOF |
8837 | #define mode_t int | |
8838 | _ACEOF | |
63ce7108 | 8839 | |
c0c3707f | 8840 | fi |
63ce7108 | 8841 | |
472fa5ee SM |
8842 | |
8843 | ||
8844 | ||
8845 | ||
8846 | ||
c0c3707f CB |
8847 | GNULIB_FNMATCH=0; |
8848 | HAVE_FNMATCH=1; | |
8849 | REPLACE_FNMATCH=0; | |
472fa5ee SM |
8850 | |
8851 | ||
8852 | ||
8853 | ||
8854 | ||
8855 | ||
472fa5ee SM |
8856 | |
8857 | ||
472fa5ee SM |
8858 | |
8859 | ||
8860 | ||
8861 | ||
8862 | ||
8863 | ||
8864 | ||
8865 | ||
7a6dbc2f | 8866 | if test $gl_cv_have_include_next = yes; then |
c0c3707f | 8867 | gl_cv_next_fnmatch_h='<'fnmatch.h'>' |
7a6dbc2f | 8868 | else |
c0c3707f CB |
8869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5 |
8870 | $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; } | |
8871 | if ${gl_cv_next_fnmatch_h+:} false; then : | |
7a6dbc2f SDJ |
8872 | $as_echo_n "(cached) " >&6 |
8873 | else | |
472fa5ee | 8874 | |
c0c3707f CB |
8875 | if test $ac_cv_header_fnmatch_h = yes; then |
8876 | ||
8877 | ||
472fa5ee SM |
8878 | |
8879 | ||
7a6dbc2f SDJ |
8880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8881 | /* end confdefs.h. */ | |
c0c3707f | 8882 | #include <fnmatch.h> |
7a6dbc2f SDJ |
8883 | _ACEOF |
8884 | case "$host_os" in | |
8885 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
8886 | *) gl_absname_cpp="$ac_cpp" ;; | |
8887 | esac | |
472fa5ee | 8888 | |
7a6dbc2f SDJ |
8889 | case "$host_os" in |
8890 | mingw*) | |
8891 | gl_dirsep_regex='[/\\]' | |
8892 | ;; | |
8893 | *) | |
8894 | gl_dirsep_regex='\/' | |
8895 | ;; | |
8896 | esac | |
8897 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 8898 | gl_header_literal_regex=`echo 'fnmatch.h' \ |
7a6dbc2f SDJ |
8899 | | sed -e "$gl_make_literal_regex_sed"` |
8900 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
8901 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
8902 | s|^/[^/]|//&| | |
8903 | p | |
8904 | q | |
8905 | }' | |
8906 | ||
c0c3707f | 8907 | gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
7a6dbc2f SDJ |
8908 | sed -n "$gl_absolute_header_sed"` |
8909 | ||
c0c3707f CB |
8910 | gl_header=$gl_cv_absolute_fnmatch_h |
8911 | gl_cv_next_fnmatch_h='"'$gl_header'"' | |
8912 | else | |
8913 | gl_cv_next_fnmatch_h='<'fnmatch.h'>' | |
8914 | fi | |
7a6dbc2f SDJ |
8915 | |
8916 | ||
8917 | fi | |
c0c3707f CB |
8918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5 |
8919 | $as_echo "$gl_cv_next_fnmatch_h" >&6; } | |
7a6dbc2f | 8920 | fi |
c0c3707f | 8921 | NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h |
7a6dbc2f SDJ |
8922 | |
8923 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
8924 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 8925 | gl_next_as_first_directive='<'fnmatch.h'>' |
7a6dbc2f SDJ |
8926 | else |
8927 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f | 8928 | gl_next_as_first_directive=$gl_cv_next_fnmatch_h |
7a6dbc2f | 8929 | fi |
c0c3707f | 8930 | NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive |
7a6dbc2f SDJ |
8931 | |
8932 | ||
8933 | ||
8934 | ||
7a6dbc2f | 8935 | |
7a6dbc2f SDJ |
8936 | |
8937 | ||
c0c3707f CB |
8938 | if test $ac_cv_header_fnmatch_h = yes; then |
8939 | HAVE_FNMATCH_H=1 | |
8940 | else | |
8941 | HAVE_FNMATCH_H=0 | |
8942 | fi | |
7a6dbc2f SDJ |
8943 | |
8944 | ||
c0c3707f CB |
8945 | FNMATCH_H='' |
8946 | if false; then | |
8947 | FNMATCH_H=fnmatch.h | |
8948 | else | |
8949 | if test $ac_cv_header_fnmatch_h != yes; then | |
8950 | FNMATCH_H=fnmatch.h | |
8951 | fi | |
8952 | fi | |
7a6dbc2f | 8953 | |
c0c3707f CB |
8954 | |
8955 | if test -n "$FNMATCH_H"; then | |
8956 | GL_GENERATE_FNMATCH_H_TRUE= | |
8957 | GL_GENERATE_FNMATCH_H_FALSE='#' | |
7a6dbc2f | 8958 | else |
c0c3707f CB |
8959 | GL_GENERATE_FNMATCH_H_TRUE='#' |
8960 | GL_GENERATE_FNMATCH_H_FALSE= | |
7a6dbc2f | 8961 | fi |
7a6dbc2f | 8962 | |
7a6dbc2f | 8963 | |
7a6dbc2f | 8964 | |
7a6dbc2f SDJ |
8965 | |
8966 | ||
8967 | ||
8968 | ||
8969 | ||
8970 | ||
8971 | ||
c0c3707f CB |
8972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
8973 | $as_echo_n "checking for mbstate_t... " >&6; } | |
8974 | if ${ac_cv_type_mbstate_t+:} false; then : | |
5e8754f9 SDJ |
8975 | $as_echo_n "(cached) " >&6 |
8976 | else | |
c0c3707f | 8977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e8754f9 | 8978 | /* end confdefs.h. */ |
c0c3707f CB |
8979 | $ac_includes_default |
8980 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
8981 | <wchar.h>. | |
8982 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8983 | included before <wchar.h>. */ | |
8984 | #include <stddef.h> | |
8985 | #include <stdio.h> | |
8986 | #include <time.h> | |
8987 | #include <wchar.h> | |
8988 | int | |
8989 | main () | |
8990 | { | |
8991 | mbstate_t x; return sizeof x; | |
8992 | ; | |
8993 | return 0; | |
8994 | } | |
5e8754f9 | 8995 | _ACEOF |
c0c3707f CB |
8996 | if ac_fn_c_try_compile "$LINENO"; then : |
8997 | ac_cv_type_mbstate_t=yes | |
5e8754f9 | 8998 | else |
c0c3707f | 8999 | ac_cv_type_mbstate_t=no |
5e8754f9 | 9000 | fi |
c0c3707f CB |
9001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9002 | fi | |
9003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
9004 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
9005 | if test $ac_cv_type_mbstate_t = yes; then | |
5e8754f9 | 9006 | |
c0c3707f | 9007 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
5e8754f9 | 9008 | |
c0c3707f | 9009 | else |
5e8754f9 | 9010 | |
c0c3707f | 9011 | $as_echo "#define mbstate_t int" >>confdefs.h |
5e8754f9 | 9012 | |
c0c3707f | 9013 | fi |
5e8754f9 SDJ |
9014 | |
9015 | ||
9016 | ||
9017 | ||
5e8754f9 SDJ |
9018 | GNULIB_ACOSF=0; |
9019 | GNULIB_ACOSL=0; | |
9020 | GNULIB_ASINF=0; | |
9021 | GNULIB_ASINL=0; | |
9022 | GNULIB_ATANF=0; | |
9023 | GNULIB_ATANL=0; | |
9024 | GNULIB_ATAN2F=0; | |
9025 | GNULIB_CBRT=0; | |
9026 | GNULIB_CBRTF=0; | |
9027 | GNULIB_CBRTL=0; | |
9028 | GNULIB_CEIL=0; | |
9029 | GNULIB_CEILF=0; | |
9030 | GNULIB_CEILL=0; | |
9031 | GNULIB_COPYSIGN=0; | |
9032 | GNULIB_COPYSIGNF=0; | |
9033 | GNULIB_COPYSIGNL=0; | |
9034 | GNULIB_COSF=0; | |
9035 | GNULIB_COSL=0; | |
9036 | GNULIB_COSHF=0; | |
9037 | GNULIB_EXPF=0; | |
9038 | GNULIB_EXPL=0; | |
9039 | GNULIB_EXP2=0; | |
9040 | GNULIB_EXP2F=0; | |
9041 | GNULIB_EXP2L=0; | |
9042 | GNULIB_EXPM1=0; | |
9043 | GNULIB_EXPM1F=0; | |
9044 | GNULIB_EXPM1L=0; | |
9045 | GNULIB_FABSF=0; | |
9046 | GNULIB_FABSL=0; | |
9047 | GNULIB_FLOOR=0; | |
9048 | GNULIB_FLOORF=0; | |
9049 | GNULIB_FLOORL=0; | |
9050 | GNULIB_FMA=0; | |
9051 | GNULIB_FMAF=0; | |
9052 | GNULIB_FMAL=0; | |
9053 | GNULIB_FMOD=0; | |
9054 | GNULIB_FMODF=0; | |
9055 | GNULIB_FMODL=0; | |
9056 | GNULIB_FREXPF=0; | |
9057 | GNULIB_FREXP=0; | |
9058 | GNULIB_FREXPL=0; | |
9059 | GNULIB_HYPOT=0; | |
9060 | GNULIB_HYPOTF=0; | |
9061 | GNULIB_HYPOTL=0; | |
9062 | GNULIB_ILOGB=0; | |
9063 | GNULIB_ILOGBF=0; | |
9064 | GNULIB_ILOGBL=0; | |
9065 | GNULIB_ISFINITE=0; | |
9066 | GNULIB_ISINF=0; | |
9067 | GNULIB_ISNAN=0; | |
9068 | GNULIB_ISNANF=0; | |
9069 | GNULIB_ISNAND=0; | |
9070 | GNULIB_ISNANL=0; | |
9071 | GNULIB_LDEXPF=0; | |
9072 | GNULIB_LDEXPL=0; | |
9073 | GNULIB_LOG=0; | |
9074 | GNULIB_LOGF=0; | |
9075 | GNULIB_LOGL=0; | |
9076 | GNULIB_LOG10=0; | |
9077 | GNULIB_LOG10F=0; | |
9078 | GNULIB_LOG10L=0; | |
9079 | GNULIB_LOG1P=0; | |
9080 | GNULIB_LOG1PF=0; | |
9081 | GNULIB_LOG1PL=0; | |
9082 | GNULIB_LOG2=0; | |
9083 | GNULIB_LOG2F=0; | |
9084 | GNULIB_LOG2L=0; | |
9085 | GNULIB_LOGB=0; | |
9086 | GNULIB_LOGBF=0; | |
9087 | GNULIB_LOGBL=0; | |
9088 | GNULIB_MODF=0; | |
9089 | GNULIB_MODFF=0; | |
9090 | GNULIB_MODFL=0; | |
9091 | GNULIB_POWF=0; | |
9092 | GNULIB_REMAINDER=0; | |
9093 | GNULIB_REMAINDERF=0; | |
9094 | GNULIB_REMAINDERL=0; | |
9095 | GNULIB_RINT=0; | |
9096 | GNULIB_RINTF=0; | |
9097 | GNULIB_RINTL=0; | |
9098 | GNULIB_ROUND=0; | |
9099 | GNULIB_ROUNDF=0; | |
9100 | GNULIB_ROUNDL=0; | |
9101 | GNULIB_SIGNBIT=0; | |
9102 | GNULIB_SINF=0; | |
9103 | GNULIB_SINL=0; | |
9104 | GNULIB_SINHF=0; | |
9105 | GNULIB_SQRTF=0; | |
9106 | GNULIB_SQRTL=0; | |
9107 | GNULIB_TANF=0; | |
9108 | GNULIB_TANL=0; | |
9109 | GNULIB_TANHF=0; | |
9110 | GNULIB_TRUNC=0; | |
9111 | GNULIB_TRUNCF=0; | |
9112 | GNULIB_TRUNCL=0; | |
9113 | HAVE_ACOSF=1; | |
9114 | HAVE_ACOSL=1; | |
9115 | HAVE_ASINF=1; | |
9116 | HAVE_ASINL=1; | |
9117 | HAVE_ATANF=1; | |
9118 | HAVE_ATANL=1; | |
9119 | HAVE_ATAN2F=1; | |
9120 | HAVE_CBRT=1; | |
9121 | HAVE_CBRTF=1; | |
9122 | HAVE_CBRTL=1; | |
9123 | HAVE_COPYSIGN=1; | |
9124 | HAVE_COPYSIGNL=1; | |
9125 | HAVE_COSF=1; | |
9126 | HAVE_COSL=1; | |
9127 | HAVE_COSHF=1; | |
9128 | HAVE_EXPF=1; | |
9129 | HAVE_EXPL=1; | |
9130 | HAVE_EXPM1=1; | |
9131 | HAVE_EXPM1F=1; | |
9132 | HAVE_FABSF=1; | |
9133 | HAVE_FABSL=1; | |
9134 | HAVE_FMA=1; | |
9135 | HAVE_FMAF=1; | |
9136 | HAVE_FMAL=1; | |
9137 | HAVE_FMODF=1; | |
9138 | HAVE_FMODL=1; | |
9139 | HAVE_FREXPF=1; | |
9140 | HAVE_HYPOTF=1; | |
9141 | HAVE_HYPOTL=1; | |
9142 | HAVE_ILOGB=1; | |
9143 | HAVE_ILOGBF=1; | |
9144 | HAVE_ILOGBL=1; | |
9145 | HAVE_ISNANF=1; | |
9146 | HAVE_ISNAND=1; | |
9147 | HAVE_ISNANL=1; | |
9148 | HAVE_LDEXPF=1; | |
9149 | HAVE_LOGF=1; | |
9150 | HAVE_LOGL=1; | |
9151 | HAVE_LOG10F=1; | |
9152 | HAVE_LOG10L=1; | |
9153 | HAVE_LOG1P=1; | |
9154 | HAVE_LOG1PF=1; | |
9155 | HAVE_LOG1PL=1; | |
9156 | HAVE_LOGBF=1; | |
9157 | HAVE_LOGBL=1; | |
9158 | HAVE_MODFF=1; | |
9159 | HAVE_MODFL=1; | |
9160 | HAVE_POWF=1; | |
9161 | HAVE_REMAINDER=1; | |
9162 | HAVE_REMAINDERF=1; | |
9163 | HAVE_RINT=1; | |
9164 | HAVE_RINTL=1; | |
9165 | HAVE_SINF=1; | |
9166 | HAVE_SINL=1; | |
9167 | HAVE_SINHF=1; | |
9168 | HAVE_SQRTF=1; | |
9169 | HAVE_SQRTL=1; | |
9170 | HAVE_TANF=1; | |
9171 | HAVE_TANL=1; | |
9172 | HAVE_TANHF=1; | |
9173 | HAVE_DECL_ACOSL=1; | |
9174 | HAVE_DECL_ASINL=1; | |
9175 | HAVE_DECL_ATANL=1; | |
9176 | HAVE_DECL_CBRTF=1; | |
9177 | HAVE_DECL_CBRTL=1; | |
9178 | HAVE_DECL_CEILF=1; | |
9179 | HAVE_DECL_CEILL=1; | |
9180 | HAVE_DECL_COPYSIGNF=1; | |
9181 | HAVE_DECL_COSL=1; | |
9182 | HAVE_DECL_EXPL=1; | |
9183 | HAVE_DECL_EXP2=1; | |
9184 | HAVE_DECL_EXP2F=1; | |
9185 | HAVE_DECL_EXP2L=1; | |
9186 | HAVE_DECL_EXPM1L=1; | |
9187 | HAVE_DECL_FLOORF=1; | |
9188 | HAVE_DECL_FLOORL=1; | |
9189 | HAVE_DECL_FREXPL=1; | |
9190 | HAVE_DECL_LDEXPL=1; | |
9191 | HAVE_DECL_LOGL=1; | |
9192 | HAVE_DECL_LOG10L=1; | |
9193 | HAVE_DECL_LOG2=1; | |
9194 | HAVE_DECL_LOG2F=1; | |
9195 | HAVE_DECL_LOG2L=1; | |
9196 | HAVE_DECL_LOGB=1; | |
9197 | HAVE_DECL_REMAINDER=1; | |
9198 | HAVE_DECL_REMAINDERL=1; | |
9199 | HAVE_DECL_RINTF=1; | |
9200 | HAVE_DECL_ROUND=1; | |
9201 | HAVE_DECL_ROUNDF=1; | |
9202 | HAVE_DECL_ROUNDL=1; | |
9203 | HAVE_DECL_SINL=1; | |
9204 | HAVE_DECL_SQRTL=1; | |
9205 | HAVE_DECL_TANL=1; | |
9206 | HAVE_DECL_TRUNC=1; | |
9207 | HAVE_DECL_TRUNCF=1; | |
9208 | HAVE_DECL_TRUNCL=1; | |
c0c3707f CB |
9209 | REPLACE_ACOSF=0; |
9210 | REPLACE_ASINF=0; | |
9211 | REPLACE_ATANF=0; | |
9212 | REPLACE_ATAN2F=0; | |
5e8754f9 SDJ |
9213 | REPLACE_CBRTF=0; |
9214 | REPLACE_CBRTL=0; | |
9215 | REPLACE_CEIL=0; | |
9216 | REPLACE_CEILF=0; | |
9217 | REPLACE_CEILL=0; | |
c0c3707f CB |
9218 | REPLACE_COSF=0; |
9219 | REPLACE_COSHF=0; | |
9220 | REPLACE_EXPF=0; | |
9221 | REPLACE_EXPL=0; | |
5e8754f9 SDJ |
9222 | REPLACE_EXPM1=0; |
9223 | REPLACE_EXPM1F=0; | |
c0c3707f | 9224 | REPLACE_EXPM1L=0; |
5e8754f9 SDJ |
9225 | REPLACE_EXP2=0; |
9226 | REPLACE_EXP2L=0; | |
9227 | REPLACE_FABSL=0; | |
9228 | REPLACE_FLOOR=0; | |
9229 | REPLACE_FLOORF=0; | |
9230 | REPLACE_FLOORL=0; | |
9231 | REPLACE_FMA=0; | |
9232 | REPLACE_FMAF=0; | |
9233 | REPLACE_FMAL=0; | |
9234 | REPLACE_FMOD=0; | |
9235 | REPLACE_FMODF=0; | |
9236 | REPLACE_FMODL=0; | |
9237 | REPLACE_FREXPF=0; | |
9238 | REPLACE_FREXP=0; | |
9239 | REPLACE_FREXPL=0; | |
9240 | REPLACE_HUGE_VAL=0; | |
9241 | REPLACE_HYPOT=0; | |
9242 | REPLACE_HYPOTF=0; | |
9243 | REPLACE_HYPOTL=0; | |
9244 | REPLACE_ILOGB=0; | |
9245 | REPLACE_ILOGBF=0; | |
c0c3707f | 9246 | REPLACE_ILOGBL=0; |
5e8754f9 SDJ |
9247 | REPLACE_ISFINITE=0; |
9248 | REPLACE_ISINF=0; | |
9249 | REPLACE_ISNAN=0; | |
9250 | REPLACE_LDEXPL=0; | |
9251 | REPLACE_LOG=0; | |
9252 | REPLACE_LOGF=0; | |
9253 | REPLACE_LOGL=0; | |
9254 | REPLACE_LOG10=0; | |
9255 | REPLACE_LOG10F=0; | |
9256 | REPLACE_LOG10L=0; | |
9257 | REPLACE_LOG1P=0; | |
9258 | REPLACE_LOG1PF=0; | |
9259 | REPLACE_LOG1PL=0; | |
9260 | REPLACE_LOG2=0; | |
9261 | REPLACE_LOG2F=0; | |
9262 | REPLACE_LOG2L=0; | |
9263 | REPLACE_LOGB=0; | |
9264 | REPLACE_LOGBF=0; | |
9265 | REPLACE_LOGBL=0; | |
9266 | REPLACE_MODF=0; | |
9267 | REPLACE_MODFF=0; | |
9268 | REPLACE_MODFL=0; | |
9269 | REPLACE_NAN=0; | |
9270 | REPLACE_REMAINDER=0; | |
9271 | REPLACE_REMAINDERF=0; | |
9272 | REPLACE_REMAINDERL=0; | |
c0c3707f | 9273 | REPLACE_RINTL=0; |
5e8754f9 | 9274 | REPLACE_ROUND=0; |
c0c3707f CB |
9275 | REPLACE_ROUNDF=0; |
9276 | REPLACE_ROUNDL=0; | |
9277 | REPLACE_SIGNBIT=0; | |
9278 | REPLACE_SIGNBIT_USING_GCC=0; | |
9279 | REPLACE_SINF=0; | |
9280 | REPLACE_SINHF=0; | |
9281 | REPLACE_SQRTF=0; | |
9282 | REPLACE_SQRTL=0; | |
9283 | REPLACE_TANF=0; | |
9284 | REPLACE_TANHF=0; | |
9285 | REPLACE_TRUNC=0; | |
9286 | REPLACE_TRUNCF=0; | |
9287 | REPLACE_TRUNCL=0; | |
49e4877c | 9288 | |
49e4877c | 9289 | |
c0c3707f CB |
9290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 |
9291 | $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } | |
9292 | if ${gl_cv_func_frexp_no_libm+:} false; then : | |
9293 | $as_echo_n "(cached) " >&6 | |
9294 | else | |
8690e634 | 9295 | |
c0c3707f CB |
9296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9297 | /* end confdefs.h. */ | |
9298 | #include <math.h> | |
9299 | double x; | |
9300 | int | |
9301 | main () | |
9302 | { | |
9303 | int e; return frexp (x, &e) > 0; | |
9304 | ; | |
9305 | return 0; | |
9306 | } | |
9307 | _ACEOF | |
9308 | if ac_fn_c_try_link "$LINENO"; then : | |
9309 | gl_cv_func_frexp_no_libm=yes | |
9310 | else | |
9311 | gl_cv_func_frexp_no_libm=no | |
9312 | fi | |
9313 | rm -f core conftest.err conftest.$ac_objext \ | |
9314 | conftest$ac_exeext conftest.$ac_ext | |
8690e634 | 9315 | |
c0c3707f CB |
9316 | fi |
9317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 | |
9318 | $as_echo "$gl_cv_func_frexp_no_libm" >&6; } | |
8690e634 | 9319 | |
c0c3707f CB |
9320 | ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" |
9321 | if test "x$ac_cv_have_decl_alarm" = xyes; then : | |
9322 | ac_have_decl=1 | |
9323 | else | |
9324 | ac_have_decl=0 | |
9325 | fi | |
472fa5ee | 9326 | |
c0c3707f CB |
9327 | cat >>confdefs.h <<_ACEOF |
9328 | #define HAVE_DECL_ALARM $ac_have_decl | |
9329 | _ACEOF | |
472fa5ee SM |
9330 | |
9331 | ||
9332 | ||
9333 | ||
c0c3707f CB |
9334 | FREXP_LIBM= |
9335 | if test $gl_cv_func_frexp_no_libm = no; then | |
9336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5 | |
9337 | $as_echo_n "checking whether frexp() can be used with libm... " >&6; } | |
9338 | if ${gl_cv_func_frexp_in_libm+:} false; then : | |
9339 | $as_echo_n "(cached) " >&6 | |
9340 | else | |
8690e634 | 9341 | |
c0c3707f CB |
9342 | save_LIBS="$LIBS" |
9343 | LIBS="$LIBS -lm" | |
9344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9345 | /* end confdefs.h. */ | |
9346 | #include <math.h> | |
9347 | double x; | |
9348 | int | |
9349 | main () | |
9350 | { | |
9351 | int e; return frexp (x, &e) > 0; | |
9352 | ; | |
9353 | return 0; | |
9354 | } | |
9355 | _ACEOF | |
9356 | if ac_fn_c_try_link "$LINENO"; then : | |
9357 | gl_cv_func_frexp_in_libm=yes | |
9358 | else | |
9359 | gl_cv_func_frexp_in_libm=no | |
9360 | fi | |
9361 | rm -f core conftest.err conftest.$ac_objext \ | |
9362 | conftest$ac_exeext conftest.$ac_ext | |
9363 | LIBS="$save_LIBS" | |
8690e634 | 9364 | |
c0c3707f CB |
9365 | fi |
9366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5 | |
9367 | $as_echo "$gl_cv_func_frexp_in_libm" >&6; } | |
9368 | if test $gl_cv_func_frexp_in_libm = yes; then | |
9369 | FREXP_LIBM=-lm | |
9370 | fi | |
6ec2e0f5 | 9371 | fi |
c0c3707f CB |
9372 | if test $gl_cv_func_frexp_no_libm = yes \ |
9373 | || test $gl_cv_func_frexp_in_libm = yes; then | |
9374 | save_LIBS="$LIBS" | |
9375 | LIBS="$LIBS $FREXP_LIBM" | |
8690e634 JK |
9376 | |
9377 | ||
8690e634 | 9378 | |
c0c3707f CB |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 |
9380 | $as_echo_n "checking whether frexp works... " >&6; } | |
9381 | if ${gl_cv_func_frexp_works+:} false; then : | |
9382 | $as_echo_n "(cached) " >&6 | |
9383 | else | |
8690e634 | 9384 | |
c0c3707f CB |
9385 | if test "$cross_compiling" = yes; then : |
9386 | case "$host_os" in | |
9387 | netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; | |
9388 | mingw*) # Guess yes with MSVC, no with mingw. | |
9389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9390 | /* end confdefs.h. */ | |
8690e634 | 9391 | |
c0c3707f CB |
9392 | #ifdef _MSC_VER |
9393 | Good | |
9394 | #endif | |
8690e634 | 9395 | |
c0c3707f CB |
9396 | _ACEOF |
9397 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9398 | $EGREP "Good" >/dev/null 2>&1; then : | |
9399 | gl_cv_func_frexp_works="guessing yes" | |
9400 | else | |
9401 | gl_cv_func_frexp_works="guessing no" | |
9402 | fi | |
9403 | rm -f conftest* | |
8690e634 | 9404 | |
c0c3707f CB |
9405 | ;; |
9406 | *) gl_cv_func_frexp_works="guessing yes" ;; | |
9407 | esac | |
8690e634 | 9408 | |
c0c3707f CB |
9409 | else |
9410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9411 | /* end confdefs.h. */ | |
8690e634 | 9412 | |
c0c3707f CB |
9413 | #include <float.h> |
9414 | #include <math.h> | |
9415 | #include <string.h> | |
9416 | #if HAVE_DECL_ALARM | |
9417 | # include <signal.h> | |
9418 | # include <unistd.h> | |
9419 | #endif | |
9420 | /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. | |
9421 | ICC 10.0 has a bug when optimizing the expression -zero. | |
9422 | The expression -DBL_MIN * DBL_MIN does not work when cross-compiling | |
9423 | to PowerPC on Mac OS X 10.5. */ | |
9424 | #if defined __hpux || defined __sgi || defined __ICC | |
9425 | static double | |
9426 | compute_minus_zero (void) | |
9427 | { | |
9428 | return -DBL_MIN * DBL_MIN; | |
9429 | } | |
9430 | # define minus_zero compute_minus_zero () | |
9431 | #else | |
9432 | double minus_zero = -0.0; | |
9433 | #endif | |
9434 | int main() | |
9435 | { | |
9436 | int result = 0; | |
9437 | int i; | |
9438 | volatile double x; | |
9439 | double zero = 0.0; | |
9440 | #if HAVE_DECL_ALARM | |
9441 | /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite | |
9442 | number. Let the test fail in this case. */ | |
9443 | signal (SIGALRM, SIG_DFL); | |
9444 | alarm (5); | |
9445 | #endif | |
9446 | /* Test on denormalized numbers. */ | |
9447 | for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) | |
9448 | ; | |
9449 | if (x > 0.0) | |
9450 | { | |
9451 | int exp; | |
9452 | double y = frexp (x, &exp); | |
9453 | /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. | |
9454 | On NetBSD: y = 0.75. Correct: y = 0.5. */ | |
9455 | if (y != 0.5) | |
9456 | result |= 1; | |
9457 | } | |
9458 | /* Test on infinite numbers. */ | |
9459 | x = 1.0 / zero; | |
9460 | { | |
9461 | int exp; | |
9462 | double y = frexp (x, &exp); | |
9463 | if (y != x) | |
9464 | result |= 2; | |
9465 | } | |
9466 | /* Test on negative zero. */ | |
9467 | x = minus_zero; | |
9468 | { | |
9469 | int exp; | |
9470 | double y = frexp (x, &exp); | |
9471 | if (memcmp (&y, &x, sizeof x)) | |
9472 | result |= 4; | |
9473 | } | |
9474 | return result; | |
9475 | } | |
9476 | _ACEOF | |
9477 | if ac_fn_c_try_run "$LINENO"; then : | |
9478 | gl_cv_func_frexp_works=yes | |
9479 | else | |
9480 | gl_cv_func_frexp_works=no | |
9481 | fi | |
9482 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9483 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9484 | fi | |
472fa5ee SM |
9485 | |
9486 | ||
c0c3707f CB |
9487 | fi |
9488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 | |
9489 | $as_echo "$gl_cv_func_frexp_works" >&6; } | |
472fa5ee | 9490 | |
c0c3707f CB |
9491 | LIBS="$save_LIBS" |
9492 | case "$gl_cv_func_frexp_works" in | |
9493 | *yes) gl_func_frexp=yes ;; | |
9494 | *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; | |
9495 | esac | |
9496 | else | |
9497 | gl_func_frexp=no | |
9498 | fi | |
9499 | if test $gl_func_frexp = yes; then | |
472fa5ee | 9500 | |
c0c3707f | 9501 | $as_echo "#define HAVE_FREXP 1" >>confdefs.h |
472fa5ee | 9502 | |
c0c3707f | 9503 | fi |
8690e634 | 9504 | |
6ec2e0f5 SDJ |
9505 | |
9506 | ||
c0c3707f CB |
9507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 |
9508 | $as_echo_n "checking whether long double and double are the same... " >&6; } | |
9509 | if ${gl_cv_long_double_equals_double+:} false; then : | |
8690e634 JK |
9510 | $as_echo_n "(cached) " >&6 |
9511 | else | |
c0c3707f CB |
9512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9513 | /* end confdefs.h. */ | |
9514 | #include <float.h> | |
9515 | int | |
9516 | main () | |
9517 | { | |
9518 | typedef int check[sizeof (long double) == sizeof (double) | |
9519 | && LDBL_MANT_DIG == DBL_MANT_DIG | |
9520 | && LDBL_MAX_EXP == DBL_MAX_EXP | |
9521 | && LDBL_MIN_EXP == DBL_MIN_EXP | |
9522 | ? 1 : -1]; | |
8690e634 | 9523 | |
c0c3707f CB |
9524 | ; |
9525 | return 0; | |
9526 | } | |
9527 | _ACEOF | |
9528 | if ac_fn_c_try_compile "$LINENO"; then : | |
9529 | gl_cv_long_double_equals_double=yes | |
9530 | else | |
9531 | gl_cv_long_double_equals_double=no | |
9532 | fi | |
9533 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 9534 | |
c0c3707f CB |
9535 | fi |
9536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 | |
9537 | $as_echo "$gl_cv_long_double_equals_double" >&6; } | |
9538 | if test $gl_cv_long_double_equals_double = yes; then | |
8690e634 | 9539 | |
c0c3707f | 9540 | $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h |
6ec2e0f5 | 9541 | |
c0c3707f CB |
9542 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 |
9543 | else | |
9544 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 | |
9545 | fi | |
8690e634 | 9546 | |
6ec2e0f5 | 9547 | |
6ec2e0f5 | 9548 | |
6ec2e0f5 SDJ |
9549 | |
9550 | ||
6ec2e0f5 | 9551 | |
8690e634 JK |
9552 | |
9553 | ||
c0c3707f CB |
9554 | ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h> |
9555 | " | |
9556 | if test "x$ac_cv_have_decl_frexpl" = xyes; then : | |
8690e634 | 9557 | |
c0c3707f CB |
9558 | else |
9559 | HAVE_DECL_FREXPL=0 | |
9560 | fi | |
8690e634 | 9561 | |
6ec2e0f5 | 9562 | |
c0c3707f CB |
9563 | FREXPL_LIBM= |
9564 | if test $HAVE_DECL_FREXPL = 1; then | |
6ec2e0f5 | 9565 | |
c0c3707f CB |
9566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 |
9567 | $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } | |
9568 | if ${gl_cv_func_frexpl_no_libm+:} false; then : | |
8690e634 JK |
9569 | $as_echo_n "(cached) " >&6 |
9570 | else | |
c0c3707f CB |
9571 | |
9572 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 | 9573 | /* end confdefs.h. */ |
c0c3707f CB |
9574 | #include <math.h> |
9575 | long double x; | |
9576 | int | |
9577 | main () | |
9578 | { | |
9579 | int e; return frexpl (x, &e) > 0; | |
9580 | ; | |
9581 | return 0; | |
9582 | } | |
9583 | _ACEOF | |
9584 | if ac_fn_c_try_link "$LINENO"; then : | |
9585 | gl_cv_func_frexpl_no_libm=yes | |
9586 | else | |
9587 | gl_cv_func_frexpl_no_libm=no | |
9588 | fi | |
9589 | rm -f core conftest.err conftest.$ac_objext \ | |
9590 | conftest$ac_exeext conftest.$ac_ext | |
8690e634 | 9591 | |
c0c3707f CB |
9592 | fi |
9593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 | |
9594 | $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } | |
6ec2e0f5 | 9595 | |
c0c3707f CB |
9596 | if test $gl_cv_func_frexpl_no_libm = no; then |
9597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5 | |
9598 | $as_echo_n "checking whether frexpl() can be used with libm... " >&6; } | |
9599 | if ${gl_cv_func_frexpl_in_libm+:} false; then : | |
9600 | $as_echo_n "(cached) " >&6 | |
9601 | else | |
6ec2e0f5 | 9602 | |
c0c3707f CB |
9603 | save_LIBS="$LIBS" |
9604 | LIBS="$LIBS -lm" | |
9605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9606 | /* end confdefs.h. */ | |
9607 | #include <math.h> | |
9608 | long double x; | |
9609 | int | |
9610 | main () | |
9611 | { | |
9612 | int e; return frexpl (x, &e) > 0; | |
9613 | ; | |
9614 | return 0; | |
9615 | } | |
9616 | _ACEOF | |
9617 | if ac_fn_c_try_link "$LINENO"; then : | |
9618 | gl_cv_func_frexpl_in_libm=yes | |
9619 | else | |
9620 | gl_cv_func_frexpl_in_libm=no | |
9621 | fi | |
9622 | rm -f core conftest.err conftest.$ac_objext \ | |
9623 | conftest$ac_exeext conftest.$ac_ext | |
9624 | LIBS="$save_LIBS" | |
6ec2e0f5 | 9625 | |
c0c3707f CB |
9626 | fi |
9627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5 | |
9628 | $as_echo "$gl_cv_func_frexpl_in_libm" >&6; } | |
9629 | if test $gl_cv_func_frexpl_in_libm = yes; then | |
9630 | FREXPL_LIBM=-lm | |
9631 | fi | |
9632 | fi | |
9633 | if test $gl_cv_func_frexpl_no_libm = yes \ | |
9634 | || test $gl_cv_func_frexpl_in_libm = yes; then | |
9635 | save_LIBS="$LIBS" | |
9636 | LIBS="$LIBS $FREXPL_LIBM" | |
8690e634 | 9637 | |
8690e634 | 9638 | |
c0c3707f CB |
9639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 |
9640 | $as_echo_n "checking whether frexpl works... " >&6; } | |
9641 | if ${gl_cv_func_frexpl_works+:} false; then : | |
9642 | $as_echo_n "(cached) " >&6 | |
9643 | else | |
8690e634 | 9644 | |
c0c3707f | 9645 | if test "$cross_compiling" = yes; then : |
8690e634 | 9646 | |
c0c3707f CB |
9647 | case "$host_os" in |
9648 | aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) | |
9649 | gl_cv_func_frexpl_works="guessing no";; | |
9650 | *) gl_cv_func_frexpl_works="guessing yes";; | |
9651 | esac | |
8690e634 | 9652 | |
c0c3707f CB |
9653 | else |
9654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9655 | /* end confdefs.h. */ | |
8690e634 | 9656 | |
c0c3707f CB |
9657 | #include <float.h> |
9658 | #include <math.h> | |
9659 | /* Override the values of <float.h>, like done in float.in.h. */ | |
9660 | #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) | |
9661 | # undef LDBL_MIN_EXP | |
9662 | # define LDBL_MIN_EXP (-16381) | |
6ec2e0f5 | 9663 | #endif |
c0c3707f CB |
9664 | #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) |
9665 | # undef LDBL_MIN_EXP | |
9666 | # define LDBL_MIN_EXP (-16381) | |
6ec2e0f5 | 9667 | #endif |
c0c3707f CB |
9668 | #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ |
9669 | # undef LDBL_MIN_EXP | |
9670 | # define LDBL_MIN_EXP DBL_MIN_EXP | |
6ec2e0f5 | 9671 | #endif |
c0c3707f CB |
9672 | #if defined __sgi && (LDBL_MANT_DIG >= 106) |
9673 | # if defined __GNUC__ | |
9674 | # undef LDBL_MIN_EXP | |
9675 | # define LDBL_MIN_EXP DBL_MIN_EXP | |
9676 | # endif | |
6ec2e0f5 | 9677 | #endif |
c0c3707f CB |
9678 | extern |
9679 | #ifdef __cplusplus | |
9680 | "C" | |
9681 | #endif | |
9682 | long double frexpl (long double, int *); | |
9683 | int main() | |
8690e634 | 9684 | { |
c0c3707f CB |
9685 | int result = 0; |
9686 | volatile long double x; | |
9687 | /* Test on finite numbers that fails on AIX 5.1. */ | |
9688 | x = 16.0L; | |
9689 | { | |
9690 | int exp = -9999; | |
9691 | frexpl (x, &exp); | |
9692 | if (exp != 5) | |
9693 | result |= 1; | |
9694 | } | |
9695 | /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl | |
9696 | function returns an invalid (incorrectly normalized) value: it returns | |
9697 | y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } | |
9698 | but the correct result is | |
9699 | 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ | |
9700 | x = 1.01L; | |
9701 | { | |
9702 | int exp = -9999; | |
9703 | long double y = frexpl (x, &exp); | |
9704 | if (!(exp == 1 && y == 0.505L)) | |
9705 | result |= 2; | |
9706 | } | |
9707 | /* Test on large finite numbers. This fails on BeOS at i = 16322, while | |
9708 | LDBL_MAX_EXP = 16384. | |
9709 | In the loop end test, we test x against Infinity, rather than comparing | |
9710 | i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */ | |
9711 | { | |
9712 | int i; | |
9713 | for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) | |
9714 | { | |
9715 | int exp = -9999; | |
9716 | frexpl (x, &exp); | |
9717 | if (exp != i) | |
9718 | { | |
9719 | result |= 4; | |
9720 | break; | |
9721 | } | |
9722 | } | |
9723 | } | |
9724 | /* Test on denormalized numbers. */ | |
9725 | { | |
9726 | int i; | |
9727 | for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) | |
9728 | ; | |
9729 | if (x > 0.0L) | |
9730 | { | |
9731 | int exp; | |
9732 | long double y = frexpl (x, &exp); | |
9733 | /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, | |
9734 | exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ | |
9735 | if (exp != LDBL_MIN_EXP - 1) | |
9736 | result |= 8; | |
9737 | } | |
9738 | } | |
9739 | /* Test on infinite numbers. */ | |
9740 | x = 1.0L / 0.0L; | |
9741 | { | |
9742 | int exp; | |
9743 | long double y = frexpl (x, &exp); | |
9744 | if (y != x) | |
9745 | result |= 16; | |
9746 | } | |
9747 | return result; | |
8690e634 JK |
9748 | } |
9749 | _ACEOF | |
c0c3707f CB |
9750 | if ac_fn_c_try_run "$LINENO"; then : |
9751 | gl_cv_func_frexpl_works=yes | |
6ec2e0f5 | 9752 | else |
c0c3707f CB |
9753 | gl_cv_func_frexpl_works=no |
9754 | fi | |
9755 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9756 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9757 | fi | |
8690e634 | 9758 | |
8690e634 | 9759 | |
c0c3707f CB |
9760 | fi |
9761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 | |
9762 | $as_echo "$gl_cv_func_frexpl_works" >&6; } | |
8690e634 | 9763 | |
c0c3707f CB |
9764 | LIBS="$save_LIBS" |
9765 | case "$gl_cv_func_frexpl_works" in | |
9766 | *yes) gl_func_frexpl=yes ;; | |
9767 | *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; | |
9768 | esac | |
9769 | else | |
9770 | gl_func_frexpl=no | |
9771 | fi | |
9772 | if test $gl_func_frexpl = yes; then | |
8690e634 | 9773 | |
c0c3707f | 9774 | $as_echo "#define HAVE_FREXPL 1" >>confdefs.h |
8690e634 | 9775 | |
c0c3707f CB |
9776 | fi |
9777 | fi | |
9778 | if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then | |
9779 | if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then | |
8690e634 | 9780 | |
c0c3707f CB |
9781 | FREXPL_LIBM="$FREXP_LIBM" |
9782 | else | |
9783 | FREXPL_LIBM= | |
9784 | fi | |
9785 | fi | |
6ec2e0f5 | 9786 | |
6ec2e0f5 | 9787 | |
6ec2e0f5 | 9788 | |
c0c3707f CB |
9789 | GNULIB_FCHMODAT=0; |
9790 | GNULIB_FSTAT=0; | |
9791 | GNULIB_FSTATAT=0; | |
9792 | GNULIB_FUTIMENS=0; | |
9793 | GNULIB_LCHMOD=0; | |
9794 | GNULIB_LSTAT=0; | |
9795 | GNULIB_MKDIRAT=0; | |
9796 | GNULIB_MKFIFO=0; | |
9797 | GNULIB_MKFIFOAT=0; | |
9798 | GNULIB_MKNOD=0; | |
9799 | GNULIB_MKNODAT=0; | |
9800 | GNULIB_STAT=0; | |
9801 | GNULIB_UTIMENSAT=0; | |
9802 | GNULIB_OVERRIDES_STRUCT_STAT=0; | |
9803 | HAVE_FCHMODAT=1; | |
9804 | HAVE_FSTATAT=1; | |
9805 | HAVE_FUTIMENS=1; | |
9806 | HAVE_LCHMOD=1; | |
9807 | HAVE_LSTAT=1; | |
9808 | HAVE_MKDIRAT=1; | |
9809 | HAVE_MKFIFO=1; | |
9810 | HAVE_MKFIFOAT=1; | |
9811 | HAVE_MKNOD=1; | |
9812 | HAVE_MKNODAT=1; | |
9813 | HAVE_UTIMENSAT=1; | |
5df4cba6 | 9814 | REPLACE_FCHMODAT=0; |
c0c3707f CB |
9815 | REPLACE_FSTAT=0; |
9816 | REPLACE_FSTATAT=0; | |
9817 | REPLACE_FUTIMENS=0; | |
9818 | REPLACE_LSTAT=0; | |
9819 | REPLACE_MKDIR=0; | |
9820 | REPLACE_MKFIFO=0; | |
9821 | REPLACE_MKNOD=0; | |
9822 | REPLACE_STAT=0; | |
9823 | REPLACE_UTIMENSAT=0; | |
9824 | ||
9825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 | |
9826 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
9827 | if ${ac_cv_header_stat_broken+:} false; then : | |
9828 | $as_echo_n "(cached) " >&6 | |
9829 | else | |
9830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9831 | /* end confdefs.h. */ | |
9832 | #include <sys/types.h> | |
9833 | #include <sys/stat.h> | |
9834 | ||
9835 | #if defined S_ISBLK && defined S_IFDIR | |
9836 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
9837 | #endif | |
9838 | ||
9839 | #if defined S_ISBLK && defined S_IFCHR | |
9840 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
9841 | #endif | |
9842 | ||
9843 | #if defined S_ISLNK && defined S_IFREG | |
9844 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
9845 | #endif | |
8690e634 | 9846 | |
c0c3707f CB |
9847 | #if defined S_ISSOCK && defined S_IFREG |
9848 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
9849 | #endif | |
8690e634 | 9850 | |
c0c3707f CB |
9851 | _ACEOF |
9852 | if ac_fn_c_try_compile "$LINENO"; then : | |
9853 | ac_cv_header_stat_broken=no | |
9854 | else | |
9855 | ac_cv_header_stat_broken=yes | |
6ec2e0f5 SDJ |
9856 | fi |
9857 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6ec2e0f5 | 9858 | fi |
c0c3707f CB |
9859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
9860 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
9861 | if test $ac_cv_header_stat_broken = yes; then | |
8690e634 | 9862 | |
c0c3707f | 9863 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
49e4877c | 9864 | |
c0c3707f | 9865 | fi |
49e4877c PA |
9866 | |
9867 | ||
9868 | ||
9869 | ||
8690e634 | 9870 | |
c0c3707f CB |
9871 | case "$host_os" in |
9872 | mingw*) | |
9873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 | |
9874 | $as_echo_n "checking for 64-bit off_t... " >&6; } | |
9875 | if ${gl_cv_type_off_t_64+:} false; then : | |
9876 | $as_echo_n "(cached) " >&6 | |
9877 | else | |
9878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9879 | /* end confdefs.h. */ | |
9880 | #include <sys/types.h> | |
9881 | int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; | |
8690e634 | 9882 | |
6ec2e0f5 SDJ |
9883 | int |
9884 | main () | |
9885 | { | |
8690e634 | 9886 | |
6ec2e0f5 SDJ |
9887 | ; |
9888 | return 0; | |
9889 | } | |
9890 | _ACEOF | |
9891 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f CB |
9892 | gl_cv_type_off_t_64=yes |
9893 | else | |
9894 | gl_cv_type_off_t_64=no | |
6ec2e0f5 SDJ |
9895 | fi |
9896 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 9897 | |
c0c3707f CB |
9898 | fi |
9899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 | |
9900 | $as_echo "$gl_cv_type_off_t_64" >&6; } | |
9901 | if test $gl_cv_type_off_t_64 = no; then | |
9902 | WINDOWS_64_BIT_OFF_T=1 | |
9903 | else | |
9904 | WINDOWS_64_BIT_OFF_T=0 | |
9905 | fi | |
9906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 | |
9907 | $as_echo_n "checking for 64-bit st_size... " >&6; } | |
9908 | if ${gl_cv_member_st_size_64+:} false; then : | |
6ec2e0f5 SDJ |
9909 | $as_echo_n "(cached) " >&6 |
9910 | else | |
c0c3707f | 9911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 | 9912 | /* end confdefs.h. */ |
c0c3707f CB |
9913 | #include <sys/types.h> |
9914 | struct stat buf; | |
9915 | int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; | |
8690e634 | 9916 | |
6ec2e0f5 SDJ |
9917 | int |
9918 | main () | |
9919 | { | |
8690e634 | 9920 | |
6ec2e0f5 SDJ |
9921 | ; |
9922 | return 0; | |
9923 | } | |
9924 | _ACEOF | |
9925 | if ac_fn_c_try_compile "$LINENO"; then : | |
698be2d8 CB |
9926 | gl_cv_member_st_size_64=yes |
9927 | else | |
9928 | gl_cv_member_st_size_64=no | |
9929 | fi | |
9930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9931 | ||
9932 | fi | |
9933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 | |
9934 | $as_echo "$gl_cv_member_st_size_64" >&6; } | |
9935 | if test $gl_cv_member_st_size_64 = no; then | |
9936 | WINDOWS_64_BIT_ST_SIZE=1 | |
9937 | else | |
9938 | WINDOWS_64_BIT_ST_SIZE=0 | |
9939 | fi | |
9940 | ;; | |
9941 | *) | |
9942 | WINDOWS_64_BIT_OFF_T=0 | |
9943 | WINDOWS_64_BIT_ST_SIZE=0 | |
9944 | ;; | |
9945 | esac | |
9946 | ||
9947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
9948 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
9949 | if ${ac_cv_c_restrict+:} false; then : | |
9950 | $as_echo_n "(cached) " >&6 | |
9951 | else | |
9952 | ac_cv_c_restrict=no | |
9953 | # The order here caters to the fact that C++ does not require restrict. | |
9954 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
9955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9956 | /* end confdefs.h. */ | |
9957 | typedef int *int_ptr; | |
9958 | int foo (int_ptr $ac_kw ip) { return ip[0]; } | |
9959 | int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ | |
9960 | int bar (int ip[$ac_kw]) { return ip[0]; } | |
9961 | ||
9962 | int | |
9963 | main () | |
9964 | { | |
9965 | int s[1]; | |
9966 | int *$ac_kw t = s; | |
9967 | t[0] = 0; | |
9968 | return foo (t) + bar (t); | |
9969 | ||
9970 | ; | |
9971 | return 0; | |
9972 | } | |
9973 | _ACEOF | |
9974 | if ac_fn_c_try_compile "$LINENO"; then : | |
9975 | ac_cv_c_restrict=$ac_kw | |
6ec2e0f5 SDJ |
9976 | fi |
9977 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
698be2d8 CB |
9978 | test "$ac_cv_c_restrict" != no && break |
9979 | done | |
8690e634 | 9980 | |
6ec2e0f5 | 9981 | fi |
698be2d8 CB |
9982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
9983 | $as_echo "$ac_cv_c_restrict" >&6; } | |
9984 | ||
9985 | case $ac_cv_c_restrict in | |
9986 | restrict) ;; | |
9987 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
9988 | ;; | |
9989 | *) cat >>confdefs.h <<_ACEOF | |
9990 | #define restrict $ac_cv_c_restrict | |
9991 | _ACEOF | |
9992 | ;; | |
9993 | esac | |
8690e634 JK |
9994 | |
9995 | ||
9996 | ||
9997 | ||
9998 | ||
9999 | ||
c0c3707f CB |
10000 | |
10001 | ||
10002 | ||
10003 | ||
10004 | ||
10005 | ||
10006 | ||
10007 | ||
10008 | ||
10009 | if test $gl_cv_have_include_next = yes; then | |
10010 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
10011 | else | |
10012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
10013 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
10014 | if ${gl_cv_next_sys_stat_h+:} false; then : | |
8690e634 JK |
10015 | $as_echo_n "(cached) " >&6 |
10016 | else | |
10017 | ||
c0c3707f | 10018 | if test $ac_cv_header_sys_stat_h = yes; then |
4a626d0a PA |
10019 | |
10020 | ||
4a626d0a | 10021 | |
c0c3707f CB |
10022 | |
10023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10024 | /* end confdefs.h. */ | |
10025 | #include <sys/stat.h> | |
6ec2e0f5 | 10026 | _ACEOF |
c0c3707f CB |
10027 | case "$host_os" in |
10028 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
10029 | *) gl_absname_cpp="$ac_cpp" ;; | |
10030 | esac | |
10031 | ||
10032 | case "$host_os" in | |
10033 | mingw*) | |
10034 | gl_dirsep_regex='[/\\]' | |
10035 | ;; | |
10036 | *) | |
10037 | gl_dirsep_regex='\/' | |
10038 | ;; | |
10039 | esac | |
10040 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
10041 | gl_header_literal_regex=`echo 'sys/stat.h' \ | |
10042 | | sed -e "$gl_make_literal_regex_sed"` | |
10043 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
10044 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
10045 | s|^/[^/]|//&| | |
10046 | p | |
10047 | q | |
10048 | }' | |
10049 | ||
10050 | gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
10051 | sed -n "$gl_absolute_header_sed"` | |
10052 | ||
10053 | gl_header=$gl_cv_absolute_sys_stat_h | |
10054 | gl_cv_next_sys_stat_h='"'$gl_header'"' | |
10055 | else | |
10056 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
10057 | fi | |
10058 | ||
10059 | ||
10060 | fi | |
10061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
10062 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
10063 | fi | |
10064 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
10065 | ||
10066 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
10067 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
10068 | gl_next_as_first_directive='<'sys/stat.h'>' | |
10069 | else | |
10070 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
10071 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
10072 | fi | |
10073 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
10074 | ||
10075 | ||
10076 | ||
10077 | ||
10078 | ||
10079 | ||
10080 | ||
10081 | ||
10082 | WINDOWS_STAT_TIMESPEC=0 | |
10083 | ||
10084 | ||
10085 | ||
10086 | ||
4a626d0a | 10087 | |
4a626d0a | 10088 | |
8690e634 JK |
10089 | |
10090 | ||
c0c3707f CB |
10091 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> |
10092 | #include <sys/stat.h> | |
10093 | " | |
10094 | if test "x$ac_cv_type_nlink_t" = xyes; then : | |
8690e634 | 10095 | |
6ec2e0f5 | 10096 | else |
8690e634 | 10097 | |
c0c3707f | 10098 | $as_echo "#define nlink_t int" >>confdefs.h |
6ec2e0f5 | 10099 | |
6ec2e0f5 | 10100 | fi |
8690e634 JK |
10101 | |
10102 | ||
10103 | ||
10104 | ||
10105 | ||
10106 | ||
10107 | ||
698be2d8 CB |
10108 | |
10109 | ||
c0c3707f CB |
10110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 |
10111 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
10112 | if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : | |
8690e634 | 10113 | $as_echo_n "(cached) " >&6 |
c0c3707f CB |
10114 | else |
10115 | rm -f conftest.sym conftest.file | |
10116 | echo >conftest.file | |
10117 | if test "$cross_compiling" = yes; then : | |
10118 | case "$host_os" in | |
10119 | linux-* | linux) | |
10120 | # Guess yes on Linux systems. | |
10121 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
10122 | *-gnu* | gnu*) | |
10123 | # Guess yes on glibc systems. | |
10124 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
10125 | mingw*) | |
10126 | # Guess no on native Windows. | |
10127 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; | |
10128 | *) | |
10129 | # If we don't know, obey --enable-cross-guesses. | |
10130 | gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;; | |
10131 | esac | |
10132 | ||
8690e634 JK |
10133 | else |
10134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10135 | /* end confdefs.h. */ | |
c0c3707f | 10136 | $ac_includes_default |
8690e634 JK |
10137 | int |
10138 | main () | |
10139 | { | |
c0c3707f CB |
10140 | struct stat sbuf; |
10141 | if (symlink ("conftest.file", "conftest.sym") != 0) | |
10142 | return 1; | |
10143 | /* Linux will dereference the symlink and fail, as required by | |
10144 | POSIX. That is better in the sense that it means we will not | |
10145 | have to compile and use the lstat wrapper. */ | |
10146 | return lstat ("conftest.sym/", &sbuf) == 0; | |
6ec2e0f5 | 10147 | |
8690e634 JK |
10148 | ; |
10149 | return 0; | |
10150 | } | |
10151 | _ACEOF | |
c0c3707f CB |
10152 | if ac_fn_c_try_run "$LINENO"; then : |
10153 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
8690e634 | 10154 | else |
c0c3707f | 10155 | gl_cv_func_lstat_dereferences_slashed_symlink=no |
8690e634 | 10156 | fi |
c0c3707f CB |
10157 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10158 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10159 | fi | |
10160 | ||
10161 | rm -f conftest.sym conftest.file | |
6ec2e0f5 | 10162 | |
8690e634 | 10163 | fi |
c0c3707f CB |
10164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 |
10165 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
10166 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
10167 | *yes) | |
10168 | ||
10169 | cat >>confdefs.h <<_ACEOF | |
10170 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
8690e634 JK |
10171 | _ACEOF |
10172 | ||
c0c3707f CB |
10173 | ;; |
10174 | esac | |
8690e634 | 10175 | |
8690e634 | 10176 | |
8690e634 | 10177 | |
8690e634 | 10178 | |
c0c3707f CB |
10179 | |
10180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 | |
10181 | $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } | |
10182 | if ${gl_cv_func_getcwd_null+:} false; then : | |
8690e634 JK |
10183 | $as_echo_n "(cached) " >&6 |
10184 | else | |
c0c3707f CB |
10185 | if test "$cross_compiling" = yes; then : |
10186 | case "$host_os" in | |
10187 | # Guess yes on glibc systems. | |
10188 | *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; | |
10189 | # Guess yes on musl systems. | |
10190 | *-musl*) gl_cv_func_getcwd_null="guessing yes";; | |
10191 | # Guess yes on Cygwin. | |
10192 | cygwin*) gl_cv_func_getcwd_null="guessing yes";; | |
10193 | # If we don't know, obey --enable-cross-guesses. | |
10194 | *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";; | |
10195 | esac | |
10196 | ||
10197 | else | |
10198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
10199 | /* end confdefs.h. */ |
10200 | ||
c0c3707f CB |
10201 | # include <stdlib.h> |
10202 | # if HAVE_UNISTD_H | |
10203 | # include <unistd.h> | |
10204 | # else /* on Windows with MSVC */ | |
10205 | # include <direct.h> | |
10206 | # endif | |
10207 | # ifndef getcwd | |
10208 | char *getcwd (); | |
10209 | # endif | |
8690e634 JK |
10210 | |
10211 | int | |
10212 | main () | |
10213 | { | |
10214 | ||
c0c3707f CB |
10215 | #if defined _WIN32 && ! defined __CYGWIN__ |
10216 | /* mingw cwd does not start with '/', but getcwd does allocate. | |
10217 | However, mingw fails to honor non-zero size. */ | |
10218 | #else | |
10219 | if (chdir ("/") != 0) | |
10220 | return 1; | |
10221 | else | |
10222 | { | |
10223 | char *f = getcwd (NULL, 0); | |
10224 | if (! f) | |
10225 | return 2; | |
10226 | if (f[0] != '/') | |
10227 | { free (f); return 3; } | |
10228 | if (f[1] != '\0') | |
10229 | { free (f); return 4; } | |
10230 | free (f); | |
10231 | return 0; | |
10232 | } | |
10233 | #endif | |
10234 | ||
8690e634 JK |
10235 | ; |
10236 | return 0; | |
10237 | } | |
10238 | _ACEOF | |
c0c3707f CB |
10239 | if ac_fn_c_try_run "$LINENO"; then : |
10240 | gl_cv_func_getcwd_null=yes | |
10241 | else | |
10242 | gl_cv_func_getcwd_null=no | |
8690e634 | 10243 | fi |
c0c3707f CB |
10244 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10245 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8690e634 | 10246 | fi |
8690e634 | 10247 | |
c0c3707f CB |
10248 | fi |
10249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 | |
10250 | $as_echo "$gl_cv_func_getcwd_null" >&6; } | |
8690e634 | 10251 | |
6ec2e0f5 | 10252 | |
c0c3707f CB |
10253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 |
10254 | $as_echo_n "checking for getcwd with POSIX signature... " >&6; } | |
10255 | if ${gl_cv_func_getcwd_posix_signature+:} false; then : | |
8690e634 JK |
10256 | $as_echo_n "(cached) " >&6 |
10257 | else | |
c0c3707f | 10258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 | 10259 | /* end confdefs.h. */ |
c0c3707f | 10260 | #include <unistd.h> |
88b48903 WN |
10261 | int |
10262 | main () | |
10263 | { | |
c0c3707f CB |
10264 | extern |
10265 | #ifdef __cplusplus | |
10266 | "C" | |
10267 | #endif | |
10268 | char *getcwd (char *, size_t); | |
88b48903 WN |
10269 | |
10270 | ; | |
10271 | return 0; | |
10272 | } | |
c0c3707f | 10273 | |
88b48903 WN |
10274 | _ACEOF |
10275 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f CB |
10276 | gl_cv_func_getcwd_posix_signature=yes |
10277 | else | |
10278 | gl_cv_func_getcwd_posix_signature=no | |
8690e634 | 10279 | fi |
88b48903 | 10280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8690e634 | 10281 | |
c0c3707f CB |
10282 | fi |
10283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 | |
10284 | $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } | |
8690e634 | 10285 | |
c0c3707f CB |
10286 | ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" |
10287 | if test "x$ac_cv_have_decl_getcwd" = xyes; then : | |
10288 | ac_have_decl=1 | |
10289 | else | |
10290 | ac_have_decl=0 | |
10291 | fi | |
8690e634 | 10292 | |
c0c3707f CB |
10293 | cat >>confdefs.h <<_ACEOF |
10294 | #define HAVE_DECL_GETCWD $ac_have_decl | |
10295 | _ACEOF | |
8690e634 JK |
10296 | |
10297 | ||
7a6dbc2f | 10298 | |
c0c3707f CB |
10299 | ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" |
10300 | if test "x$ac_cv_have_decl_getdtablesize" = xyes; then : | |
10301 | ac_have_decl=1 | |
88b48903 | 10302 | else |
c0c3707f | 10303 | ac_have_decl=0 |
88b48903 | 10304 | fi |
8690e634 | 10305 | |
c0c3707f CB |
10306 | cat >>confdefs.h <<_ACEOF |
10307 | #define HAVE_DECL_GETDTABLESIZE $ac_have_decl | |
10308 | _ACEOF | |
8690e634 | 10309 | |
c0c3707f CB |
10310 | ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" |
10311 | if test "x$ac_cv_have_decl_getlogin_r" = xyes; then : | |
10312 | ac_have_decl=1 | |
10313 | else | |
10314 | ac_have_decl=0 | |
10315 | fi | |
8690e634 | 10316 | |
c0c3707f CB |
10317 | cat >>confdefs.h <<_ACEOF |
10318 | #define HAVE_DECL_GETLOGIN_R $ac_have_decl | |
10319 | _ACEOF | |
8690e634 JK |
10320 | |
10321 | ||
6ec2e0f5 | 10322 | |
c0c3707f CB |
10323 | ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" |
10324 | if test "x$ac_cv_have_decl_getlogin" = xyes; then : | |
10325 | ac_have_decl=1 | |
6ec2e0f5 | 10326 | else |
c0c3707f | 10327 | ac_have_decl=0 |
88b48903 | 10328 | fi |
8690e634 | 10329 | |
c0c3707f CB |
10330 | cat >>confdefs.h <<_ACEOF |
10331 | #define HAVE_DECL_GETLOGIN $ac_have_decl | |
10332 | _ACEOF | |
8690e634 JK |
10333 | |
10334 | ||
10335 | ||
c0c3707f CB |
10336 | case $host_os in |
10337 | mingw*) | |
10338 | LIB_GETLOGIN='-ladvapi32' ;; | |
10339 | *) | |
10340 | LIB_GETLOGIN= ;; | |
10341 | esac | |
6ec2e0f5 | 10342 | |
472fa5ee SM |
10343 | |
10344 | ||
10345 | ||
6ec2e0f5 SDJ |
10346 | |
10347 | ||
10348 | ||
698be2d8 CB |
10349 | GNULIB_GETRANDOM=0; |
10350 | HAVE_GETRANDOM=1; | |
10351 | REPLACE_GETRANDOM=0; | |
10352 | ||
10353 | ||
10354 | ||
10355 | ||
c0c3707f CB |
10356 | GNULIB_GETTIMEOFDAY=0; |
10357 | HAVE_GETTIMEOFDAY=1; | |
10358 | HAVE_STRUCT_TIMEVAL=1; | |
10359 | HAVE_SYS_TIME_H=1; | |
10360 | REPLACE_GETTIMEOFDAY=0; | |
10361 | REPLACE_STRUCT_TIMEVAL=0; | |
472fa5ee | 10362 | |
472fa5ee | 10363 | |
6ec2e0f5 SDJ |
10364 | |
10365 | ||
10366 | ||
10367 | ||
10368 | ||
10369 | ||
472fa5ee SM |
10370 | |
10371 | ||
10372 | ||
6ec2e0f5 SDJ |
10373 | |
10374 | ||
10375 | ||
10376 | ||
10377 | ||
10378 | if test $gl_cv_have_include_next = yes; then | |
c0c3707f | 10379 | gl_cv_next_sys_time_h='<'sys/time.h'>' |
6ec2e0f5 | 10380 | else |
c0c3707f CB |
10381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 |
10382 | $as_echo_n "checking absolute name of <sys/time.h>... " >&6; } | |
10383 | if ${gl_cv_next_sys_time_h+:} false; then : | |
6ec2e0f5 | 10384 | $as_echo_n "(cached) " >&6 |
88b48903 | 10385 | else |
8690e634 | 10386 | |
c0c3707f | 10387 | if test $ac_cv_header_sys_time_h = yes; then |
8690e634 JK |
10388 | |
10389 | ||
8690e634 JK |
10390 | |
10391 | ||
6ec2e0f5 SDJ |
10392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10393 | /* end confdefs.h. */ | |
c0c3707f | 10394 | #include <sys/time.h> |
88b48903 | 10395 | _ACEOF |
6ec2e0f5 SDJ |
10396 | case "$host_os" in |
10397 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
10398 | *) gl_absname_cpp="$ac_cpp" ;; | |
10399 | esac | |
8690e634 | 10400 | |
6ec2e0f5 SDJ |
10401 | case "$host_os" in |
10402 | mingw*) | |
10403 | gl_dirsep_regex='[/\\]' | |
10404 | ;; | |
10405 | *) | |
10406 | gl_dirsep_regex='\/' | |
88b48903 WN |
10407 | ;; |
10408 | esac | |
6ec2e0f5 | 10409 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' |
c0c3707f | 10410 | gl_header_literal_regex=`echo 'sys/time.h' \ |
6ec2e0f5 SDJ |
10411 | | sed -e "$gl_make_literal_regex_sed"` |
10412 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
10413 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
10414 | s|^/[^/]|//&| | |
10415 | p | |
10416 | q | |
10417 | }' | |
8690e634 | 10418 | |
c0c3707f | 10419 | gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
6ec2e0f5 | 10420 | sed -n "$gl_absolute_header_sed"` |
8690e634 | 10421 | |
c0c3707f CB |
10422 | gl_header=$gl_cv_absolute_sys_time_h |
10423 | gl_cv_next_sys_time_h='"'$gl_header'"' | |
6ec2e0f5 | 10424 | else |
c0c3707f | 10425 | gl_cv_next_sys_time_h='<'sys/time.h'>' |
6ec2e0f5 | 10426 | fi |
88b48903 | 10427 | |
88b48903 | 10428 | |
88b48903 | 10429 | fi |
c0c3707f CB |
10430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 |
10431 | $as_echo "$gl_cv_next_sys_time_h" >&6; } | |
6ec2e0f5 | 10432 | fi |
c0c3707f | 10433 | NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h |
88b48903 | 10434 | |
6ec2e0f5 SDJ |
10435 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
10436 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 10437 | gl_next_as_first_directive='<'sys/time.h'>' |
6ec2e0f5 SDJ |
10438 | else |
10439 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f CB |
10440 | gl_next_as_first_directive=$gl_cv_next_sys_time_h |
10441 | fi | |
10442 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive | |
6ec2e0f5 | 10443 | |
6ec2e0f5 SDJ |
10444 | |
10445 | ||
10446 | ||
6ec2e0f5 | 10447 | |
c0c3707f CB |
10448 | if test $ac_cv_header_sys_time_h != yes; then |
10449 | HAVE_SYS_TIME_H=0 | |
10450 | fi | |
6ec2e0f5 | 10451 | |
6ec2e0f5 | 10452 | |
6ec2e0f5 | 10453 | |
6ec2e0f5 | 10454 | |
6ec2e0f5 | 10455 | |
c0c3707f CB |
10456 | if test $ac_cv_header_sys_socket_h != yes; then |
10457 | for ac_header in winsock2.h | |
10458 | do : | |
10459 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
10460 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
10461 | cat >>confdefs.h <<_ACEOF | |
10462 | #define HAVE_WINSOCK2_H 1 | |
6ec2e0f5 | 10463 | _ACEOF |
6ec2e0f5 | 10464 | |
6ec2e0f5 | 10465 | fi |
6ec2e0f5 | 10466 | |
c0c3707f | 10467 | done |
6ec2e0f5 | 10468 | |
c0c3707f CB |
10469 | fi |
10470 | if test "$ac_cv_header_winsock2_h" = yes; then | |
10471 | HAVE_WINSOCK2_H=1 | |
10472 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
10473 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
10474 | else | |
10475 | HAVE_WINSOCK2_H=0 | |
10476 | fi | |
10477 | ||
10478 | ||
10479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
10480 | $as_echo_n "checking for struct timeval... " >&6; } | |
10481 | if ${gl_cv_sys_struct_timeval+:} false; then : | |
10482 | $as_echo_n "(cached) " >&6 | |
10483 | else | |
10484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 10485 | /* end confdefs.h. */ |
c0c3707f CB |
10486 | #if HAVE_SYS_TIME_H |
10487 | #include <sys/time.h> | |
10488 | #endif | |
10489 | #include <time.h> | |
10490 | #if HAVE_WINSOCK2_H | |
10491 | # include <winsock2.h> | |
10492 | #endif | |
6ec2e0f5 SDJ |
10493 | |
10494 | int | |
10495 | main () | |
10496 | { | |
c0c3707f | 10497 | static struct timeval x; x.tv_sec = x.tv_usec; |
6ec2e0f5 SDJ |
10498 | ; |
10499 | return 0; | |
10500 | } | |
10501 | _ACEOF | |
10502 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 10503 | gl_cv_sys_struct_timeval=yes |
6ec2e0f5 | 10504 | else |
c0c3707f | 10505 | gl_cv_sys_struct_timeval=no |
6ec2e0f5 SDJ |
10506 | fi |
10507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
88b48903 | 10508 | |
c0c3707f CB |
10509 | fi |
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 | |
10511 | $as_echo "$gl_cv_sys_struct_timeval" >&6; } | |
10512 | if test $gl_cv_sys_struct_timeval != yes; then | |
10513 | HAVE_STRUCT_TIMEVAL=0 | |
10514 | else | |
10515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 | |
10516 | $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } | |
10517 | if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then : | |
10518 | $as_echo_n "(cached) " >&6 | |
10519 | else | |
10520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
88b48903 | 10521 | /* end confdefs.h. */ |
c0c3707f CB |
10522 | #if HAVE_SYS_TIME_H |
10523 | #include <sys/time.h> | |
10524 | #endif | |
10525 | #include <time.h> | |
10526 | #if HAVE_WINSOCK2_H | |
10527 | # include <winsock2.h> | |
10528 | #endif | |
88b48903 WN |
10529 | |
10530 | int | |
10531 | main () | |
10532 | { | |
c0c3707f CB |
10533 | static struct timeval x; |
10534 | typedef int verify_tv_sec_type[ | |
10535 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | |
10536 | ]; | |
88b48903 WN |
10537 | |
10538 | ; | |
10539 | return 0; | |
10540 | } | |
10541 | _ACEOF | |
10542 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 10543 | gl_cv_sys_struct_timeval_tv_sec=yes |
88b48903 | 10544 | else |
c0c3707f | 10545 | gl_cv_sys_struct_timeval_tv_sec=no |
88b48903 WN |
10546 | fi |
10547 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c0c3707f | 10548 | |
88b48903 | 10549 | fi |
c0c3707f CB |
10550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 |
10551 | $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } | |
10552 | if test $gl_cv_sys_struct_timeval_tv_sec != yes; then | |
10553 | REPLACE_STRUCT_TIMEVAL=1 | |
88b48903 | 10554 | fi |
c0c3707f | 10555 | fi |
88b48903 | 10556 | |
c0c3707f CB |
10557 | |
10558 | ||
10559 | ||
10560 | ||
10561 | ||
10562 | ||
10563 | ||
10564 | ||
10565 | ||
10566 | ||
10567 | NEED_LOCALTIME_BUFFER=0 | |
10568 | ||
10569 | ||
10570 | GNULIB_CTIME=0; | |
10571 | GNULIB_MKTIME=0; | |
10572 | GNULIB_LOCALTIME=0; | |
10573 | GNULIB_NANOSLEEP=0; | |
10574 | GNULIB_STRFTIME=0; | |
10575 | GNULIB_STRPTIME=0; | |
10576 | GNULIB_TIMEGM=0; | |
10577 | GNULIB_TIME_R=0; | |
10578 | GNULIB_TIME_RZ=0; | |
10579 | GNULIB_TZSET=0; | |
10580 | HAVE_DECL_LOCALTIME_R=1; | |
10581 | HAVE_NANOSLEEP=1; | |
10582 | HAVE_STRPTIME=1; | |
10583 | HAVE_TIMEGM=1; | |
10584 | HAVE_TZSET=1; | |
10585 | HAVE_TIMEZONE_T=0; | |
10586 | REPLACE_CTIME=GNULIB_PORTCHECK; | |
10587 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
10588 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
10589 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
10590 | REPLACE_STRFTIME=GNULIB_PORTCHECK; | |
10591 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
10592 | REPLACE_TZSET=GNULIB_PORTCHECK; | |
10593 | ||
10594 | : ${GNULIB_GETTIMEOFDAY=0}; | |
10595 | REPLACE_GMTIME=0; | |
10596 | REPLACE_LOCALTIME=0; | |
10597 | ||
10598 | ||
10599 | GNULIB_GLOB=0; | |
10600 | HAVE_GLOB=1; | |
10601 | HAVE_GLOB_PATTERN_P=1; | |
10602 | REPLACE_GLOB=0; | |
10603 | REPLACE_GLOB_PATTERN_P=0; | |
10604 | ||
10605 | ||
10606 | ||
10607 | ||
10608 | ||
10609 | ||
10610 | ||
10611 | ||
10612 | ||
10613 | ||
10614 | ||
10615 | ||
10616 | ||
10617 | ||
10618 | ||
10619 | ||
10620 | ||
10621 | if test $gl_cv_have_include_next = yes; then | |
10622 | gl_cv_next_glob_h='<'glob.h'>' | |
10623 | else | |
10624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5 | |
10625 | $as_echo_n "checking absolute name of <glob.h>... " >&6; } | |
10626 | if ${gl_cv_next_glob_h+:} false; then : | |
10627 | $as_echo_n "(cached) " >&6 | |
88b48903 | 10628 | else |
c0c3707f CB |
10629 | |
10630 | if test $ac_cv_header_glob_h = yes; then | |
10631 | ||
10632 | ||
10633 | ||
10634 | ||
88b48903 WN |
10635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10636 | /* end confdefs.h. */ | |
c0c3707f CB |
10637 | #include <glob.h> |
10638 | _ACEOF | |
10639 | case "$host_os" in | |
10640 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
10641 | *) gl_absname_cpp="$ac_cpp" ;; | |
10642 | esac | |
88b48903 | 10643 | |
c0c3707f CB |
10644 | case "$host_os" in |
10645 | mingw*) | |
10646 | gl_dirsep_regex='[/\\]' | |
10647 | ;; | |
10648 | *) | |
10649 | gl_dirsep_regex='\/' | |
10650 | ;; | |
10651 | esac | |
10652 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
10653 | gl_header_literal_regex=`echo 'glob.h' \ | |
10654 | | sed -e "$gl_make_literal_regex_sed"` | |
10655 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
10656 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
10657 | s|^/[^/]|//&| | |
10658 | p | |
10659 | q | |
10660 | }' | |
10661 | ||
10662 | gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
10663 | sed -n "$gl_absolute_header_sed"` | |
10664 | ||
10665 | gl_header=$gl_cv_absolute_glob_h | |
10666 | gl_cv_next_glob_h='"'$gl_header'"' | |
10667 | else | |
10668 | gl_cv_next_glob_h='<'glob.h'>' | |
10669 | fi | |
88b48903 | 10670 | |
88b48903 | 10671 | |
88b48903 | 10672 | fi |
c0c3707f CB |
10673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5 |
10674 | $as_echo "$gl_cv_next_glob_h" >&6; } | |
10675 | fi | |
10676 | NEXT_GLOB_H=$gl_cv_next_glob_h | |
88b48903 | 10677 | |
c0c3707f CB |
10678 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
10679 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
10680 | gl_next_as_first_directive='<'glob.h'>' | |
10681 | else | |
10682 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
10683 | gl_next_as_first_directive=$gl_cv_next_glob_h | |
10684 | fi | |
10685 | NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive | |
88b48903 | 10686 | |
88b48903 WN |
10687 | |
10688 | ||
10689 | ||
2196f55f | 10690 | |
c0c3707f CB |
10691 | if test $ac_cv_header_glob_h = yes; then |
10692 | HAVE_GLOB_H=1 | |
10693 | else | |
10694 | HAVE_GLOB_H=0 | |
10695 | fi | |
2196f55f | 10696 | |
6ec2e0f5 | 10697 | |
c0c3707f CB |
10698 | GLOB_H='' |
10699 | if false; then | |
10700 | GLOB_H=glob.h | |
10701 | else | |
10702 | if test $ac_cv_header_glob_h != yes; then | |
10703 | GLOB_H=glob.h | |
10704 | fi | |
10705 | fi | |
10706 | ||
10707 | ||
10708 | if test -n "$GLOB_H"; then | |
10709 | GL_GENERATE_GLOB_H_TRUE= | |
10710 | GL_GENERATE_GLOB_H_FALSE='#' | |
88b48903 | 10711 | else |
c0c3707f CB |
10712 | GL_GENERATE_GLOB_H_TRUE='#' |
10713 | GL_GENERATE_GLOB_H_FALSE= | |
6ec2e0f5 SDJ |
10714 | fi |
10715 | ||
88b48903 | 10716 | |
88b48903 | 10717 | |
88b48903 | 10718 | |
88b48903 WN |
10719 | |
10720 | ||
10721 | ||
10722 | ||
10723 | ||
10724 | ||
10725 | ||
10726 | ||
8690e634 | 10727 | |
c0c3707f CB |
10728 | |
10729 | ||
c0c3707f | 10730 | |
5df4cba6 SM |
10731 | if test -z "$gl_pthreadlib_body_done"; then |
10732 | gl_pthread_api=no | |
10733 | LIBPTHREAD= | |
10734 | LIBPMULTITHREAD= | |
10735 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
10736 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
10737 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
10738 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
10739 | gl_have_pthread_h=yes | |
c0c3707f | 10740 | else |
5df4cba6 SM |
10741 | gl_have_pthread_h=no |
10742 | fi | |
c0c3707f | 10743 | |
5df4cba6 SM |
10744 | |
10745 | if test "$gl_have_pthread_h" = yes; then | |
10746 | # Other possible tests: | |
10747 | # -lpthreads (FSU threads, PCthreads) | |
10748 | # -lgthreads | |
10749 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
10750 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
10751 | # the second one only in libpthread, and lock.c needs it. | |
10752 | # | |
10753 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
10754 | # needs -pthread for some reason. See: | |
10755 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
10756 | save_LIBS=$LIBS | |
10757 | for gl_pthread in '' '-pthread'; do | |
10758 | LIBS="$LIBS $gl_pthread" | |
10759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 10760 | /* end confdefs.h. */ |
5df4cba6 SM |
10761 | #include <pthread.h> |
10762 | pthread_mutex_t m; | |
10763 | pthread_mutexattr_t ma; | |
10764 | ||
8690e634 JK |
10765 | int |
10766 | main () | |
10767 | { | |
5df4cba6 SM |
10768 | pthread_mutex_lock (&m); |
10769 | pthread_mutexattr_init (&ma); | |
8690e634 JK |
10770 | ; |
10771 | return 0; | |
10772 | } | |
10773 | _ACEOF | |
5df4cba6 SM |
10774 | if ac_fn_c_try_link "$LINENO"; then : |
10775 | gl_pthread_api=yes | |
10776 | LIBPTHREAD=$gl_pthread | |
10777 | LIBPMULTITHREAD=$gl_pthread | |
c0c3707f | 10778 | fi |
5df4cba6 SM |
10779 | rm -f core conftest.err conftest.$ac_objext \ |
10780 | conftest$ac_exeext conftest.$ac_ext | |
10781 | LIBS=$save_LIBS | |
10782 | test $gl_pthread_api = yes && break | |
10783 | done | |
6ec2e0f5 | 10784 | |
5df4cba6 SM |
10785 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, |
10786 | # since it is defined as a macro on OSF/1.) | |
10787 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
10788 | # The program links fine without libpthread. But it may actually | |
10789 | # need to link with libpthread in order to create multiple threads. | |
10790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
10791 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
10792 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
c0c3707f CB |
10793 | $as_echo_n "(cached) " >&6 |
10794 | else | |
5df4cba6 SM |
10795 | ac_check_lib_save_LIBS=$LIBS |
10796 | LIBS="-lpthread $LIBS" | |
10797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 10798 | /* end confdefs.h. */ |
5df4cba6 SM |
10799 | |
10800 | /* Override any GCC internal prototype to avoid an error. | |
10801 | Use char because int might match the return type of a GCC | |
10802 | builtin and then its argument prototype would still apply. */ | |
10803 | #ifdef __cplusplus | |
10804 | extern "C" | |
10805 | #endif | |
10806 | char pthread_kill (); | |
6ec2e0f5 SDJ |
10807 | int |
10808 | main () | |
10809 | { | |
5df4cba6 | 10810 | return pthread_kill (); |
6ec2e0f5 SDJ |
10811 | ; |
10812 | return 0; | |
10813 | } | |
10814 | _ACEOF | |
5df4cba6 SM |
10815 | if ac_fn_c_try_link "$LINENO"; then : |
10816 | ac_cv_lib_pthread_pthread_kill=yes | |
6ec2e0f5 | 10817 | else |
5df4cba6 | 10818 | ac_cv_lib_pthread_pthread_kill=no |
8690e634 | 10819 | fi |
5df4cba6 SM |
10820 | rm -f core conftest.err conftest.$ac_objext \ |
10821 | conftest$ac_exeext conftest.$ac_ext | |
10822 | LIBS=$ac_check_lib_save_LIBS | |
10823 | fi | |
10824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
10825 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
10826 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
10827 | LIBPMULTITHREAD=-lpthread | |
10828 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
10829 | # Therefore pthread_in_use() needs to actually try to create a | |
10830 | # thread: pthread_create from libc will fail, whereas | |
10831 | # pthread_create will actually create a thread. | |
10832 | # On Solaris 10 or newer, this test is no longer needed, because | |
10833 | # libc contains the fully functional pthread functions. | |
10834 | case "$host_os" in | |
10835 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
10836 | ||
10837 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
10838 | ||
10839 | esac | |
c0c3707f | 10840 | |
6ec2e0f5 | 10841 | fi |
8690e634 | 10842 | |
5df4cba6 SM |
10843 | elif test $gl_pthread_api != yes; then |
10844 | # Some library is needed. Try libpthread and libc_r. | |
10845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
10846 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
10847 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
10848 | $as_echo_n "(cached) " >&6 | |
10849 | else | |
10850 | ac_check_lib_save_LIBS=$LIBS | |
10851 | LIBS="-lpthread $LIBS" | |
10852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10853 | /* end confdefs.h. */ | |
c0c3707f | 10854 | |
5df4cba6 SM |
10855 | /* Override any GCC internal prototype to avoid an error. |
10856 | Use char because int might match the return type of a GCC | |
10857 | builtin and then its argument prototype would still apply. */ | |
10858 | #ifdef __cplusplus | |
10859 | extern "C" | |
10860 | #endif | |
10861 | char pthread_kill (); | |
10862 | int | |
10863 | main () | |
10864 | { | |
10865 | return pthread_kill (); | |
10866 | ; | |
10867 | return 0; | |
10868 | } | |
10869 | _ACEOF | |
10870 | if ac_fn_c_try_link "$LINENO"; then : | |
10871 | ac_cv_lib_pthread_pthread_kill=yes | |
10872 | else | |
10873 | ac_cv_lib_pthread_pthread_kill=no | |
10874 | fi | |
10875 | rm -f core conftest.err conftest.$ac_objext \ | |
10876 | conftest$ac_exeext conftest.$ac_ext | |
10877 | LIBS=$ac_check_lib_save_LIBS | |
10878 | fi | |
10879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
10880 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
10881 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
10882 | gl_pthread_api=yes | |
10883 | LIBPTHREAD=-lpthread | |
10884 | LIBPMULTITHREAD=-lpthread | |
10885 | fi | |
c0c3707f | 10886 | |
5df4cba6 SM |
10887 | if test $gl_pthread_api != yes; then |
10888 | # For FreeBSD 4. | |
10889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
10890 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
10891 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
10892 | $as_echo_n "(cached) " >&6 | |
10893 | else | |
10894 | ac_check_lib_save_LIBS=$LIBS | |
10895 | LIBS="-lc_r $LIBS" | |
10896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10897 | /* end confdefs.h. */ | |
c0c3707f | 10898 | |
5df4cba6 SM |
10899 | /* Override any GCC internal prototype to avoid an error. |
10900 | Use char because int might match the return type of a GCC | |
10901 | builtin and then its argument prototype would still apply. */ | |
10902 | #ifdef __cplusplus | |
10903 | extern "C" | |
10904 | #endif | |
10905 | char pthread_kill (); | |
10906 | int | |
10907 | main () | |
10908 | { | |
10909 | return pthread_kill (); | |
10910 | ; | |
10911 | return 0; | |
10912 | } | |
10913 | _ACEOF | |
10914 | if ac_fn_c_try_link "$LINENO"; then : | |
10915 | ac_cv_lib_c_r_pthread_kill=yes | |
10916 | else | |
10917 | ac_cv_lib_c_r_pthread_kill=no | |
10918 | fi | |
10919 | rm -f core conftest.err conftest.$ac_objext \ | |
10920 | conftest$ac_exeext conftest.$ac_ext | |
10921 | LIBS=$ac_check_lib_save_LIBS | |
10922 | fi | |
10923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
10924 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
10925 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
10926 | gl_pthread_api=yes | |
10927 | LIBPTHREAD=-lc_r | |
10928 | LIBPMULTITHREAD=-lc_r | |
10929 | fi | |
c0c3707f | 10930 | |
5df4cba6 SM |
10931 | fi |
10932 | fi | |
10933 | fi | |
10934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
10935 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
10936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
10937 | $as_echo "$gl_pthread_api" >&6; } | |
c0c3707f CB |
10938 | |
10939 | ||
5df4cba6 | 10940 | if test $gl_pthread_api = yes; then |
c0c3707f | 10941 | |
5df4cba6 | 10942 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h |
c0c3707f | 10943 | |
5df4cba6 | 10944 | fi |
c0c3707f | 10945 | |
5df4cba6 SM |
10946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10947 | /* end confdefs.h. */ | |
10948 | #include <sched.h> | |
10949 | int | |
10950 | main () | |
10951 | { | |
10952 | sched_yield (); | |
10953 | ; | |
10954 | return 0; | |
10955 | } | |
10956 | _ACEOF | |
10957 | if ac_fn_c_try_link "$LINENO"; then : | |
10958 | LIB_SCHED_YIELD= | |
c0c3707f | 10959 | |
5df4cba6 SM |
10960 | else |
10961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
10962 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
10963 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
c0c3707f | 10964 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 10965 | else |
5df4cba6 SM |
10966 | ac_check_lib_save_LIBS=$LIBS |
10967 | LIBS="-lrt $LIBS" | |
10968 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 10969 | /* end confdefs.h. */ |
6ec2e0f5 | 10970 | |
5df4cba6 SM |
10971 | /* Override any GCC internal prototype to avoid an error. |
10972 | Use char because int might match the return type of a GCC | |
10973 | builtin and then its argument prototype would still apply. */ | |
10974 | #ifdef __cplusplus | |
10975 | extern "C" | |
10976 | #endif | |
10977 | char sched_yield (); | |
10978 | int | |
10979 | main () | |
10980 | { | |
10981 | return sched_yield (); | |
10982 | ; | |
10983 | return 0; | |
10984 | } | |
10985 | _ACEOF | |
10986 | if ac_fn_c_try_link "$LINENO"; then : | |
10987 | ac_cv_lib_rt_sched_yield=yes | |
10988 | else | |
10989 | ac_cv_lib_rt_sched_yield=no | |
10990 | fi | |
10991 | rm -f core conftest.err conftest.$ac_objext \ | |
10992 | conftest$ac_exeext conftest.$ac_ext | |
10993 | LIBS=$ac_check_lib_save_LIBS | |
10994 | fi | |
10995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 | |
10996 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
10997 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
10998 | LIB_SCHED_YIELD=-lrt | |
10999 | else | |
11000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
11001 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
11002 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
11003 | $as_echo_n "(cached) " >&6 | |
11004 | else | |
11005 | ac_check_lib_save_LIBS=$LIBS | |
11006 | LIBS="-lposix4 $LIBS" | |
11007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11008 | /* end confdefs.h. */ | |
6ec2e0f5 | 11009 | |
5df4cba6 SM |
11010 | /* Override any GCC internal prototype to avoid an error. |
11011 | Use char because int might match the return type of a GCC | |
11012 | builtin and then its argument prototype would still apply. */ | |
11013 | #ifdef __cplusplus | |
11014 | extern "C" | |
11015 | #endif | |
11016 | char sched_yield (); | |
11017 | int | |
11018 | main () | |
11019 | { | |
11020 | return sched_yield (); | |
11021 | ; | |
11022 | return 0; | |
11023 | } | |
11024 | _ACEOF | |
11025 | if ac_fn_c_try_link "$LINENO"; then : | |
11026 | ac_cv_lib_posix4_sched_yield=yes | |
11027 | else | |
11028 | ac_cv_lib_posix4_sched_yield=no | |
11029 | fi | |
11030 | rm -f core conftest.err conftest.$ac_objext \ | |
11031 | conftest$ac_exeext conftest.$ac_ext | |
11032 | LIBS=$ac_check_lib_save_LIBS | |
11033 | fi | |
11034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
11035 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
11036 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
11037 | LIB_SCHED_YIELD=-lposix4 | |
6ec2e0f5 | 11038 | fi |
8690e634 | 11039 | |
5df4cba6 | 11040 | fi |
8690e634 | 11041 | |
8690e634 | 11042 | |
5df4cba6 SM |
11043 | fi |
11044 | rm -f core conftest.err conftest.$ac_objext \ | |
11045 | conftest$ac_exeext conftest.$ac_ext | |
6ec2e0f5 SDJ |
11046 | |
11047 | ||
5df4cba6 | 11048 | gl_pthreadlib_body_done=done |
c0c3707f | 11049 | fi |
6ec2e0f5 | 11050 | |
6ec2e0f5 | 11051 | |
8690e634 JK |
11052 | |
11053 | ||
472fa5ee | 11054 | |
c0c3707f | 11055 | |
c0c3707f | 11056 | |
c0c3707f | 11057 | |
c0c3707f | 11058 | |
5df4cba6 SM |
11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 |
11060 | $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } | |
11061 | if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : | |
11062 | $as_echo_n "(cached) " >&6 | |
11063 | else | |
11064 | case "$host_os" in | |
11065 | # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. | |
11066 | *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) | |
11067 | gl_cv_func_setlocale_null_all_mtsafe=no ;; | |
11068 | # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. | |
11069 | *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) | |
11070 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; | |
11071 | # If we don't know, obey --enable-cross-guesses. | |
11072 | *) | |
11073 | gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; | |
11074 | esac | |
c0c3707f | 11075 | |
5e8754f9 | 11076 | fi |
5df4cba6 SM |
11077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 |
11078 | $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } | |
11079 | case "$host_os" in | |
11080 | mingw*) ;; | |
11081 | *) | |
11082 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
11083 | gl_cv_func_setlocale_null_all_mtsafe="trivially yes" | |
11084 | fi | |
11085 | ;; | |
11086 | esac | |
11087 | case "$gl_cv_func_setlocale_null_all_mtsafe" in | |
11088 | *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; | |
11089 | *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; | |
11090 | esac | |
5e8754f9 SDJ |
11091 | |
11092 | cat >>confdefs.h <<_ACEOF | |
5df4cba6 | 11093 | #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE |
5e8754f9 SDJ |
11094 | _ACEOF |
11095 | ||
11096 | ||
5df4cba6 SM |
11097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 |
11098 | $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } | |
11099 | if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : | |
11100 | $as_echo_n "(cached) " >&6 | |
11101 | else | |
11102 | case "$host_os" in | |
11103 | # Guess no on OpenBSD, AIX. | |
11104 | openbsd* | aix*) | |
11105 | gl_cv_func_setlocale_null_one_mtsafe=no ;; | |
11106 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. | |
11107 | *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) | |
11108 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; | |
11109 | # If we don't know, obey --enable-cross-guesses. | |
11110 | *) | |
11111 | gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; | |
11112 | esac | |
5abebf3c | 11113 | |
5df4cba6 SM |
11114 | fi |
11115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 | |
11116 | $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } | |
11117 | case "$host_os" in | |
11118 | mingw*) ;; | |
11119 | *) | |
11120 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
11121 | gl_cv_func_setlocale_null_one_mtsafe="trivially yes" | |
11122 | fi | |
11123 | ;; | |
11124 | esac | |
11125 | case "$gl_cv_func_setlocale_null_one_mtsafe" in | |
11126 | *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; | |
11127 | *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; | |
11128 | esac | |
5abebf3c | 11129 | |
c0c3707f | 11130 | cat >>confdefs.h <<_ACEOF |
5df4cba6 | 11131 | #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE |
5abebf3c | 11132 | _ACEOF |
c0c3707f CB |
11133 | |
11134 | ||
5df4cba6 SM |
11135 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then |
11136 | case "$host_os" in | |
11137 | mingw*) LIB_SETLOCALE_NULL= ;; | |
11138 | *) | |
11139 | ||
11140 | ||
11141 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
11142 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
11143 | if ${gl_cv_have_weak+:} false; then : | |
11144 | $as_echo_n "(cached) " >&6 | |
5abebf3c | 11145 | else |
5df4cba6 SM |
11146 | gl_cv_have_weak=no |
11147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11148 | /* end confdefs.h. */ | |
11149 | extern void xyzzy (); | |
11150 | #pragma weak xyzzy | |
11151 | int | |
11152 | main () | |
11153 | { | |
11154 | xyzzy(); | |
11155 | ; | |
11156 | return 0; | |
11157 | } | |
11158 | _ACEOF | |
11159 | if ac_fn_c_try_link "$LINENO"; then : | |
11160 | gl_cv_have_weak=maybe | |
5abebf3c | 11161 | fi |
5df4cba6 SM |
11162 | rm -f core conftest.err conftest.$ac_objext \ |
11163 | conftest$ac_exeext conftest.$ac_ext | |
11164 | if test $gl_cv_have_weak = maybe; then | |
11165 | if test "$cross_compiling" = yes; then : | |
11166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11167 | /* end confdefs.h. */ | |
11168 | #ifdef __ELF__ | |
11169 | Extensible Linking Format | |
11170 | #endif | |
c0c3707f | 11171 | |
5df4cba6 SM |
11172 | _ACEOF |
11173 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11174 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
11175 | gl_cv_have_weak="guessing yes" | |
11176 | else | |
11177 | gl_cv_have_weak="guessing no" | |
11178 | fi | |
11179 | rm -f conftest* | |
5abebf3c CB |
11180 | |
11181 | ||
5df4cba6 SM |
11182 | else |
11183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11184 | /* end confdefs.h. */ | |
5abebf3c | 11185 | |
5df4cba6 SM |
11186 | #include <stdio.h> |
11187 | #pragma weak fputs | |
11188 | int main () | |
11189 | { | |
11190 | return (fputs == NULL); | |
11191 | } | |
c0c3707f | 11192 | _ACEOF |
5df4cba6 SM |
11193 | if ac_fn_c_try_run "$LINENO"; then : |
11194 | gl_cv_have_weak=yes | |
11195 | else | |
11196 | gl_cv_have_weak=no | |
11197 | fi | |
11198 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11199 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11200 | fi | |
11201 | ||
11202 | fi | |
11203 | case " $LDFLAGS " in | |
11204 | *" -static "*) gl_cv_have_weak=no ;; | |
11205 | esac | |
11206 | case "$gl_cv_have_weak" in | |
11207 | *yes) | |
11208 | case "$host_os" in | |
11209 | freebsd* | dragonfly*) | |
11210 | : > conftest1.c | |
11211 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
11212 | cat <<EOF > conftest2.c | |
11213 | #include <pthread.h> | |
11214 | #pragma weak pthread_mutexattr_gettype | |
11215 | int main () | |
11216 | { | |
11217 | return (pthread_mutexattr_gettype != NULL); | |
11218 | } | |
11219 | EOF | |
11220 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
11221 | || gl_cv_have_weak=no | |
11222 | rm -f conftest1.c libempty.so conftest2.c conftest | |
11223 | ;; | |
11224 | esac | |
11225 | ;; | |
11226 | esac | |
5abebf3c | 11227 | |
c0c3707f | 11228 | fi |
5df4cba6 SM |
11229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 |
11230 | $as_echo "$gl_cv_have_weak" >&6; } | |
11231 | case "$gl_cv_have_weak" in | |
11232 | *yes) | |
5abebf3c | 11233 | |
5df4cba6 | 11234 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h |
5abebf3c | 11235 | |
5df4cba6 SM |
11236 | ;; |
11237 | esac | |
11238 | ||
11239 | case "$gl_cv_have_weak" in | |
11240 | *yes) LIB_SETLOCALE_NULL= ;; | |
11241 | *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; | |
11242 | esac | |
11243 | ;; | |
11244 | esac | |
5abebf3c | 11245 | else |
5df4cba6 | 11246 | LIB_SETLOCALE_NULL= |
5abebf3c | 11247 | fi |
5abebf3c CB |
11248 | |
11249 | ||
11250 | ||
5abebf3c | 11251 | |
5abebf3c | 11252 | |
5df4cba6 SM |
11253 | GNULIB_SOCKET=0; |
11254 | GNULIB_CONNECT=0; | |
11255 | GNULIB_ACCEPT=0; | |
11256 | GNULIB_BIND=0; | |
11257 | GNULIB_GETPEERNAME=0; | |
11258 | GNULIB_GETSOCKNAME=0; | |
11259 | GNULIB_GETSOCKOPT=0; | |
11260 | GNULIB_LISTEN=0; | |
11261 | GNULIB_RECV=0; | |
11262 | GNULIB_SEND=0; | |
11263 | GNULIB_RECVFROM=0; | |
11264 | GNULIB_SENDTO=0; | |
11265 | GNULIB_SETSOCKOPT=0; | |
11266 | GNULIB_SHUTDOWN=0; | |
11267 | GNULIB_ACCEPT4=0; | |
11268 | HAVE_STRUCT_SOCKADDR_STORAGE=1; | |
11269 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; | |
11270 | ||
11271 | HAVE_SA_FAMILY_T=1; | |
11272 | HAVE_ACCEPT4=1; | |
c0c3707f CB |
11273 | |
11274 | ||
11275 | ||
11276 | ||
11277 | ||
5df4cba6 SM |
11278 | case "$host_os" in |
11279 | osf*) | |
c0c3707f | 11280 | |
5df4cba6 | 11281 | $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h |
c0c3707f | 11282 | |
5df4cba6 SM |
11283 | ;; |
11284 | esac | |
c0c3707f | 11285 | |
5df4cba6 SM |
11286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5 |
11287 | $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; } | |
11288 | if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : | |
5abebf3c CB |
11289 | $as_echo_n "(cached) " >&6 |
11290 | else | |
5df4cba6 SM |
11291 | |
11292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11293 | /* end confdefs.h. */ |
c0c3707f | 11294 | #include <sys/socket.h> |
c0c3707f CB |
11295 | int |
11296 | main () | |
11297 | { | |
5df4cba6 | 11298 | |
c0c3707f CB |
11299 | ; |
11300 | return 0; | |
11301 | } | |
11302 | _ACEOF | |
11303 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 11304 | gl_cv_header_sys_socket_h_selfcontained=yes |
5abebf3c | 11305 | else |
5df4cba6 | 11306 | gl_cv_header_sys_socket_h_selfcontained=no |
5abebf3c | 11307 | fi |
c0c3707f | 11308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 11309 | |
5df4cba6 SM |
11310 | fi |
11311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 | |
11312 | $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } | |
11313 | if test $gl_cv_header_sys_socket_h_selfcontained = yes; then | |
11314 | for ac_func in shutdown | |
11315 | do : | |
11316 | ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" | |
11317 | if test "x$ac_cv_func_shutdown" = xyes; then : | |
11318 | cat >>confdefs.h <<_ACEOF | |
11319 | #define HAVE_SHUTDOWN 1 | |
11320 | _ACEOF | |
c0c3707f | 11321 | |
5df4cba6 SM |
11322 | fi |
11323 | done | |
c0c3707f | 11324 | |
5df4cba6 SM |
11325 | if test $ac_cv_func_shutdown = yes; then |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5 | |
11327 | $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; } | |
11328 | if ${gl_cv_header_sys_socket_h_shut+:} false; then : | |
5abebf3c CB |
11329 | $as_echo_n "(cached) " >&6 |
11330 | else | |
5df4cba6 SM |
11331 | |
11332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11333 | /* end confdefs.h. */ |
c0c3707f | 11334 | #include <sys/socket.h> |
c0c3707f CB |
11335 | int |
11336 | main () | |
11337 | { | |
5df4cba6 | 11338 | int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; |
c0c3707f CB |
11339 | ; |
11340 | return 0; | |
11341 | } | |
11342 | _ACEOF | |
11343 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 11344 | gl_cv_header_sys_socket_h_shut=yes |
c0c3707f | 11345 | else |
5df4cba6 | 11346 | gl_cv_header_sys_socket_h_shut=no |
c0c3707f CB |
11347 | fi |
11348 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5abebf3c | 11349 | |
5df4cba6 SM |
11350 | fi |
11351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 | |
11352 | $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } | |
11353 | if test $gl_cv_header_sys_socket_h_shut = no; then | |
11354 | SYS_SOCKET_H='sys/socket.h' | |
11355 | fi | |
11356 | fi | |
c0c3707f | 11357 | fi |
5df4cba6 | 11358 | # We need to check for ws2tcpip.h now. |
5abebf3c | 11359 | |
5abebf3c | 11360 | |
5abebf3c | 11361 | |
5abebf3c CB |
11362 | |
11363 | ||
11364 | ||
11365 | ||
c0c3707f CB |
11366 | |
11367 | ||
11368 | ||
11369 | ||
11370 | if test $gl_cv_have_include_next = yes; then | |
5df4cba6 | 11371 | gl_cv_next_sys_socket_h='<'sys/socket.h'>' |
c0c3707f | 11372 | else |
5df4cba6 SM |
11373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5 |
11374 | $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; } | |
11375 | if ${gl_cv_next_sys_socket_h+:} false; then : | |
5abebf3c CB |
11376 | $as_echo_n "(cached) " >&6 |
11377 | else | |
5abebf3c | 11378 | |
5df4cba6 | 11379 | if test $ac_cv_header_sys_socket_h = yes; then |
5abebf3c | 11380 | |
5abebf3c CB |
11381 | |
11382 | ||
c0c3707f CB |
11383 | |
11384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11385 | /* end confdefs.h. */ | |
5df4cba6 | 11386 | #include <sys/socket.h> |
c0c3707f CB |
11387 | _ACEOF |
11388 | case "$host_os" in | |
11389 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
11390 | *) gl_absname_cpp="$ac_cpp" ;; | |
11391 | esac | |
11392 | ||
11393 | case "$host_os" in | |
11394 | mingw*) | |
11395 | gl_dirsep_regex='[/\\]' | |
5abebf3c CB |
11396 | ;; |
11397 | *) | |
c0c3707f | 11398 | gl_dirsep_regex='\/' |
5abebf3c CB |
11399 | ;; |
11400 | esac | |
c0c3707f | 11401 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' |
5df4cba6 | 11402 | gl_header_literal_regex=`echo 'sys/socket.h' \ |
c0c3707f CB |
11403 | | sed -e "$gl_make_literal_regex_sed"` |
11404 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
11405 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
11406 | s|^/[^/]|//&| | |
11407 | p | |
11408 | q | |
11409 | }' | |
5abebf3c | 11410 | |
5df4cba6 | 11411 | gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
c0c3707f | 11412 | sed -n "$gl_absolute_header_sed"` |
5abebf3c | 11413 | |
5df4cba6 SM |
11414 | gl_header=$gl_cv_absolute_sys_socket_h |
11415 | gl_cv_next_sys_socket_h='"'$gl_header'"' | |
c0c3707f | 11416 | else |
5df4cba6 | 11417 | gl_cv_next_sys_socket_h='<'sys/socket.h'>' |
c0c3707f | 11418 | fi |
5abebf3c | 11419 | |
5abebf3c | 11420 | |
5abebf3c | 11421 | fi |
5df4cba6 SM |
11422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 |
11423 | $as_echo "$gl_cv_next_sys_socket_h" >&6; } | |
c0c3707f | 11424 | fi |
5df4cba6 | 11425 | NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h |
c0c3707f CB |
11426 | |
11427 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
11428 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5df4cba6 | 11429 | gl_next_as_first_directive='<'sys/socket.h'>' |
c0c3707f CB |
11430 | else |
11431 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5df4cba6 | 11432 | gl_next_as_first_directive=$gl_cv_next_sys_socket_h |
c0c3707f | 11433 | fi |
5df4cba6 | 11434 | NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive |
5abebf3c CB |
11435 | |
11436 | ||
c0c3707f CB |
11437 | |
11438 | ||
5df4cba6 SM |
11439 | if test $ac_cv_header_sys_socket_h = yes; then |
11440 | HAVE_SYS_SOCKET_H=1 | |
11441 | else | |
11442 | HAVE_SYS_SOCKET_H=0 | |
11443 | fi | |
c0c3707f | 11444 | |
5abebf3c | 11445 | |
c0c3707f | 11446 | |
5df4cba6 SM |
11447 | if test $ac_cv_header_sys_socket_h = yes; then |
11448 | HAVE_WS2TCPIP_H=0 | |
11449 | else | |
11450 | if test $ac_cv_header_ws2tcpip_h = yes; then | |
11451 | HAVE_WS2TCPIP_H=1 | |
11452 | else | |
11453 | HAVE_WS2TCPIP_H=0 | |
11454 | fi | |
11455 | fi | |
11456 | ||
11457 | ||
11458 | ||
11459 | ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " | |
11460 | /* sys/types.h is not needed according to POSIX, but the | |
11461 | sys/socket.h in i386-unknown-freebsd4.10 and | |
11462 | powerpc-apple-darwin5.5 required it. */ | |
11463 | #include <sys/types.h> | |
11464 | #ifdef HAVE_SYS_SOCKET_H | |
11465 | #include <sys/socket.h> | |
11466 | #endif | |
11467 | #ifdef HAVE_WS2TCPIP_H | |
11468 | #include <ws2tcpip.h> | |
11469 | #endif | |
11470 | ||
11471 | " | |
11472 | if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : | |
11473 | ||
11474 | cat >>confdefs.h <<_ACEOF | |
11475 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | |
5abebf3c | 11476 | _ACEOF |
5df4cba6 SM |
11477 | |
11478 | ||
5abebf3c | 11479 | fi |
5df4cba6 SM |
11480 | ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " |
11481 | /* sys/types.h is not needed according to POSIX, but the | |
11482 | sys/socket.h in i386-unknown-freebsd4.10 and | |
11483 | powerpc-apple-darwin5.5 required it. */ | |
11484 | #include <sys/types.h> | |
11485 | #ifdef HAVE_SYS_SOCKET_H | |
11486 | #include <sys/socket.h> | |
11487 | #endif | |
11488 | #ifdef HAVE_WS2TCPIP_H | |
11489 | #include <ws2tcpip.h> | |
11490 | #endif | |
11491 | ||
11492 | " | |
11493 | if test "x$ac_cv_type_sa_family_t" = xyes; then : | |
11494 | ||
11495 | cat >>confdefs.h <<_ACEOF | |
11496 | #define HAVE_SA_FAMILY_T 1 | |
11497 | _ACEOF | |
11498 | ||
11499 | ||
5abebf3c | 11500 | fi |
5df4cba6 SM |
11501 | |
11502 | if test $ac_cv_type_struct_sockaddr_storage = no; then | |
11503 | HAVE_STRUCT_SOCKADDR_STORAGE=0 | |
11504 | fi | |
11505 | if test $ac_cv_type_sa_family_t = no; then | |
11506 | HAVE_SA_FAMILY_T=0 | |
c0c3707f | 11507 | fi |
5df4cba6 SM |
11508 | if test $ac_cv_type_struct_sockaddr_storage != no; then |
11509 | ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h> | |
11510 | #ifdef HAVE_SYS_SOCKET_H | |
11511 | #include <sys/socket.h> | |
11512 | #endif | |
11513 | #ifdef HAVE_WS2TCPIP_H | |
11514 | #include <ws2tcpip.h> | |
11515 | #endif | |
11516 | ||
11517 | " | |
11518 | if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : | |
11519 | ||
11520 | cat >>confdefs.h <<_ACEOF | |
11521 | #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 | |
11522 | _ACEOF | |
11523 | ||
5abebf3c | 11524 | |
5abebf3c | 11525 | else |
5df4cba6 | 11526 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 |
5abebf3c CB |
11527 | fi |
11528 | ||
5df4cba6 SM |
11529 | fi |
11530 | if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ | |
11531 | || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then | |
11532 | SYS_SOCKET_H='sys/socket.h' | |
11533 | fi | |
5abebf3c | 11534 | |
5abebf3c | 11535 | |
5df4cba6 SM |
11536 | |
11537 | ||
11538 | if test $ac_cv_header_sys_socket_h != yes; then | |
11539 | for ac_header in winsock2.h | |
11540 | do : | |
11541 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
11542 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
11543 | cat >>confdefs.h <<_ACEOF | |
11544 | #define HAVE_WINSOCK2_H 1 | |
11545 | _ACEOF | |
11546 | ||
11547 | fi | |
11548 | ||
11549 | done | |
11550 | ||
11551 | fi | |
11552 | if test "$ac_cv_header_winsock2_h" = yes; then | |
11553 | HAVE_WINSOCK2_H=1 | |
11554 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
11555 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
11556 | else | |
11557 | HAVE_WINSOCK2_H=0 | |
11558 | fi | |
11559 | ||
11560 | ||
11561 | ||
11562 | ||
11563 | ||
11564 | ||
11565 | ||
11566 | ||
11567 | ||
11568 | ||
11569 | ||
11570 | ||
11571 | ||
698be2d8 CB |
11572 | |
11573 | ||
5df4cba6 SM |
11574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 |
11575 | $as_echo_n "checking for IPv4 sockets... " >&6; } | |
11576 | if ${gl_cv_socket_ipv4+:} false; then : | |
5abebf3c CB |
11577 | $as_echo_n "(cached) " >&6 |
11578 | else | |
c0c3707f | 11579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 11580 | /* end confdefs.h. */ |
5df4cba6 SM |
11581 | #include <sys/types.h> |
11582 | #ifdef HAVE_SYS_SOCKET_H | |
11583 | #include <sys/socket.h> | |
11584 | #endif | |
11585 | #ifdef HAVE_NETINET_IN_H | |
11586 | #include <netinet/in.h> | |
11587 | #endif | |
11588 | #ifdef HAVE_WINSOCK2_H | |
11589 | #include <winsock2.h> | |
11590 | #endif | |
5abebf3c CB |
11591 | int |
11592 | main () | |
11593 | { | |
5df4cba6 SM |
11594 | int x = AF_INET; struct in_addr y; struct sockaddr_in z; |
11595 | if (&x && &y && &z) return 0; | |
5abebf3c CB |
11596 | ; |
11597 | return 0; | |
11598 | } | |
11599 | _ACEOF | |
c0c3707f | 11600 | if ac_fn_c_try_compile "$LINENO"; then : |
5df4cba6 | 11601 | gl_cv_socket_ipv4=yes |
5abebf3c | 11602 | else |
5df4cba6 | 11603 | gl_cv_socket_ipv4=no |
5abebf3c | 11604 | fi |
c0c3707f | 11605 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 11606 | fi |
5df4cba6 SM |
11607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5 |
11608 | $as_echo "$gl_cv_socket_ipv4" >&6; } | |
11609 | if test $gl_cv_socket_ipv4 = yes; then | |
5abebf3c | 11610 | |
5df4cba6 | 11611 | $as_echo "#define HAVE_IPV4 1" >>confdefs.h |
5abebf3c | 11612 | |
5df4cba6 | 11613 | fi |
5abebf3c | 11614 | |
5df4cba6 SM |
11615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 |
11616 | $as_echo_n "checking for IPv6 sockets... " >&6; } | |
11617 | if ${gl_cv_socket_ipv6+:} false; then : | |
5abebf3c CB |
11618 | $as_echo_n "(cached) " >&6 |
11619 | else | |
c0c3707f | 11620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 11621 | /* end confdefs.h. */ |
5df4cba6 SM |
11622 | #include <sys/types.h> |
11623 | #ifdef HAVE_SYS_SOCKET_H | |
11624 | #include <sys/socket.h> | |
5abebf3c | 11625 | #endif |
5df4cba6 SM |
11626 | #ifdef HAVE_NETINET_IN_H |
11627 | #include <netinet/in.h> | |
11628 | #endif | |
11629 | #ifdef HAVE_WINSOCK2_H | |
11630 | #include <winsock2.h> | |
11631 | #endif | |
11632 | #ifdef HAVE_WS2TCPIP_H | |
11633 | #include <ws2tcpip.h> | |
11634 | #endif | |
11635 | int | |
11636 | main () | |
11637 | { | |
11638 | int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; | |
11639 | if (&x && &y && &z) return 0; | |
11640 | ; | |
11641 | return 0; | |
11642 | } | |
11643 | _ACEOF | |
11644 | if ac_fn_c_try_compile "$LINENO"; then : | |
11645 | gl_cv_socket_ipv6=yes | |
11646 | else | |
11647 | gl_cv_socket_ipv6=no | |
11648 | fi | |
11649 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11650 | fi | |
11651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5 | |
11652 | $as_echo "$gl_cv_socket_ipv6" >&6; } | |
11653 | if test $gl_cv_socket_ipv6 = yes; then | |
11654 | ||
11655 | $as_echo "#define HAVE_IPV6 1" >>confdefs.h | |
11656 | ||
11657 | fi | |
11658 | ||
11659 | ||
11660 | ||
11661 | ||
11662 | ||
11663 | ||
11664 | ||
11665 | ||
11666 | ||
11667 | ||
11668 | ||
11669 | ||
11670 | ||
11671 | if test $gl_cv_have_include_next = yes; then | |
11672 | gl_cv_next_limits_h='<'limits.h'>' | |
11673 | else | |
11674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5 | |
11675 | $as_echo_n "checking absolute name of <limits.h>... " >&6; } | |
11676 | if ${gl_cv_next_limits_h+:} false; then : | |
11677 | $as_echo_n "(cached) " >&6 | |
11678 | else | |
11679 | ||
11680 | if test $ac_cv_header_limits_h = yes; then | |
11681 | ||
11682 | ||
11683 | ||
11684 | ||
11685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11686 | /* end confdefs.h. */ | |
11687 | #include <limits.h> | |
11688 | _ACEOF | |
11689 | case "$host_os" in | |
11690 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
11691 | *) gl_absname_cpp="$ac_cpp" ;; | |
11692 | esac | |
11693 | ||
11694 | case "$host_os" in | |
11695 | mingw*) | |
11696 | gl_dirsep_regex='[/\\]' | |
11697 | ;; | |
11698 | *) | |
11699 | gl_dirsep_regex='\/' | |
11700 | ;; | |
11701 | esac | |
11702 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
11703 | gl_header_literal_regex=`echo 'limits.h' \ | |
11704 | | sed -e "$gl_make_literal_regex_sed"` | |
11705 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
11706 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
11707 | s|^/[^/]|//&| | |
11708 | p | |
11709 | q | |
11710 | }' | |
11711 | ||
11712 | gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
11713 | sed -n "$gl_absolute_header_sed"` | |
11714 | ||
11715 | gl_header=$gl_cv_absolute_limits_h | |
11716 | gl_cv_next_limits_h='"'$gl_header'"' | |
11717 | else | |
11718 | gl_cv_next_limits_h='<'limits.h'>' | |
11719 | fi | |
11720 | ||
11721 | ||
11722 | fi | |
11723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 | |
11724 | $as_echo "$gl_cv_next_limits_h" >&6; } | |
11725 | fi | |
11726 | NEXT_LIMITS_H=$gl_cv_next_limits_h | |
11727 | ||
11728 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
11729 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
11730 | gl_next_as_first_directive='<'limits.h'>' | |
11731 | else | |
11732 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
11733 | gl_next_as_first_directive=$gl_cv_next_limits_h | |
11734 | fi | |
11735 | NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive | |
11736 | ||
11737 | ||
11738 | ||
11739 | ||
11740 | ||
11741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5 | |
11742 | $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; } | |
11743 | if ${gl_cv_header_limits_width+:} false; then : | |
11744 | $as_echo_n "(cached) " >&6 | |
11745 | else | |
11746 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11747 | /* end confdefs.h. */ | |
11748 | #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | |
11749 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | |
11750 | #endif | |
11751 | #include <limits.h> | |
11752 | long long llm = LLONG_MAX; | |
11753 | int wb = WORD_BIT; | |
11754 | int ullw = ULLONG_WIDTH; | |
c0c3707f | 11755 | |
5abebf3c CB |
11756 | int |
11757 | main () | |
11758 | { | |
c0c3707f | 11759 | |
5abebf3c CB |
11760 | ; |
11761 | return 0; | |
11762 | } | |
11763 | _ACEOF | |
c0c3707f | 11764 | if ac_fn_c_try_compile "$LINENO"; then : |
5df4cba6 | 11765 | gl_cv_header_limits_width=yes |
5abebf3c | 11766 | else |
5df4cba6 | 11767 | gl_cv_header_limits_width=no |
5abebf3c | 11768 | fi |
c0c3707f | 11769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 11770 | fi |
5df4cba6 SM |
11771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 |
11772 | $as_echo "$gl_cv_header_limits_width" >&6; } | |
11773 | if test "$gl_cv_header_limits_width" = yes; then | |
11774 | LIMITS_H= | |
c0c3707f | 11775 | else |
5df4cba6 | 11776 | LIMITS_H=limits.h |
c0c3707f | 11777 | fi |
5abebf3c | 11778 | |
5df4cba6 SM |
11779 | if test -n "$LIMITS_H"; then |
11780 | GL_GENERATE_LIMITS_H_TRUE= | |
11781 | GL_GENERATE_LIMITS_H_FALSE='#' | |
11782 | else | |
11783 | GL_GENERATE_LIMITS_H_TRUE='#' | |
11784 | GL_GENERATE_LIMITS_H_FALSE= | |
11785 | fi | |
c0c3707f CB |
11786 | |
11787 | ||
5abebf3c | 11788 | |
5df4cba6 SM |
11789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
11790 | $as_echo_n "checking for wint_t... " >&6; } | |
11791 | if ${gt_cv_c_wint_t+:} false; then : | |
c0c3707f | 11792 | $as_echo_n "(cached) " >&6 |
c0c3707f CB |
11793 | else |
11794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5abebf3c | 11795 | /* end confdefs.h. */ |
5df4cba6 SM |
11796 | |
11797 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
11798 | <wchar.h>. | |
11799 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
11800 | before <wchar.h>. */ | |
11801 | #include <stddef.h> | |
11802 | #include <stdio.h> | |
11803 | #include <time.h> | |
11804 | #include <wchar.h> | |
11805 | wint_t foo = (wchar_t)'\0'; | |
5abebf3c CB |
11806 | int |
11807 | main () | |
11808 | { | |
5df4cba6 | 11809 | |
5abebf3c CB |
11810 | ; |
11811 | return 0; | |
11812 | } | |
11813 | _ACEOF | |
5df4cba6 SM |
11814 | if ac_fn_c_try_compile "$LINENO"; then : |
11815 | gt_cv_c_wint_t=yes | |
c0c3707f | 11816 | else |
5df4cba6 | 11817 | gt_cv_c_wint_t=no |
c0c3707f | 11818 | fi |
5df4cba6 | 11819 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c0c3707f | 11820 | fi |
5df4cba6 SM |
11821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 |
11822 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
11823 | if test $gt_cv_c_wint_t = yes; then | |
5abebf3c | 11824 | |
5df4cba6 | 11825 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
5abebf3c CB |
11826 | |
11827 | ||
5df4cba6 SM |
11828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 |
11829 | $as_echo_n "checking whether wint_t is too small... " >&6; } | |
11830 | if ${gl_cv_type_wint_t_too_small+:} false; then : | |
11831 | $as_echo_n "(cached) " >&6 | |
11832 | else | |
11833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11834 | /* end confdefs.h. */ | |
11835 | ||
11836 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
11837 | <wchar.h>. | |
11838 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
11839 | included before <wchar.h>. */ | |
11840 | #if !(defined __GLIBC__ && !defined __UCLIBC__) | |
11841 | # include <stddef.h> | |
11842 | # include <stdio.h> | |
11843 | # include <time.h> | |
11844 | #endif | |
11845 | #include <wchar.h> | |
698be2d8 | 11846 | int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; |
5df4cba6 SM |
11847 | |
11848 | int | |
11849 | main () | |
11850 | { | |
11851 | ||
11852 | ; | |
11853 | return 0; | |
11854 | } | |
11855 | _ACEOF | |
11856 | if ac_fn_c_try_compile "$LINENO"; then : | |
11857 | gl_cv_type_wint_t_too_small=no | |
11858 | else | |
11859 | gl_cv_type_wint_t_too_small=yes | |
11860 | fi | |
11861 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11862 | fi | |
11863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 | |
11864 | $as_echo "$gl_cv_type_wint_t_too_small" >&6; } | |
11865 | if test $gl_cv_type_wint_t_too_small = yes; then | |
11866 | GNULIB_OVERRIDES_WINT_T=1 | |
11867 | else | |
11868 | GNULIB_OVERRIDES_WINT_T=0 | |
11869 | fi | |
11870 | else | |
11871 | GNULIB_OVERRIDES_WINT_T=0 | |
c0c3707f | 11872 | fi |
5abebf3c | 11873 | |
5abebf3c CB |
11874 | |
11875 | ||
11876 | ||
11877 | ||
11878 | ||
5df4cba6 | 11879 | |
c0c3707f CB |
11880 | gl_cv_c_multiarch=no |
11881 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11882 | /* end confdefs.h. */ | |
11883 | #ifndef __APPLE_CC__ | |
11884 | not a universal capable compiler | |
11885 | #endif | |
11886 | typedef int dummy; | |
5abebf3c | 11887 | |
c0c3707f CB |
11888 | _ACEOF |
11889 | if ac_fn_c_try_compile "$LINENO"; then : | |
5abebf3c | 11890 | |
c0c3707f CB |
11891 | arch= |
11892 | prev= | |
11893 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
11894 | if test -n "$prev"; then | |
11895 | case $word in | |
11896 | i?86 | x86_64 | ppc | ppc64) | |
11897 | if test -z "$arch" || test "$arch" = "$word"; then | |
11898 | arch="$word" | |
11899 | else | |
11900 | gl_cv_c_multiarch=yes | |
11901 | fi | |
11902 | ;; | |
11903 | esac | |
11904 | prev= | |
11905 | else | |
11906 | if test "x$word" = "x-arch"; then | |
11907 | prev=arch | |
11908 | fi | |
11909 | fi | |
11910 | done | |
5abebf3c | 11911 | |
c0c3707f CB |
11912 | fi |
11913 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11914 | if test $gl_cv_c_multiarch = yes; then | |
11915 | APPLE_UNIVERSAL_BUILD=1 | |
11916 | else | |
11917 | APPLE_UNIVERSAL_BUILD=0 | |
11918 | fi | |
5abebf3c | 11919 | |
5abebf3c | 11920 | |
5abebf3c | 11921 | |
5abebf3c CB |
11922 | |
11923 | ||
5abebf3c | 11924 | |
5abebf3c | 11925 | |
5abebf3c | 11926 | |
5df4cba6 | 11927 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
5abebf3c | 11928 | |
5abebf3c | 11929 | |
5df4cba6 | 11930 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
5abebf3c | 11931 | |
c0c3707f CB |
11932 | |
11933 | ||
11934 | if test $ac_cv_header_wchar_h = yes; then | |
11935 | HAVE_WCHAR_H=1 | |
11936 | else | |
11937 | HAVE_WCHAR_H=0 | |
5abebf3c | 11938 | fi |
c0c3707f CB |
11939 | |
11940 | ||
11941 | if test $ac_cv_header_inttypes_h = yes; then | |
11942 | HAVE_INTTYPES_H=1 | |
11943 | else | |
11944 | HAVE_INTTYPES_H=0 | |
5abebf3c CB |
11945 | fi |
11946 | ||
11947 | ||
c0c3707f CB |
11948 | if test $ac_cv_header_sys_types_h = yes; then |
11949 | HAVE_SYS_TYPES_H=1 | |
11950 | else | |
11951 | HAVE_SYS_TYPES_H=0 | |
11952 | fi | |
11953 | ||
5abebf3c CB |
11954 | |
11955 | ||
11956 | ||
11957 | ||
5abebf3c | 11958 | |
5abebf3c | 11959 | |
5abebf3c | 11960 | |
5abebf3c | 11961 | |
5abebf3c CB |
11962 | |
11963 | ||
c0c3707f CB |
11964 | if test $gl_cv_have_include_next = yes; then |
11965 | gl_cv_next_stdint_h='<'stdint.h'>' | |
11966 | else | |
11967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
11968 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
11969 | if ${gl_cv_next_stdint_h+:} false; then : | |
11970 | $as_echo_n "(cached) " >&6 | |
11971 | else | |
5abebf3c | 11972 | |
c0c3707f | 11973 | if test $ac_cv_header_stdint_h = yes; then |
5abebf3c | 11974 | |
5abebf3c CB |
11975 | |
11976 | ||
11977 | ||
c0c3707f | 11978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 11979 | /* end confdefs.h. */ |
c0c3707f | 11980 | #include <stdint.h> |
5abebf3c | 11981 | _ACEOF |
c0c3707f CB |
11982 | case "$host_os" in |
11983 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
11984 | *) gl_absname_cpp="$ac_cpp" ;; | |
11985 | esac | |
5abebf3c | 11986 | |
c0c3707f CB |
11987 | case "$host_os" in |
11988 | mingw*) | |
11989 | gl_dirsep_regex='[/\\]' | |
11990 | ;; | |
11991 | *) | |
11992 | gl_dirsep_regex='\/' | |
11993 | ;; | |
11994 | esac | |
11995 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
11996 | gl_header_literal_regex=`echo 'stdint.h' \ | |
11997 | | sed -e "$gl_make_literal_regex_sed"` | |
11998 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
11999 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
12000 | s|^/[^/]|//&| | |
12001 | p | |
12002 | q | |
12003 | }' | |
5abebf3c | 12004 | |
c0c3707f CB |
12005 | gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
12006 | sed -n "$gl_absolute_header_sed"` | |
5abebf3c | 12007 | |
c0c3707f CB |
12008 | gl_header=$gl_cv_absolute_stdint_h |
12009 | gl_cv_next_stdint_h='"'$gl_header'"' | |
12010 | else | |
12011 | gl_cv_next_stdint_h='<'stdint.h'>' | |
12012 | fi | |
5abebf3c | 12013 | |
5abebf3c | 12014 | |
c0c3707f CB |
12015 | fi |
12016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
12017 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
12018 | fi | |
12019 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
5abebf3c | 12020 | |
c0c3707f CB |
12021 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
12022 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
12023 | gl_next_as_first_directive='<'stdint.h'>' | |
12024 | else | |
12025 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
12026 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
12027 | fi | |
12028 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
5abebf3c | 12029 | |
5e8754f9 | 12030 | |
5e8754f9 | 12031 | |
5e8754f9 | 12032 | |
c0c3707f CB |
12033 | if test $ac_cv_header_stdint_h = yes; then |
12034 | HAVE_STDINT_H=1 | |
12035 | else | |
12036 | HAVE_STDINT_H=0 | |
12037 | fi | |
5e8754f9 SDJ |
12038 | |
12039 | ||
c0c3707f CB |
12040 | if test $ac_cv_header_stdint_h = yes; then |
12041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
12042 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
12043 | if ${gl_cv_header_working_stdint_h+:} false; then : | |
12044 | $as_echo_n "(cached) " >&6 | |
12045 | else | |
12046 | gl_cv_header_working_stdint_h=no | |
12047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12048 | /* end confdefs.h. */ | |
5e8754f9 | 12049 | |
5e8754f9 | 12050 | |
c0c3707f CB |
12051 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12052 | #define __STDC_CONSTANT_MACROS 1 | |
12053 | #define __STDC_LIMIT_MACROS 1 | |
12054 | #include <stdint.h> | |
12055 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
12056 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
12057 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
12058 | #endif | |
5e8754f9 SDJ |
12059 | |
12060 | ||
c0c3707f CB |
12061 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
12062 | included before <wchar.h>. */ | |
12063 | #include <stddef.h> | |
12064 | #include <signal.h> | |
12065 | #if HAVE_WCHAR_H | |
12066 | # include <stdio.h> | |
12067 | # include <time.h> | |
12068 | # include <wchar.h> | |
12069 | #endif | |
f45c62c4 YQ |
12070 | |
12071 | ||
c0c3707f CB |
12072 | #ifdef INT8_MAX |
12073 | int8_t a1 = INT8_MAX; | |
12074 | int8_t a1min = INT8_MIN; | |
12075 | #endif | |
12076 | #ifdef INT16_MAX | |
12077 | int16_t a2 = INT16_MAX; | |
12078 | int16_t a2min = INT16_MIN; | |
12079 | #endif | |
12080 | #ifdef INT32_MAX | |
12081 | int32_t a3 = INT32_MAX; | |
12082 | int32_t a3min = INT32_MIN; | |
12083 | #endif | |
12084 | #ifdef INT64_MAX | |
12085 | int64_t a4 = INT64_MAX; | |
12086 | int64_t a4min = INT64_MIN; | |
12087 | #endif | |
12088 | #ifdef UINT8_MAX | |
12089 | uint8_t b1 = UINT8_MAX; | |
12090 | #else | |
12091 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
12092 | #endif | |
12093 | #ifdef UINT16_MAX | |
12094 | uint16_t b2 = UINT16_MAX; | |
12095 | #endif | |
12096 | #ifdef UINT32_MAX | |
12097 | uint32_t b3 = UINT32_MAX; | |
12098 | #endif | |
12099 | #ifdef UINT64_MAX | |
12100 | uint64_t b4 = UINT64_MAX; | |
12101 | #endif | |
12102 | int_least8_t c1 = INT8_C (0x7f); | |
12103 | int_least8_t c1max = INT_LEAST8_MAX; | |
12104 | int_least8_t c1min = INT_LEAST8_MIN; | |
12105 | int_least16_t c2 = INT16_C (0x7fff); | |
12106 | int_least16_t c2max = INT_LEAST16_MAX; | |
12107 | int_least16_t c2min = INT_LEAST16_MIN; | |
12108 | int_least32_t c3 = INT32_C (0x7fffffff); | |
12109 | int_least32_t c3max = INT_LEAST32_MAX; | |
12110 | int_least32_t c3min = INT_LEAST32_MIN; | |
12111 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
12112 | int_least64_t c4max = INT_LEAST64_MAX; | |
12113 | int_least64_t c4min = INT_LEAST64_MIN; | |
12114 | uint_least8_t d1 = UINT8_C (0xff); | |
12115 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
12116 | uint_least16_t d2 = UINT16_C (0xffff); | |
12117 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
12118 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
12119 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
12120 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
12121 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
12122 | int_fast8_t e1 = INT_FAST8_MAX; | |
12123 | int_fast8_t e1min = INT_FAST8_MIN; | |
12124 | int_fast16_t e2 = INT_FAST16_MAX; | |
12125 | int_fast16_t e2min = INT_FAST16_MIN; | |
12126 | int_fast32_t e3 = INT_FAST32_MAX; | |
12127 | int_fast32_t e3min = INT_FAST32_MIN; | |
12128 | int_fast64_t e4 = INT_FAST64_MAX; | |
12129 | int_fast64_t e4min = INT_FAST64_MIN; | |
12130 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
12131 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
12132 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
12133 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
12134 | #ifdef INTPTR_MAX | |
12135 | intptr_t g = INTPTR_MAX; | |
12136 | intptr_t gmin = INTPTR_MIN; | |
12137 | #endif | |
12138 | #ifdef UINTPTR_MAX | |
12139 | uintptr_t h = UINTPTR_MAX; | |
12140 | #endif | |
12141 | intmax_t i = INTMAX_MAX; | |
12142 | uintmax_t j = UINTMAX_MAX; | |
472fa5ee | 12143 | |
c0c3707f CB |
12144 | /* Check that SIZE_MAX has the correct type, if possible. */ |
12145 | #if 201112 <= __STDC_VERSION__ | |
12146 | int k = _Generic (SIZE_MAX, size_t: 0); | |
12147 | #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ | |
12148 | || (0x5110 <= __SUNPRO_C && !__STDC__)) | |
12149 | extern size_t k; | |
12150 | extern __typeof__ (SIZE_MAX) k; | |
12151 | #endif | |
472fa5ee | 12152 | |
c0c3707f CB |
12153 | #include <limits.h> /* for CHAR_BIT */ |
12154 | #define TYPE_MINIMUM(t) \ | |
12155 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
12156 | #define TYPE_MAXIMUM(t) \ | |
12157 | ((t) ((t) 0 < (t) -1 \ | |
12158 | ? (t) -1 \ | |
12159 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
12160 | struct s { | |
12161 | int check_PTRDIFF: | |
12162 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
12163 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
12164 | ? 1 : -1; | |
12165 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
12166 | int check_SIG_ATOMIC: | |
12167 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
12168 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
12169 | ? 1 : -1; | |
12170 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
12171 | int check_WCHAR: | |
12172 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
12173 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
12174 | ? 1 : -1; | |
12175 | /* Detect bug in mingw. */ | |
12176 | int check_WINT: | |
12177 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
12178 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
12179 | ? 1 : -1; | |
472fa5ee | 12180 | |
c0c3707f CB |
12181 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
12182 | int check_UINT8_C: | |
12183 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
12184 | int check_UINT16_C: | |
12185 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
f45c62c4 | 12186 | |
c0c3707f CB |
12187 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ |
12188 | #ifdef UINT8_MAX | |
12189 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
12190 | #endif | |
12191 | #ifdef UINT16_MAX | |
12192 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
12193 | #endif | |
12194 | #ifdef UINT32_MAX | |
12195 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
12196 | #endif | |
12197 | #ifdef UINT64_MAX | |
12198 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
12199 | #endif | |
12200 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
12201 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
12202 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
12203 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
12204 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
12205 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
12206 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
12207 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
12208 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
12209 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
12210 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
12211 | }; | |
6ec2e0f5 | 12212 | |
f45c62c4 YQ |
12213 | int |
12214 | main () | |
12215 | { | |
f45c62c4 YQ |
12216 | |
12217 | ; | |
12218 | return 0; | |
12219 | } | |
12220 | _ACEOF | |
6ec2e0f5 | 12221 | if ac_fn_c_try_compile "$LINENO"; then : |
c0c3707f | 12222 | if test "$cross_compiling" = yes; then : |
6a29c58e | 12223 | case "$host_os" in |
c0c3707f CB |
12224 | # Guess yes on native Windows. |
12225 | mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; | |
12226 | # In general, assume it works. | |
12227 | *) gl_cv_header_working_stdint_h="guessing yes" ;; | |
12228 | esac | |
6a29c58e | 12229 | |
98399780 YQ |
12230 | else |
12231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12232 | /* end confdefs.h. */ | |
98399780 YQ |
12233 | |
12234 | ||
c0c3707f CB |
12235 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12236 | #define __STDC_CONSTANT_MACROS 1 | |
12237 | #define __STDC_LIMIT_MACROS 1 | |
12238 | #include <stdint.h> | |
98399780 | 12239 | |
88b48903 | 12240 | |
c0c3707f CB |
12241 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
12242 | included before <wchar.h>. */ | |
12243 | #include <stddef.h> | |
12244 | #include <signal.h> | |
12245 | #if HAVE_WCHAR_H | |
12246 | # include <stdio.h> | |
12247 | # include <time.h> | |
12248 | # include <wchar.h> | |
12249 | #endif | |
88b48903 | 12250 | |
472fa5ee | 12251 | |
c0c3707f CB |
12252 | #include <stdio.h> |
12253 | #include <string.h> | |
12254 | #define MVAL(macro) MVAL1(macro) | |
12255 | #define MVAL1(expression) #expression | |
12256 | static const char *macro_values[] = | |
12257 | { | |
12258 | #ifdef INT8_MAX | |
12259 | MVAL (INT8_MAX), | |
12260 | #endif | |
12261 | #ifdef INT16_MAX | |
12262 | MVAL (INT16_MAX), | |
12263 | #endif | |
12264 | #ifdef INT32_MAX | |
12265 | MVAL (INT32_MAX), | |
12266 | #endif | |
12267 | #ifdef INT64_MAX | |
12268 | MVAL (INT64_MAX), | |
12269 | #endif | |
12270 | #ifdef UINT8_MAX | |
12271 | MVAL (UINT8_MAX), | |
12272 | #endif | |
12273 | #ifdef UINT16_MAX | |
12274 | MVAL (UINT16_MAX), | |
12275 | #endif | |
12276 | #ifdef UINT32_MAX | |
12277 | MVAL (UINT32_MAX), | |
12278 | #endif | |
12279 | #ifdef UINT64_MAX | |
12280 | MVAL (UINT64_MAX), | |
12281 | #endif | |
12282 | NULL | |
12283 | }; | |
472fa5ee | 12284 | |
c0c3707f CB |
12285 | int |
12286 | main () | |
12287 | { | |
472fa5ee | 12288 | |
c0c3707f CB |
12289 | const char **mv; |
12290 | for (mv = macro_values; *mv != NULL; mv++) | |
12291 | { | |
12292 | const char *value = *mv; | |
12293 | /* Test whether it looks like a cast expression. */ | |
12294 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
12295 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
12296 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
12297 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
12298 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
12299 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
12300 | return mv - macro_values + 1; | |
12301 | } | |
12302 | return 0; | |
12303 | ||
12304 | ; | |
12305 | return 0; | |
12306 | } | |
12307 | _ACEOF | |
12308 | if ac_fn_c_try_run "$LINENO"; then : | |
12309 | gl_cv_header_working_stdint_h=yes | |
12310 | fi | |
12311 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12312 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12313 | fi | |
12314 | ||
12315 | ||
12316 | fi | |
12317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 12318 | |
c0c3707f CB |
12319 | fi |
12320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
12321 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
12322 | fi | |
8690e634 | 12323 | |
c0c3707f CB |
12324 | HAVE_C99_STDINT_H=0 |
12325 | HAVE_SYS_BITYPES_H=0 | |
12326 | HAVE_SYS_INTTYPES_H=0 | |
12327 | STDINT_H=stdint.h | |
12328 | case "$gl_cv_header_working_stdint_h" in | |
12329 | *yes) | |
12330 | HAVE_C99_STDINT_H=1 | |
12331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 | |
12332 | $as_echo_n "checking whether stdint.h predates C++11... " >&6; } | |
12333 | if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then : | |
12334 | $as_echo_n "(cached) " >&6 | |
12335 | else | |
12336 | gl_cv_header_stdint_predates_cxx11_h=yes | |
12337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12338 | /* end confdefs.h. */ | |
8690e634 JK |
12339 | |
12340 | ||
c0c3707f CB |
12341 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12342 | #include <stdint.h> | |
8690e634 JK |
12343 | |
12344 | ||
c0c3707f CB |
12345 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
12346 | included before <wchar.h>. */ | |
12347 | #include <stddef.h> | |
12348 | #include <signal.h> | |
12349 | #if HAVE_WCHAR_H | |
12350 | # include <stdio.h> | |
12351 | # include <time.h> | |
12352 | # include <wchar.h> | |
12353 | #endif | |
8690e634 JK |
12354 | |
12355 | ||
c0c3707f CB |
12356 | intmax_t im = INTMAX_MAX; |
12357 | int32_t i32 = INT32_C (0x7fffffff); | |
472fa5ee | 12358 | |
c0c3707f CB |
12359 | int |
12360 | main () | |
12361 | { | |
472fa5ee | 12362 | |
c0c3707f CB |
12363 | ; |
12364 | return 0; | |
12365 | } | |
12366 | _ACEOF | |
12367 | if ac_fn_c_try_compile "$LINENO"; then : | |
12368 | gl_cv_header_stdint_predates_cxx11_h=no | |
12369 | fi | |
12370 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12371 | fi | |
12372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 | |
12373 | $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; } | |
472fa5ee | 12374 | |
c0c3707f | 12375 | if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then |
472fa5ee | 12376 | |
c0c3707f | 12377 | $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h |
472fa5ee SM |
12378 | |
12379 | ||
c0c3707f CB |
12380 | $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h |
12381 | ||
12382 | fi | |
12383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 | |
12384 | $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } | |
12385 | if ${gl_cv_header_stdint_width+:} false; then : | |
8690e634 JK |
12386 | $as_echo_n "(cached) " >&6 |
12387 | else | |
c0c3707f CB |
12388 | gl_cv_header_stdint_width=no |
12389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
12390 | /* end confdefs.h. */ |
12391 | ||
c0c3707f CB |
12392 | /* Work if build is not clean. */ |
12393 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 | |
12394 | #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | |
12395 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | |
12396 | #endif | |
12397 | #include <stdint.h> | |
12398 | ||
12399 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
12400 | included before <wchar.h>. */ | |
12401 | #include <stddef.h> | |
12402 | #include <signal.h> | |
12403 | #if HAVE_WCHAR_H | |
12404 | # include <stdio.h> | |
12405 | # include <time.h> | |
12406 | # include <wchar.h> | |
12407 | #endif | |
12408 | ||
12409 | int iw = UINTMAX_WIDTH; | |
12410 | ||
12411 | int | |
12412 | main () | |
8690e634 | 12413 | { |
c0c3707f CB |
12414 | |
12415 | ; | |
8690e634 JK |
12416 | return 0; |
12417 | } | |
8690e634 | 12418 | _ACEOF |
c0c3707f CB |
12419 | if ac_fn_c_try_compile "$LINENO"; then : |
12420 | gl_cv_header_stdint_width=yes | |
12421 | fi | |
12422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12423 | fi | |
12424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 | |
12425 | $as_echo "$gl_cv_header_stdint_width" >&6; } | |
12426 | if test "$gl_cv_header_stdint_width" = yes; then | |
12427 | STDINT_H= | |
12428 | fi | |
12429 | ;; | |
12430 | *) | |
12431 | for ac_header in sys/inttypes.h sys/bitypes.h | |
12432 | do : | |
12433 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12434 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12435 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12436 | cat >>confdefs.h <<_ACEOF | |
12437 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12438 | _ACEOF | |
12439 | ||
12440 | fi | |
12441 | ||
12442 | done | |
12443 | ||
12444 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
12445 | HAVE_SYS_INTTYPES_H=1 | |
12446 | fi | |
12447 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
12448 | HAVE_SYS_BITYPES_H=1 | |
12449 | fi | |
12450 | ||
12451 | ||
12452 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
12453 | ||
12454 | ||
12455 | for gltype in ptrdiff_t size_t ; do | |
12456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
12457 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
12458 | if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : | |
12459 | $as_echo_n "(cached) " >&6 | |
12460 | else | |
12461 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
12462 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
12463 | included before <wchar.h>. */ | |
12464 | #include <stddef.h> | |
12465 | #include <signal.h> | |
12466 | #if HAVE_WCHAR_H | |
12467 | # include <stdio.h> | |
12468 | # include <time.h> | |
12469 | # include <wchar.h> | |
12470 | #endif | |
12471 | ||
12472 | #include <limits.h>"; then : | |
12473 | ||
12474 | else | |
12475 | result=unknown | |
12476 | fi | |
12477 | ||
12478 | eval gl_cv_bitsizeof_${gltype}=\$result | |
12479 | ||
12480 | fi | |
12481 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
12482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12483 | $as_echo "$ac_res" >&6; } | |
12484 | eval result=\$gl_cv_bitsizeof_${gltype} | |
12485 | if test $result = unknown; then | |
12486 | result=0 | |
8690e634 | 12487 | fi |
c0c3707f CB |
12488 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
12489 | cat >>confdefs.h <<_ACEOF | |
12490 | #define BITSIZEOF_${GLTYPE} $result | |
12491 | _ACEOF | |
8690e634 | 12492 | |
c0c3707f CB |
12493 | eval BITSIZEOF_${GLTYPE}=\$result |
12494 | done | |
8690e634 JK |
12495 | |
12496 | ||
c0c3707f | 12497 | fi |
8690e634 JK |
12498 | |
12499 | ||
c0c3707f CB |
12500 | for gltype in sig_atomic_t wchar_t wint_t ; do |
12501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
12502 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
12503 | if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : | |
8690e634 JK |
12504 | $as_echo_n "(cached) " >&6 |
12505 | else | |
c0c3707f CB |
12506 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " |
12507 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
12508 | included before <wchar.h>. */ | |
12509 | #include <stddef.h> | |
12510 | #include <signal.h> | |
12511 | #if HAVE_WCHAR_H | |
12512 | # include <stdio.h> | |
12513 | # include <time.h> | |
12514 | # include <wchar.h> | |
12515 | #endif | |
8690e634 | 12516 | |
c0c3707f | 12517 | #include <limits.h>"; then : |
8690e634 | 12518 | |
c0c3707f CB |
12519 | else |
12520 | result=unknown | |
12521 | fi | |
8690e634 | 12522 | |
c0c3707f | 12523 | eval gl_cv_bitsizeof_${gltype}=\$result |
8690e634 JK |
12524 | |
12525 | fi | |
c0c3707f CB |
12526 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
12527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12528 | $as_echo "$ac_res" >&6; } | |
12529 | eval result=\$gl_cv_bitsizeof_${gltype} | |
12530 | if test $result = unknown; then | |
12531 | result=0 | |
12532 | fi | |
12533 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12534 | cat >>confdefs.h <<_ACEOF | |
12535 | #define BITSIZEOF_${GLTYPE} $result | |
12536 | _ACEOF | |
12537 | ||
12538 | eval BITSIZEOF_${GLTYPE}=\$result | |
12539 | done | |
8690e634 JK |
12540 | |
12541 | ||
12542 | ||
12543 | ||
c0c3707f CB |
12544 | for gltype in sig_atomic_t wchar_t wint_t ; do |
12545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
12546 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
12547 | if eval \${gl_cv_type_${gltype}_signed+:} false; then : | |
8690e634 JK |
12548 | $as_echo_n "(cached) " >&6 |
12549 | else | |
c0c3707f | 12550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 JK |
12551 | /* end confdefs.h. */ |
12552 | ||
c0c3707f CB |
12553 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
12554 | included before <wchar.h>. */ | |
12555 | #include <stddef.h> | |
12556 | #include <signal.h> | |
12557 | #if HAVE_WCHAR_H | |
12558 | # include <stdio.h> | |
12559 | # include <time.h> | |
12560 | # include <wchar.h> | |
12561 | #endif | |
12562 | ||
12563 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
12564 | int | |
12565 | main () | |
12566 | { | |
12567 | ||
12568 | ; | |
8690e634 JK |
12569 | return 0; |
12570 | } | |
c0c3707f CB |
12571 | _ACEOF |
12572 | if ac_fn_c_try_compile "$LINENO"; then : | |
12573 | result=yes | |
12574 | else | |
12575 | result=no | |
12576 | fi | |
12577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12578 | eval gl_cv_type_${gltype}_signed=\$result | |
8690e634 | 12579 | |
c0c3707f CB |
12580 | fi |
12581 | eval ac_res=\$gl_cv_type_${gltype}_signed | |
12582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12583 | $as_echo "$ac_res" >&6; } | |
12584 | eval result=\$gl_cv_type_${gltype}_signed | |
12585 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12586 | if test "$result" = yes; then | |
12587 | cat >>confdefs.h <<_ACEOF | |
12588 | #define HAVE_SIGNED_${GLTYPE} 1 | |
8690e634 | 12589 | _ACEOF |
c0c3707f CB |
12590 | |
12591 | eval HAVE_SIGNED_${GLTYPE}=1 | |
12592 | else | |
12593 | eval HAVE_SIGNED_${GLTYPE}=0 | |
8690e634 | 12594 | fi |
c0c3707f CB |
12595 | done |
12596 | ||
12597 | ||
12598 | gl_cv_type_ptrdiff_t_signed=yes | |
12599 | gl_cv_type_size_t_signed=no | |
12600 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
12601 | ||
12602 | ||
12603 | for gltype in ptrdiff_t size_t ; do | |
12604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
12605 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
12606 | if eval \${gl_cv_type_${gltype}_suffix+:} false; then : | |
12607 | $as_echo_n "(cached) " >&6 | |
12608 | else | |
12609 | eval gl_cv_type_${gltype}_suffix=no | |
12610 | eval result=\$gl_cv_type_${gltype}_signed | |
12611 | if test "$result" = yes; then | |
12612 | glsufu= | |
12613 | else | |
12614 | glsufu=u | |
12615 | fi | |
12616 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
12617 | case $glsuf in | |
12618 | '') gltype1='int';; | |
12619 | l) gltype1='long int';; | |
12620 | ll) gltype1='long long int';; | |
12621 | i64) gltype1='__int64';; | |
12622 | u) gltype1='unsigned int';; | |
12623 | ul) gltype1='unsigned long int';; | |
12624 | ull) gltype1='unsigned long long int';; | |
12625 | ui64)gltype1='unsigned __int64';; | |
12626 | esac | |
12627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12628 | /* end confdefs.h. */ | |
12629 | ||
12630 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
12631 | included before <wchar.h>. */ | |
12632 | #include <stddef.h> | |
12633 | #include <signal.h> | |
12634 | #if HAVE_WCHAR_H | |
12635 | # include <stdio.h> | |
12636 | # include <time.h> | |
12637 | # include <wchar.h> | |
12638 | #endif | |
8690e634 | 12639 | |
c0c3707f CB |
12640 | extern $gltype foo; |
12641 | extern $gltype1 foo; | |
12642 | int | |
12643 | main () | |
12644 | { | |
12645 | ||
12646 | ; | |
12647 | return 0; | |
12648 | } | |
12649 | _ACEOF | |
12650 | if ac_fn_c_try_compile "$LINENO"; then : | |
12651 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
8690e634 | 12652 | fi |
c0c3707f CB |
12653 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12654 | eval result=\$gl_cv_type_${gltype}_suffix | |
12655 | test "$result" != no && break | |
12656 | done | |
12657 | fi | |
12658 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
12659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12660 | $as_echo "$ac_res" >&6; } | |
12661 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12662 | eval result=\$gl_cv_type_${gltype}_suffix | |
12663 | test "$result" = no && result= | |
12664 | eval ${GLTYPE}_SUFFIX=\$result | |
12665 | cat >>confdefs.h <<_ACEOF | |
12666 | #define ${GLTYPE}_SUFFIX $result | |
12667 | _ACEOF | |
8690e634 | 12668 | |
c0c3707f | 12669 | done |
8690e634 JK |
12670 | |
12671 | ||
c0c3707f | 12672 | fi |
8690e634 JK |
12673 | |
12674 | ||
c0c3707f CB |
12675 | for gltype in sig_atomic_t wchar_t wint_t ; do |
12676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
12677 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
12678 | if eval \${gl_cv_type_${gltype}_suffix+:} false; then : | |
8690e634 JK |
12679 | $as_echo_n "(cached) " >&6 |
12680 | else | |
c0c3707f CB |
12681 | eval gl_cv_type_${gltype}_suffix=no |
12682 | eval result=\$gl_cv_type_${gltype}_signed | |
12683 | if test "$result" = yes; then | |
12684 | glsufu= | |
12685 | else | |
12686 | glsufu=u | |
12687 | fi | |
12688 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
12689 | case $glsuf in | |
12690 | '') gltype1='int';; | |
12691 | l) gltype1='long int';; | |
12692 | ll) gltype1='long long int';; | |
12693 | i64) gltype1='__int64';; | |
12694 | u) gltype1='unsigned int';; | |
12695 | ul) gltype1='unsigned long int';; | |
12696 | ull) gltype1='unsigned long long int';; | |
12697 | ui64)gltype1='unsigned __int64';; | |
12698 | esac | |
12699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
12700 | /* end confdefs.h. */ |
12701 | ||
c0c3707f CB |
12702 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
12703 | included before <wchar.h>. */ | |
12704 | #include <stddef.h> | |
12705 | #include <signal.h> | |
12706 | #if HAVE_WCHAR_H | |
12707 | # include <stdio.h> | |
12708 | # include <time.h> | |
12709 | # include <wchar.h> | |
12710 | #endif | |
12711 | ||
12712 | extern $gltype foo; | |
12713 | extern $gltype1 foo; | |
12714 | int | |
12715 | main () | |
12716 | { | |
12717 | ||
12718 | ; | |
5e8754f9 | 12719 | return 0; |
8690e634 | 12720 | } |
c0c3707f CB |
12721 | _ACEOF |
12722 | if ac_fn_c_try_compile "$LINENO"; then : | |
12723 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
12724 | fi | |
12725 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12726 | eval result=\$gl_cv_type_${gltype}_suffix | |
12727 | test "$result" != no && break | |
12728 | done | |
12729 | fi | |
12730 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
12731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12732 | $as_echo "$ac_res" >&6; } | |
12733 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12734 | eval result=\$gl_cv_type_${gltype}_suffix | |
12735 | test "$result" = no && result= | |
12736 | eval ${GLTYPE}_SUFFIX=\$result | |
12737 | cat >>confdefs.h <<_ACEOF | |
12738 | #define ${GLTYPE}_SUFFIX $result | |
12739 | _ACEOF | |
12740 | ||
12741 | done | |
12742 | ||
12743 | ||
12744 | ||
12745 | if test $GNULIB_OVERRIDES_WINT_T = 1; then | |
12746 | BITSIZEOF_WINT_T=32 | |
12747 | fi | |
12748 | ||
12749 | ;; | |
12750 | esac | |
8690e634 | 12751 | |
8690e634 | 12752 | |
c0c3707f CB |
12753 | |
12754 | LIMITS_H='limits.h' | |
12755 | if test -n "$LIMITS_H"; then | |
12756 | GL_GENERATE_LIMITS_H_TRUE= | |
12757 | GL_GENERATE_LIMITS_H_FALSE='#' | |
12758 | else | |
12759 | GL_GENERATE_LIMITS_H_TRUE='#' | |
12760 | GL_GENERATE_LIMITS_H_FALSE= | |
8690e634 | 12761 | fi |
6ec2e0f5 SDJ |
12762 | |
12763 | ||
12764 | ||
12765 | ||
12766 | ||
12767 | ||
12768 | ||
c0c3707f CB |
12769 | if test -n "$STDINT_H"; then |
12770 | GL_GENERATE_STDINT_H_TRUE= | |
12771 | GL_GENERATE_STDINT_H_FALSE='#' | |
12772 | else | |
12773 | GL_GENERATE_STDINT_H_TRUE='#' | |
12774 | GL_GENERATE_STDINT_H_FALSE= | |
12775 | fi | |
472fa5ee SM |
12776 | |
12777 | ||
12778 | ||
12779 | ||
12780 | ||
c0c3707f CB |
12781 | GNULIB_IMAXABS=0; |
12782 | GNULIB_IMAXDIV=0; | |
12783 | GNULIB_STRTOIMAX=0; | |
12784 | GNULIB_STRTOUMAX=0; | |
12785 | HAVE_DECL_IMAXABS=1; | |
12786 | HAVE_DECL_IMAXDIV=1; | |
12787 | HAVE_DECL_STRTOIMAX=1; | |
12788 | HAVE_DECL_STRTOUMAX=1; | |
12789 | HAVE_IMAXDIV_T=1; | |
12790 | REPLACE_STRTOIMAX=0; | |
12791 | REPLACE_STRTOUMAX=0; | |
12792 | INT32_MAX_LT_INTMAX_MAX=1; | |
12793 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
12794 | PRI_MACROS_BROKEN=0; | |
12795 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
12796 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
12797 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
472fa5ee | 12798 | |
6ec2e0f5 SDJ |
12799 | |
12800 | ||
12801 | ||
12802 | ||
12803 | ||
6ec2e0f5 SDJ |
12804 | |
12805 | ||
6ec2e0f5 | 12806 | |
6ec2e0f5 | 12807 | |
6ec2e0f5 | 12808 | |
6ec2e0f5 | 12809 | |
6ec2e0f5 | 12810 | |
c0c3707f CB |
12811 | |
12812 | ||
12813 | if test $gl_cv_have_include_next = yes; then | |
12814 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
12815 | else | |
12816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
12817 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
12818 | if ${gl_cv_next_inttypes_h+:} false; then : | |
12819 | $as_echo_n "(cached) " >&6 | |
12820 | else | |
12821 | ||
12822 | if test $ac_cv_header_inttypes_h = yes; then | |
12823 | ||
12824 | ||
12825 | ||
12826 | ||
12827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12828 | /* end confdefs.h. */ | |
12829 | #include <inttypes.h> | |
6ec2e0f5 | 12830 | _ACEOF |
c0c3707f CB |
12831 | case "$host_os" in |
12832 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
12833 | *) gl_absname_cpp="$ac_cpp" ;; | |
12834 | esac | |
6ec2e0f5 | 12835 | |
c0c3707f CB |
12836 | case "$host_os" in |
12837 | mingw*) | |
12838 | gl_dirsep_regex='[/\\]' | |
12839 | ;; | |
12840 | *) | |
12841 | gl_dirsep_regex='\/' | |
12842 | ;; | |
12843 | esac | |
12844 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
12845 | gl_header_literal_regex=`echo 'inttypes.h' \ | |
12846 | | sed -e "$gl_make_literal_regex_sed"` | |
12847 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
12848 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
12849 | s|^/[^/]|//&| | |
12850 | p | |
12851 | q | |
12852 | }' | |
6ec2e0f5 | 12853 | |
c0c3707f CB |
12854 | gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
12855 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 12856 | |
c0c3707f CB |
12857 | gl_header=$gl_cv_absolute_inttypes_h |
12858 | gl_cv_next_inttypes_h='"'$gl_header'"' | |
12859 | else | |
12860 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
12861 | fi | |
6ec2e0f5 | 12862 | |
6ec2e0f5 | 12863 | |
c0c3707f CB |
12864 | fi |
12865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | |
12866 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
12867 | fi | |
12868 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
6ec2e0f5 | 12869 | |
c0c3707f CB |
12870 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
12871 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
12872 | gl_next_as_first_directive='<'inttypes.h'>' | |
12873 | else | |
12874 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
12875 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
12876 | fi | |
12877 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
6ec2e0f5 | 12878 | |
472fa5ee SM |
12879 | |
12880 | ||
12881 | ||
12882 | ||
12883 | ||
12884 | ||
472fa5ee SM |
12885 | |
12886 | ||
12887 | ||
12888 | ||
6ec2e0f5 | 12889 | |
698be2d8 CB |
12890 | |
12891 | ||
c0c3707f CB |
12892 | for ac_header in inttypes.h |
12893 | do : | |
12894 | ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" | |
12895 | if test "x$ac_cv_header_inttypes_h" = xyes; then : | |
12896 | cat >>confdefs.h <<_ACEOF | |
12897 | #define HAVE_INTTYPES_H 1 | |
12898 | _ACEOF | |
6ec2e0f5 | 12899 | |
c0c3707f | 12900 | fi |
6ec2e0f5 | 12901 | |
c0c3707f | 12902 | done |
6ec2e0f5 | 12903 | |
c0c3707f CB |
12904 | if test $ac_cv_header_inttypes_h = yes; then |
12905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 | |
12906 | $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } | |
12907 | if ${gt_cv_inttypes_pri_broken+:} false; then : | |
6ec2e0f5 SDJ |
12908 | $as_echo_n "(cached) " >&6 |
12909 | else | |
c0c3707f CB |
12910 | |
12911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 SDJ |
12912 | /* end confdefs.h. */ |
12913 | ||
c0c3707f CB |
12914 | #include <inttypes.h> |
12915 | #ifdef PRId32 | |
12916 | char *p = PRId32; | |
6ec2e0f5 SDJ |
12917 | #endif |
12918 | ||
12919 | int | |
12920 | main () | |
12921 | { | |
12922 | ||
6ec2e0f5 SDJ |
12923 | ; |
12924 | return 0; | |
12925 | } | |
12926 | _ACEOF | |
c0c3707f CB |
12927 | if ac_fn_c_try_compile "$LINENO"; then : |
12928 | gt_cv_inttypes_pri_broken=no | |
6ec2e0f5 | 12929 | else |
5df4cba6 SM |
12930 | gt_cv_inttypes_pri_broken=yes |
12931 | fi | |
12932 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12933 | ||
12934 | fi | |
12935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 | |
12936 | $as_echo "$gt_cv_inttypes_pri_broken" >&6; } | |
12937 | fi | |
12938 | if test "$gt_cv_inttypes_pri_broken" = yes; then | |
12939 | ||
12940 | cat >>confdefs.h <<_ACEOF | |
12941 | #define PRI_MACROS_BROKEN 1 | |
12942 | _ACEOF | |
12943 | ||
12944 | PRI_MACROS_BROKEN=1 | |
12945 | else | |
12946 | PRI_MACROS_BROKEN=0 | |
12947 | fi | |
12948 | ||
12949 | ||
12950 | ||
698be2d8 CB |
12951 | |
12952 | ||
5df4cba6 SM |
12953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 |
12954 | $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } | |
12955 | if ${gl_cv_cc_double_expbit0+:} false; then : | |
12956 | $as_echo_n "(cached) " >&6 | |
12957 | else | |
12958 | ||
12959 | if test "$cross_compiling" = yes; then : | |
12960 | ||
12961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12962 | /* end confdefs.h. */ | |
12963 | ||
12964 | #if defined arm || defined __arm || defined __arm__ | |
12965 | mixed_endianness | |
12966 | #endif | |
12967 | ||
12968 | _ACEOF | |
12969 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12970 | $EGREP "mixed_endianness" >/dev/null 2>&1; then : | |
12971 | gl_cv_cc_double_expbit0="unknown" | |
12972 | else | |
12973 | ||
12974 | : | |
12975 | if ${ac_cv_c_bigendian+:} false; then : | |
12976 | $as_echo_n "(cached) " >&6 | |
12977 | else | |
12978 | ac_cv_c_bigendian=unknown | |
12979 | # See if we're dealing with a universal compiler. | |
12980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12981 | /* end confdefs.h. */ | |
12982 | #ifndef __APPLE_CC__ | |
12983 | not a universal capable compiler | |
12984 | #endif | |
12985 | typedef int dummy; | |
12986 | ||
12987 | _ACEOF | |
12988 | if ac_fn_c_try_compile "$LINENO"; then : | |
12989 | ||
12990 | # Check for potential -arch flags. It is not universal unless | |
12991 | # there are at least two -arch flags with different values. | |
12992 | ac_arch= | |
12993 | ac_prev= | |
12994 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12995 | if test -n "$ac_prev"; then | |
12996 | case $ac_word in | |
12997 | i?86 | x86_64 | ppc | ppc64) | |
12998 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12999 | ac_arch=$ac_word | |
13000 | else | |
13001 | ac_cv_c_bigendian=universal | |
13002 | break | |
13003 | fi | |
13004 | ;; | |
13005 | esac | |
13006 | ac_prev= | |
13007 | elif test "x$ac_word" = "x-arch"; then | |
13008 | ac_prev=arch | |
13009 | fi | |
13010 | done | |
13011 | fi | |
13012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13013 | if test $ac_cv_c_bigendian = unknown; then | |
13014 | # See if sys/param.h defines the BYTE_ORDER macro. | |
13015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13016 | /* end confdefs.h. */ | |
13017 | #include <sys/types.h> | |
13018 | #include <sys/param.h> | |
13019 | ||
13020 | int | |
13021 | main () | |
13022 | { | |
13023 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
13024 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
13025 | && LITTLE_ENDIAN) | |
13026 | bogus endian macros | |
13027 | #endif | |
13028 | ||
13029 | ; | |
13030 | return 0; | |
13031 | } | |
13032 | _ACEOF | |
13033 | if ac_fn_c_try_compile "$LINENO"; then : | |
13034 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
13035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13036 | /* end confdefs.h. */ | |
13037 | #include <sys/types.h> | |
13038 | #include <sys/param.h> | |
13039 | ||
13040 | int | |
13041 | main () | |
13042 | { | |
13043 | #if BYTE_ORDER != BIG_ENDIAN | |
13044 | not big endian | |
13045 | #endif | |
13046 | ||
13047 | ; | |
13048 | return 0; | |
13049 | } | |
13050 | _ACEOF | |
13051 | if ac_fn_c_try_compile "$LINENO"; then : | |
13052 | ac_cv_c_bigendian=yes | |
13053 | else | |
13054 | ac_cv_c_bigendian=no | |
13055 | fi | |
13056 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13057 | fi | |
13058 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13059 | fi | |
13060 | if test $ac_cv_c_bigendian = unknown; then | |
13061 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
13062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13063 | /* end confdefs.h. */ | |
13064 | #include <limits.h> | |
13065 | ||
13066 | int | |
13067 | main () | |
13068 | { | |
13069 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
13070 | bogus endian macros | |
13071 | #endif | |
13072 | ||
13073 | ; | |
13074 | return 0; | |
13075 | } | |
13076 | _ACEOF | |
13077 | if ac_fn_c_try_compile "$LINENO"; then : | |
13078 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
13079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13080 | /* end confdefs.h. */ | |
13081 | #include <limits.h> | |
13082 | ||
13083 | int | |
13084 | main () | |
13085 | { | |
13086 | #ifndef _BIG_ENDIAN | |
13087 | not big endian | |
13088 | #endif | |
13089 | ||
13090 | ; | |
13091 | return 0; | |
13092 | } | |
13093 | _ACEOF | |
13094 | if ac_fn_c_try_compile "$LINENO"; then : | |
13095 | ac_cv_c_bigendian=yes | |
13096 | else | |
13097 | ac_cv_c_bigendian=no | |
13098 | fi | |
13099 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13100 | fi | |
13101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13102 | fi | |
13103 | if test $ac_cv_c_bigendian = unknown; then | |
13104 | # Compile a test program. | |
13105 | if test "$cross_compiling" = yes; then : | |
13106 | # Try to guess by grepping values from an object file. | |
13107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13108 | /* end confdefs.h. */ | |
13109 | short int ascii_mm[] = | |
13110 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
13111 | short int ascii_ii[] = | |
13112 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
13113 | int use_ascii (int i) { | |
13114 | return ascii_mm[i] + ascii_ii[i]; | |
13115 | } | |
13116 | short int ebcdic_ii[] = | |
13117 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
13118 | short int ebcdic_mm[] = | |
13119 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
13120 | int use_ebcdic (int i) { | |
13121 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
13122 | } | |
13123 | extern int foo; | |
13124 | ||
13125 | int | |
13126 | main () | |
13127 | { | |
13128 | return use_ascii (foo) == use_ebcdic (foo); | |
13129 | ; | |
13130 | return 0; | |
13131 | } | |
13132 | _ACEOF | |
13133 | if ac_fn_c_try_compile "$LINENO"; then : | |
13134 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
13135 | ac_cv_c_bigendian=yes | |
13136 | fi | |
13137 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
13138 | if test "$ac_cv_c_bigendian" = unknown; then | |
13139 | ac_cv_c_bigendian=no | |
13140 | else | |
13141 | # finding both strings is unlikely to happen, but who knows? | |
13142 | ac_cv_c_bigendian=unknown | |
13143 | fi | |
13144 | fi | |
13145 | fi | |
13146 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13147 | else | |
13148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13149 | /* end confdefs.h. */ | |
13150 | $ac_includes_default | |
13151 | int | |
13152 | main () | |
13153 | { | |
13154 | ||
13155 | /* Are we little or big endian? From Harbison&Steele. */ | |
13156 | union | |
13157 | { | |
13158 | long int l; | |
13159 | char c[sizeof (long int)]; | |
13160 | } u; | |
13161 | u.l = 1; | |
13162 | return u.c[sizeof (long int) - 1] == 1; | |
13163 | ||
13164 | ; | |
13165 | return 0; | |
13166 | } | |
13167 | _ACEOF | |
13168 | if ac_fn_c_try_run "$LINENO"; then : | |
13169 | ac_cv_c_bigendian=no | |
13170 | else | |
13171 | ac_cv_c_bigendian=yes | |
13172 | fi | |
13173 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13174 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13175 | fi | |
13176 | ||
13177 | fi | |
13178 | fi | |
13179 | : | |
13180 | case $ac_cv_c_bigendian in #( | |
13181 | yes) | |
13182 | gl_cv_cc_double_expbit0="word 0 bit 20";; #( | |
13183 | no) | |
13184 | gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( | |
13185 | universal) | |
13186 | ||
13187 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
13188 | ||
13189 | ;; #( | |
13190 | *) | |
13191 | gl_cv_cc_double_expbit0="unknown" ;; | |
13192 | esac | |
13193 | ||
13194 | ||
13195 | fi | |
13196 | rm -f conftest* | |
13197 | ||
13198 | ||
13199 | else | |
13200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13201 | /* end confdefs.h. */ | |
13202 | ||
13203 | #include <float.h> | |
13204 | #include <stddef.h> | |
13205 | #include <stdio.h> | |
13206 | #include <string.h> | |
13207 | #define NWORDS \ | |
13208 | ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
13209 | typedef union { double value; unsigned int word[NWORDS]; } memory_double; | |
13210 | static unsigned int ored_words[NWORDS]; | |
13211 | static unsigned int anded_words[NWORDS]; | |
13212 | static void add_to_ored_words (double x) | |
13213 | { | |
13214 | memory_double m; | |
13215 | size_t i; | |
13216 | /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ | |
13217 | memset (&m, 0, sizeof (memory_double)); | |
13218 | m.value = x; | |
13219 | for (i = 0; i < NWORDS; i++) | |
13220 | { | |
13221 | ored_words[i] |= m.word[i]; | |
13222 | anded_words[i] &= m.word[i]; | |
13223 | } | |
13224 | } | |
13225 | int main () | |
13226 | { | |
13227 | size_t j; | |
13228 | FILE *fp = fopen ("conftest.out", "w"); | |
13229 | if (fp == NULL) | |
13230 | return 1; | |
13231 | for (j = 0; j < NWORDS; j++) | |
13232 | anded_words[j] = ~ (unsigned int) 0; | |
13233 | add_to_ored_words (0.25); | |
13234 | add_to_ored_words (0.5); | |
13235 | add_to_ored_words (1.0); | |
13236 | add_to_ored_words (2.0); | |
13237 | add_to_ored_words (4.0); | |
13238 | /* Remove bits that are common (e.g. if representation of the first mantissa | |
13239 | bit is explicit). */ | |
13240 | for (j = 0; j < NWORDS; j++) | |
13241 | ored_words[j] &= ~anded_words[j]; | |
13242 | /* Now find the nonzero word. */ | |
13243 | for (j = 0; j < NWORDS; j++) | |
13244 | if (ored_words[j] != 0) | |
13245 | break; | |
13246 | if (j < NWORDS) | |
13247 | { | |
13248 | size_t i; | |
13249 | for (i = j + 1; i < NWORDS; i++) | |
13250 | if (ored_words[i] != 0) | |
13251 | { | |
13252 | fprintf (fp, "unknown"); | |
13253 | return (fclose (fp) != 0); | |
13254 | } | |
13255 | for (i = 0; ; i++) | |
13256 | if ((ored_words[j] >> i) & 1) | |
13257 | { | |
13258 | fprintf (fp, "word %d bit %d", (int) j, (int) i); | |
13259 | return (fclose (fp) != 0); | |
13260 | } | |
13261 | } | |
13262 | fprintf (fp, "unknown"); | |
13263 | return (fclose (fp) != 0); | |
13264 | } | |
13265 | ||
13266 | _ACEOF | |
13267 | if ac_fn_c_try_run "$LINENO"; then : | |
13268 | gl_cv_cc_double_expbit0=`cat conftest.out` | |
13269 | else | |
13270 | gl_cv_cc_double_expbit0="unknown" | |
6ec2e0f5 | 13271 | fi |
5df4cba6 SM |
13272 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13273 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13274 | fi | |
13275 | ||
13276 | rm -f conftest.out | |
6ec2e0f5 SDJ |
13277 | |
13278 | fi | |
5df4cba6 SM |
13279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 |
13280 | $as_echo "$gl_cv_cc_double_expbit0" >&6; } | |
13281 | case "$gl_cv_cc_double_expbit0" in | |
13282 | word*bit*) | |
13283 | word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` | |
13284 | bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` | |
6ec2e0f5 SDJ |
13285 | |
13286 | cat >>confdefs.h <<_ACEOF | |
5df4cba6 | 13287 | #define DBL_EXPBIT0_WORD $word |
6ec2e0f5 SDJ |
13288 | _ACEOF |
13289 | ||
c0c3707f | 13290 | |
5df4cba6 SM |
13291 | cat >>confdefs.h <<_ACEOF |
13292 | #define DBL_EXPBIT0_BIT $bit | |
13293 | _ACEOF | |
6ec2e0f5 | 13294 | |
5df4cba6 SM |
13295 | ;; |
13296 | esac | |
6ec2e0f5 | 13297 | |
6ec2e0f5 | 13298 | |
5df4cba6 SM |
13299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
13300 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
c0c3707f CB |
13301 | if ${ac_cv_c_bigendian+:} false; then : |
13302 | $as_echo_n "(cached) " >&6 | |
6ec2e0f5 | 13303 | else |
c0c3707f CB |
13304 | ac_cv_c_bigendian=unknown |
13305 | # See if we're dealing with a universal compiler. | |
13306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 13307 | /* end confdefs.h. */ |
c0c3707f CB |
13308 | #ifndef __APPLE_CC__ |
13309 | not a universal capable compiler | |
13310 | #endif | |
13311 | typedef int dummy; | |
6ec2e0f5 | 13312 | |
c0c3707f CB |
13313 | _ACEOF |
13314 | if ac_fn_c_try_compile "$LINENO"; then : | |
13315 | ||
13316 | # Check for potential -arch flags. It is not universal unless | |
13317 | # there are at least two -arch flags with different values. | |
13318 | ac_arch= | |
13319 | ac_prev= | |
13320 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
13321 | if test -n "$ac_prev"; then | |
13322 | case $ac_word in | |
13323 | i?86 | x86_64 | ppc | ppc64) | |
13324 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
13325 | ac_arch=$ac_word | |
13326 | else | |
13327 | ac_cv_c_bigendian=universal | |
13328 | break | |
13329 | fi | |
13330 | ;; | |
13331 | esac | |
13332 | ac_prev= | |
13333 | elif test "x$ac_word" = "x-arch"; then | |
13334 | ac_prev=arch | |
13335 | fi | |
13336 | done | |
13337 | fi | |
13338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13339 | if test $ac_cv_c_bigendian = unknown; then | |
13340 | # See if sys/param.h defines the BYTE_ORDER macro. | |
13341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13342 | /* end confdefs.h. */ | |
13343 | #include <sys/types.h> | |
13344 | #include <sys/param.h> | |
6ec2e0f5 SDJ |
13345 | |
13346 | int | |
13347 | main () | |
13348 | { | |
c0c3707f CB |
13349 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
13350 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
13351 | && LITTLE_ENDIAN) | |
13352 | bogus endian macros | |
13353 | #endif | |
6ec2e0f5 | 13354 | |
c0c3707f CB |
13355 | ; |
13356 | return 0; | |
13357 | } | |
13358 | _ACEOF | |
13359 | if ac_fn_c_try_compile "$LINENO"; then : | |
13360 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
13361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13362 | /* end confdefs.h. */ | |
13363 | #include <sys/types.h> | |
13364 | #include <sys/param.h> | |
13365 | ||
13366 | int | |
13367 | main () | |
13368 | { | |
13369 | #if BYTE_ORDER != BIG_ENDIAN | |
13370 | not big endian | |
13371 | #endif | |
6ec2e0f5 SDJ |
13372 | |
13373 | ; | |
13374 | return 0; | |
13375 | } | |
13376 | _ACEOF | |
c0c3707f CB |
13377 | if ac_fn_c_try_compile "$LINENO"; then : |
13378 | ac_cv_c_bigendian=yes | |
6ec2e0f5 | 13379 | else |
c0c3707f | 13380 | ac_cv_c_bigendian=no |
6ec2e0f5 | 13381 | fi |
c0c3707f | 13382 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 13383 | fi |
c0c3707f CB |
13384 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13385 | fi | |
13386 | if test $ac_cv_c_bigendian = unknown; then | |
13387 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
13388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13389 | /* end confdefs.h. */ | |
13390 | #include <limits.h> | |
472fa5ee | 13391 | |
c0c3707f CB |
13392 | int |
13393 | main () | |
13394 | { | |
13395 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
13396 | bogus endian macros | |
13397 | #endif | |
6ec2e0f5 | 13398 | |
c0c3707f CB |
13399 | ; |
13400 | return 0; | |
13401 | } | |
6ec2e0f5 | 13402 | _ACEOF |
c0c3707f CB |
13403 | if ac_fn_c_try_compile "$LINENO"; then : |
13404 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
13405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 13406 | /* end confdefs.h. */ |
c0c3707f CB |
13407 | #include <limits.h> |
13408 | ||
6ec2e0f5 SDJ |
13409 | int |
13410 | main () | |
13411 | { | |
5df4cba6 SM |
13412 | #ifndef _BIG_ENDIAN |
13413 | not big endian | |
13414 | #endif | |
13415 | ||
13416 | ; | |
13417 | return 0; | |
13418 | } | |
13419 | _ACEOF | |
13420 | if ac_fn_c_try_compile "$LINENO"; then : | |
13421 | ac_cv_c_bigendian=yes | |
13422 | else | |
13423 | ac_cv_c_bigendian=no | |
13424 | fi | |
13425 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13426 | fi | |
13427 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13428 | fi | |
13429 | if test $ac_cv_c_bigendian = unknown; then | |
13430 | # Compile a test program. | |
13431 | if test "$cross_compiling" = yes; then : | |
13432 | # Try to guess by grepping values from an object file. | |
13433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13434 | /* end confdefs.h. */ | |
13435 | short int ascii_mm[] = | |
13436 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
13437 | short int ascii_ii[] = | |
13438 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
13439 | int use_ascii (int i) { | |
13440 | return ascii_mm[i] + ascii_ii[i]; | |
13441 | } | |
13442 | short int ebcdic_ii[] = | |
13443 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
13444 | short int ebcdic_mm[] = | |
13445 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
13446 | int use_ebcdic (int i) { | |
13447 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
13448 | } | |
13449 | extern int foo; | |
13450 | ||
13451 | int | |
13452 | main () | |
13453 | { | |
13454 | return use_ascii (foo) == use_ebcdic (foo); | |
13455 | ; | |
13456 | return 0; | |
13457 | } | |
13458 | _ACEOF | |
13459 | if ac_fn_c_try_compile "$LINENO"; then : | |
13460 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
13461 | ac_cv_c_bigendian=yes | |
13462 | fi | |
13463 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
13464 | if test "$ac_cv_c_bigendian" = unknown; then | |
13465 | ac_cv_c_bigendian=no | |
13466 | else | |
13467 | # finding both strings is unlikely to happen, but who knows? | |
13468 | ac_cv_c_bigendian=unknown | |
13469 | fi | |
13470 | fi | |
13471 | fi | |
13472 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13473 | else | |
13474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13475 | /* end confdefs.h. */ | |
13476 | $ac_includes_default | |
13477 | int | |
13478 | main () | |
13479 | { | |
13480 | ||
13481 | /* Are we little or big endian? From Harbison&Steele. */ | |
13482 | union | |
13483 | { | |
13484 | long int l; | |
13485 | char c[sizeof (long int)]; | |
13486 | } u; | |
13487 | u.l = 1; | |
13488 | return u.c[sizeof (long int) - 1] == 1; | |
13489 | ||
13490 | ; | |
13491 | return 0; | |
13492 | } | |
13493 | _ACEOF | |
13494 | if ac_fn_c_try_run "$LINENO"; then : | |
13495 | ac_cv_c_bigendian=no | |
13496 | else | |
13497 | ac_cv_c_bigendian=yes | |
13498 | fi | |
13499 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13500 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13501 | fi | |
13502 | ||
13503 | fi | |
13504 | fi | |
13505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
13506 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
13507 | case $ac_cv_c_bigendian in #( | |
13508 | yes) | |
13509 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
13510 | ;; #( | |
13511 | no) | |
13512 | ;; #( | |
13513 | universal) | |
13514 | ||
13515 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
13516 | ||
13517 | ;; #( | |
13518 | *) | |
13519 | as_fn_error $? "unknown endianness | |
13520 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
13521 | esac | |
13522 | ||
13523 | ||
13524 | ||
5df4cba6 SM |
13525 | GNULIB_LOCALECONV=0; |
13526 | GNULIB_SETLOCALE=0; | |
13527 | GNULIB_SETLOCALE_NULL=0; | |
13528 | GNULIB_DUPLOCALE=0; | |
13529 | GNULIB_LOCALENAME=0; | |
13530 | HAVE_NEWLOCALE=1; | |
13531 | HAVE_DUPLOCALE=1; | |
13532 | HAVE_FREELOCALE=1; | |
13533 | REPLACE_LOCALECONV=0; | |
13534 | REPLACE_SETLOCALE=0; | |
13535 | REPLACE_NEWLOCALE=0; | |
13536 | REPLACE_DUPLOCALE=0; | |
13537 | REPLACE_FREELOCALE=0; | |
13538 | REPLACE_STRUCT_LCONV=0; | |
13539 | ||
13540 | ||
13541 | REPLACE_NULL=0; | |
13542 | HAVE_MAX_ALIGN_T=1; | |
13543 | HAVE_WCHAR_T=1; | |
13544 | ||
13545 | ||
13546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
13547 | $as_echo_n "checking for wchar_t... " >&6; } | |
13548 | if ${gt_cv_c_wchar_t+:} false; then : | |
13549 | $as_echo_n "(cached) " >&6 | |
13550 | else | |
13551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13552 | /* end confdefs.h. */ | |
13553 | #include <stddef.h> | |
13554 | wchar_t foo = (wchar_t)'\0'; | |
13555 | int | |
13556 | main () | |
13557 | { | |
13558 | ||
13559 | ; | |
13560 | return 0; | |
13561 | } | |
13562 | _ACEOF | |
13563 | if ac_fn_c_try_compile "$LINENO"; then : | |
13564 | gt_cv_c_wchar_t=yes | |
13565 | else | |
13566 | gt_cv_c_wchar_t=no | |
13567 | fi | |
13568 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13569 | fi | |
13570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
13571 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
13572 | if test $gt_cv_c_wchar_t = yes; then | |
13573 | ||
13574 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
13575 | ||
13576 | fi | |
13577 | ||
13578 | ||
13579 | ||
13580 | ||
13581 | STDDEF_H= | |
13582 | ||
13583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 | |
13584 | $as_echo_n "checking for good max_align_t... " >&6; } | |
13585 | if ${gl_cv_type_max_align_t+:} false; then : | |
13586 | $as_echo_n "(cached) " >&6 | |
13587 | else | |
13588 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13589 | /* end confdefs.h. */ | |
13590 | #include <stddef.h> | |
13591 | unsigned int s = sizeof (max_align_t); | |
13592 | #if defined __GNUC__ || defined __IBM__ALIGNOF__ | |
13593 | int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; | |
13594 | int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; | |
13595 | #endif | |
13596 | ||
13597 | int | |
13598 | main () | |
13599 | { | |
c0c3707f | 13600 | |
6ec2e0f5 SDJ |
13601 | ; |
13602 | return 0; | |
13603 | } | |
13604 | _ACEOF | |
13605 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 13606 | gl_cv_type_max_align_t=yes |
6ec2e0f5 | 13607 | else |
5df4cba6 | 13608 | gl_cv_type_max_align_t=no |
6ec2e0f5 | 13609 | fi |
c0c3707f | 13610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 13611 | |
c0c3707f | 13612 | fi |
5df4cba6 SM |
13613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 |
13614 | $as_echo "$gl_cv_type_max_align_t" >&6; } | |
13615 | if test $gl_cv_type_max_align_t = no; then | |
13616 | HAVE_MAX_ALIGN_T=0 | |
13617 | STDDEF_H=stddef.h | |
13618 | fi | |
13619 | ||
13620 | if test $gt_cv_c_wchar_t = no; then | |
13621 | HAVE_WCHAR_T=0 | |
13622 | STDDEF_H=stddef.h | |
13623 | fi | |
13624 | ||
13625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
13626 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
13627 | if ${gl_cv_decl_null_works+:} false; then : | |
13628 | $as_echo_n "(cached) " >&6 | |
c0c3707f CB |
13629 | else |
13630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13631 | /* end confdefs.h. */ | |
5df4cba6 SM |
13632 | #include <stddef.h> |
13633 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
13634 | ||
c0c3707f CB |
13635 | int |
13636 | main () | |
13637 | { | |
6ec2e0f5 | 13638 | |
c0c3707f CB |
13639 | ; |
13640 | return 0; | |
13641 | } | |
13642 | _ACEOF | |
5df4cba6 SM |
13643 | if ac_fn_c_try_compile "$LINENO"; then : |
13644 | gl_cv_decl_null_works=yes | |
c0c3707f | 13645 | else |
5df4cba6 | 13646 | gl_cv_decl_null_works=no |
c0c3707f | 13647 | fi |
5df4cba6 | 13648 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c0c3707f | 13649 | fi |
5df4cba6 SM |
13650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
13651 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
13652 | if test $gl_cv_decl_null_works = no; then | |
13653 | REPLACE_NULL=1 | |
13654 | STDDEF_H=stddef.h | |
13655 | fi | |
6ec2e0f5 | 13656 | |
5df4cba6 SM |
13657 | |
13658 | if test -n "$STDDEF_H"; then | |
13659 | GL_GENERATE_STDDEF_H_TRUE= | |
13660 | GL_GENERATE_STDDEF_H_FALSE='#' | |
13661 | else | |
13662 | GL_GENERATE_STDDEF_H_TRUE='#' | |
13663 | GL_GENERATE_STDDEF_H_FALSE= | |
c0c3707f | 13664 | fi |
6ec2e0f5 | 13665 | |
5df4cba6 | 13666 | if test -n "$STDDEF_H"; then |
6ec2e0f5 | 13667 | |
472fa5ee SM |
13668 | |
13669 | ||
5e8754f9 SDJ |
13670 | |
13671 | ||
5df4cba6 SM |
13672 | |
13673 | ||
13674 | ||
13675 | if test $gl_cv_have_include_next = yes; then | |
13676 | gl_cv_next_stddef_h='<'stddef.h'>' | |
13677 | else | |
13678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
13679 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
13680 | if ${gl_cv_next_stddef_h+:} false; then : | |
13681 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 13682 | else |
5df4cba6 SM |
13683 | |
13684 | ||
13685 | ||
c0c3707f CB |
13686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13687 | /* end confdefs.h. */ | |
c0c3707f | 13688 | #include <stddef.h> |
c0c3707f | 13689 | _ACEOF |
5df4cba6 SM |
13690 | case "$host_os" in |
13691 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
13692 | *) gl_absname_cpp="$ac_cpp" ;; | |
13693 | esac | |
13694 | ||
13695 | case "$host_os" in | |
13696 | mingw*) | |
13697 | gl_dirsep_regex='[/\\]' | |
13698 | ;; | |
13699 | *) | |
13700 | gl_dirsep_regex='\/' | |
13701 | ;; | |
13702 | esac | |
13703 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
13704 | gl_header_literal_regex=`echo 'stddef.h' \ | |
13705 | | sed -e "$gl_make_literal_regex_sed"` | |
13706 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
13707 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
13708 | s|^/[^/]|//&| | |
13709 | p | |
13710 | q | |
13711 | }' | |
13712 | ||
13713 | gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
13714 | sed -n "$gl_absolute_header_sed"` | |
13715 | ||
13716 | gl_header=$gl_cv_absolute_stddef_h | |
13717 | gl_cv_next_stddef_h='"'$gl_header'"' | |
5e8754f9 SDJ |
13718 | |
13719 | ||
c0c3707f | 13720 | fi |
5df4cba6 SM |
13721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
13722 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
13723 | fi | |
13724 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
13725 | ||
13726 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
13727 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
13728 | gl_next_as_first_directive='<'stddef.h'>' | |
13729 | else | |
13730 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
13731 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
13732 | fi | |
13733 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
5e8754f9 SDJ |
13734 | |
13735 | ||
13736 | ||
13737 | ||
5df4cba6 | 13738 | fi |
5e8754f9 SDJ |
13739 | |
13740 | ||
13741 | ||
13742 | ||
13743 | ||
13744 | ||
5df4cba6 SM |
13745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 |
13746 | $as_echo_n "checking whether locale.h defines locale_t... " >&6; } | |
13747 | if ${gl_cv_header_locale_has_locale_t+:} false; then : | |
13748 | $as_echo_n "(cached) " >&6 | |
13749 | else | |
13750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 13751 | /* end confdefs.h. */ |
5df4cba6 SM |
13752 | #include <locale.h> |
13753 | locale_t x; | |
c0c3707f CB |
13754 | int |
13755 | main () | |
13756 | { | |
5e8754f9 | 13757 | |
c0c3707f CB |
13758 | ; |
13759 | return 0; | |
13760 | } | |
13761 | _ACEOF | |
13762 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 13763 | gl_cv_header_locale_has_locale_t=yes |
c0c3707f | 13764 | else |
5df4cba6 | 13765 | gl_cv_header_locale_has_locale_t=no |
c0c3707f CB |
13766 | fi |
13767 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5df4cba6 | 13768 | |
c0c3707f | 13769 | fi |
5df4cba6 SM |
13770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 |
13771 | $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } | |
13772 | ||
13773 | ||
13774 | if test $ac_cv_header_xlocale_h = yes; then | |
13775 | HAVE_XLOCALE_H=1 | |
13776 | if test $gl_cv_header_locale_has_locale_t = yes; then | |
13777 | gl_cv_header_locale_h_needs_xlocale_h=no | |
13778 | else | |
13779 | gl_cv_header_locale_h_needs_xlocale_h=yes | |
c0c3707f | 13780 | fi |
5df4cba6 SM |
13781 | HAVE_LOCALE_T=1 |
13782 | else | |
13783 | HAVE_XLOCALE_H=0 | |
13784 | gl_cv_header_locale_h_needs_xlocale_h=no | |
13785 | if test $gl_cv_header_locale_has_locale_t = yes; then | |
13786 | HAVE_LOCALE_T=1 | |
13787 | else | |
13788 | HAVE_LOCALE_T=0 | |
13789 | fi | |
13790 | fi | |
13791 | ||
13792 | ||
5e8754f9 | 13793 | |
5df4cba6 SM |
13794 | |
13795 | gl_threads_api=none | |
13796 | LIBTHREAD= | |
13797 | LTLIBTHREAD= | |
13798 | LIBMULTITHREAD= | |
13799 | LTLIBMULTITHREAD= | |
13800 | if test "$gl_use_threads" != no; then | |
13801 | ||
13802 | ||
13803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
13804 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
13805 | if ${gl_cv_have_weak+:} false; then : | |
13806 | $as_echo_n "(cached) " >&6 | |
13807 | else | |
13808 | gl_cv_have_weak=no | |
13809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13810 | /* end confdefs.h. */ | |
13811 | extern void xyzzy (); | |
13812 | #pragma weak xyzzy | |
c0c3707f CB |
13813 | int |
13814 | main () | |
13815 | { | |
5df4cba6 | 13816 | xyzzy(); |
c0c3707f CB |
13817 | ; |
13818 | return 0; | |
13819 | } | |
13820 | _ACEOF | |
5df4cba6 SM |
13821 | if ac_fn_c_try_link "$LINENO"; then : |
13822 | gl_cv_have_weak=maybe | |
13823 | fi | |
13824 | rm -f core conftest.err conftest.$ac_objext \ | |
13825 | conftest$ac_exeext conftest.$ac_ext | |
13826 | if test $gl_cv_have_weak = maybe; then | |
13827 | if test "$cross_compiling" = yes; then : | |
13828 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 13829 | /* end confdefs.h. */ |
5df4cba6 SM |
13830 | #ifdef __ELF__ |
13831 | Extensible Linking Format | |
13832 | #endif | |
5e8754f9 | 13833 | |
5df4cba6 SM |
13834 | _ACEOF |
13835 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13836 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
13837 | gl_cv_have_weak="guessing yes" | |
13838 | else | |
13839 | gl_cv_have_weak="guessing no" | |
13840 | fi | |
13841 | rm -f conftest* | |
5e8754f9 | 13842 | |
5df4cba6 SM |
13843 | |
13844 | else | |
13845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13846 | /* end confdefs.h. */ | |
13847 | ||
13848 | #include <stdio.h> | |
13849 | #pragma weak fputs | |
13850 | int main () | |
13851 | { | |
13852 | return (fputs == NULL); | |
c0c3707f CB |
13853 | } |
13854 | _ACEOF | |
5df4cba6 SM |
13855 | if ac_fn_c_try_run "$LINENO"; then : |
13856 | gl_cv_have_weak=yes | |
c0c3707f | 13857 | else |
5df4cba6 | 13858 | gl_cv_have_weak=no |
c0c3707f | 13859 | fi |
5df4cba6 SM |
13860 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13861 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c0c3707f | 13862 | fi |
5df4cba6 SM |
13863 | |
13864 | fi | |
13865 | case " $LDFLAGS " in | |
13866 | *" -static "*) gl_cv_have_weak=no ;; | |
13867 | esac | |
13868 | case "$gl_cv_have_weak" in | |
13869 | *yes) | |
13870 | case "$host_os" in | |
13871 | freebsd* | dragonfly*) | |
13872 | : > conftest1.c | |
13873 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
13874 | cat <<EOF > conftest2.c | |
13875 | #include <pthread.h> | |
13876 | #pragma weak pthread_mutexattr_gettype | |
13877 | int main () | |
13878 | { | |
13879 | return (pthread_mutexattr_gettype != NULL); | |
13880 | } | |
13881 | EOF | |
13882 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
13883 | || gl_cv_have_weak=no | |
13884 | rm -f conftest1.c libempty.so conftest2.c conftest | |
13885 | ;; | |
13886 | esac | |
13887 | ;; | |
13888 | esac | |
13889 | ||
13890 | fi | |
13891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
13892 | $as_echo "$gl_cv_have_weak" >&6; } | |
13893 | case "$gl_cv_have_weak" in | |
13894 | *yes) | |
13895 | ||
13896 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
13897 | ||
13898 | ;; | |
13899 | esac | |
13900 | ||
13901 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
13902 | ||
13903 | : | |
c0c3707f | 13904 | fi |
5df4cba6 SM |
13905 | if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then |
13906 | ||
13907 | gl_have_isoc_threads="$ac_cv_header_threads_h" | |
13908 | fi | |
13909 | if test "$gl_use_threads" = yes \ | |
13910 | || test "$gl_use_threads" = posix \ | |
13911 | || test "$gl_use_threads" = isoc+posix; then | |
13912 | ||
13913 | ||
13914 | if test -z "$gl_pthreadlib_body_done"; then | |
13915 | gl_pthread_api=no | |
13916 | LIBPTHREAD= | |
13917 | LIBPMULTITHREAD= | |
13918 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
13919 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
13920 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
13921 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
13922 | gl_have_pthread_h=yes | |
13923 | else | |
13924 | gl_have_pthread_h=no | |
13925 | fi | |
13926 | ||
13927 | ||
13928 | if test "$gl_have_pthread_h" = yes; then | |
13929 | # Other possible tests: | |
13930 | # -lpthreads (FSU threads, PCthreads) | |
13931 | # -lgthreads | |
13932 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
13933 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
13934 | # the second one only in libpthread, and lock.c needs it. | |
13935 | # | |
13936 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
13937 | # needs -pthread for some reason. See: | |
13938 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
13939 | save_LIBS=$LIBS | |
13940 | for gl_pthread in '' '-pthread'; do | |
13941 | LIBS="$LIBS $gl_pthread" | |
13942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13943 | /* end confdefs.h. */ | |
13944 | #include <pthread.h> | |
13945 | pthread_mutex_t m; | |
13946 | pthread_mutexattr_t ma; | |
5e8754f9 | 13947 | |
c0c3707f CB |
13948 | int |
13949 | main () | |
13950 | { | |
5df4cba6 SM |
13951 | pthread_mutex_lock (&m); |
13952 | pthread_mutexattr_init (&ma); | |
c0c3707f CB |
13953 | ; |
13954 | return 0; | |
13955 | } | |
13956 | _ACEOF | |
5df4cba6 SM |
13957 | if ac_fn_c_try_link "$LINENO"; then : |
13958 | gl_pthread_api=yes | |
13959 | LIBPTHREAD=$gl_pthread | |
13960 | LIBPMULTITHREAD=$gl_pthread | |
c0c3707f | 13961 | fi |
5df4cba6 SM |
13962 | rm -f core conftest.err conftest.$ac_objext \ |
13963 | conftest$ac_exeext conftest.$ac_ext | |
13964 | LIBS=$save_LIBS | |
13965 | test $gl_pthread_api = yes && break | |
13966 | done | |
13967 | ||
13968 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | |
13969 | # since it is defined as a macro on OSF/1.) | |
13970 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
13971 | # The program links fine without libpthread. But it may actually | |
13972 | # need to link with libpthread in order to create multiple threads. | |
13973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
13974 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
13975 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
13976 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 13977 | else |
5df4cba6 SM |
13978 | ac_check_lib_save_LIBS=$LIBS |
13979 | LIBS="-lpthread $LIBS" | |
13980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 13981 | /* end confdefs.h. */ |
5df4cba6 SM |
13982 | |
13983 | /* Override any GCC internal prototype to avoid an error. | |
13984 | Use char because int might match the return type of a GCC | |
13985 | builtin and then its argument prototype would still apply. */ | |
13986 | #ifdef __cplusplus | |
13987 | extern "C" | |
13988 | #endif | |
13989 | char pthread_kill (); | |
c0c3707f CB |
13990 | int |
13991 | main () | |
13992 | { | |
5df4cba6 | 13993 | return pthread_kill (); |
c0c3707f CB |
13994 | ; |
13995 | return 0; | |
13996 | } | |
13997 | _ACEOF | |
5df4cba6 SM |
13998 | if ac_fn_c_try_link "$LINENO"; then : |
13999 | ac_cv_lib_pthread_pthread_kill=yes | |
6ec2e0f5 | 14000 | else |
5df4cba6 | 14001 | ac_cv_lib_pthread_pthread_kill=no |
6ec2e0f5 | 14002 | fi |
5df4cba6 SM |
14003 | rm -f core conftest.err conftest.$ac_objext \ |
14004 | conftest$ac_exeext conftest.$ac_ext | |
14005 | LIBS=$ac_check_lib_save_LIBS | |
c0c3707f | 14006 | fi |
5df4cba6 SM |
14007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 |
14008 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14009 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14010 | LIBPMULTITHREAD=-lpthread | |
14011 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
14012 | # Therefore pthread_in_use() needs to actually try to create a | |
14013 | # thread: pthread_create from libc will fail, whereas | |
14014 | # pthread_create will actually create a thread. | |
14015 | # On Solaris 10 or newer, this test is no longer needed, because | |
14016 | # libc contains the fully functional pthread functions. | |
14017 | case "$host_os" in | |
14018 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
472fa5ee | 14019 | |
5df4cba6 | 14020 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h |
472fa5ee | 14021 | |
5df4cba6 | 14022 | esac |
472fa5ee | 14023 | |
5df4cba6 | 14024 | fi |
472fa5ee | 14025 | |
5df4cba6 SM |
14026 | elif test $gl_pthread_api != yes; then |
14027 | # Some library is needed. Try libpthread and libc_r. | |
14028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14029 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14030 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
c0c3707f CB |
14031 | $as_echo_n "(cached) " >&6 |
14032 | else | |
5df4cba6 SM |
14033 | ac_check_lib_save_LIBS=$LIBS |
14034 | LIBS="-lpthread $LIBS" | |
14035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14036 | /* end confdefs.h. */ |
5df4cba6 SM |
14037 | |
14038 | /* Override any GCC internal prototype to avoid an error. | |
14039 | Use char because int might match the return type of a GCC | |
14040 | builtin and then its argument prototype would still apply. */ | |
14041 | #ifdef __cplusplus | |
14042 | extern "C" | |
14043 | #endif | |
14044 | char pthread_kill (); | |
c0c3707f CB |
14045 | int |
14046 | main () | |
14047 | { | |
5df4cba6 | 14048 | return pthread_kill (); |
c0c3707f CB |
14049 | ; |
14050 | return 0; | |
14051 | } | |
14052 | _ACEOF | |
14053 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14054 | ac_cv_lib_pthread_pthread_kill=yes |
c0c3707f | 14055 | else |
5df4cba6 | 14056 | ac_cv_lib_pthread_pthread_kill=no |
c0c3707f CB |
14057 | fi |
14058 | rm -f core conftest.err conftest.$ac_objext \ | |
14059 | conftest$ac_exeext conftest.$ac_ext | |
5df4cba6 SM |
14060 | LIBS=$ac_check_lib_save_LIBS |
14061 | fi | |
14062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14063 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14064 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14065 | gl_pthread_api=yes | |
14066 | LIBPTHREAD=-lpthread | |
14067 | LIBPMULTITHREAD=-lpthread | |
c0c3707f | 14068 | fi |
472fa5ee | 14069 | |
5df4cba6 SM |
14070 | if test $gl_pthread_api != yes; then |
14071 | # For FreeBSD 4. | |
14072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
14073 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
14074 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
14075 | $as_echo_n "(cached) " >&6 | |
14076 | else | |
14077 | ac_check_lib_save_LIBS=$LIBS | |
14078 | LIBS="-lc_r $LIBS" | |
14079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14080 | /* end confdefs.h. */ | |
472fa5ee | 14081 | |
5df4cba6 SM |
14082 | /* Override any GCC internal prototype to avoid an error. |
14083 | Use char because int might match the return type of a GCC | |
14084 | builtin and then its argument prototype would still apply. */ | |
14085 | #ifdef __cplusplus | |
14086 | extern "C" | |
14087 | #endif | |
14088 | char pthread_kill (); | |
14089 | int | |
14090 | main () | |
14091 | { | |
14092 | return pthread_kill (); | |
14093 | ; | |
14094 | return 0; | |
14095 | } | |
14096 | _ACEOF | |
14097 | if ac_fn_c_try_link "$LINENO"; then : | |
14098 | ac_cv_lib_c_r_pthread_kill=yes | |
14099 | else | |
14100 | ac_cv_lib_c_r_pthread_kill=no | |
14101 | fi | |
14102 | rm -f core conftest.err conftest.$ac_objext \ | |
14103 | conftest$ac_exeext conftest.$ac_ext | |
14104 | LIBS=$ac_check_lib_save_LIBS | |
14105 | fi | |
14106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
14107 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
14108 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
14109 | gl_pthread_api=yes | |
14110 | LIBPTHREAD=-lc_r | |
14111 | LIBPMULTITHREAD=-lc_r | |
14112 | fi | |
6ec2e0f5 | 14113 | |
5df4cba6 SM |
14114 | fi |
14115 | fi | |
14116 | fi | |
14117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
14118 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
14119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
14120 | $as_echo "$gl_pthread_api" >&6; } | |
472fa5ee SM |
14121 | |
14122 | ||
5df4cba6 | 14123 | if test $gl_pthread_api = yes; then |
472fa5ee | 14124 | |
5df4cba6 | 14125 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h |
472fa5ee | 14126 | |
5df4cba6 | 14127 | fi |
472fa5ee | 14128 | |
5df4cba6 | 14129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c0c3707f | 14130 | /* end confdefs.h. */ |
5df4cba6 | 14131 | #include <sched.h> |
c0c3707f CB |
14132 | int |
14133 | main () | |
14134 | { | |
5df4cba6 | 14135 | sched_yield (); |
c0c3707f CB |
14136 | ; |
14137 | return 0; | |
14138 | } | |
14139 | _ACEOF | |
14140 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14141 | LIB_SCHED_YIELD= |
6ec2e0f5 | 14142 | |
c0c3707f | 14143 | else |
5df4cba6 SM |
14144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 |
14145 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
14146 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
14147 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 14148 | else |
5df4cba6 SM |
14149 | ac_check_lib_save_LIBS=$LIBS |
14150 | LIBS="-lrt $LIBS" | |
14151 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14152 | /* end confdefs.h. */ |
6ec2e0f5 | 14153 | |
5df4cba6 SM |
14154 | /* Override any GCC internal prototype to avoid an error. |
14155 | Use char because int might match the return type of a GCC | |
14156 | builtin and then its argument prototype would still apply. */ | |
14157 | #ifdef __cplusplus | |
14158 | extern "C" | |
14159 | #endif | |
14160 | char sched_yield (); | |
14161 | int | |
14162 | main () | |
c0c3707f | 14163 | { |
5df4cba6 SM |
14164 | return sched_yield (); |
14165 | ; | |
14166 | return 0; | |
c0c3707f | 14167 | } |
6ec2e0f5 | 14168 | _ACEOF |
5df4cba6 SM |
14169 | if ac_fn_c_try_link "$LINENO"; then : |
14170 | ac_cv_lib_rt_sched_yield=yes | |
c0c3707f | 14171 | else |
5df4cba6 | 14172 | ac_cv_lib_rt_sched_yield=no |
6ec2e0f5 | 14173 | fi |
5df4cba6 SM |
14174 | rm -f core conftest.err conftest.$ac_objext \ |
14175 | conftest$ac_exeext conftest.$ac_ext | |
14176 | LIBS=$ac_check_lib_save_LIBS | |
6ec2e0f5 | 14177 | fi |
5df4cba6 SM |
14178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 |
14179 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
14180 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
14181 | LIB_SCHED_YIELD=-lrt | |
14182 | else | |
14183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
14184 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
14185 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
14186 | $as_echo_n "(cached) " >&6 | |
14187 | else | |
14188 | ac_check_lib_save_LIBS=$LIBS | |
14189 | LIBS="-lposix4 $LIBS" | |
14190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14191 | /* end confdefs.h. */ |
6ec2e0f5 | 14192 | |
5df4cba6 SM |
14193 | /* Override any GCC internal prototype to avoid an error. |
14194 | Use char because int might match the return type of a GCC | |
14195 | builtin and then its argument prototype would still apply. */ | |
14196 | #ifdef __cplusplus | |
14197 | extern "C" | |
14198 | #endif | |
14199 | char sched_yield (); | |
c0c3707f CB |
14200 | int |
14201 | main () | |
14202 | { | |
5df4cba6 | 14203 | return sched_yield (); |
c0c3707f CB |
14204 | ; |
14205 | return 0; | |
14206 | } | |
14207 | _ACEOF | |
14208 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 SM |
14209 | ac_cv_lib_posix4_sched_yield=yes |
14210 | else | |
14211 | ac_cv_lib_posix4_sched_yield=no | |
c0c3707f CB |
14212 | fi |
14213 | rm -f core conftest.err conftest.$ac_objext \ | |
14214 | conftest$ac_exeext conftest.$ac_ext | |
5df4cba6 SM |
14215 | LIBS=$ac_check_lib_save_LIBS |
14216 | fi | |
14217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
14218 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
14219 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
14220 | LIB_SCHED_YIELD=-lposix4 | |
14221 | fi | |
14222 | ||
14223 | fi | |
14224 | ||
14225 | ||
14226 | fi | |
14227 | rm -f core conftest.err conftest.$ac_objext \ | |
14228 | conftest$ac_exeext conftest.$ac_ext | |
14229 | ||
14230 | ||
14231 | gl_pthreadlib_body_done=done | |
14232 | fi | |
14233 | ||
14234 | LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD | |
14235 | LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD | |
14236 | if test $gl_pthread_api = yes; then | |
14237 | if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then | |
14238 | gl_threads_api='isoc+posix' | |
14239 | ||
14240 | $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h | |
14241 | ||
14242 | LIBTHREAD= LTLIBTHREAD= | |
14243 | else | |
14244 | gl_threads_api=posix | |
14245 | ||
14246 | $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h | |
14247 | ||
14248 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | |
14249 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
14250 | ||
14251 | $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h | |
14252 | ||
14253 | LIBTHREAD= LTLIBTHREAD= | |
14254 | fi | |
14255 | fi | |
14256 | fi | |
c0c3707f CB |
14257 | fi |
14258 | fi | |
5df4cba6 SM |
14259 | if test $gl_threads_api = none; then |
14260 | if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then | |
14261 | ||
14262 | ||
14263 | ||
14264 | if test -z "$gl_stdthreadlib_body_done"; then | |
14265 | ||
14266 | ||
14267 | case "$host_os" in | |
14268 | mingw*) | |
14269 | LIBSTDTHREAD= | |
14270 | ;; | |
14271 | *) | |
c0c3707f CB |
14272 | |
14273 | ||
5df4cba6 | 14274 | if test -z "$gl_pthreadlib_body_done"; then |
c0c3707f CB |
14275 | gl_pthread_api=no |
14276 | LIBPTHREAD= | |
14277 | LIBPMULTITHREAD= | |
14278 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
14279 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
14280 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
14281 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
14282 | gl_have_pthread_h=yes | |
14283 | else | |
14284 | gl_have_pthread_h=no | |
14285 | fi | |
6ec2e0f5 | 14286 | |
6ec2e0f5 | 14287 | |
c0c3707f CB |
14288 | if test "$gl_have_pthread_h" = yes; then |
14289 | # Other possible tests: | |
14290 | # -lpthreads (FSU threads, PCthreads) | |
14291 | # -lgthreads | |
14292 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
14293 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
14294 | # the second one only in libpthread, and lock.c needs it. | |
14295 | # | |
14296 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
14297 | # needs -pthread for some reason. See: | |
14298 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
14299 | save_LIBS=$LIBS | |
14300 | for gl_pthread in '' '-pthread'; do | |
14301 | LIBS="$LIBS $gl_pthread" | |
14302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14303 | /* end confdefs.h. */ | |
14304 | #include <pthread.h> | |
14305 | pthread_mutex_t m; | |
14306 | pthread_mutexattr_t ma; | |
6ec2e0f5 | 14307 | |
c0c3707f CB |
14308 | int |
14309 | main () | |
14310 | { | |
14311 | pthread_mutex_lock (&m); | |
14312 | pthread_mutexattr_init (&ma); | |
14313 | ; | |
14314 | return 0; | |
14315 | } | |
6ec2e0f5 | 14316 | _ACEOF |
c0c3707f CB |
14317 | if ac_fn_c_try_link "$LINENO"; then : |
14318 | gl_pthread_api=yes | |
14319 | LIBPTHREAD=$gl_pthread | |
14320 | LIBPMULTITHREAD=$gl_pthread | |
6ec2e0f5 | 14321 | fi |
c0c3707f CB |
14322 | rm -f core conftest.err conftest.$ac_objext \ |
14323 | conftest$ac_exeext conftest.$ac_ext | |
14324 | LIBS=$save_LIBS | |
14325 | test $gl_pthread_api = yes && break | |
14326 | done | |
6ec2e0f5 | 14327 | |
c0c3707f CB |
14328 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, |
14329 | # since it is defined as a macro on OSF/1.) | |
14330 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
14331 | # The program links fine without libpthread. But it may actually | |
14332 | # need to link with libpthread in order to create multiple threads. | |
14333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14334 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14335 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
6ec2e0f5 SDJ |
14336 | $as_echo_n "(cached) " >&6 |
14337 | else | |
c0c3707f | 14338 | ac_check_lib_save_LIBS=$LIBS |
5df4cba6 SM |
14339 | LIBS="-lpthread $LIBS" |
14340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14341 | /* end confdefs.h. */ | |
14342 | ||
14343 | /* Override any GCC internal prototype to avoid an error. | |
14344 | Use char because int might match the return type of a GCC | |
14345 | builtin and then its argument prototype would still apply. */ | |
14346 | #ifdef __cplusplus | |
14347 | extern "C" | |
14348 | #endif | |
14349 | char pthread_kill (); | |
14350 | int | |
14351 | main () | |
14352 | { | |
14353 | return pthread_kill (); | |
14354 | ; | |
14355 | return 0; | |
14356 | } | |
14357 | _ACEOF | |
14358 | if ac_fn_c_try_link "$LINENO"; then : | |
14359 | ac_cv_lib_pthread_pthread_kill=yes | |
14360 | else | |
14361 | ac_cv_lib_pthread_pthread_kill=no | |
14362 | fi | |
14363 | rm -f core conftest.err conftest.$ac_objext \ | |
14364 | conftest$ac_exeext conftest.$ac_ext | |
14365 | LIBS=$ac_check_lib_save_LIBS | |
14366 | fi | |
14367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14368 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14369 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14370 | LIBPMULTITHREAD=-lpthread | |
14371 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
14372 | # Therefore pthread_in_use() needs to actually try to create a | |
14373 | # thread: pthread_create from libc will fail, whereas | |
14374 | # pthread_create will actually create a thread. | |
14375 | # On Solaris 10 or newer, this test is no longer needed, because | |
14376 | # libc contains the fully functional pthread functions. | |
14377 | case "$host_os" in | |
14378 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
14379 | ||
14380 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
14381 | ||
14382 | esac | |
14383 | ||
14384 | fi | |
14385 | ||
14386 | elif test $gl_pthread_api != yes; then | |
14387 | # Some library is needed. Try libpthread and libc_r. | |
14388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14389 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14390 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
14391 | $as_echo_n "(cached) " >&6 | |
14392 | else | |
14393 | ac_check_lib_save_LIBS=$LIBS | |
14394 | LIBS="-lpthread $LIBS" | |
14395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14396 | /* end confdefs.h. */ | |
14397 | ||
14398 | /* Override any GCC internal prototype to avoid an error. | |
14399 | Use char because int might match the return type of a GCC | |
14400 | builtin and then its argument prototype would still apply. */ | |
14401 | #ifdef __cplusplus | |
14402 | extern "C" | |
14403 | #endif | |
14404 | char pthread_kill (); | |
14405 | int | |
14406 | main () | |
14407 | { | |
14408 | return pthread_kill (); | |
14409 | ; | |
14410 | return 0; | |
14411 | } | |
14412 | _ACEOF | |
14413 | if ac_fn_c_try_link "$LINENO"; then : | |
14414 | ac_cv_lib_pthread_pthread_kill=yes | |
14415 | else | |
14416 | ac_cv_lib_pthread_pthread_kill=no | |
14417 | fi | |
14418 | rm -f core conftest.err conftest.$ac_objext \ | |
14419 | conftest$ac_exeext conftest.$ac_ext | |
14420 | LIBS=$ac_check_lib_save_LIBS | |
14421 | fi | |
14422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14423 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14424 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14425 | gl_pthread_api=yes | |
14426 | LIBPTHREAD=-lpthread | |
14427 | LIBPMULTITHREAD=-lpthread | |
14428 | fi | |
14429 | ||
14430 | if test $gl_pthread_api != yes; then | |
14431 | # For FreeBSD 4. | |
14432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
14433 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
14434 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
14435 | $as_echo_n "(cached) " >&6 | |
14436 | else | |
14437 | ac_check_lib_save_LIBS=$LIBS | |
14438 | LIBS="-lc_r $LIBS" | |
14439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14440 | /* end confdefs.h. */ | |
14441 | ||
14442 | /* Override any GCC internal prototype to avoid an error. | |
14443 | Use char because int might match the return type of a GCC | |
14444 | builtin and then its argument prototype would still apply. */ | |
14445 | #ifdef __cplusplus | |
14446 | extern "C" | |
14447 | #endif | |
14448 | char pthread_kill (); | |
14449 | int | |
14450 | main () | |
14451 | { | |
14452 | return pthread_kill (); | |
14453 | ; | |
14454 | return 0; | |
14455 | } | |
14456 | _ACEOF | |
14457 | if ac_fn_c_try_link "$LINENO"; then : | |
14458 | ac_cv_lib_c_r_pthread_kill=yes | |
14459 | else | |
14460 | ac_cv_lib_c_r_pthread_kill=no | |
14461 | fi | |
14462 | rm -f core conftest.err conftest.$ac_objext \ | |
14463 | conftest$ac_exeext conftest.$ac_ext | |
14464 | LIBS=$ac_check_lib_save_LIBS | |
14465 | fi | |
14466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
14467 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
14468 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
14469 | gl_pthread_api=yes | |
14470 | LIBPTHREAD=-lc_r | |
14471 | LIBPMULTITHREAD=-lc_r | |
14472 | fi | |
14473 | ||
14474 | fi | |
14475 | fi | |
14476 | fi | |
14477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
14478 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
14479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
14480 | $as_echo "$gl_pthread_api" >&6; } | |
14481 | ||
14482 | ||
14483 | if test $gl_pthread_api = yes; then | |
14484 | ||
14485 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h | |
14486 | ||
14487 | fi | |
14488 | ||
14489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14490 | /* end confdefs.h. */ | |
14491 | #include <sched.h> | |
14492 | int | |
14493 | main () | |
14494 | { | |
14495 | sched_yield (); | |
14496 | ; | |
14497 | return 0; | |
14498 | } | |
14499 | _ACEOF | |
14500 | if ac_fn_c_try_link "$LINENO"; then : | |
14501 | LIB_SCHED_YIELD= | |
14502 | ||
14503 | else | |
14504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
14505 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
14506 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
14507 | $as_echo_n "(cached) " >&6 | |
14508 | else | |
14509 | ac_check_lib_save_LIBS=$LIBS | |
14510 | LIBS="-lrt $LIBS" | |
c0c3707f | 14511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 | 14512 | /* end confdefs.h. */ |
6ec2e0f5 | 14513 | |
c0c3707f CB |
14514 | /* Override any GCC internal prototype to avoid an error. |
14515 | Use char because int might match the return type of a GCC | |
14516 | builtin and then its argument prototype would still apply. */ | |
14517 | #ifdef __cplusplus | |
14518 | extern "C" | |
14519 | #endif | |
5df4cba6 | 14520 | char sched_yield (); |
c0c3707f CB |
14521 | int |
14522 | main () | |
14523 | { | |
5df4cba6 | 14524 | return sched_yield (); |
c0c3707f CB |
14525 | ; |
14526 | return 0; | |
14527 | } | |
6ec2e0f5 | 14528 | _ACEOF |
c0c3707f | 14529 | if ac_fn_c_try_link "$LINENO"; then : |
5df4cba6 | 14530 | ac_cv_lib_rt_sched_yield=yes |
6ec2e0f5 | 14531 | else |
5df4cba6 | 14532 | ac_cv_lib_rt_sched_yield=no |
6ec2e0f5 | 14533 | fi |
c0c3707f CB |
14534 | rm -f core conftest.err conftest.$ac_objext \ |
14535 | conftest$ac_exeext conftest.$ac_ext | |
14536 | LIBS=$ac_check_lib_save_LIBS | |
6ec2e0f5 | 14537 | fi |
5df4cba6 SM |
14538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 |
14539 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
14540 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
14541 | LIB_SCHED_YIELD=-lrt | |
14542 | else | |
14543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
14544 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
14545 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
6ec2e0f5 SDJ |
14546 | $as_echo_n "(cached) " >&6 |
14547 | else | |
c0c3707f | 14548 | ac_check_lib_save_LIBS=$LIBS |
5df4cba6 | 14549 | LIBS="-lposix4 $LIBS" |
c0c3707f | 14550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 SDJ |
14551 | /* end confdefs.h. */ |
14552 | ||
c0c3707f CB |
14553 | /* Override any GCC internal prototype to avoid an error. |
14554 | Use char because int might match the return type of a GCC | |
14555 | builtin and then its argument prototype would still apply. */ | |
14556 | #ifdef __cplusplus | |
14557 | extern "C" | |
14558 | #endif | |
5df4cba6 | 14559 | char sched_yield (); |
6ec2e0f5 SDJ |
14560 | int |
14561 | main () | |
14562 | { | |
5df4cba6 | 14563 | return sched_yield (); |
c0c3707f CB |
14564 | ; |
14565 | return 0; | |
14566 | } | |
14567 | _ACEOF | |
14568 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14569 | ac_cv_lib_posix4_sched_yield=yes |
c0c3707f | 14570 | else |
5df4cba6 | 14571 | ac_cv_lib_posix4_sched_yield=no |
c0c3707f CB |
14572 | fi |
14573 | rm -f core conftest.err conftest.$ac_objext \ | |
14574 | conftest$ac_exeext conftest.$ac_ext | |
14575 | LIBS=$ac_check_lib_save_LIBS | |
14576 | fi | |
5df4cba6 SM |
14577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 |
14578 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
14579 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
14580 | LIB_SCHED_YIELD=-lposix4 | |
c0c3707f | 14581 | fi |
6ec2e0f5 | 14582 | |
5df4cba6 SM |
14583 | fi |
14584 | ||
14585 | ||
14586 | fi | |
14587 | rm -f core conftest.err conftest.$ac_objext \ | |
14588 | conftest$ac_exeext conftest.$ac_ext | |
14589 | ||
14590 | ||
14591 | gl_pthreadlib_body_done=done | |
14592 | fi | |
14593 | ||
14594 | if test $ac_cv_header_threads_h = yes; then | |
14595 | for ac_func in thrd_create | |
14596 | do : | |
14597 | ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create" | |
14598 | if test "x$ac_cv_func_thrd_create" = xyes; then : | |
14599 | cat >>confdefs.h <<_ACEOF | |
14600 | #define HAVE_THRD_CREATE 1 | |
14601 | _ACEOF | |
14602 | ||
14603 | fi | |
14604 | done | |
14605 | ||
14606 | if test $ac_cv_func_thrd_create = yes; then | |
14607 | LIBSTDTHREAD= | |
14608 | else | |
14609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5 | |
14610 | $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; } | |
14611 | if ${ac_cv_lib_stdthreads_thrd_create+:} false; then : | |
c0c3707f CB |
14612 | $as_echo_n "(cached) " >&6 |
14613 | else | |
14614 | ac_check_lib_save_LIBS=$LIBS | |
5df4cba6 | 14615 | LIBS="-lstdthreads $LIBS" |
c0c3707f CB |
14616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14617 | /* end confdefs.h. */ | |
6ec2e0f5 | 14618 | |
c0c3707f CB |
14619 | /* Override any GCC internal prototype to avoid an error. |
14620 | Use char because int might match the return type of a GCC | |
14621 | builtin and then its argument prototype would still apply. */ | |
14622 | #ifdef __cplusplus | |
14623 | extern "C" | |
14624 | #endif | |
5df4cba6 | 14625 | char thrd_create (); |
c0c3707f CB |
14626 | int |
14627 | main () | |
14628 | { | |
5df4cba6 | 14629 | return thrd_create (); |
6ec2e0f5 SDJ |
14630 | ; |
14631 | return 0; | |
14632 | } | |
14633 | _ACEOF | |
c0c3707f | 14634 | if ac_fn_c_try_link "$LINENO"; then : |
5df4cba6 | 14635 | ac_cv_lib_stdthreads_thrd_create=yes |
6ec2e0f5 | 14636 | else |
5df4cba6 | 14637 | ac_cv_lib_stdthreads_thrd_create=no |
6ec2e0f5 | 14638 | fi |
c0c3707f CB |
14639 | rm -f core conftest.err conftest.$ac_objext \ |
14640 | conftest$ac_exeext conftest.$ac_ext | |
14641 | LIBS=$ac_check_lib_save_LIBS | |
14642 | fi | |
5df4cba6 SM |
14643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5 |
14644 | $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; } | |
14645 | if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then : | |
6ec2e0f5 | 14646 | |
5df4cba6 | 14647 | LIBSTDTHREAD='-lstdthreads -lpthread' |
6ec2e0f5 | 14648 | |
5df4cba6 | 14649 | else |
6ec2e0f5 | 14650 | |
5df4cba6 | 14651 | LIBSTDTHREAD="$LIBPMULTITHREAD" |
6ec2e0f5 | 14652 | |
5df4cba6 | 14653 | fi |
6ec2e0f5 | 14654 | |
5df4cba6 | 14655 | fi |
c0c3707f | 14656 | else |
5df4cba6 SM |
14657 | LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD" |
14658 | fi | |
14659 | ;; | |
14660 | esac | |
c0c3707f | 14661 | |
c0c3707f | 14662 | |
5df4cba6 SM |
14663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5 |
14664 | $as_echo_n "checking whether ISO C threads API is available... " >&6; } | |
14665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5 | |
14666 | $as_echo "$ac_cv_header_threads_h" >&6; } | |
14667 | gl_stdthreadlib_body_done=done | |
14668 | fi | |
c0c3707f | 14669 | |
5df4cba6 SM |
14670 | LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD |
14671 | LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD | |
c0c3707f CB |
14672 | gl_threads_api=isoc |
14673 | ||
14674 | $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h | |
14675 | ||
14676 | fi | |
14677 | fi | |
14678 | if test $gl_threads_api = none; then | |
14679 | case "$gl_use_threads" in | |
14680 | yes | windows | win32) # The 'win32' is for backward compatibility. | |
14681 | if { case "$host_os" in | |
14682 | mingw*) true;; | |
14683 | *) false;; | |
14684 | esac | |
14685 | }; then | |
14686 | gl_threads_api=windows | |
14687 | ||
14688 | $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h | |
14689 | ||
14690 | fi | |
14691 | ;; | |
14692 | esac | |
14693 | fi | |
14694 | fi | |
14695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 | |
14696 | $as_echo_n "checking for multithread API to use... " >&6; } | |
14697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 | |
14698 | $as_echo "$gl_threads_api" >&6; } | |
14699 | ||
14700 | ||
14701 | ||
14702 | ||
14703 | ||
14704 | ||
14705 | ||
14706 | ||
14707 | ||
14708 | ||
14709 | ||
14710 | ||
14711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 | |
14712 | $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } | |
14713 | if ${gl_cv_func_malloc_posix+:} false; then : | |
6ec2e0f5 SDJ |
14714 | $as_echo_n "(cached) " >&6 |
14715 | else | |
c0c3707f CB |
14716 | |
14717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 14718 | /* end confdefs.h. */ |
c0c3707f | 14719 | |
6ec2e0f5 SDJ |
14720 | int |
14721 | main () | |
14722 | { | |
c0c3707f CB |
14723 | #if defined _WIN32 && ! defined __CYGWIN__ |
14724 | choke me | |
14725 | #endif | |
6ec2e0f5 SDJ |
14726 | |
14727 | ; | |
14728 | return 0; | |
14729 | } | |
14730 | _ACEOF | |
14731 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 14732 | gl_cv_func_malloc_posix=yes |
6ec2e0f5 | 14733 | else |
c0c3707f | 14734 | gl_cv_func_malloc_posix=no |
6ec2e0f5 SDJ |
14735 | fi |
14736 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
472fa5ee | 14737 | |
c0c3707f CB |
14738 | fi |
14739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 | |
14740 | $as_echo "$gl_cv_func_malloc_posix" >&6; } | |
472fa5ee SM |
14741 | |
14742 | ||
6ec2e0f5 | 14743 | |
c0c3707f CB |
14744 | for ac_header in stdlib.h |
14745 | do : | |
14746 | ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" | |
14747 | if test "x$ac_cv_header_stdlib_h" = xyes; then : | |
14748 | cat >>confdefs.h <<_ACEOF | |
14749 | #define HAVE_STDLIB_H 1 | |
6ec2e0f5 SDJ |
14750 | _ACEOF |
14751 | ||
c0c3707f | 14752 | fi |
6ec2e0f5 | 14753 | |
c0c3707f | 14754 | done |
472fa5ee | 14755 | |
c0c3707f CB |
14756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 |
14757 | $as_echo_n "checking for GNU libc compatible malloc... " >&6; } | |
14758 | if ${ac_cv_func_malloc_0_nonnull+:} false; then : | |
6ec2e0f5 SDJ |
14759 | $as_echo_n "(cached) " >&6 |
14760 | else | |
14761 | if test "$cross_compiling" = yes; then : | |
14762 | case "$host_os" in | |
c0c3707f CB |
14763 | # Guess yes on platforms where we know the result. |
14764 | *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ | |
14765 | | hpux* | solaris* | cygwin* | mingw*) | |
14766 | ac_cv_func_malloc_0_nonnull="guessing yes" ;; | |
14767 | # If we don't know, obey --enable-cross-guesses. | |
14768 | *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; | |
14769 | esac | |
6ec2e0f5 SDJ |
14770 | |
14771 | else | |
14772 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14773 | /* end confdefs.h. */ | |
c0c3707f CB |
14774 | #if defined STDC_HEADERS || defined HAVE_STDLIB_H |
14775 | # include <stdlib.h> | |
14776 | #else | |
14777 | char *malloc (); | |
14778 | #endif | |
6ec2e0f5 SDJ |
14779 | |
14780 | int | |
14781 | main () | |
14782 | { | |
c0c3707f CB |
14783 | char *p = malloc (0); |
14784 | int result = !p; | |
14785 | free (p); | |
14786 | return result; | |
6ec2e0f5 SDJ |
14787 | ; |
14788 | return 0; | |
698be2d8 CB |
14789 | } |
14790 | ||
14791 | _ACEOF | |
14792 | if ac_fn_c_try_run "$LINENO"; then : | |
14793 | ac_cv_func_malloc_0_nonnull=yes | |
14794 | else | |
14795 | ac_cv_func_malloc_0_nonnull=no | |
14796 | fi | |
14797 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
14798 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
14799 | fi | |
14800 | ||
14801 | ||
14802 | fi | |
14803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 | |
14804 | $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } | |
14805 | case "$ac_cv_func_malloc_0_nonnull" in | |
14806 | *yes) | |
14807 | gl_cv_func_malloc_0_nonnull=1 | |
14808 | ;; | |
14809 | *) | |
14810 | gl_cv_func_malloc_0_nonnull=0 | |
14811 | ;; | |
14812 | esac | |
14813 | ||
14814 | ||
14815 | cat >>confdefs.h <<_ACEOF | |
14816 | #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull | |
14817 | _ACEOF | |
14818 | ||
14819 | ||
14820 | ||
c0c3707f CB |
14821 | |
14822 | ||
6ec2e0f5 SDJ |
14823 | |
14824 | ||
14825 | ||
14826 | ||
14827 | ||
14828 | ||
c0c3707f CB |
14829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 |
14830 | $as_echo_n "checking for a traditional japanese locale... " >&6; } | |
14831 | if ${gt_cv_locale_ja+:} false; then : | |
14832 | $as_echo_n "(cached) " >&6 | |
14833 | else | |
14834 | ||
14835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14836 | /* end confdefs.h. */ | |
6ec2e0f5 | 14837 | |
c0c3707f CB |
14838 | #include <locale.h> |
14839 | #include <time.h> | |
14840 | #if HAVE_LANGINFO_CODESET | |
14841 | # include <langinfo.h> | |
14842 | #endif | |
14843 | #include <stdlib.h> | |
14844 | #include <string.h> | |
14845 | struct tm t; | |
14846 | char buf[16]; | |
14847 | int main () | |
14848 | { | |
14849 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl | |
14850 | imitates locale dependent behaviour by looking at the environment | |
14851 | variables, and all locales use the UTF-8 encoding. */ | |
14852 | #if defined __BEOS__ || defined __HAIKU__ | |
14853 | return 1; | |
14854 | #else | |
14855 | /* Check whether the given locale name is recognized by the system. */ | |
14856 | # if defined _WIN32 && !defined __CYGWIN__ | |
14857 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
14858 | not at the environment variables. Also, when an encoding suffix such | |
14859 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
14860 | category of the locale to "C". */ | |
14861 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
14862 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
14863 | return 1; | |
14864 | # else | |
14865 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
14866 | # endif | |
14867 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
14868 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
14869 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
14870 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
14871 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
14872 | some unit tests fail. | |
14873 | On MirBSD 10, when an unsupported locale is specified, setlocale() | |
14874 | succeeds but then nl_langinfo(CODESET) is "UTF-8". */ | |
14875 | # if HAVE_LANGINFO_CODESET | |
14876 | { | |
14877 | const char *cs = nl_langinfo (CODESET); | |
14878 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 | |
14879 | || strcmp (cs, "UTF-8") == 0) | |
14880 | return 1; | |
14881 | } | |
14882 | # endif | |
14883 | # ifdef __CYGWIN__ | |
14884 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
14885 | locale_charset() function relies on the encoding suffix. Note that | |
14886 | LC_ALL is set on the command line. */ | |
14887 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
14888 | # endif | |
14889 | /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales | |
14890 | on Cygwin 1.5.x. */ | |
14891 | if (MB_CUR_MAX == 1) | |
14892 | return 1; | |
14893 | /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. | |
14894 | This excludes the UTF-8 encoding (except on MirBSD). */ | |
14895 | { | |
14896 | const char *p; | |
14897 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
14898 | if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; | |
14899 | for (p = buf; *p != '\0'; p++) | |
14900 | if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) | |
14901 | return 1; | |
14902 | } | |
14903 | return 0; | |
14904 | #endif | |
14905 | } | |
6ec2e0f5 | 14906 | |
c0c3707f CB |
14907 | _ACEOF |
14908 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | |
14909 | (eval $ac_link) 2>&5 | |
14910 | ac_status=$? | |
14911 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
14912 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
14913 | case "$host_os" in | |
14914 | # Handle native Windows specially, because there setlocale() interprets | |
14915 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
14916 | # "fr" or "fra" as "French" or "French_France.1252", | |
14917 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
14918 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
14919 | # and similar. | |
14920 | mingw*) | |
14921 | # Note that on native Windows, the Japanese locale is | |
14922 | # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we | |
14923 | # cannot use it here. | |
14924 | gt_cv_locale_ja=none | |
14925 | ;; | |
14926 | *) | |
14927 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
14928 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
14929 | # configure script would override the LC_ALL setting. Likewise for | |
14930 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
14931 | # Test for the AIX locale name. | |
14932 | if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
14933 | gt_cv_locale_ja=ja_JP | |
14934 | else | |
14935 | # Test for the locale name with explicit encoding suffix. | |
14936 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
14937 | gt_cv_locale_ja=ja_JP.EUC-JP | |
14938 | else | |
14939 | # Test for the HP-UX, OSF/1, NetBSD locale name. | |
14940 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
14941 | gt_cv_locale_ja=ja_JP.eucJP | |
14942 | else | |
14943 | # Test for the IRIX, FreeBSD locale name. | |
14944 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
14945 | gt_cv_locale_ja=ja_JP.EUC | |
14946 | else | |
14947 | # Test for the Solaris 7 locale name. | |
14948 | if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
14949 | gt_cv_locale_ja=ja | |
14950 | else | |
14951 | # Special test for NetBSD 1.6. | |
14952 | if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then | |
14953 | gt_cv_locale_ja=ja_JP.eucJP | |
14954 | else | |
14955 | # None found. | |
14956 | gt_cv_locale_ja=none | |
14957 | fi | |
14958 | fi | |
14959 | fi | |
14960 | fi | |
14961 | fi | |
14962 | fi | |
14963 | ;; | |
14964 | esac | |
14965 | fi | |
14966 | rm -fr conftest* | |
5abebf3c CB |
14967 | |
14968 | fi | |
c0c3707f CB |
14969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 |
14970 | $as_echo "$gt_cv_locale_ja" >&6; } | |
14971 | LOCALE_JA=$gt_cv_locale_ja | |
5abebf3c | 14972 | |
5abebf3c | 14973 | |
5abebf3c | 14974 | |
5abebf3c | 14975 | |
c0c3707f CB |
14976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 |
14977 | $as_echo_n "checking for a french Unicode locale... " >&6; } | |
14978 | if ${gt_cv_locale_fr_utf8+:} false; then : | |
5abebf3c CB |
14979 | $as_echo_n "(cached) " >&6 |
14980 | else | |
5abebf3c | 14981 | |
c0c3707f | 14982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 14983 | /* end confdefs.h. */ |
5abebf3c | 14984 | |
c0c3707f CB |
14985 | #include <locale.h> |
14986 | #include <time.h> | |
14987 | #if HAVE_LANGINFO_CODESET | |
14988 | # include <langinfo.h> | |
14989 | #endif | |
14990 | #include <stdlib.h> | |
14991 | #include <string.h> | |
14992 | struct tm t; | |
14993 | char buf[16]; | |
14994 | int main () { | |
14995 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl | |
14996 | imitates locale dependent behaviour by looking at the environment | |
14997 | variables, and all locales use the UTF-8 encoding. */ | |
14998 | #if !(defined __BEOS__ || defined __HAIKU__) | |
14999 | /* Check whether the given locale name is recognized by the system. */ | |
15000 | # if defined _WIN32 && !defined __CYGWIN__ | |
15001 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
15002 | not at the environment variables. Also, when an encoding suffix such | |
15003 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
15004 | category of the locale to "C". */ | |
15005 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
15006 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
15007 | return 1; | |
15008 | # else | |
15009 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
15010 | # endif | |
15011 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
15012 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
15013 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
15014 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
15015 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
15016 | some unit tests fail. */ | |
15017 | # if HAVE_LANGINFO_CODESET | |
15018 | { | |
15019 | const char *cs = nl_langinfo (CODESET); | |
15020 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) | |
15021 | return 1; | |
15022 | } | |
15023 | # endif | |
15024 | # ifdef __CYGWIN__ | |
15025 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
15026 | locale_charset() function relies on the encoding suffix. Note that | |
15027 | LC_ALL is set on the command line. */ | |
15028 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
15029 | # endif | |
15030 | /* Check whether in the abbreviation of the second month, the second | |
15031 | character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is | |
15032 | two bytes long, with UTF-8 encoding. */ | |
15033 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
15034 | if (strftime (buf, sizeof (buf), "%b", &t) < 4 | |
15035 | || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') | |
15036 | return 1; | |
15037 | #endif | |
15038 | #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ | |
15039 | /* Check whether the decimal separator is a comma. | |
15040 | On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point | |
15041 | are nl_langinfo(RADIXCHAR) are both ".". */ | |
15042 | if (localeconv () ->decimal_point[0] != ',') return 1; | |
15043 | #endif | |
5abebf3c CB |
15044 | return 0; |
15045 | } | |
5abebf3c | 15046 | |
c0c3707f CB |
15047 | _ACEOF |
15048 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | |
15049 | (eval $ac_link) 2>&5 | |
15050 | ac_status=$? | |
15051 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
15052 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
15053 | case "$host_os" in | |
15054 | # Handle native Windows specially, because there setlocale() interprets | |
15055 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
15056 | # "fr" or "fra" as "French" or "French_France.1252", | |
15057 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
15058 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
15059 | # and similar. | |
15060 | mingw*) | |
15061 | # Test for the hypothetical native Windows locale name. | |
15062 | if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15063 | gt_cv_locale_fr_utf8=French_France.65001 | |
15064 | else | |
15065 | # None found. | |
15066 | gt_cv_locale_fr_utf8=none | |
15067 | fi | |
15068 | ;; | |
15069 | *) | |
15070 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
15071 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
15072 | # configure script would override the LC_ALL setting. Likewise for | |
15073 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
15074 | # Test for the usual locale name. | |
15075 | if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15076 | gt_cv_locale_fr_utf8=fr_FR | |
15077 | else | |
15078 | # Test for the locale name with explicit encoding suffix. | |
15079 | if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15080 | gt_cv_locale_fr_utf8=fr_FR.UTF-8 | |
15081 | else | |
15082 | # Test for the Solaris 7 locale name. | |
15083 | if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15084 | gt_cv_locale_fr_utf8=fr.UTF-8 | |
15085 | else | |
15086 | # None found. | |
15087 | gt_cv_locale_fr_utf8=none | |
15088 | fi | |
15089 | fi | |
15090 | fi | |
15091 | ;; | |
15092 | esac | |
15093 | fi | |
15094 | rm -fr conftest* | |
5abebf3c CB |
15095 | |
15096 | fi | |
c0c3707f CB |
15097 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 |
15098 | $as_echo "$gt_cv_locale_fr_utf8" >&6; } | |
15099 | LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 | |
5abebf3c CB |
15100 | |
15101 | ||
15102 | ||
15103 | ||
15104 | ||
c0c3707f CB |
15105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 |
15106 | $as_echo_n "checking for a transitional chinese locale... " >&6; } | |
15107 | if ${gt_cv_locale_zh_CN+:} false; then : | |
5abebf3c CB |
15108 | $as_echo_n "(cached) " >&6 |
15109 | else | |
5abebf3c | 15110 | |
c0c3707f | 15111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 15112 | /* end confdefs.h. */ |
5abebf3c | 15113 | |
c0c3707f CB |
15114 | #include <locale.h> |
15115 | #include <stdlib.h> | |
15116 | #include <time.h> | |
15117 | #if HAVE_LANGINFO_CODESET | |
15118 | # include <langinfo.h> | |
15119 | #endif | |
15120 | #include <stdlib.h> | |
15121 | #include <string.h> | |
15122 | struct tm t; | |
15123 | char buf[16]; | |
15124 | int main () | |
5abebf3c | 15125 | { |
c0c3707f CB |
15126 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl |
15127 | imitates locale dependent behaviour by looking at the environment | |
15128 | variables, and all locales use the UTF-8 encoding. */ | |
15129 | #if defined __BEOS__ || defined __HAIKU__ | |
15130 | return 1; | |
15131 | #else | |
15132 | /* Check whether the given locale name is recognized by the system. */ | |
15133 | # if defined _WIN32 && !defined __CYGWIN__ | |
15134 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
15135 | not at the environment variables. Also, when an encoding suffix such | |
15136 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
15137 | category of the locale to "C". */ | |
15138 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
15139 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
15140 | return 1; | |
15141 | # else | |
15142 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
15143 | # endif | |
15144 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
15145 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
15146 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
15147 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
15148 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
15149 | some unit tests fail. | |
15150 | On MirBSD 10, when an unsupported locale is specified, setlocale() | |
15151 | succeeds but then nl_langinfo(CODESET) is "UTF-8". */ | |
15152 | # if HAVE_LANGINFO_CODESET | |
15153 | { | |
15154 | const char *cs = nl_langinfo (CODESET); | |
15155 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 | |
15156 | || strcmp (cs, "UTF-8") == 0) | |
15157 | return 1; | |
15158 | } | |
15159 | # endif | |
15160 | # ifdef __CYGWIN__ | |
15161 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
15162 | locale_charset() function relies on the encoding suffix. Note that | |
15163 | LC_ALL is set on the command line. */ | |
15164 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
15165 | # endif | |
15166 | /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. | |
15167 | This excludes the UTF-8 encoding (except on MirBSD). */ | |
15168 | { | |
15169 | const char *p; | |
15170 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
15171 | if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; | |
15172 | for (p = buf; *p != '\0'; p++) | |
15173 | if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) | |
15174 | return 1; | |
15175 | } | |
15176 | /* Check whether a typical GB18030 multibyte sequence is recognized as a | |
15177 | single wide character. This excludes the GB2312 and GBK encodings. */ | |
15178 | if (mblen ("\203\062\332\066", 5) != 4) | |
15179 | return 1; | |
5abebf3c | 15180 | return 0; |
c0c3707f | 15181 | #endif |
5abebf3c | 15182 | } |
c0c3707f | 15183 | |
5abebf3c | 15184 | _ACEOF |
c0c3707f CB |
15185 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
15186 | (eval $ac_link) 2>&5 | |
15187 | ac_status=$? | |
15188 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
15189 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
15190 | case "$host_os" in | |
15191 | # Handle native Windows specially, because there setlocale() interprets | |
15192 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
15193 | # "fr" or "fra" as "French" or "French_France.1252", | |
15194 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
15195 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
15196 | # and similar. | |
15197 | mingw*) | |
15198 | # Test for the hypothetical native Windows locale name. | |
15199 | if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15200 | gt_cv_locale_zh_CN=Chinese_China.54936 | |
15201 | else | |
15202 | # None found. | |
15203 | gt_cv_locale_zh_CN=none | |
15204 | fi | |
15205 | ;; | |
15206 | solaris2.8) | |
15207 | # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are | |
15208 | # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. | |
15209 | # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. | |
15210 | gt_cv_locale_zh_CN=none | |
15211 | ;; | |
15212 | *) | |
15213 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
15214 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
15215 | # configure script would override the LC_ALL setting. Likewise for | |
15216 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
15217 | # Test for the locale name without encoding suffix. | |
15218 | if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15219 | gt_cv_locale_zh_CN=zh_CN | |
15220 | else | |
15221 | # Test for the locale name with explicit encoding suffix. | |
15222 | if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15223 | gt_cv_locale_zh_CN=zh_CN.GB18030 | |
15224 | else | |
15225 | # None found. | |
15226 | gt_cv_locale_zh_CN=none | |
15227 | fi | |
15228 | fi | |
15229 | ;; | |
15230 | esac | |
15231 | else | |
15232 | # If there was a link error, due to mblen(), the system is so old that | |
15233 | # it certainly doesn't have a chinese locale. | |
15234 | gt_cv_locale_zh_CN=none | |
15235 | fi | |
15236 | rm -fr conftest* | |
15237 | ||
5abebf3c | 15238 | fi |
c0c3707f CB |
15239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 |
15240 | $as_echo "$gt_cv_locale_zh_CN" >&6; } | |
15241 | LOCALE_ZH_CN=$gt_cv_locale_zh_CN | |
15242 | ||
15243 | ||
15244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
15245 | $as_echo_n "checking for inline... " >&6; } | |
15246 | if ${ac_cv_c_inline+:} false; then : | |
15247 | $as_echo_n "(cached) " >&6 | |
15248 | else | |
15249 | ac_cv_c_inline=no | |
15250 | for ac_kw in inline __inline__ __inline; do | |
15251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15252 | /* end confdefs.h. */ | |
15253 | #ifndef __cplusplus | |
15254 | typedef int foo_t; | |
15255 | static $ac_kw foo_t static_foo () {return 0; } | |
15256 | $ac_kw foo_t foo () {return 0; } | |
15257 | #endif | |
5abebf3c | 15258 | |
c0c3707f CB |
15259 | _ACEOF |
15260 | if ac_fn_c_try_compile "$LINENO"; then : | |
15261 | ac_cv_c_inline=$ac_kw | |
15262 | fi | |
15263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15264 | test "$ac_cv_c_inline" != no && break | |
15265 | done | |
5abebf3c CB |
15266 | |
15267 | fi | |
c0c3707f CB |
15268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
15269 | $as_echo "$ac_cv_c_inline" >&6; } | |
5abebf3c | 15270 | |
c0c3707f CB |
15271 | case $ac_cv_c_inline in |
15272 | inline | yes) ;; | |
15273 | *) | |
15274 | case $ac_cv_c_inline in | |
15275 | no) ac_val=;; | |
15276 | *) ac_val=$ac_cv_c_inline;; | |
15277 | esac | |
15278 | cat >>confdefs.h <<_ACEOF | |
15279 | #ifndef __cplusplus | |
15280 | #define inline $ac_val | |
15281 | #endif | |
15282 | _ACEOF | |
15283 | ;; | |
15284 | esac | |
5abebf3c CB |
15285 | |
15286 | ||
15287 | ||
15288 | ||
5abebf3c CB |
15289 | |
15290 | ||
c0c3707f CB |
15291 | GNULIB_EXPLICIT_BZERO=0; |
15292 | GNULIB_FFSL=0; | |
15293 | GNULIB_FFSLL=0; | |
15294 | GNULIB_MEMCHR=0; | |
15295 | GNULIB_MEMMEM=0; | |
15296 | GNULIB_MEMPCPY=0; | |
15297 | GNULIB_MEMRCHR=0; | |
15298 | GNULIB_RAWMEMCHR=0; | |
15299 | GNULIB_STPCPY=0; | |
15300 | GNULIB_STPNCPY=0; | |
15301 | GNULIB_STRCHRNUL=0; | |
15302 | GNULIB_STRDUP=0; | |
15303 | GNULIB_STRNCAT=0; | |
15304 | GNULIB_STRNDUP=0; | |
15305 | GNULIB_STRNLEN=0; | |
15306 | GNULIB_STRPBRK=0; | |
15307 | GNULIB_STRSEP=0; | |
15308 | GNULIB_STRSTR=0; | |
15309 | GNULIB_STRCASESTR=0; | |
15310 | GNULIB_STRTOK_R=0; | |
15311 | GNULIB_MBSLEN=0; | |
15312 | GNULIB_MBSNLEN=0; | |
15313 | GNULIB_MBSCHR=0; | |
15314 | GNULIB_MBSRCHR=0; | |
15315 | GNULIB_MBSSTR=0; | |
15316 | GNULIB_MBSCASECMP=0; | |
15317 | GNULIB_MBSNCASECMP=0; | |
15318 | GNULIB_MBSPCASECMP=0; | |
15319 | GNULIB_MBSCASESTR=0; | |
15320 | GNULIB_MBSCSPN=0; | |
15321 | GNULIB_MBSPBRK=0; | |
15322 | GNULIB_MBSSPN=0; | |
15323 | GNULIB_MBSSEP=0; | |
15324 | GNULIB_MBSTOK_R=0; | |
15325 | GNULIB_STRERROR=0; | |
15326 | GNULIB_STRERROR_R=0; | |
15327 | GNULIB_STRSIGNAL=0; | |
15328 | GNULIB_STRVERSCMP=0; | |
15329 | HAVE_MBSLEN=0; | |
15330 | HAVE_EXPLICIT_BZERO=1; | |
15331 | HAVE_FFSL=1; | |
15332 | HAVE_FFSLL=1; | |
15333 | HAVE_MEMCHR=1; | |
15334 | HAVE_DECL_MEMMEM=1; | |
15335 | HAVE_MEMPCPY=1; | |
15336 | HAVE_DECL_MEMRCHR=1; | |
15337 | HAVE_RAWMEMCHR=1; | |
15338 | HAVE_STPCPY=1; | |
15339 | HAVE_STPNCPY=1; | |
15340 | HAVE_STRCHRNUL=1; | |
15341 | HAVE_DECL_STRDUP=1; | |
15342 | HAVE_DECL_STRNDUP=1; | |
15343 | HAVE_DECL_STRNLEN=1; | |
15344 | HAVE_STRPBRK=1; | |
15345 | HAVE_STRSEP=1; | |
15346 | HAVE_STRCASESTR=1; | |
15347 | HAVE_DECL_STRTOK_R=1; | |
15348 | HAVE_DECL_STRERROR_R=1; | |
15349 | HAVE_DECL_STRSIGNAL=1; | |
15350 | HAVE_STRVERSCMP=1; | |
15351 | REPLACE_MEMCHR=0; | |
15352 | REPLACE_MEMMEM=0; | |
15353 | REPLACE_STPNCPY=0; | |
15354 | REPLACE_STRCHRNUL=0; | |
15355 | REPLACE_STRDUP=0; | |
15356 | REPLACE_STRNCAT=0; | |
15357 | REPLACE_STRNDUP=0; | |
15358 | REPLACE_STRNLEN=0; | |
15359 | REPLACE_STRSTR=0; | |
15360 | REPLACE_STRCASESTR=0; | |
15361 | REPLACE_STRTOK_R=0; | |
15362 | REPLACE_STRERROR=0; | |
15363 | REPLACE_STRERROR_R=0; | |
15364 | REPLACE_STRSIGNAL=0; | |
15365 | UNDEFINE_STRTOK_R=0; | |
5abebf3c CB |
15366 | |
15367 | ||
15368 | ||
15369 | ||
6ec2e0f5 SDJ |
15370 | |
15371 | ||
c0c3707f CB |
15372 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it |
15373 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
15374 | # irrelevant for anonymous mappings. | |
15375 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
15376 | if test "x$ac_cv_func_mmap" = xyes; then : | |
15377 | gl_have_mmap=yes | |
6ec2e0f5 | 15378 | else |
c0c3707f CB |
15379 | gl_have_mmap=no |
15380 | fi | |
6ec2e0f5 SDJ |
15381 | |
15382 | ||
c0c3707f CB |
15383 | # Try to allow MAP_ANONYMOUS. |
15384 | gl_have_mmap_anonymous=no | |
15385 | if test $gl_have_mmap = yes; then | |
15386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
15387 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
15388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 15389 | /* end confdefs.h. */ |
6ec2e0f5 | 15390 | |
c0c3707f CB |
15391 | #include <sys/mman.h> |
15392 | #ifdef MAP_ANONYMOUS | |
15393 | I cannot identify this map | |
15394 | #endif | |
6ec2e0f5 | 15395 | |
c0c3707f CB |
15396 | _ACEOF |
15397 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15398 | $EGREP "I cannot identify this map" >/dev/null 2>&1; then : | |
15399 | gl_have_mmap_anonymous=yes | |
6ec2e0f5 | 15400 | fi |
c0c3707f | 15401 | rm -f conftest* |
6ec2e0f5 | 15402 | |
c0c3707f CB |
15403 | if test $gl_have_mmap_anonymous != yes; then |
15404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15405 | /* end confdefs.h. */ | |
6ec2e0f5 | 15406 | |
c0c3707f CB |
15407 | #include <sys/mman.h> |
15408 | #ifdef MAP_ANON | |
15409 | I cannot identify this map | |
15410 | #endif | |
6ec2e0f5 | 15411 | |
c0c3707f CB |
15412 | _ACEOF |
15413 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15414 | $EGREP "I cannot identify this map" >/dev/null 2>&1; then : | |
6ec2e0f5 | 15415 | |
c0c3707f | 15416 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h |
5e8754f9 | 15417 | |
c0c3707f | 15418 | gl_have_mmap_anonymous=yes |
5e8754f9 | 15419 | fi |
c0c3707f CB |
15420 | rm -f conftest* |
15421 | ||
15422 | fi | |
15423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
15424 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
15425 | if test $gl_have_mmap_anonymous = yes; then | |
6ec2e0f5 | 15426 | |
c0c3707f | 15427 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h |
6ec2e0f5 | 15428 | |
c0c3707f CB |
15429 | fi |
15430 | fi | |
6ec2e0f5 SDJ |
15431 | |
15432 | ||
15433 | ||
15434 | ||
6ec2e0f5 | 15435 | |
6ec2e0f5 | 15436 | |
c0c3707f CB |
15437 | if test $HAVE_MEMCHR = 1; then |
15438 | # Detect platform-specific bugs in some versions of glibc: | |
15439 | # memchr should not dereference anything with length 0 | |
15440 | # https://bugzilla.redhat.com/show_bug.cgi?id=499689 | |
15441 | # memchr should not dereference overestimated length after a match | |
15442 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
15443 | # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
15444 | # memchr should cast the second argument to 'unsigned char'. | |
15445 | # This bug exists in Android 4.3. | |
15446 | # Assume that memchr works on platforms that lack mprotect. | |
15447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
15448 | $as_echo_n "checking whether memchr works... " >&6; } | |
15449 | if ${gl_cv_func_memchr_works+:} false; then : | |
15450 | $as_echo_n "(cached) " >&6 | |
6ec2e0f5 | 15451 | else |
c0c3707f CB |
15452 | if test "$cross_compiling" = yes; then : |
15453 | case "$host_os" in | |
15454 | # Guess no on Android. | |
15455 | linux*-android*) gl_cv_func_memchr_works="guessing no" ;; | |
15456 | # Guess yes on native Windows. | |
15457 | mingw*) gl_cv_func_memchr_works="guessing yes" ;; | |
15458 | # If we don't know, obey --enable-cross-guesses. | |
15459 | *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;; | |
15460 | esac | |
6ec2e0f5 SDJ |
15461 | |
15462 | else | |
15463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15464 | /* end confdefs.h. */ | |
15465 | ||
c0c3707f CB |
15466 | #include <string.h> |
15467 | #if HAVE_SYS_MMAN_H | |
15468 | # include <fcntl.h> | |
15469 | # include <unistd.h> | |
15470 | # include <sys/types.h> | |
15471 | # include <sys/mman.h> | |
15472 | # ifndef MAP_FILE | |
15473 | # define MAP_FILE 0 | |
15474 | # endif | |
15475 | #endif | |
6ec2e0f5 SDJ |
15476 | |
15477 | int | |
15478 | main () | |
15479 | { | |
c0c3707f CB |
15480 | |
15481 | int result = 0; | |
15482 | char *fence = NULL; | |
15483 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
15484 | # if HAVE_MAP_ANONYMOUS | |
15485 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
15486 | const int fd = -1; | |
15487 | # else /* !HAVE_MAP_ANONYMOUS */ | |
15488 | const int flags = MAP_FILE | MAP_PRIVATE; | |
15489 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
15490 | if (fd >= 0) | |
15491 | # endif | |
15492 | { | |
15493 | int pagesize = getpagesize (); | |
15494 | char *two_pages = | |
15495 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
15496 | flags, fd, 0); | |
15497 | if (two_pages != (char *)(-1) | |
15498 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
15499 | fence = two_pages + pagesize; | |
15500 | } | |
15501 | #endif | |
15502 | if (fence) | |
15503 | { | |
15504 | if (memchr (fence, 0, 0)) | |
15505 | result |= 1; | |
15506 | strcpy (fence - 9, "12345678"); | |
15507 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
15508 | result |= 2; | |
15509 | if (memchr (fence - 1, 0, 3) != fence - 1) | |
15510 | result |= 4; | |
15511 | } | |
15512 | /* Test against bug on Android 4.3. */ | |
15513 | { | |
15514 | char input[3]; | |
15515 | input[0] = 'a'; | |
15516 | input[1] = 'b'; | |
15517 | input[2] = 'c'; | |
15518 | if (memchr (input, 0x789abc00 | 'b', 3) != input + 1) | |
15519 | result |= 8; | |
15520 | } | |
15521 | return result; | |
6ec2e0f5 SDJ |
15522 | |
15523 | ; | |
15524 | return 0; | |
15525 | } | |
15526 | _ACEOF | |
15527 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 15528 | gl_cv_func_memchr_works=yes |
6ec2e0f5 | 15529 | else |
c0c3707f | 15530 | gl_cv_func_memchr_works=no |
6ec2e0f5 SDJ |
15531 | fi |
15532 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15533 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15534 | fi | |
15535 | ||
15536 | ||
15537 | fi | |
c0c3707f CB |
15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 |
15539 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
15540 | case "$gl_cv_func_memchr_works" in | |
6ec2e0f5 | 15541 | *yes) ;; |
c0c3707f | 15542 | *) REPLACE_MEMCHR=1 ;; |
6ec2e0f5 SDJ |
15543 | esac |
15544 | fi | |
15545 | ||
c0c3707f CB |
15546 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
15547 | if test "x$ac_cv_have_decl_memmem" = xyes; then : | |
6ec2e0f5 SDJ |
15548 | ac_have_decl=1 |
15549 | else | |
15550 | ac_have_decl=0 | |
15551 | fi | |
15552 | ||
15553 | cat >>confdefs.h <<_ACEOF | |
c0c3707f | 15554 | #define HAVE_DECL_MEMMEM $ac_have_decl |
6ec2e0f5 SDJ |
15555 | _ACEOF |
15556 | ||
472fa5ee | 15557 | |
6ec2e0f5 SDJ |
15558 | |
15559 | ||
15560 | ||
c0c3707f CB |
15561 | for ac_func in memmem |
15562 | do : | |
15563 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
15564 | if test "x$ac_cv_func_memmem" = xyes; then : | |
15565 | cat >>confdefs.h <<_ACEOF | |
15566 | #define HAVE_MEMMEM 1 | |
15567 | _ACEOF | |
6ec2e0f5 | 15568 | |
c0c3707f CB |
15569 | fi |
15570 | done | |
6ec2e0f5 | 15571 | |
c0c3707f CB |
15572 | if test $ac_cv_func_memmem = yes; then |
15573 | HAVE_MEMMEM=1 | |
15574 | else | |
15575 | HAVE_MEMMEM=0 | |
15576 | fi | |
6ec2e0f5 | 15577 | |
c0c3707f CB |
15578 | if test $ac_cv_have_decl_memmem = no; then |
15579 | HAVE_DECL_MEMMEM=0 | |
15580 | else | |
15581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 | |
15582 | $as_echo_n "checking whether memmem works... " >&6; } | |
15583 | if ${gl_cv_func_memmem_works_always+:} false; then : | |
6ec2e0f5 SDJ |
15584 | $as_echo_n "(cached) " >&6 |
15585 | else | |
c0c3707f CB |
15586 | if test "$cross_compiling" = yes; then : |
15587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 15588 | /* end confdefs.h. */ |
472fa5ee | 15589 | |
c0c3707f CB |
15590 | #ifdef __GNU_LIBRARY__ |
15591 | #include <features.h> | |
15592 | #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ | |
15593 | || __GLIBC_MINOR__ > 12)) \ | |
15594 | || (__GLIBC__ > 2)) \ | |
15595 | || defined __UCLIBC__ | |
15596 | Lucky user | |
15597 | #endif | |
15598 | #elif defined __CYGWIN__ | |
15599 | #include <cygwin/version.h> | |
15600 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
15601 | Lucky user | |
15602 | #endif | |
15603 | #else | |
15604 | Lucky user | |
15605 | #endif | |
472fa5ee | 15606 | |
c0c3707f CB |
15607 | _ACEOF |
15608 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15609 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
15610 | gl_cv_func_memmem_works_always="guessing yes" | |
15611 | else | |
15612 | gl_cv_func_memmem_works_always="$gl_cross_guess_normal" | |
15613 | fi | |
15614 | rm -f conftest* | |
472fa5ee SM |
15615 | |
15616 | ||
6ec2e0f5 SDJ |
15617 | else |
15618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15619 | /* end confdefs.h. */ | |
c0c3707f CB |
15620 | |
15621 | #include <string.h> /* for memmem */ | |
15622 | #define P "_EF_BF_BD" | |
15623 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
15624 | #define NEEDLE P P P P P | |
6ec2e0f5 SDJ |
15625 | |
15626 | int | |
15627 | main () | |
15628 | { | |
c0c3707f | 15629 | |
698be2d8 CB |
15630 | int result = 0; |
15631 | if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) | |
15632 | result |= 1; | |
15633 | /* Check for empty needle behavior. */ | |
15634 | { | |
15635 | const char *haystack = "AAA"; | |
15636 | if (memmem (haystack, 3, (const char *) 1, 0) != haystack) | |
15637 | result |= 2; | |
15638 | } | |
15639 | return result; | |
15640 | ||
15641 | ; | |
15642 | return 0; | |
15643 | } | |
15644 | _ACEOF | |
15645 | if ac_fn_c_try_run "$LINENO"; then : | |
15646 | gl_cv_func_memmem_works_always=yes | |
15647 | else | |
15648 | gl_cv_func_memmem_works_always=no | |
15649 | fi | |
15650 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15651 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15652 | fi | |
15653 | ||
15654 | ||
15655 | fi | |
15656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 | |
15657 | $as_echo "$gl_cv_func_memmem_works_always" >&6; } | |
15658 | case "$gl_cv_func_memmem_works_always" in | |
15659 | *yes) ;; | |
15660 | *) | |
15661 | REPLACE_MEMMEM=1 | |
15662 | ;; | |
15663 | esac | |
15664 | fi | |
15665 | : | |
15666 | ||
15667 | ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" | |
15668 | if test "x$ac_cv_have_decl_memrchr" = xyes; then : | |
15669 | ac_have_decl=1 | |
15670 | else | |
15671 | ac_have_decl=0 | |
15672 | fi | |
15673 | ||
15674 | cat >>confdefs.h <<_ACEOF | |
15675 | #define HAVE_DECL_MEMRCHR $ac_have_decl | |
15676 | _ACEOF | |
15677 | ||
15678 | ||
15679 | ||
15680 | ||
15681 | ||
15682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5 | |
15683 | $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; } | |
15684 | if ${gl_cv_minmax_in_limits_h+:} false; then : | |
15685 | $as_echo_n "(cached) " >&6 | |
15686 | else | |
15687 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15688 | /* end confdefs.h. */ | |
15689 | #include <limits.h> | |
15690 | int x = MIN (42, 17); | |
15691 | int | |
15692 | main () | |
15693 | { | |
15694 | ||
15695 | ; | |
15696 | return 0; | |
15697 | } | |
15698 | _ACEOF | |
15699 | if ac_fn_c_try_compile "$LINENO"; then : | |
15700 | gl_cv_minmax_in_limits_h=yes | |
15701 | else | |
15702 | gl_cv_minmax_in_limits_h=no | |
15703 | fi | |
15704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15705 | fi | |
15706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 | |
15707 | $as_echo "$gl_cv_minmax_in_limits_h" >&6; } | |
15708 | if test $gl_cv_minmax_in_limits_h = yes; then | |
15709 | ||
15710 | $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h | |
15711 | ||
15712 | fi | |
15713 | ||
15714 | ||
15715 | ||
15716 | ||
15717 | ||
15718 | ||
15719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5 | |
15720 | $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; } | |
15721 | if ${gl_cv_minmax_in_sys_param_h+:} false; then : | |
15722 | $as_echo_n "(cached) " >&6 | |
15723 | else | |
15724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15725 | /* end confdefs.h. */ | |
15726 | #include <sys/param.h> | |
15727 | int x = MIN (42, 17); | |
15728 | int | |
15729 | main () | |
15730 | { | |
15731 | ||
6ec2e0f5 SDJ |
15732 | ; |
15733 | return 0; | |
15734 | } | |
15735 | _ACEOF | |
698be2d8 CB |
15736 | if ac_fn_c_try_compile "$LINENO"; then : |
15737 | gl_cv_minmax_in_sys_param_h=yes | |
6ec2e0f5 | 15738 | else |
698be2d8 | 15739 | gl_cv_minmax_in_sys_param_h=no |
6ec2e0f5 | 15740 | fi |
698be2d8 | 15741 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 15742 | fi |
698be2d8 CB |
15743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 |
15744 | $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; } | |
15745 | if test $gl_cv_minmax_in_sys_param_h = yes; then | |
6ec2e0f5 | 15746 | |
698be2d8 | 15747 | $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h |
c0c3707f | 15748 | |
c0c3707f | 15749 | fi |
c0c3707f | 15750 | |
c0c3707f | 15751 | |
698be2d8 | 15752 | |
c0c3707f CB |
15753 | |
15754 | ||
15755 | ||
15756 | ||
15757 | ||
15758 | ||
15759 | ||
15760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 | |
15761 | $as_echo_n "checking for O_CLOEXEC... " >&6; } | |
15762 | if ${gl_cv_macro_O_CLOEXEC+:} false; then : | |
6ec2e0f5 SDJ |
15763 | $as_echo_n "(cached) " >&6 |
15764 | else | |
15765 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15766 | /* end confdefs.h. */ | |
c0c3707f CB |
15767 | #include <fcntl.h> |
15768 | #ifndef O_CLOEXEC | |
15769 | choke me; | |
15770 | #endif | |
6ec2e0f5 SDJ |
15771 | |
15772 | int | |
15773 | main () | |
15774 | { | |
c0c3707f | 15775 | return O_CLOEXEC; |
6ec2e0f5 SDJ |
15776 | ; |
15777 | return 0; | |
15778 | } | |
15779 | _ACEOF | |
15780 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 15781 | gl_cv_macro_O_CLOEXEC=yes |
6ec2e0f5 | 15782 | else |
c0c3707f | 15783 | gl_cv_macro_O_CLOEXEC=no |
6ec2e0f5 SDJ |
15784 | fi |
15785 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15786 | fi | |
c0c3707f CB |
15787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5 |
15788 | $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; } | |
15789 | ||
15790 | ||
15791 | ||
15792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 | |
15793 | $as_echo_n "checking for promoted mode_t type... " >&6; } | |
15794 | if ${gl_cv_promoted_mode_t+:} false; then : | |
6ec2e0f5 SDJ |
15795 | $as_echo_n "(cached) " >&6 |
15796 | else | |
6ec2e0f5 | 15797 | |
c0c3707f CB |
15798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15799 | /* end confdefs.h. */ | |
15800 | #include <sys/types.h> | |
6ec2e0f5 SDJ |
15801 | int |
15802 | main () | |
15803 | { | |
c0c3707f | 15804 | typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; |
6ec2e0f5 SDJ |
15805 | ; |
15806 | return 0; | |
15807 | } | |
15808 | _ACEOF | |
15809 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 15810 | gl_cv_promoted_mode_t='int' |
6ec2e0f5 | 15811 | else |
c0c3707f | 15812 | gl_cv_promoted_mode_t='mode_t' |
6ec2e0f5 SDJ |
15813 | fi |
15814 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c0c3707f | 15815 | |
6ec2e0f5 | 15816 | fi |
c0c3707f CB |
15817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 |
15818 | $as_echo "$gl_cv_promoted_mode_t" >&6; } | |
6ec2e0f5 | 15819 | |
c0c3707f CB |
15820 | cat >>confdefs.h <<_ACEOF |
15821 | #define PROMOTED_MODE_T $gl_cv_promoted_mode_t | |
6ec2e0f5 | 15822 | _ACEOF |
c0c3707f CB |
15823 | |
15824 | ||
15825 | ||
15826 | ||
15827 | ||
15828 | GNULIB_DPRINTF=0; | |
15829 | GNULIB_FCLOSE=0; | |
15830 | GNULIB_FDOPEN=0; | |
15831 | GNULIB_FFLUSH=0; | |
15832 | GNULIB_FGETC=0; | |
15833 | GNULIB_FGETS=0; | |
15834 | GNULIB_FOPEN=0; | |
15835 | GNULIB_FPRINTF=0; | |
15836 | GNULIB_FPRINTF_POSIX=0; | |
15837 | GNULIB_FPURGE=0; | |
15838 | GNULIB_FPUTC=0; | |
15839 | GNULIB_FPUTS=0; | |
15840 | GNULIB_FREAD=0; | |
15841 | GNULIB_FREOPEN=0; | |
15842 | GNULIB_FSCANF=0; | |
15843 | GNULIB_FSEEK=0; | |
15844 | GNULIB_FSEEKO=0; | |
15845 | GNULIB_FTELL=0; | |
15846 | GNULIB_FTELLO=0; | |
15847 | GNULIB_FWRITE=0; | |
15848 | GNULIB_GETC=0; | |
15849 | GNULIB_GETCHAR=0; | |
15850 | GNULIB_GETDELIM=0; | |
15851 | GNULIB_GETLINE=0; | |
15852 | GNULIB_OBSTACK_PRINTF=0; | |
15853 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
15854 | GNULIB_PCLOSE=0; | |
15855 | GNULIB_PERROR=0; | |
15856 | GNULIB_POPEN=0; | |
15857 | GNULIB_PRINTF=0; | |
15858 | GNULIB_PRINTF_POSIX=0; | |
15859 | GNULIB_PUTC=0; | |
15860 | GNULIB_PUTCHAR=0; | |
15861 | GNULIB_PUTS=0; | |
15862 | GNULIB_REMOVE=0; | |
15863 | GNULIB_RENAME=0; | |
15864 | GNULIB_RENAMEAT=0; | |
15865 | GNULIB_SCANF=0; | |
15866 | GNULIB_SNPRINTF=0; | |
15867 | GNULIB_SPRINTF_POSIX=0; | |
15868 | GNULIB_STDIO_H_NONBLOCKING=0; | |
15869 | GNULIB_STDIO_H_SIGPIPE=0; | |
15870 | GNULIB_TMPFILE=0; | |
15871 | GNULIB_VASPRINTF=0; | |
15872 | GNULIB_VFSCANF=0; | |
15873 | GNULIB_VSCANF=0; | |
15874 | GNULIB_VDPRINTF=0; | |
15875 | GNULIB_VFPRINTF=0; | |
15876 | GNULIB_VFPRINTF_POSIX=0; | |
15877 | GNULIB_VPRINTF=0; | |
15878 | GNULIB_VPRINTF_POSIX=0; | |
15879 | GNULIB_VSNPRINTF=0; | |
15880 | GNULIB_VSPRINTF_POSIX=0; | |
15881 | HAVE_DECL_FPURGE=1; | |
15882 | HAVE_DECL_FSEEKO=1; | |
15883 | HAVE_DECL_FTELLO=1; | |
15884 | HAVE_DECL_GETDELIM=1; | |
15885 | HAVE_DECL_GETLINE=1; | |
15886 | HAVE_DECL_OBSTACK_PRINTF=1; | |
15887 | HAVE_DECL_SNPRINTF=1; | |
15888 | HAVE_DECL_VSNPRINTF=1; | |
15889 | HAVE_DPRINTF=1; | |
15890 | HAVE_FSEEKO=1; | |
15891 | HAVE_FTELLO=1; | |
15892 | HAVE_PCLOSE=1; | |
15893 | HAVE_POPEN=1; | |
15894 | HAVE_RENAMEAT=1; | |
15895 | HAVE_VASPRINTF=1; | |
15896 | HAVE_VDPRINTF=1; | |
15897 | REPLACE_DPRINTF=0; | |
15898 | REPLACE_FCLOSE=0; | |
15899 | REPLACE_FDOPEN=0; | |
15900 | REPLACE_FFLUSH=0; | |
15901 | REPLACE_FOPEN=0; | |
15902 | REPLACE_FPRINTF=0; | |
15903 | REPLACE_FPURGE=0; | |
15904 | REPLACE_FREOPEN=0; | |
15905 | REPLACE_FSEEK=0; | |
15906 | REPLACE_FSEEKO=0; | |
15907 | REPLACE_FTELL=0; | |
15908 | REPLACE_FTELLO=0; | |
15909 | REPLACE_GETDELIM=0; | |
15910 | REPLACE_GETLINE=0; | |
15911 | REPLACE_OBSTACK_PRINTF=0; | |
15912 | REPLACE_PERROR=0; | |
15913 | REPLACE_POPEN=0; | |
15914 | REPLACE_PRINTF=0; | |
15915 | REPLACE_REMOVE=0; | |
15916 | REPLACE_RENAME=0; | |
15917 | REPLACE_RENAMEAT=0; | |
15918 | REPLACE_SNPRINTF=0; | |
15919 | REPLACE_SPRINTF=0; | |
15920 | REPLACE_STDIO_READ_FUNCS=0; | |
15921 | REPLACE_STDIO_WRITE_FUNCS=0; | |
15922 | REPLACE_TMPFILE=0; | |
15923 | REPLACE_VASPRINTF=0; | |
15924 | REPLACE_VDPRINTF=0; | |
15925 | REPLACE_VFPRINTF=0; | |
15926 | REPLACE_VPRINTF=0; | |
15927 | REPLACE_VSNPRINTF=0; | |
15928 | REPLACE_VSPRINTF=0; | |
15929 | ||
15930 | ||
15931 | ||
15932 | ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" | |
15933 | if test "x$ac_cv_have_decl_setenv" = xyes; then : | |
15934 | ac_have_decl=1 | |
6ec2e0f5 | 15935 | else |
c0c3707f | 15936 | ac_have_decl=0 |
6ec2e0f5 | 15937 | fi |
c0c3707f CB |
15938 | |
15939 | cat >>confdefs.h <<_ACEOF | |
15940 | #define HAVE_DECL_SETENV $ac_have_decl | |
15941 | _ACEOF | |
15942 | ||
15943 | ||
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | if test $ac_cv_have_decl_setenv = no; then | |
15949 | HAVE_DECL_SETENV=0 | |
6ec2e0f5 SDJ |
15950 | fi |
15951 | ||
15952 | ||
15953 | ||
15954 | ||
15955 | ||
c0c3707f CB |
15956 | for ac_header in search.h |
15957 | do : | |
15958 | ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" | |
15959 | if test "x$ac_cv_header_search_h" = xyes; then : | |
15960 | cat >>confdefs.h <<_ACEOF | |
15961 | #define HAVE_SEARCH_H 1 | |
15962 | _ACEOF | |
6ec2e0f5 | 15963 | |
c0c3707f | 15964 | fi |
6ec2e0f5 | 15965 | |
c0c3707f | 15966 | done |
6ec2e0f5 | 15967 | |
c0c3707f CB |
15968 | for ac_func in tsearch |
15969 | do : | |
15970 | ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" | |
15971 | if test "x$ac_cv_func_tsearch" = xyes; then : | |
15972 | cat >>confdefs.h <<_ACEOF | |
15973 | #define HAVE_TSEARCH 1 | |
15974 | _ACEOF | |
6ec2e0f5 | 15975 | |
c0c3707f CB |
15976 | fi |
15977 | done | |
6ec2e0f5 SDJ |
15978 | |
15979 | ||
15980 | ||
15981 | ||
c0c3707f CB |
15982 | GNULIB_PTHREAD_SIGMASK=0; |
15983 | GNULIB_RAISE=0; | |
15984 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
15985 | GNULIB_SIGPROCMASK=0; | |
15986 | GNULIB_SIGACTION=0; | |
15987 | HAVE_POSIX_SIGNALBLOCKING=1; | |
15988 | HAVE_PTHREAD_SIGMASK=1; | |
15989 | HAVE_RAISE=1; | |
15990 | HAVE_SIGSET_T=1; | |
15991 | HAVE_SIGINFO_T=1; | |
15992 | HAVE_SIGACTION=1; | |
15993 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
6ec2e0f5 | 15994 | |
c0c3707f | 15995 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; |
6ec2e0f5 | 15996 | |
c0c3707f CB |
15997 | HAVE_SIGHANDLER_T=1; |
15998 | REPLACE_PTHREAD_SIGMASK=0; | |
15999 | REPLACE_RAISE=0; | |
6ec2e0f5 | 16000 | |
6ec2e0f5 | 16001 | |
c0c3707f CB |
16002 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
16003 | #include <signal.h> | |
16004 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
16005 | #include <sys/types.h> | |
16006 | ||
16007 | " | |
16008 | if test "x$ac_cv_type_sigset_t" = xyes; then : | |
16009 | ||
16010 | cat >>confdefs.h <<_ACEOF | |
16011 | #define HAVE_SIGSET_T 1 | |
16012 | _ACEOF | |
16013 | ||
16014 | gl_cv_type_sigset_t=yes | |
16015 | else | |
16016 | gl_cv_type_sigset_t=no | |
16017 | fi | |
6ec2e0f5 | 16018 | |
c0c3707f CB |
16019 | if test $gl_cv_type_sigset_t != yes; then |
16020 | HAVE_SIGSET_T=0 | |
16021 | fi | |
6ec2e0f5 | 16022 | |
c0c3707f CB |
16023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 |
16024 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } | |
16025 | if ${ac_cv_type_uid_t+:} false; then : | |
16026 | $as_echo_n "(cached) " >&6 | |
16027 | else | |
6ec2e0f5 SDJ |
16028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16029 | /* end confdefs.h. */ | |
c0c3707f CB |
16030 | #include <sys/types.h> |
16031 | ||
6ec2e0f5 | 16032 | _ACEOF |
c0c3707f CB |
16033 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
16034 | $EGREP "uid_t" >/dev/null 2>&1; then : | |
16035 | ac_cv_type_uid_t=yes | |
16036 | else | |
16037 | ac_cv_type_uid_t=no | |
16038 | fi | |
16039 | rm -f conftest* | |
6ec2e0f5 | 16040 | |
c0c3707f CB |
16041 | fi |
16042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 | |
16043 | $as_echo "$ac_cv_type_uid_t" >&6; } | |
16044 | if test $ac_cv_type_uid_t = no; then | |
6ec2e0f5 | 16045 | |
c0c3707f | 16046 | $as_echo "#define uid_t int" >>confdefs.h |
6ec2e0f5 | 16047 | |
6ec2e0f5 | 16048 | |
c0c3707f | 16049 | $as_echo "#define gid_t int" >>confdefs.h |
6ec2e0f5 SDJ |
16050 | |
16051 | fi | |
6ec2e0f5 | 16052 | |
c0c3707f CB |
16053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
16054 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
16055 | if ${ac_cv_header_stdbool_h+:} false; then : | |
16056 | $as_echo_n "(cached) " >&6 | |
16057 | else | |
16058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16059 | /* end confdefs.h. */ | |
16060 | ||
16061 | #include <stdbool.h> | |
16062 | ||
16063 | #ifdef __cplusplus | |
16064 | typedef bool Bool; | |
16065 | #else | |
16066 | typedef _Bool Bool; | |
16067 | #ifndef bool | |
16068 | "error: bool is not defined" | |
16069 | #endif | |
16070 | #ifndef false | |
16071 | "error: false is not defined" | |
16072 | #endif | |
16073 | #if false | |
16074 | "error: false is not 0" | |
16075 | #endif | |
16076 | #ifndef true | |
16077 | "error: true is not defined" | |
16078 | #endif | |
16079 | #if true != 1 | |
16080 | "error: true is not 1" | |
16081 | #endif | |
16082 | #endif | |
16083 | ||
16084 | #ifndef __bool_true_false_are_defined | |
16085 | "error: __bool_true_false_are_defined is not defined" | |
16086 | #endif | |
16087 | ||
16088 | struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; | |
16089 | ||
16090 | char a[true == 1 ? 1 : -1]; | |
16091 | char b[false == 0 ? 1 : -1]; | |
16092 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
16093 | char d[(bool) 0.5 == true ? 1 : -1]; | |
16094 | /* See body of main program for 'e'. */ | |
16095 | char f[(Bool) 0.0 == false ? 1 : -1]; | |
16096 | char g[true]; | |
16097 | char h[sizeof (Bool)]; | |
16098 | char i[sizeof s.t]; | |
16099 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
16100 | /* The following fails for | |
16101 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
16102 | Bool n[m]; | |
16103 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
16104 | char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
16105 | /* Catch a bug in an HP-UX C compiler. See | |
16106 | https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
16107 | https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html | |
16108 | */ | |
16109 | Bool q = true; | |
16110 | Bool *pq = &q; | |
16111 | bool *qq = &q; | |
6ec2e0f5 | 16112 | |
c0c3707f CB |
16113 | int |
16114 | main () | |
16115 | { | |
6ec2e0f5 | 16116 | |
c0c3707f CB |
16117 | bool e = &s; |
16118 | *pq |= q; *pq |= ! q; | |
16119 | *qq |= q; *qq |= ! q; | |
16120 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
16121 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
16122 | + !m + !n + !o + !p + !q + !pq + !qq); | |
6ec2e0f5 | 16123 | |
c0c3707f CB |
16124 | ; |
16125 | return 0; | |
16126 | } | |
16127 | _ACEOF | |
16128 | if ac_fn_c_try_compile "$LINENO"; then : | |
16129 | ac_cv_header_stdbool_h=yes | |
16130 | else | |
16131 | ac_cv_header_stdbool_h=no | |
16132 | fi | |
16133 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16134 | fi | |
16135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
16136 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
16137 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
16138 | if test "x$ac_cv_type__Bool" = xyes; then : | |
6ec2e0f5 | 16139 | |
c0c3707f CB |
16140 | cat >>confdefs.h <<_ACEOF |
16141 | #define HAVE__BOOL 1 | |
16142 | _ACEOF | |
6ec2e0f5 SDJ |
16143 | |
16144 | ||
c0c3707f | 16145 | fi |
6ec2e0f5 SDJ |
16146 | |
16147 | ||
472fa5ee | 16148 | |
f8e27d88 | 16149 | |
c0c3707f CB |
16150 | ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" |
16151 | if test "x$ac_cv_have_decl_strdup" = xyes; then : | |
6ec2e0f5 SDJ |
16152 | ac_have_decl=1 |
16153 | else | |
16154 | ac_have_decl=0 | |
16155 | fi | |
16156 | ||
16157 | cat >>confdefs.h <<_ACEOF | |
c0c3707f | 16158 | #define HAVE_DECL_STRDUP $ac_have_decl |
6ec2e0f5 SDJ |
16159 | _ACEOF |
16160 | ||
16161 | ||
c0c3707f CB |
16162 | REPLACE_STRERROR_0=0 |
16163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 | |
16164 | $as_echo_n "checking whether strerror(0) succeeds... " >&6; } | |
16165 | if ${gl_cv_func_strerror_0_works+:} false; then : | |
6ec2e0f5 SDJ |
16166 | $as_echo_n "(cached) " >&6 |
16167 | else | |
c0c3707f CB |
16168 | if test "$cross_compiling" = yes; then : |
16169 | case "$host_os" in | |
16170 | # Guess yes on glibc systems. | |
16171 | *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16172 | # Guess yes on musl systems. | |
16173 | *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16174 | # Guess yes on native Windows. | |
16175 | mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16176 | # If we don't know, obey --enable-cross-guesses. | |
16177 | *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; | |
16178 | esac | |
6ec2e0f5 | 16179 | |
5e8754f9 SDJ |
16180 | else |
16181 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16182 | /* end confdefs.h. */ | |
c0c3707f CB |
16183 | #include <string.h> |
16184 | #include <errno.h> | |
6ec2e0f5 | 16185 | |
5e8754f9 SDJ |
16186 | int |
16187 | main () | |
16188 | { | |
c0c3707f CB |
16189 | int result = 0; |
16190 | char *str; | |
16191 | errno = 0; | |
16192 | str = strerror (0); | |
16193 | if (!*str) result |= 1; | |
16194 | if (errno) result |= 2; | |
16195 | if (strstr (str, "nknown") || strstr (str, "ndefined")) | |
16196 | result |= 4; | |
16197 | return result; | |
5e8754f9 SDJ |
16198 | ; |
16199 | return 0; | |
16200 | } | |
16201 | _ACEOF | |
c0c3707f CB |
16202 | if ac_fn_c_try_run "$LINENO"; then : |
16203 | gl_cv_func_strerror_0_works=yes | |
5e8754f9 | 16204 | else |
c0c3707f | 16205 | gl_cv_func_strerror_0_works=no |
5e8754f9 | 16206 | fi |
c0c3707f CB |
16207 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16208 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e8754f9 | 16209 | fi |
6ec2e0f5 | 16210 | |
6ec2e0f5 | 16211 | |
c0c3707f CB |
16212 | fi |
16213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 | |
16214 | $as_echo "$gl_cv_func_strerror_0_works" >&6; } | |
16215 | case "$gl_cv_func_strerror_0_works" in | |
16216 | *yes) ;; | |
16217 | *) | |
16218 | REPLACE_STRERROR_0=1 | |
6ec2e0f5 | 16219 | |
c0c3707f | 16220 | $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h |
6ec2e0f5 | 16221 | |
c0c3707f CB |
16222 | ;; |
16223 | esac | |
6ec2e0f5 SDJ |
16224 | |
16225 | ||
16226 | ||
16227 | ||
472fa5ee SM |
16228 | |
16229 | ||
16230 | ||
725e2999 | 16231 | |
725e2999 JB |
16232 | |
16233 | ||
c0c3707f CB |
16234 | if test $ac_cv_func_strerror_r = yes; then |
16235 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then | |
16236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 | |
16237 | $as_echo_n "checking for strerror_r with POSIX signature... " >&6; } | |
16238 | if ${gl_cv_func_strerror_r_posix_signature+:} false; then : | |
16239 | $as_echo_n "(cached) " >&6 | |
16240 | else | |
16241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16242 | /* end confdefs.h. */ | |
16243 | #include <string.h> | |
16244 | int strerror_r (int, char *, size_t); | |
725e2999 | 16245 | |
c0c3707f CB |
16246 | int |
16247 | main () | |
16248 | { | |
725e2999 | 16249 | |
c0c3707f CB |
16250 | ; |
16251 | return 0; | |
16252 | } | |
16253 | _ACEOF | |
16254 | if ac_fn_c_try_compile "$LINENO"; then : | |
16255 | gl_cv_func_strerror_r_posix_signature=yes | |
16256 | else | |
16257 | gl_cv_func_strerror_r_posix_signature=no | |
16258 | fi | |
16259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
725e2999 | 16260 | |
c0c3707f CB |
16261 | fi |
16262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 | |
16263 | $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } | |
16264 | if test $gl_cv_func_strerror_r_posix_signature = yes; then | |
16265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 | |
16266 | $as_echo_n "checking whether strerror_r works... " >&6; } | |
16267 | if ${gl_cv_func_strerror_r_works+:} false; then : | |
16268 | $as_echo_n "(cached) " >&6 | |
16269 | else | |
16270 | if test "$cross_compiling" = yes; then : | |
725e2999 | 16271 | |
c0c3707f CB |
16272 | case "$host_os" in |
16273 | # Guess no on AIX. | |
16274 | aix*) gl_cv_func_strerror_r_works="guessing no";; | |
16275 | # Guess no on HP-UX. | |
16276 | hpux*) gl_cv_func_strerror_r_works="guessing no";; | |
16277 | # Guess no on BSD variants. | |
16278 | *bsd*) gl_cv_func_strerror_r_works="guessing no";; | |
16279 | # Guess yes otherwise. | |
16280 | *) gl_cv_func_strerror_r_works="guessing yes";; | |
16281 | esac | |
725e2999 | 16282 | |
c0c3707f CB |
16283 | else |
16284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16285 | /* end confdefs.h. */ | |
16286 | #include <errno.h> | |
16287 | #include <string.h> | |
725e2999 | 16288 | |
c0c3707f CB |
16289 | int |
16290 | main () | |
16291 | { | |
16292 | int result = 0; | |
16293 | char buf[79]; | |
16294 | if (strerror_r (EACCES, buf, 0) < 0) | |
16295 | result |= 1; | |
16296 | errno = 0; | |
16297 | if (strerror_r (EACCES, buf, sizeof buf) != 0) | |
16298 | result |= 2; | |
16299 | strcpy (buf, "Unknown"); | |
16300 | if (strerror_r (0, buf, sizeof buf) != 0) | |
16301 | result |= 4; | |
16302 | if (errno) | |
16303 | result |= 8; | |
16304 | if (strstr (buf, "nknown") || strstr (buf, "ndefined")) | |
16305 | result |= 0x10; | |
16306 | errno = 0; | |
16307 | *buf = 0; | |
16308 | if (strerror_r (-3, buf, sizeof buf) < 0) | |
16309 | result |= 0x20; | |
16310 | if (errno) | |
16311 | result |= 0x40; | |
16312 | if (!*buf) | |
16313 | result |= 0x80; | |
16314 | return result; | |
725e2999 | 16315 | |
c0c3707f CB |
16316 | ; |
16317 | return 0; | |
16318 | } | |
16319 | _ACEOF | |
16320 | if ac_fn_c_try_run "$LINENO"; then : | |
16321 | gl_cv_func_strerror_r_works=yes | |
16322 | else | |
16323 | gl_cv_func_strerror_r_works=no | |
16324 | fi | |
16325 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16326 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16327 | fi | |
725e2999 JB |
16328 | |
16329 | ||
c0c3707f CB |
16330 | fi |
16331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 | |
16332 | $as_echo "$gl_cv_func_strerror_r_works" >&6; } | |
16333 | else | |
725e2999 | 16334 | |
c0c3707f CB |
16335 | if test $ac_cv_func___xpg_strerror_r = yes; then |
16336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 | |
16337 | $as_echo_n "checking whether __xpg_strerror_r works... " >&6; } | |
16338 | if ${gl_cv_func_strerror_r_works+:} false; then : | |
725e2999 JB |
16339 | $as_echo_n "(cached) " >&6 |
16340 | else | |
c0c3707f CB |
16341 | if test "$cross_compiling" = yes; then : |
16342 | gl_cv_func_strerror_r_works="$gl_cross_guess_normal" | |
725e2999 | 16343 | |
c0c3707f CB |
16344 | else |
16345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
725e2999 | 16346 | /* end confdefs.h. */ |
c0c3707f CB |
16347 | #include <errno.h> |
16348 | #include <string.h> | |
16349 | extern | |
16350 | #ifdef __cplusplus | |
16351 | "C" | |
16352 | #endif | |
16353 | int __xpg_strerror_r(int, char *, size_t); | |
725e2999 | 16354 | |
c0c3707f CB |
16355 | int |
16356 | main () | |
16357 | { | |
16358 | int result = 0; | |
16359 | char buf[256] = "^"; | |
16360 | char copy[256]; | |
16361 | char *str = strerror (-1); | |
16362 | strcpy (copy, str); | |
16363 | if (__xpg_strerror_r (-2, buf, 1) == 0) | |
16364 | result |= 1; | |
16365 | if (*buf) | |
16366 | result |= 2; | |
16367 | __xpg_strerror_r (-2, buf, 256); | |
16368 | if (strcmp (str, copy)) | |
16369 | result |= 4; | |
16370 | return result; | |
725e2999 | 16371 | |
c0c3707f CB |
16372 | ; |
16373 | return 0; | |
16374 | } | |
725e2999 | 16375 | _ACEOF |
c0c3707f CB |
16376 | if ac_fn_c_try_run "$LINENO"; then : |
16377 | gl_cv_func_strerror_r_works=yes | |
725e2999 | 16378 | else |
c0c3707f | 16379 | gl_cv_func_strerror_r_works=no |
725e2999 | 16380 | fi |
c0c3707f CB |
16381 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16382 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
725e2999 | 16383 | fi |
725e2999 | 16384 | |
725e2999 | 16385 | |
c0c3707f CB |
16386 | fi |
16387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 | |
16388 | $as_echo "$gl_cv_func_strerror_r_works" >&6; } | |
16389 | fi | |
16390 | fi | |
725e2999 | 16391 | fi |
725e2999 JB |
16392 | fi |
16393 | ||
c0c3707f CB |
16394 | ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" |
16395 | if test "x$ac_cv_have_decl_strerror_r" = xyes; then : | |
16396 | ac_have_decl=1 | |
725e2999 | 16397 | else |
c0c3707f | 16398 | ac_have_decl=0 |
725e2999 JB |
16399 | fi |
16400 | ||
c0c3707f CB |
16401 | cat >>confdefs.h <<_ACEOF |
16402 | #define HAVE_DECL_STRERROR_R $ac_have_decl | |
16403 | _ACEOF | |
725e2999 JB |
16404 | |
16405 | ||
16406 | ||
16407 | ||
16408 | ||
725e2999 JB |
16409 | |
16410 | ||
16411 | ||
725e2999 JB |
16412 | |
16413 | ||
16414 | ||
16415 | ||
16416 | ||
16417 | ||
16418 | ||
725e2999 | 16419 | if test $gl_cv_have_include_next = yes; then |
c0c3707f | 16420 | gl_cv_next_string_h='<'string.h'>' |
725e2999 | 16421 | else |
c0c3707f CB |
16422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 |
16423 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
16424 | if ${gl_cv_next_string_h+:} false; then : | |
725e2999 JB |
16425 | $as_echo_n "(cached) " >&6 |
16426 | else | |
16427 | ||
725e2999 JB |
16428 | |
16429 | ||
16430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16431 | /* end confdefs.h. */ | |
c0c3707f | 16432 | #include <string.h> |
725e2999 JB |
16433 | _ACEOF |
16434 | case "$host_os" in | |
16435 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16436 | *) gl_absname_cpp="$ac_cpp" ;; | |
16437 | esac | |
16438 | ||
16439 | case "$host_os" in | |
16440 | mingw*) | |
16441 | gl_dirsep_regex='[/\\]' | |
16442 | ;; | |
16443 | *) | |
16444 | gl_dirsep_regex='\/' | |
16445 | ;; | |
16446 | esac | |
16447 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 16448 | gl_header_literal_regex=`echo 'string.h' \ |
725e2999 JB |
16449 | | sed -e "$gl_make_literal_regex_sed"` |
16450 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16451 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16452 | s|^/[^/]|//&| | |
16453 | p | |
16454 | q | |
16455 | }' | |
6ec2e0f5 | 16456 | |
c0c3707f | 16457 | gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
725e2999 | 16458 | sed -n "$gl_absolute_header_sed"` |
6ec2e0f5 | 16459 | |
c0c3707f CB |
16460 | gl_header=$gl_cv_absolute_string_h |
16461 | gl_cv_next_string_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
16462 | |
16463 | ||
725e2999 | 16464 | fi |
c0c3707f CB |
16465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 |
16466 | $as_echo "$gl_cv_next_string_h" >&6; } | |
725e2999 | 16467 | fi |
c0c3707f | 16468 | NEXT_STRING_H=$gl_cv_next_string_h |
6ec2e0f5 | 16469 | |
725e2999 JB |
16470 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16471 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 16472 | gl_next_as_first_directive='<'string.h'>' |
725e2999 JB |
16473 | else |
16474 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f | 16475 | gl_next_as_first_directive=$gl_cv_next_string_h |
725e2999 | 16476 | fi |
c0c3707f CB |
16477 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive |
16478 | ||
16479 | ||
16480 | ||
6ec2e0f5 SDJ |
16481 | |
16482 | ||
16483 | ||
16484 | ||
16485 | ||
6ec2e0f5 SDJ |
16486 | |
16487 | ||
6ec2e0f5 | 16488 | |
698be2d8 CB |
16489 | ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" |
16490 | if test "x$ac_cv_have_decl_strnlen" = xyes; then : | |
16491 | ac_have_decl=1 | |
16492 | else | |
16493 | ac_have_decl=0 | |
16494 | fi | |
16495 | ||
16496 | cat >>confdefs.h <<_ACEOF | |
16497 | #define HAVE_DECL_STRNLEN $ac_have_decl | |
16498 | _ACEOF | |
16499 | ||
16500 | ||
16501 | ||
c0c3707f CB |
16502 | |
16503 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
16504 | REPLACE_STRSTR=1 | |
16505 | else | |
16506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 | |
16507 | $as_echo_n "checking whether strstr works... " >&6; } | |
16508 | if ${gl_cv_func_strstr_works_always+:} false; then : | |
6ec2e0f5 SDJ |
16509 | $as_echo_n "(cached) " >&6 |
16510 | else | |
c0c3707f CB |
16511 | if test "$cross_compiling" = yes; then : |
16512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 SDJ |
16513 | /* end confdefs.h. */ |
16514 | ||
c0c3707f CB |
16515 | #ifdef __GNU_LIBRARY__ |
16516 | #include <features.h> | |
16517 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ | |
16518 | || defined __UCLIBC__ | |
16519 | Lucky user | |
16520 | #endif | |
16521 | #elif defined __CYGWIN__ | |
16522 | #include <cygwin/version.h> | |
16523 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
16524 | Lucky user | |
16525 | #endif | |
16526 | #else | |
16527 | Lucky user | |
6ec2e0f5 | 16528 | #endif |
c0c3707f CB |
16529 | |
16530 | _ACEOF | |
16531 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
16532 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
16533 | gl_cv_func_strstr_works_always="guessing yes" | |
16534 | else | |
16535 | gl_cv_func_strstr_works_always="$gl_cross_guess_normal" | |
16536 | fi | |
16537 | rm -f conftest* | |
16538 | ||
16539 | ||
16540 | else | |
16541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16542 | /* end confdefs.h. */ | |
16543 | ||
16544 | #include <string.h> /* for strstr */ | |
16545 | #ifdef __GNU_LIBRARY__ | |
16546 | #include <features.h> | |
16547 | #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 | |
16548 | Unlucky user | |
16549 | #endif | |
725e2999 | 16550 | #endif |
c0c3707f CB |
16551 | #define P "_EF_BF_BD" |
16552 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
16553 | #define NEEDLE P P P P P | |
6ec2e0f5 | 16554 | |
725e2999 JB |
16555 | int |
16556 | main () | |
16557 | { | |
c0c3707f CB |
16558 | return !!strstr (HAYSTACK, NEEDLE); |
16559 | ||
725e2999 JB |
16560 | ; |
16561 | return 0; | |
16562 | } | |
6ec2e0f5 | 16563 | _ACEOF |
c0c3707f CB |
16564 | if ac_fn_c_try_run "$LINENO"; then : |
16565 | gl_cv_func_strstr_works_always=yes | |
6ec2e0f5 | 16566 | else |
c0c3707f | 16567 | gl_cv_func_strstr_works_always=no |
6ec2e0f5 | 16568 | fi |
c0c3707f CB |
16569 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16570 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6ec2e0f5 | 16571 | fi |
6ec2e0f5 SDJ |
16572 | |
16573 | ||
c0c3707f CB |
16574 | fi |
16575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 | |
16576 | $as_echo "$gl_cv_func_strstr_works_always" >&6; } | |
16577 | case "$gl_cv_func_strstr_works_always" in | |
16578 | *yes) ;; | |
16579 | *) | |
16580 | REPLACE_STRSTR=1 | |
16581 | ;; | |
16582 | esac | |
16583 | fi | |
6ec2e0f5 | 16584 | |
c0c3707f CB |
16585 | ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default" |
16586 | if test "x$ac_cv_have_decl_strtok_r" = xyes; then : | |
16587 | ac_have_decl=1 | |
16588 | else | |
16589 | ac_have_decl=0 | |
16590 | fi | |
6ec2e0f5 | 16591 | |
c0c3707f CB |
16592 | cat >>confdefs.h <<_ACEOF |
16593 | #define HAVE_DECL_STRTOK_R $ac_have_decl | |
16594 | _ACEOF | |
6ec2e0f5 SDJ |
16595 | |
16596 | ||
16597 | ||
16598 | ||
6ec2e0f5 SDJ |
16599 | |
16600 | ||
16601 | ||
16602 | ||
16603 | ||
16604 | ||
16605 | ||
698be2d8 CB |
16606 | |
16607 | ||
c0c3707f | 16608 | $as_echo "#define _USE_STD_STAT 1" >>confdefs.h |
6ec2e0f5 | 16609 | |
6ec2e0f5 SDJ |
16610 | |
16611 | ||
16612 | ||
16613 | ||
16614 | ||
6ec2e0f5 SDJ |
16615 | |
16616 | ||
16617 | ||
16618 | ||
16619 | ||
c0c3707f CB |
16620 | if test $gl_cv_have_include_next = yes; then |
16621 | gl_cv_next_sys_types_h='<'sys/types.h'>' | |
16622 | else | |
16623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5 | |
16624 | $as_echo_n "checking absolute name of <sys/types.h>... " >&6; } | |
16625 | if ${gl_cv_next_sys_types_h+:} false; then : | |
6ec2e0f5 SDJ |
16626 | $as_echo_n "(cached) " >&6 |
16627 | else | |
6ec2e0f5 | 16628 | |
6ec2e0f5 | 16629 | |
c0c3707f CB |
16630 | |
16631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16632 | /* end confdefs.h. */ | |
16633 | #include <sys/types.h> | |
6ec2e0f5 | 16634 | _ACEOF |
c0c3707f CB |
16635 | case "$host_os" in |
16636 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16637 | *) gl_absname_cpp="$ac_cpp" ;; | |
16638 | esac | |
6ec2e0f5 | 16639 | |
c0c3707f CB |
16640 | case "$host_os" in |
16641 | mingw*) | |
16642 | gl_dirsep_regex='[/\\]' | |
16643 | ;; | |
16644 | *) | |
16645 | gl_dirsep_regex='\/' | |
16646 | ;; | |
16647 | esac | |
16648 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
16649 | gl_header_literal_regex=`echo 'sys/types.h' \ | |
16650 | | sed -e "$gl_make_literal_regex_sed"` | |
16651 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16652 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16653 | s|^/[^/]|//&| | |
16654 | p | |
16655 | q | |
16656 | }' | |
6ec2e0f5 | 16657 | |
c0c3707f CB |
16658 | gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
16659 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 16660 | |
c0c3707f CB |
16661 | gl_header=$gl_cv_absolute_sys_types_h |
16662 | gl_cv_next_sys_types_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
16663 | |
16664 | ||
c0c3707f CB |
16665 | fi |
16666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 | |
16667 | $as_echo "$gl_cv_next_sys_types_h" >&6; } | |
16668 | fi | |
16669 | NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h | |
6ec2e0f5 | 16670 | |
c0c3707f CB |
16671 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16672 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16673 | gl_next_as_first_directive='<'sys/types.h'>' | |
16674 | else | |
16675 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
16676 | gl_next_as_first_directive=$gl_cv_next_sys_types_h | |
16677 | fi | |
16678 | NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive | |
6ec2e0f5 SDJ |
16679 | |
16680 | ||
16681 | ||
16682 | ||
6ec2e0f5 | 16683 | |
6ec2e0f5 SDJ |
16684 | |
16685 | ||
6ec2e0f5 SDJ |
16686 | |
16687 | ||
16688 | ||
16689 | ||
16690 | ||
c0c3707f | 16691 | WINDOWS_STAT_INODES=0 |
6ec2e0f5 SDJ |
16692 | |
16693 | ||
16694 | ||
16695 | ||
16696 | ||
472fa5ee SM |
16697 | |
16698 | ||
16699 | ||
16700 | ||
c0c3707f CB |
16701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
16702 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
16703 | if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : | |
16704 | $as_echo_n "(cached) " >&6 | |
16705 | else | |
16706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16707 | /* end confdefs.h. */ | |
16708 | #include <time.h> | |
472fa5ee | 16709 | |
c0c3707f CB |
16710 | int |
16711 | main () | |
16712 | { | |
16713 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
16714 | ; | |
16715 | return 0; | |
16716 | } | |
6ec2e0f5 | 16717 | _ACEOF |
c0c3707f CB |
16718 | if ac_fn_c_try_compile "$LINENO"; then : |
16719 | gl_cv_sys_struct_timespec_in_time_h=yes | |
16720 | else | |
16721 | gl_cv_sys_struct_timespec_in_time_h=no | |
6ec2e0f5 | 16722 | fi |
c0c3707f CB |
16723 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
16724 | fi | |
16725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
16726 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
6ec2e0f5 | 16727 | |
c0c3707f CB |
16728 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
16729 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
16730 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
16731 | UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 | |
16732 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
16733 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
6ec2e0f5 | 16734 | else |
c0c3707f CB |
16735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 |
16736 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
16737 | if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : | |
16738 | $as_echo_n "(cached) " >&6 | |
16739 | else | |
16740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16741 | /* end confdefs.h. */ | |
16742 | #include <sys/time.h> | |
472fa5ee | 16743 | |
c0c3707f CB |
16744 | int |
16745 | main () | |
16746 | { | |
16747 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
16748 | ; | |
16749 | return 0; | |
16750 | } | |
16751 | _ACEOF | |
16752 | if ac_fn_c_try_compile "$LINENO"; then : | |
16753 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
16754 | else | |
16755 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
16756 | fi | |
16757 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16758 | fi | |
16759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
16760 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
16761 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
16762 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
16763 | else | |
16764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
16765 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
16766 | if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : | |
16767 | $as_echo_n "(cached) " >&6 | |
16768 | else | |
16769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16770 | /* end confdefs.h. */ | |
16771 | #include <pthread.h> | |
472fa5ee | 16772 | |
c0c3707f CB |
16773 | int |
16774 | main () | |
16775 | { | |
16776 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
16777 | ; | |
16778 | return 0; | |
16779 | } | |
16780 | _ACEOF | |
16781 | if ac_fn_c_try_compile "$LINENO"; then : | |
16782 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
16783 | else | |
16784 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
16785 | fi | |
16786 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16787 | fi | |
16788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
16789 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
16790 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
16791 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
16792 | else | |
16793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5 | |
16794 | $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; } | |
16795 | if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then : | |
16796 | $as_echo_n "(cached) " >&6 | |
16797 | else | |
16798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16799 | /* end confdefs.h. */ | |
16800 | #include <unistd.h> | |
6ec2e0f5 | 16801 | |
c0c3707f CB |
16802 | int |
16803 | main () | |
16804 | { | |
16805 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
16806 | ; | |
16807 | return 0; | |
16808 | } | |
16809 | _ACEOF | |
16810 | if ac_fn_c_try_compile "$LINENO"; then : | |
16811 | gl_cv_sys_struct_timespec_in_unistd_h=yes | |
16812 | else | |
16813 | gl_cv_sys_struct_timespec_in_unistd_h=no | |
16814 | fi | |
16815 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16816 | fi | |
16817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 | |
16818 | $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } | |
16819 | if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then | |
16820 | UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 | |
16821 | fi | |
6ec2e0f5 SDJ |
16822 | fi |
16823 | fi | |
c0c3707f | 16824 | fi |
6ec2e0f5 SDJ |
16825 | |
16826 | ||
16827 | ||
16828 | ||
16829 | ||
16830 | ||
6ec2e0f5 | 16831 | |
6ec2e0f5 SDJ |
16832 | |
16833 | ||
16834 | ||
16835 | ||
16836 | ||
6ec2e0f5 SDJ |
16837 | |
16838 | ||
16839 | ||
16840 | ||
c0c3707f CB |
16841 | if test $gl_cv_have_include_next = yes; then |
16842 | gl_cv_next_time_h='<'time.h'>' | |
16843 | else | |
16844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
16845 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
16846 | if ${gl_cv_next_time_h+:} false; then : | |
16847 | $as_echo_n "(cached) " >&6 | |
16848 | else | |
6ec2e0f5 | 16849 | |
6ec2e0f5 SDJ |
16850 | |
16851 | ||
c0c3707f CB |
16852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16853 | /* end confdefs.h. */ | |
16854 | #include <time.h> | |
16855 | _ACEOF | |
16856 | case "$host_os" in | |
16857 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16858 | *) gl_absname_cpp="$ac_cpp" ;; | |
16859 | esac | |
6ec2e0f5 | 16860 | |
c0c3707f CB |
16861 | case "$host_os" in |
16862 | mingw*) | |
16863 | gl_dirsep_regex='[/\\]' | |
16864 | ;; | |
16865 | *) | |
16866 | gl_dirsep_regex='\/' | |
16867 | ;; | |
16868 | esac | |
16869 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
16870 | gl_header_literal_regex=`echo 'time.h' \ | |
16871 | | sed -e "$gl_make_literal_regex_sed"` | |
16872 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16873 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16874 | s|^/[^/]|//&| | |
16875 | p | |
16876 | q | |
16877 | }' | |
6ec2e0f5 | 16878 | |
c0c3707f CB |
16879 | gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
16880 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 16881 | |
c0c3707f CB |
16882 | gl_header=$gl_cv_absolute_time_h |
16883 | gl_cv_next_time_h='"'$gl_header'"' | |
6ec2e0f5 | 16884 | |
6ec2e0f5 SDJ |
16885 | |
16886 | fi | |
c0c3707f CB |
16887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 |
16888 | $as_echo "$gl_cv_next_time_h" >&6; } | |
16889 | fi | |
16890 | NEXT_TIME_H=$gl_cv_next_time_h | |
6ec2e0f5 | 16891 | |
c0c3707f CB |
16892 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16893 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16894 | gl_next_as_first_directive='<'time.h'>' | |
16895 | else | |
16896 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
16897 | gl_next_as_first_directive=$gl_cv_next_time_h | |
16898 | fi | |
16899 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
6ec2e0f5 | 16900 | |
472fa5ee SM |
16901 | |
16902 | ||
16903 | ||
16904 | ||
16905 | ||
6ec2e0f5 | 16906 | |
6ec2e0f5 | 16907 | |
6ec2e0f5 | 16908 | |
6ec2e0f5 | 16909 | |
698be2d8 CB |
16910 | |
16911 | ||
c0c3707f CB |
16912 | ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" |
16913 | if test "x$ac_cv_have_decl_unsetenv" = xyes; then : | |
16914 | ac_have_decl=1 | |
16915 | else | |
16916 | ac_have_decl=0 | |
16917 | fi | |
6ec2e0f5 | 16918 | |
c0c3707f CB |
16919 | cat >>confdefs.h <<_ACEOF |
16920 | #define HAVE_DECL_UNSETENV $ac_have_decl | |
16921 | _ACEOF | |
6ec2e0f5 SDJ |
16922 | |
16923 | ||
6ec2e0f5 SDJ |
16924 | |
16925 | ||
16926 | ||
c0c3707f CB |
16927 | if test $ac_cv_header_crtdefs_h = yes; then |
16928 | HAVE_CRTDEFS_H=1 | |
16929 | else | |
16930 | HAVE_CRTDEFS_H=0 | |
5e8754f9 | 16931 | fi |
5e8754f9 | 16932 | |
5e8754f9 | 16933 | |
5e8754f9 | 16934 | |
c0c3707f | 16935 | GNULIB_ISWBLANK=0; |
5df4cba6 SM |
16936 | GNULIB_ISWDIGIT=0; |
16937 | GNULIB_ISWXDIGIT=0; | |
c0c3707f CB |
16938 | GNULIB_WCTYPE=0; |
16939 | GNULIB_ISWCTYPE=0; | |
16940 | GNULIB_WCTRANS=0; | |
16941 | GNULIB_TOWCTRANS=0; | |
16942 | HAVE_ISWBLANK=1; | |
16943 | HAVE_WCTYPE_T=1; | |
16944 | HAVE_WCTRANS_T=1; | |
16945 | REPLACE_ISWBLANK=0; | |
5df4cba6 SM |
16946 | REPLACE_ISWDIGIT=0; |
16947 | REPLACE_ISWXDIGIT=0; | |
5e8754f9 | 16948 | |
5e8754f9 | 16949 | |
5e8754f9 | 16950 | |
5e8754f9 | 16951 | |
698be2d8 CB |
16952 | |
16953 | ||
16954 | ||
16955 | ||
c0c3707f CB |
16956 | if false; then |
16957 | GL_COND_LIBTOOL_TRUE= | |
16958 | GL_COND_LIBTOOL_FALSE='#' | |
16959 | else | |
16960 | GL_COND_LIBTOOL_TRUE='#' | |
16961 | GL_COND_LIBTOOL_FALSE= | |
16962 | fi | |
5e8754f9 | 16963 | |
c0c3707f CB |
16964 | gl_cond_libtool=false |
16965 | gl_libdeps= | |
16966 | gl_ltlibdeps= | |
16967 | gl_m4_base='import/m4' | |
5e8754f9 | 16968 | |
5e8754f9 SDJ |
16969 | |
16970 | ||
6ec2e0f5 | 16971 | |
6ec2e0f5 | 16972 | |
6ec2e0f5 | 16973 | |
6ec2e0f5 | 16974 | |
6ec2e0f5 | 16975 | |
6ec2e0f5 | 16976 | |
5df4cba6 | 16977 | |
c0c3707f CB |
16978 | gl_source_base='import' |
16979 | ||
6ec2e0f5 | 16980 | |
c0c3707f CB |
16981 | if test $ac_cv_func_alloca_works = no; then |
16982 | : | |
16983 | fi | |
6ec2e0f5 | 16984 | |
c0c3707f CB |
16985 | # Define an additional variable used in the Makefile substitution. |
16986 | if test $ac_cv_working_alloca_h = yes; then | |
16987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
16988 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
16989 | if ${gl_cv_rpl_alloca+:} false; then : | |
6ec2e0f5 SDJ |
16990 | $as_echo_n "(cached) " >&6 |
16991 | else | |
c0c3707f CB |
16992 | |
16993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 SDJ |
16994 | /* end confdefs.h. */ |
16995 | ||
c0c3707f CB |
16996 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
16997 | Need own alloca | |
16998 | #endif | |
6ec2e0f5 | 16999 | |
6ec2e0f5 | 17000 | _ACEOF |
c0c3707f CB |
17001 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
17002 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
17003 | gl_cv_rpl_alloca=yes | |
6ec2e0f5 | 17004 | else |
c0c3707f | 17005 | gl_cv_rpl_alloca=no |
6ec2e0f5 | 17006 | fi |
c0c3707f | 17007 | rm -f conftest* |
6ec2e0f5 SDJ |
17008 | |
17009 | ||
17010 | fi | |
c0c3707f CB |
17011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 |
17012 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
17013 | if test $gl_cv_rpl_alloca = yes; then | |
6ec2e0f5 | 17014 | |
c0c3707f | 17015 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
6ec2e0f5 | 17016 | |
c0c3707f CB |
17017 | ALLOCA_H=alloca.h |
17018 | else | |
17019 | ALLOCA_H= | |
17020 | fi | |
17021 | else | |
17022 | ALLOCA_H=alloca.h | |
17023 | fi | |
6ec2e0f5 | 17024 | |
c0c3707f CB |
17025 | if test -n "$ALLOCA_H"; then |
17026 | GL_GENERATE_ALLOCA_H_TRUE= | |
17027 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
17028 | else | |
17029 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
17030 | GL_GENERATE_ALLOCA_H_FALSE= | |
17031 | fi | |
6ec2e0f5 SDJ |
17032 | |
17033 | ||
c0c3707f CB |
17034 | if test $ac_cv_working_alloca_h = yes; then |
17035 | HAVE_ALLOCA_H=1 | |
17036 | else | |
17037 | HAVE_ALLOCA_H=0 | |
17038 | fi | |
6ec2e0f5 SDJ |
17039 | |
17040 | ||
17041 | ||
17042 | ||
17043 | ||
17044 | ||
c0c3707f CB |
17045 | if test $ac_cv_header_arpa_inet_h = yes; then |
17046 | HAVE_ARPA_INET_H=1 | |
17047 | else | |
17048 | HAVE_ARPA_INET_H=0 | |
17049 | fi | |
6ec2e0f5 SDJ |
17050 | |
17051 | ||
472fa5ee SM |
17052 | |
17053 | ||
17054 | ||
17055 | ||
17056 | ||
6ec2e0f5 SDJ |
17057 | |
17058 | ||
17059 | ||
17060 | if test $gl_cv_have_include_next = yes; then | |
c0c3707f | 17061 | gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' |
6ec2e0f5 | 17062 | else |
c0c3707f CB |
17063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5 |
17064 | $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; } | |
17065 | if ${gl_cv_next_arpa_inet_h+:} false; then : | |
6ec2e0f5 SDJ |
17066 | $as_echo_n "(cached) " >&6 |
17067 | else | |
17068 | ||
c0c3707f | 17069 | if test $ac_cv_header_arpa_inet_h = yes; then |
6ec2e0f5 SDJ |
17070 | |
17071 | ||
17072 | ||
17073 | ||
17074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17075 | /* end confdefs.h. */ | |
c0c3707f | 17076 | #include <arpa/inet.h> |
6ec2e0f5 SDJ |
17077 | _ACEOF |
17078 | case "$host_os" in | |
17079 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17080 | *) gl_absname_cpp="$ac_cpp" ;; | |
17081 | esac | |
17082 | ||
17083 | case "$host_os" in | |
17084 | mingw*) | |
17085 | gl_dirsep_regex='[/\\]' | |
17086 | ;; | |
17087 | *) | |
17088 | gl_dirsep_regex='\/' | |
17089 | ;; | |
17090 | esac | |
17091 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 17092 | gl_header_literal_regex=`echo 'arpa/inet.h' \ |
6ec2e0f5 SDJ |
17093 | | sed -e "$gl_make_literal_regex_sed"` |
17094 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17095 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17096 | s|^/[^/]|//&| | |
17097 | p | |
17098 | q | |
17099 | }' | |
17100 | ||
c0c3707f | 17101 | gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
6ec2e0f5 SDJ |
17102 | sed -n "$gl_absolute_header_sed"` |
17103 | ||
c0c3707f CB |
17104 | gl_header=$gl_cv_absolute_arpa_inet_h |
17105 | gl_cv_next_arpa_inet_h='"'$gl_header'"' | |
6ec2e0f5 | 17106 | else |
c0c3707f | 17107 | gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' |
6ec2e0f5 SDJ |
17108 | fi |
17109 | ||
c0c3707f | 17110 | |
6ec2e0f5 | 17111 | fi |
c0c3707f CB |
17112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 |
17113 | $as_echo "$gl_cv_next_arpa_inet_h" >&6; } | |
17114 | fi | |
17115 | NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h | |
6ec2e0f5 | 17116 | |
c0c3707f CB |
17117 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17118 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17119 | gl_next_as_first_directive='<'arpa/inet.h'>' | |
17120 | else | |
17121 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17122 | gl_next_as_first_directive=$gl_cv_next_arpa_inet_h | |
17123 | fi | |
17124 | NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive | |
6ec2e0f5 SDJ |
17125 | |
17126 | ||
6ec2e0f5 | 17127 | |
6ec2e0f5 | 17128 | |
6ec2e0f5 SDJ |
17129 | |
17130 | ||
6ec2e0f5 SDJ |
17131 | |
17132 | ||
17133 | ||
c0c3707f CB |
17134 | if test $ac_cv_header_sys_socket_h = yes; then |
17135 | HAVE_WS2TCPIP_H=0 | |
17136 | else | |
17137 | if test $ac_cv_header_ws2tcpip_h = yes; then | |
17138 | HAVE_WS2TCPIP_H=1 | |
17139 | else | |
17140 | HAVE_WS2TCPIP_H=0 | |
17141 | fi | |
17142 | fi | |
17143 | ||
17144 | ||
6ec2e0f5 SDJ |
17145 | |
17146 | ||
6ec2e0f5 SDJ |
17147 | |
17148 | ||
17149 | ||
17150 | ||
17151 | ||
698be2d8 CB |
17152 | |
17153 | ||
17154 | ||
17155 | ||
17156 | ||
17157 | ||
17158 | if test $ac_cv_func_btowc = no; then | |
17159 | HAVE_BTOWC=0 | |
17160 | else | |
17161 | ||
17162 | ||
17163 | ||
17164 | ||
17165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 | |
17166 | $as_echo_n "checking whether btowc(0) is correct... " >&6; } | |
17167 | if ${gl_cv_func_btowc_nul+:} false; then : | |
17168 | $as_echo_n "(cached) " >&6 | |
17169 | else | |
17170 | ||
17171 | if test "$cross_compiling" = yes; then : | |
17172 | ||
17173 | case "$host_os" in | |
17174 | # Guess no on Cygwin. | |
17175 | cygwin*) gl_cv_func_btowc_nul="guessing no" ;; | |
17176 | # Guess yes on native Windows. | |
17177 | mingw*) gl_cv_func_btowc_nul="guessing yes" ;; | |
17178 | # Guess yes otherwise. | |
17179 | *) gl_cv_func_btowc_nul="guessing yes" ;; | |
17180 | esac | |
17181 | ||
17182 | else | |
17183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17184 | /* end confdefs.h. */ | |
17185 | ||
17186 | #include <string.h> | |
17187 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
17188 | <wchar.h>. | |
17189 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17190 | included before <wchar.h>. */ | |
17191 | #include <stddef.h> | |
17192 | #include <stdio.h> | |
17193 | #include <time.h> | |
17194 | #include <wchar.h> | |
17195 | int main () | |
17196 | { | |
17197 | if (btowc ('\0') != 0) | |
17198 | return 1; | |
17199 | return 0; | |
17200 | } | |
17201 | _ACEOF | |
17202 | if ac_fn_c_try_run "$LINENO"; then : | |
17203 | gl_cv_func_btowc_nul=yes | |
17204 | else | |
17205 | gl_cv_func_btowc_nul=no | |
17206 | fi | |
17207 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17208 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17209 | fi | |
17210 | ||
17211 | ||
17212 | fi | |
17213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 | |
17214 | $as_echo "$gl_cv_func_btowc_nul" >&6; } | |
17215 | ||
17216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 | |
17217 | $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } | |
17218 | if ${gl_cv_func_btowc_eof+:} false; then : | |
17219 | $as_echo_n "(cached) " >&6 | |
17220 | else | |
17221 | ||
17222 | case "$host_os" in | |
17223 | # Guess no on IRIX. | |
17224 | irix*) gl_cv_func_btowc_eof="guessing no" ;; | |
17225 | # Guess yes on native Windows. | |
17226 | mingw*) gl_cv_func_btowc_eof="guessing yes" ;; | |
17227 | # Guess yes otherwise. | |
17228 | *) gl_cv_func_btowc_eof="guessing yes" ;; | |
17229 | esac | |
17230 | if test $LOCALE_FR != none; then | |
17231 | if test "$cross_compiling" = yes; then : | |
17232 | : | |
17233 | else | |
17234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17235 | /* end confdefs.h. */ | |
17236 | ||
17237 | #include <locale.h> | |
17238 | #include <string.h> | |
17239 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
17240 | <wchar.h>. | |
17241 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
17242 | included before <wchar.h>. */ | |
17243 | #include <stddef.h> | |
17244 | #include <stdio.h> | |
17245 | #include <time.h> | |
17246 | #include <wchar.h> | |
17247 | int main () | |
17248 | { | |
17249 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | |
17250 | { | |
17251 | if (btowc (EOF) != WEOF) | |
17252 | return 1; | |
17253 | } | |
17254 | return 0; | |
17255 | } | |
17256 | _ACEOF | |
17257 | if ac_fn_c_try_run "$LINENO"; then : | |
17258 | gl_cv_func_btowc_eof=yes | |
17259 | else | |
17260 | gl_cv_func_btowc_eof=no | |
17261 | fi | |
17262 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17263 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17264 | fi | |
17265 | ||
17266 | fi | |
17267 | ||
17268 | fi | |
17269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 | |
17270 | $as_echo "$gl_cv_func_btowc_eof" >&6; } | |
17271 | ||
17272 | case "$gl_cv_func_btowc_nul" in | |
17273 | *yes) ;; | |
17274 | *) REPLACE_BTOWC=1 ;; | |
17275 | esac | |
17276 | case "$gl_cv_func_btowc_eof" in | |
17277 | *yes) ;; | |
17278 | *) REPLACE_BTOWC=1 ;; | |
17279 | esac | |
17280 | fi | |
17281 | ||
17282 | if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then | |
17283 | ||
17284 | ||
17285 | ||
17286 | ||
17287 | ||
17288 | ||
17289 | ||
17290 | ||
17291 | gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" | |
17292 | ||
17293 | ||
17294 | : | |
17295 | ||
17296 | fi | |
17297 | ||
17298 | ||
17299 | ||
17300 | ||
17301 | ||
17302 | GNULIB_BTOWC=1 | |
17303 | ||
17304 | ||
17305 | ||
17306 | ||
17307 | ||
17308 | $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h | |
17309 | ||
17310 | ||
17311 | ||
17312 | ||
c0c3707f CB |
17313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 |
17314 | $as_echo_n "checking for __builtin_expect... " >&6; } | |
17315 | if ${gl_cv___builtin_expect+:} false; then : | |
6ec2e0f5 SDJ |
17316 | $as_echo_n "(cached) " >&6 |
17317 | else | |
c0c3707f CB |
17318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17319 | /* end confdefs.h. */ | |
17320 | ||
17321 | int | |
17322 | main (int argc, char **argv) | |
17323 | { | |
17324 | argc = __builtin_expect (argc, 100); | |
17325 | return argv[argc != 100][0]; | |
17326 | } | |
17327 | _ACEOF | |
17328 | if ac_fn_c_try_link "$LINENO"; then : | |
17329 | gl_cv___builtin_expect=yes | |
17330 | else | |
17331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17332 | /* end confdefs.h. */ | |
17333 | ||
17334 | #include <builtins.h> | |
17335 | int | |
17336 | main (int argc, char **argv) | |
17337 | { | |
17338 | argc = __builtin_expect (argc, 100); | |
17339 | return argv[argc != 100][0]; | |
17340 | } | |
17341 | _ACEOF | |
17342 | if ac_fn_c_try_link "$LINENO"; then : | |
17343 | gl_cv___builtin_expect="in <builtins.h>" | |
17344 | else | |
17345 | gl_cv___builtin_expect=no | |
6ec2e0f5 | 17346 | fi |
c0c3707f CB |
17347 | rm -f core conftest.err conftest.$ac_objext \ |
17348 | conftest$ac_exeext conftest.$ac_ext | |
17349 | fi | |
17350 | rm -f core conftest.err conftest.$ac_objext \ | |
17351 | conftest$ac_exeext conftest.$ac_ext | |
17352 | fi | |
17353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 | |
17354 | $as_echo "$gl_cv___builtin_expect" >&6; } | |
17355 | if test "$gl_cv___builtin_expect" = yes; then | |
17356 | $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h | |
8690e634 | 17357 | |
c0c3707f CB |
17358 | elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then |
17359 | $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h | |
8690e634 | 17360 | |
6ec2e0f5 | 17361 | fi |
8690e634 JK |
17362 | |
17363 | ||
17364 | ||
17365 | ||
c0c3707f CB |
17366 | |
17367 | if test $ac_cv_func_canonicalize_file_name = no; then | |
17368 | HAVE_CANONICALIZE_FILE_NAME=0 | |
17369 | if test $ac_cv_func_realpath = no; then | |
17370 | HAVE_REALPATH=0 | |
17371 | else | |
17372 | case "$gl_cv_func_realpath_works" in | |
17373 | *yes) ;; | |
17374 | *) REPLACE_REALPATH=1 ;; | |
17375 | esac | |
17376 | fi | |
17377 | else | |
17378 | case "$gl_cv_func_realpath_works" in | |
17379 | *yes) | |
17380 | ;; | |
17381 | *) | |
17382 | REPLACE_CANONICALIZE_FILE_NAME=1 | |
17383 | REPLACE_REALPATH=1 | |
17384 | ;; | |
17385 | esac | |
5e8754f9 | 17386 | fi |
8690e634 | 17387 | |
c0c3707f | 17388 | if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then |
8690e634 JK |
17389 | |
17390 | ||
17391 | ||
472fa5ee SM |
17392 | |
17393 | ||
17394 | ||
17395 | ||
17396 | ||
c0c3707f CB |
17397 | gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" |
17398 | ||
6ec2e0f5 | 17399 | fi |
8690e634 JK |
17400 | |
17401 | ||
c0c3707f CB |
17402 | cat >>confdefs.h <<_ACEOF |
17403 | #define GNULIB_CANONICALIZE_LGPL 1 | |
17404 | _ACEOF | |
8690e634 | 17405 | |
8690e634 | 17406 | |
8690e634 | 17407 | |
8690e634 | 17408 | |
8690e634 | 17409 | |
8690e634 | 17410 | |
8690e634 | 17411 | |
c0c3707f | 17412 | GNULIB_CANONICALIZE_FILE_NAME=1 |
8690e634 | 17413 | |
8690e634 | 17414 | |
8690e634 | 17415 | |
6ec2e0f5 SDJ |
17416 | |
17417 | ||
c0c3707f | 17418 | $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h |
6ec2e0f5 | 17419 | |
6ec2e0f5 | 17420 | |
8690e634 JK |
17421 | |
17422 | ||
8690e634 JK |
17423 | |
17424 | ||
17425 | ||
17426 | ||
c0c3707f | 17427 | GNULIB_REALPATH=1 |
6ec2e0f5 SDJ |
17428 | |
17429 | ||
17430 | ||
17431 | ||
6ec2e0f5 | 17432 | |
c0c3707f | 17433 | $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h |
6ec2e0f5 SDJ |
17434 | |
17435 | ||
17436 | ||
17437 | ||
17438 | ||
17439 | ||
17440 | ||
6ec2e0f5 | 17441 | |
c0c3707f | 17442 | GNULIB_CHDIR=1 |
6ec2e0f5 | 17443 | |
8690e634 | 17444 | |
8690e634 | 17445 | |
6ec2e0f5 | 17446 | |
6ec2e0f5 | 17447 | |
c0c3707f CB |
17448 | $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h |
17449 | ||
17450 | ||
17451 | ||
17452 | ||
17453 | ||
17454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 | |
17455 | $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } | |
17456 | if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then : | |
17457 | $as_echo_n "(cached) " >&6 | |
8690e634 | 17458 | else |
c0c3707f CB |
17459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17460 | /* end confdefs.h. */ | |
8690e634 | 17461 | |
c0c3707f CB |
17462 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ |
17463 | #if HAVE_UNISTD_H | |
17464 | # include <unistd.h> | |
17465 | #endif | |
17466 | #include <limits.h> | |
17467 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
17468 | # include <sys/param.h> | |
17469 | #endif | |
17470 | #if !defined PATH_MAX && defined MAXPATHLEN | |
17471 | # define PATH_MAX MAXPATHLEN | |
17472 | #endif | |
17473 | #ifdef __hpux | |
17474 | # undef PATH_MAX | |
17475 | # define PATH_MAX 1024 | |
17476 | #endif | |
17477 | #if defined _WIN32 && ! defined __CYGWIN__ | |
17478 | # undef PATH_MAX | |
17479 | # define PATH_MAX 260 | |
17480 | #endif | |
6ec2e0f5 | 17481 | |
c0c3707f CB |
17482 | #ifdef PATH_MAX |
17483 | have_arbitrary_file_name_length_limit | |
17484 | #endif | |
6ec2e0f5 | 17485 | _ACEOF |
c0c3707f CB |
17486 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
17487 | $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : | |
17488 | gl_cv_have_arbitrary_file_name_length_limit=yes | |
17489 | else | |
17490 | gl_cv_have_arbitrary_file_name_length_limit=no | |
17491 | fi | |
17492 | rm -f conftest* | |
6ec2e0f5 SDJ |
17493 | |
17494 | fi | |
c0c3707f CB |
17495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 |
17496 | $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } | |
6ec2e0f5 | 17497 | |
c0c3707f | 17498 | if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then |
6ec2e0f5 SDJ |
17499 | |
17500 | ||
17501 | ||
17502 | ||
472fa5ee SM |
17503 | |
17504 | ||
17505 | ||
17506 | ||
c0c3707f | 17507 | gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" |
472fa5ee | 17508 | |
c0c3707f | 17509 | : |
8690e634 JK |
17510 | fi |
17511 | ||
8690e634 | 17512 | |
c0c3707f | 17513 | $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h |
8690e634 JK |
17514 | |
17515 | ||
17516 | ||
17517 | ||
17518 | ||
8690e634 | 17519 | |
c0c3707f CB |
17520 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
17521 | REPLACE_CLOSE=1 | |
17522 | fi | |
8690e634 | 17523 | |
6ec2e0f5 SDJ |
17524 | |
17525 | ||
6ec2e0f5 SDJ |
17526 | |
17527 | ||
8690e634 | 17528 | |
c0c3707f CB |
17529 | if test $ac_cv_header_sys_socket_h != yes; then |
17530 | for ac_header in winsock2.h | |
17531 | do : | |
17532 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
17533 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
17534 | cat >>confdefs.h <<_ACEOF | |
17535 | #define HAVE_WINSOCK2_H 1 | |
17536 | _ACEOF | |
8690e634 | 17537 | |
c0c3707f | 17538 | fi |
8690e634 | 17539 | |
c0c3707f | 17540 | done |
8690e634 | 17541 | |
c0c3707f CB |
17542 | fi |
17543 | if test "$ac_cv_header_winsock2_h" = yes; then | |
17544 | HAVE_WINSOCK2_H=1 | |
17545 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
17546 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
17547 | else | |
17548 | HAVE_WINSOCK2_H=0 | |
17549 | fi | |
8690e634 | 17550 | |
6ec2e0f5 | 17551 | |
c0c3707f CB |
17552 | if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then |
17553 | REPLACE_CLOSE=1 | |
17554 | fi | |
6ec2e0f5 SDJ |
17555 | |
17556 | ||
c0c3707f | 17557 | if test $REPLACE_CLOSE = 0; then |
6ec2e0f5 SDJ |
17558 | |
17559 | ||
6ec2e0f5 | 17560 | |
c0c3707f CB |
17561 | if test $ac_cv_func_fchdir = no; then |
17562 | HAVE_FCHDIR=0 | |
17563 | fi | |
6ec2e0f5 | 17564 | |
c0c3707f CB |
17565 | if test $HAVE_FCHDIR = 0; then |
17566 | REPLACE_CLOSE=1 | |
17567 | fi | |
17568 | fi | |
6ec2e0f5 SDJ |
17569 | |
17570 | ||
c0c3707f | 17571 | if test $REPLACE_CLOSE = 1; then |
6ec2e0f5 SDJ |
17572 | |
17573 | ||
17574 | ||
17575 | ||
17576 | ||
6ec2e0f5 SDJ |
17577 | |
17578 | ||
17579 | ||
c0c3707f | 17580 | gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" |
6ec2e0f5 | 17581 | |
c0c3707f | 17582 | fi |
6ec2e0f5 | 17583 | |
6ec2e0f5 SDJ |
17584 | |
17585 | ||
17586 | ||
17587 | ||
c0c3707f | 17588 | GNULIB_CLOSE=1 |
6ec2e0f5 | 17589 | |
6ec2e0f5 | 17590 | |
6ec2e0f5 SDJ |
17591 | |
17592 | ||
17593 | ||
c0c3707f | 17594 | $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h |
6ec2e0f5 SDJ |
17595 | |
17596 | ||
17597 | ||
17598 | ||
17599 | ||
c0c3707f CB |
17600 | |
17601 | for ac_func in closedir | |
17602 | do : | |
17603 | ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" | |
17604 | if test "x$ac_cv_func_closedir" = xyes; then : | |
17605 | cat >>confdefs.h <<_ACEOF | |
17606 | #define HAVE_CLOSEDIR 1 | |
17607 | _ACEOF | |
17608 | ||
17609 | fi | |
17610 | done | |
17611 | ||
17612 | if test $ac_cv_func_closedir = no; then | |
17613 | HAVE_CLOSEDIR=0 | |
17614 | fi | |
6ec2e0f5 | 17615 | |
8690e634 JK |
17616 | |
17617 | ||
8690e634 | 17618 | |
c0c3707f CB |
17619 | if test $ac_cv_func_fchdir = no; then |
17620 | HAVE_FCHDIR=0 | |
6ec2e0f5 | 17621 | fi |
6a29c58e | 17622 | |
c0c3707f CB |
17623 | if test $HAVE_FCHDIR = 0; then |
17624 | if test $HAVE_CLOSEDIR = 1; then | |
17625 | REPLACE_CLOSEDIR=1 | |
17626 | fi | |
17627 | fi | |
6a29c58e | 17628 | |
c0c3707f CB |
17629 | case $host_os,$HAVE_CLOSEDIR in |
17630 | os2*,1) | |
17631 | REPLACE_CLOSEDIR=1;; | |
17632 | esac | |
d0ac1c44 | 17633 | |
c0c3707f | 17634 | if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then |
d0ac1c44 SM |
17635 | |
17636 | ||
d0ac1c44 SM |
17637 | |
17638 | ||
6a29c58e YQ |
17639 | |
17640 | ||
3d99e817 | 17641 | |
6ec2e0f5 | 17642 | |
c0c3707f | 17643 | gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" |
6ec2e0f5 | 17644 | |
6ec2e0f5 SDJ |
17645 | fi |
17646 | ||
17647 | ||
6ec2e0f5 SDJ |
17648 | |
17649 | ||
3d99e817 | 17650 | |
c0c3707f | 17651 | GNULIB_CLOSEDIR=1 |
3d99e817 AK |
17652 | |
17653 | ||
17654 | ||
17655 | ||
17656 | ||
c0c3707f | 17657 | $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h |
3d99e817 AK |
17658 | |
17659 | ||
17660 | ||
698be2d8 CB |
17661 | |
17662 | ||
17663 | ||
17664 | ||
17665 | ||
17666 | ||
17667 | ||
17668 | ||
17669 | ||
17670 | ||
17671 | ||
17672 | if test $gl_cv_have_include_next = yes; then | |
17673 | gl_cv_next_ctype_h='<'ctype.h'>' | |
17674 | else | |
17675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5 | |
17676 | $as_echo_n "checking absolute name of <ctype.h>... " >&6; } | |
17677 | if ${gl_cv_next_ctype_h+:} false; then : | |
17678 | $as_echo_n "(cached) " >&6 | |
17679 | else | |
17680 | ||
17681 | ||
17682 | ||
17683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17684 | /* end confdefs.h. */ | |
17685 | #include <ctype.h> | |
17686 | _ACEOF | |
17687 | case "$host_os" in | |
17688 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17689 | *) gl_absname_cpp="$ac_cpp" ;; | |
17690 | esac | |
17691 | ||
17692 | case "$host_os" in | |
17693 | mingw*) | |
17694 | gl_dirsep_regex='[/\\]' | |
17695 | ;; | |
17696 | *) | |
17697 | gl_dirsep_regex='\/' | |
17698 | ;; | |
17699 | esac | |
17700 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
17701 | gl_header_literal_regex=`echo 'ctype.h' \ | |
17702 | | sed -e "$gl_make_literal_regex_sed"` | |
17703 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17704 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17705 | s|^/[^/]|//&| | |
17706 | p | |
17707 | q | |
17708 | }' | |
17709 | ||
17710 | gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
17711 | sed -n "$gl_absolute_header_sed"` | |
17712 | ||
17713 | gl_header=$gl_cv_absolute_ctype_h | |
17714 | gl_cv_next_ctype_h='"'$gl_header'"' | |
17715 | ||
17716 | ||
17717 | fi | |
17718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5 | |
17719 | $as_echo "$gl_cv_next_ctype_h" >&6; } | |
17720 | fi | |
17721 | NEXT_CTYPE_H=$gl_cv_next_ctype_h | |
17722 | ||
17723 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
17724 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17725 | gl_next_as_first_directive='<'ctype.h'>' | |
17726 | else | |
17727 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17728 | gl_next_as_first_directive=$gl_cv_next_ctype_h | |
17729 | fi | |
17730 | NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive | |
17731 | ||
17732 | ||
17733 | ||
17734 | ||
17735 | ||
17736 | ||
17737 | ||
17738 | ||
17739 | ||
c0c3707f CB |
17740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 |
17741 | $as_echo_n "checking for d_ino member in directory struct... " >&6; } | |
17742 | if ${gl_cv_struct_dirent_d_ino+:} false; then : | |
6ec2e0f5 SDJ |
17743 | $as_echo_n "(cached) " >&6 |
17744 | else | |
17745 | if test "$cross_compiling" = yes; then : | |
17746 | case "$host_os" in | |
c0c3707f CB |
17747 | # Guess yes on glibc systems with Linux kernel. |
17748 | linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; | |
17749 | # Guess yes on musl systems with Linux kernel. | |
17750 | linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;; | |
17751 | # Guess no on native Windows. | |
17752 | mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; | |
17753 | # If we don't know, obey --enable-cross-guesses. | |
17754 | *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;; | |
17755 | esac | |
3d99e817 | 17756 | |
6ec2e0f5 SDJ |
17757 | else |
17758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17759 | /* end confdefs.h. */ | |
c0c3707f CB |
17760 | #include <sys/types.h> |
17761 | #include <sys/stat.h> | |
17762 | #include <dirent.h> | |
3d99e817 | 17763 | |
6ec2e0f5 SDJ |
17764 | int |
17765 | main () | |
17766 | { | |
c0c3707f CB |
17767 | DIR *dp = opendir ("."); |
17768 | struct dirent *e; | |
17769 | struct stat st; | |
17770 | if (! dp) | |
17771 | return 1; | |
17772 | e = readdir (dp); | |
17773 | if (! e) | |
17774 | { closedir (dp); return 2; } | |
17775 | if (lstat (e->d_name, &st) != 0) | |
17776 | { closedir (dp); return 3; } | |
17777 | if (e->d_ino != st.st_ino) | |
17778 | { closedir (dp); return 4; } | |
17779 | closedir (dp); | |
17780 | return 0; | |
17781 | ||
6ec2e0f5 SDJ |
17782 | ; |
17783 | return 0; | |
17784 | } | |
3d99e817 | 17785 | _ACEOF |
6ec2e0f5 | 17786 | if ac_fn_c_try_run "$LINENO"; then : |
c0c3707f CB |
17787 | gl_cv_struct_dirent_d_ino=yes |
17788 | else | |
17789 | gl_cv_struct_dirent_d_ino=no | |
17790 | fi | |
17791 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17792 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17793 | fi | |
17794 | ||
17795 | fi | |
17796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 | |
17797 | $as_echo "$gl_cv_struct_dirent_d_ino" >&6; } | |
17798 | case "$gl_cv_struct_dirent_d_ino" in | |
17799 | *yes) | |
17800 | ||
17801 | $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h | |
17802 | ||
17803 | ;; | |
17804 | esac | |
17805 | ||
17806 | ||
17807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 | |
17808 | $as_echo_n "checking for d_type member in directory struct... " >&6; } | |
17809 | if ${gl_cv_struct_dirent_d_type+:} false; then : | |
17810 | $as_echo_n "(cached) " >&6 | |
17811 | else | |
17812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17813 | /* end confdefs.h. */ | |
17814 | ||
17815 | #include <sys/types.h> | |
17816 | #include <dirent.h> | |
17817 | ||
17818 | int | |
17819 | main () | |
17820 | { | |
17821 | struct dirent dp; dp.d_type = 0; | |
17822 | ; | |
17823 | return 0; | |
17824 | } | |
17825 | _ACEOF | |
17826 | if ac_fn_c_try_link "$LINENO"; then : | |
17827 | gl_cv_struct_dirent_d_type=yes | |
6ec2e0f5 | 17828 | else |
c0c3707f | 17829 | gl_cv_struct_dirent_d_type=no |
3d99e817 | 17830 | fi |
c0c3707f CB |
17831 | rm -f core conftest.err conftest.$ac_objext \ |
17832 | conftest$ac_exeext conftest.$ac_ext | |
3d99e817 | 17833 | |
3d99e817 | 17834 | |
c0c3707f CB |
17835 | fi |
17836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 | |
17837 | $as_echo "$gl_cv_struct_dirent_d_type" >&6; } | |
17838 | if test $gl_cv_struct_dirent_d_type = yes; then | |
3d99e817 | 17839 | |
c0c3707f | 17840 | $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h |
3d99e817 | 17841 | |
c0c3707f | 17842 | fi |
3d99e817 | 17843 | |
0750520d | 17844 | |
0750520d | 17845 | |
0750520d | 17846 | |
0750520d PA |
17847 | |
17848 | ||
0750520d | 17849 | |
0750520d | 17850 | |
0750520d | 17851 | |
0750520d | 17852 | |
0750520d | 17853 | |
0750520d | 17854 | |
0750520d | 17855 | |
0750520d | 17856 | |
c0c3707f CB |
17857 | if test $gl_cv_have_include_next = yes; then |
17858 | gl_cv_next_dirent_h='<'dirent.h'>' | |
17859 | else | |
17860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 | |
17861 | $as_echo_n "checking absolute name of <dirent.h>... " >&6; } | |
17862 | if ${gl_cv_next_dirent_h+:} false; then : | |
17863 | $as_echo_n "(cached) " >&6 | |
17864 | else | |
0750520d | 17865 | |
c0c3707f | 17866 | if test $ac_cv_header_dirent_h = yes; then |
6ec2e0f5 | 17867 | |
472fa5ee SM |
17868 | |
17869 | ||
17870 | ||
c0c3707f CB |
17871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17872 | /* end confdefs.h. */ | |
17873 | #include <dirent.h> | |
17874 | _ACEOF | |
17875 | case "$host_os" in | |
17876 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17877 | *) gl_absname_cpp="$ac_cpp" ;; | |
17878 | esac | |
472fa5ee | 17879 | |
c0c3707f CB |
17880 | case "$host_os" in |
17881 | mingw*) | |
17882 | gl_dirsep_regex='[/\\]' | |
17883 | ;; | |
17884 | *) | |
17885 | gl_dirsep_regex='\/' | |
17886 | ;; | |
17887 | esac | |
17888 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
17889 | gl_header_literal_regex=`echo 'dirent.h' \ | |
17890 | | sed -e "$gl_make_literal_regex_sed"` | |
17891 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17892 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17893 | s|^/[^/]|//&| | |
17894 | p | |
17895 | q | |
17896 | }' | |
472fa5ee | 17897 | |
c0c3707f CB |
17898 | gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
17899 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 17900 | |
c0c3707f CB |
17901 | gl_header=$gl_cv_absolute_dirent_h |
17902 | gl_cv_next_dirent_h='"'$gl_header'"' | |
17903 | else | |
17904 | gl_cv_next_dirent_h='<'dirent.h'>' | |
17905 | fi | |
6ec2e0f5 SDJ |
17906 | |
17907 | ||
c0c3707f CB |
17908 | fi |
17909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 | |
17910 | $as_echo "$gl_cv_next_dirent_h" >&6; } | |
17911 | fi | |
17912 | NEXT_DIRENT_H=$gl_cv_next_dirent_h | |
472fa5ee | 17913 | |
c0c3707f CB |
17914 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17915 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17916 | gl_next_as_first_directive='<'dirent.h'>' | |
17917 | else | |
17918 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17919 | gl_next_as_first_directive=$gl_cv_next_dirent_h | |
17920 | fi | |
17921 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive | |
472fa5ee SM |
17922 | |
17923 | ||
17924 | ||
17925 | ||
c0c3707f CB |
17926 | if test $ac_cv_header_dirent_h = yes; then |
17927 | HAVE_DIRENT_H=1 | |
6ec2e0f5 | 17928 | else |
c0c3707f | 17929 | HAVE_DIRENT_H=0 |
6ec2e0f5 SDJ |
17930 | fi |
17931 | ||
6ec2e0f5 | 17932 | |
0750520d | 17933 | |
0750520d | 17934 | |
0750520d | 17935 | |
472fa5ee SM |
17936 | |
17937 | ||
17938 | ||
17939 | ||
17940 | ||
0750520d | 17941 | |
c0c3707f CB |
17942 | for ac_func in dirfd |
17943 | do : | |
17944 | ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" | |
17945 | if test "x$ac_cv_func_dirfd" = xyes; then : | |
17946 | cat >>confdefs.h <<_ACEOF | |
17947 | #define HAVE_DIRFD 1 | |
17948 | _ACEOF | |
0750520d | 17949 | |
c0c3707f CB |
17950 | fi |
17951 | done | |
0750520d | 17952 | |
c0c3707f CB |
17953 | ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h> |
17954 | #include <dirent.h> | |
17955 | " | |
17956 | if test "x$ac_cv_have_decl_dirfd" = xyes; then : | |
17957 | ac_have_decl=1 | |
8690e634 | 17958 | else |
c0c3707f CB |
17959 | ac_have_decl=0 |
17960 | fi | |
8690e634 | 17961 | |
c0c3707f CB |
17962 | cat >>confdefs.h <<_ACEOF |
17963 | #define HAVE_DECL_DIRFD $ac_have_decl | |
17964 | _ACEOF | |
49e4877c | 17965 | |
c0c3707f CB |
17966 | if test $ac_cv_have_decl_dirfd = no; then |
17967 | HAVE_DECL_DIRFD=0 | |
17968 | fi | |
8690e634 | 17969 | |
c0c3707f CB |
17970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 |
17971 | $as_echo_n "checking whether dirfd is a macro... " >&6; } | |
17972 | if ${gl_cv_func_dirfd_macro+:} false; then : | |
17973 | $as_echo_n "(cached) " >&6 | |
17974 | else | |
6ec2e0f5 SDJ |
17975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17976 | /* end confdefs.h. */ | |
8690e634 | 17977 | |
c0c3707f CB |
17978 | #include <sys/types.h> |
17979 | #include <dirent.h> | |
17980 | #ifdef dirfd | |
17981 | dirent_header_defines_dirfd | |
6ec2e0f5 | 17982 | #endif |
8690e634 | 17983 | _ACEOF |
c0c3707f CB |
17984 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
17985 | $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : | |
17986 | gl_cv_func_dirfd_macro=yes | |
6ec2e0f5 | 17987 | else |
c0c3707f | 17988 | gl_cv_func_dirfd_macro=no |
6ec2e0f5 | 17989 | fi |
c0c3707f | 17990 | rm -f conftest* |
472fa5ee | 17991 | |
c0c3707f CB |
17992 | fi |
17993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 | |
17994 | $as_echo "$gl_cv_func_dirfd_macro" >&6; } | |
472fa5ee | 17995 | |
c0c3707f CB |
17996 | # Use the replacement if we have no function or macro with that name, |
17997 | # or if OS/2 kLIBC whose dirfd() does not work. | |
17998 | # Replace only if the system declares dirfd already. | |
17999 | case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in | |
18000 | no,no,*,yes | *,*,os2*,yes) | |
18001 | REPLACE_DIRFD=1 | |
472fa5ee | 18002 | |
c0c3707f CB |
18003 | $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h |
18004 | ;; | |
18005 | esac | |
472fa5ee | 18006 | |
c0c3707f CB |
18007 | if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ |
18008 | || test $REPLACE_DIRFD = 1; then | |
6ec2e0f5 | 18009 | |
6ec2e0f5 SDJ |
18010 | |
18011 | ||
18012 | ||
18013 | ||
472fa5ee SM |
18014 | |
18015 | ||
18016 | ||
c0c3707f | 18017 | gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" |
472fa5ee SM |
18018 | |
18019 | ||
c0c3707f CB |
18020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 |
18021 | $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } | |
18022 | if ${gl_cv_sys_dir_fd_member_name+:} false; then : | |
18023 | $as_echo_n "(cached) " >&6 | |
18024 | else | |
6ec2e0f5 | 18025 | |
c0c3707f CB |
18026 | dirfd_save_CFLAGS=$CFLAGS |
18027 | for ac_expr in d_fd dd_fd; do | |
6ec2e0f5 | 18028 | |
c0c3707f CB |
18029 | CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" |
18030 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18031 | /* end confdefs.h. */ | |
6ec2e0f5 | 18032 | |
c0c3707f CB |
18033 | #include <sys/types.h> |
18034 | #include <dirent.h> | |
18035 | int | |
18036 | main () | |
18037 | { | |
18038 | DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; | |
18039 | ; | |
18040 | return 0; | |
18041 | } | |
18042 | _ACEOF | |
18043 | if ac_fn_c_try_compile "$LINENO"; then : | |
18044 | dir_fd_found=yes | |
6ec2e0f5 | 18045 | |
c0c3707f CB |
18046 | fi |
18047 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18048 | CFLAGS=$dirfd_save_CFLAGS | |
18049 | test "$dir_fd_found" = yes && break | |
18050 | done | |
18051 | test "$dir_fd_found" = yes || ac_expr=no_such_member | |
472fa5ee | 18052 | |
c0c3707f | 18053 | gl_cv_sys_dir_fd_member_name=$ac_expr |
472fa5ee SM |
18054 | |
18055 | ||
c0c3707f CB |
18056 | fi |
18057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 | |
18058 | $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } | |
18059 | if test $gl_cv_sys_dir_fd_member_name != no_such_member; then | |
472fa5ee | 18060 | |
c0c3707f CB |
18061 | cat >>confdefs.h <<_ACEOF |
18062 | #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name | |
18063 | _ACEOF | |
472fa5ee | 18064 | |
6ec2e0f5 SDJ |
18065 | fi |
18066 | ||
6ec2e0f5 | 18067 | |
c0c3707f | 18068 | fi |
6ec2e0f5 SDJ |
18069 | |
18070 | ||
18071 | ||
18072 | ||
18073 | ||
c0c3707f | 18074 | GNULIB_DIRFD=1 |
6ec2e0f5 SDJ |
18075 | |
18076 | ||
18077 | ||
6ec2e0f5 | 18078 | |
8690e634 | 18079 | |
c0c3707f | 18080 | $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h |
8690e634 JK |
18081 | |
18082 | ||
8690e634 JK |
18083 | |
18084 | ||
18085 | ||
8690e634 JK |
18086 | |
18087 | ||
8690e634 | 18088 | |
8690e634 | 18089 | |
c0c3707f CB |
18090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 |
18091 | $as_echo_n "checking whether // is distinct from /... " >&6; } | |
18092 | if ${gl_cv_double_slash_root+:} false; then : | |
18093 | $as_echo_n "(cached) " >&6 | |
18094 | else | |
18095 | if test x"$cross_compiling" = xyes ; then | |
18096 | # When cross-compiling, there is no way to tell whether // is special | |
18097 | # short of a list of hosts. However, the only known hosts to date | |
18098 | # that have a distinct // are Apollo DomainOS (too old to port to), | |
18099 | # Cygwin, and z/OS. If anyone knows of another system for which // has | |
18100 | # special semantics and is distinct from /, please report it to | |
18101 | # <bug-gnulib@gnu.org>. | |
18102 | case $host in | |
18103 | *-cygwin | i370-ibm-openedition) | |
18104 | gl_cv_double_slash_root=yes ;; | |
18105 | *) | |
18106 | # Be optimistic and assume that / and // are the same when we | |
18107 | # don't know. | |
18108 | gl_cv_double_slash_root='unknown, assuming no' ;; | |
18109 | esac | |
18110 | else | |
18111 | set x `ls -di / // 2>/dev/null` | |
18112 | if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then | |
18113 | gl_cv_double_slash_root=no | |
18114 | else | |
18115 | gl_cv_double_slash_root=yes | |
18116 | fi | |
18117 | fi | |
18118 | fi | |
18119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 | |
18120 | $as_echo "$gl_cv_double_slash_root" >&6; } | |
18121 | if test "$gl_cv_double_slash_root" = yes; then | |
6ec2e0f5 | 18122 | |
c0c3707f | 18123 | $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h |
8690e634 | 18124 | |
c0c3707f | 18125 | fi |
8690e634 | 18126 | |
63ce7108 TT |
18127 | |
18128 | ||
18129 | ||
18130 | ||
c0c3707f CB |
18131 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
18132 | REPLACE_DUP=1 | |
18133 | fi | |
8690e634 JK |
18134 | |
18135 | ||
18136 | ||
18137 | ||
18138 | ||
c0c3707f CB |
18139 | if test $ac_cv_func_fchdir = no; then |
18140 | HAVE_FCHDIR=0 | |
18141 | fi | |
8690e634 | 18142 | |
c0c3707f CB |
18143 | if test $HAVE_FCHDIR = 0; then |
18144 | REPLACE_DUP=1 | |
18145 | fi | |
8690e634 | 18146 | |
c0c3707f CB |
18147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5 |
18148 | $as_echo_n "checking whether dup works... " >&6; } | |
18149 | if ${gl_cv_func_dup_works+:} false; then : | |
8690e634 JK |
18150 | $as_echo_n "(cached) " >&6 |
18151 | else | |
c0c3707f CB |
18152 | if test "$cross_compiling" = yes; then : |
18153 | case "$host_os" in | |
18154 | # Guess no on native Windows. | |
18155 | mingw*) gl_cv_func_dup_works="guessing no" ;; | |
18156 | *) gl_cv_func_dup_works="guessing yes" ;; | |
18157 | esac | |
8690e634 | 18158 | |
c0c3707f | 18159 | else |
4a626d0a | 18160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 | 18161 | /* end confdefs.h. */ |
c0c3707f CB |
18162 | #include <unistd.h> |
18163 | #include <fcntl.h> | |
18164 | #include <errno.h> | |
18165 | int | |
18166 | main () | |
18167 | { | |
18168 | /* On OS/2 kLIBC, dup does not work on a directory fd. */ | |
18169 | int fd = open (".", O_RDONLY); | |
18170 | return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0; | |
8690e634 | 18171 | |
c0c3707f CB |
18172 | ; |
18173 | return 0; | |
18174 | } | |
8690e634 | 18175 | |
c0c3707f CB |
18176 | _ACEOF |
18177 | if ac_fn_c_try_run "$LINENO"; then : | |
18178 | gl_cv_func_dup_works=yes | |
18179 | else | |
18180 | gl_cv_func_dup_works=no | |
18181 | fi | |
18182 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18183 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8690e634 | 18184 | fi |
8690e634 | 18185 | |
8690e634 | 18186 | |
c0c3707f CB |
18187 | fi |
18188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5 | |
18189 | $as_echo "$gl_cv_func_dup_works" >&6; } | |
18190 | case "$gl_cv_func_dup_works" in | |
18191 | *yes) ;; | |
18192 | *) | |
18193 | REPLACE_DUP=1 | |
18194 | ;; | |
18195 | esac | |
8690e634 | 18196 | |
c0c3707f | 18197 | if test $REPLACE_DUP = 1; then |
8690e634 JK |
18198 | |
18199 | ||
18200 | ||
18201 | ||
6ec2e0f5 SDJ |
18202 | |
18203 | ||
18204 | ||
18205 | ||
c0c3707f | 18206 | gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" |
8690e634 | 18207 | |
c0c3707f CB |
18208 | : |
18209 | fi | |
8690e634 | 18210 | |
5e8754f9 | 18211 | |
8690e634 JK |
18212 | |
18213 | ||
8839a007 | 18214 | |
c0c3707f | 18215 | GNULIB_DUP=1 |
63ce7108 | 18216 | |
63ce7108 | 18217 | |
63ce7108 | 18218 | |
6ec2e0f5 | 18219 | |
6ec2e0f5 | 18220 | |
c0c3707f | 18221 | $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h |
6ec2e0f5 | 18222 | |
63ce7108 TT |
18223 | |
18224 | ||
472fa5ee SM |
18225 | |
18226 | ||
18227 | ||
18228 | ||
18229 | ||
c0c3707f CB |
18230 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
18231 | ||
18232 | ||
18233 | if test $HAVE_DUP2 = 1; then | |
18234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
18235 | $as_echo_n "checking whether dup2 works... " >&6; } | |
18236 | if ${gl_cv_func_dup2_works+:} false; then : | |
6ec2e0f5 SDJ |
18237 | $as_echo_n "(cached) " >&6 |
18238 | else | |
18239 | if test "$cross_compiling" = yes; then : | |
18240 | case "$host_os" in | |
c0c3707f CB |
18241 | mingw*) # on this platform, dup2 always returns 0 for success |
18242 | gl_cv_func_dup2_works="guessing no" ;; | |
18243 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
18244 | gl_cv_func_dup2_works="guessing no" ;; | |
18245 | aix* | freebsd*) | |
18246 | # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, | |
18247 | # not EBADF. | |
18248 | gl_cv_func_dup2_works="guessing no" ;; | |
18249 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
18250 | gl_cv_func_dup2_works="guessing no" ;; | |
18251 | *-android*) # implemented using dup3(), which fails if oldfd == newfd | |
18252 | gl_cv_func_dup2_works="guessing no" ;; | |
18253 | os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. | |
18254 | gl_cv_func_dup2_works="guessing no" ;; | |
18255 | *) gl_cv_func_dup2_works="guessing yes" ;; | |
18256 | esac | |
63ce7108 TT |
18257 | else |
18258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18259 | /* end confdefs.h. */ | |
18260 | ||
c0c3707f CB |
18261 | #include <errno.h> |
18262 | #include <fcntl.h> | |
18263 | #include <limits.h> | |
18264 | #include <sys/resource.h> | |
18265 | #include <unistd.h> | |
18266 | #ifndef RLIM_SAVED_CUR | |
18267 | # define RLIM_SAVED_CUR RLIM_INFINITY | |
18268 | #endif | |
18269 | #ifndef RLIM_SAVED_MAX | |
18270 | # define RLIM_SAVED_MAX RLIM_INFINITY | |
18271 | #endif | |
63ce7108 TT |
18272 | |
18273 | int | |
18274 | main () | |
18275 | { | |
6ec2e0f5 | 18276 | int result = 0; |
c0c3707f CB |
18277 | int bad_fd = INT_MAX; |
18278 | struct rlimit rlim; | |
18279 | if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 | |
18280 | && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX | |
18281 | && rlim.rlim_cur != RLIM_INFINITY | |
18282 | && rlim.rlim_cur != RLIM_SAVED_MAX | |
18283 | && rlim.rlim_cur != RLIM_SAVED_CUR) | |
18284 | bad_fd = rlim.rlim_cur; | |
18285 | #ifdef FD_CLOEXEC | |
18286 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
18287 | result |= 1; | |
18288 | #endif | |
18289 | if (dup2 (1, 1) != 1) | |
18290 | result |= 2; | |
18291 | #ifdef FD_CLOEXEC | |
18292 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
18293 | result |= 4; | |
18294 | #endif | |
18295 | close (0); | |
18296 | if (dup2 (0, 0) != -1) | |
18297 | result |= 8; | |
18298 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
18299 | if (dup2 (2, bad_fd) == -1 && errno != EBADF) | |
18300 | result |= 16; | |
18301 | /* Flush out some cygwin core dumps. */ | |
18302 | if (dup2 (2, -1) != -1 || errno != EBADF) | |
18303 | result |= 32; | |
18304 | dup2 (2, 255); | |
18305 | dup2 (2, 256); | |
18306 | /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ | |
18307 | { | |
18308 | int fd = open (".", O_RDONLY); | |
18309 | if (fd == -1) | |
18310 | result |= 64; | |
18311 | else if (dup2 (fd, fd + 1) == -1) | |
18312 | result |= 128; | |
18313 | ||
18314 | close (fd); | |
18315 | } | |
18316 | return result; | |
63ce7108 TT |
18317 | ; |
18318 | return 0; | |
18319 | } | |
c0c3707f | 18320 | |
63ce7108 TT |
18321 | _ACEOF |
18322 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 18323 | gl_cv_func_dup2_works=yes |
63ce7108 | 18324 | else |
c0c3707f | 18325 | gl_cv_func_dup2_works=no |
63ce7108 TT |
18326 | fi |
18327 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18328 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18329 | fi | |
18330 | ||
c0c3707f | 18331 | |
63ce7108 | 18332 | fi |
c0c3707f CB |
18333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
18334 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
18335 | case "$gl_cv_func_dup2_works" in | |
63ce7108 TT |
18336 | *yes) ;; |
18337 | *) | |
c0c3707f CB |
18338 | REPLACE_DUP2=1 |
18339 | for ac_func in setdtablesize | |
18340 | do : | |
18341 | ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" | |
18342 | if test "x$ac_cv_func_setdtablesize" = xyes; then : | |
18343 | cat >>confdefs.h <<_ACEOF | |
18344 | #define HAVE_SETDTABLESIZE 1 | |
18345 | _ACEOF | |
18346 | ||
18347 | fi | |
18348 | done | |
18349 | ||
63ce7108 TT |
18350 | ;; |
18351 | esac | |
18352 | fi | |
18353 | ||
09607c9e TT |
18354 | |
18355 | ||
18356 | ||
c0c3707f CB |
18357 | if test $ac_cv_func_fchdir = no; then |
18358 | HAVE_FCHDIR=0 | |
18359 | fi | |
4a626d0a | 18360 | |
c0c3707f CB |
18361 | if test $HAVE_FCHDIR = 0; then |
18362 | if test $HAVE_DUP2 = 1; then | |
18363 | REPLACE_DUP2=1 | |
18364 | fi | |
18365 | fi | |
4a626d0a PA |
18366 | |
18367 | ||
c0c3707f | 18368 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then |
4a626d0a PA |
18369 | |
18370 | ||
18371 | ||
18372 | ||
18373 | ||
18374 | ||
4a626d0a | 18375 | |
4a626d0a | 18376 | |
c0c3707f | 18377 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
4a626d0a PA |
18378 | |
18379 | ||
c0c3707f | 18380 | fi |
4a626d0a PA |
18381 | |
18382 | ||
18383 | ||
18384 | ||
18385 | ||
c0c3707f | 18386 | GNULIB_DUP2=1 |
4a626d0a PA |
18387 | |
18388 | ||
18389 | ||
18390 | ||
09607c9e | 18391 | |
c0c3707f | 18392 | $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h |
09607c9e TT |
18393 | |
18394 | ||
472fa5ee SM |
18395 | |
18396 | ||
18397 | ||
18398 | ||
18399 | ||
09607c9e | 18400 | |
6ec2e0f5 | 18401 | |
c0c3707f | 18402 | GNULIB_ENVIRON=1 |
6ec2e0f5 | 18403 | |
09607c9e | 18404 | |
09607c9e | 18405 | |
6ec2e0f5 SDJ |
18406 | |
18407 | ||
c0c3707f | 18408 | $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h |
6ec2e0f5 SDJ |
18409 | |
18410 | ||
6ec2e0f5 | 18411 | |
5e8754f9 | 18412 | |
6ec2e0f5 | 18413 | |
c0c3707f CB |
18414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 |
18415 | $as_echo_n "checking for error_at_line... " >&6; } | |
18416 | if ${ac_cv_lib_error_at_line+:} false; then : | |
09607c9e | 18417 | $as_echo_n "(cached) " >&6 |
4a626d0a PA |
18418 | else |
18419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18420 | /* end confdefs.h. */ | |
c0c3707f CB |
18421 | #include <error.h> |
18422 | int | |
18423 | main () | |
18424 | { | |
18425 | error_at_line (0, 0, "", 0, "an error occurred"); | |
18426 | ; | |
4a626d0a PA |
18427 | return 0; |
18428 | } | |
18429 | _ACEOF | |
c0c3707f CB |
18430 | if ac_fn_c_try_link "$LINENO"; then : |
18431 | ac_cv_lib_error_at_line=yes | |
4a626d0a | 18432 | else |
c0c3707f | 18433 | ac_cv_lib_error_at_line=no |
6ec2e0f5 | 18434 | fi |
c0c3707f CB |
18435 | rm -f core conftest.err conftest.$ac_objext \ |
18436 | conftest$ac_exeext conftest.$ac_ext | |
6ec2e0f5 | 18437 | fi |
c0c3707f CB |
18438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 |
18439 | $as_echo "$ac_cv_lib_error_at_line" >&6; } | |
09607c9e | 18440 | |
c0c3707f | 18441 | if test $ac_cv_lib_error_at_line = no; then |
09607c9e TT |
18442 | |
18443 | ||
18444 | ||
18445 | ||
18446 | ||
18447 | ||
18448 | ||
18449 | ||
c0c3707f | 18450 | gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" |
09607c9e | 18451 | |
4a626d0a | 18452 | |
09607c9e | 18453 | |
c0c3707f | 18454 | : |
4a626d0a | 18455 | |
c0c3707f | 18456 | fi |
4a626d0a | 18457 | |
4a626d0a | 18458 | |
09607c9e | 18459 | |
09607c9e | 18460 | |
09607c9e TT |
18461 | |
18462 | ||
09607c9e | 18463 | |
c0c3707f CB |
18464 | if test $ac_cv_have_decl_fchdir = no; then |
18465 | HAVE_DECL_FCHDIR=0 | |
18466 | fi | |
09607c9e TT |
18467 | |
18468 | ||
c0c3707f | 18469 | if test $HAVE_FCHDIR = 0; then |
09607c9e TT |
18470 | |
18471 | ||
18472 | ||
c0c3707f CB |
18473 | |
18474 | ||
18475 | ||
18476 | ||
18477 | ||
18478 | gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" | |
18479 | ||
18480 | : | |
18481 | ||
18482 | $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h | |
18483 | ||
18484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 | |
18485 | $as_echo_n "checking whether open can visit directories... " >&6; } | |
18486 | if ${gl_cv_func_open_directory_works+:} false; then : | |
18487 | $as_echo_n "(cached) " >&6 | |
3d99e817 | 18488 | else |
c0c3707f CB |
18489 | if test "$cross_compiling" = yes; then : |
18490 | case "$host_os" in | |
18491 | # Guess yes on Linux systems. | |
18492 | linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; | |
18493 | # Guess yes on glibc systems. | |
18494 | *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; | |
18495 | # Guess no on native Windows. | |
18496 | mingw*) gl_cv_func_open_directory_works="guessing no" ;; | |
18497 | # If we don't know, obey --enable-cross-guesses. | |
18498 | *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;; | |
18499 | esac | |
18500 | ||
18501 | else | |
18502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18503 | /* end confdefs.h. */ | |
18504 | #include <fcntl.h> | |
18505 | ||
18506 | int | |
18507 | main () | |
18508 | { | |
18509 | return open(".", O_RDONLY) < 0; | |
18510 | ; | |
18511 | return 0; | |
18512 | } | |
18513 | _ACEOF | |
18514 | if ac_fn_c_try_run "$LINENO"; then : | |
18515 | gl_cv_func_open_directory_works=yes | |
18516 | else | |
18517 | gl_cv_func_open_directory_works=no | |
18518 | fi | |
18519 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18520 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3d99e817 AK |
18521 | fi |
18522 | ||
c0c3707f CB |
18523 | fi |
18524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 | |
18525 | $as_echo "$gl_cv_func_open_directory_works" >&6; } | |
18526 | case "$gl_cv_func_open_directory_works" in | |
18527 | *yes) ;; | |
18528 | *) | |
3d99e817 | 18529 | |
c0c3707f | 18530 | $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h |
09607c9e | 18531 | |
c0c3707f CB |
18532 | ;; |
18533 | esac | |
18534 | fi | |
8690e634 | 18535 | |
8690e634 | 18536 | |
8690e634 | 18537 | |
8690e634 | 18538 | |
8690e634 | 18539 | |
6ec2e0f5 | 18540 | |
c0c3707f | 18541 | GNULIB_FCHDIR=1 |
6ec2e0f5 SDJ |
18542 | |
18543 | ||
6ec2e0f5 | 18544 | |
8690e634 JK |
18545 | |
18546 | ||
c0c3707f | 18547 | $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h |
8690e634 JK |
18548 | |
18549 | ||
18550 | ||
6ec2e0f5 SDJ |
18551 | |
18552 | ||
18553 | ||
6ec2e0f5 | 18554 | |
8690e634 | 18555 | |
c0c3707f | 18556 | if test $ac_cv_func_fcntl = no; then |
8690e634 JK |
18557 | |
18558 | ||
6ec2e0f5 | 18559 | |
c0c3707f CB |
18560 | if test $ac_cv_func_fcntl = no; then |
18561 | HAVE_FCNTL=0 | |
18562 | else | |
18563 | REPLACE_FCNTL=1 | |
18564 | fi | |
5e8754f9 | 18565 | |
c0c3707f CB |
18566 | else |
18567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 | |
18568 | $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } | |
18569 | if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : | |
8690e634 | 18570 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 18571 | else |
c0c3707f CB |
18572 | if test "$cross_compiling" = yes; then : |
18573 | case $host_os in | |
18574 | aix* | cygwin* | haiku*) | |
18575 | gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; | |
18576 | *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; | |
18577 | esac | |
18578 | else | |
18579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18580 | /* end confdefs.h. */ | |
18581 | #include <errno.h> | |
18582 | #include <fcntl.h> | |
18583 | #include <limits.h> | |
18584 | #include <sys/resource.h> | |
18585 | #include <unistd.h> | |
18586 | #ifndef RLIM_SAVED_CUR | |
18587 | # define RLIM_SAVED_CUR RLIM_INFINITY | |
18588 | #endif | |
18589 | #ifndef RLIM_SAVED_MAX | |
18590 | # define RLIM_SAVED_MAX RLIM_INFINITY | |
18591 | #endif | |
18592 | ||
18593 | int | |
18594 | main () | |
18595 | { | |
18596 | int result = 0; | |
18597 | int bad_fd = INT_MAX; | |
18598 | struct rlimit rlim; | |
18599 | if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 | |
18600 | && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX | |
18601 | && rlim.rlim_cur != RLIM_INFINITY | |
18602 | && rlim.rlim_cur != RLIM_SAVED_MAX | |
18603 | && rlim.rlim_cur != RLIM_SAVED_CUR) | |
18604 | bad_fd = rlim.rlim_cur; | |
18605 | if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; | |
18606 | if (errno != EINVAL) result |= 2; | |
18607 | if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; | |
18608 | if (errno != EINVAL) result |= 8; | |
18609 | /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ | |
18610 | { | |
18611 | int fd; | |
18612 | fd = open (".", O_RDONLY); | |
18613 | if (fd == -1) | |
18614 | result |= 16; | |
18615 | else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) | |
18616 | result |= 32; | |
18617 | ||
18618 | close (fd); | |
18619 | } | |
18620 | return result; | |
18621 | ; | |
18622 | return 0; | |
18623 | } | |
18624 | _ACEOF | |
18625 | if ac_fn_c_try_run "$LINENO"; then : | |
18626 | gl_cv_func_fcntl_f_dupfd_works=yes | |
18627 | else | |
18628 | gl_cv_func_fcntl_f_dupfd_works=no | |
18629 | fi | |
18630 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18631 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18632 | fi | |
18633 | ||
18634 | fi | |
18635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 | |
18636 | $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } | |
18637 | case $gl_cv_func_fcntl_f_dupfd_works in | |
18638 | *yes) ;; | |
18639 | *) | |
18640 | ||
18641 | ||
18642 | if test $ac_cv_func_fcntl = no; then | |
18643 | HAVE_FCNTL=0 | |
18644 | else | |
18645 | REPLACE_FCNTL=1 | |
18646 | fi | |
18647 | ||
18648 | ||
18649 | $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h | |
18650 | ;; | |
18651 | esac | |
18652 | ||
18653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 | |
18654 | $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } | |
18655 | if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : | |
18656 | $as_echo_n "(cached) " >&6 | |
8690e634 JK |
18657 | else |
18658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18659 | /* end confdefs.h. */ | |
c0c3707f CB |
18660 | |
18661 | #include <fcntl.h> | |
18662 | #ifndef F_DUPFD_CLOEXEC | |
18663 | choke me | |
18664 | #endif | |
18665 | ||
18666 | int | |
18667 | main () | |
18668 | { | |
18669 | ||
18670 | ; | |
18671 | return 0; | |
18672 | } | |
18673 | _ACEOF | |
18674 | if ac_fn_c_try_compile "$LINENO"; then : | |
18675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18676 | /* end confdefs.h. */ | |
18677 | ||
18678 | #ifdef __linux__ | |
18679 | /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace | |
18680 | it to support the semantics on older kernels that failed with EINVAL. */ | |
18681 | choke me | |
18682 | #endif | |
8690e634 | 18683 | |
8690e634 JK |
18684 | int |
18685 | main () | |
18686 | { | |
18687 | ||
18688 | ; | |
18689 | return 0; | |
18690 | } | |
18691 | _ACEOF | |
c0c3707f CB |
18692 | if ac_fn_c_try_compile "$LINENO"; then : |
18693 | gl_cv_func_fcntl_f_dupfd_cloexec=yes | |
8690e634 | 18694 | else |
c0c3707f | 18695 | gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" |
8690e634 | 18696 | fi |
c0c3707f CB |
18697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18698 | else | |
18699 | gl_cv_func_fcntl_f_dupfd_cloexec=no | |
18700 | fi | |
18701 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 18702 | fi |
c0c3707f CB |
18703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 |
18704 | $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } | |
18705 | if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then | |
8690e634 | 18706 | |
8690e634 | 18707 | |
c0c3707f CB |
18708 | |
18709 | if test $ac_cv_func_fcntl = no; then | |
18710 | HAVE_FCNTL=0 | |
5e8754f9 | 18711 | else |
c0c3707f CB |
18712 | REPLACE_FCNTL=1 |
18713 | fi | |
18714 | ||
18715 | fi | |
8690e634 JK |
18716 | fi |
18717 | ||
18718 | ||
8690e634 | 18719 | |
8690e634 | 18720 | |
c0c3707f CB |
18721 | if test $ac_cv_func_fchdir = no; then |
18722 | HAVE_FCHDIR=0 | |
18723 | fi | |
6ec2e0f5 | 18724 | |
c0c3707f | 18725 | if test $HAVE_FCHDIR = 0; then |
6ec2e0f5 SDJ |
18726 | |
18727 | ||
18728 | ||
c0c3707f CB |
18729 | if test $ac_cv_func_fcntl = no; then |
18730 | HAVE_FCNTL=0 | |
18731 | else | |
18732 | REPLACE_FCNTL=1 | |
18733 | fi | |
6ec2e0f5 | 18734 | |
c0c3707f | 18735 | fi |
6ec2e0f5 SDJ |
18736 | |
18737 | ||
c0c3707f | 18738 | if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then |
6ec2e0f5 | 18739 | |
6ec2e0f5 SDJ |
18740 | |
18741 | ||
5e8754f9 SDJ |
18742 | |
18743 | ||
8690e634 | 18744 | |
8690e634 JK |
18745 | |
18746 | ||
c0c3707f | 18747 | gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" |
472fa5ee | 18748 | |
c0c3707f | 18749 | fi |
472fa5ee SM |
18750 | |
18751 | ||
18752 | ||
18753 | ||
18754 | ||
c0c3707f | 18755 | GNULIB_FCNTL=1 |
472fa5ee SM |
18756 | |
18757 | ||
18758 | ||
18759 | ||
18760 | ||
c0c3707f | 18761 | $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h |
472fa5ee SM |
18762 | |
18763 | ||
18764 | ||
18765 | ||
18766 | ||
18767 | ||
18768 | ||
18769 | ||
18770 | ||
18771 | ||
18772 | ||
18773 | ||
18774 | ||
18775 | ||
c0c3707f CB |
18776 | if test $gl_cv_have_include_next = yes; then |
18777 | gl_cv_next_fcntl_h='<'fcntl.h'>' | |
18778 | else | |
18779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 | |
18780 | $as_echo_n "checking absolute name of <fcntl.h>... " >&6; } | |
18781 | if ${gl_cv_next_fcntl_h+:} false; then : | |
18782 | $as_echo_n "(cached) " >&6 | |
18783 | else | |
472fa5ee SM |
18784 | |
18785 | ||
472fa5ee | 18786 | |
c0c3707f CB |
18787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18788 | /* end confdefs.h. */ | |
18789 | #include <fcntl.h> | |
18790 | _ACEOF | |
18791 | case "$host_os" in | |
18792 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18793 | *) gl_absname_cpp="$ac_cpp" ;; | |
18794 | esac | |
472fa5ee | 18795 | |
c0c3707f CB |
18796 | case "$host_os" in |
18797 | mingw*) | |
18798 | gl_dirsep_regex='[/\\]' | |
18799 | ;; | |
18800 | *) | |
18801 | gl_dirsep_regex='\/' | |
18802 | ;; | |
18803 | esac | |
18804 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
18805 | gl_header_literal_regex=`echo 'fcntl.h' \ | |
18806 | | sed -e "$gl_make_literal_regex_sed"` | |
18807 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18808 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18809 | s|^/[^/]|//&| | |
18810 | p | |
18811 | q | |
18812 | }' | |
472fa5ee | 18813 | |
c0c3707f CB |
18814 | gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
18815 | sed -n "$gl_absolute_header_sed"` | |
472fa5ee | 18816 | |
c0c3707f CB |
18817 | gl_header=$gl_cv_absolute_fcntl_h |
18818 | gl_cv_next_fcntl_h='"'$gl_header'"' | |
8690e634 JK |
18819 | |
18820 | ||
c0c3707f CB |
18821 | fi |
18822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 | |
18823 | $as_echo "$gl_cv_next_fcntl_h" >&6; } | |
18824 | fi | |
18825 | NEXT_FCNTL_H=$gl_cv_next_fcntl_h | |
8690e634 | 18826 | |
c0c3707f CB |
18827 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18828 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18829 | gl_next_as_first_directive='<'fcntl.h'>' | |
18830 | else | |
18831 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18832 | gl_next_as_first_directive=$gl_cv_next_fcntl_h | |
18833 | fi | |
18834 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive | |
8690e634 JK |
18835 | |
18836 | ||
18837 | ||
18838 | ||
5e8754f9 SDJ |
18839 | |
18840 | ||
18841 | ||
18842 | ||
472fa5ee SM |
18843 | |
18844 | ||
18845 | ||
18846 | ||
18847 | ||
18848 | ||
18849 | ||
5e8754f9 | 18850 | cat >>confdefs.h <<_ACEOF |
c0c3707f | 18851 | #define GNULIB_FD_SAFER_FLAG 1 |
5e8754f9 | 18852 | _ACEOF |
472fa5ee SM |
18853 | |
18854 | ||
c0c3707f CB |
18855 | |
18856 | ||
18857 | ||
18858 | ||
18859 | ||
18860 | ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " | |
18861 | #include <dirent.h> | |
18862 | ||
5e8754f9 | 18863 | " |
c0c3707f | 18864 | if test "x$ac_cv_have_decl_fdopendir" = xyes; then : |
5e8754f9 SDJ |
18865 | ac_have_decl=1 |
18866 | else | |
18867 | ac_have_decl=0 | |
18868 | fi | |
472fa5ee | 18869 | |
5e8754f9 | 18870 | cat >>confdefs.h <<_ACEOF |
c0c3707f | 18871 | #define HAVE_DECL_FDOPENDIR $ac_have_decl |
5e8754f9 | 18872 | _ACEOF |
c0c3707f | 18873 | if test $ac_have_decl = 1; then : |
472fa5ee | 18874 | |
c0c3707f CB |
18875 | else |
18876 | HAVE_DECL_FDOPENDIR=0 | |
18877 | fi | |
472fa5ee SM |
18878 | |
18879 | ||
c0c3707f CB |
18880 | if test $ac_cv_func_fdopendir = no; then |
18881 | HAVE_FDOPENDIR=0 | |
18882 | else | |
18883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 | |
18884 | $as_echo_n "checking whether fdopendir works... " >&6; } | |
18885 | if ${gl_cv_func_fdopendir_works+:} false; then : | |
18886 | $as_echo_n "(cached) " >&6 | |
18887 | else | |
18888 | if test "$cross_compiling" = yes; then : | |
18889 | case "$host_os" in | |
18890 | # Guess yes on glibc systems. | |
18891 | *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
18892 | # Guess yes on musl systems. | |
18893 | *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
18894 | # If we don't know, obey --enable-cross-guesses. | |
18895 | *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;; | |
18896 | esac | |
472fa5ee | 18897 | |
c0c3707f CB |
18898 | else |
18899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18900 | /* end confdefs.h. */ | |
472fa5ee | 18901 | |
c0c3707f CB |
18902 | #include <dirent.h> |
18903 | #include <fcntl.h> | |
18904 | #include <unistd.h> | |
18905 | #if !HAVE_DECL_FDOPENDIR | |
18906 | extern | |
18907 | # ifdef __cplusplus | |
18908 | "C" | |
18909 | # endif | |
18910 | DIR *fdopendir (int); | |
18911 | #endif | |
472fa5ee | 18912 | |
c0c3707f CB |
18913 | int |
18914 | main () | |
18915 | { | |
18916 | int result = 0; | |
18917 | int fd = open ("conftest.c", O_RDONLY); | |
18918 | if (fd < 0) result |= 1; | |
18919 | if (fdopendir (fd)) result |= 2; | |
18920 | if (close (fd)) result |= 4; | |
18921 | return result; | |
18922 | ; | |
18923 | return 0; | |
18924 | } | |
18925 | _ACEOF | |
18926 | if ac_fn_c_try_run "$LINENO"; then : | |
18927 | gl_cv_func_fdopendir_works=yes | |
18928 | else | |
18929 | gl_cv_func_fdopendir_works=no | |
18930 | fi | |
18931 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18932 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18933 | fi | |
472fa5ee | 18934 | |
c0c3707f CB |
18935 | fi |
18936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 | |
18937 | $as_echo "$gl_cv_func_fdopendir_works" >&6; } | |
18938 | case "$gl_cv_func_fdopendir_works" in | |
18939 | *yes) ;; | |
18940 | *) | |
18941 | REPLACE_FDOPENDIR=1 | |
18942 | ;; | |
18943 | esac | |
18944 | fi | |
472fa5ee | 18945 | |
c0c3707f | 18946 | if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then |
472fa5ee SM |
18947 | |
18948 | ||
18949 | ||
18950 | ||
18951 | ||
98399780 | 18952 | |
5e8754f9 SDJ |
18953 | |
18954 | ||
c0c3707f | 18955 | gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" |
5e8754f9 | 18956 | |
c0c3707f | 18957 | fi |
5e8754f9 SDJ |
18958 | |
18959 | ||
18960 | ||
18961 | ||
18962 | ||
c0c3707f | 18963 | GNULIB_FDOPENDIR=1 |
5e8754f9 SDJ |
18964 | |
18965 | ||
18966 | ||
18967 | ||
18968 | ||
c0c3707f | 18969 | $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h |
5e8754f9 SDJ |
18970 | |
18971 | ||
5e8754f9 SDJ |
18972 | |
18973 | ||
18974 | ||
c0c3707f CB |
18975 | cat >>confdefs.h <<_ACEOF |
18976 | #define GNULIB_FDOPENDIR 1 | |
18977 | _ACEOF | |
5e8754f9 SDJ |
18978 | |
18979 | ||
18980 | ||
5e8754f9 SDJ |
18981 | |
18982 | ||
18983 | ||
c0c3707f CB |
18984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 |
18985 | $as_echo_n "checking for flexible array member... " >&6; } | |
18986 | if ${ac_cv_c_flexmember+:} false; then : | |
5e8754f9 | 18987 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 18988 | else |
c0c3707f | 18989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e8754f9 | 18990 | /* end confdefs.h. */ |
c0c3707f CB |
18991 | #include <stdlib.h> |
18992 | #include <stdio.h> | |
18993 | #include <stddef.h> | |
18994 | struct m { struct m *next, **list; char name[]; }; | |
18995 | struct s { struct s *p; struct m *m; int n; double d[]; }; | |
5e8754f9 SDJ |
18996 | int |
18997 | main () | |
18998 | { | |
c0c3707f CB |
18999 | int m = getchar (); |
19000 | size_t nbytes = offsetof (struct s, d) + m * sizeof (double); | |
19001 | nbytes += sizeof (struct s) - 1; | |
19002 | nbytes -= nbytes % sizeof (struct s); | |
19003 | struct s *p = malloc (nbytes); | |
19004 | p->p = p; | |
19005 | p->m = NULL; | |
19006 | p->d[0] = 0.0; | |
19007 | return p->d != (double *) NULL; | |
5e8754f9 SDJ |
19008 | ; |
19009 | return 0; | |
19010 | } | |
7a6dbc2f | 19011 | _ACEOF |
c0c3707f CB |
19012 | if ac_fn_c_try_compile "$LINENO"; then : |
19013 | ac_cv_c_flexmember=yes | |
5e8754f9 | 19014 | else |
c0c3707f | 19015 | ac_cv_c_flexmember=no |
5e8754f9 | 19016 | fi |
c0c3707f | 19017 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e8754f9 | 19018 | fi |
c0c3707f CB |
19019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 |
19020 | $as_echo "$ac_cv_c_flexmember" >&6; } | |
19021 | if test $ac_cv_c_flexmember = yes; then | |
19022 | ||
19023 | $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h | |
5e8754f9 | 19024 | |
c0c3707f CB |
19025 | else |
19026 | $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h | |
98399780 | 19027 | |
c0c3707f | 19028 | fi |
98399780 | 19029 | |
472fa5ee SM |
19030 | |
19031 | ||
19032 | ||
c0c3707f CB |
19033 | FLOAT_H= |
19034 | REPLACE_FLOAT_LDBL=0 | |
19035 | case "$host_os" in | |
19036 | aix* | beos* | openbsd* | mirbsd* | irix*) | |
19037 | FLOAT_H=float.h | |
19038 | ;; | |
19039 | freebsd* | dragonfly*) | |
19040 | case "$host_cpu" in | |
19041 | i[34567]86 ) | |
19042 | FLOAT_H=float.h | |
19043 | ;; | |
19044 | x86_64 ) | |
19045 | # On x86_64 systems, the C compiler may still be generating | |
19046 | # 32-bit code. | |
19047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19048 | /* end confdefs.h. */ | |
19049 | #if defined __LP64__ || defined __x86_64__ || defined __amd64__ | |
19050 | int ok; | |
19051 | #else | |
19052 | error fail | |
19053 | #endif | |
472fa5ee | 19054 | |
c0c3707f CB |
19055 | _ACEOF |
19056 | if ac_fn_c_try_compile "$LINENO"; then : | |
472fa5ee | 19057 | |
c0c3707f CB |
19058 | else |
19059 | FLOAT_H=float.h | |
19060 | fi | |
19061 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19062 | ;; | |
19063 | esac | |
19064 | ;; | |
19065 | linux*) | |
19066 | case "$host_cpu" in | |
19067 | powerpc*) | |
19068 | FLOAT_H=float.h | |
19069 | ;; | |
19070 | esac | |
19071 | ;; | |
19072 | esac | |
19073 | case "$host_os" in | |
19074 | aix* | freebsd* | dragonfly* | linux*) | |
19075 | if test -n "$FLOAT_H"; then | |
19076 | REPLACE_FLOAT_LDBL=1 | |
19077 | fi | |
19078 | ;; | |
19079 | esac | |
19080 | ||
19081 | REPLACE_ITOLD=0 | |
19082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 | |
19083 | $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } | |
19084 | if ${gl_cv_func_itold_works+:} false; then : | |
5e8754f9 SDJ |
19085 | $as_echo_n "(cached) " >&6 |
19086 | else | |
19087 | ||
19088 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
19089 | case "$host" in |
19090 | sparc*-*-linux*) | |
19091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19092 | /* end confdefs.h. */ | |
19093 | #if defined __LP64__ || defined __arch64__ | |
19094 | int ok; | |
19095 | #else | |
19096 | error fail | |
19097 | #endif | |
19098 | ||
19099 | _ACEOF | |
19100 | if ac_fn_c_try_compile "$LINENO"; then : | |
19101 | gl_cv_func_itold_works="guessing no" | |
19102 | else | |
19103 | gl_cv_func_itold_works="guessing yes" | |
19104 | fi | |
19105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19106 | ;; | |
19107 | # Guess yes on native Windows. | |
19108 | mingw*) gl_cv_func_itold_works="guessing yes" ;; | |
19109 | *) gl_cv_func_itold_works="guessing yes" ;; | |
5e8754f9 SDJ |
19110 | esac |
19111 | ||
19112 | else | |
19113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19114 | /* end confdefs.h. */ | |
19115 | ||
c0c3707f CB |
19116 | int i = -1; |
19117 | volatile long double ld; | |
19118 | int main () | |
5e8754f9 | 19119 | { |
c0c3707f CB |
19120 | ld += i * 1.0L; |
19121 | if (ld > 0) | |
19122 | return 1; | |
19123 | return 0; | |
5e8754f9 SDJ |
19124 | } |
19125 | _ACEOF | |
19126 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 19127 | gl_cv_func_itold_works=yes |
5e8754f9 | 19128 | else |
c0c3707f | 19129 | gl_cv_func_itold_works=no |
5e8754f9 SDJ |
19130 | fi |
19131 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19132 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19133 | fi | |
19134 | ||
98399780 | 19135 | |
5e8754f9 | 19136 | fi |
c0c3707f CB |
19137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 |
19138 | $as_echo "$gl_cv_func_itold_works" >&6; } | |
19139 | case "$gl_cv_func_itold_works" in | |
19140 | *no) | |
19141 | REPLACE_ITOLD=1 | |
19142 | FLOAT_H=float.h | |
19143 | ;; | |
19144 | esac | |
98399780 | 19145 | |
c0c3707f | 19146 | if test -n "$FLOAT_H"; then |
98399780 YQ |
19147 | |
19148 | ||
19149 | ||
19150 | ||
6a29c58e YQ |
19151 | |
19152 | ||
19153 | ||
19154 | ||
c0c3707f CB |
19155 | if test $gl_cv_have_include_next = yes; then |
19156 | gl_cv_next_float_h='<'float.h'>' | |
19157 | else | |
19158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5 | |
19159 | $as_echo_n "checking absolute name of <float.h>... " >&6; } | |
19160 | if ${gl_cv_next_float_h+:} false; then : | |
19161 | $as_echo_n "(cached) " >&6 | |
19162 | else | |
19163 | ||
19164 | ||
19165 | ||
19166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19167 | /* end confdefs.h. */ | |
19168 | #include <float.h> | |
19169 | _ACEOF | |
19170 | case "$host_os" in | |
19171 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19172 | *) gl_absname_cpp="$ac_cpp" ;; | |
19173 | esac | |
19174 | ||
19175 | case "$host_os" in | |
19176 | mingw*) | |
19177 | gl_dirsep_regex='[/\\]' | |
19178 | ;; | |
19179 | *) | |
19180 | gl_dirsep_regex='\/' | |
19181 | ;; | |
19182 | esac | |
19183 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
19184 | gl_header_literal_regex=`echo 'float.h' \ | |
19185 | | sed -e "$gl_make_literal_regex_sed"` | |
19186 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19187 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19188 | s|^/[^/]|//&| | |
19189 | p | |
19190 | q | |
19191 | }' | |
19192 | ||
19193 | gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19194 | sed -n "$gl_absolute_header_sed"` | |
19195 | ||
19196 | gl_header=$gl_cv_absolute_float_h | |
19197 | gl_cv_next_float_h='"'$gl_header'"' | |
19198 | ||
19199 | ||
19200 | fi | |
19201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 | |
19202 | $as_echo "$gl_cv_next_float_h" >&6; } | |
19203 | fi | |
19204 | NEXT_FLOAT_H=$gl_cv_next_float_h | |
19205 | ||
19206 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
19207 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19208 | gl_next_as_first_directive='<'float.h'>' | |
19209 | else | |
19210 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19211 | gl_next_as_first_directive=$gl_cv_next_float_h | |
19212 | fi | |
19213 | NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive | |
19214 | ||
19215 | ||
19216 | ||
6a29c58e | 19217 | |
c0c3707f | 19218 | fi |
6a29c58e | 19219 | |
c0c3707f CB |
19220 | if test -n "$FLOAT_H"; then |
19221 | GL_GENERATE_FLOAT_H_TRUE= | |
19222 | GL_GENERATE_FLOAT_H_FALSE='#' | |
19223 | else | |
19224 | GL_GENERATE_FLOAT_H_TRUE='#' | |
19225 | GL_GENERATE_FLOAT_H_FALSE= | |
19226 | fi | |
6a29c58e YQ |
19227 | |
19228 | ||
8690e634 | 19229 | |
c0c3707f | 19230 | if test $REPLACE_FLOAT_LDBL = 1; then |
8690e634 | 19231 | |
8690e634 | 19232 | |
8690e634 | 19233 | |
8690e634 | 19234 | |
8690e634 | 19235 | |
8690e634 | 19236 | |
8690e634 | 19237 | |
4a626d0a | 19238 | |
c0c3707f | 19239 | gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" |
8690e634 | 19240 | |
c0c3707f CB |
19241 | fi |
19242 | if test $REPLACE_ITOLD = 1; then | |
8690e634 JK |
19243 | |
19244 | ||
19245 | ||
19246 | ||
19247 | ||
19248 | ||
63ce7108 | 19249 | |
e26b6bb0 | 19250 | |
c0c3707f | 19251 | gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" |
e26b6bb0 | 19252 | |
c0c3707f | 19253 | fi |
e26b6bb0 TT |
19254 | |
19255 | ||
19256 | ||
19257 | ||
c0c3707f CB |
19258 | gl_fnmatch_required_lowercase=` |
19259 | echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' | |
19260 | ` | |
e26b6bb0 | 19261 | |
c0c3707f CB |
19262 | if test $ac_cv_func_fnmatch = no; then |
19263 | HAVE_FNMATCH=0 | |
19264 | else | |
19265 | gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" | |
19266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 | |
19267 | $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } | |
19268 | if eval \${$gl_fnmatch_cache_var+:} false; then : | |
5e8754f9 SDJ |
19269 | $as_echo_n "(cached) " >&6 |
19270 | else | |
c0c3707f CB |
19271 | if test $gl_fnmatch_required = GNU; then |
19272 | gl_fnmatch_gnu_start= | |
19273 | gl_fnmatch_gnu_end= | |
19274 | else | |
19275 | gl_fnmatch_gnu_start='#if 0' | |
19276 | gl_fnmatch_gnu_end='#endif' | |
19277 | fi | |
19278 | if test "$cross_compiling" = yes; then : | |
19279 | case "$host_os" in | |
19280 | # Guess yes on musl systems. | |
19281 | *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;; | |
19282 | # Guess no otherwise, even on glibc systems. | |
19283 | *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;; | |
19284 | esac | |
e26b6bb0 | 19285 | |
c0c3707f CB |
19286 | else |
19287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e8754f9 | 19288 | /* end confdefs.h. */ |
c0c3707f CB |
19289 | #include <fnmatch.h> |
19290 | static int | |
19291 | y (char const *pattern, char const *string, int flags) | |
19292 | { | |
19293 | return fnmatch (pattern, string, flags) == 0; | |
19294 | } | |
19295 | static int | |
19296 | n (char const *pattern, char const *string, int flags) | |
19297 | { | |
19298 | return fnmatch (pattern, string, flags) == FNM_NOMATCH; | |
19299 | } | |
19300 | ||
5e8754f9 SDJ |
19301 | int |
19302 | main () | |
19303 | { | |
c0c3707f CB |
19304 | char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; |
19305 | char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; | |
19306 | static char const A_1[] = { 'A' - 1, 0 }; | |
19307 | static char const A01[] = { 'A' + 1, 0 }; | |
19308 | static char const a_1[] = { 'a' - 1, 0 }; | |
19309 | static char const a01[] = { 'a' + 1, 0 }; | |
19310 | static char const bs_1[] = { '\\\\' - 1, 0 }; | |
19311 | static char const bs01[] = { '\\\\' + 1, 0 }; | |
19312 | int result = 0; | |
19313 | if (!n ("a*", "", 0)) | |
19314 | return 1; | |
19315 | if (!y ("a*", "abc", 0)) | |
19316 | return 1; | |
19317 | if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ | |
19318 | return 1; | |
19319 | if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) | |
19320 | return 2; | |
19321 | if (!y ("a\\\\bc", "abc", 0)) | |
19322 | return 3; | |
19323 | if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) | |
19324 | return 3; | |
19325 | if (!y ("*x", ".x", 0)) | |
19326 | return 4; | |
19327 | if (!n ("*x", ".x", FNM_PERIOD)) | |
19328 | return 4; | |
19329 | if (!y (Apat, "\\\\", 0)) | |
19330 | return 5; | |
19331 | if (!y (Apat, "A", 0)) | |
19332 | return 5; | |
19333 | if (!y (apat, "\\\\", 0)) | |
19334 | return 5; | |
19335 | if (!y (apat, "a", 0)) | |
19336 | return 5; | |
19337 | if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) | |
19338 | return 5; | |
19339 | if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) | |
19340 | return 5; | |
19341 | if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) | |
19342 | return 5; | |
19343 | if (!(y (apat, a01, 0) == ('a' < '\\\\'))) | |
19344 | return 5; | |
19345 | if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) | |
19346 | return 5; | |
19347 | if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) | |
19348 | return 5; | |
19349 | if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) | |
19350 | return 5; | |
19351 | if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) | |
19352 | return 5; | |
19353 | $gl_fnmatch_gnu_start | |
19354 | if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) | |
19355 | result |= 8; | |
19356 | if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) | |
19357 | result |= 16; | |
19358 | if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) | |
19359 | result |= 32; | |
19360 | if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19361 | result |= 64; | |
19362 | if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19363 | result |= 64; | |
19364 | if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19365 | result |= 64; | |
19366 | $gl_fnmatch_gnu_end | |
19367 | return result; | |
19368 | ||
5e8754f9 SDJ |
19369 | ; |
19370 | return 0; | |
19371 | } | |
19372 | _ACEOF | |
c0c3707f CB |
19373 | if ac_fn_c_try_run "$LINENO"; then : |
19374 | eval "$gl_fnmatch_cache_var=yes" | |
5e8754f9 | 19375 | else |
c0c3707f CB |
19376 | eval "$gl_fnmatch_cache_var=no" |
19377 | fi | |
19378 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19379 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e8754f9 | 19380 | fi |
c0c3707f | 19381 | |
e26b6bb0 | 19382 | |
5e8754f9 | 19383 | fi |
c0c3707f CB |
19384 | eval ac_res=\$$gl_fnmatch_cache_var |
19385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
19386 | $as_echo "$ac_res" >&6; } | |
19387 | eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" | |
19388 | case "$gl_fnmatch_result" in | |
19389 | *yes) ;; | |
19390 | *) REPLACE_FNMATCH=1 ;; | |
19391 | esac | |
19392 | fi | |
19393 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then | |
e26b6bb0 | 19394 | |
e26b6bb0 | 19395 | |
c0c3707f CB |
19396 | FNMATCH_H='fnmatch.h' |
19397 | if test -n "$FNMATCH_H"; then | |
19398 | GL_GENERATE_FNMATCH_H_TRUE= | |
19399 | GL_GENERATE_FNMATCH_H_FALSE='#' | |
5e8754f9 | 19400 | else |
c0c3707f CB |
19401 | GL_GENERATE_FNMATCH_H_TRUE='#' |
19402 | GL_GENERATE_FNMATCH_H_FALSE= | |
5e8754f9 | 19403 | fi |
e26b6bb0 | 19404 | |
18848e28 | 19405 | |
c0c3707f | 19406 | fi |
18848e28 | 19407 | |
c0c3707f | 19408 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then |
18848e28 | 19409 | |
18848e28 | 19410 | |
18848e28 | 19411 | |
c0c3707f CB |
19412 | |
19413 | ||
19414 | ||
19415 | ||
19416 | ||
19417 | gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" | |
19418 | ||
19419 | ||
19420 | ||
c0c3707f CB |
19421 | |
19422 | ||
19423 | fi | |
19424 | ||
19425 | ||
19426 | ||
19427 | ||
19428 | ||
19429 | GNULIB_FNMATCH=1 | |
19430 | ||
19431 | ||
19432 | ||
19433 | ||
19434 | ||
19435 | $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h | |
19436 | ||
19437 | ||
19438 | ||
19439 | ||
19440 | ||
19441 | ||
19442 | ||
19443 | ||
19444 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then | |
19445 | ||
19446 | ||
19447 | ||
19448 | ||
19449 | ||
19450 | ||
19451 | ||
19452 | ||
19453 | gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" | |
19454 | ||
19455 | ||
19456 | ||
18848e28 | 19457 | |
18848e28 | 19458 | |
5e8754f9 | 19459 | fi |
18848e28 | 19460 | |
18848e28 | 19461 | |
c0c3707f CB |
19462 | cat >>confdefs.h <<_ACEOF |
19463 | #define GNULIB_FNMATCH_GNU 1 | |
19464 | _ACEOF | |
18848e28 | 19465 | |
18848e28 | 19466 | |
18848e28 | 19467 | |
18848e28 | 19468 | |
c0c3707f CB |
19469 | if test $gl_func_frexp != yes; then |
19470 | ||
19471 | ||
18848e28 GF |
19472 | |
19473 | ||
18848e28 | 19474 | |
18848e28 | 19475 | |
18848e28 | 19476 | |
c0c3707f CB |
19477 | |
19478 | gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" | |
18848e28 GF |
19479 | |
19480 | fi | |
19481 | ||
19482 | ||
19483 | ||
19484 | ||
19485 | ||
c0c3707f | 19486 | GNULIB_FREXP=1 |
18848e28 GF |
19487 | |
19488 | ||
19489 | ||
19490 | ||
19491 | ||
c0c3707f | 19492 | $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h |
18848e28 GF |
19493 | |
19494 | ||
19495 | ||
19496 | ||
c0c3707f CB |
19497 | if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then |
19498 | ||
19499 | ||
19500 | ||
18848e28 GF |
19501 | |
19502 | ||
19503 | ||
5e8754f9 SDJ |
19504 | |
19505 | ||
c0c3707f CB |
19506 | gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" |
19507 | ||
5e8754f9 | 19508 | fi |
18848e28 | 19509 | |
6a29c58e | 19510 | |
6a29c58e | 19511 | |
6a29c58e | 19512 | |
6ec2e0f5 | 19513 | |
c0c3707f CB |
19514 | GNULIB_FREXPL=1 |
19515 | ||
19516 | ||
19517 | ||
19518 | ||
19519 | ||
19520 | $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h | |
19521 | ||
19522 | ||
19523 | ||
19524 | ||
19525 | ||
19526 | ||
19527 | ||
19528 | case "$host_os" in | |
19529 | mingw* | solaris*) | |
19530 | REPLACE_FSTAT=1 | |
19531 | ;; | |
19532 | esac | |
472fa5ee SM |
19533 | |
19534 | ||
19535 | ||
19536 | ||
19537 | ||
6ec2e0f5 SDJ |
19538 | if test $ac_cv_func_fchdir = no; then |
19539 | HAVE_FCHDIR=0 | |
6a29c58e YQ |
19540 | fi |
19541 | ||
6ec2e0f5 SDJ |
19542 | if test $HAVE_FCHDIR = 0; then |
19543 | case "$gl_cv_func_open_directory_works" in | |
19544 | *yes) ;; | |
19545 | *) | |
19546 | REPLACE_FSTAT=1 | |
19547 | ;; | |
19548 | esac | |
19549 | fi | |
6a29c58e YQ |
19550 | |
19551 | ||
6ec2e0f5 | 19552 | if test $REPLACE_FSTAT = 1; then |
6a29c58e | 19553 | |
3d99e817 AK |
19554 | |
19555 | ||
19556 | ||
3d99e817 AK |
19557 | |
19558 | ||
19559 | ||
19560 | ||
6ec2e0f5 | 19561 | gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" |
3d99e817 | 19562 | |
c0c3707f CB |
19563 | case "$host_os" in |
19564 | mingw*) | |
3d99e817 AK |
19565 | |
19566 | ||
19567 | ||
19568 | ||
19569 | ||
19570 | ||
49e4877c | 19571 | |
49e4877c | 19572 | |
c0c3707f | 19573 | gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" |
49e4877c | 19574 | |
c0c3707f CB |
19575 | ;; |
19576 | esac | |
49e4877c PA |
19577 | |
19578 | ||
c0c3707f CB |
19579 | : |
19580 | ||
19581 | fi | |
6a29c58e YQ |
19582 | |
19583 | ||
88b48903 | 19584 | |
8690e634 | 19585 | |
a512b375 | 19586 | |
c0c3707f CB |
19587 | GNULIB_FSTAT=1 |
19588 | ||
19589 | ||
19590 | ||
19591 | ||
19592 | ||
19593 | $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h | |
19594 | ||
19595 | ||
88b48903 | 19596 | |
88b48903 | 19597 | |
472fa5ee SM |
19598 | |
19599 | ||
19600 | ||
19601 | ||
19602 | ||
6ec2e0f5 SDJ |
19603 | |
19604 | if test $ac_cv_func_fstatat = no; then | |
19605 | HAVE_FSTATAT=0 | |
19606 | else | |
19607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 | |
19608 | $as_echo_n "checking whether fstatat (..., 0) works... " >&6; } | |
d0ac1c44 | 19609 | if ${gl_cv_func_fstatat_zero_flag+:} false; then : |
6ec2e0f5 SDJ |
19610 | $as_echo_n "(cached) " >&6 |
19611 | else | |
19612 | if test "$cross_compiling" = yes; then : | |
19613 | case "$host_os" in | |
19614 | aix*) gl_cv_func_fstatat_zero_flag="guessing no";; | |
19615 | *) gl_cv_func_fstatat_zero_flag="guessing yes";; | |
19616 | esac | |
88b48903 | 19617 | |
8690e634 JK |
19618 | else |
19619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19620 | /* end confdefs.h. */ | |
8690e634 | 19621 | |
6ec2e0f5 SDJ |
19622 | #include <fcntl.h> |
19623 | #include <sys/stat.h> | |
19624 | int | |
19625 | main (void) | |
19626 | { | |
19627 | struct stat a; | |
19628 | return fstatat (AT_FDCWD, ".", &a, 0) != 0; | |
19629 | } | |
19630 | ||
88b48903 WN |
19631 | _ACEOF |
19632 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 19633 | gl_cv_func_fstatat_zero_flag=yes |
88b48903 | 19634 | else |
6ec2e0f5 | 19635 | gl_cv_func_fstatat_zero_flag=no |
88b48903 WN |
19636 | fi |
19637 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19638 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19639 | fi | |
19640 | ||
19641 | ||
19642 | fi | |
6ec2e0f5 SDJ |
19643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 |
19644 | $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } | |
88b48903 | 19645 | |
6ec2e0f5 SDJ |
19646 | case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in |
19647 | *yes+*yes) ;; | |
c0c3707f CB |
19648 | *) REPLACE_FSTATAT=1 ;; |
19649 | esac | |
19650 | ||
19651 | case $host_os in | |
19652 | solaris*) | |
19653 | REPLACE_FSTATAT=1 ;; | |
19654 | esac | |
19655 | ||
19656 | case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in | |
19657 | 1,*yes) | |
88b48903 | 19658 | |
6ec2e0f5 | 19659 | $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h |
88b48903 | 19660 | |
7a6dbc2f | 19661 | ;; |
6ec2e0f5 SDJ |
19662 | esac |
19663 | fi | |
88b48903 | 19664 | |
6ec2e0f5 | 19665 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then |
88b48903 WN |
19666 | |
19667 | ||
19668 | ||
19669 | ||
19670 | ||
88b48903 | 19671 | |
4a626d0a PA |
19672 | |
19673 | ||
6ec2e0f5 SDJ |
19674 | gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" |
19675 | ||
19676 | fi | |
19677 | ||
19678 | ||
19679 | ||
4a626d0a | 19680 | |
6ec2e0f5 SDJ |
19681 | |
19682 | GNULIB_FSTATAT=1 | |
19683 | ||
19684 | ||
19685 | ||
19686 | ||
19687 | ||
19688 | $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h | |
19689 | ||
19690 | ||
19691 | ||
19692 | ||
19693 | ||
19694 | ||
19695 | ||
19696 | ||
19697 | gl_abort_bug=no | |
4a626d0a PA |
19698 | case "$host_os" in |
19699 | mingw*) | |
6ec2e0f5 | 19700 | gl_cv_func_getcwd_path_max=yes |
4a626d0a PA |
19701 | ;; |
19702 | *) | |
88b48903 | 19703 | |
88b48903 | 19704 | |
88b48903 WN |
19705 | |
19706 | ||
88b48903 | 19707 | |
6ec2e0f5 SDJ |
19708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 |
19709 | $as_echo_n "checking whether getcwd handles long file names properly... " >&6; } | |
d0ac1c44 | 19710 | if ${gl_cv_func_getcwd_path_max+:} false; then : |
6ec2e0f5 SDJ |
19711 | $as_echo_n "(cached) " >&6 |
19712 | else | |
19713 | # Arrange for deletion of the temporary directory this test creates. | |
19714 | ac_clean_files="$ac_clean_files confdir3" | |
19715 | if test "$cross_compiling" = yes; then : | |
b567ca63 | 19716 | # Cross-compilation guesses: |
c0c3707f CB |
19717 | case "$host_os" in |
19718 | aix*) # On AIX, it has the AIX bug. | |
19719 | gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;; | |
19720 | gnu*) # On Hurd, it is 'yes'. | |
19721 | gl_cv_func_getcwd_path_max='guessing yes' ;; | |
19722 | linux* | kfreebsd*) | |
19723 | # On older Linux+glibc it's 'no, but it is partly working', | |
19724 | # on newer Linux+glibc it's 'yes'. | |
19725 | # On Linux+musl libc, it's 'no, but it is partly working'. | |
19726 | # On kFreeBSD+glibc, it's 'no, but it is partly working'. | |
19727 | gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;; | |
19728 | *) # If we don't know, obey --enable-cross-guesses. | |
19729 | gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;; | |
19730 | esac | |
b567ca63 | 19731 | |
6ec2e0f5 SDJ |
19732 | else |
19733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19734 | /* end confdefs.h. */ | |
88b48903 | 19735 | |
6ec2e0f5 SDJ |
19736 | #include <errno.h> |
19737 | #include <stdlib.h> | |
19738 | #if HAVE_UNISTD_H | |
19739 | # include <unistd.h> | |
19740 | #else | |
19741 | # include <direct.h> | |
19742 | #endif | |
19743 | #include <string.h> | |
19744 | #include <limits.h> | |
19745 | #include <sys/stat.h> | |
19746 | #include <sys/types.h> | |
19747 | #include <fcntl.h> | |
88b48903 WN |
19748 | |
19749 | ||
6ec2e0f5 SDJ |
19750 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ |
19751 | #if HAVE_UNISTD_H | |
19752 | # include <unistd.h> | |
19753 | #endif | |
19754 | #include <limits.h> | |
19755 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
19756 | # include <sys/param.h> | |
19757 | #endif | |
19758 | #if !defined PATH_MAX && defined MAXPATHLEN | |
19759 | # define PATH_MAX MAXPATHLEN | |
19760 | #endif | |
19761 | #ifdef __hpux | |
19762 | # undef PATH_MAX | |
19763 | # define PATH_MAX 1024 | |
19764 | #endif | |
c0c3707f | 19765 | #if defined _WIN32 && ! defined __CYGWIN__ |
6ec2e0f5 SDJ |
19766 | # undef PATH_MAX |
19767 | # define PATH_MAX 260 | |
19768 | #endif | |
88b48903 | 19769 | |
88b48903 | 19770 | |
6ec2e0f5 SDJ |
19771 | #ifndef AT_FDCWD |
19772 | # define AT_FDCWD 0 | |
19773 | #endif | |
19774 | #ifdef ENAMETOOLONG | |
19775 | # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) | |
19776 | #else | |
19777 | # define is_ENAMETOOLONG(x) 0 | |
19778 | #endif | |
88b48903 | 19779 | |
6ec2e0f5 SDJ |
19780 | /* Use the getcwd function, not any macro. */ |
19781 | #undef getcwd | |
88b48903 | 19782 | |
6ec2e0f5 SDJ |
19783 | /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ |
19784 | #undef mkdir | |
88b48903 | 19785 | |
6ec2e0f5 SDJ |
19786 | #ifndef S_IRWXU |
19787 | # define S_IRWXU 0700 | |
19788 | #endif | |
88b48903 | 19789 | |
6ec2e0f5 SDJ |
19790 | /* The length of this name must be 8. */ |
19791 | #define DIR_NAME "confdir3" | |
19792 | #define DIR_NAME_LEN 8 | |
19793 | #define DIR_NAME_SIZE (DIR_NAME_LEN + 1) | |
88b48903 | 19794 | |
6ec2e0f5 SDJ |
19795 | /* The length of "../". */ |
19796 | #define DOTDOTSLASH_LEN 3 | |
88b48903 | 19797 | |
6ec2e0f5 SDJ |
19798 | /* Leftover bytes in the buffer, to work around library or OS bugs. */ |
19799 | #define BUF_SLOP 20 | |
88b48903 | 19800 | |
6ec2e0f5 SDJ |
19801 | int |
19802 | main () | |
19803 | { | |
19804 | #ifndef PATH_MAX | |
19805 | /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- | |
19806 | at least not on a local file system. And if we were to start worrying | |
19807 | about remote file systems, we'd have to enable the wrapper function | |
19808 | all of the time, just to be safe. That's not worth the cost. */ | |
19809 | exit (0); | |
19810 | #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ | |
19811 | - DIR_NAME_SIZE - BUF_SLOP) \ | |
19812 | <= PATH_MAX) | |
19813 | /* FIXME: Assuming there's a system for which this is true, | |
19814 | this should be done in a compile test. */ | |
19815 | exit (0); | |
19816 | #else | |
19817 | char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) | |
19818 | + DIR_NAME_SIZE + BUF_SLOP]; | |
19819 | char *cwd = getcwd (buf, PATH_MAX); | |
19820 | size_t initial_cwd_len; | |
19821 | size_t cwd_len; | |
19822 | int fail = 0; | |
19823 | size_t n_chdirs = 0; | |
88b48903 | 19824 | |
6ec2e0f5 SDJ |
19825 | if (cwd == NULL) |
19826 | exit (10); | |
88b48903 | 19827 | |
6ec2e0f5 | 19828 | cwd_len = initial_cwd_len = strlen (cwd); |
88b48903 | 19829 | |
6ec2e0f5 SDJ |
19830 | while (1) |
19831 | { | |
19832 | size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); | |
19833 | char *c = NULL; | |
19834 | ||
19835 | cwd_len += DIR_NAME_SIZE; | |
19836 | /* If mkdir or chdir fails, it could be that this system cannot create | |
19837 | any file with an absolute name longer than PATH_MAX, such as cygwin. | |
19838 | If so, leave fail as 0, because the current working directory can't | |
c0c3707f CB |
19839 | be too long for getcwd if it can't even be created. On Linux with |
19840 | the 9p file system, mkdir fails with error EINVAL when cwd_len gets | |
19841 | too long; ignore this failure because the getcwd() system call | |
19842 | produces good results whereas the gnulib substitute calls getdents64 | |
19843 | which fails with error EPROTO. | |
19844 | For other errors, be pessimistic and consider that as a failure, | |
19845 | too. */ | |
6ec2e0f5 SDJ |
19846 | if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) |
19847 | { | |
19848 | if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) | |
c0c3707f CB |
19849 | #ifdef __linux__ |
19850 | if (! (errno == EINVAL)) | |
19851 | #endif | |
19852 | fail = 20; | |
6ec2e0f5 SDJ |
19853 | break; |
19854 | } | |
88b48903 | 19855 | |
6ec2e0f5 SDJ |
19856 | if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) |
19857 | { | |
19858 | struct stat sb; | |
88b48903 | 19859 | |
6ec2e0f5 SDJ |
19860 | c = getcwd (buf, PATH_MAX); |
19861 | if (!c && errno == ENOENT) | |
19862 | { | |
19863 | fail = 11; | |
19864 | break; | |
19865 | } | |
19866 | if (c) | |
19867 | { | |
19868 | fail = 31; | |
19869 | break; | |
19870 | } | |
19871 | if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) | |
19872 | { | |
19873 | fail = 21; | |
19874 | break; | |
19875 | } | |
88b48903 | 19876 | |
6ec2e0f5 SDJ |
19877 | /* Our replacement needs to be able to stat() long ../../paths, |
19878 | so generate a path larger than PATH_MAX to check, | |
19879 | avoiding the replacement if we can't stat(). */ | |
19880 | c = getcwd (buf, cwd_len + 1); | |
19881 | if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno)) | |
19882 | { | |
19883 | fail = 32; | |
19884 | break; | |
19885 | } | |
19886 | } | |
88b48903 | 19887 | |
6ec2e0f5 SDJ |
19888 | if (dotdot_max <= cwd_len - initial_cwd_len) |
19889 | { | |
19890 | if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) | |
19891 | break; | |
19892 | c = getcwd (buf, cwd_len + 1); | |
19893 | if (!c) | |
19894 | { | |
19895 | if (! (errno == ERANGE || errno == ENOENT | |
19896 | || is_ENAMETOOLONG (errno))) | |
19897 | { | |
19898 | fail = 22; | |
19899 | break; | |
19900 | } | |
19901 | if (AT_FDCWD || errno == ERANGE || errno == ENOENT) | |
19902 | { | |
19903 | fail = 12; | |
19904 | break; | |
19905 | } | |
19906 | } | |
19907 | } | |
88b48903 | 19908 | |
6ec2e0f5 SDJ |
19909 | if (c && strlen (c) != cwd_len) |
19910 | { | |
19911 | fail = 23; | |
19912 | break; | |
19913 | } | |
19914 | ++n_chdirs; | |
19915 | } | |
88b48903 | 19916 | |
6ec2e0f5 SDJ |
19917 | /* Leaving behind such a deep directory is not polite. |
19918 | So clean up here, right away, even though the driving | |
19919 | shell script would also clean up. */ | |
19920 | { | |
19921 | size_t i; | |
88b48903 | 19922 | |
6ec2e0f5 SDJ |
19923 | /* Try rmdir first, in case the chdir failed. */ |
19924 | rmdir (DIR_NAME); | |
19925 | for (i = 0; i <= n_chdirs; i++) | |
19926 | { | |
19927 | if (chdir ("..") < 0) | |
19928 | break; | |
19929 | if (rmdir (DIR_NAME) != 0) | |
19930 | break; | |
19931 | } | |
19932 | } | |
88b48903 | 19933 | |
6ec2e0f5 SDJ |
19934 | exit (fail); |
19935 | #endif | |
19936 | } | |
88b48903 | 19937 | |
6ec2e0f5 SDJ |
19938 | _ACEOF |
19939 | if ac_fn_c_try_run "$LINENO"; then : | |
19940 | gl_cv_func_getcwd_path_max=yes | |
19941 | else | |
19942 | case $? in | |
c0c3707f CB |
19943 | 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; |
19944 | 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; | |
19945 | 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; | |
19946 | *) gl_cv_func_getcwd_path_max=no;; | |
19947 | esac | |
6ec2e0f5 SDJ |
19948 | fi |
19949 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19950 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19951 | fi | |
88b48903 | 19952 | |
88b48903 | 19953 | |
6ec2e0f5 SDJ |
19954 | fi |
19955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 | |
19956 | $as_echo "$gl_cv_func_getcwd_path_max" >&6; } | |
88b48903 | 19957 | |
6ec2e0f5 SDJ |
19958 | case "$gl_cv_func_getcwd_null" in |
19959 | *yes) | |
88b48903 WN |
19960 | |
19961 | ||
472fa5ee SM |
19962 | |
19963 | ||
19964 | ||
472fa5ee | 19965 | |
c0c3707f CB |
19966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 |
19967 | $as_echo_n "checking for getpagesize... " >&6; } | |
19968 | if ${gl_cv_func_getpagesize+:} false; then : | |
19969 | $as_echo_n "(cached) " >&6 | |
19970 | else | |
19971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19972 | /* end confdefs.h. */ | |
19973 | #include <unistd.h> | |
19974 | int | |
19975 | main () | |
19976 | { | |
19977 | return getpagesize(); | |
19978 | ; | |
19979 | return 0; | |
19980 | } | |
472fa5ee | 19981 | |
c0c3707f CB |
19982 | _ACEOF |
19983 | if ac_fn_c_try_link "$LINENO"; then : | |
19984 | gl_cv_func_getpagesize=yes | |
19985 | else | |
19986 | gl_cv_func_getpagesize=no | |
19987 | fi | |
19988 | rm -f core conftest.err conftest.$ac_objext \ | |
19989 | conftest$ac_exeext conftest.$ac_ext | |
472fa5ee | 19990 | |
c0c3707f CB |
19991 | fi |
19992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5 | |
19993 | $as_echo "$gl_cv_func_getpagesize" >&6; } | |
88b48903 | 19994 | |
c0c3707f | 19995 | if test $gl_cv_func_getpagesize = yes; then |
88b48903 | 19996 | |
c0c3707f | 19997 | cat >>confdefs.h <<_ACEOF |
7a6dbc2f SDJ |
19998 | #define HAVE_GETPAGESIZE 1 |
19999 | _ACEOF | |
20000 | ||
c0c3707f | 20001 | fi |
6ec2e0f5 SDJ |
20002 | |
20003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 | |
20004 | $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } | |
d0ac1c44 | 20005 | if ${gl_cv_func_getcwd_abort_bug+:} false; then : |
88b48903 WN |
20006 | $as_echo_n "(cached) " >&6 |
20007 | else | |
6ec2e0f5 SDJ |
20008 | # Remove any remnants of a previous test. |
20009 | rm -rf confdir-14B--- | |
20010 | # Arrange for deletion of the temporary directory this test creates. | |
20011 | ac_clean_files="$ac_clean_files confdir-14B---" | |
20012 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
20013 | case "$host_os" in |
20014 | # Guess no on musl systems. | |
20015 | *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;; | |
20016 | # Guess yes otherwise, even on glibc systems. | |
20017 | *) gl_cv_func_getcwd_abort_bug="guessing yes" | |
20018 | esac | |
20019 | ||
88b48903 WN |
20020 | else |
20021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20022 | /* end confdefs.h. */ | |
6ec2e0f5 SDJ |
20023 | |
20024 | #include <errno.h> | |
20025 | #include <stdlib.h> | |
20026 | #if HAVE_UNISTD_H | |
20027 | # include <unistd.h> | |
20028 | #else /* on Windows with MSVC */ | |
20029 | # include <direct.h> | |
20030 | #endif | |
20031 | #include <string.h> | |
20032 | #include <sys/stat.h> | |
20033 | ||
20034 | ||
20035 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ | |
20036 | #if HAVE_UNISTD_H | |
20037 | # include <unistd.h> | |
20038 | #endif | |
20039 | #include <limits.h> | |
20040 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
20041 | # include <sys/param.h> | |
20042 | #endif | |
20043 | #if !defined PATH_MAX && defined MAXPATHLEN | |
20044 | # define PATH_MAX MAXPATHLEN | |
20045 | #endif | |
20046 | #ifdef __hpux | |
20047 | # undef PATH_MAX | |
20048 | # define PATH_MAX 1024 | |
20049 | #endif | |
c0c3707f | 20050 | #if defined _WIN32 && ! defined __CYGWIN__ |
6ec2e0f5 SDJ |
20051 | # undef PATH_MAX |
20052 | # define PATH_MAX 260 | |
20053 | #endif | |
20054 | ||
20055 | ||
20056 | /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ | |
20057 | #undef mkdir | |
20058 | ||
20059 | #ifndef S_IRWXU | |
20060 | # define S_IRWXU 0700 | |
20061 | #endif | |
20062 | ||
20063 | /* FIXME: skip the run-test altogether on systems without getpagesize. */ | |
20064 | #if ! HAVE_GETPAGESIZE | |
20065 | # define getpagesize() 0 | |
20066 | #endif | |
20067 | ||
20068 | /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than | |
20069 | the 16kB pagesize on ia64 linux. Those conditions make the code below | |
20070 | trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ | |
20071 | #define TARGET_LEN (5 * 1024) | |
88b48903 WN |
20072 | |
20073 | int | |
20074 | main () | |
20075 | { | |
6ec2e0f5 SDJ |
20076 | char *cwd; |
20077 | size_t initial_cwd_len; | |
20078 | int fail = 0; | |
20079 | ||
20080 | /* The bug is triggered when PATH_MAX < getpagesize (), so skip | |
20081 | this relatively expensive and invasive test if that's not true. */ | |
20082 | #ifdef PATH_MAX | |
20083 | int bug_possible = PATH_MAX < getpagesize (); | |
20084 | #else | |
20085 | int bug_possible = 0; | |
20086 | #endif | |
20087 | if (! bug_possible) | |
20088 | return 0; | |
8690e634 | 20089 | |
6ec2e0f5 SDJ |
20090 | cwd = getcwd (NULL, 0); |
20091 | if (cwd == NULL) | |
20092 | return 2; | |
20093 | ||
20094 | initial_cwd_len = strlen (cwd); | |
20095 | free (cwd); | |
20096 | ||
20097 | if (1) | |
20098 | { | |
20099 | static char const dir_name[] = "confdir-14B---"; | |
20100 | size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) | |
20101 | / sizeof dir_name); | |
20102 | size_t d; | |
20103 | for (d = 0; d < desired_depth; d++) | |
20104 | { | |
20105 | if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) | |
20106 | { | |
20107 | if (! (errno == ERANGE || errno == ENAMETOOLONG | |
20108 | || errno == ENOENT)) | |
20109 | fail = 3; /* Unable to construct deep hierarchy. */ | |
20110 | break; | |
20111 | } | |
20112 | } | |
20113 | ||
20114 | /* If libc has the bug in question, this invocation of getcwd | |
20115 | results in a failed assertion. */ | |
20116 | cwd = getcwd (NULL, 0); | |
20117 | if (cwd == NULL) | |
20118 | fail = 4; /* getcwd didn't assert, but it failed for a long name | |
20119 | where the answer could have been learned. */ | |
20120 | free (cwd); | |
20121 | ||
20122 | /* Call rmdir first, in case the above chdir failed. */ | |
20123 | rmdir (dir_name); | |
20124 | while (0 < d--) | |
20125 | { | |
20126 | if (chdir ("..") < 0) | |
20127 | { | |
20128 | fail = 5; | |
20129 | break; | |
20130 | } | |
20131 | rmdir (dir_name); | |
20132 | } | |
20133 | } | |
20134 | ||
20135 | return fail; | |
8690e634 | 20136 | } |
6ec2e0f5 | 20137 | |
8690e634 JK |
20138 | _ACEOF |
20139 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 20140 | gl_cv_func_getcwd_abort_bug=no |
8690e634 | 20141 | else |
c0c3707f CB |
20142 | ret=$? |
20143 | if test $ret -ge 128 || test $ret = 4; then | |
20144 | gl_cv_func_getcwd_abort_bug=yes | |
20145 | else | |
20146 | gl_cv_func_getcwd_abort_bug=no | |
20147 | fi | |
20148 | ||
8690e634 JK |
20149 | fi |
20150 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20151 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20152 | fi | |
20153 | ||
20154 | ||
20155 | fi | |
6ec2e0f5 SDJ |
20156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 |
20157 | $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } | |
c0c3707f CB |
20158 | case "$gl_cv_func_getcwd_abort_bug" in |
20159 | *yes) | |
20160 | gl_abort_bug=yes | |
20161 | ;; | |
20162 | *) | |
20163 | ||
20164 | ;; | |
20165 | esac | |
6ec2e0f5 SDJ |
20166 | |
20167 | ;; | |
20168 | esac | |
20169 | ;; | |
20170 | esac | |
20171 | case "$gl_cv_func_getcwd_path_max" in | |
c0c3707f | 20172 | *"no" | *"no, it has the AIX bug") ;; |
6ec2e0f5 SDJ |
20173 | *) |
20174 | ||
20175 | $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h | |
20176 | ||
20177 | ;; | |
20178 | esac | |
20179 | case "$gl_cv_func_getcwd_path_max" in | |
c0c3707f | 20180 | *"no, but it is partly working") |
6ec2e0f5 SDJ |
20181 | |
20182 | $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h | |
20183 | ||
20184 | ;; | |
c0c3707f | 20185 | *"yes, but with shorter paths") |
6ec2e0f5 SDJ |
20186 | |
20187 | $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h | |
20188 | ||
20189 | ;; | |
20190 | esac | |
20191 | ||
20192 | if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ | |
20193 | || test $gl_cv_func_getcwd_posix_signature != yes \ | |
20194 | || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \ | |
20195 | || test $gl_abort_bug = yes; then | |
20196 | REPLACE_GETCWD=1 | |
8690e634 JK |
20197 | fi |
20198 | ||
6ec2e0f5 | 20199 | if test $REPLACE_GETCWD = 1; then |
8690e634 JK |
20200 | |
20201 | ||
8690e634 JK |
20202 | |
20203 | ||
20204 | ||
20205 | ||
20206 | ||
20207 | ||
6ec2e0f5 | 20208 | gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" |
8690e634 JK |
20209 | |
20210 | ||
8690e634 JK |
20211 | |
20212 | ||
6ec2e0f5 SDJ |
20213 | : |
20214 | ||
20215 | fi | |
20216 | ||
8690e634 JK |
20217 | |
20218 | cat >>confdefs.h <<_ACEOF | |
6ec2e0f5 | 20219 | #define GNULIB_GETCWD 1 |
8690e634 JK |
20220 | _ACEOF |
20221 | ||
20222 | ||
8690e634 | 20223 | |
8690e634 JK |
20224 | |
20225 | ||
c971b7fa | 20226 | |
c971b7fa | 20227 | |
6ec2e0f5 SDJ |
20228 | GNULIB_GETCWD=1 |
20229 | ||
20230 | ||
20231 | ||
20232 | ||
20233 | ||
20234 | $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h | |
20235 | ||
c971b7fa | 20236 | |
c971b7fa | 20237 | |
c971b7fa | 20238 | |
c971b7fa | 20239 | |
c971b7fa | 20240 | |
c971b7fa | 20241 | |
c971b7fa | 20242 | |
6ec2e0f5 SDJ |
20243 | case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in |
20244 | *yes,yes) ;; | |
20245 | *) | |
20246 | REPLACE_GETCWD=1 | |
20247 | ;; | |
20248 | esac | |
c971b7fa | 20249 | |
6ec2e0f5 | 20250 | if test $REPLACE_GETCWD = 1; then |
c971b7fa | 20251 | |
c971b7fa PA |
20252 | |
20253 | ||
c971b7fa PA |
20254 | |
20255 | ||
c971b7fa | 20256 | |
c971b7fa | 20257 | |
c971b7fa | 20258 | |
6ec2e0f5 | 20259 | gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" |
c971b7fa | 20260 | |
6ec2e0f5 | 20261 | fi |
c971b7fa | 20262 | |
c971b7fa | 20263 | |
c971b7fa | 20264 | |
c971b7fa | 20265 | |
8690e634 | 20266 | |
6ec2e0f5 | 20267 | GNULIB_GETCWD=1 |
c971b7fa | 20268 | |
88b48903 WN |
20269 | |
20270 | ||
20271 | ||
88b48903 | 20272 | |
6ec2e0f5 | 20273 | $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h |
88b48903 | 20274 | |
88b48903 WN |
20275 | |
20276 | ||
20277 | ||
6ec2e0f5 SDJ |
20278 | |
20279 | ||
20280 | ||
20281 | ||
20282 | if test $ac_cv_func_getdtablesize = yes && | |
20283 | test $ac_cv_have_decl_getdtablesize = yes; then | |
6ec2e0f5 SDJ |
20284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 |
20285 | $as_echo_n "checking whether getdtablesize works... " >&6; } | |
d0ac1c44 | 20286 | if ${gl_cv_func_getdtablesize_works+:} false; then : |
88b48903 WN |
20287 | $as_echo_n "(cached) " >&6 |
20288 | else | |
c0c3707f CB |
20289 | case "$host_os" in |
20290 | vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; | |
20291 | *) | |
20292 | if test "$cross_compiling" = yes; then : | |
88b48903 | 20293 | case "$host_os" in |
c0c3707f CB |
20294 | cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows |
20295 | gl_cv_func_getdtablesize_works="guessing no" ;; | |
20296 | *) gl_cv_func_getdtablesize_works="guessing yes" ;; | |
20297 | esac | |
20298 | ||
88b48903 WN |
20299 | else |
20300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20301 | /* end confdefs.h. */ | |
20302 | ||
c0c3707f | 20303 | #include <unistd.h> |
6ec2e0f5 SDJ |
20304 | int |
20305 | main () | |
88b48903 | 20306 | { |
6ec2e0f5 | 20307 | int size = getdtablesize(); |
c0c3707f CB |
20308 | if (dup2 (0, getdtablesize()) != -1) |
20309 | return 1; | |
20310 | if (size != getdtablesize()) | |
20311 | return 2; | |
6ec2e0f5 SDJ |
20312 | |
20313 | ; | |
20314 | return 0; | |
88b48903 WN |
20315 | } |
20316 | _ACEOF | |
20317 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 20318 | gl_cv_func_getdtablesize_works=yes |
88b48903 | 20319 | else |
6ec2e0f5 | 20320 | gl_cv_func_getdtablesize_works=no |
88b48903 WN |
20321 | fi |
20322 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20323 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20324 | fi | |
20325 | ||
c0c3707f CB |
20326 | ;; |
20327 | esac | |
88b48903 WN |
20328 | |
20329 | fi | |
6ec2e0f5 SDJ |
20330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 |
20331 | $as_echo "$gl_cv_func_getdtablesize_works" >&6; } | |
20332 | case "$gl_cv_func_getdtablesize_works" in | |
c0c3707f | 20333 | *yes | "no (limitation)") ;; |
6ec2e0f5 | 20334 | *) REPLACE_GETDTABLESIZE=1 ;; |
88b48903 WN |
20335 | esac |
20336 | else | |
6ec2e0f5 | 20337 | HAVE_GETDTABLESIZE=0 |
88b48903 WN |
20338 | fi |
20339 | ||
6ec2e0f5 | 20340 | if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then |
88b48903 WN |
20341 | |
20342 | ||
20343 | ||
20344 | ||
20345 | ||
20346 | ||
20347 | ||
20348 | ||
6ec2e0f5 | 20349 | gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" |
88b48903 | 20350 | |
6ec2e0f5 | 20351 | : |
88b48903 WN |
20352 | fi |
20353 | ||
20354 | ||
20355 | ||
20356 | ||
20357 | ||
6ec2e0f5 | 20358 | GNULIB_GETDTABLESIZE=1 |
88b48903 WN |
20359 | |
20360 | ||
20361 | ||
88b48903 | 20362 | |
88b48903 | 20363 | |
6ec2e0f5 | 20364 | $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h |
88b48903 | 20365 | |
88b48903 | 20366 | |
88b48903 | 20367 | |
88b48903 | 20368 | |
88b48903 | 20369 | |
88b48903 | 20370 | |
88b48903 | 20371 | |
88b48903 WN |
20372 | |
20373 | ||
6ec2e0f5 SDJ |
20374 | if test $ac_cv_have_decl_getlogin_r = no; then |
20375 | HAVE_DECL_GETLOGIN_R=0 | |
20376 | fi | |
88b48903 | 20377 | |
88b48903 | 20378 | |
6ec2e0f5 SDJ |
20379 | if test $ac_cv_func_getlogin_r = no; then |
20380 | HAVE_GETLOGIN_R=0 | |
20381 | else | |
20382 | HAVE_GETLOGIN_R=1 | |
20383 | ||
20384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5 | |
20385 | $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; } | |
d0ac1c44 | 20386 | if ${gl_cv_func_getlogin_r_works+:} false; then : |
6ec2e0f5 SDJ |
20387 | $as_echo_n "(cached) " >&6 |
20388 | else | |
88b48903 | 20389 | |
6ec2e0f5 | 20390 | case "$host_os" in |
c0c3707f CB |
20391 | # Guess no on Mac OS X, OSF/1. |
20392 | darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; | |
20393 | # Guess yes otherwise. | |
20394 | *) gl_cv_func_getlogin_r_works="guessing yes" ;; | |
6ec2e0f5 SDJ |
20395 | esac |
20396 | if test "$cross_compiling" = yes; then : | |
20397 | : | |
88b48903 WN |
20398 | else |
20399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20400 | /* end confdefs.h. */ | |
20401 | ||
6ec2e0f5 | 20402 | #include <stddef.h> |
c0c3707f | 20403 | #include <string.h> |
6ec2e0f5 SDJ |
20404 | #include <unistd.h> |
20405 | #if !HAVE_DECL_GETLOGIN_R | |
88b48903 | 20406 | extern |
6ec2e0f5 | 20407 | # ifdef __cplusplus |
88b48903 | 20408 | "C" |
6ec2e0f5 SDJ |
20409 | # endif |
20410 | int getlogin_r (char *, size_t); | |
88b48903 | 20411 | #endif |
6ec2e0f5 SDJ |
20412 | int |
20413 | main (void) | |
88b48903 WN |
20414 | { |
20415 | int result = 0; | |
6ec2e0f5 SDJ |
20416 | char buf[100]; |
20417 | ||
20418 | if (getlogin_r (buf, 0) == 0) | |
c0c3707f | 20419 | result |= 1; |
6ec2e0f5 | 20420 | if (getlogin_r (buf, 1) == 0) |
c0c3707f CB |
20421 | result |= 2; |
20422 | if (getlogin_r (buf, 100) == 0) | |
20423 | { | |
20424 | size_t n = strlen (buf); | |
20425 | if (getlogin_r (buf, n) == 0) | |
20426 | result |= 4; | |
20427 | } | |
88b48903 WN |
20428 | return result; |
20429 | } | |
20430 | _ACEOF | |
20431 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 20432 | gl_cv_func_getlogin_r_works=yes |
88b48903 | 20433 | else |
c0c3707f | 20434 | gl_cv_func_getlogin_r_works=no |
88b48903 WN |
20435 | fi |
20436 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20437 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20438 | fi | |
20439 | ||
20440 | ||
4a626d0a | 20441 | fi |
6ec2e0f5 SDJ |
20442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5 |
20443 | $as_echo "$gl_cv_func_getlogin_r_works" >&6; } | |
20444 | case "$gl_cv_func_getlogin_r_works" in | |
20445 | *yes) ;; | |
20446 | *) REPLACE_GETLOGIN_R=1 ;; | |
20447 | esac | |
20448 | fi | |
20449 | ||
20450 | if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then | |
20451 | ||
20452 | ||
20453 | ||
20454 | ||
20455 | ||
20456 | ||
20457 | ||
20458 | ||
20459 | gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext" | |
4a626d0a | 20460 | |
4a626d0a | 20461 | |
4a626d0a | 20462 | |
4a626d0a | 20463 | |
4a626d0a PA |
20464 | fi |
20465 | ||
20466 | ||
4a626d0a PA |
20467 | |
20468 | ||
20469 | ||
6ec2e0f5 | 20470 | GNULIB_GETLOGIN_R=1 |
4a626d0a PA |
20471 | |
20472 | ||
20473 | ||
20474 | ||
20475 | ||
6ec2e0f5 | 20476 | $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h |
4a626d0a | 20477 | |
4a626d0a PA |
20478 | |
20479 | ||
20480 | ||
20481 | ||
472fa5ee | 20482 | |
4a626d0a | 20483 | |
6ec2e0f5 SDJ |
20484 | ac_found=0 |
20485 | ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h> | |
20486 | " | |
d0ac1c44 | 20487 | if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : |
6ec2e0f5 SDJ |
20488 | ac_have_decl=1 |
20489 | else | |
20490 | ac_have_decl=0 | |
20491 | fi | |
20492 | ||
20493 | cat >>confdefs.h <<_ACEOF | |
20494 | #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl | |
20495 | _ACEOF | |
20496 | if test $ac_have_decl = 1; then : | |
20497 | ac_found=1 | |
20498 | fi | |
20499 | ||
20500 | ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h> | |
20501 | " | |
d0ac1c44 | 20502 | if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : |
6ec2e0f5 SDJ |
20503 | ac_have_decl=1 |
20504 | else | |
20505 | ac_have_decl=0 | |
20506 | fi | |
20507 | ||
20508 | cat >>confdefs.h <<_ACEOF | |
20509 | #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl | |
20510 | _ACEOF | |
20511 | if test $ac_have_decl = 1; then : | |
20512 | ac_found=1 | |
20513 | fi | |
4a626d0a | 20514 | |
6ec2e0f5 SDJ |
20515 | ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h> |
20516 | " | |
d0ac1c44 | 20517 | if test "x$ac_cv_have_decl___argv" = xyes; then : |
6ec2e0f5 SDJ |
20518 | ac_have_decl=1 |
20519 | else | |
20520 | ac_have_decl=0 | |
20521 | fi | |
4a626d0a | 20522 | |
6ec2e0f5 SDJ |
20523 | cat >>confdefs.h <<_ACEOF |
20524 | #define HAVE_DECL___ARGV $ac_have_decl | |
20525 | _ACEOF | |
20526 | if test $ac_have_decl = 1; then : | |
20527 | ac_found=1 | |
20528 | fi | |
4a626d0a PA |
20529 | |
20530 | ||
6ec2e0f5 SDJ |
20531 | # Incur the cost of this test only if none of the above worked. |
20532 | if test $ac_found = 0; then | |
20533 | # On OpenBSD 5.1, using the global __progname variable appears to be | |
20534 | # the only way to implement getprogname. | |
20535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5 | |
20536 | $as_echo_n "checking whether __progname is defined in default libraries... " >&6; } | |
d0ac1c44 | 20537 | if ${gl_cv_var___progname+:} false; then : |
6ec2e0f5 SDJ |
20538 | $as_echo_n "(cached) " >&6 |
20539 | else | |
4a626d0a | 20540 | |
6ec2e0f5 SDJ |
20541 | gl_cv_var___progname= |
20542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20543 | /* end confdefs.h. */ | |
20544 | extern char *__progname; | |
20545 | int | |
20546 | main () | |
20547 | { | |
20548 | return *__progname; | |
20549 | ||
20550 | ; | |
20551 | return 0; | |
20552 | } | |
20553 | _ACEOF | |
20554 | if ac_fn_c_try_link "$LINENO"; then : | |
20555 | gl_cv_var___progname=yes | |
20556 | ||
20557 | fi | |
20558 | rm -f core conftest.err conftest.$ac_objext \ | |
20559 | conftest$ac_exeext conftest.$ac_ext | |
20560 | ||
20561 | ||
20562 | fi | |
20563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5 | |
20564 | $as_echo "$gl_cv_var___progname" >&6; } | |
20565 | if test "$gl_cv_var___progname" = yes; then | |
20566 | ||
20567 | $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h | |
20568 | ||
20569 | fi | |
20570 | fi | |
4a626d0a PA |
20571 | |
20572 | ||
20573 | ||
20574 | ||
20575 | ||
698be2d8 CB |
20576 | if test "$ac_cv_func_getrandom" != yes; then |
20577 | HAVE_GETRANDOM=0 | |
20578 | else | |
20579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5 | |
20580 | $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; } | |
20581 | if ${gl_cv_func_getrandom_ok+:} false; then : | |
20582 | $as_echo_n "(cached) " >&6 | |
20583 | else | |
20584 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20585 | /* end confdefs.h. */ | |
20586 | /* Additional includes are needed before <sys/random.h> on Mac OS X. */ | |
20587 | #include <sys/types.h> | |
20588 | #include <stdlib.h> | |
20589 | #include <sys/random.h> | |
20590 | ssize_t getrandom (void *, size_t, unsigned int); | |
20591 | ||
20592 | int | |
20593 | main () | |
20594 | { | |
20595 | ||
20596 | ; | |
20597 | return 0; | |
20598 | } | |
20599 | ||
20600 | _ACEOF | |
20601 | if ac_fn_c_try_compile "$LINENO"; then : | |
20602 | gl_cv_func_getrandom_ok=yes | |
20603 | else | |
20604 | gl_cv_func_getrandom_ok=no | |
20605 | fi | |
20606 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20607 | ||
20608 | fi | |
20609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5 | |
20610 | $as_echo "$gl_cv_func_getrandom_ok" >&6; } | |
20611 | if test $gl_cv_func_getrandom_ok = no; then | |
20612 | REPLACE_GETRANDOM=1 | |
20613 | fi | |
20614 | fi | |
20615 | ||
20616 | case "$host_os" in | |
20617 | mingw*) | |
20618 | for ac_header in bcrypt.h | |
20619 | do : | |
20620 | ac_fn_c_check_header_mongrel "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "$ac_includes_default" | |
20621 | if test "x$ac_cv_header_bcrypt_h" = xyes; then : | |
20622 | cat >>confdefs.h <<_ACEOF | |
20623 | #define HAVE_BCRYPT_H 1 | |
20624 | _ACEOF | |
20625 | ||
20626 | fi | |
20627 | ||
20628 | done | |
20629 | ||
20630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5 | |
20631 | $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; } | |
20632 | if ${gl_cv_lib_assume_bcrypt+:} false; then : | |
20633 | $as_echo_n "(cached) " >&6 | |
20634 | else | |
20635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20636 | /* end confdefs.h. */ | |
20637 | #include <windows.h> | |
20638 | int | |
20639 | main () | |
20640 | { | |
20641 | #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7) | |
20642 | cannot assume it | |
20643 | #endif | |
20644 | ||
20645 | ; | |
20646 | return 0; | |
20647 | } | |
20648 | ||
20649 | _ACEOF | |
20650 | if ac_fn_c_try_compile "$LINENO"; then : | |
20651 | gl_cv_lib_assume_bcrypt=yes | |
20652 | else | |
20653 | gl_cv_lib_assume_bcrypt=no | |
20654 | fi | |
20655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20656 | ||
20657 | fi | |
20658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5 | |
20659 | $as_echo "$gl_cv_lib_assume_bcrypt" >&6; } | |
20660 | if test $gl_cv_lib_assume_bcrypt = yes; then | |
20661 | ||
20662 | $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h | |
20663 | ||
20664 | LIB_GETRANDOM='-lbcrypt' | |
20665 | else | |
20666 | LIB_GETRANDOM='-ladvapi32' | |
20667 | fi | |
20668 | ;; | |
20669 | *) | |
20670 | LIB_GETRANDOM= ;; | |
20671 | esac | |
20672 | ||
20673 | ||
20674 | if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then | |
20675 | ||
20676 | ||
20677 | ||
20678 | ||
20679 | ||
20680 | ||
20681 | ||
20682 | ||
20683 | gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext" | |
20684 | ||
20685 | fi | |
20686 | ||
20687 | ||
20688 | ||
20689 | ||
20690 | ||
20691 | GNULIB_GETRANDOM=1 | |
20692 | ||
20693 | ||
20694 | ||
20695 | ||
20696 | ||
20697 | $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h | |
20698 | ||
20699 | ||
20700 | ||
20701 | ||
20702 | ||
20703 | ||
20704 | ||
4a626d0a PA |
20705 | |
20706 | ||
20707 | ||
472fa5ee | 20708 | |
4a626d0a PA |
20709 | |
20710 | gl_gettimeofday_timezone=void | |
20711 | if test $ac_cv_func_gettimeofday != yes; then | |
20712 | HAVE_GETTIMEOFDAY=0 | |
20713 | else | |
20714 | ||
20715 | ||
20716 | ||
c0c3707f | 20717 | |
4a626d0a PA |
20718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 |
20719 | $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } | |
d0ac1c44 | 20720 | if ${gl_cv_func_gettimeofday_clobber+:} false; then : |
4a626d0a PA |
20721 | $as_echo_n "(cached) " >&6 |
20722 | else | |
20723 | if test "$cross_compiling" = yes; then : | |
20724 | # When cross-compiling: | |
20725 | case "$host_os" in | |
c0c3707f CB |
20726 | # Guess all is fine on glibc systems. |
20727 | *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
20728 | # Guess all is fine on musl systems. | |
20729 | *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
20730 | # Guess no on native Windows. | |
20731 | mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
20732 | # If we don't know, obey --enable-cross-guesses. | |
20733 | *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;; | |
4a626d0a PA |
20734 | esac |
20735 | ||
20736 | else | |
20737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20738 | /* end confdefs.h. */ | |
20739 | #include <string.h> | |
20740 | #include <sys/time.h> | |
20741 | #include <time.h> | |
20742 | #include <stdlib.h> | |
20743 | ||
20744 | int | |
20745 | main () | |
20746 | { | |
20747 | ||
20748 | time_t t = 0; | |
20749 | struct tm *lt; | |
20750 | struct tm saved_lt; | |
20751 | struct timeval tv; | |
20752 | lt = localtime (&t); | |
20753 | saved_lt = *lt; | |
20754 | gettimeofday (&tv, NULL); | |
20755 | return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; | |
20756 | ||
20757 | ; | |
20758 | return 0; | |
20759 | } | |
20760 | _ACEOF | |
20761 | if ac_fn_c_try_run "$LINENO"; then : | |
20762 | gl_cv_func_gettimeofday_clobber=no | |
20763 | else | |
20764 | gl_cv_func_gettimeofday_clobber=yes | |
20765 | fi | |
20766 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20767 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20768 | fi | |
20769 | ||
20770 | fi | |
20771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 | |
20772 | $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } | |
20773 | ||
20774 | case "$gl_cv_func_gettimeofday_clobber" in | |
20775 | *yes) | |
20776 | REPLACE_GETTIMEOFDAY=1 | |
20777 | ||
c0c3707f | 20778 | $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h |
4a626d0a | 20779 | |
5e8754f9 | 20780 | |
c0c3707f CB |
20781 | |
20782 | ||
20783 | NEED_LOCALTIME_BUFFER=1 | |
20784 | REPLACE_GMTIME=1 | |
20785 | REPLACE_LOCALTIME=1 | |
5e8754f9 | 20786 | |
4a626d0a PA |
20787 | ;; |
20788 | esac | |
20789 | ||
20790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 | |
20791 | $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } | |
d0ac1c44 | 20792 | if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : |
4a626d0a PA |
20793 | $as_echo_n "(cached) " >&6 |
20794 | else | |
20795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20796 | /* end confdefs.h. */ | |
20797 | #include <sys/time.h> | |
20798 | struct timeval c; | |
20799 | int gettimeofday (struct timeval *restrict, void *restrict); | |
20800 | ||
20801 | int | |
20802 | main () | |
20803 | { | |
20804 | /* glibc uses struct timezone * rather than the POSIX void * | |
20805 | if _GNU_SOURCE is defined. However, since the only portable | |
20806 | use of gettimeofday uses NULL as the second parameter, and | |
20807 | since the glibc definition is actually more typesafe, it is | |
20808 | not worth wrapping this to get a compliant signature. */ | |
20809 | int (*f) (struct timeval *restrict, void *restrict) | |
20810 | = gettimeofday; | |
20811 | int x = f (&c, 0); | |
20812 | return !(x | c.tv_sec | c.tv_usec); | |
20813 | ||
20814 | ; | |
20815 | return 0; | |
20816 | } | |
20817 | _ACEOF | |
20818 | if ac_fn_c_try_compile "$LINENO"; then : | |
20819 | gl_cv_func_gettimeofday_posix_signature=yes | |
20820 | else | |
20821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20822 | /* end confdefs.h. */ | |
20823 | #include <sys/time.h> | |
20824 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | |
20825 | ||
20826 | int | |
20827 | main () | |
20828 | { | |
20829 | ||
20830 | ; | |
20831 | return 0; | |
20832 | } | |
20833 | _ACEOF | |
20834 | if ac_fn_c_try_compile "$LINENO"; then : | |
20835 | gl_cv_func_gettimeofday_posix_signature=almost | |
20836 | else | |
20837 | gl_cv_func_gettimeofday_posix_signature=no | |
20838 | fi | |
20839 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20840 | fi | |
20841 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20842 | fi | |
20843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 | |
20844 | $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } | |
20845 | if test $gl_cv_func_gettimeofday_posix_signature = almost; then | |
20846 | gl_gettimeofday_timezone='struct timezone' | |
20847 | elif test $gl_cv_func_gettimeofday_posix_signature != yes; then | |
20848 | REPLACE_GETTIMEOFDAY=1 | |
20849 | fi | |
20850 | if test $REPLACE_STRUCT_TIMEVAL = 1; then | |
20851 | REPLACE_GETTIMEOFDAY=1 | |
20852 | fi | |
c0c3707f CB |
20853 | case "$host_os" in |
20854 | mingw*) REPLACE_GETTIMEOFDAY=1 ;; | |
20855 | esac | |
4a626d0a PA |
20856 | fi |
20857 | ||
20858 | cat >>confdefs.h <<_ACEOF | |
c0c3707f CB |
20859 | #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone |
20860 | _ACEOF | |
88b48903 WN |
20861 | |
20862 | ||
c0c3707f | 20863 | if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then |
88b48903 | 20864 | |
6ec2e0f5 | 20865 | |
6ec2e0f5 | 20866 | |
6ec2e0f5 | 20867 | |
6ec2e0f5 | 20868 | |
6ec2e0f5 SDJ |
20869 | |
20870 | ||
6ec2e0f5 | 20871 | |
c0c3707f | 20872 | gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" |
6ec2e0f5 | 20873 | |
c0c3707f | 20874 | : |
5e8754f9 | 20875 | fi |
6ec2e0f5 SDJ |
20876 | |
20877 | ||
20878 | ||
6ec2e0f5 SDJ |
20879 | |
20880 | ||
5e8754f9 | 20881 | GNULIB_GETTIMEOFDAY=1 |
6ec2e0f5 SDJ |
20882 | |
20883 | ||
20884 | ||
7a6dbc2f SDJ |
20885 | |
20886 | ||
5e8754f9 | 20887 | $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h |
6ec2e0f5 SDJ |
20888 | |
20889 | ||
20890 | ||
6ec2e0f5 | 20891 | |
6ec2e0f5 | 20892 | |
6ec2e0f5 SDJ |
20893 | |
20894 | ||
c0c3707f CB |
20895 | if test $ac_cv_func_glob = no; then |
20896 | HAVE_GLOB=0 | |
20897 | else | |
20898 | ||
20899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5 | |
20900 | $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; } | |
20901 | if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then : | |
6ec2e0f5 SDJ |
20902 | $as_echo_n "(cached) " >&6 |
20903 | else | |
20904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20905 | /* end confdefs.h. */ | |
20906 | #include <gnu-versions.h> | |
c0c3707f | 20907 | char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1]; |
6ec2e0f5 SDJ |
20908 | _ACEOF |
20909 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 20910 | gl_cv_gnu_glob_interface_version_1_2=yes |
6ec2e0f5 | 20911 | else |
c0c3707f | 20912 | gl_cv_gnu_glob_interface_version_1_2=no |
6ec2e0f5 SDJ |
20913 | fi |
20914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20915 | fi | |
c0c3707f CB |
20916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5 |
20917 | $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; } | |
20918 | if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then | |
20919 | REPLACE_GLOB=1 | |
6ec2e0f5 | 20920 | fi |
6ec2e0f5 | 20921 | |
c0c3707f CB |
20922 | if test $REPLACE_GLOB = 0; then |
20923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5 | |
6ec2e0f5 | 20924 | $as_echo_n "checking whether glob lists broken symlinks... " >&6; } |
d0ac1c44 | 20925 | if ${gl_cv_glob_lists_symlinks+:} false; then : |
6ec2e0f5 SDJ |
20926 | $as_echo_n "(cached) " >&6 |
20927 | else | |
c0c3707f CB |
20928 | if test $cross_compiling != yes; then |
20929 | if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then | |
20930 | gl_cv_glob_lists_symlinks=maybe | |
20931 | else | |
20932 | # If we can't make a symlink, then we cannot test this issue. Be | |
20933 | # pessimistic about this. | |
20934 | gl_cv_glob_lists_symlinks=no | |
20935 | fi | |
20936 | if test $gl_cv_glob_lists_symlinks = maybe; then | |
20937 | if test "$cross_compiling" = yes; then : | |
20938 | : | |
5e8754f9 | 20939 | |
6ec2e0f5 SDJ |
20940 | else |
20941 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20942 | /* end confdefs.h. */ | |
6ec2e0f5 | 20943 | #include <stddef.h> |
c0c3707f | 20944 | #include <glob.h> |
6ec2e0f5 SDJ |
20945 | int |
20946 | main () | |
20947 | { | |
20948 | glob_t found; | |
c0c3707f CB |
20949 | if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) |
20950 | return 1; | |
698be2d8 | 20951 | globfree (&found); |
c0c3707f | 20952 | |
6ec2e0f5 SDJ |
20953 | ; |
20954 | return 0; | |
20955 | } | |
4a626d0a | 20956 | _ACEOF |
6ec2e0f5 SDJ |
20957 | if ac_fn_c_try_run "$LINENO"; then : |
20958 | gl_cv_glob_lists_symlinks=yes | |
20959 | else | |
20960 | gl_cv_glob_lists_symlinks=no | |
20961 | fi | |
20962 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20963 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20964 | fi | |
88b48903 | 20965 | |
c0c3707f CB |
20966 | fi |
20967 | rm -f conf$$-globtest | |
20968 | else | |
20969 | gl_cv_glob_lists_symlinks="$gl_cross_guess_normal" | |
20970 | fi | |
20971 | ||
4a626d0a | 20972 | fi |
6ec2e0f5 SDJ |
20973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5 |
20974 | $as_echo "$gl_cv_glob_lists_symlinks" >&6; } | |
c0c3707f CB |
20975 | case "$gl_cv_glob_lists_symlinks" in |
20976 | *yes) ;; | |
20977 | *) REPLACE_GLOB=1 ;; | |
20978 | esac | |
20979 | fi | |
20980 | ||
20981 | fi | |
88b48903 | 20982 | |
c0c3707f CB |
20983 | if test $ac_cv_func_glob_pattern_p = no; then |
20984 | HAVE_GLOB_PATTERN_P=0 | |
20985 | else | |
20986 | if test $REPLACE_GLOB = 1; then | |
20987 | REPLACE_GLOB_PATTERN_P=1 | |
6ec2e0f5 SDJ |
20988 | fi |
20989 | fi | |
4a626d0a | 20990 | |
c0c3707f | 20991 | if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then |
4a626d0a | 20992 | |
88b48903 | 20993 | |
c0c3707f | 20994 | GLOB_H='glob.h' |
6ec2e0f5 SDJ |
20995 | if test -n "$GLOB_H"; then |
20996 | GL_GENERATE_GLOB_H_TRUE= | |
20997 | GL_GENERATE_GLOB_H_FALSE='#' | |
20998 | else | |
20999 | GL_GENERATE_GLOB_H_TRUE='#' | |
21000 | GL_GENERATE_GLOB_H_FALSE= | |
21001 | fi | |
88b48903 | 21002 | |
88b48903 | 21003 | |
c0c3707f CB |
21004 | fi |
21005 | ||
21006 | if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then | |
472fa5ee SM |
21007 | |
21008 | ||
21009 | ||
21010 | ||
21011 | ||
21012 | ||
21013 | ||
21014 | ||
21015 | gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext" | |
21016 | ||
21017 | ||
21018 | ||
7a6dbc2f SDJ |
21019 | |
21020 | ||
21021 | ||
472fa5ee | 21022 | |
472fa5ee | 21023 | |
88b48903 | 21024 | |
c0c3707f | 21025 | gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext" |
88b48903 WN |
21026 | |
21027 | ||
21028 | ||
725e2999 JB |
21029 | |
21030 | ||
21031 | ||
c0c3707f CB |
21032 | fi |
21033 | if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then | |
21034 | ||
725e2999 JB |
21035 | |
21036 | ||
21037 | ||
21038 | ||
21039 | ||
21040 | ||
21041 | ||
c0c3707f | 21042 | gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext" |
725e2999 JB |
21043 | |
21044 | fi | |
21045 | ||
725e2999 JB |
21046 | |
21047 | ||
21048 | ||
21049 | ||
c0c3707f CB |
21050 | GNULIB_GLOB=1 |
21051 | ||
21052 | ||
21053 | ||
21054 | ||
21055 | ||
21056 | $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h | |
21057 | ||
21058 | ||
725e2999 JB |
21059 | |
21060 | ||
21061 | ||
5df4cba6 SM |
21062 | LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" |
21063 | ||
21064 | ||
725e2999 | 21065 | |
725e2999 JB |
21066 | |
21067 | ||
21068 | ||
21069 | ||
725e2999 | 21070 | |
c0c3707f CB |
21071 | HAVE_INET_NTOP=1 |
21072 | INET_NTOP_LIB= | |
725e2999 JB |
21073 | |
21074 | ||
21075 | ||
21076 | ||
21077 | if test $ac_cv_header_sys_socket_h != yes; then | |
21078 | for ac_header in winsock2.h | |
21079 | do : | |
21080 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
21081 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
21082 | cat >>confdefs.h <<_ACEOF | |
21083 | #define HAVE_WINSOCK2_H 1 | |
21084 | _ACEOF | |
21085 | ||
21086 | fi | |
21087 | ||
21088 | done | |
21089 | ||
21090 | fi | |
21091 | if test "$ac_cv_header_winsock2_h" = yes; then | |
21092 | HAVE_WINSOCK2_H=1 | |
21093 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
21094 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
21095 | else | |
21096 | HAVE_WINSOCK2_H=0 | |
21097 | fi | |
21098 | ||
21099 | ||
21100 | if test $HAVE_WINSOCK2_H = 1; then | |
c0c3707f | 21101 | REPLACE_INET_NTOP=1 |
725e2999 JB |
21102 | ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h> |
21103 | " | |
21104 | if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : | |
21105 | ac_have_decl=1 | |
21106 | else | |
21107 | ac_have_decl=0 | |
21108 | fi | |
21109 | ||
21110 | cat >>confdefs.h <<_ACEOF | |
21111 | #define HAVE_DECL_INET_NTOP $ac_have_decl | |
21112 | _ACEOF | |
21113 | ||
21114 | if test $ac_cv_have_decl_inet_ntop = yes; then | |
725e2999 JB |
21115 | INET_NTOP_LIB="-lws2_32" |
21116 | else | |
21117 | HAVE_DECL_INET_NTOP=0 | |
725e2999 JB |
21118 | fi |
21119 | else | |
21120 | gl_save_LIBS=$LIBS | |
21121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 | |
21122 | $as_echo_n "checking for library containing inet_ntop... " >&6; } | |
21123 | if ${ac_cv_search_inet_ntop+:} false; then : | |
21124 | $as_echo_n "(cached) " >&6 | |
21125 | else | |
21126 | ac_func_search_save_LIBS=$LIBS | |
21127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21128 | /* end confdefs.h. */ | |
21129 | ||
21130 | /* Override any GCC internal prototype to avoid an error. | |
21131 | Use char because int might match the return type of a GCC | |
21132 | builtin and then its argument prototype would still apply. */ | |
21133 | #ifdef __cplusplus | |
21134 | extern "C" | |
21135 | #endif | |
21136 | char inet_ntop (); | |
21137 | int | |
21138 | main () | |
21139 | { | |
21140 | return inet_ntop (); | |
21141 | ; | |
21142 | return 0; | |
21143 | } | |
21144 | _ACEOF | |
c0c3707f | 21145 | for ac_lib in '' nsl resolv network; do |
725e2999 JB |
21146 | if test -z "$ac_lib"; then |
21147 | ac_res="none required" | |
21148 | else | |
21149 | ac_res=-l$ac_lib | |
21150 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
21151 | fi | |
21152 | if ac_fn_c_try_link "$LINENO"; then : | |
21153 | ac_cv_search_inet_ntop=$ac_res | |
21154 | fi | |
21155 | rm -f core conftest.err conftest.$ac_objext \ | |
21156 | conftest$ac_exeext | |
21157 | if ${ac_cv_search_inet_ntop+:} false; then : | |
21158 | break | |
21159 | fi | |
21160 | done | |
21161 | if ${ac_cv_search_inet_ntop+:} false; then : | |
21162 | ||
21163 | else | |
21164 | ac_cv_search_inet_ntop=no | |
21165 | fi | |
21166 | rm conftest.$ac_ext | |
21167 | LIBS=$ac_func_search_save_LIBS | |
21168 | fi | |
21169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 | |
21170 | $as_echo "$ac_cv_search_inet_ntop" >&6; } | |
21171 | ac_res=$ac_cv_search_inet_ntop | |
21172 | if test "$ac_res" != no; then : | |
21173 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
21174 | ||
21175 | else | |
21176 | for ac_func in inet_ntop | |
21177 | do : | |
21178 | ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" | |
21179 | if test "x$ac_cv_func_inet_ntop" = xyes; then : | |
21180 | cat >>confdefs.h <<_ACEOF | |
21181 | #define HAVE_INET_NTOP 1 | |
21182 | _ACEOF | |
21183 | ||
21184 | fi | |
21185 | done | |
21186 | ||
21187 | if test $ac_cv_func_inet_ntop = no; then | |
21188 | HAVE_INET_NTOP=0 | |
21189 | fi | |
21190 | ||
21191 | fi | |
21192 | ||
21193 | LIBS=$gl_save_LIBS | |
21194 | ||
21195 | if test "$ac_cv_search_inet_ntop" != "no" \ | |
21196 | && test "$ac_cv_search_inet_ntop" != "none required"; then | |
21197 | INET_NTOP_LIB="$ac_cv_search_inet_ntop" | |
21198 | fi | |
21199 | ||
21200 | ||
725e2999 JB |
21201 | ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h> |
21202 | #if HAVE_NETDB_H | |
21203 | # include <netdb.h> | |
21204 | #endif | |
21205 | ||
21206 | " | |
21207 | if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : | |
21208 | ac_have_decl=1 | |
21209 | else | |
21210 | ac_have_decl=0 | |
21211 | fi | |
21212 | ||
21213 | cat >>confdefs.h <<_ACEOF | |
21214 | #define HAVE_DECL_INET_NTOP $ac_have_decl | |
21215 | _ACEOF | |
21216 | ||
21217 | if test $ac_cv_have_decl_inet_ntop = no; then | |
21218 | HAVE_DECL_INET_NTOP=0 | |
21219 | fi | |
21220 | fi | |
21221 | ||
21222 | ||
21223 | if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then | |
21224 | ||
21225 | ||
21226 | ||
21227 | ||
21228 | ||
21229 | ||
21230 | ||
7a6dbc2f | 21231 | |
725e2999 | 21232 | gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext" |
7a6dbc2f SDJ |
21233 | |
21234 | ||
21235 | ||
7a6dbc2f | 21236 | |
725e2999 | 21237 | fi |
7a6dbc2f SDJ |
21238 | |
21239 | ||
21240 | ||
21241 | ||
7a6dbc2f | 21242 | |
725e2999 JB |
21243 | GNULIB_INET_NTOP=1 |
21244 | ||
7a6dbc2f SDJ |
21245 | |
21246 | ||
49e4877c PA |
21247 | |
21248 | ||
88b48903 WN |
21249 | |
21250 | ||
21251 | ||
21252 | ||
21253 | PRIPTR_PREFIX= | |
21254 | if test -n "$STDINT_H"; then | |
21255 | PRIPTR_PREFIX='"l"' | |
21256 | else | |
21257 | for glpfx in '' l ll I64; do | |
21258 | case $glpfx in | |
21259 | '') gltype1='int';; | |
21260 | l) gltype1='long int';; | |
21261 | ll) gltype1='long long int';; | |
21262 | I64) gltype1='__int64';; | |
21263 | esac | |
21264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21265 | /* end confdefs.h. */ | |
21266 | #include <stdint.h> | |
21267 | extern intptr_t foo; | |
21268 | extern $gltype1 foo; | |
21269 | int | |
21270 | main () | |
21271 | { | |
21272 | ||
21273 | ; | |
21274 | return 0; | |
21275 | } | |
21276 | _ACEOF | |
21277 | if ac_fn_c_try_compile "$LINENO"; then : | |
21278 | PRIPTR_PREFIX='"'$glpfx'"' | |
21279 | fi | |
21280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21281 | test -n "$PRIPTR_PREFIX" && break | |
21282 | done | |
21283 | fi | |
21284 | ||
21285 | ||
21286 | ||
21287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 | |
21288 | $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } | |
d0ac1c44 | 21289 | if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : |
88b48903 WN |
21290 | $as_echo_n "(cached) " >&6 |
21291 | else | |
21292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21293 | /* end confdefs.h. */ | |
21294 | /* Work also in C++ mode. */ | |
21295 | #define __STDC_LIMIT_MACROS 1 | |
21296 | ||
21297 | /* Work if build is not clean. */ | |
21298 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
21299 | ||
21300 | #include <limits.h> | |
21301 | #if HAVE_STDINT_H | |
21302 | #include <stdint.h> | |
21303 | #endif | |
21304 | ||
21305 | #if defined INT32_MAX && defined INTMAX_MAX | |
21306 | #define CONDITION (INT32_MAX < INTMAX_MAX) | |
88b48903 | 21307 | #else |
5df4cba6 | 21308 | #define CONDITION (sizeof (int) < sizeof (long long int)) |
88b48903 WN |
21309 | #endif |
21310 | int test[CONDITION ? 1 : -1]; | |
21311 | int | |
21312 | main () | |
21313 | { | |
21314 | ||
21315 | ; | |
21316 | return 0; | |
21317 | } | |
21318 | _ACEOF | |
21319 | if ac_fn_c_try_compile "$LINENO"; then : | |
21320 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes | |
21321 | else | |
21322 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no | |
21323 | fi | |
21324 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21325 | fi | |
21326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 | |
21327 | $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } | |
21328 | if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then | |
21329 | INT32_MAX_LT_INTMAX_MAX=1; | |
21330 | else | |
21331 | INT32_MAX_LT_INTMAX_MAX=0; | |
21332 | fi | |
21333 | ||
21334 | ||
21335 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
21336 | ||
21337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 | |
21338 | $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } | |
d0ac1c44 | 21339 | if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : |
88b48903 WN |
21340 | $as_echo_n "(cached) " >&6 |
21341 | else | |
21342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21343 | /* end confdefs.h. */ | |
21344 | /* Work also in C++ mode. */ | |
21345 | #define __STDC_LIMIT_MACROS 1 | |
21346 | ||
21347 | /* Work if build is not clean. */ | |
21348 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
21349 | ||
21350 | #include <limits.h> | |
21351 | #if HAVE_STDINT_H | |
21352 | #include <stdint.h> | |
21353 | #endif | |
21354 | ||
21355 | #if defined INT64_MAX | |
21356 | #define CONDITION (INT64_MAX == LONG_MAX) | |
88b48903 | 21357 | #else |
5df4cba6 | 21358 | #define CONDITION (sizeof (long long int) == sizeof (long int)) |
88b48903 WN |
21359 | #endif |
21360 | int test[CONDITION ? 1 : -1]; | |
21361 | int | |
21362 | main () | |
21363 | { | |
21364 | ||
21365 | ; | |
21366 | return 0; | |
21367 | } | |
21368 | _ACEOF | |
21369 | if ac_fn_c_try_compile "$LINENO"; then : | |
21370 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes | |
21371 | else | |
21372 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=no | |
21373 | fi | |
21374 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21375 | fi | |
21376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 | |
21377 | $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } | |
21378 | if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then | |
21379 | INT64_MAX_EQ_LONG_MAX=1; | |
21380 | else | |
21381 | INT64_MAX_EQ_LONG_MAX=0; | |
21382 | fi | |
21383 | ||
21384 | ||
21385 | else | |
21386 | INT64_MAX_EQ_LONG_MAX=-1 | |
21387 | fi | |
21388 | ||
21389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 | |
21390 | $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } | |
d0ac1c44 | 21391 | if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : |
88b48903 WN |
21392 | $as_echo_n "(cached) " >&6 |
21393 | else | |
21394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21395 | /* end confdefs.h. */ | |
21396 | /* Work also in C++ mode. */ | |
21397 | #define __STDC_LIMIT_MACROS 1 | |
21398 | ||
21399 | /* Work if build is not clean. */ | |
21400 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
21401 | ||
21402 | #include <limits.h> | |
21403 | #if HAVE_STDINT_H | |
21404 | #include <stdint.h> | |
21405 | #endif | |
21406 | ||
21407 | #if defined UINT32_MAX && defined UINTMAX_MAX | |
21408 | #define CONDITION (UINT32_MAX < UINTMAX_MAX) | |
88b48903 | 21409 | #else |
5df4cba6 | 21410 | #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) |
88b48903 WN |
21411 | #endif |
21412 | int test[CONDITION ? 1 : -1]; | |
21413 | int | |
21414 | main () | |
21415 | { | |
21416 | ||
21417 | ; | |
21418 | return 0; | |
21419 | } | |
21420 | _ACEOF | |
21421 | if ac_fn_c_try_compile "$LINENO"; then : | |
21422 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes | |
21423 | else | |
21424 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no | |
21425 | fi | |
21426 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21427 | fi | |
21428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 | |
21429 | $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } | |
21430 | if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then | |
21431 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
21432 | else | |
21433 | UINT32_MAX_LT_UINTMAX_MAX=0; | |
21434 | fi | |
21435 | ||
21436 | ||
21437 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
21438 | ||
21439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 | |
21440 | $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } | |
d0ac1c44 | 21441 | if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : |
88b48903 WN |
21442 | $as_echo_n "(cached) " >&6 |
21443 | else | |
21444 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21445 | /* end confdefs.h. */ | |
21446 | /* Work also in C++ mode. */ | |
21447 | #define __STDC_LIMIT_MACROS 1 | |
21448 | ||
21449 | /* Work if build is not clean. */ | |
21450 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
21451 | ||
21452 | #include <limits.h> | |
21453 | #if HAVE_STDINT_H | |
21454 | #include <stdint.h> | |
21455 | #endif | |
21456 | ||
21457 | #if defined UINT64_MAX | |
21458 | #define CONDITION (UINT64_MAX == ULONG_MAX) | |
88b48903 | 21459 | #else |
5df4cba6 | 21460 | #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) |
88b48903 WN |
21461 | #endif |
21462 | int test[CONDITION ? 1 : -1]; | |
21463 | int | |
21464 | main () | |
21465 | { | |
21466 | ||
21467 | ; | |
21468 | return 0; | |
21469 | } | |
21470 | _ACEOF | |
21471 | if ac_fn_c_try_compile "$LINENO"; then : | |
21472 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes | |
21473 | else | |
21474 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no | |
21475 | fi | |
21476 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21477 | fi | |
21478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 | |
21479 | $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } | |
21480 | if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then | |
21481 | UINT64_MAX_EQ_ULONG_MAX=1; | |
21482 | else | |
21483 | UINT64_MAX_EQ_ULONG_MAX=0; | |
21484 | fi | |
21485 | ||
21486 | ||
21487 | else | |
21488 | UINT64_MAX_EQ_ULONG_MAX=-1 | |
21489 | fi | |
21490 | ||
21491 | ||
21492 | ||
21493 | ||
21494 | ||
698be2d8 CB |
21495 | |
21496 | ||
21497 | ||
21498 | if test $ac_cv_func_isblank = no; then | |
21499 | HAVE_ISBLANK=0 | |
21500 | fi | |
21501 | ||
21502 | if test $HAVE_ISBLANK = 0; then | |
21503 | ||
21504 | ||
21505 | ||
21506 | ||
21507 | ||
21508 | ||
21509 | ||
21510 | ||
21511 | gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" | |
21512 | ||
21513 | fi | |
21514 | ||
21515 | ||
21516 | cat >>confdefs.h <<_ACEOF | |
21517 | #define GNULIB_ISBLANK 1 | |
21518 | _ACEOF | |
21519 | ||
21520 | ||
21521 | ||
21522 | ||
21523 | ||
21524 | ||
21525 | ||
21526 | GNULIB_ISBLANK=1 | |
21527 | ||
21528 | ||
21529 | ||
21530 | ||
21531 | ||
21532 | ||
88b48903 WN |
21533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 |
21534 | $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } | |
d0ac1c44 | 21535 | if ${gl_cv_func_isnand_no_libm+:} false; then : |
88b48903 WN |
21536 | $as_echo_n "(cached) " >&6 |
21537 | else | |
21538 | ||
21539 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21540 | /* end confdefs.h. */ | |
21541 | #include <math.h> | |
21542 | #if __GNUC__ >= 4 | |
21543 | # undef isnand | |
21544 | # define isnand(x) __builtin_isnan ((double)(x)) | |
21545 | #else | |
21546 | # undef isnand | |
21547 | # define isnand(x) isnan ((double)(x)) | |
21548 | #endif | |
21549 | double x; | |
21550 | int | |
21551 | main () | |
21552 | { | |
21553 | return isnand (x); | |
21554 | ; | |
21555 | return 0; | |
21556 | } | |
21557 | _ACEOF | |
21558 | if ac_fn_c_try_link "$LINENO"; then : | |
21559 | gl_cv_func_isnand_no_libm=yes | |
21560 | else | |
21561 | gl_cv_func_isnand_no_libm=no | |
21562 | fi | |
21563 | rm -f core conftest.err conftest.$ac_objext \ | |
21564 | conftest$ac_exeext conftest.$ac_ext | |
21565 | ||
21566 | fi | |
21567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 | |
21568 | $as_echo "$gl_cv_func_isnand_no_libm" >&6; } | |
21569 | ||
21570 | gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm | |
21571 | if test $gl_cv_func_isnand_no_libm = yes; then | |
21572 | ||
21573 | $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h | |
21574 | ||
21575 | fi | |
21576 | ||
21577 | if test $gl_func_isnand_no_libm != yes; then | |
21578 | ||
21579 | ||
21580 | ||
21581 | ||
21582 | ||
21583 | ||
21584 | ||
21585 | ||
21586 | gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" | |
21587 | ||
21588 | ||
21589 | ||
21590 | ||
21591 | fi | |
21592 | ||
21593 | ||
21594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 | |
21595 | $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } | |
d0ac1c44 | 21596 | if ${gl_cv_func_isnanl_no_libm+:} false; then : |
88b48903 WN |
21597 | $as_echo_n "(cached) " >&6 |
21598 | else | |
21599 | ||
21600 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21601 | /* end confdefs.h. */ | |
21602 | #include <math.h> | |
698be2d8 CB |
21603 | #ifndef __has_builtin |
21604 | # define __has_builtin(name) 0 | |
21605 | #endif | |
21606 | #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) | |
88b48903 WN |
21607 | # undef isnanl |
21608 | # define isnanl(x) __builtin_isnanl ((long double)(x)) | |
21609 | #elif defined isnan | |
21610 | # undef isnanl | |
21611 | # define isnanl(x) isnan ((long double)(x)) | |
21612 | #endif | |
21613 | long double x; | |
21614 | int | |
21615 | main () | |
21616 | { | |
21617 | return isnanl (x); | |
21618 | ; | |
21619 | return 0; | |
21620 | } | |
21621 | _ACEOF | |
21622 | if ac_fn_c_try_link "$LINENO"; then : | |
21623 | gl_cv_func_isnanl_no_libm=yes | |
21624 | else | |
21625 | gl_cv_func_isnanl_no_libm=no | |
21626 | fi | |
21627 | rm -f core conftest.err conftest.$ac_objext \ | |
21628 | conftest$ac_exeext conftest.$ac_ext | |
21629 | ||
21630 | fi | |
21631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 | |
21632 | $as_echo "$gl_cv_func_isnanl_no_libm" >&6; } | |
21633 | ||
21634 | gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm | |
21635 | if test $gl_func_isnanl_no_libm = yes; then | |
21636 | ||
21637 | ||
21638 | ||
21639 | ||
21640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 | |
21641 | $as_echo_n "checking whether isnanl works... " >&6; } | |
d0ac1c44 | 21642 | if ${gl_cv_func_isnanl_works+:} false; then : |
88b48903 WN |
21643 | $as_echo_n "(cached) " >&6 |
21644 | else | |
21645 | ||
21646 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
21647 | case "$host_os" in |
21648 | mingw*) # Guess yes on mingw, no on MSVC. | |
21649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21650 | /* end confdefs.h. */ | |
21651 | ||
21652 | #ifdef __MINGW32__ | |
21653 | Known | |
21654 | #endif | |
21655 | ||
21656 | _ACEOF | |
21657 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
21658 | $EGREP "Known" >/dev/null 2>&1; then : | |
4a626d0a | 21659 | gl_cv_func_isnanl_works="guessing yes" |
c0c3707f CB |
21660 | else |
21661 | gl_cv_func_isnanl_works="guessing no" | |
21662 | fi | |
21663 | rm -f conftest* | |
21664 | ||
21665 | ;; | |
21666 | *) gl_cv_func_isnanl_works="guessing yes" ;; | |
21667 | esac | |
21668 | ||
88b48903 WN |
21669 | else |
21670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21671 | /* end confdefs.h. */ | |
21672 | ||
21673 | #include <float.h> | |
21674 | #include <limits.h> | |
21675 | #include <math.h> | |
698be2d8 CB |
21676 | #ifndef __has_builtin |
21677 | # define __has_builtin(name) 0 | |
21678 | #endif | |
21679 | #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) | |
88b48903 WN |
21680 | # undef isnanl |
21681 | # define isnanl(x) __builtin_isnanl ((long double)(x)) | |
21682 | #elif defined isnan | |
21683 | # undef isnanl | |
21684 | # define isnanl(x) isnan ((long double)(x)) | |
21685 | #endif | |
21686 | #define NWORDS \ | |
21687 | ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
21688 | typedef union { unsigned int word[NWORDS]; long double value; } | |
21689 | memory_long_double; | |
21690 | /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the | |
21691 | runtime type conversion. */ | |
21692 | #ifdef __sgi | |
21693 | static long double NaNl () | |
21694 | { | |
21695 | double zero = 0.0; | |
21696 | return zero / zero; | |
21697 | } | |
21698 | #else | |
21699 | # define NaNl() (0.0L / 0.0L) | |
21700 | #endif | |
21701 | int main () | |
21702 | { | |
21703 | int result = 0; | |
21704 | ||
21705 | if (!isnanl (NaNl ())) | |
21706 | result |= 1; | |
21707 | ||
21708 | { | |
21709 | memory_long_double m; | |
21710 | unsigned int i; | |
21711 | ||
21712 | /* The isnanl function should be immune against changes in the sign bit and | |
21713 | in the mantissa bits. The xor operation twiddles a bit that can only be | |
21714 | a sign bit or a mantissa bit (since the exponent never extends to | |
21715 | bit 31). */ | |
21716 | m.value = NaNl (); | |
21717 | m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); | |
21718 | for (i = 0; i < NWORDS; i++) | |
21719 | m.word[i] |= 1; | |
21720 | if (!isnanl (m.value)) | |
21721 | result |= 1; | |
21722 | } | |
21723 | ||
21724 | #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE | |
21725 | /* Representation of an 80-bit 'long double' as an initializer for a sequence | |
21726 | of 'unsigned int' words. */ | |
21727 | # ifdef WORDS_BIGENDIAN | |
21728 | # define LDBL80_WORDS(exponent,manthi,mantlo) \ | |
21729 | { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ | |
4a626d0a | 21730 | ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ |
88b48903 WN |
21731 | (unsigned int) (mantlo) << 16 \ |
21732 | } | |
21733 | # else | |
21734 | # define LDBL80_WORDS(exponent,manthi,mantlo) \ | |
21735 | { mantlo, manthi, exponent } | |
21736 | # endif | |
21737 | { /* Quiet NaN. */ | |
21738 | static memory_long_double x = | |
21739 | { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; | |
21740 | if (!isnanl (x.value)) | |
21741 | result |= 2; | |
21742 | } | |
21743 | { | |
21744 | /* Signalling NaN. */ | |
21745 | static memory_long_double x = | |
21746 | { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; | |
21747 | if (!isnanl (x.value)) | |
21748 | result |= 2; | |
21749 | } | |
4a626d0a | 21750 | /* isnanl should return something even for noncanonical values. */ |
88b48903 WN |
21751 | { /* Pseudo-NaN. */ |
21752 | static memory_long_double x = | |
21753 | { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; | |
4a626d0a | 21754 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
21755 | result |= 4; |
21756 | } | |
21757 | { /* Pseudo-Infinity. */ | |
21758 | static memory_long_double x = | |
21759 | { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; | |
4a626d0a | 21760 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
21761 | result |= 8; |
21762 | } | |
21763 | { /* Pseudo-Zero. */ | |
21764 | static memory_long_double x = | |
21765 | { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; | |
4a626d0a | 21766 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
21767 | result |= 16; |
21768 | } | |
21769 | { /* Unnormalized number. */ | |
21770 | static memory_long_double x = | |
21771 | { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; | |
4a626d0a | 21772 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
21773 | result |= 32; |
21774 | } | |
21775 | { /* Pseudo-Denormal. */ | |
21776 | static memory_long_double x = | |
21777 | { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; | |
4a626d0a | 21778 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
21779 | result |= 64; |
21780 | } | |
21781 | #endif | |
21782 | ||
21783 | return result; | |
21784 | } | |
21785 | _ACEOF | |
21786 | if ac_fn_c_try_run "$LINENO"; then : | |
21787 | gl_cv_func_isnanl_works=yes | |
21788 | else | |
21789 | gl_cv_func_isnanl_works=no | |
21790 | fi | |
21791 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21792 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21793 | fi | |
21794 | ||
21795 | ||
21796 | fi | |
21797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 | |
21798 | $as_echo "$gl_cv_func_isnanl_works" >&6; } | |
21799 | ||
21800 | case "$gl_cv_func_isnanl_works" in | |
21801 | *yes) ;; | |
21802 | *) gl_func_isnanl_no_libm=no ;; | |
21803 | esac | |
21804 | fi | |
21805 | if test $gl_func_isnanl_no_libm = yes; then | |
21806 | ||
21807 | $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h | |
21808 | ||
21809 | fi | |
21810 | ||
21811 | if test $gl_func_isnanl_no_libm != yes; then | |
21812 | ||
21813 | ||
21814 | ||
21815 | ||
21816 | ||
21817 | ||
21818 | ||
21819 | ||
21820 | gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" | |
21821 | ||
21822 | ||
21823 | ||
21824 | ||
c0c3707f | 21825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 |
88b48903 | 21826 | $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } |
d0ac1c44 | 21827 | if ${gl_cv_cc_long_double_expbit0+:} false; then : |
88b48903 WN |
21828 | $as_echo_n "(cached) " >&6 |
21829 | else | |
21830 | ||
21831 | if test "$cross_compiling" = yes; then : | |
21832 | ||
21833 | gl_cv_cc_long_double_expbit0="unknown" | |
c0c3707f CB |
21834 | case "$host_os" in |
21835 | mingw*) # On native Windows (little-endian), we know the result | |
21836 | # in two cases: mingw, MSVC. | |
21837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21838 | /* end confdefs.h. */ | |
21839 | ||
21840 | #ifdef __MINGW32__ | |
21841 | Known | |
21842 | #endif | |
21843 | ||
21844 | _ACEOF | |
21845 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
21846 | $EGREP "Known" >/dev/null 2>&1; then : | |
21847 | gl_cv_cc_long_double_expbit0="word 2 bit 0" | |
21848 | fi | |
21849 | rm -f conftest* | |
21850 | ||
21851 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21852 | /* end confdefs.h. */ | |
21853 | ||
21854 | #ifdef _MSC_VER | |
21855 | Known | |
21856 | #endif | |
21857 | ||
21858 | _ACEOF | |
21859 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
21860 | $EGREP "Known" >/dev/null 2>&1; then : | |
21861 | gl_cv_cc_long_double_expbit0="word 1 bit 20" | |
21862 | fi | |
21863 | rm -f conftest* | |
21864 | ||
21865 | ;; | |
21866 | esac | |
88b48903 WN |
21867 | |
21868 | else | |
21869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21870 | /* end confdefs.h. */ | |
21871 | ||
21872 | #include <float.h> | |
21873 | #include <stddef.h> | |
21874 | #include <stdio.h> | |
21875 | #include <string.h> | |
21876 | #define NWORDS \ | |
21877 | ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
21878 | typedef union { long double value; unsigned int word[NWORDS]; } | |
21879 | memory_long_double; | |
21880 | static unsigned int ored_words[NWORDS]; | |
21881 | static unsigned int anded_words[NWORDS]; | |
698be2d8 | 21882 | static void add_to_ored_words (long double *x) |
88b48903 WN |
21883 | { |
21884 | memory_long_double m; | |
21885 | size_t i; | |
21886 | /* Clear it first, in case | |
21887 | sizeof (long double) < sizeof (memory_long_double). */ | |
21888 | memset (&m, 0, sizeof (memory_long_double)); | |
698be2d8 | 21889 | m.value = *x; |
88b48903 WN |
21890 | for (i = 0; i < NWORDS; i++) |
21891 | { | |
21892 | ored_words[i] |= m.word[i]; | |
21893 | anded_words[i] &= m.word[i]; | |
21894 | } | |
21895 | } | |
21896 | int main () | |
21897 | { | |
698be2d8 | 21898 | static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L }; |
88b48903 WN |
21899 | size_t j; |
21900 | FILE *fp = fopen ("conftest.out", "w"); | |
21901 | if (fp == NULL) | |
21902 | return 1; | |
21903 | for (j = 0; j < NWORDS; j++) | |
21904 | anded_words[j] = ~ (unsigned int) 0; | |
698be2d8 CB |
21905 | for (j = 0; j < 5; j++) |
21906 | add_to_ored_words (&samples[j]); | |
88b48903 WN |
21907 | /* Remove bits that are common (e.g. if representation of the first mantissa |
21908 | bit is explicit). */ | |
21909 | for (j = 0; j < NWORDS; j++) | |
21910 | ored_words[j] &= ~anded_words[j]; | |
21911 | /* Now find the nonzero word. */ | |
21912 | for (j = 0; j < NWORDS; j++) | |
21913 | if (ored_words[j] != 0) | |
21914 | break; | |
21915 | if (j < NWORDS) | |
21916 | { | |
21917 | size_t i; | |
21918 | for (i = j + 1; i < NWORDS; i++) | |
21919 | if (ored_words[i] != 0) | |
21920 | { | |
21921 | fprintf (fp, "unknown"); | |
21922 | return (fclose (fp) != 0); | |
21923 | } | |
21924 | for (i = 0; ; i++) | |
21925 | if ((ored_words[j] >> i) & 1) | |
21926 | { | |
21927 | fprintf (fp, "word %d bit %d", (int) j, (int) i); | |
21928 | return (fclose (fp) != 0); | |
21929 | } | |
21930 | } | |
21931 | fprintf (fp, "unknown"); | |
21932 | return (fclose (fp) != 0); | |
21933 | } | |
21934 | ||
21935 | _ACEOF | |
21936 | if ac_fn_c_try_run "$LINENO"; then : | |
21937 | gl_cv_cc_long_double_expbit0=`cat conftest.out` | |
21938 | else | |
21939 | gl_cv_cc_long_double_expbit0="unknown" | |
21940 | fi | |
21941 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21942 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21943 | fi | |
21944 | ||
21945 | rm -f conftest.out | |
21946 | ||
21947 | fi | |
21948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 | |
21949 | $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } | |
21950 | case "$gl_cv_cc_long_double_expbit0" in | |
21951 | word*bit*) | |
21952 | word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` | |
21953 | bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` | |
21954 | ||
21955 | cat >>confdefs.h <<_ACEOF | |
21956 | #define LDBL_EXPBIT0_WORD $word | |
21957 | _ACEOF | |
21958 | ||
21959 | ||
21960 | cat >>confdefs.h <<_ACEOF | |
21961 | #define LDBL_EXPBIT0_BIT $bit | |
21962 | _ACEOF | |
21963 | ||
21964 | ;; | |
21965 | esac | |
21966 | ||
21967 | ||
21968 | ||
21969 | fi | |
21970 | ||
21971 | ||
5df4cba6 SM |
21972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 |
21973 | $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; } | |
21974 | if ${gl_cv_c___inline+:} false; then : | |
21975 | $as_echo_n "(cached) " >&6 | |
21976 | else | |
21977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21978 | /* end confdefs.h. */ | |
21979 | typedef int foo_t; | |
21980 | static __inline foo_t foo (void) { return 0; } | |
21981 | int | |
21982 | main () | |
21983 | { | |
21984 | return foo (); | |
21985 | ; | |
21986 | return 0; | |
21987 | } | |
21988 | _ACEOF | |
21989 | if ac_fn_c_try_compile "$LINENO"; then : | |
21990 | gl_cv_c___inline=yes | |
21991 | else | |
21992 | gl_cv_c___inline=no | |
21993 | fi | |
21994 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21995 | fi | |
21996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 | |
21997 | $as_echo "$gl_cv_c___inline" >&6; } | |
21998 | if test $gl_cv_c___inline = yes; then | |
21999 | ||
22000 | $as_echo "#define HAVE___INLINE 1" >>confdefs.h | |
22001 | ||
22002 | fi | |
22003 | ||
22004 | ||
22005 | ||
22006 | ||
22007 | ||
22008 | LOCALCHARSET_TESTS_ENVIRONMENT= | |
22009 | ||
22010 | ||
22011 | ||
22012 | ||
22013 | ||
22014 | ||
22015 | ||
22016 | ||
22017 | ||
22018 | ||
22019 | ||
22020 | case "$host_os" in | |
22021 | solaris*) | |
22022 | ||
22023 | $as_echo "#define _LCONV_C99 1" >>confdefs.h | |
22024 | ||
22025 | ;; | |
22026 | esac | |
22027 | ||
22028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 | |
22029 | $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } | |
22030 | if ${gl_cv_header_locale_h_posix2001+:} false; then : | |
22031 | $as_echo_n "(cached) " >&6 | |
22032 | else | |
22033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22034 | /* end confdefs.h. */ | |
22035 | #include <locale.h> | |
22036 | int x = LC_MESSAGES; | |
22037 | int y = sizeof (((struct lconv *) 0)->decimal_point); | |
22038 | int | |
22039 | main () | |
22040 | { | |
22041 | ||
22042 | ; | |
22043 | return 0; | |
22044 | } | |
22045 | _ACEOF | |
22046 | if ac_fn_c_try_compile "$LINENO"; then : | |
22047 | gl_cv_header_locale_h_posix2001=yes | |
22048 | else | |
22049 | gl_cv_header_locale_h_posix2001=no | |
22050 | fi | |
22051 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22052 | fi | |
22053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 | |
22054 | $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } | |
22055 | ||
22056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 | |
22057 | $as_echo_n "checking whether struct lconv is properly defined... " >&6; } | |
22058 | if ${gl_cv_sys_struct_lconv_ok+:} false; then : | |
c0c3707f CB |
22059 | $as_echo_n "(cached) " >&6 |
22060 | else | |
22061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22062 | /* end confdefs.h. */ | |
5df4cba6 SM |
22063 | #include <locale.h> |
22064 | struct lconv l; | |
22065 | int x = sizeof (l.decimal_point); | |
22066 | int y = sizeof (l.int_p_cs_precedes); | |
c0c3707f CB |
22067 | int |
22068 | main () | |
22069 | { | |
5df4cba6 | 22070 | |
c0c3707f CB |
22071 | ; |
22072 | return 0; | |
22073 | } | |
22074 | _ACEOF | |
22075 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 22076 | gl_cv_sys_struct_lconv_ok=yes |
c0c3707f | 22077 | else |
5df4cba6 | 22078 | gl_cv_sys_struct_lconv_ok=no |
c0c3707f CB |
22079 | fi |
22080 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5df4cba6 | 22081 | |
c0c3707f | 22082 | fi |
5df4cba6 SM |
22083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 |
22084 | $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } | |
22085 | if test $gl_cv_sys_struct_lconv_ok = no; then | |
22086 | case "$host_os" in | |
22087 | mingw*) | |
22088 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22089 | /* end confdefs.h. */ | |
c0c3707f | 22090 | |
5df4cba6 SM |
22091 | #ifdef _MSC_VER |
22092 | Special | |
22093 | #endif | |
22094 | ||
22095 | _ACEOF | |
22096 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22097 | $EGREP "Special" >/dev/null 2>&1; then : | |
22098 | ||
22099 | else | |
22100 | REPLACE_STRUCT_LCONV=1 | |
22101 | fi | |
22102 | rm -f conftest* | |
c0c3707f | 22103 | |
5df4cba6 SM |
22104 | ;; |
22105 | *) REPLACE_STRUCT_LCONV=1 ;; | |
22106 | esac | |
c0c3707f | 22107 | fi |
88b48903 WN |
22108 | |
22109 | ||
88b48903 WN |
22110 | |
22111 | ||
472fa5ee | 22112 | |
5df4cba6 SM |
22113 | |
22114 | ||
22115 | ||
22116 | ||
22117 | if test $gl_cv_have_include_next = yes; then | |
22118 | gl_cv_next_locale_h='<'locale.h'>' | |
22119 | else | |
22120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5 | |
22121 | $as_echo_n "checking absolute name of <locale.h>... " >&6; } | |
22122 | if ${gl_cv_next_locale_h+:} false; then : | |
22123 | $as_echo_n "(cached) " >&6 | |
22124 | else | |
22125 | ||
22126 | ||
22127 | ||
22128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22129 | /* end confdefs.h. */ | |
22130 | #include <locale.h> | |
22131 | _ACEOF | |
22132 | case "$host_os" in | |
22133 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22134 | *) gl_absname_cpp="$ac_cpp" ;; | |
22135 | esac | |
22136 | ||
22137 | case "$host_os" in | |
22138 | mingw*) | |
22139 | gl_dirsep_regex='[/\\]' | |
22140 | ;; | |
22141 | *) | |
22142 | gl_dirsep_regex='\/' | |
22143 | ;; | |
22144 | esac | |
22145 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22146 | gl_header_literal_regex=`echo 'locale.h' \ | |
22147 | | sed -e "$gl_make_literal_regex_sed"` | |
22148 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22149 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22150 | s|^/[^/]|//&| | |
22151 | p | |
22152 | q | |
22153 | }' | |
22154 | ||
22155 | gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22156 | sed -n "$gl_absolute_header_sed"` | |
22157 | ||
22158 | gl_header=$gl_cv_absolute_locale_h | |
22159 | gl_cv_next_locale_h='"'$gl_header'"' | |
22160 | ||
22161 | ||
22162 | fi | |
22163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 | |
22164 | $as_echo "$gl_cv_next_locale_h" >&6; } | |
22165 | fi | |
22166 | NEXT_LOCALE_H=$gl_cv_next_locale_h | |
22167 | ||
22168 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
22169 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22170 | gl_next_as_first_directive='<'locale.h'>' | |
22171 | else | |
22172 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22173 | gl_next_as_first_directive=$gl_cv_next_locale_h | |
22174 | fi | |
22175 | NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive | |
22176 | ||
22177 | ||
22178 | ||
22179 | ||
22180 | ||
22181 | ||
22182 | ||
22183 | ||
472fa5ee SM |
22184 | |
22185 | ||
22186 | ||
22187 | ||
88b48903 WN |
22188 | |
22189 | ||
2196f55f | 22190 | |
49e4877c | 22191 | |
c0c3707f CB |
22192 | |
22193 | ||
22194 | gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext" | |
88b48903 WN |
22195 | |
22196 | ||
22197 | ||
5abebf3c CB |
22198 | if test "$gl_threads_api" = posix; then |
22199 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the | |
22200 | # pthread_rwlock_* functions. | |
c0c3707f | 22201 | has_rwlock=false |
5abebf3c CB |
22202 | ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h> |
22203 | " | |
22204 | if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : | |
c0c3707f | 22205 | has_rwlock=true |
5abebf3c CB |
22206 | |
22207 | $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h | |
22208 | ||
22209 | fi | |
22210 | ||
c0c3707f CB |
22211 | if $has_rwlock; then |
22212 | ||
22213 | ||
22214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 | |
22215 | $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } | |
22216 | if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : | |
22217 | $as_echo_n "(cached) " >&6 | |
22218 | else | |
22219 | save_LIBS="$LIBS" | |
22220 | LIBS="$LIBS $LIBMULTITHREAD" | |
22221 | if test "$cross_compiling" = yes; then : | |
22222 | case "$host_os" in | |
22223 | # Guess no on glibc systems. | |
22224 | *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
22225 | # Guess no on musl systems. | |
22226 | *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
22227 | # Guess no on bionic systems. | |
22228 | *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
22229 | # Guess yes on native Windows with the mingw-w64 winpthreads library. | |
22230 | # Guess no on native Windows with the gnulib windows-rwlock module. | |
22231 | mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | |
22232 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" | |
22233 | else | |
22234 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" | |
22235 | fi | |
22236 | ;; | |
22237 | # If we don't know, obey --enable-cross-guesses. | |
22238 | *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; | |
22239 | esac | |
22240 | ||
22241 | else | |
22242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22243 | /* end confdefs.h. */ | |
22244 | ||
22245 | #include <errno.h> | |
22246 | #include <pthread.h> | |
22247 | #include <stdlib.h> | |
22248 | #include <unistd.h> | |
22249 | ||
22250 | #define SUCCEED() exit (0) | |
22251 | #define FAILURE() exit (1) | |
22252 | #define UNEXPECTED(n) (exit (10 + (n))) | |
22253 | ||
22254 | /* The main thread creates the waiting writer and the requesting reader threads | |
22255 | in the default way; this guarantees that they have the same priority. | |
22256 | We can reuse the main thread as first reader thread. */ | |
22257 | ||
22258 | static pthread_rwlock_t lock; | |
22259 | static pthread_t reader1; | |
22260 | static pthread_t writer; | |
22261 | static pthread_t reader2; | |
22262 | static pthread_t timer; | |
22263 | /* Used to pass control from writer to reader2 and from reader2 to timer, | |
22264 | as in a relay race. | |
22265 | Passing control from one running thread to another running thread | |
22266 | is most likely faster than to create the second thread. */ | |
22267 | static pthread_mutex_t baton; | |
22268 | ||
22269 | static void * | |
22270 | timer_func (void *ignored) | |
22271 | { | |
22272 | /* Step 13 (can be before or after step 12): | |
22273 | The timer thread takes the baton, then waits a moment to make sure | |
22274 | it can tell whether the second reader thread is blocked at step 12. */ | |
22275 | if (pthread_mutex_lock (&baton)) | |
22276 | UNEXPECTED (13); | |
22277 | usleep (100000); | |
22278 | /* By the time we get here, it's clear that the second reader thread is | |
22279 | blocked at step 12. This is the desired behaviour. */ | |
22280 | SUCCEED (); | |
22281 | } | |
22282 | ||
22283 | static void * | |
22284 | reader2_func (void *ignored) | |
22285 | { | |
22286 | int err; | |
22287 | ||
22288 | /* Step 8 (can be before or after step 7): | |
22289 | The second reader thread takes the baton, then waits a moment to make sure | |
22290 | the writer thread has reached step 7. */ | |
22291 | if (pthread_mutex_lock (&baton)) | |
22292 | UNEXPECTED (8); | |
22293 | usleep (100000); | |
22294 | /* Step 9: The second reader thread requests the lock. */ | |
22295 | err = pthread_rwlock_tryrdlock (&lock); | |
22296 | if (err == 0) | |
22297 | FAILURE (); | |
22298 | else if (err != EBUSY) | |
22299 | UNEXPECTED (9); | |
22300 | /* Step 10: Launch a timer, to test whether the next call blocks. */ | |
22301 | if (pthread_create (&timer, NULL, timer_func, NULL)) | |
22302 | UNEXPECTED (10); | |
22303 | /* Step 11: Release the baton. */ | |
22304 | if (pthread_mutex_unlock (&baton)) | |
22305 | UNEXPECTED (11); | |
22306 | /* Step 12: The second reader thread requests the lock. */ | |
22307 | err = pthread_rwlock_rdlock (&lock); | |
22308 | if (err == 0) | |
22309 | FAILURE (); | |
22310 | else | |
22311 | UNEXPECTED (12); | |
22312 | } | |
22313 | ||
22314 | static void * | |
22315 | writer_func (void *ignored) | |
22316 | { | |
22317 | /* Step 4: Take the baton, so that the second reader thread does not go ahead | |
22318 | too early. */ | |
22319 | if (pthread_mutex_lock (&baton)) | |
22320 | UNEXPECTED (4); | |
22321 | /* Step 5: Create the second reader thread. */ | |
22322 | if (pthread_create (&reader2, NULL, reader2_func, NULL)) | |
22323 | UNEXPECTED (5); | |
22324 | /* Step 6: Release the baton. */ | |
22325 | if (pthread_mutex_unlock (&baton)) | |
22326 | UNEXPECTED (6); | |
22327 | /* Step 7: The writer thread requests the lock. */ | |
22328 | if (pthread_rwlock_wrlock (&lock)) | |
22329 | UNEXPECTED (7); | |
22330 | return NULL; | |
22331 | } | |
22332 | ||
22333 | int | |
22334 | main () | |
22335 | { | |
22336 | reader1 = pthread_self (); | |
22337 | ||
22338 | /* Step 1: The main thread initializes the lock and the baton. */ | |
22339 | if (pthread_rwlock_init (&lock, NULL)) | |
22340 | UNEXPECTED (1); | |
22341 | if (pthread_mutex_init (&baton, NULL)) | |
22342 | UNEXPECTED (1); | |
22343 | /* Step 2: The main thread acquires the lock as a reader. */ | |
22344 | if (pthread_rwlock_rdlock (&lock)) | |
22345 | UNEXPECTED (2); | |
22346 | /* Step 3: Create the writer thread. */ | |
22347 | if (pthread_create (&writer, NULL, writer_func, NULL)) | |
22348 | UNEXPECTED (3); | |
22349 | /* Job done. Go to sleep. */ | |
22350 | for (;;) | |
22351 | { | |
22352 | sleep (1); | |
22353 | } | |
22354 | } | |
22355 | ||
22356 | _ACEOF | |
22357 | if ac_fn_c_try_run "$LINENO"; then : | |
22358 | gl_cv_pthread_rwlock_rdlock_prefer_writer=yes | |
22359 | else | |
22360 | gl_cv_pthread_rwlock_rdlock_prefer_writer=no | |
22361 | fi | |
22362 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22363 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22364 | fi | |
22365 | ||
22366 | LIBS="$save_LIBS" | |
22367 | ||
22368 | fi | |
22369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 | |
22370 | $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } | |
22371 | case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in | |
22372 | *yes) | |
22373 | ||
22374 | $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h | |
22375 | ||
22376 | ;; | |
22377 | esac | |
22378 | ||
22379 | fi | |
5abebf3c CB |
22380 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
22381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22382 | /* end confdefs.h. */ | |
22383 | ||
22384 | #include <pthread.h> | |
22385 | int | |
22386 | main () | |
22387 | { | |
22388 | ||
22389 | #if __FreeBSD__ == 4 | |
22390 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | |
22391 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ | |
22392 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) | |
22393 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." | |
22394 | #else | |
22395 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | |
22396 | return !x; | |
22397 | #endif | |
22398 | ||
22399 | ; | |
22400 | return 0; | |
22401 | } | |
22402 | _ACEOF | |
22403 | if ac_fn_c_try_compile "$LINENO"; then : | |
22404 | ||
22405 | $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h | |
22406 | ||
22407 | fi | |
22408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22409 | fi | |
22410 | : | |
22411 | ||
22412 | ||
22413 | ||
22414 | cat >>confdefs.h <<_ACEOF | |
22415 | #define GNULIB_LOCK 1 | |
22416 | _ACEOF | |
22417 | ||
22418 | ||
22419 | ||
22420 | ||
88b48903 | 22421 | |
472fa5ee | 22422 | |
f45c62c4 YQ |
22423 | if test $ac_cv_func_lstat = yes; then |
22424 | ||
c0c3707f CB |
22425 | case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in |
22426 | solaris* | *no) | |
f45c62c4 YQ |
22427 | REPLACE_LSTAT=1 |
22428 | ;; | |
22429 | esac | |
22430 | else | |
22431 | HAVE_LSTAT=0 | |
22432 | fi | |
22433 | ||
22434 | if test $REPLACE_LSTAT = 1; then | |
22435 | ||
22436 | ||
22437 | ||
22438 | ||
22439 | ||
22440 | ||
22441 | ||
22442 | ||
22443 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" | |
22444 | ||
22445 | : | |
22446 | fi | |
22447 | ||
22448 | ||
22449 | ||
22450 | ||
22451 | ||
22452 | GNULIB_LSTAT=1 | |
22453 | ||
22454 | ||
22455 | ||
22456 | ||
22457 | ||
22458 | $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h | |
22459 | ||
22460 | ||
22461 | ||
22462 | ||
22463 | ||
22464 | ||
6a29c58e YQ |
22465 | if test $gl_cv_func_malloc_posix = yes; then |
22466 | ||
22467 | $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h | |
22468 | ||
22469 | else | |
22470 | REPLACE_MALLOC=1 | |
22471 | fi | |
22472 | ||
22473 | if test $REPLACE_MALLOC = 1; then | |
22474 | ||
22475 | ||
22476 | ||
22477 | ||
22478 | ||
22479 | ||
22480 | ||
22481 | ||
22482 | gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" | |
22483 | ||
22484 | fi | |
22485 | ||
22486 | ||
22487 | ||
22488 | ||
22489 | ||
22490 | GNULIB_MALLOC_POSIX=1 | |
22491 | ||
22492 | ||
22493 | ||
22494 | ||
22495 | ||
22496 | $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h | |
22497 | ||
22498 | ||
22499 | ||
22500 | ||
22501 | ||
22502 | ||
88b48903 WN |
22503 | |
22504 | ||
22505 | ||
22506 | ||
22507 | ||
88b48903 | 22508 | |
c971b7fa | 22509 | |
c971b7fa | 22510 | |
98399780 YQ |
22511 | |
22512 | ||
22513 | ||
88b48903 WN |
22514 | if test $gl_cv_have_include_next = yes; then |
22515 | gl_cv_next_math_h='<'math.h'>' | |
22516 | else | |
22517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 | |
22518 | $as_echo_n "checking absolute name of <math.h>... " >&6; } | |
d0ac1c44 | 22519 | if ${gl_cv_next_math_h+:} false; then : |
88b48903 WN |
22520 | $as_echo_n "(cached) " >&6 |
22521 | else | |
c971b7fa | 22522 | |
88b48903 | 22523 | if test $ac_cv_header_math_h = yes; then |
c971b7fa PA |
22524 | |
22525 | ||
4a626d0a PA |
22526 | |
22527 | ||
22528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 | 22529 | /* end confdefs.h. */ |
88b48903 | 22530 | #include <math.h> |
8690e634 | 22531 | _ACEOF |
4a626d0a PA |
22532 | case "$host_os" in |
22533 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22534 | *) gl_absname_cpp="$ac_cpp" ;; | |
22535 | esac | |
22536 | ||
22537 | case "$host_os" in | |
22538 | mingw*) | |
22539 | gl_dirsep_regex='[/\\]' | |
22540 | ;; | |
22541 | *) | |
22542 | gl_dirsep_regex='\/' | |
22543 | ;; | |
22544 | esac | |
22545 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22546 | gl_header_literal_regex=`echo 'math.h' \ | |
22547 | | sed -e "$gl_make_literal_regex_sed"` | |
22548 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22549 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22550 | s|^/[^/]|//&| | |
22551 | p | |
22552 | q | |
22553 | }' | |
22554 | ||
22555 | gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22556 | sed -n "$gl_absolute_header_sed"` | |
22557 | ||
22558 | gl_header=$gl_cv_absolute_math_h | |
22559 | gl_cv_next_math_h='"'$gl_header'"' | |
88b48903 WN |
22560 | else |
22561 | gl_cv_next_math_h='<'math.h'>' | |
22562 | fi | |
8690e634 | 22563 | |
c971b7fa | 22564 | |
88b48903 WN |
22565 | fi |
22566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 | |
22567 | $as_echo "$gl_cv_next_math_h" >&6; } | |
22568 | fi | |
22569 | NEXT_MATH_H=$gl_cv_next_math_h | |
c971b7fa | 22570 | |
88b48903 WN |
22571 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
22572 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22573 | gl_next_as_first_directive='<'math.h'>' | |
22574 | else | |
22575 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22576 | gl_next_as_first_directive=$gl_cv_next_math_h | |
22577 | fi | |
22578 | NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive | |
8690e634 | 22579 | |
c971b7fa | 22580 | |
c971b7fa PA |
22581 | |
22582 | ||
c971b7fa | 22583 | |
88b48903 WN |
22584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 |
22585 | $as_echo_n "checking whether NAN macro works... " >&6; } | |
d0ac1c44 | 22586 | if ${gl_cv_header_math_nan_works+:} false; then : |
c971b7fa PA |
22587 | $as_echo_n "(cached) " >&6 |
22588 | else | |
8690e634 JK |
22589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22590 | /* end confdefs.h. */ | |
88b48903 | 22591 | #include <math.h> |
c971b7fa PA |
22592 | int |
22593 | main () | |
22594 | { | |
88b48903 WN |
22595 | /* Solaris 10 has a broken definition of NAN. Other platforms |
22596 | fail to provide NAN, or provide it only in C99 mode; this | |
22597 | test only needs to fail when NAN is provided but wrong. */ | |
22598 | float f = 1.0f; | |
22599 | #ifdef NAN | |
22600 | f = NAN; | |
22601 | #endif | |
22602 | return f == 0; | |
c971b7fa PA |
22603 | ; |
22604 | return 0; | |
22605 | } | |
22606 | _ACEOF | |
22607 | if ac_fn_c_try_compile "$LINENO"; then : | |
88b48903 | 22608 | gl_cv_header_math_nan_works=yes |
8690e634 | 22609 | else |
88b48903 | 22610 | gl_cv_header_math_nan_works=no |
c971b7fa PA |
22611 | fi |
22612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 22613 | fi |
88b48903 WN |
22614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 |
22615 | $as_echo "$gl_cv_header_math_nan_works" >&6; } | |
22616 | if test $gl_cv_header_math_nan_works = no; then | |
22617 | REPLACE_NAN=1 | |
c971b7fa | 22618 | fi |
88b48903 WN |
22619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 |
22620 | $as_echo_n "checking whether HUGE_VAL works... " >&6; } | |
d0ac1c44 | 22621 | if ${gl_cv_header_math_huge_val_works+:} false; then : |
c971b7fa PA |
22622 | $as_echo_n "(cached) " >&6 |
22623 | else | |
8690e634 | 22624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c971b7fa | 22625 | /* end confdefs.h. */ |
88b48903 | 22626 | #include <math.h> |
c971b7fa PA |
22627 | int |
22628 | main () | |
22629 | { | |
88b48903 WN |
22630 | /* Solaris 10 has a broken definition of HUGE_VAL. */ |
22631 | double d = HUGE_VAL; | |
22632 | return d == 0; | |
c971b7fa PA |
22633 | ; |
22634 | return 0; | |
22635 | } | |
22636 | _ACEOF | |
22637 | if ac_fn_c_try_compile "$LINENO"; then : | |
88b48903 | 22638 | gl_cv_header_math_huge_val_works=yes |
8690e634 | 22639 | else |
88b48903 | 22640 | gl_cv_header_math_huge_val_works=no |
c971b7fa PA |
22641 | fi |
22642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 22643 | fi |
88b48903 WN |
22644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 |
22645 | $as_echo "$gl_cv_header_math_huge_val_works" >&6; } | |
22646 | if test $gl_cv_header_math_huge_val_works = no; then | |
22647 | REPLACE_HUGE_VAL=1 | |
8690e634 | 22648 | fi |
c971b7fa | 22649 | |
c971b7fa | 22650 | |
c971b7fa PA |
22651 | |
22652 | ||
22653 | ||
22654 | ||
22655 | ||
22656 | ||
c971b7fa | 22657 | |
c971b7fa | 22658 | |
c971b7fa | 22659 | |
c971b7fa PA |
22660 | |
22661 | ||
c971b7fa | 22662 | |
472fa5ee | 22663 | |
5df4cba6 SM |
22664 | |
22665 | ||
22666 | ||
22667 | if case "$host_os" in | |
22668 | mingw*) true ;; | |
22669 | *) test $ac_cv_func_mbsinit = yes ;; | |
22670 | esac \ | |
22671 | && test $ac_cv_func_mbrtowc = yes; then | |
472fa5ee SM |
22672 | |
22673 | ||
22674 | ||
22675 | ||
c0c3707f CB |
22676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
22677 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
22678 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : | |
22679 | $as_echo_n "(cached) " >&6 | |
22680 | else | |
472fa5ee | 22681 | |
c0c3707f CB |
22682 | case "$host_os" in |
22683 | # Guess no on AIX and OSF/1. | |
22684 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
22685 | # Guess yes otherwise. | |
22686 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
22687 | esac | |
22688 | if test $LOCALE_JA != none; then | |
22689 | if test "$cross_compiling" = yes; then : | |
472fa5ee | 22690 | : |
c0c3707f CB |
22691 | else |
22692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22693 | /* end confdefs.h. */ | |
472fa5ee | 22694 | |
c0c3707f CB |
22695 | #include <locale.h> |
22696 | #include <string.h> | |
22697 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22698 | <wchar.h>. | |
22699 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22700 | included before <wchar.h>. */ | |
22701 | #include <stddef.h> | |
22702 | #include <stdio.h> | |
22703 | #include <time.h> | |
22704 | #include <wchar.h> | |
22705 | int main () | |
22706 | { | |
22707 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
22708 | { | |
22709 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
22710 | mbstate_t state; | |
22711 | wchar_t wc; | |
472fa5ee | 22712 | |
c0c3707f CB |
22713 | memset (&state, '\0', sizeof (mbstate_t)); |
22714 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
22715 | if (mbsinit (&state)) | |
22716 | return 2; | |
22717 | } | |
22718 | return 0; | |
22719 | } | |
22720 | _ACEOF | |
22721 | if ac_fn_c_try_run "$LINENO"; then : | |
22722 | gl_cv_func_mbrtowc_incomplete_state=yes | |
c971b7fa | 22723 | else |
c0c3707f CB |
22724 | gl_cv_func_mbrtowc_incomplete_state=no |
22725 | fi | |
22726 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22727 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22728 | fi | |
8690e634 | 22729 | |
c0c3707f CB |
22730 | else |
22731 | if test $LOCALE_FR_UTF8 != none; then | |
22732 | if test "$cross_compiling" = yes; then : | |
8690e634 JK |
22733 | : |
22734 | else | |
c971b7fa PA |
22735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22736 | /* end confdefs.h. */ | |
c971b7fa | 22737 | |
8690e634 JK |
22738 | #include <locale.h> |
22739 | #include <string.h> | |
22740 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22741 | <wchar.h>. | |
22742 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22743 | included before <wchar.h>. */ | |
22744 | #include <stddef.h> | |
22745 | #include <stdio.h> | |
22746 | #include <time.h> | |
22747 | #include <wchar.h> | |
22748 | int main () | |
c971b7fa | 22749 | { |
c0c3707f | 22750 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) |
8690e634 | 22751 | { |
c0c3707f | 22752 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ |
8690e634 JK |
22753 | mbstate_t state; |
22754 | wchar_t wc; | |
22755 | ||
22756 | memset (&state, '\0', sizeof (mbstate_t)); | |
22757 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
22758 | if (mbsinit (&state)) | |
c0c3707f | 22759 | return 2; |
8690e634 | 22760 | } |
c971b7fa PA |
22761 | return 0; |
22762 | } | |
22763 | _ACEOF | |
8690e634 JK |
22764 | if ac_fn_c_try_run "$LINENO"; then : |
22765 | gl_cv_func_mbrtowc_incomplete_state=yes | |
c971b7fa | 22766 | else |
8690e634 | 22767 | gl_cv_func_mbrtowc_incomplete_state=no |
c971b7fa | 22768 | fi |
8690e634 JK |
22769 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
22770 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 22771 | fi |
c971b7fa | 22772 | |
c0c3707f | 22773 | fi |
8690e634 | 22774 | fi |
c971b7fa | 22775 | |
8690e634 JK |
22776 | fi |
22777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 | |
22778 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
c971b7fa | 22779 | |
c971b7fa | 22780 | |
c971b7fa | 22781 | |
c971b7fa | 22782 | |
8690e634 JK |
22783 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 |
22784 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 22785 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
c971b7fa PA |
22786 | $as_echo_n "(cached) " >&6 |
22787 | else | |
22788 | ||
8690e634 JK |
22789 | case "$host_os" in |
22790 | # Guess no on Solaris 8. | |
22791 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
22792 | # Guess yes otherwise. | |
22793 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
22794 | esac | |
22795 | if test $LOCALE_ZH_CN != none; then | |
22796 | if test "$cross_compiling" = yes; then : | |
22797 | : | |
22798 | else | |
22799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa PA |
22800 | /* end confdefs.h. */ |
22801 | ||
8690e634 JK |
22802 | #include <locale.h> |
22803 | #include <stdlib.h> | |
22804 | #include <string.h> | |
22805 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22806 | <wchar.h>. | |
22807 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22808 | included before <wchar.h>. */ | |
22809 | #include <stddef.h> | |
22810 | #include <stdio.h> | |
22811 | #include <time.h> | |
22812 | #include <wchar.h> | |
22813 | int main () | |
c971b7fa | 22814 | { |
8690e634 JK |
22815 | /* This fails on Solaris 8: |
22816 | mbrtowc returns 2, and sets wc to 0x00F0. | |
22817 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
22818 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
22819 | { | |
22820 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
22821 | mbstate_t state; | |
22822 | wchar_t wc; | |
22823 | ||
22824 | memset (&state, '\0', sizeof (mbstate_t)); | |
22825 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
22826 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 22827 | return 2; |
8690e634 | 22828 | } |
c971b7fa PA |
22829 | return 0; |
22830 | } | |
22831 | _ACEOF | |
8690e634 JK |
22832 | if ac_fn_c_try_run "$LINENO"; then : |
22833 | gl_cv_func_mbrtowc_sanitycheck=yes | |
c971b7fa | 22834 | else |
8690e634 | 22835 | gl_cv_func_mbrtowc_sanitycheck=no |
c971b7fa | 22836 | fi |
8690e634 JK |
22837 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
22838 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 22839 | fi |
c971b7fa | 22840 | |
8690e634 | 22841 | fi |
c971b7fa | 22842 | |
8690e634 JK |
22843 | fi |
22844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 | |
22845 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
22846 | ||
22847 | REPLACE_MBSTATE_T=0 | |
22848 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
22849 | *yes) ;; | |
22850 | *) REPLACE_MBSTATE_T=1 ;; | |
22851 | esac | |
22852 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
22853 | *yes) ;; | |
22854 | *) REPLACE_MBSTATE_T=1 ;; | |
22855 | esac | |
c971b7fa | 22856 | else |
8690e634 | 22857 | REPLACE_MBSTATE_T=1 |
c971b7fa PA |
22858 | fi |
22859 | ||
22860 | ||
22861 | ||
8690e634 JK |
22862 | if test $ac_cv_func_mbrtowc = no; then |
22863 | HAVE_MBRTOWC=0 | |
22864 | ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " | |
22865 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22866 | <wchar.h>. | |
22867 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22868 | included before <wchar.h>. */ | |
22869 | #include <stddef.h> | |
22870 | #include <stdio.h> | |
22871 | #include <time.h> | |
22872 | #include <wchar.h> | |
c971b7fa | 22873 | |
8690e634 | 22874 | " |
d0ac1c44 | 22875 | if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : |
8690e634 JK |
22876 | ac_have_decl=1 |
22877 | else | |
22878 | ac_have_decl=0 | |
c971b7fa | 22879 | fi |
c971b7fa | 22880 | |
8690e634 JK |
22881 | cat >>confdefs.h <<_ACEOF |
22882 | #define HAVE_DECL_MBRTOWC $ac_have_decl | |
22883 | _ACEOF | |
c971b7fa | 22884 | |
8690e634 JK |
22885 | if test $ac_cv_have_decl_mbrtowc = yes; then |
22886 | REPLACE_MBRTOWC=1 | |
22887 | fi | |
22888 | else | |
22889 | if test $REPLACE_MBSTATE_T = 1; then | |
22890 | REPLACE_MBRTOWC=1 | |
22891 | else | |
c971b7fa PA |
22892 | |
22893 | ||
22894 | ||
8690e634 JK |
22895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 |
22896 | $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } | |
d0ac1c44 | 22897 | if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : |
8690e634 | 22898 | $as_echo_n "(cached) " >&6 |
c971b7fa | 22899 | else |
c971b7fa | 22900 | |
8690e634 JK |
22901 | case "$host_os" in |
22902 | # Guess no on Solaris. | |
22903 | solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; | |
22904 | # Guess yes otherwise. | |
22905 | *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; | |
22906 | esac | |
22907 | if test $LOCALE_FR_UTF8 != none; then | |
22908 | if test "$cross_compiling" = yes; then : | |
22909 | : | |
22910 | else | |
22911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa PA |
22912 | /* end confdefs.h. */ |
22913 | ||
8690e634 JK |
22914 | #include <locale.h> |
22915 | #include <stdlib.h> | |
22916 | #include <string.h> | |
22917 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22918 | <wchar.h>. | |
22919 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22920 | included before <wchar.h>. */ | |
22921 | #include <stddef.h> | |
22922 | #include <stdio.h> | |
22923 | #include <time.h> | |
22924 | #include <wchar.h> | |
22925 | int main () | |
22926 | { | |
22927 | int result = 0; | |
22928 | ||
22929 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
22930 | { | |
22931 | char input[] = "\303\237er"; | |
22932 | mbstate_t state; | |
22933 | wchar_t wc; | |
22934 | size_t ret; | |
22935 | ||
22936 | memset (&state, '\0', sizeof (mbstate_t)); | |
22937 | wc = (wchar_t) 0xBADFACE; | |
22938 | ret = mbrtowc (&wc, input, 5, &state); | |
22939 | if (ret != 2) | |
22940 | result |= 1; | |
22941 | if (!mbsinit (&state)) | |
22942 | result |= 2; | |
c971b7fa | 22943 | |
8690e634 JK |
22944 | memset (&state, '\0', sizeof (mbstate_t)); |
22945 | ret = mbrtowc (NULL, input, 5, &state); | |
22946 | if (ret != 2) /* Solaris 7 fails here: ret is -1. */ | |
22947 | result |= 4; | |
22948 | if (!mbsinit (&state)) | |
22949 | result |= 8; | |
22950 | } | |
22951 | return result; | |
22952 | } | |
c971b7fa | 22953 | _ACEOF |
8690e634 JK |
22954 | if ac_fn_c_try_run "$LINENO"; then : |
22955 | gl_cv_func_mbrtowc_null_arg1=yes | |
22956 | else | |
22957 | gl_cv_func_mbrtowc_null_arg1=no | |
22958 | fi | |
22959 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22960 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22961 | fi | |
c971b7fa | 22962 | |
8690e634 | 22963 | fi |
c971b7fa | 22964 | |
c971b7fa | 22965 | fi |
8690e634 JK |
22966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 |
22967 | $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } | |
c971b7fa | 22968 | |
c971b7fa | 22969 | |
c971b7fa | 22970 | |
c971b7fa | 22971 | |
8690e634 JK |
22972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 |
22973 | $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } | |
d0ac1c44 | 22974 | if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : |
8690e634 JK |
22975 | $as_echo_n "(cached) " >&6 |
22976 | else | |
c971b7fa | 22977 | |
8690e634 JK |
22978 | case "$host_os" in |
22979 | # Guess no on OSF/1. | |
22980 | osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; | |
22981 | # Guess yes otherwise. | |
22982 | *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; | |
22983 | esac | |
22984 | if test $LOCALE_FR_UTF8 != none; then | |
22985 | if test "$cross_compiling" = yes; then : | |
c971b7fa | 22986 | : |
8690e634 JK |
22987 | else |
22988 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22989 | /* end confdefs.h. */ | |
22990 | ||
22991 | #include <locale.h> | |
22992 | #include <string.h> | |
22993 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
22994 | <wchar.h>. | |
22995 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
22996 | included before <wchar.h>. */ | |
22997 | #include <stddef.h> | |
22998 | #include <stdio.h> | |
22999 | #include <time.h> | |
23000 | #include <wchar.h> | |
23001 | int main () | |
23002 | { | |
23003 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23004 | { | |
23005 | mbstate_t state; | |
23006 | wchar_t wc; | |
23007 | int ret; | |
23008 | ||
23009 | memset (&state, '\0', sizeof (mbstate_t)); | |
23010 | wc = (wchar_t) 0xBADFACE; | |
23011 | mbrtowc (&wc, NULL, 5, &state); | |
23012 | /* Check that wc was not modified. */ | |
23013 | if (wc != (wchar_t) 0xBADFACE) | |
c0c3707f | 23014 | return 2; |
8690e634 JK |
23015 | } |
23016 | return 0; | |
23017 | } | |
23018 | _ACEOF | |
23019 | if ac_fn_c_try_run "$LINENO"; then : | |
23020 | gl_cv_func_mbrtowc_null_arg2=yes | |
23021 | else | |
23022 | gl_cv_func_mbrtowc_null_arg2=no | |
23023 | fi | |
23024 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23025 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23026 | fi | |
23027 | ||
23028 | fi | |
23029 | ||
23030 | fi | |
23031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 | |
23032 | $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } | |
c971b7fa PA |
23033 | |
23034 | ||
23035 | ||
23036 | ||
23037 | ||
23038 | ||
8690e634 JK |
23039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 |
23040 | $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } | |
d0ac1c44 | 23041 | if ${gl_cv_func_mbrtowc_retval+:} false; then : |
8690e634 JK |
23042 | $as_echo_n "(cached) " >&6 |
23043 | else | |
23044 | ||
23045 | case "$host_os" in | |
23046 | # Guess no on HP-UX, Solaris, native Windows. | |
23047 | hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; | |
23048 | # Guess yes otherwise. | |
23049 | *) gl_cv_func_mbrtowc_retval="guessing yes" ;; | |
23050 | esac | |
23051 | if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ | |
23052 | || { case "$host_os" in mingw*) true;; *) false;; esac; }; then | |
23053 | if test "$cross_compiling" = yes; then : | |
c971b7fa | 23054 | : |
8690e634 JK |
23055 | else |
23056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23057 | /* end confdefs.h. */ | |
c971b7fa | 23058 | |
8690e634 JK |
23059 | #include <locale.h> |
23060 | #include <string.h> | |
23061 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23062 | <wchar.h>. | |
23063 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23064 | included before <wchar.h>. */ | |
23065 | #include <stddef.h> | |
23066 | #include <stdio.h> | |
23067 | #include <time.h> | |
23068 | #include <wchar.h> | |
23069 | int main () | |
23070 | { | |
23071 | int result = 0; | |
23072 | int found_some_locale = 0; | |
23073 | /* This fails on Solaris. */ | |
23074 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23075 | { | |
23076 | char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
23077 | mbstate_t state; | |
23078 | wchar_t wc; | |
23079 | ||
23080 | memset (&state, '\0', sizeof (mbstate_t)); | |
23081 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23082 | { | |
23083 | input[1] = '\0'; | |
23084 | if (mbrtowc (&wc, input + 2, 5, &state) != 1) | |
23085 | result |= 1; | |
23086 | } | |
23087 | found_some_locale = 1; | |
23088 | } | |
23089 | /* This fails on HP-UX 11.11. */ | |
23090 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
23091 | { | |
23092 | char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
23093 | mbstate_t state; | |
23094 | wchar_t wc; | |
23095 | ||
23096 | memset (&state, '\0', sizeof (mbstate_t)); | |
23097 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23098 | { | |
23099 | input[1] = '\0'; | |
23100 | if (mbrtowc (&wc, input + 2, 5, &state) != 2) | |
23101 | result |= 2; | |
23102 | } | |
23103 | found_some_locale = 1; | |
23104 | } | |
5df4cba6 SM |
23105 | /* This fails on native Windows. */ |
23106 | if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) | |
23107 | { | |
23108 | char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ | |
23109 | mbstate_t state; | |
23110 | wchar_t wc; | |
23111 | ||
23112 | memset (&state, '\0', sizeof (mbstate_t)); | |
23113 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23114 | { | |
23115 | input[3] = '\0'; | |
23116 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23117 | result |= 4; | |
23118 | } | |
23119 | found_some_locale = 1; | |
23120 | } | |
23121 | if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) | |
23122 | { | |
23123 | char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ | |
23124 | mbstate_t state; | |
23125 | wchar_t wc; | |
23126 | ||
23127 | memset (&state, '\0', sizeof (mbstate_t)); | |
23128 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23129 | { | |
23130 | input[3] = '\0'; | |
23131 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23132 | result |= 8; | |
23133 | } | |
23134 | found_some_locale = 1; | |
23135 | } | |
23136 | if (setlocale (LC_ALL, "Chinese_China.936") != NULL) | |
23137 | { | |
23138 | char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ | |
23139 | mbstate_t state; | |
23140 | wchar_t wc; | |
23141 | ||
23142 | memset (&state, '\0', sizeof (mbstate_t)); | |
23143 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23144 | { | |
23145 | input[3] = '\0'; | |
23146 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23147 | result |= 16; | |
23148 | } | |
23149 | found_some_locale = 1; | |
23150 | } | |
23151 | return (found_some_locale ? result : 77); | |
23152 | } | |
23153 | _ACEOF | |
23154 | if ac_fn_c_try_run "$LINENO"; then : | |
23155 | gl_cv_func_mbrtowc_retval=yes | |
23156 | else | |
23157 | if test $? != 77; then | |
23158 | gl_cv_func_mbrtowc_retval=no | |
23159 | fi | |
23160 | ||
23161 | fi | |
23162 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23163 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23164 | fi | |
23165 | ||
23166 | fi | |
23167 | ||
23168 | fi | |
23169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 | |
23170 | $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } | |
23171 | ||
23172 | ||
23173 | ||
23174 | ||
23175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 | |
23176 | $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } | |
23177 | if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : | |
23178 | $as_echo_n "(cached) " >&6 | |
23179 | else | |
23180 | ||
23181 | case "$host_os" in | |
23182 | # Guess no on Solaris 8 and 9. | |
23183 | solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; | |
23184 | # Guess yes otherwise. | |
23185 | *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; | |
23186 | esac | |
23187 | if test $LOCALE_ZH_CN != none; then | |
23188 | if test "$cross_compiling" = yes; then : | |
23189 | : | |
23190 | else | |
23191 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23192 | /* end confdefs.h. */ | |
23193 | ||
23194 | #include <locale.h> | |
23195 | #include <string.h> | |
23196 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23197 | <wchar.h>. | |
23198 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23199 | included before <wchar.h>. */ | |
23200 | #include <stddef.h> | |
23201 | #include <stdio.h> | |
23202 | #include <time.h> | |
23203 | #include <wchar.h> | |
23204 | int main () | |
23205 | { | |
23206 | /* This fails on Solaris 8 and 9. */ | |
23207 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
23208 | { | |
23209 | mbstate_t state; | |
23210 | wchar_t wc; | |
23211 | ||
23212 | memset (&state, '\0', sizeof (mbstate_t)); | |
23213 | if (mbrtowc (&wc, "", 1, &state) != 0) | |
23214 | return 2; | |
23215 | } | |
23216 | return 0; | |
23217 | } | |
23218 | _ACEOF | |
23219 | if ac_fn_c_try_run "$LINENO"; then : | |
23220 | gl_cv_func_mbrtowc_nul_retval=yes | |
23221 | else | |
23222 | gl_cv_func_mbrtowc_nul_retval=no | |
23223 | fi | |
23224 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23225 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23226 | fi | |
23227 | ||
23228 | fi | |
23229 | ||
23230 | fi | |
23231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 | |
23232 | $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } | |
23233 | ||
23234 | ||
23235 | ||
23236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5 | |
23237 | $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; } | |
23238 | if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then : | |
23239 | $as_echo_n "(cached) " >&6 | |
23240 | else | |
23241 | ||
23242 | case "$host_os" in | |
23243 | # Guess yes on native Windows. | |
23244 | mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;; | |
23245 | *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;; | |
23246 | esac | |
23247 | case "$host_os" in | |
23248 | mingw*) | |
23249 | if test "$cross_compiling" = yes; then : | |
23250 | : | |
23251 | else | |
23252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23253 | /* end confdefs.h. */ | |
23254 | ||
23255 | #include <locale.h> | |
23256 | #include <string.h> | |
23257 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23258 | <wchar.h>. | |
23259 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23260 | included before <wchar.h>. */ | |
23261 | #include <stddef.h> | |
23262 | #include <stdio.h> | |
23263 | #include <time.h> | |
23264 | #include <wchar.h> | |
23265 | int main () | |
23266 | { | |
23267 | int result = 0; | |
23268 | if (setlocale (LC_ALL, "French_France.65001") != NULL) | |
23269 | { | |
23270 | wchar_t wc = (wchar_t) 0xBADFACE; | |
23271 | mbstate_t state; | |
23272 | ||
23273 | memset (&state, '\0', sizeof (mbstate_t)); | |
23274 | if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) | |
23275 | && wc != (wchar_t) 0xBADFACE) | |
23276 | result |= 1; | |
23277 | } | |
8690e634 JK |
23278 | if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) |
23279 | { | |
5df4cba6 | 23280 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 23281 | mbstate_t state; |
8690e634 JK |
23282 | |
23283 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
23284 | if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2) |
23285 | && wc != (wchar_t) 0xBADFACE) | |
23286 | result |= 2; | |
8690e634 JK |
23287 | } |
23288 | if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) | |
23289 | { | |
5df4cba6 | 23290 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 23291 | mbstate_t state; |
8690e634 JK |
23292 | |
23293 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
23294 | if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2) |
23295 | && wc != (wchar_t) 0xBADFACE) | |
23296 | result |= 4; | |
8690e634 JK |
23297 | } |
23298 | if (setlocale (LC_ALL, "Chinese_China.936") != NULL) | |
23299 | { | |
5df4cba6 | 23300 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 23301 | mbstate_t state; |
8690e634 JK |
23302 | |
23303 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
23304 | if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2) |
23305 | && wc != (wchar_t) 0xBADFACE) | |
23306 | result |= 8; | |
8690e634 | 23307 | } |
5df4cba6 | 23308 | return result; |
8690e634 JK |
23309 | } |
23310 | _ACEOF | |
23311 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 23312 | gl_cv_func_mbrtowc_stores_incomplete=no |
8690e634 | 23313 | else |
5df4cba6 | 23314 | gl_cv_func_mbrtowc_stores_incomplete=yes |
8690e634 JK |
23315 | fi |
23316 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23317 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23318 | fi | |
c971b7fa | 23319 | |
5df4cba6 SM |
23320 | ;; |
23321 | *) | |
8690e634 | 23322 | |
5df4cba6 SM |
23323 | if test $LOCALE_FR_UTF8 != none; then |
23324 | if test "$cross_compiling" = yes; then : | |
8690e634 | 23325 | : |
c971b7fa PA |
23326 | else |
23327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23328 | /* end confdefs.h. */ | |
23329 | ||
8690e634 | 23330 | #include <locale.h> |
c971b7fa | 23331 | #include <string.h> |
8690e634 JK |
23332 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
23333 | <wchar.h>. | |
23334 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23335 | included before <wchar.h>. */ | |
23336 | #include <stddef.h> | |
23337 | #include <stdio.h> | |
23338 | #include <time.h> | |
23339 | #include <wchar.h> | |
23340 | int main () | |
c971b7fa | 23341 | { |
5df4cba6 | 23342 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) |
c971b7fa | 23343 | { |
5df4cba6 | 23344 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 23345 | mbstate_t state; |
c971b7fa | 23346 | |
8690e634 | 23347 | memset (&state, '\0', sizeof (mbstate_t)); |
5df4cba6 SM |
23348 | if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) |
23349 | && wc != (wchar_t) 0xBADFACE) | |
23350 | return 1; | |
8690e634 | 23351 | } |
c971b7fa PA |
23352 | return 0; |
23353 | } | |
23354 | _ACEOF | |
23355 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 23356 | gl_cv_func_mbrtowc_stores_incomplete=no |
c971b7fa | 23357 | else |
5df4cba6 | 23358 | gl_cv_func_mbrtowc_stores_incomplete=yes |
c971b7fa PA |
23359 | fi |
23360 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23361 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23362 | fi | |
23363 | ||
5df4cba6 SM |
23364 | fi |
23365 | ;; | |
23366 | esac | |
8690e634 | 23367 | |
c971b7fa | 23368 | fi |
5df4cba6 SM |
23369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5 |
23370 | $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; } | |
8690e634 | 23371 | |
4a626d0a PA |
23372 | |
23373 | ||
23374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 | |
23375 | $as_echo_n "checking whether mbrtowc works on empty input... " >&6; } | |
d0ac1c44 | 23376 | if ${gl_cv_func_mbrtowc_empty_input+:} false; then : |
4a626d0a PA |
23377 | $as_echo_n "(cached) " >&6 |
23378 | else | |
23379 | ||
23380 | case "$host_os" in | |
c0c3707f CB |
23381 | # Guess no on AIX and glibc systems. |
23382 | aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; | |
23383 | # Guess yes on native Windows. | |
23384 | mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; | |
23385 | *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; | |
4a626d0a PA |
23386 | esac |
23387 | if test "$cross_compiling" = yes; then : | |
23388 | : | |
23389 | else | |
23390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23391 | /* end confdefs.h. */ | |
23392 | ||
23393 | #include <wchar.h> | |
23394 | static wchar_t wc; | |
23395 | static mbstate_t mbs; | |
23396 | int | |
23397 | main (void) | |
23398 | { | |
49e4877c | 23399 | return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; |
4a626d0a PA |
23400 | } |
23401 | _ACEOF | |
23402 | if ac_fn_c_try_run "$LINENO"; then : | |
4a626d0a | 23403 | gl_cv_func_mbrtowc_empty_input=yes |
49e4877c PA |
23404 | else |
23405 | gl_cv_func_mbrtowc_empty_input=no | |
4a626d0a PA |
23406 | fi |
23407 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23408 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23409 | fi | |
23410 | ||
23411 | ||
23412 | fi | |
23413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 | |
23414 | $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } | |
23415 | ||
49e4877c | 23416 | |
c0c3707f | 23417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 |
49e4877c | 23418 | $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } |
5df4cba6 | 23419 | if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then : |
49e4877c PA |
23420 | $as_echo_n "(cached) " >&6 |
23421 | else | |
23422 | ||
5df4cba6 | 23423 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" |
49e4877c PA |
23424 | |
23425 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
23426 | case "$host_os" in |
23427 | # Guess yes on native Windows. | |
5df4cba6 | 23428 | mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;; |
c0c3707f CB |
23429 | esac |
23430 | ||
49e4877c PA |
23431 | else |
23432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23433 | /* end confdefs.h. */ | |
23434 | #include <limits.h> | |
23435 | #include <locale.h> | |
23436 | #include <wchar.h> | |
23437 | ||
23438 | int | |
23439 | main () | |
23440 | { | |
23441 | ||
23442 | int i; | |
23443 | char *locale = setlocale (LC_ALL, "C"); | |
23444 | if (! locale) | |
c0c3707f | 23445 | return 2; |
49e4877c PA |
23446 | for (i = CHAR_MIN; i <= CHAR_MAX; i++) |
23447 | { | |
23448 | char c = i; | |
23449 | wchar_t wc; | |
23450 | mbstate_t mbs = { 0, }; | |
23451 | size_t ss = mbrtowc (&wc, &c, 1, &mbs); | |
23452 | if (1 < ss) | |
c0c3707f | 23453 | return 3; |
49e4877c PA |
23454 | } |
23455 | return 0; | |
23456 | ||
6ec2e0f5 SDJ |
23457 | ; |
23458 | return 0; | |
23459 | } | |
23460 | _ACEOF | |
23461 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 23462 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes |
6ec2e0f5 | 23463 | else |
5df4cba6 | 23464 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no |
6ec2e0f5 SDJ |
23465 | fi |
23466 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23467 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23468 | fi | |
23469 | ||
c0c3707f | 23470 | |
6ec2e0f5 | 23471 | fi |
5df4cba6 SM |
23472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5 |
23473 | $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; } | |
6ec2e0f5 SDJ |
23474 | |
23475 | case "$gl_cv_func_mbrtowc_null_arg1" in | |
23476 | *yes) ;; | |
23477 | *) | |
23478 | $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h | |
23479 | ||
23480 | REPLACE_MBRTOWC=1 | |
23481 | ;; | |
23482 | esac | |
23483 | case "$gl_cv_func_mbrtowc_null_arg2" in | |
23484 | *yes) ;; | |
23485 | *) | |
23486 | $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h | |
23487 | ||
23488 | REPLACE_MBRTOWC=1 | |
23489 | ;; | |
23490 | esac | |
23491 | case "$gl_cv_func_mbrtowc_retval" in | |
23492 | *yes) ;; | |
23493 | *) | |
23494 | $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h | |
23495 | ||
23496 | REPLACE_MBRTOWC=1 | |
23497 | ;; | |
23498 | esac | |
23499 | case "$gl_cv_func_mbrtowc_nul_retval" in | |
23500 | *yes) ;; | |
23501 | *) | |
23502 | $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h | |
23503 | ||
5df4cba6 SM |
23504 | REPLACE_MBRTOWC=1 |
23505 | ;; | |
23506 | esac | |
23507 | case "$gl_cv_func_mbrtowc_stores_incomplete" in | |
23508 | *no) ;; | |
23509 | *) | |
23510 | $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h | |
23511 | ||
23512 | REPLACE_MBRTOWC=1 | |
23513 | ;; | |
23514 | esac | |
23515 | case "$gl_cv_func_mbrtowc_empty_input" in | |
23516 | *yes) ;; | |
23517 | *) | |
23518 | $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h | |
23519 | ||
23520 | REPLACE_MBRTOWC=1 | |
23521 | ;; | |
23522 | esac | |
23523 | case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in | |
23524 | *yes) ;; | |
23525 | *) | |
23526 | $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h | |
23527 | ||
23528 | REPLACE_MBRTOWC=1 | |
23529 | ;; | |
23530 | esac | |
23531 | fi | |
23532 | fi | |
23533 | if test $REPLACE_MBSTATE_T = 1; then | |
23534 | case "$host_os" in | |
23535 | mingw*) LIB_MBRTOWC= ;; | |
23536 | *) | |
23537 | ||
23538 | ||
23539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
23540 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
23541 | if ${gl_cv_have_weak+:} false; then : | |
23542 | $as_echo_n "(cached) " >&6 | |
23543 | else | |
23544 | gl_cv_have_weak=no | |
23545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23546 | /* end confdefs.h. */ | |
23547 | extern void xyzzy (); | |
23548 | #pragma weak xyzzy | |
23549 | int | |
23550 | main () | |
23551 | { | |
23552 | xyzzy(); | |
23553 | ; | |
23554 | return 0; | |
23555 | } | |
23556 | _ACEOF | |
23557 | if ac_fn_c_try_link "$LINENO"; then : | |
23558 | gl_cv_have_weak=maybe | |
23559 | fi | |
23560 | rm -f core conftest.err conftest.$ac_objext \ | |
23561 | conftest$ac_exeext conftest.$ac_ext | |
23562 | if test $gl_cv_have_weak = maybe; then | |
23563 | if test "$cross_compiling" = yes; then : | |
23564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23565 | /* end confdefs.h. */ | |
23566 | #ifdef __ELF__ | |
23567 | Extensible Linking Format | |
23568 | #endif | |
23569 | ||
23570 | _ACEOF | |
23571 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
23572 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
23573 | gl_cv_have_weak="guessing yes" | |
23574 | else | |
23575 | gl_cv_have_weak="guessing no" | |
23576 | fi | |
23577 | rm -f conftest* | |
23578 | ||
23579 | ||
23580 | else | |
23581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23582 | /* end confdefs.h. */ | |
23583 | ||
23584 | #include <stdio.h> | |
23585 | #pragma weak fputs | |
23586 | int main () | |
23587 | { | |
23588 | return (fputs == NULL); | |
23589 | } | |
23590 | _ACEOF | |
23591 | if ac_fn_c_try_run "$LINENO"; then : | |
23592 | gl_cv_have_weak=yes | |
23593 | else | |
23594 | gl_cv_have_weak=no | |
23595 | fi | |
23596 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23597 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23598 | fi | |
23599 | ||
23600 | fi | |
23601 | case " $LDFLAGS " in | |
23602 | *" -static "*) gl_cv_have_weak=no ;; | |
23603 | esac | |
23604 | case "$gl_cv_have_weak" in | |
23605 | *yes) | |
23606 | case "$host_os" in | |
23607 | freebsd* | dragonfly*) | |
23608 | : > conftest1.c | |
23609 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
23610 | cat <<EOF > conftest2.c | |
23611 | #include <pthread.h> | |
23612 | #pragma weak pthread_mutexattr_gettype | |
23613 | int main () | |
23614 | { | |
23615 | return (pthread_mutexattr_gettype != NULL); | |
23616 | } | |
23617 | EOF | |
23618 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
23619 | || gl_cv_have_weak=no | |
23620 | rm -f conftest1.c libempty.so conftest2.c conftest | |
23621 | ;; | |
23622 | esac | |
23623 | ;; | |
23624 | esac | |
23625 | ||
23626 | fi | |
23627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
23628 | $as_echo "$gl_cv_have_weak" >&6; } | |
23629 | case "$gl_cv_have_weak" in | |
23630 | *yes) | |
23631 | ||
23632 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
23633 | ||
23634 | ;; | |
23635 | esac | |
23636 | ||
23637 | case "$gl_cv_have_weak" in | |
23638 | *yes) LIB_MBRTOWC= ;; | |
23639 | *) LIB_MBRTOWC="$LIBPTHREAD" ;; | |
23640 | esac | |
23641 | ;; | |
23642 | esac | |
23643 | else | |
23644 | LIB_MBRTOWC= | |
23645 | fi | |
23646 | ||
23647 | ||
23648 | if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then | |
23649 | ||
23650 | ||
23651 | ||
23652 | ||
23653 | ||
23654 | ||
23655 | ||
23656 | ||
23657 | gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" | |
23658 | ||
23659 | if test $REPLACE_MBSTATE_T = 1; then | |
23660 | ||
23661 | ||
23662 | ||
23663 | ||
23664 | ||
23665 | ||
23666 | ||
23667 | ||
23668 | gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext" | |
23669 | ||
23670 | ||
23671 | ||
23672 | ||
23673 | ||
23674 | ||
23675 | ||
23676 | ||
23677 | ||
23678 | gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext" | |
23679 | ||
23680 | ||
23681 | ||
23682 | ||
23683 | CFLAG_VISIBILITY= | |
23684 | HAVE_VISIBILITY=0 | |
23685 | if test -n "$GCC"; then | |
23686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 | |
23687 | $as_echo_n "checking whether the -Werror option is usable... " >&6; } | |
23688 | if ${gl_cv_cc_vis_werror+:} false; then : | |
23689 | $as_echo_n "(cached) " >&6 | |
23690 | else | |
23691 | gl_save_CFLAGS="$CFLAGS" | |
23692 | CFLAGS="$CFLAGS -Werror" | |
23693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23694 | /* end confdefs.h. */ | |
23695 | ||
23696 | int | |
23697 | main () | |
23698 | { | |
23699 | ||
23700 | ; | |
23701 | return 0; | |
23702 | } | |
23703 | _ACEOF | |
23704 | if ac_fn_c_try_compile "$LINENO"; then : | |
23705 | gl_cv_cc_vis_werror=yes | |
23706 | else | |
23707 | gl_cv_cc_vis_werror=no | |
23708 | fi | |
23709 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23710 | CFLAGS="$gl_save_CFLAGS" | |
23711 | ||
23712 | fi | |
23713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 | |
23714 | $as_echo "$gl_cv_cc_vis_werror" >&6; } | |
23715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 | |
23716 | $as_echo_n "checking for simple visibility declarations... " >&6; } | |
23717 | if ${gl_cv_cc_visibility+:} false; then : | |
23718 | $as_echo_n "(cached) " >&6 | |
23719 | else | |
23720 | gl_save_CFLAGS="$CFLAGS" | |
23721 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
23722 | if test $gl_cv_cc_vis_werror = yes; then | |
23723 | CFLAGS="$CFLAGS -Werror" | |
23724 | fi | |
23725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23726 | /* end confdefs.h. */ | |
23727 | extern __attribute__((__visibility__("hidden"))) int hiddenvar; | |
23728 | extern __attribute__((__visibility__("default"))) int exportedvar; | |
23729 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | |
23730 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | |
23731 | void dummyfunc (void) {} | |
23732 | ||
23733 | int | |
23734 | main () | |
23735 | { | |
6ec2e0f5 | 23736 | |
5df4cba6 SM |
23737 | ; |
23738 | return 0; | |
23739 | } | |
23740 | _ACEOF | |
23741 | if ac_fn_c_try_compile "$LINENO"; then : | |
23742 | gl_cv_cc_visibility=yes | |
23743 | else | |
23744 | gl_cv_cc_visibility=no | |
23745 | fi | |
23746 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23747 | CFLAGS="$gl_save_CFLAGS" | |
6ec2e0f5 | 23748 | |
5df4cba6 SM |
23749 | fi |
23750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 | |
23751 | $as_echo "$gl_cv_cc_visibility" >&6; } | |
23752 | if test $gl_cv_cc_visibility = yes; then | |
23753 | CFLAG_VISIBILITY="-fvisibility=hidden" | |
23754 | HAVE_VISIBILITY=1 | |
6ec2e0f5 SDJ |
23755 | fi |
23756 | fi | |
23757 | ||
6ec2e0f5 SDJ |
23758 | |
23759 | ||
5df4cba6 SM |
23760 | cat >>confdefs.h <<_ACEOF |
23761 | #define HAVE_VISIBILITY $HAVE_VISIBILITY | |
23762 | _ACEOF | |
6ec2e0f5 SDJ |
23763 | |
23764 | ||
6ec2e0f5 | 23765 | |
5df4cba6 | 23766 | fi |
6ec2e0f5 | 23767 | |
c0c3707f | 23768 | |
6ec2e0f5 SDJ |
23769 | : |
23770 | ||
23771 | fi | |
23772 | ||
23773 | ||
23774 | ||
23775 | ||
23776 | ||
23777 | GNULIB_MBRTOWC=1 | |
23778 | ||
23779 | ||
23780 | ||
23781 | ||
23782 | ||
23783 | $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h | |
23784 | ||
23785 | ||
23786 | ||
23787 | ||
23788 | ||
23789 | ||
23790 | ||
23791 | ||
23792 | ||
23793 | ||
23794 | ||
23795 | ||
23796 | ||
23797 | ||
5df4cba6 SM |
23798 | |
23799 | if case "$host_os" in | |
23800 | mingw*) true ;; | |
23801 | *) test $ac_cv_func_mbsinit = yes ;; | |
23802 | esac \ | |
23803 | && test $ac_cv_func_mbrtowc = yes; then | |
6ec2e0f5 SDJ |
23804 | |
23805 | ||
23806 | ||
c0c3707f | 23807 | |
6ec2e0f5 SDJ |
23808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
23809 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
d0ac1c44 | 23810 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : |
6ec2e0f5 SDJ |
23811 | $as_echo_n "(cached) " >&6 |
23812 | else | |
23813 | ||
23814 | case "$host_os" in | |
23815 | # Guess no on AIX and OSF/1. | |
23816 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
23817 | # Guess yes otherwise. | |
23818 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
23819 | esac | |
23820 | if test $LOCALE_JA != none; then | |
23821 | if test "$cross_compiling" = yes; then : | |
23822 | : | |
23823 | else | |
23824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23825 | /* end confdefs.h. */ | |
23826 | ||
23827 | #include <locale.h> | |
23828 | #include <string.h> | |
23829 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23830 | <wchar.h>. | |
23831 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23832 | included before <wchar.h>. */ | |
23833 | #include <stddef.h> | |
23834 | #include <stdio.h> | |
23835 | #include <time.h> | |
23836 | #include <wchar.h> | |
23837 | int main () | |
23838 | { | |
23839 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
23840 | { | |
23841 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
23842 | mbstate_t state; | |
23843 | wchar_t wc; | |
23844 | ||
23845 | memset (&state, '\0', sizeof (mbstate_t)); | |
23846 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23847 | if (mbsinit (&state)) | |
c0c3707f CB |
23848 | return 2; |
23849 | } | |
23850 | return 0; | |
23851 | } | |
23852 | _ACEOF | |
23853 | if ac_fn_c_try_run "$LINENO"; then : | |
23854 | gl_cv_func_mbrtowc_incomplete_state=yes | |
23855 | else | |
23856 | gl_cv_func_mbrtowc_incomplete_state=no | |
23857 | fi | |
23858 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23859 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23860 | fi | |
23861 | ||
23862 | else | |
23863 | if test $LOCALE_FR_UTF8 != none; then | |
23864 | if test "$cross_compiling" = yes; then : | |
23865 | : | |
23866 | else | |
23867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23868 | /* end confdefs.h. */ | |
23869 | ||
23870 | #include <locale.h> | |
23871 | #include <string.h> | |
23872 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23873 | <wchar.h>. | |
23874 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23875 | included before <wchar.h>. */ | |
23876 | #include <stddef.h> | |
23877 | #include <stdio.h> | |
23878 | #include <time.h> | |
23879 | #include <wchar.h> | |
23880 | int main () | |
23881 | { | |
23882 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23883 | { | |
23884 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
23885 | mbstate_t state; | |
23886 | wchar_t wc; | |
23887 | ||
23888 | memset (&state, '\0', sizeof (mbstate_t)); | |
23889 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23890 | if (mbsinit (&state)) | |
23891 | return 2; | |
6ec2e0f5 SDJ |
23892 | } |
23893 | return 0; | |
23894 | } | |
23895 | _ACEOF | |
23896 | if ac_fn_c_try_run "$LINENO"; then : | |
23897 | gl_cv_func_mbrtowc_incomplete_state=yes | |
23898 | else | |
23899 | gl_cv_func_mbrtowc_incomplete_state=no | |
23900 | fi | |
23901 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23902 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23903 | fi | |
23904 | ||
c0c3707f | 23905 | fi |
6ec2e0f5 SDJ |
23906 | fi |
23907 | ||
23908 | fi | |
23909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 | |
23910 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
23911 | ||
23912 | ||
23913 | ||
23914 | ||
23915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 | |
23916 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 23917 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
6ec2e0f5 SDJ |
23918 | $as_echo_n "(cached) " >&6 |
23919 | else | |
23920 | ||
23921 | case "$host_os" in | |
23922 | # Guess no on Solaris 8. | |
23923 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
23924 | # Guess yes otherwise. | |
23925 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
23926 | esac | |
23927 | if test $LOCALE_ZH_CN != none; then | |
23928 | if test "$cross_compiling" = yes; then : | |
23929 | : | |
23930 | else | |
23931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23932 | /* end confdefs.h. */ | |
23933 | ||
23934 | #include <locale.h> | |
23935 | #include <stdlib.h> | |
23936 | #include <string.h> | |
23937 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23938 | <wchar.h>. | |
23939 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
23940 | included before <wchar.h>. */ | |
23941 | #include <stddef.h> | |
23942 | #include <stdio.h> | |
23943 | #include <time.h> | |
23944 | #include <wchar.h> | |
23945 | int main () | |
23946 | { | |
23947 | /* This fails on Solaris 8: | |
23948 | mbrtowc returns 2, and sets wc to 0x00F0. | |
23949 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
23950 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
23951 | { | |
23952 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
23953 | mbstate_t state; | |
23954 | wchar_t wc; | |
23955 | ||
23956 | memset (&state, '\0', sizeof (mbstate_t)); | |
23957 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
23958 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 23959 | return 2; |
6ec2e0f5 | 23960 | } |
49e4877c PA |
23961 | return 0; |
23962 | } | |
23963 | _ACEOF | |
23964 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 23965 | gl_cv_func_mbrtowc_sanitycheck=yes |
49e4877c | 23966 | else |
6ec2e0f5 | 23967 | gl_cv_func_mbrtowc_sanitycheck=no |
49e4877c PA |
23968 | fi |
23969 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23970 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23971 | fi | |
23972 | ||
6ec2e0f5 SDJ |
23973 | fi |
23974 | ||
49e4877c | 23975 | fi |
6ec2e0f5 SDJ |
23976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 |
23977 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
49e4877c | 23978 | |
6ec2e0f5 SDJ |
23979 | REPLACE_MBSTATE_T=0 |
23980 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
23981 | *yes) ;; | |
23982 | *) REPLACE_MBSTATE_T=1 ;; | |
23983 | esac | |
23984 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
23985 | *yes) ;; | |
23986 | *) REPLACE_MBSTATE_T=1 ;; | |
23987 | esac | |
23988 | else | |
23989 | REPLACE_MBSTATE_T=1 | |
23990 | fi | |
8690e634 | 23991 | |
8690e634 | 23992 | |
8690e634 | 23993 | |
6ec2e0f5 SDJ |
23994 | if test $ac_cv_func_mbsinit = no; then |
23995 | HAVE_MBSINIT=0 | |
23996 | ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " | |
23997 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
23998 | <wchar.h>. | |
23999 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24000 | included before <wchar.h>. */ | |
24001 | #include <stddef.h> | |
24002 | #include <stdio.h> | |
24003 | #include <time.h> | |
24004 | #include <wchar.h> | |
8690e634 | 24005 | |
6ec2e0f5 | 24006 | " |
d0ac1c44 | 24007 | if test "x$ac_cv_have_decl_mbsinit" = xyes; then : |
6ec2e0f5 SDJ |
24008 | ac_have_decl=1 |
24009 | else | |
24010 | ac_have_decl=0 | |
24011 | fi | |
4a626d0a | 24012 | |
6ec2e0f5 SDJ |
24013 | cat >>confdefs.h <<_ACEOF |
24014 | #define HAVE_DECL_MBSINIT $ac_have_decl | |
24015 | _ACEOF | |
49e4877c | 24016 | |
6ec2e0f5 SDJ |
24017 | if test $ac_cv_have_decl_mbsinit = yes; then |
24018 | REPLACE_MBSINIT=1 | |
24019 | fi | |
24020 | else | |
24021 | if test $REPLACE_MBSTATE_T = 1; then | |
24022 | REPLACE_MBSINIT=1 | |
24023 | else | |
24024 | case "$host_os" in | |
24025 | mingw*) REPLACE_MBSINIT=1 ;; | |
8690e634 | 24026 | esac |
c971b7fa PA |
24027 | fi |
24028 | fi | |
24029 | ||
6ec2e0f5 | 24030 | if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then |
c971b7fa | 24031 | |
c971b7fa | 24032 | |
c971b7fa PA |
24033 | |
24034 | ||
24035 | ||
24036 | ||
24037 | ||
24038 | ||
6ec2e0f5 | 24039 | gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" |
8690e634 JK |
24040 | |
24041 | ||
24042 | : | |
c971b7fa | 24043 | |
a512b375 | 24044 | fi |
c971b7fa | 24045 | |
8690e634 JK |
24046 | |
24047 | ||
24048 | ||
24049 | ||
6ec2e0f5 | 24050 | GNULIB_MBSINIT=1 |
8690e634 JK |
24051 | |
24052 | ||
24053 | ||
24054 | ||
8690e634 | 24055 | |
6ec2e0f5 | 24056 | $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h |
8690e634 JK |
24057 | |
24058 | ||
24059 | ||
24060 | ||
24061 | ||
24062 | ||
24063 | ||
24064 | ||
24065 | ||
24066 | ||
24067 | ||
c971b7fa | 24068 | |
c971b7fa | 24069 | |
5df4cba6 SM |
24070 | |
24071 | if case "$host_os" in | |
24072 | mingw*) true ;; | |
24073 | *) test $ac_cv_func_mbsinit = yes ;; | |
24074 | esac \ | |
24075 | && test $ac_cv_func_mbrtowc = yes; then | |
c971b7fa | 24076 | |
8690e634 JK |
24077 | |
24078 | ||
c0c3707f | 24079 | |
8690e634 JK |
24080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
24081 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
d0ac1c44 | 24082 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : |
8690e634 JK |
24083 | $as_echo_n "(cached) " >&6 |
24084 | else | |
24085 | ||
24086 | case "$host_os" in | |
24087 | # Guess no on AIX and OSF/1. | |
24088 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
24089 | # Guess yes otherwise. | |
24090 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
24091 | esac | |
24092 | if test $LOCALE_JA != none; then | |
24093 | if test "$cross_compiling" = yes; then : | |
24094 | : | |
c971b7fa PA |
24095 | else |
24096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24097 | /* end confdefs.h. */ | |
24098 | ||
8690e634 JK |
24099 | #include <locale.h> |
24100 | #include <string.h> | |
24101 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
24102 | <wchar.h>. | |
24103 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24104 | included before <wchar.h>. */ | |
24105 | #include <stddef.h> | |
24106 | #include <stdio.h> | |
24107 | #include <time.h> | |
24108 | #include <wchar.h> | |
24109 | int main () | |
c971b7fa | 24110 | { |
8690e634 | 24111 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) |
c971b7fa | 24112 | { |
8690e634 JK |
24113 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ |
24114 | mbstate_t state; | |
24115 | wchar_t wc; | |
24116 | ||
24117 | memset (&state, '\0', sizeof (mbstate_t)); | |
24118 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24119 | if (mbsinit (&state)) | |
c0c3707f CB |
24120 | return 2; |
24121 | } | |
24122 | return 0; | |
24123 | } | |
24124 | _ACEOF | |
24125 | if ac_fn_c_try_run "$LINENO"; then : | |
24126 | gl_cv_func_mbrtowc_incomplete_state=yes | |
24127 | else | |
24128 | gl_cv_func_mbrtowc_incomplete_state=no | |
24129 | fi | |
24130 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24131 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24132 | fi | |
24133 | ||
24134 | else | |
24135 | if test $LOCALE_FR_UTF8 != none; then | |
24136 | if test "$cross_compiling" = yes; then : | |
24137 | : | |
24138 | else | |
24139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24140 | /* end confdefs.h. */ | |
24141 | ||
24142 | #include <locale.h> | |
24143 | #include <string.h> | |
24144 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
24145 | <wchar.h>. | |
24146 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24147 | included before <wchar.h>. */ | |
24148 | #include <stddef.h> | |
24149 | #include <stdio.h> | |
24150 | #include <time.h> | |
24151 | #include <wchar.h> | |
24152 | int main () | |
24153 | { | |
24154 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
24155 | { | |
24156 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
24157 | mbstate_t state; | |
24158 | wchar_t wc; | |
24159 | ||
24160 | memset (&state, '\0', sizeof (mbstate_t)); | |
24161 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24162 | if (mbsinit (&state)) | |
24163 | return 2; | |
c971b7fa | 24164 | } |
c971b7fa PA |
24165 | return 0; |
24166 | } | |
24167 | _ACEOF | |
24168 | if ac_fn_c_try_run "$LINENO"; then : | |
8690e634 | 24169 | gl_cv_func_mbrtowc_incomplete_state=yes |
c971b7fa | 24170 | else |
8690e634 | 24171 | gl_cv_func_mbrtowc_incomplete_state=no |
c971b7fa PA |
24172 | fi |
24173 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24174 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24175 | fi | |
24176 | ||
c0c3707f | 24177 | fi |
8690e634 | 24178 | fi |
c971b7fa PA |
24179 | |
24180 | fi | |
8690e634 JK |
24181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 |
24182 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
c971b7fa PA |
24183 | |
24184 | ||
c971b7fa PA |
24185 | |
24186 | ||
8690e634 JK |
24187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 |
24188 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 24189 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
c971b7fa PA |
24190 | $as_echo_n "(cached) " >&6 |
24191 | else | |
8690e634 JK |
24192 | |
24193 | case "$host_os" in | |
24194 | # Guess no on Solaris 8. | |
24195 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
24196 | # Guess yes otherwise. | |
24197 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
24198 | esac | |
24199 | if test $LOCALE_ZH_CN != none; then | |
24200 | if test "$cross_compiling" = yes; then : | |
24201 | : | |
24202 | else | |
c971b7fa PA |
24203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24204 | /* end confdefs.h. */ | |
8690e634 JK |
24205 | |
24206 | #include <locale.h> | |
24207 | #include <stdlib.h> | |
24208 | #include <string.h> | |
24209 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
24210 | <wchar.h>. | |
24211 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24212 | included before <wchar.h>. */ | |
c971b7fa | 24213 | #include <stddef.h> |
8690e634 JK |
24214 | #include <stdio.h> |
24215 | #include <time.h> | |
24216 | #include <wchar.h> | |
24217 | int main () | |
c971b7fa | 24218 | { |
8690e634 JK |
24219 | /* This fails on Solaris 8: |
24220 | mbrtowc returns 2, and sets wc to 0x00F0. | |
24221 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
24222 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
24223 | { | |
24224 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
24225 | mbstate_t state; | |
24226 | wchar_t wc; | |
24227 | ||
24228 | memset (&state, '\0', sizeof (mbstate_t)); | |
24229 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
24230 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 24231 | return 2; |
8690e634 | 24232 | } |
c971b7fa PA |
24233 | return 0; |
24234 | } | |
24235 | _ACEOF | |
8690e634 JK |
24236 | if ac_fn_c_try_run "$LINENO"; then : |
24237 | gl_cv_func_mbrtowc_sanitycheck=yes | |
c971b7fa | 24238 | else |
8690e634 | 24239 | gl_cv_func_mbrtowc_sanitycheck=no |
c971b7fa | 24240 | fi |
8690e634 JK |
24241 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24242 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 24243 | fi |
c971b7fa | 24244 | |
8690e634 JK |
24245 | fi |
24246 | ||
24247 | fi | |
24248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 | |
24249 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
c971b7fa | 24250 | |
8690e634 JK |
24251 | REPLACE_MBSTATE_T=0 |
24252 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
24253 | *yes) ;; | |
24254 | *) REPLACE_MBSTATE_T=1 ;; | |
24255 | esac | |
24256 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
24257 | *yes) ;; | |
24258 | *) REPLACE_MBSTATE_T=1 ;; | |
24259 | esac | |
24260 | else | |
24261 | REPLACE_MBSTATE_T=1 | |
c971b7fa PA |
24262 | fi |
24263 | ||
c971b7fa | 24264 | |
8690e634 | 24265 | |
6ec2e0f5 SDJ |
24266 | if test $ac_cv_func_mbsrtowcs = no; then |
24267 | HAVE_MBSRTOWCS=0 | |
24268 | ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " | |
8690e634 JK |
24269 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
24270 | <wchar.h>. | |
24271 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24272 | included before <wchar.h>. */ | |
24273 | #include <stddef.h> | |
24274 | #include <stdio.h> | |
24275 | #include <time.h> | |
24276 | #include <wchar.h> | |
24277 | ||
24278 | " | |
d0ac1c44 | 24279 | if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then : |
8690e634 JK |
24280 | ac_have_decl=1 |
24281 | else | |
24282 | ac_have_decl=0 | |
c971b7fa | 24283 | fi |
c971b7fa | 24284 | |
8690e634 | 24285 | cat >>confdefs.h <<_ACEOF |
6ec2e0f5 | 24286 | #define HAVE_DECL_MBSRTOWCS $ac_have_decl |
c971b7fa | 24287 | _ACEOF |
c971b7fa | 24288 | |
6ec2e0f5 SDJ |
24289 | if test $ac_cv_have_decl_mbsrtowcs = yes; then |
24290 | REPLACE_MBSRTOWCS=1 | |
8690e634 JK |
24291 | fi |
24292 | else | |
24293 | if test $REPLACE_MBSTATE_T = 1; then | |
6ec2e0f5 | 24294 | REPLACE_MBSRTOWCS=1 |
8690e634 | 24295 | else |
6ec2e0f5 SDJ |
24296 | |
24297 | ||
24298 | ||
24299 | ||
24300 | ||
24301 | ||
24302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 | |
24303 | $as_echo_n "checking whether mbsrtowcs works... " >&6; } | |
d0ac1c44 | 24304 | if ${gl_cv_func_mbsrtowcs_works+:} false; then : |
6ec2e0f5 SDJ |
24305 | $as_echo_n "(cached) " >&6 |
24306 | else | |
24307 | ||
24308 | case "$host_os" in | |
24309 | # Guess no on HP-UX, Solaris, mingw. | |
24310 | hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; | |
24311 | # Guess yes otherwise. | |
24312 | *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; | |
24313 | esac | |
24314 | if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then | |
24315 | if test "$cross_compiling" = yes; then : | |
24316 | : | |
24317 | else | |
24318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24319 | /* end confdefs.h. */ | |
24320 | ||
24321 | #include <locale.h> | |
24322 | #include <string.h> | |
24323 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
24324 | <wchar.h>. | |
24325 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
24326 | included before <wchar.h>. */ | |
24327 | #include <stddef.h> | |
24328 | #include <stdio.h> | |
24329 | #include <time.h> | |
24330 | #include <wchar.h> | |
24331 | int main () | |
24332 | { | |
24333 | int result = 0; | |
24334 | /* Test whether the function supports a NULL destination argument. | |
24335 | This fails on native Windows. */ | |
24336 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | |
24337 | { | |
24338 | const char input[] = "\337er"; | |
24339 | const char *src = input; | |
24340 | mbstate_t state; | |
24341 | ||
24342 | memset (&state, '\0', sizeof (mbstate_t)); | |
24343 | if (mbsrtowcs (NULL, &src, 1, &state) != 3 | |
24344 | || src != input) | |
24345 | result |= 1; | |
24346 | } | |
24347 | /* Test whether the function works when started with a conversion state | |
24348 | in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ | |
24349 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
24350 | { | |
24351 | const char input[] = "B\303\274\303\237er"; | |
24352 | mbstate_t state; | |
24353 | ||
24354 | memset (&state, '\0', sizeof (mbstate_t)); | |
24355 | if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) | |
24356 | if (!mbsinit (&state)) | |
24357 | { | |
24358 | const char *src = input + 2; | |
24359 | if (mbsrtowcs (NULL, &src, 10, &state) != 4) | |
24360 | result |= 2; | |
24361 | } | |
24362 | } | |
24363 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
24364 | { | |
24365 | const char input[] = "<\306\374\313\334\270\354>"; | |
24366 | mbstate_t state; | |
24367 | ||
24368 | memset (&state, '\0', sizeof (mbstate_t)); | |
24369 | if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) | |
24370 | if (!mbsinit (&state)) | |
24371 | { | |
24372 | const char *src = input + 4; | |
24373 | if (mbsrtowcs (NULL, &src, 10, &state) != 3) | |
24374 | result |= 4; | |
24375 | } | |
24376 | } | |
24377 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
24378 | { | |
24379 | const char input[] = "B\250\271\201\060\211\070er"; | |
24380 | mbstate_t state; | |
24381 | ||
24382 | memset (&state, '\0', sizeof (mbstate_t)); | |
24383 | if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) | |
24384 | if (!mbsinit (&state)) | |
24385 | { | |
24386 | const char *src = input + 2; | |
24387 | if (mbsrtowcs (NULL, &src, 10, &state) != 4) | |
24388 | result |= 8; | |
24389 | } | |
24390 | } | |
24391 | return result; | |
24392 | } | |
24393 | _ACEOF | |
24394 | if ac_fn_c_try_run "$LINENO"; then : | |
24395 | gl_cv_func_mbsrtowcs_works=yes | |
24396 | else | |
24397 | gl_cv_func_mbsrtowcs_works=no | |
24398 | fi | |
24399 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24400 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24401 | fi | |
24402 | ||
24403 | fi | |
24404 | ||
24405 | fi | |
24406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 | |
24407 | $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } | |
24408 | ||
24409 | case "$gl_cv_func_mbsrtowcs_works" in | |
24410 | *yes) ;; | |
24411 | *) REPLACE_MBSRTOWCS=1 ;; | |
8690e634 JK |
24412 | esac |
24413 | fi | |
24414 | fi | |
c971b7fa | 24415 | |
6ec2e0f5 | 24416 | if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then |
c971b7fa PA |
24417 | |
24418 | ||
24419 | ||
24420 | ||
24421 | ||
24422 | ||
24423 | ||
24424 | ||
698be2d8 CB |
24425 | gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" |
24426 | ||
24427 | ||
24428 | ||
24429 | ||
24430 | ||
24431 | ||
24432 | ||
24433 | ||
24434 | ||
24435 | gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" | |
24436 | ||
24437 | ||
24438 | : | |
24439 | ||
24440 | fi | |
24441 | ||
24442 | ||
24443 | ||
24444 | ||
24445 | ||
24446 | GNULIB_MBSRTOWCS=1 | |
24447 | ||
24448 | ||
24449 | ||
24450 | ||
24451 | ||
24452 | $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h | |
24453 | ||
24454 | ||
24455 | ||
24456 | ||
24457 | ||
24458 | ||
24459 | for ac_func in mbtowc | |
24460 | do : | |
24461 | ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc" | |
24462 | if test "x$ac_cv_func_mbtowc" = xyes; then : | |
24463 | cat >>confdefs.h <<_ACEOF | |
24464 | #define HAVE_MBTOWC 1 | |
24465 | _ACEOF | |
24466 | ||
24467 | fi | |
24468 | done | |
24469 | ||
24470 | if test $ac_cv_func_mbtowc = no; then | |
24471 | HAVE_MBTOWC=0 | |
24472 | else | |
24473 | if false; then | |
24474 | REPLACE_MBTOWC=1 | |
24475 | fi | |
24476 | fi | |
6ec2e0f5 | 24477 | |
698be2d8 | 24478 | if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then |
6ec2e0f5 SDJ |
24479 | |
24480 | ||
24481 | ||
24482 | ||
24483 | ||
24484 | ||
24485 | ||
24486 | ||
698be2d8 | 24487 | gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" |
c971b7fa PA |
24488 | |
24489 | ||
8690e634 | 24490 | : |
c971b7fa | 24491 | |
a512b375 | 24492 | fi |
c971b7fa | 24493 | |
c971b7fa | 24494 | |
c971b7fa | 24495 | |
c971b7fa PA |
24496 | |
24497 | ||
698be2d8 | 24498 | GNULIB_MBTOWC=1 |
c971b7fa | 24499 | |
c971b7fa PA |
24500 | |
24501 | ||
24502 | ||
24503 | ||
698be2d8 | 24504 | $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h |
c971b7fa PA |
24505 | |
24506 | ||
c971b7fa | 24507 | |
c971b7fa | 24508 | |
6ec2e0f5 | 24509 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then |
c971b7fa PA |
24510 | |
24511 | ||
24512 | ||
c971b7fa | 24513 | |
c971b7fa PA |
24514 | |
24515 | ||
24516 | ||
24517 | ||
6ec2e0f5 | 24518 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" |
8690e634 | 24519 | |
c971b7fa | 24520 | |
6ec2e0f5 SDJ |
24521 | for ac_header in bp-sym.h |
24522 | do : | |
24523 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
d0ac1c44 | 24524 | if test "x$ac_cv_header_bp_sym_h" = xyes; then : |
6ec2e0f5 SDJ |
24525 | cat >>confdefs.h <<_ACEOF |
24526 | #define HAVE_BP_SYM_H 1 | |
24527 | _ACEOF | |
c971b7fa | 24528 | |
6ec2e0f5 | 24529 | fi |
c971b7fa | 24530 | |
6ec2e0f5 SDJ |
24531 | done |
24532 | ||
24533 | ||
24534 | fi | |
24535 | ||
24536 | ||
24537 | ||
24538 | ||
24539 | ||
24540 | GNULIB_MEMCHR=1 | |
24541 | ||
24542 | ||
24543 | ||
24544 | ||
24545 | ||
24546 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h | |
24547 | ||
24548 | ||
24549 | ||
24550 | ||
24551 | ||
24552 | if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then | |
24553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
24554 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
d0ac1c44 | 24555 | if ${gl_cv_func_memmem_works_fast+:} false; then : |
8690e634 JK |
24556 | $as_echo_n "(cached) " >&6 |
24557 | else | |
6ec2e0f5 SDJ |
24558 | if test "$cross_compiling" = yes; then : |
24559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24560 | /* end confdefs.h. */ | |
24561 | ||
24562 | #include <features.h> | |
24563 | #ifdef __GNU_LIBRARY__ | |
24564 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \ | |
24565 | && !defined __UCLIBC__ | |
24566 | Lucky user | |
24567 | #endif | |
24568 | #endif | |
24569 | #ifdef __CYGWIN__ | |
24570 | #include <cygwin/version.h> | |
24571 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0) | |
24572 | Lucky user | |
24573 | #endif | |
24574 | #endif | |
24575 | ||
24576 | _ACEOF | |
24577 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
24578 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
24579 | gl_cv_func_memmem_works_fast="guessing yes" | |
24580 | else | |
c0c3707f | 24581 | gl_cv_func_memmem_works_fast="$gl_cross_guess_normal" |
6ec2e0f5 SDJ |
24582 | fi |
24583 | rm -f conftest* | |
24584 | ||
c971b7fa | 24585 | |
8690e634 JK |
24586 | else |
24587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa | 24588 | /* end confdefs.h. */ |
c971b7fa | 24589 | |
6ec2e0f5 SDJ |
24590 | #include <signal.h> /* for signal */ |
24591 | #include <string.h> /* for memmem */ | |
24592 | #include <stdlib.h> /* for malloc */ | |
24593 | #include <unistd.h> /* for alarm */ | |
24594 | static void quit (int sig) { _exit (sig + 128); } | |
24595 | ||
24596 | int | |
24597 | main () | |
8690e634 | 24598 | { |
8690e634 | 24599 | |
6ec2e0f5 SDJ |
24600 | int result = 0; |
24601 | size_t m = 1000000; | |
24602 | char *haystack = (char *) malloc (2 * m + 1); | |
24603 | char *needle = (char *) malloc (m + 1); | |
24604 | /* Failure to compile this test due to missing alarm is okay, | |
24605 | since all such platforms (mingw) also lack memmem. */ | |
24606 | signal (SIGALRM, quit); | |
24607 | alarm (5); | |
24608 | /* Check for quadratic performance. */ | |
24609 | if (haystack && needle) | |
24610 | { | |
24611 | memset (haystack, 'A', 2 * m); | |
24612 | haystack[2 * m] = 'B'; | |
24613 | memset (needle, 'A', m); | |
24614 | needle[m] = 'B'; | |
24615 | if (!memmem (haystack, 2 * m + 1, needle, m + 1)) | |
24616 | result |= 1; | |
24617 | } | |
c0c3707f CB |
24618 | /* Free allocated memory, in case some sanitizer is watching. */ |
24619 | free (haystack); | |
24620 | free (needle); | |
6ec2e0f5 SDJ |
24621 | return result; |
24622 | ||
24623 | ; | |
c971b7fa PA |
24624 | return 0; |
24625 | } | |
24626 | _ACEOF | |
8690e634 | 24627 | if ac_fn_c_try_run "$LINENO"; then : |
6ec2e0f5 | 24628 | gl_cv_func_memmem_works_fast=yes |
8690e634 | 24629 | else |
6ec2e0f5 | 24630 | gl_cv_func_memmem_works_fast=no |
8690e634 JK |
24631 | fi |
24632 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24633 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 24634 | fi |
c971b7fa PA |
24635 | |
24636 | ||
8690e634 | 24637 | fi |
6ec2e0f5 SDJ |
24638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5 |
24639 | $as_echo "$gl_cv_func_memmem_works_fast" >&6; } | |
24640 | case "$gl_cv_func_memmem_works_fast" in | |
24641 | *yes) ;; | |
24642 | *) | |
24643 | REPLACE_MEMMEM=1 | |
24644 | ;; | |
24645 | esac | |
24646 | fi | |
c971b7fa | 24647 | |
6ec2e0f5 | 24648 | if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then |
8690e634 JK |
24649 | |
24650 | ||
24651 | ||
6ec2e0f5 SDJ |
24652 | |
24653 | ||
24654 | ||
24655 | ||
24656 | ||
24657 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
24658 | ||
24659 | fi | |
24660 | ||
24661 | ||
24662 | ||
24663 | ||
24664 | for ac_func in memmem | |
24665 | do : | |
24666 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
d0ac1c44 | 24667 | if test "x$ac_cv_func_memmem" = xyes; then : |
6ec2e0f5 SDJ |
24668 | cat >>confdefs.h <<_ACEOF |
24669 | #define HAVE_MEMMEM 1 | |
24670 | _ACEOF | |
24671 | ||
24672 | fi | |
24673 | done | |
24674 | ||
24675 | if test $ac_cv_func_memmem = yes; then | |
24676 | HAVE_MEMMEM=1 | |
24677 | else | |
24678 | HAVE_MEMMEM=0 | |
24679 | fi | |
24680 | ||
24681 | if test $ac_cv_have_decl_memmem = no; then | |
24682 | HAVE_DECL_MEMMEM=0 | |
24683 | else | |
24684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 | |
24685 | $as_echo_n "checking whether memmem works... " >&6; } | |
d0ac1c44 | 24686 | if ${gl_cv_func_memmem_works_always+:} false; then : |
c971b7fa PA |
24687 | $as_echo_n "(cached) " >&6 |
24688 | else | |
6ec2e0f5 SDJ |
24689 | if test "$cross_compiling" = yes; then : |
24690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24691 | /* end confdefs.h. */ | |
24692 | ||
24693 | #ifdef __GNU_LIBRARY__ | |
24694 | #include <features.h> | |
24695 | #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ | |
24696 | || __GLIBC_MINOR__ > 12)) \ | |
24697 | || (__GLIBC__ > 2)) \ | |
24698 | || defined __UCLIBC__ | |
24699 | Lucky user | |
24700 | #endif | |
24701 | #elif defined __CYGWIN__ | |
24702 | #include <cygwin/version.h> | |
24703 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
24704 | Lucky user | |
24705 | #endif | |
24706 | #else | |
24707 | Lucky user | |
24708 | #endif | |
24709 | ||
24710 | _ACEOF | |
24711 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
24712 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
24713 | gl_cv_func_memmem_works_always="guessing yes" | |
24714 | else | |
c0c3707f | 24715 | gl_cv_func_memmem_works_always="$gl_cross_guess_normal" |
6ec2e0f5 SDJ |
24716 | fi |
24717 | rm -f conftest* | |
24718 | ||
8690e634 | 24719 | |
8690e634 | 24720 | else |
c971b7fa PA |
24721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24722 | /* end confdefs.h. */ | |
c971b7fa | 24723 | |
6ec2e0f5 SDJ |
24724 | #include <string.h> /* for memmem */ |
24725 | #define P "_EF_BF_BD" | |
24726 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
24727 | #define NEEDLE P P P P P | |
24728 | ||
24729 | int | |
24730 | main () | |
c971b7fa | 24731 | { |
8690e634 | 24732 | |
6ec2e0f5 SDJ |
24733 | int result = 0; |
24734 | if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) | |
24735 | result |= 1; | |
24736 | /* Check for empty needle behavior. */ | |
24737 | { | |
24738 | const char *haystack = "AAA"; | |
698be2d8 | 24739 | if (memmem (haystack, 3, (const char *) 1, 0) != haystack) |
6ec2e0f5 | 24740 | result |= 2; |
8690e634 | 24741 | } |
6ec2e0f5 SDJ |
24742 | return result; |
24743 | ||
24744 | ; | |
c971b7fa PA |
24745 | return 0; |
24746 | } | |
24747 | _ACEOF | |
8690e634 | 24748 | if ac_fn_c_try_run "$LINENO"; then : |
6ec2e0f5 | 24749 | gl_cv_func_memmem_works_always=yes |
c971b7fa | 24750 | else |
6ec2e0f5 | 24751 | gl_cv_func_memmem_works_always=no |
c971b7fa | 24752 | fi |
8690e634 JK |
24753 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24754 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 24755 | fi |
8690e634 | 24756 | |
8690e634 JK |
24757 | |
24758 | fi | |
6ec2e0f5 SDJ |
24759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 |
24760 | $as_echo "$gl_cv_func_memmem_works_always" >&6; } | |
24761 | case "$gl_cv_func_memmem_works_always" in | |
8690e634 | 24762 | *yes) ;; |
6ec2e0f5 SDJ |
24763 | *) |
24764 | REPLACE_MEMMEM=1 | |
24765 | ;; | |
8690e634 | 24766 | esac |
c971b7fa | 24767 | fi |
6ec2e0f5 | 24768 | : |
c971b7fa | 24769 | |
6ec2e0f5 | 24770 | if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then |
c971b7fa | 24771 | |
c971b7fa | 24772 | |
8690e634 | 24773 | |
c971b7fa | 24774 | |
6ec2e0f5 SDJ |
24775 | |
24776 | ||
24777 | ||
24778 | ||
24779 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
24780 | ||
24781 | fi | |
24782 | ||
24783 | ||
24784 | ||
24785 | ||
24786 | ||
24787 | GNULIB_MEMMEM=1 | |
24788 | ||
24789 | ||
24790 | ||
24791 | ||
24792 | ||
24793 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h | |
24794 | ||
24795 | ||
24796 | ||
24797 | ||
24798 | ||
24799 | ||
24800 | ||
24801 | ||
24802 | ||
24803 | for ac_func in mempcpy | |
24804 | do : | |
24805 | ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" | |
d0ac1c44 | 24806 | if test "x$ac_cv_func_mempcpy" = xyes; then : |
6ec2e0f5 SDJ |
24807 | cat >>confdefs.h <<_ACEOF |
24808 | #define HAVE_MEMPCPY 1 | |
8690e634 | 24809 | _ACEOF |
c971b7fa | 24810 | |
6ec2e0f5 SDJ |
24811 | fi |
24812 | done | |
c971b7fa | 24813 | |
6ec2e0f5 SDJ |
24814 | if test $ac_cv_func_mempcpy = no; then |
24815 | HAVE_MEMPCPY=0 | |
24816 | fi | |
8690e634 | 24817 | |
6ec2e0f5 | 24818 | if test $HAVE_MEMPCPY = 0; then |
8690e634 JK |
24819 | |
24820 | ||
24821 | ||
24822 | ||
8690e634 | 24823 | |
6ec2e0f5 SDJ |
24824 | |
24825 | ||
24826 | ||
24827 | gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" | |
24828 | ||
24829 | ||
8690e634 | 24830 | : |
c971b7fa | 24831 | |
6ec2e0f5 | 24832 | fi |
c971b7fa | 24833 | |
8690e634 | 24834 | |
8690e634 | 24835 | |
8690e634 | 24836 | |
6ec2e0f5 SDJ |
24837 | |
24838 | GNULIB_MEMPCPY=1 | |
24839 | ||
24840 | ||
24841 | ||
24842 | ||
24843 | ||
24844 | $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h | |
24845 | ||
24846 | ||
24847 | ||
24848 | ||
24849 | ||
24850 | ||
24851 | ||
24852 | ||
24853 | if test $ac_cv_have_decl_memrchr = no; then | |
24854 | HAVE_DECL_MEMRCHR=0 | |
24855 | fi | |
24856 | ||
24857 | for ac_func in memrchr | |
24858 | do : | |
24859 | ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" | |
d0ac1c44 | 24860 | if test "x$ac_cv_func_memrchr" = xyes; then : |
6ec2e0f5 SDJ |
24861 | cat >>confdefs.h <<_ACEOF |
24862 | #define HAVE_MEMRCHR 1 | |
c971b7fa | 24863 | _ACEOF |
6ec2e0f5 | 24864 | |
c971b7fa | 24865 | fi |
6ec2e0f5 | 24866 | done |
8690e634 | 24867 | |
8690e634 | 24868 | |
6ec2e0f5 | 24869 | if test $ac_cv_func_memrchr = no; then |
8690e634 | 24870 | |
6ec2e0f5 SDJ |
24871 | |
24872 | ||
24873 | ||
24874 | ||
24875 | ||
24876 | ||
24877 | ||
24878 | gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" | |
24879 | ||
24880 | : | |
c971b7fa PA |
24881 | fi |
24882 | ||
24883 | ||
c971b7fa | 24884 | |
c971b7fa | 24885 | |
c971b7fa | 24886 | |
6ec2e0f5 SDJ |
24887 | GNULIB_MEMRCHR=1 |
24888 | ||
24889 | ||
24890 | ||
24891 | ||
24892 | ||
24893 | $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h | |
24894 | ||
24895 | ||
24896 | ||
24897 | ||
2d8adcbd | 24898 | |
698be2d8 CB |
24899 | |
24900 | ||
24901 | ||
8a99096f SM |
24902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 |
24903 | $as_echo_n "checking whether mkdir handles trailing slash... " >&6; } | |
24904 | if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then : | |
24905 | $as_echo_n "(cached) " >&6 | |
24906 | else | |
24907 | rm -rf conftest.dir | |
24908 | if test "$cross_compiling" = yes; then : | |
24909 | case "$host_os" in | |
c0c3707f CB |
24910 | # Guess yes on Linux systems. |
24911 | linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; | |
24912 | # Guess yes on glibc systems. | |
24913 | *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; | |
24914 | # Guess yes on MSVC, no on mingw. | |
24915 | mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24916 | /* end confdefs.h. */ | |
24917 | ||
24918 | #ifdef _MSC_VER | |
24919 | Known | |
24920 | #endif | |
24921 | ||
24922 | _ACEOF | |
24923 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
24924 | $EGREP "Known" >/dev/null 2>&1; then : | |
24925 | gl_cv_func_mkdir_trailing_slash_works="guessing yes" | |
24926 | else | |
24927 | gl_cv_func_mkdir_trailing_slash_works="guessing no" | |
24928 | fi | |
24929 | rm -f conftest* | |
24930 | ||
24931 | ;; | |
24932 | # If we don't know, obey --enable-cross-guesses. | |
24933 | *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;; | |
8a99096f SM |
24934 | esac |
24935 | ||
24936 | else | |
24937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24938 | /* end confdefs.h. */ | |
24939 | ||
24940 | # include <sys/types.h> | |
24941 | # include <sys/stat.h> | |
24942 | ||
24943 | int | |
24944 | main () | |
24945 | { | |
24946 | return mkdir ("conftest.dir/", 0700); | |
24947 | ; | |
24948 | return 0; | |
24949 | } | |
24950 | _ACEOF | |
24951 | if ac_fn_c_try_run "$LINENO"; then : | |
24952 | gl_cv_func_mkdir_trailing_slash_works=yes | |
24953 | else | |
24954 | gl_cv_func_mkdir_trailing_slash_works=no | |
24955 | fi | |
24956 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24957 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24958 | fi | |
24959 | ||
24960 | rm -rf conftest.dir | |
24961 | ||
24962 | ||
24963 | fi | |
24964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 | |
24965 | $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } | |
24966 | case "$gl_cv_func_mkdir_trailing_slash_works" in | |
24967 | *yes) ;; | |
24968 | *) | |
24969 | REPLACE_MKDIR=1 | |
24970 | ;; | |
24971 | esac | |
24972 | ||
24973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 | |
24974 | $as_echo_n "checking whether mkdir handles trailing dot... " >&6; } | |
24975 | if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then : | |
24976 | $as_echo_n "(cached) " >&6 | |
24977 | else | |
24978 | rm -rf conftest.dir | |
24979 | if test "$cross_compiling" = yes; then : | |
24980 | case "$host_os" in | |
c0c3707f CB |
24981 | # Guess yes on glibc systems. |
24982 | *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; | |
24983 | # Guess yes on musl systems. | |
24984 | *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; | |
24985 | # Guess no on native Windows. | |
24986 | mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; | |
24987 | # If we don't know, obey --enable-cross-guesses. | |
24988 | *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;; | |
8a99096f SM |
24989 | esac |
24990 | ||
24991 | else | |
24992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24993 | /* end confdefs.h. */ | |
24994 | ||
24995 | # include <sys/types.h> | |
24996 | # include <sys/stat.h> | |
24997 | ||
24998 | int | |
24999 | main () | |
25000 | { | |
25001 | return !mkdir ("conftest.dir/./", 0700); | |
25002 | ; | |
25003 | return 0; | |
25004 | } | |
25005 | _ACEOF | |
25006 | if ac_fn_c_try_run "$LINENO"; then : | |
25007 | gl_cv_func_mkdir_trailing_dot_works=yes | |
25008 | else | |
25009 | gl_cv_func_mkdir_trailing_dot_works=no | |
25010 | fi | |
25011 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25012 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25013 | fi | |
25014 | ||
25015 | rm -rf conftest.dir | |
25016 | ||
25017 | ||
25018 | fi | |
25019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 | |
25020 | $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } | |
25021 | case "$gl_cv_func_mkdir_trailing_dot_works" in | |
25022 | *yes) ;; | |
25023 | *) | |
25024 | REPLACE_MKDIR=1 | |
25025 | ||
25026 | $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h | |
25027 | ||
25028 | ;; | |
25029 | esac | |
25030 | ||
25031 | if test $REPLACE_MKDIR = 1; then | |
25032 | ||
25033 | ||
25034 | ||
25035 | ||
25036 | ||
25037 | ||
25038 | ||
25039 | ||
25040 | gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" | |
25041 | ||
25042 | fi | |
25043 | ||
25044 | ||
e8d8cce6 SM |
25045 | for ac_func in mkdtemp |
25046 | do : | |
25047 | ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" | |
25048 | if test "x$ac_cv_func_mkdtemp" = xyes; then : | |
25049 | cat >>confdefs.h <<_ACEOF | |
25050 | #define HAVE_MKDTEMP 1 | |
25051 | _ACEOF | |
25052 | ||
25053 | fi | |
25054 | done | |
25055 | ||
25056 | if test $ac_cv_func_mkdtemp = no; then | |
25057 | HAVE_MKDTEMP=0 | |
25058 | fi | |
25059 | ||
25060 | if test $HAVE_MKDTEMP = 0; then | |
25061 | ||
25062 | ||
25063 | ||
25064 | ||
25065 | ||
25066 | ||
25067 | ||
25068 | ||
25069 | gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext" | |
25070 | ||
25071 | : | |
25072 | ||
25073 | fi | |
25074 | ||
25075 | ||
25076 | ||
25077 | ||
25078 | ||
25079 | GNULIB_MKDTEMP=1 | |
25080 | ||
25081 | ||
25082 | ||
25083 | ||
25084 | ||
25085 | $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h | |
25086 | ||
25087 | ||
25088 | ||
25089 | ||
25090 | ||
2d8adcbd MM |
25091 | |
25092 | ||
b3279b60 TT |
25093 | |
25094 | ||
b3279b60 TT |
25095 | if test $ac_cv_func_mkostemp != yes; then |
25096 | HAVE_MKOSTEMP=0 | |
25097 | fi | |
2d8adcbd | 25098 | |
b3279b60 | 25099 | if test $HAVE_MKOSTEMP = 0; then |
2d8adcbd | 25100 | |
2d8adcbd | 25101 | |
2d8adcbd | 25102 | |
2d8adcbd | 25103 | |
2d8adcbd MM |
25104 | |
25105 | ||
25106 | ||
25107 | ||
b3279b60 | 25108 | gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext" |
2d8adcbd MM |
25109 | |
25110 | ||
25111 | ||
b3279b60 | 25112 | fi |
2d8adcbd | 25113 | |
2d8adcbd | 25114 | |
b3279b60 TT |
25115 | cat >>confdefs.h <<_ACEOF |
25116 | #define GNULIB_MKOSTEMP 1 | |
25117 | _ACEOF | |
2d8adcbd MM |
25118 | |
25119 | ||
2d8adcbd MM |
25120 | |
25121 | ||
25122 | ||
25123 | ||
25124 | ||
b3279b60 | 25125 | GNULIB_MKOSTEMP=1 |
2d8adcbd MM |
25126 | |
25127 | ||
25128 | ||
25129 | ||
25130 | ||
b3279b60 | 25131 | $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h |
2d8adcbd MM |
25132 | |
25133 | ||
25134 | ||
25135 | ||
6ec2e0f5 SDJ |
25136 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
25137 | ||
25138 | ||
25139 | ||
c971b7fa | 25140 | |
c971b7fa | 25141 | |
c971b7fa PA |
25142 | |
25143 | ||
8690e634 | 25144 | |
6ec2e0f5 | 25145 | gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" |
8690e634 | 25146 | |
6ec2e0f5 | 25147 | fi |
8690e634 | 25148 | |
6ec2e0f5 | 25149 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
8690e634 JK |
25150 | |
25151 | ||
25152 | ||
25153 | ||
25154 | ||
25155 | ||
8690e634 JK |
25156 | |
25157 | ||
6ec2e0f5 | 25158 | gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" |
8690e634 | 25159 | |
a512b375 | 25160 | fi |
8690e634 JK |
25161 | |
25162 | ||
c0c3707f CB |
25163 | cat >>confdefs.h <<_ACEOF |
25164 | #define GNULIB_MSVC_NOTHROW 1 | |
25165 | _ACEOF | |
25166 | ||
25167 | ||
25168 | ||
25169 | ||
725e2999 JB |
25170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5 |
25171 | $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; } | |
25172 | if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then : | |
25173 | $as_echo_n "(cached) " >&6 | |
25174 | else | |
25175 | ||
25176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25177 | /* end confdefs.h. */ | |
25178 | #include <netinet/in.h> | |
25179 | int | |
25180 | main () | |
25181 | { | |
25182 | ||
25183 | ; | |
25184 | return 0; | |
25185 | } | |
25186 | _ACEOF | |
25187 | if ac_fn_c_try_compile "$LINENO"; then : | |
25188 | gl_cv_header_netinet_in_h_selfcontained=yes | |
25189 | else | |
25190 | gl_cv_header_netinet_in_h_selfcontained=no | |
25191 | fi | |
25192 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25193 | ||
25194 | fi | |
25195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 | |
25196 | $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } | |
25197 | if test $gl_cv_header_netinet_in_h_selfcontained = yes; then | |
25198 | NETINET_IN_H='' | |
25199 | else | |
25200 | NETINET_IN_H='netinet/in.h' | |
25201 | for ac_header in netinet/in.h | |
25202 | do : | |
25203 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
25204 | if test "x$ac_cv_header_netinet_in_h" = xyes; then : | |
25205 | cat >>confdefs.h <<_ACEOF | |
25206 | #define HAVE_NETINET_IN_H 1 | |
25207 | _ACEOF | |
25208 | ||
25209 | fi | |
25210 | ||
25211 | done | |
25212 | ||
25213 | ||
25214 | ||
25215 | ||
25216 | ||
25217 | ||
25218 | ||
725e2999 JB |
25219 | |
25220 | ||
25221 | ||
25222 | if test $gl_cv_have_include_next = yes; then | |
25223 | gl_cv_next_netinet_in_h='<'netinet/in.h'>' | |
25224 | else | |
25225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5 | |
25226 | $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; } | |
25227 | if ${gl_cv_next_netinet_in_h+:} false; then : | |
25228 | $as_echo_n "(cached) " >&6 | |
25229 | else | |
25230 | ||
25231 | if test $ac_cv_header_netinet_in_h = yes; then | |
25232 | ||
25233 | ||
25234 | ||
25235 | ||
25236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25237 | /* end confdefs.h. */ | |
25238 | #include <netinet/in.h> | |
25239 | _ACEOF | |
25240 | case "$host_os" in | |
25241 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25242 | *) gl_absname_cpp="$ac_cpp" ;; | |
25243 | esac | |
25244 | ||
25245 | case "$host_os" in | |
25246 | mingw*) | |
25247 | gl_dirsep_regex='[/\\]' | |
25248 | ;; | |
25249 | *) | |
25250 | gl_dirsep_regex='\/' | |
25251 | ;; | |
25252 | esac | |
25253 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
25254 | gl_header_literal_regex=`echo 'netinet/in.h' \ | |
25255 | | sed -e "$gl_make_literal_regex_sed"` | |
25256 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25257 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25258 | s|^/[^/]|//&| | |
25259 | p | |
25260 | q | |
25261 | }' | |
25262 | ||
25263 | gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
25264 | sed -n "$gl_absolute_header_sed"` | |
25265 | ||
25266 | gl_header=$gl_cv_absolute_netinet_in_h | |
25267 | gl_cv_next_netinet_in_h='"'$gl_header'"' | |
25268 | else | |
25269 | gl_cv_next_netinet_in_h='<'netinet/in.h'>' | |
25270 | fi | |
25271 | ||
25272 | ||
25273 | fi | |
25274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 | |
25275 | $as_echo "$gl_cv_next_netinet_in_h" >&6; } | |
25276 | fi | |
25277 | NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h | |
25278 | ||
25279 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
25280 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
25281 | gl_next_as_first_directive='<'netinet/in.h'>' | |
25282 | else | |
25283 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
25284 | gl_next_as_first_directive=$gl_cv_next_netinet_in_h | |
25285 | fi | |
25286 | NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive | |
25287 | ||
25288 | ||
25289 | ||
25290 | ||
25291 | if test $ac_cv_header_netinet_in_h = yes; then | |
25292 | HAVE_NETINET_IN_H=1 | |
25293 | else | |
25294 | HAVE_NETINET_IN_H=0 | |
25295 | fi | |
25296 | ||
25297 | fi | |
25298 | ||
25299 | if test -n "$NETINET_IN_H"; then | |
25300 | GL_GENERATE_NETINET_IN_H_TRUE= | |
25301 | GL_GENERATE_NETINET_IN_H_FALSE='#' | |
25302 | else | |
25303 | GL_GENERATE_NETINET_IN_H_TRUE='#' | |
25304 | GL_GENERATE_NETINET_IN_H_FALSE= | |
25305 | fi | |
25306 | ||
25307 | ||
25308 | ||
25309 | ||
8690e634 | 25310 | |
c0c3707f | 25311 | |
6ec2e0f5 SDJ |
25312 | case "$host_os" in |
25313 | mingw* | pw*) | |
25314 | REPLACE_OPEN=1 | |
25315 | ;; | |
25316 | *) | |
25317 | ||
c0c3707f CB |
25318 | if test "$gl_cv_macro_O_CLOEXEC" != yes; then |
25319 | REPLACE_OPEN=1 | |
25320 | fi | |
472fa5ee SM |
25321 | |
25322 | ||
c0c3707f | 25323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 |
6ec2e0f5 | 25324 | $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } |
d0ac1c44 | 25325 | if ${gl_cv_func_open_slash+:} false; then : |
6ec2e0f5 SDJ |
25326 | $as_echo_n "(cached) " >&6 |
25327 | else | |
25328 | # Assume that if we have lstat, we can also check symlinks. | |
c0c3707f CB |
25329 | if test $ac_cv_func_lstat = yes; then |
25330 | touch conftest.tmp | |
25331 | ln -s conftest.tmp conftest.lnk | |
25332 | fi | |
25333 | if test "$cross_compiling" = yes; then : | |
8690e634 | 25334 | |
c0c3707f CB |
25335 | case "$host_os" in |
25336 | freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) | |
25337 | gl_cv_func_open_slash="guessing no" ;; | |
25338 | *) | |
25339 | gl_cv_func_open_slash="guessing yes" ;; | |
25340 | esac | |
8690e634 | 25341 | |
6ec2e0f5 SDJ |
25342 | else |
25343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25344 | /* end confdefs.h. */ | |
25345 | ||
25346 | #include <fcntl.h> | |
25347 | #if HAVE_UNISTD_H | |
25348 | # include <unistd.h> | |
25349 | #endif | |
25350 | int main () | |
25351 | { | |
25352 | int result = 0; | |
25353 | #if HAVE_LSTAT | |
25354 | if (open ("conftest.lnk/", O_RDONLY) != -1) | |
25355 | result |= 1; | |
25356 | #endif | |
25357 | if (open ("conftest.sl/", O_CREAT, 0600) >= 0) | |
25358 | result |= 2; | |
25359 | return result; | |
25360 | } | |
25361 | _ACEOF | |
25362 | if ac_fn_c_try_run "$LINENO"; then : | |
25363 | gl_cv_func_open_slash=yes | |
25364 | else | |
25365 | gl_cv_func_open_slash=no | |
25366 | fi | |
25367 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25368 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25369 | fi | |
8690e634 | 25370 | |
c0c3707f | 25371 | rm -f conftest.sl conftest.tmp conftest.lnk |
8690e634 | 25372 | |
6ec2e0f5 SDJ |
25373 | fi |
25374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 | |
25375 | $as_echo "$gl_cv_func_open_slash" >&6; } | |
c0c3707f CB |
25376 | case "$gl_cv_func_open_slash" in |
25377 | *no) | |
8690e634 | 25378 | |
6ec2e0f5 | 25379 | $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h |
8690e634 | 25380 | |
6ec2e0f5 SDJ |
25381 | ;; |
25382 | esac | |
8690e634 | 25383 | |
c0c3707f CB |
25384 | case "$gl_cv_func_open_slash" in |
25385 | *no) | |
25386 | REPLACE_OPEN=1 | |
25387 | ;; | |
25388 | esac | |
25389 | ;; | |
25390 | esac | |
472fa5ee | 25391 | |
c0c3707f | 25392 | if test $REPLACE_OPEN = 0; then |
472fa5ee SM |
25393 | |
25394 | ||
25395 | ||
6ec2e0f5 SDJ |
25396 | if test $ac_cv_func_fchdir = no; then |
25397 | HAVE_FCHDIR=0 | |
25398 | fi | |
c971b7fa | 25399 | |
6ec2e0f5 SDJ |
25400 | if test $HAVE_FCHDIR = 0; then |
25401 | REPLACE_OPEN=1 | |
25402 | fi | |
25403 | fi | |
c971b7fa PA |
25404 | |
25405 | ||
25406 | ||
6ec2e0f5 | 25407 | if test $REPLACE_OPEN = 1; then |
c971b7fa PA |
25408 | |
25409 | ||
25410 | ||
25411 | ||
25412 | ||
c971b7fa PA |
25413 | |
25414 | ||
c971b7fa | 25415 | |
6ec2e0f5 | 25416 | gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" |
c971b7fa | 25417 | |
c971b7fa PA |
25418 | |
25419 | ||
6ec2e0f5 SDJ |
25420 | : |
25421 | ||
a512b375 | 25422 | fi |
c971b7fa PA |
25423 | |
25424 | ||
25425 | ||
25426 | ||
25427 | ||
6ec2e0f5 | 25428 | GNULIB_OPEN=1 |
c971b7fa PA |
25429 | |
25430 | ||
25431 | ||
25432 | ||
25433 | ||
6ec2e0f5 | 25434 | $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h |
c971b7fa PA |
25435 | |
25436 | ||
25437 | ||
25438 | ||
25439 | ||
c971b7fa | 25440 | |
c971b7fa | 25441 | |
472fa5ee | 25442 | |
63ce7108 | 25443 | |
c0c3707f CB |
25444 | case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in |
25445 | yes+*yes+yes) | |
6ec2e0f5 SDJ |
25446 | ;; |
25447 | yes+*) | |
c0c3707f | 25448 | # Solaris 10 lacks O_CLOEXEC. |
6ec2e0f5 SDJ |
25449 | # Solaris 9 has *at functions, but uniformly mishandles trailing |
25450 | # slash in all of them. | |
25451 | REPLACE_OPENAT=1 | |
25452 | ;; | |
25453 | *) | |
25454 | HAVE_OPENAT=0 | |
25455 | ;; | |
25456 | esac | |
63ce7108 | 25457 | |
6ec2e0f5 | 25458 | if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then |
63ce7108 | 25459 | |
63ce7108 | 25460 | |
63ce7108 | 25461 | |
63ce7108 | 25462 | |
63ce7108 TT |
25463 | |
25464 | ||
63ce7108 | 25465 | |
63ce7108 | 25466 | |
6ec2e0f5 | 25467 | gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" |
63ce7108 TT |
25468 | |
25469 | ||
25470 | ||
6ec2e0f5 | 25471 | : |
63ce7108 | 25472 | |
6ec2e0f5 | 25473 | fi |
63ce7108 TT |
25474 | |
25475 | ||
6ec2e0f5 SDJ |
25476 | cat >>confdefs.h <<_ACEOF |
25477 | #define GNULIB_OPENAT 1 | |
25478 | _ACEOF | |
63ce7108 | 25479 | |
63ce7108 | 25480 | |
63ce7108 TT |
25481 | |
25482 | ||
25483 | ||
25484 | ||
6ec2e0f5 | 25485 | GNULIB_OPENAT=1 |
63ce7108 | 25486 | |
63ce7108 | 25487 | |
63ce7108 | 25488 | |
63ce7108 | 25489 | |
63ce7108 | 25490 | |
6ec2e0f5 | 25491 | $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h |
63ce7108 TT |
25492 | |
25493 | ||
63ce7108 | 25494 | |
63ce7108 | 25495 | |
63ce7108 | 25496 | |
63ce7108 | 25497 | |
6ec2e0f5 SDJ |
25498 | for ac_func in opendir |
25499 | do : | |
25500 | ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" | |
d0ac1c44 | 25501 | if test "x$ac_cv_func_opendir" = xyes; then : |
6ec2e0f5 SDJ |
25502 | cat >>confdefs.h <<_ACEOF |
25503 | #define HAVE_OPENDIR 1 | |
63ce7108 | 25504 | _ACEOF |
6ec2e0f5 | 25505 | |
63ce7108 | 25506 | fi |
6ec2e0f5 | 25507 | done |
63ce7108 | 25508 | |
6ec2e0f5 SDJ |
25509 | if test $ac_cv_func_opendir = no; then |
25510 | HAVE_OPENDIR=0 | |
25511 | fi | |
63ce7108 | 25512 | |
6ec2e0f5 SDJ |
25513 | |
25514 | ||
25515 | ||
25516 | if test $ac_cv_func_fchdir = no; then | |
25517 | HAVE_FCHDIR=0 | |
63ce7108 | 25518 | fi |
63ce7108 | 25519 | |
6ec2e0f5 SDJ |
25520 | if test $HAVE_FCHDIR = 0; then |
25521 | if test $HAVE_OPENDIR = 1; then | |
25522 | REPLACE_OPENDIR=1 | |
25523 | fi | |
25524 | fi | |
25525 | ||
25526 | case $host_os,$HAVE_OPENDIR in | |
25527 | os2*,1) | |
25528 | REPLACE_OPENDIR=1;; | |
25529 | esac | |
25530 | ||
25531 | if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then | |
63ce7108 TT |
25532 | |
25533 | ||
25534 | ||
25535 | ||
25536 | ||
25537 | ||
25538 | ||
25539 | ||
6ec2e0f5 | 25540 | gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" |
63ce7108 TT |
25541 | |
25542 | fi | |
25543 | ||
25544 | ||
25545 | ||
25546 | ||
25547 | ||
6ec2e0f5 | 25548 | GNULIB_OPENDIR=1 |
63ce7108 TT |
25549 | |
25550 | ||
25551 | ||
25552 | ||
63ce7108 | 25553 | |
6ec2e0f5 | 25554 | $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h |
63ce7108 TT |
25555 | |
25556 | ||
25557 | ||
25558 | ||
25559 | ||
25560 | ||
25561 | ||
2196f55f YQ |
25562 | |
25563 | ||
8424cc97 SM |
25564 | |
25565 | for ac_func in rawmemchr | |
25566 | do : | |
25567 | ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" | |
d0ac1c44 | 25568 | if test "x$ac_cv_func_rawmemchr" = xyes; then : |
8424cc97 SM |
25569 | cat >>confdefs.h <<_ACEOF |
25570 | #define HAVE_RAWMEMCHR 1 | |
25571 | _ACEOF | |
25572 | ||
25573 | fi | |
25574 | done | |
25575 | ||
25576 | if test $ac_cv_func_rawmemchr = no; then | |
25577 | HAVE_RAWMEMCHR=0 | |
25578 | fi | |
25579 | ||
25580 | if test $HAVE_RAWMEMCHR = 0; then | |
25581 | ||
25582 | ||
25583 | ||
25584 | ||
25585 | ||
25586 | ||
25587 | ||
25588 | ||
25589 | gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" | |
25590 | ||
25591 | : | |
25592 | fi | |
25593 | ||
25594 | ||
25595 | ||
25596 | ||
25597 | ||
25598 | GNULIB_RAWMEMCHR=1 | |
25599 | ||
25600 | ||
25601 | ||
25602 | ||
25603 | ||
25604 | $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h | |
25605 | ||
25606 | ||
25607 | ||
25608 | ||
25609 | ||
25610 | ||
6ec2e0f5 SDJ |
25611 | for ac_func in readdir |
25612 | do : | |
25613 | ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" | |
d0ac1c44 | 25614 | if test "x$ac_cv_func_readdir" = xyes; then : |
6ec2e0f5 SDJ |
25615 | cat >>confdefs.h <<_ACEOF |
25616 | #define HAVE_READDIR 1 | |
25617 | _ACEOF | |
25618 | ||
25619 | fi | |
25620 | done | |
25621 | ||
25622 | if test $ac_cv_func_readdir = no; then | |
25623 | HAVE_READDIR=0 | |
25624 | fi | |
25625 | ||
25626 | if test $HAVE_READDIR = 0; then | |
25627 | ||
25628 | ||
25629 | ||
25630 | ||
25631 | ||
25632 | ||
25633 | ||
25634 | ||
25635 | gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext" | |
25636 | ||
25637 | fi | |
25638 | ||
25639 | ||
25640 | ||
25641 | ||
25642 | ||
25643 | GNULIB_READDIR=1 | |
25644 | ||
25645 | ||
25646 | ||
25647 | ||
25648 | ||
25649 | $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h | |
25650 | ||
25651 | ||
25652 | ||
25653 | ||
25654 | ||
25655 | ||
2196f55f YQ |
25656 | if test $ac_cv_func_readlink = no; then |
25657 | HAVE_READLINK=0 | |
25658 | else | |
25659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
25660 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
d0ac1c44 | 25661 | if ${gl_cv_decl_readlink_works+:} false; then : |
2196f55f YQ |
25662 | $as_echo_n "(cached) " >&6 |
25663 | else | |
25664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25665 | /* end confdefs.h. */ | |
25666 | #include <unistd.h> | |
25667 | /* Cause compilation failure if original declaration has wrong type. */ | |
25668 | ssize_t readlink (const char *, char *, size_t); | |
25669 | int | |
25670 | main () | |
25671 | { | |
25672 | ||
25673 | ; | |
25674 | return 0; | |
25675 | } | |
25676 | _ACEOF | |
25677 | if ac_fn_c_try_compile "$LINENO"; then : | |
25678 | gl_cv_decl_readlink_works=yes | |
25679 | else | |
25680 | gl_cv_decl_readlink_works=no | |
25681 | fi | |
25682 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25683 | fi | |
25684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
25685 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
25686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
25687 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
d0ac1c44 | 25688 | if ${gl_cv_func_readlink_works+:} false; then : |
2196f55f YQ |
25689 | $as_echo_n "(cached) " >&6 |
25690 | else | |
25691 | # We have readlink, so assume ln -s works. | |
25692 | ln -s conftest.no-such conftest.link | |
25693 | ln -s conftest.link conftest.lnk2 | |
25694 | if test "$cross_compiling" = yes; then : | |
25695 | case "$host_os" in | |
c0c3707f CB |
25696 | # Guess yes on Linux systems. |
25697 | linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; | |
25698 | # Guess yes on glibc systems. | |
25699 | *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; | |
25700 | # If we don't know, obey --enable-cross-guesses. | |
25701 | *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;; | |
2196f55f YQ |
25702 | esac |
25703 | ||
25704 | else | |
25705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25706 | /* end confdefs.h. */ | |
25707 | #include <unistd.h> | |
25708 | ||
25709 | int | |
25710 | main () | |
25711 | { | |
25712 | char buf[20]; | |
25713 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
25714 | ; | |
25715 | return 0; | |
25716 | } | |
25717 | _ACEOF | |
25718 | if ac_fn_c_try_run "$LINENO"; then : | |
25719 | gl_cv_func_readlink_works=yes | |
25720 | else | |
25721 | gl_cv_func_readlink_works=no | |
25722 | fi | |
25723 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25724 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25725 | fi | |
25726 | ||
25727 | rm -f conftest.link conftest.lnk2 | |
25728 | fi | |
25729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 | |
25730 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
25731 | case "$gl_cv_func_readlink_works" in | |
25732 | *yes) | |
25733 | if test "$gl_cv_decl_readlink_works" != yes; then | |
25734 | REPLACE_READLINK=1 | |
25735 | fi | |
25736 | ;; | |
25737 | *) | |
25738 | ||
25739 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | |
25740 | ||
25741 | REPLACE_READLINK=1 | |
25742 | ;; | |
25743 | esac | |
25744 | fi | |
25745 | ||
25746 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
25747 | ||
25748 | ||
25749 | ||
25750 | ||
25751 | ||
25752 | ||
25753 | ||
25754 | ||
25755 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | |
25756 | ||
25757 | ||
25758 | : | |
25759 | ||
25760 | fi | |
25761 | ||
25762 | ||
25763 | ||
25764 | ||
25765 | ||
25766 | GNULIB_READLINK=1 | |
25767 | ||
25768 | ||
25769 | ||
25770 | ||
25771 | ||
25772 | $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h | |
25773 | ||
25774 | ||
25775 | ||
25776 | ||
6a29c58e YQ |
25777 | |
25778 | ||
6ec2e0f5 SDJ |
25779 | if test $gl_cv_func_malloc_posix = yes; then |
25780 | ||
25781 | $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h | |
25782 | ||
25783 | else | |
25784 | REPLACE_REALLOC=1 | |
25785 | fi | |
25786 | ||
25787 | if test $REPLACE_REALLOC = 1; then | |
25788 | ||
25789 | ||
25790 | ||
25791 | ||
25792 | ||
25793 | ||
25794 | ||
25795 | ||
25796 | gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" | |
25797 | ||
25798 | fi | |
25799 | ||
25800 | ||
25801 | ||
25802 | ||
25803 | ||
25804 | GNULIB_REALLOC_POSIX=1 | |
25805 | ||
25806 | ||
25807 | ||
25808 | ||
25809 | ||
25810 | $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h | |
25811 | ||
25812 | ||
25813 | ||
25814 | ||
25815 | ||
25816 | ||
6a29c58e YQ |
25817 | |
25818 | ||
25819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5 | |
25820 | $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } | |
d0ac1c44 | 25821 | if ${gl_cv_func_rename_slash_dst_works+:} false; then : |
6a29c58e YQ |
25822 | $as_echo_n "(cached) " >&6 |
25823 | else | |
25824 | rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk | |
25825 | touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || | |
d0ac1c44 | 25826 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
25827 | # Assume that if we have lstat, we can also check symlinks. |
25828 | if test $ac_cv_func_lstat = yes; then | |
25829 | ln -s conftest.f conftest.lnk | |
25830 | fi | |
25831 | if test "$cross_compiling" = yes; then : | |
25832 | case "$host_os" in | |
c0c3707f CB |
25833 | # Guess yes on Linux systems. |
25834 | linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;; | |
25835 | # Guess yes on glibc systems. | |
25836 | *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; | |
25837 | # Guess no on native Windows. | |
25838 | mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; | |
25839 | # If we don't know, obey --enable-cross-guesses. | |
25840 | *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
25841 | esac |
25842 | ||
25843 | else | |
25844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25845 | /* end confdefs.h. */ | |
25846 | ||
25847 | # include <stdio.h> | |
25848 | # include <stdlib.h> | |
25849 | ||
25850 | int | |
25851 | main () | |
25852 | { | |
25853 | int result = 0; | |
25854 | if (rename ("conftest.f1", "conftest.f2/") == 0) | |
25855 | result |= 1; | |
25856 | if (rename ("conftest.d1", "conftest.d2/") != 0) | |
25857 | result |= 2; | |
25858 | #if HAVE_LSTAT | |
25859 | if (rename ("conftest.f", "conftest.lnk/") == 0) | |
25860 | result |= 4; | |
25861 | #endif | |
25862 | return result; | |
25863 | ||
25864 | ; | |
25865 | return 0; | |
25866 | } | |
25867 | _ACEOF | |
25868 | if ac_fn_c_try_run "$LINENO"; then : | |
25869 | gl_cv_func_rename_slash_dst_works=yes | |
25870 | else | |
25871 | gl_cv_func_rename_slash_dst_works=no | |
25872 | fi | |
25873 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25874 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25875 | fi | |
25876 | ||
25877 | rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk | |
25878 | ||
25879 | fi | |
25880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5 | |
25881 | $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } | |
25882 | case "$gl_cv_func_rename_slash_dst_works" in | |
25883 | *yes) ;; | |
25884 | *) | |
25885 | REPLACE_RENAME=1 | |
25886 | ||
25887 | $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h | |
25888 | ||
25889 | ;; | |
25890 | esac | |
25891 | ||
25892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5 | |
25893 | $as_echo_n "checking whether rename honors trailing slash on source... " >&6; } | |
d0ac1c44 | 25894 | if ${gl_cv_func_rename_slash_src_works+:} false; then : |
6a29c58e YQ |
25895 | $as_echo_n "(cached) " >&6 |
25896 | else | |
25897 | rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk | |
25898 | touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || | |
d0ac1c44 | 25899 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
25900 | # Assume that if we have lstat, we can also check symlinks. |
25901 | if test $ac_cv_func_lstat = yes; then | |
25902 | ln -s conftest.f conftest.lnk | |
25903 | fi | |
25904 | if test "$cross_compiling" = yes; then : | |
25905 | case "$host_os" in | |
c0c3707f CB |
25906 | # Guess yes on Linux systems. |
25907 | linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
25908 | # Guess yes on glibc systems. | |
25909 | *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
25910 | # Guess yes on native Windows. | |
25911 | mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
25912 | # If we don't know, obey --enable-cross-guesses. | |
25913 | *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
25914 | esac |
25915 | ||
25916 | else | |
25917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25918 | /* end confdefs.h. */ | |
25919 | ||
25920 | # include <stdio.h> | |
25921 | # include <stdlib.h> | |
25922 | ||
25923 | int | |
25924 | main () | |
25925 | { | |
25926 | int result = 0; | |
25927 | if (rename ("conftest.f1/", "conftest.d3") == 0) | |
25928 | result |= 1; | |
25929 | if (rename ("conftest.d1/", "conftest.d2") != 0) | |
25930 | result |= 2; | |
25931 | #if HAVE_LSTAT | |
25932 | if (rename ("conftest.lnk/", "conftest.f") == 0) | |
25933 | result |= 4; | |
25934 | #endif | |
25935 | return result; | |
25936 | ||
25937 | ; | |
25938 | return 0; | |
25939 | } | |
25940 | _ACEOF | |
25941 | if ac_fn_c_try_run "$LINENO"; then : | |
25942 | gl_cv_func_rename_slash_src_works=yes | |
25943 | else | |
25944 | gl_cv_func_rename_slash_src_works=no | |
25945 | fi | |
25946 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25947 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25948 | fi | |
25949 | ||
25950 | rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk | |
25951 | ||
25952 | fi | |
25953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5 | |
25954 | $as_echo "$gl_cv_func_rename_slash_src_works" >&6; } | |
25955 | case "$gl_cv_func_rename_slash_src_works" in | |
25956 | *yes) ;; | |
25957 | *) | |
25958 | REPLACE_RENAME=1 | |
25959 | ||
25960 | $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h | |
25961 | ||
25962 | ;; | |
25963 | esac | |
25964 | ||
25965 | ||
25966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5 | |
25967 | $as_echo_n "checking whether rename manages hard links correctly... " >&6; } | |
d0ac1c44 | 25968 | if ${gl_cv_func_rename_link_works+:} false; then : |
6a29c58e YQ |
25969 | $as_echo_n "(cached) " >&6 |
25970 | else | |
25971 | if test $ac_cv_func_link = yes; then | |
c0c3707f CB |
25972 | if test $cross_compiling != yes; then |
25973 | rm -rf conftest.f conftest.f1 conftest.f2 | |
25974 | if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && | |
25975 | set x `ls -i conftest.f conftest.f1` && test "" = ""; then | |
25976 | if test "$cross_compiling" = yes; then : | |
25977 | : | |
6a29c58e YQ |
25978 | |
25979 | else | |
25980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25981 | /* end confdefs.h. */ | |
25982 | ||
c0c3707f CB |
25983 | # include <errno.h> |
25984 | # include <stdio.h> | |
25985 | # include <stdlib.h> | |
25986 | # include <unistd.h> | |
6a29c58e YQ |
25987 | |
25988 | int | |
25989 | main () | |
25990 | { | |
25991 | int result = 0; | |
c0c3707f CB |
25992 | if (rename ("conftest.f", "conftest.f1")) |
25993 | result |= 1; | |
25994 | if (unlink ("conftest.f1")) | |
25995 | result |= 2; | |
25996 | ||
25997 | /* Allow either the POSIX-required behavior, where the | |
25998 | previous rename kept conftest.f, or the (better) NetBSD | |
25999 | behavior, where it removed conftest.f. */ | |
26000 | if (rename ("conftest.f", "conftest.f") != 0 | |
26001 | && errno != ENOENT) | |
26002 | result |= 4; | |
26003 | ||
26004 | if (rename ("conftest.f1", "conftest.f1") == 0) | |
26005 | result |= 8; | |
26006 | if (rename ("conftest.f2", "conftest.f2") != 0) | |
26007 | result |= 16; | |
26008 | return result; | |
6a29c58e YQ |
26009 | |
26010 | ; | |
26011 | return 0; | |
26012 | } | |
26013 | _ACEOF | |
26014 | if ac_fn_c_try_run "$LINENO"; then : | |
26015 | gl_cv_func_rename_link_works=yes | |
26016 | else | |
26017 | gl_cv_func_rename_link_works=no | |
26018 | fi | |
26019 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26020 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26021 | fi | |
26022 | ||
c0c3707f CB |
26023 | else |
26024 | gl_cv_func_rename_link_works="guessing no" | |
26025 | fi | |
26026 | rm -rf conftest.f conftest.f1 conftest.f2 | |
6a29c58e | 26027 | else |
c0c3707f CB |
26028 | case "$host_os" in |
26029 | # Guess yes on Linux systems. | |
26030 | linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; | |
26031 | # Guess yes on glibc systems. | |
26032 | *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; | |
26033 | # Guess yes on native Windows. | |
26034 | mingw*) gl_cv_func_rename_link_works="guessing yes" ;; | |
26035 | # If we don't know, obey --enable-cross-guesses. | |
26036 | *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;; | |
26037 | esac | |
6a29c58e | 26038 | fi |
6a29c58e YQ |
26039 | else |
26040 | gl_cv_func_rename_link_works=yes | |
26041 | fi | |
26042 | ||
26043 | fi | |
26044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5 | |
26045 | $as_echo "$gl_cv_func_rename_link_works" >&6; } | |
26046 | case "$gl_cv_func_rename_link_works" in | |
26047 | *yes) ;; | |
26048 | *) | |
26049 | REPLACE_RENAME=1 | |
26050 | ||
26051 | $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h | |
26052 | ||
26053 | ;; | |
26054 | esac | |
26055 | ||
26056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5 | |
26057 | $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } | |
d0ac1c44 | 26058 | if ${gl_cv_func_rename_dest_works+:} false; then : |
6a29c58e YQ |
26059 | $as_echo_n "(cached) " >&6 |
26060 | else | |
26061 | rm -rf conftest.f conftest.d1 conftest.d2 | |
26062 | touch conftest.f && mkdir conftest.d1 conftest.d2 || | |
d0ac1c44 | 26063 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
26064 | if test "$cross_compiling" = yes; then : |
26065 | case "$host_os" in | |
c0c3707f CB |
26066 | # Guess yes on Linux systems. |
26067 | linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;; | |
26068 | # Guess yes on glibc systems. | |
26069 | *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; | |
26070 | # Guess no on native Windows. | |
26071 | mingw*) gl_cv_func_rename_dest_works="guessing no" ;; | |
26072 | # If we don't know, obey --enable-cross-guesses. | |
26073 | *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
26074 | esac |
26075 | ||
26076 | else | |
26077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26078 | /* end confdefs.h. */ | |
26079 | ||
26080 | # include <stdio.h> | |
26081 | # include <stdlib.h> | |
26082 | ||
26083 | int | |
26084 | main () | |
26085 | { | |
26086 | int result = 0; | |
26087 | if (rename ("conftest.d1", "conftest.d2") != 0) | |
26088 | result |= 1; | |
26089 | if (rename ("conftest.d2", "conftest.f") == 0) | |
26090 | result |= 2; | |
26091 | return result; | |
26092 | ||
26093 | ; | |
26094 | return 0; | |
26095 | } | |
26096 | _ACEOF | |
26097 | if ac_fn_c_try_run "$LINENO"; then : | |
26098 | gl_cv_func_rename_dest_works=yes | |
26099 | else | |
26100 | gl_cv_func_rename_dest_works=no | |
26101 | fi | |
26102 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26103 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26104 | fi | |
26105 | ||
26106 | rm -rf conftest.f conftest.d1 conftest.d2 | |
26107 | ||
26108 | fi | |
26109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5 | |
26110 | $as_echo "$gl_cv_func_rename_dest_works" >&6; } | |
26111 | case "$gl_cv_func_rename_dest_works" in | |
26112 | *yes) ;; | |
26113 | *) | |
26114 | REPLACE_RENAME=1 | |
26115 | ||
26116 | $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h | |
26117 | ||
26118 | ;; | |
26119 | esac | |
26120 | ||
26121 | if test $REPLACE_RENAME = 1; then | |
26122 | ||
26123 | ||
26124 | ||
26125 | ||
26126 | ||
26127 | ||
26128 | ||
26129 | ||
26130 | gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" | |
26131 | ||
26132 | fi | |
26133 | ||
26134 | ||
26135 | ||
26136 | ||
26137 | ||
26138 | GNULIB_RENAME=1 | |
26139 | ||
26140 | ||
26141 | ||
26142 | ||
26143 | ||
26144 | $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h | |
26145 | ||
26146 | ||
26147 | ||
26148 | ||
26149 | ||
26150 | ||
6ec2e0f5 SDJ |
26151 | for ac_func in rewinddir |
26152 | do : | |
26153 | ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" | |
d0ac1c44 | 26154 | if test "x$ac_cv_func_rewinddir" = xyes; then : |
6ec2e0f5 SDJ |
26155 | cat >>confdefs.h <<_ACEOF |
26156 | #define HAVE_REWINDDIR 1 | |
26157 | _ACEOF | |
26158 | ||
26159 | fi | |
26160 | done | |
26161 | ||
26162 | if test $ac_cv_func_rewinddir = no; then | |
26163 | HAVE_REWINDDIR=0 | |
26164 | fi | |
26165 | ||
26166 | if test $HAVE_REWINDDIR = 0; then | |
26167 | ||
26168 | ||
26169 | ||
26170 | ||
26171 | ||
26172 | ||
26173 | ||
26174 | ||
26175 | gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext" | |
26176 | ||
26177 | fi | |
26178 | ||
26179 | ||
26180 | ||
26181 | ||
26182 | ||
26183 | GNULIB_REWINDDIR=1 | |
26184 | ||
26185 | ||
26186 | ||
26187 | ||
26188 | ||
26189 | $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h | |
26190 | ||
26191 | ||
26192 | ||
26193 | ||
26194 | ||
26195 | ||
6a29c58e YQ |
26196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 |
26197 | $as_echo_n "checking whether rmdir works... " >&6; } | |
d0ac1c44 | 26198 | if ${gl_cv_func_rmdir_works+:} false; then : |
6a29c58e YQ |
26199 | $as_echo_n "(cached) " >&6 |
26200 | else | |
26201 | mkdir conftest.dir | |
26202 | touch conftest.file | |
26203 | if test "$cross_compiling" = yes; then : | |
26204 | case "$host_os" in | |
c0c3707f CB |
26205 | # Guess yes on Linux systems. |
26206 | linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;; | |
26207 | # Guess yes on glibc systems. | |
26208 | *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; | |
26209 | # Guess no on native Windows. | |
26210 | mingw*) gl_cv_func_rmdir_works="guessing no" ;; | |
26211 | # If we don't know, obey --enable-cross-guesses. | |
26212 | *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
26213 | esac |
26214 | ||
26215 | else | |
26216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26217 | /* end confdefs.h. */ | |
26218 | #include <stdio.h> | |
26219 | #include <errno.h> | |
26220 | #if HAVE_UNISTD_H | |
26221 | # include <unistd.h> | |
26222 | #else /* on Windows with MSVC */ | |
26223 | # include <direct.h> | |
26224 | #endif | |
26225 | ||
26226 | int | |
26227 | main () | |
26228 | { | |
26229 | int result = 0; | |
26230 | if (!rmdir ("conftest.file/")) | |
26231 | result |= 1; | |
26232 | else if (errno != ENOTDIR) | |
26233 | result |= 2; | |
26234 | if (!rmdir ("conftest.dir/./")) | |
26235 | result |= 4; | |
26236 | return result; | |
26237 | ||
26238 | ; | |
26239 | return 0; | |
26240 | } | |
26241 | _ACEOF | |
26242 | if ac_fn_c_try_run "$LINENO"; then : | |
26243 | gl_cv_func_rmdir_works=yes | |
26244 | else | |
26245 | gl_cv_func_rmdir_works=no | |
26246 | fi | |
26247 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26248 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26249 | fi | |
26250 | ||
26251 | rm -rf conftest.dir conftest.file | |
26252 | fi | |
26253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 | |
26254 | $as_echo "$gl_cv_func_rmdir_works" >&6; } | |
26255 | case "$gl_cv_func_rmdir_works" in | |
26256 | *yes) ;; | |
26257 | *) | |
26258 | REPLACE_RMDIR=1 | |
26259 | ;; | |
26260 | esac | |
26261 | ||
26262 | if test $REPLACE_RMDIR = 1; then | |
26263 | ||
26264 | ||
26265 | ||
26266 | ||
26267 | ||
26268 | ||
26269 | ||
26270 | ||
26271 | gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" | |
26272 | ||
26273 | fi | |
26274 | ||
26275 | ||
26276 | ||
26277 | ||
26278 | ||
26279 | GNULIB_RMDIR=1 | |
26280 | ||
26281 | ||
26282 | ||
26283 | ||
26284 | ||
26285 | $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h | |
26286 | ||
26287 | ||
26288 | ||
26289 | ||
0750520d | 26290 | |
5e8754f9 SDJ |
26291 | |
26292 | ||
26293 | ||
3d99e817 AK |
26294 | if test $ac_cv_func_setenv = no; then |
26295 | HAVE_SETENV=0 | |
26296 | else | |
26297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 | |
26298 | $as_echo_n "checking whether setenv validates arguments... " >&6; } | |
d0ac1c44 | 26299 | if ${gl_cv_func_setenv_works+:} false; then : |
3d99e817 AK |
26300 | $as_echo_n "(cached) " >&6 |
26301 | else | |
26302 | if test "$cross_compiling" = yes; then : | |
26303 | case "$host_os" in | |
c0c3707f CB |
26304 | # Guess yes on glibc systems. |
26305 | *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; | |
26306 | # Guess yes on musl systems. | |
26307 | *-musl*) gl_cv_func_setenv_works="guessing yes" ;; | |
26308 | # If we don't know, obey --enable-cross-guesses. | |
26309 | *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;; | |
3d99e817 AK |
26310 | esac |
26311 | ||
26312 | else | |
26313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26314 | /* end confdefs.h. */ | |
26315 | ||
26316 | #include <stdlib.h> | |
26317 | #include <errno.h> | |
26318 | #include <string.h> | |
26319 | ||
26320 | int | |
26321 | main () | |
26322 | { | |
26323 | ||
26324 | int result = 0; | |
26325 | { | |
26326 | if (setenv ("", "", 0) != -1) | |
26327 | result |= 1; | |
26328 | else if (errno != EINVAL) | |
26329 | result |= 2; | |
26330 | } | |
26331 | { | |
26332 | if (setenv ("a", "=", 1) != 0) | |
26333 | result |= 4; | |
26334 | else if (strcmp (getenv ("a"), "=") != 0) | |
26335 | result |= 8; | |
26336 | } | |
26337 | return result; | |
26338 | ||
26339 | ; | |
26340 | return 0; | |
26341 | } | |
26342 | _ACEOF | |
26343 | if ac_fn_c_try_run "$LINENO"; then : | |
26344 | gl_cv_func_setenv_works=yes | |
26345 | else | |
26346 | gl_cv_func_setenv_works=no | |
26347 | fi | |
26348 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26349 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26350 | fi | |
26351 | ||
26352 | fi | |
26353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 | |
26354 | $as_echo "$gl_cv_func_setenv_works" >&6; } | |
26355 | case "$gl_cv_func_setenv_works" in | |
26356 | *yes) ;; | |
26357 | *) | |
26358 | REPLACE_SETENV=1 | |
26359 | ;; | |
26360 | esac | |
26361 | fi | |
26362 | ||
26363 | if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then | |
26364 | ||
26365 | ||
26366 | ||
26367 | ||
26368 | ||
26369 | ||
26370 | ||
26371 | ||
26372 | gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" | |
26373 | ||
26374 | fi | |
26375 | ||
26376 | ||
26377 | ||
26378 | ||
26379 | ||
26380 | GNULIB_SETENV=1 | |
26381 | ||
26382 | ||
26383 | ||
26384 | ||
26385 | ||
26386 | $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h | |
26387 | ||
26388 | ||
26389 | ||
26390 | ||
26391 | ||
0750520d PA |
26392 | |
26393 | ||
26394 | ||
5df4cba6 SM |
26395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 |
26396 | $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } | |
26397 | if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : | |
26398 | $as_echo_n "(cached) " >&6 | |
26399 | else | |
26400 | case "$host_os" in | |
26401 | # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. | |
26402 | *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) | |
26403 | gl_cv_func_setlocale_null_all_mtsafe=no ;; | |
26404 | # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. | |
26405 | *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) | |
26406 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; | |
26407 | # If we don't know, obey --enable-cross-guesses. | |
26408 | *) | |
26409 | gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; | |
26410 | esac | |
26411 | ||
26412 | fi | |
26413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 | |
26414 | $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } | |
26415 | case "$host_os" in | |
26416 | mingw*) ;; | |
26417 | *) | |
26418 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
26419 | gl_cv_func_setlocale_null_all_mtsafe="trivially yes" | |
26420 | fi | |
26421 | ;; | |
26422 | esac | |
26423 | case "$gl_cv_func_setlocale_null_all_mtsafe" in | |
26424 | *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; | |
26425 | *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; | |
26426 | esac | |
26427 | ||
26428 | cat >>confdefs.h <<_ACEOF | |
26429 | #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE | |
26430 | _ACEOF | |
26431 | ||
26432 | ||
26433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 | |
26434 | $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } | |
26435 | if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : | |
26436 | $as_echo_n "(cached) " >&6 | |
26437 | else | |
26438 | case "$host_os" in | |
26439 | # Guess no on OpenBSD, AIX. | |
26440 | openbsd* | aix*) | |
26441 | gl_cv_func_setlocale_null_one_mtsafe=no ;; | |
26442 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. | |
26443 | *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) | |
26444 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; | |
26445 | # If we don't know, obey --enable-cross-guesses. | |
26446 | *) | |
26447 | gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; | |
26448 | esac | |
26449 | ||
26450 | fi | |
26451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 | |
26452 | $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } | |
26453 | case "$host_os" in | |
26454 | mingw*) ;; | |
26455 | *) | |
26456 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
26457 | gl_cv_func_setlocale_null_one_mtsafe="trivially yes" | |
26458 | fi | |
26459 | ;; | |
26460 | esac | |
26461 | case "$gl_cv_func_setlocale_null_one_mtsafe" in | |
26462 | *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; | |
26463 | *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; | |
26464 | esac | |
26465 | ||
26466 | cat >>confdefs.h <<_ACEOF | |
26467 | #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE | |
26468 | _ACEOF | |
26469 | ||
26470 | ||
26471 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then | |
26472 | case "$host_os" in | |
26473 | mingw*) LIB_SETLOCALE_NULL= ;; | |
26474 | *) | |
26475 | ||
26476 | ||
26477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
26478 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
26479 | if ${gl_cv_have_weak+:} false; then : | |
26480 | $as_echo_n "(cached) " >&6 | |
26481 | else | |
26482 | gl_cv_have_weak=no | |
26483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26484 | /* end confdefs.h. */ | |
26485 | extern void xyzzy (); | |
26486 | #pragma weak xyzzy | |
26487 | int | |
26488 | main () | |
26489 | { | |
26490 | xyzzy(); | |
26491 | ; | |
26492 | return 0; | |
26493 | } | |
26494 | _ACEOF | |
26495 | if ac_fn_c_try_link "$LINENO"; then : | |
26496 | gl_cv_have_weak=maybe | |
26497 | fi | |
26498 | rm -f core conftest.err conftest.$ac_objext \ | |
26499 | conftest$ac_exeext conftest.$ac_ext | |
26500 | if test $gl_cv_have_weak = maybe; then | |
26501 | if test "$cross_compiling" = yes; then : | |
26502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26503 | /* end confdefs.h. */ | |
26504 | #ifdef __ELF__ | |
26505 | Extensible Linking Format | |
26506 | #endif | |
26507 | ||
26508 | _ACEOF | |
26509 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
26510 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
26511 | gl_cv_have_weak="guessing yes" | |
26512 | else | |
26513 | gl_cv_have_weak="guessing no" | |
26514 | fi | |
26515 | rm -f conftest* | |
26516 | ||
26517 | ||
26518 | else | |
26519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26520 | /* end confdefs.h. */ | |
26521 | ||
26522 | #include <stdio.h> | |
26523 | #pragma weak fputs | |
26524 | int main () | |
26525 | { | |
26526 | return (fputs == NULL); | |
26527 | } | |
26528 | _ACEOF | |
26529 | if ac_fn_c_try_run "$LINENO"; then : | |
26530 | gl_cv_have_weak=yes | |
26531 | else | |
26532 | gl_cv_have_weak=no | |
26533 | fi | |
26534 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26535 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26536 | fi | |
26537 | ||
26538 | fi | |
26539 | case " $LDFLAGS " in | |
26540 | *" -static "*) gl_cv_have_weak=no ;; | |
26541 | esac | |
26542 | case "$gl_cv_have_weak" in | |
26543 | *yes) | |
26544 | case "$host_os" in | |
26545 | freebsd* | dragonfly*) | |
26546 | : > conftest1.c | |
26547 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
26548 | cat <<EOF > conftest2.c | |
26549 | #include <pthread.h> | |
26550 | #pragma weak pthread_mutexattr_gettype | |
26551 | int main () | |
26552 | { | |
26553 | return (pthread_mutexattr_gettype != NULL); | |
26554 | } | |
26555 | EOF | |
26556 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
26557 | || gl_cv_have_weak=no | |
26558 | rm -f conftest1.c libempty.so conftest2.c conftest | |
26559 | ;; | |
26560 | esac | |
26561 | ;; | |
26562 | esac | |
26563 | ||
26564 | fi | |
26565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
26566 | $as_echo "$gl_cv_have_weak" >&6; } | |
26567 | case "$gl_cv_have_weak" in | |
26568 | *yes) | |
26569 | ||
26570 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
26571 | ||
26572 | ;; | |
26573 | esac | |
26574 | ||
26575 | case "$gl_cv_have_weak" in | |
26576 | *yes) LIB_SETLOCALE_NULL= ;; | |
26577 | *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; | |
26578 | esac | |
26579 | ;; | |
26580 | esac | |
26581 | else | |
26582 | LIB_SETLOCALE_NULL= | |
26583 | fi | |
26584 | ||
26585 | ||
26586 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then | |
26587 | ||
26588 | ||
26589 | ||
26590 | ||
26591 | ||
26592 | ||
26593 | ||
26594 | ||
26595 | gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext" | |
26596 | ||
26597 | ||
26598 | ||
26599 | ||
26600 | CFLAG_VISIBILITY= | |
26601 | HAVE_VISIBILITY=0 | |
26602 | if test -n "$GCC"; then | |
26603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 | |
26604 | $as_echo_n "checking whether the -Werror option is usable... " >&6; } | |
26605 | if ${gl_cv_cc_vis_werror+:} false; then : | |
26606 | $as_echo_n "(cached) " >&6 | |
26607 | else | |
26608 | gl_save_CFLAGS="$CFLAGS" | |
26609 | CFLAGS="$CFLAGS -Werror" | |
26610 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26611 | /* end confdefs.h. */ | |
26612 | ||
26613 | int | |
26614 | main () | |
26615 | { | |
26616 | ||
26617 | ; | |
26618 | return 0; | |
26619 | } | |
26620 | _ACEOF | |
26621 | if ac_fn_c_try_compile "$LINENO"; then : | |
26622 | gl_cv_cc_vis_werror=yes | |
26623 | else | |
26624 | gl_cv_cc_vis_werror=no | |
26625 | fi | |
26626 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26627 | CFLAGS="$gl_save_CFLAGS" | |
26628 | ||
26629 | fi | |
26630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 | |
26631 | $as_echo "$gl_cv_cc_vis_werror" >&6; } | |
26632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 | |
26633 | $as_echo_n "checking for simple visibility declarations... " >&6; } | |
26634 | if ${gl_cv_cc_visibility+:} false; then : | |
26635 | $as_echo_n "(cached) " >&6 | |
26636 | else | |
26637 | gl_save_CFLAGS="$CFLAGS" | |
26638 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
26639 | if test $gl_cv_cc_vis_werror = yes; then | |
26640 | CFLAGS="$CFLAGS -Werror" | |
26641 | fi | |
26642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26643 | /* end confdefs.h. */ | |
26644 | extern __attribute__((__visibility__("hidden"))) int hiddenvar; | |
26645 | extern __attribute__((__visibility__("default"))) int exportedvar; | |
26646 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | |
26647 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | |
26648 | void dummyfunc (void) {} | |
26649 | ||
26650 | int | |
26651 | main () | |
26652 | { | |
26653 | ||
26654 | ; | |
26655 | return 0; | |
26656 | } | |
26657 | _ACEOF | |
26658 | if ac_fn_c_try_compile "$LINENO"; then : | |
26659 | gl_cv_cc_visibility=yes | |
26660 | else | |
26661 | gl_cv_cc_visibility=no | |
26662 | fi | |
26663 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26664 | CFLAGS="$gl_save_CFLAGS" | |
26665 | ||
26666 | fi | |
26667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 | |
26668 | $as_echo "$gl_cv_cc_visibility" >&6; } | |
26669 | if test $gl_cv_cc_visibility = yes; then | |
26670 | CFLAG_VISIBILITY="-fvisibility=hidden" | |
26671 | HAVE_VISIBILITY=1 | |
26672 | fi | |
26673 | fi | |
26674 | ||
26675 | ||
26676 | ||
26677 | cat >>confdefs.h <<_ACEOF | |
26678 | #define HAVE_VISIBILITY $HAVE_VISIBILITY | |
26679 | _ACEOF | |
26680 | ||
26681 | ||
26682 | ||
26683 | fi | |
26684 | ||
26685 | ||
26686 | ||
26687 | ||
26688 | ||
26689 | GNULIB_SETLOCALE_NULL=1 | |
26690 | ||
26691 | ||
26692 | ||
26693 | ||
26694 | ||
26695 | $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h | |
26696 | ||
26697 | ||
26698 | ||
26699 | ||
26700 | ||
26701 | ||
26702 | ||
26703 | ||
0750520d PA |
26704 | |
26705 | ||
26706 | ||
26707 | ||
26708 | ||
26709 | ||
26710 | if test $gl_cv_have_include_next = yes; then | |
26711 | gl_cv_next_signal_h='<'signal.h'>' | |
26712 | else | |
26713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | |
26714 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
d0ac1c44 | 26715 | if ${gl_cv_next_signal_h+:} false; then : |
0750520d PA |
26716 | $as_echo_n "(cached) " >&6 |
26717 | else | |
26718 | ||
26719 | ||
26720 | ||
26721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26722 | /* end confdefs.h. */ | |
26723 | #include <signal.h> | |
26724 | _ACEOF | |
26725 | case "$host_os" in | |
26726 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26727 | *) gl_absname_cpp="$ac_cpp" ;; | |
26728 | esac | |
26729 | ||
26730 | case "$host_os" in | |
26731 | mingw*) | |
26732 | gl_dirsep_regex='[/\\]' | |
26733 | ;; | |
26734 | *) | |
26735 | gl_dirsep_regex='\/' | |
26736 | ;; | |
26737 | esac | |
26738 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
26739 | gl_header_literal_regex=`echo 'signal.h' \ | |
26740 | | sed -e "$gl_make_literal_regex_sed"` | |
26741 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26742 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26743 | s|^/[^/]|//&| | |
26744 | p | |
26745 | q | |
26746 | }' | |
26747 | ||
26748 | gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26749 | sed -n "$gl_absolute_header_sed"` | |
26750 | ||
26751 | gl_header=$gl_cv_absolute_signal_h | |
26752 | gl_cv_next_signal_h='"'$gl_header'"' | |
26753 | ||
26754 | ||
26755 | fi | |
26756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | |
26757 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
26758 | fi | |
26759 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | |
26760 | ||
26761 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
26762 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26763 | gl_next_as_first_directive='<'signal.h'>' | |
26764 | else | |
26765 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26766 | gl_next_as_first_directive=$gl_cv_next_signal_h | |
26767 | fi | |
26768 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | |
26769 | ||
26770 | ||
26771 | ||
26772 | ||
26773 | ||
26774 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers | |
26775 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
26776 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
26777 | #include <signal.h> | |
26778 | ||
26779 | " | |
d0ac1c44 | 26780 | if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then : |
0750520d PA |
26781 | |
26782 | else | |
26783 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
26784 | fi | |
26785 | ||
26786 | ||
26787 | ||
26788 | ||
26789 | ||
26790 | ||
26791 | ||
26792 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | |
26793 | #include <signal.h> | |
26794 | ||
26795 | " | |
d0ac1c44 | 26796 | if test "x$ac_cv_type_sighandler_t" = xyes; then : |
0750520d PA |
26797 | |
26798 | else | |
26799 | HAVE_SIGHANDLER_T=0 | |
26800 | fi | |
26801 | ||
26802 | ||
26803 | ||
0750520d | 26804 | |
0750520d PA |
26805 | |
26806 | ||
698be2d8 CB |
26807 | |
26808 | ||
725e2999 JB |
26809 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
26810 | /* <sys/types.h> is not needed according to POSIX, but the | |
26811 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
26812 | powerpc-apple-darwin5.5 required it. */ | |
26813 | #include <sys/types.h> | |
26814 | #if HAVE_SYS_SOCKET_H | |
26815 | # include <sys/socket.h> | |
26816 | #elif HAVE_WS2TCPIP_H | |
26817 | # include <ws2tcpip.h> | |
26818 | #endif | |
26819 | ||
26820 | " | |
26821 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
26822 | ||
26823 | else | |
26824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 | |
26825 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
c0c3707f | 26826 | if ${gl_cv_socklen_t_equiv+:} false; then : |
725e2999 JB |
26827 | $as_echo_n "(cached) " >&6 |
26828 | else | |
26829 | # Systems have either "struct sockaddr *" or | |
26830 | # "void *" as the second argument to getpeername | |
26831 | gl_cv_socklen_t_equiv= | |
26832 | for arg2 in "struct sockaddr" void; do | |
26833 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
26834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26835 | /* end confdefs.h. */ | |
26836 | #include <sys/types.h> | |
26837 | #include <sys/socket.h> | |
26838 | ||
26839 | int getpeername (int, $arg2 *, $t *); | |
26840 | int | |
26841 | main () | |
26842 | { | |
26843 | $t len; | |
26844 | getpeername (0, 0, &len); | |
26845 | ; | |
26846 | return 0; | |
26847 | } | |
26848 | _ACEOF | |
26849 | if ac_fn_c_try_compile "$LINENO"; then : | |
26850 | gl_cv_socklen_t_equiv="$t" | |
26851 | fi | |
26852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26853 | test "$gl_cv_socklen_t_equiv" != "" && break | |
26854 | done | |
26855 | test "$gl_cv_socklen_t_equiv" != "" && break | |
26856 | done | |
c0c3707f CB |
26857 | if test "$gl_cv_socklen_t_equiv" = ""; then |
26858 | as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
26859 | fi | |
725e2999 JB |
26860 | |
26861 | fi | |
c0c3707f | 26862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 |
725e2999 JB |
26863 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } |
26864 | ||
26865 | cat >>confdefs.h <<_ACEOF | |
26866 | #define socklen_t $gl_cv_socklen_t_equiv | |
26867 | _ACEOF | |
26868 | ||
26869 | fi | |
26870 | ||
0750520d | 26871 | |
63ce7108 TT |
26872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 |
26873 | $as_echo_n "checking for ssize_t... " >&6; } | |
d0ac1c44 | 26874 | if ${gt_cv_ssize_t+:} false; then : |
63ce7108 TT |
26875 | $as_echo_n "(cached) " >&6 |
26876 | else | |
26877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26878 | /* end confdefs.h. */ | |
26879 | #include <sys/types.h> | |
26880 | int | |
26881 | main () | |
26882 | { | |
26883 | int x = sizeof (ssize_t *) + sizeof (ssize_t); | |
26884 | return !x; | |
26885 | ; | |
26886 | return 0; | |
26887 | } | |
26888 | _ACEOF | |
26889 | if ac_fn_c_try_compile "$LINENO"; then : | |
26890 | gt_cv_ssize_t=yes | |
26891 | else | |
26892 | gt_cv_ssize_t=no | |
26893 | fi | |
26894 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26895 | fi | |
26896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 | |
26897 | $as_echo "$gt_cv_ssize_t" >&6; } | |
26898 | if test $gt_cv_ssize_t = no; then | |
26899 | ||
26900 | $as_echo "#define ssize_t int" >>confdefs.h | |
26901 | ||
26902 | fi | |
26903 | ||
26904 | ||
26905 | ||
26906 | ||
472fa5ee | 26907 | |
c0c3707f CB |
26908 | case "$host_os" in |
26909 | mingw*) | |
d706b69e | 26910 | ;; |
c0c3707f CB |
26911 | *) |
26912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
26913 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
26914 | if ${gl_cv_func_stat_file_slash+:} false; then : | |
2196f55f YQ |
26915 | $as_echo_n "(cached) " >&6 |
26916 | else | |
c0c3707f CB |
26917 | touch conftest.tmp |
26918 | # Assume that if we have lstat, we can also check symlinks. | |
26919 | if test $ac_cv_func_lstat = yes; then | |
26920 | ln -s conftest.tmp conftest.lnk | |
26921 | fi | |
26922 | if test "$cross_compiling" = yes; then : | |
26923 | case "$host_os" in | |
26924 | # Guess yes on Linux systems. | |
26925 | linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; | |
26926 | # Guess yes on glibc systems. | |
26927 | *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; | |
26928 | # If we don't know, obey --enable-cross-guesses. | |
26929 | *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;; | |
26930 | esac | |
26931 | ||
2196f55f YQ |
26932 | else |
26933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26934 | /* end confdefs.h. */ | |
26935 | #include <sys/stat.h> | |
26936 | ||
26937 | int | |
26938 | main () | |
26939 | { | |
c0c3707f CB |
26940 | int result = 0; |
26941 | struct stat st; | |
26942 | if (!stat ("conftest.tmp/", &st)) | |
26943 | result |= 1; | |
26944 | #if HAVE_LSTAT | |
26945 | if (!stat ("conftest.lnk/", &st)) | |
26946 | result |= 2; | |
26947 | #endif | |
26948 | return result; | |
26949 | ||
2196f55f YQ |
26950 | ; |
26951 | return 0; | |
26952 | } | |
26953 | _ACEOF | |
26954 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 26955 | gl_cv_func_stat_file_slash=yes |
2196f55f | 26956 | else |
c0c3707f | 26957 | gl_cv_func_stat_file_slash=no |
2196f55f YQ |
26958 | fi |
26959 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26960 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26961 | fi | |
26962 | ||
c0c3707f | 26963 | rm -f conftest.tmp conftest.lnk |
2196f55f | 26964 | fi |
c0c3707f CB |
26965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 |
26966 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
26967 | case $gl_cv_func_stat_file_slash in | |
26968 | *no) | |
26969 | REPLACE_STAT=1 | |
26970 | ||
26971 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h | |
26972 | ;; | |
26973 | esac | |
26974 | case $host_os in | |
26975 | solaris*) | |
26976 | REPLACE_FSTAT=1 ;; | |
26977 | esac | |
26978 | ;; | |
26979 | esac | |
26980 | ||
26981 | if test $REPLACE_STAT = 1; then | |
26982 | ||
26983 | ||
26984 | ||
26985 | ||
26986 | ||
26987 | ||
26988 | ||
26989 | ||
26990 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" | |
26991 | ||
26992 | case "$host_os" in | |
26993 | mingw*) | |
26994 | ||
26995 | ||
26996 | ||
26997 | ||
26998 | ||
26999 | ||
27000 | ||
27001 | ||
27002 | gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" | |
27003 | ||
27004 | ;; | |
27005 | esac | |
27006 | ||
27007 | ||
27008 | : | |
27009 | ||
27010 | fi | |
27011 | ||
27012 | ||
27013 | ||
27014 | ||
27015 | ||
27016 | GNULIB_STAT=1 | |
27017 | ||
27018 | ||
27019 | ||
27020 | ||
27021 | ||
27022 | $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h | |
27023 | ||
27024 | ||
27025 | ||
27026 | ||
7a6dbc2f | 27027 | |
c0c3707f CB |
27028 | |
27029 | ||
27030 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h> | |
27031 | #include <sys/stat.h> | |
27032 | " | |
27033 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : | |
27034 | ||
27035 | cat >>confdefs.h <<_ACEOF | |
27036 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 | |
27037 | _ACEOF | |
27038 | ||
27039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
27040 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
27041 | if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : | |
27042 | $as_echo_n "(cached) " >&6 | |
2196f55f | 27043 | else |
5e8754f9 SDJ |
27044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
27045 | /* end confdefs.h. */ | |
c0c3707f CB |
27046 | |
27047 | #include <sys/types.h> | |
27048 | #include <sys/stat.h> | |
27049 | #if HAVE_SYS_TIME_H | |
27050 | # include <sys/time.h> | |
27051 | #endif | |
27052 | #include <time.h> | |
27053 | struct timespec ts; | |
27054 | struct stat st; | |
7a6dbc2f | 27055 | |
5e8754f9 SDJ |
27056 | int |
27057 | main () | |
27058 | { | |
c0c3707f CB |
27059 | |
27060 | st.st_atim = ts; | |
7a6dbc2f | 27061 | |
5e8754f9 SDJ |
27062 | ; |
27063 | return 0; | |
27064 | } | |
27065 | _ACEOF | |
c0c3707f CB |
27066 | if ac_fn_c_try_compile "$LINENO"; then : |
27067 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
5e8754f9 | 27068 | else |
c0c3707f | 27069 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
2196f55f | 27070 | fi |
c0c3707f | 27071 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2196f55f | 27072 | fi |
c0c3707f CB |
27073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
27074 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
27075 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
2196f55f | 27076 | |
c0c3707f | 27077 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
2196f55f | 27078 | |
c0c3707f CB |
27079 | fi |
27080 | else | |
27081 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h> | |
27082 | #include <sys/stat.h> | |
27083 | " | |
27084 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : | |
2196f55f | 27085 | |
c0c3707f CB |
27086 | cat >>confdefs.h <<_ACEOF |
27087 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 | |
27088 | _ACEOF | |
2196f55f | 27089 | |
c0c3707f CB |
27090 | |
27091 | else | |
27092 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> | |
27093 | #include <sys/stat.h> | |
27094 | " | |
27095 | if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : | |
27096 | ||
27097 | cat >>confdefs.h <<_ACEOF | |
27098 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
27099 | _ACEOF | |
2196f55f YQ |
27100 | |
27101 | ||
c0c3707f CB |
27102 | else |
27103 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h> | |
27104 | #include <sys/stat.h> | |
27105 | " | |
27106 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : | |
2196f55f | 27107 | |
c0c3707f CB |
27108 | cat >>confdefs.h <<_ACEOF |
27109 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
27110 | _ACEOF | |
2196f55f YQ |
27111 | |
27112 | ||
c0c3707f | 27113 | fi |
2196f55f | 27114 | |
c0c3707f | 27115 | fi |
2196f55f | 27116 | |
c0c3707f | 27117 | fi |
2196f55f | 27118 | |
c0c3707f | 27119 | fi |
2196f55f YQ |
27120 | |
27121 | ||
27122 | ||
27123 | ||
27124 | ||
c0c3707f CB |
27125 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h> |
27126 | #include <sys/stat.h> | |
27127 | " | |
27128 | if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : | |
2196f55f | 27129 | |
c0c3707f CB |
27130 | cat >>confdefs.h <<_ACEOF |
27131 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 | |
27132 | _ACEOF | |
2196f55f YQ |
27133 | |
27134 | ||
c0c3707f CB |
27135 | else |
27136 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> | |
27137 | #include <sys/stat.h> | |
27138 | " | |
27139 | if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : | |
2196f55f | 27140 | |
c0c3707f CB |
27141 | cat >>confdefs.h <<_ACEOF |
27142 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 | |
27143 | _ACEOF | |
2196f55f | 27144 | |
2196f55f | 27145 | |
c0c3707f CB |
27146 | else |
27147 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h> | |
27148 | #include <sys/stat.h> | |
27149 | " | |
27150 | if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : | |
27151 | ||
27152 | cat >>confdefs.h <<_ACEOF | |
27153 | #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 | |
27154 | _ACEOF | |
27155 | ||
27156 | ||
27157 | fi | |
27158 | ||
27159 | fi | |
5e8754f9 | 27160 | |
c0c3707f | 27161 | fi |
2196f55f YQ |
27162 | |
27163 | ||
27164 | ||
725e2999 JB |
27165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
27166 | $as_echo_n "checking for working stdalign.h... " >&6; } | |
27167 | if ${gl_cv_header_working_stdalign_h+:} false; then : | |
27168 | $as_echo_n "(cached) " >&6 | |
27169 | else | |
27170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27171 | /* end confdefs.h. */ | |
27172 | #include <stdalign.h> | |
27173 | #include <stddef.h> | |
27174 | ||
27175 | /* Test that alignof yields a result consistent with offsetof. | |
27176 | This catches GCC bug 52023 | |
c0c3707f | 27177 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ |
725e2999 JB |
27178 | #ifdef __cplusplus |
27179 | template <class t> struct alignof_helper { char a; t b; }; | |
27180 | # define ao(type) offsetof (alignof_helper<type>, b) | |
27181 | #else | |
27182 | # define ao(type) offsetof (struct { char a; type b; }, b) | |
27183 | #endif | |
27184 | char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; | |
27185 | char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; | |
27186 | char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; | |
27187 | ||
27188 | /* Test _Alignas only on platforms where gnulib can help. */ | |
27189 | #if \ | |
27190 | ((defined __cplusplus && 201103 <= __cplusplus) \ | |
27191 | || (defined __APPLE__ && defined __MACH__ \ | |
27192 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ | |
27193 | : __GNUC__) \ | |
c0c3707f CB |
27194 | || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ |
27195 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ | |
725e2999 JB |
27196 | || 1300 <= _MSC_VER) |
27197 | struct alignas_test { char c; char alignas (8) alignas_8; }; | |
27198 | char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 | |
27199 | ? 1 : -1]; | |
27200 | #endif | |
27201 | ||
27202 | int | |
27203 | main () | |
27204 | { | |
27205 | ||
27206 | ; | |
27207 | return 0; | |
27208 | } | |
27209 | _ACEOF | |
27210 | if ac_fn_c_try_compile "$LINENO"; then : | |
27211 | gl_cv_header_working_stdalign_h=yes | |
27212 | else | |
27213 | gl_cv_header_working_stdalign_h=no | |
27214 | fi | |
27215 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27216 | fi | |
27217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 | |
27218 | $as_echo "$gl_cv_header_working_stdalign_h" >&6; } | |
27219 | ||
27220 | if test $gl_cv_header_working_stdalign_h = yes; then | |
27221 | STDALIGN_H='' | |
27222 | else | |
27223 | STDALIGN_H='stdalign.h' | |
27224 | fi | |
27225 | ||
27226 | ||
27227 | if test -n "$STDALIGN_H"; then | |
27228 | GL_GENERATE_STDALIGN_H_TRUE= | |
27229 | GL_GENERATE_STDALIGN_H_FALSE='#' | |
27230 | else | |
27231 | GL_GENERATE_STDALIGN_H_TRUE='#' | |
27232 | GL_GENERATE_STDALIGN_H_FALSE= | |
27233 | fi | |
27234 | ||
27235 | ||
27236 | ||
2196f55f YQ |
27237 | |
27238 | ||
63ce7108 | 27239 | |
c0c3707f CB |
27240 | if test "$ac_cv_header_stdbool_h" = yes; then |
27241 | case "$host_os" in | |
27242 | solaris*) | |
27243 | if test -z "$GCC"; then | |
27244 | STDBOOL_H='stdbool.h' | |
27245 | else | |
27246 | STDBOOL_H='' | |
27247 | fi | |
27248 | ;; | |
27249 | *) | |
27250 | STDBOOL_H='' | |
27251 | ;; | |
27252 | esac | |
63ce7108 TT |
27253 | else |
27254 | STDBOOL_H='stdbool.h' | |
27255 | fi | |
27256 | ||
27257 | if test -n "$STDBOOL_H"; then | |
27258 | GL_GENERATE_STDBOOL_H_TRUE= | |
27259 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
27260 | else | |
27261 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
27262 | GL_GENERATE_STDBOOL_H_FALSE= | |
27263 | fi | |
27264 | ||
27265 | ||
27266 | if test "$ac_cv_type__Bool" = yes; then | |
27267 | HAVE__BOOL=1 | |
27268 | else | |
27269 | HAVE__BOOL=0 | |
27270 | fi | |
27271 | ||
27272 | ||
27273 | ||
27274 | ||
27275 | ||
27276 | STDDEF_H= | |
4a626d0a | 27277 | |
c0c3707f CB |
27278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 |
27279 | $as_echo_n "checking for good max_align_t... " >&6; } | |
27280 | if ${gl_cv_type_max_align_t+:} false; then : | |
27281 | $as_echo_n "(cached) " >&6 | |
27282 | else | |
27283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27284 | /* end confdefs.h. */ | |
27285 | #include <stddef.h> | |
27286 | unsigned int s = sizeof (max_align_t); | |
27287 | #if defined __GNUC__ || defined __IBM__ALIGNOF__ | |
27288 | int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; | |
27289 | int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; | |
27290 | #endif | |
27291 | ||
27292 | int | |
27293 | main () | |
27294 | { | |
4a626d0a | 27295 | |
c0c3707f CB |
27296 | ; |
27297 | return 0; | |
27298 | } | |
27299 | _ACEOF | |
27300 | if ac_fn_c_try_compile "$LINENO"; then : | |
27301 | gl_cv_type_max_align_t=yes | |
4a626d0a | 27302 | else |
c0c3707f | 27303 | gl_cv_type_max_align_t=no |
4a626d0a | 27304 | fi |
c0c3707f CB |
27305 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27306 | ||
27307 | fi | |
27308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 | |
27309 | $as_echo "$gl_cv_type_max_align_t" >&6; } | |
27310 | if test $gl_cv_type_max_align_t = no; then | |
27311 | HAVE_MAX_ALIGN_T=0 | |
27312 | STDDEF_H=stddef.h | |
27313 | fi | |
4a626d0a | 27314 | |
63ce7108 TT |
27315 | if test $gt_cv_c_wchar_t = no; then |
27316 | HAVE_WCHAR_T=0 | |
27317 | STDDEF_H=stddef.h | |
27318 | fi | |
c0c3707f | 27319 | |
63ce7108 TT |
27320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 |
27321 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
d0ac1c44 | 27322 | if ${gl_cv_decl_null_works+:} false; then : |
63ce7108 TT |
27323 | $as_echo_n "(cached) " >&6 |
27324 | else | |
27325 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27326 | /* end confdefs.h. */ | |
27327 | #include <stddef.h> | |
27328 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
27329 | ||
27330 | int | |
27331 | main () | |
27332 | { | |
27333 | ||
27334 | ; | |
27335 | return 0; | |
27336 | } | |
27337 | _ACEOF | |
27338 | if ac_fn_c_try_compile "$LINENO"; then : | |
27339 | gl_cv_decl_null_works=yes | |
27340 | else | |
27341 | gl_cv_decl_null_works=no | |
27342 | fi | |
27343 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27344 | fi | |
27345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
27346 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
27347 | if test $gl_cv_decl_null_works = no; then | |
27348 | REPLACE_NULL=1 | |
27349 | STDDEF_H=stddef.h | |
27350 | fi | |
27351 | ||
c0c3707f | 27352 | |
63ce7108 TT |
27353 | if test -n "$STDDEF_H"; then |
27354 | GL_GENERATE_STDDEF_H_TRUE= | |
27355 | GL_GENERATE_STDDEF_H_FALSE='#' | |
27356 | else | |
27357 | GL_GENERATE_STDDEF_H_TRUE='#' | |
27358 | GL_GENERATE_STDDEF_H_FALSE= | |
27359 | fi | |
27360 | ||
27361 | if test -n "$STDDEF_H"; then | |
27362 | ||
27363 | ||
27364 | ||
27365 | ||
27366 | ||
27367 | ||
27368 | ||
27369 | ||
27370 | if test $gl_cv_have_include_next = yes; then | |
27371 | gl_cv_next_stddef_h='<'stddef.h'>' | |
27372 | else | |
27373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
27374 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
d0ac1c44 | 27375 | if ${gl_cv_next_stddef_h+:} false; then : |
63ce7108 TT |
27376 | $as_echo_n "(cached) " >&6 |
27377 | else | |
27378 | ||
4a626d0a PA |
27379 | |
27380 | ||
27381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
63ce7108 TT |
27382 | /* end confdefs.h. */ |
27383 | #include <stddef.h> | |
63ce7108 | 27384 | _ACEOF |
4a626d0a PA |
27385 | case "$host_os" in |
27386 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
27387 | *) gl_absname_cpp="$ac_cpp" ;; | |
27388 | esac | |
63ce7108 | 27389 | |
4a626d0a PA |
27390 | case "$host_os" in |
27391 | mingw*) | |
27392 | gl_dirsep_regex='[/\\]' | |
27393 | ;; | |
27394 | *) | |
27395 | gl_dirsep_regex='\/' | |
27396 | ;; | |
27397 | esac | |
27398 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
27399 | gl_header_literal_regex=`echo 'stddef.h' \ | |
27400 | | sed -e "$gl_make_literal_regex_sed"` | |
27401 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
27402 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
27403 | s|^/[^/]|//&| | |
27404 | p | |
27405 | q | |
27406 | }' | |
63ce7108 | 27407 | |
4a626d0a PA |
27408 | gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
27409 | sed -n "$gl_absolute_header_sed"` | |
27410 | ||
27411 | gl_header=$gl_cv_absolute_stddef_h | |
27412 | gl_cv_next_stddef_h='"'$gl_header'"' | |
63ce7108 TT |
27413 | |
27414 | ||
27415 | fi | |
27416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
27417 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
27418 | fi | |
27419 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
27420 | ||
27421 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
27422 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
27423 | gl_next_as_first_directive='<'stddef.h'>' | |
27424 | else | |
27425 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
27426 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
27427 | fi | |
27428 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
27429 | ||
27430 | ||
27431 | ||
27432 | ||
27433 | fi | |
27434 | ||
27435 | ||
27436 | ||
27437 | ||
49e4877c | 27438 | $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h |
63ce7108 TT |
27439 | |
27440 | ||
27441 | ||
98399780 YQ |
27442 | |
27443 | ||
27444 | ||
27445 | ||
27446 | ||
4a626d0a PA |
27447 | |
27448 | ||
6a29c58e YQ |
27449 | if test $gl_cv_have_include_next = yes; then |
27450 | gl_cv_next_stdio_h='<'stdio.h'>' | |
27451 | else | |
27452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
27453 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
d0ac1c44 | 27454 | if ${gl_cv_next_stdio_h+:} false; then : |
6a29c58e YQ |
27455 | $as_echo_n "(cached) " >&6 |
27456 | else | |
27457 | ||
4a626d0a PA |
27458 | |
27459 | ||
27460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6a29c58e YQ |
27461 | /* end confdefs.h. */ |
27462 | #include <stdio.h> | |
6a29c58e | 27463 | _ACEOF |
4a626d0a PA |
27464 | case "$host_os" in |
27465 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
27466 | *) gl_absname_cpp="$ac_cpp" ;; | |
27467 | esac | |
27468 | ||
27469 | case "$host_os" in | |
27470 | mingw*) | |
27471 | gl_dirsep_regex='[/\\]' | |
27472 | ;; | |
27473 | *) | |
27474 | gl_dirsep_regex='\/' | |
27475 | ;; | |
27476 | esac | |
27477 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
27478 | gl_header_literal_regex=`echo 'stdio.h' \ | |
27479 | | sed -e "$gl_make_literal_regex_sed"` | |
27480 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
27481 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
27482 | s|^/[^/]|//&| | |
27483 | p | |
27484 | q | |
27485 | }' | |
6a29c58e | 27486 | |
4a626d0a PA |
27487 | gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
27488 | sed -n "$gl_absolute_header_sed"` | |
6a29c58e | 27489 | |
4a626d0a PA |
27490 | gl_header=$gl_cv_absolute_stdio_h |
27491 | gl_cv_next_stdio_h='"'$gl_header'"' | |
6a29c58e YQ |
27492 | |
27493 | ||
27494 | fi | |
27495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 | |
27496 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
27497 | fi | |
27498 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
27499 | ||
27500 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
27501 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
27502 | gl_next_as_first_directive='<'stdio.h'>' | |
27503 | else | |
27504 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
27505 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
27506 | fi | |
27507 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
27508 | ||
27509 | ||
27510 | ||
27511 | ||
27512 | ||
4a626d0a PA |
27513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 |
27514 | $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } | |
d0ac1c44 | 27515 | if ${gl_cv_func_printf_attribute_flavor+:} false; then : |
4a626d0a PA |
27516 | $as_echo_n "(cached) " >&6 |
27517 | else | |
27518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27519 | /* end confdefs.h. */ | |
27520 | ||
27521 | #define __STDC_FORMAT_MACROS 1 | |
27522 | #include <stdio.h> | |
27523 | #include <inttypes.h> | |
27524 | /* For non-mingw systems, compilation will trivially succeed. | |
27525 | For mingw, compilation will succeed for older mingw (system | |
27526 | printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ | |
c0c3707f | 27527 | #if (defined _WIN32 && ! defined __CYGWIN__) && \ |
4a626d0a PA |
27528 | (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
27529 | extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; | |
27530 | #endif | |
27531 | ||
27532 | int | |
27533 | main () | |
27534 | { | |
27535 | ||
27536 | ; | |
27537 | return 0; | |
27538 | } | |
27539 | _ACEOF | |
27540 | if ac_fn_c_try_compile "$LINENO"; then : | |
27541 | gl_cv_func_printf_attribute_flavor=system | |
27542 | else | |
27543 | gl_cv_func_printf_attribute_flavor=gnu | |
27544 | fi | |
27545 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27546 | fi | |
27547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 | |
27548 | $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } | |
27549 | if test "$gl_cv_func_printf_attribute_flavor" = gnu; then | |
27550 | ||
27551 | $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h | |
27552 | ||
27553 | fi | |
27554 | ||
6a29c58e YQ |
27555 | GNULIB_FSCANF=1 |
27556 | ||
27557 | ||
27558 | cat >>confdefs.h <<_ACEOF | |
27559 | #define GNULIB_FSCANF 1 | |
27560 | _ACEOF | |
27561 | ||
27562 | ||
27563 | GNULIB_SCANF=1 | |
27564 | ||
27565 | ||
27566 | cat >>confdefs.h <<_ACEOF | |
27567 | #define GNULIB_SCANF 1 | |
27568 | _ACEOF | |
27569 | ||
27570 | ||
27571 | GNULIB_FGETC=1 | |
27572 | GNULIB_GETC=1 | |
27573 | GNULIB_GETCHAR=1 | |
27574 | GNULIB_FGETS=1 | |
27575 | GNULIB_FREAD=1 | |
27576 | ||
27577 | ||
27578 | GNULIB_FPRINTF=1 | |
27579 | GNULIB_PRINTF=1 | |
27580 | GNULIB_VFPRINTF=1 | |
27581 | GNULIB_VPRINTF=1 | |
27582 | GNULIB_FPUTC=1 | |
27583 | GNULIB_PUTC=1 | |
27584 | GNULIB_PUTCHAR=1 | |
27585 | GNULIB_FPUTS=1 | |
27586 | GNULIB_PUTS=1 | |
27587 | GNULIB_FWRITE=1 | |
27588 | ||
27589 | ||
27590 | ||
27591 | ||
6a29c58e | 27592 | |
6a29c58e YQ |
27593 | |
27594 | ||
27595 | ||
27596 | ||
27597 | ||
27598 | ||
27599 | ||
27600 | ||
27601 | ||
27602 | ||
27603 | ||
27604 | ||
698be2d8 CB |
27605 | |
27606 | ||
98399780 YQ |
27607 | if test $gl_cv_have_include_next = yes; then |
27608 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
27609 | else | |
27610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
27611 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
d0ac1c44 | 27612 | if ${gl_cv_next_stdlib_h+:} false; then : |
98399780 YQ |
27613 | $as_echo_n "(cached) " >&6 |
27614 | else | |
27615 | ||
4a626d0a PA |
27616 | |
27617 | ||
27618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
98399780 YQ |
27619 | /* end confdefs.h. */ |
27620 | #include <stdlib.h> | |
98399780 | 27621 | _ACEOF |
4a626d0a PA |
27622 | case "$host_os" in |
27623 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
27624 | *) gl_absname_cpp="$ac_cpp" ;; | |
27625 | esac | |
27626 | ||
27627 | case "$host_os" in | |
27628 | mingw*) | |
27629 | gl_dirsep_regex='[/\\]' | |
27630 | ;; | |
27631 | *) | |
27632 | gl_dirsep_regex='\/' | |
27633 | ;; | |
27634 | esac | |
27635 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
27636 | gl_header_literal_regex=`echo 'stdlib.h' \ | |
27637 | | sed -e "$gl_make_literal_regex_sed"` | |
27638 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
27639 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
27640 | s|^/[^/]|//&| | |
27641 | p | |
27642 | q | |
27643 | }' | |
98399780 | 27644 | |
4a626d0a PA |
27645 | gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
27646 | sed -n "$gl_absolute_header_sed"` | |
98399780 | 27647 | |
4a626d0a PA |
27648 | gl_header=$gl_cv_absolute_stdlib_h |
27649 | gl_cv_next_stdlib_h='"'$gl_header'"' | |
98399780 YQ |
27650 | |
27651 | ||
27652 | fi | |
27653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 | |
27654 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
27655 | fi | |
27656 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
27657 | ||
27658 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
27659 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
27660 | gl_next_as_first_directive='<'stdlib.h'>' | |
27661 | else | |
27662 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
27663 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
27664 | fi | |
27665 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
27666 | ||
27667 | ||
27668 | ||
27669 | ||
27670 | ||
27671 | ||
98399780 | 27672 | |
98399780 YQ |
27673 | |
27674 | ||
27675 | ||
27676 | ||
27677 | ||
27678 | ||
698be2d8 CB |
27679 | |
27680 | ||
8424cc97 SM |
27681 | for ac_func in strchrnul |
27682 | do : | |
27683 | ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" | |
d0ac1c44 | 27684 | if test "x$ac_cv_func_strchrnul" = xyes; then : |
8424cc97 SM |
27685 | cat >>confdefs.h <<_ACEOF |
27686 | #define HAVE_STRCHRNUL 1 | |
27687 | _ACEOF | |
27688 | ||
27689 | fi | |
27690 | done | |
27691 | ||
27692 | if test $ac_cv_func_strchrnul = no; then | |
27693 | HAVE_STRCHRNUL=0 | |
27694 | else | |
27695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 | |
27696 | $as_echo_n "checking whether strchrnul works... " >&6; } | |
d0ac1c44 | 27697 | if ${gl_cv_func_strchrnul_works+:} false; then : |
8424cc97 SM |
27698 | $as_echo_n "(cached) " >&6 |
27699 | else | |
27700 | if test "$cross_compiling" = yes; then : | |
27701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27702 | /* end confdefs.h. */ | |
27703 | ||
27704 | #if defined __CYGWIN__ | |
27705 | #include <cygwin/version.h> | |
27706 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) | |
27707 | Lucky user | |
27708 | #endif | |
27709 | #else | |
27710 | Lucky user | |
27711 | #endif | |
27712 | ||
27713 | _ACEOF | |
27714 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
27715 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
27716 | gl_cv_func_strchrnul_works="guessing yes" | |
27717 | else | |
27718 | gl_cv_func_strchrnul_works="guessing no" | |
27719 | fi | |
27720 | rm -f conftest* | |
27721 | ||
27722 | ||
27723 | else | |
27724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27725 | /* end confdefs.h. */ | |
27726 | ||
27727 | #include <string.h> /* for strchrnul */ | |
27728 | ||
27729 | int | |
27730 | main () | |
27731 | { | |
27732 | const char *buf = "a"; | |
27733 | return strchrnul (buf, 'b') != buf + 1; | |
27734 | ||
27735 | ; | |
27736 | return 0; | |
27737 | } | |
27738 | _ACEOF | |
27739 | if ac_fn_c_try_run "$LINENO"; then : | |
27740 | gl_cv_func_strchrnul_works=yes | |
27741 | else | |
27742 | gl_cv_func_strchrnul_works=no | |
27743 | fi | |
27744 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27745 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27746 | fi | |
27747 | ||
27748 | ||
27749 | fi | |
27750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5 | |
27751 | $as_echo "$gl_cv_func_strchrnul_works" >&6; } | |
27752 | case "$gl_cv_func_strchrnul_works" in | |
27753 | *yes) ;; | |
27754 | *) REPLACE_STRCHRNUL=1 ;; | |
27755 | esac | |
27756 | fi | |
27757 | ||
27758 | if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then | |
27759 | ||
27760 | ||
27761 | ||
27762 | ||
27763 | ||
27764 | ||
27765 | ||
27766 | ||
27767 | gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext" | |
27768 | ||
27769 | : | |
27770 | fi | |
27771 | ||
27772 | ||
27773 | ||
27774 | ||
27775 | ||
27776 | GNULIB_STRCHRNUL=1 | |
27777 | ||
27778 | ||
27779 | ||
27780 | ||
27781 | ||
27782 | $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h | |
27783 | ||
27784 | ||
27785 | ||
27786 | ||
27787 | ||
27788 | ||
27789 | ||
6ec2e0f5 SDJ |
27790 | if test $ac_cv_func_strdup = yes; then |
27791 | if test $gl_cv_func_malloc_posix != yes; then | |
27792 | REPLACE_STRDUP=1 | |
27793 | fi | |
27794 | fi | |
27795 | ||
27796 | if test $ac_cv_have_decl_strdup = no; then | |
27797 | HAVE_DECL_STRDUP=0 | |
27798 | fi | |
27799 | ||
27800 | if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then | |
27801 | ||
27802 | ||
27803 | ||
27804 | ||
27805 | ||
27806 | ||
27807 | ||
27808 | ||
27809 | gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" | |
27810 | ||
27811 | : | |
27812 | fi | |
27813 | ||
27814 | ||
27815 | ||
27816 | ||
27817 | ||
27818 | GNULIB_STRDUP=1 | |
27819 | ||
27820 | ||
27821 | ||
27822 | ||
27823 | ||
27824 | $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h | |
27825 | ||
27826 | ||
27827 | ||
27828 | ||
27829 | ||
27830 | ||
27831 | ||
27832 | ||
5abebf3c CB |
27833 | |
27834 | ||
6ec2e0f5 SDJ |
27835 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then |
27836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 | |
27837 | $as_echo_n "checking for working strerror function... " >&6; } | |
d0ac1c44 | 27838 | if ${gl_cv_func_working_strerror+:} false; then : |
6ec2e0f5 SDJ |
27839 | $as_echo_n "(cached) " >&6 |
27840 | else | |
27841 | if test "$cross_compiling" = yes; then : | |
27842 | case "$host_os" in | |
c0c3707f CB |
27843 | # Guess yes on glibc systems. |
27844 | *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; | |
27845 | # Guess yes on musl systems. | |
27846 | *-musl*) gl_cv_func_working_strerror="guessing yes" ;; | |
27847 | # If we don't know, obey --enable-cross-guesses. | |
27848 | *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; | |
6ec2e0f5 SDJ |
27849 | esac |
27850 | ||
27851 | else | |
27852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27853 | /* end confdefs.h. */ | |
27854 | #include <string.h> | |
27855 | ||
27856 | int | |
27857 | main () | |
27858 | { | |
27859 | if (!*strerror (-2)) return 1; | |
27860 | ; | |
27861 | return 0; | |
27862 | } | |
27863 | _ACEOF | |
27864 | if ac_fn_c_try_run "$LINENO"; then : | |
27865 | gl_cv_func_working_strerror=yes | |
27866 | else | |
27867 | gl_cv_func_working_strerror=no | |
27868 | fi | |
27869 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27870 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27871 | fi | |
27872 | ||
27873 | ||
27874 | fi | |
27875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 | |
27876 | $as_echo "$gl_cv_func_working_strerror" >&6; } | |
27877 | case "$gl_cv_func_working_strerror" in | |
27878 | *yes) ;; | |
27879 | *) | |
27880 | REPLACE_STRERROR=1 | |
27881 | ;; | |
27882 | esac | |
27883 | ||
5abebf3c CB |
27884 | case "$gl_cv_func_strerror_r_works" in |
27885 | *no) REPLACE_STRERROR=1 ;; | |
27886 | esac | |
27887 | ||
6ec2e0f5 SDJ |
27888 | else |
27889 | REPLACE_STRERROR=1 | |
27890 | fi | |
27891 | ||
27892 | if test $REPLACE_STRERROR = 1; then | |
27893 | ||
27894 | ||
27895 | ||
27896 | ||
27897 | ||
27898 | ||
27899 | ||
27900 | ||
27901 | gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" | |
27902 | ||
27903 | fi | |
27904 | ||
27905 | ||
27906 | cat >>confdefs.h <<_ACEOF | |
27907 | #define GNULIB_STRERROR 1 | |
27908 | _ACEOF | |
27909 | ||
27910 | ||
27911 | ||
27912 | ||
27913 | ||
27914 | ||
27915 | ||
27916 | GNULIB_STRERROR=1 | |
27917 | ||
27918 | ||
27919 | ||
27920 | ||
27921 | ||
27922 | $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h | |
27923 | ||
27924 | ||
27925 | ||
27926 | ||
27927 | ||
27928 | if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then | |
27929 | ||
27930 | ||
27931 | ||
27932 | ||
27933 | ||
27934 | ||
27935 | ||
27936 | ||
27937 | gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" | |
27938 | ||
27939 | ||
27940 | ||
27941 | ||
27942 | ||
27943 | if test $ac_cv_header_sys_socket_h != yes; then | |
27944 | for ac_header in winsock2.h | |
27945 | do : | |
27946 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
d0ac1c44 | 27947 | if test "x$ac_cv_header_winsock2_h" = xyes; then : |
6ec2e0f5 SDJ |
27948 | cat >>confdefs.h <<_ACEOF |
27949 | #define HAVE_WINSOCK2_H 1 | |
27950 | _ACEOF | |
27951 | ||
27952 | fi | |
27953 | ||
27954 | done | |
27955 | ||
27956 | fi | |
27957 | if test "$ac_cv_header_winsock2_h" = yes; then | |
27958 | HAVE_WINSOCK2_H=1 | |
27959 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
27960 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
27961 | else | |
27962 | HAVE_WINSOCK2_H=0 | |
27963 | fi | |
27964 | ||
27965 | ||
27966 | fi | |
27967 | ||
27968 | ||
27969 | ||
27970 | ||
98399780 | 27971 | |
5abebf3c | 27972 | |
5abebf3c | 27973 | |
c0c3707f CB |
27974 | if test $ac_cv_have_decl_strerror_r = no; then |
27975 | HAVE_DECL_STRERROR_R=0 | |
27976 | fi | |
5abebf3c CB |
27977 | |
27978 | if test $ac_cv_func_strerror_r = yes; then | |
27979 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then | |
27980 | if test $gl_cv_func_strerror_r_posix_signature = yes; then | |
27981 | case "$gl_cv_func_strerror_r_works" in | |
27982 | *no) REPLACE_STRERROR_R=1 ;; | |
27983 | esac | |
27984 | else | |
27985 | REPLACE_STRERROR_R=1 | |
27986 | fi | |
27987 | else | |
27988 | REPLACE_STRERROR_R=1 | |
27989 | fi | |
27990 | fi | |
27991 | ||
5abebf3c CB |
27992 | if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then |
27993 | ||
27994 | ||
27995 | ||
27996 | ||
27997 | ||
27998 | ||
27999 | ||
28000 | ||
28001 | gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext" | |
28002 | ||
28003 | ||
28004 | ||
5abebf3c CB |
28005 | |
28006 | ||
28007 | ||
c0c3707f | 28008 | fi |
5abebf3c CB |
28009 | |
28010 | ||
28011 | ||
28012 | ||
5abebf3c | 28013 | |
c0c3707f | 28014 | GNULIB_STRERROR_R=1 |
5abebf3c CB |
28015 | |
28016 | ||
28017 | ||
28018 | ||
5abebf3c | 28019 | |
c0c3707f | 28020 | $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h |
5abebf3c CB |
28021 | |
28022 | ||
28023 | ||
28024 | ||
5abebf3c | 28025 | |
c0c3707f CB |
28026 | cat >>confdefs.h <<_ACEOF |
28027 | #define GNULIB_STRERROR_R_POSIX 1 | |
28028 | _ACEOF | |
5abebf3c CB |
28029 | |
28030 | ||
28031 | ||
28032 | ||
28033 | ||
28034 | ||
28035 | ||
698be2d8 CB |
28036 | |
28037 | ||
28038 | ||
28039 | ||
28040 | if test $ac_cv_have_decl_strnlen = no; then | |
28041 | HAVE_DECL_STRNLEN=0 | |
28042 | else | |
28043 | ||
28044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 | |
28045 | $as_echo_n "checking for working strnlen... " >&6; } | |
28046 | if ${ac_cv_func_strnlen_working+:} false; then : | |
28047 | $as_echo_n "(cached) " >&6 | |
28048 | else | |
28049 | if test "$cross_compiling" = yes; then : | |
28050 | # Guess no on AIX systems, yes otherwise. | |
28051 | case "$host_os" in | |
28052 | aix*) ac_cv_func_strnlen_working=no;; | |
28053 | *) ac_cv_func_strnlen_working=yes;; | |
28054 | esac | |
28055 | else | |
28056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28057 | /* end confdefs.h. */ | |
28058 | $ac_includes_default | |
28059 | int | |
28060 | main () | |
28061 | { | |
28062 | ||
28063 | #define S "foobar" | |
28064 | #define S_LEN (sizeof S - 1) | |
28065 | ||
28066 | /* At least one implementation is buggy: that of AIX 4.3 would | |
28067 | give strnlen (S, 1) == 3. */ | |
28068 | ||
28069 | int i; | |
28070 | for (i = 0; i < S_LEN + 1; ++i) | |
28071 | { | |
28072 | int expected = i <= S_LEN ? i : S_LEN; | |
28073 | if (strnlen (S, i) != expected) | |
28074 | return 1; | |
28075 | } | |
28076 | return 0; | |
28077 | ||
28078 | ; | |
28079 | return 0; | |
28080 | } | |
28081 | _ACEOF | |
28082 | if ac_fn_c_try_run "$LINENO"; then : | |
28083 | ac_cv_func_strnlen_working=yes | |
28084 | else | |
28085 | ac_cv_func_strnlen_working=no | |
28086 | fi | |
28087 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28088 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28089 | fi | |
28090 | ||
28091 | fi | |
28092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 | |
28093 | $as_echo "$ac_cv_func_strnlen_working" >&6; } | |
28094 | test $ac_cv_func_strnlen_working = no && : | |
28095 | ||
28096 | ||
28097 | if test $ac_cv_func_strnlen_working = no; then | |
28098 | REPLACE_STRNLEN=1 | |
28099 | fi | |
28100 | fi | |
28101 | ||
28102 | if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then | |
28103 | ||
28104 | ||
28105 | ||
28106 | ||
28107 | ||
28108 | ||
28109 | ||
28110 | ||
28111 | gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" | |
28112 | ||
28113 | : | |
28114 | fi | |
28115 | ||
28116 | ||
28117 | ||
28118 | ||
28119 | ||
28120 | GNULIB_STRNLEN=1 | |
28121 | ||
28122 | ||
28123 | ||
28124 | ||
28125 | ||
28126 | $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h | |
28127 | ||
28128 | ||
28129 | ||
28130 | ||
28131 | ||
63ce7108 TT |
28132 | if test $REPLACE_STRSTR = 0; then |
28133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 | |
28134 | $as_echo_n "checking whether strstr works in linear time... " >&6; } | |
d0ac1c44 | 28135 | if ${gl_cv_func_strstr_linear+:} false; then : |
63ce7108 TT |
28136 | $as_echo_n "(cached) " >&6 |
28137 | else | |
28138 | if test "$cross_compiling" = yes; then : | |
28139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28140 | /* end confdefs.h. */ | |
28141 | ||
28142 | #include <features.h> | |
28143 | #ifdef __GNU_LIBRARY__ | |
28144 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ | |
28145 | && !(defined __i386__ || defined __x86_64__) \ | |
28146 | && !defined __UCLIBC__ | |
28147 | Lucky user | |
28148 | #endif | |
28149 | #endif | |
28150 | #ifdef __CYGWIN__ | |
28151 | #include <cygwin/version.h> | |
28152 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
28153 | Lucky user | |
28154 | #endif | |
28155 | #endif | |
28156 | ||
28157 | _ACEOF | |
28158 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
28159 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
28160 | gl_cv_func_strstr_linear="guessing yes" | |
c971b7fa | 28161 | else |
c0c3707f | 28162 | gl_cv_func_strstr_linear="$gl_cross_guess_normal" |
c971b7fa PA |
28163 | fi |
28164 | rm -f conftest* | |
28165 | ||
28166 | ||
28167 | else | |
28168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28169 | /* end confdefs.h. */ | |
28170 | ||
49e4877c PA |
28171 | #ifdef __MVS__ |
28172 | /* z/OS does not deliver signals while strstr() is running (thanks to | |
28173 | restrictions on its LE runtime), which prevents us from limiting the | |
28174 | running time of this test. */ | |
28175 | # error "This test does not work properly on z/OS" | |
28176 | #endif | |
c971b7fa | 28177 | #include <signal.h> /* for signal */ |
63ce7108 | 28178 | #include <string.h> /* for strstr */ |
c971b7fa PA |
28179 | #include <stdlib.h> /* for malloc */ |
28180 | #include <unistd.h> /* for alarm */ | |
49e4877c | 28181 | static void quit (int sig) { _exit (sig + 128); } |
c971b7fa PA |
28182 | |
28183 | int | |
28184 | main () | |
28185 | { | |
28186 | ||
28187 | int result = 0; | |
28188 | size_t m = 1000000; | |
63ce7108 TT |
28189 | char *haystack = (char *) malloc (2 * m + 2); |
28190 | char *needle = (char *) malloc (m + 2); | |
c971b7fa | 28191 | /* Failure to compile this test due to missing alarm is okay, |
63ce7108 | 28192 | since all such platforms (mingw) also have quadratic strstr. */ |
c971b7fa PA |
28193 | signal (SIGALRM, quit); |
28194 | alarm (5); | |
28195 | /* Check for quadratic performance. */ | |
28196 | if (haystack && needle) | |
28197 | { | |
28198 | memset (haystack, 'A', 2 * m); | |
28199 | haystack[2 * m] = 'B'; | |
63ce7108 | 28200 | haystack[2 * m + 1] = 0; |
c971b7fa PA |
28201 | memset (needle, 'A', m); |
28202 | needle[m] = 'B'; | |
63ce7108 TT |
28203 | needle[m + 1] = 0; |
28204 | if (!strstr (haystack, needle)) | |
c971b7fa PA |
28205 | result |= 1; |
28206 | } | |
c0c3707f CB |
28207 | /* Free allocated memory, in case some sanitizer is watching. */ |
28208 | free (haystack); | |
28209 | free (needle); | |
c971b7fa PA |
28210 | return result; |
28211 | ||
28212 | ; | |
28213 | return 0; | |
28214 | } | |
28215 | _ACEOF | |
28216 | if ac_fn_c_try_run "$LINENO"; then : | |
63ce7108 | 28217 | gl_cv_func_strstr_linear=yes |
c971b7fa | 28218 | else |
63ce7108 | 28219 | gl_cv_func_strstr_linear=no |
c971b7fa PA |
28220 | fi |
28221 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28222 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28223 | fi | |
28224 | ||
28225 | ||
28226 | fi | |
63ce7108 TT |
28227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 |
28228 | $as_echo "$gl_cv_func_strstr_linear" >&6; } | |
28229 | case "$gl_cv_func_strstr_linear" in | |
40a73391 JK |
28230 | *yes) ;; |
28231 | *) | |
63ce7108 | 28232 | REPLACE_STRSTR=1 |
40a73391 JK |
28233 | ;; |
28234 | esac | |
c971b7fa PA |
28235 | fi |
28236 | ||
63ce7108 | 28237 | if test $REPLACE_STRSTR = 1; then |
c971b7fa PA |
28238 | |
28239 | ||
28240 | ||
28241 | ||
28242 | ||
28243 | ||
28244 | ||
28245 | ||
63ce7108 | 28246 | gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" |
c971b7fa | 28247 | |
a512b375 | 28248 | fi |
c971b7fa PA |
28249 | |
28250 | ||
28251 | ||
c0c3707f | 28252 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then |
63ce7108 | 28253 | REPLACE_STRSTR=1 |
c971b7fa | 28254 | else |
c0c3707f | 28255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 |
63ce7108 | 28256 | $as_echo_n "checking whether strstr works... " >&6; } |
d0ac1c44 | 28257 | if ${gl_cv_func_strstr_works_always+:} false; then : |
c971b7fa PA |
28258 | $as_echo_n "(cached) " >&6 |
28259 | else | |
28260 | if test "$cross_compiling" = yes; then : | |
c0c3707f | 28261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c971b7fa PA |
28262 | /* end confdefs.h. */ |
28263 | ||
28264 | #ifdef __GNU_LIBRARY__ | |
28265 | #include <features.h> | |
63ce7108 | 28266 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ |
c971b7fa PA |
28267 | || defined __UCLIBC__ |
28268 | Lucky user | |
28269 | #endif | |
28270 | #elif defined __CYGWIN__ | |
28271 | #include <cygwin/version.h> | |
28272 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
28273 | Lucky user | |
28274 | #endif | |
28275 | #else | |
28276 | Lucky user | |
28277 | #endif | |
28278 | ||
28279 | _ACEOF | |
28280 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
28281 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
63ce7108 | 28282 | gl_cv_func_strstr_works_always="guessing yes" |
c971b7fa | 28283 | else |
c0c3707f | 28284 | gl_cv_func_strstr_works_always="$gl_cross_guess_normal" |
c971b7fa PA |
28285 | fi |
28286 | rm -f conftest* | |
28287 | ||
28288 | ||
28289 | else | |
28290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28291 | /* end confdefs.h. */ | |
28292 | ||
63ce7108 | 28293 | #include <string.h> /* for strstr */ |
c0c3707f CB |
28294 | #ifdef __GNU_LIBRARY__ |
28295 | #include <features.h> | |
28296 | #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 | |
28297 | Unlucky user | |
28298 | #endif | |
28299 | #endif | |
c971b7fa PA |
28300 | #define P "_EF_BF_BD" |
28301 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
28302 | #define NEEDLE P P P P P | |
28303 | ||
28304 | int | |
28305 | main () | |
28306 | { | |
63ce7108 | 28307 | return !!strstr (HAYSTACK, NEEDLE); |
c971b7fa PA |
28308 | |
28309 | ; | |
28310 | return 0; | |
28311 | } | |
28312 | _ACEOF | |
28313 | if ac_fn_c_try_run "$LINENO"; then : | |
63ce7108 | 28314 | gl_cv_func_strstr_works_always=yes |
c971b7fa | 28315 | else |
63ce7108 | 28316 | gl_cv_func_strstr_works_always=no |
c971b7fa PA |
28317 | fi |
28318 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28319 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28320 | fi | |
28321 | ||
28322 | ||
28323 | fi | |
63ce7108 TT |
28324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 |
28325 | $as_echo "$gl_cv_func_strstr_works_always" >&6; } | |
28326 | case "$gl_cv_func_strstr_works_always" in | |
40a73391 JK |
28327 | *yes) ;; |
28328 | *) | |
63ce7108 | 28329 | REPLACE_STRSTR=1 |
40a73391 JK |
28330 | ;; |
28331 | esac | |
c971b7fa | 28332 | fi |
8839a007 | 28333 | |
63ce7108 | 28334 | if test $REPLACE_STRSTR = 1; then |
8839a007 | 28335 | |
8690e634 JK |
28336 | |
28337 | ||
8690e634 JK |
28338 | |
28339 | ||
28340 | ||
28341 | ||
28342 | ||
63ce7108 | 28343 | gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" |
8690e634 | 28344 | |
8690e634 JK |
28345 | fi |
28346 | ||
8690e634 JK |
28347 | |
28348 | ||
8690e634 | 28349 | |
8690e634 | 28350 | |
63ce7108 | 28351 | GNULIB_STRSTR=1 |
8690e634 JK |
28352 | |
28353 | ||
28354 | ||
8690e634 JK |
28355 | |
28356 | ||
63ce7108 | 28357 | $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h |
8690e634 JK |
28358 | |
28359 | ||
28360 | ||
28361 | ||
28362 | ||
28363 | ||
28364 | ||
421693b0 PA |
28365 | for ac_func in strtok_r |
28366 | do : | |
28367 | ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" | |
d0ac1c44 | 28368 | if test "x$ac_cv_func_strtok_r" = xyes; then : |
421693b0 PA |
28369 | cat >>confdefs.h <<_ACEOF |
28370 | #define HAVE_STRTOK_R 1 | |
28371 | _ACEOF | |
28372 | ||
28373 | fi | |
28374 | done | |
28375 | ||
28376 | if test $ac_cv_func_strtok_r = yes; then | |
28377 | HAVE_STRTOK_R=1 | |
28378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5 | |
28379 | $as_echo_n "checking whether strtok_r works... " >&6; } | |
d0ac1c44 | 28380 | if ${gl_cv_func_strtok_r_works+:} false; then : |
421693b0 PA |
28381 | $as_echo_n "(cached) " >&6 |
28382 | else | |
28383 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
28384 | case "$host_os" in |
28385 | # Guess no on glibc systems. | |
28386 | *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;; | |
28387 | # Guess yes on native Windows. | |
28388 | mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; | |
28389 | *) gl_cv_func_strtok_r_works="guessing yes" ;; | |
421693b0 PA |
28390 | esac |
28391 | ||
28392 | else | |
28393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28394 | /* end confdefs.h. */ | |
28395 | ||
28396 | #ifndef __OPTIMIZE__ | |
28397 | # define __OPTIMIZE__ 1 | |
28398 | #endif | |
28399 | #undef __OPTIMIZE_SIZE__ | |
28400 | #undef __NO_INLINE__ | |
28401 | #include <stdlib.h> | |
28402 | #include <string.h> | |
28403 | ||
28404 | int | |
28405 | main () | |
28406 | { | |
28407 | static const char dummy[] = "\177\01a"; | |
28408 | char delimiters[] = "xxxxxxxx"; | |
28409 | char *save_ptr = (char *) dummy; | |
28410 | strtok_r (delimiters, "x", &save_ptr); | |
28411 | strtok_r (NULL, "x", &save_ptr); | |
28412 | return 0; | |
28413 | ||
28414 | ; | |
28415 | return 0; | |
28416 | } | |
28417 | ||
28418 | _ACEOF | |
28419 | if ac_fn_c_try_run "$LINENO"; then : | |
28420 | gl_cv_func_strtok_r_works=yes | |
28421 | else | |
28422 | gl_cv_func_strtok_r_works=no | |
28423 | fi | |
28424 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28425 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28426 | fi | |
28427 | ||
28428 | ||
28429 | fi | |
28430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5 | |
28431 | $as_echo "$gl_cv_func_strtok_r_works" >&6; } | |
28432 | case "$gl_cv_func_strtok_r_works" in | |
28433 | *no) | |
28434 | UNDEFINE_STRTOK_R=1 | |
28435 | ;; | |
28436 | esac | |
28437 | else | |
28438 | HAVE_STRTOK_R=0 | |
28439 | fi | |
28440 | ||
28441 | if test $ac_cv_have_decl_strtok_r = no; then | |
28442 | HAVE_DECL_STRTOK_R=0 | |
28443 | fi | |
28444 | ||
28445 | if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then | |
28446 | ||
28447 | ||
28448 | ||
28449 | ||
28450 | ||
28451 | ||
28452 | ||
28453 | ||
28454 | gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext" | |
28455 | ||
28456 | ||
28457 | : | |
28458 | ||
28459 | fi | |
28460 | ||
28461 | ||
28462 | ||
28463 | ||
28464 | ||
28465 | GNULIB_STRTOK_R=1 | |
28466 | ||
28467 | ||
28468 | ||
28469 | ||
28470 | ||
28471 | $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h | |
28472 | ||
28473 | ||
28474 | ||
28475 | ||
28476 | ||
28477 | ||
28478 | ||
8690e634 JK |
28479 | |
28480 | ||
28481 | ||
28482 | ||
28483 | ||
8690e634 | 28484 | |
09607c9e | 28485 | |
698be2d8 CB |
28486 | if test $gl_cv_have_include_next = yes; then |
28487 | gl_cv_next_sys_random_h='<'sys/random.h'>' | |
28488 | else | |
28489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5 | |
28490 | $as_echo_n "checking absolute name of <sys/random.h>... " >&6; } | |
28491 | if ${gl_cv_next_sys_random_h+:} false; then : | |
28492 | $as_echo_n "(cached) " >&6 | |
28493 | else | |
28494 | ||
28495 | if test $ac_cv_header_sys_random_h = yes; then | |
28496 | ||
28497 | ||
28498 | ||
28499 | ||
28500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28501 | /* end confdefs.h. */ | |
28502 | #include <sys/random.h> | |
28503 | _ACEOF | |
28504 | case "$host_os" in | |
28505 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28506 | *) gl_absname_cpp="$ac_cpp" ;; | |
28507 | esac | |
28508 | ||
28509 | case "$host_os" in | |
28510 | mingw*) | |
28511 | gl_dirsep_regex='[/\\]' | |
28512 | ;; | |
28513 | *) | |
28514 | gl_dirsep_regex='\/' | |
28515 | ;; | |
28516 | esac | |
28517 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28518 | gl_header_literal_regex=`echo 'sys/random.h' \ | |
28519 | | sed -e "$gl_make_literal_regex_sed"` | |
28520 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28521 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28522 | s|^/[^/]|//&| | |
28523 | p | |
28524 | q | |
28525 | }' | |
28526 | ||
28527 | gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
28528 | sed -n "$gl_absolute_header_sed"` | |
28529 | ||
28530 | gl_header=$gl_cv_absolute_sys_random_h | |
28531 | gl_cv_next_sys_random_h='"'$gl_header'"' | |
28532 | else | |
28533 | gl_cv_next_sys_random_h='<'sys/random.h'>' | |
28534 | fi | |
28535 | ||
28536 | ||
28537 | fi | |
28538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5 | |
28539 | $as_echo "$gl_cv_next_sys_random_h" >&6; } | |
28540 | fi | |
28541 | NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h | |
28542 | ||
28543 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28544 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28545 | gl_next_as_first_directive='<'sys/random.h'>' | |
28546 | else | |
28547 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28548 | gl_next_as_first_directive=$gl_cv_next_sys_random_h | |
28549 | fi | |
28550 | NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive | |
28551 | ||
28552 | ||
28553 | ||
28554 | ||
28555 | if test $ac_cv_header_sys_random_h = yes; then | |
28556 | HAVE_SYS_RANDOM_H=1 | |
28557 | else | |
28558 | HAVE_SYS_RANDOM_H=0 | |
28559 | fi | |
28560 | ||
28561 | ||
28562 | ||
28563 | if test $ac_cv_header_sys_random_h = yes; then | |
28564 | UNISTD_H_HAVE_SYS_RANDOM_H=1 | |
28565 | fi | |
28566 | ||
28567 | ||
28568 | ||
28569 | ||
28570 | ||
28571 | ||
28572 | ||
28573 | ||
28574 | ||
28575 | ||
28576 | ||
28577 | ||
28578 | ||
28579 | ||
28580 | ||
28581 | ||
28582 | ||
725e2999 JB |
28583 | |
28584 | ||
09607c9e TT |
28585 | |
28586 | ||
28587 | ||
28588 | if test $gl_cv_have_include_next = yes; then | |
28589 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
28590 | else | |
28591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
28592 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
d0ac1c44 | 28593 | if ${gl_cv_next_sys_stat_h+:} false; then : |
09607c9e TT |
28594 | $as_echo_n "(cached) " >&6 |
28595 | else | |
28596 | ||
28597 | if test $ac_cv_header_sys_stat_h = yes; then | |
28598 | ||
28599 | ||
4a626d0a PA |
28600 | |
28601 | ||
28602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
09607c9e TT |
28603 | /* end confdefs.h. */ |
28604 | #include <sys/stat.h> | |
09607c9e | 28605 | _ACEOF |
4a626d0a PA |
28606 | case "$host_os" in |
28607 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28608 | *) gl_absname_cpp="$ac_cpp" ;; | |
28609 | esac | |
28610 | ||
28611 | case "$host_os" in | |
28612 | mingw*) | |
28613 | gl_dirsep_regex='[/\\]' | |
28614 | ;; | |
28615 | *) | |
28616 | gl_dirsep_regex='\/' | |
28617 | ;; | |
28618 | esac | |
28619 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28620 | gl_header_literal_regex=`echo 'sys/stat.h' \ | |
28621 | | sed -e "$gl_make_literal_regex_sed"` | |
28622 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28623 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28624 | s|^/[^/]|//&| | |
28625 | p | |
28626 | q | |
28627 | }' | |
28628 | ||
28629 | gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
28630 | sed -n "$gl_absolute_header_sed"` | |
28631 | ||
28632 | gl_header=$gl_cv_absolute_sys_stat_h | |
28633 | gl_cv_next_sys_stat_h='"'$gl_header'"' | |
09607c9e TT |
28634 | else |
28635 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
28636 | fi | |
28637 | ||
28638 | ||
28639 | fi | |
28640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
28641 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
28642 | fi | |
28643 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
28644 | ||
28645 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28646 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28647 | gl_next_as_first_directive='<'sys/stat.h'>' | |
28648 | else | |
28649 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28650 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
28651 | fi | |
28652 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
28653 | ||
28654 | ||
28655 | ||
28656 | ||
28657 | ||
28658 | ||
28659 | ||
28660 | ||
c0c3707f CB |
28661 | WINDOWS_STAT_TIMESPEC=0 |
28662 | ||
28663 | ||
2196f55f | 28664 | |
09607c9e TT |
28665 | |
28666 | ||
09607c9e | 28667 | |
09607c9e | 28668 | |
09607c9e TT |
28669 | |
28670 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> | |
28671 | #include <sys/stat.h> | |
28672 | " | |
d0ac1c44 | 28673 | if test "x$ac_cv_type_nlink_t" = xyes; then : |
09607c9e TT |
28674 | |
28675 | else | |
28676 | ||
c0c3707f | 28677 | $as_echo "#define nlink_t int" >>confdefs.h |
09607c9e | 28678 | |
c0c3707f | 28679 | fi |
09607c9e TT |
28680 | |
28681 | ||
28682 | ||
28683 | ||
28684 | ||
28685 | ||
28686 | ||
28687 | ||
28688 | ||
28689 | ||
725e2999 JB |
28690 | |
28691 | ||
28692 | ||
28693 | ||
28694 | ||
28695 | ||
725e2999 JB |
28696 | |
28697 | ||
28698 | ||
28699 | ||
28700 | ||
698be2d8 CB |
28701 | |
28702 | ||
725e2999 JB |
28703 | |
28704 | ||
28705 | ||
28706 | if test $gl_cv_have_include_next = yes; then | |
28707 | gl_cv_next_sys_uio_h='<'sys/uio.h'>' | |
28708 | else | |
28709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5 | |
28710 | $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; } | |
28711 | if ${gl_cv_next_sys_uio_h+:} false; then : | |
28712 | $as_echo_n "(cached) " >&6 | |
28713 | else | |
28714 | ||
28715 | if test $ac_cv_header_sys_uio_h = yes; then | |
28716 | ||
28717 | ||
28718 | ||
28719 | ||
28720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28721 | /* end confdefs.h. */ | |
28722 | #include <sys/uio.h> | |
28723 | _ACEOF | |
28724 | case "$host_os" in | |
28725 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28726 | *) gl_absname_cpp="$ac_cpp" ;; | |
28727 | esac | |
28728 | ||
28729 | case "$host_os" in | |
28730 | mingw*) | |
28731 | gl_dirsep_regex='[/\\]' | |
28732 | ;; | |
28733 | *) | |
28734 | gl_dirsep_regex='\/' | |
28735 | ;; | |
28736 | esac | |
28737 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28738 | gl_header_literal_regex=`echo 'sys/uio.h' \ | |
28739 | | sed -e "$gl_make_literal_regex_sed"` | |
28740 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28741 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28742 | s|^/[^/]|//&| | |
28743 | p | |
28744 | q | |
28745 | }' | |
28746 | ||
28747 | gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
28748 | sed -n "$gl_absolute_header_sed"` | |
28749 | ||
28750 | gl_header=$gl_cv_absolute_sys_uio_h | |
28751 | gl_cv_next_sys_uio_h='"'$gl_header'"' | |
28752 | else | |
28753 | gl_cv_next_sys_uio_h='<'sys/uio.h'>' | |
28754 | fi | |
28755 | ||
28756 | ||
28757 | fi | |
28758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 | |
28759 | $as_echo "$gl_cv_next_sys_uio_h" >&6; } | |
28760 | fi | |
28761 | NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h | |
28762 | ||
28763 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28764 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28765 | gl_next_as_first_directive='<'sys/uio.h'>' | |
28766 | else | |
28767 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28768 | gl_next_as_first_directive=$gl_cv_next_sys_uio_h | |
28769 | fi | |
28770 | NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive | |
28771 | ||
28772 | ||
28773 | ||
28774 | ||
28775 | if test $ac_cv_header_sys_uio_h = yes; then | |
28776 | HAVE_SYS_UIO_H=1 | |
28777 | else | |
28778 | HAVE_SYS_UIO_H=0 | |
28779 | fi | |
28780 | ||
28781 | ||
28782 | ||
28783 | ||
28784 | ||
2d8adcbd MM |
28785 | : |
28786 | ||
28787 | ||
28788 | ||
28789 | ||
09607c9e TT |
28790 | |
28791 | ||
28792 | ||
8839a007 PA |
28793 | |
28794 | ||
28795 | ||
28796 | ||
09607c9e | 28797 | |
c0c3707f CB |
28798 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r, |
28799 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
28800 | been included before. */ | |
28801 | #if defined __MINGW32__ | |
28802 | # include <unistd.h> | |
28803 | #endif | |
28804 | #include <time.h> | |
09607c9e | 28805 | |
f8e27d88 CB |
28806 | " |
28807 | if test "x$ac_cv_have_decl_localtime_r" = xyes; then : | |
28808 | ac_have_decl=1 | |
28809 | else | |
28810 | ac_have_decl=0 | |
28811 | fi | |
28812 | ||
28813 | cat >>confdefs.h <<_ACEOF | |
28814 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
28815 | _ACEOF | |
28816 | ||
28817 | if test $ac_cv_have_decl_localtime_r = no; then | |
28818 | HAVE_DECL_LOCALTIME_R=0 | |
28819 | fi | |
28820 | ||
28821 | ||
f8e27d88 CB |
28822 | if test $ac_cv_func_localtime_r = yes; then |
28823 | HAVE_LOCALTIME_R=1 | |
28824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
28825 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
28826 | if ${gl_cv_time_r_posix+:} false; then : | |
28827 | $as_echo_n "(cached) " >&6 | |
28828 | else | |
28829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28830 | /* end confdefs.h. */ | |
c0c3707f CB |
28831 | /* mingw's <time.h> provides the functions asctime_r, ctime_r, |
28832 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
28833 | been included before. */ | |
28834 | #if defined __MINGW32__ | |
28835 | # include <unistd.h> | |
28836 | #endif | |
28837 | #include <time.h> | |
28838 | ||
f8e27d88 CB |
28839 | int |
28840 | main () | |
28841 | { | |
28842 | /* We don't need to append 'restrict's to the argument types, | |
28843 | even though the POSIX signature has the 'restrict's, | |
28844 | since C99 says they can't affect type compatibility. */ | |
28845 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
28846 | if (ptr) return 0; | |
28847 | /* Check the return type is a pointer. | |
28848 | On HP-UX 10 it is 'int'. */ | |
28849 | *localtime_r (0, 0); | |
28850 | ; | |
28851 | return 0; | |
28852 | } | |
28853 | ||
28854 | _ACEOF | |
28855 | if ac_fn_c_try_compile "$LINENO"; then : | |
28856 | gl_cv_time_r_posix=yes | |
28857 | else | |
28858 | gl_cv_time_r_posix=no | |
28859 | fi | |
28860 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
28861 | ||
28862 | fi | |
28863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
28864 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
28865 | if test $gl_cv_time_r_posix = yes; then | |
28866 | REPLACE_LOCALTIME_R=0 | |
28867 | else | |
28868 | REPLACE_LOCALTIME_R=1 | |
28869 | fi | |
28870 | else | |
28871 | HAVE_LOCALTIME_R=0 | |
c0c3707f CB |
28872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5 |
28873 | $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; } | |
28874 | if ${gl_cv_func_localtime_r_inline+:} false; then : | |
28875 | $as_echo_n "(cached) " >&6 | |
28876 | else | |
28877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28878 | /* end confdefs.h. */ | |
28879 | /* mingw's <time.h> provides the functions asctime_r, ctime_r, | |
28880 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
28881 | been included before. */ | |
28882 | #if defined __MINGW32__ | |
28883 | # include <unistd.h> | |
28884 | #endif | |
28885 | #include <time.h> | |
28886 | ||
28887 | int | |
28888 | main () | |
28889 | { | |
28890 | time_t a; | |
28891 | struct tm r; | |
28892 | localtime_r (&a, &r); | |
28893 | ||
28894 | ; | |
28895 | return 0; | |
28896 | } | |
28897 | ||
28898 | _ACEOF | |
28899 | if ac_fn_c_try_link "$LINENO"; then : | |
28900 | gl_cv_func_localtime_r_inline=yes | |
28901 | else | |
28902 | gl_cv_func_localtime_r_inline=no | |
28903 | fi | |
28904 | rm -f core conftest.err conftest.$ac_objext \ | |
28905 | conftest$ac_exeext conftest.$ac_ext | |
28906 | ||
28907 | fi | |
28908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5 | |
28909 | $as_echo "$gl_cv_func_localtime_r_inline" >&6; } | |
28910 | if test $gl_cv_func_localtime_r_inline = yes; then | |
28911 | REPLACE_LOCALTIME_R=1 | |
28912 | fi | |
f8e27d88 CB |
28913 | fi |
28914 | ||
28915 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then | |
28916 | ||
28917 | ||
28918 | ||
28919 | ||
28920 | ||
28921 | ||
28922 | ||
28923 | ||
28924 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" | |
28925 | ||
28926 | ||
28927 | : | |
28928 | ||
28929 | fi | |
28930 | ||
28931 | ||
28932 | ||
28933 | ||
28934 | ||
28935 | GNULIB_TIME_R=1 | |
28936 | ||
28937 | ||
28938 | ||
28939 | ||
28940 | ||
28941 | $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h | |
28942 | ||
28943 | ||
28944 | ||
28945 | ||
28946 | ||
28947 | ||
28948 | ||
28949 | ||
28950 | ||
5abebf3c CB |
28951 | |
28952 | ||
28953 | ||
8839a007 PA |
28954 | |
28955 | ||
28956 | ||
28957 | if test $gl_cv_have_include_next = yes; then | |
28958 | gl_cv_next_unistd_h='<'unistd.h'>' | |
28959 | else | |
28960 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
28961 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
d0ac1c44 | 28962 | if ${gl_cv_next_unistd_h+:} false; then : |
8839a007 PA |
28963 | $as_echo_n "(cached) " >&6 |
28964 | else | |
28965 | ||
28966 | if test $ac_cv_header_unistd_h = yes; then | |
28967 | ||
28968 | ||
4a626d0a PA |
28969 | |
28970 | ||
28971 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8839a007 PA |
28972 | /* end confdefs.h. */ |
28973 | #include <unistd.h> | |
8839a007 | 28974 | _ACEOF |
4a626d0a PA |
28975 | case "$host_os" in |
28976 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28977 | *) gl_absname_cpp="$ac_cpp" ;; | |
28978 | esac | |
28979 | ||
28980 | case "$host_os" in | |
28981 | mingw*) | |
28982 | gl_dirsep_regex='[/\\]' | |
28983 | ;; | |
28984 | *) | |
28985 | gl_dirsep_regex='\/' | |
28986 | ;; | |
28987 | esac | |
28988 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28989 | gl_header_literal_regex=`echo 'unistd.h' \ | |
28990 | | sed -e "$gl_make_literal_regex_sed"` | |
28991 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28992 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28993 | s|^/[^/]|//&| | |
28994 | p | |
28995 | q | |
28996 | }' | |
28997 | ||
28998 | gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
28999 | sed -n "$gl_absolute_header_sed"` | |
29000 | ||
29001 | gl_header=$gl_cv_absolute_unistd_h | |
29002 | gl_cv_next_unistd_h='"'$gl_header'"' | |
8839a007 PA |
29003 | else |
29004 | gl_cv_next_unistd_h='<'unistd.h'>' | |
29005 | fi | |
29006 | ||
29007 | ||
29008 | fi | |
29009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 | |
29010 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
29011 | fi | |
29012 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
29013 | ||
29014 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29015 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29016 | gl_next_as_first_directive='<'unistd.h'>' | |
29017 | else | |
29018 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29019 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
29020 | fi | |
29021 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
29022 | ||
29023 | ||
29024 | ||
29025 | ||
29026 | if test $ac_cv_header_unistd_h = yes; then | |
29027 | HAVE_UNISTD_H=1 | |
29028 | else | |
29029 | HAVE_UNISTD_H=0 | |
29030 | fi | |
29031 | ||
29032 | ||
29033 | ||
29034 | ||
29035 | ||
29036 | ||
29037 | ||
472fa5ee SM |
29038 | |
29039 | ||
29040 | ||
29041 | ||
29042 | ||
8839a007 | 29043 | |
6ec2e0f5 SDJ |
29044 | |
29045 | ||
29046 | ||
698be2d8 CB |
29047 | |
29048 | ||
3d99e817 AK |
29049 | if test $ac_cv_have_decl_unsetenv = no; then |
29050 | HAVE_DECL_UNSETENV=0 | |
29051 | fi | |
29052 | for ac_func in unsetenv | |
29053 | do : | |
29054 | ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" | |
d0ac1c44 | 29055 | if test "x$ac_cv_func_unsetenv" = xyes; then : |
3d99e817 AK |
29056 | cat >>confdefs.h <<_ACEOF |
29057 | #define HAVE_UNSETENV 1 | |
29058 | _ACEOF | |
29059 | ||
29060 | fi | |
29061 | done | |
29062 | ||
29063 | if test $ac_cv_func_unsetenv = no; then | |
29064 | HAVE_UNSETENV=0 | |
29065 | else | |
29066 | HAVE_UNSETENV=1 | |
29067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 | |
29068 | $as_echo_n "checking for unsetenv() return type... " >&6; } | |
d0ac1c44 | 29069 | if ${gt_cv_func_unsetenv_ret+:} false; then : |
3d99e817 AK |
29070 | $as_echo_n "(cached) " >&6 |
29071 | else | |
29072 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29073 | /* end confdefs.h. */ | |
29074 | ||
29075 | #undef _BSD | |
29076 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | |
29077 | #include <stdlib.h> | |
29078 | extern | |
29079 | #ifdef __cplusplus | |
29080 | "C" | |
29081 | #endif | |
29082 | int unsetenv (const char *name); | |
29083 | ||
29084 | int | |
29085 | main () | |
29086 | { | |
29087 | ||
29088 | ; | |
29089 | return 0; | |
29090 | } | |
29091 | _ACEOF | |
29092 | if ac_fn_c_try_compile "$LINENO"; then : | |
29093 | gt_cv_func_unsetenv_ret='int' | |
29094 | else | |
29095 | gt_cv_func_unsetenv_ret='void' | |
29096 | fi | |
29097 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
29098 | fi | |
29099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 | |
29100 | $as_echo "$gt_cv_func_unsetenv_ret" >&6; } | |
29101 | if test $gt_cv_func_unsetenv_ret = 'void'; then | |
29102 | ||
29103 | $as_echo "#define VOID_UNSETENV 1" >>confdefs.h | |
29104 | ||
29105 | REPLACE_UNSETENV=1 | |
29106 | fi | |
29107 | ||
29108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 | |
29109 | $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } | |
d0ac1c44 | 29110 | if ${gl_cv_func_unsetenv_works+:} false; then : |
3d99e817 AK |
29111 | $as_echo_n "(cached) " >&6 |
29112 | else | |
29113 | if test "$cross_compiling" = yes; then : | |
29114 | case "$host_os" in | |
29115 | # Guess yes on glibc systems. | |
29116 | *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; | |
c0c3707f CB |
29117 | # If we don't know, obey --enable-cross-guesses. |
29118 | *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;; | |
3d99e817 AK |
29119 | esac |
29120 | ||
29121 | else | |
29122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29123 | /* end confdefs.h. */ | |
29124 | ||
29125 | #include <stdlib.h> | |
29126 | #include <errno.h> | |
29127 | extern char **environ; | |
29128 | ||
29129 | int | |
29130 | main () | |
29131 | { | |
29132 | ||
29133 | char entry1[] = "a=1"; | |
29134 | char entry2[] = "b=2"; | |
29135 | char *env[] = { entry1, entry2, NULL }; | |
29136 | if (putenv ((char *) "a=1")) return 1; | |
29137 | if (putenv (entry2)) return 2; | |
29138 | entry2[0] = 'a'; | |
29139 | unsetenv ("a"); | |
29140 | if (getenv ("a")) return 3; | |
29141 | if (!unsetenv ("") || errno != EINVAL) return 4; | |
29142 | entry2[0] = 'b'; | |
29143 | environ = env; | |
29144 | if (!getenv ("a")) return 5; | |
29145 | entry2[0] = 'a'; | |
29146 | unsetenv ("a"); | |
29147 | if (getenv ("a")) return 6; | |
29148 | ||
29149 | ; | |
29150 | return 0; | |
29151 | } | |
29152 | _ACEOF | |
29153 | if ac_fn_c_try_run "$LINENO"; then : | |
29154 | gl_cv_func_unsetenv_works=yes | |
29155 | else | |
29156 | gl_cv_func_unsetenv_works=no | |
29157 | fi | |
29158 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
29159 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
29160 | fi | |
29161 | ||
29162 | fi | |
29163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 | |
29164 | $as_echo "$gl_cv_func_unsetenv_works" >&6; } | |
29165 | case "$gl_cv_func_unsetenv_works" in | |
29166 | *yes) ;; | |
29167 | *) | |
29168 | REPLACE_UNSETENV=1 | |
29169 | ;; | |
29170 | esac | |
29171 | fi | |
29172 | ||
29173 | if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then | |
29174 | ||
29175 | ||
29176 | ||
29177 | ||
29178 | ||
29179 | ||
29180 | ||
29181 | ||
29182 | gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" | |
29183 | ||
29184 | ||
29185 | ||
29186 | ||
29187 | ||
29188 | fi | |
29189 | ||
29190 | ||
29191 | ||
29192 | ||
29193 | ||
29194 | GNULIB_UNSETENV=1 | |
29195 | ||
29196 | ||
29197 | ||
29198 | ||
29199 | ||
29200 | $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h | |
29201 | ||
29202 | ||
29203 | ||
29204 | ||
29205 | ||
29206 | ||
8839a007 PA |
29207 | |
29208 | ||
29209 | ||
29210 | ||
29211 | ||
29212 | ||
29213 | ||
8690e634 JK |
29214 | |
29215 | ||
29216 | if test $gl_cv_have_include_next = yes; then | |
29217 | gl_cv_next_wchar_h='<'wchar.h'>' | |
29218 | else | |
29219 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 | |
29220 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
d0ac1c44 | 29221 | if ${gl_cv_next_wchar_h+:} false; then : |
8690e634 JK |
29222 | $as_echo_n "(cached) " >&6 |
29223 | else | |
29224 | ||
29225 | if test $ac_cv_header_wchar_h = yes; then | |
29226 | ||
29227 | ||
4a626d0a PA |
29228 | |
29229 | ||
29230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
29231 | /* end confdefs.h. */ |
29232 | #include <wchar.h> | |
8690e634 | 29233 | _ACEOF |
4a626d0a PA |
29234 | case "$host_os" in |
29235 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29236 | *) gl_absname_cpp="$ac_cpp" ;; | |
29237 | esac | |
29238 | ||
29239 | case "$host_os" in | |
29240 | mingw*) | |
29241 | gl_dirsep_regex='[/\\]' | |
29242 | ;; | |
29243 | *) | |
29244 | gl_dirsep_regex='\/' | |
29245 | ;; | |
29246 | esac | |
29247 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29248 | gl_header_literal_regex=`echo 'wchar.h' \ | |
29249 | | sed -e "$gl_make_literal_regex_sed"` | |
29250 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29251 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29252 | s|^/[^/]|//&| | |
29253 | p | |
29254 | q | |
29255 | }' | |
29256 | ||
29257 | gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29258 | sed -n "$gl_absolute_header_sed"` | |
29259 | ||
29260 | gl_header=$gl_cv_absolute_wchar_h | |
29261 | gl_cv_next_wchar_h='"'$gl_header'"' | |
8690e634 JK |
29262 | else |
29263 | gl_cv_next_wchar_h='<'wchar.h'>' | |
29264 | fi | |
29265 | ||
29266 | ||
29267 | fi | |
29268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 | |
29269 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
29270 | fi | |
29271 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
29272 | ||
29273 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29274 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29275 | gl_next_as_first_directive='<'wchar.h'>' | |
29276 | else | |
29277 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29278 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
29279 | fi | |
29280 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
29281 | ||
29282 | ||
29283 | ||
29284 | ||
29285 | if test $ac_cv_header_wchar_h = yes; then | |
29286 | HAVE_WCHAR_H=1 | |
29287 | else | |
29288 | HAVE_WCHAR_H=0 | |
29289 | fi | |
29290 | ||
c971b7fa PA |
29291 | |
29292 | ||
29293 | ||
29294 | ||
8690e634 JK |
29295 | if test $gt_cv_c_wint_t = yes; then |
29296 | HAVE_WINT_T=1 | |
29297 | else | |
29298 | HAVE_WINT_T=0 | |
29299 | fi | |
c971b7fa PA |
29300 | |
29301 | ||
29302 | ||
8690e634 JK |
29303 | |
29304 | ||
29305 | ||
29306 | ||
29307 | ||
472fa5ee SM |
29308 | |
29309 | ||
29310 | ||
29311 | ||
29312 | ||
698be2d8 CB |
29313 | |
29314 | ||
8690e634 JK |
29315 | if test $ac_cv_func_iswcntrl = yes; then |
29316 | HAVE_ISWCNTRL=1 | |
29317 | else | |
29318 | HAVE_ISWCNTRL=0 | |
29319 | fi | |
29320 | ||
29321 | ||
29322 | ||
8690e634 JK |
29323 | if test $gt_cv_c_wint_t = yes; then |
29324 | HAVE_WINT_T=1 | |
29325 | else | |
29326 | HAVE_WINT_T=0 | |
29327 | fi | |
29328 | ||
29329 | ||
29330 | ||
29331 | ||
29332 | ||
29333 | ||
c971b7fa | 29334 | |
8690e634 | 29335 | |
472fa5ee SM |
29336 | |
29337 | ||
c971b7fa PA |
29338 | |
29339 | ||
29340 | ||
29341 | if test $gl_cv_have_include_next = yes; then | |
8690e634 | 29342 | gl_cv_next_wctype_h='<'wctype.h'>' |
c971b7fa | 29343 | else |
8690e634 JK |
29344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5 |
29345 | $as_echo_n "checking absolute name of <wctype.h>... " >&6; } | |
d0ac1c44 | 29346 | if ${gl_cv_next_wctype_h+:} false; then : |
c971b7fa PA |
29347 | $as_echo_n "(cached) " >&6 |
29348 | else | |
29349 | ||
8690e634 JK |
29350 | if test $ac_cv_header_wctype_h = yes; then |
29351 | ||
29352 | ||
4a626d0a PA |
29353 | |
29354 | ||
29355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa | 29356 | /* end confdefs.h. */ |
8690e634 | 29357 | #include <wctype.h> |
c971b7fa | 29358 | _ACEOF |
4a626d0a PA |
29359 | case "$host_os" in |
29360 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29361 | *) gl_absname_cpp="$ac_cpp" ;; | |
29362 | esac | |
29363 | ||
29364 | case "$host_os" in | |
29365 | mingw*) | |
29366 | gl_dirsep_regex='[/\\]' | |
29367 | ;; | |
29368 | *) | |
29369 | gl_dirsep_regex='\/' | |
29370 | ;; | |
29371 | esac | |
29372 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29373 | gl_header_literal_regex=`echo 'wctype.h' \ | |
29374 | | sed -e "$gl_make_literal_regex_sed"` | |
29375 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29376 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29377 | s|^/[^/]|//&| | |
29378 | p | |
29379 | q | |
29380 | }' | |
29381 | ||
29382 | gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29383 | sed -n "$gl_absolute_header_sed"` | |
29384 | ||
29385 | gl_header=$gl_cv_absolute_wctype_h | |
29386 | gl_cv_next_wctype_h='"'$gl_header'"' | |
8690e634 JK |
29387 | else |
29388 | gl_cv_next_wctype_h='<'wctype.h'>' | |
29389 | fi | |
c971b7fa PA |
29390 | |
29391 | ||
29392 | fi | |
8690e634 JK |
29393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 |
29394 | $as_echo "$gl_cv_next_wctype_h" >&6; } | |
c971b7fa | 29395 | fi |
8690e634 | 29396 | NEXT_WCTYPE_H=$gl_cv_next_wctype_h |
c971b7fa PA |
29397 | |
29398 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29399 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
8690e634 | 29400 | gl_next_as_first_directive='<'wctype.h'>' |
c971b7fa PA |
29401 | else |
29402 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
8690e634 | 29403 | gl_next_as_first_directive=$gl_cv_next_wctype_h |
c971b7fa | 29404 | fi |
8690e634 JK |
29405 | NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive |
29406 | ||
29407 | ||
29408 | ||
29409 | ||
29410 | if test $ac_cv_header_wctype_h = yes; then | |
29411 | if test $ac_cv_func_iswcntrl = yes; then | |
29412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 | |
29413 | $as_echo_n "checking whether iswcntrl works... " >&6; } | |
d0ac1c44 | 29414 | if ${gl_cv_func_iswcntrl_works+:} false; then : |
8690e634 JK |
29415 | $as_echo_n "(cached) " >&6 |
29416 | else | |
29417 | ||
29418 | if test "$cross_compiling" = yes; then : | |
c0c3707f | 29419 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 JK |
29420 | /* end confdefs.h. */ |
29421 | #include <stdlib.h> | |
29422 | #if __GNU_LIBRARY__ == 1 | |
29423 | Linux libc5 i18n is broken. | |
29424 | #endif | |
29425 | int | |
29426 | main () | |
29427 | { | |
29428 | ||
29429 | ; | |
29430 | return 0; | |
29431 | } | |
29432 | _ACEOF | |
29433 | if ac_fn_c_try_compile "$LINENO"; then : | |
29434 | gl_cv_func_iswcntrl_works="guessing yes" | |
29435 | else | |
29436 | gl_cv_func_iswcntrl_works="guessing no" | |
29437 | fi | |
29438 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
29439 | ||
29440 | else | |
29441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29442 | /* end confdefs.h. */ | |
29443 | ||
29444 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be | |
29445 | included before <wchar.h>. | |
29446 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> | |
29447 | must be included before <wchar.h>. */ | |
29448 | #include <stddef.h> | |
29449 | #include <stdio.h> | |
29450 | #include <time.h> | |
29451 | #include <wchar.h> | |
29452 | #include <wctype.h> | |
29453 | int main () { return iswprint ('x') == 0; } | |
29454 | ||
29455 | _ACEOF | |
29456 | if ac_fn_c_try_run "$LINENO"; then : | |
29457 | gl_cv_func_iswcntrl_works=yes | |
29458 | else | |
29459 | gl_cv_func_iswcntrl_works=no | |
29460 | fi | |
29461 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
29462 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
29463 | fi | |
29464 | ||
29465 | ||
29466 | fi | |
29467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 | |
29468 | $as_echo "$gl_cv_func_iswcntrl_works" >&6; } | |
29469 | fi | |
29470 | HAVE_WCTYPE_H=1 | |
29471 | else | |
29472 | HAVE_WCTYPE_H=0 | |
29473 | fi | |
29474 | ||
29475 | ||
c0c3707f CB |
29476 | if test $GNULIB_OVERRIDES_WINT_T = 1; then |
29477 | REPLACE_ISWCNTRL=1 | |
29478 | else | |
29479 | case "$gl_cv_func_iswcntrl_works" in | |
29480 | *yes) REPLACE_ISWCNTRL=0 ;; | |
29481 | *) REPLACE_ISWCNTRL=1 ;; | |
29482 | esac | |
29483 | fi | |
8690e634 JK |
29484 | |
29485 | ||
29486 | if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then | |
29487 | : | |
29488 | fi | |
29489 | ||
29490 | if test $REPLACE_ISWCNTRL = 1; then | |
29491 | REPLACE_TOWLOWER=1 | |
29492 | else | |
29493 | for ac_func in towlower | |
29494 | do : | |
29495 | ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" | |
d0ac1c44 | 29496 | if test "x$ac_cv_func_towlower" = xyes; then : |
8690e634 JK |
29497 | cat >>confdefs.h <<_ACEOF |
29498 | #define HAVE_TOWLOWER 1 | |
29499 | _ACEOF | |
29500 | ||
29501 | fi | |
29502 | done | |
29503 | ||
29504 | if test $ac_cv_func_towlower = yes; then | |
29505 | REPLACE_TOWLOWER=0 | |
29506 | else | |
29507 | ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be | |
29508 | included before <wchar.h>. | |
29509 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> | |
29510 | must be included before <wchar.h>. */ | |
29511 | #include <stddef.h> | |
29512 | #include <stdio.h> | |
29513 | #include <time.h> | |
29514 | #include <wchar.h> | |
29515 | #if HAVE_WCTYPE_H | |
29516 | # include <wctype.h> | |
29517 | #endif | |
29518 | ||
29519 | " | |
d0ac1c44 | 29520 | if test "x$ac_cv_have_decl_towlower" = xyes; then : |
8690e634 JK |
29521 | ac_have_decl=1 |
29522 | else | |
29523 | ac_have_decl=0 | |
29524 | fi | |
29525 | ||
29526 | cat >>confdefs.h <<_ACEOF | |
29527 | #define HAVE_DECL_TOWLOWER $ac_have_decl | |
29528 | _ACEOF | |
29529 | ||
29530 | if test $ac_cv_have_decl_towlower = yes; then | |
29531 | REPLACE_TOWLOWER=1 | |
29532 | else | |
29533 | REPLACE_TOWLOWER=0 | |
29534 | fi | |
29535 | fi | |
29536 | fi | |
29537 | ||
29538 | ||
29539 | if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then | |
29540 | : | |
29541 | fi | |
29542 | ||
29543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 | |
29544 | $as_echo_n "checking for wctype_t... " >&6; } | |
d0ac1c44 | 29545 | if ${gl_cv_type_wctype_t+:} false; then : |
8690e634 JK |
29546 | $as_echo_n "(cached) " >&6 |
29547 | else | |
29548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29549 | /* end confdefs.h. */ | |
29550 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be | |
29551 | included before <wchar.h>. | |
29552 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> | |
29553 | must be included before <wchar.h>. */ | |
29554 | #include <stddef.h> | |
29555 | #include <stdio.h> | |
29556 | #include <time.h> | |
29557 | #include <wchar.h> | |
29558 | #if HAVE_WCTYPE_H | |
29559 | # include <wctype.h> | |
29560 | #endif | |
29561 | wctype_t a; | |
29562 | ||
29563 | int | |
29564 | main () | |
29565 | { | |
29566 | ||
29567 | ; | |
29568 | return 0; | |
29569 | } | |
29570 | _ACEOF | |
29571 | if ac_fn_c_try_compile "$LINENO"; then : | |
29572 | gl_cv_type_wctype_t=yes | |
29573 | else | |
29574 | gl_cv_type_wctype_t=no | |
29575 | fi | |
29576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 29577 | |
8690e634 JK |
29578 | fi |
29579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 | |
29580 | $as_echo "$gl_cv_type_wctype_t" >&6; } | |
29581 | if test $gl_cv_type_wctype_t = no; then | |
29582 | HAVE_WCTYPE_T=0 | |
29583 | fi | |
29584 | ||
29585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 | |
29586 | $as_echo_n "checking for wctrans_t... " >&6; } | |
d0ac1c44 | 29587 | if ${gl_cv_type_wctrans_t+:} false; then : |
8690e634 JK |
29588 | $as_echo_n "(cached) " >&6 |
29589 | else | |
29590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29591 | /* end confdefs.h. */ | |
29592 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be | |
29593 | included before <wchar.h>. | |
29594 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> | |
29595 | must be included before <wchar.h>. */ | |
29596 | #include <stddef.h> | |
29597 | #include <stdio.h> | |
29598 | #include <time.h> | |
29599 | #include <wchar.h> | |
29600 | #include <wctype.h> | |
29601 | wctrans_t a; | |
c971b7fa | 29602 | |
8690e634 JK |
29603 | int |
29604 | main () | |
29605 | { | |
c971b7fa | 29606 | |
8690e634 JK |
29607 | ; |
29608 | return 0; | |
29609 | } | |
29610 | _ACEOF | |
29611 | if ac_fn_c_try_compile "$LINENO"; then : | |
29612 | gl_cv_type_wctrans_t=yes | |
29613 | else | |
29614 | gl_cv_type_wctrans_t=no | |
29615 | fi | |
29616 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 29617 | |
8690e634 JK |
29618 | fi |
29619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 | |
29620 | $as_echo "$gl_cv_type_wctrans_t" >&6; } | |
29621 | if test $gl_cv_type_wctrans_t = no; then | |
29622 | HAVE_WCTRANS_T=0 | |
c971b7fa PA |
29623 | fi |
29624 | ||
29625 | ||
5e8754f9 | 29626 | |
5e8754f9 | 29627 | |
c971b7fa | 29628 | |
c0c3707f CB |
29629 | |
29630 | case "$host_os" in | |
29631 | mingw*) | |
29632 | ||
29633 | ||
29634 | ||
29635 | ||
29636 | ||
29637 | ||
29638 | ||
29639 | ||
29640 | gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext" | |
29641 | ||
29642 | ;; | |
29643 | esac | |
29644 | ||
29645 | case "$host_os" in | |
29646 | mingw*) | |
29647 | ||
29648 | ||
29649 | ||
29650 | ||
29651 | ||
29652 | ||
29653 | ||
29654 | ||
29655 | gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext" | |
29656 | ||
29657 | ;; | |
29658 | esac | |
29659 | ||
29660 | case "$host_os" in | |
29661 | mingw*) | |
29662 | ||
29663 | ||
c971b7fa PA |
29664 | |
29665 | ||
c0c3707f CB |
29666 | |
29667 | ||
29668 | ||
29669 | ||
29670 | gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext" | |
29671 | ||
29672 | ;; | |
29673 | esac | |
29674 | ||
29675 | case "$host_os" in | |
29676 | mingw*) | |
29677 | ||
29678 | ||
29679 | ||
29680 | ||
29681 | ||
29682 | ||
29683 | ||
29684 | ||
29685 | gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext" | |
29686 | ||
29687 | ;; | |
29688 | esac | |
698be2d8 CB |
29689 | |
29690 | ||
29691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5 | |
29692 | $as_echo_n "checking for wmemchr... " >&6; } | |
29693 | if ${gl_cv_func_wmemchr+:} false; then : | |
29694 | $as_echo_n "(cached) " >&6 | |
29695 | else | |
29696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29697 | /* end confdefs.h. */ | |
29698 | ||
29699 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | |
29700 | <wchar.h>. | |
29701 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
29702 | before <wchar.h>. */ | |
29703 | #include <stddef.h> | |
29704 | #include <stdio.h> | |
29705 | #include <time.h> | |
29706 | #include <wchar.h> | |
29707 | ||
29708 | int | |
29709 | main () | |
29710 | { | |
29711 | return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0); | |
29712 | ; | |
29713 | return 0; | |
29714 | } | |
29715 | ||
29716 | _ACEOF | |
29717 | if ac_fn_c_try_link "$LINENO"; then : | |
29718 | gl_cv_func_wmemchr=yes | |
29719 | else | |
29720 | gl_cv_func_wmemchr=no | |
29721 | fi | |
29722 | rm -f core conftest.err conftest.$ac_objext \ | |
29723 | conftest$ac_exeext conftest.$ac_ext | |
29724 | ||
29725 | fi | |
29726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5 | |
29727 | $as_echo "$gl_cv_func_wmemchr" >&6; } | |
29728 | if test $gl_cv_func_wmemchr = no; then | |
29729 | HAVE_WMEMCHR=0 | |
29730 | fi | |
29731 | ||
29732 | if test $HAVE_WMEMCHR = 0; then | |
29733 | ||
29734 | ||
29735 | ||
29736 | ||
29737 | ||
29738 | ||
29739 | ||
29740 | ||
29741 | gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext" | |
29742 | ||
29743 | fi | |
29744 | ||
29745 | ||
29746 | ||
29747 | ||
29748 | ||
29749 | GNULIB_WMEMCHR=1 | |
29750 | ||
29751 | ||
29752 | ||
29753 | ||
29754 | ||
29755 | $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h | |
29756 | ||
29757 | ||
29758 | ||
29759 | ||
29760 | ||
29761 | ||
29762 | ||
29763 | ||
29764 | ||
29765 | ||
29766 | ||
29767 | if test $ac_cv_func_wmempcpy = no; then | |
29768 | HAVE_WMEMPCPY=0 | |
29769 | fi | |
29770 | ||
29771 | if test $HAVE_WMEMPCPY = 0; then | |
29772 | ||
29773 | ||
29774 | ||
29775 | ||
29776 | ||
29777 | ||
29778 | ||
29779 | ||
29780 | gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext" | |
29781 | ||
29782 | fi | |
29783 | ||
29784 | ||
29785 | ||
29786 | ||
29787 | ||
29788 | GNULIB_WMEMPCPY=1 | |
29789 | ||
29790 | ||
29791 | ||
29792 | ||
29793 | ||
29794 | $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h | |
29795 | ||
29796 | ||
29797 | ||
c971b7fa PA |
29798 | # End of code from modules |
29799 | ||
29800 | ||
29801 | ||
29802 | ||
29803 | ||
29804 | ||
29805 | ||
29806 | ||
29807 | ||
29808 | gltests_libdeps= | |
29809 | gltests_ltlibdeps= | |
29810 | ||
29811 | ||
29812 | ||
29813 | ||
29814 | ||
29815 | ||
29816 | ||
29817 | ||
29818 | ||
5df4cba6 | 29819 | |
c971b7fa PA |
29820 | gl_source_base='tests' |
29821 | gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS | |
29822 | ||
29823 | gl_module_indicator_condition=$gltests_WITNESS | |
29824 | ||
29825 | ||
29826 | ||
29827 | ||
29828 | ||
29829 | ||
29830 | ||
29831 | ||
29832 | ||
29833 | LIBGNU_LIBDEPS="$gl_libdeps" | |
29834 | ||
29835 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
29836 | ||
29837 | ||
29838 | ||
d0ac1c44 | 29839 | am__api_version='1.15' |
c971b7fa PA |
29840 | |
29841 | # Find a good install program. We prefer a C program (faster), | |
29842 | # so one script is as good as another. But avoid the broken or | |
29843 | # incompatible versions: | |
29844 | # SysV /etc/install, /usr/sbin/install | |
29845 | # SunOS /usr/etc/install | |
29846 | # IRIX /sbin/install | |
29847 | # AIX /bin/install | |
29848 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
29849 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
29850 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
29851 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
29852 | # OS/2's system install, which has a completely different semantic | |
29853 | # ./install, which can be erroneously created by make from ./install.sh. | |
29854 | # Reject install programs that cannot install multiple files. | |
29855 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
29856 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
29857 | if test -z "$INSTALL"; then | |
d0ac1c44 | 29858 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
29859 | $as_echo_n "(cached) " >&6 |
29860 | else | |
29861 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
29862 | for as_dir in $PATH | |
29863 | do | |
29864 | IFS=$as_save_IFS | |
29865 | test -z "$as_dir" && as_dir=. | |
29866 | # Account for people who put trailing slashes in PATH elements. | |
29867 | case $as_dir/ in #(( | |
29868 | ./ | .// | /[cC]/* | \ | |
29869 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
29870 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
29871 | /usr/ucb/* ) ;; | |
29872 | *) | |
29873 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
29874 | # Don't use installbsd from OSF since it installs stuff as root | |
29875 | # by default. | |
29876 | for ac_prog in ginstall scoinst install; do | |
29877 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 29878 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
29879 | if test $ac_prog = install && |
29880 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
29881 | # AIX install. It has an incompatible calling convention. | |
29882 | : | |
29883 | elif test $ac_prog = install && | |
29884 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
29885 | # program-specific install script used by HP pwplus--don't use. | |
29886 | : | |
29887 | else | |
29888 | rm -rf conftest.one conftest.two conftest.dir | |
29889 | echo one > conftest.one | |
29890 | echo two > conftest.two | |
29891 | mkdir conftest.dir | |
29892 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
29893 | test -s conftest.one && test -s conftest.two && | |
29894 | test -s conftest.dir/conftest.one && | |
29895 | test -s conftest.dir/conftest.two | |
29896 | then | |
29897 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
29898 | break 3 | |
29899 | fi | |
29900 | fi | |
29901 | fi | |
29902 | done | |
29903 | done | |
29904 | ;; | |
29905 | esac | |
29906 | ||
29907 | done | |
29908 | IFS=$as_save_IFS | |
29909 | ||
29910 | rm -rf conftest.one conftest.two conftest.dir | |
29911 | ||
29912 | fi | |
29913 | if test "${ac_cv_path_install+set}" = set; then | |
29914 | INSTALL=$ac_cv_path_install | |
29915 | else | |
29916 | # As a last resort, use the slow shell script. Don't cache a | |
29917 | # value for INSTALL within a source directory, because that will | |
29918 | # break other packages using the cache if that directory is | |
29919 | # removed, or if the value is a relative name. | |
29920 | INSTALL=$ac_install_sh | |
29921 | fi | |
29922 | fi | |
29923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
29924 | $as_echo "$INSTALL" >&6; } | |
29925 | ||
29926 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
29927 | # It thinks the first close brace ends the variable substitution. | |
29928 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
29929 | ||
29930 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
29931 | ||
29932 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
29933 | ||
29934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 | |
29935 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
c971b7fa PA |
29936 | # Reject unsafe characters in $srcdir or the absolute working directory |
29937 | # name. Accept space and tab only in the latter. | |
29938 | am_lf=' | |
29939 | ' | |
29940 | case `pwd` in | |
29941 | *[\\\"\#\$\&\'\`$am_lf]*) | |
d0ac1c44 | 29942 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; |
c971b7fa PA |
29943 | esac |
29944 | case $srcdir in | |
29945 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
d0ac1c44 | 29946 | as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; |
c971b7fa PA |
29947 | esac |
29948 | ||
d0ac1c44 | 29949 | # Do 'set' in a subshell so we don't clobber the current shell's |
c971b7fa PA |
29950 | # arguments. Must try -L first in case configure is actually a |
29951 | # symlink; some systems play weird games with the mod time of symlinks | |
29952 | # (eg FreeBSD returns the mod time of the symlink's containing | |
29953 | # directory). | |
29954 | if ( | |
d0ac1c44 SM |
29955 | am_has_slept=no |
29956 | for am_try in 1 2; do | |
29957 | echo "timestamp, slept: $am_has_slept" > conftest.file | |
29958 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
29959 | if test "$*" = "X"; then | |
29960 | # -L didn't work. | |
29961 | set X `ls -t "$srcdir/configure" conftest.file` | |
29962 | fi | |
29963 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
29964 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
29965 | ||
29966 | # If neither matched, then we have a broken ls. This can happen | |
29967 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
29968 | # broken ls alias from the environment. This has actually | |
29969 | # happened. Such a system could not be considered "sane". | |
29970 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
29971 | alias in your environment" "$LINENO" 5 | |
29972 | fi | |
29973 | if test "$2" = conftest.file || test $am_try -eq 2; then | |
29974 | break | |
29975 | fi | |
29976 | # Just in case. | |
29977 | sleep 1 | |
29978 | am_has_slept=yes | |
29979 | done | |
c971b7fa PA |
29980 | test "$2" = conftest.file |
29981 | ) | |
29982 | then | |
29983 | # Ok. | |
29984 | : | |
29985 | else | |
d0ac1c44 | 29986 | as_fn_error $? "newly created file is older than distributed files! |
c971b7fa PA |
29987 | Check your system clock" "$LINENO" 5 |
29988 | fi | |
29989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
29990 | $as_echo "yes" >&6; } | |
d0ac1c44 SM |
29991 | # If we didn't sleep, we still need to ensure time stamps of config.status and |
29992 | # generated files are strictly newer. | |
29993 | am_sleep_pid= | |
29994 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
29995 | ( sleep 1 ) & | |
29996 | am_sleep_pid=$! | |
29997 | fi | |
29998 | ||
29999 | rm -f conftest.file | |
30000 | ||
c971b7fa PA |
30001 | test "$program_prefix" != NONE && |
30002 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
30003 | # Use a double $ so make ignores it. | |
30004 | test "$program_suffix" != NONE && | |
30005 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
30006 | # Double any \ or $. | |
30007 | # By default was `s,x,x', remove it if useless. | |
30008 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
30009 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
30010 | ||
c0c3707f CB |
30011 | # Expand $ac_aux_dir to an absolute path. |
30012 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
30013 | ||
c971b7fa PA |
30014 | if test x"${MISSING+set}" != xset; then |
30015 | case $am_aux_dir in | |
30016 | *\ * | *\ *) | |
30017 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
30018 | *) | |
30019 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
30020 | esac | |
30021 | fi | |
30022 | # Use eval to expand $SHELL | |
d0ac1c44 SM |
30023 | if eval "$MISSING --is-lightweight"; then |
30024 | am_missing_run="$MISSING " | |
c971b7fa PA |
30025 | else |
30026 | am_missing_run= | |
d0ac1c44 SM |
30027 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 |
30028 | $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} | |
c971b7fa PA |
30029 | fi |
30030 | ||
d0ac1c44 | 30031 | if test x"${install_sh+set}" != xset; then |
c971b7fa PA |
30032 | case $am_aux_dir in |
30033 | *\ * | *\ *) | |
30034 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
30035 | *) | |
30036 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
30037 | esac | |
30038 | fi | |
30039 | ||
d0ac1c44 SM |
30040 | # Installed binaries are usually stripped using 'strip' when the user |
30041 | # run "make install-strip". However 'strip' might not be the right | |
c971b7fa | 30042 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 30043 | # will honor the 'STRIP' environment variable to overrule this program. |
c971b7fa PA |
30044 | if test "$cross_compiling" != no; then |
30045 | if test -n "$ac_tool_prefix"; then | |
30046 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
30047 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
30048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30049 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30050 | if ${ac_cv_prog_STRIP+:} false; then : |
c971b7fa PA |
30051 | $as_echo_n "(cached) " >&6 |
30052 | else | |
30053 | if test -n "$STRIP"; then | |
30054 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
30055 | else | |
30056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30057 | for as_dir in $PATH | |
30058 | do | |
30059 | IFS=$as_save_IFS | |
30060 | test -z "$as_dir" && as_dir=. | |
30061 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30062 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30063 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
30064 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30065 | break 2 | |
30066 | fi | |
30067 | done | |
30068 | done | |
30069 | IFS=$as_save_IFS | |
30070 | ||
30071 | fi | |
30072 | fi | |
30073 | STRIP=$ac_cv_prog_STRIP | |
30074 | if test -n "$STRIP"; then | |
30075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
30076 | $as_echo "$STRIP" >&6; } | |
30077 | else | |
30078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30079 | $as_echo "no" >&6; } | |
30080 | fi | |
30081 | ||
30082 | ||
30083 | fi | |
30084 | if test -z "$ac_cv_prog_STRIP"; then | |
30085 | ac_ct_STRIP=$STRIP | |
30086 | # Extract the first word of "strip", so it can be a program name with args. | |
30087 | set dummy strip; ac_word=$2 | |
30088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30089 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30090 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
c971b7fa PA |
30091 | $as_echo_n "(cached) " >&6 |
30092 | else | |
30093 | if test -n "$ac_ct_STRIP"; then | |
30094 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
30095 | else | |
30096 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30097 | for as_dir in $PATH | |
30098 | do | |
30099 | IFS=$as_save_IFS | |
30100 | test -z "$as_dir" && as_dir=. | |
30101 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30102 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30103 | ac_cv_prog_ac_ct_STRIP="strip" |
30104 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30105 | break 2 | |
30106 | fi | |
30107 | done | |
30108 | done | |
30109 | IFS=$as_save_IFS | |
30110 | ||
30111 | fi | |
30112 | fi | |
30113 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
30114 | if test -n "$ac_ct_STRIP"; then | |
30115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
30116 | $as_echo "$ac_ct_STRIP" >&6; } | |
30117 | else | |
30118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30119 | $as_echo "no" >&6; } | |
30120 | fi | |
30121 | ||
30122 | if test "x$ac_ct_STRIP" = x; then | |
30123 | STRIP=":" | |
30124 | else | |
30125 | case $cross_compiling:$ac_tool_warned in | |
30126 | yes:) | |
30127 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
30128 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
30129 | ac_tool_warned=yes ;; | |
30130 | esac | |
30131 | STRIP=$ac_ct_STRIP | |
30132 | fi | |
30133 | else | |
30134 | STRIP="$ac_cv_prog_STRIP" | |
30135 | fi | |
30136 | ||
30137 | fi | |
30138 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
30139 | ||
c971b7fa PA |
30140 | for ac_prog in gawk mawk nawk awk |
30141 | do | |
30142 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
30143 | set dummy $ac_prog; ac_word=$2 | |
30144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30145 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30146 | if ${ac_cv_prog_AWK+:} false; then : |
c971b7fa PA |
30147 | $as_echo_n "(cached) " >&6 |
30148 | else | |
30149 | if test -n "$AWK"; then | |
30150 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
30151 | else | |
30152 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30153 | for as_dir in $PATH | |
30154 | do | |
30155 | IFS=$as_save_IFS | |
30156 | test -z "$as_dir" && as_dir=. | |
30157 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30158 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30159 | ac_cv_prog_AWK="$ac_prog" |
30160 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30161 | break 2 | |
30162 | fi | |
30163 | done | |
30164 | done | |
30165 | IFS=$as_save_IFS | |
30166 | ||
30167 | fi | |
30168 | fi | |
30169 | AWK=$ac_cv_prog_AWK | |
30170 | if test -n "$AWK"; then | |
30171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
30172 | $as_echo "$AWK" >&6; } | |
30173 | else | |
30174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30175 | $as_echo "no" >&6; } | |
30176 | fi | |
30177 | ||
30178 | ||
30179 | test -n "$AWK" && break | |
30180 | done | |
30181 | ||
30182 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
30183 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
30184 | set x ${MAKE-make} | |
30185 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
d0ac1c44 | 30186 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
c971b7fa PA |
30187 | $as_echo_n "(cached) " >&6 |
30188 | else | |
30189 | cat >conftest.make <<\_ACEOF | |
30190 | SHELL = /bin/sh | |
30191 | all: | |
30192 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
30193 | _ACEOF | |
d0ac1c44 | 30194 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
c971b7fa PA |
30195 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
30196 | *@@@%%%=?*=@@@%%%*) | |
30197 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
30198 | *) | |
30199 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
30200 | esac | |
30201 | rm -f conftest.make | |
30202 | fi | |
30203 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
30204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
30205 | $as_echo "yes" >&6; } | |
30206 | SET_MAKE= | |
30207 | else | |
30208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30209 | $as_echo "no" >&6; } | |
30210 | SET_MAKE="MAKE=${MAKE-make}" | |
30211 | fi | |
30212 | ||
30213 | rm -rf .tst 2>/dev/null | |
30214 | mkdir .tst 2>/dev/null | |
30215 | if test -d .tst; then | |
30216 | am__leading_dot=. | |
30217 | else | |
30218 | am__leading_dot=_ | |
30219 | fi | |
30220 | rmdir .tst 2>/dev/null | |
30221 | ||
30222 | DEPDIR="${am__leading_dot}deps" | |
30223 | ||
30224 | ac_config_commands="$ac_config_commands depfiles" | |
30225 | ||
30226 | ||
30227 | am_make=${MAKE-make} | |
30228 | cat > confinc << 'END' | |
30229 | am__doit: | |
30230 | @echo this is the am__doit target | |
30231 | .PHONY: am__doit | |
30232 | END | |
30233 | # If we don't find an include directive, just comment out the code. | |
30234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
30235 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
30236 | am__include="#" | |
30237 | am__quote= | |
30238 | _am_result=none | |
30239 | # First try GNU make style include. | |
30240 | echo "include confinc" > confmf | |
d0ac1c44 | 30241 | # Ignore all kinds of additional output from 'make'. |
c971b7fa PA |
30242 | case `$am_make -s -f confmf 2> /dev/null` in #( |
30243 | *the\ am__doit\ target*) | |
30244 | am__include=include | |
30245 | am__quote= | |
30246 | _am_result=GNU | |
30247 | ;; | |
30248 | esac | |
30249 | # Now try BSD make style include. | |
30250 | if test "$am__include" = "#"; then | |
30251 | echo '.include "confinc"' > confmf | |
30252 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
30253 | *the\ am__doit\ target*) | |
30254 | am__include=.include | |
30255 | am__quote="\"" | |
30256 | _am_result=BSD | |
30257 | ;; | |
30258 | esac | |
30259 | fi | |
30260 | ||
30261 | ||
30262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
30263 | $as_echo "$_am_result" >&6; } | |
30264 | rm -f confinc confmf | |
30265 | ||
30266 | # Check whether --enable-dependency-tracking was given. | |
30267 | if test "${enable_dependency_tracking+set}" = set; then : | |
30268 | enableval=$enable_dependency_tracking; | |
30269 | fi | |
30270 | ||
30271 | if test "x$enable_dependency_tracking" != xno; then | |
30272 | am_depcomp="$ac_aux_dir/depcomp" | |
30273 | AMDEPBACKSLASH='\' | |
d0ac1c44 | 30274 | am__nodep='_no' |
c971b7fa PA |
30275 | fi |
30276 | if test "x$enable_dependency_tracking" != xno; then | |
30277 | AMDEP_TRUE= | |
30278 | AMDEP_FALSE='#' | |
30279 | else | |
30280 | AMDEP_TRUE='#' | |
30281 | AMDEP_FALSE= | |
30282 | fi | |
30283 | ||
30284 | ||
d0ac1c44 SM |
30285 | # Check whether --enable-silent-rules was given. |
30286 | if test "${enable_silent_rules+set}" = set; then : | |
30287 | enableval=$enable_silent_rules; | |
30288 | fi | |
30289 | ||
30290 | case $enable_silent_rules in # ((( | |
30291 | yes) AM_DEFAULT_VERBOSITY=0;; | |
30292 | no) AM_DEFAULT_VERBOSITY=1;; | |
30293 | *) AM_DEFAULT_VERBOSITY=1;; | |
30294 | esac | |
30295 | am_make=${MAKE-make} | |
30296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
30297 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
30298 | if ${am_cv_make_support_nested_variables+:} false; then : | |
30299 | $as_echo_n "(cached) " >&6 | |
30300 | else | |
30301 | if $as_echo 'TRUE=$(BAR$(V)) | |
30302 | BAR0=false | |
30303 | BAR1=true | |
30304 | V=1 | |
30305 | am__doit: | |
30306 | @$(TRUE) | |
30307 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
30308 | am_cv_make_support_nested_variables=yes | |
30309 | else | |
30310 | am_cv_make_support_nested_variables=no | |
30311 | fi | |
30312 | fi | |
30313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
30314 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
30315 | if test $am_cv_make_support_nested_variables = yes; then | |
30316 | AM_V='$(V)' | |
30317 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
30318 | else | |
30319 | AM_V=$AM_DEFAULT_VERBOSITY | |
30320 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
30321 | fi | |
30322 | AM_BACKSLASH='\' | |
30323 | ||
c971b7fa PA |
30324 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
30325 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
30326 | # is not polluted with repeated "-I." | |
30327 | am__isrc=' -I$(srcdir)' | |
30328 | # test to see if srcdir already configured | |
30329 | if test -f $srcdir/config.status; then | |
d0ac1c44 | 30330 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
c971b7fa PA |
30331 | fi |
30332 | fi | |
30333 | ||
30334 | # test whether we have cygpath | |
30335 | if test -z "$CYGPATH_W"; then | |
30336 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
30337 | CYGPATH_W='cygpath -w' | |
30338 | else | |
30339 | CYGPATH_W=echo | |
30340 | fi | |
30341 | fi | |
30342 | ||
30343 | ||
30344 | # Define the identity of the package. | |
d0ac1c44 SM |
30345 | PACKAGE='libgnu' |
30346 | VERSION='UNUSED-VERSION' | |
c971b7fa PA |
30347 | |
30348 | ||
30349 | # Some tools Automake needs. | |
30350 | ||
30351 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
30352 | ||
30353 | ||
30354 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
30355 | ||
30356 | ||
30357 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
30358 | ||
30359 | ||
30360 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
30361 | ||
30362 | ||
30363 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
30364 | ||
d0ac1c44 SM |
30365 | # For better backward compatibility. To be removed once Automake 1.9.x |
30366 | # dies out for good. For more background, see: | |
30367 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
30368 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
30369 | mkdir_p='$(MKDIR_P)' | |
30370 | ||
30371 | # We need awk for the "check" target (and possibly the TAP driver). The | |
30372 | # system "awk" is bad on some platforms. | |
30373 | # Always define AMTAR for backward compatibility. Yes, it's still used | |
30374 | # in the wild :-( We should find a proper way to deprecate it ... | |
30375 | AMTAR='$${TAR-tar}' | |
30376 | ||
30377 | ||
30378 | # We'll loop over all known methods to create a tar archive until one works. | |
30379 | _am_tools='gnutar pax cpio none' | |
c971b7fa | 30380 | |
d0ac1c44 | 30381 | am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' |
c971b7fa | 30382 | |
c971b7fa PA |
30383 | |
30384 | ||
30385 | ||
30386 | ||
30387 | depcc="$CC" am_compiler_list= | |
30388 | ||
30389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
30390 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 30391 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
c971b7fa PA |
30392 | $as_echo_n "(cached) " >&6 |
30393 | else | |
30394 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
30395 | # We make a subdir and do the tests there. Otherwise we can end up | |
30396 | # making bogus files that we don't know about and never remove. For | |
30397 | # instance it was reported that on HP-UX the gcc test will end up | |
d0ac1c44 SM |
30398 | # making a dummy file named 'D' -- because '-MD' means "put the output |
30399 | # in D". | |
30400 | rm -rf conftest.dir | |
c971b7fa PA |
30401 | mkdir conftest.dir |
30402 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
30403 | # using a relative directory. | |
30404 | cp "$am_depcomp" conftest.dir | |
30405 | cd conftest.dir | |
30406 | # We will build objects and dependencies in a subdirectory because | |
30407 | # it helps to detect inapplicable dependency modes. For instance | |
30408 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
30409 | # side effect of compilation, but ICC will put the dependencies in | |
30410 | # the current directory while Tru64 will put them in the object | |
30411 | # directory. | |
30412 | mkdir sub | |
30413 | ||
30414 | am_cv_CC_dependencies_compiler_type=none | |
30415 | if test "$am_compiler_list" = ""; then | |
30416 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
30417 | fi | |
30418 | am__universal=false | |
30419 | case " $depcc " in #( | |
30420 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
30421 | esac | |
30422 | ||
30423 | for depmode in $am_compiler_list; do | |
30424 | # Setup a source with many dependencies, because some compilers | |
30425 | # like to wrap large dependency lists on column 80 (with \), and | |
30426 | # we should not choose a depcomp mode which is confused by this. | |
30427 | # | |
30428 | # We need to recreate these files for each test, as the compiler may | |
30429 | # overwrite some of them when testing with obscure command lines. | |
30430 | # This happens at least with the AIX C compiler. | |
30431 | : > sub/conftest.c | |
30432 | for i in 1 2 3 4 5 6; do | |
30433 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
d0ac1c44 SM |
30434 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with |
30435 | # Solaris 10 /bin/sh. | |
30436 | echo '/* dummy */' > sub/conftst$i.h | |
c971b7fa PA |
30437 | done |
30438 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
30439 | ||
d0ac1c44 | 30440 | # We check with '-c' and '-o' for the sake of the "dashmstdout" |
c971b7fa | 30441 | # mode. It turns out that the SunPro C++ compiler does not properly |
d0ac1c44 SM |
30442 | # handle '-M -o', and we need to detect this. Also, some Intel |
30443 | # versions had trouble with output in subdirs. | |
c971b7fa PA |
30444 | am__obj=sub/conftest.${OBJEXT-o} |
30445 | am__minus_obj="-o $am__obj" | |
30446 | case $depmode in | |
30447 | gcc) | |
30448 | # This depmode causes a compiler race in universal mode. | |
30449 | test "$am__universal" = false || continue | |
30450 | ;; | |
30451 | nosideeffect) | |
d0ac1c44 SM |
30452 | # After this tag, mechanisms are not by side-effect, so they'll |
30453 | # only be used when explicitly requested. | |
c971b7fa PA |
30454 | if test "x$enable_dependency_tracking" = xyes; then |
30455 | continue | |
30456 | else | |
30457 | break | |
30458 | fi | |
30459 | ;; | |
d0ac1c44 SM |
30460 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
30461 | # This compiler won't grok '-c -o', but also, the minuso test has | |
c971b7fa PA |
30462 | # not run yet. These depmodes are late enough in the game, and |
30463 | # so weak that their functioning should not be impacted. | |
30464 | am__obj=conftest.${OBJEXT-o} | |
30465 | am__minus_obj= | |
30466 | ;; | |
30467 | none) break ;; | |
30468 | esac | |
30469 | if depmode=$depmode \ | |
30470 | source=sub/conftest.c object=$am__obj \ | |
30471 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
30472 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
30473 | >/dev/null 2>conftest.err && | |
30474 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
30475 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
30476 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
30477 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
30478 | # icc doesn't choke on unknown options, it will just issue warnings | |
30479 | # or remarks (even with -Werror). So we grep stderr for any message | |
30480 | # that says an option was ignored or not supported. | |
30481 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
30482 | # icc: Command line warning: ignoring option '-M'; no argument required | |
30483 | # The diagnosis changed in icc 8.0: | |
30484 | # icc: Command line remark: option '-MP' not supported | |
30485 | if (grep 'ignoring option' conftest.err || | |
30486 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
30487 | am_cv_CC_dependencies_compiler_type=$depmode | |
30488 | break | |
30489 | fi | |
30490 | fi | |
30491 | done | |
30492 | ||
30493 | cd .. | |
30494 | rm -rf conftest.dir | |
30495 | else | |
30496 | am_cv_CC_dependencies_compiler_type=none | |
30497 | fi | |
30498 | ||
30499 | fi | |
30500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
30501 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
30502 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
30503 | ||
30504 | if | |
30505 | test "x$enable_dependency_tracking" != xno \ | |
30506 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
30507 | am__fastdepCC_TRUE= | |
30508 | am__fastdepCC_FALSE='#' | |
30509 | else | |
30510 | am__fastdepCC_TRUE='#' | |
30511 | am__fastdepCC_FALSE= | |
30512 | fi | |
30513 | ||
30514 | ||
30515 | ||
d0ac1c44 SM |
30516 | # POSIX will say in a future version that running "rm -f" with no argument |
30517 | # is OK; and we want to be able to make that assumption in our Makefile | |
30518 | # recipes. So use an aggressive probe to check that the usage we want is | |
30519 | # actually supported "in the wild" to an acceptable degree. | |
30520 | # See automake bug#10828. | |
30521 | # To make any issue more visible, cause the running configure to be aborted | |
30522 | # by default if the 'rm' program in use doesn't match our expectations; the | |
30523 | # user can still override this though. | |
30524 | if rm -f && rm -fr && rm -rf; then : OK; else | |
30525 | cat >&2 <<'END' | |
30526 | Oops! | |
30527 | ||
30528 | Your 'rm' program seems unable to run without file operands specified | |
30529 | on the command line, even when the '-f' option is present. This is contrary | |
30530 | to the behaviour of most rm programs out there, and not conforming with | |
30531 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
30532 | ||
30533 | Please tell bug-automake@gnu.org about your system, including the value | |
30534 | of your $PATH and any error possibly output before this message. This | |
30535 | can help us improve future automake versions. | |
30536 | ||
30537 | END | |
30538 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
30539 | echo 'Configuration will proceed anyway, since you have set the' >&2 | |
30540 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
30541 | echo >&2 | |
30542 | else | |
30543 | cat >&2 <<'END' | |
30544 | Aborting the configuration process, to ensure you take notice of the issue. | |
30545 | ||
30546 | You can download and install GNU coreutils to get an 'rm' implementation | |
30547 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
30548 | ||
30549 | If you want to complete the configuration process using your problematic | |
30550 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
30551 | to "yes", and re-run configure. | |
30552 | ||
30553 | END | |
30554 | as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 | |
30555 | fi | |
30556 | fi | |
30557 | ||
c971b7fa | 30558 | |
39be3c7e SM |
30559 | # Check whether --enable-silent-rules was given. |
30560 | if test "${enable_silent_rules+set}" = set; then : | |
30561 | enableval=$enable_silent_rules; | |
30562 | fi | |
30563 | ||
d0ac1c44 SM |
30564 | case $enable_silent_rules in # ((( |
30565 | yes) AM_DEFAULT_VERBOSITY=0;; | |
30566 | no) AM_DEFAULT_VERBOSITY=1;; | |
30567 | *) AM_DEFAULT_VERBOSITY=0;; | |
39be3c7e | 30568 | esac |
d0ac1c44 SM |
30569 | am_make=${MAKE-make} |
30570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
30571 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
30572 | if ${am_cv_make_support_nested_variables+:} false; then : | |
30573 | $as_echo_n "(cached) " >&6 | |
30574 | else | |
30575 | if $as_echo 'TRUE=$(BAR$(V)) | |
30576 | BAR0=false | |
30577 | BAR1=true | |
30578 | V=1 | |
30579 | am__doit: | |
30580 | @$(TRUE) | |
30581 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
30582 | am_cv_make_support_nested_variables=yes | |
30583 | else | |
30584 | am_cv_make_support_nested_variables=no | |
30585 | fi | |
30586 | fi | |
30587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
30588 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
30589 | if test $am_cv_make_support_nested_variables = yes; then | |
30590 | AM_V='$(V)' | |
30591 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
30592 | else | |
30593 | AM_V=$AM_DEFAULT_VERBOSITY | |
30594 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
30595 | fi | |
39be3c7e SM |
30596 | AM_BACKSLASH='\' |
30597 | ||
30598 | ||
c971b7fa PA |
30599 | # --------------------- # |
30600 | # Checks for programs. # | |
30601 | # --------------------- # | |
30602 | ||
30603 | ||
30604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 | |
30605 | $as_echo_n "checking whether ln -s works... " >&6; } | |
30606 | LN_S=$as_ln_s | |
30607 | if test "$LN_S" = "ln -s"; then | |
30608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
30609 | $as_echo "yes" >&6; } | |
30610 | else | |
30611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 | |
30612 | $as_echo "no, using $LN_S" >&6; } | |
30613 | fi | |
30614 | ||
30615 | if test -n "$ac_tool_prefix"; then | |
30616 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
30617 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
30618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30619 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30620 | if ${ac_cv_prog_RANLIB+:} false; then : |
c971b7fa PA |
30621 | $as_echo_n "(cached) " >&6 |
30622 | else | |
30623 | if test -n "$RANLIB"; then | |
30624 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
30625 | else | |
30626 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30627 | for as_dir in $PATH | |
30628 | do | |
30629 | IFS=$as_save_IFS | |
30630 | test -z "$as_dir" && as_dir=. | |
30631 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30632 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30633 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
30634 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30635 | break 2 | |
30636 | fi | |
30637 | done | |
30638 | done | |
30639 | IFS=$as_save_IFS | |
30640 | ||
30641 | fi | |
30642 | fi | |
30643 | RANLIB=$ac_cv_prog_RANLIB | |
30644 | if test -n "$RANLIB"; then | |
30645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
30646 | $as_echo "$RANLIB" >&6; } | |
30647 | else | |
30648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30649 | $as_echo "no" >&6; } | |
30650 | fi | |
30651 | ||
30652 | ||
30653 | fi | |
30654 | if test -z "$ac_cv_prog_RANLIB"; then | |
30655 | ac_ct_RANLIB=$RANLIB | |
30656 | # Extract the first word of "ranlib", so it can be a program name with args. | |
30657 | set dummy ranlib; ac_word=$2 | |
30658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30659 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30660 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
c971b7fa PA |
30661 | $as_echo_n "(cached) " >&6 |
30662 | else | |
30663 | if test -n "$ac_ct_RANLIB"; then | |
30664 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
30665 | else | |
30666 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30667 | for as_dir in $PATH | |
30668 | do | |
30669 | IFS=$as_save_IFS | |
30670 | test -z "$as_dir" && as_dir=. | |
30671 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30672 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30673 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
30674 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30675 | break 2 | |
30676 | fi | |
30677 | done | |
30678 | done | |
30679 | IFS=$as_save_IFS | |
30680 | ||
30681 | fi | |
30682 | fi | |
30683 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
30684 | if test -n "$ac_ct_RANLIB"; then | |
30685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
30686 | $as_echo "$ac_ct_RANLIB" >&6; } | |
30687 | else | |
30688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30689 | $as_echo "no" >&6; } | |
30690 | fi | |
30691 | ||
30692 | if test "x$ac_ct_RANLIB" = x; then | |
30693 | RANLIB=":" | |
30694 | else | |
30695 | case $cross_compiling:$ac_tool_warned in | |
30696 | yes:) | |
30697 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
30698 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
30699 | ac_tool_warned=yes ;; | |
30700 | esac | |
30701 | RANLIB=$ac_ct_RANLIB | |
30702 | fi | |
30703 | else | |
30704 | RANLIB="$ac_cv_prog_RANLIB" | |
30705 | fi | |
30706 | ||
30707 | ||
30708 | if test -n "$ac_tool_prefix"; then | |
30709 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
30710 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
30711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30712 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30713 | if ${ac_cv_prog_AR+:} false; then : |
c971b7fa PA |
30714 | $as_echo_n "(cached) " >&6 |
30715 | else | |
30716 | if test -n "$AR"; then | |
30717 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
30718 | else | |
30719 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30720 | for as_dir in $PATH | |
30721 | do | |
30722 | IFS=$as_save_IFS | |
30723 | test -z "$as_dir" && as_dir=. | |
30724 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30725 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30726 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
30727 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30728 | break 2 | |
30729 | fi | |
30730 | done | |
30731 | done | |
30732 | IFS=$as_save_IFS | |
30733 | ||
30734 | fi | |
30735 | fi | |
30736 | AR=$ac_cv_prog_AR | |
30737 | if test -n "$AR"; then | |
30738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
30739 | $as_echo "$AR" >&6; } | |
30740 | else | |
30741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30742 | $as_echo "no" >&6; } | |
30743 | fi | |
30744 | ||
30745 | ||
30746 | fi | |
30747 | if test -z "$ac_cv_prog_AR"; then | |
30748 | ac_ct_AR=$AR | |
30749 | # Extract the first word of "ar", so it can be a program name with args. | |
30750 | set dummy ar; ac_word=$2 | |
30751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30752 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30753 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
c971b7fa PA |
30754 | $as_echo_n "(cached) " >&6 |
30755 | else | |
30756 | if test -n "$ac_ct_AR"; then | |
30757 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
30758 | else | |
30759 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30760 | for as_dir in $PATH | |
30761 | do | |
30762 | IFS=$as_save_IFS | |
30763 | test -z "$as_dir" && as_dir=. | |
30764 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30765 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30766 | ac_cv_prog_ac_ct_AR="ar" |
30767 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30768 | break 2 | |
30769 | fi | |
30770 | done | |
30771 | done | |
30772 | IFS=$as_save_IFS | |
30773 | ||
30774 | fi | |
30775 | fi | |
30776 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
30777 | if test -n "$ac_ct_AR"; then | |
30778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
30779 | $as_echo "$ac_ct_AR" >&6; } | |
30780 | else | |
30781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30782 | $as_echo "no" >&6; } | |
30783 | fi | |
30784 | ||
30785 | if test "x$ac_ct_AR" = x; then | |
30786 | AR="" | |
30787 | else | |
30788 | case $cross_compiling:$ac_tool_warned in | |
30789 | yes:) | |
30790 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
30791 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
30792 | ac_tool_warned=yes ;; | |
30793 | esac | |
30794 | AR=$ac_ct_AR | |
30795 | fi | |
30796 | else | |
30797 | AR="$ac_cv_prog_AR" | |
30798 | fi | |
30799 | ||
30800 | ||
30801 | # ---------------------- # | |
30802 | # Checks for libraries. # | |
30803 | # ---------------------- # | |
30804 | ||
361cb219 AB |
30805 | ac_config_files="$ac_config_files Makefile.gnulib.inc" |
30806 | ||
30807 | ||
c971b7fa PA |
30808 | ac_config_files="$ac_config_files Makefile import/Makefile" |
30809 | ||
30810 | ac_config_commands="$ac_config_commands default" | |
30811 | ||
30812 | cat >confcache <<\_ACEOF | |
30813 | # This file is a shell script that caches the results of configure | |
30814 | # tests run on this system so they can be shared between configure | |
30815 | # scripts and configure runs, see configure's option --config-cache. | |
30816 | # It is not useful on other systems. If it contains results you don't | |
30817 | # want to keep, you may remove or edit it. | |
30818 | # | |
30819 | # config.status only pays attention to the cache file if you give it | |
30820 | # the --recheck option to rerun configure. | |
30821 | # | |
30822 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
30823 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
30824 | # following values. | |
30825 | ||
30826 | _ACEOF | |
30827 | ||
30828 | # The following way of writing the cache mishandles newlines in values, | |
30829 | # but we know of no workaround that is simple, portable, and efficient. | |
30830 | # So, we kill variables containing newlines. | |
30831 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
30832 | # and sets the high bit in the cache file unless we assign to the vars. | |
30833 | ( | |
30834 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
30835 | eval ac_val=\$$ac_var | |
30836 | case $ac_val in #( | |
30837 | *${as_nl}*) | |
30838 | case $ac_var in #( | |
30839 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
30840 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
30841 | esac | |
30842 | case $ac_var in #( | |
30843 | _ | IFS | as_nl) ;; #( | |
30844 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
30845 | *) { eval $ac_var=; unset $ac_var;} ;; | |
30846 | esac ;; | |
30847 | esac | |
30848 | done | |
30849 | ||
30850 | (set) 2>&1 | | |
30851 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
30852 | *${as_nl}ac_space=\ *) | |
30853 | # `set' does not quote correctly, so add quotes: double-quote | |
30854 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
30855 | sed -n \ | |
30856 | "s/'/'\\\\''/g; | |
30857 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
30858 | ;; #( | |
30859 | *) | |
30860 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
30861 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
30862 | ;; | |
30863 | esac | | |
30864 | sort | |
30865 | ) | | |
30866 | sed ' | |
30867 | /^ac_cv_env_/b end | |
30868 | t clear | |
30869 | :clear | |
30870 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
30871 | t end | |
30872 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
30873 | :end' >>confcache | |
30874 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
30875 | if test -w "$cache_file"; then | |
d0ac1c44 | 30876 | if test "x$cache_file" != "x/dev/null"; then |
c971b7fa PA |
30877 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
30878 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
30879 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
30880 | cat confcache >"$cache_file" | |
30881 | else | |
30882 | case $cache_file in #( | |
30883 | */* | ?:*) | |
30884 | mv -f confcache "$cache_file"$$ && | |
30885 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
30886 | *) | |
30887 | mv -f confcache "$cache_file" ;; | |
30888 | esac | |
30889 | fi | |
30890 | fi | |
c971b7fa PA |
30891 | else |
30892 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
30893 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
30894 | fi | |
30895 | fi | |
30896 | rm -f confcache | |
30897 | ||
30898 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
30899 | # Let make expand exec_prefix. | |
30900 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
30901 | ||
30902 | DEFS=-DHAVE_CONFIG_H | |
30903 | ||
30904 | ac_libobjs= | |
30905 | ac_ltlibobjs= | |
30906 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
30907 | # 1. Remove the extension, and $U if already installed. | |
30908 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
30909 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
30910 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
30911 | # will be set to the directory where LIBOBJS objects are built. | |
30912 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
30913 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
30914 | done | |
30915 | LIBOBJS=$ac_libobjs | |
30916 | ||
30917 | LTLIBOBJS=$ac_ltlibobjs | |
30918 | ||
30919 | ||
30920 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then | |
d0ac1c44 | 30921 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c971b7fa PA |
30922 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30923 | fi | |
30924 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
d0ac1c44 | 30925 | as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. |
c971b7fa PA |
30926 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30927 | fi | |
8690e634 | 30928 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
d0ac1c44 | 30929 | as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. |
8690e634 JK |
30930 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30931 | fi | |
18848e28 | 30932 | if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then |
d0ac1c44 | 30933 | as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. |
18848e28 GF |
30934 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30935 | fi | |
88b48903 | 30936 | if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then |
d0ac1c44 | 30937 | as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. |
88b48903 WN |
30938 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30939 | fi | |
8690e634 | 30940 | if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then |
d0ac1c44 | 30941 | as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. |
8690e634 JK |
30942 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30943 | fi | |
c0c3707f CB |
30944 | if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then |
30945 | as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. | |
30946 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
30947 | fi | |
30948 | if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then | |
30949 | as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. | |
30950 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
30951 | fi | |
6ec2e0f5 | 30952 | if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then |
d0ac1c44 | 30953 | as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. |
6ec2e0f5 SDJ |
30954 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30955 | fi | |
49e4877c | 30956 | if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then |
d0ac1c44 | 30957 | as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. |
49e4877c PA |
30958 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30959 | fi | |
30960 | if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then | |
d0ac1c44 | 30961 | as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. |
49e4877c PA |
30962 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30963 | fi | |
c971b7fa | 30964 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
d0ac1c44 | 30965 | as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
c971b7fa PA |
30966 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30967 | fi | |
88b48903 WN |
30968 | |
30969 | ||
5df4cba6 SM |
30970 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then |
30971 | as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. | |
30972 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
30973 | fi | |
725e2999 JB |
30974 | if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then |
30975 | as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. | |
30976 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
30977 | fi | |
30978 | if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then | |
30979 | as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. | |
30980 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
30981 | fi | |
8690e634 | 30982 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
d0ac1c44 | 30983 | as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
8690e634 JK |
30984 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30985 | fi | |
c971b7fa | 30986 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then |
d0ac1c44 | 30987 | as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
c971b7fa PA |
30988 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
30989 | fi | |
30990 | ||
30991 | gl_libobjs= | |
30992 | gl_ltlibobjs= | |
30993 | if test -n "$gl_LIBOBJS"; then | |
30994 | # Remove the extension. | |
30995 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
30996 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
30997 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
30998 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
30999 | done | |
31000 | fi | |
31001 | gl_LIBOBJS=$gl_libobjs | |
31002 | ||
31003 | gl_LTLIBOBJS=$gl_ltlibobjs | |
31004 | ||
31005 | ||
31006 | ||
31007 | gltests_libobjs= | |
31008 | gltests_ltlibobjs= | |
31009 | if test -n "$gltests_LIBOBJS"; then | |
31010 | # Remove the extension. | |
31011 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
31012 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
31013 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
31014 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
31015 | done | |
31016 | fi | |
31017 | gltests_LIBOBJS=$gltests_libobjs | |
31018 | ||
31019 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
31020 | ||
31021 | ||
d0ac1c44 SM |
31022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 |
31023 | $as_echo_n "checking that generated files are newer than configure... " >&6; } | |
31024 | if test -n "$am_sleep_pid"; then | |
31025 | # Hide warnings about reused PIDs. | |
31026 | wait $am_sleep_pid 2>/dev/null | |
31027 | fi | |
31028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 | |
31029 | $as_echo "done" >&6; } | |
c971b7fa | 31030 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
d0ac1c44 | 31031 | as_fn_error $? "conditional \"AMDEP\" was never defined. |
c971b7fa PA |
31032 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31033 | fi | |
31034 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
d0ac1c44 | 31035 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. |
c971b7fa PA |
31036 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31037 | fi | |
31038 | if test -n "$EXEEXT"; then | |
31039 | am__EXEEXT_TRUE= | |
31040 | am__EXEEXT_FALSE='#' | |
31041 | else | |
31042 | am__EXEEXT_TRUE='#' | |
31043 | am__EXEEXT_FALSE= | |
31044 | fi | |
31045 | ||
31046 | ||
d0ac1c44 | 31047 | : "${CONFIG_STATUS=./config.status}" |
c971b7fa PA |
31048 | ac_write_fail=0 |
31049 | ac_clean_files_save=$ac_clean_files | |
31050 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
31051 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
31052 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
31053 | as_write_fail=0 | |
31054 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
31055 | #! $SHELL | |
31056 | # Generated by $as_me. | |
31057 | # Run this file to recreate the current configuration. | |
31058 | # Compiler output produced by configure, useful for debugging | |
31059 | # configure, is in config.log if it exists. | |
31060 | ||
31061 | debug=false | |
31062 | ac_cs_recheck=false | |
31063 | ac_cs_silent=false | |
31064 | ||
31065 | SHELL=\${CONFIG_SHELL-$SHELL} | |
31066 | export SHELL | |
31067 | _ASEOF | |
31068 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
31069 | ## -------------------- ## | |
31070 | ## M4sh Initialization. ## | |
31071 | ## -------------------- ## | |
31072 | ||
31073 | # Be more Bourne compatible | |
31074 | DUALCASE=1; export DUALCASE # for MKS sh | |
31075 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
31076 | emulate sh | |
31077 | NULLCMD=: | |
31078 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
31079 | # is contrary to our usage. Disable this feature. | |
31080 | alias -g '${1+"$@"}'='"$@"' | |
31081 | setopt NO_GLOB_SUBST | |
31082 | else | |
31083 | case `(set -o) 2>/dev/null` in #( | |
31084 | *posix*) : | |
31085 | set -o posix ;; #( | |
31086 | *) : | |
31087 | ;; | |
31088 | esac | |
31089 | fi | |
31090 | ||
31091 | ||
31092 | as_nl=' | |
31093 | ' | |
31094 | export as_nl | |
31095 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
31096 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
31097 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
31098 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
31099 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
31100 | # but without wasting forks for bash or zsh. | |
31101 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
31102 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
31103 | as_echo='print -r --' | |
31104 | as_echo_n='print -rn --' | |
31105 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
31106 | as_echo='printf %s\n' | |
31107 | as_echo_n='printf %s' | |
31108 | else | |
31109 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
31110 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
31111 | as_echo_n='/usr/ucb/echo -n' | |
31112 | else | |
31113 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
31114 | as_echo_n_body='eval | |
31115 | arg=$1; | |
31116 | case $arg in #( | |
31117 | *"$as_nl"*) | |
31118 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
31119 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
31120 | esac; | |
31121 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
31122 | ' | |
31123 | export as_echo_n_body | |
31124 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
31125 | fi | |
31126 | export as_echo_body | |
31127 | as_echo='sh -c $as_echo_body as_echo' | |
31128 | fi | |
31129 | ||
31130 | # The user is always right. | |
31131 | if test "${PATH_SEPARATOR+set}" != set; then | |
31132 | PATH_SEPARATOR=: | |
31133 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
31134 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
31135 | PATH_SEPARATOR=';' | |
31136 | } | |
31137 | fi | |
31138 | ||
31139 | ||
31140 | # IFS | |
31141 | # We need space, tab and new line, in precisely that order. Quoting is | |
31142 | # there to prevent editors from complaining about space-tab. | |
31143 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
31144 | # splitting by setting IFS to empty value.) | |
31145 | IFS=" "" $as_nl" | |
31146 | ||
31147 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 31148 | as_myself= |
c971b7fa PA |
31149 | case $0 in #(( |
31150 | *[\\/]* ) as_myself=$0 ;; | |
31151 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31152 | for as_dir in $PATH | |
31153 | do | |
31154 | IFS=$as_save_IFS | |
31155 | test -z "$as_dir" && as_dir=. | |
31156 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
31157 | done | |
31158 | IFS=$as_save_IFS | |
31159 | ||
31160 | ;; | |
31161 | esac | |
31162 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
31163 | # in which case we are not to be found in the path. | |
31164 | if test "x$as_myself" = x; then | |
31165 | as_myself=$0 | |
31166 | fi | |
31167 | if test ! -f "$as_myself"; then | |
31168 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
31169 | exit 1 | |
31170 | fi | |
31171 | ||
31172 | # Unset variables that we do not need and which cause bugs (e.g. in | |
31173 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
31174 | # suppresses any "Segmentation fault" message there. '((' could | |
31175 | # trigger a bug in pdksh 5.2.14. | |
31176 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
31177 | do eval test x\${$as_var+set} = xset \ | |
31178 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
31179 | done | |
31180 | PS1='$ ' | |
31181 | PS2='> ' | |
31182 | PS4='+ ' | |
31183 | ||
31184 | # NLS nuisances. | |
31185 | LC_ALL=C | |
31186 | export LC_ALL | |
31187 | LANGUAGE=C | |
31188 | export LANGUAGE | |
31189 | ||
31190 | # CDPATH. | |
31191 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
31192 | ||
31193 | ||
d0ac1c44 SM |
31194 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
31195 | # ---------------------------------------- | |
c971b7fa PA |
31196 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
31197 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 31198 | # script with STATUS, using 1 if that was 0. |
c971b7fa PA |
31199 | as_fn_error () |
31200 | { | |
d0ac1c44 SM |
31201 | as_status=$1; test $as_status -eq 0 && as_status=1 |
31202 | if test "$4"; then | |
31203 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
31204 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
c971b7fa | 31205 | fi |
d0ac1c44 | 31206 | $as_echo "$as_me: error: $2" >&2 |
c971b7fa PA |
31207 | as_fn_exit $as_status |
31208 | } # as_fn_error | |
31209 | ||
31210 | ||
31211 | # as_fn_set_status STATUS | |
31212 | # ----------------------- | |
31213 | # Set $? to STATUS, without forking. | |
31214 | as_fn_set_status () | |
31215 | { | |
31216 | return $1 | |
31217 | } # as_fn_set_status | |
31218 | ||
31219 | # as_fn_exit STATUS | |
31220 | # ----------------- | |
31221 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
31222 | as_fn_exit () | |
31223 | { | |
31224 | set +e | |
31225 | as_fn_set_status $1 | |
31226 | exit $1 | |
31227 | } # as_fn_exit | |
31228 | ||
31229 | # as_fn_unset VAR | |
31230 | # --------------- | |
31231 | # Portably unset VAR. | |
31232 | as_fn_unset () | |
31233 | { | |
31234 | { eval $1=; unset $1;} | |
31235 | } | |
31236 | as_unset=as_fn_unset | |
31237 | # as_fn_append VAR VALUE | |
31238 | # ---------------------- | |
31239 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
31240 | # advantage of any shell optimizations that allow amortized linear growth over | |
31241 | # repeated appends, instead of the typical quadratic growth present in naive | |
31242 | # implementations. | |
31243 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
31244 | eval 'as_fn_append () | |
31245 | { | |
31246 | eval $1+=\$2 | |
31247 | }' | |
31248 | else | |
31249 | as_fn_append () | |
31250 | { | |
31251 | eval $1=\$$1\$2 | |
31252 | } | |
31253 | fi # as_fn_append | |
31254 | ||
31255 | # as_fn_arith ARG... | |
31256 | # ------------------ | |
31257 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
31258 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
31259 | # must be portable across $(()) and expr. | |
31260 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
31261 | eval 'as_fn_arith () | |
31262 | { | |
31263 | as_val=$(( $* )) | |
31264 | }' | |
31265 | else | |
31266 | as_fn_arith () | |
31267 | { | |
31268 | as_val=`expr "$@" || test $? -eq 1` | |
31269 | } | |
31270 | fi # as_fn_arith | |
31271 | ||
31272 | ||
31273 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
31274 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
31275 | as_expr=expr | |
31276 | else | |
31277 | as_expr=false | |
31278 | fi | |
31279 | ||
31280 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
31281 | as_basename=basename | |
31282 | else | |
31283 | as_basename=false | |
31284 | fi | |
31285 | ||
31286 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
31287 | as_dirname=dirname | |
31288 | else | |
31289 | as_dirname=false | |
31290 | fi | |
31291 | ||
31292 | as_me=`$as_basename -- "$0" || | |
31293 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
31294 | X"$0" : 'X\(//\)$' \| \ | |
31295 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
31296 | $as_echo X/"$0" | | |
31297 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
31298 | s//\1/ | |
31299 | q | |
31300 | } | |
31301 | /^X\/\(\/\/\)$/{ | |
31302 | s//\1/ | |
31303 | q | |
31304 | } | |
31305 | /^X\/\(\/\).*/{ | |
31306 | s//\1/ | |
31307 | q | |
31308 | } | |
31309 | s/.*/./; q'` | |
31310 | ||
31311 | # Avoid depending upon Character Ranges. | |
31312 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
31313 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
31314 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
31315 | as_cr_digits='0123456789' | |
31316 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
31317 | ||
31318 | ECHO_C= ECHO_N= ECHO_T= | |
31319 | case `echo -n x` in #((((( | |
31320 | -n*) | |
31321 | case `echo 'xy\c'` in | |
31322 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
31323 | xy) ECHO_C='\c';; | |
31324 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
31325 | ECHO_T=' ';; | |
31326 | esac;; | |
31327 | *) | |
31328 | ECHO_N='-n';; | |
31329 | esac | |
31330 | ||
31331 | rm -f conf$$ conf$$.exe conf$$.file | |
31332 | if test -d conf$$.dir; then | |
31333 | rm -f conf$$.dir/conf$$.file | |
31334 | else | |
31335 | rm -f conf$$.dir | |
31336 | mkdir conf$$.dir 2>/dev/null | |
31337 | fi | |
31338 | if (echo >conf$$.file) 2>/dev/null; then | |
31339 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
31340 | as_ln_s='ln -s' | |
31341 | # ... but there are two gotchas: | |
31342 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
31343 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 31344 | # In both cases, we have to default to `cp -pR'. |
c971b7fa | 31345 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 31346 | as_ln_s='cp -pR' |
c971b7fa PA |
31347 | elif ln conf$$.file conf$$ 2>/dev/null; then |
31348 | as_ln_s=ln | |
31349 | else | |
d0ac1c44 | 31350 | as_ln_s='cp -pR' |
c971b7fa PA |
31351 | fi |
31352 | else | |
d0ac1c44 | 31353 | as_ln_s='cp -pR' |
c971b7fa PA |
31354 | fi |
31355 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
31356 | rmdir conf$$.dir 2>/dev/null | |
31357 | ||
31358 | ||
31359 | # as_fn_mkdir_p | |
31360 | # ------------- | |
31361 | # Create "$as_dir" as a directory, including parents if necessary. | |
31362 | as_fn_mkdir_p () | |
31363 | { | |
31364 | ||
31365 | case $as_dir in #( | |
31366 | -*) as_dir=./$as_dir;; | |
31367 | esac | |
31368 | test -d "$as_dir" || eval $as_mkdir_p || { | |
31369 | as_dirs= | |
31370 | while :; do | |
31371 | case $as_dir in #( | |
31372 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
31373 | *) as_qdir=$as_dir;; | |
31374 | esac | |
31375 | as_dirs="'$as_qdir' $as_dirs" | |
31376 | as_dir=`$as_dirname -- "$as_dir" || | |
31377 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
31378 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
31379 | X"$as_dir" : 'X\(//\)$' \| \ | |
31380 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
31381 | $as_echo X"$as_dir" | | |
31382 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
31383 | s//\1/ | |
31384 | q | |
31385 | } | |
31386 | /^X\(\/\/\)[^/].*/{ | |
31387 | s//\1/ | |
31388 | q | |
31389 | } | |
31390 | /^X\(\/\/\)$/{ | |
31391 | s//\1/ | |
31392 | q | |
31393 | } | |
31394 | /^X\(\/\).*/{ | |
31395 | s//\1/ | |
31396 | q | |
31397 | } | |
31398 | s/.*/./; q'` | |
31399 | test -d "$as_dir" && break | |
31400 | done | |
31401 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 31402 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
c971b7fa PA |
31403 | |
31404 | ||
31405 | } # as_fn_mkdir_p | |
31406 | if mkdir -p . 2>/dev/null; then | |
31407 | as_mkdir_p='mkdir -p "$as_dir"' | |
31408 | else | |
31409 | test -d ./-p && rmdir ./-p | |
31410 | as_mkdir_p=false | |
31411 | fi | |
31412 | ||
d0ac1c44 SM |
31413 | |
31414 | # as_fn_executable_p FILE | |
31415 | # ----------------------- | |
31416 | # Test if FILE is an executable regular file. | |
31417 | as_fn_executable_p () | |
31418 | { | |
31419 | test -f "$1" && test -x "$1" | |
31420 | } # as_fn_executable_p | |
31421 | as_test_x='test -x' | |
31422 | as_executable_p=as_fn_executable_p | |
c971b7fa PA |
31423 | |
31424 | # Sed expression to map a string onto a valid CPP name. | |
31425 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
31426 | ||
31427 | # Sed expression to map a string onto a valid variable name. | |
31428 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
31429 | ||
31430 | ||
31431 | exec 6>&1 | |
31432 | ## ----------------------------------- ## | |
31433 | ## Main body of $CONFIG_STATUS script. ## | |
31434 | ## ----------------------------------- ## | |
31435 | _ASEOF | |
31436 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
31437 | ||
31438 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31439 | # Save the log message, to keep $0 and so on meaningful, and to | |
31440 | # report actual input values of CONFIG_FILES etc. instead of their | |
31441 | # values after options handling. | |
31442 | ac_log=" | |
d0ac1c44 SM |
31443 | This file was extended by libgnu $as_me UNUSED-VERSION, which was |
31444 | generated by GNU Autoconf 2.69. Invocation command line was | |
c971b7fa PA |
31445 | |
31446 | CONFIG_FILES = $CONFIG_FILES | |
31447 | CONFIG_HEADERS = $CONFIG_HEADERS | |
31448 | CONFIG_LINKS = $CONFIG_LINKS | |
31449 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
31450 | $ $0 $@ | |
31451 | ||
31452 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
31453 | " | |
31454 | ||
31455 | _ACEOF | |
31456 | ||
31457 | case $ac_config_files in *" | |
31458 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
31459 | esac | |
31460 | ||
31461 | case $ac_config_headers in *" | |
31462 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
31463 | esac | |
31464 | ||
31465 | ||
31466 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
31467 | # Files that config.status was made for. | |
31468 | config_files="$ac_config_files" | |
31469 | config_headers="$ac_config_headers" | |
31470 | config_commands="$ac_config_commands" | |
31471 | ||
31472 | _ACEOF | |
31473 | ||
31474 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31475 | ac_cs_usage="\ | |
31476 | \`$as_me' instantiates files and other configuration actions | |
31477 | from templates according to the current configuration. Unless the files | |
31478 | and actions are specified as TAGs, all are instantiated by default. | |
31479 | ||
31480 | Usage: $0 [OPTION]... [TAG]... | |
31481 | ||
31482 | -h, --help print this help, then exit | |
31483 | -V, --version print version number and configuration settings, then exit | |
d0ac1c44 | 31484 | --config print configuration, then exit |
c971b7fa PA |
31485 | -q, --quiet, --silent |
31486 | do not print progress messages | |
31487 | -d, --debug don't remove temporary files | |
31488 | --recheck update $as_me by reconfiguring in the same conditions | |
31489 | --file=FILE[:TEMPLATE] | |
31490 | instantiate the configuration file FILE | |
31491 | --header=FILE[:TEMPLATE] | |
31492 | instantiate the configuration header FILE | |
31493 | ||
31494 | Configuration files: | |
31495 | $config_files | |
31496 | ||
31497 | Configuration headers: | |
31498 | $config_headers | |
31499 | ||
31500 | Configuration commands: | |
31501 | $config_commands | |
31502 | ||
31503 | Report bugs to the package provider." | |
31504 | ||
31505 | _ACEOF | |
31506 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 31507 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
c971b7fa | 31508 | ac_cs_version="\\ |
d0ac1c44 SM |
31509 | libgnu config.status UNUSED-VERSION |
31510 | configured by $0, generated by GNU Autoconf 2.69, | |
31511 | with options \\"\$ac_cs_config\\" | |
c971b7fa | 31512 | |
d0ac1c44 | 31513 | Copyright (C) 2012 Free Software Foundation, Inc. |
c971b7fa PA |
31514 | This config.status script is free software; the Free Software Foundation |
31515 | gives unlimited permission to copy, distribute and modify it." | |
31516 | ||
31517 | ac_pwd='$ac_pwd' | |
31518 | srcdir='$srcdir' | |
31519 | INSTALL='$INSTALL' | |
31520 | MKDIR_P='$MKDIR_P' | |
31521 | AWK='$AWK' | |
31522 | test -n "\$AWK" || AWK=awk | |
31523 | _ACEOF | |
31524 | ||
31525 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31526 | # The default lists apply if the user does not specify any file. | |
31527 | ac_need_defaults=: | |
31528 | while test $# != 0 | |
31529 | do | |
31530 | case $1 in | |
d0ac1c44 | 31531 | --*=?*) |
c971b7fa PA |
31532 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
31533 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
31534 | ac_shift=: | |
31535 | ;; | |
d0ac1c44 SM |
31536 | --*=) |
31537 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
31538 | ac_optarg= | |
31539 | ac_shift=: | |
31540 | ;; | |
c971b7fa PA |
31541 | *) |
31542 | ac_option=$1 | |
31543 | ac_optarg=$2 | |
31544 | ac_shift=shift | |
31545 | ;; | |
31546 | esac | |
31547 | ||
31548 | case $ac_option in | |
31549 | # Handling of the options. | |
31550 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
31551 | ac_cs_recheck=: ;; | |
31552 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
31553 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
31554 | --config | --confi | --conf | --con | --co | --c ) |
31555 | $as_echo "$ac_cs_config"; exit ;; | |
c971b7fa PA |
31556 | --debug | --debu | --deb | --de | --d | -d ) |
31557 | debug=: ;; | |
31558 | --file | --fil | --fi | --f ) | |
31559 | $ac_shift | |
31560 | case $ac_optarg in | |
31561 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 31562 | '') as_fn_error $? "missing file argument" ;; |
c971b7fa PA |
31563 | esac |
31564 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
31565 | ac_need_defaults=false;; | |
31566 | --header | --heade | --head | --hea ) | |
31567 | $ac_shift | |
31568 | case $ac_optarg in | |
31569 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
31570 | esac | |
31571 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
31572 | ac_need_defaults=false;; | |
31573 | --he | --h) | |
31574 | # Conflict between --help and --header | |
d0ac1c44 | 31575 | as_fn_error $? "ambiguous option: \`$1' |
c971b7fa PA |
31576 | Try \`$0 --help' for more information.";; |
31577 | --help | --hel | -h ) | |
31578 | $as_echo "$ac_cs_usage"; exit ;; | |
31579 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
31580 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
31581 | ac_cs_silent=: ;; | |
31582 | ||
31583 | # This is an error. | |
d0ac1c44 | 31584 | -*) as_fn_error $? "unrecognized option: \`$1' |
c971b7fa PA |
31585 | Try \`$0 --help' for more information." ;; |
31586 | ||
31587 | *) as_fn_append ac_config_targets " $1" | |
31588 | ac_need_defaults=false ;; | |
31589 | ||
31590 | esac | |
31591 | shift | |
31592 | done | |
31593 | ||
31594 | ac_configure_extra_args= | |
31595 | ||
31596 | if $ac_cs_silent; then | |
31597 | exec 6>/dev/null | |
31598 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
31599 | fi | |
31600 | ||
31601 | _ACEOF | |
31602 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
31603 | if \$ac_cs_recheck; then | |
d0ac1c44 | 31604 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
c971b7fa PA |
31605 | shift |
31606 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
31607 | CONFIG_SHELL='$SHELL' | |
31608 | export CONFIG_SHELL | |
31609 | exec "\$@" | |
31610 | fi | |
31611 | ||
31612 | _ACEOF | |
31613 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31614 | exec 5>>config.log | |
31615 | { | |
31616 | echo | |
31617 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
31618 | ## Running $as_me. ## | |
31619 | _ASBOX | |
31620 | $as_echo "$ac_log" | |
31621 | } >&5 | |
31622 | ||
31623 | _ACEOF | |
31624 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
31625 | # | |
31626 | # INIT-COMMANDS | |
31627 | # | |
31628 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | |
31629 | ||
31630 | _ACEOF | |
31631 | ||
31632 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31633 | ||
31634 | # Handling of arguments. | |
31635 | for ac_config_target in $ac_config_targets | |
31636 | do | |
31637 | case $ac_config_target in | |
31638 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
31639 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
361cb219 | 31640 | "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;; |
c971b7fa PA |
31641 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
31642 | "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;; | |
31643 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
31644 | ||
d0ac1c44 | 31645 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c971b7fa PA |
31646 | esac |
31647 | done | |
31648 | ||
31649 | ||
31650 | # If the user did not use the arguments to specify the items to instantiate, | |
31651 | # then the envvar interface is used. Set only those that are not. | |
31652 | # We use the long form for the default assignment because of an extremely | |
31653 | # bizarre bug on SunOS 4.1.3. | |
31654 | if $ac_need_defaults; then | |
31655 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
31656 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
31657 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
31658 | fi | |
31659 | ||
31660 | # Have a temporary directory for convenience. Make it in the build tree | |
31661 | # simply because there is no reason against having it here, and in addition, | |
31662 | # creating and moving files from /tmp can sometimes cause problems. | |
31663 | # Hook for its removal unless debugging. | |
31664 | # Note that there is a small window in which the directory will not be cleaned: | |
31665 | # after its creation but before its name has been assigned to `$tmp'. | |
31666 | $debug || | |
31667 | { | |
d0ac1c44 | 31668 | tmp= ac_tmp= |
c971b7fa | 31669 | trap 'exit_status=$? |
d0ac1c44 SM |
31670 | : "${ac_tmp:=$tmp}" |
31671 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
c971b7fa PA |
31672 | ' 0 |
31673 | trap 'as_fn_exit 1' 1 2 13 15 | |
31674 | } | |
31675 | # Create a (secure) tmp directory for tmp files. | |
31676 | ||
31677 | { | |
31678 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 31679 | test -d "$tmp" |
c971b7fa PA |
31680 | } || |
31681 | { | |
31682 | tmp=./conf$$-$RANDOM | |
31683 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
31684 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
31685 | ac_tmp=$tmp | |
c971b7fa PA |
31686 | |
31687 | # Set up the scripts for CONFIG_FILES section. | |
31688 | # No need to generate them if there are no CONFIG_FILES. | |
31689 | # This happens for instance with `./config.status config.h'. | |
31690 | if test -n "$CONFIG_FILES"; then | |
31691 | ||
31692 | ||
31693 | ac_cr=`echo X | tr X '\015'` | |
31694 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
31695 | # But we know of no other shell where ac_cr would be empty at this | |
31696 | # point, so we can use a bashism as a fallback. | |
31697 | if test "x$ac_cr" = x; then | |
31698 | eval ac_cr=\$\'\\r\' | |
31699 | fi | |
31700 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
31701 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 31702 | ac_cs_awk_cr='\\r' |
c971b7fa PA |
31703 | else |
31704 | ac_cs_awk_cr=$ac_cr | |
31705 | fi | |
31706 | ||
d0ac1c44 | 31707 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
c971b7fa PA |
31708 | _ACEOF |
31709 | ||
31710 | ||
31711 | { | |
31712 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
31713 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
31714 | echo "_ACEOF" | |
31715 | } >conf$$subs.sh || | |
d0ac1c44 SM |
31716 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
31717 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
c971b7fa PA |
31718 | ac_delim='%!_!# ' |
31719 | for ac_last_try in false false false false false :; do | |
31720 | . ./conf$$subs.sh || | |
d0ac1c44 | 31721 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
31722 | |
31723 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
31724 | if test $ac_delim_n = $ac_delim_num; then | |
31725 | break | |
31726 | elif $ac_last_try; then | |
d0ac1c44 | 31727 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
31728 | else |
31729 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
31730 | fi | |
31731 | done | |
31732 | rm -f conf$$subs.sh | |
31733 | ||
31734 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 31735 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
c971b7fa PA |
31736 | _ACEOF |
31737 | sed -n ' | |
31738 | h | |
31739 | s/^/S["/; s/!.*/"]=/ | |
31740 | p | |
31741 | g | |
31742 | s/^[^!]*!// | |
31743 | :repl | |
31744 | t repl | |
31745 | s/'"$ac_delim"'$// | |
31746 | t delim | |
31747 | :nl | |
31748 | h | |
d0ac1c44 | 31749 | s/\(.\{148\}\)..*/\1/ |
c971b7fa PA |
31750 | t more1 |
31751 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
31752 | p | |
31753 | n | |
31754 | b repl | |
31755 | :more1 | |
31756 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
31757 | p | |
31758 | g | |
31759 | s/.\{148\}// | |
31760 | t nl | |
31761 | :delim | |
31762 | h | |
d0ac1c44 | 31763 | s/\(.\{148\}\)..*/\1/ |
c971b7fa PA |
31764 | t more2 |
31765 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
31766 | p | |
31767 | b | |
31768 | :more2 | |
31769 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
31770 | p | |
31771 | g | |
31772 | s/.\{148\}// | |
31773 | t delim | |
31774 | ' <conf$$subs.awk | sed ' | |
31775 | /^[^""]/{ | |
31776 | N | |
31777 | s/\n// | |
31778 | } | |
31779 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
31780 | rm -f conf$$subs.awk | |
31781 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
31782 | _ACAWK | |
d0ac1c44 | 31783 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
c971b7fa PA |
31784 | for (key in S) S_is_set[key] = 1 |
31785 | FS = "\a" | |
31786 | ||
31787 | } | |
31788 | { | |
31789 | line = $ 0 | |
31790 | nfields = split(line, field, "@") | |
31791 | substed = 0 | |
31792 | len = length(field[1]) | |
31793 | for (i = 2; i < nfields; i++) { | |
31794 | key = field[i] | |
31795 | keylen = length(key) | |
31796 | if (S_is_set[key]) { | |
31797 | value = S[key] | |
31798 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
31799 | len += length(value) + length(field[++i]) | |
31800 | substed = 1 | |
31801 | } else | |
31802 | len += 1 + keylen | |
31803 | } | |
31804 | ||
31805 | print line | |
31806 | } | |
31807 | ||
31808 | _ACAWK | |
31809 | _ACEOF | |
31810 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31811 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
31812 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
31813 | else | |
31814 | cat | |
d0ac1c44 SM |
31815 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
31816 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
c971b7fa PA |
31817 | _ACEOF |
31818 | ||
d0ac1c44 SM |
31819 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
31820 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
c971b7fa PA |
31821 | # trailing colons and then remove the whole line if VPATH becomes empty |
31822 | # (actually we leave an empty line to preserve line numbers). | |
31823 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
31824 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
31825 | h | |
31826 | s/// | |
31827 | s/^/:/ | |
31828 | s/[ ]*$/:/ | |
31829 | s/:\$(srcdir):/:/g | |
31830 | s/:\${srcdir}:/:/g | |
31831 | s/:@srcdir@:/:/g | |
31832 | s/^:*// | |
c971b7fa | 31833 | s/:*$// |
d0ac1c44 SM |
31834 | x |
31835 | s/\(=[ ]*\).*/\1/ | |
31836 | G | |
31837 | s/\n// | |
c971b7fa PA |
31838 | s/^[^=]*=[ ]*$// |
31839 | }' | |
31840 | fi | |
31841 | ||
31842 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
31843 | fi # test -n "$CONFIG_FILES" | |
31844 | ||
31845 | # Set up the scripts for CONFIG_HEADERS section. | |
31846 | # No need to generate them if there are no CONFIG_HEADERS. | |
31847 | # This happens for instance with `./config.status Makefile'. | |
31848 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 31849 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
c971b7fa PA |
31850 | BEGIN { |
31851 | _ACEOF | |
31852 | ||
31853 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
31854 | # here-document in config.status, that substitutes the proper values into | |
31855 | # config.h.in to produce config.h. | |
31856 | ||
31857 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
31858 | # handling of long lines. | |
31859 | ac_delim='%!_!# ' | |
31860 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
31861 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
31862 | if test -z "$ac_tt"; then | |
c971b7fa PA |
31863 | break |
31864 | elif $ac_last_try; then | |
d0ac1c44 | 31865 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
c971b7fa PA |
31866 | else |
31867 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
31868 | fi | |
31869 | done | |
31870 | ||
31871 | # For the awk script, D is an array of macro values keyed by name, | |
31872 | # likewise P contains macro parameters if any. Preserve backslash | |
31873 | # newline sequences. | |
31874 | ||
31875 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
31876 | sed -n ' | |
31877 | s/.\{148\}/&'"$ac_delim"'/g | |
31878 | t rset | |
31879 | :rset | |
31880 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
31881 | t def | |
31882 | d | |
31883 | :def | |
31884 | s/\\$// | |
31885 | t bsnl | |
31886 | s/["\\]/\\&/g | |
31887 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
31888 | D["\1"]=" \3"/p | |
31889 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
31890 | d | |
31891 | :bsnl | |
31892 | s/["\\]/\\&/g | |
31893 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
31894 | D["\1"]=" \3\\\\\\n"\\/p | |
31895 | t cont | |
31896 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
31897 | t cont | |
31898 | d | |
31899 | :cont | |
31900 | n | |
31901 | s/.\{148\}/&'"$ac_delim"'/g | |
31902 | t clear | |
31903 | :clear | |
31904 | s/\\$// | |
31905 | t bsnlc | |
31906 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
31907 | d | |
31908 | :bsnlc | |
31909 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
31910 | b cont | |
31911 | ' <confdefs.h | sed ' | |
31912 | s/'"$ac_delim"'/"\\\ | |
31913 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
31914 | ||
31915 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
31916 | for (key in D) D_is_set[key] = 1 | |
31917 | FS = "\a" | |
31918 | } | |
31919 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
31920 | line = \$ 0 | |
31921 | split(line, arg, " ") | |
31922 | if (arg[1] == "#") { | |
31923 | defundef = arg[2] | |
31924 | mac1 = arg[3] | |
31925 | } else { | |
31926 | defundef = substr(arg[1], 2) | |
31927 | mac1 = arg[2] | |
31928 | } | |
31929 | split(mac1, mac2, "(") #) | |
31930 | macro = mac2[1] | |
31931 | prefix = substr(line, 1, index(line, defundef) - 1) | |
31932 | if (D_is_set[macro]) { | |
31933 | # Preserve the white space surrounding the "#". | |
31934 | print prefix "define", macro P[macro] D[macro] | |
31935 | next | |
31936 | } else { | |
31937 | # Replace #undef with comments. This is necessary, for example, | |
31938 | # in the case of _POSIX_SOURCE, which is predefined and required | |
31939 | # on some systems where configure will not decide to define it. | |
31940 | if (defundef == "undef") { | |
31941 | print "/*", prefix defundef, macro, "*/" | |
31942 | next | |
31943 | } | |
31944 | } | |
31945 | } | |
31946 | { print } | |
31947 | _ACAWK | |
31948 | _ACEOF | |
31949 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 31950 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
c971b7fa PA |
31951 | fi # test -n "$CONFIG_HEADERS" |
31952 | ||
31953 | ||
31954 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
31955 | shift | |
31956 | for ac_tag | |
31957 | do | |
31958 | case $ac_tag in | |
31959 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
31960 | esac | |
31961 | case $ac_mode$ac_tag in | |
31962 | :[FHL]*:*);; | |
d0ac1c44 | 31963 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
c971b7fa PA |
31964 | :[FH]-) ac_tag=-:-;; |
31965 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
31966 | esac | |
31967 | ac_save_IFS=$IFS | |
31968 | IFS=: | |
31969 | set x $ac_tag | |
31970 | IFS=$ac_save_IFS | |
31971 | shift | |
31972 | ac_file=$1 | |
31973 | shift | |
31974 | ||
31975 | case $ac_mode in | |
31976 | :L) ac_source=$1;; | |
31977 | :[FH]) | |
31978 | ac_file_inputs= | |
31979 | for ac_f | |
31980 | do | |
31981 | case $ac_f in | |
d0ac1c44 | 31982 | -) ac_f="$ac_tmp/stdin";; |
c971b7fa PA |
31983 | *) # Look for the file first in the build tree, then in the source tree |
31984 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
31985 | # because $ac_f cannot contain `:'. | |
31986 | test -f "$ac_f" || | |
31987 | case $ac_f in | |
31988 | [\\/$]*) false;; | |
31989 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
31990 | esac || | |
d0ac1c44 | 31991 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
c971b7fa PA |
31992 | esac |
31993 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
31994 | as_fn_append ac_file_inputs " '$ac_f'" | |
31995 | done | |
31996 | ||
31997 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
31998 | # use $as_me), people would be surprised to read: | |
31999 | # /* config.h. Generated by config.status. */ | |
32000 | configure_input='Generated from '` | |
32001 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
32002 | `' by configure.' | |
32003 | if test x"$ac_file" != x-; then | |
32004 | configure_input="$ac_file. $configure_input" | |
32005 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
32006 | $as_echo "$as_me: creating $ac_file" >&6;} | |
32007 | fi | |
32008 | # Neutralize special characters interpreted by sed in replacement strings. | |
32009 | case $configure_input in #( | |
32010 | *\&* | *\|* | *\\* ) | |
32011 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
32012 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
32013 | *) ac_sed_conf_input=$configure_input;; | |
32014 | esac | |
32015 | ||
32016 | case $ac_tag in | |
d0ac1c44 SM |
32017 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
32018 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
c971b7fa PA |
32019 | esac |
32020 | ;; | |
32021 | esac | |
32022 | ||
32023 | ac_dir=`$as_dirname -- "$ac_file" || | |
32024 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32025 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
32026 | X"$ac_file" : 'X\(//\)$' \| \ | |
32027 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
32028 | $as_echo X"$ac_file" | | |
32029 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32030 | s//\1/ | |
32031 | q | |
32032 | } | |
32033 | /^X\(\/\/\)[^/].*/{ | |
32034 | s//\1/ | |
32035 | q | |
32036 | } | |
32037 | /^X\(\/\/\)$/{ | |
32038 | s//\1/ | |
32039 | q | |
32040 | } | |
32041 | /^X\(\/\).*/{ | |
32042 | s//\1/ | |
32043 | q | |
32044 | } | |
32045 | s/.*/./; q'` | |
32046 | as_dir="$ac_dir"; as_fn_mkdir_p | |
32047 | ac_builddir=. | |
32048 | ||
32049 | case "$ac_dir" in | |
32050 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
32051 | *) | |
32052 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
32053 | # A ".." for each directory in $ac_dir_suffix. | |
32054 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
32055 | case $ac_top_builddir_sub in | |
32056 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
32057 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
32058 | esac ;; | |
32059 | esac | |
32060 | ac_abs_top_builddir=$ac_pwd | |
32061 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
32062 | # for backward compatibility: | |
32063 | ac_top_builddir=$ac_top_build_prefix | |
32064 | ||
32065 | case $srcdir in | |
32066 | .) # We are building in place. | |
32067 | ac_srcdir=. | |
32068 | ac_top_srcdir=$ac_top_builddir_sub | |
32069 | ac_abs_top_srcdir=$ac_pwd ;; | |
32070 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
32071 | ac_srcdir=$srcdir$ac_dir_suffix; | |
32072 | ac_top_srcdir=$srcdir | |
32073 | ac_abs_top_srcdir=$srcdir ;; | |
32074 | *) # Relative name. | |
32075 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
32076 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
32077 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
32078 | esac | |
32079 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
32080 | ||
32081 | ||
32082 | case $ac_mode in | |
32083 | :F) | |
32084 | # | |
32085 | # CONFIG_FILE | |
32086 | # | |
32087 | ||
32088 | case $INSTALL in | |
32089 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
32090 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
32091 | esac | |
32092 | ac_MKDIR_P=$MKDIR_P | |
32093 | case $MKDIR_P in | |
32094 | [\\/$]* | ?:[\\/]* ) ;; | |
32095 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
32096 | esac | |
32097 | _ACEOF | |
32098 | ||
32099 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32100 | # If the template does not know about datarootdir, expand it. | |
32101 | # FIXME: This hack should be removed a few years after 2.60. | |
32102 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
32103 | ac_sed_dataroot=' | |
32104 | /datarootdir/ { | |
32105 | p | |
32106 | q | |
32107 | } | |
32108 | /@datadir@/p | |
32109 | /@docdir@/p | |
32110 | /@infodir@/p | |
32111 | /@localedir@/p | |
32112 | /@mandir@/p' | |
32113 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
32114 | *datarootdir*) ac_datarootdir_seen=yes;; | |
32115 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
32116 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
32117 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
32118 | _ACEOF | |
32119 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32120 | ac_datarootdir_hack=' | |
32121 | s&@datadir@&$datadir&g | |
32122 | s&@docdir@&$docdir&g | |
32123 | s&@infodir@&$infodir&g | |
32124 | s&@localedir@&$localedir&g | |
32125 | s&@mandir@&$mandir&g | |
32126 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
32127 | esac | |
32128 | _ACEOF | |
32129 | ||
32130 | # Neutralize VPATH when `$srcdir' = `.'. | |
32131 | # Shell code in configure.ac might set extrasub. | |
32132 | # FIXME: do we really want to maintain this feature? | |
32133 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32134 | ac_sed_extra="$ac_vpsub | |
32135 | $extrasub | |
32136 | _ACEOF | |
32137 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32138 | :t | |
32139 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
32140 | s|@configure_input@|$ac_sed_conf_input|;t t | |
32141 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
32142 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
32143 | s&@srcdir@&$ac_srcdir&;t t | |
32144 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
32145 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
32146 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
32147 | s&@builddir@&$ac_builddir&;t t | |
32148 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
32149 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
32150 | s&@INSTALL@&$ac_INSTALL&;t t | |
32151 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
32152 | $ac_datarootdir_hack | |
32153 | " | |
d0ac1c44 SM |
32154 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
32155 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
c971b7fa PA |
32156 | |
32157 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
32158 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
32159 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
32160 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
c971b7fa | 32161 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 32162 | which seems to be undefined. Please make sure it is defined" >&5 |
c971b7fa | 32163 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 32164 | which seems to be undefined. Please make sure it is defined" >&2;} |
c971b7fa | 32165 | |
d0ac1c44 | 32166 | rm -f "$ac_tmp/stdin" |
c971b7fa | 32167 | case $ac_file in |
d0ac1c44 SM |
32168 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
32169 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
c971b7fa | 32170 | esac \ |
d0ac1c44 | 32171 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
c971b7fa PA |
32172 | ;; |
32173 | :H) | |
32174 | # | |
32175 | # CONFIG_HEADER | |
32176 | # | |
32177 | if test x"$ac_file" != x-; then | |
32178 | { | |
32179 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
32180 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
32181 | } >"$ac_tmp/config.h" \ | |
32182 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
32183 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
c971b7fa PA |
32184 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
32185 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
32186 | else | |
32187 | rm -f "$ac_file" | |
d0ac1c44 SM |
32188 | mv "$ac_tmp/config.h" "$ac_file" \ |
32189 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
c971b7fa PA |
32190 | fi |
32191 | else | |
32192 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
32193 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
32194 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
c971b7fa PA |
32195 | fi |
32196 | # Compute "$ac_file"'s index in $config_headers. | |
32197 | _am_arg="$ac_file" | |
32198 | _am_stamp_count=1 | |
32199 | for _am_header in $config_headers :; do | |
32200 | case $_am_header in | |
32201 | $_am_arg | $_am_arg:* ) | |
32202 | break ;; | |
32203 | * ) | |
32204 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
32205 | esac | |
32206 | done | |
32207 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
32208 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32209 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
32210 | X"$_am_arg" : 'X\(//\)$' \| \ | |
32211 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
32212 | $as_echo X"$_am_arg" | | |
32213 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32214 | s//\1/ | |
32215 | q | |
32216 | } | |
32217 | /^X\(\/\/\)[^/].*/{ | |
32218 | s//\1/ | |
32219 | q | |
32220 | } | |
32221 | /^X\(\/\/\)$/{ | |
32222 | s//\1/ | |
32223 | q | |
32224 | } | |
32225 | /^X\(\/\).*/{ | |
32226 | s//\1/ | |
32227 | q | |
32228 | } | |
32229 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
32230 | ;; | |
32231 | ||
32232 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
32233 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
32234 | ;; | |
32235 | esac | |
32236 | ||
32237 | ||
32238 | case $ac_file$ac_mode in | |
32239 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
d0ac1c44 | 32240 | # Older Autoconf quotes --file arguments for eval, but not when files |
c971b7fa PA |
32241 | # are listed without --file. Let's play safe and only enable the eval |
32242 | # if we detect the quoting. | |
32243 | case $CONFIG_FILES in | |
32244 | *\'*) eval set x "$CONFIG_FILES" ;; | |
32245 | *) set x $CONFIG_FILES ;; | |
32246 | esac | |
32247 | shift | |
32248 | for mf | |
32249 | do | |
32250 | # Strip MF so we end up with the name of the file. | |
32251 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
32252 | # Check whether this is an Automake generated Makefile or not. | |
d0ac1c44 | 32253 | # We used to match only the files named 'Makefile.in', but |
c971b7fa PA |
32254 | # some people rename them; so instead we look at the file content. |
32255 | # Grep'ing the first line is not enough: some people post-process | |
32256 | # each Makefile.in and add a new line on top of each file to say so. | |
32257 | # Grep'ing the whole file is not good either: AIX grep has a line | |
32258 | # limit of 2048, but all sed's we know have understand at least 4000. | |
32259 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
32260 | dirpart=`$as_dirname -- "$mf" || | |
32261 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32262 | X"$mf" : 'X\(//\)[^/]' \| \ | |
32263 | X"$mf" : 'X\(//\)$' \| \ | |
32264 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
32265 | $as_echo X"$mf" | | |
32266 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32267 | s//\1/ | |
32268 | q | |
32269 | } | |
32270 | /^X\(\/\/\)[^/].*/{ | |
32271 | s//\1/ | |
32272 | q | |
32273 | } | |
32274 | /^X\(\/\/\)$/{ | |
32275 | s//\1/ | |
32276 | q | |
32277 | } | |
32278 | /^X\(\/\).*/{ | |
32279 | s//\1/ | |
32280 | q | |
32281 | } | |
32282 | s/.*/./; q'` | |
32283 | else | |
32284 | continue | |
32285 | fi | |
32286 | # Extract the definition of DEPDIR, am__include, and am__quote | |
d0ac1c44 | 32287 | # from the Makefile without running 'make'. |
c971b7fa PA |
32288 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
32289 | test -z "$DEPDIR" && continue | |
32290 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
d0ac1c44 | 32291 | test -z "$am__include" && continue |
c971b7fa | 32292 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
c971b7fa PA |
32293 | # Find all dependency output files, they are included files with |
32294 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
32295 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
32296 | # expansion. | |
32297 | for file in `sed -n " | |
32298 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
d0ac1c44 | 32299 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do |
c971b7fa PA |
32300 | # Make sure the directory exists. |
32301 | test -f "$dirpart/$file" && continue | |
32302 | fdir=`$as_dirname -- "$file" || | |
32303 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32304 | X"$file" : 'X\(//\)[^/]' \| \ | |
32305 | X"$file" : 'X\(//\)$' \| \ | |
32306 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
32307 | $as_echo X"$file" | | |
32308 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32309 | s//\1/ | |
32310 | q | |
32311 | } | |
32312 | /^X\(\/\/\)[^/].*/{ | |
32313 | s//\1/ | |
32314 | q | |
32315 | } | |
32316 | /^X\(\/\/\)$/{ | |
32317 | s//\1/ | |
32318 | q | |
32319 | } | |
32320 | /^X\(\/\).*/{ | |
32321 | s//\1/ | |
32322 | q | |
32323 | } | |
32324 | s/.*/./; q'` | |
32325 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
32326 | # echo "creating $dirpart/$file" | |
32327 | echo '# dummy' > "$dirpart/$file" | |
32328 | done | |
32329 | done | |
32330 | } | |
32331 | ;; | |
32332 | "default":C) | |
32333 | case x$CONFIG_HEADERS in | |
32334 | xconfig.h:config.in) | |
32335 | echo > stamp-h ;; | |
32336 | esac | |
32337 | ;; | |
32338 | ||
32339 | esac | |
32340 | done # for ac_tag | |
32341 | ||
32342 | ||
32343 | as_fn_exit 0 | |
32344 | _ACEOF | |
32345 | ac_clean_files=$ac_clean_files_save | |
32346 | ||
32347 | test $ac_write_fail = 0 || | |
d0ac1c44 | 32348 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
32349 | |
32350 | ||
32351 | # configure is writing to config.log, and then calls config.status. | |
32352 | # config.status does its own redirection, appending to config.log. | |
32353 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
32354 | # by configure, so config.status won't be able to write to it; its | |
32355 | # output is simply discarded. So we exec the FD to /dev/null, | |
32356 | # effectively closing config.log, so it can be properly (re)opened and | |
32357 | # appended to by config.status. When coming back to configure, we | |
32358 | # need to make the FD available again. | |
32359 | if test "$no_create" != yes; then | |
32360 | ac_cs_success=: | |
32361 | ac_config_status_args= | |
32362 | test "$silent" = yes && | |
32363 | ac_config_status_args="$ac_config_status_args --quiet" | |
32364 | exec 5>/dev/null | |
32365 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
32366 | exec 5>>config.log | |
32367 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
32368 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 32369 | $ac_cs_success || as_fn_exit 1 |
c971b7fa PA |
32370 | fi |
32371 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
32372 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
32373 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
32374 | fi | |
32375 | ||
32376 | ||
32377 | exit 0 |