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" |
9c9d63b1 | 586 | ac_header_list= |
c971b7fa PA |
587 | # Factoring default headers for most tests. |
588 | ac_includes_default="\ | |
589 | #include <stdio.h> | |
590 | #ifdef HAVE_SYS_TYPES_H | |
591 | # include <sys/types.h> | |
592 | #endif | |
593 | #ifdef HAVE_SYS_STAT_H | |
594 | # include <sys/stat.h> | |
595 | #endif | |
596 | #ifdef STDC_HEADERS | |
597 | # include <stdlib.h> | |
598 | # include <stddef.h> | |
599 | #else | |
600 | # ifdef HAVE_STDLIB_H | |
601 | # include <stdlib.h> | |
602 | # endif | |
603 | #endif | |
604 | #ifdef HAVE_STRING_H | |
605 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
606 | # include <memory.h> | |
607 | # endif | |
608 | # include <string.h> | |
609 | #endif | |
610 | #ifdef HAVE_STRINGS_H | |
611 | # include <strings.h> | |
612 | #endif | |
613 | #ifdef HAVE_INTTYPES_H | |
614 | # include <inttypes.h> | |
615 | #endif | |
616 | #ifdef HAVE_STDINT_H | |
617 | # include <stdint.h> | |
618 | #endif | |
619 | #ifdef HAVE_UNISTD_H | |
620 | # include <unistd.h> | |
621 | #endif" | |
622 | ||
5abebf3c | 623 | gl_use_threads_default= |
c0c3707f | 624 | gl_use_winpthreads_default= |
c0c3707f | 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 | |
9c9d63b1 | 701 | TIME_H_DEFINES_TIME_UTC |
4a626d0a | 702 | UNISTD_H_DEFINES_STRUCT_TIMESPEC |
09607c9e TT |
703 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
704 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
705 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
706 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
707 | NEXT_TIME_H | |
9c9d63b1 PM |
708 | REPLACE_LOCALTIME |
709 | REPLACE_GMTIME | |
710 | REPLACE_TZSET | |
711 | REPLACE_TIMEGM | |
712 | REPLACE_STRFTIME | |
713 | REPLACE_NANOSLEEP | |
714 | REPLACE_MKTIME | |
715 | REPLACE_LOCALTIME_R | |
716 | REPLACE_CTIME | |
717 | HAVE_TIMEZONE_T | |
718 | HAVE_TIMESPEC_GET | |
719 | HAVE_TIMEGM | |
720 | HAVE_STRPTIME | |
721 | HAVE_NANOSLEEP | |
722 | HAVE_DECL_LOCALTIME_R | |
723 | GNULIB_MDA_TZSET | |
724 | GNULIB_TZSET | |
725 | GNULIB_TIME_RZ | |
726 | GNULIB_TIME_R | |
727 | GNULIB_TIMESPEC_GET | |
728 | GNULIB_TIMEGM | |
729 | GNULIB_STRPTIME | |
730 | GNULIB_STRFTIME | |
731 | GNULIB_NANOSLEEP | |
732 | GNULIB_LOCALTIME | |
733 | GNULIB_MKTIME | |
734 | GNULIB_CTIME | |
725e2999 JB |
735 | HAVE_SYS_UIO_H |
736 | NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H | |
737 | NEXT_SYS_UIO_H | |
c0c3707f | 738 | WINDOWS_STAT_INODES |
63ce7108 TT |
739 | WINDOWS_64_BIT_OFF_T |
740 | NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H | |
741 | NEXT_SYS_TYPES_H | |
698be2d8 CB |
742 | HAVE_SYS_RANDOM_H |
743 | NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H | |
744 | NEXT_SYS_RANDOM_H | |
32e2770e MF |
745 | HAVE_STRINGS_H |
746 | NEXT_AS_FIRST_DIRECTIVE_STRINGS_H | |
747 | NEXT_STRINGS_H | |
2196f55f YQ |
748 | NEXT_AS_FIRST_DIRECTIVE_STRING_H |
749 | NEXT_STRING_H | |
98399780 YQ |
750 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
751 | NEXT_STDLIB_H | |
6a29c58e YQ |
752 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
753 | NEXT_STDIO_H | |
2196f55f YQ |
754 | HAVE__BOOL |
755 | GL_GENERATE_STDBOOL_H_FALSE | |
756 | GL_GENERATE_STDBOOL_H_TRUE | |
757 | STDBOOL_H | |
725e2999 JB |
758 | GL_GENERATE_STDALIGN_H_FALSE |
759 | GL_GENERATE_STDALIGN_H_TRUE | |
760 | STDALIGN_H | |
0750520d PA |
761 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
762 | NEXT_SIGNAL_H | |
763 | REPLACE_RAISE | |
764 | REPLACE_PTHREAD_SIGMASK | |
765 | HAVE_SIGHANDLER_T | |
766 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
767 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
768 | HAVE_SIGACTION | |
769 | HAVE_SIGINFO_T | |
770 | HAVE_SIGSET_T | |
771 | HAVE_RAISE | |
772 | HAVE_PTHREAD_SIGMASK | |
773 | HAVE_POSIX_SIGNALBLOCKING | |
774 | GNULIB_SIGACTION | |
775 | GNULIB_SIGPROCMASK | |
776 | GNULIB_SIGNAL_H_SIGPIPE | |
777 | GNULIB_RAISE | |
778 | GNULIB_PTHREAD_SIGMASK | |
725e2999 JB |
779 | GL_GENERATE_NETINET_IN_H_FALSE |
780 | GL_GENERATE_NETINET_IN_H_TRUE | |
781 | NETINET_IN_H | |
782 | HAVE_NETINET_IN_H | |
783 | NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H | |
784 | NEXT_NETINET_IN_H | |
c971b7fa | 785 | UNDEFINE_STRTOK_R |
c971b7fa | 786 | REPLACE_STRSIGNAL |
9c9d63b1 | 787 | REPLACE_STRERRORNAME_NP |
c971b7fa PA |
788 | REPLACE_STRERROR_R |
789 | REPLACE_STRERROR | |
c0c3707f | 790 | REPLACE_STRTOK_R |
c971b7fa PA |
791 | REPLACE_STRCASESTR |
792 | REPLACE_STRSTR | |
c0c3707f CB |
793 | REPLACE_STRNLEN |
794 | REPLACE_STRNDUP | |
795 | REPLACE_STRNCAT | |
c971b7fa | 796 | REPLACE_STRDUP |
c0c3707f | 797 | REPLACE_STRCHRNUL |
c971b7fa PA |
798 | REPLACE_STPNCPY |
799 | REPLACE_MEMMEM | |
800 | REPLACE_MEMCHR | |
9c9d63b1 | 801 | REPLACE_FFSLL |
c971b7fa PA |
802 | HAVE_STRVERSCMP |
803 | HAVE_DECL_STRSIGNAL | |
9c9d63b1 PM |
804 | HAVE_SIGDESCR_NP |
805 | HAVE_SIGABBREV_NP | |
806 | HAVE_STRERRORNAME_NP | |
c971b7fa PA |
807 | HAVE_DECL_STRERROR_R |
808 | HAVE_DECL_STRTOK_R | |
809 | HAVE_STRCASESTR | |
810 | HAVE_STRSEP | |
811 | HAVE_STRPBRK | |
812 | HAVE_DECL_STRNLEN | |
813 | HAVE_DECL_STRNDUP | |
814 | HAVE_DECL_STRDUP | |
815 | HAVE_STRCHRNUL | |
816 | HAVE_STPNCPY | |
817 | HAVE_STPCPY | |
818 | HAVE_RAWMEMCHR | |
819 | HAVE_DECL_MEMRCHR | |
820 | HAVE_MEMPCPY | |
821 | HAVE_DECL_MEMMEM | |
c971b7fa PA |
822 | HAVE_FFSLL |
823 | HAVE_FFSL | |
c0c3707f | 824 | HAVE_EXPLICIT_BZERO |
9c9d63b1 PM |
825 | GNULIB_MDA_STRDUP |
826 | GNULIB_MDA_MEMCCPY | |
c971b7fa PA |
827 | HAVE_MBSLEN |
828 | GNULIB_STRVERSCMP | |
829 | GNULIB_STRSIGNAL | |
9c9d63b1 PM |
830 | GNULIB_SIGDESCR_NP |
831 | GNULIB_SIGABBREV_NP | |
832 | GNULIB_STRERRORNAME_NP | |
c971b7fa PA |
833 | GNULIB_STRERROR_R |
834 | GNULIB_STRERROR | |
835 | GNULIB_MBSTOK_R | |
836 | GNULIB_MBSSEP | |
837 | GNULIB_MBSSPN | |
838 | GNULIB_MBSPBRK | |
839 | GNULIB_MBSCSPN | |
840 | GNULIB_MBSCASESTR | |
841 | GNULIB_MBSPCASECMP | |
842 | GNULIB_MBSNCASECMP | |
843 | GNULIB_MBSCASECMP | |
844 | GNULIB_MBSSTR | |
845 | GNULIB_MBSRCHR | |
846 | GNULIB_MBSCHR | |
847 | GNULIB_MBSNLEN | |
848 | GNULIB_MBSLEN | |
849 | GNULIB_STRTOK_R | |
850 | GNULIB_STRCASESTR | |
851 | GNULIB_STRSTR | |
852 | GNULIB_STRSEP | |
853 | GNULIB_STRPBRK | |
854 | GNULIB_STRNLEN | |
855 | GNULIB_STRNDUP | |
856 | GNULIB_STRNCAT | |
857 | GNULIB_STRDUP | |
858 | GNULIB_STRCHRNUL | |
859 | GNULIB_STPNCPY | |
860 | GNULIB_STPCPY | |
861 | GNULIB_RAWMEMCHR | |
862 | GNULIB_MEMRCHR | |
863 | GNULIB_MEMPCPY | |
864 | GNULIB_MEMMEM | |
865 | GNULIB_MEMCHR | |
866 | GNULIB_FFSLL | |
867 | GNULIB_FFSL | |
c0c3707f | 868 | GNULIB_EXPLICIT_BZERO |
5df4cba6 SM |
869 | HAVE_VISIBILITY |
870 | CFLAG_VISIBILITY | |
871 | LIB_MBRTOWC | |
8690e634 | 872 | LOCALE_ZH_CN |
c0c3707f | 873 | LOCALE_FR_UTF8 |
8690e634 | 874 | LOCALE_JA |
88b48903 WN |
875 | NEXT_AS_FIRST_DIRECTIVE_MATH_H |
876 | NEXT_MATH_H | |
5abebf3c CB |
877 | LTLIBMULTITHREAD |
878 | LIBMULTITHREAD | |
879 | LTLIBTHREAD | |
880 | LIBTHREAD | |
5df4cba6 SM |
881 | LIBSTDTHREAD |
882 | NEXT_AS_FIRST_DIRECTIVE_LOCALE_H | |
883 | NEXT_LOCALE_H | |
884 | HAVE_XLOCALE_H | |
885 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H | |
886 | NEXT_STDDEF_H | |
887 | GL_GENERATE_STDDEF_H_FALSE | |
888 | GL_GENERATE_STDDEF_H_TRUE | |
889 | STDDEF_H | |
890 | HAVE_WCHAR_T | |
891 | HAVE_MAX_ALIGN_T | |
892 | REPLACE_NULL | |
893 | REPLACE_STRUCT_LCONV | |
894 | REPLACE_FREELOCALE | |
895 | REPLACE_DUPLOCALE | |
896 | REPLACE_NEWLOCALE | |
897 | REPLACE_SETLOCALE | |
898 | REPLACE_LOCALECONV | |
899 | HAVE_FREELOCALE | |
900 | HAVE_DUPLOCALE | |
901 | HAVE_NEWLOCALE | |
902 | GNULIB_LOCALENAME | |
903 | GNULIB_DUPLOCALE | |
904 | GNULIB_SETLOCALE_NULL | |
905 | GNULIB_SETLOCALE | |
906 | GNULIB_LOCALECONV | |
8690e634 | 907 | LOCALCHARSET_TESTS_ENVIRONMENT |
c971b7fa PA |
908 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
909 | NEXT_INTTYPES_H | |
910 | UINT64_MAX_EQ_ULONG_MAX | |
911 | UINT32_MAX_LT_UINTMAX_MAX | |
912 | PRIPTR_PREFIX | |
c971b7fa PA |
913 | INT64_MAX_EQ_LONG_MAX |
914 | INT32_MAX_LT_INTMAX_MAX | |
4a626d0a | 915 | REPLACE_STRTOUMAX |
c971b7fa | 916 | REPLACE_STRTOIMAX |
c0c3707f | 917 | HAVE_IMAXDIV_T |
c971b7fa PA |
918 | HAVE_DECL_STRTOUMAX |
919 | HAVE_DECL_STRTOIMAX | |
920 | HAVE_DECL_IMAXDIV | |
921 | HAVE_DECL_IMAXABS | |
922 | GNULIB_STRTOUMAX | |
923 | GNULIB_STRTOIMAX | |
924 | GNULIB_IMAXDIV | |
925 | GNULIB_IMAXABS | |
926 | GL_GENERATE_STDINT_H_FALSE | |
927 | GL_GENERATE_STDINT_H_TRUE | |
928 | STDINT_H | |
49e4877c PA |
929 | HAVE_SYS_INTTYPES_H |
930 | HAVE_SYS_BITYPES_H | |
931 | HAVE_C99_STDINT_H | |
c971b7fa PA |
932 | WINT_T_SUFFIX |
933 | WCHAR_T_SUFFIX | |
934 | SIG_ATOMIC_T_SUFFIX | |
935 | SIZE_T_SUFFIX | |
936 | PTRDIFF_T_SUFFIX | |
937 | HAVE_SIGNED_WINT_T | |
938 | HAVE_SIGNED_WCHAR_T | |
939 | HAVE_SIGNED_SIG_ATOMIC_T | |
940 | BITSIZEOF_WINT_T | |
941 | BITSIZEOF_WCHAR_T | |
942 | BITSIZEOF_SIG_ATOMIC_T | |
943 | BITSIZEOF_SIZE_T | |
944 | BITSIZEOF_PTRDIFF_T | |
945 | APPLE_UNIVERSAL_BUILD | |
c971b7fa PA |
946 | HAVE_STDINT_H |
947 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
948 | NEXT_STDINT_H | |
c971b7fa PA |
949 | HAVE_SYS_TYPES_H |
950 | HAVE_INTTYPES_H | |
951 | HAVE_WCHAR_H | |
c0c3707f | 952 | GNULIB_OVERRIDES_WINT_T |
49e4877c PA |
953 | GL_GENERATE_LIMITS_H_FALSE |
954 | GL_GENERATE_LIMITS_H_TRUE | |
955 | LIMITS_H | |
956 | NEXT_AS_FIRST_DIRECTIVE_LIMITS_H | |
957 | NEXT_LIMITS_H | |
725e2999 JB |
958 | HAVE_SYS_SOCKET_H |
959 | NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H | |
960 | NEXT_SYS_SOCKET_H | |
961 | HAVE_ACCEPT4 | |
962 | HAVE_SA_FAMILY_T | |
963 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY | |
964 | HAVE_STRUCT_SOCKADDR_STORAGE | |
965 | GNULIB_ACCEPT4 | |
966 | GNULIB_SHUTDOWN | |
967 | GNULIB_SETSOCKOPT | |
968 | GNULIB_SENDTO | |
969 | GNULIB_RECVFROM | |
970 | GNULIB_SEND | |
971 | GNULIB_RECV | |
972 | GNULIB_LISTEN | |
973 | GNULIB_GETSOCKOPT | |
974 | GNULIB_GETSOCKNAME | |
975 | GNULIB_GETPEERNAME | |
976 | GNULIB_BIND | |
977 | GNULIB_ACCEPT | |
978 | GNULIB_CONNECT | |
979 | GNULIB_SOCKET | |
980 | INET_NTOP_LIB | |
5df4cba6 SM |
981 | LIB_HARD_LOCALE |
982 | LIB_SETLOCALE_NULL | |
983 | LIB_SCHED_YIELD | |
984 | LIBPMULTITHREAD | |
985 | LIBPTHREAD | |
6ec2e0f5 SDJ |
986 | GL_GENERATE_GLOB_H_FALSE |
987 | GL_GENERATE_GLOB_H_TRUE | |
988 | GLOB_H | |
c0c3707f CB |
989 | HAVE_GLOB_H |
990 | NEXT_AS_FIRST_DIRECTIVE_GLOB_H | |
991 | NEXT_GLOB_H | |
992 | REPLACE_GLOB_PATTERN_P | |
993 | REPLACE_GLOB | |
994 | HAVE_GLOB_PATTERN_P | |
995 | HAVE_GLOB | |
996 | GNULIB_GLOB | |
4a626d0a PA |
997 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H |
998 | NEXT_SYS_TIME_H | |
999 | REPLACE_STRUCT_TIMEVAL | |
1000 | REPLACE_GETTIMEOFDAY | |
4a626d0a PA |
1001 | HAVE_SYS_TIME_H |
1002 | HAVE_STRUCT_TIMEVAL | |
1003 | HAVE_GETTIMEOFDAY | |
1004 | GNULIB_GETTIMEOFDAY | |
6ec2e0f5 SDJ |
1005 | LTLIBINTL |
1006 | LIBINTL | |
698be2d8 CB |
1007 | LIB_GETRANDOM |
1008 | REPLACE_GETRANDOM | |
1009 | HAVE_GETRANDOM | |
1010 | GNULIB_GETRANDOM | |
c0c3707f | 1011 | LIB_GETLOGIN |
c17253b9 MF |
1012 | REPLACE_VSPRINTF |
1013 | REPLACE_VSNPRINTF | |
1014 | REPLACE_VPRINTF | |
1015 | REPLACE_VFPRINTF | |
1016 | REPLACE_VDPRINTF | |
1017 | REPLACE_VASPRINTF | |
1018 | REPLACE_TMPFILE | |
1019 | REPLACE_STDIO_WRITE_FUNCS | |
1020 | REPLACE_STDIO_READ_FUNCS | |
1021 | REPLACE_SPRINTF | |
1022 | REPLACE_SNPRINTF | |
1023 | REPLACE_RENAMEAT | |
1024 | REPLACE_RENAME | |
1025 | REPLACE_REMOVE | |
1026 | REPLACE_PRINTF | |
1027 | REPLACE_POPEN | |
1028 | REPLACE_PERROR | |
1029 | REPLACE_OBSTACK_PRINTF | |
1030 | REPLACE_GETLINE | |
1031 | REPLACE_GETDELIM | |
1032 | REPLACE_FTELLO | |
1033 | REPLACE_FTELL | |
1034 | REPLACE_FSEEKO | |
1035 | REPLACE_FSEEK | |
1036 | REPLACE_FREOPEN | |
1037 | REPLACE_FPURGE | |
1038 | REPLACE_FPRINTF | |
1039 | REPLACE_FOPEN | |
1040 | REPLACE_FFLUSH | |
1041 | REPLACE_FDOPEN | |
1042 | REPLACE_FCLOSE | |
1043 | REPLACE_DPRINTF | |
1044 | HAVE_VDPRINTF | |
1045 | HAVE_VASPRINTF | |
1046 | HAVE_RENAMEAT | |
1047 | HAVE_POPEN | |
1048 | HAVE_PCLOSE | |
1049 | HAVE_FTELLO | |
1050 | HAVE_FSEEKO | |
1051 | HAVE_DPRINTF | |
1052 | HAVE_DECL_VSNPRINTF | |
1053 | HAVE_DECL_SNPRINTF | |
1054 | HAVE_DECL_OBSTACK_PRINTF | |
1055 | HAVE_DECL_GETLINE | |
1056 | HAVE_DECL_GETDELIM | |
1057 | HAVE_DECL_FTELLO | |
1058 | HAVE_DECL_FSEEKO | |
1059 | HAVE_DECL_FPURGE | |
1060 | HAVE_DECL_FCLOSEALL | |
1061 | GNULIB_MDA_TEMPNAM | |
1062 | GNULIB_MDA_PUTW | |
1063 | GNULIB_MDA_GETW | |
1064 | GNULIB_MDA_FILENO | |
1065 | GNULIB_MDA_FDOPEN | |
1066 | GNULIB_MDA_FCLOSEALL | |
1067 | GNULIB_VSPRINTF_POSIX | |
1068 | GNULIB_VSNPRINTF | |
1069 | GNULIB_VPRINTF_POSIX | |
1070 | GNULIB_VPRINTF | |
1071 | GNULIB_VFPRINTF_POSIX | |
1072 | GNULIB_VFPRINTF | |
1073 | GNULIB_VDPRINTF | |
1074 | GNULIB_VSCANF | |
1075 | GNULIB_VFSCANF | |
1076 | GNULIB_VASPRINTF | |
1077 | GNULIB_TMPFILE | |
1078 | GNULIB_STDIO_H_SIGPIPE | |
1079 | GNULIB_STDIO_H_NONBLOCKING | |
1080 | GNULIB_SPRINTF_POSIX | |
1081 | GNULIB_SNPRINTF | |
1082 | GNULIB_SCANF | |
1083 | GNULIB_RENAMEAT | |
1084 | GNULIB_RENAME | |
1085 | GNULIB_REMOVE | |
1086 | GNULIB_PUTS | |
1087 | GNULIB_PUTCHAR | |
1088 | GNULIB_PUTC | |
1089 | GNULIB_PRINTF_POSIX | |
1090 | GNULIB_PRINTF | |
1091 | GNULIB_POPEN | |
1092 | GNULIB_PERROR | |
1093 | GNULIB_PCLOSE | |
1094 | GNULIB_OBSTACK_PRINTF_POSIX | |
1095 | GNULIB_OBSTACK_PRINTF | |
1096 | GNULIB_GETLINE | |
1097 | GNULIB_GETDELIM | |
1098 | GNULIB_GETCHAR | |
1099 | GNULIB_GETC | |
1100 | GNULIB_FWRITE | |
1101 | GNULIB_FTELLO | |
1102 | GNULIB_FTELL | |
1103 | GNULIB_FSEEKO | |
1104 | GNULIB_FSEEK | |
1105 | GNULIB_FSCANF | |
1106 | GNULIB_FREOPEN | |
1107 | GNULIB_FREAD | |
1108 | GNULIB_FPUTS | |
1109 | GNULIB_FPUTC | |
1110 | GNULIB_FPURGE | |
1111 | GNULIB_FPRINTF_POSIX | |
1112 | GNULIB_FPRINTF | |
1113 | GNULIB_FOPEN | |
1114 | GNULIB_FGETS | |
1115 | GNULIB_FGETC | |
1116 | GNULIB_FFLUSH | |
1117 | GNULIB_FDOPEN | |
1118 | GNULIB_FCLOSE | |
1119 | GNULIB_DPRINTF | |
6ec2e0f5 | 1120 | WINDOWS_64_BIT_ST_SIZE |
c0c3707f | 1121 | WINDOWS_STAT_TIMESPEC |
6ec2e0f5 SDJ |
1122 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
1123 | NEXT_SYS_STAT_H | |
1124 | REPLACE_UTIMENSAT | |
1125 | REPLACE_STAT | |
9c9d63b1 | 1126 | REPLACE_MKNODAT |
6ec2e0f5 | 1127 | REPLACE_MKNOD |
9c9d63b1 | 1128 | REPLACE_MKFIFOAT |
6ec2e0f5 SDJ |
1129 | REPLACE_MKFIFO |
1130 | REPLACE_MKDIR | |
1131 | REPLACE_LSTAT | |
1132 | REPLACE_FUTIMENS | |
1133 | REPLACE_FSTATAT | |
1134 | REPLACE_FSTAT | |
5df4cba6 | 1135 | REPLACE_FCHMODAT |
6ec2e0f5 SDJ |
1136 | HAVE_UTIMENSAT |
1137 | HAVE_MKNODAT | |
1138 | HAVE_MKNOD | |
1139 | HAVE_MKFIFOAT | |
1140 | HAVE_MKFIFO | |
1141 | HAVE_MKDIRAT | |
1142 | HAVE_LSTAT | |
1143 | HAVE_LCHMOD | |
9c9d63b1 | 1144 | HAVE_GETUMASK |
6ec2e0f5 SDJ |
1145 | HAVE_FUTIMENS |
1146 | HAVE_FSTATAT | |
1147 | HAVE_FCHMODAT | |
9c9d63b1 PM |
1148 | GNULIB_MDA_UMASK |
1149 | GNULIB_MDA_MKDIR | |
1150 | GNULIB_MDA_CHMOD | |
c0c3707f | 1151 | GNULIB_OVERRIDES_STRUCT_STAT |
6ec2e0f5 SDJ |
1152 | GNULIB_UTIMENSAT |
1153 | GNULIB_STAT | |
1154 | GNULIB_MKNODAT | |
1155 | GNULIB_MKNOD | |
1156 | GNULIB_MKFIFOAT | |
1157 | GNULIB_MKFIFO | |
1158 | GNULIB_MKDIRAT | |
9c9d63b1 | 1159 | GNULIB_MKDIR |
6ec2e0f5 SDJ |
1160 | GNULIB_LSTAT |
1161 | GNULIB_LCHMOD | |
9c9d63b1 | 1162 | GNULIB_GETUMASK |
6ec2e0f5 SDJ |
1163 | GNULIB_FUTIMENS |
1164 | GNULIB_FSTATAT | |
1165 | GNULIB_FSTAT | |
1166 | GNULIB_FCHMODAT | |
88b48903 WN |
1167 | FREXPL_LIBM |
1168 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE | |
1169 | FREXP_LIBM | |
1170 | REPLACE_TRUNCL | |
1171 | REPLACE_TRUNCF | |
1172 | REPLACE_TRUNC | |
c0c3707f CB |
1173 | REPLACE_TANHF |
1174 | REPLACE_TANF | |
88b48903 | 1175 | REPLACE_SQRTL |
c0c3707f CB |
1176 | REPLACE_SQRTF |
1177 | REPLACE_SINHF | |
1178 | REPLACE_SINF | |
9c9d63b1 | 1179 | REPLACE_SIGNBIT_USING_BUILTINS |
88b48903 WN |
1180 | REPLACE_SIGNBIT |
1181 | REPLACE_ROUNDL | |
1182 | REPLACE_ROUNDF | |
1183 | REPLACE_ROUND | |
c0c3707f | 1184 | REPLACE_RINTL |
88b48903 WN |
1185 | REPLACE_REMAINDERL |
1186 | REPLACE_REMAINDERF | |
1187 | REPLACE_REMAINDER | |
1188 | REPLACE_NAN | |
1189 | REPLACE_MODFL | |
1190 | REPLACE_MODFF | |
1191 | REPLACE_MODF | |
1192 | REPLACE_LOGBL | |
1193 | REPLACE_LOGBF | |
1194 | REPLACE_LOGB | |
1195 | REPLACE_LOG2L | |
1196 | REPLACE_LOG2F | |
1197 | REPLACE_LOG2 | |
1198 | REPLACE_LOG1PL | |
1199 | REPLACE_LOG1PF | |
1200 | REPLACE_LOG1P | |
1201 | REPLACE_LOG10L | |
1202 | REPLACE_LOG10F | |
1203 | REPLACE_LOG10 | |
1204 | REPLACE_LOGL | |
1205 | REPLACE_LOGF | |
1206 | REPLACE_LOG | |
1207 | REPLACE_LDEXPL | |
1208 | REPLACE_ISNAN | |
1209 | REPLACE_ISINF | |
1210 | REPLACE_ISFINITE | |
c0c3707f | 1211 | REPLACE_ILOGBL |
88b48903 WN |
1212 | REPLACE_ILOGBF |
1213 | REPLACE_ILOGB | |
1214 | REPLACE_HYPOTL | |
1215 | REPLACE_HYPOTF | |
1216 | REPLACE_HYPOT | |
1217 | REPLACE_HUGE_VAL | |
1218 | REPLACE_FREXPL | |
1219 | REPLACE_FREXP | |
1220 | REPLACE_FREXPF | |
1221 | REPLACE_FMODL | |
1222 | REPLACE_FMODF | |
1223 | REPLACE_FMOD | |
1224 | REPLACE_FMAL | |
1225 | REPLACE_FMAF | |
1226 | REPLACE_FMA | |
1227 | REPLACE_FLOORL | |
1228 | REPLACE_FLOORF | |
1229 | REPLACE_FLOOR | |
1230 | REPLACE_FABSL | |
1231 | REPLACE_EXP2L | |
1232 | REPLACE_EXP2 | |
c0c3707f | 1233 | REPLACE_EXPM1L |
88b48903 WN |
1234 | REPLACE_EXPM1F |
1235 | REPLACE_EXPM1 | |
c0c3707f CB |
1236 | REPLACE_EXPL |
1237 | REPLACE_EXPF | |
1238 | REPLACE_COSHF | |
1239 | REPLACE_COSF | |
88b48903 WN |
1240 | REPLACE_CEILL |
1241 | REPLACE_CEILF | |
1242 | REPLACE_CEIL | |
1243 | REPLACE_CBRTL | |
1244 | REPLACE_CBRTF | |
c0c3707f CB |
1245 | REPLACE_ATAN2F |
1246 | REPLACE_ATANF | |
1247 | REPLACE_ASINF | |
1248 | REPLACE_ACOSF | |
88b48903 WN |
1249 | HAVE_DECL_TRUNCL |
1250 | HAVE_DECL_TRUNCF | |
1251 | HAVE_DECL_TRUNC | |
1252 | HAVE_DECL_TANL | |
1253 | HAVE_DECL_SQRTL | |
1254 | HAVE_DECL_SINL | |
1255 | HAVE_DECL_ROUNDL | |
1256 | HAVE_DECL_ROUNDF | |
1257 | HAVE_DECL_ROUND | |
1258 | HAVE_DECL_RINTF | |
1259 | HAVE_DECL_REMAINDERL | |
1260 | HAVE_DECL_REMAINDER | |
1261 | HAVE_DECL_LOGB | |
1262 | HAVE_DECL_LOG2L | |
1263 | HAVE_DECL_LOG2F | |
1264 | HAVE_DECL_LOG2 | |
1265 | HAVE_DECL_LOG10L | |
1266 | HAVE_DECL_LOGL | |
1267 | HAVE_DECL_LDEXPL | |
1268 | HAVE_DECL_FREXPL | |
1269 | HAVE_DECL_FLOORL | |
1270 | HAVE_DECL_FLOORF | |
1271 | HAVE_DECL_EXPM1L | |
1272 | HAVE_DECL_EXP2L | |
1273 | HAVE_DECL_EXP2F | |
1274 | HAVE_DECL_EXP2 | |
1275 | HAVE_DECL_EXPL | |
1276 | HAVE_DECL_COSL | |
1277 | HAVE_DECL_COPYSIGNF | |
1278 | HAVE_DECL_CEILL | |
1279 | HAVE_DECL_CEILF | |
1280 | HAVE_DECL_CBRTL | |
1281 | HAVE_DECL_CBRTF | |
1282 | HAVE_DECL_ATANL | |
1283 | HAVE_DECL_ASINL | |
1284 | HAVE_DECL_ACOSL | |
1285 | HAVE_TANHF | |
1286 | HAVE_TANL | |
1287 | HAVE_TANF | |
1288 | HAVE_SQRTL | |
1289 | HAVE_SQRTF | |
1290 | HAVE_SINHF | |
1291 | HAVE_SINL | |
1292 | HAVE_SINF | |
1293 | HAVE_RINTL | |
1294 | HAVE_RINT | |
1295 | HAVE_REMAINDERF | |
1296 | HAVE_REMAINDER | |
1297 | HAVE_POWF | |
1298 | HAVE_MODFL | |
1299 | HAVE_MODFF | |
1300 | HAVE_LOGBL | |
1301 | HAVE_LOGBF | |
1302 | HAVE_LOG1PL | |
1303 | HAVE_LOG1PF | |
1304 | HAVE_LOG1P | |
1305 | HAVE_LOG10L | |
1306 | HAVE_LOG10F | |
1307 | HAVE_LOGL | |
1308 | HAVE_LOGF | |
1309 | HAVE_LDEXPF | |
1310 | HAVE_ISNANL | |
1311 | HAVE_ISNAND | |
1312 | HAVE_ISNANF | |
1313 | HAVE_ILOGBL | |
1314 | HAVE_ILOGBF | |
1315 | HAVE_ILOGB | |
1316 | HAVE_HYPOTL | |
1317 | HAVE_HYPOTF | |
1318 | HAVE_FREXPF | |
1319 | HAVE_FMODL | |
1320 | HAVE_FMODF | |
1321 | HAVE_FMAL | |
1322 | HAVE_FMAF | |
1323 | HAVE_FMA | |
1324 | HAVE_FABSL | |
1325 | HAVE_FABSF | |
1326 | HAVE_EXPM1F | |
1327 | HAVE_EXPM1 | |
1328 | HAVE_EXPL | |
1329 | HAVE_EXPF | |
1330 | HAVE_COSHF | |
1331 | HAVE_COSL | |
1332 | HAVE_COSF | |
1333 | HAVE_COPYSIGNL | |
1334 | HAVE_COPYSIGN | |
1335 | HAVE_CBRTL | |
1336 | HAVE_CBRTF | |
1337 | HAVE_CBRT | |
1338 | HAVE_ATAN2F | |
1339 | HAVE_ATANL | |
1340 | HAVE_ATANF | |
1341 | HAVE_ASINL | |
1342 | HAVE_ASINF | |
1343 | HAVE_ACOSL | |
1344 | HAVE_ACOSF | |
9c9d63b1 PM |
1345 | GNULIB_MDA_YN |
1346 | GNULIB_MDA_Y1 | |
1347 | GNULIB_MDA_Y0 | |
1348 | GNULIB_MDA_JN | |
1349 | GNULIB_MDA_J1 | |
1350 | GNULIB_MDA_J0 | |
88b48903 WN |
1351 | GNULIB_TRUNCL |
1352 | GNULIB_TRUNCF | |
1353 | GNULIB_TRUNC | |
1354 | GNULIB_TANHF | |
1355 | GNULIB_TANL | |
1356 | GNULIB_TANF | |
1357 | GNULIB_SQRTL | |
1358 | GNULIB_SQRTF | |
1359 | GNULIB_SINHF | |
1360 | GNULIB_SINL | |
1361 | GNULIB_SINF | |
1362 | GNULIB_SIGNBIT | |
1363 | GNULIB_ROUNDL | |
1364 | GNULIB_ROUNDF | |
1365 | GNULIB_ROUND | |
1366 | GNULIB_RINTL | |
1367 | GNULIB_RINTF | |
1368 | GNULIB_RINT | |
1369 | GNULIB_REMAINDERL | |
1370 | GNULIB_REMAINDERF | |
1371 | GNULIB_REMAINDER | |
1372 | GNULIB_POWF | |
1373 | GNULIB_MODFL | |
1374 | GNULIB_MODFF | |
1375 | GNULIB_MODF | |
1376 | GNULIB_LOGBL | |
1377 | GNULIB_LOGBF | |
1378 | GNULIB_LOGB | |
1379 | GNULIB_LOG2L | |
1380 | GNULIB_LOG2F | |
1381 | GNULIB_LOG2 | |
1382 | GNULIB_LOG1PL | |
1383 | GNULIB_LOG1PF | |
1384 | GNULIB_LOG1P | |
1385 | GNULIB_LOG10L | |
1386 | GNULIB_LOG10F | |
1387 | GNULIB_LOG10 | |
1388 | GNULIB_LOGL | |
1389 | GNULIB_LOGF | |
1390 | GNULIB_LOG | |
1391 | GNULIB_LDEXPL | |
1392 | GNULIB_LDEXPF | |
1393 | GNULIB_ISNANL | |
1394 | GNULIB_ISNAND | |
1395 | GNULIB_ISNANF | |
1396 | GNULIB_ISNAN | |
1397 | GNULIB_ISINF | |
1398 | GNULIB_ISFINITE | |
1399 | GNULIB_ILOGBL | |
1400 | GNULIB_ILOGBF | |
1401 | GNULIB_ILOGB | |
1402 | GNULIB_HYPOTL | |
1403 | GNULIB_HYPOTF | |
1404 | GNULIB_HYPOT | |
1405 | GNULIB_FREXPL | |
1406 | GNULIB_FREXP | |
1407 | GNULIB_FREXPF | |
1408 | GNULIB_FMODL | |
1409 | GNULIB_FMODF | |
1410 | GNULIB_FMOD | |
1411 | GNULIB_FMAL | |
1412 | GNULIB_FMAF | |
1413 | GNULIB_FMA | |
1414 | GNULIB_FLOORL | |
1415 | GNULIB_FLOORF | |
1416 | GNULIB_FLOOR | |
1417 | GNULIB_FABSL | |
1418 | GNULIB_FABSF | |
1419 | GNULIB_EXPM1L | |
1420 | GNULIB_EXPM1F | |
1421 | GNULIB_EXPM1 | |
1422 | GNULIB_EXP2L | |
1423 | GNULIB_EXP2F | |
1424 | GNULIB_EXP2 | |
1425 | GNULIB_EXPL | |
1426 | GNULIB_EXPF | |
1427 | GNULIB_COSHF | |
1428 | GNULIB_COSL | |
1429 | GNULIB_COSF | |
1430 | GNULIB_COPYSIGNL | |
1431 | GNULIB_COPYSIGNF | |
1432 | GNULIB_COPYSIGN | |
1433 | GNULIB_CEILL | |
1434 | GNULIB_CEILF | |
1435 | GNULIB_CEIL | |
1436 | GNULIB_CBRTL | |
1437 | GNULIB_CBRTF | |
1438 | GNULIB_CBRT | |
1439 | GNULIB_ATAN2F | |
1440 | GNULIB_ATANL | |
1441 | GNULIB_ATANF | |
1442 | GNULIB_ASINL | |
1443 | GNULIB_ASINF | |
1444 | GNULIB_ACOSL | |
1445 | GNULIB_ACOSF | |
8690e634 JK |
1446 | GL_GENERATE_FNMATCH_H_FALSE |
1447 | GL_GENERATE_FNMATCH_H_TRUE | |
1448 | FNMATCH_H | |
c0c3707f CB |
1449 | HAVE_FNMATCH_H |
1450 | NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H | |
1451 | NEXT_FNMATCH_H | |
1452 | REPLACE_FNMATCH | |
1453 | HAVE_FNMATCH | |
1454 | GNULIB_FNMATCH | |
88b48903 WN |
1455 | REPLACE_ITOLD |
1456 | GL_GENERATE_FLOAT_H_FALSE | |
1457 | GL_GENERATE_FLOAT_H_TRUE | |
1458 | FLOAT_H | |
1459 | NEXT_AS_FIRST_DIRECTIVE_FLOAT_H | |
1460 | NEXT_FLOAT_H | |
32e2770e MF |
1461 | HAVE_DECL_STRNCASECMP |
1462 | HAVE_STRCASECMP | |
1463 | HAVE_FFS | |
1464 | GNULIB_FFS | |
6ec2e0f5 SDJ |
1465 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H |
1466 | NEXT_FCNTL_H | |
1467 | REPLACE_OPENAT | |
1468 | REPLACE_OPEN | |
1469 | REPLACE_FCNTL | |
c0c3707f | 1470 | REPLACE_CREAT |
6ec2e0f5 SDJ |
1471 | HAVE_OPENAT |
1472 | HAVE_FCNTL | |
9c9d63b1 PM |
1473 | GNULIB_MDA_OPEN |
1474 | GNULIB_MDA_CREAT | |
6ec2e0f5 SDJ |
1475 | GNULIB_OPENAT |
1476 | GNULIB_OPEN | |
1477 | GNULIB_NONBLOCKING | |
1478 | GNULIB_FCNTL | |
c0c3707f | 1479 | GNULIB_CREAT |
18848e28 GF |
1480 | EOVERFLOW_VALUE |
1481 | EOVERFLOW_HIDDEN | |
1482 | ENOLINK_VALUE | |
1483 | ENOLINK_HIDDEN | |
1484 | EMULTIHOP_VALUE | |
1485 | EMULTIHOP_HIDDEN | |
1486 | GL_GENERATE_ERRNO_H_FALSE | |
1487 | GL_GENERATE_ERRNO_H_TRUE | |
1488 | ERRNO_H | |
1489 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H | |
1490 | NEXT_ERRNO_H | |
e26b6bb0 TT |
1491 | HAVE_DIRENT_H |
1492 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H | |
1493 | NEXT_DIRENT_H | |
698be2d8 CB |
1494 | NEXT_AS_FIRST_DIRECTIVE_CTYPE_H |
1495 | NEXT_CTYPE_H | |
1496 | HAVE_ISBLANK | |
1497 | GNULIB_ISBLANK | |
e26b6bb0 TT |
1498 | REPLACE_FDOPENDIR |
1499 | REPLACE_DIRFD | |
1500 | REPLACE_CLOSEDIR | |
1501 | REPLACE_OPENDIR | |
1502 | HAVE_ALPHASORT | |
1503 | HAVE_SCANDIR | |
1504 | HAVE_FDOPENDIR | |
1505 | HAVE_DECL_FDOPENDIR | |
1506 | HAVE_DECL_DIRFD | |
1507 | HAVE_CLOSEDIR | |
1508 | HAVE_REWINDDIR | |
1509 | HAVE_READDIR | |
1510 | HAVE_OPENDIR | |
1511 | GNULIB_ALPHASORT | |
1512 | GNULIB_SCANDIR | |
1513 | GNULIB_FDOPENDIR | |
1514 | GNULIB_DIRFD | |
1515 | GNULIB_CLOSEDIR | |
1516 | GNULIB_REWINDDIR | |
1517 | GNULIB_READDIR | |
1518 | GNULIB_OPENDIR | |
6ec2e0f5 SDJ |
1519 | HAVE_WINSOCK2_H |
1520 | HAVE_MSVC_INVALID_PARAMETER_HANDLER | |
9c9d63b1 | 1521 | LIB_CLOCK_GETTIME |
e26b6bb0 TT |
1522 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
1523 | UNISTD_H_HAVE_WINSOCK2_H | |
698be2d8 | 1524 | UNISTD_H_HAVE_SYS_RANDOM_H |
e26b6bb0 TT |
1525 | REPLACE_WRITE |
1526 | REPLACE_USLEEP | |
1527 | REPLACE_UNLINKAT | |
1528 | REPLACE_UNLINK | |
1529 | REPLACE_TTYNAME_R | |
c0c3707f | 1530 | REPLACE_TRUNCATE |
4a626d0a | 1531 | REPLACE_SYMLINKAT |
e26b6bb0 TT |
1532 | REPLACE_SYMLINK |
1533 | REPLACE_SLEEP | |
1534 | REPLACE_RMDIR | |
4a626d0a | 1535 | REPLACE_READLINKAT |
e26b6bb0 TT |
1536 | REPLACE_READLINK |
1537 | REPLACE_READ | |
1538 | REPLACE_PWRITE | |
1539 | REPLACE_PREAD | |
1540 | REPLACE_LSEEK | |
1541 | REPLACE_LINKAT | |
1542 | REPLACE_LINK | |
1543 | REPLACE_LCHOWN | |
1544 | REPLACE_ISATTY | |
c0c3707f | 1545 | REPLACE_GETPASS |
e26b6bb0 TT |
1546 | REPLACE_GETPAGESIZE |
1547 | REPLACE_GETGROUPS | |
1548 | REPLACE_GETLOGIN_R | |
4a626d0a | 1549 | REPLACE_GETDTABLESIZE |
e26b6bb0 TT |
1550 | REPLACE_GETDOMAINNAME |
1551 | REPLACE_GETCWD | |
1552 | REPLACE_FTRUNCATE | |
1553 | REPLACE_FCHOWNAT | |
c0c3707f | 1554 | REPLACE_FACCESSAT |
9c9d63b1 PM |
1555 | REPLACE_EXECVPE |
1556 | REPLACE_EXECVP | |
1557 | REPLACE_EXECVE | |
1558 | REPLACE_EXECV | |
1559 | REPLACE_EXECLP | |
1560 | REPLACE_EXECLE | |
1561 | REPLACE_EXECL | |
e26b6bb0 TT |
1562 | REPLACE_DUP2 |
1563 | REPLACE_DUP | |
1564 | REPLACE_CLOSE | |
1565 | REPLACE_CHOWN | |
c0c3707f | 1566 | REPLACE_ACCESS |
e26b6bb0 TT |
1567 | HAVE_SYS_PARAM_H |
1568 | HAVE_OS_H | |
1569 | HAVE_DECL_TTYNAME_R | |
c0c3707f | 1570 | HAVE_DECL_TRUNCATE |
e26b6bb0 TT |
1571 | HAVE_DECL_SETHOSTNAME |
1572 | HAVE_DECL_GETUSERSHELL | |
1573 | HAVE_DECL_GETPAGESIZE | |
1574 | HAVE_DECL_GETLOGIN_R | |
c0c3707f | 1575 | HAVE_DECL_GETLOGIN |
e26b6bb0 TT |
1576 | HAVE_DECL_GETDOMAINNAME |
1577 | HAVE_DECL_FDATASYNC | |
1578 | HAVE_DECL_FCHDIR | |
9c9d63b1 | 1579 | HAVE_DECL_EXECVPE |
e26b6bb0 TT |
1580 | HAVE_DECL_ENVIRON |
1581 | HAVE_USLEEP | |
1582 | HAVE_UNLINKAT | |
1583 | HAVE_SYMLINKAT | |
1584 | HAVE_SYMLINK | |
1585 | HAVE_SLEEP | |
1586 | HAVE_SETHOSTNAME | |
1587 | HAVE_READLINKAT | |
1588 | HAVE_READLINK | |
1589 | HAVE_PWRITE | |
1590 | HAVE_PREAD | |
1591 | HAVE_PIPE2 | |
1592 | HAVE_PIPE | |
1593 | HAVE_LINKAT | |
1594 | HAVE_LINK | |
1595 | HAVE_LCHOWN | |
1596 | HAVE_GROUP_MEMBER | |
c0c3707f | 1597 | HAVE_GETPASS |
e26b6bb0 TT |
1598 | HAVE_GETPAGESIZE |
1599 | HAVE_GETLOGIN | |
1600 | HAVE_GETHOSTNAME | |
1601 | HAVE_GETGROUPS | |
698be2d8 | 1602 | HAVE_GETENTROPY |
e26b6bb0 TT |
1603 | HAVE_GETDTABLESIZE |
1604 | HAVE_FTRUNCATE | |
1605 | HAVE_FSYNC | |
1606 | HAVE_FDATASYNC | |
1607 | HAVE_FCHOWNAT | |
1608 | HAVE_FCHDIR | |
1609 | HAVE_FACCESSAT | |
9c9d63b1 | 1610 | HAVE_EXECVPE |
e26b6bb0 TT |
1611 | HAVE_EUIDACCESS |
1612 | HAVE_DUP3 | |
c0c3707f | 1613 | HAVE_COPY_FILE_RANGE |
e26b6bb0 | 1614 | HAVE_CHOWN |
9c9d63b1 PM |
1615 | GNULIB_MDA_WRITE |
1616 | GNULIB_MDA_UNLINK | |
1617 | GNULIB_MDA_SWAB | |
1618 | GNULIB_MDA_RMDIR | |
1619 | GNULIB_MDA_READ | |
1620 | GNULIB_MDA_LSEEK | |
1621 | GNULIB_MDA_ISATTY | |
1622 | GNULIB_MDA_GETPID | |
1623 | GNULIB_MDA_GETCWD | |
1624 | GNULIB_MDA_EXECVPE | |
1625 | GNULIB_MDA_EXECVP | |
1626 | GNULIB_MDA_EXECVE | |
1627 | GNULIB_MDA_EXECV | |
1628 | GNULIB_MDA_EXECLP | |
1629 | GNULIB_MDA_EXECLE | |
1630 | GNULIB_MDA_EXECL | |
1631 | GNULIB_MDA_DUP2 | |
1632 | GNULIB_MDA_DUP | |
1633 | GNULIB_MDA_CLOSE | |
1634 | GNULIB_MDA_CHDIR | |
1635 | GNULIB_MDA_ACCESS | |
e26b6bb0 TT |
1636 | GNULIB_WRITE |
1637 | GNULIB_USLEEP | |
1638 | GNULIB_UNLINKAT | |
1639 | GNULIB_UNLINK | |
1640 | GNULIB_UNISTD_H_SIGPIPE | |
1641 | GNULIB_UNISTD_H_NONBLOCKING | |
1642 | GNULIB_TTYNAME_R | |
c0c3707f | 1643 | GNULIB_TRUNCATE |
e26b6bb0 TT |
1644 | GNULIB_SYMLINKAT |
1645 | GNULIB_SYMLINK | |
1646 | GNULIB_SLEEP | |
1647 | GNULIB_SETHOSTNAME | |
1648 | GNULIB_RMDIR | |
1649 | GNULIB_READLINKAT | |
1650 | GNULIB_READLINK | |
1651 | GNULIB_READ | |
1652 | GNULIB_PWRITE | |
1653 | GNULIB_PREAD | |
1654 | GNULIB_PIPE2 | |
1655 | GNULIB_PIPE | |
1656 | GNULIB_LSEEK | |
1657 | GNULIB_LINKAT | |
1658 | GNULIB_LINK | |
1659 | GNULIB_LCHOWN | |
1660 | GNULIB_ISATTY | |
1661 | GNULIB_GROUP_MEMBER | |
1662 | GNULIB_GETUSERSHELL | |
c0c3707f | 1663 | GNULIB_GETPASS |
e26b6bb0 | 1664 | GNULIB_GETPAGESIZE |
5df4cba6 | 1665 | GNULIB_GETOPT_POSIX |
e26b6bb0 TT |
1666 | GNULIB_GETLOGIN_R |
1667 | GNULIB_GETLOGIN | |
1668 | GNULIB_GETHOSTNAME | |
1669 | GNULIB_GETGROUPS | |
698be2d8 | 1670 | GNULIB_GETENTROPY |
e26b6bb0 TT |
1671 | GNULIB_GETDTABLESIZE |
1672 | GNULIB_GETDOMAINNAME | |
1673 | GNULIB_GETCWD | |
1674 | GNULIB_FTRUNCATE | |
1675 | GNULIB_FSYNC | |
1676 | GNULIB_FDATASYNC | |
1677 | GNULIB_FCHOWNAT | |
1678 | GNULIB_FCHDIR | |
1679 | GNULIB_FACCESSAT | |
9c9d63b1 PM |
1680 | GNULIB_EXECVPE |
1681 | GNULIB_EXECVP | |
1682 | GNULIB_EXECVE | |
1683 | GNULIB_EXECV | |
1684 | GNULIB_EXECLP | |
1685 | GNULIB_EXECLE | |
1686 | GNULIB_EXECL | |
e26b6bb0 TT |
1687 | GNULIB_EUIDACCESS |
1688 | GNULIB_ENVIRON | |
1689 | GNULIB_DUP3 | |
1690 | GNULIB_DUP2 | |
1691 | GNULIB_DUP | |
c0c3707f | 1692 | GNULIB_COPY_FILE_RANGE |
e26b6bb0 TT |
1693 | GNULIB_CLOSE |
1694 | GNULIB_CHOWN | |
1695 | GNULIB_CHDIR | |
c0c3707f | 1696 | GNULIB_ACCESS |
98399780 YQ |
1697 | REPLACE_WCTOMB |
1698 | REPLACE_UNSETENV | |
c0c3707f | 1699 | REPLACE_STRTOLD |
98399780 | 1700 | REPLACE_STRTOD |
c0c3707f | 1701 | REPLACE_SETSTATE |
98399780 YQ |
1702 | REPLACE_SETENV |
1703 | REPLACE_REALPATH | |
1704 | REPLACE_REALLOC | |
1705 | REPLACE_RANDOM_R | |
c0c3707f | 1706 | REPLACE_RANDOM |
4a626d0a | 1707 | REPLACE_QSORT_R |
98399780 YQ |
1708 | REPLACE_PUTENV |
1709 | REPLACE_PTSNAME_R | |
1710 | REPLACE_PTSNAME | |
9c9d63b1 | 1711 | REPLACE_POSIX_MEMALIGN |
98399780 YQ |
1712 | REPLACE_MKSTEMP |
1713 | REPLACE_MBTOWC | |
1714 | REPLACE_MALLOC | |
c0c3707f | 1715 | REPLACE_INITSTATE |
9c9d63b1 | 1716 | REPLACE_FREE |
98399780 YQ |
1717 | REPLACE_CANONICALIZE_FILE_NAME |
1718 | REPLACE_CALLOC | |
9c9d63b1 | 1719 | REPLACE_ALIGNED_ALLOC |
98399780 YQ |
1720 | HAVE_DECL_UNSETENV |
1721 | HAVE_UNLOCKPT | |
1722 | HAVE_SYS_LOADAVG_H | |
1723 | HAVE_STRUCT_RANDOM_DATA | |
1724 | HAVE_STRTOULL | |
1725 | HAVE_STRTOLL | |
c0c3707f | 1726 | HAVE_STRTOLD |
98399780 | 1727 | HAVE_STRTOD |
c0c3707f CB |
1728 | HAVE_DECL_SETSTATE |
1729 | HAVE_SETSTATE | |
98399780 YQ |
1730 | HAVE_DECL_SETENV |
1731 | HAVE_SETENV | |
4a626d0a | 1732 | HAVE_SECURE_GETENV |
98399780 YQ |
1733 | HAVE_RPMATCH |
1734 | HAVE_REALPATH | |
c0c3707f | 1735 | HAVE_REALLOCARRAY |
98399780 YQ |
1736 | HAVE_RANDOM_R |
1737 | HAVE_RANDOM_H | |
1738 | HAVE_RANDOM | |
4c62b19f | 1739 | HAVE_QSORT_R |
98399780 YQ |
1740 | HAVE_PTSNAME_R |
1741 | HAVE_PTSNAME | |
1742 | HAVE_POSIX_OPENPT | |
9c9d63b1 | 1743 | HAVE_POSIX_MEMALIGN |
98399780 YQ |
1744 | HAVE_MKSTEMPS |
1745 | HAVE_MKSTEMP | |
1746 | HAVE_MKOSTEMPS | |
1747 | HAVE_MKOSTEMP | |
1748 | HAVE_MKDTEMP | |
c0c3707f CB |
1749 | HAVE_MBTOWC |
1750 | HAVE_DECL_INITSTATE | |
1751 | HAVE_INITSTATE | |
98399780 YQ |
1752 | HAVE_GRANTPT |
1753 | HAVE_GETSUBOPT | |
1754 | HAVE_DECL_GETLOADAVG | |
9c9d63b1 PM |
1755 | HAVE_DECL_GCVT |
1756 | HAVE_DECL_FCVT | |
1757 | HAVE_DECL_ECVT | |
98399780 YQ |
1758 | HAVE_CANONICALIZE_FILE_NAME |
1759 | HAVE_ATOLL | |
9c9d63b1 | 1760 | HAVE_ALIGNED_ALLOC |
98399780 | 1761 | HAVE__EXIT |
9c9d63b1 PM |
1762 | GNULIB_MDA_PUTENV |
1763 | GNULIB_MDA_MKTEMP | |
1764 | GNULIB_MDA_GCVT | |
1765 | GNULIB_MDA_FCVT | |
1766 | GNULIB_MDA_ECVT | |
98399780 YQ |
1767 | GNULIB_WCTOMB |
1768 | GNULIB_UNSETENV | |
1769 | GNULIB_UNLOCKPT | |
1770 | GNULIB_SYSTEM_POSIX | |
1771 | GNULIB_STRTOULL | |
1772 | GNULIB_STRTOLL | |
c0c3707f | 1773 | GNULIB_STRTOLD |
98399780 YQ |
1774 | GNULIB_STRTOD |
1775 | GNULIB_SETENV | |
4a626d0a | 1776 | GNULIB_SECURE_GETENV |
98399780 YQ |
1777 | GNULIB_RPMATCH |
1778 | GNULIB_REALPATH | |
1779 | GNULIB_REALLOC_POSIX | |
c0c3707f | 1780 | GNULIB_REALLOCARRAY |
98399780 YQ |
1781 | GNULIB_RANDOM_R |
1782 | GNULIB_RANDOM | |
4a626d0a | 1783 | GNULIB_QSORT_R |
98399780 YQ |
1784 | GNULIB_PUTENV |
1785 | GNULIB_PTSNAME_R | |
1786 | GNULIB_PTSNAME | |
1787 | GNULIB_POSIX_OPENPT | |
9c9d63b1 | 1788 | GNULIB_POSIX_MEMALIGN |
98399780 YQ |
1789 | GNULIB_MKSTEMPS |
1790 | GNULIB_MKSTEMP | |
1791 | GNULIB_MKOSTEMPS | |
1792 | GNULIB_MKOSTEMP | |
1793 | GNULIB_MKDTEMP | |
1794 | GNULIB_MBTOWC | |
1795 | GNULIB_MALLOC_POSIX | |
1796 | GNULIB_GRANTPT | |
1797 | GNULIB_GETSUBOPT | |
1798 | GNULIB_GETLOADAVG | |
9c9d63b1 | 1799 | GNULIB_FREE_POSIX |
98399780 YQ |
1800 | GNULIB_CANONICALIZE_FILE_NAME |
1801 | GNULIB_CALLOC_POSIX | |
1802 | GNULIB_ATOLL | |
9c9d63b1 | 1803 | GNULIB_ALIGNED_ALLOC |
98399780 | 1804 | GNULIB__EXIT |
698be2d8 CB |
1805 | LOCALE_FR |
1806 | REPLACE_WCSTOK | |
1807 | REPLACE_WCSFTIME | |
1808 | REPLACE_WCSWIDTH | |
1809 | REPLACE_WCWIDTH | |
1810 | REPLACE_WCSNRTOMBS | |
1811 | REPLACE_WCSRTOMBS | |
1812 | REPLACE_WCRTOMB | |
1813 | REPLACE_MBSNRTOWCS | |
1814 | REPLACE_MBSRTOWCS | |
1815 | REPLACE_MBRLEN | |
1816 | REPLACE_MBRTOWC | |
1817 | REPLACE_MBSINIT | |
1818 | REPLACE_WCTOB | |
1819 | REPLACE_BTOWC | |
1820 | REPLACE_MBSTATE_T | |
1821 | HAVE_DECL_WCWIDTH | |
9c9d63b1 | 1822 | HAVE_DECL_WCSDUP |
698be2d8 CB |
1823 | HAVE_DECL_WCTOB |
1824 | HAVE_WCSFTIME | |
1825 | HAVE_WCSWIDTH | |
1826 | HAVE_WCSTOK | |
1827 | HAVE_WCSSTR | |
1828 | HAVE_WCSPBRK | |
1829 | HAVE_WCSSPN | |
1830 | HAVE_WCSCSPN | |
1831 | HAVE_WCSRCHR | |
1832 | HAVE_WCSCHR | |
1833 | HAVE_WCSDUP | |
1834 | HAVE_WCSXFRM | |
1835 | HAVE_WCSCOLL | |
1836 | HAVE_WCSNCASECMP | |
1837 | HAVE_WCSCASECMP | |
1838 | HAVE_WCSNCMP | |
1839 | HAVE_WCSCMP | |
1840 | HAVE_WCSNCAT | |
1841 | HAVE_WCSCAT | |
1842 | HAVE_WCPNCPY | |
1843 | HAVE_WCSNCPY | |
1844 | HAVE_WCPCPY | |
1845 | HAVE_WCSCPY | |
1846 | HAVE_WCSNLEN | |
1847 | HAVE_WCSLEN | |
1848 | HAVE_WMEMSET | |
1849 | HAVE_WMEMPCPY | |
1850 | HAVE_WMEMMOVE | |
1851 | HAVE_WMEMCPY | |
1852 | HAVE_WMEMCMP | |
1853 | HAVE_WMEMCHR | |
1854 | HAVE_WCSNRTOMBS | |
1855 | HAVE_WCSRTOMBS | |
1856 | HAVE_WCRTOMB | |
1857 | HAVE_MBSNRTOWCS | |
1858 | HAVE_MBSRTOWCS | |
1859 | HAVE_MBRLEN | |
1860 | HAVE_MBRTOWC | |
1861 | HAVE_MBSINIT | |
1862 | HAVE_BTOWC | |
9c9d63b1 | 1863 | GNULIB_MDA_WCSDUP |
698be2d8 CB |
1864 | GNULIB_WCSFTIME |
1865 | GNULIB_WCSWIDTH | |
1866 | GNULIB_WCSTOK | |
1867 | GNULIB_WCSSTR | |
1868 | GNULIB_WCSPBRK | |
1869 | GNULIB_WCSSPN | |
1870 | GNULIB_WCSCSPN | |
1871 | GNULIB_WCSRCHR | |
1872 | GNULIB_WCSCHR | |
1873 | GNULIB_WCSDUP | |
1874 | GNULIB_WCSXFRM | |
1875 | GNULIB_WCSCOLL | |
1876 | GNULIB_WCSNCASECMP | |
1877 | GNULIB_WCSCASECMP | |
1878 | GNULIB_WCSNCMP | |
1879 | GNULIB_WCSCMP | |
1880 | GNULIB_WCSNCAT | |
1881 | GNULIB_WCSCAT | |
1882 | GNULIB_WCPNCPY | |
1883 | GNULIB_WCSNCPY | |
1884 | GNULIB_WCPCPY | |
1885 | GNULIB_WCSCPY | |
1886 | GNULIB_WCSNLEN | |
1887 | GNULIB_WCSLEN | |
1888 | GNULIB_WMEMSET | |
1889 | GNULIB_WMEMPCPY | |
1890 | GNULIB_WMEMMOVE | |
1891 | GNULIB_WMEMCPY | |
1892 | GNULIB_WMEMCMP | |
1893 | GNULIB_WMEMCHR | |
1894 | GNULIB_WCWIDTH | |
1895 | GNULIB_WCSNRTOMBS | |
1896 | GNULIB_WCSRTOMBS | |
1897 | GNULIB_WCRTOMB | |
1898 | GNULIB_MBSNRTOWCS | |
1899 | GNULIB_MBSRTOWCS | |
1900 | GNULIB_MBRLEN | |
1901 | GNULIB_MBRTOWC | |
1902 | GNULIB_MBSINIT | |
1903 | GNULIB_WCTOB | |
1904 | GNULIB_BTOWC | |
725e2999 | 1905 | MKDIR_P |
c0c3707f | 1906 | HAVE_WS2TCPIP_H |
725e2999 JB |
1907 | HAVE_FEATURES_H |
1908 | NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H | |
1909 | NEXT_ARPA_INET_H | |
1910 | PRAGMA_COLUMNS | |
1911 | PRAGMA_SYSTEM_HEADER | |
1912 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
1913 | INCLUDE_NEXT | |
1914 | HAVE_ARPA_INET_H | |
1915 | REPLACE_INET_PTON | |
1916 | REPLACE_INET_NTOP | |
1917 | HAVE_DECL_INET_PTON | |
1918 | HAVE_DECL_INET_NTOP | |
1919 | GNULIB_INET_PTON | |
1920 | GNULIB_INET_NTOP | |
c0c3707f | 1921 | HAVE_ALLOCA_H |
8690e634 JK |
1922 | GL_GENERATE_ALLOCA_H_FALSE |
1923 | GL_GENERATE_ALLOCA_H_TRUE | |
1924 | ALLOCA_H | |
1925 | ALLOCA | |
c971b7fa PA |
1926 | GL_COND_LIBTOOL_FALSE |
1927 | GL_COND_LIBTOOL_TRUE | |
c8693053 RO |
1928 | RANLIB |
1929 | ARFLAGS | |
1930 | AR | |
1931 | LARGEFILE_CPPFLAGS | |
c971b7fa PA |
1932 | target_os |
1933 | target_vendor | |
1934 | target_cpu | |
1935 | target | |
c971b7fa PA |
1936 | host_os |
1937 | host_vendor | |
1938 | host_cpu | |
1939 | host | |
1940 | build_os | |
1941 | build_vendor | |
1942 | build_cpu | |
1943 | build | |
4a626d0a PA |
1944 | EGREP |
1945 | GREP | |
1946 | CPP | |
c971b7fa PA |
1947 | OBJEXT |
1948 | EXEEXT | |
1949 | ac_ct_CC | |
1950 | CPPFLAGS | |
1951 | LDFLAGS | |
1952 | CFLAGS | |
1953 | CC | |
1954 | MAINT | |
1955 | MAINTAINER_MODE_FALSE | |
1956 | MAINTAINER_MODE_TRUE | |
1957 | target_alias | |
1958 | host_alias | |
1959 | build_alias | |
1960 | LIBS | |
1961 | ECHO_T | |
1962 | ECHO_N | |
1963 | ECHO_C | |
1964 | DEFS | |
1965 | mandir | |
1966 | localedir | |
1967 | libdir | |
1968 | psdir | |
1969 | pdfdir | |
1970 | dvidir | |
1971 | htmldir | |
1972 | infodir | |
1973 | docdir | |
1974 | oldincludedir | |
1975 | includedir | |
1976 | localstatedir | |
1977 | sharedstatedir | |
1978 | sysconfdir | |
1979 | datadir | |
1980 | datarootdir | |
1981 | libexecdir | |
1982 | sbindir | |
1983 | bindir | |
1984 | program_transform_name | |
1985 | prefix | |
1986 | exec_prefix | |
1987 | PACKAGE_URL | |
1988 | PACKAGE_BUGREPORT | |
1989 | PACKAGE_STRING | |
1990 | PACKAGE_VERSION | |
1991 | PACKAGE_TARNAME | |
1992 | PACKAGE_NAME | |
1993 | PATH_SEPARATOR | |
1994 | SHELL' | |
1995 | ac_subst_files='' | |
1996 | ac_user_opts=' | |
1997 | enable_option_checking | |
1998 | enable_maintainer_mode | |
c8693053 | 1999 | enable_plugins |
2196f55f | 2000 | enable_largefile |
5abebf3c | 2001 | enable_threads |
c0c3707f | 2002 | enable_cross_guesses |
c971b7fa | 2003 | enable_dependency_tracking |
39be3c7e | 2004 | enable_silent_rules |
c971b7fa PA |
2005 | ' |
2006 | ac_precious_vars='build_alias | |
2007 | host_alias | |
2008 | target_alias | |
2009 | CC | |
2010 | CFLAGS | |
2011 | LDFLAGS | |
2012 | LIBS | |
2013 | CPPFLAGS | |
2014 | CPP' | |
2015 | ||
2016 | ||
2017 | # Initialize some variables set by options. | |
2018 | ac_init_help= | |
2019 | ac_init_version=false | |
2020 | ac_unrecognized_opts= | |
2021 | ac_unrecognized_sep= | |
2022 | # The variables have the same names as the options, with | |
2023 | # dashes changed to underlines. | |
2024 | cache_file=/dev/null | |
2025 | exec_prefix=NONE | |
2026 | no_create= | |
2027 | no_recursion= | |
2028 | prefix=NONE | |
2029 | program_prefix=NONE | |
2030 | program_suffix=NONE | |
2031 | program_transform_name=s,x,x, | |
2032 | silent= | |
2033 | site= | |
2034 | srcdir= | |
2035 | verbose= | |
2036 | x_includes=NONE | |
2037 | x_libraries=NONE | |
2038 | ||
2039 | # Installation directory options. | |
2040 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
2041 | # and all the variables that are supposed to be based on exec_prefix | |
2042 | # by default will actually change. | |
2043 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
2044 | # (The list follows the same order as the GNU Coding Standards.) | |
2045 | bindir='${exec_prefix}/bin' | |
2046 | sbindir='${exec_prefix}/sbin' | |
2047 | libexecdir='${exec_prefix}/libexec' | |
2048 | datarootdir='${prefix}/share' | |
2049 | datadir='${datarootdir}' | |
2050 | sysconfdir='${prefix}/etc' | |
2051 | sharedstatedir='${prefix}/com' | |
2052 | localstatedir='${prefix}/var' | |
2053 | includedir='${prefix}/include' | |
2054 | oldincludedir='/usr/include' | |
d0ac1c44 | 2055 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
c971b7fa PA |
2056 | infodir='${datarootdir}/info' |
2057 | htmldir='${docdir}' | |
2058 | dvidir='${docdir}' | |
2059 | pdfdir='${docdir}' | |
2060 | psdir='${docdir}' | |
2061 | libdir='${exec_prefix}/lib' | |
2062 | localedir='${datarootdir}/locale' | |
2063 | mandir='${datarootdir}/man' | |
2064 | ||
2065 | ac_prev= | |
2066 | ac_dashdash= | |
2067 | for ac_option | |
2068 | do | |
2069 | # If the previous option needs an argument, assign it. | |
2070 | if test -n "$ac_prev"; then | |
2071 | eval $ac_prev=\$ac_option | |
2072 | ac_prev= | |
2073 | continue | |
2074 | fi | |
2075 | ||
2076 | case $ac_option in | |
d0ac1c44 SM |
2077 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
2078 | *=) ac_optarg= ;; | |
2079 | *) ac_optarg=yes ;; | |
c971b7fa PA |
2080 | esac |
2081 | ||
2082 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
2083 | ||
2084 | case $ac_dashdash$ac_option in | |
2085 | --) | |
2086 | ac_dashdash=yes ;; | |
2087 | ||
2088 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
2089 | ac_prev=bindir ;; | |
2090 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
2091 | bindir=$ac_optarg ;; | |
2092 | ||
2093 | -build | --build | --buil | --bui | --bu) | |
2094 | ac_prev=build_alias ;; | |
2095 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
2096 | build_alias=$ac_optarg ;; | |
2097 | ||
2098 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
2099 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
2100 | ac_prev=cache_file ;; | |
2101 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
2102 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
2103 | cache_file=$ac_optarg ;; | |
2104 | ||
2105 | --config-cache | -C) | |
2106 | cache_file=config.cache ;; | |
2107 | ||
2108 | -datadir | --datadir | --datadi | --datad) | |
2109 | ac_prev=datadir ;; | |
2110 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
2111 | datadir=$ac_optarg ;; | |
2112 | ||
2113 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
2114 | | --dataroo | --dataro | --datar) | |
2115 | ac_prev=datarootdir ;; | |
2116 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
2117 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
2118 | datarootdir=$ac_optarg ;; | |
2119 | ||
2120 | -disable-* | --disable-*) | |
2121 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
2122 | # Reject names that are not valid shell variable names. | |
2123 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2124 | as_fn_error $? "invalid feature name: $ac_useropt" |
c971b7fa PA |
2125 | ac_useropt_orig=$ac_useropt |
2126 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2127 | case $ac_user_opts in | |
2128 | *" | |
2129 | "enable_$ac_useropt" | |
2130 | "*) ;; | |
2131 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
2132 | ac_unrecognized_sep=', ';; | |
2133 | esac | |
2134 | eval enable_$ac_useropt=no ;; | |
2135 | ||
2136 | -docdir | --docdir | --docdi | --doc | --do) | |
2137 | ac_prev=docdir ;; | |
2138 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
2139 | docdir=$ac_optarg ;; | |
2140 | ||
2141 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
2142 | ac_prev=dvidir ;; | |
2143 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
2144 | dvidir=$ac_optarg ;; | |
2145 | ||
2146 | -enable-* | --enable-*) | |
2147 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
2148 | # Reject names that are not valid shell variable names. | |
2149 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2150 | as_fn_error $? "invalid feature name: $ac_useropt" |
c971b7fa PA |
2151 | ac_useropt_orig=$ac_useropt |
2152 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2153 | case $ac_user_opts in | |
2154 | *" | |
2155 | "enable_$ac_useropt" | |
2156 | "*) ;; | |
2157 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
2158 | ac_unrecognized_sep=', ';; | |
2159 | esac | |
2160 | eval enable_$ac_useropt=\$ac_optarg ;; | |
2161 | ||
2162 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
2163 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
2164 | | --exec | --exe | --ex) | |
2165 | ac_prev=exec_prefix ;; | |
2166 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
2167 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
2168 | | --exec=* | --exe=* | --ex=*) | |
2169 | exec_prefix=$ac_optarg ;; | |
2170 | ||
2171 | -gas | --gas | --ga | --g) | |
2172 | # Obsolete; use --with-gas. | |
2173 | with_gas=yes ;; | |
2174 | ||
2175 | -help | --help | --hel | --he | -h) | |
2176 | ac_init_help=long ;; | |
2177 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
2178 | ac_init_help=recursive ;; | |
2179 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
2180 | ac_init_help=short ;; | |
2181 | ||
2182 | -host | --host | --hos | --ho) | |
2183 | ac_prev=host_alias ;; | |
2184 | -host=* | --host=* | --hos=* | --ho=*) | |
2185 | host_alias=$ac_optarg ;; | |
2186 | ||
2187 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
2188 | ac_prev=htmldir ;; | |
2189 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
2190 | | --ht=*) | |
2191 | htmldir=$ac_optarg ;; | |
2192 | ||
2193 | -includedir | --includedir | --includedi | --included | --include \ | |
2194 | | --includ | --inclu | --incl | --inc) | |
2195 | ac_prev=includedir ;; | |
2196 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
2197 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
2198 | includedir=$ac_optarg ;; | |
2199 | ||
2200 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
2201 | ac_prev=infodir ;; | |
2202 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
2203 | infodir=$ac_optarg ;; | |
2204 | ||
2205 | -libdir | --libdir | --libdi | --libd) | |
2206 | ac_prev=libdir ;; | |
2207 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
2208 | libdir=$ac_optarg ;; | |
2209 | ||
2210 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
2211 | | --libexe | --libex | --libe) | |
2212 | ac_prev=libexecdir ;; | |
2213 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
2214 | | --libexe=* | --libex=* | --libe=*) | |
2215 | libexecdir=$ac_optarg ;; | |
2216 | ||
2217 | -localedir | --localedir | --localedi | --localed | --locale) | |
2218 | ac_prev=localedir ;; | |
2219 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
2220 | localedir=$ac_optarg ;; | |
2221 | ||
2222 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
2223 | | --localstate | --localstat | --localsta | --localst | --locals) | |
2224 | ac_prev=localstatedir ;; | |
2225 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
2226 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
2227 | localstatedir=$ac_optarg ;; | |
2228 | ||
2229 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
2230 | ac_prev=mandir ;; | |
2231 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
2232 | mandir=$ac_optarg ;; | |
2233 | ||
2234 | -nfp | --nfp | --nf) | |
2235 | # Obsolete; use --without-fp. | |
2236 | with_fp=no ;; | |
2237 | ||
2238 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
2239 | | --no-cr | --no-c | -n) | |
2240 | no_create=yes ;; | |
2241 | ||
2242 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
2243 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
2244 | no_recursion=yes ;; | |
2245 | ||
2246 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
2247 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
2248 | | --oldin | --oldi | --old | --ol | --o) | |
2249 | ac_prev=oldincludedir ;; | |
2250 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
2251 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
2252 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
2253 | oldincludedir=$ac_optarg ;; | |
2254 | ||
2255 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
2256 | ac_prev=prefix ;; | |
2257 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
2258 | prefix=$ac_optarg ;; | |
2259 | ||
2260 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
2261 | | --program-pre | --program-pr | --program-p) | |
2262 | ac_prev=program_prefix ;; | |
2263 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
2264 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
2265 | program_prefix=$ac_optarg ;; | |
2266 | ||
2267 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
2268 | | --program-suf | --program-su | --program-s) | |
2269 | ac_prev=program_suffix ;; | |
2270 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
2271 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
2272 | program_suffix=$ac_optarg ;; | |
2273 | ||
2274 | -program-transform-name | --program-transform-name \ | |
2275 | | --program-transform-nam | --program-transform-na \ | |
2276 | | --program-transform-n | --program-transform- \ | |
2277 | | --program-transform | --program-transfor \ | |
2278 | | --program-transfo | --program-transf \ | |
2279 | | --program-trans | --program-tran \ | |
2280 | | --progr-tra | --program-tr | --program-t) | |
2281 | ac_prev=program_transform_name ;; | |
2282 | -program-transform-name=* | --program-transform-name=* \ | |
2283 | | --program-transform-nam=* | --program-transform-na=* \ | |
2284 | | --program-transform-n=* | --program-transform-=* \ | |
2285 | | --program-transform=* | --program-transfor=* \ | |
2286 | | --program-transfo=* | --program-transf=* \ | |
2287 | | --program-trans=* | --program-tran=* \ | |
2288 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
2289 | program_transform_name=$ac_optarg ;; | |
2290 | ||
2291 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
2292 | ac_prev=pdfdir ;; | |
2293 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
2294 | pdfdir=$ac_optarg ;; | |
2295 | ||
2296 | -psdir | --psdir | --psdi | --psd | --ps) | |
2297 | ac_prev=psdir ;; | |
2298 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
2299 | psdir=$ac_optarg ;; | |
2300 | ||
2301 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2302 | | -silent | --silent | --silen | --sile | --sil) | |
2303 | silent=yes ;; | |
2304 | ||
2305 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
2306 | ac_prev=sbindir ;; | |
2307 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
2308 | | --sbi=* | --sb=*) | |
2309 | sbindir=$ac_optarg ;; | |
2310 | ||
2311 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
2312 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
2313 | | --sharedst | --shareds | --shared | --share | --shar \ | |
2314 | | --sha | --sh) | |
2315 | ac_prev=sharedstatedir ;; | |
2316 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
2317 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
2318 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
2319 | | --sha=* | --sh=*) | |
2320 | sharedstatedir=$ac_optarg ;; | |
2321 | ||
2322 | -site | --site | --sit) | |
2323 | ac_prev=site ;; | |
2324 | -site=* | --site=* | --sit=*) | |
2325 | site=$ac_optarg ;; | |
2326 | ||
2327 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
2328 | ac_prev=srcdir ;; | |
2329 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
2330 | srcdir=$ac_optarg ;; | |
2331 | ||
2332 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
2333 | | --syscon | --sysco | --sysc | --sys | --sy) | |
2334 | ac_prev=sysconfdir ;; | |
2335 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
2336 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
2337 | sysconfdir=$ac_optarg ;; | |
2338 | ||
2339 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
2340 | ac_prev=target_alias ;; | |
2341 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
2342 | target_alias=$ac_optarg ;; | |
2343 | ||
2344 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
2345 | verbose=yes ;; | |
2346 | ||
2347 | -version | --version | --versio | --versi | --vers | -V) | |
2348 | ac_init_version=: ;; | |
2349 | ||
2350 | -with-* | --with-*) | |
2351 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
2352 | # Reject names that are not valid shell variable names. | |
2353 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2354 | as_fn_error $? "invalid package name: $ac_useropt" |
c971b7fa PA |
2355 | ac_useropt_orig=$ac_useropt |
2356 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2357 | case $ac_user_opts in | |
2358 | *" | |
2359 | "with_$ac_useropt" | |
2360 | "*) ;; | |
2361 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
2362 | ac_unrecognized_sep=', ';; | |
2363 | esac | |
2364 | eval with_$ac_useropt=\$ac_optarg ;; | |
2365 | ||
2366 | -without-* | --without-*) | |
2367 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
2368 | # Reject names that are not valid shell variable names. | |
2369 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
d0ac1c44 | 2370 | as_fn_error $? "invalid package name: $ac_useropt" |
c971b7fa PA |
2371 | ac_useropt_orig=$ac_useropt |
2372 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
2373 | case $ac_user_opts in | |
2374 | *" | |
2375 | "with_$ac_useropt" | |
2376 | "*) ;; | |
2377 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
2378 | ac_unrecognized_sep=', ';; | |
2379 | esac | |
2380 | eval with_$ac_useropt=no ;; | |
2381 | ||
2382 | --x) | |
2383 | # Obsolete; use --with-x. | |
2384 | with_x=yes ;; | |
2385 | ||
2386 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
2387 | | --x-incl | --x-inc | --x-in | --x-i) | |
2388 | ac_prev=x_includes ;; | |
2389 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
2390 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
2391 | x_includes=$ac_optarg ;; | |
2392 | ||
2393 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
2394 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
2395 | ac_prev=x_libraries ;; | |
2396 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
2397 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
2398 | x_libraries=$ac_optarg ;; | |
2399 | ||
d0ac1c44 SM |
2400 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
2401 | Try \`$0 --help' for more information" | |
c971b7fa PA |
2402 | ;; |
2403 | ||
2404 | *=*) | |
2405 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
2406 | # Reject names that are not valid shell variable names. | |
2407 | case $ac_envvar in #( | |
2408 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 2409 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
c971b7fa PA |
2410 | esac |
2411 | eval $ac_envvar=\$ac_optarg | |
2412 | export $ac_envvar ;; | |
2413 | ||
2414 | *) | |
2415 | # FIXME: should be removed in autoconf 3.0. | |
2416 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
2417 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
2418 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
d0ac1c44 | 2419 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c971b7fa PA |
2420 | ;; |
2421 | ||
2422 | esac | |
2423 | done | |
2424 | ||
2425 | if test -n "$ac_prev"; then | |
2426 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
d0ac1c44 | 2427 | as_fn_error $? "missing argument to $ac_option" |
c971b7fa PA |
2428 | fi |
2429 | ||
2430 | if test -n "$ac_unrecognized_opts"; then | |
2431 | case $enable_option_checking in | |
2432 | no) ;; | |
d0ac1c44 | 2433 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
c971b7fa PA |
2434 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
2435 | esac | |
2436 | fi | |
2437 | ||
2438 | # Check all directory arguments for consistency. | |
2439 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
2440 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
2441 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
2442 | libdir localedir mandir | |
2443 | do | |
2444 | eval ac_val=\$$ac_var | |
2445 | # Remove trailing slashes. | |
2446 | case $ac_val in | |
2447 | */ ) | |
2448 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
2449 | eval $ac_var=\$ac_val;; | |
2450 | esac | |
2451 | # Be sure to have absolute directory names. | |
2452 | case $ac_val in | |
2453 | [\\/$]* | ?:[\\/]* ) continue;; | |
2454 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
2455 | esac | |
d0ac1c44 | 2456 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c971b7fa PA |
2457 | done |
2458 | ||
2459 | # There might be people who depend on the old broken behavior: `$host' | |
2460 | # used to hold the argument of --host etc. | |
2461 | # FIXME: To remove some day. | |
2462 | build=$build_alias | |
2463 | host=$host_alias | |
2464 | target=$target_alias | |
2465 | ||
2466 | # FIXME: To remove some day. | |
2467 | if test "x$host_alias" != x; then | |
2468 | if test "x$build_alias" = x; then | |
2469 | cross_compiling=maybe | |
c971b7fa PA |
2470 | elif test "x$build_alias" != "x$host_alias"; then |
2471 | cross_compiling=yes | |
2472 | fi | |
2473 | fi | |
2474 | ||
2475 | ac_tool_prefix= | |
2476 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
2477 | ||
2478 | test "$silent" = yes && exec 6>/dev/null | |
2479 | ||
2480 | ||
2481 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
2482 | ac_ls_di=`ls -di .` && | |
2483 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 2484 | as_fn_error $? "working directory cannot be determined" |
c971b7fa | 2485 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 2486 | as_fn_error $? "pwd does not report name of working directory" |
c971b7fa PA |
2487 | |
2488 | ||
2489 | # Find the source files, if location was not specified. | |
2490 | if test -z "$srcdir"; then | |
2491 | ac_srcdir_defaulted=yes | |
2492 | # Try the directory containing this script, then the parent directory. | |
2493 | ac_confdir=`$as_dirname -- "$as_myself" || | |
2494 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
2495 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
2496 | X"$as_myself" : 'X\(//\)$' \| \ | |
2497 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
2498 | $as_echo X"$as_myself" | | |
2499 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
2500 | s//\1/ | |
2501 | q | |
2502 | } | |
2503 | /^X\(\/\/\)[^/].*/{ | |
2504 | s//\1/ | |
2505 | q | |
2506 | } | |
2507 | /^X\(\/\/\)$/{ | |
2508 | s//\1/ | |
2509 | q | |
2510 | } | |
2511 | /^X\(\/\).*/{ | |
2512 | s//\1/ | |
2513 | q | |
2514 | } | |
2515 | s/.*/./; q'` | |
2516 | srcdir=$ac_confdir | |
2517 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2518 | srcdir=.. | |
2519 | fi | |
2520 | else | |
2521 | ac_srcdir_defaulted=no | |
2522 | fi | |
2523 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2524 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 2525 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
c971b7fa PA |
2526 | fi |
2527 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
2528 | ac_abs_confdir=`( | |
d0ac1c44 | 2529 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
c971b7fa PA |
2530 | pwd)` |
2531 | # When building in place, set srcdir=. | |
2532 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
2533 | srcdir=. | |
2534 | fi | |
2535 | # Remove unnecessary trailing slashes from srcdir. | |
2536 | # Double slashes in file names in object file debugging info | |
2537 | # mess up M-x gdb in Emacs. | |
2538 | case $srcdir in | |
2539 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
2540 | esac | |
2541 | for ac_var in $ac_precious_vars; do | |
2542 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
2543 | eval ac_env_${ac_var}_value=\$${ac_var} | |
2544 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
2545 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
2546 | done | |
2547 | ||
2548 | # | |
2549 | # Report the --help message. | |
2550 | # | |
2551 | if test "$ac_init_help" = "long"; then | |
2552 | # Omit some internal or obsolete options to make the list less imposing. | |
2553 | # This message is too long to be a string in the A/UX 3.1 sh. | |
2554 | cat <<_ACEOF | |
d0ac1c44 | 2555 | \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems. |
c971b7fa PA |
2556 | |
2557 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
2558 | ||
2559 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
2560 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
2561 | ||
2562 | Defaults for the options are specified in brackets. | |
2563 | ||
2564 | Configuration: | |
2565 | -h, --help display this help and exit | |
2566 | --help=short display options specific to this package | |
2567 | --help=recursive display the short help of all the included packages | |
2568 | -V, --version display version information and exit | |
d0ac1c44 | 2569 | -q, --quiet, --silent do not print \`checking ...' messages |
c971b7fa PA |
2570 | --cache-file=FILE cache test results in FILE [disabled] |
2571 | -C, --config-cache alias for \`--cache-file=config.cache' | |
2572 | -n, --no-create do not create output files | |
2573 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
2574 | ||
2575 | Installation directories: | |
2576 | --prefix=PREFIX install architecture-independent files in PREFIX | |
2577 | [$ac_default_prefix] | |
2578 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
2579 | [PREFIX] | |
2580 | ||
2581 | By default, \`make install' will install all the files in | |
2582 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
2583 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
2584 | for instance \`--prefix=\$HOME'. | |
2585 | ||
2586 | For better control, use the options below. | |
2587 | ||
2588 | Fine tuning of the installation directories: | |
2589 | --bindir=DIR user executables [EPREFIX/bin] | |
2590 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
2591 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
2592 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
2593 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
2594 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
2595 | --libdir=DIR object code libraries [EPREFIX/lib] | |
2596 | --includedir=DIR C header files [PREFIX/include] | |
2597 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
2598 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
2599 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
2600 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
2601 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
2602 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
d0ac1c44 | 2603 | --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu] |
c971b7fa PA |
2604 | --htmldir=DIR html documentation [DOCDIR] |
2605 | --dvidir=DIR dvi documentation [DOCDIR] | |
2606 | --pdfdir=DIR pdf documentation [DOCDIR] | |
2607 | --psdir=DIR ps documentation [DOCDIR] | |
2608 | _ACEOF | |
2609 | ||
2610 | cat <<\_ACEOF | |
2611 | ||
2612 | Program names: | |
2613 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
2614 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
2615 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
2616 | ||
2617 | System types: | |
2618 | --build=BUILD configure for building on BUILD [guessed] | |
2619 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
2620 | --target=TARGET configure for building compilers for TARGET [HOST] | |
2621 | _ACEOF | |
2622 | fi | |
2623 | ||
2624 | if test -n "$ac_init_help"; then | |
d0ac1c44 SM |
2625 | case $ac_init_help in |
2626 | short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";; | |
2627 | esac | |
c971b7fa PA |
2628 | cat <<\_ACEOF |
2629 | ||
2630 | Optional Features: | |
2631 | --disable-option-checking ignore unrecognized --enable/--with options | |
2632 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2633 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
2634 | --enable-maintainer-mode |
2635 | enable make rules and dependencies not useful (and | |
2636 | sometimes confusing) to the casual installer | |
c8693053 | 2637 | --enable-plugins Enable support for plugins |
2196f55f | 2638 | --disable-largefile omit support for large files |
c0c3707f | 2639 | --enable-threads={isoc|posix|isoc+posix|windows} |
5abebf3c CB |
2640 | specify multithreading API |
2641 | --disable-threads build without multithread safety | |
c0c3707f CB |
2642 | --enable-cross-guesses={conservative|risky} |
2643 | specify policy for cross-compilation guesses | |
d0ac1c44 SM |
2644 | --enable-dependency-tracking |
2645 | do not reject slow dependency extractors | |
2646 | --disable-dependency-tracking | |
2647 | speeds up one-time build | |
2648 | --enable-silent-rules less verbose build output (undo: "make V=1") | |
2649 | --disable-silent-rules verbose build output (undo: "make V=0") | |
c971b7fa PA |
2650 | |
2651 | Some influential environment variables: | |
2652 | CC C compiler command | |
2653 | CFLAGS C compiler flags | |
2654 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2655 | nonstandard directory <lib dir> | |
2656 | LIBS libraries to pass to the linker, e.g. -l<library> | |
d0ac1c44 | 2657 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
c971b7fa PA |
2658 | you have headers in a nonstandard directory <include dir> |
2659 | CPP C preprocessor | |
2660 | ||
2661 | Use these variables to override the choices made by `configure' or to help | |
2662 | it to find libraries and programs with nonstandard names/locations. | |
2663 | ||
2664 | Report bugs to the package provider. | |
2665 | _ACEOF | |
2666 | ac_status=$? | |
2667 | fi | |
2668 | ||
2669 | if test "$ac_init_help" = "recursive"; then | |
2670 | # If there are subdirs, report their specific --help. | |
2671 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2672 | test -d "$ac_dir" || | |
2673 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2674 | continue | |
2675 | ac_builddir=. | |
2676 | ||
2677 | case "$ac_dir" in | |
2678 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2679 | *) | |
2680 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2681 | # A ".." for each directory in $ac_dir_suffix. | |
2682 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2683 | case $ac_top_builddir_sub in | |
2684 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2685 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2686 | esac ;; | |
2687 | esac | |
2688 | ac_abs_top_builddir=$ac_pwd | |
2689 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2690 | # for backward compatibility: | |
2691 | ac_top_builddir=$ac_top_build_prefix | |
2692 | ||
2693 | case $srcdir in | |
2694 | .) # We are building in place. | |
2695 | ac_srcdir=. | |
2696 | ac_top_srcdir=$ac_top_builddir_sub | |
2697 | ac_abs_top_srcdir=$ac_pwd ;; | |
2698 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2699 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2700 | ac_top_srcdir=$srcdir | |
2701 | ac_abs_top_srcdir=$srcdir ;; | |
2702 | *) # Relative name. | |
2703 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2704 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2705 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2706 | esac | |
2707 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2708 | ||
2709 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2710 | # Check for guested configure. | |
2711 | if test -f "$ac_srcdir/configure.gnu"; then | |
2712 | echo && | |
2713 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2714 | elif test -f "$ac_srcdir/configure"; then | |
2715 | echo && | |
2716 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2717 | else | |
2718 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2719 | fi || ac_status=$? | |
2720 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2721 | done | |
2722 | fi | |
2723 | ||
2724 | test -n "$ac_init_help" && exit $ac_status | |
2725 | if $ac_init_version; then | |
2726 | cat <<\_ACEOF | |
d0ac1c44 SM |
2727 | libgnu configure UNUSED-VERSION |
2728 | generated by GNU Autoconf 2.69 | |
c971b7fa | 2729 | |
d0ac1c44 | 2730 | Copyright (C) 2012 Free Software Foundation, Inc. |
c971b7fa PA |
2731 | This configure script is free software; the Free Software Foundation |
2732 | gives unlimited permission to copy, distribute and modify it. | |
2733 | _ACEOF | |
2734 | exit | |
2735 | fi | |
2736 | ||
2737 | ## ------------------------ ## | |
2738 | ## Autoconf initialization. ## | |
2739 | ## ------------------------ ## | |
2740 | ||
2741 | # ac_fn_c_try_compile LINENO | |
2742 | # -------------------------- | |
2743 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2744 | ac_fn_c_try_compile () | |
2745 | { | |
2746 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2747 | rm -f conftest.$ac_objext | |
2748 | if { { ac_try="$ac_compile" | |
2749 | case "(($ac_try" in | |
2750 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2751 | *) ac_try_echo=$ac_try;; | |
2752 | esac | |
2753 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2754 | $as_echo "$ac_try_echo"; } >&5 | |
2755 | (eval "$ac_compile") 2>conftest.err | |
2756 | ac_status=$? | |
2757 | if test -s conftest.err; then | |
2758 | grep -v '^ *+' conftest.err >conftest.er1 | |
2759 | cat conftest.er1 >&5 | |
2760 | mv -f conftest.er1 conftest.err | |
2761 | fi | |
2762 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2763 | test $ac_status = 0; } && { | |
2764 | test -z "$ac_c_werror_flag" || | |
2765 | test ! -s conftest.err | |
2766 | } && test -s conftest.$ac_objext; then : | |
2767 | ac_retval=0 | |
2768 | else | |
2769 | $as_echo "$as_me: failed program was:" >&5 | |
2770 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2771 | ||
2772 | ac_retval=1 | |
2773 | fi | |
d0ac1c44 SM |
2774 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2775 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2776 | |
2777 | } # ac_fn_c_try_compile | |
2778 | ||
9c9d63b1 PM |
2779 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2780 | # ------------------------------------------------------- | |
2781 | # Tests whether HEADER exists and can be compiled using the include files in | |
2782 | # INCLUDES, setting the cache variable VAR accordingly. | |
2783 | ac_fn_c_check_header_compile () | |
2784 | { | |
2785 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2786 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2787 | $as_echo_n "checking for $2... " >&6; } | |
2788 | if eval \${$3+:} false; then : | |
2789 | $as_echo_n "(cached) " >&6 | |
2790 | else | |
2791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2792 | /* end confdefs.h. */ | |
2793 | $4 | |
2794 | #include <$2> | |
2795 | _ACEOF | |
2796 | if ac_fn_c_try_compile "$LINENO"; then : | |
2797 | eval "$3=yes" | |
2798 | else | |
2799 | eval "$3=no" | |
2800 | fi | |
2801 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2802 | fi | |
2803 | eval ac_res=\$$3 | |
2804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2805 | $as_echo "$ac_res" >&6; } | |
2806 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2807 | ||
2808 | } # ac_fn_c_check_header_compile | |
2809 | ||
c971b7fa PA |
2810 | # ac_fn_c_try_cpp LINENO |
2811 | # ---------------------- | |
2812 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2813 | ac_fn_c_try_cpp () | |
2814 | { | |
2815 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2816 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2817 | case "(($ac_try" in | |
2818 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2819 | *) ac_try_echo=$ac_try;; | |
2820 | esac | |
2821 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2822 | $as_echo "$ac_try_echo"; } >&5 | |
2823 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2824 | ac_status=$? | |
2825 | if test -s conftest.err; then | |
2826 | grep -v '^ *+' conftest.err >conftest.er1 | |
2827 | cat conftest.er1 >&5 | |
2828 | mv -f conftest.er1 conftest.err | |
2829 | fi | |
2830 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 2831 | test $ac_status = 0; } > conftest.i && { |
c971b7fa PA |
2832 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2833 | test ! -s conftest.err | |
2834 | }; then : | |
2835 | ac_retval=0 | |
2836 | else | |
2837 | $as_echo "$as_me: failed program was:" >&5 | |
2838 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2839 | ||
2840 | ac_retval=1 | |
2841 | fi | |
d0ac1c44 SM |
2842 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2843 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2844 | |
2845 | } # ac_fn_c_try_cpp | |
2846 | ||
c971b7fa PA |
2847 | # ac_fn_c_try_run LINENO |
2848 | # ---------------------- | |
2849 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2850 | # that executables *can* be run. | |
2851 | ac_fn_c_try_run () | |
2852 | { | |
2853 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2854 | if { { ac_try="$ac_link" | |
2855 | case "(($ac_try" in | |
2856 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2857 | *) ac_try_echo=$ac_try;; | |
2858 | esac | |
2859 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2860 | $as_echo "$ac_try_echo"; } >&5 | |
2861 | (eval "$ac_link") 2>&5 | |
2862 | ac_status=$? | |
2863 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2864 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2865 | { { case "(($ac_try" in | |
2866 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2867 | *) ac_try_echo=$ac_try;; | |
2868 | esac | |
2869 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2870 | $as_echo "$ac_try_echo"; } >&5 | |
2871 | (eval "$ac_try") 2>&5 | |
2872 | ac_status=$? | |
2873 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2874 | test $ac_status = 0; }; }; then : | |
2875 | ac_retval=0 | |
2876 | else | |
2877 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2878 | $as_echo "$as_me: failed program was:" >&5 | |
2879 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2880 | ||
2881 | ac_retval=$ac_status | |
2882 | fi | |
2883 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2884 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2885 | as_fn_set_status $ac_retval | |
c971b7fa PA |
2886 | |
2887 | } # ac_fn_c_try_run | |
2888 | ||
73cc7272 TT |
2889 | # ac_fn_c_try_link LINENO |
2890 | # ----------------------- | |
2891 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2892 | ac_fn_c_try_link () | |
2893 | { | |
2894 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2895 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2896 | if { { ac_try="$ac_link" | |
2897 | case "(($ac_try" in | |
2898 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2899 | *) ac_try_echo=$ac_try;; | |
2900 | esac | |
2901 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2902 | $as_echo "$ac_try_echo"; } >&5 | |
2903 | (eval "$ac_link") 2>conftest.err | |
2904 | ac_status=$? | |
2905 | if test -s conftest.err; then | |
2906 | grep -v '^ *+' conftest.err >conftest.er1 | |
2907 | cat conftest.er1 >&5 | |
2908 | mv -f conftest.er1 conftest.err | |
2909 | fi | |
2910 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2911 | test $ac_status = 0; } && { | |
2912 | test -z "$ac_c_werror_flag" || | |
2913 | test ! -s conftest.err | |
2914 | } && test -s conftest$ac_exeext && { | |
2915 | test "$cross_compiling" = yes || | |
2916 | test -x conftest$ac_exeext | |
2917 | }; then : | |
2918 | ac_retval=0 | |
2919 | else | |
2920 | $as_echo "$as_me: failed program was:" >&5 | |
2921 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2922 | ||
2923 | ac_retval=1 | |
2924 | fi | |
2925 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2926 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2927 | # interfere with the next link command; also delete a directory that is | |
2928 | # left behind by Apple's compiler. We do this before executing the actions. | |
2929 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2930 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2931 | as_fn_set_status $ac_retval | |
2932 | ||
2933 | } # ac_fn_c_try_link | |
2934 | ||
d0ac1c44 SM |
2935 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2936 | # ------------------------------------------- | |
2937 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2938 | # variable VAR accordingly. | |
2939 | ac_fn_c_check_type () | |
2940 | { | |
2941 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2943 | $as_echo_n "checking for $2... " >&6; } | |
2944 | if eval \${$3+:} false; then : | |
2945 | $as_echo_n "(cached) " >&6 | |
2946 | else | |
2947 | eval "$3=no" | |
2948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2949 | /* end confdefs.h. */ | |
2950 | $4 | |
2951 | int | |
2952 | main () | |
2953 | { | |
2954 | if (sizeof ($2)) | |
2955 | return 0; | |
2956 | ; | |
2957 | return 0; | |
2958 | } | |
2959 | _ACEOF | |
2960 | if ac_fn_c_try_compile "$LINENO"; then : | |
2961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2962 | /* end confdefs.h. */ | |
2963 | $4 | |
2964 | int | |
2965 | main () | |
2966 | { | |
2967 | if (sizeof (($2))) | |
2968 | return 0; | |
2969 | ; | |
2970 | return 0; | |
2971 | } | |
2972 | _ACEOF | |
2973 | if ac_fn_c_try_compile "$LINENO"; then : | |
2974 | ||
2975 | else | |
2976 | eval "$3=yes" | |
2977 | fi | |
2978 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2979 | fi | |
2980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2981 | fi | |
2982 | eval ac_res=\$$3 | |
2983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2984 | $as_echo "$ac_res" >&6; } | |
2985 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2986 | ||
2987 | } # ac_fn_c_check_type | |
2988 | ||
9c9d63b1 PM |
2989 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
2990 | # ------------------------------------------------------- | |
2991 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2992 | # the include files in INCLUDES and setting the cache variable VAR | |
2993 | # accordingly. | |
2994 | ac_fn_c_check_header_mongrel () | |
2995 | { | |
2996 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2997 | if eval \${$3+:} false; then : | |
2998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2999 | $as_echo_n "checking for $2... " >&6; } | |
3000 | if eval \${$3+:} false; then : | |
3001 | $as_echo_n "(cached) " >&6 | |
3002 | fi | |
3003 | eval ac_res=\$$3 | |
3004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3005 | $as_echo "$ac_res" >&6; } | |
3006 | else | |
3007 | # Is the header compilable? | |
3008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
3009 | $as_echo_n "checking $2 usability... " >&6; } | |
3010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3011 | /* end confdefs.h. */ | |
3012 | $4 | |
3013 | #include <$2> | |
3014 | _ACEOF | |
3015 | if ac_fn_c_try_compile "$LINENO"; then : | |
3016 | ac_header_compiler=yes | |
3017 | else | |
3018 | ac_header_compiler=no | |
3019 | fi | |
3020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
3022 | $as_echo "$ac_header_compiler" >&6; } | |
3023 | ||
3024 | # Is the header present? | |
3025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
3026 | $as_echo_n "checking $2 presence... " >&6; } | |
3027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3028 | /* end confdefs.h. */ | |
3029 | #include <$2> | |
3030 | _ACEOF | |
3031 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3032 | ac_header_preproc=yes | |
3033 | else | |
3034 | ac_header_preproc=no | |
3035 | fi | |
3036 | rm -f conftest.err conftest.i conftest.$ac_ext | |
3037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
3038 | $as_echo "$ac_header_preproc" >&6; } | |
3039 | ||
3040 | # So? What about this header? | |
3041 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
3042 | yes:no: ) | |
3043 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
3044 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
3045 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
3046 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
3047 | ;; | |
3048 | no:yes:* ) | |
3049 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
3050 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
3051 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
3052 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
3053 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
3054 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
3055 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
3056 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
3057 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
3058 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
3059 | ;; | |
3060 | esac | |
3061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
3062 | $as_echo_n "checking for $2... " >&6; } | |
3063 | if eval \${$3+:} false; then : | |
3064 | $as_echo_n "(cached) " >&6 | |
3065 | else | |
3066 | eval "$3=\$ac_header_compiler" | |
3067 | fi | |
3068 | eval ac_res=\$$3 | |
3069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3070 | $as_echo "$ac_res" >&6; } | |
3071 | fi | |
3072 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
3073 | ||
3074 | } # ac_fn_c_check_header_mongrel | |
3075 | ||
8690e634 JK |
3076 | # ac_fn_c_check_func LINENO FUNC VAR |
3077 | # ---------------------------------- | |
3078 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
3079 | ac_fn_c_check_func () | |
3080 | { | |
3081 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
3083 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 3084 | if eval \${$3+:} false; then : |
8690e634 JK |
3085 | $as_echo_n "(cached) " >&6 |
3086 | else | |
3087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3088 | /* end confdefs.h. */ | |
3089 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
3090 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
3091 | #define $2 innocuous_$2 | |
3092 | ||
3093 | /* System header to define __stub macros and hopefully few prototypes, | |
3094 | which can conflict with char $2 (); below. | |
3095 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3096 | <limits.h> exists even on freestanding compilers. */ | |
3097 | ||
3098 | #ifdef __STDC__ | |
3099 | # include <limits.h> | |
3100 | #else | |
3101 | # include <assert.h> | |
3102 | #endif | |
3103 | ||
3104 | #undef $2 | |
3105 | ||
3106 | /* Override any GCC internal prototype to avoid an error. | |
3107 | Use char because int might match the return type of a GCC | |
3108 | builtin and then its argument prototype would still apply. */ | |
3109 | #ifdef __cplusplus | |
3110 | extern "C" | |
3111 | #endif | |
3112 | char $2 (); | |
3113 | /* The GNU C library defines this for functions which it implements | |
3114 | to always fail with ENOSYS. Some functions are actually named | |
3115 | something starting with __ and the normal name is an alias. */ | |
3116 | #if defined __stub_$2 || defined __stub___$2 | |
3117 | choke me | |
3118 | #endif | |
3119 | ||
3120 | int | |
3121 | main () | |
3122 | { | |
3123 | return $2 (); | |
3124 | ; | |
3125 | return 0; | |
3126 | } | |
3127 | _ACEOF | |
3128 | if ac_fn_c_try_link "$LINENO"; then : | |
3129 | eval "$3=yes" | |
3130 | else | |
3131 | eval "$3=no" | |
3132 | fi | |
3133 | rm -f core conftest.err conftest.$ac_objext \ | |
3134 | conftest$ac_exeext conftest.$ac_ext | |
3135 | fi | |
3136 | eval ac_res=\$$3 | |
3137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3138 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 3139 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
8690e634 JK |
3140 | |
3141 | } # ac_fn_c_check_func | |
3142 | ||
d0ac1c44 SM |
3143 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
3144 | # --------------------------------------------- | |
3145 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
3146 | # accordingly. | |
8986e351 TT |
3147 | ac_fn_c_check_decl () |
3148 | { | |
5df4cba6 SM |
3149 | ac_save_ac_compile="$ac_compile" |
3150 | if test -n "$ac_compile_for_check_decl"; then | |
3151 | ac_compile="$ac_compile_for_check_decl" | |
3152 | fi | |
8986e351 | 3153 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
d0ac1c44 SM |
3154 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
3155 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
3156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
3157 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
3158 | if eval \${$3+:} false; then : | |
8986e351 TT |
3159 | $as_echo_n "(cached) " >&6 |
3160 | else | |
3161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3162 | /* end confdefs.h. */ | |
3163 | $4 | |
3164 | int | |
3165 | main () | |
3166 | { | |
d0ac1c44 SM |
3167 | #ifndef $as_decl_name |
3168 | #ifdef __cplusplus | |
3169 | (void) $as_decl_use; | |
3170 | #else | |
3171 | (void) $as_decl_name; | |
3172 | #endif | |
8986e351 TT |
3173 | #endif |
3174 | ||
3175 | ; | |
3176 | return 0; | |
3177 | } | |
3178 | _ACEOF | |
3179 | if ac_fn_c_try_compile "$LINENO"; then : | |
3180 | eval "$3=yes" | |
3181 | else | |
3182 | eval "$3=no" | |
3183 | fi | |
3184 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3185 | fi | |
3186 | eval ac_res=\$$3 | |
3187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3188 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 3189 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
5df4cba6 | 3190 | ac_compile="$ac_save_ac_compile" |
8986e351 TT |
3191 | |
3192 | } # ac_fn_c_check_decl | |
3193 | ||
c971b7fa PA |
3194 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
3195 | # -------------------------------------------- | |
3196 | # Tries to find the compile-time value of EXPR in a program that includes | |
3197 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
3198 | # computed | |
3199 | ac_fn_c_compute_int () | |
3200 | { | |
3201 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3202 | if test "$cross_compiling" = yes; then | |
3203 | # Depending upon the size, compute the lo and hi bounds. | |
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) >= 0)]; | |
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_lo=0 ac_mid=0 | |
3220 | while :; do | |
3221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3222 | /* end confdefs.h. */ | |
3223 | $4 | |
3224 | int | |
3225 | main () | |
3226 | { | |
3227 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
3228 | test_array [0] = 0; |
3229 | return test_array [0]; | |
c971b7fa PA |
3230 | |
3231 | ; | |
3232 | return 0; | |
3233 | } | |
3234 | _ACEOF | |
3235 | if ac_fn_c_try_compile "$LINENO"; then : | |
3236 | ac_hi=$ac_mid; break | |
3237 | else | |
3238 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
3239 | if test $ac_lo -le $ac_mid; then | |
3240 | ac_lo= ac_hi= | |
3241 | break | |
3242 | fi | |
3243 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
3244 | fi | |
3245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3246 | done | |
3247 | else | |
3248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3249 | /* end confdefs.h. */ | |
3250 | $4 | |
3251 | int | |
3252 | main () | |
3253 | { | |
3254 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
3255 | test_array [0] = 0; |
3256 | return test_array [0]; | |
c971b7fa PA |
3257 | |
3258 | ; | |
3259 | return 0; | |
3260 | } | |
3261 | _ACEOF | |
3262 | if ac_fn_c_try_compile "$LINENO"; then : | |
3263 | ac_hi=-1 ac_mid=-1 | |
3264 | while :; do | |
3265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266 | /* end confdefs.h. */ | |
3267 | $4 | |
3268 | int | |
3269 | main () | |
3270 | { | |
3271 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
3272 | test_array [0] = 0; |
3273 | return test_array [0]; | |
c971b7fa PA |
3274 | |
3275 | ; | |
3276 | return 0; | |
3277 | } | |
3278 | _ACEOF | |
3279 | if ac_fn_c_try_compile "$LINENO"; then : | |
3280 | ac_lo=$ac_mid; break | |
3281 | else | |
3282 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
3283 | if test $ac_mid -le $ac_hi; then | |
3284 | ac_lo= ac_hi= | |
3285 | break | |
3286 | fi | |
3287 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
3288 | fi | |
3289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3290 | done | |
3291 | else | |
3292 | ac_lo= ac_hi= | |
3293 | fi | |
3294 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3295 | fi | |
3296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3297 | # Binary search between lo and hi bounds. | |
3298 | while test "x$ac_lo" != "x$ac_hi"; do | |
3299 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
3300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3301 | /* end confdefs.h. */ | |
3302 | $4 | |
3303 | int | |
3304 | main () | |
3305 | { | |
3306 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
3307 | test_array [0] = 0; |
3308 | return test_array [0]; | |
c971b7fa PA |
3309 | |
3310 | ; | |
3311 | return 0; | |
3312 | } | |
3313 | _ACEOF | |
3314 | if ac_fn_c_try_compile "$LINENO"; then : | |
3315 | ac_hi=$ac_mid | |
3316 | else | |
3317 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
3318 | fi | |
3319 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3320 | done | |
3321 | case $ac_lo in #(( | |
3322 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
3323 | '') ac_retval=1 ;; | |
3324 | esac | |
3325 | else | |
3326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3327 | /* end confdefs.h. */ | |
3328 | $4 | |
3329 | static long int longval () { return $2; } | |
3330 | static unsigned long int ulongval () { return $2; } | |
3331 | #include <stdio.h> | |
3332 | #include <stdlib.h> | |
3333 | int | |
3334 | main () | |
3335 | { | |
3336 | ||
3337 | FILE *f = fopen ("conftest.val", "w"); | |
3338 | if (! f) | |
3339 | return 1; | |
3340 | if (($2) < 0) | |
3341 | { | |
3342 | long int i = longval (); | |
3343 | if (i != ($2)) | |
3344 | return 1; | |
3345 | fprintf (f, "%ld", i); | |
3346 | } | |
3347 | else | |
3348 | { | |
3349 | unsigned long int i = ulongval (); | |
3350 | if (i != ($2)) | |
3351 | return 1; | |
3352 | fprintf (f, "%lu", i); | |
3353 | } | |
3354 | /* Do not output a trailing newline, as this causes \r\n confusion | |
3355 | on some platforms. */ | |
3356 | return ferror (f) || fclose (f) != 0; | |
3357 | ||
3358 | ; | |
3359 | return 0; | |
3360 | } | |
3361 | _ACEOF | |
3362 | if ac_fn_c_try_run "$LINENO"; then : | |
3363 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
3364 | else | |
3365 | ac_retval=1 | |
3366 | fi | |
3367 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
3368 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3369 | rm -f conftest.val | |
3370 | ||
3371 | fi | |
d0ac1c44 SM |
3372 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
3373 | as_fn_set_status $ac_retval | |
c971b7fa PA |
3374 | |
3375 | } # ac_fn_c_compute_int | |
725e2999 JB |
3376 | |
3377 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
3378 | # ---------------------------------------------------- | |
3379 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
3380 | # INCLUDES, setting cache variable VAR accordingly. | |
3381 | ac_fn_c_check_member () | |
3382 | { | |
3383 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
3384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
3385 | $as_echo_n "checking for $2.$3... " >&6; } | |
3386 | if eval \${$4+:} false; then : | |
3387 | $as_echo_n "(cached) " >&6 | |
3388 | else | |
3389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3390 | /* end confdefs.h. */ | |
3391 | $5 | |
3392 | int | |
3393 | main () | |
3394 | { | |
3395 | static $2 ac_aggr; | |
3396 | if (ac_aggr.$3) | |
3397 | return 0; | |
3398 | ; | |
3399 | return 0; | |
3400 | } | |
3401 | _ACEOF | |
3402 | if ac_fn_c_try_compile "$LINENO"; then : | |
3403 | eval "$4=yes" | |
3404 | else | |
3405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3406 | /* end confdefs.h. */ | |
3407 | $5 | |
3408 | int | |
3409 | main () | |
3410 | { | |
3411 | static $2 ac_aggr; | |
3412 | if (sizeof ac_aggr.$3) | |
3413 | return 0; | |
3414 | ; | |
3415 | return 0; | |
3416 | } | |
3417 | _ACEOF | |
3418 | if ac_fn_c_try_compile "$LINENO"; then : | |
3419 | eval "$4=yes" | |
3420 | else | |
3421 | eval "$4=no" | |
3422 | fi | |
3423 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3424 | fi | |
3425 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3426 | fi | |
3427 | eval ac_res=\$$4 | |
3428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
3429 | $as_echo "$ac_res" >&6; } | |
3430 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
3431 | ||
3432 | } # ac_fn_c_check_member | |
c971b7fa PA |
3433 | cat >config.log <<_ACEOF |
3434 | This file contains any messages produced by compilers while | |
3435 | running configure, to aid debugging if configure makes a mistake. | |
3436 | ||
d0ac1c44 SM |
3437 | It was created by libgnu $as_me UNUSED-VERSION, which was |
3438 | generated by GNU Autoconf 2.69. Invocation command line was | |
c971b7fa PA |
3439 | |
3440 | $ $0 $@ | |
3441 | ||
3442 | _ACEOF | |
3443 | exec 5>>config.log | |
3444 | { | |
3445 | cat <<_ASUNAME | |
3446 | ## --------- ## | |
3447 | ## Platform. ## | |
3448 | ## --------- ## | |
3449 | ||
3450 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
3451 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
3452 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
3453 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
3454 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
3455 | ||
3456 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
3457 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
3458 | ||
3459 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
3460 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
3461 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
3462 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
3463 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
3464 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
3465 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
3466 | ||
3467 | _ASUNAME | |
3468 | ||
3469 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3470 | for as_dir in $PATH | |
3471 | do | |
3472 | IFS=$as_save_IFS | |
3473 | test -z "$as_dir" && as_dir=. | |
3474 | $as_echo "PATH: $as_dir" | |
3475 | done | |
3476 | IFS=$as_save_IFS | |
3477 | ||
3478 | } >&5 | |
3479 | ||
3480 | cat >&5 <<_ACEOF | |
3481 | ||
3482 | ||
3483 | ## ----------- ## | |
3484 | ## Core tests. ## | |
3485 | ## ----------- ## | |
3486 | ||
3487 | _ACEOF | |
3488 | ||
3489 | ||
3490 | # Keep a trace of the command line. | |
3491 | # Strip out --no-create and --no-recursion so they do not pile up. | |
3492 | # Strip out --silent because we don't want to record it for future runs. | |
3493 | # Also quote any args containing shell meta-characters. | |
3494 | # Make two passes to allow for proper duplicate-argument suppression. | |
3495 | ac_configure_args= | |
3496 | ac_configure_args0= | |
3497 | ac_configure_args1= | |
3498 | ac_must_keep_next=false | |
3499 | for ac_pass in 1 2 | |
3500 | do | |
3501 | for ac_arg | |
3502 | do | |
3503 | case $ac_arg in | |
3504 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
3505 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
3506 | | -silent | --silent | --silen | --sile | --sil) | |
3507 | continue ;; | |
3508 | *\'*) | |
3509 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3510 | esac | |
3511 | case $ac_pass in | |
3512 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
3513 | 2) | |
3514 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
3515 | if test $ac_must_keep_next = true; then | |
3516 | ac_must_keep_next=false # Got value, back to normal. | |
3517 | else | |
3518 | case $ac_arg in | |
3519 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
3520 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
3521 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
3522 | | -with-* | --with-* | -without-* | --without-* | --x) | |
3523 | case "$ac_configure_args0 " in | |
3524 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
3525 | esac | |
3526 | ;; | |
3527 | -* ) ac_must_keep_next=true ;; | |
3528 | esac | |
3529 | fi | |
3530 | as_fn_append ac_configure_args " '$ac_arg'" | |
3531 | ;; | |
3532 | esac | |
3533 | done | |
3534 | done | |
3535 | { ac_configure_args0=; unset ac_configure_args0;} | |
3536 | { ac_configure_args1=; unset ac_configure_args1;} | |
3537 | ||
3538 | # When interrupted or exit'd, cleanup temporary files, and complete | |
3539 | # config.log. We remove comments because anyway the quotes in there | |
3540 | # would cause problems or look ugly. | |
3541 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
3542 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
3543 | trap 'exit_status=$? | |
3544 | # Save into config.log some information that might help in debugging. | |
3545 | { | |
3546 | echo | |
3547 | ||
d0ac1c44 | 3548 | $as_echo "## ---------------- ## |
c971b7fa | 3549 | ## Cache variables. ## |
d0ac1c44 | 3550 | ## ---------------- ##" |
c971b7fa PA |
3551 | echo |
3552 | # The following way of writing the cache mishandles newlines in values, | |
3553 | ( | |
3554 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
3555 | eval ac_val=\$$ac_var | |
3556 | case $ac_val in #( | |
3557 | *${as_nl}*) | |
3558 | case $ac_var in #( | |
3559 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
3560 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
3561 | esac | |
3562 | case $ac_var in #( | |
3563 | _ | IFS | as_nl) ;; #( | |
3564 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
3565 | *) { eval $ac_var=; unset $ac_var;} ;; | |
3566 | esac ;; | |
3567 | esac | |
3568 | done | |
3569 | (set) 2>&1 | | |
3570 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
3571 | *${as_nl}ac_space=\ *) | |
3572 | sed -n \ | |
3573 | "s/'\''/'\''\\\\'\'''\''/g; | |
3574 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
3575 | ;; #( | |
3576 | *) | |
3577 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
3578 | ;; | |
3579 | esac | | |
3580 | sort | |
3581 | ) | |
3582 | echo | |
3583 | ||
d0ac1c44 | 3584 | $as_echo "## ----------------- ## |
c971b7fa | 3585 | ## Output variables. ## |
d0ac1c44 | 3586 | ## ----------------- ##" |
c971b7fa PA |
3587 | echo |
3588 | for ac_var in $ac_subst_vars | |
3589 | do | |
3590 | eval ac_val=\$$ac_var | |
3591 | case $ac_val in | |
3592 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3593 | esac | |
3594 | $as_echo "$ac_var='\''$ac_val'\''" | |
3595 | done | sort | |
3596 | echo | |
3597 | ||
3598 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 3599 | $as_echo "## ------------------- ## |
c971b7fa | 3600 | ## File substitutions. ## |
d0ac1c44 | 3601 | ## ------------------- ##" |
c971b7fa PA |
3602 | echo |
3603 | for ac_var in $ac_subst_files | |
3604 | do | |
3605 | eval ac_val=\$$ac_var | |
3606 | case $ac_val in | |
3607 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3608 | esac | |
3609 | $as_echo "$ac_var='\''$ac_val'\''" | |
3610 | done | sort | |
3611 | echo | |
3612 | fi | |
3613 | ||
3614 | if test -s confdefs.h; then | |
d0ac1c44 | 3615 | $as_echo "## ----------- ## |
c971b7fa | 3616 | ## confdefs.h. ## |
d0ac1c44 | 3617 | ## ----------- ##" |
c971b7fa PA |
3618 | echo |
3619 | cat confdefs.h | |
3620 | echo | |
3621 | fi | |
3622 | test "$ac_signal" != 0 && | |
3623 | $as_echo "$as_me: caught signal $ac_signal" | |
3624 | $as_echo "$as_me: exit $exit_status" | |
3625 | } >&5 | |
3626 | rm -f core *.core core.conftest.* && | |
3627 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3628 | exit $exit_status | |
3629 | ' 0 | |
3630 | for ac_signal in 1 2 13 15; do | |
3631 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3632 | done | |
3633 | ac_signal=0 | |
3634 | ||
3635 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3636 | rm -f -r conftest* confdefs.h | |
3637 | ||
3638 | $as_echo "/* confdefs.h */" > confdefs.h | |
3639 | ||
3640 | # Predefined preprocessor variables. | |
3641 | ||
3642 | cat >>confdefs.h <<_ACEOF | |
3643 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3644 | _ACEOF | |
3645 | ||
3646 | cat >>confdefs.h <<_ACEOF | |
3647 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3648 | _ACEOF | |
3649 | ||
3650 | cat >>confdefs.h <<_ACEOF | |
3651 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3652 | _ACEOF | |
3653 | ||
3654 | cat >>confdefs.h <<_ACEOF | |
3655 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3656 | _ACEOF | |
3657 | ||
3658 | cat >>confdefs.h <<_ACEOF | |
3659 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3660 | _ACEOF | |
3661 | ||
3662 | cat >>confdefs.h <<_ACEOF | |
3663 | #define PACKAGE_URL "$PACKAGE_URL" | |
3664 | _ACEOF | |
3665 | ||
3666 | ||
3667 | # Let the site file select an alternate cache file if it wants to. | |
3668 | # Prefer an explicitly selected file to automatically selected ones. | |
3669 | ac_site_file1=NONE | |
3670 | ac_site_file2=NONE | |
3671 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
3672 | # We do not want a PATH search for config.site. |
3673 | case $CONFIG_SITE in #(( | |
3674 | -*) ac_site_file1=./$CONFIG_SITE;; | |
3675 | */*) ac_site_file1=$CONFIG_SITE;; | |
3676 | *) ac_site_file1=./$CONFIG_SITE;; | |
3677 | esac | |
c971b7fa PA |
3678 | elif test "x$prefix" != xNONE; then |
3679 | ac_site_file1=$prefix/share/config.site | |
3680 | ac_site_file2=$prefix/etc/config.site | |
3681 | else | |
3682 | ac_site_file1=$ac_default_prefix/share/config.site | |
3683 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3684 | fi | |
3685 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3686 | do | |
3687 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 3688 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
c971b7fa PA |
3689 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
3690 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3691 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
3692 | . "$ac_site_file" \ |
3693 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3694 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3695 | as_fn_error $? "failed to load site script $ac_site_file | |
3696 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
3697 | fi |
3698 | done | |
3699 | ||
3700 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
3701 | # Some versions of bash will fail to source /dev/null (special files |
3702 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3703 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
c971b7fa PA |
3704 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
3705 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3706 | case $cache_file in | |
3707 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3708 | *) . "./$cache_file";; | |
3709 | esac | |
3710 | fi | |
3711 | else | |
3712 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3713 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3714 | >$cache_file | |
3715 | fi | |
3716 | ||
9c9d63b1 PM |
3717 | as_fn_append ac_header_list " wchar.h" |
3718 | as_fn_append ac_header_list " minix/config.h" | |
c0c3707f CB |
3719 | as_fn_append ac_header_list " arpa/inet.h" |
3720 | as_fn_append ac_header_list " features.h" | |
3721 | as_fn_append ac_header_list " sys/socket.h" | |
698be2d8 | 3722 | as_fn_append ac_func_list " btowc" |
c0c3707f | 3723 | as_fn_append ac_func_list " canonicalize_file_name" |
9c9d63b1 | 3724 | as_fn_append ac_func_list " faccessat" |
c0c3707f CB |
3725 | as_fn_append ac_func_list " realpath" |
3726 | as_fn_append ac_header_list " sys/param.h" | |
3727 | as_fn_append ac_header_list " unistd.h" | |
3728 | as_fn_append ac_func_list " _set_invalid_parameter_handler" | |
3729 | as_fn_append ac_func_list " fchdir" | |
3730 | as_fn_append ac_header_list " dirent.h" | |
3731 | as_fn_append ac_func_list " fcntl" | |
3732 | as_fn_append ac_func_list " symlink" | |
3733 | as_fn_append ac_func_list " fdopendir" | |
3734 | as_fn_append ac_func_list " mempcpy" | |
3735 | as_fn_append ac_header_list " fnmatch.h" | |
3736 | as_fn_append ac_func_list " fnmatch" | |
c0c3707f | 3737 | as_fn_append ac_func_list " mbsrtowcs" |
8690e634 | 3738 | gl_fnmatch_required=GNU |
c0c3707f CB |
3739 | as_fn_append ac_header_list " sys/stat.h" |
3740 | as_fn_append ac_func_list " fstatat" | |
c17253b9 | 3741 | as_fn_append ac_func_list " getdelim" |
c0c3707f CB |
3742 | as_fn_append ac_func_list " getdtablesize" |
3743 | as_fn_append ac_func_list " getlogin_r" | |
3744 | as_fn_append ac_func_list " getprogname" | |
3745 | as_fn_append ac_func_list " getexecname" | |
698be2d8 | 3746 | as_fn_append ac_func_list " getrandom" |
c0c3707f CB |
3747 | as_fn_append ac_header_list " sys/time.h" |
3748 | as_fn_append ac_func_list " gettimeofday" | |
3749 | as_fn_append ac_header_list " glob.h" | |
3750 | as_fn_append ac_func_list " glob" | |
3751 | as_fn_append ac_func_list " glob_pattern_p" | |
3752 | as_fn_append ac_func_list " getpwnam_r" | |
5df4cba6 | 3753 | as_fn_append ac_header_list " threads.h" |
c0c3707f CB |
3754 | as_fn_append ac_header_list " netdb.h" |
3755 | as_fn_append ac_header_list " netinet/in.h" | |
3756 | as_fn_append ac_header_list " limits.h" | |
c0c3707f | 3757 | as_fn_append ac_header_list " inttypes.h" |
9c9d63b1 PM |
3758 | as_fn_append ac_header_list " sys/types.h" |
3759 | as_fn_append ac_header_list " stdint.h" | |
698be2d8 | 3760 | as_fn_append ac_func_list " isblank" |
5df4cba6 | 3761 | as_fn_append ac_header_list " xlocale.h" |
c0c3707f CB |
3762 | as_fn_append ac_func_list " lstat" |
3763 | as_fn_append ac_header_list " math.h" | |
3764 | as_fn_append ac_func_list " mbsinit" | |
3765 | as_fn_append ac_func_list " mbrtowc" | |
3766 | as_fn_append ac_header_list " sys/mman.h" | |
3767 | as_fn_append ac_func_list " mprotect" | |
3768 | as_fn_append ac_func_list " mkostemp" | |
3769 | as_fn_append ac_func_list " openat" | |
9c9d63b1 PM |
3770 | as_fn_append ac_func_list " pipe" |
3771 | as_fn_append ac_func_list " readlink" | |
c0c3707f CB |
3772 | as_fn_append ac_func_list " link" |
3773 | as_fn_append ac_func_list " setenv" | |
c0c3707f CB |
3774 | as_fn_append ac_func_list " strerror_r" |
3775 | as_fn_append ac_func_list " __xpg_strerror_r" | |
3776 | as_fn_append ac_func_list " catgets" | |
3777 | as_fn_append ac_func_list " snprintf" | |
32e2770e | 3778 | as_fn_append ac_header_list " strings.h" |
698be2d8 | 3779 | as_fn_append ac_header_list " sys/random.h" |
c0c3707f CB |
3780 | as_fn_append ac_header_list " sys/uio.h" |
3781 | as_fn_append ac_func_list " localtime_r" | |
c0c3707f CB |
3782 | as_fn_append ac_header_list " crtdefs.h" |
3783 | as_fn_append ac_func_list " iswcntrl" | |
698be2d8 CB |
3784 | as_fn_append ac_header_list " wctype.h" |
3785 | as_fn_append ac_func_list " wmempcpy" | |
c971b7fa PA |
3786 | # Check that the precious variables saved in the cache have kept the same |
3787 | # value. | |
3788 | ac_cache_corrupted=false | |
3789 | for ac_var in $ac_precious_vars; do | |
3790 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3791 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3792 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3793 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3794 | case $ac_old_set,$ac_new_set in | |
3795 | set,) | |
3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3797 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3798 | ac_cache_corrupted=: ;; | |
3799 | ,set) | |
3800 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3801 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3802 | ac_cache_corrupted=: ;; | |
3803 | ,);; | |
3804 | *) | |
3805 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3806 | # differences in whitespace do not lead to failure. | |
3807 | ac_old_val_w=`echo x $ac_old_val` | |
3808 | ac_new_val_w=`echo x $ac_new_val` | |
3809 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3810 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3811 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3812 | ac_cache_corrupted=: | |
3813 | else | |
3814 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3815 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3816 | eval $ac_var=\$ac_old_val | |
3817 | fi | |
3818 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3819 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3820 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3821 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3822 | fi;; | |
3823 | esac | |
3824 | # Pass precious variables to config.status. | |
3825 | if test "$ac_new_set" = set; then | |
3826 | case $ac_new_val in | |
3827 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3828 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3829 | esac | |
3830 | case " $ac_configure_args " in | |
3831 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3832 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3833 | esac | |
3834 | fi | |
3835 | done | |
3836 | if $ac_cache_corrupted; then | |
3837 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3838 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3839 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3840 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 3841 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
c971b7fa PA |
3842 | fi |
3843 | ## -------------------- ## | |
3844 | ## Main body of script. ## | |
3845 | ## -------------------- ## | |
3846 | ||
3847 | ac_ext=c | |
3848 | ac_cpp='$CPP $CPPFLAGS' | |
3849 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3850 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3851 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3852 | ||
3853 | ||
d0ac1c44 | 3854 | |
73cc7272 TT |
3855 | |
3856 | ||
3857 | ||
c971b7fa PA |
3858 | ac_config_headers="$ac_config_headers config.h:config.in" |
3859 | ||
3860 | ||
5abebf3c CB |
3861 | |
3862 | ||
c971b7fa PA |
3863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
3864 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3865 | # Check whether --enable-maintainer-mode was given. | |
3866 | if test "${enable_maintainer_mode+set}" = set; then : | |
3867 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3868 | else | |
3869 | USE_MAINTAINER_MODE=no | |
3870 | fi | |
3871 | ||
3872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3873 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3874 | if test $USE_MAINTAINER_MODE = yes; then | |
3875 | MAINTAINER_MODE_TRUE= | |
3876 | MAINTAINER_MODE_FALSE='#' | |
3877 | else | |
3878 | MAINTAINER_MODE_TRUE='#' | |
3879 | MAINTAINER_MODE_FALSE= | |
3880 | fi | |
3881 | ||
3882 | MAINT=$MAINTAINER_MODE_TRUE | |
3883 | ||
3884 | ||
3885 | ||
3886 | ac_ext=c | |
3887 | ac_cpp='$CPP $CPPFLAGS' | |
3888 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3889 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3890 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3891 | if test -n "$ac_tool_prefix"; then | |
3892 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3893 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3895 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3896 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
3897 | $as_echo_n "(cached) " >&6 |
3898 | else | |
3899 | if test -n "$CC"; then | |
3900 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3901 | else | |
3902 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3903 | for as_dir in $PATH | |
3904 | do | |
3905 | IFS=$as_save_IFS | |
3906 | test -z "$as_dir" && as_dir=. | |
3907 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3908 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3909 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3910 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3911 | break 2 | |
3912 | fi | |
3913 | done | |
3914 | done | |
3915 | IFS=$as_save_IFS | |
3916 | ||
3917 | fi | |
3918 | fi | |
3919 | CC=$ac_cv_prog_CC | |
3920 | if test -n "$CC"; then | |
3921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3922 | $as_echo "$CC" >&6; } | |
3923 | else | |
3924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3925 | $as_echo "no" >&6; } | |
3926 | fi | |
3927 | ||
3928 | ||
3929 | fi | |
3930 | if test -z "$ac_cv_prog_CC"; then | |
3931 | ac_ct_CC=$CC | |
3932 | # Extract the first word of "gcc", so it can be a program name with args. | |
3933 | set dummy gcc; ac_word=$2 | |
3934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3935 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3936 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
c971b7fa PA |
3937 | $as_echo_n "(cached) " >&6 |
3938 | else | |
3939 | if test -n "$ac_ct_CC"; then | |
3940 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3941 | else | |
3942 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3943 | for as_dir in $PATH | |
3944 | do | |
3945 | IFS=$as_save_IFS | |
3946 | test -z "$as_dir" && as_dir=. | |
3947 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3948 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
3949 | ac_cv_prog_ac_ct_CC="gcc" |
3950 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3951 | break 2 | |
3952 | fi | |
3953 | done | |
3954 | done | |
3955 | IFS=$as_save_IFS | |
3956 | ||
3957 | fi | |
3958 | fi | |
3959 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3960 | if test -n "$ac_ct_CC"; then | |
3961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3962 | $as_echo "$ac_ct_CC" >&6; } | |
3963 | else | |
3964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3965 | $as_echo "no" >&6; } | |
3966 | fi | |
3967 | ||
3968 | if test "x$ac_ct_CC" = x; then | |
3969 | CC="" | |
3970 | else | |
3971 | case $cross_compiling:$ac_tool_warned in | |
3972 | yes:) | |
3973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3974 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3975 | ac_tool_warned=yes ;; | |
3976 | esac | |
3977 | CC=$ac_ct_CC | |
3978 | fi | |
3979 | else | |
3980 | CC="$ac_cv_prog_CC" | |
3981 | fi | |
3982 | ||
3983 | if test -z "$CC"; then | |
3984 | if test -n "$ac_tool_prefix"; then | |
3985 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3986 | set dummy ${ac_tool_prefix}cc; 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}cc" |
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 | fi | |
4023 | fi | |
4024 | if test -z "$CC"; then | |
4025 | # Extract the first word of "cc", so it can be a program name with args. | |
4026 | set dummy cc; ac_word=$2 | |
4027 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4028 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4029 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
4030 | $as_echo_n "(cached) " >&6 |
4031 | else | |
4032 | if test -n "$CC"; then | |
4033 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4034 | else | |
4035 | ac_prog_rejected=no | |
4036 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4037 | for as_dir in $PATH | |
4038 | do | |
4039 | IFS=$as_save_IFS | |
4040 | test -z "$as_dir" && as_dir=. | |
4041 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4042 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4043 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
4044 | ac_prog_rejected=yes | |
4045 | continue | |
4046 | fi | |
4047 | ac_cv_prog_CC="cc" | |
4048 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4049 | break 2 | |
4050 | fi | |
4051 | done | |
4052 | done | |
4053 | IFS=$as_save_IFS | |
4054 | ||
4055 | if test $ac_prog_rejected = yes; then | |
4056 | # We found a bogon in the path, so make sure we never use it. | |
4057 | set dummy $ac_cv_prog_CC | |
4058 | shift | |
4059 | if test $# != 0; then | |
4060 | # We chose a different compiler from the bogus one. | |
4061 | # However, it has the same basename, so the bogon will be chosen | |
4062 | # first if we set CC to just the basename; use the full file name. | |
4063 | shift | |
4064 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4065 | fi | |
4066 | fi | |
4067 | fi | |
4068 | fi | |
4069 | CC=$ac_cv_prog_CC | |
4070 | if test -n "$CC"; then | |
4071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4072 | $as_echo "$CC" >&6; } | |
4073 | else | |
4074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4075 | $as_echo "no" >&6; } | |
4076 | fi | |
4077 | ||
4078 | ||
4079 | fi | |
4080 | if test -z "$CC"; then | |
4081 | if test -n "$ac_tool_prefix"; then | |
4082 | for ac_prog in cl.exe | |
4083 | do | |
4084 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4085 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4087 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4088 | if ${ac_cv_prog_CC+:} false; then : |
c971b7fa PA |
4089 | $as_echo_n "(cached) " >&6 |
4090 | else | |
4091 | if test -n "$CC"; then | |
4092 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4093 | else | |
4094 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4095 | for as_dir in $PATH | |
4096 | do | |
4097 | IFS=$as_save_IFS | |
4098 | test -z "$as_dir" && as_dir=. | |
4099 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4100 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4101 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
4102 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4103 | break 2 | |
4104 | fi | |
4105 | done | |
4106 | done | |
4107 | IFS=$as_save_IFS | |
4108 | ||
4109 | fi | |
4110 | fi | |
4111 | CC=$ac_cv_prog_CC | |
4112 | if test -n "$CC"; then | |
4113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4114 | $as_echo "$CC" >&6; } | |
4115 | else | |
4116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4117 | $as_echo "no" >&6; } | |
4118 | fi | |
4119 | ||
4120 | ||
4121 | test -n "$CC" && break | |
4122 | done | |
4123 | fi | |
4124 | if test -z "$CC"; then | |
4125 | ac_ct_CC=$CC | |
4126 | for ac_prog in cl.exe | |
4127 | do | |
4128 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4129 | set dummy $ac_prog; ac_word=$2 | |
4130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4131 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 4132 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
c971b7fa PA |
4133 | $as_echo_n "(cached) " >&6 |
4134 | else | |
4135 | if test -n "$ac_ct_CC"; then | |
4136 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4137 | else | |
4138 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4139 | for as_dir in $PATH | |
4140 | do | |
4141 | IFS=$as_save_IFS | |
4142 | test -z "$as_dir" && as_dir=. | |
4143 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 4144 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
4145 | ac_cv_prog_ac_ct_CC="$ac_prog" |
4146 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4147 | break 2 | |
4148 | fi | |
4149 | done | |
4150 | done | |
4151 | IFS=$as_save_IFS | |
4152 | ||
4153 | fi | |
4154 | fi | |
4155 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4156 | if test -n "$ac_ct_CC"; then | |
4157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4158 | $as_echo "$ac_ct_CC" >&6; } | |
4159 | else | |
4160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4161 | $as_echo "no" >&6; } | |
4162 | fi | |
4163 | ||
4164 | ||
4165 | test -n "$ac_ct_CC" && break | |
4166 | done | |
4167 | ||
4168 | if test "x$ac_ct_CC" = x; then | |
4169 | CC="" | |
4170 | else | |
4171 | case $cross_compiling:$ac_tool_warned in | |
4172 | yes:) | |
4173 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4174 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4175 | ac_tool_warned=yes ;; | |
4176 | esac | |
4177 | CC=$ac_ct_CC | |
4178 | fi | |
4179 | fi | |
4180 | ||
c0c3707f CB |
4181 | fi |
4182 | if test -z "$CC"; then | |
4183 | if test -n "$ac_tool_prefix"; then | |
4184 | # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. | |
4185 | set dummy ${ac_tool_prefix}clang; ac_word=$2 | |
4186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4187 | $as_echo_n "checking for $ac_word... " >&6; } | |
4188 | if ${ac_cv_prog_CC+:} false; then : | |
4189 | $as_echo_n "(cached) " >&6 | |
4190 | else | |
4191 | if test -n "$CC"; then | |
4192 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4193 | else | |
4194 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4195 | for as_dir in $PATH | |
4196 | do | |
4197 | IFS=$as_save_IFS | |
4198 | test -z "$as_dir" && as_dir=. | |
4199 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4200 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4201 | ac_cv_prog_CC="${ac_tool_prefix}clang" | |
4202 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4203 | break 2 | |
4204 | fi | |
4205 | done | |
4206 | done | |
4207 | IFS=$as_save_IFS | |
4208 | ||
4209 | fi | |
4210 | fi | |
4211 | CC=$ac_cv_prog_CC | |
4212 | if test -n "$CC"; then | |
4213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4214 | $as_echo "$CC" >&6; } | |
4215 | else | |
4216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4217 | $as_echo "no" >&6; } | |
4218 | fi | |
4219 | ||
4220 | ||
4221 | fi | |
4222 | if test -z "$ac_cv_prog_CC"; then | |
4223 | ac_ct_CC=$CC | |
4224 | # Extract the first word of "clang", so it can be a program name with args. | |
4225 | set dummy clang; ac_word=$2 | |
4226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4227 | $as_echo_n "checking for $ac_word... " >&6; } | |
4228 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
4229 | $as_echo_n "(cached) " >&6 | |
4230 | else | |
4231 | if test -n "$ac_ct_CC"; then | |
4232 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4233 | else | |
4234 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4235 | for as_dir in $PATH | |
4236 | do | |
4237 | IFS=$as_save_IFS | |
4238 | test -z "$as_dir" && as_dir=. | |
4239 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4240 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4241 | ac_cv_prog_ac_ct_CC="clang" | |
4242 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4243 | break 2 | |
4244 | fi | |
4245 | done | |
4246 | done | |
4247 | IFS=$as_save_IFS | |
4248 | ||
4249 | fi | |
4250 | fi | |
4251 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4252 | if test -n "$ac_ct_CC"; then | |
4253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4254 | $as_echo "$ac_ct_CC" >&6; } | |
4255 | else | |
4256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4257 | $as_echo "no" >&6; } | |
4258 | fi | |
4259 | ||
4260 | if test "x$ac_ct_CC" = x; then | |
4261 | CC="" | |
4262 | else | |
4263 | case $cross_compiling:$ac_tool_warned in | |
4264 | yes:) | |
4265 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4266 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4267 | ac_tool_warned=yes ;; | |
4268 | esac | |
4269 | CC=$ac_ct_CC | |
4270 | fi | |
4271 | else | |
4272 | CC="$ac_cv_prog_CC" | |
4273 | fi | |
4274 | ||
c971b7fa PA |
4275 | fi |
4276 | ||
4277 | ||
4278 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4279 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4280 | as_fn_error $? "no acceptable C compiler found in \$PATH |
4281 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
4282 | |
4283 | # Provide some information about the compiler. | |
4284 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4285 | set X $ac_compile | |
4286 | ac_compiler=$2 | |
c0c3707f | 4287 | for ac_option in --version -v -V -qversion -version; do |
c971b7fa PA |
4288 | { { ac_try="$ac_compiler $ac_option >&5" |
4289 | case "(($ac_try" in | |
4290 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4291 | *) ac_try_echo=$ac_try;; | |
4292 | esac | |
4293 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4294 | $as_echo "$ac_try_echo"; } >&5 | |
4295 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4296 | ac_status=$? | |
4297 | if test -s conftest.err; then | |
4298 | sed '10a\ | |
4299 | ... rest of stderr output deleted ... | |
4300 | 10q' conftest.err >conftest.er1 | |
4301 | cat conftest.er1 >&5 | |
c971b7fa | 4302 | fi |
d0ac1c44 | 4303 | rm -f conftest.er1 conftest.err |
c971b7fa PA |
4304 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
4305 | test $ac_status = 0; } | |
4306 | done | |
4307 | ||
4308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4309 | /* end confdefs.h. */ | |
d0ac1c44 | 4310 | |
c971b7fa PA |
4311 | int |
4312 | main () | |
4313 | { | |
c971b7fa PA |
4314 | |
4315 | ; | |
4316 | return 0; | |
4317 | } | |
4318 | _ACEOF | |
4319 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 4320 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
c971b7fa PA |
4321 | # Try to create an executable without -o first, disregard a.out. |
4322 | # It will help us diagnose broken compilers, and finding out an intuition | |
4323 | # of exeext. | |
d0ac1c44 SM |
4324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
4325 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
c971b7fa PA |
4326 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
4327 | ||
4328 | # The possible output files: | |
4329 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4330 | ||
4331 | ac_rmfiles= | |
4332 | for ac_file in $ac_files | |
4333 | do | |
4334 | case $ac_file in | |
4335 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4336 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4337 | esac | |
4338 | done | |
4339 | rm -f $ac_rmfiles | |
4340 | ||
4341 | if { { ac_try="$ac_link_default" | |
4342 | case "(($ac_try" in | |
4343 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4344 | *) ac_try_echo=$ac_try;; | |
4345 | esac | |
4346 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4347 | $as_echo "$ac_try_echo"; } >&5 | |
4348 | (eval "$ac_link_default") 2>&5 | |
4349 | ac_status=$? | |
4350 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4351 | test $ac_status = 0; }; then : | |
4352 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4353 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4354 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4355 | # so that the user can short-circuit this test for compilers unknown to | |
4356 | # Autoconf. | |
4357 | for ac_file in $ac_files '' | |
4358 | do | |
4359 | test -f "$ac_file" || continue | |
4360 | case $ac_file in | |
4361 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4362 | ;; | |
4363 | [ab].out ) | |
4364 | # We found the default executable, but exeext='' is most | |
4365 | # certainly right. | |
4366 | break;; | |
4367 | *.* ) | |
4368 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4369 | then :; else | |
4370 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4371 | fi | |
4372 | # We set ac_cv_exeext here because the later test for it is not | |
4373 | # safe: cross compilers may not add the suffix if given an `-o' | |
4374 | # argument, so we may need to know it at that point already. | |
4375 | # Even if this section looks crufty: it has the advantage of | |
4376 | # actually working. | |
4377 | break;; | |
4378 | * ) | |
4379 | break;; | |
4380 | esac | |
4381 | done | |
4382 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
4383 | ||
4384 | else | |
4385 | ac_file='' | |
4386 | fi | |
c971b7fa | 4387 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
4388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4389 | $as_echo "no" >&6; } | |
4390 | $as_echo "$as_me: failed program was:" >&5 | |
c971b7fa PA |
4391 | sed 's/^/| /' conftest.$ac_ext >&5 |
4392 | ||
4393 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4394 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4395 | as_fn_error 77 "C compiler cannot create executables |
4396 | See \`config.log' for more details" "$LINENO" 5; } | |
4397 | else | |
4398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4399 | $as_echo "yes" >&6; } | |
c971b7fa | 4400 | fi |
d0ac1c44 SM |
4401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
4402 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
4403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
4404 | $as_echo "$ac_file" >&6; } | |
c971b7fa PA |
4405 | ac_exeext=$ac_cv_exeext |
4406 | ||
d0ac1c44 | 4407 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
c971b7fa | 4408 | ac_clean_files=$ac_clean_files_save |
c971b7fa PA |
4409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
4410 | $as_echo_n "checking for suffix of executables... " >&6; } | |
4411 | if { { ac_try="$ac_link" | |
4412 | case "(($ac_try" in | |
4413 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4414 | *) ac_try_echo=$ac_try;; | |
4415 | esac | |
4416 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4417 | $as_echo "$ac_try_echo"; } >&5 | |
4418 | (eval "$ac_link") 2>&5 | |
4419 | ac_status=$? | |
4420 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4421 | test $ac_status = 0; }; then : | |
4422 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
4423 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
4424 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
4425 | # `rm'. | |
4426 | for ac_file in conftest.exe conftest conftest.*; do | |
4427 | test -f "$ac_file" || continue | |
4428 | case $ac_file in | |
4429 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4430 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4431 | break;; | |
4432 | * ) break;; | |
4433 | esac | |
4434 | done | |
4435 | else | |
4436 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4437 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4438 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
4439 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa | 4440 | fi |
d0ac1c44 | 4441 | rm -f conftest conftest$ac_cv_exeext |
c971b7fa PA |
4442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
4443 | $as_echo "$ac_cv_exeext" >&6; } | |
4444 | ||
4445 | rm -f conftest.$ac_ext | |
4446 | EXEEXT=$ac_cv_exeext | |
4447 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
4448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4449 | /* end confdefs.h. */ | |
4450 | #include <stdio.h> | |
4451 | int | |
4452 | main () | |
4453 | { | |
4454 | FILE *f = fopen ("conftest.out", "w"); | |
4455 | return ferror (f) || fclose (f) != 0; | |
4456 | ||
4457 | ; | |
4458 | return 0; | |
4459 | } | |
4460 | _ACEOF | |
4461 | ac_clean_files="$ac_clean_files conftest.out" | |
4462 | # Check that the compiler produces executables we can run. If not, either | |
4463 | # the compiler is broken, or we cross compile. | |
4464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4465 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4466 | if test "$cross_compiling" != yes; then | |
4467 | { { ac_try="$ac_link" | |
4468 | case "(($ac_try" in | |
4469 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4470 | *) ac_try_echo=$ac_try;; | |
4471 | esac | |
4472 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4473 | $as_echo "$ac_try_echo"; } >&5 | |
4474 | (eval "$ac_link") 2>&5 | |
4475 | ac_status=$? | |
4476 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4477 | test $ac_status = 0; } | |
4478 | if { ac_try='./conftest$ac_cv_exeext' | |
4479 | { { case "(($ac_try" in | |
4480 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4481 | *) ac_try_echo=$ac_try;; | |
4482 | esac | |
4483 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4484 | $as_echo "$ac_try_echo"; } >&5 | |
4485 | (eval "$ac_try") 2>&5 | |
4486 | ac_status=$? | |
4487 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4488 | test $ac_status = 0; }; }; then | |
4489 | cross_compiling=no | |
4490 | else | |
4491 | if test "$cross_compiling" = maybe; then | |
4492 | cross_compiling=yes | |
4493 | else | |
4494 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4495 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4496 | as_fn_error $? "cannot run C compiled programs. | |
4497 | If you meant to cross compile, use \`--host'. | |
4498 | See \`config.log' for more details" "$LINENO" 5; } | |
4499 | fi | |
4500 | fi | |
4501 | fi | |
4502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4503 | $as_echo "$cross_compiling" >&6; } | |
4504 | ||
4505 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4506 | ac_clean_files=$ac_clean_files_save | |
c971b7fa PA |
4507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
4508 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 4509 | if ${ac_cv_objext+:} false; then : |
c971b7fa PA |
4510 | $as_echo_n "(cached) " >&6 |
4511 | else | |
4512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4513 | /* end confdefs.h. */ | |
4514 | ||
4515 | int | |
4516 | main () | |
4517 | { | |
4518 | ||
4519 | ; | |
4520 | return 0; | |
4521 | } | |
4522 | _ACEOF | |
4523 | rm -f conftest.o conftest.obj | |
4524 | if { { ac_try="$ac_compile" | |
4525 | case "(($ac_try" in | |
4526 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4527 | *) ac_try_echo=$ac_try;; | |
4528 | esac | |
4529 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4530 | $as_echo "$ac_try_echo"; } >&5 | |
4531 | (eval "$ac_compile") 2>&5 | |
4532 | ac_status=$? | |
4533 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4534 | test $ac_status = 0; }; then : | |
4535 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4536 | test -f "$ac_file" || continue; | |
4537 | case $ac_file in | |
4538 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4539 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4540 | break;; | |
4541 | esac | |
4542 | done | |
4543 | else | |
4544 | $as_echo "$as_me: failed program was:" >&5 | |
4545 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4546 | ||
4547 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4548 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4549 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
4550 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
4551 | fi |
4552 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4553 | fi | |
4554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4555 | $as_echo "$ac_cv_objext" >&6; } | |
4556 | OBJEXT=$ac_cv_objext | |
4557 | ac_objext=$OBJEXT | |
4558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4559 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 4560 | if ${ac_cv_c_compiler_gnu+:} false; then : |
c971b7fa PA |
4561 | $as_echo_n "(cached) " >&6 |
4562 | else | |
4563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4564 | /* end confdefs.h. */ | |
4565 | ||
4566 | int | |
4567 | main () | |
4568 | { | |
4569 | #ifndef __GNUC__ | |
4570 | choke me | |
4571 | #endif | |
4572 | ||
4573 | ; | |
4574 | return 0; | |
4575 | } | |
4576 | _ACEOF | |
4577 | if ac_fn_c_try_compile "$LINENO"; then : | |
4578 | ac_compiler_gnu=yes | |
4579 | else | |
4580 | ac_compiler_gnu=no | |
4581 | fi | |
4582 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4583 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4584 | ||
4585 | fi | |
4586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4587 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4588 | if test $ac_compiler_gnu = yes; then | |
4589 | GCC=yes | |
4590 | else | |
4591 | GCC= | |
4592 | fi | |
4593 | ac_test_CFLAGS=${CFLAGS+set} | |
4594 | ac_save_CFLAGS=$CFLAGS | |
4595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4596 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 4597 | if ${ac_cv_prog_cc_g+:} false; then : |
c971b7fa PA |
4598 | $as_echo_n "(cached) " >&6 |
4599 | else | |
4600 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4601 | ac_c_werror_flag=yes | |
4602 | ac_cv_prog_cc_g=no | |
4603 | CFLAGS="-g" | |
4604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4605 | /* end confdefs.h. */ | |
4606 | ||
4607 | int | |
4608 | main () | |
4609 | { | |
4610 | ||
4611 | ; | |
4612 | return 0; | |
4613 | } | |
4614 | _ACEOF | |
4615 | if ac_fn_c_try_compile "$LINENO"; then : | |
4616 | ac_cv_prog_cc_g=yes | |
4617 | else | |
4618 | CFLAGS="" | |
4619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4620 | /* end confdefs.h. */ | |
4621 | ||
4622 | int | |
4623 | main () | |
4624 | { | |
4625 | ||
4626 | ; | |
4627 | return 0; | |
4628 | } | |
4629 | _ACEOF | |
4630 | if ac_fn_c_try_compile "$LINENO"; then : | |
4631 | ||
4632 | else | |
4633 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4634 | CFLAGS="-g" | |
4635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4636 | /* end confdefs.h. */ | |
4637 | ||
4638 | int | |
4639 | main () | |
4640 | { | |
4641 | ||
4642 | ; | |
4643 | return 0; | |
4644 | } | |
4645 | _ACEOF | |
4646 | if ac_fn_c_try_compile "$LINENO"; then : | |
4647 | ac_cv_prog_cc_g=yes | |
4648 | fi | |
4649 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4650 | fi | |
4651 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4652 | fi | |
4653 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4654 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4655 | fi | |
4656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4657 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4658 | if test "$ac_test_CFLAGS" = set; then | |
4659 | CFLAGS=$ac_save_CFLAGS | |
4660 | elif test $ac_cv_prog_cc_g = yes; then | |
4661 | if test "$GCC" = yes; then | |
4662 | CFLAGS="-g -O2" | |
4663 | else | |
4664 | CFLAGS="-g" | |
4665 | fi | |
4666 | else | |
4667 | if test "$GCC" = yes; then | |
4668 | CFLAGS="-O2" | |
4669 | else | |
4670 | CFLAGS= | |
4671 | fi | |
4672 | fi | |
c0c3707f CB |
4673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 |
4674 | $as_echo_n "checking for $CC option to enable C11 features... " >&6; } | |
4675 | if ${ac_cv_prog_cc_c11+:} false; then : | |
c971b7fa PA |
4676 | $as_echo_n "(cached) " >&6 |
4677 | else | |
c0c3707f | 4678 | ac_cv_prog_cc_c11=no |
c971b7fa PA |
4679 | ac_save_CC=$CC |
4680 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4681 | /* end confdefs.h. */ | |
4682 | #include <stdarg.h> | |
c0c3707f CB |
4683 | #include <stdbool.h> |
4684 | #include <stddef.h> | |
4685 | #include <stdlib.h> | |
4686 | #include <wchar.h> | |
c971b7fa | 4687 | #include <stdio.h> |
c0c3707f CB |
4688 | |
4689 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
4690 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
4691 | #define showlist(...) puts (#__VA_ARGS__) | |
4692 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
4693 | static void | |
4694 | test_varargs_macros (void) | |
7a6dbc2f | 4695 | { |
c0c3707f CB |
4696 | int x = 1234; |
4697 | int y = 5678; | |
4698 | debug ("Flag"); | |
4699 | debug ("X = %d\n", x); | |
4700 | showlist (The first, second, and third items.); | |
4701 | report (x>y, "x is %d but y is %d", x, y); | |
c971b7fa | 4702 | } |
c0c3707f CB |
4703 | |
4704 | // Check long long types. | |
4705 | #define BIG64 18446744073709551615ull | |
4706 | #define BIG32 4294967295ul | |
4707 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
4708 | #if !BIG_OK | |
4709 | your preprocessor is broken; | |
4710 | #endif | |
4711 | #if BIG_OK | |
4712 | #else | |
4713 | your preprocessor is broken; | |
4714 | #endif | |
4715 | static long long int bignum = -9223372036854775807LL; | |
4716 | static unsigned long long int ubignum = BIG64; | |
4717 | ||
4718 | struct incomplete_array | |
7a6dbc2f | 4719 | { |
c0c3707f CB |
4720 | int datasize; |
4721 | double data[]; | |
4722 | }; | |
4723 | ||
4724 | struct named_init { | |
4725 | int number; | |
4726 | const wchar_t *name; | |
4727 | double average; | |
4728 | }; | |
4729 | ||
4730 | typedef const char *ccp; | |
4731 | ||
4732 | static inline int | |
4733 | test_restrict (ccp restrict text) | |
4734 | { | |
4735 | // See if C++-style comments work. | |
4736 | // Iterate through items via the restricted pointer. | |
4737 | // Also check for declarations in for loops. | |
4738 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
4739 | continue; | |
4740 | return 0; | |
7a6dbc2f | 4741 | } |
7a6dbc2f | 4742 | |
c0c3707f CB |
4743 | // Check varargs and va_copy. |
4744 | static bool | |
4745 | test_varargs (const char *format, ...) | |
4746 | { | |
4747 | va_list args; | |
4748 | va_start (args, format); | |
4749 | va_list args_copy; | |
4750 | va_copy (args_copy, args); | |
7a6dbc2f | 4751 | |
c0c3707f CB |
4752 | const char *str = ""; |
4753 | int number = 0; | |
4754 | float fnumber = 0; | |
4755 | ||
4756 | while (*format) | |
4757 | { | |
4758 | switch (*format++) | |
4759 | { | |
4760 | case 's': // string | |
4761 | str = va_arg (args_copy, const char *); | |
4762 | break; | |
4763 | case 'd': // int | |
4764 | number = va_arg (args_copy, int); | |
4765 | break; | |
4766 | case 'f': // float | |
4767 | fnumber = va_arg (args_copy, double); | |
4768 | break; | |
4769 | default: | |
4770 | break; | |
4771 | } | |
4772 | } | |
4773 | va_end (args_copy); | |
4774 | va_end (args); | |
4775 | ||
4776 | return *str && number && fnumber; | |
4777 | } | |
4778 | // Check _Alignas. | |
4779 | char _Alignas (double) aligned_as_double; | |
4780 | char _Alignas (0) no_special_alignment; | |
4781 | extern char aligned_as_int; | |
4782 | char _Alignas (0) _Alignas (int) aligned_as_int; | |
4783 | ||
4784 | // Check _Alignof. | |
4785 | enum | |
4786 | { | |
4787 | int_alignment = _Alignof (int), | |
4788 | int_array_alignment = _Alignof (int[100]), | |
4789 | char_alignment = _Alignof (char) | |
4790 | }; | |
4791 | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); | |
4792 | ||
4793 | // Check _Noreturn. | |
4794 | int _Noreturn does_not_return (void) { for (;;) continue; } | |
4795 | ||
4796 | // Check _Static_assert. | |
4797 | struct test_static_assert | |
4798 | { | |
4799 | int x; | |
4800 | _Static_assert (sizeof (int) <= sizeof (long int), | |
4801 | "_Static_assert does not work in struct"); | |
4802 | long int y; | |
4803 | }; | |
4804 | ||
4805 | // Check UTF-8 literals. | |
4806 | #define u8 syntax error! | |
4807 | char const utf8_literal[] = u8"happens to be ASCII" "another string"; | |
4808 | ||
4809 | // Check duplicate typedefs. | |
4810 | typedef long *long_ptr; | |
4811 | typedef long int *long_ptr; | |
4812 | typedef long_ptr long_ptr; | |
4813 | ||
4814 | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. | |
4815 | struct anonymous | |
4816 | { | |
4817 | union { | |
4818 | struct { int i; int j; }; | |
4819 | struct { int k; long int l; } w; | |
4820 | }; | |
4821 | int m; | |
4822 | } v1; | |
c971b7fa | 4823 | |
c971b7fa PA |
4824 | int |
4825 | main () | |
4826 | { | |
c0c3707f CB |
4827 | |
4828 | // Check bool. | |
4829 | _Bool success = false; | |
4830 | ||
4831 | // Check restrict. | |
4832 | if (test_restrict ("String literal") == 0) | |
4833 | success = true; | |
4834 | char *restrict newvar = "Another string"; | |
4835 | ||
4836 | // Check varargs. | |
4837 | success &= test_varargs ("s, d' f .", "string", 65, 34.234); | |
4838 | test_varargs_macros (); | |
4839 | ||
4840 | // Check flexible array members. | |
4841 | struct incomplete_array *ia = | |
4842 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
4843 | ia->datasize = 10; | |
4844 | for (int i = 0; i < ia->datasize; ++i) | |
4845 | ia->data[i] = i * 1.234; | |
4846 | ||
4847 | // Check named initializers. | |
4848 | struct named_init ni = { | |
4849 | .number = 34, | |
4850 | .name = L"Test wide string", | |
4851 | .average = 543.34343, | |
4852 | }; | |
4853 | ||
4854 | ni.number = 58; | |
4855 | ||
4856 | int dynamic_array[ni.number]; | |
4857 | dynamic_array[ni.number - 1] = 543; | |
4858 | ||
4859 | // work around unused variable warnings | |
4860 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
4861 | || dynamic_array[ni.number - 1] != 543); | |
4862 | ||
4863 | v1.i = 2; | |
4864 | v1.w.k = 5; | |
4865 | _Static_assert ((offsetof (struct anonymous, i) | |
4866 | == offsetof (struct anonymous, w.k)), | |
4867 | "Anonymous union alignment botch"); | |
4868 | ||
c971b7fa PA |
4869 | ; |
4870 | return 0; | |
4871 | } | |
4872 | _ACEOF | |
c0c3707f | 4873 | for ac_arg in '' -std=gnu11 |
c971b7fa PA |
4874 | do |
4875 | CC="$ac_save_CC $ac_arg" | |
4876 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 4877 | ac_cv_prog_cc_c11=$ac_arg |
c971b7fa PA |
4878 | fi |
4879 | rm -f core conftest.err conftest.$ac_objext | |
c0c3707f | 4880 | test "x$ac_cv_prog_cc_c11" != "xno" && break |
c971b7fa PA |
4881 | done |
4882 | rm -f conftest.$ac_ext | |
4883 | CC=$ac_save_CC | |
4884 | ||
4885 | fi | |
4886 | # AC_CACHE_VAL | |
c0c3707f CB |
4887 | ac_prog_cc_stdc_options= |
4888 | case "x$ac_cv_prog_cc_c11" in | |
c971b7fa PA |
4889 | x) |
4890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4891 | $as_echo "none needed" >&6; } ;; | |
4892 | xno) | |
4893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4894 | $as_echo "unsupported" >&6; } ;; | |
4895 | *) | |
c0c3707f CB |
4896 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11" |
4897 | CC=$CC$ac_prog_cc_stdc_options | |
4898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 | |
4899 | $as_echo "$ac_cv_prog_cc_c11" >&6; } ;; | |
c971b7fa | 4900 | esac |
c0c3707f CB |
4901 | if test "x$ac_cv_prog_cc_c11" != xno; then : |
4902 | ac_prog_cc_stdc=c11 | |
4903 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 | |
4904 | else | |
4905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 | |
4906 | $as_echo_n "checking for $CC option to enable C99 features... " >&6; } | |
4907 | if ${ac_cv_prog_cc_c99+:} false; then : | |
4908 | $as_echo_n "(cached) " >&6 | |
4909 | else | |
4910 | ac_cv_prog_cc_c99=no | |
4911 | ac_save_CC=$CC | |
4912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4913 | /* end confdefs.h. */ | |
4914 | #include <stdarg.h> | |
4915 | #include <stdbool.h> | |
4916 | #include <stddef.h> | |
4917 | #include <stdlib.h> | |
4918 | #include <wchar.h> | |
4919 | #include <stdio.h> | |
7a6dbc2f | 4920 | |
c0c3707f CB |
4921 | // Check varargs macros. These examples are taken from C99 6.10.3.5. |
4922 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
4923 | #define showlist(...) puts (#__VA_ARGS__) | |
4924 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
4925 | static void | |
4926 | test_varargs_macros (void) | |
4927 | { | |
4928 | int x = 1234; | |
4929 | int y = 5678; | |
4930 | debug ("Flag"); | |
4931 | debug ("X = %d\n", x); | |
4932 | showlist (The first, second, and third items.); | |
4933 | report (x>y, "x is %d but y is %d", x, y); | |
4934 | } | |
7a6dbc2f | 4935 | |
c0c3707f CB |
4936 | // Check long long types. |
4937 | #define BIG64 18446744073709551615ull | |
4938 | #define BIG32 4294967295ul | |
4939 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
4940 | #if !BIG_OK | |
4941 | your preprocessor is broken; | |
4942 | #endif | |
4943 | #if BIG_OK | |
4944 | #else | |
4945 | your preprocessor is broken; | |
4946 | #endif | |
4947 | static long long int bignum = -9223372036854775807LL; | |
4948 | static unsigned long long int ubignum = BIG64; | |
7a6dbc2f | 4949 | |
c0c3707f CB |
4950 | struct incomplete_array |
4951 | { | |
4952 | int datasize; | |
4953 | double data[]; | |
4954 | }; | |
7a6dbc2f | 4955 | |
c0c3707f CB |
4956 | struct named_init { |
4957 | int number; | |
4958 | const wchar_t *name; | |
4959 | double average; | |
4960 | }; | |
7a6dbc2f | 4961 | |
c0c3707f | 4962 | typedef const char *ccp; |
7a6dbc2f | 4963 | |
c0c3707f CB |
4964 | static inline int |
4965 | test_restrict (ccp restrict text) | |
4966 | { | |
4967 | // See if C++-style comments work. | |
4968 | // Iterate through items via the restricted pointer. | |
4969 | // Also check for declarations in for loops. | |
4970 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
4971 | continue; | |
4972 | return 0; | |
4973 | } | |
7a6dbc2f | 4974 | |
c0c3707f CB |
4975 | // Check varargs and va_copy. |
4976 | static bool | |
4977 | test_varargs (const char *format, ...) | |
4978 | { | |
4979 | va_list args; | |
4980 | va_start (args, format); | |
4981 | va_list args_copy; | |
4982 | va_copy (args_copy, args); | |
4983 | ||
4984 | const char *str = ""; | |
4985 | int number = 0; | |
4986 | float fnumber = 0; | |
4987 | ||
4988 | while (*format) | |
4989 | { | |
4990 | switch (*format++) | |
4991 | { | |
4992 | case 's': // string | |
4993 | str = va_arg (args_copy, const char *); | |
4994 | break; | |
4995 | case 'd': // int | |
4996 | number = va_arg (args_copy, int); | |
4997 | break; | |
4998 | case 'f': // float | |
4999 | fnumber = va_arg (args_copy, double); | |
5000 | break; | |
5001 | default: | |
5002 | break; | |
5003 | } | |
5004 | } | |
5005 | va_end (args_copy); | |
5006 | va_end (args); | |
5007 | ||
5008 | return *str && number && fnumber; | |
5009 | } | |
5010 | int | |
5011 | main () | |
5012 | { | |
5013 | ||
5014 | // Check bool. | |
5015 | _Bool success = false; | |
5016 | ||
5017 | // Check restrict. | |
5018 | if (test_restrict ("String literal") == 0) | |
5019 | success = true; | |
5020 | char *restrict newvar = "Another string"; | |
5021 | ||
5022 | // Check varargs. | |
5023 | success &= test_varargs ("s, d' f .", "string", 65, 34.234); | |
5024 | test_varargs_macros (); | |
5025 | ||
5026 | // Check flexible array members. | |
5027 | struct incomplete_array *ia = | |
5028 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
5029 | ia->datasize = 10; | |
5030 | for (int i = 0; i < ia->datasize; ++i) | |
5031 | ia->data[i] = i * 1.234; | |
5032 | ||
5033 | // Check named initializers. | |
5034 | struct named_init ni = { | |
5035 | .number = 34, | |
5036 | .name = L"Test wide string", | |
5037 | .average = 543.34343, | |
5038 | }; | |
5039 | ||
5040 | ni.number = 58; | |
5041 | ||
5042 | int dynamic_array[ni.number]; | |
5043 | dynamic_array[ni.number - 1] = 543; | |
5044 | ||
5045 | // work around unused variable warnings | |
5046 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
5047 | || dynamic_array[ni.number - 1] != 543); | |
5048 | ||
5049 | ; | |
5050 | return 0; | |
5051 | } | |
5052 | _ACEOF | |
5053 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99 | |
5054 | do | |
5055 | CC="$ac_save_CC $ac_arg" | |
5056 | if ac_fn_c_try_compile "$LINENO"; then : | |
5057 | ac_cv_prog_cc_c99=$ac_arg | |
5058 | fi | |
5059 | rm -f core conftest.err conftest.$ac_objext | |
5060 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
5061 | done | |
5062 | rm -f conftest.$ac_ext | |
5063 | CC=$ac_save_CC | |
5064 | ||
5065 | fi | |
5066 | # AC_CACHE_VAL | |
5067 | ac_prog_cc_stdc_options= | |
5068 | case "x$ac_cv_prog_cc_c99" in | |
5069 | x) | |
5070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5071 | $as_echo "none needed" >&6; } ;; | |
5072 | xno) | |
5073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5074 | $as_echo "unsupported" >&6; } ;; | |
5075 | *) | |
5076 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99" | |
5077 | CC=$CC$ac_prog_cc_stdc_options | |
5078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
5079 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
5080 | esac | |
5081 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
5082 | ac_prog_cc_stdc=c99 | |
5083 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
5084 | else | |
5085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 | |
5086 | $as_echo_n "checking for $CC option to enable C89 features... " >&6; } | |
5087 | if ${ac_cv_prog_cc_c89+:} false; then : | |
d0ac1c44 SM |
5088 | $as_echo_n "(cached) " >&6 |
5089 | else | |
c0c3707f CB |
5090 | ac_cv_prog_cc_c89=no |
5091 | ac_save_CC=$CC | |
5092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d0ac1c44 | 5093 | /* end confdefs.h. */ |
c0c3707f CB |
5094 | #include <stdarg.h> |
5095 | #include <stdio.h> | |
5096 | struct stat; | |
5097 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5098 | struct buf { int x; }; | |
5099 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5100 | static char *e (p, i) | |
5101 | char **p; | |
5102 | int i; | |
5103 | { | |
5104 | return p[i]; | |
5105 | } | |
5106 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5107 | { | |
5108 | char *s; | |
5109 | va_list v; | |
5110 | va_start (v,p); | |
5111 | s = g (p, va_arg (v,int)); | |
5112 | va_end (v); | |
5113 | return s; | |
5114 | } | |
5115 | ||
5116 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5117 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5118 | These don't provoke an error unfortunately, instead are silently treated | |
5119 | as 'x'. The following induces an error, until -std is added to get | |
5120 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5121 | array size at least. It's necessary to write '\x00'==0 to get something | |
5122 | that's true only with -std. */ | |
5123 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5124 | ||
5125 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5126 | inside strings and character constants. */ | |
5127 | #define FOO(x) 'x' | |
5128 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
d0ac1c44 | 5129 | |
c0c3707f CB |
5130 | int test (int i, double x); |
5131 | struct s1 {int (*f) (int a);}; | |
5132 | struct s2 {int (*f) (double a);}; | |
5133 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5134 | int argc; | |
5135 | char **argv; | |
d0ac1c44 SM |
5136 | int |
5137 | main () | |
5138 | { | |
c0c3707f | 5139 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
d0ac1c44 SM |
5140 | ; |
5141 | return 0; | |
5142 | } | |
5143 | _ACEOF | |
c0c3707f CB |
5144 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
5145 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5146 | do | |
5147 | CC="$ac_save_CC $ac_arg" | |
5148 | if ac_fn_c_try_compile "$LINENO"; then : | |
5149 | ac_cv_prog_cc_c89=$ac_arg | |
5150 | fi | |
5151 | rm -f core conftest.err conftest.$ac_objext | |
5152 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5153 | done | |
5154 | rm -f conftest.$ac_ext | |
5155 | CC=$ac_save_CC | |
5156 | ||
5157 | fi | |
5158 | # AC_CACHE_VAL | |
5159 | ac_prog_cc_stdc_options= | |
5160 | case "x$ac_cv_prog_cc_c89" in | |
5161 | x) | |
5162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5163 | $as_echo "none needed" >&6; } ;; | |
5164 | xno) | |
5165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5166 | $as_echo "unsupported" >&6; } ;; | |
5167 | *) | |
5168 | ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89" | |
5169 | CC=$CC$ac_prog_cc_stdc_options | |
5170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5171 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5172 | esac | |
5173 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5174 | ac_prog_cc_stdc=c89 | |
5175 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
5176 | else | |
5177 | ac_prog_cc_stdc=no | |
5178 | ac_cv_prog_cc_stdc=no | |
5179 | fi | |
5180 | ||
5181 | fi | |
5182 | ||
7a6dbc2f | 5183 | fi |
c0c3707f | 5184 | |
d0ac1c44 SM |
5185 | ac_ext=c |
5186 | ac_cpp='$CPP $CPPFLAGS' | |
5187 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5188 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5189 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5190 | ||
5191 | ||
5df4cba6 SM |
5192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 |
5193 | $as_echo_n "checking whether the compiler is clang... " >&6; } | |
5194 | if ${gl_cv_compiler_clang+:} false; then : | |
5195 | $as_echo_n "(cached) " >&6 | |
5196 | else | |
5197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5198 | /* end confdefs.h. */ | |
5199 | ||
5200 | #ifdef __clang__ | |
5201 | barfbarf | |
5202 | #endif | |
5203 | ||
5204 | int | |
5205 | main () | |
5206 | { | |
5207 | ||
5208 | ; | |
5209 | return 0; | |
5210 | } | |
5211 | ||
5212 | _ACEOF | |
5213 | if ac_fn_c_try_compile "$LINENO"; then : | |
5214 | gl_cv_compiler_clang=no | |
5215 | else | |
5216 | gl_cv_compiler_clang=yes | |
5217 | fi | |
5218 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5219 | ||
5220 | fi | |
5221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5 | |
5222 | $as_echo "$gl_cv_compiler_clang" >&6; } | |
5223 | ||
5224 | ||
5225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5 | |
5226 | $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; } | |
5227 | if ${gl_cv_compiler_check_decl_option+:} false; then : | |
5228 | $as_echo_n "(cached) " >&6 | |
5229 | else | |
5230 | if test $gl_cv_compiler_clang = yes; then | |
5231 | save_ac_compile="$ac_compile" | |
5232 | ac_compile="$ac_compile -Werror=implicit-function-declaration" | |
5233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5234 | /* end confdefs.h. */ | |
5235 | ||
5236 | int | |
5237 | main () | |
5238 | { | |
5239 | ||
5240 | ; | |
5241 | return 0; | |
5242 | } | |
5243 | _ACEOF | |
5244 | if ac_fn_c_try_compile "$LINENO"; then : | |
5245 | gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration' | |
5246 | else | |
5247 | gl_cv_compiler_check_decl_option=none | |
5248 | fi | |
5249 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5250 | ac_compile="$save_ac_compile" | |
5251 | else | |
5252 | gl_cv_compiler_check_decl_option=none | |
5253 | fi | |
5254 | ||
5255 | fi | |
5256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5 | |
5257 | $as_echo "$gl_cv_compiler_check_decl_option" >&6; } | |
5258 | if test "x$gl_cv_compiler_check_decl_option" != xnone; then | |
5259 | ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" | |
5260 | else | |
5261 | ac_compile_for_check_decl="$ac_compile" | |
5262 | fi | |
5263 | ||
5264 | ||
5265 | ||
9c9d63b1 | 5266 | |
c971b7fa PA |
5267 | ac_ext=c |
5268 | ac_cpp='$CPP $CPPFLAGS' | |
5269 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5270 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5271 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5273 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5274 | # On Suns, sometimes $CPP names a directory. | |
5275 | if test -n "$CPP" && test -d "$CPP"; then | |
5276 | CPP= | |
5277 | fi | |
5278 | if test -z "$CPP"; then | |
d0ac1c44 | 5279 | if ${ac_cv_prog_CPP+:} false; then : |
c971b7fa PA |
5280 | $as_echo_n "(cached) " >&6 |
5281 | else | |
5282 | # Double quotes because CPP needs to be expanded | |
5283 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5284 | do | |
5285 | ac_preproc_ok=false | |
5286 | for ac_c_preproc_warn_flag in '' yes | |
5287 | do | |
5288 | # Use a header file that comes with gcc, so configuring glibc | |
5289 | # with a fresh cross-compiler works. | |
5290 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5291 | # <limits.h> exists even on freestanding compilers. | |
5292 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5293 | # not just through cpp. "Syntax error" is here to catch this case. | |
5294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5295 | /* end confdefs.h. */ | |
5296 | #ifdef __STDC__ | |
5297 | # include <limits.h> | |
5298 | #else | |
5299 | # include <assert.h> | |
5300 | #endif | |
5301 | Syntax error | |
5302 | _ACEOF | |
5303 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5304 | ||
5305 | else | |
5306 | # Broken: fails on valid input. | |
5307 | continue | |
5308 | fi | |
d0ac1c44 | 5309 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5310 | |
5311 | # OK, works on sane cases. Now check whether nonexistent headers | |
5312 | # can be detected and how. | |
5313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5314 | /* end confdefs.h. */ | |
5315 | #include <ac_nonexistent.h> | |
5316 | _ACEOF | |
5317 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5318 | # Broken: success on invalid input. | |
5319 | continue | |
5320 | else | |
5321 | # Passes both tests. | |
5322 | ac_preproc_ok=: | |
5323 | break | |
5324 | fi | |
d0ac1c44 | 5325 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5326 | |
5327 | done | |
5328 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 5329 | rm -f conftest.i conftest.err conftest.$ac_ext |
c971b7fa PA |
5330 | if $ac_preproc_ok; then : |
5331 | break | |
5332 | fi | |
5333 | ||
5334 | done | |
5335 | ac_cv_prog_CPP=$CPP | |
5336 | ||
5337 | fi | |
5338 | CPP=$ac_cv_prog_CPP | |
5339 | else | |
5340 | ac_cv_prog_CPP=$CPP | |
5341 | fi | |
5342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5343 | $as_echo "$CPP" >&6; } | |
5344 | ac_preproc_ok=false | |
5345 | for ac_c_preproc_warn_flag in '' yes | |
5346 | do | |
5347 | # Use a header file that comes with gcc, so configuring glibc | |
5348 | # with a fresh cross-compiler works. | |
5349 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5350 | # <limits.h> exists even on freestanding compilers. | |
5351 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5352 | # not just through cpp. "Syntax error" is here to catch this case. | |
5353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5354 | /* end confdefs.h. */ | |
5355 | #ifdef __STDC__ | |
5356 | # include <limits.h> | |
5357 | #else | |
5358 | # include <assert.h> | |
5359 | #endif | |
5360 | Syntax error | |
5361 | _ACEOF | |
5362 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5363 | ||
5364 | else | |
5365 | # Broken: fails on valid input. | |
5366 | continue | |
5367 | fi | |
d0ac1c44 | 5368 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5369 | |
5370 | # OK, works on sane cases. Now check whether nonexistent headers | |
5371 | # can be detected and how. | |
5372 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5373 | /* end confdefs.h. */ | |
5374 | #include <ac_nonexistent.h> | |
5375 | _ACEOF | |
5376 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5377 | # Broken: success on invalid input. | |
5378 | continue | |
5379 | else | |
5380 | # Passes both tests. | |
5381 | ac_preproc_ok=: | |
5382 | break | |
5383 | fi | |
d0ac1c44 | 5384 | rm -f conftest.err conftest.i conftest.$ac_ext |
c971b7fa PA |
5385 | |
5386 | done | |
5387 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 5388 | rm -f conftest.i conftest.err conftest.$ac_ext |
c971b7fa PA |
5389 | if $ac_preproc_ok; then : |
5390 | ||
5391 | else | |
5392 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5393 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
5394 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
5395 | See \`config.log' for more details" "$LINENO" 5; } | |
c971b7fa PA |
5396 | fi |
5397 | ||
5398 | ac_ext=c | |
5399 | ac_cpp='$CPP $CPPFLAGS' | |
5400 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5401 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5402 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5403 | ||
5404 | ||
5405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5406 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 5407 | if ${ac_cv_path_GREP+:} false; then : |
c971b7fa PA |
5408 | $as_echo_n "(cached) " >&6 |
5409 | else | |
5410 | if test -z "$GREP"; then | |
5411 | ac_path_GREP_found=false | |
5412 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5413 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5414 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5415 | do | |
5416 | IFS=$as_save_IFS | |
5417 | test -z "$as_dir" && as_dir=. | |
5418 | for ac_prog in grep ggrep; do | |
5419 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5420 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 5421 | as_fn_executable_p "$ac_path_GREP" || continue |
c971b7fa PA |
5422 | # Check for GNU ac_path_GREP and select it if it is found. |
5423 | # Check for GNU $ac_path_GREP | |
5424 | case `"$ac_path_GREP" --version 2>&1` in | |
5425 | *GNU*) | |
5426 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5427 | *) | |
5428 | ac_count=0 | |
5429 | $as_echo_n 0123456789 >"conftest.in" | |
5430 | while : | |
5431 | do | |
5432 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5433 | mv "conftest.tmp" "conftest.in" | |
5434 | cp "conftest.in" "conftest.nl" | |
5435 | $as_echo 'GREP' >> "conftest.nl" | |
5436 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5437 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5438 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5439 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5440 | # Best one so far, save it but keep looking for a better one | |
5441 | ac_cv_path_GREP="$ac_path_GREP" | |
5442 | ac_path_GREP_max=$ac_count | |
5443 | fi | |
5444 | # 10*(2^10) chars as input seems more than enough | |
5445 | test $ac_count -gt 10 && break | |
5446 | done | |
5447 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5448 | esac | |
5449 | ||
5450 | $ac_path_GREP_found && break 3 | |
5451 | done | |
5452 | done | |
5453 | done | |
5454 | IFS=$as_save_IFS | |
5455 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 5456 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
c971b7fa PA |
5457 | fi |
5458 | else | |
5459 | ac_cv_path_GREP=$GREP | |
5460 | fi | |
5461 | ||
5462 | fi | |
5463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5464 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5465 | GREP="$ac_cv_path_GREP" | |
5466 | ||
5467 | ||
5468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5469 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 5470 | if ${ac_cv_path_EGREP+:} false; then : |
c971b7fa PA |
5471 | $as_echo_n "(cached) " >&6 |
5472 | else | |
5473 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5474 | then ac_cv_path_EGREP="$GREP -E" | |
5475 | else | |
5476 | if test -z "$EGREP"; then | |
5477 | ac_path_EGREP_found=false | |
5478 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5479 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5480 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5481 | do | |
5482 | IFS=$as_save_IFS | |
5483 | test -z "$as_dir" && as_dir=. | |
5484 | for ac_prog in egrep; do | |
5485 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5486 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 5487 | as_fn_executable_p "$ac_path_EGREP" || continue |
c971b7fa PA |
5488 | # Check for GNU ac_path_EGREP and select it if it is found. |
5489 | # Check for GNU $ac_path_EGREP | |
5490 | case `"$ac_path_EGREP" --version 2>&1` in | |
5491 | *GNU*) | |
5492 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5493 | *) | |
5494 | ac_count=0 | |
5495 | $as_echo_n 0123456789 >"conftest.in" | |
5496 | while : | |
5497 | do | |
5498 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5499 | mv "conftest.tmp" "conftest.in" | |
5500 | cp "conftest.in" "conftest.nl" | |
5501 | $as_echo 'EGREP' >> "conftest.nl" | |
5502 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5503 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5504 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5505 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5506 | # Best one so far, save it but keep looking for a better one | |
5507 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5508 | ac_path_EGREP_max=$ac_count | |
5509 | fi | |
5510 | # 10*(2^10) chars as input seems more than enough | |
5511 | test $ac_count -gt 10 && break | |
5512 | done | |
5513 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5514 | esac | |
5515 | ||
5516 | $ac_path_EGREP_found && break 3 | |
5517 | done | |
5518 | done | |
5519 | done | |
5520 | IFS=$as_save_IFS | |
5521 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 5522 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
c971b7fa PA |
5523 | fi |
5524 | else | |
5525 | ac_cv_path_EGREP=$EGREP | |
5526 | fi | |
5527 | ||
5528 | fi | |
5529 | fi | |
5530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5531 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5532 | EGREP="$ac_cv_path_EGREP" | |
5533 | ||
5534 | ||
5535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5536 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 5537 | if ${ac_cv_header_stdc+:} false; then : |
c971b7fa PA |
5538 | $as_echo_n "(cached) " >&6 |
5539 | else | |
5540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5541 | /* end confdefs.h. */ | |
5542 | #include <stdlib.h> | |
5543 | #include <stdarg.h> | |
5544 | #include <string.h> | |
5545 | #include <float.h> | |
5546 | ||
5547 | int | |
5548 | main () | |
5549 | { | |
5550 | ||
5551 | ; | |
5552 | return 0; | |
5553 | } | |
5554 | _ACEOF | |
5555 | if ac_fn_c_try_compile "$LINENO"; then : | |
5556 | ac_cv_header_stdc=yes | |
5557 | else | |
5558 | ac_cv_header_stdc=no | |
5559 | fi | |
5560 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5561 | ||
5562 | if test $ac_cv_header_stdc = yes; then | |
5563 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5565 | /* end confdefs.h. */ | |
5566 | #include <string.h> | |
5567 | ||
5568 | _ACEOF | |
5569 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5570 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5571 | ||
5572 | else | |
5573 | ac_cv_header_stdc=no | |
5574 | fi | |
5575 | rm -f conftest* | |
5576 | ||
5577 | fi | |
5578 | ||
5579 | if test $ac_cv_header_stdc = yes; then | |
5580 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5582 | /* end confdefs.h. */ | |
5583 | #include <stdlib.h> | |
5584 | ||
5585 | _ACEOF | |
5586 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5587 | $EGREP "free" >/dev/null 2>&1; then : | |
5588 | ||
5589 | else | |
5590 | ac_cv_header_stdc=no | |
5591 | fi | |
5592 | rm -f conftest* | |
5593 | ||
5594 | fi | |
5595 | ||
5596 | if test $ac_cv_header_stdc = yes; then | |
5597 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5598 | if test "$cross_compiling" = yes; then : | |
5599 | : | |
5600 | else | |
5601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5602 | /* end confdefs.h. */ | |
5603 | #include <ctype.h> | |
5604 | #include <stdlib.h> | |
5605 | #if ((' ' & 0x0FF) == 0x020) | |
5606 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5607 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5608 | #else | |
5609 | # define ISLOWER(c) \ | |
5610 | (('a' <= (c) && (c) <= 'i') \ | |
5611 | || ('j' <= (c) && (c) <= 'r') \ | |
5612 | || ('s' <= (c) && (c) <= 'z')) | |
5613 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5614 | #endif | |
5615 | ||
5616 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5617 | int | |
5618 | main () | |
5619 | { | |
5620 | int i; | |
5621 | for (i = 0; i < 256; i++) | |
5622 | if (XOR (islower (i), ISLOWER (i)) | |
5623 | || toupper (i) != TOUPPER (i)) | |
5624 | return 2; | |
5625 | return 0; | |
5626 | } | |
5627 | _ACEOF | |
5628 | if ac_fn_c_try_run "$LINENO"; then : | |
5629 | ||
5630 | else | |
5631 | ac_cv_header_stdc=no | |
5632 | fi | |
5633 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5634 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5635 | fi | |
5636 | ||
5637 | fi | |
5638 | fi | |
5639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5640 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5641 | if test $ac_cv_header_stdc = yes; then | |
5642 | ||
5643 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5644 | ||
5645 | fi | |
5646 | ||
5647 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5648 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5649 | inttypes.h stdint.h unistd.h | |
5650 | do : | |
5651 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5652 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5653 | " | |
d0ac1c44 | 5654 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
c971b7fa PA |
5655 | cat >>confdefs.h <<_ACEOF |
5656 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5657 | _ACEOF | |
5658 | ||
5659 | fi | |
5660 | ||
5661 | done | |
5662 | ||
5663 | ||
5664 | ||
c971b7fa PA |
5665 | |
5666 | ||
9c9d63b1 PM |
5667 | for ac_header in $ac_header_list |
5668 | do : | |
5669 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5670 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5671 | " | |
5672 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
5673 | cat >>confdefs.h <<_ACEOF | |
5674 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5675 | _ACEOF | |
c971b7fa | 5676 | |
9c9d63b1 PM |
5677 | fi |
5678 | ||
5679 | done | |
c971b7fa PA |
5680 | |
5681 | ||
c971b7fa PA |
5682 | |
5683 | ||
c971b7fa | 5684 | |
c971b7fa | 5685 | |
c971b7fa | 5686 | |
c971b7fa PA |
5687 | |
5688 | ||
5689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5690 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 5691 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
c971b7fa PA |
5692 | $as_echo_n "(cached) " >&6 |
5693 | else | |
5694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5695 | /* end confdefs.h. */ | |
5696 | ||
5697 | # define __EXTENSIONS__ 1 | |
5698 | $ac_includes_default | |
5699 | int | |
5700 | main () | |
5701 | { | |
5702 | ||
5703 | ; | |
5704 | return 0; | |
5705 | } | |
5706 | _ACEOF | |
5707 | if ac_fn_c_try_compile "$LINENO"; then : | |
5708 | ac_cv_safe_to_define___extensions__=yes | |
5709 | else | |
5710 | ac_cv_safe_to_define___extensions__=no | |
5711 | fi | |
5712 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5713 | fi | |
5714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5715 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
c971b7fa | 5716 | |
4a626d0a PA |
5717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 |
5718 | $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } | |
d0ac1c44 | 5719 | if ${ac_cv_should_define__xopen_source+:} false; then : |
4a626d0a PA |
5720 | $as_echo_n "(cached) " >&6 |
5721 | else | |
5722 | ac_cv_should_define__xopen_source=no | |
9c9d63b1 PM |
5723 | if test $ac_cv_header_wchar_h = yes; then : |
5724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4a626d0a PA |
5725 | /* end confdefs.h. */ |
5726 | ||
5727 | #include <wchar.h> | |
5728 | mbstate_t x; | |
5729 | int | |
5730 | main () | |
5731 | { | |
5732 | ||
5733 | ; | |
5734 | return 0; | |
5735 | } | |
5736 | _ACEOF | |
5737 | if ac_fn_c_try_compile "$LINENO"; then : | |
5738 | ||
5739 | else | |
5740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5741 | /* end confdefs.h. */ | |
5742 | ||
9c9d63b1 PM |
5743 | #define _XOPEN_SOURCE 500 |
5744 | #include <wchar.h> | |
5745 | mbstate_t x; | |
4a626d0a PA |
5746 | int |
5747 | main () | |
5748 | { | |
5749 | ||
5750 | ; | |
5751 | return 0; | |
5752 | } | |
5753 | _ACEOF | |
5754 | if ac_fn_c_try_compile "$LINENO"; then : | |
5755 | ac_cv_should_define__xopen_source=yes | |
5756 | fi | |
d0ac1c44 SM |
5757 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5758 | fi | |
5759 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5760 | fi | |
9c9d63b1 | 5761 | fi |
d0ac1c44 SM |
5762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 |
5763 | $as_echo "$ac_cv_should_define__xopen_source" >&6; } | |
9c9d63b1 PM |
5764 | |
5765 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5766 | ||
5767 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
5768 | ||
5769 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
d0ac1c44 | 5770 | |
c0c3707f CB |
5771 | $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h |
5772 | ||
9c9d63b1 PM |
5773 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
5774 | ||
5775 | $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h | |
5776 | ||
5777 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
5778 | ||
5779 | $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h | |
5780 | ||
5781 | $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h | |
5782 | ||
5783 | $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h | |
5784 | ||
5785 | $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h | |
5786 | ||
5787 | $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h | |
5788 | ||
5789 | $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h | |
5790 | ||
5791 | $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h | |
5792 | ||
5793 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5794 | ||
5795 | if test $ac_cv_header_minix_config_h = yes; then : | |
5796 | MINIX=yes | |
5797 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5798 | ||
5799 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5800 | ||
5801 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5802 | ||
5803 | else | |
5804 | MINIX= | |
5805 | fi | |
5806 | if test $ac_cv_safe_to_define___extensions__ = yes; then : | |
5807 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5808 | ||
5809 | fi | |
5810 | if test $ac_cv_should_define__xopen_source = yes; then : | |
5811 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
5812 | ||
5813 | fi | |
d0ac1c44 | 5814 | |
c8693053 RO |
5815 | # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included |
5816 | # there. | |
c0c3707f CB |
5817 | ac_aux_dir= |
5818 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
5819 | if test -f "$ac_dir/install-sh"; then | |
5820 | ac_aux_dir=$ac_dir | |
5821 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5822 | break | |
5823 | elif test -f "$ac_dir/install.sh"; then | |
5824 | ac_aux_dir=$ac_dir | |
5825 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5826 | break | |
5827 | elif test -f "$ac_dir/shtool"; then | |
5828 | ac_aux_dir=$ac_dir | |
5829 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5830 | break | |
5831 | fi | |
5832 | done | |
5833 | if test -z "$ac_aux_dir"; then | |
5834 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
5835 | fi | |
5836 | ||
5837 | # These three variables are undocumented and unsupported, | |
5838 | # and are intended to be withdrawn in a future Autoconf release. | |
5839 | # They can cause serious problems if a builder's source tree is in a directory | |
5840 | # whose full name contains unusual characters. | |
5841 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5842 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5843 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5844 | ||
5845 | ||
4a626d0a PA |
5846 | # Make sure we can run config.sub. |
5847 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 5848 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
4a626d0a PA |
5849 | |
5850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
5851 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 5852 | if ${ac_cv_build+:} false; then : |
4a626d0a PA |
5853 | $as_echo_n "(cached) " >&6 |
5854 | else | |
5855 | ac_build_alias=$build_alias | |
5856 | test "x$ac_build_alias" = x && | |
5857 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
5858 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 5859 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
4a626d0a | 5860 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 5861 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
4a626d0a PA |
5862 | |
5863 | fi | |
5864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
5865 | $as_echo "$ac_cv_build" >&6; } | |
5866 | case $ac_cv_build in | |
5867 | *-*-*) ;; | |
d0ac1c44 | 5868 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
4a626d0a PA |
5869 | esac |
5870 | build=$ac_cv_build | |
5871 | ac_save_IFS=$IFS; IFS='-' | |
5872 | set x $ac_cv_build | |
5873 | shift | |
5874 | build_cpu=$1 | |
5875 | build_vendor=$2 | |
5876 | shift; shift | |
5877 | # Remember, the first character of IFS is used to create $*, | |
5878 | # except with old shells: | |
5879 | build_os=$* | |
5880 | IFS=$ac_save_IFS | |
5881 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
5882 | ||
5883 | ||
5884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
5885 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 5886 | if ${ac_cv_host+:} false; then : |
4a626d0a PA |
5887 | $as_echo_n "(cached) " >&6 |
5888 | else | |
5889 | if test "x$host_alias" = x; then | |
5890 | ac_cv_host=$ac_cv_build | |
5891 | else | |
5892 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
d0ac1c44 | 5893 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
4a626d0a PA |
5894 | fi |
5895 | ||
5896 | fi | |
5897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
5898 | $as_echo "$ac_cv_host" >&6; } | |
5899 | case $ac_cv_host in | |
5900 | *-*-*) ;; | |
d0ac1c44 | 5901 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
4a626d0a PA |
5902 | esac |
5903 | host=$ac_cv_host | |
5904 | ac_save_IFS=$IFS; IFS='-' | |
5905 | set x $ac_cv_host | |
5906 | shift | |
5907 | host_cpu=$1 | |
5908 | host_vendor=$2 | |
5909 | shift; shift | |
5910 | # Remember, the first character of IFS is used to create $*, | |
5911 | # except with old shells: | |
5912 | host_os=$* | |
5913 | IFS=$ac_save_IFS | |
5914 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
5915 | ||
5916 | ||
c8693053 RO |
5917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
5918 | $as_echo_n "checking target system type... " >&6; } | |
5919 | if ${ac_cv_target+:} false; then : | |
5920 | $as_echo_n "(cached) " >&6 | |
5921 | else | |
5922 | if test "x$target_alias" = x; then | |
5923 | ac_cv_target=$ac_cv_host | |
5924 | else | |
5925 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
5926 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
5927 | fi | |
c971b7fa | 5928 | |
c8693053 RO |
5929 | fi |
5930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
5931 | $as_echo "$ac_cv_target" >&6; } | |
5932 | case $ac_cv_target in | |
5933 | *-*-*) ;; | |
5934 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; | |
5935 | esac | |
5936 | target=$ac_cv_target | |
5937 | ac_save_IFS=$IFS; IFS='-' | |
5938 | set x $ac_cv_target | |
5939 | shift | |
5940 | target_cpu=$1 | |
5941 | target_vendor=$2 | |
5942 | shift; shift | |
5943 | # Remember, the first character of IFS is used to create $*, | |
5944 | # except with old shells: | |
5945 | target_os=$* | |
5946 | IFS=$ac_save_IFS | |
5947 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
c971b7fa | 5948 | |
88b48903 | 5949 | |
c8693053 RO |
5950 | # The aliases save the names the user supplied, while $host etc. |
5951 | # will get canonicalized. | |
5952 | test -n "$target_alias" && | |
5953 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
5954 | NONENONEs,x,x, && | |
5955 | program_prefix=${target_alias}- | |
5956 | ||
5957 | # The tests for host and target for $enable_largefile require | |
5958 | # canonical names. | |
5959 | ||
5960 | ||
5961 | ||
5962 | # As the $enable_largefile decision depends on --enable-plugins we must set it | |
5963 | # even in directories otherwise not depending on the $plugins option. | |
5964 | ||
5965 | ||
5966 | maybe_plugins=no | |
5967 | for ac_header in dlfcn.h | |
5968 | do : | |
5969 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
5970 | " | |
5971 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : | |
5972 | cat >>confdefs.h <<_ACEOF | |
5973 | #define HAVE_DLFCN_H 1 | |
5974 | _ACEOF | |
5975 | maybe_plugins=yes | |
5976 | fi | |
5977 | ||
5978 | done | |
5979 | ||
5980 | for ac_header in windows.h | |
5981 | do : | |
5982 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
5983 | " | |
5984 | if test "x$ac_cv_header_windows_h" = xyes; then : | |
5985 | cat >>confdefs.h <<_ACEOF | |
5986 | #define HAVE_WINDOWS_H 1 | |
5987 | _ACEOF | |
5988 | maybe_plugins=yes | |
5989 | fi | |
5990 | ||
5991 | done | |
5992 | ||
5993 | ||
5994 | # Check whether --enable-plugins was given. | |
5995 | if test "${enable_plugins+set}" = set; then : | |
5996 | enableval=$enable_plugins; case "${enableval}" in | |
5997 | no) plugins=no ;; | |
5998 | *) plugins=yes | |
5999 | if test "$maybe_plugins" != "yes" ; then | |
6000 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 | |
6001 | fi ;; | |
6002 | esac | |
6003 | else | |
6004 | plugins=$maybe_plugins | |
6005 | ||
6006 | fi | |
6007 | ||
6008 | if test "$plugins" = "yes"; then | |
6009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 | |
6010 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
6011 | if ${ac_cv_search_dlsym+:} false; then : | |
6012 | $as_echo_n "(cached) " >&6 | |
6013 | else | |
6014 | ac_func_search_save_LIBS=$LIBS | |
6015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6016 | /* end confdefs.h. */ | |
6017 | ||
6018 | /* Override any GCC internal prototype to avoid an error. | |
6019 | Use char because int might match the return type of a GCC | |
6020 | builtin and then its argument prototype would still apply. */ | |
6021 | #ifdef __cplusplus | |
6022 | extern "C" | |
6023 | #endif | |
6024 | char dlsym (); | |
6025 | int | |
6026 | main () | |
6027 | { | |
6028 | return dlsym (); | |
6029 | ; | |
6030 | return 0; | |
6031 | } | |
6032 | _ACEOF | |
6033 | for ac_lib in '' dl; do | |
6034 | if test -z "$ac_lib"; then | |
6035 | ac_res="none required" | |
6036 | else | |
6037 | ac_res=-l$ac_lib | |
6038 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6039 | fi | |
6040 | if ac_fn_c_try_link "$LINENO"; then : | |
6041 | ac_cv_search_dlsym=$ac_res | |
6042 | fi | |
6043 | rm -f core conftest.err conftest.$ac_objext \ | |
6044 | conftest$ac_exeext | |
6045 | if ${ac_cv_search_dlsym+:} false; then : | |
6046 | break | |
6047 | fi | |
6048 | done | |
6049 | if ${ac_cv_search_dlsym+:} false; then : | |
6050 | ||
6051 | else | |
6052 | ac_cv_search_dlsym=no | |
6053 | fi | |
6054 | rm conftest.$ac_ext | |
6055 | LIBS=$ac_func_search_save_LIBS | |
6056 | fi | |
6057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 | |
6058 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
6059 | ac_res=$ac_cv_search_dlsym | |
6060 | if test "$ac_res" != no; then : | |
6061 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6062 | ||
6063 | fi | |
6064 | ||
6065 | fi | |
6066 | ||
6067 | ||
6068 | case "${host}" in | |
6069 | sparc-*-solaris*|i?86-*-solaris*) | |
6070 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
6071 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
6072 | # the bfd/ elf module cannot provide certain routines such as | |
6073 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
6074 | # explicitly requested large-file support through the | |
6075 | # --enable-largefile switch, disable large-file support in favor of | |
6076 | # procfs support. | |
6077 | # | |
6078 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
6079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6080 | /* end confdefs.h. */ | |
6081 | #define _FILE_OFFSET_BITS 64 | |
6082 | #define _STRUCTURED_PROC 1 | |
6083 | #include <sys/procfs.h> | |
6084 | int | |
6085 | main () | |
6086 | { | |
6087 | ||
6088 | ; | |
6089 | return 0; | |
6090 | } | |
6091 | _ACEOF | |
6092 | if ac_fn_c_try_compile "$LINENO"; then : | |
6093 | acx_cv_procfs_lfs=yes | |
6094 | else | |
6095 | acx_cv_procfs_lfs=no | |
6096 | fi | |
6097 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6098 | # | |
6099 | # Forcefully disable large-file support only if necessary, gdb is in | |
6100 | # tree and enabled. | |
6101 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
6102 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
6103 | : ${enable_largefile="no"} | |
6104 | if test "$plugins" = yes; then | |
6105 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
6106 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
6107 | $as_echo "$as_me: WARNING: | |
6108 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
6109 | plugins=no | |
88b48903 | 6110 | fi |
c8693053 RO |
6111 | fi |
6112 | # | |
6113 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
6114 | # benefit of g++ 9+ which predefines it on Solaris. | |
6115 | if test "$enable_largefile" = no; then | |
6116 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
6117 | ||
6118 | fi | |
6119 | ;; | |
6120 | esac | |
88b48903 | 6121 | |
2196f55f YQ |
6122 | # Check whether --enable-largefile was given. |
6123 | if test "${enable_largefile+set}" = set; then : | |
6124 | enableval=$enable_largefile; | |
6125 | fi | |
6126 | ||
6127 | if test "$enable_largefile" != no; then | |
6128 | ||
6129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6130 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 6131 | if ${ac_cv_sys_largefile_CC+:} false; then : |
2196f55f YQ |
6132 | $as_echo_n "(cached) " >&6 |
6133 | else | |
6134 | ac_cv_sys_largefile_CC=no | |
6135 | if test "$GCC" != yes; then | |
6136 | ac_save_CC=$CC | |
6137 | while :; do | |
6138 | # IRIX 6.2 and later do not support large files by default, | |
6139 | # so use the C compiler's -n32 option if that helps. | |
6140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6141 | /* end confdefs.h. */ | |
6142 | #include <sys/types.h> | |
6143 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6144 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6145 | since some C++ compilers masquerading as C compilers | |
6146 | incorrectly reject 9223372036854775807. */ | |
9c9d63b1 | 6147 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
2196f55f YQ |
6148 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
6149 | && LARGE_OFF_T % 2147483647 == 1) | |
6150 | ? 1 : -1]; | |
6151 | int | |
6152 | main () | |
6153 | { | |
6154 | ||
6155 | ; | |
6156 | return 0; | |
6157 | } | |
6158 | _ACEOF | |
6159 | if ac_fn_c_try_compile "$LINENO"; then : | |
6160 | break | |
6161 | fi | |
6162 | rm -f core conftest.err conftest.$ac_objext | |
6163 | CC="$CC -n32" | |
6164 | if ac_fn_c_try_compile "$LINENO"; then : | |
6165 | ac_cv_sys_largefile_CC=' -n32'; break | |
6166 | fi | |
6167 | rm -f core conftest.err conftest.$ac_objext | |
6168 | break | |
6169 | done | |
6170 | CC=$ac_save_CC | |
6171 | rm -f conftest.$ac_ext | |
6172 | fi | |
6173 | fi | |
6174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6175 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6176 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6177 | CC=$CC$ac_cv_sys_largefile_CC | |
6178 | fi | |
6179 | ||
6180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6181 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 6182 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
2196f55f YQ |
6183 | $as_echo_n "(cached) " >&6 |
6184 | else | |
6185 | while :; do | |
6186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6187 | /* end confdefs.h. */ | |
6188 | #include <sys/types.h> | |
6189 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6190 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6191 | since some C++ compilers masquerading as C compilers | |
6192 | incorrectly reject 9223372036854775807. */ | |
9c9d63b1 | 6193 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
2196f55f YQ |
6194 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
6195 | && LARGE_OFF_T % 2147483647 == 1) | |
6196 | ? 1 : -1]; | |
6197 | int | |
6198 | main () | |
6199 | { | |
6200 | ||
6201 | ; | |
6202 | return 0; | |
6203 | } | |
6204 | _ACEOF | |
6205 | if ac_fn_c_try_compile "$LINENO"; then : | |
6206 | ac_cv_sys_file_offset_bits=no; break | |
6207 | fi | |
6208 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6210 | /* end confdefs.h. */ | |
6211 | #define _FILE_OFFSET_BITS 64 | |
6212 | #include <sys/types.h> | |
6213 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6214 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6215 | since some C++ compilers masquerading as C compilers | |
6216 | incorrectly reject 9223372036854775807. */ | |
9c9d63b1 | 6217 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
2196f55f YQ |
6218 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
6219 | && LARGE_OFF_T % 2147483647 == 1) | |
6220 | ? 1 : -1]; | |
6221 | int | |
6222 | main () | |
6223 | { | |
6224 | ||
6225 | ; | |
6226 | return 0; | |
6227 | } | |
6228 | _ACEOF | |
6229 | if ac_fn_c_try_compile "$LINENO"; then : | |
6230 | ac_cv_sys_file_offset_bits=64; break | |
6231 | fi | |
6232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6233 | ac_cv_sys_file_offset_bits=unknown | |
6234 | break | |
6235 | done | |
6236 | fi | |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6238 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6239 | case $ac_cv_sys_file_offset_bits in #( | |
6240 | no | unknown) ;; | |
6241 | *) | |
6242 | cat >>confdefs.h <<_ACEOF | |
6243 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6244 | _ACEOF | |
6245 | ;; | |
6246 | esac | |
6247 | rm -rf conftest* | |
6248 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6250 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 6251 | if ${ac_cv_sys_large_files+:} false; then : |
2196f55f YQ |
6252 | $as_echo_n "(cached) " >&6 |
6253 | else | |
6254 | while :; do | |
6255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6256 | /* end confdefs.h. */ | |
6257 | #include <sys/types.h> | |
6258 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6259 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6260 | since some C++ compilers masquerading as C compilers | |
6261 | incorrectly reject 9223372036854775807. */ | |
9c9d63b1 | 6262 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
2196f55f YQ |
6263 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
6264 | && LARGE_OFF_T % 2147483647 == 1) | |
6265 | ? 1 : -1]; | |
6266 | int | |
6267 | main () | |
6268 | { | |
6269 | ||
6270 | ; | |
6271 | return 0; | |
6272 | } | |
6273 | _ACEOF | |
6274 | if ac_fn_c_try_compile "$LINENO"; then : | |
6275 | ac_cv_sys_large_files=no; break | |
6276 | fi | |
6277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6279 | /* end confdefs.h. */ | |
6280 | #define _LARGE_FILES 1 | |
6281 | #include <sys/types.h> | |
6282 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6283 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6284 | since some C++ compilers masquerading as C compilers | |
6285 | incorrectly reject 9223372036854775807. */ | |
9c9d63b1 | 6286 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
2196f55f YQ |
6287 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
6288 | && LARGE_OFF_T % 2147483647 == 1) | |
6289 | ? 1 : -1]; | |
6290 | int | |
6291 | main () | |
6292 | { | |
6293 | ||
6294 | ; | |
6295 | return 0; | |
6296 | } | |
6297 | _ACEOF | |
6298 | if ac_fn_c_try_compile "$LINENO"; then : | |
6299 | ac_cv_sys_large_files=1; break | |
6300 | fi | |
6301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6302 | ac_cv_sys_large_files=unknown | |
6303 | break | |
6304 | done | |
6305 | fi | |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
6307 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6308 | case $ac_cv_sys_large_files in #( | |
6309 | no | unknown) ;; | |
6310 | *) | |
6311 | cat >>confdefs.h <<_ACEOF | |
6312 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6313 | _ACEOF | |
6314 | ;; | |
6315 | esac | |
6316 | rm -rf conftest* | |
6317 | fi | |
2196f55f YQ |
6318 | fi |
6319 | ||
88b48903 WN |
6320 | |
6321 | ||
5abebf3c CB |
6322 | |
6323 | ||
6324 | ||
9c9d63b1 PM |
6325 | case "$host_os" in |
6326 | openbsd*) | |
6327 | ||
6328 | $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h | |
c0c3707f | 6329 | |
9c9d63b1 PM |
6330 | ;; |
6331 | esac | |
5abebf3c | 6332 | |
5abebf3c | 6333 | |
c0c3707f CB |
6334 | |
6335 | ||
c8693053 RO |
6336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 |
6337 | $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } | |
6338 | if ${gl_cv_c_amsterdam_compiler+:} false; then : | |
6339 | $as_echo_n "(cached) " >&6 | |
6340 | else | |
c0c3707f | 6341 | |
c8693053 RO |
6342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6343 | /* end confdefs.h. */ | |
5abebf3c | 6344 | |
c8693053 RO |
6345 | #ifdef __ACK__ |
6346 | Amsterdam | |
6347 | #endif | |
5abebf3c | 6348 | |
c8693053 RO |
6349 | _ACEOF |
6350 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6351 | $EGREP "Amsterdam" >/dev/null 2>&1; then : | |
6352 | gl_cv_c_amsterdam_compiler=yes | |
6353 | else | |
6354 | gl_cv_c_amsterdam_compiler=no | |
6355 | fi | |
6356 | rm -f conftest* | |
5abebf3c CB |
6357 | |
6358 | ||
c8693053 RO |
6359 | fi |
6360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 | |
6361 | $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } | |
5abebf3c | 6362 | |
c8693053 RO |
6363 | if test $gl_cv_c_amsterdam_compiler = yes; then |
6364 | if test -z "$AR"; then | |
6365 | AR='cc -c.a' | |
6366 | fi | |
6367 | if test -z "$ARFLAGS"; then | |
6368 | ARFLAGS='-o' | |
6369 | fi | |
6370 | else | |
6371 | : | |
6372 | fi | |
c971b7fa | 6373 | |
c8693053 RO |
6374 | if test -n "$ac_tool_prefix"; then |
6375 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6376 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
6377 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6378 | $as_echo_n "checking for $ac_word... " >&6; } | |
6379 | if ${ac_cv_prog_AR+:} false; then : | |
6380 | $as_echo_n "(cached) " >&6 | |
6381 | else | |
6382 | if test -n "$AR"; then | |
6383 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6384 | else | |
6385 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6386 | for as_dir in $PATH | |
6387 | do | |
6388 | IFS=$as_save_IFS | |
6389 | test -z "$as_dir" && as_dir=. | |
6390 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6391 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6392 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
6393 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6394 | break 2 | |
6395 | fi | |
6396 | done | |
6397 | done | |
6398 | IFS=$as_save_IFS | |
c971b7fa | 6399 | |
c8693053 RO |
6400 | fi |
6401 | fi | |
6402 | AR=$ac_cv_prog_AR | |
6403 | if test -n "$AR"; then | |
6404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
6405 | $as_echo "$AR" >&6; } | |
6406 | else | |
6407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6408 | $as_echo "no" >&6; } | |
6409 | fi | |
c971b7fa | 6410 | |
c971b7fa | 6411 | |
c8693053 RO |
6412 | fi |
6413 | if test -z "$ac_cv_prog_AR"; then | |
6414 | ac_ct_AR=$AR | |
6415 | # Extract the first word of "ar", so it can be a program name with args. | |
6416 | set dummy ar; ac_word=$2 | |
6417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6418 | $as_echo_n "checking for $ac_word... " >&6; } | |
6419 | if ${ac_cv_prog_ac_ct_AR+:} false; then : | |
c971b7fa PA |
6420 | $as_echo_n "(cached) " >&6 |
6421 | else | |
c8693053 RO |
6422 | if test -n "$ac_ct_AR"; then |
6423 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5e8754f9 | 6424 | else |
c8693053 RO |
6425 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
6426 | for as_dir in $PATH | |
6427 | do | |
6428 | IFS=$as_save_IFS | |
6429 | test -z "$as_dir" && as_dir=. | |
6430 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6431 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6432 | ac_cv_prog_ac_ct_AR="ar" | |
6433 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6434 | break 2 | |
6435 | fi | |
6436 | done | |
6437 | done | |
6438 | IFS=$as_save_IFS | |
7a6dbc2f | 6439 | |
c971b7fa | 6440 | fi |
c8693053 RO |
6441 | fi |
6442 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6443 | if test -n "$ac_ct_AR"; then | |
6444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
6445 | $as_echo "$ac_ct_AR" >&6; } | |
6446 | else | |
6447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6448 | $as_echo "no" >&6; } | |
6449 | fi | |
5e8754f9 | 6450 | |
c8693053 RO |
6451 | if test "x$ac_ct_AR" = x; then |
6452 | AR="ar" | |
6453 | else | |
6454 | case $cross_compiling:$ac_tool_warned in | |
6455 | yes:) | |
6456 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6457 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6458 | ac_tool_warned=yes ;; | |
6459 | esac | |
6460 | AR=$ac_ct_AR | |
6461 | fi | |
6462 | else | |
6463 | AR="$ac_cv_prog_AR" | |
6464 | fi | |
c0c3707f | 6465 | |
c8693053 RO |
6466 | if test -z "$ARFLAGS"; then |
6467 | ARFLAGS='cr' | |
6468 | fi | |
7a6dbc2f | 6469 | |
7a6dbc2f | 6470 | |
c0c3707f | 6471 | |
c8693053 RO |
6472 | if test -z "$RANLIB"; then |
6473 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6474 | RANLIB=':' | |
6475 | else | |
6476 | if test -n "$ac_tool_prefix"; then | |
6477 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6478 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6480 | $as_echo_n "checking for $ac_word... " >&6; } | |
6481 | if ${ac_cv_prog_RANLIB+:} false; then : | |
6482 | $as_echo_n "(cached) " >&6 | |
6483 | else | |
6484 | if test -n "$RANLIB"; then | |
6485 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6486 | else | |
6487 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6488 | for as_dir in $PATH | |
6489 | do | |
6490 | IFS=$as_save_IFS | |
6491 | test -z "$as_dir" && as_dir=. | |
6492 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6493 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6494 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6495 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6496 | break 2 | |
6497 | fi | |
5e8754f9 | 6498 | done |
c8693053 RO |
6499 | done |
6500 | IFS=$as_save_IFS | |
5e8754f9 | 6501 | |
c971b7fa | 6502 | fi |
c8693053 RO |
6503 | fi |
6504 | RANLIB=$ac_cv_prog_RANLIB | |
6505 | if test -n "$RANLIB"; then | |
6506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6507 | $as_echo "$RANLIB" >&6; } | |
c0c3707f | 6508 | else |
c8693053 RO |
6509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6510 | $as_echo "no" >&6; } | |
5e8754f9 | 6511 | fi |
c0c3707f | 6512 | |
c8693053 RO |
6513 | |
6514 | fi | |
6515 | if test -z "$ac_cv_prog_RANLIB"; then | |
6516 | ac_ct_RANLIB=$RANLIB | |
6517 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6518 | set dummy ranlib; ac_word=$2 | |
6519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6520 | $as_echo_n "checking for $ac_word... " >&6; } | |
6521 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : | |
c971b7fa PA |
6522 | $as_echo_n "(cached) " >&6 |
6523 | else | |
c8693053 RO |
6524 | if test -n "$ac_ct_RANLIB"; then |
6525 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6526 | else | |
6527 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6528 | for as_dir in $PATH | |
6529 | do | |
6530 | IFS=$as_save_IFS | |
6531 | test -z "$as_dir" && as_dir=. | |
6532 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6533 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6534 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6535 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6536 | break 2 | |
5e8754f9 SDJ |
6537 | fi |
6538 | done | |
c8693053 RO |
6539 | done |
6540 | IFS=$as_save_IFS | |
5e8754f9 SDJ |
6541 | |
6542 | fi | |
6543 | fi | |
c8693053 RO |
6544 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
6545 | if test -n "$ac_ct_RANLIB"; then | |
6546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6547 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6548 | else | |
6549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6550 | $as_echo "no" >&6; } | |
6551 | fi | |
c0c3707f | 6552 | |
c8693053 RO |
6553 | if test "x$ac_ct_RANLIB" = x; then |
6554 | RANLIB=":" | |
6555 | else | |
6556 | case $cross_compiling:$ac_tool_warned in | |
6557 | yes:) | |
6558 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6559 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6560 | ac_tool_warned=yes ;; | |
6561 | esac | |
6562 | RANLIB=$ac_ct_RANLIB | |
6563 | fi | |
6564 | else | |
6565 | RANLIB="$ac_cv_prog_RANLIB" | |
5e8754f9 SDJ |
6566 | fi |
6567 | ||
c8693053 | 6568 | fi |
c0c3707f | 6569 | fi |
5e8754f9 | 6570 | |
5e8754f9 | 6571 | |
5e8754f9 | 6572 | |
5e8754f9 SDJ |
6573 | |
6574 | ||
5e8754f9 | 6575 | |
c8693053 RO |
6576 | # IEEE behaviour is the default on all CPUs except Alpha and SH |
6577 | # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 | |
6578 | # and the GCC 4.1.2 manual). | |
6579 | case "$host_cpu" in | |
6580 | alpha*) | |
6581 | # On Alpha systems, a compiler option provides the behaviour. | |
6582 | # See the ieee(3) manual page, also available at | |
6583 | # <https://backdrift.org/man/tru64/man3/ieee.3.html> | |
6584 | if test -n "$GCC"; then | |
6585 | # GCC has the option -mieee. | |
6586 | # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. | |
6587 | CPPFLAGS="$CPPFLAGS -mieee" | |
6588 | else | |
6589 | # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. | |
6590 | # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. | |
6591 | CPPFLAGS="$CPPFLAGS -ieee" | |
6592 | fi | |
6593 | ;; | |
6594 | sh*) | |
6595 | if test -n "$GCC"; then | |
6596 | # GCC has the option -mieee. | |
6597 | CPPFLAGS="$CPPFLAGS -mieee" | |
6598 | fi | |
6599 | ;; | |
6600 | esac | |
c0c3707f | 6601 | |
c971b7fa | 6602 | |
c971b7fa | 6603 | |
c8693053 RO |
6604 | |
6605 | ||
6606 | ||
6607 | ||
6608 | # Check whether --enable-threads was given. | |
6609 | if test "${enable_threads+set}" = set; then : | |
6610 | enableval=$enable_threads; gl_use_threads=$enableval | |
5e8754f9 | 6611 | else |
c8693053 RO |
6612 | if test -n "$gl_use_threads_default"; then |
6613 | gl_use_threads="$gl_use_threads_default" | |
6614 | else | |
6615 | case "$host_os" in | |
6616 | osf*) gl_use_threads=no ;; | |
6617 | cygwin*) | |
6618 | case `uname -r` in | |
6619 | 1.[0-5].*) gl_use_threads=no ;; | |
6620 | *) gl_use_threads=yes ;; | |
6621 | esac | |
6622 | ;; | |
6623 | mingw*) | |
6624 | case "$gl_use_winpthreads_default" in | |
6625 | yes) gl_use_threads=posix ;; | |
6626 | no) gl_use_threads=windows ;; | |
6627 | *) gl_use_threads=yes ;; | |
6628 | esac | |
6629 | ;; | |
6630 | *) gl_use_threads=yes ;; | |
6631 | esac | |
6632 | fi | |
c971b7fa | 6633 | |
5e8754f9 | 6634 | fi |
c0c3707f | 6635 | |
c8693053 RO |
6636 | if test "$gl_use_threads" = yes \ |
6637 | || test "$gl_use_threads" = isoc \ | |
6638 | || test "$gl_use_threads" = posix \ | |
6639 | || test "$gl_use_threads" = isoc+posix; then | |
6640 | # For using <threads.h> or <pthread.h>: | |
6641 | ||
6642 | ||
6643 | if test -z "$gl_anythreadlib_early_done"; then | |
6644 | case "$host_os" in | |
6645 | osf*) | |
6646 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | |
6647 | # groks <pthread.h>. cc also understands the flag -pthread, but | |
6648 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | |
6649 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | |
6650 | # causes the AC_LINK_IFELSE test below to succeed unexpectedly, | |
6651 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | |
6652 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | |
6653 | ;; | |
6654 | esac | |
6655 | # Some systems optimize for single-threaded programs by default, and | |
6656 | # need special flags to disable these optimizations. For example, the | |
6657 | # definition of 'errno' in <errno.h>. | |
6658 | case "$host_os" in | |
6659 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | |
6660 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | |
6661 | esac | |
6662 | gl_anythreadlib_early_done=done | |
5e8754f9 | 6663 | fi |
c0c3707f | 6664 | |
c8693053 | 6665 | fi |
c0c3707f | 6666 | |
c0c3707f | 6667 | |
c971b7fa | 6668 | |
c8693053 RO |
6669 | # Pre-early section. |
6670 | ||
6671 | ||
6672 | ||
6673 | ||
6674 | # Code from module absolute-header: | |
6675 | # Code from module alloca: | |
6676 | # Code from module alloca-opt: | |
6677 | # Code from module arpa_inet: | |
6678 | # Code from module assure: | |
6679 | # Code from module at-internal: | |
698be2d8 | 6680 | # Code from module attribute: |
9c9d63b1 | 6681 | # Code from module basename-lgpl: |
698be2d8 | 6682 | # Code from module btowc: |
c8693053 RO |
6683 | # Code from module builtin-expect: |
6684 | # Code from module c99: | |
6685 | # Code from module canonicalize-lgpl: | |
6686 | # Code from module chdir: | |
6687 | # Code from module chdir-long: | |
9c9d63b1 | 6688 | # Code from module clock-time: |
c8693053 RO |
6689 | # Code from module cloexec: |
6690 | # Code from module close: | |
6691 | # Code from module closedir: | |
6692 | # Code from module count-one-bits: | |
698be2d8 | 6693 | # Code from module ctype: |
c8693053 RO |
6694 | # Code from module d-ino: |
6695 | # Code from module d-type: | |
6696 | # Code from module dirent: | |
6697 | # Code from module dirfd: | |
6698 | # Code from module dirname-lgpl: | |
c8693053 RO |
6699 | # Code from module double-slash-root: |
6700 | # Code from module dup: | |
6701 | # Code from module dup2: | |
9c9d63b1 | 6702 | # Code from module eloop-threshold: |
c8693053 RO |
6703 | # Code from module environ: |
6704 | # Code from module errno: | |
6705 | # Code from module error: | |
6706 | # Code from module exitfail: | |
6707 | # Code from module extensions: | |
6708 | # Code from module extern-inline: | |
6709 | # Code from module fchdir: | |
6710 | # Code from module fcntl: | |
6711 | # Code from module fcntl-h: | |
6712 | # Code from module fd-hook: | |
6713 | # Code from module fd-safer-flag: | |
6714 | # Code from module fdopendir: | |
32e2770e | 6715 | # Code from module ffs: |
c8693053 RO |
6716 | # Code from module filename: |
6717 | # Code from module filenamecat-lgpl: | |
6718 | # Code from module flexmember: | |
6719 | # Code from module float: | |
6720 | # Code from module fnmatch: | |
6721 | # Code from module fnmatch-gnu: | |
6722 | # Code from module fnmatch-h: | |
6723 | # Code from module fpieee: | |
6724 | ||
6725 | # Code from module fpucw: | |
9c9d63b1 | 6726 | # Code from module free-posix: |
c8693053 RO |
6727 | # Code from module frexp: |
6728 | # Code from module frexpl: | |
6729 | # Code from module fstat: | |
6730 | # Code from module fstatat: | |
4aaaa4e0 | 6731 | # Code from module gendocs: |
c8693053 RO |
6732 | # Code from module getcwd: |
6733 | # Code from module getcwd-lgpl: | |
c17253b9 | 6734 | # Code from module getdelim: |
c8693053 | 6735 | # Code from module getdtablesize: |
c17253b9 | 6736 | # Code from module getline: |
c8693053 RO |
6737 | # Code from module getlogin_r: |
6738 | # Code from module getprogname: | |
698be2d8 | 6739 | # Code from module getrandom: |
c8693053 RO |
6740 | # Code from module gettext-h: |
6741 | # Code from module gettimeofday: | |
0fa6376c | 6742 | # Code from module gitlog-to-changelog: |
c8693053 RO |
6743 | # Code from module glob: |
6744 | # Code from module glob-h: | |
6745 | # Code from module hard-locale: | |
9c9d63b1 | 6746 | # Code from module idx: |
c8693053 RO |
6747 | # Code from module include_next: |
6748 | # Code from module inet_ntop: | |
6749 | # Code from module intprops: | |
6750 | # Code from module inttypes: | |
6751 | # Code from module inttypes-incomplete: | |
698be2d8 | 6752 | # Code from module isblank: |
c8693053 RO |
6753 | # Code from module isnand-nolibm: |
6754 | # Code from module isnanl-nolibm: | |
6755 | # Code from module largefile: | |
6756 | ||
6757 | # Code from module libc-config: | |
6758 | # Code from module limits-h: | |
6759 | # Code from module localcharset: | |
6760 | # Code from module locale: | |
c8693053 RO |
6761 | # Code from module lock: |
6762 | # Code from module lstat: | |
6763 | # Code from module malloc-posix: | |
6764 | # Code from module malloca: | |
6765 | # Code from module math: | |
6766 | # Code from module mbrtowc: | |
6767 | # Code from module mbsinit: | |
6768 | # Code from module mbsrtowcs: | |
698be2d8 | 6769 | # Code from module mbtowc: |
c8693053 RO |
6770 | # Code from module memchr: |
6771 | # Code from module memmem: | |
6772 | # Code from module memmem-simple: | |
6773 | # Code from module mempcpy: | |
6774 | # Code from module memrchr: | |
698be2d8 | 6775 | # Code from module minmax: |
c8693053 RO |
6776 | # Code from module mkdir: |
6777 | # Code from module mkdtemp: | |
6778 | # Code from module mkostemp: | |
6779 | # Code from module msvc-inval: | |
6780 | # Code from module msvc-nothrow: | |
6781 | # Code from module multiarch: | |
6782 | # Code from module netinet_in: | |
6783 | # Code from module nocrash: | |
6784 | # Code from module open: | |
6785 | # Code from module openat: | |
6786 | # Code from module openat-die: | |
6787 | # Code from module openat-h: | |
6788 | # Code from module opendir: | |
6789 | # Code from module pathmax: | |
9c9d63b1 | 6790 | # Code from module pipe-posix: |
c8693053 RO |
6791 | # Code from module rawmemchr: |
6792 | # Code from module readdir: | |
6793 | # Code from module readlink: | |
6794 | # Code from module realloc-posix: | |
6795 | # Code from module rename: | |
6796 | # Code from module rewinddir: | |
6797 | # Code from module rmdir: | |
6798 | # Code from module same-inode: | |
6799 | # Code from module save-cwd: | |
6800 | # Code from module scratch_buffer: | |
6801 | # Code from module setenv: | |
6802 | # Code from module setlocale-null: | |
6803 | # Code from module signal-h: | |
6804 | # Code from module snippet/_Noreturn: | |
6805 | # Code from module snippet/arg-nonnull: | |
6806 | # Code from module snippet/c++defs: | |
6807 | # Code from module snippet/warn-on-use: | |
6808 | # Code from module socklen: | |
6809 | # Code from module ssize_t: | |
6810 | # Code from module stat: | |
6811 | # Code from module stat-time: | |
6812 | # Code from module std-gnu11: | |
6813 | # Code from module stdalign: | |
6814 | # Code from module stdbool: | |
6815 | # Code from module stddef: | |
6816 | # Code from module stdint: | |
6817 | # Code from module stdio: | |
6818 | # Code from module stdlib: | |
6819 | # Code from module strchrnul: | |
6820 | # Code from module strdup-posix: | |
6821 | # Code from module streq: | |
6822 | # Code from module strerror: | |
6823 | # Code from module strerror-override: | |
6824 | # Code from module strerror_r-posix: | |
6825 | # Code from module string: | |
32e2770e | 6826 | # Code from module strings: |
698be2d8 | 6827 | # Code from module strnlen: |
c8693053 RO |
6828 | # Code from module strnlen1: |
6829 | # Code from module strstr: | |
6830 | # Code from module strstr-simple: | |
6831 | # Code from module strtok_r: | |
698be2d8 | 6832 | # Code from module sys_random: |
c8693053 RO |
6833 | # Code from module sys_socket: |
6834 | # Code from module sys_stat: | |
6835 | # Code from module sys_time: | |
6836 | # Code from module sys_types: | |
6837 | # Code from module sys_uio: | |
6838 | # Code from module tempname: | |
6839 | # Code from module threadlib: | |
6840 | ||
6841 | ||
6842 | ||
6843 | # Code from module time: | |
6844 | # Code from module time_r: | |
6845 | # Code from module unistd: | |
6846 | # Code from module unistd-safer: | |
6847 | # Code from module unsetenv: | |
6848 | # Code from module update-copyright: | |
6849 | # Code from module verify: | |
6850 | # Code from module wchar: | |
6851 | # Code from module wctype-h: | |
6852 | # Code from module windows-mutex: | |
6853 | # Code from module windows-once: | |
6854 | # Code from module windows-recmutex: | |
6855 | # Code from module windows-rwlock: | |
698be2d8 CB |
6856 | # Code from module wmemchr: |
6857 | # Code from module wmempcpy: | |
c8693053 RO |
6858 | # Code from module xalloc-oversized: |
6859 | ||
6860 | ||
6861 | am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc | |
c971b7fa PA |
6862 | |
6863 | ||
c0c3707f CB |
6864 | ac_aux_dir= |
6865 | for ac_dir in .. "$srcdir"/..; do | |
6866 | if test -f "$ac_dir/install-sh"; then | |
6867 | ac_aux_dir=$ac_dir | |
6868 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
6869 | break | |
6870 | elif test -f "$ac_dir/install.sh"; then | |
6871 | ac_aux_dir=$ac_dir | |
6872 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
6873 | break | |
6874 | elif test -f "$ac_dir/shtool"; then | |
6875 | ac_aux_dir=$ac_dir | |
6876 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
6877 | break | |
6878 | fi | |
6879 | done | |
6880 | if test -z "$ac_aux_dir"; then | |
6881 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 | |
6882 | fi | |
6883 | ||
6884 | # These three variables are undocumented and unsupported, | |
6885 | # and are intended to be withdrawn in a future Autoconf release. | |
6886 | # They can cause serious problems if a builder's source tree is in a directory | |
6887 | # whose full name contains unusual characters. | |
6888 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
6889 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
6890 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
6891 | ||
6892 | ||
6893 | ||
6894 | ||
6895 | ||
6896 | ||
6897 | ||
6898 | ||
6899 | ||
6900 | ||
698be2d8 | 6901 | |
9c9d63b1 | 6902 | |
c0c3707f CB |
6903 | # Check whether --enable-cross-guesses was given. |
6904 | if test "${enable_cross_guesses+set}" = set; then : | |
6905 | enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then | |
6906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5 | |
6907 | $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;} | |
6908 | enableval=conservative | |
6909 | fi | |
6910 | gl_cross_guesses="$enableval" | |
6911 | else | |
6912 | gl_cross_guesses=conservative | |
6913 | fi | |
6914 | ||
6915 | if test $gl_cross_guesses = risky; then | |
6916 | gl_cross_guess_normal="guessing yes" | |
6917 | gl_cross_guess_inverted="guessing no" | |
6918 | else | |
6919 | gl_cross_guess_normal="guessing no" | |
6920 | gl_cross_guess_inverted="guessing yes" | |
6921 | fi | |
6922 | LIBC_FATAL_STDERR_=1 | |
6923 | export LIBC_FATAL_STDERR_ | |
6924 | ||
5df4cba6 | 6925 | |
c0c3707f CB |
6926 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6927 | if test "x$ac_cv_type_size_t" = xyes; then : | |
6928 | ||
6929 | else | |
6930 | ||
6931 | cat >>confdefs.h <<_ACEOF | |
6932 | #define size_t unsigned int | |
6933 | _ACEOF | |
6934 | ||
6935 | fi | |
6936 | ||
6937 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6938 | # for constant arguments. Useless! | |
6939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
6940 | $as_echo_n "checking for working alloca.h... " >&6; } | |
6941 | if ${ac_cv_working_alloca_h+:} false; then : | |
6942 | $as_echo_n "(cached) " >&6 | |
6943 | else | |
6944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6945 | /* end confdefs.h. */ | |
6946 | #include <alloca.h> | |
5e8754f9 SDJ |
6947 | int |
6948 | main () | |
6949 | { | |
c0c3707f CB |
6950 | char *p = (char *) alloca (2 * sizeof (int)); |
6951 | if (p) return 0; | |
5e8754f9 SDJ |
6952 | ; |
6953 | return 0; | |
6954 | } | |
6955 | _ACEOF | |
c0c3707f CB |
6956 | if ac_fn_c_try_link "$LINENO"; then : |
6957 | ac_cv_working_alloca_h=yes | |
6958 | else | |
6959 | ac_cv_working_alloca_h=no | |
5e8754f9 | 6960 | fi |
c0c3707f CB |
6961 | rm -f core conftest.err conftest.$ac_objext \ |
6962 | conftest$ac_exeext conftest.$ac_ext | |
5e8754f9 | 6963 | fi |
c0c3707f CB |
6964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
6965 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
6966 | if test $ac_cv_working_alloca_h = yes; then | |
c971b7fa | 6967 | |
c0c3707f | 6968 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c971b7fa | 6969 | |
c0c3707f | 6970 | fi |
d0ac1c44 | 6971 | |
c0c3707f CB |
6972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
6973 | $as_echo_n "checking for alloca... " >&6; } | |
6974 | if ${ac_cv_func_alloca_works+:} false; then : | |
5e8754f9 SDJ |
6975 | $as_echo_n "(cached) " >&6 |
6976 | else | |
6977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6978 | /* end confdefs.h. */ | |
c0c3707f CB |
6979 | #ifdef __GNUC__ |
6980 | # define alloca __builtin_alloca | |
6981 | #else | |
6982 | # ifdef _MSC_VER | |
6983 | # include <malloc.h> | |
6984 | # define alloca _alloca | |
6985 | # else | |
6986 | # ifdef HAVE_ALLOCA_H | |
6987 | # include <alloca.h> | |
6988 | # else | |
6989 | # ifdef _AIX | |
6990 | #pragma alloca | |
6991 | # else | |
6992 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
6993 | void *alloca (size_t); | |
6994 | # endif | |
6995 | # endif | |
6996 | # endif | |
6997 | # endif | |
6998 | #endif | |
d0ac1c44 | 6999 | |
5e8754f9 SDJ |
7000 | int |
7001 | main () | |
7002 | { | |
c0c3707f CB |
7003 | char *p = (char *) alloca (1); |
7004 | if (p) return 0; | |
5e8754f9 SDJ |
7005 | ; |
7006 | return 0; | |
7007 | } | |
7008 | _ACEOF | |
c0c3707f CB |
7009 | if ac_fn_c_try_link "$LINENO"; then : |
7010 | ac_cv_func_alloca_works=yes | |
7011 | else | |
7012 | ac_cv_func_alloca_works=no | |
5e8754f9 | 7013 | fi |
c0c3707f CB |
7014 | rm -f core conftest.err conftest.$ac_objext \ |
7015 | conftest$ac_exeext conftest.$ac_ext | |
7016 | fi | |
7017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
7018 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
7a6dbc2f | 7019 | |
c0c3707f | 7020 | if test $ac_cv_func_alloca_works = yes; then |
7a6dbc2f | 7021 | |
c0c3707f | 7022 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
7a6dbc2f | 7023 | |
5e8754f9 | 7024 | else |
c0c3707f CB |
7025 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
7026 | # that cause trouble. Some versions do not even contain alloca or | |
7027 | # contain a buggy version. If you still want to use their alloca, | |
7028 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
c971b7fa PA |
7029 | |
7030 | ||
7a6dbc2f | 7031 | |
73cc7272 TT |
7032 | |
7033 | ||
c0c3707f | 7034 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
73cc7272 | 7035 | |
c0c3707f | 7036 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
73cc7272 TT |
7037 | |
7038 | ||
c0c3707f CB |
7039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
7040 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
7041 | if ${ac_cv_c_stack_direction+:} false; then : | |
73cc7272 TT |
7042 | $as_echo_n "(cached) " >&6 |
7043 | else | |
c0c3707f CB |
7044 | if test "$cross_compiling" = yes; then : |
7045 | ac_cv_c_stack_direction=0 | |
7046 | else | |
7047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
73cc7272 | 7048 | /* end confdefs.h. */ |
c0c3707f CB |
7049 | $ac_includes_default |
7050 | int | |
7051 | find_stack_direction (int *addr, int depth) | |
7052 | { | |
7053 | int dir, dummy = 0; | |
7054 | if (! addr) | |
7055 | addr = &dummy; | |
7056 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
7057 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
7058 | return dir + dummy; | |
7059 | } | |
73cc7272 | 7060 | |
73cc7272 | 7061 | int |
c0c3707f | 7062 | main (int argc, char **argv) |
73cc7272 | 7063 | { |
c0c3707f | 7064 | return find_stack_direction (0, argc + !argv + 20) < 0; |
73cc7272 TT |
7065 | } |
7066 | _ACEOF | |
c0c3707f CB |
7067 | if ac_fn_c_try_run "$LINENO"; then : |
7068 | ac_cv_c_stack_direction=1 | |
7069 | else | |
7070 | ac_cv_c_stack_direction=-1 | |
73cc7272 | 7071 | fi |
c0c3707f CB |
7072 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7073 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
73cc7272 | 7074 | fi |
73cc7272 | 7075 | |
73cc7272 | 7076 | fi |
9c9d63b1 PM |
7077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
7078 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
7079 | cat >>confdefs.h <<_ACEOF | |
7080 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
c0c3707f CB |
7081 | _ACEOF |
7082 | ||
9c9d63b1 | 7083 | |
73cc7272 TT |
7084 | fi |
7085 | ||
9c9d63b1 PM |
7086 | |
7087 | GNULIB_INET_NTOP=0; | |
7088 | GNULIB_INET_PTON=0; | |
7089 | HAVE_DECL_INET_NTOP=1; | |
7090 | HAVE_DECL_INET_PTON=1; | |
7091 | REPLACE_INET_NTOP=0; | |
7092 | REPLACE_INET_PTON=0; | |
73cc7272 | 7093 | |
c0c3707f CB |
7094 | |
7095 | ||
7096 | ||
7097 | ||
7098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
7099 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
7100 | if ${gl_cv_have_include_next+:} false; then : | |
73cc7272 TT |
7101 | $as_echo_n "(cached) " >&6 |
7102 | else | |
c0c3707f CB |
7103 | rm -rf conftestd1a conftestd1b conftestd2 |
7104 | mkdir conftestd1a conftestd1b conftestd2 | |
7105 | cat <<EOF > conftestd1a/conftest.h | |
7106 | #define DEFINED_IN_CONFTESTD1 | |
7107 | #include_next <conftest.h> | |
7108 | #ifdef DEFINED_IN_CONFTESTD2 | |
7109 | int foo; | |
7110 | #else | |
7111 | #error "include_next doesn't work" | |
7112 | #endif | |
7113 | EOF | |
7114 | cat <<EOF > conftestd1b/conftest.h | |
7115 | #define DEFINED_IN_CONFTESTD1 | |
7116 | #include <stdio.h> | |
7117 | #include_next <conftest.h> | |
7118 | #ifdef DEFINED_IN_CONFTESTD2 | |
7119 | int foo; | |
7120 | #else | |
7121 | #error "include_next doesn't work" | |
7122 | #endif | |
7123 | EOF | |
7124 | cat <<EOF > conftestd2/conftest.h | |
7125 | #ifndef DEFINED_IN_CONFTESTD1 | |
7126 | #error "include_next test doesn't work" | |
7127 | #endif | |
7128 | #define DEFINED_IN_CONFTESTD2 | |
7129 | EOF | |
7130 | gl_save_CPPFLAGS="$CPPFLAGS" | |
7131 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
7132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
73cc7272 | 7133 | /* end confdefs.h. */ |
c0c3707f | 7134 | #include <conftest.h> |
73cc7272 | 7135 | _ACEOF |
c0c3707f CB |
7136 | if ac_fn_c_try_compile "$LINENO"; then : |
7137 | gl_cv_have_include_next=yes | |
7138 | else | |
7139 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
7140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7141 | /* end confdefs.h. */ | |
7142 | #include <conftest.h> | |
7143 | _ACEOF | |
7144 | if ac_fn_c_try_compile "$LINENO"; then : | |
7145 | gl_cv_have_include_next=buggy | |
7146 | else | |
7147 | gl_cv_have_include_next=no | |
73cc7272 | 7148 | fi |
c0c3707f CB |
7149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7150 | ||
73cc7272 | 7151 | fi |
c0c3707f CB |
7152 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7153 | CPPFLAGS="$gl_save_CPPFLAGS" | |
7154 | rm -rf conftestd1a conftestd1b conftestd2 | |
7155 | ||
73cc7272 | 7156 | fi |
c0c3707f CB |
7157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 |
7158 | $as_echo "$gl_cv_have_include_next" >&6; } | |
7159 | PRAGMA_SYSTEM_HEADER= | |
7160 | if test $gl_cv_have_include_next = yes; then | |
7161 | INCLUDE_NEXT=include_next | |
7162 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
7163 | if test -n "$GCC"; then | |
7164 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
7165 | fi | |
7166 | else | |
7167 | if test $gl_cv_have_include_next = buggy; then | |
7168 | INCLUDE_NEXT=include | |
7169 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
7170 | else | |
7171 | INCLUDE_NEXT=include | |
7172 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
7173 | fi | |
73cc7272 TT |
7174 | fi |
7175 | ||
73cc7272 | 7176 | |
73cc7272 | 7177 | |
9c9d63b1 PM |
7178 | |
7179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5 | |
7180 | $as_echo_n "checking whether source code line length is unlimited... " >&6; } | |
7181 | if ${gl_cv_source_line_length_unlimited+:} false; then : | |
73cc7272 TT |
7182 | $as_echo_n "(cached) " >&6 |
7183 | else | |
9c9d63b1 | 7184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
73cc7272 | 7185 | /* end confdefs.h. */ |
73cc7272 | 7186 | |
c0c3707f CB |
7187 | #ifdef __TANDEM |
7188 | choke me | |
7189 | #endif | |
73cc7272 | 7190 | |
73cc7272 | 7191 | _ACEOF |
c0c3707f CB |
7192 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
7193 | $EGREP "choke me" >/dev/null 2>&1; then : | |
9c9d63b1 | 7194 | gl_cv_source_line_length_unlimited=no |
c0c3707f | 7195 | else |
9c9d63b1 | 7196 | gl_cv_source_line_length_unlimited=yes |
73cc7272 | 7197 | fi |
c0c3707f | 7198 | rm -f conftest* |
73cc7272 | 7199 | |
73cc7272 TT |
7200 | |
7201 | fi | |
9c9d63b1 PM |
7202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5 |
7203 | $as_echo "$gl_cv_source_line_length_unlimited" >&6; } | |
7204 | if test $gl_cv_source_line_length_unlimited = no; then | |
c0c3707f CB |
7205 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" |
7206 | else | |
7207 | PRAGMA_COLUMNS= | |
7208 | fi | |
73cc7272 TT |
7209 | |
7210 | ||
7211 | ||
73cc7272 | 7212 | |
73cc7272 TT |
7213 | |
7214 | ||
c0c3707f CB |
7215 | if test $ac_cv_header_features_h = yes; then |
7216 | HAVE_FEATURES_H=1 | |
7217 | else | |
7218 | HAVE_FEATURES_H=0 | |
7219 | fi | |
73cc7272 | 7220 | |
7a6dbc2f SDJ |
7221 | |
7222 | ||
7223 | ||
7224 | ||
c0c3707f CB |
7225 | if test $ac_cv_header_sys_socket_h = no; then |
7226 | for ac_header in ws2tcpip.h | |
7227 | do : | |
7228 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
7229 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
7230 | cat >>confdefs.h <<_ACEOF | |
7231 | #define HAVE_WS2TCPIP_H 1 | |
7232 | _ACEOF | |
7a6dbc2f | 7233 | |
c0c3707f | 7234 | fi |
7a6dbc2f | 7235 | |
c0c3707f | 7236 | done |
7a6dbc2f | 7237 | |
c0c3707f | 7238 | fi |
7a6dbc2f | 7239 | |
c0c3707f CB |
7240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 |
7241 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
7242 | if test -z "$MKDIR_P"; then | |
7243 | if ${ac_cv_path_mkdir+:} false; then : | |
7244 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 7245 | else |
c0c3707f CB |
7246 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7247 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
7248 | do | |
7249 | IFS=$as_save_IFS | |
7250 | test -z "$as_dir" && as_dir=. | |
7251 | for ac_prog in mkdir gmkdir; do | |
7252 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7253 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue | |
7254 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
7255 | 'mkdir (GNU coreutils) '* | \ | |
7256 | 'mkdir (coreutils) '* | \ | |
7257 | 'mkdir (fileutils) '4.1*) | |
7258 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
7259 | break 3;; | |
7260 | esac | |
7261 | done | |
7262 | done | |
7263 | done | |
7264 | IFS=$as_save_IFS | |
7a6dbc2f | 7265 | |
5e8754f9 | 7266 | fi |
7a6dbc2f | 7267 | |
c0c3707f CB |
7268 | test -d ./--version && rmdir ./--version |
7269 | if test "${ac_cv_path_mkdir+set}" = set; then | |
7270 | MKDIR_P="$ac_cv_path_mkdir -p" | |
7271 | else | |
7272 | # As a last resort, use the slow shell script. Don't cache a | |
7273 | # value for MKDIR_P within a source directory, because that will | |
7274 | # break other packages using the cache if that directory is | |
7275 | # removed, or if the value is a relative name. | |
7276 | MKDIR_P="$ac_install_sh -d" | |
7277 | fi | |
5e8754f9 | 7278 | fi |
c0c3707f CB |
7279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
7280 | $as_echo "$MKDIR_P" >&6; } | |
7a6dbc2f | 7281 | |
5e8754f9 | 7282 | |
698be2d8 CB |
7283 | GNULIB_BTOWC=0; |
7284 | GNULIB_WCTOB=0; | |
7285 | GNULIB_MBSINIT=0; | |
7286 | GNULIB_MBRTOWC=0; | |
7287 | GNULIB_MBRLEN=0; | |
7288 | GNULIB_MBSRTOWCS=0; | |
7289 | GNULIB_MBSNRTOWCS=0; | |
7290 | GNULIB_WCRTOMB=0; | |
7291 | GNULIB_WCSRTOMBS=0; | |
7292 | GNULIB_WCSNRTOMBS=0; | |
7293 | GNULIB_WCWIDTH=0; | |
7294 | GNULIB_WMEMCHR=0; | |
7295 | GNULIB_WMEMCMP=0; | |
7296 | GNULIB_WMEMCPY=0; | |
7297 | GNULIB_WMEMMOVE=0; | |
7298 | GNULIB_WMEMPCPY=0; | |
7299 | GNULIB_WMEMSET=0; | |
7300 | GNULIB_WCSLEN=0; | |
7301 | GNULIB_WCSNLEN=0; | |
7302 | GNULIB_WCSCPY=0; | |
7303 | GNULIB_WCPCPY=0; | |
7304 | GNULIB_WCSNCPY=0; | |
7305 | GNULIB_WCPNCPY=0; | |
7306 | GNULIB_WCSCAT=0; | |
7307 | GNULIB_WCSNCAT=0; | |
7308 | GNULIB_WCSCMP=0; | |
7309 | GNULIB_WCSNCMP=0; | |
7310 | GNULIB_WCSCASECMP=0; | |
7311 | GNULIB_WCSNCASECMP=0; | |
7312 | GNULIB_WCSCOLL=0; | |
7313 | GNULIB_WCSXFRM=0; | |
7314 | GNULIB_WCSDUP=0; | |
7315 | GNULIB_WCSCHR=0; | |
7316 | GNULIB_WCSRCHR=0; | |
7317 | GNULIB_WCSCSPN=0; | |
7318 | GNULIB_WCSSPN=0; | |
7319 | GNULIB_WCSPBRK=0; | |
7320 | GNULIB_WCSSTR=0; | |
7321 | GNULIB_WCSTOK=0; | |
7322 | GNULIB_WCSWIDTH=0; | |
7323 | GNULIB_WCSFTIME=0; | |
9c9d63b1 | 7324 | GNULIB_MDA_WCSDUP=1; |
698be2d8 CB |
7325 | HAVE_BTOWC=1; |
7326 | HAVE_MBSINIT=1; | |
7327 | HAVE_MBRTOWC=1; | |
7328 | HAVE_MBRLEN=1; | |
7329 | HAVE_MBSRTOWCS=1; | |
7330 | HAVE_MBSNRTOWCS=1; | |
7331 | HAVE_WCRTOMB=1; | |
7332 | HAVE_WCSRTOMBS=1; | |
7333 | HAVE_WCSNRTOMBS=1; | |
7334 | HAVE_WMEMCHR=1; | |
7335 | HAVE_WMEMCMP=1; | |
7336 | HAVE_WMEMCPY=1; | |
7337 | HAVE_WMEMMOVE=1; | |
7338 | HAVE_WMEMPCPY=1; | |
7339 | HAVE_WMEMSET=1; | |
7340 | HAVE_WCSLEN=1; | |
7341 | HAVE_WCSNLEN=1; | |
7342 | HAVE_WCSCPY=1; | |
7343 | HAVE_WCPCPY=1; | |
7344 | HAVE_WCSNCPY=1; | |
7345 | HAVE_WCPNCPY=1; | |
7346 | HAVE_WCSCAT=1; | |
7347 | HAVE_WCSNCAT=1; | |
7348 | HAVE_WCSCMP=1; | |
7349 | HAVE_WCSNCMP=1; | |
7350 | HAVE_WCSCASECMP=1; | |
7351 | HAVE_WCSNCASECMP=1; | |
7352 | HAVE_WCSCOLL=1; | |
7353 | HAVE_WCSXFRM=1; | |
7354 | HAVE_WCSDUP=1; | |
7355 | HAVE_WCSCHR=1; | |
7356 | HAVE_WCSRCHR=1; | |
7357 | HAVE_WCSCSPN=1; | |
7358 | HAVE_WCSSPN=1; | |
7359 | HAVE_WCSPBRK=1; | |
7360 | HAVE_WCSSTR=1; | |
7361 | HAVE_WCSTOK=1; | |
7362 | HAVE_WCSWIDTH=1; | |
7363 | HAVE_WCSFTIME=1; | |
7364 | HAVE_DECL_WCTOB=1; | |
9c9d63b1 | 7365 | HAVE_DECL_WCSDUP=1; |
698be2d8 CB |
7366 | HAVE_DECL_WCWIDTH=1; |
7367 | REPLACE_MBSTATE_T=0; | |
7368 | REPLACE_BTOWC=0; | |
7369 | REPLACE_WCTOB=0; | |
7370 | REPLACE_MBSINIT=0; | |
7371 | REPLACE_MBRTOWC=0; | |
7372 | REPLACE_MBRLEN=0; | |
7373 | REPLACE_MBSRTOWCS=0; | |
7374 | REPLACE_MBSNRTOWCS=0; | |
7375 | REPLACE_WCRTOMB=0; | |
7376 | REPLACE_WCSRTOMBS=0; | |
7377 | REPLACE_WCSNRTOMBS=0; | |
7378 | REPLACE_WCWIDTH=0; | |
7379 | REPLACE_WCSWIDTH=0; | |
7380 | REPLACE_WCSFTIME=0; | |
7381 | REPLACE_WCSTOK=0; | |
7382 | ||
7383 | ||
9c9d63b1 PM |
7384 | |
7385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 | |
698be2d8 CB |
7386 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } |
7387 | if ${gl_cv_header_wchar_h_correct_inline+:} false; then : | |
7388 | $as_echo_n "(cached) " >&6 | |
7389 | else | |
7390 | gl_cv_header_wchar_h_correct_inline=yes | |
9c9d63b1 PM |
7391 | case "$host_os" in |
7392 | *-gnu* | gnu*) | |
7393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
698be2d8 CB |
7394 | /* end confdefs.h. */ |
7395 | ||
9c9d63b1 PM |
7396 | |
7397 | #define wcstod renamed_wcstod | |
7398 | #include <wchar.h> | |
7399 | extern int zero (void); | |
7400 | int main () { return zero(); } | |
698be2d8 CB |
7401 | |
7402 | _ACEOF | |
9c9d63b1 PM |
7403 | save_ac_compile="$ac_compile" |
7404 | ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` | |
7405 | if echo '#include "conftest.c"' >conftest1.c \ | |
7406 | && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
698be2d8 CB |
7407 | (eval $ac_compile) 2>&5 |
7408 | ac_status=$? | |
7409 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7410 | test $ac_status = 0; }; then | |
9c9d63b1 | 7411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
698be2d8 CB |
7412 | /* end confdefs.h. */ |
7413 | ||
9c9d63b1 PM |
7414 | |
7415 | #define wcstod renamed_wcstod | |
7416 | #include <wchar.h> | |
7417 | int zero (void) { return 0; } | |
698be2d8 CB |
7418 | |
7419 | _ACEOF | |
9c9d63b1 PM |
7420 | ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` |
7421 | if echo '#include "conftest.c"' >conftest2.c \ | |
7422 | && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
698be2d8 CB |
7423 | (eval $ac_compile) 2>&5 |
7424 | ac_status=$? | |
7425 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7426 | test $ac_status = 0; }; then | |
9c9d63b1 PM |
7427 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then |
7428 | : | |
7429 | else | |
7430 | gl_cv_header_wchar_h_correct_inline=no | |
7431 | fi | |
7432 | fi | |
698be2d8 | 7433 | fi |
9c9d63b1 PM |
7434 | ac_compile="$save_ac_compile" |
7435 | rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext | |
7436 | ;; | |
7437 | esac | |
698be2d8 CB |
7438 | |
7439 | fi | |
7440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 | |
7441 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
7442 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
7443 | as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
7444 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
7445 | C99 mode. You have four options: | |
7446 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
7447 | - Fix your include files, using parts of | |
7448 | <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
7449 | - Use a gcc version older than 4.3, or | |
7450 | - Don't use the flags -std=c99 or -std=gnu99. | |
7451 | Configuration aborted." "$LINENO" 5 | |
7452 | fi | |
7453 | ||
7454 | ||
7455 | ||
7456 | ||
7457 | for ac_func in $ac_func_list | |
7458 | do : | |
7459 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7460 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
7461 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7462 | cat >>confdefs.h <<_ACEOF | |
7463 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7464 | _ACEOF | |
7465 | ||
7466 | fi | |
7467 | done | |
7468 | ||
7469 | ||
7470 | ||
7471 | ||
7472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
7473 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
7474 | if ${am_cv_langinfo_codeset+:} false; then : | |
7475 | $as_echo_n "(cached) " >&6 | |
7476 | else | |
7477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7478 | /* end confdefs.h. */ | |
7479 | #include <langinfo.h> | |
7480 | int | |
7481 | main () | |
7482 | { | |
7483 | char* cs = nl_langinfo(CODESET); return !cs; | |
7484 | ; | |
7485 | return 0; | |
7486 | } | |
7487 | _ACEOF | |
7488 | if ac_fn_c_try_link "$LINENO"; then : | |
7489 | am_cv_langinfo_codeset=yes | |
7490 | else | |
7491 | am_cv_langinfo_codeset=no | |
7492 | fi | |
7493 | rm -f core conftest.err conftest.$ac_objext \ | |
7494 | conftest$ac_exeext conftest.$ac_ext | |
7495 | ||
7496 | fi | |
7497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
7498 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
7499 | if test $am_cv_langinfo_codeset = yes; then | |
7500 | ||
7501 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
7502 | ||
7503 | fi | |
7504 | ||
7505 | ||
7506 | ||
7507 | ||
7508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 | |
7509 | $as_echo_n "checking for a traditional french locale... " >&6; } | |
7510 | if ${gt_cv_locale_fr+:} false; then : | |
7511 | $as_echo_n "(cached) " >&6 | |
7512 | else | |
7513 | ||
7514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7515 | /* end confdefs.h. */ | |
7516 | ||
7517 | #include <locale.h> | |
7518 | #include <time.h> | |
7519 | #if HAVE_LANGINFO_CODESET | |
7520 | # include <langinfo.h> | |
7521 | #endif | |
7522 | #include <stdlib.h> | |
7523 | #include <string.h> | |
7524 | struct tm t; | |
7525 | char buf[16]; | |
7526 | int main () { | |
7527 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl | |
7528 | imitates locale dependent behaviour by looking at the environment | |
7529 | variables, and all locales use the UTF-8 encoding. */ | |
7530 | #if defined __BEOS__ || defined __HAIKU__ | |
7531 | return 1; | |
7532 | #else | |
7533 | /* Check whether the given locale name is recognized by the system. */ | |
7534 | # if defined _WIN32 && !defined __CYGWIN__ | |
7535 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
7536 | not at the environment variables. Also, when an encoding suffix such | |
7537 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
7538 | category of the locale to "C". */ | |
7539 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
7540 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
7541 | return 1; | |
7542 | # else | |
7543 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
7544 | # endif | |
7545 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
7546 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
7547 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
7548 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
7549 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
7550 | some unit tests fail. | |
7551 | On MirBSD 10, when an unsupported locale is specified, setlocale() | |
7552 | succeeds but then nl_langinfo(CODESET) is "UTF-8". */ | |
7553 | # if HAVE_LANGINFO_CODESET | |
7554 | { | |
7555 | const char *cs = nl_langinfo (CODESET); | |
7556 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 | |
7557 | || strcmp (cs, "UTF-8") == 0) | |
7558 | return 1; | |
7559 | } | |
7560 | # endif | |
7561 | # ifdef __CYGWIN__ | |
7562 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
7563 | locale_charset() function relies on the encoding suffix. Note that | |
7564 | LC_ALL is set on the command line. */ | |
7565 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
7566 | # endif | |
7567 | /* Check whether in the abbreviation of the second month, the second | |
7568 | character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only | |
7569 | one byte long. This excludes the UTF-8 encoding. */ | |
7570 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
7571 | if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; | |
7572 | # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ | |
7573 | /* Check whether the decimal separator is a comma. | |
7574 | On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point | |
7575 | are nl_langinfo(RADIXCHAR) are both ".". */ | |
7576 | if (localeconv () ->decimal_point[0] != ',') return 1; | |
7577 | # endif | |
7578 | return 0; | |
7579 | #endif | |
7580 | } | |
7581 | ||
7582 | _ACEOF | |
7583 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | |
7584 | (eval $ac_link) 2>&5 | |
7585 | ac_status=$? | |
7586 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7587 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
7588 | case "$host_os" in | |
7589 | # Handle native Windows specially, because there setlocale() interprets | |
7590 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
7591 | # "fr" or "fra" as "French" or "French_France.1252", | |
7592 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
7593 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
7594 | # and similar. | |
7595 | mingw*) | |
7596 | # Test for the native Windows locale name. | |
7597 | if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7598 | gt_cv_locale_fr=French_France.1252 | |
7599 | else | |
7600 | # None found. | |
7601 | gt_cv_locale_fr=none | |
7602 | fi | |
7603 | ;; | |
7604 | *) | |
7605 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
7606 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
7607 | # configure script would override the LC_ALL setting. Likewise for | |
7608 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
7609 | # Test for the usual locale name. | |
7610 | if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7611 | gt_cv_locale_fr=fr_FR | |
7612 | else | |
7613 | # Test for the locale name with explicit encoding suffix. | |
7614 | if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7615 | gt_cv_locale_fr=fr_FR.ISO-8859-1 | |
7616 | else | |
7617 | # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. | |
7618 | if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7619 | gt_cv_locale_fr=fr_FR.ISO8859-1 | |
7620 | else | |
7621 | # Test for the HP-UX locale name. | |
7622 | if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7623 | gt_cv_locale_fr=fr_FR.iso88591 | |
7624 | else | |
7625 | # Test for the Solaris 7 locale name. | |
7626 | if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
7627 | gt_cv_locale_fr=fr | |
7628 | else | |
7629 | # None found. | |
7630 | gt_cv_locale_fr=none | |
7631 | fi | |
7632 | fi | |
7633 | fi | |
7634 | fi | |
7635 | fi | |
7636 | ;; | |
7637 | esac | |
7638 | fi | |
7639 | rm -fr conftest* | |
7640 | ||
7641 | fi | |
7642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 | |
7643 | $as_echo "$gt_cv_locale_fr" >&6; } | |
7644 | LOCALE_FR=$gt_cv_locale_fr | |
7645 | ||
7646 | ||
7647 | ||
7648 | GNULIB__EXIT=0; | |
9c9d63b1 | 7649 | GNULIB_ALIGNED_ALLOC=0; |
698be2d8 CB |
7650 | GNULIB_ATOLL=0; |
7651 | GNULIB_CALLOC_POSIX=0; | |
7652 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
9c9d63b1 | 7653 | GNULIB_FREE_POSIX=0; |
698be2d8 CB |
7654 | GNULIB_GETLOADAVG=0; |
7655 | GNULIB_GETSUBOPT=0; | |
7656 | GNULIB_GRANTPT=0; | |
7657 | GNULIB_MALLOC_POSIX=0; | |
7658 | GNULIB_MBTOWC=0; | |
7659 | GNULIB_MKDTEMP=0; | |
7660 | GNULIB_MKOSTEMP=0; | |
7661 | GNULIB_MKOSTEMPS=0; | |
7662 | GNULIB_MKSTEMP=0; | |
7663 | GNULIB_MKSTEMPS=0; | |
9c9d63b1 | 7664 | GNULIB_POSIX_MEMALIGN=0; |
698be2d8 CB |
7665 | GNULIB_POSIX_OPENPT=0; |
7666 | GNULIB_PTSNAME=0; | |
7667 | GNULIB_PTSNAME_R=0; | |
7668 | GNULIB_PUTENV=0; | |
7669 | GNULIB_QSORT_R=0; | |
7670 | GNULIB_RANDOM=0; | |
7671 | GNULIB_RANDOM_R=0; | |
7672 | GNULIB_REALLOCARRAY=0; | |
7673 | GNULIB_REALLOC_POSIX=0; | |
7674 | GNULIB_REALPATH=0; | |
7675 | GNULIB_RPMATCH=0; | |
7676 | GNULIB_SECURE_GETENV=0; | |
7677 | GNULIB_SETENV=0; | |
7678 | GNULIB_STRTOD=0; | |
7679 | GNULIB_STRTOLD=0; | |
7680 | GNULIB_STRTOLL=0; | |
7681 | GNULIB_STRTOULL=0; | |
7682 | GNULIB_SYSTEM_POSIX=0; | |
7683 | GNULIB_UNLOCKPT=0; | |
7684 | GNULIB_UNSETENV=0; | |
7685 | GNULIB_WCTOMB=0; | |
9c9d63b1 PM |
7686 | GNULIB_MDA_ECVT=1; |
7687 | GNULIB_MDA_FCVT=1; | |
7688 | GNULIB_MDA_GCVT=1; | |
7689 | GNULIB_MDA_MKTEMP=1; | |
7690 | GNULIB_MDA_PUTENV=1; | |
698be2d8 | 7691 | HAVE__EXIT=1; |
9c9d63b1 | 7692 | HAVE_ALIGNED_ALLOC=1; |
698be2d8 CB |
7693 | HAVE_ATOLL=1; |
7694 | HAVE_CANONICALIZE_FILE_NAME=1; | |
9c9d63b1 PM |
7695 | HAVE_DECL_ECVT=1; |
7696 | HAVE_DECL_FCVT=1; | |
7697 | HAVE_DECL_GCVT=1; | |
698be2d8 CB |
7698 | HAVE_DECL_GETLOADAVG=1; |
7699 | HAVE_GETSUBOPT=1; | |
7700 | HAVE_GRANTPT=1; | |
7701 | HAVE_INITSTATE=1; | |
7702 | HAVE_DECL_INITSTATE=1; | |
7703 | HAVE_MBTOWC=1; | |
7704 | HAVE_MKDTEMP=1; | |
7705 | HAVE_MKOSTEMP=1; | |
7706 | HAVE_MKOSTEMPS=1; | |
7707 | HAVE_MKSTEMP=1; | |
7708 | HAVE_MKSTEMPS=1; | |
9c9d63b1 | 7709 | HAVE_POSIX_MEMALIGN=1; |
698be2d8 CB |
7710 | HAVE_POSIX_OPENPT=1; |
7711 | HAVE_PTSNAME=1; | |
7712 | HAVE_PTSNAME_R=1; | |
c0c3707f CB |
7713 | HAVE_QSORT_R=1; |
7714 | HAVE_RANDOM=1; | |
7715 | HAVE_RANDOM_H=1; | |
7716 | HAVE_RANDOM_R=1; | |
7717 | HAVE_REALLOCARRAY=1; | |
7718 | HAVE_REALPATH=1; | |
7719 | HAVE_RPMATCH=1; | |
7720 | HAVE_SECURE_GETENV=1; | |
7721 | HAVE_SETENV=1; | |
7722 | HAVE_DECL_SETENV=1; | |
7723 | HAVE_SETSTATE=1; | |
7724 | HAVE_DECL_SETSTATE=1; | |
7725 | HAVE_STRTOD=1; | |
7726 | HAVE_STRTOLD=1; | |
7727 | HAVE_STRTOLL=1; | |
7728 | HAVE_STRTOULL=1; | |
7729 | HAVE_STRUCT_RANDOM_DATA=1; | |
7730 | HAVE_SYS_LOADAVG_H=0; | |
7731 | HAVE_UNLOCKPT=1; | |
7732 | HAVE_DECL_UNSETENV=1; | |
9c9d63b1 | 7733 | REPLACE_ALIGNED_ALLOC=0; |
c0c3707f CB |
7734 | REPLACE_CALLOC=0; |
7735 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
9c9d63b1 | 7736 | REPLACE_FREE=0; |
c0c3707f CB |
7737 | REPLACE_INITSTATE=0; |
7738 | REPLACE_MALLOC=0; | |
7739 | REPLACE_MBTOWC=0; | |
7740 | REPLACE_MKSTEMP=0; | |
9c9d63b1 | 7741 | REPLACE_POSIX_MEMALIGN=0; |
c0c3707f CB |
7742 | REPLACE_PTSNAME=0; |
7743 | REPLACE_PTSNAME_R=0; | |
7744 | REPLACE_PUTENV=0; | |
7745 | REPLACE_QSORT_R=0; | |
7746 | REPLACE_RANDOM=0; | |
7747 | REPLACE_RANDOM_R=0; | |
7748 | REPLACE_REALLOC=0; | |
7749 | REPLACE_REALPATH=0; | |
7750 | REPLACE_SETENV=0; | |
7751 | REPLACE_SETSTATE=0; | |
7752 | REPLACE_STRTOD=0; | |
7753 | REPLACE_STRTOLD=0; | |
7754 | REPLACE_UNSETENV=0; | |
7755 | REPLACE_WCTOMB=0; | |
7a6dbc2f | 7756 | |
7a6dbc2f | 7757 | |
9c9d63b1 PM |
7758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 |
7759 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
7760 | if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : | |
7761 | $as_echo_n "(cached) " >&6 | |
7762 | else | |
7763 | rm -f conftest.sym conftest.file | |
7764 | echo >conftest.file | |
7765 | if test "$cross_compiling" = yes; then : | |
7766 | case "$host_os" in | |
7767 | linux-* | linux) | |
7768 | # Guess yes on Linux systems. | |
7769 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
7770 | *-gnu* | gnu*) | |
7771 | # Guess yes on glibc systems. | |
7772 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
7773 | mingw*) | |
7774 | # Guess no on native Windows. | |
7775 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; | |
7776 | *) | |
7777 | # If we don't know, obey --enable-cross-guesses. | |
7778 | gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;; | |
7779 | esac | |
7780 | ||
7781 | else | |
7782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7783 | /* end confdefs.h. */ | |
7784 | $ac_includes_default | |
7785 | int | |
7786 | main () | |
7787 | { | |
7788 | struct stat sbuf; | |
7789 | if (symlink ("conftest.file", "conftest.sym") != 0) | |
7790 | return 1; | |
7791 | /* Linux will dereference the symlink and fail, as required by | |
7792 | POSIX. That is better in the sense that it means we will not | |
7793 | have to compile and use the lstat wrapper. */ | |
7794 | return lstat ("conftest.sym/", &sbuf) == 0; | |
7795 | ||
7796 | ; | |
7797 | return 0; | |
7798 | } | |
7799 | _ACEOF | |
7800 | if ac_fn_c_try_run "$LINENO"; then : | |
7801 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
7802 | else | |
7803 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
7804 | fi | |
7805 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7806 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7807 | fi | |
7808 | ||
7809 | rm -f conftest.sym conftest.file | |
7810 | ||
7811 | fi | |
7812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 | |
7813 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
7814 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
7815 | *yes) | |
7816 | ||
7817 | cat >>confdefs.h <<_ACEOF | |
7818 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
7819 | _ACEOF | |
7820 | ||
7821 | ;; | |
7822 | esac | |
98399780 | 7823 | |
98399780 | 7824 | |
472fa5ee SM |
7825 | |
7826 | ||
7827 | ||
7828 | ||
7829 | ||
c0c3707f CB |
7830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 |
7831 | $as_echo_n "checking whether // is distinct from /... " >&6; } | |
7832 | if ${gl_cv_double_slash_root+:} false; then : | |
7833 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 7834 | else |
c0c3707f CB |
7835 | if test x"$cross_compiling" = xyes ; then |
7836 | # When cross-compiling, there is no way to tell whether // is special | |
7837 | # short of a list of hosts. However, the only known hosts to date | |
7838 | # that have a distinct // are Apollo DomainOS (too old to port to), | |
7839 | # Cygwin, and z/OS. If anyone knows of another system for which // has | |
7840 | # special semantics and is distinct from /, please report it to | |
7841 | # <bug-gnulib@gnu.org>. | |
7842 | case $host in | |
7843 | *-cygwin | i370-ibm-openedition) | |
7844 | gl_cv_double_slash_root=yes ;; | |
7845 | *) | |
7846 | # Be optimistic and assume that / and // are the same when we | |
7847 | # don't know. | |
7848 | gl_cv_double_slash_root='unknown, assuming no' ;; | |
7849 | esac | |
7850 | else | |
7851 | set x `ls -di / // 2>/dev/null` | |
7852 | if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then | |
7853 | gl_cv_double_slash_root=no | |
7854 | else | |
7855 | gl_cv_double_slash_root=yes | |
7856 | fi | |
7857 | fi | |
5e8754f9 | 7858 | fi |
c0c3707f CB |
7859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 |
7860 | $as_echo "$gl_cv_double_slash_root" >&6; } | |
7861 | if test "$gl_cv_double_slash_root" = yes; then | |
472fa5ee | 7862 | |
c0c3707f | 7863 | $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h |
472fa5ee | 7864 | |
c0c3707f | 7865 | fi |
472fa5ee SM |
7866 | |
7867 | ||
472fa5ee | 7868 | |
c0c3707f CB |
7869 | |
7870 | ||
7871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 | |
7872 | $as_echo_n "checking whether realpath works... " >&6; } | |
7873 | if ${gl_cv_func_realpath_works+:} false; then : | |
5e8754f9 SDJ |
7874 | $as_echo_n "(cached) " >&6 |
7875 | else | |
c0c3707f | 7876 | |
9c9d63b1 | 7877 | rm -rf conftest.a conftest.d |
c0c3707f CB |
7878 | touch conftest.a |
7879 | mkdir conftest.d | |
7880 | if test "$cross_compiling" = yes; then : | |
7881 | case "$host_os" in | |
7882 | # Guess yes on glibc systems. | |
7883 | *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; | |
7884 | # Guess yes on musl systems. | |
7885 | *-musl*) gl_cv_func_realpath_works="guessing yes" ;; | |
7886 | # Guess no on native Windows. | |
7887 | mingw*) gl_cv_func_realpath_works="guessing no" ;; | |
7888 | # If we don't know, obey --enable-cross-guesses. | |
7889 | *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;; | |
7890 | esac | |
7891 | ||
5e8754f9 SDJ |
7892 | else |
7893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7894 | /* end confdefs.h. */ | |
c0c3707f CB |
7895 | |
7896 | ||
7897 | ||
7898 | #include <stdlib.h> | |
7899 | #if defined __MACH__ && defined __APPLE__ | |
7900 | /* Avoid a crash on Mac OS X. */ | |
7901 | #include <mach/mach.h> | |
7902 | #include <mach/mach_error.h> | |
7903 | #include <mach/thread_status.h> | |
7904 | #include <mach/exception.h> | |
7905 | #include <mach/task.h> | |
7906 | #include <pthread.h> | |
7907 | /* The exception port on which our thread listens. */ | |
7908 | static mach_port_t our_exception_port; | |
7909 | /* The main function of the thread listening for exceptions of type | |
7910 | EXC_BAD_ACCESS. */ | |
7911 | static void * | |
7912 | mach_exception_thread (void *arg) | |
5e8754f9 | 7913 | { |
c0c3707f CB |
7914 | /* Buffer for a message to be received. */ |
7915 | struct { | |
7916 | mach_msg_header_t head; | |
7917 | mach_msg_body_t msgh_body; | |
7918 | char data[1024]; | |
7919 | } msg; | |
7920 | mach_msg_return_t retval; | |
7921 | /* Wait for a message on the exception port. */ | |
7922 | retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), | |
7923 | our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | |
7924 | if (retval != MACH_MSG_SUCCESS) | |
7925 | abort (); | |
7926 | exit (1); | |
7927 | } | |
7928 | static void | |
7929 | nocrash_init (void) | |
7930 | { | |
7931 | mach_port_t self = mach_task_self (); | |
7932 | /* Allocate a port on which the thread shall listen for exceptions. */ | |
7933 | if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) | |
7934 | == KERN_SUCCESS) { | |
7935 | /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ | |
7936 | if (mach_port_insert_right (self, our_exception_port, our_exception_port, | |
7937 | MACH_MSG_TYPE_MAKE_SEND) | |
7938 | == KERN_SUCCESS) { | |
7939 | /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting | |
7940 | for us. */ | |
7941 | exception_mask_t mask = EXC_MASK_BAD_ACCESS; | |
7942 | /* Create the thread listening on the exception port. */ | |
7943 | pthread_attr_t attr; | |
7944 | pthread_t thread; | |
7945 | if (pthread_attr_init (&attr) == 0 | |
7946 | && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 | |
7947 | && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { | |
7948 | pthread_attr_destroy (&attr); | |
7949 | /* Replace the exception port info for these exceptions with our own. | |
7950 | Note that we replace the exception port for the entire task, not only | |
7951 | for a particular thread. This has the effect that when our exception | |
7952 | port gets the message, the thread specific exception port has already | |
7953 | been asked, and we don't need to bother about it. | |
7954 | See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ | |
7955 | task_set_exception_ports (self, mask, our_exception_port, | |
7956 | EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); | |
7957 | } | |
7958 | } | |
7959 | } | |
7960 | } | |
7961 | #elif defined _WIN32 && ! defined __CYGWIN__ | |
7962 | /* Avoid a crash on native Windows. */ | |
7963 | #define WIN32_LEAN_AND_MEAN | |
7964 | #include <windows.h> | |
7965 | #include <winerror.h> | |
7966 | static LONG WINAPI | |
7967 | exception_filter (EXCEPTION_POINTERS *ExceptionInfo) | |
7968 | { | |
7969 | switch (ExceptionInfo->ExceptionRecord->ExceptionCode) | |
7970 | { | |
7971 | case EXCEPTION_ACCESS_VIOLATION: | |
7972 | case EXCEPTION_IN_PAGE_ERROR: | |
7973 | case EXCEPTION_STACK_OVERFLOW: | |
7974 | case EXCEPTION_GUARD_PAGE: | |
7975 | case EXCEPTION_PRIV_INSTRUCTION: | |
7976 | case EXCEPTION_ILLEGAL_INSTRUCTION: | |
7977 | case EXCEPTION_DATATYPE_MISALIGNMENT: | |
7978 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: | |
7979 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: | |
7980 | exit (1); | |
7981 | } | |
7982 | return EXCEPTION_CONTINUE_SEARCH; | |
7983 | } | |
7984 | static void | |
7985 | nocrash_init (void) | |
7986 | { | |
7987 | SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); | |
7988 | } | |
7989 | #else | |
7990 | /* Avoid a crash on POSIX systems. */ | |
7991 | #include <signal.h> | |
7992 | #include <unistd.h> | |
7993 | /* A POSIX signal handler. */ | |
7994 | static void | |
7995 | exception_handler (int sig) | |
7996 | { | |
7997 | _exit (1); | |
7998 | } | |
7999 | static void | |
8000 | nocrash_init (void) | |
8001 | { | |
8002 | #ifdef SIGSEGV | |
8003 | signal (SIGSEGV, exception_handler); | |
8004 | #endif | |
8005 | #ifdef SIGBUS | |
8006 | signal (SIGBUS, exception_handler); | |
8007 | #endif | |
5e8754f9 | 8008 | } |
c0c3707f CB |
8009 | #endif |
8010 | ||
8011 | #include <stdlib.h> | |
8012 | #include <string.h> | |
472fa5ee | 8013 | |
5e8754f9 | 8014 | int |
c0c3707f | 8015 | main () |
5e8754f9 | 8016 | { |
c0c3707f CB |
8017 | |
8018 | int result = 0; | |
8019 | { | |
8020 | char *name = realpath ("conftest.a", NULL); | |
8021 | if (!(name && *name == '/')) | |
8022 | result |= 1; | |
8023 | free (name); | |
8024 | } | |
8025 | { | |
8026 | char *name = realpath ("conftest.b/../conftest.a", NULL); | |
8027 | if (name != NULL) | |
8028 | result |= 2; | |
8029 | free (name); | |
8030 | } | |
8031 | { | |
8032 | char *name = realpath ("conftest.a/", NULL); | |
8033 | if (name != NULL) | |
8034 | result |= 4; | |
8035 | free (name); | |
8036 | } | |
8037 | { | |
8038 | char *name1 = realpath (".", NULL); | |
8039 | char *name2 = realpath ("conftest.d//./..", NULL); | |
8040 | if (! name1 || ! name2 || strcmp (name1, name2)) | |
8041 | result |= 8; | |
8042 | free (name1); | |
8043 | free (name2); | |
8044 | } | |
8045 | return result; | |
8046 | ||
8047 | ; | |
8048 | return 0; | |
5e8754f9 | 8049 | } |
c0c3707f | 8050 | |
5e8754f9 SDJ |
8051 | _ACEOF |
8052 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 8053 | gl_cv_func_realpath_works=yes |
5e8754f9 | 8054 | else |
c0c3707f | 8055 | gl_cv_func_realpath_works=no |
5e8754f9 SDJ |
8056 | fi |
8057 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8058 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8059 | fi | |
472fa5ee | 8060 | |
c0c3707f | 8061 | rm -rf conftest.a conftest.d |
98399780 | 8062 | |
5e8754f9 | 8063 | fi |
c0c3707f CB |
8064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 |
8065 | $as_echo "$gl_cv_func_realpath_works" >&6; } | |
8066 | case "$gl_cv_func_realpath_works" in | |
8067 | *yes) | |
98399780 | 8068 | |
c0c3707f | 8069 | $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h |
98399780 | 8070 | |
c0c3707f CB |
8071 | ;; |
8072 | esac | |
725e2999 JB |
8073 | |
8074 | ||
725e2999 | 8075 | |
725e2999 | 8076 | |
725e2999 JB |
8077 | |
8078 | ||
8079 | ||
8080 | ||
8081 | ||
9c9d63b1 PM |
8082 | case "$host_os" in |
8083 | mingw*) ;; | |
8084 | *) for ac_func in getcwd | |
8085 | do : | |
8086 | ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" | |
8087 | if test "x$ac_cv_func_getcwd" = xyes; then : | |
8088 | cat >>confdefs.h <<_ACEOF | |
8089 | #define HAVE_GETCWD 1 | |
8090 | _ACEOF | |
8091 | ||
8092 | fi | |
8093 | done | |
8094 | ;; | |
8095 | esac | |
8096 | ||
8097 | ||
8098 | ||
8099 | ||
725e2999 JB |
8100 | |
8101 | ||
c0c3707f CB |
8102 | GNULIB_ACCESS=0; |
8103 | GNULIB_CHDIR=0; | |
8104 | GNULIB_CHOWN=0; | |
8105 | GNULIB_CLOSE=0; | |
8106 | GNULIB_COPY_FILE_RANGE=0; | |
8107 | GNULIB_DUP=0; | |
8108 | GNULIB_DUP2=0; | |
8109 | GNULIB_DUP3=0; | |
8110 | GNULIB_ENVIRON=0; | |
8111 | GNULIB_EUIDACCESS=0; | |
9c9d63b1 PM |
8112 | GNULIB_EXECL=0; |
8113 | GNULIB_EXECLE=0; | |
8114 | GNULIB_EXECLP=0; | |
8115 | GNULIB_EXECV=0; | |
8116 | GNULIB_EXECVE=0; | |
8117 | GNULIB_EXECVP=0; | |
8118 | GNULIB_EXECVPE=0; | |
c0c3707f CB |
8119 | GNULIB_FACCESSAT=0; |
8120 | GNULIB_FCHDIR=0; | |
8121 | GNULIB_FCHOWNAT=0; | |
8122 | GNULIB_FDATASYNC=0; | |
8123 | GNULIB_FSYNC=0; | |
8124 | GNULIB_FTRUNCATE=0; | |
8125 | GNULIB_GETCWD=0; | |
8126 | GNULIB_GETDOMAINNAME=0; | |
8127 | GNULIB_GETDTABLESIZE=0; | |
698be2d8 | 8128 | GNULIB_GETENTROPY=0; |
c0c3707f CB |
8129 | GNULIB_GETGROUPS=0; |
8130 | GNULIB_GETHOSTNAME=0; | |
8131 | GNULIB_GETLOGIN=0; | |
8132 | GNULIB_GETLOGIN_R=0; | |
5df4cba6 | 8133 | GNULIB_GETOPT_POSIX=0; |
c0c3707f CB |
8134 | GNULIB_GETPAGESIZE=0; |
8135 | GNULIB_GETPASS=0; | |
8136 | GNULIB_GETUSERSHELL=0; | |
8137 | GNULIB_GROUP_MEMBER=0; | |
8138 | GNULIB_ISATTY=0; | |
8139 | GNULIB_LCHOWN=0; | |
8140 | GNULIB_LINK=0; | |
8141 | GNULIB_LINKAT=0; | |
8142 | GNULIB_LSEEK=0; | |
8143 | GNULIB_PIPE=0; | |
8144 | GNULIB_PIPE2=0; | |
8145 | GNULIB_PREAD=0; | |
8146 | GNULIB_PWRITE=0; | |
8147 | GNULIB_READ=0; | |
8148 | GNULIB_READLINK=0; | |
8149 | GNULIB_READLINKAT=0; | |
8150 | GNULIB_RMDIR=0; | |
8151 | GNULIB_SETHOSTNAME=0; | |
8152 | GNULIB_SLEEP=0; | |
8153 | GNULIB_SYMLINK=0; | |
8154 | GNULIB_SYMLINKAT=0; | |
8155 | GNULIB_TRUNCATE=0; | |
8156 | GNULIB_TTYNAME_R=0; | |
8157 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
8158 | GNULIB_UNISTD_H_SIGPIPE=0; | |
8159 | GNULIB_UNLINK=0; | |
8160 | GNULIB_UNLINKAT=0; | |
8161 | GNULIB_USLEEP=0; | |
8162 | GNULIB_WRITE=0; | |
9c9d63b1 PM |
8163 | GNULIB_MDA_ACCESS=1; |
8164 | GNULIB_MDA_CHDIR=1; | |
8165 | GNULIB_MDA_CLOSE=1; | |
8166 | GNULIB_MDA_DUP=1; | |
8167 | GNULIB_MDA_DUP2=1; | |
8168 | GNULIB_MDA_EXECL=1; | |
8169 | GNULIB_MDA_EXECLE=1; | |
8170 | GNULIB_MDA_EXECLP=1; | |
8171 | GNULIB_MDA_EXECV=1; | |
8172 | GNULIB_MDA_EXECVE=1; | |
8173 | GNULIB_MDA_EXECVP=1; | |
8174 | GNULIB_MDA_EXECVPE=1; | |
8175 | GNULIB_MDA_GETCWD=1; | |
8176 | GNULIB_MDA_GETPID=1; | |
8177 | GNULIB_MDA_ISATTY=1; | |
8178 | GNULIB_MDA_LSEEK=1; | |
8179 | GNULIB_MDA_READ=1; | |
8180 | GNULIB_MDA_RMDIR=1; | |
8181 | GNULIB_MDA_SWAB=1; | |
8182 | GNULIB_MDA_UNLINK=1; | |
8183 | GNULIB_MDA_WRITE=1; | |
c0c3707f CB |
8184 | HAVE_CHOWN=1; |
8185 | HAVE_COPY_FILE_RANGE=1; | |
c0c3707f CB |
8186 | HAVE_DUP3=1; |
8187 | HAVE_EUIDACCESS=1; | |
9c9d63b1 | 8188 | HAVE_EXECVPE=1; |
c0c3707f CB |
8189 | HAVE_FACCESSAT=1; |
8190 | HAVE_FCHDIR=1; | |
8191 | HAVE_FCHOWNAT=1; | |
8192 | HAVE_FDATASYNC=1; | |
8193 | HAVE_FSYNC=1; | |
8194 | HAVE_FTRUNCATE=1; | |
8195 | HAVE_GETDTABLESIZE=1; | |
698be2d8 | 8196 | HAVE_GETENTROPY=1; |
c0c3707f CB |
8197 | HAVE_GETGROUPS=1; |
8198 | HAVE_GETHOSTNAME=1; | |
8199 | HAVE_GETLOGIN=1; | |
8200 | HAVE_GETPAGESIZE=1; | |
8201 | HAVE_GETPASS=1; | |
8202 | HAVE_GROUP_MEMBER=1; | |
8203 | HAVE_LCHOWN=1; | |
8204 | HAVE_LINK=1; | |
8205 | HAVE_LINKAT=1; | |
8206 | HAVE_PIPE=1; | |
8207 | HAVE_PIPE2=1; | |
8208 | HAVE_PREAD=1; | |
8209 | HAVE_PWRITE=1; | |
8210 | HAVE_READLINK=1; | |
8211 | HAVE_READLINKAT=1; | |
8212 | HAVE_SETHOSTNAME=1; | |
8213 | HAVE_SLEEP=1; | |
8214 | HAVE_SYMLINK=1; | |
8215 | HAVE_SYMLINKAT=1; | |
8216 | HAVE_UNLINKAT=1; | |
8217 | HAVE_USLEEP=1; | |
8218 | HAVE_DECL_ENVIRON=1; | |
9c9d63b1 | 8219 | HAVE_DECL_EXECVPE=1; |
c0c3707f CB |
8220 | HAVE_DECL_FCHDIR=1; |
8221 | HAVE_DECL_FDATASYNC=1; | |
8222 | HAVE_DECL_GETDOMAINNAME=1; | |
8223 | HAVE_DECL_GETLOGIN=1; | |
8224 | HAVE_DECL_GETLOGIN_R=1; | |
8225 | HAVE_DECL_GETPAGESIZE=1; | |
8226 | HAVE_DECL_GETUSERSHELL=1; | |
8227 | HAVE_DECL_SETHOSTNAME=1; | |
8228 | HAVE_DECL_TRUNCATE=1; | |
8229 | HAVE_DECL_TTYNAME_R=1; | |
8230 | HAVE_OS_H=0; | |
8231 | HAVE_SYS_PARAM_H=0; | |
8232 | REPLACE_ACCESS=0; | |
8233 | REPLACE_CHOWN=0; | |
8234 | REPLACE_CLOSE=0; | |
8235 | REPLACE_DUP=0; | |
8236 | REPLACE_DUP2=0; | |
9c9d63b1 PM |
8237 | REPLACE_EXECL=0; |
8238 | REPLACE_EXECLE=0; | |
8239 | REPLACE_EXECLP=0; | |
8240 | REPLACE_EXECV=0; | |
8241 | REPLACE_EXECVE=0; | |
8242 | REPLACE_EXECVP=0; | |
8243 | REPLACE_EXECVPE=0; | |
c0c3707f CB |
8244 | REPLACE_FACCESSAT=0; |
8245 | REPLACE_FCHOWNAT=0; | |
8246 | REPLACE_FTRUNCATE=0; | |
8247 | REPLACE_GETCWD=0; | |
8248 | REPLACE_GETDOMAINNAME=0; | |
8249 | REPLACE_GETDTABLESIZE=0; | |
8250 | REPLACE_GETLOGIN_R=0; | |
8251 | REPLACE_GETGROUPS=0; | |
8252 | REPLACE_GETPAGESIZE=0; | |
8253 | REPLACE_GETPASS=0; | |
8254 | REPLACE_ISATTY=0; | |
8255 | REPLACE_LCHOWN=0; | |
8256 | REPLACE_LINK=0; | |
8257 | REPLACE_LINKAT=0; | |
8258 | REPLACE_LSEEK=0; | |
8259 | REPLACE_PREAD=0; | |
8260 | REPLACE_PWRITE=0; | |
8261 | REPLACE_READ=0; | |
8262 | REPLACE_READLINK=0; | |
8263 | REPLACE_READLINKAT=0; | |
8264 | REPLACE_RMDIR=0; | |
8265 | REPLACE_SLEEP=0; | |
8266 | REPLACE_SYMLINK=0; | |
8267 | REPLACE_SYMLINKAT=0; | |
8268 | REPLACE_TRUNCATE=0; | |
8269 | REPLACE_TTYNAME_R=0; | |
8270 | REPLACE_UNLINK=0; | |
8271 | REPLACE_UNLINKAT=0; | |
8272 | REPLACE_USLEEP=0; | |
8273 | REPLACE_WRITE=0; | |
698be2d8 | 8274 | UNISTD_H_HAVE_SYS_RANDOM_H=0; |
c0c3707f CB |
8275 | UNISTD_H_HAVE_WINSOCK2_H=0; |
8276 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
725e2999 | 8277 | |
725e2999 | 8278 | |
725e2999 JB |
8279 | |
8280 | ||
8281 | ||
725e2999 | 8282 | |
725e2999 | 8283 | |
725e2999 JB |
8284 | |
8285 | ||
c0c3707f CB |
8286 | |
8287 | ||
8288 | if test $ac_cv_func__set_invalid_parameter_handler = yes; then | |
8289 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 | |
8290 | ||
8291 | $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h | |
8292 | ||
725e2999 | 8293 | else |
c0c3707f | 8294 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 |
725e2999 JB |
8295 | fi |
8296 | ||
8297 | ||
8298 | ||
8299 | ||
8300 | ||
c0c3707f CB |
8301 | GNULIB_OPENDIR=0; |
8302 | GNULIB_READDIR=0; | |
8303 | GNULIB_REWINDDIR=0; | |
8304 | GNULIB_CLOSEDIR=0; | |
8305 | GNULIB_DIRFD=0; | |
8306 | GNULIB_FDOPENDIR=0; | |
8307 | GNULIB_SCANDIR=0; | |
8308 | GNULIB_ALPHASORT=0; | |
8309 | HAVE_OPENDIR=1; | |
8310 | HAVE_READDIR=1; | |
8311 | HAVE_REWINDDIR=1; | |
8312 | HAVE_CLOSEDIR=1; | |
8313 | HAVE_DECL_DIRFD=1; | |
8314 | HAVE_DECL_FDOPENDIR=1; | |
8315 | HAVE_FDOPENDIR=1; | |
8316 | HAVE_SCANDIR=1; | |
8317 | HAVE_ALPHASORT=1; | |
8318 | REPLACE_OPENDIR=0; | |
8319 | REPLACE_CLOSEDIR=0; | |
8320 | REPLACE_DIRFD=0; | |
8321 | REPLACE_FDOPENDIR=0; | |
725e2999 JB |
8322 | |
8323 | ||
698be2d8 CB |
8324 | GNULIB_ISBLANK=0; |
8325 | HAVE_ISBLANK=1; | |
8326 | ||
8327 | ||
725e2999 | 8328 | |
9c9d63b1 PM |
8329 | gl_mda_defines=' |
8330 | #if defined _WIN32 && !defined __CYGWIN__ | |
8331 | #define access _access | |
8332 | #define chdir _chdir | |
8333 | #define chmod _chmod | |
8334 | #define close _close | |
8335 | #define creat _creat | |
8336 | #define dup _dup | |
8337 | #define dup2 _dup2 | |
8338 | #define ecvt _ecvt | |
8339 | #define execl _execl | |
8340 | #define execle _execle | |
8341 | #define execlp _execlp | |
8342 | #define execv _execv | |
8343 | #define execve _execve | |
8344 | #define execvp _execvp | |
8345 | #define execvpe _execvpe | |
8346 | #define fcloseall _fcloseall | |
8347 | #define fcvt _fcvt | |
8348 | #define fdopen _fdopen | |
8349 | #define fileno _fileno | |
8350 | #define gcvt _gcvt | |
8351 | #define getcwd _getcwd | |
8352 | #define getpid _getpid | |
8353 | #define getw _getw | |
8354 | #define isatty _isatty | |
8355 | #define j0 _j0 | |
8356 | #define j1 _j1 | |
8357 | #define jn _jn | |
8358 | #define lfind _lfind | |
8359 | #define lsearch _lsearch | |
8360 | #define lseek _lseek | |
8361 | #define memccpy _memccpy | |
8362 | #define mkdir _mkdir | |
8363 | #define mktemp _mktemp | |
8364 | #define open _open | |
8365 | #define putenv _putenv | |
8366 | #define putw _putw | |
8367 | #define read _read | |
8368 | #define rmdir _rmdir | |
8369 | #define strdup _strdup | |
8370 | #define swab _swab | |
8371 | #define tempnam _tempnam | |
8372 | #define tzset _tzset | |
8373 | #define umask _umask | |
8374 | #define unlink _unlink | |
8375 | #define utime _utime | |
8376 | #define wcsdup _wcsdup | |
8377 | #define write _write | |
8378 | #define y0 _y0 | |
8379 | #define y1 _y1 | |
8380 | #define yn _yn | |
8381 | #endif | |
8382 | ' | |
8383 | ||
725e2999 | 8384 | |
725e2999 JB |
8385 | |
8386 | ||
8387 | ||
8388 | ||
725e2999 JB |
8389 | |
8390 | ||
c0c3707f CB |
8391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 |
8392 | $as_echo_n "checking if environ is properly declared... " >&6; } | |
8393 | if ${gt_cv_var_environ_declaration+:} false; then : | |
725e2999 JB |
8394 | $as_echo_n "(cached) " >&6 |
8395 | else | |
c0c3707f CB |
8396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8397 | /* end confdefs.h. */ | |
8398 | #if HAVE_UNISTD_H | |
8399 | #include <unistd.h> | |
8400 | #endif | |
8401 | /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ | |
8402 | #include <stdlib.h> | |
725e2999 | 8403 | |
c0c3707f CB |
8404 | extern struct { int foo; } environ; |
8405 | int | |
8406 | main () | |
8407 | { | |
8408 | environ.foo = 1; | |
8409 | ; | |
8410 | return 0; | |
8411 | } | |
8412 | _ACEOF | |
8413 | if ac_fn_c_try_compile "$LINENO"; then : | |
8414 | gt_cv_var_environ_declaration=no | |
8415 | else | |
8416 | gt_cv_var_environ_declaration=yes | |
725e2999 | 8417 | fi |
c0c3707f CB |
8418 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8419 | fi | |
8420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 | |
8421 | $as_echo "$gt_cv_var_environ_declaration" >&6; } | |
8422 | if test $gt_cv_var_environ_declaration = yes; then | |
8423 | ||
8424 | $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |
725e2999 | 8425 | |
725e2999 | 8426 | fi |
725e2999 JB |
8427 | |
8428 | ||
c0c3707f CB |
8429 | if test $gt_cv_var_environ_declaration != yes; then |
8430 | HAVE_DECL_ENVIRON=0 | |
8431 | fi | |
6ec2e0f5 SDJ |
8432 | |
8433 | ||
8434 | ||
c0c3707f CB |
8435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 |
8436 | $as_echo_n "checking for complete errno.h... " >&6; } | |
8437 | if ${gl_cv_header_errno_h_complete+:} false; then : | |
8438 | $as_echo_n "(cached) " >&6 | |
8439 | else | |
6ec2e0f5 | 8440 | |
c0c3707f CB |
8441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8442 | /* end confdefs.h. */ | |
472fa5ee | 8443 | |
c0c3707f CB |
8444 | #include <errno.h> |
8445 | #if !defined ETXTBSY | |
8446 | booboo | |
8447 | #endif | |
8448 | #if !defined ENOMSG | |
8449 | booboo | |
8450 | #endif | |
8451 | #if !defined EIDRM | |
8452 | booboo | |
8453 | #endif | |
8454 | #if !defined ENOLINK | |
8455 | booboo | |
8456 | #endif | |
8457 | #if !defined EPROTO | |
8458 | booboo | |
8459 | #endif | |
8460 | #if !defined EMULTIHOP | |
8461 | booboo | |
8462 | #endif | |
8463 | #if !defined EBADMSG | |
8464 | booboo | |
8465 | #endif | |
8466 | #if !defined EOVERFLOW | |
8467 | booboo | |
8468 | #endif | |
8469 | #if !defined ENOTSUP | |
8470 | booboo | |
8471 | #endif | |
8472 | #if !defined ENETRESET | |
8473 | booboo | |
8474 | #endif | |
8475 | #if !defined ECONNABORTED | |
8476 | booboo | |
8477 | #endif | |
8478 | #if !defined ESTALE | |
8479 | booboo | |
8480 | #endif | |
8481 | #if !defined EDQUOT | |
8482 | booboo | |
8483 | #endif | |
8484 | #if !defined ECANCELED | |
8485 | booboo | |
8486 | #endif | |
8487 | #if !defined EOWNERDEAD | |
8488 | booboo | |
8489 | #endif | |
8490 | #if !defined ENOTRECOVERABLE | |
8491 | booboo | |
8492 | #endif | |
8493 | #if !defined EILSEQ | |
8494 | booboo | |
8495 | #endif | |
472fa5ee | 8496 | |
c0c3707f CB |
8497 | _ACEOF |
8498 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8499 | $EGREP "booboo" >/dev/null 2>&1; then : | |
8500 | gl_cv_header_errno_h_complete=no | |
8501 | else | |
8502 | gl_cv_header_errno_h_complete=yes | |
5e8754f9 | 8503 | fi |
c0c3707f | 8504 | rm -f conftest* |
472fa5ee SM |
8505 | |
8506 | ||
c0c3707f CB |
8507 | fi |
8508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 | |
8509 | $as_echo "$gl_cv_header_errno_h_complete" >&6; } | |
8510 | if test $gl_cv_header_errno_h_complete = yes; then | |
8511 | ERRNO_H='' | |
8512 | else | |
472fa5ee SM |
8513 | |
8514 | ||
8515 | ||
8516 | ||
8517 | ||
472fa5ee SM |
8518 | |
8519 | ||
8520 | ||
c0c3707f CB |
8521 | if test $gl_cv_have_include_next = yes; then |
8522 | gl_cv_next_errno_h='<'errno.h'>' | |
8523 | else | |
8524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5 | |
8525 | $as_echo_n "checking absolute name of <errno.h>... " >&6; } | |
8526 | if ${gl_cv_next_errno_h+:} false; then : | |
5e8754f9 SDJ |
8527 | $as_echo_n "(cached) " >&6 |
8528 | else | |
6ec2e0f5 | 8529 | |
6ec2e0f5 | 8530 | |
6ec2e0f5 | 8531 | |
c0c3707f CB |
8532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8533 | /* end confdefs.h. */ | |
8534 | #include <errno.h> | |
8535 | _ACEOF | |
8536 | case "$host_os" in | |
8537 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
8538 | *) gl_absname_cpp="$ac_cpp" ;; | |
8539 | esac | |
6ec2e0f5 | 8540 | |
c0c3707f CB |
8541 | case "$host_os" in |
8542 | mingw*) | |
8543 | gl_dirsep_regex='[/\\]' | |
8544 | ;; | |
8545 | *) | |
8546 | gl_dirsep_regex='\/' | |
8547 | ;; | |
8548 | esac | |
8549 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
8550 | gl_header_literal_regex=`echo 'errno.h' \ | |
8551 | | sed -e "$gl_make_literal_regex_sed"` | |
8552 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
8553 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
8554 | s|^/[^/]|//&| | |
8555 | p | |
8556 | q | |
8557 | }' | |
6ec2e0f5 | 8558 | |
c0c3707f CB |
8559 | gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
8560 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 8561 | |
c0c3707f CB |
8562 | gl_header=$gl_cv_absolute_errno_h |
8563 | gl_cv_next_errno_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
8564 | |
8565 | ||
c0c3707f CB |
8566 | fi |
8567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 | |
8568 | $as_echo "$gl_cv_next_errno_h" >&6; } | |
8569 | fi | |
8570 | NEXT_ERRNO_H=$gl_cv_next_errno_h | |
6ec2e0f5 | 8571 | |
c0c3707f CB |
8572 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
8573 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
8574 | gl_next_as_first_directive='<'errno.h'>' | |
8575 | else | |
8576 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
8577 | gl_next_as_first_directive=$gl_cv_next_errno_h | |
8578 | fi | |
8579 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive | |
6ec2e0f5 | 8580 | |
472fa5ee SM |
8581 | |
8582 | ||
8583 | ||
c0c3707f CB |
8584 | ERRNO_H='errno.h' |
8585 | fi | |
472fa5ee | 8586 | |
c0c3707f CB |
8587 | if test -n "$ERRNO_H"; then |
8588 | GL_GENERATE_ERRNO_H_TRUE= | |
8589 | GL_GENERATE_ERRNO_H_FALSE='#' | |
5e8754f9 | 8590 | else |
c0c3707f CB |
8591 | GL_GENERATE_ERRNO_H_TRUE='#' |
8592 | GL_GENERATE_ERRNO_H_FALSE= | |
8593 | fi | |
472fa5ee SM |
8594 | |
8595 | ||
c0c3707f CB |
8596 | if test -n "$ERRNO_H"; then |
8597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 | |
8598 | $as_echo_n "checking for EMULTIHOP value... " >&6; } | |
8599 | if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : | |
8600 | $as_echo_n "(cached) " >&6 | |
5e8754f9 | 8601 | else |
e26b6bb0 | 8602 | |
c0c3707f CB |
8603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8604 | /* end confdefs.h. */ | |
e26b6bb0 | 8605 | |
c0c3707f CB |
8606 | #include <errno.h> |
8607 | #ifdef EMULTIHOP | |
8608 | yes | |
88b48903 | 8609 | #endif |
88b48903 | 8610 | |
c0c3707f CB |
8611 | _ACEOF |
8612 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8613 | $EGREP "yes" >/dev/null 2>&1; then : | |
8614 | gl_cv_header_errno_h_EMULTIHOP=yes | |
8615 | else | |
8616 | gl_cv_header_errno_h_EMULTIHOP=no | |
8617 | fi | |
8618 | rm -f conftest* | |
88b48903 | 8619 | |
c0c3707f CB |
8620 | if test $gl_cv_header_errno_h_EMULTIHOP = no; then |
8621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8622 | /* end confdefs.h. */ | |
88b48903 | 8623 | |
c0c3707f CB |
8624 | #define _XOPEN_SOURCE_EXTENDED 1 |
8625 | #include <errno.h> | |
8626 | #ifdef EMULTIHOP | |
8627 | yes | |
8628 | #endif | |
88b48903 WN |
8629 | |
8630 | _ACEOF | |
c0c3707f CB |
8631 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8632 | $EGREP "yes" >/dev/null 2>&1; then : | |
8633 | gl_cv_header_errno_h_EMULTIHOP=hidden | |
88b48903 | 8634 | fi |
c0c3707f | 8635 | rm -f conftest* |
88b48903 | 8636 | |
c0c3707f CB |
8637 | if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then |
8638 | if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " | |
8639 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8640 | #include <errno.h> | |
8641 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8642 | #include <stdio.h> | |
8643 | #include <stdlib.h> | |
8644 | "; then : | |
88b48903 WN |
8645 | |
8646 | fi | |
88b48903 | 8647 | |
c0c3707f CB |
8648 | fi |
8649 | fi | |
88b48903 | 8650 | |
c0c3707f CB |
8651 | fi |
8652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 | |
8653 | $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } | |
8654 | case $gl_cv_header_errno_h_EMULTIHOP in | |
8655 | yes | no) | |
8656 | EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= | |
8657 | ;; | |
8658 | *) | |
8659 | EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" | |
8660 | ;; | |
8661 | esac | |
88b48903 | 8662 | |
e26b6bb0 | 8663 | |
c0c3707f | 8664 | fi |
e26b6bb0 | 8665 | |
3d99e817 | 8666 | |
c0c3707f CB |
8667 | if test -n "$ERRNO_H"; then |
8668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 | |
8669 | $as_echo_n "checking for ENOLINK value... " >&6; } | |
8670 | if ${gl_cv_header_errno_h_ENOLINK+:} false; then : | |
8671 | $as_echo_n "(cached) " >&6 | |
8672 | else | |
472fa5ee | 8673 | |
c0c3707f CB |
8674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8675 | /* end confdefs.h. */ | |
472fa5ee | 8676 | |
c0c3707f CB |
8677 | #include <errno.h> |
8678 | #ifdef ENOLINK | |
8679 | yes | |
8680 | #endif | |
472fa5ee | 8681 | |
c0c3707f CB |
8682 | _ACEOF |
8683 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8684 | $EGREP "yes" >/dev/null 2>&1; then : | |
8685 | gl_cv_header_errno_h_ENOLINK=yes | |
8686 | else | |
8687 | gl_cv_header_errno_h_ENOLINK=no | |
8688 | fi | |
8689 | rm -f conftest* | |
472fa5ee | 8690 | |
c0c3707f CB |
8691 | if test $gl_cv_header_errno_h_ENOLINK = no; then |
8692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8693 | /* end confdefs.h. */ | |
3d99e817 | 8694 | |
c0c3707f CB |
8695 | #define _XOPEN_SOURCE_EXTENDED 1 |
8696 | #include <errno.h> | |
8697 | #ifdef ENOLINK | |
8698 | yes | |
8699 | #endif | |
3d99e817 | 8700 | |
c0c3707f CB |
8701 | _ACEOF |
8702 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8703 | $EGREP "yes" >/dev/null 2>&1; then : | |
8704 | gl_cv_header_errno_h_ENOLINK=hidden | |
8705 | fi | |
8706 | rm -f conftest* | |
3d99e817 | 8707 | |
c0c3707f CB |
8708 | if test $gl_cv_header_errno_h_ENOLINK = hidden; then |
8709 | if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " | |
8710 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8711 | #include <errno.h> | |
8712 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8713 | #include <stdio.h> | |
8714 | #include <stdlib.h> | |
8715 | "; then : | |
3d99e817 | 8716 | |
c0c3707f | 8717 | fi |
3d99e817 | 8718 | |
c0c3707f CB |
8719 | fi |
8720 | fi | |
3d99e817 | 8721 | |
c0c3707f CB |
8722 | fi |
8723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 | |
8724 | $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } | |
8725 | case $gl_cv_header_errno_h_ENOLINK in | |
8726 | yes | no) | |
8727 | ENOLINK_HIDDEN=0; ENOLINK_VALUE= | |
8728 | ;; | |
8729 | *) | |
8730 | ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" | |
8731 | ;; | |
8732 | esac | |
18848e28 | 8733 | |
18848e28 | 8734 | |
c0c3707f | 8735 | fi |
18848e28 | 8736 | |
18848e28 | 8737 | |
c0c3707f CB |
8738 | if test -n "$ERRNO_H"; then |
8739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 | |
8740 | $as_echo_n "checking for EOVERFLOW value... " >&6; } | |
8741 | if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : | |
8742 | $as_echo_n "(cached) " >&6 | |
8743 | else | |
18848e28 | 8744 | |
c0c3707f CB |
8745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8746 | /* end confdefs.h. */ | |
18848e28 | 8747 | |
c0c3707f CB |
8748 | #include <errno.h> |
8749 | #ifdef EOVERFLOW | |
8750 | yes | |
8751 | #endif | |
18848e28 | 8752 | |
c0c3707f CB |
8753 | _ACEOF |
8754 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8755 | $EGREP "yes" >/dev/null 2>&1; then : | |
8756 | gl_cv_header_errno_h_EOVERFLOW=yes | |
8757 | else | |
8758 | gl_cv_header_errno_h_EOVERFLOW=no | |
8759 | fi | |
8760 | rm -f conftest* | |
18848e28 | 8761 | |
c0c3707f CB |
8762 | if test $gl_cv_header_errno_h_EOVERFLOW = no; then |
8763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8764 | /* end confdefs.h. */ | |
18848e28 | 8765 | |
c0c3707f CB |
8766 | #define _XOPEN_SOURCE_EXTENDED 1 |
8767 | #include <errno.h> | |
8768 | #ifdef EOVERFLOW | |
8769 | yes | |
8770 | #endif | |
18848e28 | 8771 | |
c0c3707f CB |
8772 | _ACEOF |
8773 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8774 | $EGREP "yes" >/dev/null 2>&1; then : | |
8775 | gl_cv_header_errno_h_EOVERFLOW=hidden | |
8776 | fi | |
8777 | rm -f conftest* | |
18848e28 | 8778 | |
c0c3707f CB |
8779 | if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then |
8780 | if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " | |
8781 | #define _XOPEN_SOURCE_EXTENDED 1 | |
8782 | #include <errno.h> | |
8783 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
8784 | #include <stdio.h> | |
8785 | #include <stdlib.h> | |
8786 | "; then : | |
18848e28 | 8787 | |
c0c3707f | 8788 | fi |
18848e28 | 8789 | |
c0c3707f CB |
8790 | fi |
8791 | fi | |
18848e28 | 8792 | |
c0c3707f CB |
8793 | fi |
8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 | |
8795 | $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } | |
8796 | case $gl_cv_header_errno_h_EOVERFLOW in | |
8797 | yes | no) | |
8798 | EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= | |
8799 | ;; | |
8800 | *) | |
8801 | EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" | |
8802 | ;; | |
8803 | esac | |
4a626d0a PA |
8804 | |
8805 | ||
c0c3707f | 8806 | fi |
18848e28 | 8807 | |
4a626d0a | 8808 | |
c0c3707f CB |
8809 | ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" |
8810 | if test "x$ac_cv_have_decl_strerror_r" = xyes; then : | |
8811 | ac_have_decl=1 | |
8812 | else | |
8813 | ac_have_decl=0 | |
8814 | fi | |
4a626d0a | 8815 | |
c0c3707f CB |
8816 | cat >>confdefs.h <<_ACEOF |
8817 | #define HAVE_DECL_STRERROR_R $ac_have_decl | |
8818 | _ACEOF | |
4a626d0a | 8819 | |
c0c3707f CB |
8820 | for ac_func in strerror_r |
8821 | do : | |
8822 | ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" | |
8823 | if test "x$ac_cv_func_strerror_r" = xyes; then : | |
8824 | cat >>confdefs.h <<_ACEOF | |
8825 | #define HAVE_STRERROR_R 1 | |
8826 | _ACEOF | |
4a626d0a | 8827 | |
c0c3707f CB |
8828 | fi |
8829 | done | |
18848e28 | 8830 | |
c0c3707f CB |
8831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 |
8832 | $as_echo_n "checking whether strerror_r returns char *... " >&6; } | |
8833 | if ${ac_cv_func_strerror_r_char_p+:} false; then : | |
8834 | $as_echo_n "(cached) " >&6 | |
8835 | else | |
18848e28 | 8836 | |
c0c3707f CB |
8837 | ac_cv_func_strerror_r_char_p=no |
8838 | if test $ac_cv_have_decl_strerror_r = yes; then | |
8839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8840 | /* end confdefs.h. */ | |
8841 | $ac_includes_default | |
8842 | int | |
8843 | main () | |
8844 | { | |
18848e28 | 8845 | |
c0c3707f CB |
8846 | char buf[100]; |
8847 | char x = *strerror_r (0, buf, sizeof buf); | |
8848 | char *p = strerror_r (0, buf, sizeof buf); | |
8849 | return !p || x; | |
18848e28 | 8850 | |
c0c3707f CB |
8851 | ; |
8852 | return 0; | |
8853 | } | |
8854 | _ACEOF | |
8855 | if ac_fn_c_try_compile "$LINENO"; then : | |
8856 | ac_cv_func_strerror_r_char_p=yes | |
8857 | fi | |
8858 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8859 | else | |
8860 | # strerror_r is not declared. Choose between | |
8861 | # systems that have relatively inaccessible declarations for the | |
8862 | # function. BeOS and DEC UNIX 4.0 fall in this category, but the | |
8863 | # former has a strerror_r that returns char*, while the latter | |
8864 | # has a strerror_r that returns `int'. | |
8865 | # This test should segfault on the DEC system. | |
8866 | if test "$cross_compiling" = yes; then : | |
8867 | : | |
8868 | else | |
8869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8870 | /* end confdefs.h. */ | |
8871 | $ac_includes_default | |
8872 | extern char *strerror_r (); | |
8873 | int | |
8874 | main () | |
8875 | { | |
8876 | char buf[100]; | |
8877 | char x = *strerror_r (0, buf, sizeof buf); | |
8878 | return ! isalpha (x); | |
8879 | ; | |
8880 | return 0; | |
8881 | } | |
8882 | _ACEOF | |
8883 | if ac_fn_c_try_run "$LINENO"; then : | |
8884 | ac_cv_func_strerror_r_char_p=yes | |
8885 | fi | |
8886 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8887 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8888 | fi | |
18848e28 | 8889 | |
c0c3707f | 8890 | fi |
18848e28 | 8891 | |
c0c3707f CB |
8892 | fi |
8893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 | |
8894 | $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } | |
8895 | if test $ac_cv_func_strerror_r_char_p = yes; then | |
18848e28 | 8896 | |
c0c3707f | 8897 | $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h |
18848e28 | 8898 | |
c0c3707f | 8899 | fi |
18848e28 | 8900 | |
18848e28 | 8901 | |
18848e28 | 8902 | |
18848e28 | 8903 | |
c0c3707f CB |
8904 | ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" |
8905 | if test "x$ac_cv_have_decl_fchdir" = xyes; then : | |
8906 | ac_have_decl=1 | |
8907 | else | |
8908 | ac_have_decl=0 | |
8909 | fi | |
18848e28 | 8910 | |
c0c3707f CB |
8911 | cat >>confdefs.h <<_ACEOF |
8912 | #define HAVE_DECL_FCHDIR $ac_have_decl | |
8913 | _ACEOF | |
18848e28 | 8914 | |
18848e28 | 8915 | |
c0c3707f CB |
8916 | GNULIB_CREAT=0; |
8917 | GNULIB_FCNTL=0; | |
8918 | GNULIB_NONBLOCKING=0; | |
8919 | GNULIB_OPEN=0; | |
8920 | GNULIB_OPENAT=0; | |
9c9d63b1 PM |
8921 | GNULIB_MDA_CREAT=1; |
8922 | GNULIB_MDA_OPEN=1; | |
c0c3707f CB |
8923 | HAVE_FCNTL=1; |
8924 | HAVE_OPENAT=1; | |
8925 | REPLACE_CREAT=0; | |
8926 | REPLACE_FCNTL=0; | |
8927 | REPLACE_OPEN=0; | |
8928 | REPLACE_OPENAT=0; | |
18848e28 | 8929 | |
18848e28 | 8930 | |
18848e28 | 8931 | |
18848e28 GF |
8932 | |
8933 | ||
18848e28 GF |
8934 | |
8935 | ||
18848e28 | 8936 | |
18848e28 | 8937 | |
18848e28 | 8938 | |
c0c3707f CB |
8939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 |
8940 | $as_echo_n "checking for working fcntl.h... " >&6; } | |
8941 | if ${gl_cv_header_working_fcntl_h+:} false; then : | |
8942 | $as_echo_n "(cached) " >&6 | |
8943 | else | |
8944 | if test "$cross_compiling" = yes; then : | |
8945 | case "$host_os" in | |
8946 | # Guess 'no' on native Windows. | |
8947 | mingw*) gl_cv_header_working_fcntl_h='no' ;; | |
8948 | *) gl_cv_header_working_fcntl_h=cross-compiling ;; | |
8949 | esac | |
18848e28 | 8950 | |
c0c3707f CB |
8951 | else |
8952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8953 | /* end confdefs.h. */ | |
8954 | #include <sys/types.h> | |
8955 | #include <sys/stat.h> | |
8956 | #if HAVE_UNISTD_H | |
8957 | # include <unistd.h> | |
8958 | #else /* on Windows with MSVC */ | |
8959 | # include <io.h> | |
8960 | # include <stdlib.h> | |
8961 | # defined sleep(n) _sleep ((n) * 1000) | |
8962 | #endif | |
8963 | #include <fcntl.h> | |
9c9d63b1 PM |
8964 | |
8965 | ||
8966 | $gl_mda_defines | |
8967 | ||
c0c3707f CB |
8968 | #ifndef O_NOATIME |
8969 | #define O_NOATIME 0 | |
8970 | #endif | |
8971 | #ifndef O_NOFOLLOW | |
8972 | #define O_NOFOLLOW 0 | |
8973 | #endif | |
8974 | static int const constants[] = | |
8975 | { | |
8976 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, | |
8977 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY | |
8978 | }; | |
18848e28 | 8979 | |
c0c3707f CB |
8980 | int |
8981 | main () | |
8982 | { | |
18848e28 | 8983 | |
c0c3707f CB |
8984 | int result = !constants; |
8985 | #if HAVE_SYMLINK | |
8986 | { | |
8987 | static char const sym[] = "conftest.sym"; | |
8988 | if (symlink ("/dev/null", sym) != 0) | |
8989 | result |= 2; | |
8990 | else | |
8991 | { | |
8992 | int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); | |
8993 | if (fd >= 0) | |
8994 | { | |
8995 | close (fd); | |
8996 | result |= 4; | |
8997 | } | |
8998 | } | |
8999 | if (unlink (sym) != 0 || symlink (".", sym) != 0) | |
9000 | result |= 2; | |
9001 | else | |
9002 | { | |
9003 | int fd = open (sym, O_RDONLY | O_NOFOLLOW); | |
9004 | if (fd >= 0) | |
9005 | { | |
9006 | close (fd); | |
9007 | result |= 4; | |
9008 | } | |
9009 | } | |
9010 | unlink (sym); | |
9011 | } | |
9012 | #endif | |
9013 | { | |
9014 | static char const file[] = "confdefs.h"; | |
9015 | int fd = open (file, O_RDONLY | O_NOATIME); | |
9016 | if (fd < 0) | |
9017 | result |= 8; | |
9018 | else | |
9019 | { | |
9020 | struct stat st0; | |
9021 | if (fstat (fd, &st0) != 0) | |
9022 | result |= 16; | |
9023 | else | |
9024 | { | |
9025 | char c; | |
9026 | sleep (1); | |
9027 | if (read (fd, &c, 1) != 1) | |
9028 | result |= 24; | |
9029 | else | |
9030 | { | |
9031 | if (close (fd) != 0) | |
9032 | result |= 32; | |
9033 | else | |
9034 | { | |
9035 | struct stat st1; | |
9036 | if (stat (file, &st1) != 0) | |
9037 | result |= 40; | |
9038 | else | |
9039 | if (st0.st_atime != st1.st_atime) | |
9040 | result |= 64; | |
9041 | } | |
9042 | } | |
9043 | } | |
9044 | } | |
9045 | } | |
9046 | return result; | |
9047 | ; | |
9048 | return 0; | |
9049 | } | |
9050 | _ACEOF | |
9051 | if ac_fn_c_try_run "$LINENO"; then : | |
9052 | gl_cv_header_working_fcntl_h=yes | |
9053 | else | |
9054 | case $? in #( | |
9055 | 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( | |
9056 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( | |
9057 | 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( | |
9058 | *) gl_cv_header_working_fcntl_h='no';; | |
9059 | esac | |
9060 | fi | |
9061 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9062 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9063 | fi | |
18848e28 | 9064 | |
18848e28 | 9065 | |
c0c3707f CB |
9066 | fi |
9067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 | |
9068 | $as_echo "$gl_cv_header_working_fcntl_h" >&6; } | |
18848e28 | 9069 | |
c0c3707f CB |
9070 | case $gl_cv_header_working_fcntl_h in #( |
9071 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( | |
9072 | *) ac_val=1;; | |
9073 | esac | |
18848e28 | 9074 | |
c0c3707f CB |
9075 | cat >>confdefs.h <<_ACEOF |
9076 | #define HAVE_WORKING_O_NOATIME $ac_val | |
9077 | _ACEOF | |
18848e28 GF |
9078 | |
9079 | ||
c0c3707f CB |
9080 | case $gl_cv_header_working_fcntl_h in #( |
9081 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( | |
9082 | *) ac_val=1;; | |
9083 | esac | |
18848e28 | 9084 | |
c0c3707f CB |
9085 | cat >>confdefs.h <<_ACEOF |
9086 | #define HAVE_WORKING_O_NOFOLLOW $ac_val | |
9087 | _ACEOF | |
18848e28 | 9088 | |
63ce7108 | 9089 | |
9c9d63b1 PM |
9090 | |
9091 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default | |
9092 | " | |
c0c3707f | 9093 | if test "x$ac_cv_type_pid_t" = xyes; then : |
63ce7108 | 9094 | |
c0c3707f | 9095 | else |
9c9d63b1 PM |
9096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9097 | /* end confdefs.h. */ | |
9098 | ||
9099 | #if defined _WIN64 && !defined __CYGWIN__ | |
9100 | LLP64 | |
9101 | #endif | |
9102 | ||
9103 | int | |
9104 | main () | |
9105 | { | |
9106 | ||
9107 | ; | |
9108 | return 0; | |
9109 | } | |
9110 | ||
9111 | _ACEOF | |
9112 | if ac_fn_c_try_compile "$LINENO"; then : | |
9113 | gl_pid_type='int' | |
9114 | else | |
9115 | gl_pid_type='__int64' | |
9116 | fi | |
9117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
63ce7108 | 9118 | |
c0c3707f | 9119 | cat >>confdefs.h <<_ACEOF |
9c9d63b1 | 9120 | #define pid_t $gl_pid_type |
c0c3707f | 9121 | _ACEOF |
63ce7108 | 9122 | |
9c9d63b1 | 9123 | |
c0c3707f | 9124 | fi |
63ce7108 | 9125 | |
9c9d63b1 | 9126 | |
c0c3707f CB |
9127 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
9128 | if test "x$ac_cv_type_mode_t" = xyes; then : | |
63ce7108 | 9129 | |
c0c3707f | 9130 | else |
63ce7108 | 9131 | |
c0c3707f CB |
9132 | cat >>confdefs.h <<_ACEOF |
9133 | #define mode_t int | |
9134 | _ACEOF | |
63ce7108 | 9135 | |
c0c3707f | 9136 | fi |
63ce7108 | 9137 | |
472fa5ee SM |
9138 | |
9139 | ||
9140 | ||
32e2770e MF |
9141 | GNULIB_FFS=0; |
9142 | HAVE_FFS=1; | |
9143 | HAVE_STRCASECMP=1; | |
9144 | HAVE_DECL_STRNCASECMP=1; | |
9145 | ||
9146 | ||
472fa5ee SM |
9147 | |
9148 | ||
c0c3707f CB |
9149 | GNULIB_FNMATCH=0; |
9150 | HAVE_FNMATCH=1; | |
9151 | REPLACE_FNMATCH=0; | |
472fa5ee SM |
9152 | |
9153 | ||
9154 | ||
9155 | ||
9156 | ||
9157 | ||
472fa5ee SM |
9158 | |
9159 | ||
472fa5ee SM |
9160 | |
9161 | ||
9162 | ||
9163 | ||
9164 | ||
9165 | ||
9166 | ||
9167 | ||
7a6dbc2f | 9168 | if test $gl_cv_have_include_next = yes; then |
c0c3707f | 9169 | gl_cv_next_fnmatch_h='<'fnmatch.h'>' |
7a6dbc2f | 9170 | else |
c0c3707f CB |
9171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5 |
9172 | $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; } | |
9173 | if ${gl_cv_next_fnmatch_h+:} false; then : | |
7a6dbc2f SDJ |
9174 | $as_echo_n "(cached) " >&6 |
9175 | else | |
472fa5ee | 9176 | |
c0c3707f CB |
9177 | if test $ac_cv_header_fnmatch_h = yes; then |
9178 | ||
9179 | ||
472fa5ee SM |
9180 | |
9181 | ||
7a6dbc2f SDJ |
9182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9183 | /* end confdefs.h. */ | |
c0c3707f | 9184 | #include <fnmatch.h> |
7a6dbc2f SDJ |
9185 | _ACEOF |
9186 | case "$host_os" in | |
9187 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
9188 | *) gl_absname_cpp="$ac_cpp" ;; | |
9189 | esac | |
472fa5ee | 9190 | |
7a6dbc2f SDJ |
9191 | case "$host_os" in |
9192 | mingw*) | |
9193 | gl_dirsep_regex='[/\\]' | |
9194 | ;; | |
9195 | *) | |
9196 | gl_dirsep_regex='\/' | |
9197 | ;; | |
9198 | esac | |
9199 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 9200 | gl_header_literal_regex=`echo 'fnmatch.h' \ |
7a6dbc2f SDJ |
9201 | | sed -e "$gl_make_literal_regex_sed"` |
9202 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
9203 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
9204 | s|^/[^/]|//&| | |
9205 | p | |
9206 | q | |
9207 | }' | |
9208 | ||
c0c3707f | 9209 | gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
7a6dbc2f SDJ |
9210 | sed -n "$gl_absolute_header_sed"` |
9211 | ||
c0c3707f CB |
9212 | gl_header=$gl_cv_absolute_fnmatch_h |
9213 | gl_cv_next_fnmatch_h='"'$gl_header'"' | |
9214 | else | |
9215 | gl_cv_next_fnmatch_h='<'fnmatch.h'>' | |
9216 | fi | |
7a6dbc2f SDJ |
9217 | |
9218 | ||
9219 | fi | |
c0c3707f CB |
9220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5 |
9221 | $as_echo "$gl_cv_next_fnmatch_h" >&6; } | |
7a6dbc2f | 9222 | fi |
c0c3707f | 9223 | NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h |
7a6dbc2f SDJ |
9224 | |
9225 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
9226 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 9227 | gl_next_as_first_directive='<'fnmatch.h'>' |
7a6dbc2f SDJ |
9228 | else |
9229 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f | 9230 | gl_next_as_first_directive=$gl_cv_next_fnmatch_h |
7a6dbc2f | 9231 | fi |
c0c3707f | 9232 | NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive |
7a6dbc2f SDJ |
9233 | |
9234 | ||
9235 | ||
9236 | ||
7a6dbc2f | 9237 | |
7a6dbc2f SDJ |
9238 | |
9239 | ||
c0c3707f CB |
9240 | if test $ac_cv_header_fnmatch_h = yes; then |
9241 | HAVE_FNMATCH_H=1 | |
9242 | else | |
9243 | HAVE_FNMATCH_H=0 | |
9244 | fi | |
7a6dbc2f SDJ |
9245 | |
9246 | ||
c0c3707f CB |
9247 | FNMATCH_H='' |
9248 | if false; then | |
9249 | FNMATCH_H=fnmatch.h | |
9250 | else | |
9251 | if test $ac_cv_header_fnmatch_h != yes; then | |
9252 | FNMATCH_H=fnmatch.h | |
9253 | fi | |
9254 | fi | |
7a6dbc2f | 9255 | |
c0c3707f CB |
9256 | |
9257 | if test -n "$FNMATCH_H"; then | |
9258 | GL_GENERATE_FNMATCH_H_TRUE= | |
9259 | GL_GENERATE_FNMATCH_H_FALSE='#' | |
7a6dbc2f | 9260 | else |
c0c3707f CB |
9261 | GL_GENERATE_FNMATCH_H_TRUE='#' |
9262 | GL_GENERATE_FNMATCH_H_FALSE= | |
7a6dbc2f | 9263 | fi |
7a6dbc2f | 9264 | |
7a6dbc2f | 9265 | |
7a6dbc2f | 9266 | |
7a6dbc2f SDJ |
9267 | |
9268 | ||
9269 | ||
9270 | ||
9271 | ||
9272 | ||
9273 | ||
c0c3707f CB |
9274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
9275 | $as_echo_n "checking for mbstate_t... " >&6; } | |
9276 | if ${ac_cv_type_mbstate_t+:} false; then : | |
5e8754f9 SDJ |
9277 | $as_echo_n "(cached) " >&6 |
9278 | else | |
c0c3707f | 9279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e8754f9 | 9280 | /* end confdefs.h. */ |
c0c3707f | 9281 | $ac_includes_default |
9c9d63b1 | 9282 | #include <wchar.h> |
c0c3707f CB |
9283 | int |
9284 | main () | |
9285 | { | |
9286 | mbstate_t x; return sizeof x; | |
9287 | ; | |
9288 | return 0; | |
9289 | } | |
5e8754f9 | 9290 | _ACEOF |
c0c3707f CB |
9291 | if ac_fn_c_try_compile "$LINENO"; then : |
9292 | ac_cv_type_mbstate_t=yes | |
5e8754f9 | 9293 | else |
c0c3707f | 9294 | ac_cv_type_mbstate_t=no |
5e8754f9 | 9295 | fi |
c0c3707f CB |
9296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9297 | fi | |
9298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 | |
9299 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
9300 | if test $ac_cv_type_mbstate_t = yes; then | |
5e8754f9 | 9301 | |
c0c3707f | 9302 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
5e8754f9 | 9303 | |
c0c3707f | 9304 | else |
5e8754f9 | 9305 | |
c0c3707f | 9306 | $as_echo "#define mbstate_t int" >>confdefs.h |
5e8754f9 | 9307 | |
c0c3707f | 9308 | fi |
5e8754f9 SDJ |
9309 | |
9310 | ||
9311 | ||
9312 | ||
5e8754f9 SDJ |
9313 | GNULIB_ACOSF=0; |
9314 | GNULIB_ACOSL=0; | |
9315 | GNULIB_ASINF=0; | |
9316 | GNULIB_ASINL=0; | |
9317 | GNULIB_ATANF=0; | |
9318 | GNULIB_ATANL=0; | |
9319 | GNULIB_ATAN2F=0; | |
9320 | GNULIB_CBRT=0; | |
9321 | GNULIB_CBRTF=0; | |
9322 | GNULIB_CBRTL=0; | |
9323 | GNULIB_CEIL=0; | |
9324 | GNULIB_CEILF=0; | |
9325 | GNULIB_CEILL=0; | |
9326 | GNULIB_COPYSIGN=0; | |
9327 | GNULIB_COPYSIGNF=0; | |
9328 | GNULIB_COPYSIGNL=0; | |
9329 | GNULIB_COSF=0; | |
9330 | GNULIB_COSL=0; | |
9331 | GNULIB_COSHF=0; | |
9332 | GNULIB_EXPF=0; | |
9333 | GNULIB_EXPL=0; | |
9334 | GNULIB_EXP2=0; | |
9335 | GNULIB_EXP2F=0; | |
9336 | GNULIB_EXP2L=0; | |
9337 | GNULIB_EXPM1=0; | |
9338 | GNULIB_EXPM1F=0; | |
9339 | GNULIB_EXPM1L=0; | |
9340 | GNULIB_FABSF=0; | |
9341 | GNULIB_FABSL=0; | |
9342 | GNULIB_FLOOR=0; | |
9343 | GNULIB_FLOORF=0; | |
9344 | GNULIB_FLOORL=0; | |
9345 | GNULIB_FMA=0; | |
9346 | GNULIB_FMAF=0; | |
9347 | GNULIB_FMAL=0; | |
9348 | GNULIB_FMOD=0; | |
9349 | GNULIB_FMODF=0; | |
9350 | GNULIB_FMODL=0; | |
9351 | GNULIB_FREXPF=0; | |
9352 | GNULIB_FREXP=0; | |
9353 | GNULIB_FREXPL=0; | |
9354 | GNULIB_HYPOT=0; | |
9355 | GNULIB_HYPOTF=0; | |
9356 | GNULIB_HYPOTL=0; | |
9357 | GNULIB_ILOGB=0; | |
9358 | GNULIB_ILOGBF=0; | |
9359 | GNULIB_ILOGBL=0; | |
9360 | GNULIB_ISFINITE=0; | |
9361 | GNULIB_ISINF=0; | |
9362 | GNULIB_ISNAN=0; | |
9363 | GNULIB_ISNANF=0; | |
9364 | GNULIB_ISNAND=0; | |
9365 | GNULIB_ISNANL=0; | |
9366 | GNULIB_LDEXPF=0; | |
9367 | GNULIB_LDEXPL=0; | |
9368 | GNULIB_LOG=0; | |
9369 | GNULIB_LOGF=0; | |
9370 | GNULIB_LOGL=0; | |
9371 | GNULIB_LOG10=0; | |
9372 | GNULIB_LOG10F=0; | |
9373 | GNULIB_LOG10L=0; | |
9374 | GNULIB_LOG1P=0; | |
9375 | GNULIB_LOG1PF=0; | |
9376 | GNULIB_LOG1PL=0; | |
9377 | GNULIB_LOG2=0; | |
9378 | GNULIB_LOG2F=0; | |
9379 | GNULIB_LOG2L=0; | |
9380 | GNULIB_LOGB=0; | |
9381 | GNULIB_LOGBF=0; | |
9382 | GNULIB_LOGBL=0; | |
9383 | GNULIB_MODF=0; | |
9384 | GNULIB_MODFF=0; | |
9385 | GNULIB_MODFL=0; | |
9386 | GNULIB_POWF=0; | |
9387 | GNULIB_REMAINDER=0; | |
9388 | GNULIB_REMAINDERF=0; | |
9389 | GNULIB_REMAINDERL=0; | |
9390 | GNULIB_RINT=0; | |
9391 | GNULIB_RINTF=0; | |
9392 | GNULIB_RINTL=0; | |
9393 | GNULIB_ROUND=0; | |
9394 | GNULIB_ROUNDF=0; | |
9395 | GNULIB_ROUNDL=0; | |
9396 | GNULIB_SIGNBIT=0; | |
9397 | GNULIB_SINF=0; | |
9398 | GNULIB_SINL=0; | |
9399 | GNULIB_SINHF=0; | |
9400 | GNULIB_SQRTF=0; | |
9401 | GNULIB_SQRTL=0; | |
9402 | GNULIB_TANF=0; | |
9403 | GNULIB_TANL=0; | |
9404 | GNULIB_TANHF=0; | |
9405 | GNULIB_TRUNC=0; | |
9406 | GNULIB_TRUNCF=0; | |
9407 | GNULIB_TRUNCL=0; | |
9c9d63b1 PM |
9408 | GNULIB_MDA_J0=1; |
9409 | GNULIB_MDA_J1=1; | |
9410 | GNULIB_MDA_JN=1; | |
9411 | GNULIB_MDA_Y0=1; | |
9412 | GNULIB_MDA_Y1=1; | |
9413 | GNULIB_MDA_YN=1; | |
5e8754f9 SDJ |
9414 | HAVE_ACOSF=1; |
9415 | HAVE_ACOSL=1; | |
9416 | HAVE_ASINF=1; | |
9417 | HAVE_ASINL=1; | |
9418 | HAVE_ATANF=1; | |
9419 | HAVE_ATANL=1; | |
9420 | HAVE_ATAN2F=1; | |
9421 | HAVE_CBRT=1; | |
9422 | HAVE_CBRTF=1; | |
9423 | HAVE_CBRTL=1; | |
9424 | HAVE_COPYSIGN=1; | |
9425 | HAVE_COPYSIGNL=1; | |
9426 | HAVE_COSF=1; | |
9427 | HAVE_COSL=1; | |
9428 | HAVE_COSHF=1; | |
9429 | HAVE_EXPF=1; | |
9430 | HAVE_EXPL=1; | |
9431 | HAVE_EXPM1=1; | |
9432 | HAVE_EXPM1F=1; | |
9433 | HAVE_FABSF=1; | |
9434 | HAVE_FABSL=1; | |
9435 | HAVE_FMA=1; | |
9436 | HAVE_FMAF=1; | |
9437 | HAVE_FMAL=1; | |
9438 | HAVE_FMODF=1; | |
9439 | HAVE_FMODL=1; | |
9440 | HAVE_FREXPF=1; | |
9441 | HAVE_HYPOTF=1; | |
9442 | HAVE_HYPOTL=1; | |
9443 | HAVE_ILOGB=1; | |
9444 | HAVE_ILOGBF=1; | |
9445 | HAVE_ILOGBL=1; | |
9446 | HAVE_ISNANF=1; | |
9447 | HAVE_ISNAND=1; | |
9448 | HAVE_ISNANL=1; | |
9449 | HAVE_LDEXPF=1; | |
9450 | HAVE_LOGF=1; | |
9451 | HAVE_LOGL=1; | |
9452 | HAVE_LOG10F=1; | |
9453 | HAVE_LOG10L=1; | |
9454 | HAVE_LOG1P=1; | |
9455 | HAVE_LOG1PF=1; | |
9456 | HAVE_LOG1PL=1; | |
9457 | HAVE_LOGBF=1; | |
9458 | HAVE_LOGBL=1; | |
9459 | HAVE_MODFF=1; | |
9460 | HAVE_MODFL=1; | |
9461 | HAVE_POWF=1; | |
9462 | HAVE_REMAINDER=1; | |
9463 | HAVE_REMAINDERF=1; | |
9464 | HAVE_RINT=1; | |
9465 | HAVE_RINTL=1; | |
9466 | HAVE_SINF=1; | |
9467 | HAVE_SINL=1; | |
9468 | HAVE_SINHF=1; | |
9469 | HAVE_SQRTF=1; | |
9470 | HAVE_SQRTL=1; | |
9471 | HAVE_TANF=1; | |
9472 | HAVE_TANL=1; | |
9473 | HAVE_TANHF=1; | |
9474 | HAVE_DECL_ACOSL=1; | |
9475 | HAVE_DECL_ASINL=1; | |
9476 | HAVE_DECL_ATANL=1; | |
9477 | HAVE_DECL_CBRTF=1; | |
9478 | HAVE_DECL_CBRTL=1; | |
9479 | HAVE_DECL_CEILF=1; | |
9480 | HAVE_DECL_CEILL=1; | |
9481 | HAVE_DECL_COPYSIGNF=1; | |
9482 | HAVE_DECL_COSL=1; | |
9483 | HAVE_DECL_EXPL=1; | |
9484 | HAVE_DECL_EXP2=1; | |
9485 | HAVE_DECL_EXP2F=1; | |
9486 | HAVE_DECL_EXP2L=1; | |
9487 | HAVE_DECL_EXPM1L=1; | |
9488 | HAVE_DECL_FLOORF=1; | |
9489 | HAVE_DECL_FLOORL=1; | |
9490 | HAVE_DECL_FREXPL=1; | |
9491 | HAVE_DECL_LDEXPL=1; | |
9492 | HAVE_DECL_LOGL=1; | |
9493 | HAVE_DECL_LOG10L=1; | |
9494 | HAVE_DECL_LOG2=1; | |
9495 | HAVE_DECL_LOG2F=1; | |
9496 | HAVE_DECL_LOG2L=1; | |
9497 | HAVE_DECL_LOGB=1; | |
9498 | HAVE_DECL_REMAINDER=1; | |
9499 | HAVE_DECL_REMAINDERL=1; | |
9500 | HAVE_DECL_RINTF=1; | |
9501 | HAVE_DECL_ROUND=1; | |
9502 | HAVE_DECL_ROUNDF=1; | |
9503 | HAVE_DECL_ROUNDL=1; | |
9504 | HAVE_DECL_SINL=1; | |
9505 | HAVE_DECL_SQRTL=1; | |
9506 | HAVE_DECL_TANL=1; | |
9507 | HAVE_DECL_TRUNC=1; | |
9508 | HAVE_DECL_TRUNCF=1; | |
9509 | HAVE_DECL_TRUNCL=1; | |
c0c3707f CB |
9510 | REPLACE_ACOSF=0; |
9511 | REPLACE_ASINF=0; | |
9512 | REPLACE_ATANF=0; | |
9513 | REPLACE_ATAN2F=0; | |
5e8754f9 SDJ |
9514 | REPLACE_CBRTF=0; |
9515 | REPLACE_CBRTL=0; | |
9516 | REPLACE_CEIL=0; | |
9517 | REPLACE_CEILF=0; | |
9518 | REPLACE_CEILL=0; | |
c0c3707f CB |
9519 | REPLACE_COSF=0; |
9520 | REPLACE_COSHF=0; | |
9521 | REPLACE_EXPF=0; | |
9522 | REPLACE_EXPL=0; | |
5e8754f9 SDJ |
9523 | REPLACE_EXPM1=0; |
9524 | REPLACE_EXPM1F=0; | |
c0c3707f | 9525 | REPLACE_EXPM1L=0; |
5e8754f9 SDJ |
9526 | REPLACE_EXP2=0; |
9527 | REPLACE_EXP2L=0; | |
9528 | REPLACE_FABSL=0; | |
9529 | REPLACE_FLOOR=0; | |
9530 | REPLACE_FLOORF=0; | |
9531 | REPLACE_FLOORL=0; | |
9532 | REPLACE_FMA=0; | |
9533 | REPLACE_FMAF=0; | |
9534 | REPLACE_FMAL=0; | |
9535 | REPLACE_FMOD=0; | |
9536 | REPLACE_FMODF=0; | |
9537 | REPLACE_FMODL=0; | |
9538 | REPLACE_FREXPF=0; | |
9539 | REPLACE_FREXP=0; | |
9540 | REPLACE_FREXPL=0; | |
9541 | REPLACE_HUGE_VAL=0; | |
9542 | REPLACE_HYPOT=0; | |
9543 | REPLACE_HYPOTF=0; | |
9544 | REPLACE_HYPOTL=0; | |
9545 | REPLACE_ILOGB=0; | |
9546 | REPLACE_ILOGBF=0; | |
c0c3707f | 9547 | REPLACE_ILOGBL=0; |
5e8754f9 SDJ |
9548 | REPLACE_ISFINITE=0; |
9549 | REPLACE_ISINF=0; | |
9550 | REPLACE_ISNAN=0; | |
9551 | REPLACE_LDEXPL=0; | |
9552 | REPLACE_LOG=0; | |
9553 | REPLACE_LOGF=0; | |
9554 | REPLACE_LOGL=0; | |
9555 | REPLACE_LOG10=0; | |
9556 | REPLACE_LOG10F=0; | |
9557 | REPLACE_LOG10L=0; | |
9558 | REPLACE_LOG1P=0; | |
9559 | REPLACE_LOG1PF=0; | |
9560 | REPLACE_LOG1PL=0; | |
9561 | REPLACE_LOG2=0; | |
9562 | REPLACE_LOG2F=0; | |
9563 | REPLACE_LOG2L=0; | |
9564 | REPLACE_LOGB=0; | |
9565 | REPLACE_LOGBF=0; | |
9566 | REPLACE_LOGBL=0; | |
9567 | REPLACE_MODF=0; | |
9568 | REPLACE_MODFF=0; | |
9569 | REPLACE_MODFL=0; | |
9570 | REPLACE_NAN=0; | |
9571 | REPLACE_REMAINDER=0; | |
9572 | REPLACE_REMAINDERF=0; | |
9573 | REPLACE_REMAINDERL=0; | |
c0c3707f | 9574 | REPLACE_RINTL=0; |
5e8754f9 | 9575 | REPLACE_ROUND=0; |
c0c3707f CB |
9576 | REPLACE_ROUNDF=0; |
9577 | REPLACE_ROUNDL=0; | |
9578 | REPLACE_SIGNBIT=0; | |
9c9d63b1 | 9579 | REPLACE_SIGNBIT_USING_BUILTINS=0; |
c0c3707f CB |
9580 | REPLACE_SINF=0; |
9581 | REPLACE_SINHF=0; | |
9582 | REPLACE_SQRTF=0; | |
9583 | REPLACE_SQRTL=0; | |
9584 | REPLACE_TANF=0; | |
9585 | REPLACE_TANHF=0; | |
9586 | REPLACE_TRUNC=0; | |
9587 | REPLACE_TRUNCF=0; | |
9588 | REPLACE_TRUNCL=0; | |
49e4877c | 9589 | |
49e4877c | 9590 | |
c0c3707f CB |
9591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 |
9592 | $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } | |
9593 | if ${gl_cv_func_frexp_no_libm+:} false; then : | |
9594 | $as_echo_n "(cached) " >&6 | |
9595 | else | |
8690e634 | 9596 | |
c0c3707f CB |
9597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9598 | /* end confdefs.h. */ | |
9599 | #include <math.h> | |
9600 | double x; | |
9601 | int | |
9602 | main () | |
9603 | { | |
9604 | int e; return frexp (x, &e) > 0; | |
9605 | ; | |
9606 | return 0; | |
9607 | } | |
9608 | _ACEOF | |
9609 | if ac_fn_c_try_link "$LINENO"; then : | |
9610 | gl_cv_func_frexp_no_libm=yes | |
9611 | else | |
9612 | gl_cv_func_frexp_no_libm=no | |
9613 | fi | |
9614 | rm -f core conftest.err conftest.$ac_objext \ | |
9615 | conftest$ac_exeext conftest.$ac_ext | |
8690e634 | 9616 | |
c0c3707f CB |
9617 | fi |
9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 | |
9619 | $as_echo "$gl_cv_func_frexp_no_libm" >&6; } | |
8690e634 | 9620 | |
c0c3707f CB |
9621 | ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" |
9622 | if test "x$ac_cv_have_decl_alarm" = xyes; then : | |
9623 | ac_have_decl=1 | |
9624 | else | |
9625 | ac_have_decl=0 | |
9626 | fi | |
472fa5ee | 9627 | |
c0c3707f CB |
9628 | cat >>confdefs.h <<_ACEOF |
9629 | #define HAVE_DECL_ALARM $ac_have_decl | |
9630 | _ACEOF | |
472fa5ee SM |
9631 | |
9632 | ||
9633 | ||
9634 | ||
c0c3707f CB |
9635 | FREXP_LIBM= |
9636 | if test $gl_cv_func_frexp_no_libm = no; then | |
9637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5 | |
9638 | $as_echo_n "checking whether frexp() can be used with libm... " >&6; } | |
9639 | if ${gl_cv_func_frexp_in_libm+:} false; then : | |
9640 | $as_echo_n "(cached) " >&6 | |
9641 | else | |
8690e634 | 9642 | |
c0c3707f CB |
9643 | save_LIBS="$LIBS" |
9644 | LIBS="$LIBS -lm" | |
9645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9646 | /* end confdefs.h. */ | |
9647 | #include <math.h> | |
9648 | double x; | |
9649 | int | |
9650 | main () | |
9651 | { | |
9652 | int e; return frexp (x, &e) > 0; | |
9653 | ; | |
9654 | return 0; | |
9655 | } | |
9656 | _ACEOF | |
9657 | if ac_fn_c_try_link "$LINENO"; then : | |
9658 | gl_cv_func_frexp_in_libm=yes | |
9659 | else | |
9660 | gl_cv_func_frexp_in_libm=no | |
9661 | fi | |
9662 | rm -f core conftest.err conftest.$ac_objext \ | |
9663 | conftest$ac_exeext conftest.$ac_ext | |
9664 | LIBS="$save_LIBS" | |
8690e634 | 9665 | |
c0c3707f CB |
9666 | fi |
9667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5 | |
9668 | $as_echo "$gl_cv_func_frexp_in_libm" >&6; } | |
9669 | if test $gl_cv_func_frexp_in_libm = yes; then | |
9670 | FREXP_LIBM=-lm | |
9671 | fi | |
6ec2e0f5 | 9672 | fi |
c0c3707f CB |
9673 | if test $gl_cv_func_frexp_no_libm = yes \ |
9674 | || test $gl_cv_func_frexp_in_libm = yes; then | |
9675 | save_LIBS="$LIBS" | |
9676 | LIBS="$LIBS $FREXP_LIBM" | |
8690e634 JK |
9677 | |
9678 | ||
8690e634 | 9679 | |
c0c3707f CB |
9680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 |
9681 | $as_echo_n "checking whether frexp works... " >&6; } | |
9682 | if ${gl_cv_func_frexp_works+:} false; then : | |
9683 | $as_echo_n "(cached) " >&6 | |
9684 | else | |
8690e634 | 9685 | |
c0c3707f CB |
9686 | if test "$cross_compiling" = yes; then : |
9687 | case "$host_os" in | |
9688 | netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; | |
9689 | mingw*) # Guess yes with MSVC, no with mingw. | |
9690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9691 | /* end confdefs.h. */ | |
8690e634 | 9692 | |
c0c3707f CB |
9693 | #ifdef _MSC_VER |
9694 | Good | |
9695 | #endif | |
8690e634 | 9696 | |
c0c3707f CB |
9697 | _ACEOF |
9698 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9699 | $EGREP "Good" >/dev/null 2>&1; then : | |
9700 | gl_cv_func_frexp_works="guessing yes" | |
9701 | else | |
9702 | gl_cv_func_frexp_works="guessing no" | |
9703 | fi | |
9704 | rm -f conftest* | |
8690e634 | 9705 | |
c0c3707f CB |
9706 | ;; |
9707 | *) gl_cv_func_frexp_works="guessing yes" ;; | |
9708 | esac | |
8690e634 | 9709 | |
c0c3707f CB |
9710 | else |
9711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9712 | /* end confdefs.h. */ | |
8690e634 | 9713 | |
c0c3707f CB |
9714 | #include <float.h> |
9715 | #include <math.h> | |
9716 | #include <string.h> | |
9717 | #if HAVE_DECL_ALARM | |
9718 | # include <signal.h> | |
9719 | # include <unistd.h> | |
9720 | #endif | |
9721 | /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. | |
9722 | ICC 10.0 has a bug when optimizing the expression -zero. | |
9723 | The expression -DBL_MIN * DBL_MIN does not work when cross-compiling | |
9724 | to PowerPC on Mac OS X 10.5. */ | |
9725 | #if defined __hpux || defined __sgi || defined __ICC | |
9726 | static double | |
9727 | compute_minus_zero (void) | |
9728 | { | |
9729 | return -DBL_MIN * DBL_MIN; | |
9730 | } | |
9731 | # define minus_zero compute_minus_zero () | |
9732 | #else | |
9733 | double minus_zero = -0.0; | |
9734 | #endif | |
9735 | int main() | |
9736 | { | |
9737 | int result = 0; | |
9738 | int i; | |
9739 | volatile double x; | |
9740 | double zero = 0.0; | |
9741 | #if HAVE_DECL_ALARM | |
9742 | /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite | |
9743 | number. Let the test fail in this case. */ | |
9744 | signal (SIGALRM, SIG_DFL); | |
9745 | alarm (5); | |
9746 | #endif | |
9747 | /* Test on denormalized numbers. */ | |
9748 | for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) | |
9749 | ; | |
9750 | if (x > 0.0) | |
9751 | { | |
9752 | int exp; | |
9753 | double y = frexp (x, &exp); | |
9754 | /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. | |
9755 | On NetBSD: y = 0.75. Correct: y = 0.5. */ | |
9756 | if (y != 0.5) | |
9757 | result |= 1; | |
9758 | } | |
9759 | /* Test on infinite numbers. */ | |
9760 | x = 1.0 / zero; | |
9761 | { | |
9762 | int exp; | |
9763 | double y = frexp (x, &exp); | |
9764 | if (y != x) | |
9765 | result |= 2; | |
9766 | } | |
9767 | /* Test on negative zero. */ | |
9768 | x = minus_zero; | |
9769 | { | |
9770 | int exp; | |
9771 | double y = frexp (x, &exp); | |
9772 | if (memcmp (&y, &x, sizeof x)) | |
9773 | result |= 4; | |
9774 | } | |
9775 | return result; | |
9776 | } | |
9777 | _ACEOF | |
9778 | if ac_fn_c_try_run "$LINENO"; then : | |
9779 | gl_cv_func_frexp_works=yes | |
9780 | else | |
9781 | gl_cv_func_frexp_works=no | |
9782 | fi | |
9783 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9784 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9785 | fi | |
472fa5ee SM |
9786 | |
9787 | ||
c0c3707f CB |
9788 | fi |
9789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 | |
9790 | $as_echo "$gl_cv_func_frexp_works" >&6; } | |
472fa5ee | 9791 | |
c0c3707f CB |
9792 | LIBS="$save_LIBS" |
9793 | case "$gl_cv_func_frexp_works" in | |
9794 | *yes) gl_func_frexp=yes ;; | |
9795 | *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; | |
9796 | esac | |
9797 | else | |
9798 | gl_func_frexp=no | |
9799 | fi | |
9800 | if test $gl_func_frexp = yes; then | |
472fa5ee | 9801 | |
c0c3707f | 9802 | $as_echo "#define HAVE_FREXP 1" >>confdefs.h |
472fa5ee | 9803 | |
c0c3707f | 9804 | fi |
8690e634 | 9805 | |
6ec2e0f5 SDJ |
9806 | |
9807 | ||
c0c3707f CB |
9808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 |
9809 | $as_echo_n "checking whether long double and double are the same... " >&6; } | |
9810 | if ${gl_cv_long_double_equals_double+:} false; then : | |
8690e634 JK |
9811 | $as_echo_n "(cached) " >&6 |
9812 | else | |
c0c3707f CB |
9813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9814 | /* end confdefs.h. */ | |
9815 | #include <float.h> | |
9816 | int | |
9817 | main () | |
9818 | { | |
9819 | typedef int check[sizeof (long double) == sizeof (double) | |
9820 | && LDBL_MANT_DIG == DBL_MANT_DIG | |
9821 | && LDBL_MAX_EXP == DBL_MAX_EXP | |
9822 | && LDBL_MIN_EXP == DBL_MIN_EXP | |
9823 | ? 1 : -1]; | |
8690e634 | 9824 | |
c0c3707f CB |
9825 | ; |
9826 | return 0; | |
9827 | } | |
9828 | _ACEOF | |
9829 | if ac_fn_c_try_compile "$LINENO"; then : | |
9830 | gl_cv_long_double_equals_double=yes | |
9831 | else | |
9832 | gl_cv_long_double_equals_double=no | |
9833 | fi | |
9834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 9835 | |
c0c3707f CB |
9836 | fi |
9837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 | |
9838 | $as_echo "$gl_cv_long_double_equals_double" >&6; } | |
9839 | if test $gl_cv_long_double_equals_double = yes; then | |
8690e634 | 9840 | |
c0c3707f | 9841 | $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h |
6ec2e0f5 | 9842 | |
c0c3707f CB |
9843 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 |
9844 | else | |
9845 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 | |
9846 | fi | |
8690e634 | 9847 | |
6ec2e0f5 | 9848 | |
6ec2e0f5 | 9849 | |
6ec2e0f5 SDJ |
9850 | |
9851 | ||
6ec2e0f5 | 9852 | |
8690e634 JK |
9853 | |
9854 | ||
c0c3707f CB |
9855 | ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h> |
9856 | " | |
9857 | if test "x$ac_cv_have_decl_frexpl" = xyes; then : | |
8690e634 | 9858 | |
c0c3707f CB |
9859 | else |
9860 | HAVE_DECL_FREXPL=0 | |
9861 | fi | |
8690e634 | 9862 | |
6ec2e0f5 | 9863 | |
c0c3707f CB |
9864 | FREXPL_LIBM= |
9865 | if test $HAVE_DECL_FREXPL = 1; then | |
6ec2e0f5 | 9866 | |
c0c3707f CB |
9867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 |
9868 | $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } | |
9869 | if ${gl_cv_func_frexpl_no_libm+:} false; then : | |
8690e634 JK |
9870 | $as_echo_n "(cached) " >&6 |
9871 | else | |
c0c3707f CB |
9872 | |
9873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 | 9874 | /* end confdefs.h. */ |
c0c3707f CB |
9875 | #include <math.h> |
9876 | long double x; | |
9877 | int | |
9878 | main () | |
9879 | { | |
9880 | int e; return frexpl (x, &e) > 0; | |
9881 | ; | |
9882 | return 0; | |
9883 | } | |
9884 | _ACEOF | |
9885 | if ac_fn_c_try_link "$LINENO"; then : | |
9886 | gl_cv_func_frexpl_no_libm=yes | |
9887 | else | |
9888 | gl_cv_func_frexpl_no_libm=no | |
9889 | fi | |
9890 | rm -f core conftest.err conftest.$ac_objext \ | |
9891 | conftest$ac_exeext conftest.$ac_ext | |
8690e634 | 9892 | |
c0c3707f CB |
9893 | fi |
9894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 | |
9895 | $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } | |
6ec2e0f5 | 9896 | |
c0c3707f CB |
9897 | if test $gl_cv_func_frexpl_no_libm = no; then |
9898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5 | |
9899 | $as_echo_n "checking whether frexpl() can be used with libm... " >&6; } | |
9900 | if ${gl_cv_func_frexpl_in_libm+:} false; then : | |
9901 | $as_echo_n "(cached) " >&6 | |
9902 | else | |
6ec2e0f5 | 9903 | |
c0c3707f CB |
9904 | save_LIBS="$LIBS" |
9905 | LIBS="$LIBS -lm" | |
9906 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9907 | /* end confdefs.h. */ | |
9908 | #include <math.h> | |
9909 | long double x; | |
9910 | int | |
9911 | main () | |
9912 | { | |
9913 | int e; return frexpl (x, &e) > 0; | |
9914 | ; | |
9915 | return 0; | |
9916 | } | |
9917 | _ACEOF | |
9918 | if ac_fn_c_try_link "$LINENO"; then : | |
9919 | gl_cv_func_frexpl_in_libm=yes | |
9920 | else | |
9921 | gl_cv_func_frexpl_in_libm=no | |
9922 | fi | |
9923 | rm -f core conftest.err conftest.$ac_objext \ | |
9924 | conftest$ac_exeext conftest.$ac_ext | |
9925 | LIBS="$save_LIBS" | |
6ec2e0f5 | 9926 | |
c0c3707f CB |
9927 | fi |
9928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5 | |
9929 | $as_echo "$gl_cv_func_frexpl_in_libm" >&6; } | |
9930 | if test $gl_cv_func_frexpl_in_libm = yes; then | |
9931 | FREXPL_LIBM=-lm | |
9932 | fi | |
9933 | fi | |
9934 | if test $gl_cv_func_frexpl_no_libm = yes \ | |
9935 | || test $gl_cv_func_frexpl_in_libm = yes; then | |
9936 | save_LIBS="$LIBS" | |
9937 | LIBS="$LIBS $FREXPL_LIBM" | |
8690e634 | 9938 | |
8690e634 | 9939 | |
c0c3707f CB |
9940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 |
9941 | $as_echo_n "checking whether frexpl works... " >&6; } | |
9942 | if ${gl_cv_func_frexpl_works+:} false; then : | |
9943 | $as_echo_n "(cached) " >&6 | |
9944 | else | |
8690e634 | 9945 | |
c0c3707f | 9946 | if test "$cross_compiling" = yes; then : |
8690e634 | 9947 | |
c0c3707f CB |
9948 | case "$host_os" in |
9949 | aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) | |
9950 | gl_cv_func_frexpl_works="guessing no";; | |
9951 | *) gl_cv_func_frexpl_works="guessing yes";; | |
9952 | esac | |
8690e634 | 9953 | |
c0c3707f CB |
9954 | else |
9955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9956 | /* end confdefs.h. */ | |
8690e634 | 9957 | |
c0c3707f CB |
9958 | #include <float.h> |
9959 | #include <math.h> | |
9960 | /* Override the values of <float.h>, like done in float.in.h. */ | |
9961 | #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) | |
9962 | # undef LDBL_MIN_EXP | |
9963 | # define LDBL_MIN_EXP (-16381) | |
6ec2e0f5 | 9964 | #endif |
c0c3707f CB |
9965 | #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) |
9966 | # undef LDBL_MIN_EXP | |
9967 | # define LDBL_MIN_EXP (-16381) | |
6ec2e0f5 | 9968 | #endif |
c0c3707f CB |
9969 | #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ |
9970 | # undef LDBL_MIN_EXP | |
9971 | # define LDBL_MIN_EXP DBL_MIN_EXP | |
6ec2e0f5 | 9972 | #endif |
c0c3707f CB |
9973 | #if defined __sgi && (LDBL_MANT_DIG >= 106) |
9974 | # if defined __GNUC__ | |
9975 | # undef LDBL_MIN_EXP | |
9976 | # define LDBL_MIN_EXP DBL_MIN_EXP | |
9977 | # endif | |
6ec2e0f5 | 9978 | #endif |
c0c3707f CB |
9979 | extern |
9980 | #ifdef __cplusplus | |
9981 | "C" | |
9982 | #endif | |
9983 | long double frexpl (long double, int *); | |
9c9d63b1 | 9984 | long double zero = 0.0L; |
c0c3707f | 9985 | int main() |
8690e634 | 9986 | { |
c0c3707f CB |
9987 | int result = 0; |
9988 | volatile long double x; | |
9989 | /* Test on finite numbers that fails on AIX 5.1. */ | |
9990 | x = 16.0L; | |
9991 | { | |
9992 | int exp = -9999; | |
9993 | frexpl (x, &exp); | |
9994 | if (exp != 5) | |
9995 | result |= 1; | |
9996 | } | |
9997 | /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl | |
9998 | function returns an invalid (incorrectly normalized) value: it returns | |
9999 | y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } | |
10000 | but the correct result is | |
10001 | 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ | |
10002 | x = 1.01L; | |
10003 | { | |
10004 | int exp = -9999; | |
10005 | long double y = frexpl (x, &exp); | |
10006 | if (!(exp == 1 && y == 0.505L)) | |
10007 | result |= 2; | |
10008 | } | |
10009 | /* Test on large finite numbers. This fails on BeOS at i = 16322, while | |
10010 | LDBL_MAX_EXP = 16384. | |
10011 | In the loop end test, we test x against Infinity, rather than comparing | |
10012 | i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */ | |
10013 | { | |
10014 | int i; | |
10015 | for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) | |
10016 | { | |
10017 | int exp = -9999; | |
10018 | frexpl (x, &exp); | |
10019 | if (exp != i) | |
10020 | { | |
10021 | result |= 4; | |
10022 | break; | |
10023 | } | |
10024 | } | |
10025 | } | |
10026 | /* Test on denormalized numbers. */ | |
10027 | { | |
10028 | int i; | |
10029 | for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) | |
10030 | ; | |
10031 | if (x > 0.0L) | |
10032 | { | |
10033 | int exp; | |
10034 | long double y = frexpl (x, &exp); | |
10035 | /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, | |
10036 | exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ | |
10037 | if (exp != LDBL_MIN_EXP - 1) | |
10038 | result |= 8; | |
10039 | } | |
10040 | } | |
10041 | /* Test on infinite numbers. */ | |
9c9d63b1 PM |
10042 | /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */ |
10043 | x = 1.0L / zero; | |
c0c3707f CB |
10044 | { |
10045 | int exp; | |
10046 | long double y = frexpl (x, &exp); | |
10047 | if (y != x) | |
10048 | result |= 16; | |
10049 | } | |
10050 | return result; | |
8690e634 JK |
10051 | } |
10052 | _ACEOF | |
c0c3707f CB |
10053 | if ac_fn_c_try_run "$LINENO"; then : |
10054 | gl_cv_func_frexpl_works=yes | |
6ec2e0f5 | 10055 | else |
c0c3707f CB |
10056 | gl_cv_func_frexpl_works=no |
10057 | fi | |
10058 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10059 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10060 | fi | |
8690e634 | 10061 | |
8690e634 | 10062 | |
c0c3707f CB |
10063 | fi |
10064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 | |
10065 | $as_echo "$gl_cv_func_frexpl_works" >&6; } | |
8690e634 | 10066 | |
c0c3707f CB |
10067 | LIBS="$save_LIBS" |
10068 | case "$gl_cv_func_frexpl_works" in | |
10069 | *yes) gl_func_frexpl=yes ;; | |
10070 | *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; | |
10071 | esac | |
10072 | else | |
10073 | gl_func_frexpl=no | |
10074 | fi | |
10075 | if test $gl_func_frexpl = yes; then | |
8690e634 | 10076 | |
c0c3707f | 10077 | $as_echo "#define HAVE_FREXPL 1" >>confdefs.h |
8690e634 | 10078 | |
c0c3707f CB |
10079 | fi |
10080 | fi | |
10081 | if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then | |
10082 | if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then | |
8690e634 | 10083 | |
c0c3707f CB |
10084 | FREXPL_LIBM="$FREXP_LIBM" |
10085 | else | |
10086 | FREXPL_LIBM= | |
10087 | fi | |
10088 | fi | |
6ec2e0f5 | 10089 | |
6ec2e0f5 | 10090 | |
6ec2e0f5 | 10091 | |
c0c3707f CB |
10092 | GNULIB_FCHMODAT=0; |
10093 | GNULIB_FSTAT=0; | |
10094 | GNULIB_FSTATAT=0; | |
10095 | GNULIB_FUTIMENS=0; | |
9c9d63b1 | 10096 | GNULIB_GETUMASK=0; |
c0c3707f CB |
10097 | GNULIB_LCHMOD=0; |
10098 | GNULIB_LSTAT=0; | |
9c9d63b1 | 10099 | GNULIB_MKDIR=0; |
c0c3707f CB |
10100 | GNULIB_MKDIRAT=0; |
10101 | GNULIB_MKFIFO=0; | |
10102 | GNULIB_MKFIFOAT=0; | |
10103 | GNULIB_MKNOD=0; | |
10104 | GNULIB_MKNODAT=0; | |
10105 | GNULIB_STAT=0; | |
10106 | GNULIB_UTIMENSAT=0; | |
10107 | GNULIB_OVERRIDES_STRUCT_STAT=0; | |
9c9d63b1 PM |
10108 | GNULIB_MDA_CHMOD=1; |
10109 | GNULIB_MDA_MKDIR=1; | |
10110 | GNULIB_MDA_UMASK=1; | |
c0c3707f CB |
10111 | HAVE_FCHMODAT=1; |
10112 | HAVE_FSTATAT=1; | |
10113 | HAVE_FUTIMENS=1; | |
9c9d63b1 | 10114 | HAVE_GETUMASK=1; |
c0c3707f CB |
10115 | HAVE_LCHMOD=1; |
10116 | HAVE_LSTAT=1; | |
10117 | HAVE_MKDIRAT=1; | |
10118 | HAVE_MKFIFO=1; | |
10119 | HAVE_MKFIFOAT=1; | |
10120 | HAVE_MKNOD=1; | |
10121 | HAVE_MKNODAT=1; | |
10122 | HAVE_UTIMENSAT=1; | |
5df4cba6 | 10123 | REPLACE_FCHMODAT=0; |
c0c3707f CB |
10124 | REPLACE_FSTAT=0; |
10125 | REPLACE_FSTATAT=0; | |
10126 | REPLACE_FUTIMENS=0; | |
10127 | REPLACE_LSTAT=0; | |
10128 | REPLACE_MKDIR=0; | |
10129 | REPLACE_MKFIFO=0; | |
9c9d63b1 | 10130 | REPLACE_MKFIFOAT=0; |
c0c3707f | 10131 | REPLACE_MKNOD=0; |
9c9d63b1 | 10132 | REPLACE_MKNODAT=0; |
c0c3707f CB |
10133 | REPLACE_STAT=0; |
10134 | REPLACE_UTIMENSAT=0; | |
10135 | ||
10136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 | |
10137 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
10138 | if ${ac_cv_header_stat_broken+:} false; then : | |
10139 | $as_echo_n "(cached) " >&6 | |
10140 | else | |
10141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10142 | /* end confdefs.h. */ | |
10143 | #include <sys/types.h> | |
10144 | #include <sys/stat.h> | |
10145 | ||
10146 | #if defined S_ISBLK && defined S_IFDIR | |
10147 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
10148 | #endif | |
10149 | ||
10150 | #if defined S_ISBLK && defined S_IFCHR | |
10151 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
10152 | #endif | |
10153 | ||
10154 | #if defined S_ISLNK && defined S_IFREG | |
10155 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
10156 | #endif | |
8690e634 | 10157 | |
c0c3707f CB |
10158 | #if defined S_ISSOCK && defined S_IFREG |
10159 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
10160 | #endif | |
8690e634 | 10161 | |
c0c3707f CB |
10162 | _ACEOF |
10163 | if ac_fn_c_try_compile "$LINENO"; then : | |
10164 | ac_cv_header_stat_broken=no | |
10165 | else | |
10166 | ac_cv_header_stat_broken=yes | |
6ec2e0f5 SDJ |
10167 | fi |
10168 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6ec2e0f5 | 10169 | fi |
c0c3707f CB |
10170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
10171 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
10172 | if test $ac_cv_header_stat_broken = yes; then | |
8690e634 | 10173 | |
c0c3707f | 10174 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
49e4877c | 10175 | |
c0c3707f | 10176 | fi |
49e4877c PA |
10177 | |
10178 | ||
10179 | ||
10180 | ||
8690e634 | 10181 | |
c0c3707f CB |
10182 | case "$host_os" in |
10183 | mingw*) | |
10184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 | |
10185 | $as_echo_n "checking for 64-bit off_t... " >&6; } | |
10186 | if ${gl_cv_type_off_t_64+:} false; then : | |
10187 | $as_echo_n "(cached) " >&6 | |
10188 | else | |
10189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10190 | /* end confdefs.h. */ | |
10191 | #include <sys/types.h> | |
10192 | int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; | |
8690e634 | 10193 | |
6ec2e0f5 SDJ |
10194 | int |
10195 | main () | |
10196 | { | |
8690e634 | 10197 | |
6ec2e0f5 SDJ |
10198 | ; |
10199 | return 0; | |
10200 | } | |
10201 | _ACEOF | |
10202 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f CB |
10203 | gl_cv_type_off_t_64=yes |
10204 | else | |
10205 | gl_cv_type_off_t_64=no | |
6ec2e0f5 SDJ |
10206 | fi |
10207 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 10208 | |
c0c3707f CB |
10209 | fi |
10210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 | |
10211 | $as_echo "$gl_cv_type_off_t_64" >&6; } | |
10212 | if test $gl_cv_type_off_t_64 = no; then | |
10213 | WINDOWS_64_BIT_OFF_T=1 | |
10214 | else | |
10215 | WINDOWS_64_BIT_OFF_T=0 | |
10216 | fi | |
10217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 | |
10218 | $as_echo_n "checking for 64-bit st_size... " >&6; } | |
10219 | if ${gl_cv_member_st_size_64+:} false; then : | |
6ec2e0f5 SDJ |
10220 | $as_echo_n "(cached) " >&6 |
10221 | else | |
c0c3707f | 10222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 | 10223 | /* end confdefs.h. */ |
c0c3707f CB |
10224 | #include <sys/types.h> |
10225 | struct stat buf; | |
10226 | int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; | |
8690e634 | 10227 | |
6ec2e0f5 SDJ |
10228 | int |
10229 | main () | |
10230 | { | |
8690e634 | 10231 | |
6ec2e0f5 SDJ |
10232 | ; |
10233 | return 0; | |
10234 | } | |
10235 | _ACEOF | |
10236 | if ac_fn_c_try_compile "$LINENO"; then : | |
698be2d8 CB |
10237 | gl_cv_member_st_size_64=yes |
10238 | else | |
10239 | gl_cv_member_st_size_64=no | |
10240 | fi | |
10241 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10242 | ||
10243 | fi | |
10244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 | |
10245 | $as_echo "$gl_cv_member_st_size_64" >&6; } | |
10246 | if test $gl_cv_member_st_size_64 = no; then | |
10247 | WINDOWS_64_BIT_ST_SIZE=1 | |
10248 | else | |
10249 | WINDOWS_64_BIT_ST_SIZE=0 | |
10250 | fi | |
10251 | ;; | |
10252 | *) | |
10253 | WINDOWS_64_BIT_OFF_T=0 | |
10254 | WINDOWS_64_BIT_ST_SIZE=0 | |
10255 | ;; | |
10256 | esac | |
10257 | ||
10258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
10259 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
10260 | if ${ac_cv_c_restrict+:} false; then : | |
10261 | $as_echo_n "(cached) " >&6 | |
10262 | else | |
10263 | ac_cv_c_restrict=no | |
9c9d63b1 PM |
10264 | # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: |
10265 | # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html | |
10266 | # Put 'restrict' last, because C++ lacks it. | |
10267 | for ac_kw in __restrict__ __restrict _Restrict restrict; do | |
698be2d8 CB |
10268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10269 | /* end confdefs.h. */ | |
10270 | typedef int *int_ptr; | |
10271 | int foo (int_ptr $ac_kw ip) { return ip[0]; } | |
10272 | int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ | |
10273 | int bar (int ip[$ac_kw]) { return ip[0]; } | |
10274 | ||
10275 | int | |
10276 | main () | |
10277 | { | |
10278 | int s[1]; | |
10279 | int *$ac_kw t = s; | |
10280 | t[0] = 0; | |
10281 | return foo (t) + bar (t); | |
10282 | ||
10283 | ; | |
10284 | return 0; | |
10285 | } | |
10286 | _ACEOF | |
10287 | if ac_fn_c_try_compile "$LINENO"; then : | |
10288 | ac_cv_c_restrict=$ac_kw | |
6ec2e0f5 SDJ |
10289 | fi |
10290 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
698be2d8 CB |
10291 | test "$ac_cv_c_restrict" != no && break |
10292 | done | |
8690e634 | 10293 | |
6ec2e0f5 | 10294 | fi |
698be2d8 CB |
10295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
10296 | $as_echo "$ac_cv_c_restrict" >&6; } | |
10297 | ||
10298 | case $ac_cv_c_restrict in | |
10299 | restrict) ;; | |
10300 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
10301 | ;; | |
10302 | *) cat >>confdefs.h <<_ACEOF | |
10303 | #define restrict $ac_cv_c_restrict | |
10304 | _ACEOF | |
10305 | ;; | |
10306 | esac | |
8690e634 JK |
10307 | |
10308 | ||
10309 | ||
10310 | ||
10311 | ||
10312 | ||
c0c3707f CB |
10313 | |
10314 | ||
10315 | ||
10316 | ||
10317 | ||
10318 | ||
10319 | ||
10320 | ||
10321 | ||
10322 | if test $gl_cv_have_include_next = yes; then | |
10323 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
10324 | else | |
10325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
10326 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
10327 | if ${gl_cv_next_sys_stat_h+:} false; then : | |
8690e634 JK |
10328 | $as_echo_n "(cached) " >&6 |
10329 | else | |
10330 | ||
c0c3707f | 10331 | if test $ac_cv_header_sys_stat_h = yes; then |
4a626d0a PA |
10332 | |
10333 | ||
4a626d0a | 10334 | |
c0c3707f CB |
10335 | |
10336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10337 | /* end confdefs.h. */ | |
10338 | #include <sys/stat.h> | |
6ec2e0f5 | 10339 | _ACEOF |
c0c3707f CB |
10340 | case "$host_os" in |
10341 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
10342 | *) gl_absname_cpp="$ac_cpp" ;; | |
10343 | esac | |
10344 | ||
10345 | case "$host_os" in | |
10346 | mingw*) | |
10347 | gl_dirsep_regex='[/\\]' | |
10348 | ;; | |
10349 | *) | |
10350 | gl_dirsep_regex='\/' | |
10351 | ;; | |
10352 | esac | |
10353 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
10354 | gl_header_literal_regex=`echo 'sys/stat.h' \ | |
10355 | | sed -e "$gl_make_literal_regex_sed"` | |
10356 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
10357 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
10358 | s|^/[^/]|//&| | |
10359 | p | |
10360 | q | |
10361 | }' | |
10362 | ||
10363 | gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
10364 | sed -n "$gl_absolute_header_sed"` | |
10365 | ||
10366 | gl_header=$gl_cv_absolute_sys_stat_h | |
10367 | gl_cv_next_sys_stat_h='"'$gl_header'"' | |
10368 | else | |
10369 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
10370 | fi | |
10371 | ||
10372 | ||
10373 | fi | |
10374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
10375 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
10376 | fi | |
10377 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
10378 | ||
10379 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
10380 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
10381 | gl_next_as_first_directive='<'sys/stat.h'>' | |
10382 | else | |
10383 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
10384 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
10385 | fi | |
10386 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
10387 | ||
10388 | ||
10389 | ||
10390 | ||
10391 | ||
10392 | ||
10393 | ||
10394 | ||
10395 | WINDOWS_STAT_TIMESPEC=0 | |
10396 | ||
10397 | ||
10398 | ||
10399 | ||
4a626d0a | 10400 | |
4a626d0a | 10401 | |
8690e634 JK |
10402 | |
10403 | ||
c0c3707f CB |
10404 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> |
10405 | #include <sys/stat.h> | |
10406 | " | |
10407 | if test "x$ac_cv_type_nlink_t" = xyes; then : | |
8690e634 | 10408 | |
6ec2e0f5 | 10409 | else |
8690e634 | 10410 | |
c0c3707f | 10411 | $as_echo "#define nlink_t int" >>confdefs.h |
6ec2e0f5 | 10412 | |
6ec2e0f5 | 10413 | fi |
8690e634 JK |
10414 | |
10415 | ||
10416 | ||
10417 | ||
10418 | ||
10419 | ||
10420 | ||
698be2d8 CB |
10421 | |
10422 | ||
6ec2e0f5 | 10423 | |
9c9d63b1 PM |
10424 | case "$host_os" in |
10425 | mingw*) | |
10426 | for ac_header in sdkddkver.h | |
10427 | do : | |
10428 | ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default" | |
10429 | if test "x$ac_cv_header_sdkddkver_h" = xyes; then : | |
10430 | cat >>confdefs.h <<_ACEOF | |
10431 | #define HAVE_SDKDDKVER_H 1 | |
8690e634 | 10432 | _ACEOF |
6ec2e0f5 | 10433 | |
8690e634 | 10434 | fi |
c0c3707f | 10435 | |
9c9d63b1 | 10436 | done |
8690e634 | 10437 | |
c0c3707f CB |
10438 | ;; |
10439 | esac | |
8690e634 | 10440 | |
8690e634 | 10441 | |
8690e634 | 10442 | |
8690e634 | 10443 | |
c0c3707f CB |
10444 | |
10445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 | |
10446 | $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } | |
10447 | if ${gl_cv_func_getcwd_null+:} false; then : | |
8690e634 JK |
10448 | $as_echo_n "(cached) " >&6 |
10449 | else | |
c0c3707f CB |
10450 | if test "$cross_compiling" = yes; then : |
10451 | case "$host_os" in | |
10452 | # Guess yes on glibc systems. | |
10453 | *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; | |
10454 | # Guess yes on musl systems. | |
10455 | *-musl*) gl_cv_func_getcwd_null="guessing yes";; | |
10456 | # Guess yes on Cygwin. | |
10457 | cygwin*) gl_cv_func_getcwd_null="guessing yes";; | |
10458 | # If we don't know, obey --enable-cross-guesses. | |
10459 | *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";; | |
10460 | esac | |
10461 | ||
10462 | else | |
10463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
10464 | /* end confdefs.h. */ |
10465 | ||
c0c3707f CB |
10466 | # include <stdlib.h> |
10467 | # if HAVE_UNISTD_H | |
10468 | # include <unistd.h> | |
10469 | # else /* on Windows with MSVC */ | |
10470 | # include <direct.h> | |
10471 | # endif | |
9c9d63b1 PM |
10472 | |
10473 | ||
10474 | $gl_mda_defines | |
10475 | ||
c0c3707f CB |
10476 | # ifndef getcwd |
10477 | char *getcwd (); | |
10478 | # endif | |
8690e634 JK |
10479 | |
10480 | int | |
10481 | main () | |
10482 | { | |
10483 | ||
c0c3707f | 10484 | #if defined _WIN32 && ! defined __CYGWIN__ |
9c9d63b1 | 10485 | /* mingw cwd does not start with '/', but _getcwd does allocate. |
c0c3707f CB |
10486 | However, mingw fails to honor non-zero size. */ |
10487 | #else | |
10488 | if (chdir ("/") != 0) | |
10489 | return 1; | |
10490 | else | |
10491 | { | |
10492 | char *f = getcwd (NULL, 0); | |
10493 | if (! f) | |
10494 | return 2; | |
10495 | if (f[0] != '/') | |
10496 | { free (f); return 3; } | |
10497 | if (f[1] != '\0') | |
10498 | { free (f); return 4; } | |
10499 | free (f); | |
10500 | return 0; | |
10501 | } | |
10502 | #endif | |
10503 | ||
8690e634 JK |
10504 | ; |
10505 | return 0; | |
10506 | } | |
10507 | _ACEOF | |
c0c3707f CB |
10508 | if ac_fn_c_try_run "$LINENO"; then : |
10509 | gl_cv_func_getcwd_null=yes | |
10510 | else | |
10511 | gl_cv_func_getcwd_null=no | |
8690e634 | 10512 | fi |
c0c3707f CB |
10513 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10514 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8690e634 | 10515 | fi |
8690e634 | 10516 | |
c0c3707f CB |
10517 | fi |
10518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 | |
10519 | $as_echo "$gl_cv_func_getcwd_null" >&6; } | |
8690e634 | 10520 | |
6ec2e0f5 | 10521 | |
c0c3707f CB |
10522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 |
10523 | $as_echo_n "checking for getcwd with POSIX signature... " >&6; } | |
10524 | if ${gl_cv_func_getcwd_posix_signature+:} false; then : | |
8690e634 JK |
10525 | $as_echo_n "(cached) " >&6 |
10526 | else | |
c0c3707f | 10527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 | 10528 | /* end confdefs.h. */ |
c0c3707f | 10529 | #include <unistd.h> |
9c9d63b1 PM |
10530 | |
10531 | ||
10532 | $gl_mda_defines | |
10533 | ||
88b48903 WN |
10534 | int |
10535 | main () | |
10536 | { | |
c0c3707f CB |
10537 | extern |
10538 | #ifdef __cplusplus | |
10539 | "C" | |
10540 | #endif | |
10541 | char *getcwd (char *, size_t); | |
88b48903 WN |
10542 | |
10543 | ; | |
10544 | return 0; | |
10545 | } | |
c0c3707f | 10546 | |
88b48903 WN |
10547 | _ACEOF |
10548 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f CB |
10549 | gl_cv_func_getcwd_posix_signature=yes |
10550 | else | |
10551 | gl_cv_func_getcwd_posix_signature=no | |
8690e634 | 10552 | fi |
88b48903 | 10553 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8690e634 | 10554 | |
c0c3707f CB |
10555 | fi |
10556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 | |
10557 | $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } | |
8690e634 | 10558 | |
c0c3707f CB |
10559 | ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" |
10560 | if test "x$ac_cv_have_decl_getcwd" = xyes; then : | |
10561 | ac_have_decl=1 | |
10562 | else | |
10563 | ac_have_decl=0 | |
10564 | fi | |
8690e634 | 10565 | |
c0c3707f CB |
10566 | cat >>confdefs.h <<_ACEOF |
10567 | #define HAVE_DECL_GETCWD $ac_have_decl | |
10568 | _ACEOF | |
8690e634 JK |
10569 | |
10570 | ||
c17253b9 MF |
10571 | GNULIB_DPRINTF=0; |
10572 | GNULIB_FCLOSE=0; | |
10573 | GNULIB_FDOPEN=0; | |
10574 | GNULIB_FFLUSH=0; | |
10575 | GNULIB_FGETC=0; | |
10576 | GNULIB_FGETS=0; | |
10577 | GNULIB_FOPEN=0; | |
10578 | GNULIB_FPRINTF=0; | |
10579 | GNULIB_FPRINTF_POSIX=0; | |
10580 | GNULIB_FPURGE=0; | |
10581 | GNULIB_FPUTC=0; | |
10582 | GNULIB_FPUTS=0; | |
10583 | GNULIB_FREAD=0; | |
10584 | GNULIB_FREOPEN=0; | |
10585 | GNULIB_FSCANF=0; | |
10586 | GNULIB_FSEEK=0; | |
10587 | GNULIB_FSEEKO=0; | |
10588 | GNULIB_FTELL=0; | |
10589 | GNULIB_FTELLO=0; | |
10590 | GNULIB_FWRITE=0; | |
10591 | GNULIB_GETC=0; | |
10592 | GNULIB_GETCHAR=0; | |
10593 | GNULIB_GETDELIM=0; | |
10594 | GNULIB_GETLINE=0; | |
10595 | GNULIB_OBSTACK_PRINTF=0; | |
10596 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
10597 | GNULIB_PCLOSE=0; | |
10598 | GNULIB_PERROR=0; | |
10599 | GNULIB_POPEN=0; | |
10600 | GNULIB_PRINTF=0; | |
10601 | GNULIB_PRINTF_POSIX=0; | |
10602 | GNULIB_PUTC=0; | |
10603 | GNULIB_PUTCHAR=0; | |
10604 | GNULIB_PUTS=0; | |
10605 | GNULIB_REMOVE=0; | |
10606 | GNULIB_RENAME=0; | |
10607 | GNULIB_RENAMEAT=0; | |
10608 | GNULIB_SCANF=0; | |
10609 | GNULIB_SNPRINTF=0; | |
10610 | GNULIB_SPRINTF_POSIX=0; | |
10611 | GNULIB_STDIO_H_NONBLOCKING=0; | |
10612 | GNULIB_STDIO_H_SIGPIPE=0; | |
10613 | GNULIB_TMPFILE=0; | |
10614 | GNULIB_VASPRINTF=0; | |
10615 | GNULIB_VFSCANF=0; | |
10616 | GNULIB_VSCANF=0; | |
10617 | GNULIB_VDPRINTF=0; | |
10618 | GNULIB_VFPRINTF=0; | |
10619 | GNULIB_VFPRINTF_POSIX=0; | |
10620 | GNULIB_VPRINTF=0; | |
10621 | GNULIB_VPRINTF_POSIX=0; | |
10622 | GNULIB_VSNPRINTF=0; | |
10623 | GNULIB_VSPRINTF_POSIX=0; | |
10624 | GNULIB_MDA_FCLOSEALL=1; | |
10625 | GNULIB_MDA_FDOPEN=1; | |
10626 | GNULIB_MDA_FILENO=1; | |
10627 | GNULIB_MDA_GETW=1; | |
10628 | GNULIB_MDA_PUTW=1; | |
10629 | GNULIB_MDA_TEMPNAM=1; | |
10630 | HAVE_DECL_FCLOSEALL=1; | |
10631 | HAVE_DECL_FPURGE=1; | |
10632 | HAVE_DECL_FSEEKO=1; | |
10633 | HAVE_DECL_FTELLO=1; | |
10634 | HAVE_DECL_GETDELIM=1; | |
10635 | HAVE_DECL_GETLINE=1; | |
10636 | HAVE_DECL_OBSTACK_PRINTF=1; | |
10637 | HAVE_DECL_SNPRINTF=1; | |
10638 | HAVE_DECL_VSNPRINTF=1; | |
10639 | HAVE_DPRINTF=1; | |
10640 | HAVE_FSEEKO=1; | |
10641 | HAVE_FTELLO=1; | |
10642 | HAVE_PCLOSE=1; | |
10643 | HAVE_POPEN=1; | |
10644 | HAVE_RENAMEAT=1; | |
10645 | HAVE_VASPRINTF=1; | |
10646 | HAVE_VDPRINTF=1; | |
10647 | REPLACE_DPRINTF=0; | |
10648 | REPLACE_FCLOSE=0; | |
10649 | REPLACE_FDOPEN=0; | |
10650 | REPLACE_FFLUSH=0; | |
10651 | REPLACE_FOPEN=0; | |
10652 | REPLACE_FPRINTF=0; | |
10653 | REPLACE_FPURGE=0; | |
10654 | REPLACE_FREOPEN=0; | |
10655 | REPLACE_FSEEK=0; | |
10656 | REPLACE_FSEEKO=0; | |
10657 | REPLACE_FTELL=0; | |
10658 | REPLACE_FTELLO=0; | |
10659 | REPLACE_GETDELIM=0; | |
10660 | REPLACE_GETLINE=0; | |
10661 | REPLACE_OBSTACK_PRINTF=0; | |
10662 | REPLACE_PERROR=0; | |
10663 | REPLACE_POPEN=0; | |
10664 | REPLACE_PRINTF=0; | |
10665 | REPLACE_REMOVE=0; | |
10666 | REPLACE_RENAME=0; | |
10667 | REPLACE_RENAMEAT=0; | |
10668 | REPLACE_SNPRINTF=0; | |
10669 | REPLACE_SPRINTF=0; | |
10670 | REPLACE_STDIO_READ_FUNCS=0; | |
10671 | REPLACE_STDIO_WRITE_FUNCS=0; | |
10672 | REPLACE_TMPFILE=0; | |
10673 | REPLACE_VASPRINTF=0; | |
10674 | REPLACE_VDPRINTF=0; | |
10675 | REPLACE_VFPRINTF=0; | |
10676 | REPLACE_VPRINTF=0; | |
10677 | REPLACE_VSNPRINTF=0; | |
10678 | REPLACE_VSPRINTF=0; | |
10679 | ||
10680 | ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" | |
10681 | if test "x$ac_cv_have_decl_getdelim" = xyes; then : | |
10682 | ac_have_decl=1 | |
10683 | else | |
10684 | ac_have_decl=0 | |
10685 | fi | |
10686 | ||
10687 | cat >>confdefs.h <<_ACEOF | |
10688 | #define HAVE_DECL_GETDELIM $ac_have_decl | |
10689 | _ACEOF | |
10690 | ||
10691 | ||
10692 | ||
10693 | ||
10694 | ||
10695 | ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" | |
10696 | if test "x$ac_cv_have_decl_getdtablesize" = xyes; then : | |
10697 | ac_have_decl=1 | |
10698 | else | |
10699 | ac_have_decl=0 | |
10700 | fi | |
10701 | ||
10702 | cat >>confdefs.h <<_ACEOF | |
10703 | #define HAVE_DECL_GETDTABLESIZE $ac_have_decl | |
10704 | _ACEOF | |
10705 | ||
10706 | ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" | |
10707 | if test "x$ac_cv_have_decl_getline" = xyes; then : | |
10708 | ac_have_decl=1 | |
10709 | else | |
10710 | ac_have_decl=0 | |
10711 | fi | |
10712 | ||
10713 | cat >>confdefs.h <<_ACEOF | |
10714 | #define HAVE_DECL_GETLINE $ac_have_decl | |
10715 | _ACEOF | |
10716 | ||
10717 | ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" | |
10718 | if test "x$ac_cv_have_decl_getlogin_r" = xyes; then : | |
10719 | ac_have_decl=1 | |
10720 | else | |
10721 | ac_have_decl=0 | |
10722 | fi | |
10723 | ||
10724 | cat >>confdefs.h <<_ACEOF | |
10725 | #define HAVE_DECL_GETLOGIN_R $ac_have_decl | |
10726 | _ACEOF | |
10727 | ||
10728 | ||
10729 | ||
10730 | ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" | |
10731 | if test "x$ac_cv_have_decl_getlogin" = xyes; then : | |
10732 | ac_have_decl=1 | |
10733 | else | |
10734 | ac_have_decl=0 | |
10735 | fi | |
10736 | ||
10737 | cat >>confdefs.h <<_ACEOF | |
10738 | #define HAVE_DECL_GETLOGIN $ac_have_decl | |
10739 | _ACEOF | |
10740 | ||
10741 | ||
10742 | ||
10743 | case $host_os in | |
10744 | mingw*) | |
c0c3707f CB |
10745 | LIB_GETLOGIN='-ladvapi32' ;; |
10746 | *) | |
10747 | LIB_GETLOGIN= ;; | |
10748 | esac | |
6ec2e0f5 | 10749 | |
472fa5ee SM |
10750 | |
10751 | ||
10752 | ||
6ec2e0f5 SDJ |
10753 | |
10754 | ||
10755 | ||
698be2d8 CB |
10756 | GNULIB_GETRANDOM=0; |
10757 | HAVE_GETRANDOM=1; | |
10758 | REPLACE_GETRANDOM=0; | |
10759 | ||
10760 | ||
10761 | ||
10762 | ||
c0c3707f CB |
10763 | GNULIB_GETTIMEOFDAY=0; |
10764 | HAVE_GETTIMEOFDAY=1; | |
10765 | HAVE_STRUCT_TIMEVAL=1; | |
10766 | HAVE_SYS_TIME_H=1; | |
10767 | REPLACE_GETTIMEOFDAY=0; | |
10768 | REPLACE_STRUCT_TIMEVAL=0; | |
472fa5ee | 10769 | |
472fa5ee | 10770 | |
6ec2e0f5 SDJ |
10771 | |
10772 | ||
10773 | ||
10774 | ||
10775 | ||
10776 | ||
472fa5ee SM |
10777 | |
10778 | ||
10779 | ||
6ec2e0f5 SDJ |
10780 | |
10781 | ||
10782 | ||
10783 | ||
10784 | ||
10785 | if test $gl_cv_have_include_next = yes; then | |
c0c3707f | 10786 | gl_cv_next_sys_time_h='<'sys/time.h'>' |
6ec2e0f5 | 10787 | else |
c0c3707f CB |
10788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 |
10789 | $as_echo_n "checking absolute name of <sys/time.h>... " >&6; } | |
10790 | if ${gl_cv_next_sys_time_h+:} false; then : | |
6ec2e0f5 | 10791 | $as_echo_n "(cached) " >&6 |
88b48903 | 10792 | else |
8690e634 | 10793 | |
c0c3707f | 10794 | if test $ac_cv_header_sys_time_h = yes; then |
8690e634 JK |
10795 | |
10796 | ||
8690e634 JK |
10797 | |
10798 | ||
6ec2e0f5 SDJ |
10799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10800 | /* end confdefs.h. */ | |
c0c3707f | 10801 | #include <sys/time.h> |
88b48903 | 10802 | _ACEOF |
6ec2e0f5 SDJ |
10803 | case "$host_os" in |
10804 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
10805 | *) gl_absname_cpp="$ac_cpp" ;; | |
10806 | esac | |
8690e634 | 10807 | |
6ec2e0f5 SDJ |
10808 | case "$host_os" in |
10809 | mingw*) | |
10810 | gl_dirsep_regex='[/\\]' | |
10811 | ;; | |
10812 | *) | |
10813 | gl_dirsep_regex='\/' | |
88b48903 WN |
10814 | ;; |
10815 | esac | |
6ec2e0f5 | 10816 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' |
c0c3707f | 10817 | gl_header_literal_regex=`echo 'sys/time.h' \ |
6ec2e0f5 SDJ |
10818 | | sed -e "$gl_make_literal_regex_sed"` |
10819 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
10820 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
10821 | s|^/[^/]|//&| | |
10822 | p | |
10823 | q | |
10824 | }' | |
8690e634 | 10825 | |
c0c3707f | 10826 | gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
6ec2e0f5 | 10827 | sed -n "$gl_absolute_header_sed"` |
8690e634 | 10828 | |
c0c3707f CB |
10829 | gl_header=$gl_cv_absolute_sys_time_h |
10830 | gl_cv_next_sys_time_h='"'$gl_header'"' | |
6ec2e0f5 | 10831 | else |
c0c3707f | 10832 | gl_cv_next_sys_time_h='<'sys/time.h'>' |
6ec2e0f5 | 10833 | fi |
88b48903 | 10834 | |
88b48903 | 10835 | |
88b48903 | 10836 | fi |
c0c3707f CB |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 |
10838 | $as_echo "$gl_cv_next_sys_time_h" >&6; } | |
6ec2e0f5 | 10839 | fi |
c0c3707f | 10840 | NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h |
88b48903 | 10841 | |
6ec2e0f5 SDJ |
10842 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
10843 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 10844 | gl_next_as_first_directive='<'sys/time.h'>' |
6ec2e0f5 SDJ |
10845 | else |
10846 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f CB |
10847 | gl_next_as_first_directive=$gl_cv_next_sys_time_h |
10848 | fi | |
10849 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive | |
6ec2e0f5 | 10850 | |
6ec2e0f5 SDJ |
10851 | |
10852 | ||
10853 | ||
6ec2e0f5 | 10854 | |
c0c3707f CB |
10855 | if test $ac_cv_header_sys_time_h != yes; then |
10856 | HAVE_SYS_TIME_H=0 | |
10857 | fi | |
6ec2e0f5 | 10858 | |
6ec2e0f5 | 10859 | |
6ec2e0f5 | 10860 | |
6ec2e0f5 | 10861 | |
6ec2e0f5 | 10862 | |
c0c3707f CB |
10863 | if test $ac_cv_header_sys_socket_h != yes; then |
10864 | for ac_header in winsock2.h | |
10865 | do : | |
10866 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
10867 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
10868 | cat >>confdefs.h <<_ACEOF | |
10869 | #define HAVE_WINSOCK2_H 1 | |
6ec2e0f5 | 10870 | _ACEOF |
6ec2e0f5 | 10871 | |
6ec2e0f5 | 10872 | fi |
6ec2e0f5 | 10873 | |
c0c3707f | 10874 | done |
6ec2e0f5 | 10875 | |
c0c3707f CB |
10876 | fi |
10877 | if test "$ac_cv_header_winsock2_h" = yes; then | |
10878 | HAVE_WINSOCK2_H=1 | |
10879 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
10880 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
10881 | else | |
10882 | HAVE_WINSOCK2_H=0 | |
10883 | fi | |
10884 | ||
10885 | ||
10886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
10887 | $as_echo_n "checking for struct timeval... " >&6; } | |
10888 | if ${gl_cv_sys_struct_timeval+:} false; then : | |
10889 | $as_echo_n "(cached) " >&6 | |
10890 | else | |
10891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 10892 | /* end confdefs.h. */ |
c0c3707f CB |
10893 | #if HAVE_SYS_TIME_H |
10894 | #include <sys/time.h> | |
10895 | #endif | |
10896 | #include <time.h> | |
10897 | #if HAVE_WINSOCK2_H | |
10898 | # include <winsock2.h> | |
10899 | #endif | |
6ec2e0f5 SDJ |
10900 | |
10901 | int | |
10902 | main () | |
10903 | { | |
c0c3707f | 10904 | static struct timeval x; x.tv_sec = x.tv_usec; |
6ec2e0f5 SDJ |
10905 | ; |
10906 | return 0; | |
10907 | } | |
10908 | _ACEOF | |
10909 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 10910 | gl_cv_sys_struct_timeval=yes |
6ec2e0f5 | 10911 | else |
c0c3707f | 10912 | gl_cv_sys_struct_timeval=no |
6ec2e0f5 SDJ |
10913 | fi |
10914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
88b48903 | 10915 | |
c0c3707f CB |
10916 | fi |
10917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 | |
10918 | $as_echo "$gl_cv_sys_struct_timeval" >&6; } | |
10919 | if test $gl_cv_sys_struct_timeval != yes; then | |
10920 | HAVE_STRUCT_TIMEVAL=0 | |
10921 | else | |
10922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 | |
10923 | $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } | |
10924 | if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then : | |
10925 | $as_echo_n "(cached) " >&6 | |
10926 | else | |
10927 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
88b48903 | 10928 | /* end confdefs.h. */ |
c0c3707f CB |
10929 | #if HAVE_SYS_TIME_H |
10930 | #include <sys/time.h> | |
10931 | #endif | |
10932 | #include <time.h> | |
10933 | #if HAVE_WINSOCK2_H | |
10934 | # include <winsock2.h> | |
10935 | #endif | |
88b48903 WN |
10936 | |
10937 | int | |
10938 | main () | |
10939 | { | |
c0c3707f CB |
10940 | static struct timeval x; |
10941 | typedef int verify_tv_sec_type[ | |
10942 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | |
10943 | ]; | |
88b48903 WN |
10944 | |
10945 | ; | |
10946 | return 0; | |
10947 | } | |
10948 | _ACEOF | |
10949 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 10950 | gl_cv_sys_struct_timeval_tv_sec=yes |
88b48903 | 10951 | else |
c0c3707f | 10952 | gl_cv_sys_struct_timeval_tv_sec=no |
88b48903 WN |
10953 | fi |
10954 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c0c3707f | 10955 | |
88b48903 | 10956 | fi |
c0c3707f CB |
10957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 |
10958 | $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } | |
10959 | if test $gl_cv_sys_struct_timeval_tv_sec != yes; then | |
10960 | REPLACE_STRUCT_TIMEVAL=1 | |
88b48903 | 10961 | fi |
c0c3707f | 10962 | fi |
88b48903 | 10963 | |
c0c3707f CB |
10964 | |
10965 | ||
10966 | ||
10967 | ||
10968 | ||
10969 | ||
10970 | ||
10971 | ||
10972 | ||
10973 | ||
c0c3707f CB |
10974 | GNULIB_GLOB=0; |
10975 | HAVE_GLOB=1; | |
10976 | HAVE_GLOB_PATTERN_P=1; | |
10977 | REPLACE_GLOB=0; | |
10978 | REPLACE_GLOB_PATTERN_P=0; | |
10979 | ||
10980 | ||
10981 | ||
10982 | ||
10983 | ||
10984 | ||
10985 | ||
10986 | ||
10987 | ||
10988 | ||
10989 | ||
10990 | ||
10991 | ||
10992 | ||
10993 | ||
10994 | ||
10995 | ||
10996 | if test $gl_cv_have_include_next = yes; then | |
10997 | gl_cv_next_glob_h='<'glob.h'>' | |
10998 | else | |
10999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5 | |
11000 | $as_echo_n "checking absolute name of <glob.h>... " >&6; } | |
11001 | if ${gl_cv_next_glob_h+:} false; then : | |
11002 | $as_echo_n "(cached) " >&6 | |
88b48903 | 11003 | else |
c0c3707f CB |
11004 | |
11005 | if test $ac_cv_header_glob_h = yes; then | |
11006 | ||
11007 | ||
11008 | ||
11009 | ||
88b48903 WN |
11010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11011 | /* end confdefs.h. */ | |
c0c3707f CB |
11012 | #include <glob.h> |
11013 | _ACEOF | |
11014 | case "$host_os" in | |
11015 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
11016 | *) gl_absname_cpp="$ac_cpp" ;; | |
11017 | esac | |
88b48903 | 11018 | |
c0c3707f CB |
11019 | case "$host_os" in |
11020 | mingw*) | |
11021 | gl_dirsep_regex='[/\\]' | |
11022 | ;; | |
11023 | *) | |
11024 | gl_dirsep_regex='\/' | |
11025 | ;; | |
11026 | esac | |
11027 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
11028 | gl_header_literal_regex=`echo 'glob.h' \ | |
11029 | | sed -e "$gl_make_literal_regex_sed"` | |
11030 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
11031 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
11032 | s|^/[^/]|//&| | |
11033 | p | |
11034 | q | |
11035 | }' | |
11036 | ||
11037 | gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
11038 | sed -n "$gl_absolute_header_sed"` | |
11039 | ||
11040 | gl_header=$gl_cv_absolute_glob_h | |
11041 | gl_cv_next_glob_h='"'$gl_header'"' | |
11042 | else | |
11043 | gl_cv_next_glob_h='<'glob.h'>' | |
11044 | fi | |
88b48903 | 11045 | |
88b48903 | 11046 | |
88b48903 | 11047 | fi |
c0c3707f CB |
11048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5 |
11049 | $as_echo "$gl_cv_next_glob_h" >&6; } | |
11050 | fi | |
11051 | NEXT_GLOB_H=$gl_cv_next_glob_h | |
88b48903 | 11052 | |
c0c3707f CB |
11053 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
11054 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
11055 | gl_next_as_first_directive='<'glob.h'>' | |
11056 | else | |
11057 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
11058 | gl_next_as_first_directive=$gl_cv_next_glob_h | |
11059 | fi | |
11060 | NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive | |
88b48903 | 11061 | |
88b48903 WN |
11062 | |
11063 | ||
11064 | ||
2196f55f | 11065 | |
c0c3707f CB |
11066 | if test $ac_cv_header_glob_h = yes; then |
11067 | HAVE_GLOB_H=1 | |
11068 | else | |
11069 | HAVE_GLOB_H=0 | |
11070 | fi | |
2196f55f | 11071 | |
6ec2e0f5 | 11072 | |
c0c3707f CB |
11073 | GLOB_H='' |
11074 | if false; then | |
11075 | GLOB_H=glob.h | |
11076 | else | |
11077 | if test $ac_cv_header_glob_h != yes; then | |
11078 | GLOB_H=glob.h | |
11079 | fi | |
11080 | fi | |
11081 | ||
11082 | ||
11083 | if test -n "$GLOB_H"; then | |
11084 | GL_GENERATE_GLOB_H_TRUE= | |
11085 | GL_GENERATE_GLOB_H_FALSE='#' | |
88b48903 | 11086 | else |
c0c3707f CB |
11087 | GL_GENERATE_GLOB_H_TRUE='#' |
11088 | GL_GENERATE_GLOB_H_FALSE= | |
6ec2e0f5 SDJ |
11089 | fi |
11090 | ||
88b48903 | 11091 | |
88b48903 | 11092 | |
88b48903 | 11093 | |
88b48903 WN |
11094 | |
11095 | ||
11096 | ||
11097 | ||
11098 | ||
11099 | ||
11100 | ||
11101 | ||
8690e634 | 11102 | |
c0c3707f CB |
11103 | |
11104 | ||
c0c3707f | 11105 | |
5df4cba6 SM |
11106 | if test -z "$gl_pthreadlib_body_done"; then |
11107 | gl_pthread_api=no | |
11108 | LIBPTHREAD= | |
11109 | LIBPMULTITHREAD= | |
11110 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
11111 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
11112 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
11113 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
11114 | gl_have_pthread_h=yes | |
c0c3707f | 11115 | else |
5df4cba6 SM |
11116 | gl_have_pthread_h=no |
11117 | fi | |
c0c3707f | 11118 | |
5df4cba6 SM |
11119 | |
11120 | if test "$gl_have_pthread_h" = yes; then | |
11121 | # Other possible tests: | |
11122 | # -lpthreads (FSU threads, PCthreads) | |
11123 | # -lgthreads | |
11124 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
11125 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
11126 | # the second one only in libpthread, and lock.c needs it. | |
11127 | # | |
11128 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
11129 | # needs -pthread for some reason. See: | |
11130 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
11131 | save_LIBS=$LIBS | |
11132 | for gl_pthread in '' '-pthread'; do | |
11133 | LIBS="$LIBS $gl_pthread" | |
11134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11135 | /* end confdefs.h. */ |
5df4cba6 SM |
11136 | #include <pthread.h> |
11137 | pthread_mutex_t m; | |
11138 | pthread_mutexattr_t ma; | |
11139 | ||
8690e634 JK |
11140 | int |
11141 | main () | |
11142 | { | |
5df4cba6 SM |
11143 | pthread_mutex_lock (&m); |
11144 | pthread_mutexattr_init (&ma); | |
8690e634 JK |
11145 | ; |
11146 | return 0; | |
11147 | } | |
11148 | _ACEOF | |
5df4cba6 SM |
11149 | if ac_fn_c_try_link "$LINENO"; then : |
11150 | gl_pthread_api=yes | |
11151 | LIBPTHREAD=$gl_pthread | |
11152 | LIBPMULTITHREAD=$gl_pthread | |
c0c3707f | 11153 | fi |
5df4cba6 SM |
11154 | rm -f core conftest.err conftest.$ac_objext \ |
11155 | conftest$ac_exeext conftest.$ac_ext | |
11156 | LIBS=$save_LIBS | |
11157 | test $gl_pthread_api = yes && break | |
11158 | done | |
6ec2e0f5 | 11159 | |
5df4cba6 SM |
11160 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, |
11161 | # since it is defined as a macro on OSF/1.) | |
11162 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
11163 | # The program links fine without libpthread. But it may actually | |
11164 | # need to link with libpthread in order to create multiple threads. | |
11165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
11166 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
11167 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
c0c3707f CB |
11168 | $as_echo_n "(cached) " >&6 |
11169 | else | |
5df4cba6 SM |
11170 | ac_check_lib_save_LIBS=$LIBS |
11171 | LIBS="-lpthread $LIBS" | |
11172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11173 | /* end confdefs.h. */ |
5df4cba6 SM |
11174 | |
11175 | /* Override any GCC internal prototype to avoid an error. | |
11176 | Use char because int might match the return type of a GCC | |
11177 | builtin and then its argument prototype would still apply. */ | |
11178 | #ifdef __cplusplus | |
11179 | extern "C" | |
11180 | #endif | |
11181 | char pthread_kill (); | |
6ec2e0f5 SDJ |
11182 | int |
11183 | main () | |
11184 | { | |
5df4cba6 | 11185 | return pthread_kill (); |
6ec2e0f5 SDJ |
11186 | ; |
11187 | return 0; | |
11188 | } | |
11189 | _ACEOF | |
5df4cba6 SM |
11190 | if ac_fn_c_try_link "$LINENO"; then : |
11191 | ac_cv_lib_pthread_pthread_kill=yes | |
6ec2e0f5 | 11192 | else |
5df4cba6 | 11193 | ac_cv_lib_pthread_pthread_kill=no |
8690e634 | 11194 | fi |
5df4cba6 SM |
11195 | rm -f core conftest.err conftest.$ac_objext \ |
11196 | conftest$ac_exeext conftest.$ac_ext | |
11197 | LIBS=$ac_check_lib_save_LIBS | |
11198 | fi | |
11199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
11200 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
11201 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
11202 | LIBPMULTITHREAD=-lpthread | |
11203 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
11204 | # Therefore pthread_in_use() needs to actually try to create a | |
11205 | # thread: pthread_create from libc will fail, whereas | |
11206 | # pthread_create will actually create a thread. | |
11207 | # On Solaris 10 or newer, this test is no longer needed, because | |
11208 | # libc contains the fully functional pthread functions. | |
11209 | case "$host_os" in | |
11210 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
11211 | ||
11212 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
11213 | ||
11214 | esac | |
c0c3707f | 11215 | |
6ec2e0f5 | 11216 | fi |
8690e634 | 11217 | |
5df4cba6 SM |
11218 | elif test $gl_pthread_api != yes; then |
11219 | # Some library is needed. Try libpthread and libc_r. | |
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
11221 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
11222 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
11223 | $as_echo_n "(cached) " >&6 | |
11224 | else | |
11225 | ac_check_lib_save_LIBS=$LIBS | |
11226 | LIBS="-lpthread $LIBS" | |
11227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11228 | /* end confdefs.h. */ | |
c0c3707f | 11229 | |
5df4cba6 SM |
11230 | /* Override any GCC internal prototype to avoid an error. |
11231 | Use char because int might match the return type of a GCC | |
11232 | builtin and then its argument prototype would still apply. */ | |
11233 | #ifdef __cplusplus | |
11234 | extern "C" | |
11235 | #endif | |
11236 | char pthread_kill (); | |
11237 | int | |
11238 | main () | |
11239 | { | |
11240 | return pthread_kill (); | |
11241 | ; | |
11242 | return 0; | |
11243 | } | |
11244 | _ACEOF | |
11245 | if ac_fn_c_try_link "$LINENO"; then : | |
11246 | ac_cv_lib_pthread_pthread_kill=yes | |
11247 | else | |
11248 | ac_cv_lib_pthread_pthread_kill=no | |
11249 | fi | |
11250 | rm -f core conftest.err conftest.$ac_objext \ | |
11251 | conftest$ac_exeext conftest.$ac_ext | |
11252 | LIBS=$ac_check_lib_save_LIBS | |
11253 | fi | |
11254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
11255 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
11256 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
11257 | gl_pthread_api=yes | |
11258 | LIBPTHREAD=-lpthread | |
11259 | LIBPMULTITHREAD=-lpthread | |
11260 | fi | |
c0c3707f | 11261 | |
5df4cba6 SM |
11262 | if test $gl_pthread_api != yes; then |
11263 | # For FreeBSD 4. | |
11264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
11265 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
11266 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
11267 | $as_echo_n "(cached) " >&6 | |
11268 | else | |
11269 | ac_check_lib_save_LIBS=$LIBS | |
11270 | LIBS="-lc_r $LIBS" | |
11271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11272 | /* end confdefs.h. */ | |
c0c3707f | 11273 | |
5df4cba6 SM |
11274 | /* Override any GCC internal prototype to avoid an error. |
11275 | Use char because int might match the return type of a GCC | |
11276 | builtin and then its argument prototype would still apply. */ | |
11277 | #ifdef __cplusplus | |
11278 | extern "C" | |
11279 | #endif | |
11280 | char pthread_kill (); | |
11281 | int | |
11282 | main () | |
11283 | { | |
11284 | return pthread_kill (); | |
11285 | ; | |
11286 | return 0; | |
11287 | } | |
11288 | _ACEOF | |
11289 | if ac_fn_c_try_link "$LINENO"; then : | |
11290 | ac_cv_lib_c_r_pthread_kill=yes | |
11291 | else | |
11292 | ac_cv_lib_c_r_pthread_kill=no | |
11293 | fi | |
11294 | rm -f core conftest.err conftest.$ac_objext \ | |
11295 | conftest$ac_exeext conftest.$ac_ext | |
11296 | LIBS=$ac_check_lib_save_LIBS | |
11297 | fi | |
11298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
11299 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
11300 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
11301 | gl_pthread_api=yes | |
11302 | LIBPTHREAD=-lc_r | |
11303 | LIBPMULTITHREAD=-lc_r | |
11304 | fi | |
c0c3707f | 11305 | |
5df4cba6 SM |
11306 | fi |
11307 | fi | |
11308 | fi | |
11309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
11310 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
11311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
11312 | $as_echo "$gl_pthread_api" >&6; } | |
c0c3707f CB |
11313 | |
11314 | ||
5df4cba6 | 11315 | if test $gl_pthread_api = yes; then |
c0c3707f | 11316 | |
5df4cba6 | 11317 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h |
c0c3707f | 11318 | |
5df4cba6 | 11319 | fi |
c0c3707f | 11320 | |
5df4cba6 SM |
11321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11322 | /* end confdefs.h. */ | |
11323 | #include <sched.h> | |
11324 | int | |
11325 | main () | |
11326 | { | |
11327 | sched_yield (); | |
11328 | ; | |
11329 | return 0; | |
11330 | } | |
11331 | _ACEOF | |
11332 | if ac_fn_c_try_link "$LINENO"; then : | |
11333 | LIB_SCHED_YIELD= | |
c0c3707f | 11334 | |
5df4cba6 SM |
11335 | else |
11336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
11337 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
11338 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
c0c3707f | 11339 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 11340 | else |
5df4cba6 SM |
11341 | ac_check_lib_save_LIBS=$LIBS |
11342 | LIBS="-lrt $LIBS" | |
11343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 11344 | /* end confdefs.h. */ |
6ec2e0f5 | 11345 | |
5df4cba6 SM |
11346 | /* Override any GCC internal prototype to avoid an error. |
11347 | Use char because int might match the return type of a GCC | |
11348 | builtin and then its argument prototype would still apply. */ | |
11349 | #ifdef __cplusplus | |
11350 | extern "C" | |
11351 | #endif | |
11352 | char sched_yield (); | |
11353 | int | |
11354 | main () | |
11355 | { | |
11356 | return sched_yield (); | |
11357 | ; | |
11358 | return 0; | |
11359 | } | |
11360 | _ACEOF | |
11361 | if ac_fn_c_try_link "$LINENO"; then : | |
11362 | ac_cv_lib_rt_sched_yield=yes | |
11363 | else | |
11364 | ac_cv_lib_rt_sched_yield=no | |
11365 | fi | |
11366 | rm -f core conftest.err conftest.$ac_objext \ | |
11367 | conftest$ac_exeext conftest.$ac_ext | |
11368 | LIBS=$ac_check_lib_save_LIBS | |
11369 | fi | |
11370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 | |
11371 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
11372 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
11373 | LIB_SCHED_YIELD=-lrt | |
11374 | else | |
11375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
11376 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
11377 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
11378 | $as_echo_n "(cached) " >&6 | |
11379 | else | |
11380 | ac_check_lib_save_LIBS=$LIBS | |
11381 | LIBS="-lposix4 $LIBS" | |
11382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11383 | /* end confdefs.h. */ | |
6ec2e0f5 | 11384 | |
5df4cba6 SM |
11385 | /* Override any GCC internal prototype to avoid an error. |
11386 | Use char because int might match the return type of a GCC | |
11387 | builtin and then its argument prototype would still apply. */ | |
11388 | #ifdef __cplusplus | |
11389 | extern "C" | |
11390 | #endif | |
11391 | char sched_yield (); | |
11392 | int | |
11393 | main () | |
11394 | { | |
11395 | return sched_yield (); | |
11396 | ; | |
11397 | return 0; | |
11398 | } | |
11399 | _ACEOF | |
11400 | if ac_fn_c_try_link "$LINENO"; then : | |
11401 | ac_cv_lib_posix4_sched_yield=yes | |
11402 | else | |
11403 | ac_cv_lib_posix4_sched_yield=no | |
11404 | fi | |
11405 | rm -f core conftest.err conftest.$ac_objext \ | |
11406 | conftest$ac_exeext conftest.$ac_ext | |
11407 | LIBS=$ac_check_lib_save_LIBS | |
11408 | fi | |
11409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
11410 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
11411 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
11412 | LIB_SCHED_YIELD=-lposix4 | |
6ec2e0f5 | 11413 | fi |
8690e634 | 11414 | |
5df4cba6 | 11415 | fi |
8690e634 | 11416 | |
8690e634 | 11417 | |
5df4cba6 SM |
11418 | fi |
11419 | rm -f core conftest.err conftest.$ac_objext \ | |
11420 | conftest$ac_exeext conftest.$ac_ext | |
6ec2e0f5 SDJ |
11421 | |
11422 | ||
5df4cba6 | 11423 | gl_pthreadlib_body_done=done |
c0c3707f | 11424 | fi |
6ec2e0f5 | 11425 | |
6ec2e0f5 | 11426 | |
8690e634 JK |
11427 | |
11428 | ||
472fa5ee | 11429 | |
c0c3707f | 11430 | |
c0c3707f | 11431 | |
c0c3707f | 11432 | |
c0c3707f | 11433 | |
5df4cba6 SM |
11434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 |
11435 | $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } | |
11436 | if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : | |
11437 | $as_echo_n "(cached) " >&6 | |
11438 | else | |
11439 | case "$host_os" in | |
11440 | # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. | |
11441 | *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) | |
11442 | gl_cv_func_setlocale_null_all_mtsafe=no ;; | |
11443 | # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. | |
11444 | *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) | |
11445 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; | |
11446 | # If we don't know, obey --enable-cross-guesses. | |
11447 | *) | |
11448 | gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; | |
11449 | esac | |
c0c3707f | 11450 | |
5e8754f9 | 11451 | fi |
5df4cba6 SM |
11452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 |
11453 | $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } | |
11454 | case "$host_os" in | |
11455 | mingw*) ;; | |
11456 | *) | |
11457 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
11458 | gl_cv_func_setlocale_null_all_mtsafe="trivially yes" | |
11459 | fi | |
11460 | ;; | |
11461 | esac | |
11462 | case "$gl_cv_func_setlocale_null_all_mtsafe" in | |
11463 | *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; | |
11464 | *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; | |
11465 | esac | |
5e8754f9 SDJ |
11466 | |
11467 | cat >>confdefs.h <<_ACEOF | |
5df4cba6 | 11468 | #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE |
5e8754f9 SDJ |
11469 | _ACEOF |
11470 | ||
11471 | ||
5df4cba6 SM |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 |
11473 | $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } | |
11474 | if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : | |
11475 | $as_echo_n "(cached) " >&6 | |
11476 | else | |
11477 | case "$host_os" in | |
11478 | # Guess no on OpenBSD, AIX. | |
11479 | openbsd* | aix*) | |
11480 | gl_cv_func_setlocale_null_one_mtsafe=no ;; | |
11481 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. | |
11482 | *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) | |
11483 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; | |
11484 | # If we don't know, obey --enable-cross-guesses. | |
11485 | *) | |
11486 | gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; | |
11487 | esac | |
5abebf3c | 11488 | |
5df4cba6 SM |
11489 | fi |
11490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 | |
11491 | $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } | |
11492 | case "$host_os" in | |
11493 | mingw*) ;; | |
11494 | *) | |
11495 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
11496 | gl_cv_func_setlocale_null_one_mtsafe="trivially yes" | |
11497 | fi | |
11498 | ;; | |
11499 | esac | |
11500 | case "$gl_cv_func_setlocale_null_one_mtsafe" in | |
11501 | *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; | |
11502 | *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; | |
11503 | esac | |
5abebf3c | 11504 | |
c0c3707f | 11505 | cat >>confdefs.h <<_ACEOF |
5df4cba6 | 11506 | #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE |
5abebf3c | 11507 | _ACEOF |
c0c3707f CB |
11508 | |
11509 | ||
5df4cba6 SM |
11510 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then |
11511 | case "$host_os" in | |
11512 | mingw*) LIB_SETLOCALE_NULL= ;; | |
11513 | *) | |
11514 | ||
11515 | ||
11516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
11517 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
11518 | if ${gl_cv_have_weak+:} false; then : | |
11519 | $as_echo_n "(cached) " >&6 | |
5abebf3c | 11520 | else |
5df4cba6 SM |
11521 | gl_cv_have_weak=no |
11522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11523 | /* end confdefs.h. */ | |
11524 | extern void xyzzy (); | |
11525 | #pragma weak xyzzy | |
11526 | int | |
11527 | main () | |
11528 | { | |
11529 | xyzzy(); | |
11530 | ; | |
11531 | return 0; | |
11532 | } | |
11533 | _ACEOF | |
11534 | if ac_fn_c_try_link "$LINENO"; then : | |
11535 | gl_cv_have_weak=maybe | |
5abebf3c | 11536 | fi |
5df4cba6 SM |
11537 | rm -f core conftest.err conftest.$ac_objext \ |
11538 | conftest$ac_exeext conftest.$ac_ext | |
11539 | if test $gl_cv_have_weak = maybe; then | |
11540 | if test "$cross_compiling" = yes; then : | |
11541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11542 | /* end confdefs.h. */ | |
11543 | #ifdef __ELF__ | |
11544 | Extensible Linking Format | |
11545 | #endif | |
c0c3707f | 11546 | |
5df4cba6 SM |
11547 | _ACEOF |
11548 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11549 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
11550 | gl_cv_have_weak="guessing yes" | |
11551 | else | |
11552 | gl_cv_have_weak="guessing no" | |
11553 | fi | |
11554 | rm -f conftest* | |
5abebf3c CB |
11555 | |
11556 | ||
5df4cba6 SM |
11557 | else |
11558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11559 | /* end confdefs.h. */ | |
5abebf3c | 11560 | |
5df4cba6 SM |
11561 | #include <stdio.h> |
11562 | #pragma weak fputs | |
11563 | int main () | |
11564 | { | |
11565 | return (fputs == NULL); | |
11566 | } | |
c0c3707f | 11567 | _ACEOF |
5df4cba6 SM |
11568 | if ac_fn_c_try_run "$LINENO"; then : |
11569 | gl_cv_have_weak=yes | |
11570 | else | |
11571 | gl_cv_have_weak=no | |
11572 | fi | |
11573 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11574 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11575 | fi | |
11576 | ||
11577 | fi | |
11578 | case " $LDFLAGS " in | |
11579 | *" -static "*) gl_cv_have_weak=no ;; | |
11580 | esac | |
11581 | case "$gl_cv_have_weak" in | |
11582 | *yes) | |
11583 | case "$host_os" in | |
11584 | freebsd* | dragonfly*) | |
11585 | : > conftest1.c | |
11586 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
11587 | cat <<EOF > conftest2.c | |
11588 | #include <pthread.h> | |
11589 | #pragma weak pthread_mutexattr_gettype | |
11590 | int main () | |
11591 | { | |
11592 | return (pthread_mutexattr_gettype != NULL); | |
11593 | } | |
11594 | EOF | |
11595 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
11596 | || gl_cv_have_weak=no | |
11597 | rm -f conftest1.c libempty.so conftest2.c conftest | |
11598 | ;; | |
11599 | esac | |
11600 | ;; | |
11601 | esac | |
5abebf3c | 11602 | |
c0c3707f | 11603 | fi |
5df4cba6 SM |
11604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 |
11605 | $as_echo "$gl_cv_have_weak" >&6; } | |
11606 | case "$gl_cv_have_weak" in | |
11607 | *yes) | |
5abebf3c | 11608 | |
5df4cba6 | 11609 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h |
5abebf3c | 11610 | |
5df4cba6 SM |
11611 | ;; |
11612 | esac | |
11613 | ||
11614 | case "$gl_cv_have_weak" in | |
11615 | *yes) LIB_SETLOCALE_NULL= ;; | |
11616 | *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; | |
11617 | esac | |
11618 | ;; | |
11619 | esac | |
5abebf3c | 11620 | else |
5df4cba6 | 11621 | LIB_SETLOCALE_NULL= |
5abebf3c | 11622 | fi |
5abebf3c CB |
11623 | |
11624 | ||
11625 | ||
5abebf3c | 11626 | |
5abebf3c | 11627 | |
5df4cba6 SM |
11628 | GNULIB_SOCKET=0; |
11629 | GNULIB_CONNECT=0; | |
11630 | GNULIB_ACCEPT=0; | |
11631 | GNULIB_BIND=0; | |
11632 | GNULIB_GETPEERNAME=0; | |
11633 | GNULIB_GETSOCKNAME=0; | |
11634 | GNULIB_GETSOCKOPT=0; | |
11635 | GNULIB_LISTEN=0; | |
11636 | GNULIB_RECV=0; | |
11637 | GNULIB_SEND=0; | |
11638 | GNULIB_RECVFROM=0; | |
11639 | GNULIB_SENDTO=0; | |
11640 | GNULIB_SETSOCKOPT=0; | |
11641 | GNULIB_SHUTDOWN=0; | |
11642 | GNULIB_ACCEPT4=0; | |
11643 | HAVE_STRUCT_SOCKADDR_STORAGE=1; | |
11644 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; | |
11645 | ||
11646 | HAVE_SA_FAMILY_T=1; | |
11647 | HAVE_ACCEPT4=1; | |
c0c3707f CB |
11648 | |
11649 | ||
11650 | ||
11651 | ||
11652 | ||
5df4cba6 SM |
11653 | case "$host_os" in |
11654 | osf*) | |
c0c3707f | 11655 | |
5df4cba6 | 11656 | $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h |
c0c3707f | 11657 | |
5df4cba6 SM |
11658 | ;; |
11659 | esac | |
c0c3707f | 11660 | |
5df4cba6 SM |
11661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5 |
11662 | $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; } | |
11663 | if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : | |
5abebf3c CB |
11664 | $as_echo_n "(cached) " >&6 |
11665 | else | |
5df4cba6 SM |
11666 | |
11667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11668 | /* end confdefs.h. */ |
c0c3707f | 11669 | #include <sys/socket.h> |
c0c3707f CB |
11670 | int |
11671 | main () | |
11672 | { | |
5df4cba6 | 11673 | |
c0c3707f CB |
11674 | ; |
11675 | return 0; | |
11676 | } | |
11677 | _ACEOF | |
11678 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 11679 | gl_cv_header_sys_socket_h_selfcontained=yes |
5abebf3c | 11680 | else |
5df4cba6 | 11681 | gl_cv_header_sys_socket_h_selfcontained=no |
5abebf3c | 11682 | fi |
c0c3707f | 11683 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 11684 | |
5df4cba6 SM |
11685 | fi |
11686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 | |
11687 | $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } | |
11688 | if test $gl_cv_header_sys_socket_h_selfcontained = yes; then | |
11689 | for ac_func in shutdown | |
11690 | do : | |
11691 | ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" | |
11692 | if test "x$ac_cv_func_shutdown" = xyes; then : | |
11693 | cat >>confdefs.h <<_ACEOF | |
11694 | #define HAVE_SHUTDOWN 1 | |
11695 | _ACEOF | |
c0c3707f | 11696 | |
5df4cba6 SM |
11697 | fi |
11698 | done | |
c0c3707f | 11699 | |
5df4cba6 SM |
11700 | if test $ac_cv_func_shutdown = yes; then |
11701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5 | |
11702 | $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; } | |
11703 | if ${gl_cv_header_sys_socket_h_shut+:} false; then : | |
5abebf3c CB |
11704 | $as_echo_n "(cached) " >&6 |
11705 | else | |
5df4cba6 SM |
11706 | |
11707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 11708 | /* end confdefs.h. */ |
c0c3707f | 11709 | #include <sys/socket.h> |
c0c3707f CB |
11710 | int |
11711 | main () | |
11712 | { | |
5df4cba6 | 11713 | int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; |
c0c3707f CB |
11714 | ; |
11715 | return 0; | |
11716 | } | |
11717 | _ACEOF | |
11718 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 11719 | gl_cv_header_sys_socket_h_shut=yes |
c0c3707f | 11720 | else |
5df4cba6 | 11721 | gl_cv_header_sys_socket_h_shut=no |
c0c3707f CB |
11722 | fi |
11723 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5abebf3c | 11724 | |
5df4cba6 SM |
11725 | fi |
11726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 | |
11727 | $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } | |
11728 | if test $gl_cv_header_sys_socket_h_shut = no; then | |
11729 | SYS_SOCKET_H='sys/socket.h' | |
11730 | fi | |
11731 | fi | |
c0c3707f | 11732 | fi |
5df4cba6 | 11733 | # We need to check for ws2tcpip.h now. |
5abebf3c | 11734 | |
5abebf3c | 11735 | |
5abebf3c | 11736 | |
5abebf3c CB |
11737 | |
11738 | ||
11739 | ||
11740 | ||
c0c3707f CB |
11741 | |
11742 | ||
11743 | ||
11744 | ||
11745 | if test $gl_cv_have_include_next = yes; then | |
5df4cba6 | 11746 | gl_cv_next_sys_socket_h='<'sys/socket.h'>' |
c0c3707f | 11747 | else |
5df4cba6 SM |
11748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5 |
11749 | $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; } | |
11750 | if ${gl_cv_next_sys_socket_h+:} false; then : | |
5abebf3c CB |
11751 | $as_echo_n "(cached) " >&6 |
11752 | else | |
5abebf3c | 11753 | |
5df4cba6 | 11754 | if test $ac_cv_header_sys_socket_h = yes; then |
5abebf3c | 11755 | |
5abebf3c CB |
11756 | |
11757 | ||
c0c3707f CB |
11758 | |
11759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11760 | /* end confdefs.h. */ | |
5df4cba6 | 11761 | #include <sys/socket.h> |
c0c3707f CB |
11762 | _ACEOF |
11763 | case "$host_os" in | |
11764 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
11765 | *) gl_absname_cpp="$ac_cpp" ;; | |
11766 | esac | |
11767 | ||
11768 | case "$host_os" in | |
11769 | mingw*) | |
11770 | gl_dirsep_regex='[/\\]' | |
5abebf3c CB |
11771 | ;; |
11772 | *) | |
c0c3707f | 11773 | gl_dirsep_regex='\/' |
5abebf3c CB |
11774 | ;; |
11775 | esac | |
c0c3707f | 11776 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' |
5df4cba6 | 11777 | gl_header_literal_regex=`echo 'sys/socket.h' \ |
c0c3707f CB |
11778 | | sed -e "$gl_make_literal_regex_sed"` |
11779 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
11780 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
11781 | s|^/[^/]|//&| | |
11782 | p | |
11783 | q | |
11784 | }' | |
5abebf3c | 11785 | |
5df4cba6 | 11786 | gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
c0c3707f | 11787 | sed -n "$gl_absolute_header_sed"` |
5abebf3c | 11788 | |
5df4cba6 SM |
11789 | gl_header=$gl_cv_absolute_sys_socket_h |
11790 | gl_cv_next_sys_socket_h='"'$gl_header'"' | |
c0c3707f | 11791 | else |
5df4cba6 | 11792 | gl_cv_next_sys_socket_h='<'sys/socket.h'>' |
c0c3707f | 11793 | fi |
5abebf3c | 11794 | |
5abebf3c | 11795 | |
5abebf3c | 11796 | fi |
5df4cba6 SM |
11797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 |
11798 | $as_echo "$gl_cv_next_sys_socket_h" >&6; } | |
c0c3707f | 11799 | fi |
5df4cba6 | 11800 | NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h |
c0c3707f CB |
11801 | |
11802 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
11803 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5df4cba6 | 11804 | gl_next_as_first_directive='<'sys/socket.h'>' |
c0c3707f CB |
11805 | else |
11806 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5df4cba6 | 11807 | gl_next_as_first_directive=$gl_cv_next_sys_socket_h |
c0c3707f | 11808 | fi |
5df4cba6 | 11809 | NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive |
5abebf3c CB |
11810 | |
11811 | ||
c0c3707f CB |
11812 | |
11813 | ||
5df4cba6 SM |
11814 | if test $ac_cv_header_sys_socket_h = yes; then |
11815 | HAVE_SYS_SOCKET_H=1 | |
11816 | else | |
11817 | HAVE_SYS_SOCKET_H=0 | |
11818 | fi | |
c0c3707f | 11819 | |
5abebf3c | 11820 | |
c0c3707f | 11821 | |
5df4cba6 SM |
11822 | if test $ac_cv_header_sys_socket_h = yes; then |
11823 | HAVE_WS2TCPIP_H=0 | |
11824 | else | |
11825 | if test $ac_cv_header_ws2tcpip_h = yes; then | |
11826 | HAVE_WS2TCPIP_H=1 | |
11827 | else | |
11828 | HAVE_WS2TCPIP_H=0 | |
11829 | fi | |
11830 | fi | |
11831 | ||
11832 | ||
11833 | ||
11834 | ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " | |
11835 | /* sys/types.h is not needed according to POSIX, but the | |
11836 | sys/socket.h in i386-unknown-freebsd4.10 and | |
11837 | powerpc-apple-darwin5.5 required it. */ | |
11838 | #include <sys/types.h> | |
11839 | #ifdef HAVE_SYS_SOCKET_H | |
11840 | #include <sys/socket.h> | |
11841 | #endif | |
11842 | #ifdef HAVE_WS2TCPIP_H | |
11843 | #include <ws2tcpip.h> | |
11844 | #endif | |
11845 | ||
11846 | " | |
11847 | if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : | |
11848 | ||
11849 | cat >>confdefs.h <<_ACEOF | |
11850 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | |
5abebf3c | 11851 | _ACEOF |
5df4cba6 SM |
11852 | |
11853 | ||
5abebf3c | 11854 | fi |
5df4cba6 SM |
11855 | ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " |
11856 | /* sys/types.h is not needed according to POSIX, but the | |
11857 | sys/socket.h in i386-unknown-freebsd4.10 and | |
11858 | powerpc-apple-darwin5.5 required it. */ | |
11859 | #include <sys/types.h> | |
11860 | #ifdef HAVE_SYS_SOCKET_H | |
11861 | #include <sys/socket.h> | |
11862 | #endif | |
11863 | #ifdef HAVE_WS2TCPIP_H | |
11864 | #include <ws2tcpip.h> | |
11865 | #endif | |
11866 | ||
11867 | " | |
11868 | if test "x$ac_cv_type_sa_family_t" = xyes; then : | |
11869 | ||
11870 | cat >>confdefs.h <<_ACEOF | |
11871 | #define HAVE_SA_FAMILY_T 1 | |
11872 | _ACEOF | |
11873 | ||
11874 | ||
5abebf3c | 11875 | fi |
5df4cba6 SM |
11876 | |
11877 | if test $ac_cv_type_struct_sockaddr_storage = no; then | |
11878 | HAVE_STRUCT_SOCKADDR_STORAGE=0 | |
11879 | fi | |
11880 | if test $ac_cv_type_sa_family_t = no; then | |
11881 | HAVE_SA_FAMILY_T=0 | |
c0c3707f | 11882 | fi |
5df4cba6 SM |
11883 | if test $ac_cv_type_struct_sockaddr_storage != no; then |
11884 | ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h> | |
11885 | #ifdef HAVE_SYS_SOCKET_H | |
11886 | #include <sys/socket.h> | |
11887 | #endif | |
11888 | #ifdef HAVE_WS2TCPIP_H | |
11889 | #include <ws2tcpip.h> | |
11890 | #endif | |
11891 | ||
11892 | " | |
11893 | if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : | |
11894 | ||
11895 | cat >>confdefs.h <<_ACEOF | |
11896 | #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 | |
11897 | _ACEOF | |
11898 | ||
5abebf3c | 11899 | |
5abebf3c | 11900 | else |
5df4cba6 | 11901 | HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 |
5abebf3c CB |
11902 | fi |
11903 | ||
5df4cba6 SM |
11904 | fi |
11905 | if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ | |
11906 | || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then | |
11907 | SYS_SOCKET_H='sys/socket.h' | |
11908 | fi | |
5abebf3c | 11909 | |
5abebf3c | 11910 | |
5df4cba6 SM |
11911 | |
11912 | ||
11913 | if test $ac_cv_header_sys_socket_h != yes; then | |
11914 | for ac_header in winsock2.h | |
11915 | do : | |
11916 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
11917 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
11918 | cat >>confdefs.h <<_ACEOF | |
11919 | #define HAVE_WINSOCK2_H 1 | |
11920 | _ACEOF | |
11921 | ||
11922 | fi | |
11923 | ||
11924 | done | |
11925 | ||
11926 | fi | |
11927 | if test "$ac_cv_header_winsock2_h" = yes; then | |
11928 | HAVE_WINSOCK2_H=1 | |
11929 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
11930 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
11931 | else | |
11932 | HAVE_WINSOCK2_H=0 | |
11933 | fi | |
11934 | ||
11935 | ||
11936 | ||
11937 | ||
11938 | ||
11939 | ||
11940 | ||
11941 | ||
11942 | ||
11943 | ||
11944 | ||
11945 | ||
11946 | ||
698be2d8 CB |
11947 | |
11948 | ||
5df4cba6 SM |
11949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 |
11950 | $as_echo_n "checking for IPv4 sockets... " >&6; } | |
11951 | if ${gl_cv_socket_ipv4+:} false; then : | |
5abebf3c CB |
11952 | $as_echo_n "(cached) " >&6 |
11953 | else | |
c0c3707f | 11954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 11955 | /* end confdefs.h. */ |
5df4cba6 SM |
11956 | #include <sys/types.h> |
11957 | #ifdef HAVE_SYS_SOCKET_H | |
11958 | #include <sys/socket.h> | |
11959 | #endif | |
11960 | #ifdef HAVE_NETINET_IN_H | |
11961 | #include <netinet/in.h> | |
11962 | #endif | |
11963 | #ifdef HAVE_WINSOCK2_H | |
11964 | #include <winsock2.h> | |
11965 | #endif | |
5abebf3c CB |
11966 | int |
11967 | main () | |
11968 | { | |
5df4cba6 SM |
11969 | int x = AF_INET; struct in_addr y; struct sockaddr_in z; |
11970 | if (&x && &y && &z) return 0; | |
5abebf3c CB |
11971 | ; |
11972 | return 0; | |
11973 | } | |
11974 | _ACEOF | |
c0c3707f | 11975 | if ac_fn_c_try_compile "$LINENO"; then : |
5df4cba6 | 11976 | gl_cv_socket_ipv4=yes |
5abebf3c | 11977 | else |
5df4cba6 | 11978 | gl_cv_socket_ipv4=no |
5abebf3c | 11979 | fi |
c0c3707f | 11980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 11981 | fi |
5df4cba6 SM |
11982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5 |
11983 | $as_echo "$gl_cv_socket_ipv4" >&6; } | |
11984 | if test $gl_cv_socket_ipv4 = yes; then | |
5abebf3c | 11985 | |
5df4cba6 | 11986 | $as_echo "#define HAVE_IPV4 1" >>confdefs.h |
5abebf3c | 11987 | |
5df4cba6 | 11988 | fi |
5abebf3c | 11989 | |
5df4cba6 SM |
11990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 |
11991 | $as_echo_n "checking for IPv6 sockets... " >&6; } | |
11992 | if ${gl_cv_socket_ipv6+:} false; then : | |
5abebf3c CB |
11993 | $as_echo_n "(cached) " >&6 |
11994 | else | |
c0c3707f | 11995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 11996 | /* end confdefs.h. */ |
5df4cba6 SM |
11997 | #include <sys/types.h> |
11998 | #ifdef HAVE_SYS_SOCKET_H | |
11999 | #include <sys/socket.h> | |
5abebf3c | 12000 | #endif |
5df4cba6 SM |
12001 | #ifdef HAVE_NETINET_IN_H |
12002 | #include <netinet/in.h> | |
12003 | #endif | |
12004 | #ifdef HAVE_WINSOCK2_H | |
12005 | #include <winsock2.h> | |
12006 | #endif | |
12007 | #ifdef HAVE_WS2TCPIP_H | |
12008 | #include <ws2tcpip.h> | |
12009 | #endif | |
12010 | int | |
12011 | main () | |
12012 | { | |
12013 | int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; | |
12014 | if (&x && &y && &z) return 0; | |
12015 | ; | |
12016 | return 0; | |
12017 | } | |
12018 | _ACEOF | |
12019 | if ac_fn_c_try_compile "$LINENO"; then : | |
12020 | gl_cv_socket_ipv6=yes | |
12021 | else | |
12022 | gl_cv_socket_ipv6=no | |
12023 | fi | |
12024 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12025 | fi | |
12026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5 | |
12027 | $as_echo "$gl_cv_socket_ipv6" >&6; } | |
12028 | if test $gl_cv_socket_ipv6 = yes; then | |
12029 | ||
12030 | $as_echo "#define HAVE_IPV6 1" >>confdefs.h | |
12031 | ||
12032 | fi | |
12033 | ||
12034 | ||
12035 | ||
12036 | ||
12037 | ||
12038 | ||
12039 | ||
12040 | ||
12041 | ||
12042 | ||
12043 | ||
12044 | ||
12045 | ||
12046 | if test $gl_cv_have_include_next = yes; then | |
12047 | gl_cv_next_limits_h='<'limits.h'>' | |
12048 | else | |
12049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5 | |
12050 | $as_echo_n "checking absolute name of <limits.h>... " >&6; } | |
12051 | if ${gl_cv_next_limits_h+:} false; then : | |
12052 | $as_echo_n "(cached) " >&6 | |
12053 | else | |
12054 | ||
12055 | if test $ac_cv_header_limits_h = yes; then | |
12056 | ||
12057 | ||
12058 | ||
12059 | ||
12060 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12061 | /* end confdefs.h. */ | |
12062 | #include <limits.h> | |
12063 | _ACEOF | |
12064 | case "$host_os" in | |
12065 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
12066 | *) gl_absname_cpp="$ac_cpp" ;; | |
12067 | esac | |
12068 | ||
12069 | case "$host_os" in | |
12070 | mingw*) | |
12071 | gl_dirsep_regex='[/\\]' | |
12072 | ;; | |
12073 | *) | |
12074 | gl_dirsep_regex='\/' | |
12075 | ;; | |
12076 | esac | |
12077 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
12078 | gl_header_literal_regex=`echo 'limits.h' \ | |
12079 | | sed -e "$gl_make_literal_regex_sed"` | |
12080 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
12081 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
12082 | s|^/[^/]|//&| | |
12083 | p | |
12084 | q | |
12085 | }' | |
12086 | ||
12087 | gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
12088 | sed -n "$gl_absolute_header_sed"` | |
12089 | ||
12090 | gl_header=$gl_cv_absolute_limits_h | |
12091 | gl_cv_next_limits_h='"'$gl_header'"' | |
12092 | else | |
12093 | gl_cv_next_limits_h='<'limits.h'>' | |
12094 | fi | |
12095 | ||
12096 | ||
12097 | fi | |
12098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 | |
12099 | $as_echo "$gl_cv_next_limits_h" >&6; } | |
12100 | fi | |
12101 | NEXT_LIMITS_H=$gl_cv_next_limits_h | |
12102 | ||
12103 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
12104 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
12105 | gl_next_as_first_directive='<'limits.h'>' | |
12106 | else | |
12107 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
12108 | gl_next_as_first_directive=$gl_cv_next_limits_h | |
12109 | fi | |
12110 | NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive | |
12111 | ||
12112 | ||
12113 | ||
12114 | ||
12115 | ||
12116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5 | |
12117 | $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; } | |
12118 | if ${gl_cv_header_limits_width+:} false; then : | |
12119 | $as_echo_n "(cached) " >&6 | |
12120 | else | |
12121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12122 | /* end confdefs.h. */ | |
12123 | #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | |
12124 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | |
12125 | #endif | |
12126 | #include <limits.h> | |
12127 | long long llm = LLONG_MAX; | |
12128 | int wb = WORD_BIT; | |
12129 | int ullw = ULLONG_WIDTH; | |
c0c3707f | 12130 | |
5abebf3c CB |
12131 | int |
12132 | main () | |
12133 | { | |
c0c3707f | 12134 | |
5abebf3c CB |
12135 | ; |
12136 | return 0; | |
12137 | } | |
12138 | _ACEOF | |
c0c3707f | 12139 | if ac_fn_c_try_compile "$LINENO"; then : |
5df4cba6 | 12140 | gl_cv_header_limits_width=yes |
5abebf3c | 12141 | else |
5df4cba6 | 12142 | gl_cv_header_limits_width=no |
5abebf3c | 12143 | fi |
c0c3707f | 12144 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5abebf3c | 12145 | fi |
5df4cba6 SM |
12146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 |
12147 | $as_echo "$gl_cv_header_limits_width" >&6; } | |
12148 | if test "$gl_cv_header_limits_width" = yes; then | |
12149 | LIMITS_H= | |
c0c3707f | 12150 | else |
5df4cba6 | 12151 | LIMITS_H=limits.h |
c0c3707f | 12152 | fi |
5abebf3c | 12153 | |
5df4cba6 SM |
12154 | if test -n "$LIMITS_H"; then |
12155 | GL_GENERATE_LIMITS_H_TRUE= | |
12156 | GL_GENERATE_LIMITS_H_FALSE='#' | |
12157 | else | |
12158 | GL_GENERATE_LIMITS_H_TRUE='#' | |
12159 | GL_GENERATE_LIMITS_H_FALSE= | |
12160 | fi | |
c0c3707f CB |
12161 | |
12162 | ||
5abebf3c | 12163 | |
5df4cba6 SM |
12164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
12165 | $as_echo_n "checking for wint_t... " >&6; } | |
12166 | if ${gt_cv_c_wint_t+:} false; then : | |
c0c3707f | 12167 | $as_echo_n "(cached) " >&6 |
c0c3707f CB |
12168 | else |
12169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5abebf3c | 12170 | /* end confdefs.h. */ |
5df4cba6 SM |
12171 | #include <wchar.h> |
12172 | wint_t foo = (wchar_t)'\0'; | |
5abebf3c CB |
12173 | int |
12174 | main () | |
12175 | { | |
5df4cba6 | 12176 | |
5abebf3c CB |
12177 | ; |
12178 | return 0; | |
12179 | } | |
12180 | _ACEOF | |
5df4cba6 SM |
12181 | if ac_fn_c_try_compile "$LINENO"; then : |
12182 | gt_cv_c_wint_t=yes | |
c0c3707f | 12183 | else |
5df4cba6 | 12184 | gt_cv_c_wint_t=no |
c0c3707f | 12185 | fi |
5df4cba6 | 12186 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c0c3707f | 12187 | fi |
5df4cba6 SM |
12188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 |
12189 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
12190 | if test $gt_cv_c_wint_t = yes; then | |
5abebf3c | 12191 | |
5df4cba6 | 12192 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
5abebf3c CB |
12193 | |
12194 | ||
9c9d63b1 PM |
12195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5 |
12196 | $as_echo_n "checking whether wint_t is large enough... " >&6; } | |
12197 | if ${gl_cv_type_wint_t_large_enough+:} false; then : | |
5df4cba6 SM |
12198 | $as_echo_n "(cached) " >&6 |
12199 | else | |
12200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12201 | /* end confdefs.h. */ | |
5df4cba6 | 12202 | #include <wchar.h> |
9c9d63b1 | 12203 | int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; |
5df4cba6 SM |
12204 | |
12205 | int | |
12206 | main () | |
12207 | { | |
12208 | ||
12209 | ; | |
12210 | return 0; | |
12211 | } | |
12212 | _ACEOF | |
12213 | if ac_fn_c_try_compile "$LINENO"; then : | |
9c9d63b1 | 12214 | gl_cv_type_wint_t_large_enough=yes |
5df4cba6 | 12215 | else |
9c9d63b1 | 12216 | gl_cv_type_wint_t_large_enough=no |
5df4cba6 SM |
12217 | fi |
12218 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12219 | fi | |
9c9d63b1 PM |
12220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5 |
12221 | $as_echo "$gl_cv_type_wint_t_large_enough" >&6; } | |
12222 | if test $gl_cv_type_wint_t_large_enough = no; then | |
5df4cba6 SM |
12223 | GNULIB_OVERRIDES_WINT_T=1 |
12224 | else | |
12225 | GNULIB_OVERRIDES_WINT_T=0 | |
12226 | fi | |
12227 | else | |
12228 | GNULIB_OVERRIDES_WINT_T=0 | |
c0c3707f | 12229 | fi |
5abebf3c | 12230 | |
5abebf3c CB |
12231 | |
12232 | ||
12233 | ||
12234 | ||
12235 | ||
5df4cba6 | 12236 | |
9c9d63b1 PM |
12237 | |
12238 | ||
12239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5 | |
12240 | $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; } | |
12241 | if ${gl_cv_c_multiarch+:} false; then : | |
12242 | $as_echo_n "(cached) " >&6 | |
12243 | else | |
12244 | gl_cv_c_multiarch=no | |
12245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f CB |
12246 | /* end confdefs.h. */ |
12247 | #ifndef __APPLE_CC__ | |
9c9d63b1 PM |
12248 | not a universal capable compiler |
12249 | #endif | |
12250 | typedef int dummy; | |
5abebf3c | 12251 | |
c0c3707f CB |
12252 | _ACEOF |
12253 | if ac_fn_c_try_compile "$LINENO"; then : | |
5abebf3c | 12254 | |
9c9d63b1 PM |
12255 | arch= |
12256 | prev= | |
12257 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
12258 | if test -n "$prev"; then | |
12259 | case $word in | |
12260 | i?86 | x86_64 | ppc | ppc64 | arm | arm64) | |
12261 | if test -z "$arch" || test "$arch" = "$word"; then | |
12262 | arch="$word" | |
12263 | else | |
12264 | gl_cv_c_multiarch=yes | |
12265 | fi | |
12266 | ;; | |
12267 | esac | |
12268 | prev= | |
12269 | else | |
12270 | if test "x$word" = "x-arch"; then | |
12271 | prev=arch | |
12272 | fi | |
12273 | fi | |
12274 | done | |
5abebf3c | 12275 | |
c0c3707f CB |
12276 | fi |
12277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9c9d63b1 PM |
12278 | |
12279 | fi | |
12280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5 | |
12281 | $as_echo "$gl_cv_c_multiarch" >&6; } | |
c0c3707f CB |
12282 | if test $gl_cv_c_multiarch = yes; then |
12283 | APPLE_UNIVERSAL_BUILD=1 | |
12284 | else | |
12285 | APPLE_UNIVERSAL_BUILD=0 | |
12286 | fi | |
5abebf3c | 12287 | |
5abebf3c | 12288 | |
5abebf3c | 12289 | |
5abebf3c CB |
12290 | |
12291 | ||
5abebf3c | 12292 | |
5abebf3c | 12293 | |
5abebf3c | 12294 | |
5df4cba6 | 12295 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
5abebf3c | 12296 | |
5abebf3c | 12297 | |
5df4cba6 | 12298 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
5abebf3c | 12299 | |
c0c3707f CB |
12300 | |
12301 | ||
12302 | if test $ac_cv_header_wchar_h = yes; then | |
12303 | HAVE_WCHAR_H=1 | |
12304 | else | |
12305 | HAVE_WCHAR_H=0 | |
5abebf3c | 12306 | fi |
c0c3707f CB |
12307 | |
12308 | ||
9c9d63b1 PM |
12309 | |
12310 | if test $ac_cv_header_inttypes_h = yes; then | |
c0c3707f CB |
12311 | HAVE_INTTYPES_H=1 |
12312 | else | |
12313 | HAVE_INTTYPES_H=0 | |
5abebf3c CB |
12314 | fi |
12315 | ||
12316 | ||
9c9d63b1 PM |
12317 | |
12318 | if test $ac_cv_header_sys_types_h = yes; then | |
c0c3707f CB |
12319 | HAVE_SYS_TYPES_H=1 |
12320 | else | |
12321 | HAVE_SYS_TYPES_H=0 | |
12322 | fi | |
12323 | ||
5abebf3c CB |
12324 | |
12325 | ||
12326 | ||
12327 | ||
5abebf3c | 12328 | |
5abebf3c | 12329 | |
5abebf3c | 12330 | |
5abebf3c | 12331 | |
5abebf3c CB |
12332 | |
12333 | ||
c0c3707f CB |
12334 | if test $gl_cv_have_include_next = yes; then |
12335 | gl_cv_next_stdint_h='<'stdint.h'>' | |
12336 | else | |
12337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
12338 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
12339 | if ${gl_cv_next_stdint_h+:} false; then : | |
12340 | $as_echo_n "(cached) " >&6 | |
12341 | else | |
5abebf3c | 12342 | |
c0c3707f | 12343 | if test $ac_cv_header_stdint_h = yes; then |
5abebf3c | 12344 | |
5abebf3c CB |
12345 | |
12346 | ||
12347 | ||
c0c3707f | 12348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 12349 | /* end confdefs.h. */ |
c0c3707f | 12350 | #include <stdint.h> |
5abebf3c | 12351 | _ACEOF |
c0c3707f CB |
12352 | case "$host_os" in |
12353 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
12354 | *) gl_absname_cpp="$ac_cpp" ;; | |
12355 | esac | |
5abebf3c | 12356 | |
c0c3707f CB |
12357 | case "$host_os" in |
12358 | mingw*) | |
12359 | gl_dirsep_regex='[/\\]' | |
12360 | ;; | |
12361 | *) | |
12362 | gl_dirsep_regex='\/' | |
12363 | ;; | |
12364 | esac | |
12365 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
12366 | gl_header_literal_regex=`echo 'stdint.h' \ | |
12367 | | sed -e "$gl_make_literal_regex_sed"` | |
12368 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
12369 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
12370 | s|^/[^/]|//&| | |
12371 | p | |
12372 | q | |
12373 | }' | |
5abebf3c | 12374 | |
c0c3707f CB |
12375 | gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
12376 | sed -n "$gl_absolute_header_sed"` | |
5abebf3c | 12377 | |
c0c3707f CB |
12378 | gl_header=$gl_cv_absolute_stdint_h |
12379 | gl_cv_next_stdint_h='"'$gl_header'"' | |
12380 | else | |
12381 | gl_cv_next_stdint_h='<'stdint.h'>' | |
12382 | fi | |
5abebf3c | 12383 | |
5abebf3c | 12384 | |
c0c3707f CB |
12385 | fi |
12386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
12387 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
12388 | fi | |
12389 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
5abebf3c | 12390 | |
c0c3707f CB |
12391 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
12392 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
12393 | gl_next_as_first_directive='<'stdint.h'>' | |
12394 | else | |
12395 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
12396 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
12397 | fi | |
12398 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
5abebf3c | 12399 | |
5e8754f9 | 12400 | |
5e8754f9 | 12401 | |
5e8754f9 | 12402 | |
c0c3707f CB |
12403 | if test $ac_cv_header_stdint_h = yes; then |
12404 | HAVE_STDINT_H=1 | |
12405 | else | |
12406 | HAVE_STDINT_H=0 | |
12407 | fi | |
5e8754f9 SDJ |
12408 | |
12409 | ||
c0c3707f CB |
12410 | if test $ac_cv_header_stdint_h = yes; then |
12411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
12412 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
12413 | if ${gl_cv_header_working_stdint_h+:} false; then : | |
12414 | $as_echo_n "(cached) " >&6 | |
12415 | else | |
12416 | gl_cv_header_working_stdint_h=no | |
12417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12418 | /* end confdefs.h. */ | |
5e8754f9 | 12419 | |
5e8754f9 | 12420 | |
c0c3707f CB |
12421 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12422 | #define __STDC_CONSTANT_MACROS 1 | |
12423 | #define __STDC_LIMIT_MACROS 1 | |
12424 | #include <stdint.h> | |
12425 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
12426 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
12427 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
12428 | #endif | |
5e8754f9 SDJ |
12429 | |
12430 | ||
c0c3707f CB |
12431 | #include <stddef.h> |
12432 | #include <signal.h> | |
12433 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12434 | # include <wchar.h> |
12435 | #endif | |
f45c62c4 YQ |
12436 | |
12437 | ||
c0c3707f CB |
12438 | #ifdef INT8_MAX |
12439 | int8_t a1 = INT8_MAX; | |
12440 | int8_t a1min = INT8_MIN; | |
12441 | #endif | |
12442 | #ifdef INT16_MAX | |
12443 | int16_t a2 = INT16_MAX; | |
12444 | int16_t a2min = INT16_MIN; | |
12445 | #endif | |
12446 | #ifdef INT32_MAX | |
12447 | int32_t a3 = INT32_MAX; | |
12448 | int32_t a3min = INT32_MIN; | |
12449 | #endif | |
12450 | #ifdef INT64_MAX | |
12451 | int64_t a4 = INT64_MAX; | |
12452 | int64_t a4min = INT64_MIN; | |
12453 | #endif | |
12454 | #ifdef UINT8_MAX | |
12455 | uint8_t b1 = UINT8_MAX; | |
12456 | #else | |
12457 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
12458 | #endif | |
12459 | #ifdef UINT16_MAX | |
12460 | uint16_t b2 = UINT16_MAX; | |
12461 | #endif | |
12462 | #ifdef UINT32_MAX | |
12463 | uint32_t b3 = UINT32_MAX; | |
12464 | #endif | |
12465 | #ifdef UINT64_MAX | |
12466 | uint64_t b4 = UINT64_MAX; | |
12467 | #endif | |
12468 | int_least8_t c1 = INT8_C (0x7f); | |
12469 | int_least8_t c1max = INT_LEAST8_MAX; | |
12470 | int_least8_t c1min = INT_LEAST8_MIN; | |
12471 | int_least16_t c2 = INT16_C (0x7fff); | |
12472 | int_least16_t c2max = INT_LEAST16_MAX; | |
12473 | int_least16_t c2min = INT_LEAST16_MIN; | |
12474 | int_least32_t c3 = INT32_C (0x7fffffff); | |
12475 | int_least32_t c3max = INT_LEAST32_MAX; | |
12476 | int_least32_t c3min = INT_LEAST32_MIN; | |
12477 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
12478 | int_least64_t c4max = INT_LEAST64_MAX; | |
12479 | int_least64_t c4min = INT_LEAST64_MIN; | |
12480 | uint_least8_t d1 = UINT8_C (0xff); | |
12481 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
12482 | uint_least16_t d2 = UINT16_C (0xffff); | |
12483 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
12484 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
12485 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
12486 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
12487 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
12488 | int_fast8_t e1 = INT_FAST8_MAX; | |
12489 | int_fast8_t e1min = INT_FAST8_MIN; | |
12490 | int_fast16_t e2 = INT_FAST16_MAX; | |
12491 | int_fast16_t e2min = INT_FAST16_MIN; | |
12492 | int_fast32_t e3 = INT_FAST32_MAX; | |
12493 | int_fast32_t e3min = INT_FAST32_MIN; | |
12494 | int_fast64_t e4 = INT_FAST64_MAX; | |
12495 | int_fast64_t e4min = INT_FAST64_MIN; | |
12496 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
12497 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
12498 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
12499 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
12500 | #ifdef INTPTR_MAX | |
12501 | intptr_t g = INTPTR_MAX; | |
12502 | intptr_t gmin = INTPTR_MIN; | |
12503 | #endif | |
12504 | #ifdef UINTPTR_MAX | |
12505 | uintptr_t h = UINTPTR_MAX; | |
12506 | #endif | |
12507 | intmax_t i = INTMAX_MAX; | |
12508 | uintmax_t j = UINTMAX_MAX; | |
472fa5ee | 12509 | |
c0c3707f CB |
12510 | /* Check that SIZE_MAX has the correct type, if possible. */ |
12511 | #if 201112 <= __STDC_VERSION__ | |
12512 | int k = _Generic (SIZE_MAX, size_t: 0); | |
9c9d63b1 | 12513 | #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ |
c0c3707f CB |
12514 | || (0x5110 <= __SUNPRO_C && !__STDC__)) |
12515 | extern size_t k; | |
12516 | extern __typeof__ (SIZE_MAX) k; | |
12517 | #endif | |
472fa5ee | 12518 | |
c0c3707f CB |
12519 | #include <limits.h> /* for CHAR_BIT */ |
12520 | #define TYPE_MINIMUM(t) \ | |
12521 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
12522 | #define TYPE_MAXIMUM(t) \ | |
12523 | ((t) ((t) 0 < (t) -1 \ | |
12524 | ? (t) -1 \ | |
12525 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
12526 | struct s { | |
12527 | int check_PTRDIFF: | |
12528 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
12529 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
12530 | ? 1 : -1; | |
12531 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
12532 | int check_SIG_ATOMIC: | |
12533 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
12534 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
12535 | ? 1 : -1; | |
12536 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
12537 | int check_WCHAR: | |
12538 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
12539 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
12540 | ? 1 : -1; | |
12541 | /* Detect bug in mingw. */ | |
12542 | int check_WINT: | |
12543 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
12544 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
12545 | ? 1 : -1; | |
472fa5ee | 12546 | |
c0c3707f CB |
12547 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
12548 | int check_UINT8_C: | |
12549 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
12550 | int check_UINT16_C: | |
12551 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
f45c62c4 | 12552 | |
c0c3707f CB |
12553 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ |
12554 | #ifdef UINT8_MAX | |
12555 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
12556 | #endif | |
12557 | #ifdef UINT16_MAX | |
12558 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
12559 | #endif | |
12560 | #ifdef UINT32_MAX | |
12561 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
12562 | #endif | |
12563 | #ifdef UINT64_MAX | |
12564 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
12565 | #endif | |
12566 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
12567 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
12568 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
12569 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
12570 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
12571 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
12572 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
12573 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
12574 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
12575 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
12576 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
12577 | }; | |
6ec2e0f5 | 12578 | |
f45c62c4 YQ |
12579 | int |
12580 | main () | |
12581 | { | |
f45c62c4 YQ |
12582 | |
12583 | ; | |
12584 | return 0; | |
12585 | } | |
12586 | _ACEOF | |
6ec2e0f5 | 12587 | if ac_fn_c_try_compile "$LINENO"; then : |
c0c3707f | 12588 | if test "$cross_compiling" = yes; then : |
6a29c58e | 12589 | case "$host_os" in |
c0c3707f CB |
12590 | # Guess yes on native Windows. |
12591 | mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; | |
12592 | # In general, assume it works. | |
12593 | *) gl_cv_header_working_stdint_h="guessing yes" ;; | |
12594 | esac | |
6a29c58e | 12595 | |
98399780 YQ |
12596 | else |
12597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12598 | /* end confdefs.h. */ | |
98399780 YQ |
12599 | |
12600 | ||
c0c3707f CB |
12601 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12602 | #define __STDC_CONSTANT_MACROS 1 | |
12603 | #define __STDC_LIMIT_MACROS 1 | |
12604 | #include <stdint.h> | |
98399780 | 12605 | |
88b48903 | 12606 | |
c0c3707f CB |
12607 | #include <stddef.h> |
12608 | #include <signal.h> | |
12609 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12610 | # include <wchar.h> |
12611 | #endif | |
88b48903 | 12612 | |
472fa5ee | 12613 | |
c0c3707f CB |
12614 | #include <stdio.h> |
12615 | #include <string.h> | |
12616 | #define MVAL(macro) MVAL1(macro) | |
12617 | #define MVAL1(expression) #expression | |
12618 | static const char *macro_values[] = | |
12619 | { | |
12620 | #ifdef INT8_MAX | |
12621 | MVAL (INT8_MAX), | |
12622 | #endif | |
12623 | #ifdef INT16_MAX | |
12624 | MVAL (INT16_MAX), | |
12625 | #endif | |
12626 | #ifdef INT32_MAX | |
12627 | MVAL (INT32_MAX), | |
12628 | #endif | |
12629 | #ifdef INT64_MAX | |
12630 | MVAL (INT64_MAX), | |
12631 | #endif | |
12632 | #ifdef UINT8_MAX | |
12633 | MVAL (UINT8_MAX), | |
12634 | #endif | |
12635 | #ifdef UINT16_MAX | |
12636 | MVAL (UINT16_MAX), | |
12637 | #endif | |
12638 | #ifdef UINT32_MAX | |
12639 | MVAL (UINT32_MAX), | |
12640 | #endif | |
12641 | #ifdef UINT64_MAX | |
12642 | MVAL (UINT64_MAX), | |
12643 | #endif | |
12644 | NULL | |
12645 | }; | |
472fa5ee | 12646 | |
c0c3707f CB |
12647 | int |
12648 | main () | |
12649 | { | |
472fa5ee | 12650 | |
c0c3707f CB |
12651 | const char **mv; |
12652 | for (mv = macro_values; *mv != NULL; mv++) | |
12653 | { | |
12654 | const char *value = *mv; | |
12655 | /* Test whether it looks like a cast expression. */ | |
12656 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
12657 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
12658 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
12659 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
12660 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
12661 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
12662 | return mv - macro_values + 1; | |
12663 | } | |
12664 | return 0; | |
12665 | ||
12666 | ; | |
12667 | return 0; | |
12668 | } | |
12669 | _ACEOF | |
12670 | if ac_fn_c_try_run "$LINENO"; then : | |
12671 | gl_cv_header_working_stdint_h=yes | |
12672 | fi | |
12673 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12674 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12675 | fi | |
12676 | ||
12677 | ||
12678 | fi | |
12679 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8690e634 | 12680 | |
c0c3707f CB |
12681 | fi |
12682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
12683 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
12684 | fi | |
8690e634 | 12685 | |
c0c3707f CB |
12686 | HAVE_C99_STDINT_H=0 |
12687 | HAVE_SYS_BITYPES_H=0 | |
12688 | HAVE_SYS_INTTYPES_H=0 | |
12689 | STDINT_H=stdint.h | |
12690 | case "$gl_cv_header_working_stdint_h" in | |
12691 | *yes) | |
12692 | HAVE_C99_STDINT_H=1 | |
9c9d63b1 PM |
12693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5 |
12694 | $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; } | |
12695 | if ${gl_cv_header_stdint_without_STDC_macros+:} false; then : | |
c0c3707f CB |
12696 | $as_echo_n "(cached) " >&6 |
12697 | else | |
9c9d63b1 | 12698 | gl_cv_header_stdint_without_STDC_macros=no |
c0c3707f CB |
12699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12700 | /* end confdefs.h. */ | |
8690e634 JK |
12701 | |
12702 | ||
c0c3707f CB |
12703 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
12704 | #include <stdint.h> | |
8690e634 JK |
12705 | |
12706 | ||
c0c3707f CB |
12707 | #include <stddef.h> |
12708 | #include <signal.h> | |
12709 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12710 | # include <wchar.h> |
12711 | #endif | |
8690e634 JK |
12712 | |
12713 | ||
c0c3707f CB |
12714 | intmax_t im = INTMAX_MAX; |
12715 | int32_t i32 = INT32_C (0x7fffffff); | |
472fa5ee | 12716 | |
c0c3707f CB |
12717 | int |
12718 | main () | |
12719 | { | |
472fa5ee | 12720 | |
c0c3707f CB |
12721 | ; |
12722 | return 0; | |
12723 | } | |
12724 | _ACEOF | |
12725 | if ac_fn_c_try_compile "$LINENO"; then : | |
9c9d63b1 | 12726 | gl_cv_header_stdint_without_STDC_macros=yes |
c0c3707f CB |
12727 | fi |
12728 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9c9d63b1 | 12729 | |
c0c3707f | 12730 | fi |
9c9d63b1 PM |
12731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5 |
12732 | $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; } | |
472fa5ee | 12733 | |
9c9d63b1 | 12734 | if test $gl_cv_header_stdint_without_STDC_macros = no; then |
472fa5ee | 12735 | |
c0c3707f | 12736 | $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h |
472fa5ee SM |
12737 | |
12738 | ||
c0c3707f CB |
12739 | $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h |
12740 | ||
12741 | fi | |
12742 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 | |
12743 | $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } | |
12744 | if ${gl_cv_header_stdint_width+:} false; then : | |
8690e634 JK |
12745 | $as_echo_n "(cached) " >&6 |
12746 | else | |
c0c3707f CB |
12747 | gl_cv_header_stdint_width=no |
12748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
12749 | /* end confdefs.h. */ |
12750 | ||
c0c3707f CB |
12751 | /* Work if build is not clean. */ |
12752 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 | |
12753 | #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | |
12754 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | |
12755 | #endif | |
12756 | #include <stdint.h> | |
12757 | ||
c0c3707f CB |
12758 | #include <stddef.h> |
12759 | #include <signal.h> | |
12760 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12761 | # include <wchar.h> |
12762 | #endif | |
12763 | ||
12764 | int iw = UINTMAX_WIDTH; | |
12765 | ||
12766 | int | |
12767 | main () | |
8690e634 | 12768 | { |
c0c3707f CB |
12769 | |
12770 | ; | |
8690e634 JK |
12771 | return 0; |
12772 | } | |
8690e634 | 12773 | _ACEOF |
c0c3707f CB |
12774 | if ac_fn_c_try_compile "$LINENO"; then : |
12775 | gl_cv_header_stdint_width=yes | |
12776 | fi | |
12777 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12778 | fi | |
12779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 | |
12780 | $as_echo "$gl_cv_header_stdint_width" >&6; } | |
12781 | if test "$gl_cv_header_stdint_width" = yes; then | |
12782 | STDINT_H= | |
12783 | fi | |
12784 | ;; | |
12785 | *) | |
12786 | for ac_header in sys/inttypes.h sys/bitypes.h | |
12787 | do : | |
12788 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12789 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12790 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12791 | cat >>confdefs.h <<_ACEOF | |
12792 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12793 | _ACEOF | |
12794 | ||
12795 | fi | |
12796 | ||
12797 | done | |
12798 | ||
12799 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
12800 | HAVE_SYS_INTTYPES_H=1 | |
12801 | fi | |
12802 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
12803 | HAVE_SYS_BITYPES_H=1 | |
12804 | fi | |
12805 | ||
12806 | ||
12807 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
12808 | ||
12809 | ||
12810 | for gltype in ptrdiff_t size_t ; do | |
12811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
12812 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
12813 | if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : | |
12814 | $as_echo_n "(cached) " >&6 | |
12815 | else | |
12816 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
c0c3707f CB |
12817 | #include <stddef.h> |
12818 | #include <signal.h> | |
12819 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12820 | # include <wchar.h> |
12821 | #endif | |
12822 | ||
12823 | #include <limits.h>"; then : | |
12824 | ||
12825 | else | |
12826 | result=unknown | |
12827 | fi | |
12828 | ||
12829 | eval gl_cv_bitsizeof_${gltype}=\$result | |
12830 | ||
12831 | fi | |
12832 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
12833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12834 | $as_echo "$ac_res" >&6; } | |
12835 | eval result=\$gl_cv_bitsizeof_${gltype} | |
12836 | if test $result = unknown; then | |
12837 | result=0 | |
8690e634 | 12838 | fi |
c0c3707f CB |
12839 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
12840 | cat >>confdefs.h <<_ACEOF | |
12841 | #define BITSIZEOF_${GLTYPE} $result | |
12842 | _ACEOF | |
8690e634 | 12843 | |
c0c3707f CB |
12844 | eval BITSIZEOF_${GLTYPE}=\$result |
12845 | done | |
8690e634 JK |
12846 | |
12847 | ||
c0c3707f | 12848 | fi |
8690e634 JK |
12849 | |
12850 | ||
c0c3707f CB |
12851 | for gltype in sig_atomic_t wchar_t wint_t ; do |
12852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
12853 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
12854 | if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : | |
8690e634 JK |
12855 | $as_echo_n "(cached) " >&6 |
12856 | else | |
c0c3707f | 12857 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " |
c0c3707f CB |
12858 | #include <stddef.h> |
12859 | #include <signal.h> | |
12860 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12861 | # include <wchar.h> |
12862 | #endif | |
8690e634 | 12863 | |
c0c3707f | 12864 | #include <limits.h>"; then : |
8690e634 | 12865 | |
c0c3707f CB |
12866 | else |
12867 | result=unknown | |
12868 | fi | |
8690e634 | 12869 | |
c0c3707f | 12870 | eval gl_cv_bitsizeof_${gltype}=\$result |
8690e634 JK |
12871 | |
12872 | fi | |
c0c3707f CB |
12873 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
12874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12875 | $as_echo "$ac_res" >&6; } | |
12876 | eval result=\$gl_cv_bitsizeof_${gltype} | |
12877 | if test $result = unknown; then | |
12878 | result=0 | |
12879 | fi | |
12880 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12881 | cat >>confdefs.h <<_ACEOF | |
12882 | #define BITSIZEOF_${GLTYPE} $result | |
12883 | _ACEOF | |
12884 | ||
12885 | eval BITSIZEOF_${GLTYPE}=\$result | |
12886 | done | |
8690e634 JK |
12887 | |
12888 | ||
12889 | ||
12890 | ||
c0c3707f CB |
12891 | for gltype in sig_atomic_t wchar_t wint_t ; do |
12892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
12893 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
12894 | if eval \${gl_cv_type_${gltype}_signed+:} false; then : | |
8690e634 JK |
12895 | $as_echo_n "(cached) " >&6 |
12896 | else | |
c0c3707f | 12897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 JK |
12898 | /* end confdefs.h. */ |
12899 | ||
c0c3707f CB |
12900 | #include <stddef.h> |
12901 | #include <signal.h> | |
12902 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12903 | # include <wchar.h> |
12904 | #endif | |
12905 | ||
12906 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
12907 | int | |
12908 | main () | |
12909 | { | |
12910 | ||
12911 | ; | |
8690e634 JK |
12912 | return 0; |
12913 | } | |
c0c3707f CB |
12914 | _ACEOF |
12915 | if ac_fn_c_try_compile "$LINENO"; then : | |
12916 | result=yes | |
12917 | else | |
12918 | result=no | |
12919 | fi | |
12920 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12921 | eval gl_cv_type_${gltype}_signed=\$result | |
8690e634 | 12922 | |
c0c3707f CB |
12923 | fi |
12924 | eval ac_res=\$gl_cv_type_${gltype}_signed | |
12925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12926 | $as_echo "$ac_res" >&6; } | |
12927 | eval result=\$gl_cv_type_${gltype}_signed | |
12928 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
12929 | if test "$result" = yes; then | |
12930 | cat >>confdefs.h <<_ACEOF | |
12931 | #define HAVE_SIGNED_${GLTYPE} 1 | |
8690e634 | 12932 | _ACEOF |
c0c3707f CB |
12933 | |
12934 | eval HAVE_SIGNED_${GLTYPE}=1 | |
12935 | else | |
12936 | eval HAVE_SIGNED_${GLTYPE}=0 | |
8690e634 | 12937 | fi |
c0c3707f CB |
12938 | done |
12939 | ||
12940 | ||
12941 | gl_cv_type_ptrdiff_t_signed=yes | |
12942 | gl_cv_type_size_t_signed=no | |
12943 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
12944 | ||
12945 | ||
12946 | for gltype in ptrdiff_t size_t ; do | |
12947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
12948 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
12949 | if eval \${gl_cv_type_${gltype}_suffix+:} false; then : | |
12950 | $as_echo_n "(cached) " >&6 | |
12951 | else | |
12952 | eval gl_cv_type_${gltype}_suffix=no | |
12953 | eval result=\$gl_cv_type_${gltype}_signed | |
12954 | if test "$result" = yes; then | |
12955 | glsufu= | |
12956 | else | |
12957 | glsufu=u | |
12958 | fi | |
12959 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
12960 | case $glsuf in | |
12961 | '') gltype1='int';; | |
12962 | l) gltype1='long int';; | |
12963 | ll) gltype1='long long int';; | |
12964 | i64) gltype1='__int64';; | |
12965 | u) gltype1='unsigned int';; | |
12966 | ul) gltype1='unsigned long int';; | |
12967 | ull) gltype1='unsigned long long int';; | |
12968 | ui64)gltype1='unsigned __int64';; | |
12969 | esac | |
12970 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12971 | /* end confdefs.h. */ | |
12972 | ||
c0c3707f CB |
12973 | #include <stddef.h> |
12974 | #include <signal.h> | |
12975 | #if HAVE_WCHAR_H | |
c0c3707f CB |
12976 | # include <wchar.h> |
12977 | #endif | |
8690e634 | 12978 | |
c0c3707f CB |
12979 | extern $gltype foo; |
12980 | extern $gltype1 foo; | |
12981 | int | |
12982 | main () | |
12983 | { | |
12984 | ||
12985 | ; | |
12986 | return 0; | |
12987 | } | |
12988 | _ACEOF | |
12989 | if ac_fn_c_try_compile "$LINENO"; then : | |
12990 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
8690e634 | 12991 | fi |
c0c3707f CB |
12992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12993 | eval result=\$gl_cv_type_${gltype}_suffix | |
12994 | test "$result" != no && break | |
12995 | done | |
12996 | fi | |
12997 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
12998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12999 | $as_echo "$ac_res" >&6; } | |
13000 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
13001 | eval result=\$gl_cv_type_${gltype}_suffix | |
13002 | test "$result" = no && result= | |
13003 | eval ${GLTYPE}_SUFFIX=\$result | |
13004 | cat >>confdefs.h <<_ACEOF | |
13005 | #define ${GLTYPE}_SUFFIX $result | |
13006 | _ACEOF | |
8690e634 | 13007 | |
c0c3707f | 13008 | done |
8690e634 JK |
13009 | |
13010 | ||
c0c3707f | 13011 | fi |
8690e634 JK |
13012 | |
13013 | ||
c0c3707f CB |
13014 | for gltype in sig_atomic_t wchar_t wint_t ; do |
13015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
13016 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
13017 | if eval \${gl_cv_type_${gltype}_suffix+:} false; then : | |
8690e634 JK |
13018 | $as_echo_n "(cached) " >&6 |
13019 | else | |
c0c3707f CB |
13020 | eval gl_cv_type_${gltype}_suffix=no |
13021 | eval result=\$gl_cv_type_${gltype}_signed | |
13022 | if test "$result" = yes; then | |
13023 | glsufu= | |
13024 | else | |
13025 | glsufu=u | |
13026 | fi | |
13027 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
13028 | case $glsuf in | |
13029 | '') gltype1='int';; | |
13030 | l) gltype1='long int';; | |
13031 | ll) gltype1='long long int';; | |
13032 | i64) gltype1='__int64';; | |
13033 | u) gltype1='unsigned int';; | |
13034 | ul) gltype1='unsigned long int';; | |
13035 | ull) gltype1='unsigned long long int';; | |
13036 | ui64)gltype1='unsigned __int64';; | |
13037 | esac | |
13038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
13039 | /* end confdefs.h. */ |
13040 | ||
c0c3707f CB |
13041 | #include <stddef.h> |
13042 | #include <signal.h> | |
13043 | #if HAVE_WCHAR_H | |
c0c3707f CB |
13044 | # include <wchar.h> |
13045 | #endif | |
13046 | ||
13047 | extern $gltype foo; | |
13048 | extern $gltype1 foo; | |
13049 | int | |
13050 | main () | |
13051 | { | |
13052 | ||
13053 | ; | |
5e8754f9 | 13054 | return 0; |
8690e634 | 13055 | } |
c0c3707f CB |
13056 | _ACEOF |
13057 | if ac_fn_c_try_compile "$LINENO"; then : | |
13058 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
13059 | fi | |
13060 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13061 | eval result=\$gl_cv_type_${gltype}_suffix | |
13062 | test "$result" != no && break | |
13063 | done | |
13064 | fi | |
13065 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
13066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
13067 | $as_echo "$ac_res" >&6; } | |
13068 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
13069 | eval result=\$gl_cv_type_${gltype}_suffix | |
13070 | test "$result" = no && result= | |
13071 | eval ${GLTYPE}_SUFFIX=\$result | |
13072 | cat >>confdefs.h <<_ACEOF | |
13073 | #define ${GLTYPE}_SUFFIX $result | |
13074 | _ACEOF | |
13075 | ||
13076 | done | |
13077 | ||
13078 | ||
13079 | ||
13080 | if test $GNULIB_OVERRIDES_WINT_T = 1; then | |
13081 | BITSIZEOF_WINT_T=32 | |
13082 | fi | |
13083 | ||
13084 | ;; | |
13085 | esac | |
8690e634 | 13086 | |
8690e634 | 13087 | |
c0c3707f CB |
13088 | |
13089 | LIMITS_H='limits.h' | |
13090 | if test -n "$LIMITS_H"; then | |
13091 | GL_GENERATE_LIMITS_H_TRUE= | |
13092 | GL_GENERATE_LIMITS_H_FALSE='#' | |
13093 | else | |
13094 | GL_GENERATE_LIMITS_H_TRUE='#' | |
13095 | GL_GENERATE_LIMITS_H_FALSE= | |
8690e634 | 13096 | fi |
6ec2e0f5 SDJ |
13097 | |
13098 | ||
13099 | ||
13100 | ||
13101 | ||
13102 | ||
13103 | ||
c0c3707f CB |
13104 | if test -n "$STDINT_H"; then |
13105 | GL_GENERATE_STDINT_H_TRUE= | |
13106 | GL_GENERATE_STDINT_H_FALSE='#' | |
13107 | else | |
13108 | GL_GENERATE_STDINT_H_TRUE='#' | |
13109 | GL_GENERATE_STDINT_H_FALSE= | |
13110 | fi | |
472fa5ee SM |
13111 | |
13112 | ||
13113 | ||
c0c3707f CB |
13114 | GNULIB_IMAXABS=0; |
13115 | GNULIB_IMAXDIV=0; | |
13116 | GNULIB_STRTOIMAX=0; | |
13117 | GNULIB_STRTOUMAX=0; | |
13118 | HAVE_DECL_IMAXABS=1; | |
13119 | HAVE_DECL_IMAXDIV=1; | |
13120 | HAVE_DECL_STRTOIMAX=1; | |
13121 | HAVE_DECL_STRTOUMAX=1; | |
13122 | HAVE_IMAXDIV_T=1; | |
13123 | REPLACE_STRTOIMAX=0; | |
13124 | REPLACE_STRTOUMAX=0; | |
13125 | INT32_MAX_LT_INTMAX_MAX=1; | |
13126 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
c0c3707f CB |
13127 | PRIPTR_PREFIX=__PRIPTR_PREFIX; |
13128 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
13129 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
472fa5ee | 13130 | |
6ec2e0f5 SDJ |
13131 | |
13132 | ||
13133 | ||
13134 | ||
13135 | ||
6ec2e0f5 SDJ |
13136 | |
13137 | ||
6ec2e0f5 | 13138 | |
6ec2e0f5 | 13139 | |
6ec2e0f5 | 13140 | |
6ec2e0f5 | 13141 | |
6ec2e0f5 | 13142 | |
c0c3707f CB |
13143 | |
13144 | ||
13145 | if test $gl_cv_have_include_next = yes; then | |
13146 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
13147 | else | |
13148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
13149 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
13150 | if ${gl_cv_next_inttypes_h+:} false; then : | |
13151 | $as_echo_n "(cached) " >&6 | |
13152 | else | |
13153 | ||
13154 | if test $ac_cv_header_inttypes_h = yes; then | |
13155 | ||
13156 | ||
13157 | ||
13158 | ||
13159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13160 | /* end confdefs.h. */ | |
13161 | #include <inttypes.h> | |
6ec2e0f5 | 13162 | _ACEOF |
c0c3707f CB |
13163 | case "$host_os" in |
13164 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
13165 | *) gl_absname_cpp="$ac_cpp" ;; | |
13166 | esac | |
6ec2e0f5 | 13167 | |
c0c3707f CB |
13168 | case "$host_os" in |
13169 | mingw*) | |
13170 | gl_dirsep_regex='[/\\]' | |
13171 | ;; | |
13172 | *) | |
13173 | gl_dirsep_regex='\/' | |
13174 | ;; | |
13175 | esac | |
13176 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
13177 | gl_header_literal_regex=`echo 'inttypes.h' \ | |
13178 | | sed -e "$gl_make_literal_regex_sed"` | |
13179 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
13180 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
13181 | s|^/[^/]|//&| | |
13182 | p | |
13183 | q | |
13184 | }' | |
6ec2e0f5 | 13185 | |
c0c3707f CB |
13186 | gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
13187 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 13188 | |
c0c3707f CB |
13189 | gl_header=$gl_cv_absolute_inttypes_h |
13190 | gl_cv_next_inttypes_h='"'$gl_header'"' | |
13191 | else | |
13192 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
13193 | fi | |
6ec2e0f5 | 13194 | |
6ec2e0f5 | 13195 | |
c0c3707f CB |
13196 | fi |
13197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | |
13198 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
13199 | fi | |
13200 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
6ec2e0f5 | 13201 | |
c0c3707f CB |
13202 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
13203 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
13204 | gl_next_as_first_directive='<'inttypes.h'>' | |
13205 | else | |
13206 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
13207 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
13208 | fi | |
13209 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
6ec2e0f5 | 13210 | |
472fa5ee SM |
13211 | |
13212 | ||
13213 | ||
13214 | ||
13215 | ||
13216 | ||
472fa5ee SM |
13217 | |
13218 | ||
13219 | ||
13220 | ||
6ec2e0f5 | 13221 | |
698be2d8 CB |
13222 | |
13223 | ||
698be2d8 CB |
13224 | |
13225 | ||
5df4cba6 SM |
13226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 |
13227 | $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } | |
13228 | if ${gl_cv_cc_double_expbit0+:} false; then : | |
13229 | $as_echo_n "(cached) " >&6 | |
13230 | else | |
13231 | ||
13232 | if test "$cross_compiling" = yes; then : | |
13233 | ||
13234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13235 | /* end confdefs.h. */ | |
13236 | ||
13237 | #if defined arm || defined __arm || defined __arm__ | |
13238 | mixed_endianness | |
13239 | #endif | |
13240 | ||
13241 | _ACEOF | |
13242 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13243 | $EGREP "mixed_endianness" >/dev/null 2>&1; then : | |
13244 | gl_cv_cc_double_expbit0="unknown" | |
13245 | else | |
13246 | ||
13247 | : | |
13248 | if ${ac_cv_c_bigendian+:} false; then : | |
13249 | $as_echo_n "(cached) " >&6 | |
13250 | else | |
13251 | ac_cv_c_bigendian=unknown | |
13252 | # See if we're dealing with a universal compiler. | |
13253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13254 | /* end confdefs.h. */ | |
13255 | #ifndef __APPLE_CC__ | |
13256 | not a universal capable compiler | |
13257 | #endif | |
13258 | typedef int dummy; | |
13259 | ||
13260 | _ACEOF | |
13261 | if ac_fn_c_try_compile "$LINENO"; then : | |
13262 | ||
13263 | # Check for potential -arch flags. It is not universal unless | |
13264 | # there are at least two -arch flags with different values. | |
13265 | ac_arch= | |
13266 | ac_prev= | |
13267 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
13268 | if test -n "$ac_prev"; then | |
13269 | case $ac_word in | |
13270 | i?86 | x86_64 | ppc | ppc64) | |
13271 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
13272 | ac_arch=$ac_word | |
13273 | else | |
13274 | ac_cv_c_bigendian=universal | |
13275 | break | |
13276 | fi | |
13277 | ;; | |
13278 | esac | |
13279 | ac_prev= | |
13280 | elif test "x$ac_word" = "x-arch"; then | |
13281 | ac_prev=arch | |
13282 | fi | |
13283 | done | |
13284 | fi | |
13285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13286 | if test $ac_cv_c_bigendian = unknown; then | |
13287 | # See if sys/param.h defines the BYTE_ORDER macro. | |
13288 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13289 | /* end confdefs.h. */ | |
13290 | #include <sys/types.h> | |
13291 | #include <sys/param.h> | |
13292 | ||
13293 | int | |
13294 | main () | |
13295 | { | |
13296 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
13297 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
13298 | && LITTLE_ENDIAN) | |
13299 | bogus endian macros | |
13300 | #endif | |
13301 | ||
13302 | ; | |
13303 | return 0; | |
13304 | } | |
13305 | _ACEOF | |
13306 | if ac_fn_c_try_compile "$LINENO"; then : | |
13307 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
13308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13309 | /* end confdefs.h. */ | |
13310 | #include <sys/types.h> | |
13311 | #include <sys/param.h> | |
13312 | ||
13313 | int | |
13314 | main () | |
13315 | { | |
13316 | #if BYTE_ORDER != BIG_ENDIAN | |
13317 | not big endian | |
13318 | #endif | |
13319 | ||
13320 | ; | |
13321 | return 0; | |
13322 | } | |
13323 | _ACEOF | |
13324 | if ac_fn_c_try_compile "$LINENO"; then : | |
13325 | ac_cv_c_bigendian=yes | |
13326 | else | |
13327 | ac_cv_c_bigendian=no | |
13328 | fi | |
13329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13330 | fi | |
13331 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13332 | fi | |
13333 | if test $ac_cv_c_bigendian = unknown; then | |
13334 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
13335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13336 | /* end confdefs.h. */ | |
13337 | #include <limits.h> | |
13338 | ||
13339 | int | |
13340 | main () | |
13341 | { | |
13342 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
13343 | bogus endian macros | |
13344 | #endif | |
13345 | ||
13346 | ; | |
13347 | return 0; | |
13348 | } | |
13349 | _ACEOF | |
13350 | if ac_fn_c_try_compile "$LINENO"; then : | |
13351 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
13352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13353 | /* end confdefs.h. */ | |
13354 | #include <limits.h> | |
13355 | ||
13356 | int | |
13357 | main () | |
13358 | { | |
13359 | #ifndef _BIG_ENDIAN | |
13360 | not big endian | |
13361 | #endif | |
13362 | ||
13363 | ; | |
13364 | return 0; | |
13365 | } | |
13366 | _ACEOF | |
13367 | if ac_fn_c_try_compile "$LINENO"; then : | |
13368 | ac_cv_c_bigendian=yes | |
13369 | else | |
13370 | ac_cv_c_bigendian=no | |
13371 | fi | |
13372 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13373 | fi | |
13374 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13375 | fi | |
13376 | if test $ac_cv_c_bigendian = unknown; then | |
13377 | # Compile a test program. | |
13378 | if test "$cross_compiling" = yes; then : | |
13379 | # Try to guess by grepping values from an object file. | |
13380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13381 | /* end confdefs.h. */ | |
13382 | short int ascii_mm[] = | |
13383 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
13384 | short int ascii_ii[] = | |
13385 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
13386 | int use_ascii (int i) { | |
13387 | return ascii_mm[i] + ascii_ii[i]; | |
13388 | } | |
13389 | short int ebcdic_ii[] = | |
13390 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
13391 | short int ebcdic_mm[] = | |
13392 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
13393 | int use_ebcdic (int i) { | |
13394 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
13395 | } | |
13396 | extern int foo; | |
13397 | ||
13398 | int | |
13399 | main () | |
13400 | { | |
13401 | return use_ascii (foo) == use_ebcdic (foo); | |
13402 | ; | |
13403 | return 0; | |
13404 | } | |
13405 | _ACEOF | |
13406 | if ac_fn_c_try_compile "$LINENO"; then : | |
13407 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
13408 | ac_cv_c_bigendian=yes | |
13409 | fi | |
13410 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
13411 | if test "$ac_cv_c_bigendian" = unknown; then | |
13412 | ac_cv_c_bigendian=no | |
13413 | else | |
13414 | # finding both strings is unlikely to happen, but who knows? | |
13415 | ac_cv_c_bigendian=unknown | |
13416 | fi | |
13417 | fi | |
13418 | fi | |
13419 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13420 | else | |
13421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13422 | /* end confdefs.h. */ | |
13423 | $ac_includes_default | |
13424 | int | |
13425 | main () | |
13426 | { | |
13427 | ||
13428 | /* Are we little or big endian? From Harbison&Steele. */ | |
13429 | union | |
13430 | { | |
13431 | long int l; | |
13432 | char c[sizeof (long int)]; | |
13433 | } u; | |
13434 | u.l = 1; | |
13435 | return u.c[sizeof (long int) - 1] == 1; | |
13436 | ||
13437 | ; | |
13438 | return 0; | |
13439 | } | |
13440 | _ACEOF | |
13441 | if ac_fn_c_try_run "$LINENO"; then : | |
13442 | ac_cv_c_bigendian=no | |
13443 | else | |
13444 | ac_cv_c_bigendian=yes | |
13445 | fi | |
13446 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13447 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13448 | fi | |
13449 | ||
13450 | fi | |
13451 | fi | |
13452 | : | |
13453 | case $ac_cv_c_bigendian in #( | |
13454 | yes) | |
13455 | gl_cv_cc_double_expbit0="word 0 bit 20";; #( | |
13456 | no) | |
13457 | gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( | |
13458 | universal) | |
13459 | ||
13460 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
13461 | ||
13462 | ;; #( | |
13463 | *) | |
13464 | gl_cv_cc_double_expbit0="unknown" ;; | |
13465 | esac | |
13466 | ||
13467 | ||
13468 | fi | |
13469 | rm -f conftest* | |
13470 | ||
13471 | ||
13472 | else | |
13473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13474 | /* end confdefs.h. */ | |
13475 | ||
13476 | #include <float.h> | |
13477 | #include <stddef.h> | |
13478 | #include <stdio.h> | |
13479 | #include <string.h> | |
13480 | #define NWORDS \ | |
13481 | ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
13482 | typedef union { double value; unsigned int word[NWORDS]; } memory_double; | |
13483 | static unsigned int ored_words[NWORDS]; | |
13484 | static unsigned int anded_words[NWORDS]; | |
13485 | static void add_to_ored_words (double x) | |
13486 | { | |
13487 | memory_double m; | |
13488 | size_t i; | |
13489 | /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ | |
13490 | memset (&m, 0, sizeof (memory_double)); | |
13491 | m.value = x; | |
13492 | for (i = 0; i < NWORDS; i++) | |
13493 | { | |
13494 | ored_words[i] |= m.word[i]; | |
13495 | anded_words[i] &= m.word[i]; | |
13496 | } | |
13497 | } | |
13498 | int main () | |
13499 | { | |
13500 | size_t j; | |
13501 | FILE *fp = fopen ("conftest.out", "w"); | |
13502 | if (fp == NULL) | |
13503 | return 1; | |
13504 | for (j = 0; j < NWORDS; j++) | |
13505 | anded_words[j] = ~ (unsigned int) 0; | |
13506 | add_to_ored_words (0.25); | |
13507 | add_to_ored_words (0.5); | |
13508 | add_to_ored_words (1.0); | |
13509 | add_to_ored_words (2.0); | |
13510 | add_to_ored_words (4.0); | |
13511 | /* Remove bits that are common (e.g. if representation of the first mantissa | |
13512 | bit is explicit). */ | |
13513 | for (j = 0; j < NWORDS; j++) | |
13514 | ored_words[j] &= ~anded_words[j]; | |
13515 | /* Now find the nonzero word. */ | |
13516 | for (j = 0; j < NWORDS; j++) | |
13517 | if (ored_words[j] != 0) | |
13518 | break; | |
13519 | if (j < NWORDS) | |
13520 | { | |
13521 | size_t i; | |
13522 | for (i = j + 1; i < NWORDS; i++) | |
13523 | if (ored_words[i] != 0) | |
13524 | { | |
13525 | fprintf (fp, "unknown"); | |
13526 | return (fclose (fp) != 0); | |
13527 | } | |
13528 | for (i = 0; ; i++) | |
13529 | if ((ored_words[j] >> i) & 1) | |
13530 | { | |
13531 | fprintf (fp, "word %d bit %d", (int) j, (int) i); | |
13532 | return (fclose (fp) != 0); | |
13533 | } | |
13534 | } | |
13535 | fprintf (fp, "unknown"); | |
13536 | return (fclose (fp) != 0); | |
13537 | } | |
13538 | ||
13539 | _ACEOF | |
13540 | if ac_fn_c_try_run "$LINENO"; then : | |
13541 | gl_cv_cc_double_expbit0=`cat conftest.out` | |
13542 | else | |
13543 | gl_cv_cc_double_expbit0="unknown" | |
6ec2e0f5 | 13544 | fi |
5df4cba6 SM |
13545 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13546 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13547 | fi | |
13548 | ||
13549 | rm -f conftest.out | |
6ec2e0f5 SDJ |
13550 | |
13551 | fi | |
5df4cba6 SM |
13552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 |
13553 | $as_echo "$gl_cv_cc_double_expbit0" >&6; } | |
13554 | case "$gl_cv_cc_double_expbit0" in | |
13555 | word*bit*) | |
13556 | word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` | |
13557 | bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` | |
6ec2e0f5 SDJ |
13558 | |
13559 | cat >>confdefs.h <<_ACEOF | |
5df4cba6 | 13560 | #define DBL_EXPBIT0_WORD $word |
6ec2e0f5 SDJ |
13561 | _ACEOF |
13562 | ||
c0c3707f | 13563 | |
5df4cba6 SM |
13564 | cat >>confdefs.h <<_ACEOF |
13565 | #define DBL_EXPBIT0_BIT $bit | |
13566 | _ACEOF | |
6ec2e0f5 | 13567 | |
5df4cba6 SM |
13568 | ;; |
13569 | esac | |
6ec2e0f5 | 13570 | |
6ec2e0f5 | 13571 | |
5df4cba6 SM |
13572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
13573 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
c0c3707f CB |
13574 | if ${ac_cv_c_bigendian+:} false; then : |
13575 | $as_echo_n "(cached) " >&6 | |
6ec2e0f5 | 13576 | else |
c0c3707f CB |
13577 | ac_cv_c_bigendian=unknown |
13578 | # See if we're dealing with a universal compiler. | |
13579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 13580 | /* end confdefs.h. */ |
c0c3707f CB |
13581 | #ifndef __APPLE_CC__ |
13582 | not a universal capable compiler | |
13583 | #endif | |
13584 | typedef int dummy; | |
6ec2e0f5 | 13585 | |
c0c3707f CB |
13586 | _ACEOF |
13587 | if ac_fn_c_try_compile "$LINENO"; then : | |
13588 | ||
13589 | # Check for potential -arch flags. It is not universal unless | |
13590 | # there are at least two -arch flags with different values. | |
13591 | ac_arch= | |
13592 | ac_prev= | |
13593 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
13594 | if test -n "$ac_prev"; then | |
13595 | case $ac_word in | |
13596 | i?86 | x86_64 | ppc | ppc64) | |
13597 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
13598 | ac_arch=$ac_word | |
13599 | else | |
13600 | ac_cv_c_bigendian=universal | |
13601 | break | |
13602 | fi | |
13603 | ;; | |
13604 | esac | |
13605 | ac_prev= | |
13606 | elif test "x$ac_word" = "x-arch"; then | |
13607 | ac_prev=arch | |
13608 | fi | |
13609 | done | |
13610 | fi | |
13611 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13612 | if test $ac_cv_c_bigendian = unknown; then | |
13613 | # See if sys/param.h defines the BYTE_ORDER macro. | |
13614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13615 | /* end confdefs.h. */ | |
13616 | #include <sys/types.h> | |
13617 | #include <sys/param.h> | |
6ec2e0f5 SDJ |
13618 | |
13619 | int | |
13620 | main () | |
13621 | { | |
c0c3707f CB |
13622 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
13623 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
13624 | && LITTLE_ENDIAN) | |
13625 | bogus endian macros | |
13626 | #endif | |
6ec2e0f5 | 13627 | |
c0c3707f CB |
13628 | ; |
13629 | return 0; | |
13630 | } | |
13631 | _ACEOF | |
13632 | if ac_fn_c_try_compile "$LINENO"; then : | |
13633 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
13634 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13635 | /* end confdefs.h. */ | |
13636 | #include <sys/types.h> | |
13637 | #include <sys/param.h> | |
13638 | ||
13639 | int | |
13640 | main () | |
13641 | { | |
13642 | #if BYTE_ORDER != BIG_ENDIAN | |
13643 | not big endian | |
13644 | #endif | |
6ec2e0f5 SDJ |
13645 | |
13646 | ; | |
13647 | return 0; | |
13648 | } | |
13649 | _ACEOF | |
c0c3707f CB |
13650 | if ac_fn_c_try_compile "$LINENO"; then : |
13651 | ac_cv_c_bigendian=yes | |
6ec2e0f5 | 13652 | else |
c0c3707f | 13653 | ac_cv_c_bigendian=no |
6ec2e0f5 | 13654 | fi |
c0c3707f | 13655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 13656 | fi |
c0c3707f CB |
13657 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13658 | fi | |
13659 | if test $ac_cv_c_bigendian = unknown; then | |
13660 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
13661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13662 | /* end confdefs.h. */ | |
13663 | #include <limits.h> | |
472fa5ee | 13664 | |
c0c3707f CB |
13665 | int |
13666 | main () | |
13667 | { | |
13668 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
13669 | bogus endian macros | |
13670 | #endif | |
6ec2e0f5 | 13671 | |
c0c3707f CB |
13672 | ; |
13673 | return 0; | |
13674 | } | |
6ec2e0f5 | 13675 | _ACEOF |
c0c3707f CB |
13676 | if ac_fn_c_try_compile "$LINENO"; then : |
13677 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
13678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 13679 | /* end confdefs.h. */ |
c0c3707f CB |
13680 | #include <limits.h> |
13681 | ||
6ec2e0f5 SDJ |
13682 | int |
13683 | main () | |
13684 | { | |
5df4cba6 SM |
13685 | #ifndef _BIG_ENDIAN |
13686 | not big endian | |
13687 | #endif | |
13688 | ||
13689 | ; | |
13690 | return 0; | |
13691 | } | |
13692 | _ACEOF | |
13693 | if ac_fn_c_try_compile "$LINENO"; then : | |
13694 | ac_cv_c_bigendian=yes | |
13695 | else | |
13696 | ac_cv_c_bigendian=no | |
13697 | fi | |
13698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13699 | fi | |
13700 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13701 | fi | |
13702 | if test $ac_cv_c_bigendian = unknown; then | |
13703 | # Compile a test program. | |
13704 | if test "$cross_compiling" = yes; then : | |
13705 | # Try to guess by grepping values from an object file. | |
13706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13707 | /* end confdefs.h. */ | |
13708 | short int ascii_mm[] = | |
13709 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
13710 | short int ascii_ii[] = | |
13711 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
13712 | int use_ascii (int i) { | |
13713 | return ascii_mm[i] + ascii_ii[i]; | |
13714 | } | |
13715 | short int ebcdic_ii[] = | |
13716 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
13717 | short int ebcdic_mm[] = | |
13718 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
13719 | int use_ebcdic (int i) { | |
13720 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
13721 | } | |
13722 | extern int foo; | |
13723 | ||
13724 | int | |
13725 | main () | |
13726 | { | |
13727 | return use_ascii (foo) == use_ebcdic (foo); | |
13728 | ; | |
13729 | return 0; | |
13730 | } | |
13731 | _ACEOF | |
13732 | if ac_fn_c_try_compile "$LINENO"; then : | |
13733 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
13734 | ac_cv_c_bigendian=yes | |
13735 | fi | |
13736 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
13737 | if test "$ac_cv_c_bigendian" = unknown; then | |
13738 | ac_cv_c_bigendian=no | |
13739 | else | |
13740 | # finding both strings is unlikely to happen, but who knows? | |
13741 | ac_cv_c_bigendian=unknown | |
13742 | fi | |
13743 | fi | |
13744 | fi | |
13745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13746 | else | |
13747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13748 | /* end confdefs.h. */ | |
13749 | $ac_includes_default | |
13750 | int | |
13751 | main () | |
13752 | { | |
13753 | ||
13754 | /* Are we little or big endian? From Harbison&Steele. */ | |
13755 | union | |
13756 | { | |
13757 | long int l; | |
13758 | char c[sizeof (long int)]; | |
13759 | } u; | |
13760 | u.l = 1; | |
13761 | return u.c[sizeof (long int) - 1] == 1; | |
13762 | ||
13763 | ; | |
13764 | return 0; | |
13765 | } | |
13766 | _ACEOF | |
13767 | if ac_fn_c_try_run "$LINENO"; then : | |
13768 | ac_cv_c_bigendian=no | |
13769 | else | |
13770 | ac_cv_c_bigendian=yes | |
13771 | fi | |
13772 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13773 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13774 | fi | |
13775 | ||
13776 | fi | |
13777 | fi | |
13778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
13779 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
13780 | case $ac_cv_c_bigendian in #( | |
13781 | yes) | |
13782 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
13783 | ;; #( | |
13784 | no) | |
13785 | ;; #( | |
13786 | universal) | |
13787 | ||
13788 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
13789 | ||
13790 | ;; #( | |
13791 | *) | |
13792 | as_fn_error $? "unknown endianness | |
13793 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
13794 | esac | |
13795 | ||
13796 | ||
13797 | ||
5df4cba6 SM |
13798 | GNULIB_LOCALECONV=0; |
13799 | GNULIB_SETLOCALE=0; | |
13800 | GNULIB_SETLOCALE_NULL=0; | |
13801 | GNULIB_DUPLOCALE=0; | |
13802 | GNULIB_LOCALENAME=0; | |
13803 | HAVE_NEWLOCALE=1; | |
13804 | HAVE_DUPLOCALE=1; | |
13805 | HAVE_FREELOCALE=1; | |
13806 | REPLACE_LOCALECONV=0; | |
13807 | REPLACE_SETLOCALE=0; | |
13808 | REPLACE_NEWLOCALE=0; | |
13809 | REPLACE_DUPLOCALE=0; | |
13810 | REPLACE_FREELOCALE=0; | |
13811 | REPLACE_STRUCT_LCONV=0; | |
13812 | ||
13813 | ||
13814 | REPLACE_NULL=0; | |
13815 | HAVE_MAX_ALIGN_T=1; | |
13816 | HAVE_WCHAR_T=1; | |
13817 | ||
13818 | ||
13819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
13820 | $as_echo_n "checking for wchar_t... " >&6; } | |
13821 | if ${gt_cv_c_wchar_t+:} false; then : | |
13822 | $as_echo_n "(cached) " >&6 | |
13823 | else | |
13824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13825 | /* end confdefs.h. */ | |
13826 | #include <stddef.h> | |
13827 | wchar_t foo = (wchar_t)'\0'; | |
13828 | int | |
13829 | main () | |
13830 | { | |
13831 | ||
13832 | ; | |
13833 | return 0; | |
13834 | } | |
13835 | _ACEOF | |
13836 | if ac_fn_c_try_compile "$LINENO"; then : | |
13837 | gt_cv_c_wchar_t=yes | |
13838 | else | |
13839 | gt_cv_c_wchar_t=no | |
13840 | fi | |
13841 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13842 | fi | |
13843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
13844 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
13845 | if test $gt_cv_c_wchar_t = yes; then | |
13846 | ||
13847 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
13848 | ||
13849 | fi | |
13850 | ||
13851 | ||
13852 | ||
13853 | ||
9c9d63b1 PM |
13854 | |
13855 | ||
13856 | ||
5df4cba6 SM |
13857 | STDDEF_H= |
13858 | ||
13859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 | |
13860 | $as_echo_n "checking for good max_align_t... " >&6; } | |
13861 | if ${gl_cv_type_max_align_t+:} false; then : | |
13862 | $as_echo_n "(cached) " >&6 | |
13863 | else | |
13864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13865 | /* end confdefs.h. */ | |
13866 | #include <stddef.h> | |
13867 | unsigned int s = sizeof (max_align_t); | |
9c9d63b1 | 13868 | #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__ |
5df4cba6 SM |
13869 | int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; |
13870 | int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; | |
13871 | #endif | |
9c9d63b1 PM |
13872 | typedef struct { char a; max_align_t b; } max_helper; |
13873 | typedef struct { char a; long b; } long_helper; | |
13874 | typedef struct { char a; double b; } double_helper; | |
13875 | typedef struct { char a; long double b; } long_double_helper; | |
13876 | int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1]; | |
13877 | int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1]; | |
13878 | int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1]; | |
5df4cba6 SM |
13879 | |
13880 | int | |
13881 | main () | |
13882 | { | |
c0c3707f | 13883 | |
6ec2e0f5 SDJ |
13884 | ; |
13885 | return 0; | |
13886 | } | |
13887 | _ACEOF | |
13888 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 13889 | gl_cv_type_max_align_t=yes |
6ec2e0f5 | 13890 | else |
5df4cba6 | 13891 | gl_cv_type_max_align_t=no |
6ec2e0f5 | 13892 | fi |
c0c3707f | 13893 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 13894 | |
c0c3707f | 13895 | fi |
5df4cba6 SM |
13896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 |
13897 | $as_echo "$gl_cv_type_max_align_t" >&6; } | |
13898 | if test $gl_cv_type_max_align_t = no; then | |
13899 | HAVE_MAX_ALIGN_T=0 | |
13900 | STDDEF_H=stddef.h | |
13901 | fi | |
13902 | ||
13903 | if test $gt_cv_c_wchar_t = no; then | |
13904 | HAVE_WCHAR_T=0 | |
13905 | STDDEF_H=stddef.h | |
13906 | fi | |
13907 | ||
13908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
13909 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
13910 | if ${gl_cv_decl_null_works+:} false; then : | |
13911 | $as_echo_n "(cached) " >&6 | |
c0c3707f CB |
13912 | else |
13913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13914 | /* end confdefs.h. */ | |
5df4cba6 SM |
13915 | #include <stddef.h> |
13916 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
13917 | ||
c0c3707f CB |
13918 | int |
13919 | main () | |
13920 | { | |
6ec2e0f5 | 13921 | |
c0c3707f CB |
13922 | ; |
13923 | return 0; | |
13924 | } | |
13925 | _ACEOF | |
5df4cba6 SM |
13926 | if ac_fn_c_try_compile "$LINENO"; then : |
13927 | gl_cv_decl_null_works=yes | |
c0c3707f | 13928 | else |
5df4cba6 | 13929 | gl_cv_decl_null_works=no |
c0c3707f | 13930 | fi |
5df4cba6 | 13931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c0c3707f | 13932 | fi |
5df4cba6 SM |
13933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
13934 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
13935 | if test $gl_cv_decl_null_works = no; then | |
13936 | REPLACE_NULL=1 | |
13937 | STDDEF_H=stddef.h | |
13938 | fi | |
6ec2e0f5 | 13939 | |
5df4cba6 SM |
13940 | |
13941 | if test -n "$STDDEF_H"; then | |
13942 | GL_GENERATE_STDDEF_H_TRUE= | |
13943 | GL_GENERATE_STDDEF_H_FALSE='#' | |
13944 | else | |
13945 | GL_GENERATE_STDDEF_H_TRUE='#' | |
13946 | GL_GENERATE_STDDEF_H_FALSE= | |
c0c3707f | 13947 | fi |
6ec2e0f5 | 13948 | |
5df4cba6 | 13949 | if test -n "$STDDEF_H"; then |
6ec2e0f5 | 13950 | |
472fa5ee SM |
13951 | |
13952 | ||
5e8754f9 SDJ |
13953 | |
13954 | ||
5df4cba6 SM |
13955 | |
13956 | ||
13957 | ||
13958 | if test $gl_cv_have_include_next = yes; then | |
13959 | gl_cv_next_stddef_h='<'stddef.h'>' | |
13960 | else | |
13961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
13962 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
13963 | if ${gl_cv_next_stddef_h+:} false; then : | |
13964 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 13965 | else |
5df4cba6 SM |
13966 | |
13967 | ||
13968 | ||
c0c3707f CB |
13969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13970 | /* end confdefs.h. */ | |
c0c3707f | 13971 | #include <stddef.h> |
c0c3707f | 13972 | _ACEOF |
5df4cba6 SM |
13973 | case "$host_os" in |
13974 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
13975 | *) gl_absname_cpp="$ac_cpp" ;; | |
13976 | esac | |
13977 | ||
13978 | case "$host_os" in | |
13979 | mingw*) | |
13980 | gl_dirsep_regex='[/\\]' | |
13981 | ;; | |
13982 | *) | |
13983 | gl_dirsep_regex='\/' | |
13984 | ;; | |
13985 | esac | |
13986 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
13987 | gl_header_literal_regex=`echo 'stddef.h' \ | |
13988 | | sed -e "$gl_make_literal_regex_sed"` | |
13989 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
13990 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
13991 | s|^/[^/]|//&| | |
13992 | p | |
13993 | q | |
13994 | }' | |
13995 | ||
13996 | gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
13997 | sed -n "$gl_absolute_header_sed"` | |
13998 | ||
13999 | gl_header=$gl_cv_absolute_stddef_h | |
14000 | gl_cv_next_stddef_h='"'$gl_header'"' | |
5e8754f9 SDJ |
14001 | |
14002 | ||
c0c3707f | 14003 | fi |
5df4cba6 SM |
14004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
14005 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
14006 | fi | |
14007 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
14008 | ||
14009 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
14010 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
14011 | gl_next_as_first_directive='<'stddef.h'>' | |
14012 | else | |
14013 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
14014 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
14015 | fi | |
14016 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
5e8754f9 SDJ |
14017 | |
14018 | ||
14019 | ||
14020 | ||
5df4cba6 | 14021 | fi |
5e8754f9 SDJ |
14022 | |
14023 | ||
14024 | ||
14025 | ||
14026 | ||
14027 | ||
5df4cba6 SM |
14028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 |
14029 | $as_echo_n "checking whether locale.h defines locale_t... " >&6; } | |
14030 | if ${gl_cv_header_locale_has_locale_t+:} false; then : | |
14031 | $as_echo_n "(cached) " >&6 | |
14032 | else | |
14033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14034 | /* end confdefs.h. */ |
5df4cba6 SM |
14035 | #include <locale.h> |
14036 | locale_t x; | |
c0c3707f CB |
14037 | int |
14038 | main () | |
14039 | { | |
5e8754f9 | 14040 | |
c0c3707f CB |
14041 | ; |
14042 | return 0; | |
14043 | } | |
14044 | _ACEOF | |
14045 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 14046 | gl_cv_header_locale_has_locale_t=yes |
c0c3707f | 14047 | else |
5df4cba6 | 14048 | gl_cv_header_locale_has_locale_t=no |
c0c3707f CB |
14049 | fi |
14050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5df4cba6 | 14051 | |
c0c3707f | 14052 | fi |
5df4cba6 SM |
14053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 |
14054 | $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } | |
14055 | ||
14056 | ||
14057 | if test $ac_cv_header_xlocale_h = yes; then | |
14058 | HAVE_XLOCALE_H=1 | |
14059 | if test $gl_cv_header_locale_has_locale_t = yes; then | |
14060 | gl_cv_header_locale_h_needs_xlocale_h=no | |
14061 | else | |
14062 | gl_cv_header_locale_h_needs_xlocale_h=yes | |
c0c3707f | 14063 | fi |
5df4cba6 SM |
14064 | HAVE_LOCALE_T=1 |
14065 | else | |
14066 | HAVE_XLOCALE_H=0 | |
14067 | gl_cv_header_locale_h_needs_xlocale_h=no | |
14068 | if test $gl_cv_header_locale_has_locale_t = yes; then | |
14069 | HAVE_LOCALE_T=1 | |
14070 | else | |
14071 | HAVE_LOCALE_T=0 | |
14072 | fi | |
14073 | fi | |
14074 | ||
14075 | ||
5e8754f9 | 14076 | |
5df4cba6 SM |
14077 | |
14078 | gl_threads_api=none | |
14079 | LIBTHREAD= | |
14080 | LTLIBTHREAD= | |
14081 | LIBMULTITHREAD= | |
14082 | LTLIBMULTITHREAD= | |
14083 | if test "$gl_use_threads" != no; then | |
14084 | ||
14085 | ||
14086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
14087 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
14088 | if ${gl_cv_have_weak+:} false; then : | |
14089 | $as_echo_n "(cached) " >&6 | |
14090 | else | |
14091 | gl_cv_have_weak=no | |
14092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14093 | /* end confdefs.h. */ | |
14094 | extern void xyzzy (); | |
14095 | #pragma weak xyzzy | |
c0c3707f CB |
14096 | int |
14097 | main () | |
14098 | { | |
5df4cba6 | 14099 | xyzzy(); |
c0c3707f CB |
14100 | ; |
14101 | return 0; | |
14102 | } | |
14103 | _ACEOF | |
5df4cba6 SM |
14104 | if ac_fn_c_try_link "$LINENO"; then : |
14105 | gl_cv_have_weak=maybe | |
14106 | fi | |
14107 | rm -f core conftest.err conftest.$ac_objext \ | |
14108 | conftest$ac_exeext conftest.$ac_ext | |
14109 | if test $gl_cv_have_weak = maybe; then | |
14110 | if test "$cross_compiling" = yes; then : | |
14111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14112 | /* end confdefs.h. */ |
5df4cba6 SM |
14113 | #ifdef __ELF__ |
14114 | Extensible Linking Format | |
14115 | #endif | |
5e8754f9 | 14116 | |
5df4cba6 SM |
14117 | _ACEOF |
14118 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
14119 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
14120 | gl_cv_have_weak="guessing yes" | |
14121 | else | |
14122 | gl_cv_have_weak="guessing no" | |
14123 | fi | |
14124 | rm -f conftest* | |
5e8754f9 | 14125 | |
5df4cba6 SM |
14126 | |
14127 | else | |
14128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14129 | /* end confdefs.h. */ | |
14130 | ||
14131 | #include <stdio.h> | |
14132 | #pragma weak fputs | |
14133 | int main () | |
14134 | { | |
14135 | return (fputs == NULL); | |
c0c3707f CB |
14136 | } |
14137 | _ACEOF | |
5df4cba6 SM |
14138 | if ac_fn_c_try_run "$LINENO"; then : |
14139 | gl_cv_have_weak=yes | |
c0c3707f | 14140 | else |
5df4cba6 | 14141 | gl_cv_have_weak=no |
c0c3707f | 14142 | fi |
5df4cba6 SM |
14143 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14144 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c0c3707f | 14145 | fi |
5df4cba6 SM |
14146 | |
14147 | fi | |
14148 | case " $LDFLAGS " in | |
14149 | *" -static "*) gl_cv_have_weak=no ;; | |
14150 | esac | |
14151 | case "$gl_cv_have_weak" in | |
14152 | *yes) | |
14153 | case "$host_os" in | |
14154 | freebsd* | dragonfly*) | |
14155 | : > conftest1.c | |
14156 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
14157 | cat <<EOF > conftest2.c | |
14158 | #include <pthread.h> | |
14159 | #pragma weak pthread_mutexattr_gettype | |
14160 | int main () | |
14161 | { | |
14162 | return (pthread_mutexattr_gettype != NULL); | |
14163 | } | |
14164 | EOF | |
14165 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
14166 | || gl_cv_have_weak=no | |
14167 | rm -f conftest1.c libempty.so conftest2.c conftest | |
14168 | ;; | |
14169 | esac | |
14170 | ;; | |
14171 | esac | |
14172 | ||
14173 | fi | |
14174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
14175 | $as_echo "$gl_cv_have_weak" >&6; } | |
14176 | case "$gl_cv_have_weak" in | |
14177 | *yes) | |
14178 | ||
14179 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
14180 | ||
14181 | ;; | |
14182 | esac | |
14183 | ||
14184 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
14185 | ||
14186 | : | |
c0c3707f | 14187 | fi |
5df4cba6 SM |
14188 | if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then |
14189 | ||
14190 | gl_have_isoc_threads="$ac_cv_header_threads_h" | |
14191 | fi | |
14192 | if test "$gl_use_threads" = yes \ | |
14193 | || test "$gl_use_threads" = posix \ | |
14194 | || test "$gl_use_threads" = isoc+posix; then | |
14195 | ||
14196 | ||
14197 | if test -z "$gl_pthreadlib_body_done"; then | |
14198 | gl_pthread_api=no | |
14199 | LIBPTHREAD= | |
14200 | LIBPMULTITHREAD= | |
14201 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
14202 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
14203 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
14204 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
14205 | gl_have_pthread_h=yes | |
14206 | else | |
14207 | gl_have_pthread_h=no | |
14208 | fi | |
14209 | ||
14210 | ||
14211 | if test "$gl_have_pthread_h" = yes; then | |
14212 | # Other possible tests: | |
14213 | # -lpthreads (FSU threads, PCthreads) | |
14214 | # -lgthreads | |
14215 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
14216 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
14217 | # the second one only in libpthread, and lock.c needs it. | |
14218 | # | |
14219 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
14220 | # needs -pthread for some reason. See: | |
14221 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
14222 | save_LIBS=$LIBS | |
14223 | for gl_pthread in '' '-pthread'; do | |
14224 | LIBS="$LIBS $gl_pthread" | |
14225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14226 | /* end confdefs.h. */ | |
14227 | #include <pthread.h> | |
14228 | pthread_mutex_t m; | |
14229 | pthread_mutexattr_t ma; | |
5e8754f9 | 14230 | |
c0c3707f CB |
14231 | int |
14232 | main () | |
14233 | { | |
5df4cba6 SM |
14234 | pthread_mutex_lock (&m); |
14235 | pthread_mutexattr_init (&ma); | |
c0c3707f CB |
14236 | ; |
14237 | return 0; | |
14238 | } | |
14239 | _ACEOF | |
5df4cba6 SM |
14240 | if ac_fn_c_try_link "$LINENO"; then : |
14241 | gl_pthread_api=yes | |
14242 | LIBPTHREAD=$gl_pthread | |
14243 | LIBPMULTITHREAD=$gl_pthread | |
c0c3707f | 14244 | fi |
5df4cba6 SM |
14245 | rm -f core conftest.err conftest.$ac_objext \ |
14246 | conftest$ac_exeext conftest.$ac_ext | |
14247 | LIBS=$save_LIBS | |
14248 | test $gl_pthread_api = yes && break | |
14249 | done | |
14250 | ||
14251 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | |
14252 | # since it is defined as a macro on OSF/1.) | |
14253 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
14254 | # The program links fine without libpthread. But it may actually | |
14255 | # need to link with libpthread in order to create multiple threads. | |
14256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14257 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14258 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
14259 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 14260 | else |
5df4cba6 SM |
14261 | ac_check_lib_save_LIBS=$LIBS |
14262 | LIBS="-lpthread $LIBS" | |
14263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14264 | /* end confdefs.h. */ |
5df4cba6 SM |
14265 | |
14266 | /* Override any GCC internal prototype to avoid an error. | |
14267 | Use char because int might match the return type of a GCC | |
14268 | builtin and then its argument prototype would still apply. */ | |
14269 | #ifdef __cplusplus | |
14270 | extern "C" | |
14271 | #endif | |
14272 | char pthread_kill (); | |
c0c3707f CB |
14273 | int |
14274 | main () | |
14275 | { | |
5df4cba6 | 14276 | return pthread_kill (); |
c0c3707f CB |
14277 | ; |
14278 | return 0; | |
14279 | } | |
14280 | _ACEOF | |
5df4cba6 SM |
14281 | if ac_fn_c_try_link "$LINENO"; then : |
14282 | ac_cv_lib_pthread_pthread_kill=yes | |
6ec2e0f5 | 14283 | else |
5df4cba6 | 14284 | ac_cv_lib_pthread_pthread_kill=no |
6ec2e0f5 | 14285 | fi |
5df4cba6 SM |
14286 | rm -f core conftest.err conftest.$ac_objext \ |
14287 | conftest$ac_exeext conftest.$ac_ext | |
14288 | LIBS=$ac_check_lib_save_LIBS | |
c0c3707f | 14289 | fi |
5df4cba6 SM |
14290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 |
14291 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14292 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14293 | LIBPMULTITHREAD=-lpthread | |
14294 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
14295 | # Therefore pthread_in_use() needs to actually try to create a | |
14296 | # thread: pthread_create from libc will fail, whereas | |
14297 | # pthread_create will actually create a thread. | |
14298 | # On Solaris 10 or newer, this test is no longer needed, because | |
14299 | # libc contains the fully functional pthread functions. | |
14300 | case "$host_os" in | |
14301 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
472fa5ee | 14302 | |
5df4cba6 | 14303 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h |
472fa5ee | 14304 | |
5df4cba6 | 14305 | esac |
472fa5ee | 14306 | |
5df4cba6 | 14307 | fi |
472fa5ee | 14308 | |
5df4cba6 SM |
14309 | elif test $gl_pthread_api != yes; then |
14310 | # Some library is needed. Try libpthread and libc_r. | |
14311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14312 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14313 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
c0c3707f CB |
14314 | $as_echo_n "(cached) " >&6 |
14315 | else | |
5df4cba6 SM |
14316 | ac_check_lib_save_LIBS=$LIBS |
14317 | LIBS="-lpthread $LIBS" | |
14318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14319 | /* end confdefs.h. */ |
5df4cba6 SM |
14320 | |
14321 | /* Override any GCC internal prototype to avoid an error. | |
14322 | Use char because int might match the return type of a GCC | |
14323 | builtin and then its argument prototype would still apply. */ | |
14324 | #ifdef __cplusplus | |
14325 | extern "C" | |
14326 | #endif | |
14327 | char pthread_kill (); | |
c0c3707f CB |
14328 | int |
14329 | main () | |
14330 | { | |
5df4cba6 | 14331 | return pthread_kill (); |
c0c3707f CB |
14332 | ; |
14333 | return 0; | |
14334 | } | |
14335 | _ACEOF | |
14336 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14337 | ac_cv_lib_pthread_pthread_kill=yes |
c0c3707f | 14338 | else |
5df4cba6 | 14339 | ac_cv_lib_pthread_pthread_kill=no |
c0c3707f CB |
14340 | fi |
14341 | rm -f core conftest.err conftest.$ac_objext \ | |
14342 | conftest$ac_exeext conftest.$ac_ext | |
5df4cba6 SM |
14343 | LIBS=$ac_check_lib_save_LIBS |
14344 | fi | |
14345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14346 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14347 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14348 | gl_pthread_api=yes | |
14349 | LIBPTHREAD=-lpthread | |
14350 | LIBPMULTITHREAD=-lpthread | |
c0c3707f | 14351 | fi |
472fa5ee | 14352 | |
5df4cba6 SM |
14353 | if test $gl_pthread_api != yes; then |
14354 | # For FreeBSD 4. | |
14355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
14356 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
14357 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
14358 | $as_echo_n "(cached) " >&6 | |
14359 | else | |
14360 | ac_check_lib_save_LIBS=$LIBS | |
14361 | LIBS="-lc_r $LIBS" | |
14362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14363 | /* end confdefs.h. */ | |
472fa5ee | 14364 | |
5df4cba6 SM |
14365 | /* Override any GCC internal prototype to avoid an error. |
14366 | Use char because int might match the return type of a GCC | |
14367 | builtin and then its argument prototype would still apply. */ | |
14368 | #ifdef __cplusplus | |
14369 | extern "C" | |
14370 | #endif | |
14371 | char pthread_kill (); | |
14372 | int | |
14373 | main () | |
14374 | { | |
14375 | return pthread_kill (); | |
14376 | ; | |
14377 | return 0; | |
14378 | } | |
14379 | _ACEOF | |
14380 | if ac_fn_c_try_link "$LINENO"; then : | |
14381 | ac_cv_lib_c_r_pthread_kill=yes | |
14382 | else | |
14383 | ac_cv_lib_c_r_pthread_kill=no | |
14384 | fi | |
14385 | rm -f core conftest.err conftest.$ac_objext \ | |
14386 | conftest$ac_exeext conftest.$ac_ext | |
14387 | LIBS=$ac_check_lib_save_LIBS | |
14388 | fi | |
14389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
14390 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
14391 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
14392 | gl_pthread_api=yes | |
14393 | LIBPTHREAD=-lc_r | |
14394 | LIBPMULTITHREAD=-lc_r | |
14395 | fi | |
6ec2e0f5 | 14396 | |
5df4cba6 SM |
14397 | fi |
14398 | fi | |
14399 | fi | |
14400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
14401 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
14402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
14403 | $as_echo "$gl_pthread_api" >&6; } | |
472fa5ee SM |
14404 | |
14405 | ||
5df4cba6 | 14406 | if test $gl_pthread_api = yes; then |
472fa5ee | 14407 | |
5df4cba6 | 14408 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h |
472fa5ee | 14409 | |
5df4cba6 | 14410 | fi |
472fa5ee | 14411 | |
5df4cba6 | 14412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c0c3707f | 14413 | /* end confdefs.h. */ |
5df4cba6 | 14414 | #include <sched.h> |
c0c3707f CB |
14415 | int |
14416 | main () | |
14417 | { | |
5df4cba6 | 14418 | sched_yield (); |
c0c3707f CB |
14419 | ; |
14420 | return 0; | |
14421 | } | |
14422 | _ACEOF | |
14423 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14424 | LIB_SCHED_YIELD= |
6ec2e0f5 | 14425 | |
c0c3707f | 14426 | else |
5df4cba6 SM |
14427 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 |
14428 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
14429 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
14430 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 14431 | else |
5df4cba6 SM |
14432 | ac_check_lib_save_LIBS=$LIBS |
14433 | LIBS="-lrt $LIBS" | |
14434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14435 | /* end confdefs.h. */ |
6ec2e0f5 | 14436 | |
5df4cba6 SM |
14437 | /* Override any GCC internal prototype to avoid an error. |
14438 | Use char because int might match the return type of a GCC | |
14439 | builtin and then its argument prototype would still apply. */ | |
14440 | #ifdef __cplusplus | |
14441 | extern "C" | |
14442 | #endif | |
14443 | char sched_yield (); | |
14444 | int | |
14445 | main () | |
c0c3707f | 14446 | { |
5df4cba6 SM |
14447 | return sched_yield (); |
14448 | ; | |
14449 | return 0; | |
c0c3707f | 14450 | } |
6ec2e0f5 | 14451 | _ACEOF |
5df4cba6 SM |
14452 | if ac_fn_c_try_link "$LINENO"; then : |
14453 | ac_cv_lib_rt_sched_yield=yes | |
c0c3707f | 14454 | else |
5df4cba6 | 14455 | ac_cv_lib_rt_sched_yield=no |
6ec2e0f5 | 14456 | fi |
5df4cba6 SM |
14457 | rm -f core conftest.err conftest.$ac_objext \ |
14458 | conftest$ac_exeext conftest.$ac_ext | |
14459 | LIBS=$ac_check_lib_save_LIBS | |
6ec2e0f5 | 14460 | fi |
5df4cba6 SM |
14461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 |
14462 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
14463 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
14464 | LIB_SCHED_YIELD=-lrt | |
14465 | else | |
14466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
14467 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
14468 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
14469 | $as_echo_n "(cached) " >&6 | |
14470 | else | |
14471 | ac_check_lib_save_LIBS=$LIBS | |
14472 | LIBS="-lposix4 $LIBS" | |
14473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f | 14474 | /* end confdefs.h. */ |
6ec2e0f5 | 14475 | |
5df4cba6 SM |
14476 | /* Override any GCC internal prototype to avoid an error. |
14477 | Use char because int might match the return type of a GCC | |
14478 | builtin and then its argument prototype would still apply. */ | |
14479 | #ifdef __cplusplus | |
14480 | extern "C" | |
14481 | #endif | |
14482 | char sched_yield (); | |
c0c3707f CB |
14483 | int |
14484 | main () | |
14485 | { | |
5df4cba6 | 14486 | return sched_yield (); |
c0c3707f CB |
14487 | ; |
14488 | return 0; | |
14489 | } | |
14490 | _ACEOF | |
14491 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 SM |
14492 | ac_cv_lib_posix4_sched_yield=yes |
14493 | else | |
14494 | ac_cv_lib_posix4_sched_yield=no | |
c0c3707f CB |
14495 | fi |
14496 | rm -f core conftest.err conftest.$ac_objext \ | |
14497 | conftest$ac_exeext conftest.$ac_ext | |
5df4cba6 SM |
14498 | LIBS=$ac_check_lib_save_LIBS |
14499 | fi | |
14500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
14501 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
14502 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
14503 | LIB_SCHED_YIELD=-lposix4 | |
14504 | fi | |
14505 | ||
14506 | fi | |
14507 | ||
14508 | ||
14509 | fi | |
14510 | rm -f core conftest.err conftest.$ac_objext \ | |
14511 | conftest$ac_exeext conftest.$ac_ext | |
14512 | ||
14513 | ||
14514 | gl_pthreadlib_body_done=done | |
14515 | fi | |
14516 | ||
14517 | LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD | |
14518 | LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD | |
14519 | if test $gl_pthread_api = yes; then | |
14520 | if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then | |
14521 | gl_threads_api='isoc+posix' | |
14522 | ||
14523 | $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h | |
14524 | ||
14525 | LIBTHREAD= LTLIBTHREAD= | |
14526 | else | |
14527 | gl_threads_api=posix | |
14528 | ||
14529 | $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h | |
14530 | ||
14531 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | |
14532 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
14533 | ||
14534 | $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h | |
14535 | ||
14536 | LIBTHREAD= LTLIBTHREAD= | |
9c9d63b1 PM |
14537 | else |
14538 | case "$host_os" in | |
14539 | freebsd* | dragonfly*) | |
14540 | if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then | |
14541 | ||
14542 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
14543 | ||
14544 | fi | |
14545 | ;; | |
14546 | esac | |
5df4cba6 SM |
14547 | fi |
14548 | fi | |
14549 | fi | |
c0c3707f CB |
14550 | fi |
14551 | fi | |
5df4cba6 SM |
14552 | if test $gl_threads_api = none; then |
14553 | if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then | |
14554 | ||
14555 | ||
14556 | ||
14557 | if test -z "$gl_stdthreadlib_body_done"; then | |
14558 | ||
14559 | ||
14560 | case "$host_os" in | |
14561 | mingw*) | |
14562 | LIBSTDTHREAD= | |
14563 | ;; | |
14564 | *) | |
c0c3707f CB |
14565 | |
14566 | ||
5df4cba6 | 14567 | if test -z "$gl_pthreadlib_body_done"; then |
c0c3707f CB |
14568 | gl_pthread_api=no |
14569 | LIBPTHREAD= | |
14570 | LIBPMULTITHREAD= | |
14571 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
14572 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
14573 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
14574 | if test "x$ac_cv_header_pthread_h" = xyes; then : | |
14575 | gl_have_pthread_h=yes | |
14576 | else | |
14577 | gl_have_pthread_h=no | |
14578 | fi | |
6ec2e0f5 | 14579 | |
6ec2e0f5 | 14580 | |
c0c3707f CB |
14581 | if test "$gl_have_pthread_h" = yes; then |
14582 | # Other possible tests: | |
14583 | # -lpthreads (FSU threads, PCthreads) | |
14584 | # -lgthreads | |
14585 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
14586 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
14587 | # the second one only in libpthread, and lock.c needs it. | |
14588 | # | |
14589 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
14590 | # needs -pthread for some reason. See: | |
14591 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
14592 | save_LIBS=$LIBS | |
14593 | for gl_pthread in '' '-pthread'; do | |
14594 | LIBS="$LIBS $gl_pthread" | |
14595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14596 | /* end confdefs.h. */ | |
14597 | #include <pthread.h> | |
14598 | pthread_mutex_t m; | |
14599 | pthread_mutexattr_t ma; | |
6ec2e0f5 | 14600 | |
c0c3707f CB |
14601 | int |
14602 | main () | |
14603 | { | |
14604 | pthread_mutex_lock (&m); | |
14605 | pthread_mutexattr_init (&ma); | |
14606 | ; | |
14607 | return 0; | |
14608 | } | |
6ec2e0f5 | 14609 | _ACEOF |
c0c3707f CB |
14610 | if ac_fn_c_try_link "$LINENO"; then : |
14611 | gl_pthread_api=yes | |
14612 | LIBPTHREAD=$gl_pthread | |
14613 | LIBPMULTITHREAD=$gl_pthread | |
6ec2e0f5 | 14614 | fi |
c0c3707f CB |
14615 | rm -f core conftest.err conftest.$ac_objext \ |
14616 | conftest$ac_exeext conftest.$ac_ext | |
14617 | LIBS=$save_LIBS | |
14618 | test $gl_pthread_api = yes && break | |
14619 | done | |
6ec2e0f5 | 14620 | |
c0c3707f CB |
14621 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, |
14622 | # since it is defined as a macro on OSF/1.) | |
14623 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
14624 | # The program links fine without libpthread. But it may actually | |
14625 | # need to link with libpthread in order to create multiple threads. | |
14626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14627 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14628 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
6ec2e0f5 SDJ |
14629 | $as_echo_n "(cached) " >&6 |
14630 | else | |
c0c3707f | 14631 | ac_check_lib_save_LIBS=$LIBS |
5df4cba6 SM |
14632 | LIBS="-lpthread $LIBS" |
14633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14634 | /* end confdefs.h. */ | |
14635 | ||
14636 | /* Override any GCC internal prototype to avoid an error. | |
14637 | Use char because int might match the return type of a GCC | |
14638 | builtin and then its argument prototype would still apply. */ | |
14639 | #ifdef __cplusplus | |
14640 | extern "C" | |
14641 | #endif | |
14642 | char pthread_kill (); | |
14643 | int | |
14644 | main () | |
14645 | { | |
14646 | return pthread_kill (); | |
14647 | ; | |
14648 | return 0; | |
14649 | } | |
14650 | _ACEOF | |
14651 | if ac_fn_c_try_link "$LINENO"; then : | |
14652 | ac_cv_lib_pthread_pthread_kill=yes | |
14653 | else | |
14654 | ac_cv_lib_pthread_pthread_kill=no | |
14655 | fi | |
14656 | rm -f core conftest.err conftest.$ac_objext \ | |
14657 | conftest$ac_exeext conftest.$ac_ext | |
14658 | LIBS=$ac_check_lib_save_LIBS | |
14659 | fi | |
14660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14661 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14662 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14663 | LIBPMULTITHREAD=-lpthread | |
14664 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
14665 | # Therefore pthread_in_use() needs to actually try to create a | |
14666 | # thread: pthread_create from libc will fail, whereas | |
14667 | # pthread_create will actually create a thread. | |
14668 | # On Solaris 10 or newer, this test is no longer needed, because | |
14669 | # libc contains the fully functional pthread functions. | |
14670 | case "$host_os" in | |
14671 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
14672 | ||
14673 | $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
14674 | ||
14675 | esac | |
14676 | ||
14677 | fi | |
14678 | ||
14679 | elif test $gl_pthread_api != yes; then | |
14680 | # Some library is needed. Try libpthread and libc_r. | |
14681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
14682 | $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } | |
14683 | if ${ac_cv_lib_pthread_pthread_kill+:} false; then : | |
14684 | $as_echo_n "(cached) " >&6 | |
14685 | else | |
14686 | ac_check_lib_save_LIBS=$LIBS | |
14687 | LIBS="-lpthread $LIBS" | |
14688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14689 | /* end confdefs.h. */ | |
14690 | ||
14691 | /* Override any GCC internal prototype to avoid an error. | |
14692 | Use char because int might match the return type of a GCC | |
14693 | builtin and then its argument prototype would still apply. */ | |
14694 | #ifdef __cplusplus | |
14695 | extern "C" | |
14696 | #endif | |
14697 | char pthread_kill (); | |
14698 | int | |
14699 | main () | |
14700 | { | |
14701 | return pthread_kill (); | |
14702 | ; | |
14703 | return 0; | |
14704 | } | |
14705 | _ACEOF | |
14706 | if ac_fn_c_try_link "$LINENO"; then : | |
14707 | ac_cv_lib_pthread_pthread_kill=yes | |
14708 | else | |
14709 | ac_cv_lib_pthread_pthread_kill=no | |
14710 | fi | |
14711 | rm -f core conftest.err conftest.$ac_objext \ | |
14712 | conftest$ac_exeext conftest.$ac_ext | |
14713 | LIBS=$ac_check_lib_save_LIBS | |
14714 | fi | |
14715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
14716 | $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
14717 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : | |
14718 | gl_pthread_api=yes | |
14719 | LIBPTHREAD=-lpthread | |
14720 | LIBPMULTITHREAD=-lpthread | |
14721 | fi | |
14722 | ||
14723 | if test $gl_pthread_api != yes; then | |
14724 | # For FreeBSD 4. | |
14725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
14726 | $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } | |
14727 | if ${ac_cv_lib_c_r_pthread_kill+:} false; then : | |
14728 | $as_echo_n "(cached) " >&6 | |
14729 | else | |
14730 | ac_check_lib_save_LIBS=$LIBS | |
14731 | LIBS="-lc_r $LIBS" | |
14732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14733 | /* end confdefs.h. */ | |
14734 | ||
14735 | /* Override any GCC internal prototype to avoid an error. | |
14736 | Use char because int might match the return type of a GCC | |
14737 | builtin and then its argument prototype would still apply. */ | |
14738 | #ifdef __cplusplus | |
14739 | extern "C" | |
14740 | #endif | |
14741 | char pthread_kill (); | |
14742 | int | |
14743 | main () | |
14744 | { | |
14745 | return pthread_kill (); | |
14746 | ; | |
14747 | return 0; | |
14748 | } | |
14749 | _ACEOF | |
14750 | if ac_fn_c_try_link "$LINENO"; then : | |
14751 | ac_cv_lib_c_r_pthread_kill=yes | |
14752 | else | |
14753 | ac_cv_lib_c_r_pthread_kill=no | |
14754 | fi | |
14755 | rm -f core conftest.err conftest.$ac_objext \ | |
14756 | conftest$ac_exeext conftest.$ac_ext | |
14757 | LIBS=$ac_check_lib_save_LIBS | |
14758 | fi | |
14759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
14760 | $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
14761 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : | |
14762 | gl_pthread_api=yes | |
14763 | LIBPTHREAD=-lc_r | |
14764 | LIBPMULTITHREAD=-lc_r | |
14765 | fi | |
14766 | ||
14767 | fi | |
14768 | fi | |
14769 | fi | |
14770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
14771 | $as_echo_n "checking whether POSIX threads API is available... " >&6; } | |
14772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
14773 | $as_echo "$gl_pthread_api" >&6; } | |
14774 | ||
14775 | ||
14776 | if test $gl_pthread_api = yes; then | |
14777 | ||
14778 | $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h | |
14779 | ||
14780 | fi | |
14781 | ||
14782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14783 | /* end confdefs.h. */ | |
14784 | #include <sched.h> | |
14785 | int | |
14786 | main () | |
14787 | { | |
14788 | sched_yield (); | |
14789 | ; | |
14790 | return 0; | |
14791 | } | |
14792 | _ACEOF | |
14793 | if ac_fn_c_try_link "$LINENO"; then : | |
14794 | LIB_SCHED_YIELD= | |
14795 | ||
14796 | else | |
14797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
14798 | $as_echo_n "checking for sched_yield in -lrt... " >&6; } | |
14799 | if ${ac_cv_lib_rt_sched_yield+:} false; then : | |
14800 | $as_echo_n "(cached) " >&6 | |
14801 | else | |
14802 | ac_check_lib_save_LIBS=$LIBS | |
14803 | LIBS="-lrt $LIBS" | |
c0c3707f | 14804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 | 14805 | /* end confdefs.h. */ |
6ec2e0f5 | 14806 | |
c0c3707f CB |
14807 | /* Override any GCC internal prototype to avoid an error. |
14808 | Use char because int might match the return type of a GCC | |
14809 | builtin and then its argument prototype would still apply. */ | |
14810 | #ifdef __cplusplus | |
14811 | extern "C" | |
14812 | #endif | |
5df4cba6 | 14813 | char sched_yield (); |
c0c3707f CB |
14814 | int |
14815 | main () | |
14816 | { | |
5df4cba6 | 14817 | return sched_yield (); |
c0c3707f CB |
14818 | ; |
14819 | return 0; | |
14820 | } | |
6ec2e0f5 | 14821 | _ACEOF |
c0c3707f | 14822 | if ac_fn_c_try_link "$LINENO"; then : |
5df4cba6 | 14823 | ac_cv_lib_rt_sched_yield=yes |
6ec2e0f5 | 14824 | else |
5df4cba6 | 14825 | ac_cv_lib_rt_sched_yield=no |
6ec2e0f5 | 14826 | fi |
c0c3707f CB |
14827 | rm -f core conftest.err conftest.$ac_objext \ |
14828 | conftest$ac_exeext conftest.$ac_ext | |
14829 | LIBS=$ac_check_lib_save_LIBS | |
6ec2e0f5 | 14830 | fi |
5df4cba6 SM |
14831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 |
14832 | $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } | |
14833 | if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : | |
14834 | LIB_SCHED_YIELD=-lrt | |
14835 | else | |
14836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
14837 | $as_echo_n "checking for sched_yield in -lposix4... " >&6; } | |
14838 | if ${ac_cv_lib_posix4_sched_yield+:} false; then : | |
6ec2e0f5 SDJ |
14839 | $as_echo_n "(cached) " >&6 |
14840 | else | |
c0c3707f | 14841 | ac_check_lib_save_LIBS=$LIBS |
5df4cba6 | 14842 | LIBS="-lposix4 $LIBS" |
c0c3707f | 14843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ec2e0f5 SDJ |
14844 | /* end confdefs.h. */ |
14845 | ||
c0c3707f CB |
14846 | /* Override any GCC internal prototype to avoid an error. |
14847 | Use char because int might match the return type of a GCC | |
14848 | builtin and then its argument prototype would still apply. */ | |
14849 | #ifdef __cplusplus | |
14850 | extern "C" | |
14851 | #endif | |
5df4cba6 | 14852 | char sched_yield (); |
6ec2e0f5 SDJ |
14853 | int |
14854 | main () | |
14855 | { | |
5df4cba6 | 14856 | return sched_yield (); |
c0c3707f CB |
14857 | ; |
14858 | return 0; | |
14859 | } | |
14860 | _ACEOF | |
14861 | if ac_fn_c_try_link "$LINENO"; then : | |
5df4cba6 | 14862 | ac_cv_lib_posix4_sched_yield=yes |
c0c3707f | 14863 | else |
5df4cba6 | 14864 | ac_cv_lib_posix4_sched_yield=no |
c0c3707f CB |
14865 | fi |
14866 | rm -f core conftest.err conftest.$ac_objext \ | |
14867 | conftest$ac_exeext conftest.$ac_ext | |
14868 | LIBS=$ac_check_lib_save_LIBS | |
14869 | fi | |
5df4cba6 SM |
14870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 |
14871 | $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } | |
14872 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : | |
14873 | LIB_SCHED_YIELD=-lposix4 | |
c0c3707f | 14874 | fi |
6ec2e0f5 | 14875 | |
5df4cba6 SM |
14876 | fi |
14877 | ||
14878 | ||
14879 | fi | |
14880 | rm -f core conftest.err conftest.$ac_objext \ | |
14881 | conftest$ac_exeext conftest.$ac_ext | |
14882 | ||
14883 | ||
14884 | gl_pthreadlib_body_done=done | |
14885 | fi | |
14886 | ||
14887 | if test $ac_cv_header_threads_h = yes; then | |
14888 | for ac_func in thrd_create | |
14889 | do : | |
14890 | ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create" | |
14891 | if test "x$ac_cv_func_thrd_create" = xyes; then : | |
14892 | cat >>confdefs.h <<_ACEOF | |
14893 | #define HAVE_THRD_CREATE 1 | |
14894 | _ACEOF | |
14895 | ||
14896 | fi | |
14897 | done | |
14898 | ||
14899 | if test $ac_cv_func_thrd_create = yes; then | |
14900 | LIBSTDTHREAD= | |
14901 | else | |
14902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5 | |
14903 | $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; } | |
14904 | if ${ac_cv_lib_stdthreads_thrd_create+:} false; then : | |
c0c3707f CB |
14905 | $as_echo_n "(cached) " >&6 |
14906 | else | |
14907 | ac_check_lib_save_LIBS=$LIBS | |
5df4cba6 | 14908 | LIBS="-lstdthreads $LIBS" |
c0c3707f CB |
14909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14910 | /* end confdefs.h. */ | |
6ec2e0f5 | 14911 | |
c0c3707f CB |
14912 | /* Override any GCC internal prototype to avoid an error. |
14913 | Use char because int might match the return type of a GCC | |
14914 | builtin and then its argument prototype would still apply. */ | |
14915 | #ifdef __cplusplus | |
14916 | extern "C" | |
14917 | #endif | |
5df4cba6 | 14918 | char thrd_create (); |
c0c3707f CB |
14919 | int |
14920 | main () | |
14921 | { | |
5df4cba6 | 14922 | return thrd_create (); |
6ec2e0f5 SDJ |
14923 | ; |
14924 | return 0; | |
14925 | } | |
14926 | _ACEOF | |
c0c3707f | 14927 | if ac_fn_c_try_link "$LINENO"; then : |
5df4cba6 | 14928 | ac_cv_lib_stdthreads_thrd_create=yes |
6ec2e0f5 | 14929 | else |
5df4cba6 | 14930 | ac_cv_lib_stdthreads_thrd_create=no |
6ec2e0f5 | 14931 | fi |
c0c3707f CB |
14932 | rm -f core conftest.err conftest.$ac_objext \ |
14933 | conftest$ac_exeext conftest.$ac_ext | |
14934 | LIBS=$ac_check_lib_save_LIBS | |
14935 | fi | |
5df4cba6 SM |
14936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5 |
14937 | $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; } | |
14938 | if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then : | |
6ec2e0f5 | 14939 | |
5df4cba6 | 14940 | LIBSTDTHREAD='-lstdthreads -lpthread' |
6ec2e0f5 | 14941 | |
5df4cba6 | 14942 | else |
6ec2e0f5 | 14943 | |
5df4cba6 | 14944 | LIBSTDTHREAD="$LIBPMULTITHREAD" |
6ec2e0f5 | 14945 | |
5df4cba6 | 14946 | fi |
6ec2e0f5 | 14947 | |
5df4cba6 | 14948 | fi |
c0c3707f | 14949 | else |
5df4cba6 SM |
14950 | LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD" |
14951 | fi | |
14952 | ;; | |
14953 | esac | |
c0c3707f | 14954 | |
c0c3707f | 14955 | |
5df4cba6 SM |
14956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5 |
14957 | $as_echo_n "checking whether ISO C threads API is available... " >&6; } | |
14958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5 | |
14959 | $as_echo "$ac_cv_header_threads_h" >&6; } | |
14960 | gl_stdthreadlib_body_done=done | |
14961 | fi | |
c0c3707f | 14962 | |
5df4cba6 SM |
14963 | LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD |
14964 | LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD | |
c0c3707f CB |
14965 | gl_threads_api=isoc |
14966 | ||
14967 | $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h | |
14968 | ||
14969 | fi | |
14970 | fi | |
14971 | if test $gl_threads_api = none; then | |
14972 | case "$gl_use_threads" in | |
14973 | yes | windows | win32) # The 'win32' is for backward compatibility. | |
14974 | if { case "$host_os" in | |
14975 | mingw*) true;; | |
14976 | *) false;; | |
14977 | esac | |
14978 | }; then | |
14979 | gl_threads_api=windows | |
14980 | ||
14981 | $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h | |
14982 | ||
14983 | fi | |
14984 | ;; | |
14985 | esac | |
14986 | fi | |
14987 | fi | |
14988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 | |
14989 | $as_echo_n "checking for multithread API to use... " >&6; } | |
14990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 | |
14991 | $as_echo "$gl_threads_api" >&6; } | |
14992 | ||
14993 | ||
14994 | ||
14995 | ||
14996 | ||
14997 | ||
14998 | ||
14999 | ||
15000 | ||
15001 | ||
15002 | ||
15003 | ||
15004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 | |
15005 | $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } | |
15006 | if ${gl_cv_func_malloc_posix+:} false; then : | |
6ec2e0f5 SDJ |
15007 | $as_echo_n "(cached) " >&6 |
15008 | else | |
c0c3707f CB |
15009 | |
15010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 15011 | /* end confdefs.h. */ |
c0c3707f | 15012 | |
6ec2e0f5 SDJ |
15013 | int |
15014 | main () | |
15015 | { | |
c0c3707f CB |
15016 | #if defined _WIN32 && ! defined __CYGWIN__ |
15017 | choke me | |
15018 | #endif | |
6ec2e0f5 SDJ |
15019 | |
15020 | ; | |
15021 | return 0; | |
15022 | } | |
15023 | _ACEOF | |
15024 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 15025 | gl_cv_func_malloc_posix=yes |
6ec2e0f5 | 15026 | else |
c0c3707f | 15027 | gl_cv_func_malloc_posix=no |
6ec2e0f5 SDJ |
15028 | fi |
15029 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
472fa5ee | 15030 | |
c0c3707f CB |
15031 | fi |
15032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 | |
15033 | $as_echo "$gl_cv_func_malloc_posix" >&6; } | |
472fa5ee SM |
15034 | |
15035 | ||
6ec2e0f5 | 15036 | |
9c9d63b1 | 15037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 |
c0c3707f CB |
15038 | $as_echo_n "checking for GNU libc compatible malloc... " >&6; } |
15039 | if ${ac_cv_func_malloc_0_nonnull+:} false; then : | |
6ec2e0f5 SDJ |
15040 | $as_echo_n "(cached) " >&6 |
15041 | else | |
15042 | if test "$cross_compiling" = yes; then : | |
15043 | case "$host_os" in | |
c0c3707f CB |
15044 | # Guess yes on platforms where we know the result. |
15045 | *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ | |
15046 | | hpux* | solaris* | cygwin* | mingw*) | |
15047 | ac_cv_func_malloc_0_nonnull="guessing yes" ;; | |
15048 | # If we don't know, obey --enable-cross-guesses. | |
15049 | *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; | |
15050 | esac | |
6ec2e0f5 SDJ |
15051 | |
15052 | else | |
15053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15054 | /* end confdefs.h. */ | |
9c9d63b1 | 15055 | #include <stdlib.h> |
6ec2e0f5 SDJ |
15056 | |
15057 | int | |
15058 | main () | |
15059 | { | |
c0c3707f CB |
15060 | char *p = malloc (0); |
15061 | int result = !p; | |
15062 | free (p); | |
15063 | return result; | |
6ec2e0f5 SDJ |
15064 | ; |
15065 | return 0; | |
698be2d8 CB |
15066 | } |
15067 | ||
15068 | _ACEOF | |
15069 | if ac_fn_c_try_run "$LINENO"; then : | |
15070 | ac_cv_func_malloc_0_nonnull=yes | |
15071 | else | |
15072 | ac_cv_func_malloc_0_nonnull=no | |
15073 | fi | |
15074 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15075 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15076 | fi | |
15077 | ||
15078 | ||
15079 | fi | |
15080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 | |
15081 | $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } | |
15082 | case "$ac_cv_func_malloc_0_nonnull" in | |
15083 | *yes) | |
15084 | gl_cv_func_malloc_0_nonnull=1 | |
15085 | ;; | |
15086 | *) | |
15087 | gl_cv_func_malloc_0_nonnull=0 | |
15088 | ;; | |
15089 | esac | |
15090 | ||
15091 | ||
15092 | cat >>confdefs.h <<_ACEOF | |
15093 | #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull | |
15094 | _ACEOF | |
15095 | ||
15096 | ||
15097 | ||
c0c3707f CB |
15098 | |
15099 | ||
6ec2e0f5 SDJ |
15100 | |
15101 | ||
15102 | ||
15103 | ||
15104 | ||
15105 | ||
c0c3707f CB |
15106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 |
15107 | $as_echo_n "checking for a traditional japanese locale... " >&6; } | |
15108 | if ${gt_cv_locale_ja+:} false; then : | |
15109 | $as_echo_n "(cached) " >&6 | |
15110 | else | |
15111 | ||
15112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15113 | /* end confdefs.h. */ | |
6ec2e0f5 | 15114 | |
c0c3707f CB |
15115 | #include <locale.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 () | |
15125 | { | |
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 MB_CUR_MAX is > 1. This excludes the dysfunctional locales | |
15167 | on Cygwin 1.5.x. */ | |
15168 | if (MB_CUR_MAX == 1) | |
15169 | return 1; | |
15170 | /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. | |
15171 | This excludes the UTF-8 encoding (except on MirBSD). */ | |
15172 | { | |
15173 | const char *p; | |
15174 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
15175 | if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; | |
15176 | for (p = buf; *p != '\0'; p++) | |
15177 | if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) | |
15178 | return 1; | |
15179 | } | |
15180 | return 0; | |
15181 | #endif | |
15182 | } | |
6ec2e0f5 | 15183 | |
c0c3707f CB |
15184 | _ACEOF |
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 | # Note that on native Windows, the Japanese locale is | |
15199 | # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we | |
15200 | # cannot use it here. | |
15201 | gt_cv_locale_ja=none | |
15202 | ;; | |
15203 | *) | |
15204 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
15205 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
15206 | # configure script would override the LC_ALL setting. Likewise for | |
15207 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
15208 | # Test for the AIX locale name. | |
15209 | if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15210 | gt_cv_locale_ja=ja_JP | |
15211 | else | |
15212 | # Test for the locale name with explicit encoding suffix. | |
15213 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15214 | gt_cv_locale_ja=ja_JP.EUC-JP | |
15215 | else | |
15216 | # Test for the HP-UX, OSF/1, NetBSD locale name. | |
15217 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15218 | gt_cv_locale_ja=ja_JP.eucJP | |
15219 | else | |
15220 | # Test for the IRIX, FreeBSD locale name. | |
15221 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15222 | gt_cv_locale_ja=ja_JP.EUC | |
15223 | else | |
15224 | # Test for the Solaris 7 locale name. | |
15225 | if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15226 | gt_cv_locale_ja=ja | |
15227 | else | |
15228 | # Special test for NetBSD 1.6. | |
15229 | if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then | |
15230 | gt_cv_locale_ja=ja_JP.eucJP | |
15231 | else | |
15232 | # None found. | |
15233 | gt_cv_locale_ja=none | |
15234 | fi | |
15235 | fi | |
15236 | fi | |
15237 | fi | |
15238 | fi | |
15239 | fi | |
15240 | ;; | |
15241 | esac | |
15242 | fi | |
15243 | rm -fr conftest* | |
5abebf3c CB |
15244 | |
15245 | fi | |
c0c3707f CB |
15246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 |
15247 | $as_echo "$gt_cv_locale_ja" >&6; } | |
15248 | LOCALE_JA=$gt_cv_locale_ja | |
5abebf3c | 15249 | |
5abebf3c | 15250 | |
5abebf3c | 15251 | |
5abebf3c | 15252 | |
c0c3707f CB |
15253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 |
15254 | $as_echo_n "checking for a french Unicode locale... " >&6; } | |
15255 | if ${gt_cv_locale_fr_utf8+:} false; then : | |
5abebf3c CB |
15256 | $as_echo_n "(cached) " >&6 |
15257 | else | |
5abebf3c | 15258 | |
c0c3707f | 15259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 15260 | /* end confdefs.h. */ |
5abebf3c | 15261 | |
c0c3707f CB |
15262 | #include <locale.h> |
15263 | #include <time.h> | |
15264 | #if HAVE_LANGINFO_CODESET | |
15265 | # include <langinfo.h> | |
15266 | #endif | |
15267 | #include <stdlib.h> | |
15268 | #include <string.h> | |
15269 | struct tm t; | |
15270 | char buf[16]; | |
15271 | int main () { | |
15272 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl | |
15273 | imitates locale dependent behaviour by looking at the environment | |
15274 | variables, and all locales use the UTF-8 encoding. */ | |
15275 | #if !(defined __BEOS__ || defined __HAIKU__) | |
15276 | /* Check whether the given locale name is recognized by the system. */ | |
15277 | # if defined _WIN32 && !defined __CYGWIN__ | |
15278 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
15279 | not at the environment variables. Also, when an encoding suffix such | |
15280 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
15281 | category of the locale to "C". */ | |
15282 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
15283 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
15284 | return 1; | |
15285 | # else | |
15286 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
15287 | # endif | |
15288 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
15289 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
15290 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
15291 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
15292 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
15293 | some unit tests fail. */ | |
15294 | # if HAVE_LANGINFO_CODESET | |
15295 | { | |
15296 | const char *cs = nl_langinfo (CODESET); | |
15297 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) | |
15298 | return 1; | |
15299 | } | |
15300 | # endif | |
15301 | # ifdef __CYGWIN__ | |
15302 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
15303 | locale_charset() function relies on the encoding suffix. Note that | |
15304 | LC_ALL is set on the command line. */ | |
15305 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
15306 | # endif | |
15307 | /* Check whether in the abbreviation of the second month, the second | |
15308 | character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is | |
15309 | two bytes long, with UTF-8 encoding. */ | |
15310 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
15311 | if (strftime (buf, sizeof (buf), "%b", &t) < 4 | |
15312 | || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') | |
15313 | return 1; | |
15314 | #endif | |
15315 | #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ | |
15316 | /* Check whether the decimal separator is a comma. | |
15317 | On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point | |
15318 | are nl_langinfo(RADIXCHAR) are both ".". */ | |
15319 | if (localeconv () ->decimal_point[0] != ',') return 1; | |
15320 | #endif | |
5abebf3c CB |
15321 | return 0; |
15322 | } | |
5abebf3c | 15323 | |
c0c3707f CB |
15324 | _ACEOF |
15325 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | |
15326 | (eval $ac_link) 2>&5 | |
15327 | ac_status=$? | |
15328 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
15329 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
15330 | case "$host_os" in | |
15331 | # Handle native Windows specially, because there setlocale() interprets | |
15332 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
15333 | # "fr" or "fra" as "French" or "French_France.1252", | |
15334 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
15335 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
15336 | # and similar. | |
15337 | mingw*) | |
15338 | # Test for the hypothetical native Windows locale name. | |
15339 | if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15340 | gt_cv_locale_fr_utf8=French_France.65001 | |
15341 | else | |
15342 | # None found. | |
15343 | gt_cv_locale_fr_utf8=none | |
15344 | fi | |
15345 | ;; | |
15346 | *) | |
15347 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
15348 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
15349 | # configure script would override the LC_ALL setting. Likewise for | |
15350 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
15351 | # Test for the usual locale name. | |
15352 | if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15353 | gt_cv_locale_fr_utf8=fr_FR | |
15354 | else | |
15355 | # Test for the locale name with explicit encoding suffix. | |
15356 | if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15357 | gt_cv_locale_fr_utf8=fr_FR.UTF-8 | |
15358 | else | |
15359 | # Test for the Solaris 7 locale name. | |
15360 | if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15361 | gt_cv_locale_fr_utf8=fr.UTF-8 | |
15362 | else | |
15363 | # None found. | |
15364 | gt_cv_locale_fr_utf8=none | |
15365 | fi | |
15366 | fi | |
15367 | fi | |
15368 | ;; | |
15369 | esac | |
15370 | fi | |
15371 | rm -fr conftest* | |
5abebf3c CB |
15372 | |
15373 | fi | |
c0c3707f CB |
15374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 |
15375 | $as_echo "$gt_cv_locale_fr_utf8" >&6; } | |
15376 | LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 | |
5abebf3c CB |
15377 | |
15378 | ||
15379 | ||
15380 | ||
15381 | ||
c0c3707f CB |
15382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 |
15383 | $as_echo_n "checking for a transitional chinese locale... " >&6; } | |
15384 | if ${gt_cv_locale_zh_CN+:} false; then : | |
5abebf3c CB |
15385 | $as_echo_n "(cached) " >&6 |
15386 | else | |
5abebf3c | 15387 | |
c0c3707f | 15388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5abebf3c | 15389 | /* end confdefs.h. */ |
5abebf3c | 15390 | |
c0c3707f CB |
15391 | #include <locale.h> |
15392 | #include <stdlib.h> | |
15393 | #include <time.h> | |
15394 | #if HAVE_LANGINFO_CODESET | |
15395 | # include <langinfo.h> | |
15396 | #endif | |
15397 | #include <stdlib.h> | |
15398 | #include <string.h> | |
15399 | struct tm t; | |
15400 | char buf[16]; | |
15401 | int main () | |
5abebf3c | 15402 | { |
c0c3707f CB |
15403 | /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl |
15404 | imitates locale dependent behaviour by looking at the environment | |
15405 | variables, and all locales use the UTF-8 encoding. */ | |
15406 | #if defined __BEOS__ || defined __HAIKU__ | |
15407 | return 1; | |
15408 | #else | |
15409 | /* Check whether the given locale name is recognized by the system. */ | |
15410 | # if defined _WIN32 && !defined __CYGWIN__ | |
15411 | /* On native Windows, setlocale(category, "") looks at the system settings, | |
15412 | not at the environment variables. Also, when an encoding suffix such | |
15413 | as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE | |
15414 | category of the locale to "C". */ | |
15415 | if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL | |
15416 | || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) | |
15417 | return 1; | |
15418 | # else | |
15419 | if (setlocale (LC_ALL, "") == NULL) return 1; | |
15420 | # endif | |
15421 | /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". | |
15422 | On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) | |
15423 | is empty, and the behaviour of Tcl 8.4 in this locale is not useful. | |
15424 | On OpenBSD 4.0, when an unsupported locale is specified, setlocale() | |
15425 | succeeds but then nl_langinfo(CODESET) is "646". In this situation, | |
15426 | some unit tests fail. | |
15427 | On MirBSD 10, when an unsupported locale is specified, setlocale() | |
15428 | succeeds but then nl_langinfo(CODESET) is "UTF-8". */ | |
15429 | # if HAVE_LANGINFO_CODESET | |
15430 | { | |
15431 | const char *cs = nl_langinfo (CODESET); | |
15432 | if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 | |
15433 | || strcmp (cs, "UTF-8") == 0) | |
15434 | return 1; | |
15435 | } | |
15436 | # endif | |
15437 | # ifdef __CYGWIN__ | |
15438 | /* On Cygwin, avoid locale names without encoding suffix, because the | |
15439 | locale_charset() function relies on the encoding suffix. Note that | |
15440 | LC_ALL is set on the command line. */ | |
15441 | if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; | |
15442 | # endif | |
15443 | /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. | |
15444 | This excludes the UTF-8 encoding (except on MirBSD). */ | |
15445 | { | |
15446 | const char *p; | |
15447 | t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; | |
15448 | if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; | |
15449 | for (p = buf; *p != '\0'; p++) | |
15450 | if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) | |
15451 | return 1; | |
15452 | } | |
15453 | /* Check whether a typical GB18030 multibyte sequence is recognized as a | |
15454 | single wide character. This excludes the GB2312 and GBK encodings. */ | |
15455 | if (mblen ("\203\062\332\066", 5) != 4) | |
15456 | return 1; | |
5abebf3c | 15457 | return 0; |
c0c3707f | 15458 | #endif |
5abebf3c | 15459 | } |
c0c3707f | 15460 | |
5abebf3c | 15461 | _ACEOF |
c0c3707f CB |
15462 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
15463 | (eval $ac_link) 2>&5 | |
15464 | ac_status=$? | |
15465 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
15466 | test $ac_status = 0; } && test -s conftest$ac_exeext; then | |
15467 | case "$host_os" in | |
15468 | # Handle native Windows specially, because there setlocale() interprets | |
15469 | # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", | |
15470 | # "fr" or "fra" as "French" or "French_France.1252", | |
15471 | # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", | |
15472 | # "ja" as "Japanese" or "Japanese_Japan.932", | |
15473 | # and similar. | |
15474 | mingw*) | |
15475 | # Test for the hypothetical native Windows locale name. | |
15476 | if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15477 | gt_cv_locale_zh_CN=Chinese_China.54936 | |
15478 | else | |
15479 | # None found. | |
15480 | gt_cv_locale_zh_CN=none | |
15481 | fi | |
15482 | ;; | |
15483 | solaris2.8) | |
15484 | # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are | |
15485 | # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. | |
15486 | # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. | |
15487 | gt_cv_locale_zh_CN=none | |
15488 | ;; | |
15489 | *) | |
15490 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | |
15491 | # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the | |
15492 | # configure script would override the LC_ALL setting. Likewise for | |
15493 | # LC_CTYPE, which is also set at the beginning of the configure script. | |
15494 | # Test for the locale name without encoding suffix. | |
15495 | if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15496 | gt_cv_locale_zh_CN=zh_CN | |
15497 | else | |
15498 | # Test for the locale name with explicit encoding suffix. | |
15499 | if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | |
15500 | gt_cv_locale_zh_CN=zh_CN.GB18030 | |
15501 | else | |
15502 | # None found. | |
15503 | gt_cv_locale_zh_CN=none | |
15504 | fi | |
15505 | fi | |
15506 | ;; | |
15507 | esac | |
15508 | else | |
15509 | # If there was a link error, due to mblen(), the system is so old that | |
15510 | # it certainly doesn't have a chinese locale. | |
15511 | gt_cv_locale_zh_CN=none | |
15512 | fi | |
15513 | rm -fr conftest* | |
15514 | ||
5abebf3c | 15515 | fi |
c0c3707f CB |
15516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 |
15517 | $as_echo "$gt_cv_locale_zh_CN" >&6; } | |
15518 | LOCALE_ZH_CN=$gt_cv_locale_zh_CN | |
15519 | ||
15520 | ||
15521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
15522 | $as_echo_n "checking for inline... " >&6; } | |
15523 | if ${ac_cv_c_inline+:} false; then : | |
15524 | $as_echo_n "(cached) " >&6 | |
15525 | else | |
15526 | ac_cv_c_inline=no | |
15527 | for ac_kw in inline __inline__ __inline; do | |
15528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15529 | /* end confdefs.h. */ | |
15530 | #ifndef __cplusplus | |
15531 | typedef int foo_t; | |
15532 | static $ac_kw foo_t static_foo () {return 0; } | |
15533 | $ac_kw foo_t foo () {return 0; } | |
15534 | #endif | |
5abebf3c | 15535 | |
c0c3707f CB |
15536 | _ACEOF |
15537 | if ac_fn_c_try_compile "$LINENO"; then : | |
15538 | ac_cv_c_inline=$ac_kw | |
15539 | fi | |
15540 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15541 | test "$ac_cv_c_inline" != no && break | |
15542 | done | |
5abebf3c CB |
15543 | |
15544 | fi | |
c0c3707f CB |
15545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
15546 | $as_echo "$ac_cv_c_inline" >&6; } | |
5abebf3c | 15547 | |
c0c3707f CB |
15548 | case $ac_cv_c_inline in |
15549 | inline | yes) ;; | |
15550 | *) | |
15551 | case $ac_cv_c_inline in | |
15552 | no) ac_val=;; | |
15553 | *) ac_val=$ac_cv_c_inline;; | |
15554 | esac | |
15555 | cat >>confdefs.h <<_ACEOF | |
15556 | #ifndef __cplusplus | |
15557 | #define inline $ac_val | |
15558 | #endif | |
15559 | _ACEOF | |
15560 | ;; | |
15561 | esac | |
5abebf3c CB |
15562 | |
15563 | ||
15564 | ||
15565 | ||
5abebf3c CB |
15566 | |
15567 | ||
c0c3707f CB |
15568 | GNULIB_EXPLICIT_BZERO=0; |
15569 | GNULIB_FFSL=0; | |
15570 | GNULIB_FFSLL=0; | |
15571 | GNULIB_MEMCHR=0; | |
15572 | GNULIB_MEMMEM=0; | |
15573 | GNULIB_MEMPCPY=0; | |
15574 | GNULIB_MEMRCHR=0; | |
15575 | GNULIB_RAWMEMCHR=0; | |
15576 | GNULIB_STPCPY=0; | |
15577 | GNULIB_STPNCPY=0; | |
15578 | GNULIB_STRCHRNUL=0; | |
15579 | GNULIB_STRDUP=0; | |
15580 | GNULIB_STRNCAT=0; | |
15581 | GNULIB_STRNDUP=0; | |
15582 | GNULIB_STRNLEN=0; | |
15583 | GNULIB_STRPBRK=0; | |
15584 | GNULIB_STRSEP=0; | |
15585 | GNULIB_STRSTR=0; | |
15586 | GNULIB_STRCASESTR=0; | |
15587 | GNULIB_STRTOK_R=0; | |
15588 | GNULIB_MBSLEN=0; | |
15589 | GNULIB_MBSNLEN=0; | |
15590 | GNULIB_MBSCHR=0; | |
15591 | GNULIB_MBSRCHR=0; | |
15592 | GNULIB_MBSSTR=0; | |
15593 | GNULIB_MBSCASECMP=0; | |
15594 | GNULIB_MBSNCASECMP=0; | |
15595 | GNULIB_MBSPCASECMP=0; | |
15596 | GNULIB_MBSCASESTR=0; | |
15597 | GNULIB_MBSCSPN=0; | |
15598 | GNULIB_MBSPBRK=0; | |
15599 | GNULIB_MBSSPN=0; | |
15600 | GNULIB_MBSSEP=0; | |
15601 | GNULIB_MBSTOK_R=0; | |
15602 | GNULIB_STRERROR=0; | |
15603 | GNULIB_STRERROR_R=0; | |
9c9d63b1 PM |
15604 | GNULIB_STRERRORNAME_NP=0; |
15605 | GNULIB_SIGABBREV_NP=0; | |
15606 | GNULIB_SIGDESCR_NP=0; | |
c0c3707f CB |
15607 | GNULIB_STRSIGNAL=0; |
15608 | GNULIB_STRVERSCMP=0; | |
15609 | HAVE_MBSLEN=0; | |
9c9d63b1 PM |
15610 | GNULIB_MDA_MEMCCPY=1; |
15611 | GNULIB_MDA_STRDUP=1; | |
c0c3707f CB |
15612 | HAVE_EXPLICIT_BZERO=1; |
15613 | HAVE_FFSL=1; | |
15614 | HAVE_FFSLL=1; | |
c0c3707f CB |
15615 | HAVE_DECL_MEMMEM=1; |
15616 | HAVE_MEMPCPY=1; | |
15617 | HAVE_DECL_MEMRCHR=1; | |
15618 | HAVE_RAWMEMCHR=1; | |
15619 | HAVE_STPCPY=1; | |
15620 | HAVE_STPNCPY=1; | |
15621 | HAVE_STRCHRNUL=1; | |
15622 | HAVE_DECL_STRDUP=1; | |
15623 | HAVE_DECL_STRNDUP=1; | |
15624 | HAVE_DECL_STRNLEN=1; | |
15625 | HAVE_STRPBRK=1; | |
15626 | HAVE_STRSEP=1; | |
15627 | HAVE_STRCASESTR=1; | |
15628 | HAVE_DECL_STRTOK_R=1; | |
15629 | HAVE_DECL_STRERROR_R=1; | |
9c9d63b1 PM |
15630 | HAVE_STRERRORNAME_NP=1; |
15631 | HAVE_SIGABBREV_NP=1; | |
15632 | HAVE_SIGDESCR_NP=1; | |
c0c3707f CB |
15633 | HAVE_DECL_STRSIGNAL=1; |
15634 | HAVE_STRVERSCMP=1; | |
9c9d63b1 | 15635 | REPLACE_FFSLL=0; |
c0c3707f CB |
15636 | REPLACE_MEMCHR=0; |
15637 | REPLACE_MEMMEM=0; | |
15638 | REPLACE_STPNCPY=0; | |
15639 | REPLACE_STRCHRNUL=0; | |
15640 | REPLACE_STRDUP=0; | |
15641 | REPLACE_STRNCAT=0; | |
15642 | REPLACE_STRNDUP=0; | |
15643 | REPLACE_STRNLEN=0; | |
15644 | REPLACE_STRSTR=0; | |
15645 | REPLACE_STRCASESTR=0; | |
15646 | REPLACE_STRTOK_R=0; | |
15647 | REPLACE_STRERROR=0; | |
15648 | REPLACE_STRERROR_R=0; | |
9c9d63b1 | 15649 | REPLACE_STRERRORNAME_NP=0; |
c0c3707f CB |
15650 | REPLACE_STRSIGNAL=0; |
15651 | UNDEFINE_STRTOK_R=0; | |
5abebf3c CB |
15652 | |
15653 | ||
15654 | ||
15655 | ||
6ec2e0f5 SDJ |
15656 | |
15657 | ||
c0c3707f CB |
15658 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it |
15659 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
15660 | # irrelevant for anonymous mappings. | |
15661 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
15662 | if test "x$ac_cv_func_mmap" = xyes; then : | |
15663 | gl_have_mmap=yes | |
6ec2e0f5 | 15664 | else |
c0c3707f CB |
15665 | gl_have_mmap=no |
15666 | fi | |
6ec2e0f5 SDJ |
15667 | |
15668 | ||
c0c3707f CB |
15669 | # Try to allow MAP_ANONYMOUS. |
15670 | gl_have_mmap_anonymous=no | |
15671 | if test $gl_have_mmap = yes; then | |
15672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
15673 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
15674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 15675 | /* end confdefs.h. */ |
6ec2e0f5 | 15676 | |
c0c3707f CB |
15677 | #include <sys/mman.h> |
15678 | #ifdef MAP_ANONYMOUS | |
15679 | I cannot identify this map | |
15680 | #endif | |
6ec2e0f5 | 15681 | |
c0c3707f CB |
15682 | _ACEOF |
15683 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15684 | $EGREP "I cannot identify this map" >/dev/null 2>&1; then : | |
15685 | gl_have_mmap_anonymous=yes | |
6ec2e0f5 | 15686 | fi |
c0c3707f | 15687 | rm -f conftest* |
6ec2e0f5 | 15688 | |
c0c3707f CB |
15689 | if test $gl_have_mmap_anonymous != yes; then |
15690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15691 | /* end confdefs.h. */ | |
6ec2e0f5 | 15692 | |
c0c3707f CB |
15693 | #include <sys/mman.h> |
15694 | #ifdef MAP_ANON | |
15695 | I cannot identify this map | |
15696 | #endif | |
6ec2e0f5 | 15697 | |
c0c3707f CB |
15698 | _ACEOF |
15699 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15700 | $EGREP "I cannot identify this map" >/dev/null 2>&1; then : | |
6ec2e0f5 | 15701 | |
c0c3707f | 15702 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h |
5e8754f9 | 15703 | |
c0c3707f | 15704 | gl_have_mmap_anonymous=yes |
5e8754f9 | 15705 | fi |
c0c3707f CB |
15706 | rm -f conftest* |
15707 | ||
15708 | fi | |
15709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
15710 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
15711 | if test $gl_have_mmap_anonymous = yes; then | |
6ec2e0f5 | 15712 | |
c0c3707f | 15713 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h |
6ec2e0f5 | 15714 | |
c0c3707f CB |
15715 | fi |
15716 | fi | |
6ec2e0f5 SDJ |
15717 | |
15718 | ||
15719 | ||
15720 | ||
6ec2e0f5 | 15721 | |
9c9d63b1 PM |
15722 | # Detect platform-specific bugs in some versions of glibc: |
15723 | # memchr should not dereference anything with length 0 | |
15724 | # https://bugzilla.redhat.com/show_bug.cgi?id=499689 | |
15725 | # memchr should not dereference overestimated length after a match | |
15726 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
15727 | # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
15728 | # memchr should cast the second argument to 'unsigned char'. | |
15729 | # This bug exists in Android 4.3. | |
15730 | # Assume that memchr works on platforms that lack mprotect. | |
15731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
c0c3707f CB |
15732 | $as_echo_n "checking whether memchr works... " >&6; } |
15733 | if ${gl_cv_func_memchr_works+:} false; then : | |
15734 | $as_echo_n "(cached) " >&6 | |
6ec2e0f5 | 15735 | else |
c0c3707f CB |
15736 | if test "$cross_compiling" = yes; then : |
15737 | case "$host_os" in | |
9c9d63b1 PM |
15738 | # Guess no on Android. |
15739 | linux*-android*) gl_cv_func_memchr_works="guessing no" ;; | |
15740 | # Guess yes on native Windows. | |
15741 | mingw*) gl_cv_func_memchr_works="guessing yes" ;; | |
15742 | # If we don't know, obey --enable-cross-guesses. | |
15743 | *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;; | |
15744 | esac | |
6ec2e0f5 SDJ |
15745 | |
15746 | else | |
15747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15748 | /* end confdefs.h. */ | |
15749 | ||
c0c3707f CB |
15750 | #include <string.h> |
15751 | #if HAVE_SYS_MMAN_H | |
15752 | # include <fcntl.h> | |
15753 | # include <unistd.h> | |
15754 | # include <sys/types.h> | |
15755 | # include <sys/mman.h> | |
15756 | # ifndef MAP_FILE | |
15757 | # define MAP_FILE 0 | |
15758 | # endif | |
15759 | #endif | |
6ec2e0f5 SDJ |
15760 | |
15761 | int | |
15762 | main () | |
15763 | { | |
c0c3707f CB |
15764 | |
15765 | int result = 0; | |
15766 | char *fence = NULL; | |
15767 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
15768 | # if HAVE_MAP_ANONYMOUS | |
15769 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
15770 | const int fd = -1; | |
15771 | # else /* !HAVE_MAP_ANONYMOUS */ | |
15772 | const int flags = MAP_FILE | MAP_PRIVATE; | |
15773 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
15774 | if (fd >= 0) | |
15775 | # endif | |
15776 | { | |
15777 | int pagesize = getpagesize (); | |
15778 | char *two_pages = | |
15779 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
15780 | flags, fd, 0); | |
15781 | if (two_pages != (char *)(-1) | |
15782 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
15783 | fence = two_pages + pagesize; | |
15784 | } | |
15785 | #endif | |
15786 | if (fence) | |
15787 | { | |
9c9d63b1 | 15788 | /* Test against bugs on glibc systems. */ |
c0c3707f CB |
15789 | if (memchr (fence, 0, 0)) |
15790 | result |= 1; | |
15791 | strcpy (fence - 9, "12345678"); | |
15792 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
15793 | result |= 2; | |
15794 | if (memchr (fence - 1, 0, 3) != fence - 1) | |
15795 | result |= 4; | |
9c9d63b1 PM |
15796 | /* Test against bug on AIX 7.2. */ |
15797 | if (memchr (fence - 4, '6', 16) != fence - 4) | |
15798 | result |= 8; | |
c0c3707f CB |
15799 | } |
15800 | /* Test against bug on Android 4.3. */ | |
15801 | { | |
15802 | char input[3]; | |
15803 | input[0] = 'a'; | |
15804 | input[1] = 'b'; | |
15805 | input[2] = 'c'; | |
15806 | if (memchr (input, 0x789abc00 | 'b', 3) != input + 1) | |
9c9d63b1 | 15807 | result |= 16; |
c0c3707f CB |
15808 | } |
15809 | return result; | |
6ec2e0f5 SDJ |
15810 | |
15811 | ; | |
15812 | return 0; | |
15813 | } | |
15814 | _ACEOF | |
15815 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 15816 | gl_cv_func_memchr_works=yes |
6ec2e0f5 | 15817 | else |
c0c3707f | 15818 | gl_cv_func_memchr_works=no |
6ec2e0f5 SDJ |
15819 | fi |
15820 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15821 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15822 | fi | |
15823 | ||
15824 | ||
15825 | fi | |
c0c3707f CB |
15826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 |
15827 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
9c9d63b1 PM |
15828 | case "$gl_cv_func_memchr_works" in |
15829 | *yes) ;; | |
15830 | *) REPLACE_MEMCHR=1 ;; | |
15831 | esac | |
6ec2e0f5 | 15832 | |
c0c3707f CB |
15833 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
15834 | if test "x$ac_cv_have_decl_memmem" = xyes; then : | |
6ec2e0f5 SDJ |
15835 | ac_have_decl=1 |
15836 | else | |
15837 | ac_have_decl=0 | |
15838 | fi | |
15839 | ||
15840 | cat >>confdefs.h <<_ACEOF | |
c0c3707f | 15841 | #define HAVE_DECL_MEMMEM $ac_have_decl |
6ec2e0f5 SDJ |
15842 | _ACEOF |
15843 | ||
472fa5ee | 15844 | |
6ec2e0f5 SDJ |
15845 | |
15846 | ||
15847 | ||
c0c3707f CB |
15848 | for ac_func in memmem |
15849 | do : | |
15850 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
15851 | if test "x$ac_cv_func_memmem" = xyes; then : | |
15852 | cat >>confdefs.h <<_ACEOF | |
15853 | #define HAVE_MEMMEM 1 | |
15854 | _ACEOF | |
6ec2e0f5 | 15855 | |
c0c3707f CB |
15856 | fi |
15857 | done | |
6ec2e0f5 | 15858 | |
c0c3707f CB |
15859 | if test $ac_cv_func_memmem = yes; then |
15860 | HAVE_MEMMEM=1 | |
15861 | else | |
15862 | HAVE_MEMMEM=0 | |
15863 | fi | |
6ec2e0f5 | 15864 | |
c0c3707f CB |
15865 | if test $ac_cv_have_decl_memmem = no; then |
15866 | HAVE_DECL_MEMMEM=0 | |
15867 | else | |
15868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 | |
15869 | $as_echo_n "checking whether memmem works... " >&6; } | |
15870 | if ${gl_cv_func_memmem_works_always+:} false; then : | |
6ec2e0f5 SDJ |
15871 | $as_echo_n "(cached) " >&6 |
15872 | else | |
c0c3707f CB |
15873 | if test "$cross_compiling" = yes; then : |
15874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 | 15875 | /* end confdefs.h. */ |
472fa5ee | 15876 | |
c0c3707f CB |
15877 | #ifdef __GNU_LIBRARY__ |
15878 | #include <features.h> | |
15879 | #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ | |
15880 | || __GLIBC_MINOR__ > 12)) \ | |
15881 | || (__GLIBC__ > 2)) \ | |
15882 | || defined __UCLIBC__ | |
15883 | Lucky user | |
15884 | #endif | |
15885 | #elif defined __CYGWIN__ | |
15886 | #include <cygwin/version.h> | |
15887 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
15888 | Lucky user | |
15889 | #endif | |
15890 | #else | |
15891 | Lucky user | |
15892 | #endif | |
472fa5ee | 15893 | |
c0c3707f CB |
15894 | _ACEOF |
15895 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
15896 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
15897 | gl_cv_func_memmem_works_always="guessing yes" | |
15898 | else | |
15899 | gl_cv_func_memmem_works_always="$gl_cross_guess_normal" | |
15900 | fi | |
15901 | rm -f conftest* | |
472fa5ee SM |
15902 | |
15903 | ||
6ec2e0f5 SDJ |
15904 | else |
15905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15906 | /* end confdefs.h. */ | |
c0c3707f CB |
15907 | |
15908 | #include <string.h> /* for memmem */ | |
15909 | #define P "_EF_BF_BD" | |
15910 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
15911 | #define NEEDLE P P P P P | |
6ec2e0f5 SDJ |
15912 | |
15913 | int | |
15914 | main () | |
15915 | { | |
c0c3707f | 15916 | |
698be2d8 CB |
15917 | int result = 0; |
15918 | if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) | |
15919 | result |= 1; | |
15920 | /* Check for empty needle behavior. */ | |
15921 | { | |
15922 | const char *haystack = "AAA"; | |
15923 | if (memmem (haystack, 3, (const char *) 1, 0) != haystack) | |
15924 | result |= 2; | |
15925 | } | |
15926 | return result; | |
15927 | ||
15928 | ; | |
15929 | return 0; | |
15930 | } | |
15931 | _ACEOF | |
15932 | if ac_fn_c_try_run "$LINENO"; then : | |
15933 | gl_cv_func_memmem_works_always=yes | |
15934 | else | |
15935 | gl_cv_func_memmem_works_always=no | |
15936 | fi | |
15937 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15938 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15939 | fi | |
15940 | ||
15941 | ||
15942 | fi | |
15943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 | |
15944 | $as_echo "$gl_cv_func_memmem_works_always" >&6; } | |
15945 | case "$gl_cv_func_memmem_works_always" in | |
15946 | *yes) ;; | |
15947 | *) | |
15948 | REPLACE_MEMMEM=1 | |
15949 | ;; | |
15950 | esac | |
15951 | fi | |
15952 | : | |
15953 | ||
15954 | ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" | |
15955 | if test "x$ac_cv_have_decl_memrchr" = xyes; then : | |
15956 | ac_have_decl=1 | |
15957 | else | |
15958 | ac_have_decl=0 | |
15959 | fi | |
15960 | ||
15961 | cat >>confdefs.h <<_ACEOF | |
15962 | #define HAVE_DECL_MEMRCHR $ac_have_decl | |
15963 | _ACEOF | |
15964 | ||
15965 | ||
15966 | ||
15967 | ||
15968 | ||
15969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5 | |
15970 | $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; } | |
15971 | if ${gl_cv_minmax_in_limits_h+:} false; then : | |
15972 | $as_echo_n "(cached) " >&6 | |
15973 | else | |
15974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15975 | /* end confdefs.h. */ | |
15976 | #include <limits.h> | |
15977 | int x = MIN (42, 17); | |
15978 | int | |
15979 | main () | |
15980 | { | |
15981 | ||
15982 | ; | |
15983 | return 0; | |
15984 | } | |
15985 | _ACEOF | |
15986 | if ac_fn_c_try_compile "$LINENO"; then : | |
15987 | gl_cv_minmax_in_limits_h=yes | |
15988 | else | |
15989 | gl_cv_minmax_in_limits_h=no | |
15990 | fi | |
15991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15992 | fi | |
15993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 | |
15994 | $as_echo "$gl_cv_minmax_in_limits_h" >&6; } | |
15995 | if test $gl_cv_minmax_in_limits_h = yes; then | |
15996 | ||
15997 | $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h | |
15998 | ||
15999 | fi | |
16000 | ||
16001 | ||
16002 | ||
16003 | ||
16004 | ||
16005 | ||
16006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5 | |
16007 | $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; } | |
16008 | if ${gl_cv_minmax_in_sys_param_h+:} false; then : | |
16009 | $as_echo_n "(cached) " >&6 | |
16010 | else | |
16011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16012 | /* end confdefs.h. */ | |
16013 | #include <sys/param.h> | |
16014 | int x = MIN (42, 17); | |
16015 | int | |
16016 | main () | |
16017 | { | |
16018 | ||
6ec2e0f5 SDJ |
16019 | ; |
16020 | return 0; | |
16021 | } | |
16022 | _ACEOF | |
698be2d8 CB |
16023 | if ac_fn_c_try_compile "$LINENO"; then : |
16024 | gl_cv_minmax_in_sys_param_h=yes | |
6ec2e0f5 | 16025 | else |
698be2d8 | 16026 | gl_cv_minmax_in_sys_param_h=no |
6ec2e0f5 | 16027 | fi |
698be2d8 | 16028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6ec2e0f5 | 16029 | fi |
698be2d8 CB |
16030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 |
16031 | $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; } | |
16032 | if test $gl_cv_minmax_in_sys_param_h = yes; then | |
6ec2e0f5 | 16033 | |
698be2d8 | 16034 | $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h |
c0c3707f | 16035 | |
c0c3707f | 16036 | fi |
c0c3707f | 16037 | |
c0c3707f | 16038 | |
698be2d8 | 16039 | |
c0c3707f CB |
16040 | |
16041 | ||
16042 | ||
16043 | ||
16044 | ||
16045 | ||
16046 | ||
16047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 | |
16048 | $as_echo_n "checking for O_CLOEXEC... " >&6; } | |
16049 | if ${gl_cv_macro_O_CLOEXEC+:} false; then : | |
6ec2e0f5 SDJ |
16050 | $as_echo_n "(cached) " >&6 |
16051 | else | |
16052 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16053 | /* end confdefs.h. */ | |
c0c3707f CB |
16054 | #include <fcntl.h> |
16055 | #ifndef O_CLOEXEC | |
16056 | choke me; | |
16057 | #endif | |
6ec2e0f5 SDJ |
16058 | |
16059 | int | |
16060 | main () | |
16061 | { | |
c0c3707f | 16062 | return O_CLOEXEC; |
6ec2e0f5 SDJ |
16063 | ; |
16064 | return 0; | |
16065 | } | |
16066 | _ACEOF | |
16067 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 16068 | gl_cv_macro_O_CLOEXEC=yes |
6ec2e0f5 | 16069 | else |
c0c3707f | 16070 | gl_cv_macro_O_CLOEXEC=no |
6ec2e0f5 SDJ |
16071 | fi |
16072 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16073 | fi | |
c0c3707f CB |
16074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5 |
16075 | $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; } | |
16076 | ||
16077 | ||
16078 | ||
16079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 | |
16080 | $as_echo_n "checking for promoted mode_t type... " >&6; } | |
16081 | if ${gl_cv_promoted_mode_t+:} false; then : | |
6ec2e0f5 SDJ |
16082 | $as_echo_n "(cached) " >&6 |
16083 | else | |
6ec2e0f5 | 16084 | |
c0c3707f CB |
16085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16086 | /* end confdefs.h. */ | |
16087 | #include <sys/types.h> | |
6ec2e0f5 SDJ |
16088 | int |
16089 | main () | |
16090 | { | |
c0c3707f | 16091 | typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; |
6ec2e0f5 SDJ |
16092 | ; |
16093 | return 0; | |
16094 | } | |
16095 | _ACEOF | |
16096 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 16097 | gl_cv_promoted_mode_t='int' |
6ec2e0f5 | 16098 | else |
c0c3707f | 16099 | gl_cv_promoted_mode_t='mode_t' |
6ec2e0f5 SDJ |
16100 | fi |
16101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c0c3707f | 16102 | |
6ec2e0f5 | 16103 | fi |
c0c3707f CB |
16104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 |
16105 | $as_echo "$gl_cv_promoted_mode_t" >&6; } | |
6ec2e0f5 | 16106 | |
c0c3707f CB |
16107 | cat >>confdefs.h <<_ACEOF |
16108 | #define PROMOTED_MODE_T $gl_cv_promoted_mode_t | |
6ec2e0f5 | 16109 | _ACEOF |
c0c3707f CB |
16110 | |
16111 | ||
16112 | ||
16113 | ||
16114 | ||
9c9d63b1 PM |
16115 | |
16116 | ||
16117 | ||
16118 | ||
c0c3707f CB |
16119 | |
16120 | ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" | |
16121 | if test "x$ac_cv_have_decl_setenv" = xyes; then : | |
16122 | ac_have_decl=1 | |
6ec2e0f5 | 16123 | else |
c0c3707f | 16124 | ac_have_decl=0 |
6ec2e0f5 | 16125 | fi |
c0c3707f CB |
16126 | |
16127 | cat >>confdefs.h <<_ACEOF | |
16128 | #define HAVE_DECL_SETENV $ac_have_decl | |
16129 | _ACEOF | |
16130 | ||
16131 | ||
16132 | ||
16133 | ||
16134 | ||
16135 | ||
16136 | if test $ac_cv_have_decl_setenv = no; then | |
16137 | HAVE_DECL_SETENV=0 | |
6ec2e0f5 SDJ |
16138 | fi |
16139 | ||
16140 | ||
16141 | ||
16142 | ||
16143 | ||
c0c3707f CB |
16144 | for ac_header in search.h |
16145 | do : | |
16146 | ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" | |
16147 | if test "x$ac_cv_header_search_h" = xyes; then : | |
16148 | cat >>confdefs.h <<_ACEOF | |
16149 | #define HAVE_SEARCH_H 1 | |
16150 | _ACEOF | |
6ec2e0f5 | 16151 | |
c0c3707f | 16152 | fi |
6ec2e0f5 | 16153 | |
c0c3707f | 16154 | done |
6ec2e0f5 | 16155 | |
c0c3707f CB |
16156 | for ac_func in tsearch |
16157 | do : | |
16158 | ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" | |
16159 | if test "x$ac_cv_func_tsearch" = xyes; then : | |
16160 | cat >>confdefs.h <<_ACEOF | |
16161 | #define HAVE_TSEARCH 1 | |
16162 | _ACEOF | |
6ec2e0f5 | 16163 | |
c0c3707f CB |
16164 | fi |
16165 | done | |
6ec2e0f5 SDJ |
16166 | |
16167 | ||
16168 | ||
16169 | ||
c0c3707f CB |
16170 | GNULIB_PTHREAD_SIGMASK=0; |
16171 | GNULIB_RAISE=0; | |
16172 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
16173 | GNULIB_SIGPROCMASK=0; | |
16174 | GNULIB_SIGACTION=0; | |
16175 | HAVE_POSIX_SIGNALBLOCKING=1; | |
16176 | HAVE_PTHREAD_SIGMASK=1; | |
16177 | HAVE_RAISE=1; | |
16178 | HAVE_SIGSET_T=1; | |
16179 | HAVE_SIGINFO_T=1; | |
16180 | HAVE_SIGACTION=1; | |
16181 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
6ec2e0f5 | 16182 | |
c0c3707f | 16183 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; |
6ec2e0f5 | 16184 | |
c0c3707f CB |
16185 | HAVE_SIGHANDLER_T=1; |
16186 | REPLACE_PTHREAD_SIGMASK=0; | |
16187 | REPLACE_RAISE=0; | |
6ec2e0f5 | 16188 | |
6ec2e0f5 | 16189 | |
c0c3707f CB |
16190 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
16191 | #include <signal.h> | |
16192 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
16193 | #include <sys/types.h> | |
16194 | ||
16195 | " | |
16196 | if test "x$ac_cv_type_sigset_t" = xyes; then : | |
16197 | ||
16198 | cat >>confdefs.h <<_ACEOF | |
16199 | #define HAVE_SIGSET_T 1 | |
16200 | _ACEOF | |
16201 | ||
16202 | gl_cv_type_sigset_t=yes | |
16203 | else | |
16204 | gl_cv_type_sigset_t=no | |
16205 | fi | |
6ec2e0f5 | 16206 | |
c0c3707f CB |
16207 | if test $gl_cv_type_sigset_t != yes; then |
16208 | HAVE_SIGSET_T=0 | |
16209 | fi | |
6ec2e0f5 | 16210 | |
c0c3707f CB |
16211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 |
16212 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } | |
16213 | if ${ac_cv_type_uid_t+:} false; then : | |
16214 | $as_echo_n "(cached) " >&6 | |
16215 | else | |
6ec2e0f5 SDJ |
16216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16217 | /* end confdefs.h. */ | |
c0c3707f CB |
16218 | #include <sys/types.h> |
16219 | ||
6ec2e0f5 | 16220 | _ACEOF |
c0c3707f CB |
16221 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
16222 | $EGREP "uid_t" >/dev/null 2>&1; then : | |
16223 | ac_cv_type_uid_t=yes | |
16224 | else | |
16225 | ac_cv_type_uid_t=no | |
16226 | fi | |
16227 | rm -f conftest* | |
6ec2e0f5 | 16228 | |
c0c3707f CB |
16229 | fi |
16230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 | |
16231 | $as_echo "$ac_cv_type_uid_t" >&6; } | |
16232 | if test $ac_cv_type_uid_t = no; then | |
6ec2e0f5 | 16233 | |
c0c3707f | 16234 | $as_echo "#define uid_t int" >>confdefs.h |
6ec2e0f5 | 16235 | |
6ec2e0f5 | 16236 | |
c0c3707f | 16237 | $as_echo "#define gid_t int" >>confdefs.h |
6ec2e0f5 SDJ |
16238 | |
16239 | fi | |
6ec2e0f5 | 16240 | |
c0c3707f CB |
16241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
16242 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
16243 | if ${ac_cv_header_stdbool_h+:} false; then : | |
16244 | $as_echo_n "(cached) " >&6 | |
16245 | else | |
16246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16247 | /* end confdefs.h. */ | |
16248 | ||
16249 | #include <stdbool.h> | |
16250 | ||
16251 | #ifdef __cplusplus | |
16252 | typedef bool Bool; | |
16253 | #else | |
16254 | typedef _Bool Bool; | |
16255 | #ifndef bool | |
16256 | "error: bool is not defined" | |
16257 | #endif | |
16258 | #ifndef false | |
16259 | "error: false is not defined" | |
16260 | #endif | |
16261 | #if false | |
16262 | "error: false is not 0" | |
16263 | #endif | |
16264 | #ifndef true | |
16265 | "error: true is not defined" | |
16266 | #endif | |
16267 | #if true != 1 | |
16268 | "error: true is not 1" | |
16269 | #endif | |
16270 | #endif | |
16271 | ||
16272 | #ifndef __bool_true_false_are_defined | |
16273 | "error: __bool_true_false_are_defined is not defined" | |
16274 | #endif | |
16275 | ||
16276 | struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; | |
16277 | ||
16278 | char a[true == 1 ? 1 : -1]; | |
16279 | char b[false == 0 ? 1 : -1]; | |
16280 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
16281 | char d[(bool) 0.5 == true ? 1 : -1]; | |
16282 | /* See body of main program for 'e'. */ | |
16283 | char f[(Bool) 0.0 == false ? 1 : -1]; | |
16284 | char g[true]; | |
16285 | char h[sizeof (Bool)]; | |
16286 | char i[sizeof s.t]; | |
16287 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
16288 | /* The following fails for | |
16289 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
16290 | Bool n[m]; | |
16291 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
16292 | char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
16293 | /* Catch a bug in an HP-UX C compiler. See | |
16294 | https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
16295 | https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html | |
16296 | */ | |
16297 | Bool q = true; | |
16298 | Bool *pq = &q; | |
16299 | bool *qq = &q; | |
6ec2e0f5 | 16300 | |
c0c3707f CB |
16301 | int |
16302 | main () | |
16303 | { | |
6ec2e0f5 | 16304 | |
c0c3707f CB |
16305 | bool e = &s; |
16306 | *pq |= q; *pq |= ! q; | |
16307 | *qq |= q; *qq |= ! q; | |
16308 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
16309 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
16310 | + !m + !n + !o + !p + !q + !pq + !qq); | |
6ec2e0f5 | 16311 | |
c0c3707f CB |
16312 | ; |
16313 | return 0; | |
16314 | } | |
16315 | _ACEOF | |
16316 | if ac_fn_c_try_compile "$LINENO"; then : | |
16317 | ac_cv_header_stdbool_h=yes | |
16318 | else | |
16319 | ac_cv_header_stdbool_h=no | |
16320 | fi | |
16321 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16322 | fi | |
16323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
16324 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
16325 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
16326 | if test "x$ac_cv_type__Bool" = xyes; then : | |
6ec2e0f5 | 16327 | |
c0c3707f CB |
16328 | cat >>confdefs.h <<_ACEOF |
16329 | #define HAVE__BOOL 1 | |
16330 | _ACEOF | |
6ec2e0f5 SDJ |
16331 | |
16332 | ||
c0c3707f | 16333 | fi |
6ec2e0f5 SDJ |
16334 | |
16335 | ||
9c9d63b1 PM |
16336 | ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" |
16337 | if test "x$ac_cv_have_decl_fcloseall" = xyes; then : | |
16338 | ac_have_decl=1 | |
16339 | else | |
16340 | ac_have_decl=0 | |
16341 | fi | |
16342 | ||
16343 | cat >>confdefs.h <<_ACEOF | |
16344 | #define HAVE_DECL_FCLOSEALL $ac_have_decl | |
16345 | _ACEOF | |
16346 | ||
16347 | ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" | |
16348 | if test "x$ac_cv_have_decl_ecvt" = xyes; then : | |
16349 | ac_have_decl=1 | |
16350 | else | |
16351 | ac_have_decl=0 | |
16352 | fi | |
16353 | ||
16354 | cat >>confdefs.h <<_ACEOF | |
16355 | #define HAVE_DECL_ECVT $ac_have_decl | |
16356 | _ACEOF | |
16357 | ||
16358 | ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" | |
16359 | if test "x$ac_cv_have_decl_fcvt" = xyes; then : | |
16360 | ac_have_decl=1 | |
16361 | else | |
16362 | ac_have_decl=0 | |
16363 | fi | |
16364 | ||
16365 | cat >>confdefs.h <<_ACEOF | |
16366 | #define HAVE_DECL_FCVT $ac_have_decl | |
16367 | _ACEOF | |
16368 | ||
16369 | ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" | |
16370 | if test "x$ac_cv_have_decl_gcvt" = xyes; then : | |
16371 | ac_have_decl=1 | |
16372 | else | |
16373 | ac_have_decl=0 | |
16374 | fi | |
472fa5ee | 16375 | |
9c9d63b1 PM |
16376 | cat >>confdefs.h <<_ACEOF |
16377 | #define HAVE_DECL_GCVT $ac_have_decl | |
16378 | _ACEOF | |
f8e27d88 | 16379 | |
c0c3707f CB |
16380 | ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" |
16381 | if test "x$ac_cv_have_decl_strdup" = xyes; then : | |
6ec2e0f5 SDJ |
16382 | ac_have_decl=1 |
16383 | else | |
16384 | ac_have_decl=0 | |
16385 | fi | |
16386 | ||
16387 | cat >>confdefs.h <<_ACEOF | |
c0c3707f | 16388 | #define HAVE_DECL_STRDUP $ac_have_decl |
6ec2e0f5 SDJ |
16389 | _ACEOF |
16390 | ||
16391 | ||
c0c3707f CB |
16392 | REPLACE_STRERROR_0=0 |
16393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 | |
16394 | $as_echo_n "checking whether strerror(0) succeeds... " >&6; } | |
16395 | if ${gl_cv_func_strerror_0_works+:} false; then : | |
6ec2e0f5 SDJ |
16396 | $as_echo_n "(cached) " >&6 |
16397 | else | |
c0c3707f CB |
16398 | if test "$cross_compiling" = yes; then : |
16399 | case "$host_os" in | |
16400 | # Guess yes on glibc systems. | |
16401 | *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16402 | # Guess yes on musl systems. | |
16403 | *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16404 | # Guess yes on native Windows. | |
16405 | mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; | |
16406 | # If we don't know, obey --enable-cross-guesses. | |
16407 | *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; | |
16408 | esac | |
6ec2e0f5 | 16409 | |
5e8754f9 SDJ |
16410 | else |
16411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16412 | /* end confdefs.h. */ | |
c0c3707f CB |
16413 | #include <string.h> |
16414 | #include <errno.h> | |
6ec2e0f5 | 16415 | |
5e8754f9 SDJ |
16416 | int |
16417 | main () | |
16418 | { | |
c0c3707f CB |
16419 | int result = 0; |
16420 | char *str; | |
16421 | errno = 0; | |
16422 | str = strerror (0); | |
16423 | if (!*str) result |= 1; | |
16424 | if (errno) result |= 2; | |
16425 | if (strstr (str, "nknown") || strstr (str, "ndefined")) | |
16426 | result |= 4; | |
16427 | return result; | |
5e8754f9 SDJ |
16428 | ; |
16429 | return 0; | |
16430 | } | |
16431 | _ACEOF | |
c0c3707f CB |
16432 | if ac_fn_c_try_run "$LINENO"; then : |
16433 | gl_cv_func_strerror_0_works=yes | |
5e8754f9 | 16434 | else |
c0c3707f | 16435 | gl_cv_func_strerror_0_works=no |
5e8754f9 | 16436 | fi |
c0c3707f CB |
16437 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16438 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e8754f9 | 16439 | fi |
6ec2e0f5 | 16440 | |
6ec2e0f5 | 16441 | |
c0c3707f CB |
16442 | fi |
16443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 | |
16444 | $as_echo "$gl_cv_func_strerror_0_works" >&6; } | |
16445 | case "$gl_cv_func_strerror_0_works" in | |
16446 | *yes) ;; | |
16447 | *) | |
16448 | REPLACE_STRERROR_0=1 | |
6ec2e0f5 | 16449 | |
c0c3707f | 16450 | $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h |
6ec2e0f5 | 16451 | |
c0c3707f CB |
16452 | ;; |
16453 | esac | |
6ec2e0f5 SDJ |
16454 | |
16455 | ||
16456 | ||
16457 | ||
472fa5ee SM |
16458 | |
16459 | ||
16460 | ||
725e2999 | 16461 | |
725e2999 JB |
16462 | |
16463 | ||
c0c3707f CB |
16464 | if test $ac_cv_func_strerror_r = yes; then |
16465 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then | |
16466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 | |
16467 | $as_echo_n "checking for strerror_r with POSIX signature... " >&6; } | |
16468 | if ${gl_cv_func_strerror_r_posix_signature+:} false; then : | |
16469 | $as_echo_n "(cached) " >&6 | |
16470 | else | |
16471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16472 | /* end confdefs.h. */ | |
16473 | #include <string.h> | |
16474 | int strerror_r (int, char *, size_t); | |
725e2999 | 16475 | |
c0c3707f CB |
16476 | int |
16477 | main () | |
16478 | { | |
725e2999 | 16479 | |
c0c3707f CB |
16480 | ; |
16481 | return 0; | |
16482 | } | |
16483 | _ACEOF | |
16484 | if ac_fn_c_try_compile "$LINENO"; then : | |
16485 | gl_cv_func_strerror_r_posix_signature=yes | |
16486 | else | |
16487 | gl_cv_func_strerror_r_posix_signature=no | |
16488 | fi | |
16489 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
725e2999 | 16490 | |
c0c3707f CB |
16491 | fi |
16492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 | |
16493 | $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } | |
16494 | if test $gl_cv_func_strerror_r_posix_signature = yes; then | |
16495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 | |
16496 | $as_echo_n "checking whether strerror_r works... " >&6; } | |
16497 | if ${gl_cv_func_strerror_r_works+:} false; then : | |
16498 | $as_echo_n "(cached) " >&6 | |
16499 | else | |
16500 | if test "$cross_compiling" = yes; then : | |
725e2999 | 16501 | |
c0c3707f CB |
16502 | case "$host_os" in |
16503 | # Guess no on AIX. | |
16504 | aix*) gl_cv_func_strerror_r_works="guessing no";; | |
16505 | # Guess no on HP-UX. | |
16506 | hpux*) gl_cv_func_strerror_r_works="guessing no";; | |
16507 | # Guess no on BSD variants. | |
16508 | *bsd*) gl_cv_func_strerror_r_works="guessing no";; | |
16509 | # Guess yes otherwise. | |
16510 | *) gl_cv_func_strerror_r_works="guessing yes";; | |
16511 | esac | |
725e2999 | 16512 | |
c0c3707f CB |
16513 | else |
16514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16515 | /* end confdefs.h. */ | |
16516 | #include <errno.h> | |
16517 | #include <string.h> | |
725e2999 | 16518 | |
c0c3707f CB |
16519 | int |
16520 | main () | |
16521 | { | |
16522 | int result = 0; | |
16523 | char buf[79]; | |
16524 | if (strerror_r (EACCES, buf, 0) < 0) | |
16525 | result |= 1; | |
16526 | errno = 0; | |
16527 | if (strerror_r (EACCES, buf, sizeof buf) != 0) | |
16528 | result |= 2; | |
16529 | strcpy (buf, "Unknown"); | |
16530 | if (strerror_r (0, buf, sizeof buf) != 0) | |
16531 | result |= 4; | |
16532 | if (errno) | |
16533 | result |= 8; | |
16534 | if (strstr (buf, "nknown") || strstr (buf, "ndefined")) | |
16535 | result |= 0x10; | |
16536 | errno = 0; | |
16537 | *buf = 0; | |
16538 | if (strerror_r (-3, buf, sizeof buf) < 0) | |
16539 | result |= 0x20; | |
16540 | if (errno) | |
16541 | result |= 0x40; | |
16542 | if (!*buf) | |
16543 | result |= 0x80; | |
16544 | return result; | |
725e2999 | 16545 | |
c0c3707f CB |
16546 | ; |
16547 | return 0; | |
16548 | } | |
16549 | _ACEOF | |
16550 | if ac_fn_c_try_run "$LINENO"; then : | |
16551 | gl_cv_func_strerror_r_works=yes | |
16552 | else | |
16553 | gl_cv_func_strerror_r_works=no | |
16554 | fi | |
16555 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16556 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16557 | fi | |
725e2999 JB |
16558 | |
16559 | ||
c0c3707f CB |
16560 | fi |
16561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 | |
16562 | $as_echo "$gl_cv_func_strerror_r_works" >&6; } | |
16563 | else | |
725e2999 | 16564 | |
c0c3707f CB |
16565 | if test $ac_cv_func___xpg_strerror_r = yes; then |
16566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 | |
16567 | $as_echo_n "checking whether __xpg_strerror_r works... " >&6; } | |
16568 | if ${gl_cv_func_strerror_r_works+:} false; then : | |
725e2999 JB |
16569 | $as_echo_n "(cached) " >&6 |
16570 | else | |
c0c3707f CB |
16571 | if test "$cross_compiling" = yes; then : |
16572 | gl_cv_func_strerror_r_works="$gl_cross_guess_normal" | |
725e2999 | 16573 | |
c0c3707f CB |
16574 | else |
16575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
725e2999 | 16576 | /* end confdefs.h. */ |
c0c3707f CB |
16577 | #include <errno.h> |
16578 | #include <string.h> | |
16579 | extern | |
16580 | #ifdef __cplusplus | |
16581 | "C" | |
16582 | #endif | |
16583 | int __xpg_strerror_r(int, char *, size_t); | |
725e2999 | 16584 | |
c0c3707f CB |
16585 | int |
16586 | main () | |
16587 | { | |
16588 | int result = 0; | |
16589 | char buf[256] = "^"; | |
16590 | char copy[256]; | |
16591 | char *str = strerror (-1); | |
16592 | strcpy (copy, str); | |
16593 | if (__xpg_strerror_r (-2, buf, 1) == 0) | |
16594 | result |= 1; | |
16595 | if (*buf) | |
16596 | result |= 2; | |
16597 | __xpg_strerror_r (-2, buf, 256); | |
16598 | if (strcmp (str, copy)) | |
16599 | result |= 4; | |
16600 | return result; | |
725e2999 | 16601 | |
c0c3707f CB |
16602 | ; |
16603 | return 0; | |
16604 | } | |
725e2999 | 16605 | _ACEOF |
c0c3707f CB |
16606 | if ac_fn_c_try_run "$LINENO"; then : |
16607 | gl_cv_func_strerror_r_works=yes | |
725e2999 | 16608 | else |
c0c3707f | 16609 | gl_cv_func_strerror_r_works=no |
725e2999 | 16610 | fi |
c0c3707f CB |
16611 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16612 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
725e2999 | 16613 | fi |
725e2999 | 16614 | |
725e2999 | 16615 | |
c0c3707f CB |
16616 | fi |
16617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 | |
16618 | $as_echo "$gl_cv_func_strerror_r_works" >&6; } | |
16619 | fi | |
16620 | fi | |
725e2999 | 16621 | fi |
725e2999 JB |
16622 | fi |
16623 | ||
c0c3707f CB |
16624 | ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" |
16625 | if test "x$ac_cv_have_decl_strerror_r" = xyes; then : | |
16626 | ac_have_decl=1 | |
725e2999 | 16627 | else |
c0c3707f | 16628 | ac_have_decl=0 |
725e2999 JB |
16629 | fi |
16630 | ||
c0c3707f CB |
16631 | cat >>confdefs.h <<_ACEOF |
16632 | #define HAVE_DECL_STRERROR_R $ac_have_decl | |
16633 | _ACEOF | |
725e2999 JB |
16634 | |
16635 | ||
16636 | ||
16637 | ||
16638 | ||
725e2999 JB |
16639 | |
16640 | ||
16641 | ||
725e2999 JB |
16642 | |
16643 | ||
16644 | ||
16645 | ||
16646 | ||
16647 | ||
16648 | ||
725e2999 | 16649 | if test $gl_cv_have_include_next = yes; then |
c0c3707f | 16650 | gl_cv_next_string_h='<'string.h'>' |
725e2999 | 16651 | else |
c0c3707f CB |
16652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 |
16653 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
16654 | if ${gl_cv_next_string_h+:} false; then : | |
725e2999 JB |
16655 | $as_echo_n "(cached) " >&6 |
16656 | else | |
16657 | ||
725e2999 JB |
16658 | |
16659 | ||
16660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16661 | /* end confdefs.h. */ | |
c0c3707f | 16662 | #include <string.h> |
725e2999 JB |
16663 | _ACEOF |
16664 | case "$host_os" in | |
16665 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16666 | *) gl_absname_cpp="$ac_cpp" ;; | |
16667 | esac | |
16668 | ||
16669 | case "$host_os" in | |
16670 | mingw*) | |
16671 | gl_dirsep_regex='[/\\]' | |
16672 | ;; | |
16673 | *) | |
16674 | gl_dirsep_regex='\/' | |
16675 | ;; | |
16676 | esac | |
16677 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 16678 | gl_header_literal_regex=`echo 'string.h' \ |
725e2999 JB |
16679 | | sed -e "$gl_make_literal_regex_sed"` |
16680 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16681 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16682 | s|^/[^/]|//&| | |
16683 | p | |
16684 | q | |
16685 | }' | |
6ec2e0f5 | 16686 | |
c0c3707f | 16687 | gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
725e2999 | 16688 | sed -n "$gl_absolute_header_sed"` |
6ec2e0f5 | 16689 | |
c0c3707f CB |
16690 | gl_header=$gl_cv_absolute_string_h |
16691 | gl_cv_next_string_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
16692 | |
16693 | ||
725e2999 | 16694 | fi |
c0c3707f CB |
16695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 |
16696 | $as_echo "$gl_cv_next_string_h" >&6; } | |
725e2999 | 16697 | fi |
c0c3707f | 16698 | NEXT_STRING_H=$gl_cv_next_string_h |
6ec2e0f5 | 16699 | |
725e2999 JB |
16700 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16701 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
c0c3707f | 16702 | gl_next_as_first_directive='<'string.h'>' |
725e2999 JB |
16703 | else |
16704 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
c0c3707f | 16705 | gl_next_as_first_directive=$gl_cv_next_string_h |
725e2999 | 16706 | fi |
c0c3707f CB |
16707 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive |
16708 | ||
16709 | ||
16710 | ||
6ec2e0f5 SDJ |
16711 | |
16712 | ||
16713 | ||
16714 | ||
16715 | ||
6ec2e0f5 SDJ |
16716 | |
16717 | ||
6ec2e0f5 | 16718 | |
32e2770e MF |
16719 | |
16720 | ||
16721 | ||
16722 | ||
16723 | ||
16724 | ||
16725 | ||
16726 | ||
16727 | ||
16728 | ||
16729 | ||
16730 | ||
16731 | ||
16732 | ||
16733 | if test $gl_cv_have_include_next = yes; then | |
16734 | gl_cv_next_strings_h='<'strings.h'>' | |
16735 | else | |
16736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5 | |
16737 | $as_echo_n "checking absolute name of <strings.h>... " >&6; } | |
16738 | if ${gl_cv_next_strings_h+:} false; then : | |
16739 | $as_echo_n "(cached) " >&6 | |
16740 | else | |
16741 | ||
16742 | if test $ac_cv_header_strings_h = yes; then | |
16743 | ||
16744 | ||
16745 | ||
16746 | ||
16747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16748 | /* end confdefs.h. */ | |
16749 | #include <strings.h> | |
16750 | _ACEOF | |
16751 | case "$host_os" in | |
16752 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16753 | *) gl_absname_cpp="$ac_cpp" ;; | |
16754 | esac | |
16755 | ||
16756 | case "$host_os" in | |
16757 | mingw*) | |
16758 | gl_dirsep_regex='[/\\]' | |
16759 | ;; | |
16760 | *) | |
16761 | gl_dirsep_regex='\/' | |
16762 | ;; | |
16763 | esac | |
16764 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
16765 | gl_header_literal_regex=`echo 'strings.h' \ | |
16766 | | sed -e "$gl_make_literal_regex_sed"` | |
16767 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16768 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16769 | s|^/[^/]|//&| | |
16770 | p | |
16771 | q | |
16772 | }' | |
16773 | ||
16774 | gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
16775 | sed -n "$gl_absolute_header_sed"` | |
16776 | ||
16777 | gl_header=$gl_cv_absolute_strings_h | |
16778 | gl_cv_next_strings_h='"'$gl_header'"' | |
16779 | else | |
16780 | gl_cv_next_strings_h='<'strings.h'>' | |
16781 | fi | |
16782 | ||
16783 | ||
16784 | fi | |
16785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5 | |
16786 | $as_echo "$gl_cv_next_strings_h" >&6; } | |
16787 | fi | |
16788 | NEXT_STRINGS_H=$gl_cv_next_strings_h | |
16789 | ||
16790 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
16791 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16792 | gl_next_as_first_directive='<'strings.h'>' | |
16793 | else | |
16794 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
16795 | gl_next_as_first_directive=$gl_cv_next_strings_h | |
16796 | fi | |
16797 | NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive | |
16798 | ||
16799 | ||
16800 | ||
16801 | ||
16802 | if test $ac_cv_header_strings_h = yes; then | |
16803 | HAVE_STRINGS_H=1 | |
16804 | else | |
16805 | HAVE_STRINGS_H=0 | |
16806 | fi | |
16807 | ||
16808 | ||
16809 | ||
16810 | ||
16811 | ||
16812 | ||
698be2d8 CB |
16813 | ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" |
16814 | if test "x$ac_cv_have_decl_strnlen" = xyes; then : | |
16815 | ac_have_decl=1 | |
16816 | else | |
16817 | ac_have_decl=0 | |
16818 | fi | |
16819 | ||
16820 | cat >>confdefs.h <<_ACEOF | |
16821 | #define HAVE_DECL_STRNLEN $ac_have_decl | |
16822 | _ACEOF | |
16823 | ||
16824 | ||
16825 | ||
c0c3707f | 16826 | |
9c9d63b1 | 16827 | if test $REPLACE_MEMCHR = 1; then |
c0c3707f CB |
16828 | REPLACE_STRSTR=1 |
16829 | else | |
16830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 | |
16831 | $as_echo_n "checking whether strstr works... " >&6; } | |
16832 | if ${gl_cv_func_strstr_works_always+:} false; then : | |
6ec2e0f5 SDJ |
16833 | $as_echo_n "(cached) " >&6 |
16834 | else | |
c0c3707f CB |
16835 | if test "$cross_compiling" = yes; then : |
16836 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 SDJ |
16837 | /* end confdefs.h. */ |
16838 | ||
c0c3707f CB |
16839 | #ifdef __GNU_LIBRARY__ |
16840 | #include <features.h> | |
16841 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ | |
16842 | || defined __UCLIBC__ | |
16843 | Lucky user | |
16844 | #endif | |
16845 | #elif defined __CYGWIN__ | |
16846 | #include <cygwin/version.h> | |
16847 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
16848 | Lucky user | |
16849 | #endif | |
16850 | #else | |
16851 | Lucky user | |
6ec2e0f5 | 16852 | #endif |
c0c3707f CB |
16853 | |
16854 | _ACEOF | |
16855 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
16856 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
16857 | gl_cv_func_strstr_works_always="guessing yes" | |
16858 | else | |
16859 | gl_cv_func_strstr_works_always="$gl_cross_guess_normal" | |
16860 | fi | |
16861 | rm -f conftest* | |
16862 | ||
16863 | ||
16864 | else | |
16865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16866 | /* end confdefs.h. */ | |
16867 | ||
16868 | #include <string.h> /* for strstr */ | |
16869 | #ifdef __GNU_LIBRARY__ | |
16870 | #include <features.h> | |
16871 | #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 | |
16872 | Unlucky user | |
16873 | #endif | |
725e2999 | 16874 | #endif |
c0c3707f CB |
16875 | #define P "_EF_BF_BD" |
16876 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
16877 | #define NEEDLE P P P P P | |
6ec2e0f5 | 16878 | |
725e2999 JB |
16879 | int |
16880 | main () | |
16881 | { | |
c0c3707f CB |
16882 | return !!strstr (HAYSTACK, NEEDLE); |
16883 | ||
725e2999 JB |
16884 | ; |
16885 | return 0; | |
16886 | } | |
6ec2e0f5 | 16887 | _ACEOF |
c0c3707f CB |
16888 | if ac_fn_c_try_run "$LINENO"; then : |
16889 | gl_cv_func_strstr_works_always=yes | |
6ec2e0f5 | 16890 | else |
c0c3707f | 16891 | gl_cv_func_strstr_works_always=no |
6ec2e0f5 | 16892 | fi |
c0c3707f CB |
16893 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16894 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6ec2e0f5 | 16895 | fi |
6ec2e0f5 SDJ |
16896 | |
16897 | ||
c0c3707f CB |
16898 | fi |
16899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 | |
16900 | $as_echo "$gl_cv_func_strstr_works_always" >&6; } | |
16901 | case "$gl_cv_func_strstr_works_always" in | |
16902 | *yes) ;; | |
16903 | *) | |
16904 | REPLACE_STRSTR=1 | |
16905 | ;; | |
16906 | esac | |
16907 | fi | |
6ec2e0f5 | 16908 | |
c0c3707f CB |
16909 | ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default" |
16910 | if test "x$ac_cv_have_decl_strtok_r" = xyes; then : | |
16911 | ac_have_decl=1 | |
16912 | else | |
16913 | ac_have_decl=0 | |
16914 | fi | |
6ec2e0f5 | 16915 | |
c0c3707f CB |
16916 | cat >>confdefs.h <<_ACEOF |
16917 | #define HAVE_DECL_STRTOK_R $ac_have_decl | |
16918 | _ACEOF | |
6ec2e0f5 SDJ |
16919 | |
16920 | ||
16921 | ||
16922 | ||
6ec2e0f5 SDJ |
16923 | |
16924 | ||
16925 | ||
16926 | ||
16927 | ||
16928 | ||
16929 | ||
698be2d8 CB |
16930 | |
16931 | ||
c0c3707f | 16932 | $as_echo "#define _USE_STD_STAT 1" >>confdefs.h |
6ec2e0f5 | 16933 | |
6ec2e0f5 SDJ |
16934 | |
16935 | ||
16936 | ||
16937 | ||
16938 | ||
6ec2e0f5 SDJ |
16939 | |
16940 | ||
16941 | ||
16942 | ||
16943 | ||
c0c3707f CB |
16944 | if test $gl_cv_have_include_next = yes; then |
16945 | gl_cv_next_sys_types_h='<'sys/types.h'>' | |
16946 | else | |
16947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5 | |
16948 | $as_echo_n "checking absolute name of <sys/types.h>... " >&6; } | |
16949 | if ${gl_cv_next_sys_types_h+:} false; then : | |
6ec2e0f5 SDJ |
16950 | $as_echo_n "(cached) " >&6 |
16951 | else | |
6ec2e0f5 | 16952 | |
6ec2e0f5 | 16953 | |
c0c3707f CB |
16954 | |
16955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16956 | /* end confdefs.h. */ | |
16957 | #include <sys/types.h> | |
6ec2e0f5 | 16958 | _ACEOF |
c0c3707f CB |
16959 | case "$host_os" in |
16960 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
16961 | *) gl_absname_cpp="$ac_cpp" ;; | |
16962 | esac | |
6ec2e0f5 | 16963 | |
c0c3707f CB |
16964 | case "$host_os" in |
16965 | mingw*) | |
16966 | gl_dirsep_regex='[/\\]' | |
16967 | ;; | |
16968 | *) | |
16969 | gl_dirsep_regex='\/' | |
16970 | ;; | |
16971 | esac | |
16972 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
16973 | gl_header_literal_regex=`echo 'sys/types.h' \ | |
16974 | | sed -e "$gl_make_literal_regex_sed"` | |
16975 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
16976 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
16977 | s|^/[^/]|//&| | |
16978 | p | |
16979 | q | |
16980 | }' | |
6ec2e0f5 | 16981 | |
c0c3707f CB |
16982 | gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
16983 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 16984 | |
c0c3707f CB |
16985 | gl_header=$gl_cv_absolute_sys_types_h |
16986 | gl_cv_next_sys_types_h='"'$gl_header'"' | |
6ec2e0f5 SDJ |
16987 | |
16988 | ||
c0c3707f CB |
16989 | fi |
16990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 | |
16991 | $as_echo "$gl_cv_next_sys_types_h" >&6; } | |
16992 | fi | |
16993 | NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h | |
6ec2e0f5 | 16994 | |
c0c3707f CB |
16995 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
16996 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
16997 | gl_next_as_first_directive='<'sys/types.h'>' | |
16998 | else | |
16999 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17000 | gl_next_as_first_directive=$gl_cv_next_sys_types_h | |
17001 | fi | |
17002 | NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive | |
6ec2e0f5 SDJ |
17003 | |
17004 | ||
17005 | ||
17006 | ||
6ec2e0f5 | 17007 | |
6ec2e0f5 SDJ |
17008 | |
17009 | ||
6ec2e0f5 SDJ |
17010 | |
17011 | ||
17012 | ||
17013 | ||
17014 | ||
c0c3707f | 17015 | WINDOWS_STAT_INODES=0 |
6ec2e0f5 SDJ |
17016 | |
17017 | ||
17018 | ||
17019 | ||
17020 | ||
472fa5ee SM |
17021 | |
17022 | ||
17023 | ||
9c9d63b1 PM |
17024 | GNULIB_CTIME=0; |
17025 | GNULIB_MKTIME=0; | |
17026 | GNULIB_LOCALTIME=0; | |
17027 | GNULIB_NANOSLEEP=0; | |
17028 | GNULIB_STRFTIME=0; | |
17029 | GNULIB_STRPTIME=0; | |
17030 | GNULIB_TIMEGM=0; | |
17031 | GNULIB_TIMESPEC_GET=0; | |
17032 | GNULIB_TIME_R=0; | |
17033 | GNULIB_TIME_RZ=0; | |
17034 | GNULIB_TZSET=0; | |
17035 | GNULIB_MDA_TZSET=1; | |
17036 | HAVE_DECL_LOCALTIME_R=1; | |
17037 | HAVE_NANOSLEEP=1; | |
17038 | HAVE_STRPTIME=1; | |
17039 | HAVE_TIMEGM=1; | |
17040 | HAVE_TIMESPEC_GET=1; | |
17041 | HAVE_TIMEZONE_T=0; | |
17042 | REPLACE_CTIME=GNULIB_PORTCHECK; | |
17043 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
17044 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
17045 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
17046 | REPLACE_STRFTIME=GNULIB_PORTCHECK; | |
17047 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
17048 | REPLACE_TZSET=GNULIB_PORTCHECK; | |
17049 | ||
17050 | : ${GNULIB_GETTIMEOFDAY=0}; | |
17051 | REPLACE_GMTIME=0; | |
17052 | REPLACE_LOCALTIME=0; | |
17053 | ||
17054 | ||
472fa5ee | 17055 | |
c0c3707f CB |
17056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 |
17057 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
17058 | if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : | |
17059 | $as_echo_n "(cached) " >&6 | |
17060 | else | |
17061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17062 | /* end confdefs.h. */ | |
17063 | #include <time.h> | |
472fa5ee | 17064 | |
c0c3707f CB |
17065 | int |
17066 | main () | |
17067 | { | |
17068 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
17069 | ; | |
17070 | return 0; | |
17071 | } | |
6ec2e0f5 | 17072 | _ACEOF |
c0c3707f CB |
17073 | if ac_fn_c_try_compile "$LINENO"; then : |
17074 | gl_cv_sys_struct_timespec_in_time_h=yes | |
17075 | else | |
17076 | gl_cv_sys_struct_timespec_in_time_h=no | |
6ec2e0f5 | 17077 | fi |
c0c3707f CB |
17078 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
17079 | fi | |
17080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
17081 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
6ec2e0f5 | 17082 | |
c0c3707f CB |
17083 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
17084 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
17085 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
17086 | UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 | |
17087 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
17088 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
6ec2e0f5 | 17089 | else |
c0c3707f CB |
17090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 |
17091 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
17092 | if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : | |
17093 | $as_echo_n "(cached) " >&6 | |
17094 | else | |
17095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17096 | /* end confdefs.h. */ | |
17097 | #include <sys/time.h> | |
472fa5ee | 17098 | |
c0c3707f CB |
17099 | int |
17100 | main () | |
17101 | { | |
17102 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
17103 | ; | |
17104 | return 0; | |
17105 | } | |
17106 | _ACEOF | |
17107 | if ac_fn_c_try_compile "$LINENO"; then : | |
17108 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
17109 | else | |
17110 | gl_cv_sys_struct_timespec_in_sys_time_h=no | |
17111 | fi | |
17112 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17113 | fi | |
17114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
17115 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
17116 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
17117 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
17118 | else | |
17119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
17120 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
17121 | if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : | |
17122 | $as_echo_n "(cached) " >&6 | |
17123 | else | |
17124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17125 | /* end confdefs.h. */ | |
17126 | #include <pthread.h> | |
472fa5ee | 17127 | |
c0c3707f CB |
17128 | int |
17129 | main () | |
17130 | { | |
17131 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
17132 | ; | |
17133 | return 0; | |
17134 | } | |
17135 | _ACEOF | |
17136 | if ac_fn_c_try_compile "$LINENO"; then : | |
17137 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
17138 | else | |
17139 | gl_cv_sys_struct_timespec_in_pthread_h=no | |
17140 | fi | |
17141 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17142 | fi | |
17143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 | |
17144 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
17145 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
17146 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
17147 | else | |
17148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5 | |
17149 | $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; } | |
17150 | if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then : | |
17151 | $as_echo_n "(cached) " >&6 | |
17152 | else | |
17153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17154 | /* end confdefs.h. */ | |
17155 | #include <unistd.h> | |
6ec2e0f5 | 17156 | |
c0c3707f CB |
17157 | int |
17158 | main () | |
17159 | { | |
17160 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
17161 | ; | |
17162 | return 0; | |
17163 | } | |
17164 | _ACEOF | |
17165 | if ac_fn_c_try_compile "$LINENO"; then : | |
17166 | gl_cv_sys_struct_timespec_in_unistd_h=yes | |
17167 | else | |
17168 | gl_cv_sys_struct_timespec_in_unistd_h=no | |
17169 | fi | |
17170 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17171 | fi | |
17172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 | |
17173 | $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } | |
17174 | if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then | |
17175 | UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 | |
17176 | fi | |
6ec2e0f5 SDJ |
17177 | fi |
17178 | fi | |
c0c3707f | 17179 | fi |
6ec2e0f5 SDJ |
17180 | |
17181 | ||
17182 | ||
17183 | ||
17184 | ||
17185 | ||
6ec2e0f5 | 17186 | |
6ec2e0f5 SDJ |
17187 | |
17188 | ||
17189 | ||
17190 | ||
17191 | ||
6ec2e0f5 SDJ |
17192 | |
17193 | ||
17194 | ||
17195 | ||
c0c3707f CB |
17196 | if test $gl_cv_have_include_next = yes; then |
17197 | gl_cv_next_time_h='<'time.h'>' | |
17198 | else | |
17199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
17200 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
17201 | if ${gl_cv_next_time_h+:} false; then : | |
17202 | $as_echo_n "(cached) " >&6 | |
17203 | else | |
6ec2e0f5 | 17204 | |
6ec2e0f5 SDJ |
17205 | |
17206 | ||
c0c3707f CB |
17207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17208 | /* end confdefs.h. */ | |
17209 | #include <time.h> | |
17210 | _ACEOF | |
17211 | case "$host_os" in | |
17212 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17213 | *) gl_absname_cpp="$ac_cpp" ;; | |
17214 | esac | |
6ec2e0f5 | 17215 | |
c0c3707f CB |
17216 | case "$host_os" in |
17217 | mingw*) | |
17218 | gl_dirsep_regex='[/\\]' | |
17219 | ;; | |
17220 | *) | |
17221 | gl_dirsep_regex='\/' | |
17222 | ;; | |
17223 | esac | |
17224 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
17225 | gl_header_literal_regex=`echo 'time.h' \ | |
17226 | | sed -e "$gl_make_literal_regex_sed"` | |
17227 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17228 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17229 | s|^/[^/]|//&| | |
17230 | p | |
17231 | q | |
17232 | }' | |
6ec2e0f5 | 17233 | |
c0c3707f CB |
17234 | gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
17235 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 17236 | |
c0c3707f CB |
17237 | gl_header=$gl_cv_absolute_time_h |
17238 | gl_cv_next_time_h='"'$gl_header'"' | |
6ec2e0f5 | 17239 | |
6ec2e0f5 SDJ |
17240 | |
17241 | fi | |
c0c3707f CB |
17242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 |
17243 | $as_echo "$gl_cv_next_time_h" >&6; } | |
17244 | fi | |
17245 | NEXT_TIME_H=$gl_cv_next_time_h | |
6ec2e0f5 | 17246 | |
c0c3707f CB |
17247 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17248 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17249 | gl_next_as_first_directive='<'time.h'>' | |
17250 | else | |
17251 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17252 | gl_next_as_first_directive=$gl_cv_next_time_h | |
17253 | fi | |
17254 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive | |
6ec2e0f5 | 17255 | |
472fa5ee SM |
17256 | |
17257 | ||
17258 | ||
17259 | ||
17260 | ||
6ec2e0f5 | 17261 | |
6ec2e0f5 | 17262 | |
9c9d63b1 PM |
17263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5 |
17264 | $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; } | |
17265 | if ${gl_cv_time_h_has_TIME_UTC+:} false; then : | |
17266 | $as_echo_n "(cached) " >&6 | |
17267 | else | |
17268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17269 | /* end confdefs.h. */ | |
17270 | #include <time.h> | |
17271 | ||
17272 | int | |
17273 | main () | |
17274 | { | |
17275 | static int x = TIME_UTC; x++; | |
17276 | ; | |
17277 | return 0; | |
17278 | } | |
17279 | _ACEOF | |
17280 | if ac_fn_c_try_compile "$LINENO"; then : | |
17281 | gl_cv_time_h_has_TIME_UTC=yes | |
17282 | else | |
17283 | gl_cv_time_h_has_TIME_UTC=no | |
17284 | fi | |
17285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17286 | fi | |
17287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5 | |
17288 | $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; } | |
17289 | if test $gl_cv_time_h_has_TIME_UTC = yes; then | |
17290 | TIME_H_DEFINES_TIME_UTC=1 | |
17291 | else | |
17292 | TIME_H_DEFINES_TIME_UTC=0 | |
17293 | fi | |
17294 | ||
17295 | ||
6ec2e0f5 | 17296 | |
6ec2e0f5 | 17297 | |
9c9d63b1 PM |
17298 | ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" |
17299 | if test "x$ac_cv_have_decl_execvpe" = xyes; then : | |
17300 | ac_have_decl=1 | |
17301 | else | |
17302 | ac_have_decl=0 | |
17303 | fi | |
698be2d8 | 17304 | |
9c9d63b1 PM |
17305 | cat >>confdefs.h <<_ACEOF |
17306 | #define HAVE_DECL_EXECVPE $ac_have_decl | |
17307 | _ACEOF | |
698be2d8 | 17308 | |
c0c3707f CB |
17309 | ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" |
17310 | if test "x$ac_cv_have_decl_unsetenv" = xyes; then : | |
17311 | ac_have_decl=1 | |
17312 | else | |
17313 | ac_have_decl=0 | |
17314 | fi | |
6ec2e0f5 | 17315 | |
c0c3707f CB |
17316 | cat >>confdefs.h <<_ACEOF |
17317 | #define HAVE_DECL_UNSETENV $ac_have_decl | |
17318 | _ACEOF | |
6ec2e0f5 SDJ |
17319 | |
17320 | ||
6ec2e0f5 SDJ |
17321 | |
17322 | ||
17323 | ||
c0c3707f CB |
17324 | if test $ac_cv_header_crtdefs_h = yes; then |
17325 | HAVE_CRTDEFS_H=1 | |
17326 | else | |
17327 | HAVE_CRTDEFS_H=0 | |
5e8754f9 | 17328 | fi |
5e8754f9 | 17329 | |
5e8754f9 | 17330 | |
5e8754f9 | 17331 | |
c0c3707f | 17332 | GNULIB_ISWBLANK=0; |
5df4cba6 SM |
17333 | GNULIB_ISWDIGIT=0; |
17334 | GNULIB_ISWXDIGIT=0; | |
c0c3707f CB |
17335 | GNULIB_WCTYPE=0; |
17336 | GNULIB_ISWCTYPE=0; | |
17337 | GNULIB_WCTRANS=0; | |
17338 | GNULIB_TOWCTRANS=0; | |
17339 | HAVE_ISWBLANK=1; | |
17340 | HAVE_WCTYPE_T=1; | |
17341 | HAVE_WCTRANS_T=1; | |
17342 | REPLACE_ISWBLANK=0; | |
5df4cba6 SM |
17343 | REPLACE_ISWDIGIT=0; |
17344 | REPLACE_ISWXDIGIT=0; | |
5e8754f9 | 17345 | |
5e8754f9 | 17346 | |
5e8754f9 | 17347 | |
5e8754f9 | 17348 | |
698be2d8 CB |
17349 | |
17350 | ||
17351 | ||
17352 | ||
c0c3707f CB |
17353 | if false; then |
17354 | GL_COND_LIBTOOL_TRUE= | |
17355 | GL_COND_LIBTOOL_FALSE='#' | |
17356 | else | |
17357 | GL_COND_LIBTOOL_TRUE='#' | |
17358 | GL_COND_LIBTOOL_FALSE= | |
17359 | fi | |
5e8754f9 | 17360 | |
c0c3707f CB |
17361 | gl_cond_libtool=false |
17362 | gl_libdeps= | |
17363 | gl_ltlibdeps= | |
17364 | gl_m4_base='import/m4' | |
5e8754f9 | 17365 | |
5e8754f9 SDJ |
17366 | |
17367 | ||
6ec2e0f5 | 17368 | |
6ec2e0f5 | 17369 | |
6ec2e0f5 | 17370 | |
6ec2e0f5 | 17371 | |
6ec2e0f5 | 17372 | |
6ec2e0f5 | 17373 | |
5df4cba6 | 17374 | |
c0c3707f CB |
17375 | gl_source_base='import' |
17376 | ||
6ec2e0f5 | 17377 | |
c0c3707f CB |
17378 | if test $ac_cv_func_alloca_works = no; then |
17379 | : | |
17380 | fi | |
6ec2e0f5 | 17381 | |
c0c3707f CB |
17382 | # Define an additional variable used in the Makefile substitution. |
17383 | if test $ac_cv_working_alloca_h = yes; then | |
17384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
17385 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
17386 | if ${gl_cv_rpl_alloca+:} false; then : | |
6ec2e0f5 SDJ |
17387 | $as_echo_n "(cached) " >&6 |
17388 | else | |
c0c3707f CB |
17389 | |
17390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6ec2e0f5 SDJ |
17391 | /* end confdefs.h. */ |
17392 | ||
c0c3707f CB |
17393 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
17394 | Need own alloca | |
17395 | #endif | |
6ec2e0f5 | 17396 | |
6ec2e0f5 | 17397 | _ACEOF |
c0c3707f CB |
17398 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
17399 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
17400 | gl_cv_rpl_alloca=yes | |
6ec2e0f5 | 17401 | else |
c0c3707f | 17402 | gl_cv_rpl_alloca=no |
6ec2e0f5 | 17403 | fi |
c0c3707f | 17404 | rm -f conftest* |
6ec2e0f5 SDJ |
17405 | |
17406 | ||
17407 | fi | |
c0c3707f CB |
17408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 |
17409 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
17410 | if test $gl_cv_rpl_alloca = yes; then | |
6ec2e0f5 | 17411 | |
c0c3707f | 17412 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
6ec2e0f5 | 17413 | |
c0c3707f CB |
17414 | ALLOCA_H=alloca.h |
17415 | else | |
17416 | ALLOCA_H= | |
17417 | fi | |
17418 | else | |
17419 | ALLOCA_H=alloca.h | |
17420 | fi | |
6ec2e0f5 | 17421 | |
c0c3707f CB |
17422 | if test -n "$ALLOCA_H"; then |
17423 | GL_GENERATE_ALLOCA_H_TRUE= | |
17424 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
17425 | else | |
17426 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
17427 | GL_GENERATE_ALLOCA_H_FALSE= | |
17428 | fi | |
6ec2e0f5 SDJ |
17429 | |
17430 | ||
c0c3707f CB |
17431 | if test $ac_cv_working_alloca_h = yes; then |
17432 | HAVE_ALLOCA_H=1 | |
17433 | else | |
17434 | HAVE_ALLOCA_H=0 | |
17435 | fi | |
6ec2e0f5 SDJ |
17436 | |
17437 | ||
17438 | ||
17439 | ||
17440 | ||
17441 | ||
c0c3707f CB |
17442 | if test $ac_cv_header_arpa_inet_h = yes; then |
17443 | HAVE_ARPA_INET_H=1 | |
17444 | else | |
17445 | HAVE_ARPA_INET_H=0 | |
17446 | fi | |
6ec2e0f5 SDJ |
17447 | |
17448 | ||
472fa5ee SM |
17449 | |
17450 | ||
17451 | ||
17452 | ||
17453 | ||
6ec2e0f5 SDJ |
17454 | |
17455 | ||
17456 | ||
17457 | if test $gl_cv_have_include_next = yes; then | |
c0c3707f | 17458 | gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' |
6ec2e0f5 | 17459 | else |
c0c3707f CB |
17460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5 |
17461 | $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; } | |
17462 | if ${gl_cv_next_arpa_inet_h+:} false; then : | |
6ec2e0f5 SDJ |
17463 | $as_echo_n "(cached) " >&6 |
17464 | else | |
17465 | ||
c0c3707f | 17466 | if test $ac_cv_header_arpa_inet_h = yes; then |
6ec2e0f5 SDJ |
17467 | |
17468 | ||
17469 | ||
17470 | ||
17471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17472 | /* end confdefs.h. */ | |
c0c3707f | 17473 | #include <arpa/inet.h> |
6ec2e0f5 SDJ |
17474 | _ACEOF |
17475 | case "$host_os" in | |
17476 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17477 | *) gl_absname_cpp="$ac_cpp" ;; | |
17478 | esac | |
17479 | ||
17480 | case "$host_os" in | |
17481 | mingw*) | |
17482 | gl_dirsep_regex='[/\\]' | |
17483 | ;; | |
17484 | *) | |
17485 | gl_dirsep_regex='\/' | |
17486 | ;; | |
17487 | esac | |
17488 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
c0c3707f | 17489 | gl_header_literal_regex=`echo 'arpa/inet.h' \ |
6ec2e0f5 SDJ |
17490 | | sed -e "$gl_make_literal_regex_sed"` |
17491 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17492 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17493 | s|^/[^/]|//&| | |
17494 | p | |
17495 | q | |
17496 | }' | |
17497 | ||
c0c3707f | 17498 | gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
6ec2e0f5 SDJ |
17499 | sed -n "$gl_absolute_header_sed"` |
17500 | ||
c0c3707f CB |
17501 | gl_header=$gl_cv_absolute_arpa_inet_h |
17502 | gl_cv_next_arpa_inet_h='"'$gl_header'"' | |
6ec2e0f5 | 17503 | else |
c0c3707f | 17504 | gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' |
6ec2e0f5 SDJ |
17505 | fi |
17506 | ||
c0c3707f | 17507 | |
6ec2e0f5 | 17508 | fi |
c0c3707f CB |
17509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 |
17510 | $as_echo "$gl_cv_next_arpa_inet_h" >&6; } | |
17511 | fi | |
17512 | NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h | |
6ec2e0f5 | 17513 | |
c0c3707f CB |
17514 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17515 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
17516 | gl_next_as_first_directive='<'arpa/inet.h'>' | |
17517 | else | |
17518 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
17519 | gl_next_as_first_directive=$gl_cv_next_arpa_inet_h | |
17520 | fi | |
17521 | NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive | |
6ec2e0f5 SDJ |
17522 | |
17523 | ||
6ec2e0f5 | 17524 | |
6ec2e0f5 | 17525 | |
6ec2e0f5 SDJ |
17526 | |
17527 | ||
6ec2e0f5 SDJ |
17528 | |
17529 | ||
17530 | ||
c0c3707f CB |
17531 | if test $ac_cv_header_sys_socket_h = yes; then |
17532 | HAVE_WS2TCPIP_H=0 | |
17533 | else | |
17534 | if test $ac_cv_header_ws2tcpip_h = yes; then | |
17535 | HAVE_WS2TCPIP_H=1 | |
17536 | else | |
17537 | HAVE_WS2TCPIP_H=0 | |
17538 | fi | |
17539 | fi | |
17540 | ||
17541 | ||
6ec2e0f5 SDJ |
17542 | |
17543 | ||
6ec2e0f5 SDJ |
17544 | |
17545 | ||
17546 | ||
17547 | ||
17548 | ||
698be2d8 CB |
17549 | |
17550 | ||
17551 | ||
17552 | ||
17553 | ||
17554 | ||
17555 | if test $ac_cv_func_btowc = no; then | |
17556 | HAVE_BTOWC=0 | |
17557 | else | |
17558 | ||
17559 | ||
17560 | ||
17561 | ||
17562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 | |
17563 | $as_echo_n "checking whether btowc(0) is correct... " >&6; } | |
17564 | if ${gl_cv_func_btowc_nul+:} false; then : | |
17565 | $as_echo_n "(cached) " >&6 | |
17566 | else | |
17567 | ||
17568 | if test "$cross_compiling" = yes; then : | |
17569 | ||
17570 | case "$host_os" in | |
17571 | # Guess no on Cygwin. | |
17572 | cygwin*) gl_cv_func_btowc_nul="guessing no" ;; | |
17573 | # Guess yes on native Windows. | |
17574 | mingw*) gl_cv_func_btowc_nul="guessing yes" ;; | |
17575 | # Guess yes otherwise. | |
17576 | *) gl_cv_func_btowc_nul="guessing yes" ;; | |
17577 | esac | |
17578 | ||
17579 | else | |
17580 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17581 | /* end confdefs.h. */ | |
17582 | ||
698be2d8 CB |
17583 | #include <wchar.h> |
17584 | int main () | |
17585 | { | |
17586 | if (btowc ('\0') != 0) | |
17587 | return 1; | |
17588 | return 0; | |
17589 | } | |
17590 | _ACEOF | |
17591 | if ac_fn_c_try_run "$LINENO"; then : | |
17592 | gl_cv_func_btowc_nul=yes | |
17593 | else | |
17594 | gl_cv_func_btowc_nul=no | |
17595 | fi | |
17596 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17597 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17598 | fi | |
17599 | ||
17600 | ||
17601 | fi | |
17602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 | |
17603 | $as_echo "$gl_cv_func_btowc_nul" >&6; } | |
17604 | ||
17605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 | |
17606 | $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } | |
17607 | if ${gl_cv_func_btowc_eof+:} false; then : | |
17608 | $as_echo_n "(cached) " >&6 | |
17609 | else | |
17610 | ||
17611 | case "$host_os" in | |
17612 | # Guess no on IRIX. | |
17613 | irix*) gl_cv_func_btowc_eof="guessing no" ;; | |
17614 | # Guess yes on native Windows. | |
17615 | mingw*) gl_cv_func_btowc_eof="guessing yes" ;; | |
17616 | # Guess yes otherwise. | |
17617 | *) gl_cv_func_btowc_eof="guessing yes" ;; | |
17618 | esac | |
17619 | if test $LOCALE_FR != none; then | |
17620 | if test "$cross_compiling" = yes; then : | |
17621 | : | |
17622 | else | |
17623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17624 | /* end confdefs.h. */ | |
17625 | ||
17626 | #include <locale.h> | |
698be2d8 | 17627 | #include <stdio.h> |
698be2d8 CB |
17628 | #include <wchar.h> |
17629 | int main () | |
17630 | { | |
17631 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | |
17632 | { | |
17633 | if (btowc (EOF) != WEOF) | |
17634 | return 1; | |
17635 | } | |
17636 | return 0; | |
17637 | } | |
17638 | _ACEOF | |
17639 | if ac_fn_c_try_run "$LINENO"; then : | |
17640 | gl_cv_func_btowc_eof=yes | |
17641 | else | |
17642 | gl_cv_func_btowc_eof=no | |
17643 | fi | |
17644 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17645 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17646 | fi | |
17647 | ||
17648 | fi | |
17649 | ||
17650 | fi | |
17651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 | |
17652 | $as_echo "$gl_cv_func_btowc_eof" >&6; } | |
17653 | ||
17654 | case "$gl_cv_func_btowc_nul" in | |
17655 | *yes) ;; | |
17656 | *) REPLACE_BTOWC=1 ;; | |
17657 | esac | |
17658 | case "$gl_cv_func_btowc_eof" in | |
17659 | *yes) ;; | |
17660 | *) REPLACE_BTOWC=1 ;; | |
17661 | esac | |
17662 | fi | |
17663 | ||
17664 | if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then | |
17665 | ||
17666 | ||
17667 | ||
17668 | ||
17669 | ||
17670 | ||
17671 | ||
17672 | ||
17673 | gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" | |
17674 | ||
17675 | ||
17676 | : | |
17677 | ||
17678 | fi | |
17679 | ||
17680 | ||
17681 | ||
17682 | ||
17683 | ||
17684 | GNULIB_BTOWC=1 | |
17685 | ||
17686 | ||
17687 | ||
17688 | ||
17689 | ||
17690 | $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h | |
17691 | ||
17692 | ||
17693 | ||
17694 | ||
c0c3707f CB |
17695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 |
17696 | $as_echo_n "checking for __builtin_expect... " >&6; } | |
17697 | if ${gl_cv___builtin_expect+:} false; then : | |
6ec2e0f5 SDJ |
17698 | $as_echo_n "(cached) " >&6 |
17699 | else | |
c0c3707f CB |
17700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17701 | /* end confdefs.h. */ | |
17702 | ||
17703 | int | |
17704 | main (int argc, char **argv) | |
17705 | { | |
17706 | argc = __builtin_expect (argc, 100); | |
17707 | return argv[argc != 100][0]; | |
17708 | } | |
17709 | _ACEOF | |
17710 | if ac_fn_c_try_link "$LINENO"; then : | |
17711 | gl_cv___builtin_expect=yes | |
17712 | else | |
17713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17714 | /* end confdefs.h. */ | |
17715 | ||
17716 | #include <builtins.h> | |
17717 | int | |
17718 | main (int argc, char **argv) | |
17719 | { | |
17720 | argc = __builtin_expect (argc, 100); | |
17721 | return argv[argc != 100][0]; | |
17722 | } | |
17723 | _ACEOF | |
17724 | if ac_fn_c_try_link "$LINENO"; then : | |
17725 | gl_cv___builtin_expect="in <builtins.h>" | |
17726 | else | |
17727 | gl_cv___builtin_expect=no | |
6ec2e0f5 | 17728 | fi |
c0c3707f CB |
17729 | rm -f core conftest.err conftest.$ac_objext \ |
17730 | conftest$ac_exeext conftest.$ac_ext | |
17731 | fi | |
17732 | rm -f core conftest.err conftest.$ac_objext \ | |
17733 | conftest$ac_exeext conftest.$ac_ext | |
17734 | fi | |
17735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 | |
17736 | $as_echo "$gl_cv___builtin_expect" >&6; } | |
17737 | if test "$gl_cv___builtin_expect" = yes; then | |
17738 | $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h | |
8690e634 | 17739 | |
c0c3707f CB |
17740 | elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then |
17741 | $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h | |
8690e634 | 17742 | |
6ec2e0f5 | 17743 | fi |
8690e634 JK |
17744 | |
17745 | ||
17746 | ||
17747 | ||
c0c3707f CB |
17748 | |
17749 | if test $ac_cv_func_canonicalize_file_name = no; then | |
17750 | HAVE_CANONICALIZE_FILE_NAME=0 | |
17751 | if test $ac_cv_func_realpath = no; then | |
17752 | HAVE_REALPATH=0 | |
17753 | else | |
17754 | case "$gl_cv_func_realpath_works" in | |
17755 | *yes) ;; | |
17756 | *) REPLACE_REALPATH=1 ;; | |
17757 | esac | |
17758 | fi | |
17759 | else | |
17760 | case "$gl_cv_func_realpath_works" in | |
17761 | *yes) | |
17762 | ;; | |
17763 | *) | |
17764 | REPLACE_CANONICALIZE_FILE_NAME=1 | |
17765 | REPLACE_REALPATH=1 | |
17766 | ;; | |
17767 | esac | |
5e8754f9 | 17768 | fi |
8690e634 | 17769 | |
c0c3707f | 17770 | if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then |
8690e634 JK |
17771 | |
17772 | ||
17773 | ||
472fa5ee SM |
17774 | |
17775 | ||
17776 | ||
17777 | ||
17778 | ||
c0c3707f CB |
17779 | gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" |
17780 | ||
6ec2e0f5 | 17781 | fi |
8690e634 JK |
17782 | |
17783 | ||
c0c3707f CB |
17784 | cat >>confdefs.h <<_ACEOF |
17785 | #define GNULIB_CANONICALIZE_LGPL 1 | |
17786 | _ACEOF | |
8690e634 | 17787 | |
8690e634 | 17788 | |
8690e634 | 17789 | |
8690e634 | 17790 | |
8690e634 | 17791 | |
8690e634 | 17792 | |
8690e634 | 17793 | |
c0c3707f | 17794 | GNULIB_CANONICALIZE_FILE_NAME=1 |
8690e634 | 17795 | |
8690e634 | 17796 | |
8690e634 | 17797 | |
6ec2e0f5 SDJ |
17798 | |
17799 | ||
c0c3707f | 17800 | $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h |
6ec2e0f5 | 17801 | |
6ec2e0f5 | 17802 | |
8690e634 JK |
17803 | |
17804 | ||
8690e634 JK |
17805 | |
17806 | ||
17807 | ||
17808 | ||
c0c3707f | 17809 | GNULIB_REALPATH=1 |
6ec2e0f5 SDJ |
17810 | |
17811 | ||
17812 | ||
17813 | ||
6ec2e0f5 | 17814 | |
c0c3707f | 17815 | $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h |
6ec2e0f5 SDJ |
17816 | |
17817 | ||
17818 | ||
17819 | ||
17820 | ||
17821 | ||
17822 | ||
6ec2e0f5 | 17823 | |
c0c3707f | 17824 | GNULIB_CHDIR=1 |
6ec2e0f5 | 17825 | |
8690e634 | 17826 | |
8690e634 | 17827 | |
6ec2e0f5 | 17828 | |
6ec2e0f5 | 17829 | |
c0c3707f CB |
17830 | $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h |
17831 | ||
17832 | ||
17833 | ||
17834 | ||
17835 | ||
9c9d63b1 PM |
17836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5 |
17837 | $as_echo_n "checking whether this system supports file names of any length... " >&6; } | |
17838 | if ${gl_cv_have_unlimited_file_name_length+:} false; then : | |
c0c3707f | 17839 | $as_echo_n "(cached) " >&6 |
8690e634 | 17840 | else |
c0c3707f CB |
17841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17842 | /* end confdefs.h. */ | |
8690e634 | 17843 | |
c0c3707f CB |
17844 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ |
17845 | #if HAVE_UNISTD_H | |
17846 | # include <unistd.h> | |
17847 | #endif | |
17848 | #include <limits.h> | |
17849 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
17850 | # include <sys/param.h> | |
17851 | #endif | |
17852 | #if !defined PATH_MAX && defined MAXPATHLEN | |
17853 | # define PATH_MAX MAXPATHLEN | |
17854 | #endif | |
17855 | #ifdef __hpux | |
17856 | # undef PATH_MAX | |
17857 | # define PATH_MAX 1024 | |
17858 | #endif | |
17859 | #if defined _WIN32 && ! defined __CYGWIN__ | |
17860 | # undef PATH_MAX | |
17861 | # define PATH_MAX 260 | |
17862 | #endif | |
6ec2e0f5 | 17863 | |
c0c3707f CB |
17864 | #ifdef PATH_MAX |
17865 | have_arbitrary_file_name_length_limit | |
17866 | #endif | |
6ec2e0f5 | 17867 | _ACEOF |
c0c3707f CB |
17868 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
17869 | $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : | |
9c9d63b1 PM |
17870 | gl_cv_have_unlimited_file_name_length=no |
17871 | else | |
17872 | gl_cv_have_unlimited_file_name_length=yes | |
17873 | fi | |
17874 | rm -f conftest* | |
17875 | ||
17876 | fi | |
17877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5 | |
17878 | $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; } | |
17879 | ||
17880 | if test $gl_cv_have_unlimited_file_name_length = no; then | |
17881 | ||
17882 | ||
17883 | ||
17884 | ||
17885 | ||
17886 | ||
17887 | ||
17888 | ||
17889 | gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" | |
17890 | ||
17891 | : | |
17892 | fi | |
17893 | ||
17894 | ||
17895 | ||
17896 | # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. | |
17897 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. | |
17898 | ||
17899 | # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* | |
17900 | # programs in the package would end up linked with that potentially-shared | |
17901 | # library, inducing unnecessary run-time overhead. | |
17902 | LIB_CLOCK_GETTIME= | |
17903 | ||
17904 | gl_saved_libs=$LIBS | |
17905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 | |
17906 | $as_echo_n "checking for library containing clock_gettime... " >&6; } | |
17907 | if ${ac_cv_search_clock_gettime+:} false; then : | |
17908 | $as_echo_n "(cached) " >&6 | |
c0c3707f | 17909 | else |
9c9d63b1 PM |
17910 | ac_func_search_save_LIBS=$LIBS |
17911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17912 | /* end confdefs.h. */ | |
17913 | ||
17914 | /* Override any GCC internal prototype to avoid an error. | |
17915 | Use char because int might match the return type of a GCC | |
17916 | builtin and then its argument prototype would still apply. */ | |
17917 | #ifdef __cplusplus | |
17918 | extern "C" | |
17919 | #endif | |
17920 | char clock_gettime (); | |
17921 | int | |
17922 | main () | |
17923 | { | |
17924 | return clock_gettime (); | |
17925 | ; | |
17926 | return 0; | |
17927 | } | |
17928 | _ACEOF | |
17929 | for ac_lib in '' rt posix4; do | |
17930 | if test -z "$ac_lib"; then | |
17931 | ac_res="none required" | |
17932 | else | |
17933 | ac_res=-l$ac_lib | |
17934 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
17935 | fi | |
17936 | if ac_fn_c_try_link "$LINENO"; then : | |
17937 | ac_cv_search_clock_gettime=$ac_res | |
17938 | fi | |
17939 | rm -f core conftest.err conftest.$ac_objext \ | |
17940 | conftest$ac_exeext | |
17941 | if ${ac_cv_search_clock_gettime+:} false; then : | |
17942 | break | |
c0c3707f | 17943 | fi |
9c9d63b1 PM |
17944 | done |
17945 | if ${ac_cv_search_clock_gettime+:} false; then : | |
6ec2e0f5 | 17946 | |
9c9d63b1 PM |
17947 | else |
17948 | ac_cv_search_clock_gettime=no | |
17949 | fi | |
17950 | rm conftest.$ac_ext | |
17951 | LIBS=$ac_func_search_save_LIBS | |
17952 | fi | |
17953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 | |
17954 | $as_echo "$ac_cv_search_clock_gettime" >&6; } | |
17955 | ac_res=$ac_cv_search_clock_gettime | |
17956 | if test "$ac_res" != no; then : | |
17957 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
17958 | test "$ac_cv_search_clock_gettime" = "none required" || | |
17959 | LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime | |
6ec2e0f5 | 17960 | fi |
472fa5ee | 17961 | |
9c9d63b1 PM |
17962 | for ac_func in clock_gettime clock_settime |
17963 | do : | |
17964 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
17965 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
17966 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
17967 | cat >>confdefs.h <<_ACEOF | |
17968 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
17969 | _ACEOF | |
472fa5ee | 17970 | |
9c9d63b1 PM |
17971 | fi |
17972 | done | |
472fa5ee | 17973 | |
9c9d63b1 | 17974 | LIBS=$gl_saved_libs |
472fa5ee | 17975 | |
8690e634 | 17976 | |
8690e634 | 17977 | |
c0c3707f | 17978 | $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h |
8690e634 JK |
17979 | |
17980 | ||
17981 | ||
17982 | ||
17983 | ||
8690e634 | 17984 | |
c0c3707f CB |
17985 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
17986 | REPLACE_CLOSE=1 | |
17987 | fi | |
8690e634 | 17988 | |
6ec2e0f5 SDJ |
17989 | |
17990 | ||
6ec2e0f5 SDJ |
17991 | |
17992 | ||
8690e634 | 17993 | |
c0c3707f CB |
17994 | if test $ac_cv_header_sys_socket_h != yes; then |
17995 | for ac_header in winsock2.h | |
17996 | do : | |
17997 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
17998 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
17999 | cat >>confdefs.h <<_ACEOF | |
18000 | #define HAVE_WINSOCK2_H 1 | |
18001 | _ACEOF | |
8690e634 | 18002 | |
c0c3707f | 18003 | fi |
8690e634 | 18004 | |
c0c3707f | 18005 | done |
8690e634 | 18006 | |
c0c3707f CB |
18007 | fi |
18008 | if test "$ac_cv_header_winsock2_h" = yes; then | |
18009 | HAVE_WINSOCK2_H=1 | |
18010 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
18011 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
18012 | else | |
18013 | HAVE_WINSOCK2_H=0 | |
18014 | fi | |
8690e634 | 18015 | |
6ec2e0f5 | 18016 | |
c0c3707f CB |
18017 | if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then |
18018 | REPLACE_CLOSE=1 | |
18019 | fi | |
6ec2e0f5 SDJ |
18020 | |
18021 | ||
c0c3707f | 18022 | if test $REPLACE_CLOSE = 0; then |
6ec2e0f5 SDJ |
18023 | |
18024 | ||
6ec2e0f5 | 18025 | |
c0c3707f CB |
18026 | if test $ac_cv_func_fchdir = no; then |
18027 | HAVE_FCHDIR=0 | |
18028 | fi | |
6ec2e0f5 | 18029 | |
c0c3707f CB |
18030 | if test $HAVE_FCHDIR = 0; then |
18031 | REPLACE_CLOSE=1 | |
18032 | fi | |
18033 | fi | |
6ec2e0f5 SDJ |
18034 | |
18035 | ||
c0c3707f | 18036 | if test $REPLACE_CLOSE = 1; then |
6ec2e0f5 SDJ |
18037 | |
18038 | ||
18039 | ||
18040 | ||
18041 | ||
6ec2e0f5 SDJ |
18042 | |
18043 | ||
18044 | ||
c0c3707f | 18045 | gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" |
6ec2e0f5 | 18046 | |
c0c3707f | 18047 | fi |
6ec2e0f5 | 18048 | |
6ec2e0f5 SDJ |
18049 | |
18050 | ||
18051 | ||
18052 | ||
c0c3707f | 18053 | GNULIB_CLOSE=1 |
6ec2e0f5 | 18054 | |
6ec2e0f5 | 18055 | |
6ec2e0f5 SDJ |
18056 | |
18057 | ||
18058 | ||
c0c3707f | 18059 | $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h |
6ec2e0f5 SDJ |
18060 | |
18061 | ||
18062 | ||
18063 | ||
18064 | ||
c0c3707f CB |
18065 | |
18066 | for ac_func in closedir | |
18067 | do : | |
18068 | ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" | |
18069 | if test "x$ac_cv_func_closedir" = xyes; then : | |
18070 | cat >>confdefs.h <<_ACEOF | |
18071 | #define HAVE_CLOSEDIR 1 | |
18072 | _ACEOF | |
18073 | ||
18074 | fi | |
18075 | done | |
18076 | ||
18077 | if test $ac_cv_func_closedir = no; then | |
18078 | HAVE_CLOSEDIR=0 | |
18079 | fi | |
6ec2e0f5 | 18080 | |
8690e634 JK |
18081 | |
18082 | ||
8690e634 | 18083 | |
c0c3707f CB |
18084 | if test $ac_cv_func_fchdir = no; then |
18085 | HAVE_FCHDIR=0 | |
6ec2e0f5 | 18086 | fi |
6a29c58e | 18087 | |
c0c3707f CB |
18088 | if test $HAVE_FCHDIR = 0; then |
18089 | if test $HAVE_CLOSEDIR = 1; then | |
18090 | REPLACE_CLOSEDIR=1 | |
18091 | fi | |
18092 | fi | |
6a29c58e | 18093 | |
c0c3707f CB |
18094 | case $host_os,$HAVE_CLOSEDIR in |
18095 | os2*,1) | |
18096 | REPLACE_CLOSEDIR=1;; | |
18097 | esac | |
d0ac1c44 | 18098 | |
c0c3707f | 18099 | if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then |
d0ac1c44 SM |
18100 | |
18101 | ||
d0ac1c44 SM |
18102 | |
18103 | ||
6a29c58e YQ |
18104 | |
18105 | ||
3d99e817 | 18106 | |
6ec2e0f5 | 18107 | |
c0c3707f | 18108 | gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" |
6ec2e0f5 | 18109 | |
6ec2e0f5 SDJ |
18110 | fi |
18111 | ||
18112 | ||
6ec2e0f5 SDJ |
18113 | |
18114 | ||
3d99e817 | 18115 | |
c0c3707f | 18116 | GNULIB_CLOSEDIR=1 |
3d99e817 AK |
18117 | |
18118 | ||
18119 | ||
18120 | ||
18121 | ||
c0c3707f | 18122 | $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h |
3d99e817 AK |
18123 | |
18124 | ||
18125 | ||
698be2d8 CB |
18126 | |
18127 | ||
18128 | ||
18129 | ||
18130 | ||
18131 | ||
18132 | ||
18133 | ||
18134 | ||
18135 | ||
18136 | ||
18137 | if test $gl_cv_have_include_next = yes; then | |
18138 | gl_cv_next_ctype_h='<'ctype.h'>' | |
18139 | else | |
18140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5 | |
18141 | $as_echo_n "checking absolute name of <ctype.h>... " >&6; } | |
18142 | if ${gl_cv_next_ctype_h+:} false; then : | |
18143 | $as_echo_n "(cached) " >&6 | |
18144 | else | |
18145 | ||
18146 | ||
18147 | ||
18148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18149 | /* end confdefs.h. */ | |
18150 | #include <ctype.h> | |
18151 | _ACEOF | |
18152 | case "$host_os" in | |
18153 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18154 | *) gl_absname_cpp="$ac_cpp" ;; | |
18155 | esac | |
18156 | ||
18157 | case "$host_os" in | |
18158 | mingw*) | |
18159 | gl_dirsep_regex='[/\\]' | |
18160 | ;; | |
18161 | *) | |
18162 | gl_dirsep_regex='\/' | |
18163 | ;; | |
18164 | esac | |
18165 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
18166 | gl_header_literal_regex=`echo 'ctype.h' \ | |
18167 | | sed -e "$gl_make_literal_regex_sed"` | |
18168 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18169 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18170 | s|^/[^/]|//&| | |
18171 | p | |
18172 | q | |
18173 | }' | |
18174 | ||
18175 | gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18176 | sed -n "$gl_absolute_header_sed"` | |
18177 | ||
18178 | gl_header=$gl_cv_absolute_ctype_h | |
18179 | gl_cv_next_ctype_h='"'$gl_header'"' | |
18180 | ||
18181 | ||
18182 | fi | |
18183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5 | |
18184 | $as_echo "$gl_cv_next_ctype_h" >&6; } | |
18185 | fi | |
18186 | NEXT_CTYPE_H=$gl_cv_next_ctype_h | |
18187 | ||
18188 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
18189 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18190 | gl_next_as_first_directive='<'ctype.h'>' | |
18191 | else | |
18192 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18193 | gl_next_as_first_directive=$gl_cv_next_ctype_h | |
18194 | fi | |
18195 | NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive | |
18196 | ||
18197 | ||
18198 | ||
18199 | ||
18200 | ||
18201 | ||
18202 | ||
18203 | ||
18204 | ||
c0c3707f CB |
18205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 |
18206 | $as_echo_n "checking for d_ino member in directory struct... " >&6; } | |
18207 | if ${gl_cv_struct_dirent_d_ino+:} false; then : | |
6ec2e0f5 SDJ |
18208 | $as_echo_n "(cached) " >&6 |
18209 | else | |
18210 | if test "$cross_compiling" = yes; then : | |
18211 | case "$host_os" in | |
c0c3707f CB |
18212 | # Guess yes on glibc systems with Linux kernel. |
18213 | linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; | |
18214 | # Guess yes on musl systems with Linux kernel. | |
18215 | linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;; | |
18216 | # Guess no on native Windows. | |
18217 | mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; | |
18218 | # If we don't know, obey --enable-cross-guesses. | |
18219 | *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;; | |
18220 | esac | |
3d99e817 | 18221 | |
6ec2e0f5 SDJ |
18222 | else |
18223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18224 | /* end confdefs.h. */ | |
c0c3707f CB |
18225 | #include <sys/types.h> |
18226 | #include <sys/stat.h> | |
18227 | #include <dirent.h> | |
3d99e817 | 18228 | |
6ec2e0f5 SDJ |
18229 | int |
18230 | main () | |
18231 | { | |
c0c3707f CB |
18232 | DIR *dp = opendir ("."); |
18233 | struct dirent *e; | |
18234 | struct stat st; | |
18235 | if (! dp) | |
18236 | return 1; | |
18237 | e = readdir (dp); | |
18238 | if (! e) | |
18239 | { closedir (dp); return 2; } | |
18240 | if (lstat (e->d_name, &st) != 0) | |
18241 | { closedir (dp); return 3; } | |
18242 | if (e->d_ino != st.st_ino) | |
18243 | { closedir (dp); return 4; } | |
18244 | closedir (dp); | |
18245 | return 0; | |
18246 | ||
6ec2e0f5 SDJ |
18247 | ; |
18248 | return 0; | |
18249 | } | |
3d99e817 | 18250 | _ACEOF |
6ec2e0f5 | 18251 | if ac_fn_c_try_run "$LINENO"; then : |
c0c3707f CB |
18252 | gl_cv_struct_dirent_d_ino=yes |
18253 | else | |
18254 | gl_cv_struct_dirent_d_ino=no | |
18255 | fi | |
18256 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18257 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18258 | fi | |
18259 | ||
18260 | fi | |
18261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 | |
18262 | $as_echo "$gl_cv_struct_dirent_d_ino" >&6; } | |
18263 | case "$gl_cv_struct_dirent_d_ino" in | |
18264 | *yes) | |
18265 | ||
18266 | $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h | |
18267 | ||
18268 | ;; | |
18269 | esac | |
18270 | ||
18271 | ||
18272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 | |
18273 | $as_echo_n "checking for d_type member in directory struct... " >&6; } | |
18274 | if ${gl_cv_struct_dirent_d_type+:} false; then : | |
18275 | $as_echo_n "(cached) " >&6 | |
18276 | else | |
18277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18278 | /* end confdefs.h. */ | |
18279 | ||
18280 | #include <sys/types.h> | |
18281 | #include <dirent.h> | |
18282 | ||
18283 | int | |
18284 | main () | |
18285 | { | |
18286 | struct dirent dp; dp.d_type = 0; | |
18287 | ; | |
18288 | return 0; | |
18289 | } | |
18290 | _ACEOF | |
18291 | if ac_fn_c_try_link "$LINENO"; then : | |
18292 | gl_cv_struct_dirent_d_type=yes | |
6ec2e0f5 | 18293 | else |
c0c3707f | 18294 | gl_cv_struct_dirent_d_type=no |
3d99e817 | 18295 | fi |
c0c3707f CB |
18296 | rm -f core conftest.err conftest.$ac_objext \ |
18297 | conftest$ac_exeext conftest.$ac_ext | |
3d99e817 | 18298 | |
3d99e817 | 18299 | |
c0c3707f CB |
18300 | fi |
18301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 | |
18302 | $as_echo "$gl_cv_struct_dirent_d_type" >&6; } | |
18303 | if test $gl_cv_struct_dirent_d_type = yes; then | |
3d99e817 | 18304 | |
c0c3707f | 18305 | $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h |
3d99e817 | 18306 | |
c0c3707f | 18307 | fi |
3d99e817 | 18308 | |
0750520d | 18309 | |
0750520d | 18310 | |
0750520d | 18311 | |
0750520d PA |
18312 | |
18313 | ||
0750520d | 18314 | |
0750520d | 18315 | |
0750520d | 18316 | |
0750520d | 18317 | |
0750520d | 18318 | |
0750520d | 18319 | |
0750520d | 18320 | |
0750520d | 18321 | |
c0c3707f CB |
18322 | if test $gl_cv_have_include_next = yes; then |
18323 | gl_cv_next_dirent_h='<'dirent.h'>' | |
18324 | else | |
18325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 | |
18326 | $as_echo_n "checking absolute name of <dirent.h>... " >&6; } | |
18327 | if ${gl_cv_next_dirent_h+:} false; then : | |
18328 | $as_echo_n "(cached) " >&6 | |
18329 | else | |
0750520d | 18330 | |
c0c3707f | 18331 | if test $ac_cv_header_dirent_h = yes; then |
6ec2e0f5 | 18332 | |
472fa5ee SM |
18333 | |
18334 | ||
18335 | ||
c0c3707f CB |
18336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18337 | /* end confdefs.h. */ | |
18338 | #include <dirent.h> | |
18339 | _ACEOF | |
18340 | case "$host_os" in | |
18341 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18342 | *) gl_absname_cpp="$ac_cpp" ;; | |
18343 | esac | |
472fa5ee | 18344 | |
c0c3707f CB |
18345 | case "$host_os" in |
18346 | mingw*) | |
18347 | gl_dirsep_regex='[/\\]' | |
18348 | ;; | |
18349 | *) | |
18350 | gl_dirsep_regex='\/' | |
18351 | ;; | |
18352 | esac | |
18353 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
18354 | gl_header_literal_regex=`echo 'dirent.h' \ | |
18355 | | sed -e "$gl_make_literal_regex_sed"` | |
18356 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18357 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18358 | s|^/[^/]|//&| | |
18359 | p | |
18360 | q | |
18361 | }' | |
472fa5ee | 18362 | |
c0c3707f CB |
18363 | gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
18364 | sed -n "$gl_absolute_header_sed"` | |
6ec2e0f5 | 18365 | |
c0c3707f CB |
18366 | gl_header=$gl_cv_absolute_dirent_h |
18367 | gl_cv_next_dirent_h='"'$gl_header'"' | |
18368 | else | |
18369 | gl_cv_next_dirent_h='<'dirent.h'>' | |
18370 | fi | |
6ec2e0f5 SDJ |
18371 | |
18372 | ||
c0c3707f CB |
18373 | fi |
18374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 | |
18375 | $as_echo "$gl_cv_next_dirent_h" >&6; } | |
18376 | fi | |
18377 | NEXT_DIRENT_H=$gl_cv_next_dirent_h | |
472fa5ee | 18378 | |
c0c3707f CB |
18379 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18380 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18381 | gl_next_as_first_directive='<'dirent.h'>' | |
18382 | else | |
18383 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18384 | gl_next_as_first_directive=$gl_cv_next_dirent_h | |
18385 | fi | |
18386 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive | |
472fa5ee SM |
18387 | |
18388 | ||
18389 | ||
18390 | ||
c0c3707f CB |
18391 | if test $ac_cv_header_dirent_h = yes; then |
18392 | HAVE_DIRENT_H=1 | |
6ec2e0f5 | 18393 | else |
c0c3707f | 18394 | HAVE_DIRENT_H=0 |
6ec2e0f5 SDJ |
18395 | fi |
18396 | ||
6ec2e0f5 | 18397 | |
0750520d | 18398 | |
0750520d | 18399 | |
0750520d | 18400 | |
472fa5ee SM |
18401 | |
18402 | ||
18403 | ||
18404 | ||
18405 | ||
0750520d | 18406 | |
c0c3707f CB |
18407 | for ac_func in dirfd |
18408 | do : | |
18409 | ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" | |
18410 | if test "x$ac_cv_func_dirfd" = xyes; then : | |
18411 | cat >>confdefs.h <<_ACEOF | |
18412 | #define HAVE_DIRFD 1 | |
18413 | _ACEOF | |
0750520d | 18414 | |
c0c3707f CB |
18415 | fi |
18416 | done | |
0750520d | 18417 | |
c0c3707f CB |
18418 | ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h> |
18419 | #include <dirent.h> | |
18420 | " | |
18421 | if test "x$ac_cv_have_decl_dirfd" = xyes; then : | |
18422 | ac_have_decl=1 | |
8690e634 | 18423 | else |
c0c3707f CB |
18424 | ac_have_decl=0 |
18425 | fi | |
8690e634 | 18426 | |
c0c3707f CB |
18427 | cat >>confdefs.h <<_ACEOF |
18428 | #define HAVE_DECL_DIRFD $ac_have_decl | |
18429 | _ACEOF | |
49e4877c | 18430 | |
c0c3707f CB |
18431 | if test $ac_cv_have_decl_dirfd = no; then |
18432 | HAVE_DECL_DIRFD=0 | |
18433 | fi | |
8690e634 | 18434 | |
c0c3707f CB |
18435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 |
18436 | $as_echo_n "checking whether dirfd is a macro... " >&6; } | |
18437 | if ${gl_cv_func_dirfd_macro+:} false; then : | |
18438 | $as_echo_n "(cached) " >&6 | |
18439 | else | |
6ec2e0f5 SDJ |
18440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18441 | /* end confdefs.h. */ | |
8690e634 | 18442 | |
c0c3707f CB |
18443 | #include <sys/types.h> |
18444 | #include <dirent.h> | |
18445 | #ifdef dirfd | |
18446 | dirent_header_defines_dirfd | |
6ec2e0f5 | 18447 | #endif |
8690e634 | 18448 | _ACEOF |
c0c3707f CB |
18449 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
18450 | $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : | |
18451 | gl_cv_func_dirfd_macro=yes | |
6ec2e0f5 | 18452 | else |
c0c3707f | 18453 | gl_cv_func_dirfd_macro=no |
6ec2e0f5 | 18454 | fi |
c0c3707f | 18455 | rm -f conftest* |
472fa5ee | 18456 | |
c0c3707f CB |
18457 | fi |
18458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 | |
18459 | $as_echo "$gl_cv_func_dirfd_macro" >&6; } | |
472fa5ee | 18460 | |
c0c3707f CB |
18461 | # Use the replacement if we have no function or macro with that name, |
18462 | # or if OS/2 kLIBC whose dirfd() does not work. | |
18463 | # Replace only if the system declares dirfd already. | |
18464 | case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in | |
18465 | no,no,*,yes | *,*,os2*,yes) | |
18466 | REPLACE_DIRFD=1 | |
472fa5ee | 18467 | |
c0c3707f CB |
18468 | $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h |
18469 | ;; | |
18470 | esac | |
472fa5ee | 18471 | |
c0c3707f CB |
18472 | if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ |
18473 | || test $REPLACE_DIRFD = 1; then | |
6ec2e0f5 | 18474 | |
6ec2e0f5 SDJ |
18475 | |
18476 | ||
18477 | ||
18478 | ||
472fa5ee SM |
18479 | |
18480 | ||
18481 | ||
c0c3707f | 18482 | gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" |
472fa5ee SM |
18483 | |
18484 | ||
c0c3707f CB |
18485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 |
18486 | $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } | |
18487 | if ${gl_cv_sys_dir_fd_member_name+:} false; then : | |
18488 | $as_echo_n "(cached) " >&6 | |
18489 | else | |
6ec2e0f5 | 18490 | |
c0c3707f CB |
18491 | dirfd_save_CFLAGS=$CFLAGS |
18492 | for ac_expr in d_fd dd_fd; do | |
6ec2e0f5 | 18493 | |
c0c3707f CB |
18494 | CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" |
18495 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18496 | /* end confdefs.h. */ | |
6ec2e0f5 | 18497 | |
c0c3707f CB |
18498 | #include <sys/types.h> |
18499 | #include <dirent.h> | |
18500 | int | |
18501 | main () | |
18502 | { | |
18503 | DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; | |
18504 | ; | |
18505 | return 0; | |
18506 | } | |
18507 | _ACEOF | |
18508 | if ac_fn_c_try_compile "$LINENO"; then : | |
18509 | dir_fd_found=yes | |
6ec2e0f5 | 18510 | |
c0c3707f CB |
18511 | fi |
18512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18513 | CFLAGS=$dirfd_save_CFLAGS | |
18514 | test "$dir_fd_found" = yes && break | |
18515 | done | |
18516 | test "$dir_fd_found" = yes || ac_expr=no_such_member | |
472fa5ee | 18517 | |
c0c3707f | 18518 | gl_cv_sys_dir_fd_member_name=$ac_expr |
472fa5ee SM |
18519 | |
18520 | ||
c0c3707f CB |
18521 | fi |
18522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 | |
18523 | $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } | |
18524 | if test $gl_cv_sys_dir_fd_member_name != no_such_member; then | |
472fa5ee | 18525 | |
c0c3707f CB |
18526 | cat >>confdefs.h <<_ACEOF |
18527 | #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name | |
18528 | _ACEOF | |
472fa5ee | 18529 | |
6ec2e0f5 SDJ |
18530 | fi |
18531 | ||
6ec2e0f5 | 18532 | |
c0c3707f | 18533 | fi |
6ec2e0f5 SDJ |
18534 | |
18535 | ||
18536 | ||
18537 | ||
18538 | ||
c0c3707f | 18539 | GNULIB_DIRFD=1 |
6ec2e0f5 SDJ |
18540 | |
18541 | ||
18542 | ||
6ec2e0f5 | 18543 | |
8690e634 | 18544 | |
c0c3707f | 18545 | $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h |
8690e634 JK |
18546 | |
18547 | ||
8690e634 JK |
18548 | |
18549 | ||
18550 | ||
c0c3707f CB |
18551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 |
18552 | $as_echo_n "checking whether // is distinct from /... " >&6; } | |
18553 | if ${gl_cv_double_slash_root+:} false; then : | |
18554 | $as_echo_n "(cached) " >&6 | |
18555 | else | |
18556 | if test x"$cross_compiling" = xyes ; then | |
18557 | # When cross-compiling, there is no way to tell whether // is special | |
18558 | # short of a list of hosts. However, the only known hosts to date | |
18559 | # that have a distinct // are Apollo DomainOS (too old to port to), | |
18560 | # Cygwin, and z/OS. If anyone knows of another system for which // has | |
18561 | # special semantics and is distinct from /, please report it to | |
18562 | # <bug-gnulib@gnu.org>. | |
18563 | case $host in | |
18564 | *-cygwin | i370-ibm-openedition) | |
18565 | gl_cv_double_slash_root=yes ;; | |
18566 | *) | |
18567 | # Be optimistic and assume that / and // are the same when we | |
18568 | # don't know. | |
18569 | gl_cv_double_slash_root='unknown, assuming no' ;; | |
18570 | esac | |
18571 | else | |
18572 | set x `ls -di / // 2>/dev/null` | |
18573 | if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then | |
18574 | gl_cv_double_slash_root=no | |
18575 | else | |
18576 | gl_cv_double_slash_root=yes | |
18577 | fi | |
18578 | fi | |
18579 | fi | |
18580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 | |
18581 | $as_echo "$gl_cv_double_slash_root" >&6; } | |
18582 | if test "$gl_cv_double_slash_root" = yes; then | |
6ec2e0f5 | 18583 | |
c0c3707f | 18584 | $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h |
8690e634 | 18585 | |
c0c3707f | 18586 | fi |
8690e634 | 18587 | |
63ce7108 TT |
18588 | |
18589 | ||
18590 | ||
18591 | ||
c0c3707f CB |
18592 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
18593 | REPLACE_DUP=1 | |
18594 | fi | |
8690e634 JK |
18595 | |
18596 | ||
18597 | ||
18598 | ||
18599 | ||
c0c3707f CB |
18600 | if test $ac_cv_func_fchdir = no; then |
18601 | HAVE_FCHDIR=0 | |
18602 | fi | |
8690e634 | 18603 | |
c0c3707f CB |
18604 | if test $HAVE_FCHDIR = 0; then |
18605 | REPLACE_DUP=1 | |
18606 | fi | |
8690e634 | 18607 | |
c0c3707f CB |
18608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5 |
18609 | $as_echo_n "checking whether dup works... " >&6; } | |
18610 | if ${gl_cv_func_dup_works+:} false; then : | |
8690e634 JK |
18611 | $as_echo_n "(cached) " >&6 |
18612 | else | |
c0c3707f CB |
18613 | if test "$cross_compiling" = yes; then : |
18614 | case "$host_os" in | |
18615 | # Guess no on native Windows. | |
18616 | mingw*) gl_cv_func_dup_works="guessing no" ;; | |
18617 | *) gl_cv_func_dup_works="guessing yes" ;; | |
18618 | esac | |
8690e634 | 18619 | |
c0c3707f | 18620 | else |
4a626d0a | 18621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 | 18622 | /* end confdefs.h. */ |
c0c3707f CB |
18623 | #include <unistd.h> |
18624 | #include <fcntl.h> | |
18625 | #include <errno.h> | |
9c9d63b1 PM |
18626 | |
18627 | ||
18628 | $gl_mda_defines | |
18629 | ||
c0c3707f CB |
18630 | int |
18631 | main () | |
18632 | { | |
18633 | /* On OS/2 kLIBC, dup does not work on a directory fd. */ | |
18634 | int fd = open (".", O_RDONLY); | |
18635 | return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0; | |
8690e634 | 18636 | |
c0c3707f CB |
18637 | ; |
18638 | return 0; | |
18639 | } | |
8690e634 | 18640 | |
c0c3707f CB |
18641 | _ACEOF |
18642 | if ac_fn_c_try_run "$LINENO"; then : | |
18643 | gl_cv_func_dup_works=yes | |
18644 | else | |
18645 | gl_cv_func_dup_works=no | |
18646 | fi | |
18647 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18648 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8690e634 | 18649 | fi |
8690e634 | 18650 | |
8690e634 | 18651 | |
c0c3707f CB |
18652 | fi |
18653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5 | |
18654 | $as_echo "$gl_cv_func_dup_works" >&6; } | |
18655 | case "$gl_cv_func_dup_works" in | |
18656 | *yes) ;; | |
18657 | *) | |
18658 | REPLACE_DUP=1 | |
18659 | ;; | |
18660 | esac | |
8690e634 | 18661 | |
c0c3707f | 18662 | if test $REPLACE_DUP = 1; then |
8690e634 JK |
18663 | |
18664 | ||
18665 | ||
18666 | ||
6ec2e0f5 SDJ |
18667 | |
18668 | ||
18669 | ||
18670 | ||
c0c3707f | 18671 | gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" |
8690e634 | 18672 | |
c0c3707f CB |
18673 | : |
18674 | fi | |
8690e634 | 18675 | |
5e8754f9 | 18676 | |
8690e634 JK |
18677 | |
18678 | ||
8839a007 | 18679 | |
c0c3707f | 18680 | GNULIB_DUP=1 |
63ce7108 | 18681 | |
63ce7108 | 18682 | |
63ce7108 | 18683 | |
6ec2e0f5 | 18684 | |
6ec2e0f5 | 18685 | |
c0c3707f | 18686 | $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h |
6ec2e0f5 | 18687 | |
63ce7108 TT |
18688 | |
18689 | ||
472fa5ee SM |
18690 | |
18691 | ||
18692 | ||
9c9d63b1 | 18693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 |
c0c3707f CB |
18694 | $as_echo_n "checking whether dup2 works... " >&6; } |
18695 | if ${gl_cv_func_dup2_works+:} false; then : | |
6ec2e0f5 SDJ |
18696 | $as_echo_n "(cached) " >&6 |
18697 | else | |
18698 | if test "$cross_compiling" = yes; then : | |
18699 | case "$host_os" in | |
9c9d63b1 PM |
18700 | mingw*) # on this platform, dup2 always returns 0 for success |
18701 | gl_cv_func_dup2_works="guessing no" ;; | |
18702 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
18703 | gl_cv_func_dup2_works="guessing no" ;; | |
18704 | aix* | freebsd*) | |
18705 | # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, | |
18706 | # not EBADF. | |
18707 | gl_cv_func_dup2_works="guessing no" ;; | |
18708 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
18709 | gl_cv_func_dup2_works="guessing no" ;; | |
18710 | *-android*) # implemented using dup3(), which fails if oldfd == newfd | |
18711 | gl_cv_func_dup2_works="guessing no" ;; | |
18712 | os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. | |
18713 | gl_cv_func_dup2_works="guessing no" ;; | |
18714 | *) gl_cv_func_dup2_works="guessing yes" ;; | |
18715 | esac | |
63ce7108 TT |
18716 | else |
18717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18718 | /* end confdefs.h. */ | |
18719 | ||
9c9d63b1 PM |
18720 | #include <errno.h> |
18721 | #include <fcntl.h> | |
18722 | #include <limits.h> | |
18723 | #include <sys/resource.h> | |
18724 | #include <unistd.h> | |
18725 | ||
18726 | ||
18727 | $gl_mda_defines | |
18728 | ||
18729 | #ifndef RLIM_SAVED_CUR | |
18730 | # define RLIM_SAVED_CUR RLIM_INFINITY | |
18731 | #endif | |
18732 | #ifndef RLIM_SAVED_MAX | |
18733 | # define RLIM_SAVED_MAX RLIM_INFINITY | |
18734 | #endif | |
63ce7108 TT |
18735 | |
18736 | int | |
18737 | main () | |
18738 | { | |
6ec2e0f5 | 18739 | int result = 0; |
9c9d63b1 PM |
18740 | int bad_fd = INT_MAX; |
18741 | struct rlimit rlim; | |
18742 | if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 | |
18743 | && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX | |
18744 | && rlim.rlim_cur != RLIM_INFINITY | |
18745 | && rlim.rlim_cur != RLIM_SAVED_MAX | |
18746 | && rlim.rlim_cur != RLIM_SAVED_CUR) | |
18747 | bad_fd = rlim.rlim_cur; | |
18748 | #ifdef FD_CLOEXEC | |
18749 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
18750 | result |= 1; | |
18751 | #endif | |
18752 | if (dup2 (1, 1) != 1) | |
18753 | result |= 2; | |
18754 | #ifdef FD_CLOEXEC | |
18755 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
18756 | result |= 4; | |
18757 | #endif | |
18758 | close (0); | |
18759 | if (dup2 (0, 0) != -1) | |
18760 | result |= 8; | |
18761 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
18762 | if (dup2 (2, bad_fd) == -1 && errno != EBADF) | |
18763 | result |= 16; | |
18764 | /* Flush out some cygwin core dumps. */ | |
18765 | if (dup2 (2, -1) != -1 || errno != EBADF) | |
18766 | result |= 32; | |
18767 | dup2 (2, 255); | |
18768 | dup2 (2, 256); | |
18769 | /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ | |
18770 | { | |
18771 | int fd = open (".", O_RDONLY); | |
18772 | if (fd == -1) | |
18773 | result |= 64; | |
18774 | else if (dup2 (fd, fd + 1) == -1) | |
18775 | result |= 128; | |
18776 | close (fd); | |
18777 | } | |
18778 | return result; | |
63ce7108 TT |
18779 | ; |
18780 | return 0; | |
18781 | } | |
c0c3707f | 18782 | |
63ce7108 TT |
18783 | _ACEOF |
18784 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 18785 | gl_cv_func_dup2_works=yes |
63ce7108 | 18786 | else |
c0c3707f | 18787 | gl_cv_func_dup2_works=no |
63ce7108 TT |
18788 | fi |
18789 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18790 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18791 | fi | |
18792 | ||
c0c3707f | 18793 | |
63ce7108 | 18794 | fi |
c0c3707f CB |
18795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
18796 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
9c9d63b1 PM |
18797 | case "$gl_cv_func_dup2_works" in |
18798 | *yes) ;; | |
18799 | *) | |
18800 | REPLACE_DUP2=1 | |
18801 | for ac_func in setdtablesize | |
c0c3707f CB |
18802 | do : |
18803 | ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" | |
18804 | if test "x$ac_cv_func_setdtablesize" = xyes; then : | |
18805 | cat >>confdefs.h <<_ACEOF | |
18806 | #define HAVE_SETDTABLESIZE 1 | |
18807 | _ACEOF | |
18808 | ||
18809 | fi | |
18810 | done | |
18811 | ||
9c9d63b1 PM |
18812 | ;; |
18813 | esac | |
63ce7108 | 18814 | |
09607c9e TT |
18815 | |
18816 | ||
18817 | ||
c0c3707f CB |
18818 | if test $ac_cv_func_fchdir = no; then |
18819 | HAVE_FCHDIR=0 | |
18820 | fi | |
4a626d0a | 18821 | |
c0c3707f | 18822 | if test $HAVE_FCHDIR = 0; then |
9c9d63b1 | 18823 | REPLACE_DUP2=1 |
c0c3707f | 18824 | fi |
4a626d0a PA |
18825 | |
18826 | ||
9c9d63b1 | 18827 | if test $REPLACE_DUP2 = 1; then |
4a626d0a PA |
18828 | |
18829 | ||
18830 | ||
18831 | ||
18832 | ||
18833 | ||
4a626d0a | 18834 | |
4a626d0a | 18835 | |
c0c3707f | 18836 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
4a626d0a PA |
18837 | |
18838 | ||
c0c3707f | 18839 | fi |
4a626d0a PA |
18840 | |
18841 | ||
18842 | ||
18843 | ||
18844 | ||
c0c3707f | 18845 | GNULIB_DUP2=1 |
4a626d0a PA |
18846 | |
18847 | ||
18848 | ||
18849 | ||
09607c9e | 18850 | |
c0c3707f | 18851 | $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h |
09607c9e TT |
18852 | |
18853 | ||
472fa5ee SM |
18854 | |
18855 | ||
18856 | ||
18857 | ||
18858 | ||
09607c9e | 18859 | |
6ec2e0f5 | 18860 | |
c0c3707f | 18861 | GNULIB_ENVIRON=1 |
6ec2e0f5 | 18862 | |
09607c9e | 18863 | |
09607c9e | 18864 | |
6ec2e0f5 SDJ |
18865 | |
18866 | ||
c0c3707f | 18867 | $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h |
6ec2e0f5 SDJ |
18868 | |
18869 | ||
6ec2e0f5 | 18870 | |
5e8754f9 | 18871 | |
6ec2e0f5 | 18872 | |
c0c3707f CB |
18873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 |
18874 | $as_echo_n "checking for error_at_line... " >&6; } | |
18875 | if ${ac_cv_lib_error_at_line+:} false; then : | |
09607c9e | 18876 | $as_echo_n "(cached) " >&6 |
4a626d0a PA |
18877 | else |
18878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18879 | /* end confdefs.h. */ | |
c0c3707f CB |
18880 | #include <error.h> |
18881 | int | |
18882 | main () | |
18883 | { | |
18884 | error_at_line (0, 0, "", 0, "an error occurred"); | |
18885 | ; | |
4a626d0a PA |
18886 | return 0; |
18887 | } | |
18888 | _ACEOF | |
c0c3707f CB |
18889 | if ac_fn_c_try_link "$LINENO"; then : |
18890 | ac_cv_lib_error_at_line=yes | |
4a626d0a | 18891 | else |
c0c3707f | 18892 | ac_cv_lib_error_at_line=no |
6ec2e0f5 | 18893 | fi |
c0c3707f CB |
18894 | rm -f core conftest.err conftest.$ac_objext \ |
18895 | conftest$ac_exeext conftest.$ac_ext | |
6ec2e0f5 | 18896 | fi |
c0c3707f CB |
18897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 |
18898 | $as_echo "$ac_cv_lib_error_at_line" >&6; } | |
09607c9e | 18899 | |
c0c3707f | 18900 | if test $ac_cv_lib_error_at_line = no; then |
09607c9e TT |
18901 | |
18902 | ||
18903 | ||
18904 | ||
18905 | ||
18906 | ||
18907 | ||
18908 | ||
c0c3707f | 18909 | gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" |
09607c9e | 18910 | |
4a626d0a | 18911 | |
09607c9e | 18912 | |
c0c3707f | 18913 | : |
4a626d0a | 18914 | |
c0c3707f | 18915 | fi |
4a626d0a | 18916 | |
4a626d0a | 18917 | |
09607c9e | 18918 | |
09607c9e | 18919 | |
09607c9e TT |
18920 | |
18921 | ||
09607c9e | 18922 | |
c0c3707f CB |
18923 | if test $ac_cv_have_decl_fchdir = no; then |
18924 | HAVE_DECL_FCHDIR=0 | |
18925 | fi | |
09607c9e TT |
18926 | |
18927 | ||
c0c3707f | 18928 | if test $HAVE_FCHDIR = 0; then |
09607c9e TT |
18929 | |
18930 | ||
18931 | ||
c0c3707f CB |
18932 | |
18933 | ||
18934 | ||
18935 | ||
18936 | ||
18937 | gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" | |
18938 | ||
18939 | : | |
18940 | ||
18941 | $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h | |
18942 | ||
18943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 | |
18944 | $as_echo_n "checking whether open can visit directories... " >&6; } | |
18945 | if ${gl_cv_func_open_directory_works+:} false; then : | |
18946 | $as_echo_n "(cached) " >&6 | |
3d99e817 | 18947 | else |
c0c3707f CB |
18948 | if test "$cross_compiling" = yes; then : |
18949 | case "$host_os" in | |
9c9d63b1 PM |
18950 | # Guess yes on Linux systems. |
18951 | linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; | |
18952 | # Guess yes on glibc systems. | |
18953 | *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; | |
18954 | # Guess no on native Windows. | |
18955 | mingw*) gl_cv_func_open_directory_works="guessing no" ;; | |
18956 | # If we don't know, obey --enable-cross-guesses. | |
18957 | *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;; | |
18958 | esac | |
c0c3707f CB |
18959 | |
18960 | else | |
18961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18962 | /* end confdefs.h. */ | |
18963 | #include <fcntl.h> | |
18964 | ||
9c9d63b1 PM |
18965 | |
18966 | $gl_mda_defines | |
18967 | ||
c0c3707f CB |
18968 | int |
18969 | main () | |
18970 | { | |
18971 | return open(".", O_RDONLY) < 0; | |
18972 | ; | |
18973 | return 0; | |
18974 | } | |
18975 | _ACEOF | |
18976 | if ac_fn_c_try_run "$LINENO"; then : | |
18977 | gl_cv_func_open_directory_works=yes | |
18978 | else | |
18979 | gl_cv_func_open_directory_works=no | |
18980 | fi | |
18981 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18982 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3d99e817 AK |
18983 | fi |
18984 | ||
c0c3707f CB |
18985 | fi |
18986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 | |
18987 | $as_echo "$gl_cv_func_open_directory_works" >&6; } | |
18988 | case "$gl_cv_func_open_directory_works" in | |
18989 | *yes) ;; | |
18990 | *) | |
3d99e817 | 18991 | |
c0c3707f | 18992 | $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h |
09607c9e | 18993 | |
c0c3707f CB |
18994 | ;; |
18995 | esac | |
18996 | fi | |
8690e634 | 18997 | |
8690e634 | 18998 | |
8690e634 | 18999 | |
8690e634 | 19000 | |
8690e634 | 19001 | |
6ec2e0f5 | 19002 | |
c0c3707f | 19003 | GNULIB_FCHDIR=1 |
6ec2e0f5 SDJ |
19004 | |
19005 | ||
6ec2e0f5 | 19006 | |
8690e634 JK |
19007 | |
19008 | ||
c0c3707f | 19009 | $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h |
8690e634 JK |
19010 | |
19011 | ||
19012 | ||
6ec2e0f5 SDJ |
19013 | |
19014 | ||
19015 | ||
6ec2e0f5 | 19016 | |
8690e634 | 19017 | |
c0c3707f | 19018 | if test $ac_cv_func_fcntl = no; then |
8690e634 JK |
19019 | |
19020 | ||
6ec2e0f5 | 19021 | |
c0c3707f CB |
19022 | if test $ac_cv_func_fcntl = no; then |
19023 | HAVE_FCNTL=0 | |
19024 | else | |
19025 | REPLACE_FCNTL=1 | |
19026 | fi | |
5e8754f9 | 19027 | |
c0c3707f CB |
19028 | else |
19029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 | |
19030 | $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } | |
19031 | if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : | |
8690e634 | 19032 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 19033 | else |
c0c3707f CB |
19034 | if test "$cross_compiling" = yes; then : |
19035 | case $host_os in | |
19036 | aix* | cygwin* | haiku*) | |
19037 | gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; | |
19038 | *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; | |
19039 | esac | |
19040 | else | |
19041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19042 | /* end confdefs.h. */ | |
19043 | #include <errno.h> | |
19044 | #include <fcntl.h> | |
19045 | #include <limits.h> | |
19046 | #include <sys/resource.h> | |
19047 | #include <unistd.h> | |
9c9d63b1 PM |
19048 | |
19049 | ||
19050 | $gl_mda_defines | |
19051 | ||
c0c3707f CB |
19052 | #ifndef RLIM_SAVED_CUR |
19053 | # define RLIM_SAVED_CUR RLIM_INFINITY | |
19054 | #endif | |
19055 | #ifndef RLIM_SAVED_MAX | |
19056 | # define RLIM_SAVED_MAX RLIM_INFINITY | |
19057 | #endif | |
19058 | ||
19059 | int | |
19060 | main () | |
19061 | { | |
19062 | int result = 0; | |
19063 | int bad_fd = INT_MAX; | |
19064 | struct rlimit rlim; | |
19065 | if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 | |
19066 | && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX | |
19067 | && rlim.rlim_cur != RLIM_INFINITY | |
19068 | && rlim.rlim_cur != RLIM_SAVED_MAX | |
19069 | && rlim.rlim_cur != RLIM_SAVED_CUR) | |
19070 | bad_fd = rlim.rlim_cur; | |
19071 | if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; | |
19072 | if (errno != EINVAL) result |= 2; | |
19073 | if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; | |
19074 | if (errno != EINVAL) result |= 8; | |
19075 | /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ | |
19076 | { | |
19077 | int fd; | |
19078 | fd = open (".", O_RDONLY); | |
19079 | if (fd == -1) | |
19080 | result |= 16; | |
19081 | else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) | |
19082 | result |= 32; | |
19083 | ||
19084 | close (fd); | |
19085 | } | |
19086 | return result; | |
19087 | ; | |
19088 | return 0; | |
19089 | } | |
19090 | _ACEOF | |
19091 | if ac_fn_c_try_run "$LINENO"; then : | |
19092 | gl_cv_func_fcntl_f_dupfd_works=yes | |
19093 | else | |
19094 | gl_cv_func_fcntl_f_dupfd_works=no | |
19095 | fi | |
19096 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19097 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19098 | fi | |
19099 | ||
19100 | fi | |
19101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 | |
19102 | $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } | |
19103 | case $gl_cv_func_fcntl_f_dupfd_works in | |
19104 | *yes) ;; | |
19105 | *) | |
19106 | ||
19107 | ||
19108 | if test $ac_cv_func_fcntl = no; then | |
19109 | HAVE_FCNTL=0 | |
19110 | else | |
19111 | REPLACE_FCNTL=1 | |
19112 | fi | |
19113 | ||
19114 | ||
19115 | $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h | |
19116 | ;; | |
19117 | esac | |
19118 | ||
9c9d63b1 | 19119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 |
c0c3707f CB |
19120 | $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } |
19121 | if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : | |
19122 | $as_echo_n "(cached) " >&6 | |
9c9d63b1 PM |
19123 | else |
19124 | if test "$cross_compiling" = yes; then : | |
19125 | case "$host_os" in | |
19126 | # Guess no on NetBSD. | |
19127 | netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;; | |
19128 | *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;; | |
19129 | esac | |
19130 | ||
8690e634 JK |
19131 | else |
19132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19133 | /* end confdefs.h. */ | |
c0c3707f | 19134 | #include <fcntl.h> |
9c9d63b1 PM |
19135 | #include <unistd.h> |
19136 | int main (int argc, char *argv[]) | |
19137 | { | |
19138 | if (argc == 1) | |
19139 | /* parent process */ | |
19140 | { | |
19141 | if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0) | |
19142 | return 1; | |
19143 | return execl ("./conftest", "./conftest", "child", NULL); | |
19144 | } | |
19145 | else | |
19146 | /* child process */ | |
19147 | return (fcntl (10, F_GETFL) < 0 ? 0 : 42); | |
19148 | } | |
c0c3707f | 19149 | |
c0c3707f | 19150 | |
c0c3707f | 19151 | _ACEOF |
9c9d63b1 | 19152 | if ac_fn_c_try_run "$LINENO"; then : |
c0c3707f CB |
19153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19154 | /* end confdefs.h. */ | |
19155 | ||
19156 | #ifdef __linux__ | |
19157 | /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace | |
19158 | it to support the semantics on older kernels that failed with EINVAL. */ | |
19159 | choke me | |
19160 | #endif | |
8690e634 | 19161 | |
8690e634 JK |
19162 | int |
19163 | main () | |
19164 | { | |
19165 | ||
19166 | ; | |
19167 | return 0; | |
19168 | } | |
19169 | _ACEOF | |
c0c3707f CB |
19170 | if ac_fn_c_try_compile "$LINENO"; then : |
19171 | gl_cv_func_fcntl_f_dupfd_cloexec=yes | |
8690e634 | 19172 | else |
c0c3707f | 19173 | gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" |
8690e634 | 19174 | fi |
c0c3707f | 19175 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9c9d63b1 | 19176 | |
c0c3707f CB |
19177 | else |
19178 | gl_cv_func_fcntl_f_dupfd_cloexec=no | |
19179 | fi | |
9c9d63b1 PM |
19180 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
19181 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19182 | fi | |
19183 | ||
19184 | ||
8690e634 | 19185 | fi |
c0c3707f CB |
19186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 |
19187 | $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } | |
9c9d63b1 PM |
19188 | case "$gl_cv_func_fcntl_f_dupfd_cloexec" in |
19189 | *yes) ;; | |
19190 | *) | |
8690e634 | 19191 | |
c0c3707f CB |
19192 | |
19193 | if test $ac_cv_func_fcntl = no; then | |
19194 | HAVE_FCNTL=0 | |
5e8754f9 | 19195 | else |
c0c3707f CB |
19196 | REPLACE_FCNTL=1 |
19197 | fi | |
19198 | ||
9c9d63b1 PM |
19199 | ;; |
19200 | esac | |
8690e634 JK |
19201 | fi |
19202 | ||
19203 | ||
8690e634 | 19204 | |
8690e634 | 19205 | |
c0c3707f CB |
19206 | if test $ac_cv_func_fchdir = no; then |
19207 | HAVE_FCHDIR=0 | |
19208 | fi | |
6ec2e0f5 | 19209 | |
c0c3707f | 19210 | if test $HAVE_FCHDIR = 0; then |
6ec2e0f5 SDJ |
19211 | |
19212 | ||
19213 | ||
c0c3707f CB |
19214 | if test $ac_cv_func_fcntl = no; then |
19215 | HAVE_FCNTL=0 | |
19216 | else | |
19217 | REPLACE_FCNTL=1 | |
19218 | fi | |
6ec2e0f5 | 19219 | |
c0c3707f | 19220 | fi |
6ec2e0f5 SDJ |
19221 | |
19222 | ||
c0c3707f | 19223 | if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then |
6ec2e0f5 | 19224 | |
6ec2e0f5 SDJ |
19225 | |
19226 | ||
5e8754f9 SDJ |
19227 | |
19228 | ||
8690e634 | 19229 | |
8690e634 JK |
19230 | |
19231 | ||
c0c3707f | 19232 | gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" |
472fa5ee | 19233 | |
c0c3707f | 19234 | fi |
472fa5ee SM |
19235 | |
19236 | ||
19237 | ||
19238 | ||
19239 | ||
c0c3707f | 19240 | GNULIB_FCNTL=1 |
472fa5ee SM |
19241 | |
19242 | ||
19243 | ||
19244 | ||
19245 | ||
c0c3707f | 19246 | $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h |
472fa5ee SM |
19247 | |
19248 | ||
19249 | ||
19250 | ||
19251 | ||
19252 | ||
19253 | ||
19254 | ||
19255 | ||
19256 | ||
19257 | ||
19258 | ||
19259 | ||
19260 | ||
c0c3707f CB |
19261 | if test $gl_cv_have_include_next = yes; then |
19262 | gl_cv_next_fcntl_h='<'fcntl.h'>' | |
19263 | else | |
19264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 | |
19265 | $as_echo_n "checking absolute name of <fcntl.h>... " >&6; } | |
19266 | if ${gl_cv_next_fcntl_h+:} false; then : | |
19267 | $as_echo_n "(cached) " >&6 | |
19268 | else | |
472fa5ee SM |
19269 | |
19270 | ||
472fa5ee | 19271 | |
c0c3707f CB |
19272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19273 | /* end confdefs.h. */ | |
19274 | #include <fcntl.h> | |
19275 | _ACEOF | |
19276 | case "$host_os" in | |
19277 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19278 | *) gl_absname_cpp="$ac_cpp" ;; | |
19279 | esac | |
472fa5ee | 19280 | |
c0c3707f CB |
19281 | case "$host_os" in |
19282 | mingw*) | |
19283 | gl_dirsep_regex='[/\\]' | |
19284 | ;; | |
19285 | *) | |
19286 | gl_dirsep_regex='\/' | |
19287 | ;; | |
19288 | esac | |
19289 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
19290 | gl_header_literal_regex=`echo 'fcntl.h' \ | |
19291 | | sed -e "$gl_make_literal_regex_sed"` | |
19292 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19293 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19294 | s|^/[^/]|//&| | |
19295 | p | |
19296 | q | |
19297 | }' | |
472fa5ee | 19298 | |
c0c3707f CB |
19299 | gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
19300 | sed -n "$gl_absolute_header_sed"` | |
472fa5ee | 19301 | |
c0c3707f CB |
19302 | gl_header=$gl_cv_absolute_fcntl_h |
19303 | gl_cv_next_fcntl_h='"'$gl_header'"' | |
8690e634 JK |
19304 | |
19305 | ||
c0c3707f CB |
19306 | fi |
19307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 | |
19308 | $as_echo "$gl_cv_next_fcntl_h" >&6; } | |
19309 | fi | |
19310 | NEXT_FCNTL_H=$gl_cv_next_fcntl_h | |
8690e634 | 19311 | |
c0c3707f CB |
19312 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19313 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19314 | gl_next_as_first_directive='<'fcntl.h'>' | |
19315 | else | |
19316 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19317 | gl_next_as_first_directive=$gl_cv_next_fcntl_h | |
19318 | fi | |
19319 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive | |
8690e634 JK |
19320 | |
19321 | ||
19322 | ||
19323 | ||
5e8754f9 SDJ |
19324 | |
19325 | ||
19326 | ||
19327 | ||
472fa5ee SM |
19328 | |
19329 | ||
19330 | ||
19331 | ||
19332 | ||
19333 | ||
19334 | ||
5e8754f9 | 19335 | cat >>confdefs.h <<_ACEOF |
c0c3707f | 19336 | #define GNULIB_FD_SAFER_FLAG 1 |
5e8754f9 | 19337 | _ACEOF |
472fa5ee SM |
19338 | |
19339 | ||
c0c3707f CB |
19340 | |
19341 | ||
19342 | ||
19343 | ||
19344 | ||
19345 | ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " | |
19346 | #include <dirent.h> | |
19347 | ||
5e8754f9 | 19348 | " |
c0c3707f | 19349 | if test "x$ac_cv_have_decl_fdopendir" = xyes; then : |
5e8754f9 SDJ |
19350 | ac_have_decl=1 |
19351 | else | |
19352 | ac_have_decl=0 | |
19353 | fi | |
472fa5ee | 19354 | |
5e8754f9 | 19355 | cat >>confdefs.h <<_ACEOF |
c0c3707f | 19356 | #define HAVE_DECL_FDOPENDIR $ac_have_decl |
5e8754f9 | 19357 | _ACEOF |
c0c3707f | 19358 | if test $ac_have_decl = 1; then : |
472fa5ee | 19359 | |
c0c3707f CB |
19360 | else |
19361 | HAVE_DECL_FDOPENDIR=0 | |
19362 | fi | |
472fa5ee SM |
19363 | |
19364 | ||
c0c3707f CB |
19365 | if test $ac_cv_func_fdopendir = no; then |
19366 | HAVE_FDOPENDIR=0 | |
19367 | else | |
19368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 | |
19369 | $as_echo_n "checking whether fdopendir works... " >&6; } | |
19370 | if ${gl_cv_func_fdopendir_works+:} false; then : | |
19371 | $as_echo_n "(cached) " >&6 | |
19372 | else | |
19373 | if test "$cross_compiling" = yes; then : | |
19374 | case "$host_os" in | |
19375 | # Guess yes on glibc systems. | |
19376 | *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
19377 | # Guess yes on musl systems. | |
19378 | *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
19379 | # If we don't know, obey --enable-cross-guesses. | |
19380 | *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;; | |
19381 | esac | |
472fa5ee | 19382 | |
c0c3707f CB |
19383 | else |
19384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19385 | /* end confdefs.h. */ | |
472fa5ee | 19386 | |
c0c3707f CB |
19387 | #include <dirent.h> |
19388 | #include <fcntl.h> | |
19389 | #include <unistd.h> | |
9c9d63b1 PM |
19390 | |
19391 | ||
19392 | $gl_mda_defines | |
19393 | ||
c0c3707f CB |
19394 | #if !HAVE_DECL_FDOPENDIR |
19395 | extern | |
19396 | # ifdef __cplusplus | |
19397 | "C" | |
19398 | # endif | |
19399 | DIR *fdopendir (int); | |
19400 | #endif | |
472fa5ee | 19401 | |
c0c3707f CB |
19402 | int |
19403 | main () | |
19404 | { | |
19405 | int result = 0; | |
9c9d63b1 PM |
19406 | int fd = open ("conftest.c", O_RDONLY); |
19407 | if (fd < 0) result |= 1; | |
19408 | if (fdopendir (fd)) result |= 2; | |
19409 | if (close (fd)) result |= 4; | |
19410 | return result; | |
19411 | ||
c0c3707f CB |
19412 | ; |
19413 | return 0; | |
19414 | } | |
19415 | _ACEOF | |
19416 | if ac_fn_c_try_run "$LINENO"; then : | |
19417 | gl_cv_func_fdopendir_works=yes | |
19418 | else | |
19419 | gl_cv_func_fdopendir_works=no | |
19420 | fi | |
19421 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19422 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19423 | fi | |
472fa5ee | 19424 | |
c0c3707f CB |
19425 | fi |
19426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 | |
19427 | $as_echo "$gl_cv_func_fdopendir_works" >&6; } | |
19428 | case "$gl_cv_func_fdopendir_works" in | |
19429 | *yes) ;; | |
19430 | *) | |
19431 | REPLACE_FDOPENDIR=1 | |
19432 | ;; | |
19433 | esac | |
19434 | fi | |
472fa5ee | 19435 | |
c0c3707f | 19436 | if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then |
472fa5ee SM |
19437 | |
19438 | ||
19439 | ||
19440 | ||
19441 | ||
98399780 | 19442 | |
5e8754f9 SDJ |
19443 | |
19444 | ||
c0c3707f | 19445 | gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" |
5e8754f9 | 19446 | |
c0c3707f | 19447 | fi |
5e8754f9 SDJ |
19448 | |
19449 | ||
19450 | ||
19451 | ||
19452 | ||
c0c3707f | 19453 | GNULIB_FDOPENDIR=1 |
5e8754f9 SDJ |
19454 | |
19455 | ||
19456 | ||
19457 | ||
19458 | ||
c0c3707f | 19459 | $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h |
5e8754f9 SDJ |
19460 | |
19461 | ||
5e8754f9 SDJ |
19462 | |
19463 | ||
19464 | ||
c0c3707f CB |
19465 | cat >>confdefs.h <<_ACEOF |
19466 | #define GNULIB_FDOPENDIR 1 | |
19467 | _ACEOF | |
5e8754f9 SDJ |
19468 | |
19469 | ||
19470 | ||
5e8754f9 SDJ |
19471 | |
19472 | ||
32e2770e MF |
19473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5 |
19474 | $as_echo_n "checking for ffs... " >&6; } | |
19475 | if ${gl_cv_func_ffs+:} false; then : | |
19476 | $as_echo_n "(cached) " >&6 | |
19477 | else | |
19478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19479 | /* end confdefs.h. */ | |
19480 | #include <strings.h> | |
19481 | int x; | |
19482 | ||
19483 | int | |
19484 | main () | |
19485 | { | |
19486 | int (*func) (int) = ffs; | |
19487 | return func (x); | |
19488 | ||
19489 | ; | |
19490 | return 0; | |
19491 | } | |
19492 | ||
19493 | _ACEOF | |
19494 | if ac_fn_c_try_link "$LINENO"; then : | |
19495 | gl_cv_func_ffs=yes | |
19496 | else | |
19497 | gl_cv_func_ffs=no | |
19498 | fi | |
19499 | rm -f core conftest.err conftest.$ac_objext \ | |
19500 | conftest$ac_exeext conftest.$ac_ext | |
19501 | ||
19502 | fi | |
19503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5 | |
19504 | $as_echo "$gl_cv_func_ffs" >&6; } | |
19505 | if test $gl_cv_func_ffs = no; then | |
19506 | HAVE_FFS=0 | |
19507 | fi | |
19508 | ||
19509 | if test $HAVE_FFS = 0; then | |
19510 | ||
19511 | ||
19512 | ||
19513 | ||
19514 | ||
19515 | ||
19516 | ||
19517 | ||
19518 | gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext" | |
19519 | ||
19520 | fi | |
19521 | ||
19522 | ||
19523 | ||
19524 | ||
19525 | ||
19526 | GNULIB_FFS=1 | |
19527 | ||
19528 | ||
19529 | ||
19530 | ||
19531 | ||
19532 | ||
19533 | ||
5e8754f9 | 19534 | |
c0c3707f CB |
19535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 |
19536 | $as_echo_n "checking for flexible array member... " >&6; } | |
19537 | if ${ac_cv_c_flexmember+:} false; then : | |
5e8754f9 | 19538 | $as_echo_n "(cached) " >&6 |
6ec2e0f5 | 19539 | else |
c0c3707f | 19540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e8754f9 | 19541 | /* end confdefs.h. */ |
c0c3707f CB |
19542 | #include <stdlib.h> |
19543 | #include <stdio.h> | |
19544 | #include <stddef.h> | |
19545 | struct m { struct m *next, **list; char name[]; }; | |
19546 | struct s { struct s *p; struct m *m; int n; double d[]; }; | |
5e8754f9 SDJ |
19547 | int |
19548 | main () | |
19549 | { | |
c0c3707f CB |
19550 | int m = getchar (); |
19551 | size_t nbytes = offsetof (struct s, d) + m * sizeof (double); | |
19552 | nbytes += sizeof (struct s) - 1; | |
19553 | nbytes -= nbytes % sizeof (struct s); | |
19554 | struct s *p = malloc (nbytes); | |
19555 | p->p = p; | |
19556 | p->m = NULL; | |
19557 | p->d[0] = 0.0; | |
19558 | return p->d != (double *) NULL; | |
5e8754f9 SDJ |
19559 | ; |
19560 | return 0; | |
19561 | } | |
7a6dbc2f | 19562 | _ACEOF |
c0c3707f CB |
19563 | if ac_fn_c_try_compile "$LINENO"; then : |
19564 | ac_cv_c_flexmember=yes | |
5e8754f9 | 19565 | else |
c0c3707f | 19566 | ac_cv_c_flexmember=no |
5e8754f9 | 19567 | fi |
c0c3707f | 19568 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e8754f9 | 19569 | fi |
c0c3707f CB |
19570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 |
19571 | $as_echo "$ac_cv_c_flexmember" >&6; } | |
19572 | if test $ac_cv_c_flexmember = yes; then | |
19573 | ||
19574 | $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h | |
5e8754f9 | 19575 | |
c0c3707f CB |
19576 | else |
19577 | $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h | |
98399780 | 19578 | |
c0c3707f | 19579 | fi |
98399780 | 19580 | |
472fa5ee SM |
19581 | |
19582 | ||
19583 | ||
c0c3707f CB |
19584 | FLOAT_H= |
19585 | REPLACE_FLOAT_LDBL=0 | |
19586 | case "$host_os" in | |
19587 | aix* | beos* | openbsd* | mirbsd* | irix*) | |
19588 | FLOAT_H=float.h | |
19589 | ;; | |
19590 | freebsd* | dragonfly*) | |
19591 | case "$host_cpu" in | |
19592 | i[34567]86 ) | |
19593 | FLOAT_H=float.h | |
19594 | ;; | |
19595 | x86_64 ) | |
19596 | # On x86_64 systems, the C compiler may still be generating | |
19597 | # 32-bit code. | |
19598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19599 | /* end confdefs.h. */ | |
19600 | #if defined __LP64__ || defined __x86_64__ || defined __amd64__ | |
19601 | int ok; | |
19602 | #else | |
19603 | error fail | |
19604 | #endif | |
472fa5ee | 19605 | |
c0c3707f CB |
19606 | _ACEOF |
19607 | if ac_fn_c_try_compile "$LINENO"; then : | |
472fa5ee | 19608 | |
c0c3707f CB |
19609 | else |
19610 | FLOAT_H=float.h | |
19611 | fi | |
19612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19613 | ;; | |
19614 | esac | |
19615 | ;; | |
19616 | linux*) | |
19617 | case "$host_cpu" in | |
19618 | powerpc*) | |
19619 | FLOAT_H=float.h | |
19620 | ;; | |
19621 | esac | |
19622 | ;; | |
19623 | esac | |
19624 | case "$host_os" in | |
19625 | aix* | freebsd* | dragonfly* | linux*) | |
19626 | if test -n "$FLOAT_H"; then | |
19627 | REPLACE_FLOAT_LDBL=1 | |
19628 | fi | |
19629 | ;; | |
19630 | esac | |
19631 | ||
19632 | REPLACE_ITOLD=0 | |
19633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 | |
19634 | $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } | |
19635 | if ${gl_cv_func_itold_works+:} false; then : | |
5e8754f9 SDJ |
19636 | $as_echo_n "(cached) " >&6 |
19637 | else | |
19638 | ||
19639 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
19640 | case "$host" in |
19641 | sparc*-*-linux*) | |
19642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19643 | /* end confdefs.h. */ | |
19644 | #if defined __LP64__ || defined __arch64__ | |
19645 | int ok; | |
19646 | #else | |
19647 | error fail | |
19648 | #endif | |
19649 | ||
19650 | _ACEOF | |
19651 | if ac_fn_c_try_compile "$LINENO"; then : | |
19652 | gl_cv_func_itold_works="guessing no" | |
19653 | else | |
19654 | gl_cv_func_itold_works="guessing yes" | |
19655 | fi | |
19656 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
19657 | ;; | |
19658 | # Guess yes on native Windows. | |
19659 | mingw*) gl_cv_func_itold_works="guessing yes" ;; | |
19660 | *) gl_cv_func_itold_works="guessing yes" ;; | |
5e8754f9 SDJ |
19661 | esac |
19662 | ||
19663 | else | |
19664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19665 | /* end confdefs.h. */ | |
19666 | ||
c0c3707f CB |
19667 | int i = -1; |
19668 | volatile long double ld; | |
19669 | int main () | |
5e8754f9 | 19670 | { |
c0c3707f CB |
19671 | ld += i * 1.0L; |
19672 | if (ld > 0) | |
19673 | return 1; | |
19674 | return 0; | |
5e8754f9 SDJ |
19675 | } |
19676 | _ACEOF | |
19677 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 19678 | gl_cv_func_itold_works=yes |
5e8754f9 | 19679 | else |
c0c3707f | 19680 | gl_cv_func_itold_works=no |
5e8754f9 SDJ |
19681 | fi |
19682 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19683 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19684 | fi | |
19685 | ||
98399780 | 19686 | |
5e8754f9 | 19687 | fi |
c0c3707f CB |
19688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 |
19689 | $as_echo "$gl_cv_func_itold_works" >&6; } | |
19690 | case "$gl_cv_func_itold_works" in | |
19691 | *no) | |
19692 | REPLACE_ITOLD=1 | |
19693 | FLOAT_H=float.h | |
19694 | ;; | |
19695 | esac | |
98399780 | 19696 | |
c0c3707f | 19697 | if test -n "$FLOAT_H"; then |
98399780 YQ |
19698 | |
19699 | ||
19700 | ||
19701 | ||
6a29c58e YQ |
19702 | |
19703 | ||
19704 | ||
19705 | ||
c0c3707f CB |
19706 | if test $gl_cv_have_include_next = yes; then |
19707 | gl_cv_next_float_h='<'float.h'>' | |
19708 | else | |
19709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5 | |
19710 | $as_echo_n "checking absolute name of <float.h>... " >&6; } | |
19711 | if ${gl_cv_next_float_h+:} false; then : | |
19712 | $as_echo_n "(cached) " >&6 | |
19713 | else | |
19714 | ||
19715 | ||
19716 | ||
19717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19718 | /* end confdefs.h. */ | |
19719 | #include <float.h> | |
19720 | _ACEOF | |
19721 | case "$host_os" in | |
19722 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19723 | *) gl_absname_cpp="$ac_cpp" ;; | |
19724 | esac | |
19725 | ||
19726 | case "$host_os" in | |
19727 | mingw*) | |
19728 | gl_dirsep_regex='[/\\]' | |
19729 | ;; | |
19730 | *) | |
19731 | gl_dirsep_regex='\/' | |
19732 | ;; | |
19733 | esac | |
19734 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
19735 | gl_header_literal_regex=`echo 'float.h' \ | |
19736 | | sed -e "$gl_make_literal_regex_sed"` | |
19737 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19738 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19739 | s|^/[^/]|//&| | |
19740 | p | |
19741 | q | |
19742 | }' | |
19743 | ||
19744 | gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19745 | sed -n "$gl_absolute_header_sed"` | |
19746 | ||
19747 | gl_header=$gl_cv_absolute_float_h | |
19748 | gl_cv_next_float_h='"'$gl_header'"' | |
19749 | ||
19750 | ||
19751 | fi | |
19752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 | |
19753 | $as_echo "$gl_cv_next_float_h" >&6; } | |
19754 | fi | |
19755 | NEXT_FLOAT_H=$gl_cv_next_float_h | |
19756 | ||
19757 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
19758 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19759 | gl_next_as_first_directive='<'float.h'>' | |
19760 | else | |
19761 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19762 | gl_next_as_first_directive=$gl_cv_next_float_h | |
19763 | fi | |
19764 | NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive | |
19765 | ||
19766 | ||
19767 | ||
6a29c58e | 19768 | |
c0c3707f | 19769 | fi |
6a29c58e | 19770 | |
c0c3707f CB |
19771 | if test -n "$FLOAT_H"; then |
19772 | GL_GENERATE_FLOAT_H_TRUE= | |
19773 | GL_GENERATE_FLOAT_H_FALSE='#' | |
19774 | else | |
19775 | GL_GENERATE_FLOAT_H_TRUE='#' | |
19776 | GL_GENERATE_FLOAT_H_FALSE= | |
19777 | fi | |
6a29c58e YQ |
19778 | |
19779 | ||
8690e634 | 19780 | |
c0c3707f | 19781 | if test $REPLACE_FLOAT_LDBL = 1; then |
8690e634 | 19782 | |
8690e634 | 19783 | |
8690e634 | 19784 | |
8690e634 | 19785 | |
8690e634 | 19786 | |
8690e634 | 19787 | |
8690e634 | 19788 | |
4a626d0a | 19789 | |
c0c3707f | 19790 | gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" |
8690e634 | 19791 | |
c0c3707f CB |
19792 | fi |
19793 | if test $REPLACE_ITOLD = 1; then | |
8690e634 JK |
19794 | |
19795 | ||
19796 | ||
19797 | ||
19798 | ||
19799 | ||
63ce7108 | 19800 | |
e26b6bb0 | 19801 | |
c0c3707f | 19802 | gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" |
e26b6bb0 | 19803 | |
c0c3707f | 19804 | fi |
e26b6bb0 TT |
19805 | |
19806 | ||
19807 | ||
19808 | ||
c0c3707f CB |
19809 | gl_fnmatch_required_lowercase=` |
19810 | echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' | |
19811 | ` | |
e26b6bb0 | 19812 | |
c0c3707f CB |
19813 | if test $ac_cv_func_fnmatch = no; then |
19814 | HAVE_FNMATCH=0 | |
19815 | else | |
19816 | gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" | |
19817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 | |
19818 | $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } | |
19819 | if eval \${$gl_fnmatch_cache_var+:} false; then : | |
5e8754f9 SDJ |
19820 | $as_echo_n "(cached) " >&6 |
19821 | else | |
c0c3707f CB |
19822 | if test $gl_fnmatch_required = GNU; then |
19823 | gl_fnmatch_gnu_start= | |
19824 | gl_fnmatch_gnu_end= | |
19825 | else | |
19826 | gl_fnmatch_gnu_start='#if 0' | |
19827 | gl_fnmatch_gnu_end='#endif' | |
19828 | fi | |
19829 | if test "$cross_compiling" = yes; then : | |
19830 | case "$host_os" in | |
19831 | # Guess yes on musl systems. | |
19832 | *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;; | |
19833 | # Guess no otherwise, even on glibc systems. | |
19834 | *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;; | |
19835 | esac | |
e26b6bb0 | 19836 | |
c0c3707f CB |
19837 | else |
19838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e8754f9 | 19839 | /* end confdefs.h. */ |
c0c3707f CB |
19840 | #include <fnmatch.h> |
19841 | static int | |
19842 | y (char const *pattern, char const *string, int flags) | |
19843 | { | |
19844 | return fnmatch (pattern, string, flags) == 0; | |
19845 | } | |
19846 | static int | |
19847 | n (char const *pattern, char const *string, int flags) | |
19848 | { | |
19849 | return fnmatch (pattern, string, flags) == FNM_NOMATCH; | |
19850 | } | |
19851 | ||
5e8754f9 SDJ |
19852 | int |
19853 | main () | |
19854 | { | |
c0c3707f CB |
19855 | char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; |
19856 | char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; | |
19857 | static char const A_1[] = { 'A' - 1, 0 }; | |
19858 | static char const A01[] = { 'A' + 1, 0 }; | |
19859 | static char const a_1[] = { 'a' - 1, 0 }; | |
19860 | static char const a01[] = { 'a' + 1, 0 }; | |
19861 | static char const bs_1[] = { '\\\\' - 1, 0 }; | |
19862 | static char const bs01[] = { '\\\\' + 1, 0 }; | |
19863 | int result = 0; | |
19864 | if (!n ("a*", "", 0)) | |
19865 | return 1; | |
19866 | if (!y ("a*", "abc", 0)) | |
19867 | return 1; | |
19868 | if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ | |
19869 | return 1; | |
19870 | if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) | |
19871 | return 2; | |
19872 | if (!y ("a\\\\bc", "abc", 0)) | |
19873 | return 3; | |
19874 | if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) | |
19875 | return 3; | |
19876 | if (!y ("*x", ".x", 0)) | |
19877 | return 4; | |
19878 | if (!n ("*x", ".x", FNM_PERIOD)) | |
19879 | return 4; | |
19880 | if (!y (Apat, "\\\\", 0)) | |
19881 | return 5; | |
19882 | if (!y (Apat, "A", 0)) | |
19883 | return 5; | |
19884 | if (!y (apat, "\\\\", 0)) | |
19885 | return 5; | |
19886 | if (!y (apat, "a", 0)) | |
19887 | return 5; | |
19888 | if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) | |
19889 | return 5; | |
19890 | if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) | |
19891 | return 5; | |
19892 | if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) | |
19893 | return 5; | |
19894 | if (!(y (apat, a01, 0) == ('a' < '\\\\'))) | |
19895 | return 5; | |
19896 | if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) | |
19897 | return 5; | |
19898 | if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) | |
19899 | return 5; | |
19900 | if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) | |
19901 | return 5; | |
19902 | if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) | |
19903 | return 5; | |
19904 | $gl_fnmatch_gnu_start | |
19905 | if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) | |
19906 | result |= 8; | |
19907 | if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) | |
19908 | result |= 16; | |
19909 | if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) | |
19910 | result |= 32; | |
19911 | if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19912 | result |= 64; | |
19913 | if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19914 | result |= 64; | |
19915 | if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) | |
19916 | result |= 64; | |
19917 | $gl_fnmatch_gnu_end | |
19918 | return result; | |
19919 | ||
5e8754f9 SDJ |
19920 | ; |
19921 | return 0; | |
19922 | } | |
19923 | _ACEOF | |
c0c3707f CB |
19924 | if ac_fn_c_try_run "$LINENO"; then : |
19925 | eval "$gl_fnmatch_cache_var=yes" | |
5e8754f9 | 19926 | else |
c0c3707f CB |
19927 | eval "$gl_fnmatch_cache_var=no" |
19928 | fi | |
19929 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19930 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e8754f9 | 19931 | fi |
c0c3707f | 19932 | |
e26b6bb0 | 19933 | |
5e8754f9 | 19934 | fi |
c0c3707f CB |
19935 | eval ac_res=\$$gl_fnmatch_cache_var |
19936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
19937 | $as_echo "$ac_res" >&6; } | |
19938 | eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" | |
19939 | case "$gl_fnmatch_result" in | |
19940 | *yes) ;; | |
19941 | *) REPLACE_FNMATCH=1 ;; | |
19942 | esac | |
19943 | fi | |
19944 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then | |
e26b6bb0 | 19945 | |
e26b6bb0 | 19946 | |
c0c3707f CB |
19947 | FNMATCH_H='fnmatch.h' |
19948 | if test -n "$FNMATCH_H"; then | |
19949 | GL_GENERATE_FNMATCH_H_TRUE= | |
19950 | GL_GENERATE_FNMATCH_H_FALSE='#' | |
5e8754f9 | 19951 | else |
c0c3707f CB |
19952 | GL_GENERATE_FNMATCH_H_TRUE='#' |
19953 | GL_GENERATE_FNMATCH_H_FALSE= | |
5e8754f9 | 19954 | fi |
e26b6bb0 | 19955 | |
18848e28 | 19956 | |
c0c3707f | 19957 | fi |
18848e28 | 19958 | |
c0c3707f | 19959 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then |
18848e28 | 19960 | |
18848e28 | 19961 | |
18848e28 | 19962 | |
c0c3707f CB |
19963 | |
19964 | ||
19965 | ||
19966 | ||
19967 | ||
19968 | gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" | |
19969 | ||
19970 | ||
19971 | ||
c0c3707f CB |
19972 | |
19973 | ||
19974 | fi | |
19975 | ||
19976 | ||
19977 | ||
19978 | ||
19979 | ||
19980 | GNULIB_FNMATCH=1 | |
19981 | ||
19982 | ||
19983 | ||
19984 | ||
19985 | ||
19986 | $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h | |
19987 | ||
19988 | ||
19989 | ||
19990 | ||
19991 | ||
19992 | ||
19993 | ||
19994 | ||
19995 | if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then | |
19996 | ||
19997 | ||
19998 | ||
19999 | ||
20000 | ||
20001 | ||
20002 | ||
20003 | ||
20004 | gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" | |
20005 | ||
20006 | ||
20007 | ||
18848e28 | 20008 | |
18848e28 | 20009 | |
5e8754f9 | 20010 | fi |
18848e28 | 20011 | |
18848e28 | 20012 | |
c0c3707f CB |
20013 | cat >>confdefs.h <<_ACEOF |
20014 | #define GNULIB_FNMATCH_GNU 1 | |
20015 | _ACEOF | |
18848e28 | 20016 | |
18848e28 | 20017 | |
18848e28 | 20018 | |
18848e28 | 20019 | |
9c9d63b1 PM |
20020 | |
20021 | ||
20022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5 | |
20023 | $as_echo_n "checking whether free is known to preserve errno... " >&6; } | |
20024 | if ${gl_cv_func_free_preserves_errno+:} false; then : | |
20025 | $as_echo_n "(cached) " >&6 | |
20026 | else | |
20027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20028 | /* end confdefs.h. */ | |
20029 | #include <stdlib.h> | |
20030 | ||
20031 | int | |
20032 | main () | |
20033 | { | |
20034 | #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__) | |
20035 | #elif defined __OpenBSD__ | |
20036 | #elif defined __sun | |
20037 | #else | |
20038 | #error "'free' is not known to preserve errno" | |
20039 | #endif | |
20040 | ||
20041 | ; | |
20042 | return 0; | |
20043 | } | |
20044 | _ACEOF | |
20045 | if ac_fn_c_try_compile "$LINENO"; then : | |
20046 | gl_cv_func_free_preserves_errno=yes | |
20047 | else | |
20048 | gl_cv_func_free_preserves_errno=no | |
20049 | fi | |
20050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
20051 | ||
20052 | fi | |
20053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5 | |
20054 | $as_echo "$gl_cv_func_free_preserves_errno" >&6; } | |
20055 | ||
20056 | case $gl_cv_func_free_preserves_errno in | |
20057 | *yes) ;; | |
20058 | *) REPLACE_FREE=1 ;; | |
20059 | esac | |
20060 | ||
20061 | if test $REPLACE_FREE = 1; then | |
20062 | ||
20063 | ||
20064 | ||
20065 | ||
20066 | ||
20067 | ||
20068 | ||
20069 | ||
20070 | gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext" | |
20071 | ||
20072 | : | |
20073 | fi | |
20074 | ||
20075 | ||
20076 | ||
20077 | ||
20078 | ||
20079 | GNULIB_FREE_POSIX=1 | |
20080 | ||
20081 | ||
20082 | ||
20083 | ||
20084 | ||
20085 | $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h | |
20086 | ||
20087 | ||
20088 | ||
20089 | ||
c0c3707f CB |
20090 | if test $gl_func_frexp != yes; then |
20091 | ||
20092 | ||
18848e28 GF |
20093 | |
20094 | ||
18848e28 | 20095 | |
18848e28 | 20096 | |
18848e28 | 20097 | |
c0c3707f CB |
20098 | |
20099 | gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" | |
18848e28 GF |
20100 | |
20101 | fi | |
20102 | ||
20103 | ||
20104 | ||
20105 | ||
20106 | ||
c0c3707f | 20107 | GNULIB_FREXP=1 |
18848e28 GF |
20108 | |
20109 | ||
20110 | ||
20111 | ||
20112 | ||
c0c3707f | 20113 | $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h |
18848e28 GF |
20114 | |
20115 | ||
20116 | ||
20117 | ||
c0c3707f CB |
20118 | if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then |
20119 | ||
20120 | ||
20121 | ||
18848e28 GF |
20122 | |
20123 | ||
20124 | ||
5e8754f9 SDJ |
20125 | |
20126 | ||
c0c3707f CB |
20127 | gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" |
20128 | ||
5e8754f9 | 20129 | fi |
18848e28 | 20130 | |
6a29c58e | 20131 | |
6a29c58e | 20132 | |
6a29c58e | 20133 | |
6ec2e0f5 | 20134 | |
c0c3707f CB |
20135 | GNULIB_FREXPL=1 |
20136 | ||
20137 | ||
20138 | ||
20139 | ||
20140 | ||
20141 | $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h | |
20142 | ||
20143 | ||
20144 | ||
20145 | ||
20146 | ||
20147 | ||
20148 | ||
20149 | case "$host_os" in | |
20150 | mingw* | solaris*) | |
20151 | REPLACE_FSTAT=1 | |
20152 | ;; | |
20153 | esac | |
472fa5ee SM |
20154 | |
20155 | ||
20156 | ||
20157 | ||
20158 | ||
6ec2e0f5 SDJ |
20159 | if test $ac_cv_func_fchdir = no; then |
20160 | HAVE_FCHDIR=0 | |
6a29c58e YQ |
20161 | fi |
20162 | ||
6ec2e0f5 SDJ |
20163 | if test $HAVE_FCHDIR = 0; then |
20164 | case "$gl_cv_func_open_directory_works" in | |
20165 | *yes) ;; | |
20166 | *) | |
20167 | REPLACE_FSTAT=1 | |
20168 | ;; | |
20169 | esac | |
20170 | fi | |
6a29c58e YQ |
20171 | |
20172 | ||
6ec2e0f5 | 20173 | if test $REPLACE_FSTAT = 1; then |
6a29c58e | 20174 | |
3d99e817 AK |
20175 | |
20176 | ||
20177 | ||
3d99e817 AK |
20178 | |
20179 | ||
20180 | ||
20181 | ||
6ec2e0f5 | 20182 | gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" |
3d99e817 | 20183 | |
c0c3707f CB |
20184 | case "$host_os" in |
20185 | mingw*) | |
3d99e817 AK |
20186 | |
20187 | ||
20188 | ||
20189 | ||
20190 | ||
20191 | ||
49e4877c | 20192 | |
49e4877c | 20193 | |
c0c3707f | 20194 | gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" |
49e4877c | 20195 | |
c0c3707f CB |
20196 | ;; |
20197 | esac | |
49e4877c PA |
20198 | |
20199 | ||
9c9d63b1 | 20200 | |
c0c3707f CB |
20201 | : |
20202 | ||
20203 | fi | |
6a29c58e YQ |
20204 | |
20205 | ||
88b48903 | 20206 | |
8690e634 | 20207 | |
a512b375 | 20208 | |
c0c3707f CB |
20209 | GNULIB_FSTAT=1 |
20210 | ||
20211 | ||
20212 | ||
20213 | ||
20214 | ||
20215 | $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h | |
20216 | ||
20217 | ||
88b48903 | 20218 | |
88b48903 | 20219 | |
472fa5ee SM |
20220 | |
20221 | ||
20222 | ||
20223 | ||
20224 | ||
6ec2e0f5 SDJ |
20225 | |
20226 | if test $ac_cv_func_fstatat = no; then | |
20227 | HAVE_FSTATAT=0 | |
20228 | else | |
20229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 | |
20230 | $as_echo_n "checking whether fstatat (..., 0) works... " >&6; } | |
d0ac1c44 | 20231 | if ${gl_cv_func_fstatat_zero_flag+:} false; then : |
6ec2e0f5 SDJ |
20232 | $as_echo_n "(cached) " >&6 |
20233 | else | |
20234 | if test "$cross_compiling" = yes; then : | |
20235 | case "$host_os" in | |
20236 | aix*) gl_cv_func_fstatat_zero_flag="guessing no";; | |
20237 | *) gl_cv_func_fstatat_zero_flag="guessing yes";; | |
20238 | esac | |
88b48903 | 20239 | |
8690e634 JK |
20240 | else |
20241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20242 | /* end confdefs.h. */ | |
8690e634 | 20243 | |
6ec2e0f5 SDJ |
20244 | #include <fcntl.h> |
20245 | #include <sys/stat.h> | |
20246 | int | |
20247 | main (void) | |
20248 | { | |
20249 | struct stat a; | |
20250 | return fstatat (AT_FDCWD, ".", &a, 0) != 0; | |
20251 | } | |
20252 | ||
88b48903 WN |
20253 | _ACEOF |
20254 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 20255 | gl_cv_func_fstatat_zero_flag=yes |
88b48903 | 20256 | else |
6ec2e0f5 | 20257 | gl_cv_func_fstatat_zero_flag=no |
88b48903 WN |
20258 | fi |
20259 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20260 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20261 | fi | |
20262 | ||
20263 | ||
20264 | fi | |
6ec2e0f5 SDJ |
20265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 |
20266 | $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } | |
88b48903 | 20267 | |
6ec2e0f5 SDJ |
20268 | case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in |
20269 | *yes+*yes) ;; | |
c0c3707f CB |
20270 | *) REPLACE_FSTATAT=1 ;; |
20271 | esac | |
20272 | ||
20273 | case $host_os in | |
20274 | solaris*) | |
20275 | REPLACE_FSTATAT=1 ;; | |
20276 | esac | |
20277 | ||
20278 | case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in | |
20279 | 1,*yes) | |
88b48903 | 20280 | |
6ec2e0f5 | 20281 | $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h |
88b48903 | 20282 | |
7a6dbc2f | 20283 | ;; |
6ec2e0f5 SDJ |
20284 | esac |
20285 | fi | |
88b48903 | 20286 | |
6ec2e0f5 | 20287 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then |
88b48903 WN |
20288 | |
20289 | ||
20290 | ||
20291 | ||
20292 | ||
88b48903 | 20293 | |
4a626d0a PA |
20294 | |
20295 | ||
6ec2e0f5 SDJ |
20296 | gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" |
20297 | ||
20298 | fi | |
20299 | ||
20300 | ||
20301 | ||
4a626d0a | 20302 | |
6ec2e0f5 SDJ |
20303 | |
20304 | GNULIB_FSTATAT=1 | |
20305 | ||
20306 | ||
20307 | ||
20308 | ||
20309 | ||
20310 | $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h | |
20311 | ||
20312 | ||
20313 | ||
20314 | ||
20315 | ||
20316 | ||
20317 | ||
20318 | ||
20319 | gl_abort_bug=no | |
4a626d0a PA |
20320 | case "$host_os" in |
20321 | mingw*) | |
6ec2e0f5 | 20322 | gl_cv_func_getcwd_path_max=yes |
4a626d0a PA |
20323 | ;; |
20324 | *) | |
88b48903 | 20325 | |
88b48903 | 20326 | |
88b48903 WN |
20327 | |
20328 | ||
88b48903 | 20329 | |
6ec2e0f5 SDJ |
20330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 |
20331 | $as_echo_n "checking whether getcwd handles long file names properly... " >&6; } | |
d0ac1c44 | 20332 | if ${gl_cv_func_getcwd_path_max+:} false; then : |
6ec2e0f5 SDJ |
20333 | $as_echo_n "(cached) " >&6 |
20334 | else | |
20335 | # Arrange for deletion of the temporary directory this test creates. | |
20336 | ac_clean_files="$ac_clean_files confdir3" | |
20337 | if test "$cross_compiling" = yes; then : | |
b567ca63 | 20338 | # Cross-compilation guesses: |
c0c3707f CB |
20339 | case "$host_os" in |
20340 | aix*) # On AIX, it has the AIX bug. | |
20341 | gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;; | |
20342 | gnu*) # On Hurd, it is 'yes'. | |
20343 | gl_cv_func_getcwd_path_max='guessing yes' ;; | |
20344 | linux* | kfreebsd*) | |
20345 | # On older Linux+glibc it's 'no, but it is partly working', | |
20346 | # on newer Linux+glibc it's 'yes'. | |
20347 | # On Linux+musl libc, it's 'no, but it is partly working'. | |
20348 | # On kFreeBSD+glibc, it's 'no, but it is partly working'. | |
20349 | gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;; | |
20350 | *) # If we don't know, obey --enable-cross-guesses. | |
20351 | gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;; | |
20352 | esac | |
b567ca63 | 20353 | |
6ec2e0f5 SDJ |
20354 | else |
20355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20356 | /* end confdefs.h. */ | |
88b48903 | 20357 | |
6ec2e0f5 SDJ |
20358 | #include <errno.h> |
20359 | #include <stdlib.h> | |
20360 | #if HAVE_UNISTD_H | |
20361 | # include <unistd.h> | |
20362 | #else | |
20363 | # include <direct.h> | |
20364 | #endif | |
20365 | #include <string.h> | |
20366 | #include <limits.h> | |
20367 | #include <sys/stat.h> | |
20368 | #include <sys/types.h> | |
20369 | #include <fcntl.h> | |
88b48903 WN |
20370 | |
20371 | ||
6ec2e0f5 SDJ |
20372 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ |
20373 | #if HAVE_UNISTD_H | |
20374 | # include <unistd.h> | |
20375 | #endif | |
20376 | #include <limits.h> | |
20377 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
20378 | # include <sys/param.h> | |
20379 | #endif | |
20380 | #if !defined PATH_MAX && defined MAXPATHLEN | |
20381 | # define PATH_MAX MAXPATHLEN | |
20382 | #endif | |
20383 | #ifdef __hpux | |
20384 | # undef PATH_MAX | |
20385 | # define PATH_MAX 1024 | |
20386 | #endif | |
c0c3707f | 20387 | #if defined _WIN32 && ! defined __CYGWIN__ |
6ec2e0f5 SDJ |
20388 | # undef PATH_MAX |
20389 | # define PATH_MAX 260 | |
20390 | #endif | |
88b48903 | 20391 | |
88b48903 | 20392 | |
6ec2e0f5 SDJ |
20393 | #ifndef AT_FDCWD |
20394 | # define AT_FDCWD 0 | |
20395 | #endif | |
20396 | #ifdef ENAMETOOLONG | |
20397 | # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) | |
20398 | #else | |
20399 | # define is_ENAMETOOLONG(x) 0 | |
20400 | #endif | |
88b48903 | 20401 | |
6ec2e0f5 SDJ |
20402 | /* Use the getcwd function, not any macro. */ |
20403 | #undef getcwd | |
88b48903 | 20404 | |
9c9d63b1 PM |
20405 | |
20406 | ||
20407 | $gl_mda_defines | |
20408 | ||
88b48903 | 20409 | |
6ec2e0f5 SDJ |
20410 | #ifndef S_IRWXU |
20411 | # define S_IRWXU 0700 | |
20412 | #endif | |
88b48903 | 20413 | |
6ec2e0f5 SDJ |
20414 | /* The length of this name must be 8. */ |
20415 | #define DIR_NAME "confdir3" | |
20416 | #define DIR_NAME_LEN 8 | |
20417 | #define DIR_NAME_SIZE (DIR_NAME_LEN + 1) | |
88b48903 | 20418 | |
6ec2e0f5 SDJ |
20419 | /* The length of "../". */ |
20420 | #define DOTDOTSLASH_LEN 3 | |
88b48903 | 20421 | |
6ec2e0f5 SDJ |
20422 | /* Leftover bytes in the buffer, to work around library or OS bugs. */ |
20423 | #define BUF_SLOP 20 | |
88b48903 | 20424 | |
6ec2e0f5 SDJ |
20425 | int |
20426 | main () | |
20427 | { | |
20428 | #ifndef PATH_MAX | |
20429 | /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- | |
20430 | at least not on a local file system. And if we were to start worrying | |
20431 | about remote file systems, we'd have to enable the wrapper function | |
20432 | all of the time, just to be safe. That's not worth the cost. */ | |
20433 | exit (0); | |
20434 | #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ | |
20435 | - DIR_NAME_SIZE - BUF_SLOP) \ | |
20436 | <= PATH_MAX) | |
20437 | /* FIXME: Assuming there's a system for which this is true, | |
20438 | this should be done in a compile test. */ | |
20439 | exit (0); | |
20440 | #else | |
20441 | char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) | |
20442 | + DIR_NAME_SIZE + BUF_SLOP]; | |
20443 | char *cwd = getcwd (buf, PATH_MAX); | |
20444 | size_t initial_cwd_len; | |
20445 | size_t cwd_len; | |
20446 | int fail = 0; | |
20447 | size_t n_chdirs = 0; | |
88b48903 | 20448 | |
6ec2e0f5 SDJ |
20449 | if (cwd == NULL) |
20450 | exit (10); | |
88b48903 | 20451 | |
6ec2e0f5 | 20452 | cwd_len = initial_cwd_len = strlen (cwd); |
88b48903 | 20453 | |
6ec2e0f5 SDJ |
20454 | while (1) |
20455 | { | |
20456 | size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); | |
20457 | char *c = NULL; | |
20458 | ||
20459 | cwd_len += DIR_NAME_SIZE; | |
20460 | /* If mkdir or chdir fails, it could be that this system cannot create | |
20461 | any file with an absolute name longer than PATH_MAX, such as cygwin. | |
20462 | If so, leave fail as 0, because the current working directory can't | |
c0c3707f CB |
20463 | be too long for getcwd if it can't even be created. On Linux with |
20464 | the 9p file system, mkdir fails with error EINVAL when cwd_len gets | |
20465 | too long; ignore this failure because the getcwd() system call | |
20466 | produces good results whereas the gnulib substitute calls getdents64 | |
20467 | which fails with error EPROTO. | |
20468 | For other errors, be pessimistic and consider that as a failure, | |
20469 | too. */ | |
6ec2e0f5 SDJ |
20470 | if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) |
20471 | { | |
20472 | if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) | |
c0c3707f CB |
20473 | #ifdef __linux__ |
20474 | if (! (errno == EINVAL)) | |
20475 | #endif | |
20476 | fail = 20; | |
6ec2e0f5 SDJ |
20477 | break; |
20478 | } | |
88b48903 | 20479 | |
6ec2e0f5 SDJ |
20480 | if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) |
20481 | { | |
20482 | struct stat sb; | |
88b48903 | 20483 | |
6ec2e0f5 SDJ |
20484 | c = getcwd (buf, PATH_MAX); |
20485 | if (!c && errno == ENOENT) | |
20486 | { | |
20487 | fail = 11; | |
20488 | break; | |
20489 | } | |
20490 | if (c) | |
20491 | { | |
20492 | fail = 31; | |
20493 | break; | |
20494 | } | |
20495 | if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) | |
20496 | { | |
20497 | fail = 21; | |
20498 | break; | |
20499 | } | |
88b48903 | 20500 | |
6ec2e0f5 SDJ |
20501 | /* Our replacement needs to be able to stat() long ../../paths, |
20502 | so generate a path larger than PATH_MAX to check, | |
20503 | avoiding the replacement if we can't stat(). */ | |
20504 | c = getcwd (buf, cwd_len + 1); | |
20505 | if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno)) | |
20506 | { | |
20507 | fail = 32; | |
20508 | break; | |
20509 | } | |
20510 | } | |
88b48903 | 20511 | |
6ec2e0f5 SDJ |
20512 | if (dotdot_max <= cwd_len - initial_cwd_len) |
20513 | { | |
20514 | if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) | |
20515 | break; | |
20516 | c = getcwd (buf, cwd_len + 1); | |
20517 | if (!c) | |
20518 | { | |
20519 | if (! (errno == ERANGE || errno == ENOENT | |
20520 | || is_ENAMETOOLONG (errno))) | |
20521 | { | |
20522 | fail = 22; | |
20523 | break; | |
20524 | } | |
20525 | if (AT_FDCWD || errno == ERANGE || errno == ENOENT) | |
20526 | { | |
20527 | fail = 12; | |
20528 | break; | |
20529 | } | |
20530 | } | |
20531 | } | |
88b48903 | 20532 | |
6ec2e0f5 SDJ |
20533 | if (c && strlen (c) != cwd_len) |
20534 | { | |
20535 | fail = 23; | |
20536 | break; | |
20537 | } | |
20538 | ++n_chdirs; | |
20539 | } | |
88b48903 | 20540 | |
6ec2e0f5 SDJ |
20541 | /* Leaving behind such a deep directory is not polite. |
20542 | So clean up here, right away, even though the driving | |
20543 | shell script would also clean up. */ | |
20544 | { | |
20545 | size_t i; | |
88b48903 | 20546 | |
6ec2e0f5 SDJ |
20547 | /* Try rmdir first, in case the chdir failed. */ |
20548 | rmdir (DIR_NAME); | |
20549 | for (i = 0; i <= n_chdirs; i++) | |
20550 | { | |
20551 | if (chdir ("..") < 0) | |
20552 | break; | |
20553 | if (rmdir (DIR_NAME) != 0) | |
20554 | break; | |
20555 | } | |
20556 | } | |
88b48903 | 20557 | |
6ec2e0f5 SDJ |
20558 | exit (fail); |
20559 | #endif | |
20560 | } | |
88b48903 | 20561 | |
6ec2e0f5 SDJ |
20562 | _ACEOF |
20563 | if ac_fn_c_try_run "$LINENO"; then : | |
20564 | gl_cv_func_getcwd_path_max=yes | |
20565 | else | |
20566 | case $? in | |
c0c3707f CB |
20567 | 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; |
20568 | 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; | |
20569 | 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; | |
20570 | *) gl_cv_func_getcwd_path_max=no;; | |
20571 | esac | |
6ec2e0f5 SDJ |
20572 | fi |
20573 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20574 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20575 | fi | |
88b48903 | 20576 | |
88b48903 | 20577 | |
6ec2e0f5 SDJ |
20578 | fi |
20579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 | |
20580 | $as_echo "$gl_cv_func_getcwd_path_max" >&6; } | |
88b48903 | 20581 | |
6ec2e0f5 SDJ |
20582 | case "$gl_cv_func_getcwd_null" in |
20583 | *yes) | |
88b48903 WN |
20584 | |
20585 | ||
472fa5ee SM |
20586 | |
20587 | ||
20588 | ||
472fa5ee | 20589 | |
c0c3707f CB |
20590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 |
20591 | $as_echo_n "checking for getpagesize... " >&6; } | |
20592 | if ${gl_cv_func_getpagesize+:} false; then : | |
20593 | $as_echo_n "(cached) " >&6 | |
20594 | else | |
20595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20596 | /* end confdefs.h. */ | |
20597 | #include <unistd.h> | |
20598 | int | |
20599 | main () | |
20600 | { | |
20601 | return getpagesize(); | |
20602 | ; | |
20603 | return 0; | |
20604 | } | |
472fa5ee | 20605 | |
c0c3707f CB |
20606 | _ACEOF |
20607 | if ac_fn_c_try_link "$LINENO"; then : | |
20608 | gl_cv_func_getpagesize=yes | |
20609 | else | |
20610 | gl_cv_func_getpagesize=no | |
20611 | fi | |
20612 | rm -f core conftest.err conftest.$ac_objext \ | |
20613 | conftest$ac_exeext conftest.$ac_ext | |
472fa5ee | 20614 | |
c0c3707f CB |
20615 | fi |
20616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5 | |
20617 | $as_echo "$gl_cv_func_getpagesize" >&6; } | |
88b48903 | 20618 | |
c0c3707f | 20619 | if test $gl_cv_func_getpagesize = yes; then |
88b48903 | 20620 | |
c0c3707f | 20621 | cat >>confdefs.h <<_ACEOF |
7a6dbc2f SDJ |
20622 | #define HAVE_GETPAGESIZE 1 |
20623 | _ACEOF | |
20624 | ||
c0c3707f | 20625 | fi |
6ec2e0f5 | 20626 | |
9c9d63b1 PM |
20627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5 |
20628 | $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; } | |
20629 | if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then : | |
88b48903 WN |
20630 | $as_echo_n "(cached) " >&6 |
20631 | else | |
6ec2e0f5 SDJ |
20632 | # Remove any remnants of a previous test. |
20633 | rm -rf confdir-14B--- | |
20634 | # Arrange for deletion of the temporary directory this test creates. | |
20635 | ac_clean_files="$ac_clean_files confdir-14B---" | |
20636 | if test "$cross_compiling" = yes; then : | |
c0c3707f | 20637 | case "$host_os" in |
9c9d63b1 PM |
20638 | # Guess yes on musl systems. |
20639 | *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;; | |
20640 | # Guess no otherwise, even on glibc systems. | |
20641 | *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no" | |
c0c3707f CB |
20642 | esac |
20643 | ||
88b48903 WN |
20644 | else |
20645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20646 | /* end confdefs.h. */ | |
6ec2e0f5 SDJ |
20647 | |
20648 | #include <errno.h> | |
20649 | #include <stdlib.h> | |
20650 | #if HAVE_UNISTD_H | |
20651 | # include <unistd.h> | |
20652 | #else /* on Windows with MSVC */ | |
20653 | # include <direct.h> | |
20654 | #endif | |
20655 | #include <string.h> | |
20656 | #include <sys/stat.h> | |
20657 | ||
20658 | ||
20659 | /* Arrange to define PATH_MAX, like "pathmax.h" does. */ | |
20660 | #if HAVE_UNISTD_H | |
20661 | # include <unistd.h> | |
20662 | #endif | |
20663 | #include <limits.h> | |
20664 | #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN | |
20665 | # include <sys/param.h> | |
20666 | #endif | |
20667 | #if !defined PATH_MAX && defined MAXPATHLEN | |
20668 | # define PATH_MAX MAXPATHLEN | |
20669 | #endif | |
20670 | #ifdef __hpux | |
20671 | # undef PATH_MAX | |
20672 | # define PATH_MAX 1024 | |
20673 | #endif | |
c0c3707f | 20674 | #if defined _WIN32 && ! defined __CYGWIN__ |
6ec2e0f5 SDJ |
20675 | # undef PATH_MAX |
20676 | # define PATH_MAX 260 | |
20677 | #endif | |
20678 | ||
20679 | ||
9c9d63b1 PM |
20680 | |
20681 | $gl_mda_defines | |
20682 | ||
6ec2e0f5 SDJ |
20683 | |
20684 | #ifndef S_IRWXU | |
20685 | # define S_IRWXU 0700 | |
20686 | #endif | |
20687 | ||
20688 | /* FIXME: skip the run-test altogether on systems without getpagesize. */ | |
20689 | #if ! HAVE_GETPAGESIZE | |
20690 | # define getpagesize() 0 | |
20691 | #endif | |
20692 | ||
20693 | /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than | |
20694 | the 16kB pagesize on ia64 linux. Those conditions make the code below | |
20695 | trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ | |
20696 | #define TARGET_LEN (5 * 1024) | |
88b48903 WN |
20697 | |
20698 | int | |
20699 | main () | |
20700 | { | |
6ec2e0f5 SDJ |
20701 | char *cwd; |
20702 | size_t initial_cwd_len; | |
20703 | int fail = 0; | |
20704 | ||
20705 | /* The bug is triggered when PATH_MAX < getpagesize (), so skip | |
20706 | this relatively expensive and invasive test if that's not true. */ | |
20707 | #ifdef PATH_MAX | |
20708 | int bug_possible = PATH_MAX < getpagesize (); | |
20709 | #else | |
20710 | int bug_possible = 0; | |
20711 | #endif | |
20712 | if (! bug_possible) | |
20713 | return 0; | |
8690e634 | 20714 | |
6ec2e0f5 SDJ |
20715 | cwd = getcwd (NULL, 0); |
20716 | if (cwd == NULL) | |
20717 | return 2; | |
20718 | ||
20719 | initial_cwd_len = strlen (cwd); | |
20720 | free (cwd); | |
20721 | ||
20722 | if (1) | |
20723 | { | |
20724 | static char const dir_name[] = "confdir-14B---"; | |
20725 | size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) | |
20726 | / sizeof dir_name); | |
20727 | size_t d; | |
20728 | for (d = 0; d < desired_depth; d++) | |
20729 | { | |
20730 | if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) | |
20731 | { | |
20732 | if (! (errno == ERANGE || errno == ENAMETOOLONG | |
20733 | || errno == ENOENT)) | |
20734 | fail = 3; /* Unable to construct deep hierarchy. */ | |
20735 | break; | |
20736 | } | |
20737 | } | |
20738 | ||
20739 | /* If libc has the bug in question, this invocation of getcwd | |
20740 | results in a failed assertion. */ | |
20741 | cwd = getcwd (NULL, 0); | |
20742 | if (cwd == NULL) | |
20743 | fail = 4; /* getcwd didn't assert, but it failed for a long name | |
20744 | where the answer could have been learned. */ | |
20745 | free (cwd); | |
20746 | ||
20747 | /* Call rmdir first, in case the above chdir failed. */ | |
20748 | rmdir (dir_name); | |
20749 | while (0 < d--) | |
20750 | { | |
20751 | if (chdir ("..") < 0) | |
20752 | { | |
20753 | fail = 5; | |
20754 | break; | |
20755 | } | |
20756 | rmdir (dir_name); | |
20757 | } | |
20758 | } | |
20759 | ||
20760 | return fail; | |
8690e634 | 20761 | } |
6ec2e0f5 | 20762 | |
8690e634 JK |
20763 | _ACEOF |
20764 | if ac_fn_c_try_run "$LINENO"; then : | |
9c9d63b1 | 20765 | gl_cv_func_getcwd_succeeds_beyond_4k=yes |
8690e634 | 20766 | else |
c0c3707f CB |
20767 | ret=$? |
20768 | if test $ret -ge 128 || test $ret = 4; then | |
9c9d63b1 | 20769 | gl_cv_func_getcwd_succeeds_beyond_4k=no |
c0c3707f | 20770 | else |
9c9d63b1 | 20771 | gl_cv_func_getcwd_succeeds_beyond_4k=yes |
c0c3707f CB |
20772 | fi |
20773 | ||
8690e634 JK |
20774 | fi |
20775 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20776 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20777 | fi | |
20778 | ||
20779 | ||
20780 | fi | |
9c9d63b1 PM |
20781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5 |
20782 | $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; } | |
20783 | case "$gl_cv_func_getcwd_succeeds_beyond_4k" in | |
20784 | *no) | |
c0c3707f CB |
20785 | gl_abort_bug=yes |
20786 | ;; | |
20787 | *) | |
20788 | ||
20789 | ;; | |
20790 | esac | |
6ec2e0f5 SDJ |
20791 | |
20792 | ;; | |
20793 | esac | |
20794 | ;; | |
20795 | esac | |
20796 | case "$gl_cv_func_getcwd_path_max" in | |
c0c3707f | 20797 | *"no" | *"no, it has the AIX bug") ;; |
6ec2e0f5 SDJ |
20798 | *) |
20799 | ||
20800 | $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h | |
20801 | ||
20802 | ;; | |
20803 | esac | |
20804 | case "$gl_cv_func_getcwd_path_max" in | |
c0c3707f | 20805 | *"no, but it is partly working") |
6ec2e0f5 SDJ |
20806 | |
20807 | $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h | |
20808 | ||
20809 | ;; | |
c0c3707f | 20810 | *"yes, but with shorter paths") |
6ec2e0f5 SDJ |
20811 | |
20812 | $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h | |
20813 | ||
20814 | ;; | |
20815 | esac | |
20816 | ||
20817 | if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ | |
20818 | || test $gl_cv_func_getcwd_posix_signature != yes \ | |
20819 | || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \ | |
20820 | || test $gl_abort_bug = yes; then | |
20821 | REPLACE_GETCWD=1 | |
8690e634 JK |
20822 | fi |
20823 | ||
6ec2e0f5 | 20824 | if test $REPLACE_GETCWD = 1; then |
8690e634 JK |
20825 | |
20826 | ||
8690e634 JK |
20827 | |
20828 | ||
20829 | ||
20830 | ||
20831 | ||
20832 | ||
6ec2e0f5 | 20833 | gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" |
8690e634 JK |
20834 | |
20835 | ||
8690e634 JK |
20836 | |
20837 | ||
6ec2e0f5 SDJ |
20838 | : |
20839 | ||
20840 | fi | |
20841 | ||
8690e634 JK |
20842 | |
20843 | cat >>confdefs.h <<_ACEOF | |
6ec2e0f5 | 20844 | #define GNULIB_GETCWD 1 |
8690e634 JK |
20845 | _ACEOF |
20846 | ||
20847 | ||
8690e634 | 20848 | |
8690e634 JK |
20849 | |
20850 | ||
c971b7fa | 20851 | |
c971b7fa | 20852 | |
6ec2e0f5 SDJ |
20853 | GNULIB_GETCWD=1 |
20854 | ||
20855 | ||
20856 | ||
20857 | ||
20858 | ||
20859 | $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h | |
20860 | ||
c971b7fa | 20861 | |
c971b7fa | 20862 | |
c971b7fa | 20863 | |
c971b7fa | 20864 | |
c971b7fa | 20865 | |
c971b7fa | 20866 | |
c971b7fa | 20867 | |
6ec2e0f5 SDJ |
20868 | case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in |
20869 | *yes,yes) ;; | |
20870 | *) | |
20871 | REPLACE_GETCWD=1 | |
20872 | ;; | |
20873 | esac | |
c971b7fa | 20874 | |
6ec2e0f5 | 20875 | if test $REPLACE_GETCWD = 1; then |
c971b7fa | 20876 | |
c971b7fa PA |
20877 | |
20878 | ||
c971b7fa PA |
20879 | |
20880 | ||
c971b7fa | 20881 | |
c971b7fa | 20882 | |
c971b7fa | 20883 | |
6ec2e0f5 | 20884 | gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" |
c971b7fa | 20885 | |
6ec2e0f5 | 20886 | fi |
c971b7fa | 20887 | |
c971b7fa | 20888 | |
c971b7fa | 20889 | |
c971b7fa | 20890 | |
8690e634 | 20891 | |
6ec2e0f5 | 20892 | GNULIB_GETCWD=1 |
c971b7fa | 20893 | |
88b48903 WN |
20894 | |
20895 | ||
20896 | ||
88b48903 | 20897 | |
6ec2e0f5 | 20898 | $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h |
88b48903 | 20899 | |
88b48903 WN |
20900 | |
20901 | ||
20902 | ||
6ec2e0f5 SDJ |
20903 | |
20904 | ||
20905 | ||
20906 | ||
c17253b9 MF |
20907 | |
20908 | ||
20909 | ||
20910 | if test $ac_cv_func_getdelim = yes; then | |
20911 | HAVE_GETDELIM=1 | |
20912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 | |
20913 | $as_echo_n "checking for working getdelim function... " >&6; } | |
20914 | if ${gl_cv_func_working_getdelim+:} false; then : | |
20915 | $as_echo_n "(cached) " >&6 | |
20916 | else | |
20917 | echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data | |
20918 | if test "$cross_compiling" = yes; then : | |
20919 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20920 | /* end confdefs.h. */ | |
20921 | ||
20922 | #include <features.h> | |
20923 | #ifdef __GNU_LIBRARY__ | |
20924 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ | |
20925 | Lucky GNU user | |
20926 | #endif | |
20927 | #endif | |
20928 | ||
20929 | _ACEOF | |
20930 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
20931 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then : | |
20932 | gl_cv_func_working_getdelim="guessing yes" | |
20933 | else | |
20934 | case "$host_os" in | |
20935 | *-musl*) gl_cv_func_working_getdelim="guessing yes" ;; | |
20936 | *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;; | |
20937 | esac | |
20938 | ||
20939 | fi | |
20940 | rm -f conftest* | |
20941 | ||
20942 | ||
20943 | else | |
20944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20945 | /* end confdefs.h. */ | |
20946 | ||
20947 | # include <stdio.h> | |
20948 | # include <stdlib.h> | |
20949 | # include <string.h> | |
20950 | int main () | |
20951 | { | |
20952 | FILE *in = fopen ("./conftest.data", "r"); | |
20953 | if (!in) | |
20954 | return 1; | |
20955 | { | |
20956 | /* Test result for a NULL buffer and a zero size. | |
20957 | Based on a test program from Karl Heuer. */ | |
20958 | char *line = NULL; | |
20959 | size_t siz = 0; | |
20960 | int len = getdelim (&line, &siz, '\n', in); | |
20961 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) | |
20962 | { free (line); fclose (in); return 2; } | |
20963 | free (line); | |
20964 | } | |
20965 | { | |
20966 | /* Test result for a NULL buffer and a non-zero size. | |
20967 | This crashes on FreeBSD 8.0. */ | |
20968 | char *line = NULL; | |
20969 | size_t siz = (size_t)(~0) / 4; | |
20970 | if (getdelim (&line, &siz, '\n', in) == -1) | |
20971 | { fclose (in); return 3; } | |
20972 | free (line); | |
20973 | } | |
20974 | fclose (in); | |
20975 | return 0; | |
20976 | } | |
20977 | ||
20978 | _ACEOF | |
20979 | if ac_fn_c_try_run "$LINENO"; then : | |
20980 | gl_cv_func_working_getdelim=yes | |
20981 | else | |
20982 | gl_cv_func_working_getdelim=no | |
20983 | fi | |
20984 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20985 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20986 | fi | |
20987 | ||
20988 | ||
20989 | fi | |
20990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 | |
20991 | $as_echo "$gl_cv_func_working_getdelim" >&6; } | |
20992 | case "$gl_cv_func_working_getdelim" in | |
20993 | *yes) ;; | |
20994 | *) REPLACE_GETDELIM=1 ;; | |
20995 | esac | |
20996 | else | |
20997 | HAVE_GETDELIM=0 | |
20998 | fi | |
20999 | ||
21000 | if test $ac_cv_have_decl_getdelim = no; then | |
21001 | HAVE_DECL_GETDELIM=0 | |
21002 | fi | |
21003 | ||
21004 | if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then | |
21005 | ||
21006 | ||
21007 | ||
21008 | ||
21009 | ||
21010 | ||
21011 | ||
21012 | ||
21013 | gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" | |
21014 | ||
21015 | ||
21016 | for ac_func in flockfile funlockfile | |
21017 | do : | |
21018 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
21019 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
21020 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
21021 | cat >>confdefs.h <<_ACEOF | |
21022 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
21023 | _ACEOF | |
21024 | ||
21025 | fi | |
21026 | done | |
21027 | ||
21028 | ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" | |
21029 | if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : | |
21030 | ac_have_decl=1 | |
21031 | else | |
21032 | ac_have_decl=0 | |
21033 | fi | |
21034 | ||
21035 | cat >>confdefs.h <<_ACEOF | |
21036 | #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl | |
21037 | _ACEOF | |
21038 | ||
21039 | ||
21040 | fi | |
21041 | ||
21042 | ||
21043 | ||
21044 | ||
21045 | ||
21046 | GNULIB_GETDELIM=1 | |
21047 | ||
21048 | ||
21049 | ||
21050 | ||
21051 | ||
21052 | $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h | |
21053 | ||
21054 | ||
21055 | ||
21056 | ||
21057 | ||
21058 | ||
21059 | ||
21060 | ||
6ec2e0f5 SDJ |
21061 | if test $ac_cv_func_getdtablesize = yes && |
21062 | test $ac_cv_have_decl_getdtablesize = yes; then | |
6ec2e0f5 SDJ |
21063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 |
21064 | $as_echo_n "checking whether getdtablesize works... " >&6; } | |
d0ac1c44 | 21065 | if ${gl_cv_func_getdtablesize_works+:} false; then : |
88b48903 WN |
21066 | $as_echo_n "(cached) " >&6 |
21067 | else | |
c0c3707f CB |
21068 | case "$host_os" in |
21069 | vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; | |
21070 | *) | |
21071 | if test "$cross_compiling" = yes; then : | |
88b48903 | 21072 | case "$host_os" in |
c0c3707f CB |
21073 | cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows |
21074 | gl_cv_func_getdtablesize_works="guessing no" ;; | |
21075 | *) gl_cv_func_getdtablesize_works="guessing yes" ;; | |
21076 | esac | |
21077 | ||
88b48903 WN |
21078 | else |
21079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21080 | /* end confdefs.h. */ | |
21081 | ||
c0c3707f | 21082 | #include <unistd.h> |
9c9d63b1 PM |
21083 | |
21084 | ||
21085 | $gl_mda_defines | |
21086 | ||
21087 | ||
6ec2e0f5 SDJ |
21088 | int |
21089 | main () | |
88b48903 | 21090 | { |
6ec2e0f5 | 21091 | int size = getdtablesize(); |
9c9d63b1 PM |
21092 | if (dup2 (0, getdtablesize()) != -1) |
21093 | return 1; | |
21094 | if (size != getdtablesize()) | |
21095 | return 2; | |
6ec2e0f5 SDJ |
21096 | |
21097 | ; | |
21098 | return 0; | |
88b48903 WN |
21099 | } |
21100 | _ACEOF | |
21101 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 21102 | gl_cv_func_getdtablesize_works=yes |
88b48903 | 21103 | else |
6ec2e0f5 | 21104 | gl_cv_func_getdtablesize_works=no |
88b48903 WN |
21105 | fi |
21106 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21107 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21108 | fi | |
21109 | ||
c0c3707f CB |
21110 | ;; |
21111 | esac | |
88b48903 WN |
21112 | |
21113 | fi | |
6ec2e0f5 SDJ |
21114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 |
21115 | $as_echo "$gl_cv_func_getdtablesize_works" >&6; } | |
21116 | case "$gl_cv_func_getdtablesize_works" in | |
c0c3707f | 21117 | *yes | "no (limitation)") ;; |
6ec2e0f5 | 21118 | *) REPLACE_GETDTABLESIZE=1 ;; |
88b48903 WN |
21119 | esac |
21120 | else | |
6ec2e0f5 | 21121 | HAVE_GETDTABLESIZE=0 |
88b48903 WN |
21122 | fi |
21123 | ||
6ec2e0f5 | 21124 | if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then |
88b48903 WN |
21125 | |
21126 | ||
21127 | ||
21128 | ||
21129 | ||
21130 | ||
21131 | ||
21132 | ||
6ec2e0f5 | 21133 | gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" |
88b48903 | 21134 | |
6ec2e0f5 | 21135 | : |
88b48903 WN |
21136 | fi |
21137 | ||
21138 | ||
21139 | ||
21140 | ||
21141 | ||
6ec2e0f5 | 21142 | GNULIB_GETDTABLESIZE=1 |
88b48903 WN |
21143 | |
21144 | ||
21145 | ||
88b48903 | 21146 | |
88b48903 | 21147 | |
6ec2e0f5 | 21148 | $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h |
88b48903 | 21149 | |
88b48903 | 21150 | |
88b48903 | 21151 | |
88b48903 | 21152 | |
88b48903 | 21153 | |
88b48903 | 21154 | |
88b48903 | 21155 | |
88b48903 WN |
21156 | |
21157 | ||
c17253b9 MF |
21158 | |
21159 | gl_getline_needs_run_time_check=no | |
21160 | ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" | |
21161 | if test "x$ac_cv_func_getline" = xyes; then : | |
21162 | gl_getline_needs_run_time_check=yes | |
21163 | else | |
21164 | am_cv_func_working_getline=no | |
21165 | fi | |
21166 | ||
21167 | if test $gl_getline_needs_run_time_check = yes; then | |
21168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 | |
21169 | $as_echo_n "checking for working getline function... " >&6; } | |
21170 | if ${am_cv_func_working_getline+:} false; then : | |
21171 | $as_echo_n "(cached) " >&6 | |
21172 | else | |
21173 | echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data | |
21174 | if test "$cross_compiling" = yes; then : | |
21175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21176 | /* end confdefs.h. */ | |
21177 | ||
21178 | #include <features.h> | |
21179 | #ifdef __GNU_LIBRARY__ | |
21180 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ | |
21181 | Lucky GNU user | |
21182 | #endif | |
21183 | #endif | |
21184 | ||
21185 | _ACEOF | |
21186 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
21187 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then : | |
21188 | am_cv_func_working_getline="guessing yes" | |
21189 | else | |
21190 | case "$host_os" in | |
21191 | *-musl*) am_cv_func_working_getline="guessing yes" ;; | |
21192 | *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; | |
21193 | esac | |
21194 | ||
21195 | fi | |
21196 | rm -f conftest* | |
21197 | ||
21198 | ||
21199 | else | |
21200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21201 | /* end confdefs.h. */ | |
21202 | ||
21203 | # include <stdio.h> | |
21204 | # include <stdlib.h> | |
21205 | # include <string.h> | |
21206 | int main () | |
21207 | { | |
21208 | FILE *in = fopen ("./conftest.data", "r"); | |
21209 | if (!in) | |
21210 | return 1; | |
21211 | { | |
21212 | /* Test result for a NULL buffer and a zero size. | |
21213 | Based on a test program from Karl Heuer. */ | |
21214 | char *line = NULL; | |
21215 | size_t siz = 0; | |
21216 | int len = getline (&line, &siz, in); | |
21217 | if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) | |
21218 | { free (line); fclose (in); return 2; } | |
21219 | free (line); | |
21220 | } | |
21221 | { | |
21222 | /* Test result for a NULL buffer and a non-zero size. | |
21223 | This crashes on FreeBSD 8.0. */ | |
21224 | char *line = NULL; | |
21225 | size_t siz = (size_t)(~0) / 4; | |
21226 | if (getline (&line, &siz, in) == -1) | |
21227 | { fclose (in); return 3; } | |
21228 | free (line); | |
21229 | } | |
21230 | fclose (in); | |
21231 | return 0; | |
21232 | } | |
21233 | ||
21234 | _ACEOF | |
21235 | if ac_fn_c_try_run "$LINENO"; then : | |
21236 | am_cv_func_working_getline=yes | |
21237 | else | |
21238 | am_cv_func_working_getline=no | |
21239 | fi | |
21240 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21241 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21242 | fi | |
21243 | ||
21244 | ||
21245 | fi | |
21246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 | |
21247 | $as_echo "$am_cv_func_working_getline" >&6; } | |
21248 | fi | |
21249 | ||
21250 | if test $ac_cv_have_decl_getline = no; then | |
21251 | HAVE_DECL_GETLINE=0 | |
21252 | fi | |
21253 | ||
21254 | case "$am_cv_func_working_getline" in | |
21255 | *yes) ;; | |
21256 | *) | |
21257 | REPLACE_GETLINE=1 | |
21258 | ;; | |
21259 | esac | |
21260 | ||
21261 | if test $REPLACE_GETLINE = 1; then | |
21262 | ||
21263 | ||
21264 | ||
21265 | ||
21266 | ||
21267 | ||
21268 | ||
21269 | ||
21270 | gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" | |
21271 | ||
21272 | ||
21273 | : | |
21274 | ||
21275 | fi | |
21276 | ||
21277 | ||
21278 | ||
21279 | ||
21280 | ||
21281 | GNULIB_GETLINE=1 | |
21282 | ||
21283 | ||
21284 | ||
21285 | ||
21286 | ||
21287 | $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h | |
21288 | ||
21289 | ||
21290 | ||
21291 | ||
21292 | ||
21293 | ||
21294 | ||
21295 | ||
21296 | ||
6ec2e0f5 SDJ |
21297 | if test $ac_cv_have_decl_getlogin_r = no; then |
21298 | HAVE_DECL_GETLOGIN_R=0 | |
21299 | fi | |
88b48903 | 21300 | |
88b48903 | 21301 | |
6ec2e0f5 SDJ |
21302 | if test $ac_cv_func_getlogin_r = no; then |
21303 | HAVE_GETLOGIN_R=0 | |
21304 | else | |
21305 | HAVE_GETLOGIN_R=1 | |
21306 | ||
21307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5 | |
21308 | $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; } | |
d0ac1c44 | 21309 | if ${gl_cv_func_getlogin_r_works+:} false; then : |
6ec2e0f5 SDJ |
21310 | $as_echo_n "(cached) " >&6 |
21311 | else | |
88b48903 | 21312 | |
6ec2e0f5 | 21313 | case "$host_os" in |
c0c3707f CB |
21314 | # Guess no on Mac OS X, OSF/1. |
21315 | darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; | |
21316 | # Guess yes otherwise. | |
21317 | *) gl_cv_func_getlogin_r_works="guessing yes" ;; | |
6ec2e0f5 SDJ |
21318 | esac |
21319 | if test "$cross_compiling" = yes; then : | |
21320 | : | |
88b48903 WN |
21321 | else |
21322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21323 | /* end confdefs.h. */ | |
21324 | ||
6ec2e0f5 | 21325 | #include <stddef.h> |
c0c3707f | 21326 | #include <string.h> |
6ec2e0f5 SDJ |
21327 | #include <unistd.h> |
21328 | #if !HAVE_DECL_GETLOGIN_R | |
88b48903 | 21329 | extern |
6ec2e0f5 | 21330 | # ifdef __cplusplus |
88b48903 | 21331 | "C" |
6ec2e0f5 SDJ |
21332 | # endif |
21333 | int getlogin_r (char *, size_t); | |
88b48903 | 21334 | #endif |
6ec2e0f5 SDJ |
21335 | int |
21336 | main (void) | |
88b48903 WN |
21337 | { |
21338 | int result = 0; | |
6ec2e0f5 SDJ |
21339 | char buf[100]; |
21340 | ||
21341 | if (getlogin_r (buf, 0) == 0) | |
c0c3707f | 21342 | result |= 1; |
6ec2e0f5 | 21343 | if (getlogin_r (buf, 1) == 0) |
c0c3707f CB |
21344 | result |= 2; |
21345 | if (getlogin_r (buf, 100) == 0) | |
21346 | { | |
21347 | size_t n = strlen (buf); | |
21348 | if (getlogin_r (buf, n) == 0) | |
21349 | result |= 4; | |
21350 | } | |
88b48903 WN |
21351 | return result; |
21352 | } | |
21353 | _ACEOF | |
21354 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 21355 | gl_cv_func_getlogin_r_works=yes |
88b48903 | 21356 | else |
c0c3707f | 21357 | gl_cv_func_getlogin_r_works=no |
88b48903 WN |
21358 | fi |
21359 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21360 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21361 | fi | |
21362 | ||
21363 | ||
4a626d0a | 21364 | fi |
6ec2e0f5 SDJ |
21365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5 |
21366 | $as_echo "$gl_cv_func_getlogin_r_works" >&6; } | |
21367 | case "$gl_cv_func_getlogin_r_works" in | |
21368 | *yes) ;; | |
21369 | *) REPLACE_GETLOGIN_R=1 ;; | |
21370 | esac | |
21371 | fi | |
21372 | ||
21373 | if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then | |
21374 | ||
21375 | ||
21376 | ||
21377 | ||
21378 | ||
21379 | ||
21380 | ||
21381 | ||
21382 | gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext" | |
4a626d0a | 21383 | |
4a626d0a | 21384 | |
4a626d0a | 21385 | |
4a626d0a | 21386 | |
4a626d0a PA |
21387 | fi |
21388 | ||
21389 | ||
4a626d0a PA |
21390 | |
21391 | ||
21392 | ||
6ec2e0f5 | 21393 | GNULIB_GETLOGIN_R=1 |
4a626d0a PA |
21394 | |
21395 | ||
21396 | ||
21397 | ||
21398 | ||
6ec2e0f5 | 21399 | $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h |
4a626d0a | 21400 | |
4a626d0a PA |
21401 | |
21402 | ||
21403 | ||
21404 | ||
472fa5ee | 21405 | |
4a626d0a | 21406 | |
6ec2e0f5 SDJ |
21407 | ac_found=0 |
21408 | ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h> | |
21409 | " | |
d0ac1c44 | 21410 | if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : |
6ec2e0f5 SDJ |
21411 | ac_have_decl=1 |
21412 | else | |
21413 | ac_have_decl=0 | |
21414 | fi | |
21415 | ||
21416 | cat >>confdefs.h <<_ACEOF | |
21417 | #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl | |
21418 | _ACEOF | |
21419 | if test $ac_have_decl = 1; then : | |
21420 | ac_found=1 | |
21421 | fi | |
21422 | ||
21423 | ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h> | |
21424 | " | |
d0ac1c44 | 21425 | if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : |
6ec2e0f5 SDJ |
21426 | ac_have_decl=1 |
21427 | else | |
21428 | ac_have_decl=0 | |
21429 | fi | |
21430 | ||
21431 | cat >>confdefs.h <<_ACEOF | |
21432 | #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl | |
21433 | _ACEOF | |
21434 | if test $ac_have_decl = 1; then : | |
21435 | ac_found=1 | |
21436 | fi | |
4a626d0a | 21437 | |
6ec2e0f5 SDJ |
21438 | ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h> |
21439 | " | |
d0ac1c44 | 21440 | if test "x$ac_cv_have_decl___argv" = xyes; then : |
6ec2e0f5 SDJ |
21441 | ac_have_decl=1 |
21442 | else | |
21443 | ac_have_decl=0 | |
21444 | fi | |
4a626d0a | 21445 | |
6ec2e0f5 SDJ |
21446 | cat >>confdefs.h <<_ACEOF |
21447 | #define HAVE_DECL___ARGV $ac_have_decl | |
21448 | _ACEOF | |
21449 | if test $ac_have_decl = 1; then : | |
21450 | ac_found=1 | |
21451 | fi | |
4a626d0a PA |
21452 | |
21453 | ||
6ec2e0f5 SDJ |
21454 | # Incur the cost of this test only if none of the above worked. |
21455 | if test $ac_found = 0; then | |
21456 | # On OpenBSD 5.1, using the global __progname variable appears to be | |
21457 | # the only way to implement getprogname. | |
21458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5 | |
21459 | $as_echo_n "checking whether __progname is defined in default libraries... " >&6; } | |
d0ac1c44 | 21460 | if ${gl_cv_var___progname+:} false; then : |
6ec2e0f5 SDJ |
21461 | $as_echo_n "(cached) " >&6 |
21462 | else | |
4a626d0a | 21463 | |
6ec2e0f5 SDJ |
21464 | gl_cv_var___progname= |
21465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21466 | /* end confdefs.h. */ | |
21467 | extern char *__progname; | |
21468 | int | |
21469 | main () | |
21470 | { | |
21471 | return *__progname; | |
21472 | ||
21473 | ; | |
21474 | return 0; | |
21475 | } | |
21476 | _ACEOF | |
21477 | if ac_fn_c_try_link "$LINENO"; then : | |
21478 | gl_cv_var___progname=yes | |
21479 | ||
21480 | fi | |
21481 | rm -f core conftest.err conftest.$ac_objext \ | |
21482 | conftest$ac_exeext conftest.$ac_ext | |
21483 | ||
21484 | ||
21485 | fi | |
21486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5 | |
21487 | $as_echo "$gl_cv_var___progname" >&6; } | |
21488 | if test "$gl_cv_var___progname" = yes; then | |
21489 | ||
21490 | $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h | |
21491 | ||
21492 | fi | |
21493 | fi | |
4a626d0a PA |
21494 | |
21495 | ||
21496 | ||
21497 | ||
21498 | ||
698be2d8 CB |
21499 | if test "$ac_cv_func_getrandom" != yes; then |
21500 | HAVE_GETRANDOM=0 | |
21501 | else | |
21502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5 | |
21503 | $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; } | |
21504 | if ${gl_cv_func_getrandom_ok+:} false; then : | |
21505 | $as_echo_n "(cached) " >&6 | |
21506 | else | |
21507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21508 | /* end confdefs.h. */ | |
9c9d63b1 PM |
21509 | /* Additional includes are needed before <sys/random.h> on uClibc |
21510 | and Mac OS X. */ | |
698be2d8 CB |
21511 | #include <sys/types.h> |
21512 | #include <stdlib.h> | |
21513 | #include <sys/random.h> | |
21514 | ssize_t getrandom (void *, size_t, unsigned int); | |
21515 | ||
21516 | int | |
21517 | main () | |
21518 | { | |
21519 | ||
21520 | ; | |
21521 | return 0; | |
21522 | } | |
21523 | ||
21524 | _ACEOF | |
21525 | if ac_fn_c_try_compile "$LINENO"; then : | |
21526 | gl_cv_func_getrandom_ok=yes | |
21527 | else | |
21528 | gl_cv_func_getrandom_ok=no | |
21529 | fi | |
21530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21531 | ||
21532 | fi | |
21533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5 | |
21534 | $as_echo "$gl_cv_func_getrandom_ok" >&6; } | |
21535 | if test $gl_cv_func_getrandom_ok = no; then | |
21536 | REPLACE_GETRANDOM=1 | |
21537 | fi | |
21538 | fi | |
21539 | ||
21540 | case "$host_os" in | |
21541 | mingw*) | |
21542 | for ac_header in bcrypt.h | |
21543 | do : | |
9c9d63b1 PM |
21544 | ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h> |
21545 | ||
21546 | " | |
698be2d8 CB |
21547 | if test "x$ac_cv_header_bcrypt_h" = xyes; then : |
21548 | cat >>confdefs.h <<_ACEOF | |
21549 | #define HAVE_BCRYPT_H 1 | |
21550 | _ACEOF | |
21551 | ||
21552 | fi | |
21553 | ||
21554 | done | |
21555 | ||
21556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5 | |
21557 | $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; } | |
21558 | if ${gl_cv_lib_assume_bcrypt+:} false; then : | |
21559 | $as_echo_n "(cached) " >&6 | |
21560 | else | |
21561 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21562 | /* end confdefs.h. */ | |
21563 | #include <windows.h> | |
21564 | int | |
21565 | main () | |
21566 | { | |
21567 | #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7) | |
21568 | cannot assume it | |
21569 | #endif | |
21570 | ||
21571 | ; | |
21572 | return 0; | |
21573 | } | |
21574 | ||
21575 | _ACEOF | |
21576 | if ac_fn_c_try_compile "$LINENO"; then : | |
21577 | gl_cv_lib_assume_bcrypt=yes | |
21578 | else | |
21579 | gl_cv_lib_assume_bcrypt=no | |
21580 | fi | |
21581 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21582 | ||
21583 | fi | |
21584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5 | |
21585 | $as_echo "$gl_cv_lib_assume_bcrypt" >&6; } | |
21586 | if test $gl_cv_lib_assume_bcrypt = yes; then | |
21587 | ||
21588 | $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h | |
21589 | ||
21590 | LIB_GETRANDOM='-lbcrypt' | |
21591 | else | |
21592 | LIB_GETRANDOM='-ladvapi32' | |
21593 | fi | |
21594 | ;; | |
21595 | *) | |
21596 | LIB_GETRANDOM= ;; | |
21597 | esac | |
21598 | ||
21599 | ||
21600 | if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then | |
21601 | ||
21602 | ||
21603 | ||
21604 | ||
21605 | ||
21606 | ||
21607 | ||
21608 | ||
21609 | gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext" | |
21610 | ||
21611 | fi | |
21612 | ||
21613 | ||
21614 | ||
21615 | ||
21616 | ||
21617 | GNULIB_GETRANDOM=1 | |
21618 | ||
21619 | ||
21620 | ||
21621 | ||
21622 | ||
21623 | $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h | |
21624 | ||
21625 | ||
21626 | ||
21627 | ||
21628 | ||
21629 | ||
21630 | ||
4a626d0a PA |
21631 | |
21632 | ||
21633 | ||
472fa5ee | 21634 | |
4a626d0a PA |
21635 | |
21636 | gl_gettimeofday_timezone=void | |
21637 | if test $ac_cv_func_gettimeofday != yes; then | |
21638 | HAVE_GETTIMEOFDAY=0 | |
21639 | else | |
4a626d0a PA |
21640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 |
21641 | $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } | |
d0ac1c44 | 21642 | if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : |
4a626d0a PA |
21643 | $as_echo_n "(cached) " >&6 |
21644 | else | |
21645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21646 | /* end confdefs.h. */ | |
21647 | #include <sys/time.h> | |
21648 | struct timeval c; | |
21649 | int gettimeofday (struct timeval *restrict, void *restrict); | |
21650 | ||
21651 | int | |
21652 | main () | |
21653 | { | |
21654 | /* glibc uses struct timezone * rather than the POSIX void * | |
21655 | if _GNU_SOURCE is defined. However, since the only portable | |
21656 | use of gettimeofday uses NULL as the second parameter, and | |
21657 | since the glibc definition is actually more typesafe, it is | |
21658 | not worth wrapping this to get a compliant signature. */ | |
21659 | int (*f) (struct timeval *restrict, void *restrict) | |
21660 | = gettimeofday; | |
21661 | int x = f (&c, 0); | |
21662 | return !(x | c.tv_sec | c.tv_usec); | |
21663 | ||
21664 | ; | |
21665 | return 0; | |
21666 | } | |
21667 | _ACEOF | |
21668 | if ac_fn_c_try_compile "$LINENO"; then : | |
21669 | gl_cv_func_gettimeofday_posix_signature=yes | |
21670 | else | |
21671 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21672 | /* end confdefs.h. */ | |
21673 | #include <sys/time.h> | |
21674 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | |
21675 | ||
21676 | int | |
21677 | main () | |
21678 | { | |
21679 | ||
21680 | ; | |
21681 | return 0; | |
21682 | } | |
21683 | _ACEOF | |
21684 | if ac_fn_c_try_compile "$LINENO"; then : | |
21685 | gl_cv_func_gettimeofday_posix_signature=almost | |
21686 | else | |
21687 | gl_cv_func_gettimeofday_posix_signature=no | |
21688 | fi | |
21689 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21690 | fi | |
21691 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21692 | fi | |
21693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 | |
21694 | $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } | |
21695 | if test $gl_cv_func_gettimeofday_posix_signature = almost; then | |
21696 | gl_gettimeofday_timezone='struct timezone' | |
21697 | elif test $gl_cv_func_gettimeofday_posix_signature != yes; then | |
21698 | REPLACE_GETTIMEOFDAY=1 | |
21699 | fi | |
21700 | if test $REPLACE_STRUCT_TIMEVAL = 1; then | |
21701 | REPLACE_GETTIMEOFDAY=1 | |
21702 | fi | |
c0c3707f CB |
21703 | case "$host_os" in |
21704 | mingw*) REPLACE_GETTIMEOFDAY=1 ;; | |
21705 | esac | |
4a626d0a PA |
21706 | fi |
21707 | ||
21708 | cat >>confdefs.h <<_ACEOF | |
c0c3707f CB |
21709 | #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone |
21710 | _ACEOF | |
88b48903 WN |
21711 | |
21712 | ||
c0c3707f | 21713 | if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then |
88b48903 | 21714 | |
6ec2e0f5 | 21715 | |
6ec2e0f5 | 21716 | |
6ec2e0f5 | 21717 | |
6ec2e0f5 | 21718 | |
6ec2e0f5 SDJ |
21719 | |
21720 | ||
6ec2e0f5 | 21721 | |
c0c3707f | 21722 | gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" |
6ec2e0f5 | 21723 | |
c0c3707f | 21724 | : |
5e8754f9 | 21725 | fi |
6ec2e0f5 SDJ |
21726 | |
21727 | ||
21728 | ||
6ec2e0f5 SDJ |
21729 | |
21730 | ||
5e8754f9 | 21731 | GNULIB_GETTIMEOFDAY=1 |
6ec2e0f5 SDJ |
21732 | |
21733 | ||
21734 | ||
7a6dbc2f SDJ |
21735 | |
21736 | ||
5e8754f9 | 21737 | $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h |
6ec2e0f5 SDJ |
21738 | |
21739 | ||
21740 | ||
6ec2e0f5 | 21741 | |
6ec2e0f5 | 21742 | |
6ec2e0f5 SDJ |
21743 | |
21744 | ||
c0c3707f CB |
21745 | if test $ac_cv_func_glob = no; then |
21746 | HAVE_GLOB=0 | |
21747 | else | |
21748 | ||
21749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5 | |
21750 | $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; } | |
21751 | if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then : | |
6ec2e0f5 SDJ |
21752 | $as_echo_n "(cached) " >&6 |
21753 | else | |
21754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21755 | /* end confdefs.h. */ | |
21756 | #include <gnu-versions.h> | |
c0c3707f | 21757 | char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1]; |
6ec2e0f5 SDJ |
21758 | _ACEOF |
21759 | if ac_fn_c_try_compile "$LINENO"; then : | |
c0c3707f | 21760 | gl_cv_gnu_glob_interface_version_1_2=yes |
6ec2e0f5 | 21761 | else |
c0c3707f | 21762 | gl_cv_gnu_glob_interface_version_1_2=no |
6ec2e0f5 SDJ |
21763 | fi |
21764 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21765 | fi | |
c0c3707f CB |
21766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5 |
21767 | $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; } | |
21768 | if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then | |
21769 | REPLACE_GLOB=1 | |
6ec2e0f5 | 21770 | fi |
6ec2e0f5 | 21771 | |
c0c3707f CB |
21772 | if test $REPLACE_GLOB = 0; then |
21773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5 | |
6ec2e0f5 | 21774 | $as_echo_n "checking whether glob lists broken symlinks... " >&6; } |
d0ac1c44 | 21775 | if ${gl_cv_glob_lists_symlinks+:} false; then : |
6ec2e0f5 SDJ |
21776 | $as_echo_n "(cached) " >&6 |
21777 | else | |
c0c3707f CB |
21778 | if test $cross_compiling != yes; then |
21779 | if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then | |
21780 | gl_cv_glob_lists_symlinks=maybe | |
21781 | else | |
21782 | # If we can't make a symlink, then we cannot test this issue. Be | |
21783 | # pessimistic about this. | |
21784 | gl_cv_glob_lists_symlinks=no | |
21785 | fi | |
21786 | if test $gl_cv_glob_lists_symlinks = maybe; then | |
21787 | if test "$cross_compiling" = yes; then : | |
21788 | : | |
5e8754f9 | 21789 | |
6ec2e0f5 SDJ |
21790 | else |
21791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21792 | /* end confdefs.h. */ | |
6ec2e0f5 | 21793 | #include <stddef.h> |
c0c3707f | 21794 | #include <glob.h> |
6ec2e0f5 SDJ |
21795 | int |
21796 | main () | |
21797 | { | |
21798 | glob_t found; | |
c0c3707f CB |
21799 | if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) |
21800 | return 1; | |
698be2d8 | 21801 | globfree (&found); |
c0c3707f | 21802 | |
6ec2e0f5 SDJ |
21803 | ; |
21804 | return 0; | |
21805 | } | |
4a626d0a | 21806 | _ACEOF |
6ec2e0f5 SDJ |
21807 | if ac_fn_c_try_run "$LINENO"; then : |
21808 | gl_cv_glob_lists_symlinks=yes | |
21809 | else | |
21810 | gl_cv_glob_lists_symlinks=no | |
21811 | fi | |
21812 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21813 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21814 | fi | |
88b48903 | 21815 | |
c0c3707f CB |
21816 | fi |
21817 | rm -f conf$$-globtest | |
21818 | else | |
21819 | gl_cv_glob_lists_symlinks="$gl_cross_guess_normal" | |
21820 | fi | |
21821 | ||
4a626d0a | 21822 | fi |
6ec2e0f5 SDJ |
21823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5 |
21824 | $as_echo "$gl_cv_glob_lists_symlinks" >&6; } | |
c0c3707f CB |
21825 | case "$gl_cv_glob_lists_symlinks" in |
21826 | *yes) ;; | |
21827 | *) REPLACE_GLOB=1 ;; | |
21828 | esac | |
21829 | fi | |
21830 | ||
21831 | fi | |
88b48903 | 21832 | |
c0c3707f CB |
21833 | if test $ac_cv_func_glob_pattern_p = no; then |
21834 | HAVE_GLOB_PATTERN_P=0 | |
21835 | else | |
21836 | if test $REPLACE_GLOB = 1; then | |
21837 | REPLACE_GLOB_PATTERN_P=1 | |
6ec2e0f5 SDJ |
21838 | fi |
21839 | fi | |
4a626d0a | 21840 | |
c0c3707f | 21841 | if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then |
4a626d0a | 21842 | |
88b48903 | 21843 | |
c0c3707f | 21844 | GLOB_H='glob.h' |
6ec2e0f5 SDJ |
21845 | if test -n "$GLOB_H"; then |
21846 | GL_GENERATE_GLOB_H_TRUE= | |
21847 | GL_GENERATE_GLOB_H_FALSE='#' | |
21848 | else | |
21849 | GL_GENERATE_GLOB_H_TRUE='#' | |
21850 | GL_GENERATE_GLOB_H_FALSE= | |
21851 | fi | |
88b48903 | 21852 | |
88b48903 | 21853 | |
c0c3707f CB |
21854 | fi |
21855 | ||
21856 | if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then | |
472fa5ee SM |
21857 | |
21858 | ||
21859 | ||
21860 | ||
21861 | ||
21862 | ||
21863 | ||
21864 | ||
21865 | gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext" | |
21866 | ||
21867 | ||
21868 | ||
7a6dbc2f SDJ |
21869 | |
21870 | ||
21871 | ||
472fa5ee | 21872 | |
472fa5ee | 21873 | |
88b48903 | 21874 | |
c0c3707f | 21875 | gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext" |
88b48903 WN |
21876 | |
21877 | ||
21878 | ||
725e2999 JB |
21879 | |
21880 | ||
21881 | ||
c0c3707f CB |
21882 | fi |
21883 | if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then | |
21884 | ||
725e2999 JB |
21885 | |
21886 | ||
21887 | ||
21888 | ||
21889 | ||
21890 | ||
21891 | ||
c0c3707f | 21892 | gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext" |
725e2999 JB |
21893 | |
21894 | fi | |
21895 | ||
725e2999 JB |
21896 | |
21897 | ||
21898 | ||
21899 | ||
c0c3707f CB |
21900 | GNULIB_GLOB=1 |
21901 | ||
21902 | ||
21903 | ||
21904 | ||
21905 | ||
21906 | $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h | |
21907 | ||
21908 | ||
725e2999 JB |
21909 | |
21910 | ||
21911 | ||
5df4cba6 SM |
21912 | LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" |
21913 | ||
21914 | ||
725e2999 | 21915 | |
725e2999 JB |
21916 | |
21917 | ||
21918 | ||
21919 | ||
725e2999 | 21920 | |
c0c3707f CB |
21921 | HAVE_INET_NTOP=1 |
21922 | INET_NTOP_LIB= | |
725e2999 JB |
21923 | |
21924 | ||
21925 | ||
21926 | ||
21927 | if test $ac_cv_header_sys_socket_h != yes; then | |
21928 | for ac_header in winsock2.h | |
21929 | do : | |
21930 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
21931 | if test "x$ac_cv_header_winsock2_h" = xyes; then : | |
21932 | cat >>confdefs.h <<_ACEOF | |
21933 | #define HAVE_WINSOCK2_H 1 | |
21934 | _ACEOF | |
21935 | ||
21936 | fi | |
21937 | ||
21938 | done | |
21939 | ||
21940 | fi | |
21941 | if test "$ac_cv_header_winsock2_h" = yes; then | |
21942 | HAVE_WINSOCK2_H=1 | |
21943 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
21944 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
21945 | else | |
21946 | HAVE_WINSOCK2_H=0 | |
21947 | fi | |
21948 | ||
21949 | ||
21950 | if test $HAVE_WINSOCK2_H = 1; then | |
c0c3707f | 21951 | REPLACE_INET_NTOP=1 |
725e2999 JB |
21952 | ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h> |
21953 | " | |
21954 | if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : | |
21955 | ac_have_decl=1 | |
21956 | else | |
21957 | ac_have_decl=0 | |
21958 | fi | |
21959 | ||
21960 | cat >>confdefs.h <<_ACEOF | |
21961 | #define HAVE_DECL_INET_NTOP $ac_have_decl | |
21962 | _ACEOF | |
21963 | ||
21964 | if test $ac_cv_have_decl_inet_ntop = yes; then | |
725e2999 JB |
21965 | INET_NTOP_LIB="-lws2_32" |
21966 | else | |
21967 | HAVE_DECL_INET_NTOP=0 | |
725e2999 JB |
21968 | fi |
21969 | else | |
21970 | gl_save_LIBS=$LIBS | |
21971 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 | |
21972 | $as_echo_n "checking for library containing inet_ntop... " >&6; } | |
21973 | if ${ac_cv_search_inet_ntop+:} false; then : | |
21974 | $as_echo_n "(cached) " >&6 | |
21975 | else | |
21976 | ac_func_search_save_LIBS=$LIBS | |
21977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21978 | /* end confdefs.h. */ | |
21979 | ||
21980 | /* Override any GCC internal prototype to avoid an error. | |
21981 | Use char because int might match the return type of a GCC | |
21982 | builtin and then its argument prototype would still apply. */ | |
21983 | #ifdef __cplusplus | |
21984 | extern "C" | |
21985 | #endif | |
21986 | char inet_ntop (); | |
21987 | int | |
21988 | main () | |
21989 | { | |
21990 | return inet_ntop (); | |
21991 | ; | |
21992 | return 0; | |
21993 | } | |
21994 | _ACEOF | |
c0c3707f | 21995 | for ac_lib in '' nsl resolv network; do |
725e2999 JB |
21996 | if test -z "$ac_lib"; then |
21997 | ac_res="none required" | |
21998 | else | |
21999 | ac_res=-l$ac_lib | |
22000 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
22001 | fi | |
22002 | if ac_fn_c_try_link "$LINENO"; then : | |
22003 | ac_cv_search_inet_ntop=$ac_res | |
22004 | fi | |
22005 | rm -f core conftest.err conftest.$ac_objext \ | |
22006 | conftest$ac_exeext | |
22007 | if ${ac_cv_search_inet_ntop+:} false; then : | |
22008 | break | |
22009 | fi | |
22010 | done | |
22011 | if ${ac_cv_search_inet_ntop+:} false; then : | |
22012 | ||
22013 | else | |
22014 | ac_cv_search_inet_ntop=no | |
22015 | fi | |
22016 | rm conftest.$ac_ext | |
22017 | LIBS=$ac_func_search_save_LIBS | |
22018 | fi | |
22019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 | |
22020 | $as_echo "$ac_cv_search_inet_ntop" >&6; } | |
22021 | ac_res=$ac_cv_search_inet_ntop | |
22022 | if test "$ac_res" != no; then : | |
22023 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
22024 | ||
22025 | else | |
22026 | for ac_func in inet_ntop | |
22027 | do : | |
22028 | ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" | |
22029 | if test "x$ac_cv_func_inet_ntop" = xyes; then : | |
22030 | cat >>confdefs.h <<_ACEOF | |
22031 | #define HAVE_INET_NTOP 1 | |
22032 | _ACEOF | |
22033 | ||
22034 | fi | |
22035 | done | |
22036 | ||
22037 | if test $ac_cv_func_inet_ntop = no; then | |
22038 | HAVE_INET_NTOP=0 | |
22039 | fi | |
22040 | ||
22041 | fi | |
22042 | ||
22043 | LIBS=$gl_save_LIBS | |
22044 | ||
22045 | if test "$ac_cv_search_inet_ntop" != "no" \ | |
22046 | && test "$ac_cv_search_inet_ntop" != "none required"; then | |
22047 | INET_NTOP_LIB="$ac_cv_search_inet_ntop" | |
22048 | fi | |
22049 | ||
22050 | ||
725e2999 JB |
22051 | ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h> |
22052 | #if HAVE_NETDB_H | |
22053 | # include <netdb.h> | |
22054 | #endif | |
22055 | ||
22056 | " | |
22057 | if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : | |
22058 | ac_have_decl=1 | |
22059 | else | |
22060 | ac_have_decl=0 | |
22061 | fi | |
22062 | ||
22063 | cat >>confdefs.h <<_ACEOF | |
22064 | #define HAVE_DECL_INET_NTOP $ac_have_decl | |
22065 | _ACEOF | |
22066 | ||
22067 | if test $ac_cv_have_decl_inet_ntop = no; then | |
22068 | HAVE_DECL_INET_NTOP=0 | |
22069 | fi | |
22070 | fi | |
22071 | ||
22072 | ||
22073 | if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then | |
22074 | ||
22075 | ||
22076 | ||
22077 | ||
22078 | ||
22079 | ||
22080 | ||
7a6dbc2f | 22081 | |
725e2999 | 22082 | gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext" |
7a6dbc2f SDJ |
22083 | |
22084 | ||
22085 | ||
7a6dbc2f | 22086 | |
725e2999 | 22087 | fi |
7a6dbc2f SDJ |
22088 | |
22089 | ||
22090 | ||
22091 | ||
7a6dbc2f | 22092 | |
725e2999 JB |
22093 | GNULIB_INET_NTOP=1 |
22094 | ||
7a6dbc2f SDJ |
22095 | |
22096 | ||
49e4877c PA |
22097 | |
22098 | ||
88b48903 WN |
22099 | |
22100 | ||
88b48903 WN |
22101 | PRIPTR_PREFIX= |
22102 | if test -n "$STDINT_H"; then | |
9c9d63b1 PM |
22103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22104 | /* end confdefs.h. */ | |
22105 | ||
22106 | #ifdef _WIN64 | |
22107 | LLP64 | |
22108 | #endif | |
22109 | ||
22110 | int | |
22111 | main () | |
22112 | { | |
22113 | ||
22114 | ; | |
22115 | return 0; | |
22116 | } | |
22117 | ||
22118 | _ACEOF | |
22119 | if ac_fn_c_try_compile "$LINENO"; then : | |
22120 | PRIPTR_PREFIX='"l"' | |
22121 | else | |
22122 | PRIPTR_PREFIX='"ll"' | |
22123 | fi | |
22124 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
88b48903 WN |
22125 | else |
22126 | for glpfx in '' l ll I64; do | |
22127 | case $glpfx in | |
22128 | '') gltype1='int';; | |
22129 | l) gltype1='long int';; | |
22130 | ll) gltype1='long long int';; | |
22131 | I64) gltype1='__int64';; | |
22132 | esac | |
22133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22134 | /* end confdefs.h. */ | |
22135 | #include <stdint.h> | |
22136 | extern intptr_t foo; | |
22137 | extern $gltype1 foo; | |
22138 | int | |
22139 | main () | |
22140 | { | |
22141 | ||
22142 | ; | |
22143 | return 0; | |
22144 | } | |
22145 | _ACEOF | |
22146 | if ac_fn_c_try_compile "$LINENO"; then : | |
22147 | PRIPTR_PREFIX='"'$glpfx'"' | |
22148 | fi | |
22149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22150 | test -n "$PRIPTR_PREFIX" && break | |
22151 | done | |
22152 | fi | |
22153 | ||
22154 | ||
22155 | ||
22156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 | |
22157 | $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } | |
d0ac1c44 | 22158 | if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : |
88b48903 WN |
22159 | $as_echo_n "(cached) " >&6 |
22160 | else | |
22161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22162 | /* end confdefs.h. */ | |
22163 | /* Work also in C++ mode. */ | |
22164 | #define __STDC_LIMIT_MACROS 1 | |
22165 | ||
22166 | /* Work if build is not clean. */ | |
22167 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
22168 | ||
22169 | #include <limits.h> | |
22170 | #if HAVE_STDINT_H | |
22171 | #include <stdint.h> | |
22172 | #endif | |
22173 | ||
22174 | #if defined INT32_MAX && defined INTMAX_MAX | |
22175 | #define CONDITION (INT32_MAX < INTMAX_MAX) | |
88b48903 | 22176 | #else |
5df4cba6 | 22177 | #define CONDITION (sizeof (int) < sizeof (long long int)) |
88b48903 WN |
22178 | #endif |
22179 | int test[CONDITION ? 1 : -1]; | |
22180 | int | |
22181 | main () | |
22182 | { | |
22183 | ||
22184 | ; | |
22185 | return 0; | |
22186 | } | |
22187 | _ACEOF | |
22188 | if ac_fn_c_try_compile "$LINENO"; then : | |
22189 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes | |
22190 | else | |
22191 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no | |
22192 | fi | |
22193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22194 | fi | |
22195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 | |
22196 | $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } | |
22197 | if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then | |
22198 | INT32_MAX_LT_INTMAX_MAX=1; | |
22199 | else | |
22200 | INT32_MAX_LT_INTMAX_MAX=0; | |
22201 | fi | |
22202 | ||
22203 | ||
22204 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
22205 | ||
22206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 | |
22207 | $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } | |
d0ac1c44 | 22208 | if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : |
88b48903 WN |
22209 | $as_echo_n "(cached) " >&6 |
22210 | else | |
22211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22212 | /* end confdefs.h. */ | |
22213 | /* Work also in C++ mode. */ | |
22214 | #define __STDC_LIMIT_MACROS 1 | |
22215 | ||
22216 | /* Work if build is not clean. */ | |
22217 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
22218 | ||
22219 | #include <limits.h> | |
22220 | #if HAVE_STDINT_H | |
22221 | #include <stdint.h> | |
22222 | #endif | |
22223 | ||
22224 | #if defined INT64_MAX | |
22225 | #define CONDITION (INT64_MAX == LONG_MAX) | |
88b48903 | 22226 | #else |
5df4cba6 | 22227 | #define CONDITION (sizeof (long long int) == sizeof (long int)) |
88b48903 WN |
22228 | #endif |
22229 | int test[CONDITION ? 1 : -1]; | |
22230 | int | |
22231 | main () | |
22232 | { | |
22233 | ||
22234 | ; | |
22235 | return 0; | |
22236 | } | |
22237 | _ACEOF | |
22238 | if ac_fn_c_try_compile "$LINENO"; then : | |
22239 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes | |
22240 | else | |
22241 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=no | |
22242 | fi | |
22243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22244 | fi | |
22245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 | |
22246 | $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } | |
22247 | if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then | |
22248 | INT64_MAX_EQ_LONG_MAX=1; | |
22249 | else | |
22250 | INT64_MAX_EQ_LONG_MAX=0; | |
22251 | fi | |
22252 | ||
22253 | ||
22254 | else | |
22255 | INT64_MAX_EQ_LONG_MAX=-1 | |
22256 | fi | |
22257 | ||
22258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 | |
22259 | $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } | |
d0ac1c44 | 22260 | if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : |
88b48903 WN |
22261 | $as_echo_n "(cached) " >&6 |
22262 | else | |
22263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22264 | /* end confdefs.h. */ | |
22265 | /* Work also in C++ mode. */ | |
22266 | #define __STDC_LIMIT_MACROS 1 | |
22267 | ||
22268 | /* Work if build is not clean. */ | |
22269 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
22270 | ||
22271 | #include <limits.h> | |
22272 | #if HAVE_STDINT_H | |
22273 | #include <stdint.h> | |
22274 | #endif | |
22275 | ||
22276 | #if defined UINT32_MAX && defined UINTMAX_MAX | |
22277 | #define CONDITION (UINT32_MAX < UINTMAX_MAX) | |
88b48903 | 22278 | #else |
5df4cba6 | 22279 | #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) |
88b48903 WN |
22280 | #endif |
22281 | int test[CONDITION ? 1 : -1]; | |
22282 | int | |
22283 | main () | |
22284 | { | |
22285 | ||
22286 | ; | |
22287 | return 0; | |
22288 | } | |
22289 | _ACEOF | |
22290 | if ac_fn_c_try_compile "$LINENO"; then : | |
22291 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes | |
22292 | else | |
22293 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no | |
22294 | fi | |
22295 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22296 | fi | |
22297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 | |
22298 | $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } | |
22299 | if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then | |
22300 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
22301 | else | |
22302 | UINT32_MAX_LT_UINTMAX_MAX=0; | |
22303 | fi | |
22304 | ||
22305 | ||
22306 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
22307 | ||
22308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 | |
22309 | $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } | |
d0ac1c44 | 22310 | if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : |
88b48903 WN |
22311 | $as_echo_n "(cached) " >&6 |
22312 | else | |
22313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22314 | /* end confdefs.h. */ | |
22315 | /* Work also in C++ mode. */ | |
22316 | #define __STDC_LIMIT_MACROS 1 | |
22317 | ||
22318 | /* Work if build is not clean. */ | |
22319 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
22320 | ||
22321 | #include <limits.h> | |
22322 | #if HAVE_STDINT_H | |
22323 | #include <stdint.h> | |
22324 | #endif | |
22325 | ||
22326 | #if defined UINT64_MAX | |
22327 | #define CONDITION (UINT64_MAX == ULONG_MAX) | |
88b48903 | 22328 | #else |
5df4cba6 | 22329 | #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) |
88b48903 WN |
22330 | #endif |
22331 | int test[CONDITION ? 1 : -1]; | |
22332 | int | |
22333 | main () | |
22334 | { | |
22335 | ||
22336 | ; | |
22337 | return 0; | |
22338 | } | |
22339 | _ACEOF | |
22340 | if ac_fn_c_try_compile "$LINENO"; then : | |
22341 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes | |
22342 | else | |
22343 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no | |
22344 | fi | |
22345 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22346 | fi | |
22347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 | |
22348 | $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } | |
22349 | if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then | |
22350 | UINT64_MAX_EQ_ULONG_MAX=1; | |
22351 | else | |
22352 | UINT64_MAX_EQ_ULONG_MAX=0; | |
22353 | fi | |
22354 | ||
22355 | ||
22356 | else | |
22357 | UINT64_MAX_EQ_ULONG_MAX=-1 | |
22358 | fi | |
22359 | ||
22360 | ||
22361 | ||
22362 | ||
22363 | ||
698be2d8 CB |
22364 | |
22365 | ||
22366 | ||
22367 | if test $ac_cv_func_isblank = no; then | |
22368 | HAVE_ISBLANK=0 | |
22369 | fi | |
22370 | ||
22371 | if test $HAVE_ISBLANK = 0; then | |
22372 | ||
22373 | ||
22374 | ||
22375 | ||
22376 | ||
22377 | ||
22378 | ||
22379 | ||
22380 | gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" | |
22381 | ||
22382 | fi | |
22383 | ||
22384 | ||
22385 | cat >>confdefs.h <<_ACEOF | |
22386 | #define GNULIB_ISBLANK 1 | |
22387 | _ACEOF | |
22388 | ||
22389 | ||
22390 | ||
22391 | ||
22392 | ||
22393 | ||
22394 | ||
22395 | GNULIB_ISBLANK=1 | |
22396 | ||
22397 | ||
22398 | ||
22399 | ||
22400 | ||
22401 | ||
88b48903 WN |
22402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 |
22403 | $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } | |
d0ac1c44 | 22404 | if ${gl_cv_func_isnand_no_libm+:} false; then : |
88b48903 WN |
22405 | $as_echo_n "(cached) " >&6 |
22406 | else | |
22407 | ||
22408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22409 | /* end confdefs.h. */ | |
22410 | #include <math.h> | |
9c9d63b1 | 22411 | #if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
88b48903 WN |
22412 | # undef isnand |
22413 | # define isnand(x) __builtin_isnan ((double)(x)) | |
22414 | #else | |
22415 | # undef isnand | |
22416 | # define isnand(x) isnan ((double)(x)) | |
22417 | #endif | |
22418 | double x; | |
22419 | int | |
22420 | main () | |
22421 | { | |
22422 | return isnand (x); | |
22423 | ; | |
22424 | return 0; | |
22425 | } | |
22426 | _ACEOF | |
22427 | if ac_fn_c_try_link "$LINENO"; then : | |
22428 | gl_cv_func_isnand_no_libm=yes | |
22429 | else | |
22430 | gl_cv_func_isnand_no_libm=no | |
22431 | fi | |
22432 | rm -f core conftest.err conftest.$ac_objext \ | |
22433 | conftest$ac_exeext conftest.$ac_ext | |
22434 | ||
22435 | fi | |
22436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 | |
22437 | $as_echo "$gl_cv_func_isnand_no_libm" >&6; } | |
22438 | ||
22439 | gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm | |
22440 | if test $gl_cv_func_isnand_no_libm = yes; then | |
22441 | ||
22442 | $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h | |
22443 | ||
22444 | fi | |
22445 | ||
22446 | if test $gl_func_isnand_no_libm != yes; then | |
22447 | ||
22448 | ||
22449 | ||
22450 | ||
22451 | ||
22452 | ||
22453 | ||
22454 | ||
22455 | gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" | |
22456 | ||
22457 | ||
22458 | ||
22459 | ||
22460 | fi | |
22461 | ||
22462 | ||
22463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 | |
22464 | $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } | |
d0ac1c44 | 22465 | if ${gl_cv_func_isnanl_no_libm+:} false; then : |
88b48903 WN |
22466 | $as_echo_n "(cached) " >&6 |
22467 | else | |
22468 | ||
22469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22470 | /* end confdefs.h. */ | |
22471 | #include <math.h> | |
9c9d63b1 | 22472 | #if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
88b48903 | 22473 | # undef isnanl |
9c9d63b1 | 22474 | # define isnanl(x) __builtin_isnan ((long double)(x)) |
88b48903 WN |
22475 | #elif defined isnan |
22476 | # undef isnanl | |
22477 | # define isnanl(x) isnan ((long double)(x)) | |
22478 | #endif | |
22479 | long double x; | |
22480 | int | |
22481 | main () | |
22482 | { | |
22483 | return isnanl (x); | |
22484 | ; | |
22485 | return 0; | |
22486 | } | |
22487 | _ACEOF | |
22488 | if ac_fn_c_try_link "$LINENO"; then : | |
22489 | gl_cv_func_isnanl_no_libm=yes | |
22490 | else | |
22491 | gl_cv_func_isnanl_no_libm=no | |
22492 | fi | |
22493 | rm -f core conftest.err conftest.$ac_objext \ | |
22494 | conftest$ac_exeext conftest.$ac_ext | |
22495 | ||
22496 | fi | |
22497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 | |
22498 | $as_echo "$gl_cv_func_isnanl_no_libm" >&6; } | |
22499 | ||
22500 | gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm | |
22501 | if test $gl_func_isnanl_no_libm = yes; then | |
22502 | ||
22503 | ||
22504 | ||
22505 | ||
22506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 | |
22507 | $as_echo_n "checking whether isnanl works... " >&6; } | |
d0ac1c44 | 22508 | if ${gl_cv_func_isnanl_works+:} false; then : |
88b48903 WN |
22509 | $as_echo_n "(cached) " >&6 |
22510 | else | |
22511 | ||
22512 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
22513 | case "$host_os" in |
22514 | mingw*) # Guess yes on mingw, no on MSVC. | |
22515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22516 | /* end confdefs.h. */ | |
22517 | ||
22518 | #ifdef __MINGW32__ | |
22519 | Known | |
22520 | #endif | |
22521 | ||
22522 | _ACEOF | |
22523 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22524 | $EGREP "Known" >/dev/null 2>&1; then : | |
4a626d0a | 22525 | gl_cv_func_isnanl_works="guessing yes" |
c0c3707f CB |
22526 | else |
22527 | gl_cv_func_isnanl_works="guessing no" | |
22528 | fi | |
22529 | rm -f conftest* | |
22530 | ||
22531 | ;; | |
22532 | *) gl_cv_func_isnanl_works="guessing yes" ;; | |
22533 | esac | |
22534 | ||
88b48903 WN |
22535 | else |
22536 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22537 | /* end confdefs.h. */ | |
22538 | ||
22539 | #include <float.h> | |
22540 | #include <limits.h> | |
22541 | #include <math.h> | |
9c9d63b1 | 22542 | #if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
88b48903 | 22543 | # undef isnanl |
9c9d63b1 | 22544 | # define isnanl(x) __builtin_isnan ((long double)(x)) |
88b48903 WN |
22545 | #elif defined isnan |
22546 | # undef isnanl | |
22547 | # define isnanl(x) isnan ((long double)(x)) | |
22548 | #endif | |
22549 | #define NWORDS \ | |
22550 | ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
22551 | typedef union { unsigned int word[NWORDS]; long double value; } | |
22552 | memory_long_double; | |
22553 | /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the | |
22554 | runtime type conversion. */ | |
22555 | #ifdef __sgi | |
22556 | static long double NaNl () | |
22557 | { | |
22558 | double zero = 0.0; | |
22559 | return zero / zero; | |
22560 | } | |
22561 | #else | |
22562 | # define NaNl() (0.0L / 0.0L) | |
22563 | #endif | |
22564 | int main () | |
22565 | { | |
22566 | int result = 0; | |
22567 | ||
22568 | if (!isnanl (NaNl ())) | |
22569 | result |= 1; | |
22570 | ||
22571 | { | |
22572 | memory_long_double m; | |
22573 | unsigned int i; | |
22574 | ||
22575 | /* The isnanl function should be immune against changes in the sign bit and | |
22576 | in the mantissa bits. The xor operation twiddles a bit that can only be | |
22577 | a sign bit or a mantissa bit (since the exponent never extends to | |
22578 | bit 31). */ | |
22579 | m.value = NaNl (); | |
22580 | m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); | |
22581 | for (i = 0; i < NWORDS; i++) | |
22582 | m.word[i] |= 1; | |
22583 | if (!isnanl (m.value)) | |
22584 | result |= 1; | |
22585 | } | |
22586 | ||
22587 | #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 | |
22588 | /* Representation of an 80-bit 'long double' as an initializer for a sequence | |
22589 | of 'unsigned int' words. */ | |
22590 | # ifdef WORDS_BIGENDIAN | |
22591 | # define LDBL80_WORDS(exponent,manthi,mantlo) \ | |
22592 | { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ | |
4a626d0a | 22593 | ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ |
88b48903 WN |
22594 | (unsigned int) (mantlo) << 16 \ |
22595 | } | |
22596 | # else | |
22597 | # define LDBL80_WORDS(exponent,manthi,mantlo) \ | |
22598 | { mantlo, manthi, exponent } | |
22599 | # endif | |
22600 | { /* Quiet NaN. */ | |
22601 | static memory_long_double x = | |
22602 | { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; | |
22603 | if (!isnanl (x.value)) | |
22604 | result |= 2; | |
22605 | } | |
22606 | { | |
22607 | /* Signalling NaN. */ | |
22608 | static memory_long_double x = | |
22609 | { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; | |
22610 | if (!isnanl (x.value)) | |
22611 | result |= 2; | |
22612 | } | |
4a626d0a | 22613 | /* isnanl should return something even for noncanonical values. */ |
88b48903 WN |
22614 | { /* Pseudo-NaN. */ |
22615 | static memory_long_double x = | |
22616 | { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; | |
4a626d0a | 22617 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
22618 | result |= 4; |
22619 | } | |
22620 | { /* Pseudo-Infinity. */ | |
22621 | static memory_long_double x = | |
22622 | { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; | |
4a626d0a | 22623 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
22624 | result |= 8; |
22625 | } | |
22626 | { /* Pseudo-Zero. */ | |
22627 | static memory_long_double x = | |
22628 | { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; | |
4a626d0a | 22629 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
22630 | result |= 16; |
22631 | } | |
22632 | { /* Unnormalized number. */ | |
22633 | static memory_long_double x = | |
22634 | { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; | |
4a626d0a | 22635 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
22636 | result |= 32; |
22637 | } | |
22638 | { /* Pseudo-Denormal. */ | |
22639 | static memory_long_double x = | |
22640 | { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; | |
4a626d0a | 22641 | if (isnanl (x.value) && !isnanl (x.value)) |
88b48903 WN |
22642 | result |= 64; |
22643 | } | |
22644 | #endif | |
22645 | ||
22646 | return result; | |
22647 | } | |
22648 | _ACEOF | |
22649 | if ac_fn_c_try_run "$LINENO"; then : | |
22650 | gl_cv_func_isnanl_works=yes | |
22651 | else | |
22652 | gl_cv_func_isnanl_works=no | |
22653 | fi | |
22654 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22655 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22656 | fi | |
22657 | ||
22658 | ||
22659 | fi | |
22660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 | |
22661 | $as_echo "$gl_cv_func_isnanl_works" >&6; } | |
22662 | ||
22663 | case "$gl_cv_func_isnanl_works" in | |
22664 | *yes) ;; | |
22665 | *) gl_func_isnanl_no_libm=no ;; | |
22666 | esac | |
22667 | fi | |
22668 | if test $gl_func_isnanl_no_libm = yes; then | |
22669 | ||
22670 | $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h | |
22671 | ||
22672 | fi | |
22673 | ||
22674 | if test $gl_func_isnanl_no_libm != yes; then | |
22675 | ||
22676 | ||
22677 | ||
22678 | ||
22679 | ||
22680 | ||
22681 | ||
22682 | ||
22683 | gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" | |
22684 | ||
22685 | ||
22686 | ||
22687 | ||
c0c3707f | 22688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 |
88b48903 | 22689 | $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } |
d0ac1c44 | 22690 | if ${gl_cv_cc_long_double_expbit0+:} false; then : |
88b48903 WN |
22691 | $as_echo_n "(cached) " >&6 |
22692 | else | |
22693 | ||
22694 | if test "$cross_compiling" = yes; then : | |
22695 | ||
22696 | gl_cv_cc_long_double_expbit0="unknown" | |
c0c3707f CB |
22697 | case "$host_os" in |
22698 | mingw*) # On native Windows (little-endian), we know the result | |
22699 | # in two cases: mingw, MSVC. | |
22700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22701 | /* end confdefs.h. */ | |
22702 | ||
22703 | #ifdef __MINGW32__ | |
22704 | Known | |
22705 | #endif | |
22706 | ||
22707 | _ACEOF | |
22708 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22709 | $EGREP "Known" >/dev/null 2>&1; then : | |
22710 | gl_cv_cc_long_double_expbit0="word 2 bit 0" | |
22711 | fi | |
22712 | rm -f conftest* | |
22713 | ||
22714 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22715 | /* end confdefs.h. */ | |
22716 | ||
22717 | #ifdef _MSC_VER | |
22718 | Known | |
22719 | #endif | |
22720 | ||
22721 | _ACEOF | |
22722 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22723 | $EGREP "Known" >/dev/null 2>&1; then : | |
22724 | gl_cv_cc_long_double_expbit0="word 1 bit 20" | |
22725 | fi | |
22726 | rm -f conftest* | |
22727 | ||
22728 | ;; | |
22729 | esac | |
88b48903 WN |
22730 | |
22731 | else | |
22732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22733 | /* end confdefs.h. */ | |
22734 | ||
22735 | #include <float.h> | |
22736 | #include <stddef.h> | |
22737 | #include <stdio.h> | |
22738 | #include <string.h> | |
22739 | #define NWORDS \ | |
22740 | ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
22741 | typedef union { long double value; unsigned int word[NWORDS]; } | |
22742 | memory_long_double; | |
22743 | static unsigned int ored_words[NWORDS]; | |
22744 | static unsigned int anded_words[NWORDS]; | |
698be2d8 | 22745 | static void add_to_ored_words (long double *x) |
88b48903 WN |
22746 | { |
22747 | memory_long_double m; | |
22748 | size_t i; | |
22749 | /* Clear it first, in case | |
22750 | sizeof (long double) < sizeof (memory_long_double). */ | |
22751 | memset (&m, 0, sizeof (memory_long_double)); | |
698be2d8 | 22752 | m.value = *x; |
88b48903 WN |
22753 | for (i = 0; i < NWORDS; i++) |
22754 | { | |
22755 | ored_words[i] |= m.word[i]; | |
22756 | anded_words[i] &= m.word[i]; | |
22757 | } | |
22758 | } | |
22759 | int main () | |
22760 | { | |
698be2d8 | 22761 | static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L }; |
88b48903 WN |
22762 | size_t j; |
22763 | FILE *fp = fopen ("conftest.out", "w"); | |
22764 | if (fp == NULL) | |
22765 | return 1; | |
22766 | for (j = 0; j < NWORDS; j++) | |
22767 | anded_words[j] = ~ (unsigned int) 0; | |
698be2d8 CB |
22768 | for (j = 0; j < 5; j++) |
22769 | add_to_ored_words (&samples[j]); | |
88b48903 WN |
22770 | /* Remove bits that are common (e.g. if representation of the first mantissa |
22771 | bit is explicit). */ | |
22772 | for (j = 0; j < NWORDS; j++) | |
22773 | ored_words[j] &= ~anded_words[j]; | |
22774 | /* Now find the nonzero word. */ | |
22775 | for (j = 0; j < NWORDS; j++) | |
22776 | if (ored_words[j] != 0) | |
22777 | break; | |
22778 | if (j < NWORDS) | |
22779 | { | |
22780 | size_t i; | |
22781 | for (i = j + 1; i < NWORDS; i++) | |
22782 | if (ored_words[i] != 0) | |
22783 | { | |
22784 | fprintf (fp, "unknown"); | |
22785 | return (fclose (fp) != 0); | |
22786 | } | |
22787 | for (i = 0; ; i++) | |
22788 | if ((ored_words[j] >> i) & 1) | |
22789 | { | |
22790 | fprintf (fp, "word %d bit %d", (int) j, (int) i); | |
22791 | return (fclose (fp) != 0); | |
22792 | } | |
22793 | } | |
22794 | fprintf (fp, "unknown"); | |
22795 | return (fclose (fp) != 0); | |
22796 | } | |
22797 | ||
22798 | _ACEOF | |
22799 | if ac_fn_c_try_run "$LINENO"; then : | |
22800 | gl_cv_cc_long_double_expbit0=`cat conftest.out` | |
22801 | else | |
22802 | gl_cv_cc_long_double_expbit0="unknown" | |
22803 | fi | |
22804 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22805 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22806 | fi | |
22807 | ||
22808 | rm -f conftest.out | |
22809 | ||
22810 | fi | |
22811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 | |
22812 | $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } | |
22813 | case "$gl_cv_cc_long_double_expbit0" in | |
22814 | word*bit*) | |
22815 | word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` | |
22816 | bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` | |
22817 | ||
22818 | cat >>confdefs.h <<_ACEOF | |
22819 | #define LDBL_EXPBIT0_WORD $word | |
22820 | _ACEOF | |
22821 | ||
22822 | ||
22823 | cat >>confdefs.h <<_ACEOF | |
22824 | #define LDBL_EXPBIT0_BIT $bit | |
22825 | _ACEOF | |
22826 | ||
22827 | ;; | |
22828 | esac | |
22829 | ||
22830 | ||
22831 | ||
22832 | fi | |
22833 | ||
22834 | ||
5df4cba6 SM |
22835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 |
22836 | $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; } | |
22837 | if ${gl_cv_c___inline+:} false; then : | |
22838 | $as_echo_n "(cached) " >&6 | |
22839 | else | |
22840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22841 | /* end confdefs.h. */ | |
22842 | typedef int foo_t; | |
22843 | static __inline foo_t foo (void) { return 0; } | |
22844 | int | |
22845 | main () | |
22846 | { | |
22847 | return foo (); | |
22848 | ; | |
22849 | return 0; | |
22850 | } | |
22851 | _ACEOF | |
22852 | if ac_fn_c_try_compile "$LINENO"; then : | |
22853 | gl_cv_c___inline=yes | |
22854 | else | |
22855 | gl_cv_c___inline=no | |
22856 | fi | |
22857 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22858 | fi | |
22859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 | |
22860 | $as_echo "$gl_cv_c___inline" >&6; } | |
22861 | if test $gl_cv_c___inline = yes; then | |
22862 | ||
22863 | $as_echo "#define HAVE___INLINE 1" >>confdefs.h | |
22864 | ||
22865 | fi | |
22866 | ||
22867 | ||
22868 | ||
22869 | ||
22870 | ||
22871 | LOCALCHARSET_TESTS_ENVIRONMENT= | |
22872 | ||
22873 | ||
22874 | ||
22875 | ||
22876 | ||
22877 | ||
22878 | ||
22879 | ||
22880 | ||
22881 | ||
22882 | ||
22883 | case "$host_os" in | |
22884 | solaris*) | |
22885 | ||
22886 | $as_echo "#define _LCONV_C99 1" >>confdefs.h | |
22887 | ||
22888 | ;; | |
22889 | esac | |
22890 | ||
22891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 | |
22892 | $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } | |
22893 | if ${gl_cv_header_locale_h_posix2001+:} false; then : | |
22894 | $as_echo_n "(cached) " >&6 | |
22895 | else | |
22896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22897 | /* end confdefs.h. */ | |
22898 | #include <locale.h> | |
22899 | int x = LC_MESSAGES; | |
22900 | int y = sizeof (((struct lconv *) 0)->decimal_point); | |
22901 | int | |
22902 | main () | |
22903 | { | |
22904 | ||
22905 | ; | |
22906 | return 0; | |
22907 | } | |
22908 | _ACEOF | |
22909 | if ac_fn_c_try_compile "$LINENO"; then : | |
22910 | gl_cv_header_locale_h_posix2001=yes | |
22911 | else | |
22912 | gl_cv_header_locale_h_posix2001=no | |
22913 | fi | |
22914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22915 | fi | |
22916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 | |
22917 | $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } | |
22918 | ||
22919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 | |
22920 | $as_echo_n "checking whether struct lconv is properly defined... " >&6; } | |
22921 | if ${gl_cv_sys_struct_lconv_ok+:} false; then : | |
c0c3707f CB |
22922 | $as_echo_n "(cached) " >&6 |
22923 | else | |
22924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22925 | /* end confdefs.h. */ | |
5df4cba6 SM |
22926 | #include <locale.h> |
22927 | struct lconv l; | |
22928 | int x = sizeof (l.decimal_point); | |
22929 | int y = sizeof (l.int_p_cs_precedes); | |
c0c3707f CB |
22930 | int |
22931 | main () | |
22932 | { | |
5df4cba6 | 22933 | |
c0c3707f CB |
22934 | ; |
22935 | return 0; | |
22936 | } | |
22937 | _ACEOF | |
22938 | if ac_fn_c_try_compile "$LINENO"; then : | |
5df4cba6 | 22939 | gl_cv_sys_struct_lconv_ok=yes |
c0c3707f | 22940 | else |
5df4cba6 | 22941 | gl_cv_sys_struct_lconv_ok=no |
c0c3707f CB |
22942 | fi |
22943 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5df4cba6 | 22944 | |
c0c3707f | 22945 | fi |
5df4cba6 SM |
22946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 |
22947 | $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } | |
22948 | if test $gl_cv_sys_struct_lconv_ok = no; then | |
22949 | case "$host_os" in | |
22950 | mingw*) | |
22951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22952 | /* end confdefs.h. */ | |
c0c3707f | 22953 | |
5df4cba6 SM |
22954 | #ifdef _MSC_VER |
22955 | Special | |
22956 | #endif | |
22957 | ||
22958 | _ACEOF | |
22959 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
22960 | $EGREP "Special" >/dev/null 2>&1; then : | |
22961 | ||
22962 | else | |
22963 | REPLACE_STRUCT_LCONV=1 | |
22964 | fi | |
22965 | rm -f conftest* | |
c0c3707f | 22966 | |
5df4cba6 SM |
22967 | ;; |
22968 | *) REPLACE_STRUCT_LCONV=1 ;; | |
22969 | esac | |
c0c3707f | 22970 | fi |
88b48903 WN |
22971 | |
22972 | ||
88b48903 WN |
22973 | |
22974 | ||
472fa5ee | 22975 | |
5df4cba6 SM |
22976 | |
22977 | ||
22978 | ||
22979 | ||
22980 | if test $gl_cv_have_include_next = yes; then | |
22981 | gl_cv_next_locale_h='<'locale.h'>' | |
22982 | else | |
22983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5 | |
22984 | $as_echo_n "checking absolute name of <locale.h>... " >&6; } | |
22985 | if ${gl_cv_next_locale_h+:} false; then : | |
22986 | $as_echo_n "(cached) " >&6 | |
22987 | else | |
22988 | ||
22989 | ||
22990 | ||
22991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22992 | /* end confdefs.h. */ | |
22993 | #include <locale.h> | |
22994 | _ACEOF | |
22995 | case "$host_os" in | |
22996 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22997 | *) gl_absname_cpp="$ac_cpp" ;; | |
22998 | esac | |
22999 | ||
23000 | case "$host_os" in | |
23001 | mingw*) | |
23002 | gl_dirsep_regex='[/\\]' | |
23003 | ;; | |
23004 | *) | |
23005 | gl_dirsep_regex='\/' | |
23006 | ;; | |
23007 | esac | |
23008 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
23009 | gl_header_literal_regex=`echo 'locale.h' \ | |
23010 | | sed -e "$gl_make_literal_regex_sed"` | |
23011 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23012 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23013 | s|^/[^/]|//&| | |
23014 | p | |
23015 | q | |
23016 | }' | |
23017 | ||
23018 | gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23019 | sed -n "$gl_absolute_header_sed"` | |
23020 | ||
23021 | gl_header=$gl_cv_absolute_locale_h | |
23022 | gl_cv_next_locale_h='"'$gl_header'"' | |
23023 | ||
23024 | ||
23025 | fi | |
23026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 | |
23027 | $as_echo "$gl_cv_next_locale_h" >&6; } | |
23028 | fi | |
23029 | NEXT_LOCALE_H=$gl_cv_next_locale_h | |
23030 | ||
23031 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
23032 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23033 | gl_next_as_first_directive='<'locale.h'>' | |
23034 | else | |
23035 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23036 | gl_next_as_first_directive=$gl_cv_next_locale_h | |
23037 | fi | |
23038 | NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive | |
23039 | ||
23040 | ||
23041 | ||
23042 | ||
23043 | ||
23044 | ||
23045 | ||
23046 | ||
472fa5ee SM |
23047 | |
23048 | ||
23049 | ||
5abebf3c CB |
23050 | if test "$gl_threads_api" = posix; then |
23051 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the | |
23052 | # pthread_rwlock_* functions. | |
c0c3707f | 23053 | has_rwlock=false |
5abebf3c CB |
23054 | ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h> |
23055 | " | |
23056 | if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : | |
c0c3707f | 23057 | has_rwlock=true |
5abebf3c CB |
23058 | |
23059 | $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h | |
23060 | ||
23061 | fi | |
23062 | ||
c0c3707f CB |
23063 | if $has_rwlock; then |
23064 | ||
23065 | ||
23066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 | |
23067 | $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } | |
23068 | if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : | |
23069 | $as_echo_n "(cached) " >&6 | |
23070 | else | |
23071 | save_LIBS="$LIBS" | |
23072 | LIBS="$LIBS $LIBMULTITHREAD" | |
23073 | if test "$cross_compiling" = yes; then : | |
23074 | case "$host_os" in | |
23075 | # Guess no on glibc systems. | |
23076 | *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
23077 | # Guess no on musl systems. | |
23078 | *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
23079 | # Guess no on bionic systems. | |
23080 | *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
23081 | # Guess yes on native Windows with the mingw-w64 winpthreads library. | |
23082 | # Guess no on native Windows with the gnulib windows-rwlock module. | |
23083 | mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | |
23084 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" | |
23085 | else | |
23086 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" | |
23087 | fi | |
23088 | ;; | |
23089 | # If we don't know, obey --enable-cross-guesses. | |
23090 | *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; | |
23091 | esac | |
23092 | ||
23093 | else | |
23094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23095 | /* end confdefs.h. */ | |
23096 | ||
23097 | #include <errno.h> | |
23098 | #include <pthread.h> | |
23099 | #include <stdlib.h> | |
23100 | #include <unistd.h> | |
23101 | ||
23102 | #define SUCCEED() exit (0) | |
23103 | #define FAILURE() exit (1) | |
23104 | #define UNEXPECTED(n) (exit (10 + (n))) | |
23105 | ||
23106 | /* The main thread creates the waiting writer and the requesting reader threads | |
23107 | in the default way; this guarantees that they have the same priority. | |
23108 | We can reuse the main thread as first reader thread. */ | |
23109 | ||
23110 | static pthread_rwlock_t lock; | |
23111 | static pthread_t reader1; | |
23112 | static pthread_t writer; | |
23113 | static pthread_t reader2; | |
23114 | static pthread_t timer; | |
23115 | /* Used to pass control from writer to reader2 and from reader2 to timer, | |
23116 | as in a relay race. | |
23117 | Passing control from one running thread to another running thread | |
23118 | is most likely faster than to create the second thread. */ | |
23119 | static pthread_mutex_t baton; | |
23120 | ||
23121 | static void * | |
23122 | timer_func (void *ignored) | |
23123 | { | |
23124 | /* Step 13 (can be before or after step 12): | |
23125 | The timer thread takes the baton, then waits a moment to make sure | |
23126 | it can tell whether the second reader thread is blocked at step 12. */ | |
23127 | if (pthread_mutex_lock (&baton)) | |
23128 | UNEXPECTED (13); | |
23129 | usleep (100000); | |
23130 | /* By the time we get here, it's clear that the second reader thread is | |
23131 | blocked at step 12. This is the desired behaviour. */ | |
23132 | SUCCEED (); | |
23133 | } | |
23134 | ||
23135 | static void * | |
23136 | reader2_func (void *ignored) | |
23137 | { | |
23138 | int err; | |
23139 | ||
23140 | /* Step 8 (can be before or after step 7): | |
23141 | The second reader thread takes the baton, then waits a moment to make sure | |
23142 | the writer thread has reached step 7. */ | |
23143 | if (pthread_mutex_lock (&baton)) | |
23144 | UNEXPECTED (8); | |
23145 | usleep (100000); | |
23146 | /* Step 9: The second reader thread requests the lock. */ | |
23147 | err = pthread_rwlock_tryrdlock (&lock); | |
23148 | if (err == 0) | |
23149 | FAILURE (); | |
23150 | else if (err != EBUSY) | |
23151 | UNEXPECTED (9); | |
23152 | /* Step 10: Launch a timer, to test whether the next call blocks. */ | |
23153 | if (pthread_create (&timer, NULL, timer_func, NULL)) | |
23154 | UNEXPECTED (10); | |
23155 | /* Step 11: Release the baton. */ | |
23156 | if (pthread_mutex_unlock (&baton)) | |
23157 | UNEXPECTED (11); | |
23158 | /* Step 12: The second reader thread requests the lock. */ | |
23159 | err = pthread_rwlock_rdlock (&lock); | |
23160 | if (err == 0) | |
23161 | FAILURE (); | |
23162 | else | |
23163 | UNEXPECTED (12); | |
23164 | } | |
23165 | ||
23166 | static void * | |
23167 | writer_func (void *ignored) | |
23168 | { | |
23169 | /* Step 4: Take the baton, so that the second reader thread does not go ahead | |
23170 | too early. */ | |
23171 | if (pthread_mutex_lock (&baton)) | |
23172 | UNEXPECTED (4); | |
23173 | /* Step 5: Create the second reader thread. */ | |
23174 | if (pthread_create (&reader2, NULL, reader2_func, NULL)) | |
23175 | UNEXPECTED (5); | |
23176 | /* Step 6: Release the baton. */ | |
23177 | if (pthread_mutex_unlock (&baton)) | |
23178 | UNEXPECTED (6); | |
23179 | /* Step 7: The writer thread requests the lock. */ | |
23180 | if (pthread_rwlock_wrlock (&lock)) | |
23181 | UNEXPECTED (7); | |
23182 | return NULL; | |
23183 | } | |
23184 | ||
23185 | int | |
23186 | main () | |
23187 | { | |
23188 | reader1 = pthread_self (); | |
23189 | ||
23190 | /* Step 1: The main thread initializes the lock and the baton. */ | |
23191 | if (pthread_rwlock_init (&lock, NULL)) | |
23192 | UNEXPECTED (1); | |
23193 | if (pthread_mutex_init (&baton, NULL)) | |
23194 | UNEXPECTED (1); | |
23195 | /* Step 2: The main thread acquires the lock as a reader. */ | |
23196 | if (pthread_rwlock_rdlock (&lock)) | |
23197 | UNEXPECTED (2); | |
23198 | /* Step 3: Create the writer thread. */ | |
23199 | if (pthread_create (&writer, NULL, writer_func, NULL)) | |
23200 | UNEXPECTED (3); | |
23201 | /* Job done. Go to sleep. */ | |
23202 | for (;;) | |
23203 | { | |
23204 | sleep (1); | |
23205 | } | |
23206 | } | |
23207 | ||
23208 | _ACEOF | |
23209 | if ac_fn_c_try_run "$LINENO"; then : | |
23210 | gl_cv_pthread_rwlock_rdlock_prefer_writer=yes | |
23211 | else | |
23212 | gl_cv_pthread_rwlock_rdlock_prefer_writer=no | |
23213 | fi | |
23214 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23215 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23216 | fi | |
23217 | ||
23218 | LIBS="$save_LIBS" | |
23219 | ||
23220 | fi | |
23221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 | |
23222 | $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } | |
23223 | case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in | |
23224 | *yes) | |
23225 | ||
23226 | $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h | |
23227 | ||
23228 | ;; | |
23229 | esac | |
23230 | ||
23231 | fi | |
5abebf3c CB |
23232 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
23233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23234 | /* end confdefs.h. */ | |
23235 | ||
23236 | #include <pthread.h> | |
23237 | int | |
23238 | main () | |
23239 | { | |
23240 | ||
23241 | #if __FreeBSD__ == 4 | |
23242 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | |
23243 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ | |
23244 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) | |
23245 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." | |
23246 | #else | |
23247 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | |
23248 | return !x; | |
23249 | #endif | |
23250 | ||
23251 | ; | |
23252 | return 0; | |
23253 | } | |
23254 | _ACEOF | |
23255 | if ac_fn_c_try_compile "$LINENO"; then : | |
23256 | ||
23257 | $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h | |
23258 | ||
23259 | fi | |
23260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23261 | fi | |
23262 | : | |
23263 | ||
23264 | ||
23265 | ||
23266 | cat >>confdefs.h <<_ACEOF | |
23267 | #define GNULIB_LOCK 1 | |
23268 | _ACEOF | |
23269 | ||
23270 | ||
23271 | ||
23272 | ||
88b48903 | 23273 | |
472fa5ee | 23274 | |
f45c62c4 YQ |
23275 | if test $ac_cv_func_lstat = yes; then |
23276 | ||
c0c3707f CB |
23277 | case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in |
23278 | solaris* | *no) | |
f45c62c4 YQ |
23279 | REPLACE_LSTAT=1 |
23280 | ;; | |
23281 | esac | |
23282 | else | |
23283 | HAVE_LSTAT=0 | |
23284 | fi | |
23285 | ||
23286 | if test $REPLACE_LSTAT = 1; then | |
23287 | ||
23288 | ||
23289 | ||
23290 | ||
23291 | ||
23292 | ||
23293 | ||
23294 | ||
23295 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" | |
23296 | ||
23297 | : | |
23298 | fi | |
23299 | ||
23300 | ||
23301 | ||
23302 | ||
23303 | ||
23304 | GNULIB_LSTAT=1 | |
23305 | ||
23306 | ||
23307 | ||
23308 | ||
23309 | ||
23310 | $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h | |
23311 | ||
23312 | ||
23313 | ||
23314 | ||
23315 | ||
23316 | ||
6a29c58e YQ |
23317 | if test $gl_cv_func_malloc_posix = yes; then |
23318 | ||
23319 | $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h | |
23320 | ||
23321 | else | |
23322 | REPLACE_MALLOC=1 | |
23323 | fi | |
23324 | ||
23325 | if test $REPLACE_MALLOC = 1; then | |
23326 | ||
23327 | ||
23328 | ||
23329 | ||
23330 | ||
23331 | ||
23332 | ||
23333 | ||
23334 | gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" | |
23335 | ||
23336 | fi | |
23337 | ||
23338 | ||
23339 | ||
23340 | ||
23341 | ||
23342 | GNULIB_MALLOC_POSIX=1 | |
23343 | ||
23344 | ||
23345 | ||
23346 | ||
23347 | ||
23348 | $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h | |
23349 | ||
23350 | ||
23351 | ||
23352 | ||
23353 | ||
23354 | ||
88b48903 WN |
23355 | |
23356 | ||
23357 | ||
23358 | ||
23359 | ||
88b48903 | 23360 | |
c971b7fa | 23361 | |
c971b7fa | 23362 | |
98399780 YQ |
23363 | |
23364 | ||
23365 | ||
88b48903 WN |
23366 | if test $gl_cv_have_include_next = yes; then |
23367 | gl_cv_next_math_h='<'math.h'>' | |
23368 | else | |
23369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 | |
23370 | $as_echo_n "checking absolute name of <math.h>... " >&6; } | |
d0ac1c44 | 23371 | if ${gl_cv_next_math_h+:} false; then : |
88b48903 WN |
23372 | $as_echo_n "(cached) " >&6 |
23373 | else | |
c971b7fa | 23374 | |
88b48903 | 23375 | if test $ac_cv_header_math_h = yes; then |
c971b7fa PA |
23376 | |
23377 | ||
4a626d0a PA |
23378 | |
23379 | ||
23380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 | 23381 | /* end confdefs.h. */ |
88b48903 | 23382 | #include <math.h> |
8690e634 | 23383 | _ACEOF |
4a626d0a PA |
23384 | case "$host_os" in |
23385 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
23386 | *) gl_absname_cpp="$ac_cpp" ;; | |
23387 | esac | |
23388 | ||
23389 | case "$host_os" in | |
23390 | mingw*) | |
23391 | gl_dirsep_regex='[/\\]' | |
23392 | ;; | |
23393 | *) | |
23394 | gl_dirsep_regex='\/' | |
23395 | ;; | |
23396 | esac | |
23397 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
23398 | gl_header_literal_regex=`echo 'math.h' \ | |
23399 | | sed -e "$gl_make_literal_regex_sed"` | |
23400 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23401 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23402 | s|^/[^/]|//&| | |
23403 | p | |
23404 | q | |
23405 | }' | |
23406 | ||
23407 | gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23408 | sed -n "$gl_absolute_header_sed"` | |
23409 | ||
23410 | gl_header=$gl_cv_absolute_math_h | |
23411 | gl_cv_next_math_h='"'$gl_header'"' | |
88b48903 WN |
23412 | else |
23413 | gl_cv_next_math_h='<'math.h'>' | |
23414 | fi | |
8690e634 | 23415 | |
c971b7fa | 23416 | |
88b48903 WN |
23417 | fi |
23418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 | |
23419 | $as_echo "$gl_cv_next_math_h" >&6; } | |
23420 | fi | |
23421 | NEXT_MATH_H=$gl_cv_next_math_h | |
c971b7fa | 23422 | |
88b48903 WN |
23423 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
23424 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23425 | gl_next_as_first_directive='<'math.h'>' | |
23426 | else | |
23427 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23428 | gl_next_as_first_directive=$gl_cv_next_math_h | |
23429 | fi | |
23430 | NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive | |
8690e634 | 23431 | |
c971b7fa | 23432 | |
c971b7fa PA |
23433 | |
23434 | ||
c971b7fa | 23435 | |
88b48903 WN |
23436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 |
23437 | $as_echo_n "checking whether NAN macro works... " >&6; } | |
d0ac1c44 | 23438 | if ${gl_cv_header_math_nan_works+:} false; then : |
c971b7fa PA |
23439 | $as_echo_n "(cached) " >&6 |
23440 | else | |
8690e634 JK |
23441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23442 | /* end confdefs.h. */ | |
88b48903 | 23443 | #include <math.h> |
c971b7fa PA |
23444 | int |
23445 | main () | |
23446 | { | |
88b48903 WN |
23447 | /* Solaris 10 has a broken definition of NAN. Other platforms |
23448 | fail to provide NAN, or provide it only in C99 mode; this | |
23449 | test only needs to fail when NAN is provided but wrong. */ | |
23450 | float f = 1.0f; | |
23451 | #ifdef NAN | |
23452 | f = NAN; | |
23453 | #endif | |
23454 | return f == 0; | |
c971b7fa PA |
23455 | ; |
23456 | return 0; | |
23457 | } | |
23458 | _ACEOF | |
23459 | if ac_fn_c_try_compile "$LINENO"; then : | |
88b48903 | 23460 | gl_cv_header_math_nan_works=yes |
8690e634 | 23461 | else |
88b48903 | 23462 | gl_cv_header_math_nan_works=no |
c971b7fa PA |
23463 | fi |
23464 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 23465 | fi |
88b48903 WN |
23466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 |
23467 | $as_echo "$gl_cv_header_math_nan_works" >&6; } | |
23468 | if test $gl_cv_header_math_nan_works = no; then | |
23469 | REPLACE_NAN=1 | |
c971b7fa | 23470 | fi |
88b48903 WN |
23471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 |
23472 | $as_echo_n "checking whether HUGE_VAL works... " >&6; } | |
d0ac1c44 | 23473 | if ${gl_cv_header_math_huge_val_works+:} false; then : |
c971b7fa PA |
23474 | $as_echo_n "(cached) " >&6 |
23475 | else | |
8690e634 | 23476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c971b7fa | 23477 | /* end confdefs.h. */ |
88b48903 | 23478 | #include <math.h> |
c971b7fa PA |
23479 | int |
23480 | main () | |
23481 | { | |
88b48903 WN |
23482 | /* Solaris 10 has a broken definition of HUGE_VAL. */ |
23483 | double d = HUGE_VAL; | |
23484 | return d == 0; | |
c971b7fa PA |
23485 | ; |
23486 | return 0; | |
23487 | } | |
23488 | _ACEOF | |
23489 | if ac_fn_c_try_compile "$LINENO"; then : | |
88b48903 | 23490 | gl_cv_header_math_huge_val_works=yes |
8690e634 | 23491 | else |
88b48903 | 23492 | gl_cv_header_math_huge_val_works=no |
c971b7fa PA |
23493 | fi |
23494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 23495 | fi |
88b48903 WN |
23496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 |
23497 | $as_echo "$gl_cv_header_math_huge_val_works" >&6; } | |
23498 | if test $gl_cv_header_math_huge_val_works = no; then | |
23499 | REPLACE_HUGE_VAL=1 | |
8690e634 | 23500 | fi |
c971b7fa | 23501 | |
c971b7fa | 23502 | |
c971b7fa PA |
23503 | |
23504 | ||
23505 | ||
23506 | ||
23507 | ||
23508 | ||
c971b7fa | 23509 | |
c971b7fa | 23510 | |
c971b7fa | 23511 | |
c971b7fa PA |
23512 | |
23513 | ||
c971b7fa | 23514 | |
472fa5ee | 23515 | |
5df4cba6 SM |
23516 | |
23517 | ||
23518 | ||
23519 | if case "$host_os" in | |
23520 | mingw*) true ;; | |
23521 | *) test $ac_cv_func_mbsinit = yes ;; | |
23522 | esac \ | |
23523 | && test $ac_cv_func_mbrtowc = yes; then | |
472fa5ee SM |
23524 | |
23525 | ||
23526 | ||
23527 | ||
c0c3707f CB |
23528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
23529 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
23530 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : | |
23531 | $as_echo_n "(cached) " >&6 | |
23532 | else | |
472fa5ee | 23533 | |
c0c3707f CB |
23534 | case "$host_os" in |
23535 | # Guess no on AIX and OSF/1. | |
23536 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
23537 | # Guess yes otherwise. | |
23538 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
23539 | esac | |
23540 | if test $LOCALE_JA != none; then | |
23541 | if test "$cross_compiling" = yes; then : | |
472fa5ee | 23542 | : |
c0c3707f CB |
23543 | else |
23544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23545 | /* end confdefs.h. */ | |
472fa5ee | 23546 | |
c0c3707f CB |
23547 | #include <locale.h> |
23548 | #include <string.h> | |
c0c3707f CB |
23549 | #include <wchar.h> |
23550 | int main () | |
23551 | { | |
23552 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
23553 | { | |
23554 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
23555 | mbstate_t state; | |
23556 | wchar_t wc; | |
472fa5ee | 23557 | |
c0c3707f CB |
23558 | memset (&state, '\0', sizeof (mbstate_t)); |
23559 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23560 | if (mbsinit (&state)) | |
23561 | return 2; | |
23562 | } | |
23563 | return 0; | |
23564 | } | |
23565 | _ACEOF | |
23566 | if ac_fn_c_try_run "$LINENO"; then : | |
23567 | gl_cv_func_mbrtowc_incomplete_state=yes | |
c971b7fa | 23568 | else |
c0c3707f CB |
23569 | gl_cv_func_mbrtowc_incomplete_state=no |
23570 | fi | |
23571 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23572 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23573 | fi | |
8690e634 | 23574 | |
c0c3707f CB |
23575 | else |
23576 | if test $LOCALE_FR_UTF8 != none; then | |
23577 | if test "$cross_compiling" = yes; then : | |
8690e634 JK |
23578 | : |
23579 | else | |
c971b7fa PA |
23580 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23581 | /* end confdefs.h. */ | |
c971b7fa | 23582 | |
8690e634 JK |
23583 | #include <locale.h> |
23584 | #include <string.h> | |
8690e634 JK |
23585 | #include <wchar.h> |
23586 | int main () | |
c971b7fa | 23587 | { |
c0c3707f | 23588 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) |
8690e634 | 23589 | { |
c0c3707f | 23590 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ |
8690e634 JK |
23591 | mbstate_t state; |
23592 | wchar_t wc; | |
23593 | ||
23594 | memset (&state, '\0', sizeof (mbstate_t)); | |
23595 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23596 | if (mbsinit (&state)) | |
c0c3707f | 23597 | return 2; |
8690e634 | 23598 | } |
c971b7fa PA |
23599 | return 0; |
23600 | } | |
23601 | _ACEOF | |
8690e634 JK |
23602 | if ac_fn_c_try_run "$LINENO"; then : |
23603 | gl_cv_func_mbrtowc_incomplete_state=yes | |
c971b7fa | 23604 | else |
8690e634 | 23605 | gl_cv_func_mbrtowc_incomplete_state=no |
c971b7fa | 23606 | fi |
8690e634 JK |
23607 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23608 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 23609 | fi |
c971b7fa | 23610 | |
c0c3707f | 23611 | fi |
8690e634 | 23612 | fi |
c971b7fa | 23613 | |
8690e634 JK |
23614 | fi |
23615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 | |
23616 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
c971b7fa | 23617 | |
c971b7fa | 23618 | |
c971b7fa | 23619 | |
c971b7fa | 23620 | |
8690e634 JK |
23621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 |
23622 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 23623 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
c971b7fa PA |
23624 | $as_echo_n "(cached) " >&6 |
23625 | else | |
23626 | ||
8690e634 JK |
23627 | case "$host_os" in |
23628 | # Guess no on Solaris 8. | |
23629 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
23630 | # Guess yes otherwise. | |
23631 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
23632 | esac | |
23633 | if test $LOCALE_ZH_CN != none; then | |
23634 | if test "$cross_compiling" = yes; then : | |
23635 | : | |
23636 | else | |
23637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa PA |
23638 | /* end confdefs.h. */ |
23639 | ||
8690e634 JK |
23640 | #include <locale.h> |
23641 | #include <stdlib.h> | |
23642 | #include <string.h> | |
8690e634 JK |
23643 | #include <wchar.h> |
23644 | int main () | |
c971b7fa | 23645 | { |
8690e634 JK |
23646 | /* This fails on Solaris 8: |
23647 | mbrtowc returns 2, and sets wc to 0x00F0. | |
23648 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
23649 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
23650 | { | |
23651 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
23652 | mbstate_t state; | |
23653 | wchar_t wc; | |
23654 | ||
23655 | memset (&state, '\0', sizeof (mbstate_t)); | |
23656 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
23657 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 23658 | return 2; |
8690e634 | 23659 | } |
c971b7fa PA |
23660 | return 0; |
23661 | } | |
23662 | _ACEOF | |
8690e634 JK |
23663 | if ac_fn_c_try_run "$LINENO"; then : |
23664 | gl_cv_func_mbrtowc_sanitycheck=yes | |
c971b7fa | 23665 | else |
8690e634 | 23666 | gl_cv_func_mbrtowc_sanitycheck=no |
c971b7fa | 23667 | fi |
8690e634 JK |
23668 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23669 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 23670 | fi |
c971b7fa | 23671 | |
8690e634 | 23672 | fi |
c971b7fa | 23673 | |
8690e634 JK |
23674 | fi |
23675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 | |
23676 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
23677 | ||
23678 | REPLACE_MBSTATE_T=0 | |
23679 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
23680 | *yes) ;; | |
23681 | *) REPLACE_MBSTATE_T=1 ;; | |
23682 | esac | |
23683 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
23684 | *yes) ;; | |
23685 | *) REPLACE_MBSTATE_T=1 ;; | |
23686 | esac | |
c971b7fa | 23687 | else |
8690e634 | 23688 | REPLACE_MBSTATE_T=1 |
c971b7fa PA |
23689 | fi |
23690 | ||
23691 | ||
23692 | ||
8690e634 JK |
23693 | if test $ac_cv_func_mbrtowc = no; then |
23694 | HAVE_MBRTOWC=0 | |
23695 | ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " | |
9c9d63b1 | 23696 | #include <wchar.h> |
c971b7fa | 23697 | |
8690e634 | 23698 | " |
d0ac1c44 | 23699 | if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : |
8690e634 JK |
23700 | ac_have_decl=1 |
23701 | else | |
23702 | ac_have_decl=0 | |
c971b7fa | 23703 | fi |
c971b7fa | 23704 | |
8690e634 JK |
23705 | cat >>confdefs.h <<_ACEOF |
23706 | #define HAVE_DECL_MBRTOWC $ac_have_decl | |
23707 | _ACEOF | |
c971b7fa | 23708 | |
8690e634 JK |
23709 | if test $ac_cv_have_decl_mbrtowc = yes; then |
23710 | REPLACE_MBRTOWC=1 | |
23711 | fi | |
23712 | else | |
23713 | if test $REPLACE_MBSTATE_T = 1; then | |
23714 | REPLACE_MBRTOWC=1 | |
23715 | else | |
c971b7fa PA |
23716 | |
23717 | ||
23718 | ||
8690e634 JK |
23719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 |
23720 | $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } | |
d0ac1c44 | 23721 | if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : |
8690e634 | 23722 | $as_echo_n "(cached) " >&6 |
c971b7fa | 23723 | else |
c971b7fa | 23724 | |
8690e634 JK |
23725 | case "$host_os" in |
23726 | # Guess no on Solaris. | |
23727 | solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; | |
23728 | # Guess yes otherwise. | |
23729 | *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; | |
23730 | esac | |
23731 | if test $LOCALE_FR_UTF8 != none; then | |
23732 | if test "$cross_compiling" = yes; then : | |
23733 | : | |
23734 | else | |
23735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa PA |
23736 | /* end confdefs.h. */ |
23737 | ||
8690e634 JK |
23738 | #include <locale.h> |
23739 | #include <stdlib.h> | |
23740 | #include <string.h> | |
8690e634 JK |
23741 | #include <wchar.h> |
23742 | int main () | |
23743 | { | |
23744 | int result = 0; | |
23745 | ||
23746 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23747 | { | |
23748 | char input[] = "\303\237er"; | |
23749 | mbstate_t state; | |
23750 | wchar_t wc; | |
23751 | size_t ret; | |
23752 | ||
23753 | memset (&state, '\0', sizeof (mbstate_t)); | |
23754 | wc = (wchar_t) 0xBADFACE; | |
23755 | ret = mbrtowc (&wc, input, 5, &state); | |
23756 | if (ret != 2) | |
23757 | result |= 1; | |
23758 | if (!mbsinit (&state)) | |
23759 | result |= 2; | |
c971b7fa | 23760 | |
8690e634 JK |
23761 | memset (&state, '\0', sizeof (mbstate_t)); |
23762 | ret = mbrtowc (NULL, input, 5, &state); | |
23763 | if (ret != 2) /* Solaris 7 fails here: ret is -1. */ | |
23764 | result |= 4; | |
23765 | if (!mbsinit (&state)) | |
23766 | result |= 8; | |
23767 | } | |
23768 | return result; | |
23769 | } | |
c971b7fa | 23770 | _ACEOF |
8690e634 JK |
23771 | if ac_fn_c_try_run "$LINENO"; then : |
23772 | gl_cv_func_mbrtowc_null_arg1=yes | |
23773 | else | |
23774 | gl_cv_func_mbrtowc_null_arg1=no | |
23775 | fi | |
23776 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23777 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23778 | fi | |
c971b7fa | 23779 | |
8690e634 | 23780 | fi |
c971b7fa | 23781 | |
c971b7fa | 23782 | fi |
8690e634 JK |
23783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 |
23784 | $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } | |
c971b7fa | 23785 | |
c971b7fa | 23786 | |
c971b7fa | 23787 | |
c971b7fa | 23788 | |
8690e634 JK |
23789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 |
23790 | $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } | |
d0ac1c44 | 23791 | if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : |
8690e634 JK |
23792 | $as_echo_n "(cached) " >&6 |
23793 | else | |
c971b7fa | 23794 | |
8690e634 JK |
23795 | case "$host_os" in |
23796 | # Guess no on OSF/1. | |
23797 | osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; | |
23798 | # Guess yes otherwise. | |
23799 | *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; | |
23800 | esac | |
23801 | if test $LOCALE_FR_UTF8 != none; then | |
23802 | if test "$cross_compiling" = yes; then : | |
c971b7fa | 23803 | : |
8690e634 JK |
23804 | else |
23805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23806 | /* end confdefs.h. */ | |
23807 | ||
23808 | #include <locale.h> | |
23809 | #include <string.h> | |
8690e634 JK |
23810 | #include <wchar.h> |
23811 | int main () | |
23812 | { | |
23813 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23814 | { | |
23815 | mbstate_t state; | |
23816 | wchar_t wc; | |
23817 | int ret; | |
23818 | ||
23819 | memset (&state, '\0', sizeof (mbstate_t)); | |
23820 | wc = (wchar_t) 0xBADFACE; | |
23821 | mbrtowc (&wc, NULL, 5, &state); | |
23822 | /* Check that wc was not modified. */ | |
23823 | if (wc != (wchar_t) 0xBADFACE) | |
c0c3707f | 23824 | return 2; |
8690e634 JK |
23825 | } |
23826 | return 0; | |
23827 | } | |
23828 | _ACEOF | |
23829 | if ac_fn_c_try_run "$LINENO"; then : | |
23830 | gl_cv_func_mbrtowc_null_arg2=yes | |
23831 | else | |
23832 | gl_cv_func_mbrtowc_null_arg2=no | |
23833 | fi | |
23834 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23835 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23836 | fi | |
23837 | ||
23838 | fi | |
23839 | ||
23840 | fi | |
23841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 | |
23842 | $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } | |
c971b7fa PA |
23843 | |
23844 | ||
23845 | ||
23846 | ||
23847 | ||
23848 | ||
8690e634 JK |
23849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 |
23850 | $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } | |
d0ac1c44 | 23851 | if ${gl_cv_func_mbrtowc_retval+:} false; then : |
8690e634 JK |
23852 | $as_echo_n "(cached) " >&6 |
23853 | else | |
23854 | ||
23855 | case "$host_os" in | |
23856 | # Guess no on HP-UX, Solaris, native Windows. | |
23857 | hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; | |
23858 | # Guess yes otherwise. | |
23859 | *) gl_cv_func_mbrtowc_retval="guessing yes" ;; | |
23860 | esac | |
23861 | if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ | |
23862 | || { case "$host_os" in mingw*) true;; *) false;; esac; }; then | |
23863 | if test "$cross_compiling" = yes; then : | |
c971b7fa | 23864 | : |
8690e634 JK |
23865 | else |
23866 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23867 | /* end confdefs.h. */ | |
c971b7fa | 23868 | |
8690e634 JK |
23869 | #include <locale.h> |
23870 | #include <string.h> | |
8690e634 JK |
23871 | #include <wchar.h> |
23872 | int main () | |
23873 | { | |
23874 | int result = 0; | |
23875 | int found_some_locale = 0; | |
23876 | /* This fails on Solaris. */ | |
23877 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
23878 | { | |
23879 | char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
23880 | mbstate_t state; | |
23881 | wchar_t wc; | |
23882 | ||
23883 | memset (&state, '\0', sizeof (mbstate_t)); | |
23884 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23885 | { | |
23886 | input[1] = '\0'; | |
23887 | if (mbrtowc (&wc, input + 2, 5, &state) != 1) | |
23888 | result |= 1; | |
23889 | } | |
23890 | found_some_locale = 1; | |
23891 | } | |
23892 | /* This fails on HP-UX 11.11. */ | |
23893 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
23894 | { | |
23895 | char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
23896 | mbstate_t state; | |
23897 | wchar_t wc; | |
23898 | ||
23899 | memset (&state, '\0', sizeof (mbstate_t)); | |
23900 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
23901 | { | |
23902 | input[1] = '\0'; | |
23903 | if (mbrtowc (&wc, input + 2, 5, &state) != 2) | |
23904 | result |= 2; | |
23905 | } | |
23906 | found_some_locale = 1; | |
23907 | } | |
5df4cba6 SM |
23908 | /* This fails on native Windows. */ |
23909 | if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) | |
23910 | { | |
23911 | char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ | |
23912 | mbstate_t state; | |
23913 | wchar_t wc; | |
23914 | ||
23915 | memset (&state, '\0', sizeof (mbstate_t)); | |
23916 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23917 | { | |
23918 | input[3] = '\0'; | |
23919 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23920 | result |= 4; | |
23921 | } | |
23922 | found_some_locale = 1; | |
23923 | } | |
23924 | if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) | |
23925 | { | |
23926 | char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ | |
23927 | mbstate_t state; | |
23928 | wchar_t wc; | |
23929 | ||
23930 | memset (&state, '\0', sizeof (mbstate_t)); | |
23931 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23932 | { | |
23933 | input[3] = '\0'; | |
23934 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23935 | result |= 8; | |
23936 | } | |
23937 | found_some_locale = 1; | |
23938 | } | |
23939 | if (setlocale (LC_ALL, "Chinese_China.936") != NULL) | |
23940 | { | |
23941 | char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ | |
23942 | mbstate_t state; | |
23943 | wchar_t wc; | |
23944 | ||
23945 | memset (&state, '\0', sizeof (mbstate_t)); | |
23946 | if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) | |
23947 | { | |
23948 | input[3] = '\0'; | |
23949 | if (mbrtowc (&wc, input + 4, 4, &state) != 1) | |
23950 | result |= 16; | |
23951 | } | |
23952 | found_some_locale = 1; | |
23953 | } | |
23954 | return (found_some_locale ? result : 77); | |
23955 | } | |
23956 | _ACEOF | |
23957 | if ac_fn_c_try_run "$LINENO"; then : | |
23958 | gl_cv_func_mbrtowc_retval=yes | |
23959 | else | |
23960 | if test $? != 77; then | |
23961 | gl_cv_func_mbrtowc_retval=no | |
23962 | fi | |
23963 | ||
23964 | fi | |
23965 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23966 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23967 | fi | |
23968 | ||
23969 | fi | |
23970 | ||
23971 | fi | |
23972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 | |
23973 | $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } | |
23974 | ||
23975 | ||
23976 | ||
23977 | ||
23978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 | |
23979 | $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } | |
23980 | if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : | |
23981 | $as_echo_n "(cached) " >&6 | |
23982 | else | |
23983 | ||
23984 | case "$host_os" in | |
23985 | # Guess no on Solaris 8 and 9. | |
23986 | solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; | |
23987 | # Guess yes otherwise. | |
23988 | *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; | |
23989 | esac | |
23990 | if test $LOCALE_ZH_CN != none; then | |
23991 | if test "$cross_compiling" = yes; then : | |
23992 | : | |
23993 | else | |
23994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23995 | /* end confdefs.h. */ | |
23996 | ||
23997 | #include <locale.h> | |
23998 | #include <string.h> | |
5df4cba6 SM |
23999 | #include <wchar.h> |
24000 | int main () | |
24001 | { | |
24002 | /* This fails on Solaris 8 and 9. */ | |
24003 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
24004 | { | |
24005 | mbstate_t state; | |
24006 | wchar_t wc; | |
24007 | ||
24008 | memset (&state, '\0', sizeof (mbstate_t)); | |
24009 | if (mbrtowc (&wc, "", 1, &state) != 0) | |
24010 | return 2; | |
24011 | } | |
24012 | return 0; | |
24013 | } | |
24014 | _ACEOF | |
24015 | if ac_fn_c_try_run "$LINENO"; then : | |
24016 | gl_cv_func_mbrtowc_nul_retval=yes | |
24017 | else | |
24018 | gl_cv_func_mbrtowc_nul_retval=no | |
24019 | fi | |
24020 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24021 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24022 | fi | |
24023 | ||
24024 | fi | |
24025 | ||
24026 | fi | |
24027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 | |
24028 | $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } | |
24029 | ||
24030 | ||
24031 | ||
24032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5 | |
24033 | $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; } | |
24034 | if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then : | |
24035 | $as_echo_n "(cached) " >&6 | |
24036 | else | |
24037 | ||
24038 | case "$host_os" in | |
24039 | # Guess yes on native Windows. | |
24040 | mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;; | |
24041 | *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;; | |
24042 | esac | |
24043 | case "$host_os" in | |
24044 | mingw*) | |
24045 | if test "$cross_compiling" = yes; then : | |
24046 | : | |
24047 | else | |
24048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24049 | /* end confdefs.h. */ | |
24050 | ||
24051 | #include <locale.h> | |
24052 | #include <string.h> | |
5df4cba6 SM |
24053 | #include <wchar.h> |
24054 | int main () | |
24055 | { | |
24056 | int result = 0; | |
24057 | if (setlocale (LC_ALL, "French_France.65001") != NULL) | |
24058 | { | |
24059 | wchar_t wc = (wchar_t) 0xBADFACE; | |
24060 | mbstate_t state; | |
24061 | ||
24062 | memset (&state, '\0', sizeof (mbstate_t)); | |
24063 | if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) | |
24064 | && wc != (wchar_t) 0xBADFACE) | |
24065 | result |= 1; | |
24066 | } | |
8690e634 JK |
24067 | if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) |
24068 | { | |
5df4cba6 | 24069 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 24070 | mbstate_t state; |
8690e634 JK |
24071 | |
24072 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
24073 | if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2) |
24074 | && wc != (wchar_t) 0xBADFACE) | |
24075 | result |= 2; | |
8690e634 JK |
24076 | } |
24077 | if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) | |
24078 | { | |
5df4cba6 | 24079 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 24080 | mbstate_t state; |
8690e634 JK |
24081 | |
24082 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
24083 | if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2) |
24084 | && wc != (wchar_t) 0xBADFACE) | |
24085 | result |= 4; | |
8690e634 JK |
24086 | } |
24087 | if (setlocale (LC_ALL, "Chinese_China.936") != NULL) | |
24088 | { | |
5df4cba6 | 24089 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 24090 | mbstate_t state; |
8690e634 JK |
24091 | |
24092 | memset (&state, '\0', sizeof (mbstate_t)); | |
5df4cba6 SM |
24093 | if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2) |
24094 | && wc != (wchar_t) 0xBADFACE) | |
24095 | result |= 8; | |
8690e634 | 24096 | } |
5df4cba6 | 24097 | return result; |
8690e634 JK |
24098 | } |
24099 | _ACEOF | |
24100 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 24101 | gl_cv_func_mbrtowc_stores_incomplete=no |
8690e634 | 24102 | else |
5df4cba6 | 24103 | gl_cv_func_mbrtowc_stores_incomplete=yes |
8690e634 JK |
24104 | fi |
24105 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24106 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24107 | fi | |
c971b7fa | 24108 | |
5df4cba6 SM |
24109 | ;; |
24110 | *) | |
8690e634 | 24111 | |
5df4cba6 SM |
24112 | if test $LOCALE_FR_UTF8 != none; then |
24113 | if test "$cross_compiling" = yes; then : | |
8690e634 | 24114 | : |
c971b7fa PA |
24115 | else |
24116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24117 | /* end confdefs.h. */ | |
24118 | ||
8690e634 | 24119 | #include <locale.h> |
c971b7fa | 24120 | #include <string.h> |
8690e634 JK |
24121 | #include <wchar.h> |
24122 | int main () | |
c971b7fa | 24123 | { |
5df4cba6 | 24124 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) |
c971b7fa | 24125 | { |
5df4cba6 | 24126 | wchar_t wc = (wchar_t) 0xBADFACE; |
8690e634 | 24127 | mbstate_t state; |
c971b7fa | 24128 | |
8690e634 | 24129 | memset (&state, '\0', sizeof (mbstate_t)); |
5df4cba6 SM |
24130 | if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) |
24131 | && wc != (wchar_t) 0xBADFACE) | |
24132 | return 1; | |
8690e634 | 24133 | } |
c971b7fa PA |
24134 | return 0; |
24135 | } | |
24136 | _ACEOF | |
24137 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 24138 | gl_cv_func_mbrtowc_stores_incomplete=no |
c971b7fa | 24139 | else |
5df4cba6 | 24140 | gl_cv_func_mbrtowc_stores_incomplete=yes |
c971b7fa PA |
24141 | fi |
24142 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24143 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24144 | fi | |
24145 | ||
5df4cba6 SM |
24146 | fi |
24147 | ;; | |
24148 | esac | |
8690e634 | 24149 | |
c971b7fa | 24150 | fi |
5df4cba6 SM |
24151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5 |
24152 | $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; } | |
8690e634 | 24153 | |
4a626d0a PA |
24154 | |
24155 | ||
24156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 | |
24157 | $as_echo_n "checking whether mbrtowc works on empty input... " >&6; } | |
d0ac1c44 | 24158 | if ${gl_cv_func_mbrtowc_empty_input+:} false; then : |
4a626d0a PA |
24159 | $as_echo_n "(cached) " >&6 |
24160 | else | |
24161 | ||
24162 | case "$host_os" in | |
c0c3707f CB |
24163 | # Guess no on AIX and glibc systems. |
24164 | aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; | |
24165 | # Guess yes on native Windows. | |
24166 | mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; | |
24167 | *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; | |
4a626d0a PA |
24168 | esac |
24169 | if test "$cross_compiling" = yes; then : | |
24170 | : | |
24171 | else | |
24172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24173 | /* end confdefs.h. */ | |
24174 | ||
24175 | #include <wchar.h> | |
24176 | static wchar_t wc; | |
24177 | static mbstate_t mbs; | |
24178 | int | |
24179 | main (void) | |
24180 | { | |
49e4877c | 24181 | return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; |
4a626d0a PA |
24182 | } |
24183 | _ACEOF | |
24184 | if ac_fn_c_try_run "$LINENO"; then : | |
4a626d0a | 24185 | gl_cv_func_mbrtowc_empty_input=yes |
49e4877c PA |
24186 | else |
24187 | gl_cv_func_mbrtowc_empty_input=no | |
4a626d0a PA |
24188 | fi |
24189 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24190 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24191 | fi | |
24192 | ||
24193 | ||
24194 | fi | |
24195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 | |
24196 | $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } | |
24197 | ||
49e4877c | 24198 | |
c0c3707f | 24199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 |
49e4877c | 24200 | $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } |
5df4cba6 | 24201 | if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then : |
49e4877c PA |
24202 | $as_echo_n "(cached) " >&6 |
24203 | else | |
24204 | ||
5df4cba6 | 24205 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" |
49e4877c PA |
24206 | |
24207 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
24208 | case "$host_os" in |
24209 | # Guess yes on native Windows. | |
5df4cba6 | 24210 | mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;; |
c0c3707f CB |
24211 | esac |
24212 | ||
49e4877c PA |
24213 | else |
24214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24215 | /* end confdefs.h. */ | |
24216 | #include <limits.h> | |
24217 | #include <locale.h> | |
24218 | #include <wchar.h> | |
24219 | ||
24220 | int | |
24221 | main () | |
24222 | { | |
24223 | ||
24224 | int i; | |
24225 | char *locale = setlocale (LC_ALL, "C"); | |
24226 | if (! locale) | |
c0c3707f | 24227 | return 2; |
49e4877c PA |
24228 | for (i = CHAR_MIN; i <= CHAR_MAX; i++) |
24229 | { | |
24230 | char c = i; | |
24231 | wchar_t wc; | |
24232 | mbstate_t mbs = { 0, }; | |
24233 | size_t ss = mbrtowc (&wc, &c, 1, &mbs); | |
24234 | if (1 < ss) | |
c0c3707f | 24235 | return 3; |
49e4877c PA |
24236 | } |
24237 | return 0; | |
24238 | ||
6ec2e0f5 SDJ |
24239 | ; |
24240 | return 0; | |
24241 | } | |
24242 | _ACEOF | |
24243 | if ac_fn_c_try_run "$LINENO"; then : | |
5df4cba6 | 24244 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes |
6ec2e0f5 | 24245 | else |
5df4cba6 | 24246 | gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no |
6ec2e0f5 SDJ |
24247 | fi |
24248 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24249 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24250 | fi | |
24251 | ||
c0c3707f | 24252 | |
6ec2e0f5 | 24253 | fi |
5df4cba6 SM |
24254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5 |
24255 | $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; } | |
6ec2e0f5 SDJ |
24256 | |
24257 | case "$gl_cv_func_mbrtowc_null_arg1" in | |
24258 | *yes) ;; | |
24259 | *) | |
24260 | $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h | |
24261 | ||
24262 | REPLACE_MBRTOWC=1 | |
24263 | ;; | |
24264 | esac | |
24265 | case "$gl_cv_func_mbrtowc_null_arg2" in | |
24266 | *yes) ;; | |
24267 | *) | |
24268 | $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h | |
24269 | ||
24270 | REPLACE_MBRTOWC=1 | |
24271 | ;; | |
24272 | esac | |
24273 | case "$gl_cv_func_mbrtowc_retval" in | |
24274 | *yes) ;; | |
24275 | *) | |
24276 | $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h | |
24277 | ||
24278 | REPLACE_MBRTOWC=1 | |
24279 | ;; | |
24280 | esac | |
24281 | case "$gl_cv_func_mbrtowc_nul_retval" in | |
24282 | *yes) ;; | |
24283 | *) | |
24284 | $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h | |
24285 | ||
5df4cba6 SM |
24286 | REPLACE_MBRTOWC=1 |
24287 | ;; | |
24288 | esac | |
24289 | case "$gl_cv_func_mbrtowc_stores_incomplete" in | |
24290 | *no) ;; | |
24291 | *) | |
24292 | $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h | |
24293 | ||
24294 | REPLACE_MBRTOWC=1 | |
24295 | ;; | |
24296 | esac | |
24297 | case "$gl_cv_func_mbrtowc_empty_input" in | |
24298 | *yes) ;; | |
24299 | *) | |
24300 | $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h | |
24301 | ||
24302 | REPLACE_MBRTOWC=1 | |
24303 | ;; | |
24304 | esac | |
24305 | case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in | |
24306 | *yes) ;; | |
24307 | *) | |
24308 | $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h | |
24309 | ||
24310 | REPLACE_MBRTOWC=1 | |
24311 | ;; | |
24312 | esac | |
24313 | fi | |
24314 | fi | |
24315 | if test $REPLACE_MBSTATE_T = 1; then | |
24316 | case "$host_os" in | |
24317 | mingw*) LIB_MBRTOWC= ;; | |
24318 | *) | |
24319 | ||
24320 | ||
24321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
24322 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
24323 | if ${gl_cv_have_weak+:} false; then : | |
24324 | $as_echo_n "(cached) " >&6 | |
24325 | else | |
24326 | gl_cv_have_weak=no | |
24327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24328 | /* end confdefs.h. */ | |
24329 | extern void xyzzy (); | |
24330 | #pragma weak xyzzy | |
24331 | int | |
24332 | main () | |
24333 | { | |
24334 | xyzzy(); | |
24335 | ; | |
24336 | return 0; | |
24337 | } | |
24338 | _ACEOF | |
24339 | if ac_fn_c_try_link "$LINENO"; then : | |
24340 | gl_cv_have_weak=maybe | |
24341 | fi | |
24342 | rm -f core conftest.err conftest.$ac_objext \ | |
24343 | conftest$ac_exeext conftest.$ac_ext | |
24344 | if test $gl_cv_have_weak = maybe; then | |
24345 | if test "$cross_compiling" = yes; then : | |
24346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24347 | /* end confdefs.h. */ | |
24348 | #ifdef __ELF__ | |
24349 | Extensible Linking Format | |
24350 | #endif | |
24351 | ||
24352 | _ACEOF | |
24353 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
24354 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
24355 | gl_cv_have_weak="guessing yes" | |
24356 | else | |
24357 | gl_cv_have_weak="guessing no" | |
24358 | fi | |
24359 | rm -f conftest* | |
24360 | ||
24361 | ||
24362 | else | |
24363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24364 | /* end confdefs.h. */ | |
24365 | ||
24366 | #include <stdio.h> | |
24367 | #pragma weak fputs | |
24368 | int main () | |
24369 | { | |
24370 | return (fputs == NULL); | |
24371 | } | |
24372 | _ACEOF | |
24373 | if ac_fn_c_try_run "$LINENO"; then : | |
24374 | gl_cv_have_weak=yes | |
24375 | else | |
24376 | gl_cv_have_weak=no | |
24377 | fi | |
24378 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24379 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24380 | fi | |
24381 | ||
24382 | fi | |
24383 | case " $LDFLAGS " in | |
24384 | *" -static "*) gl_cv_have_weak=no ;; | |
24385 | esac | |
24386 | case "$gl_cv_have_weak" in | |
24387 | *yes) | |
24388 | case "$host_os" in | |
24389 | freebsd* | dragonfly*) | |
24390 | : > conftest1.c | |
24391 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
24392 | cat <<EOF > conftest2.c | |
24393 | #include <pthread.h> | |
24394 | #pragma weak pthread_mutexattr_gettype | |
24395 | int main () | |
24396 | { | |
24397 | return (pthread_mutexattr_gettype != NULL); | |
24398 | } | |
24399 | EOF | |
24400 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
24401 | || gl_cv_have_weak=no | |
24402 | rm -f conftest1.c libempty.so conftest2.c conftest | |
24403 | ;; | |
24404 | esac | |
24405 | ;; | |
24406 | esac | |
24407 | ||
24408 | fi | |
24409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
24410 | $as_echo "$gl_cv_have_weak" >&6; } | |
24411 | case "$gl_cv_have_weak" in | |
24412 | *yes) | |
24413 | ||
24414 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
24415 | ||
24416 | ;; | |
24417 | esac | |
24418 | ||
24419 | case "$gl_cv_have_weak" in | |
24420 | *yes) LIB_MBRTOWC= ;; | |
24421 | *) LIB_MBRTOWC="$LIBPTHREAD" ;; | |
24422 | esac | |
24423 | ;; | |
24424 | esac | |
24425 | else | |
24426 | LIB_MBRTOWC= | |
24427 | fi | |
24428 | ||
24429 | ||
24430 | if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then | |
24431 | ||
24432 | ||
24433 | ||
24434 | ||
24435 | ||
24436 | ||
24437 | ||
24438 | ||
24439 | gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" | |
24440 | ||
24441 | if test $REPLACE_MBSTATE_T = 1; then | |
24442 | ||
24443 | ||
24444 | ||
24445 | ||
24446 | ||
24447 | ||
24448 | ||
24449 | ||
24450 | gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext" | |
24451 | ||
24452 | ||
24453 | ||
24454 | ||
24455 | ||
24456 | ||
24457 | ||
24458 | ||
24459 | ||
24460 | gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext" | |
24461 | ||
24462 | ||
24463 | ||
24464 | ||
24465 | CFLAG_VISIBILITY= | |
24466 | HAVE_VISIBILITY=0 | |
24467 | if test -n "$GCC"; then | |
24468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 | |
24469 | $as_echo_n "checking whether the -Werror option is usable... " >&6; } | |
24470 | if ${gl_cv_cc_vis_werror+:} false; then : | |
24471 | $as_echo_n "(cached) " >&6 | |
24472 | else | |
24473 | gl_save_CFLAGS="$CFLAGS" | |
24474 | CFLAGS="$CFLAGS -Werror" | |
24475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24476 | /* end confdefs.h. */ | |
24477 | ||
24478 | int | |
24479 | main () | |
24480 | { | |
24481 | ||
24482 | ; | |
24483 | return 0; | |
24484 | } | |
24485 | _ACEOF | |
24486 | if ac_fn_c_try_compile "$LINENO"; then : | |
24487 | gl_cv_cc_vis_werror=yes | |
24488 | else | |
24489 | gl_cv_cc_vis_werror=no | |
24490 | fi | |
24491 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
24492 | CFLAGS="$gl_save_CFLAGS" | |
24493 | ||
24494 | fi | |
24495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 | |
24496 | $as_echo "$gl_cv_cc_vis_werror" >&6; } | |
24497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 | |
24498 | $as_echo_n "checking for simple visibility declarations... " >&6; } | |
24499 | if ${gl_cv_cc_visibility+:} false; then : | |
24500 | $as_echo_n "(cached) " >&6 | |
24501 | else | |
24502 | gl_save_CFLAGS="$CFLAGS" | |
24503 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
24504 | if test $gl_cv_cc_vis_werror = yes; then | |
24505 | CFLAGS="$CFLAGS -Werror" | |
24506 | fi | |
24507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24508 | /* end confdefs.h. */ | |
24509 | extern __attribute__((__visibility__("hidden"))) int hiddenvar; | |
24510 | extern __attribute__((__visibility__("default"))) int exportedvar; | |
24511 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | |
24512 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | |
24513 | void dummyfunc (void) {} | |
24514 | ||
24515 | int | |
24516 | main () | |
24517 | { | |
6ec2e0f5 | 24518 | |
5df4cba6 SM |
24519 | ; |
24520 | return 0; | |
24521 | } | |
24522 | _ACEOF | |
24523 | if ac_fn_c_try_compile "$LINENO"; then : | |
24524 | gl_cv_cc_visibility=yes | |
24525 | else | |
24526 | gl_cv_cc_visibility=no | |
24527 | fi | |
24528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
24529 | CFLAGS="$gl_save_CFLAGS" | |
6ec2e0f5 | 24530 | |
5df4cba6 SM |
24531 | fi |
24532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 | |
24533 | $as_echo "$gl_cv_cc_visibility" >&6; } | |
24534 | if test $gl_cv_cc_visibility = yes; then | |
24535 | CFLAG_VISIBILITY="-fvisibility=hidden" | |
24536 | HAVE_VISIBILITY=1 | |
6ec2e0f5 SDJ |
24537 | fi |
24538 | fi | |
24539 | ||
6ec2e0f5 SDJ |
24540 | |
24541 | ||
5df4cba6 SM |
24542 | cat >>confdefs.h <<_ACEOF |
24543 | #define HAVE_VISIBILITY $HAVE_VISIBILITY | |
24544 | _ACEOF | |
6ec2e0f5 SDJ |
24545 | |
24546 | ||
6ec2e0f5 | 24547 | |
5df4cba6 | 24548 | fi |
6ec2e0f5 | 24549 | |
c0c3707f | 24550 | |
6ec2e0f5 SDJ |
24551 | : |
24552 | ||
24553 | fi | |
24554 | ||
24555 | ||
24556 | ||
24557 | ||
24558 | ||
24559 | GNULIB_MBRTOWC=1 | |
24560 | ||
24561 | ||
24562 | ||
24563 | ||
24564 | ||
24565 | $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h | |
24566 | ||
24567 | ||
24568 | ||
24569 | ||
24570 | ||
24571 | ||
24572 | ||
24573 | ||
24574 | ||
24575 | ||
24576 | ||
24577 | ||
24578 | ||
24579 | ||
5df4cba6 SM |
24580 | |
24581 | if case "$host_os" in | |
24582 | mingw*) true ;; | |
24583 | *) test $ac_cv_func_mbsinit = yes ;; | |
24584 | esac \ | |
24585 | && test $ac_cv_func_mbrtowc = yes; then | |
6ec2e0f5 SDJ |
24586 | |
24587 | ||
24588 | ||
c0c3707f | 24589 | |
6ec2e0f5 SDJ |
24590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
24591 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
d0ac1c44 | 24592 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : |
6ec2e0f5 SDJ |
24593 | $as_echo_n "(cached) " >&6 |
24594 | else | |
24595 | ||
24596 | case "$host_os" in | |
24597 | # Guess no on AIX and OSF/1. | |
24598 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
24599 | # Guess yes otherwise. | |
24600 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
24601 | esac | |
24602 | if test $LOCALE_JA != none; then | |
24603 | if test "$cross_compiling" = yes; then : | |
24604 | : | |
24605 | else | |
24606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24607 | /* end confdefs.h. */ | |
24608 | ||
24609 | #include <locale.h> | |
24610 | #include <string.h> | |
6ec2e0f5 SDJ |
24611 | #include <wchar.h> |
24612 | int main () | |
24613 | { | |
24614 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
24615 | { | |
24616 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ | |
24617 | mbstate_t state; | |
24618 | wchar_t wc; | |
24619 | ||
24620 | memset (&state, '\0', sizeof (mbstate_t)); | |
24621 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24622 | if (mbsinit (&state)) | |
c0c3707f CB |
24623 | return 2; |
24624 | } | |
24625 | return 0; | |
24626 | } | |
24627 | _ACEOF | |
24628 | if ac_fn_c_try_run "$LINENO"; then : | |
24629 | gl_cv_func_mbrtowc_incomplete_state=yes | |
24630 | else | |
24631 | gl_cv_func_mbrtowc_incomplete_state=no | |
24632 | fi | |
24633 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24634 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24635 | fi | |
24636 | ||
24637 | else | |
24638 | if test $LOCALE_FR_UTF8 != none; then | |
24639 | if test "$cross_compiling" = yes; then : | |
24640 | : | |
24641 | else | |
24642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24643 | /* end confdefs.h. */ | |
24644 | ||
24645 | #include <locale.h> | |
24646 | #include <string.h> | |
c0c3707f CB |
24647 | #include <wchar.h> |
24648 | int main () | |
24649 | { | |
24650 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
24651 | { | |
24652 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
24653 | mbstate_t state; | |
24654 | wchar_t wc; | |
24655 | ||
24656 | memset (&state, '\0', sizeof (mbstate_t)); | |
24657 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24658 | if (mbsinit (&state)) | |
24659 | return 2; | |
6ec2e0f5 SDJ |
24660 | } |
24661 | return 0; | |
24662 | } | |
24663 | _ACEOF | |
24664 | if ac_fn_c_try_run "$LINENO"; then : | |
24665 | gl_cv_func_mbrtowc_incomplete_state=yes | |
24666 | else | |
24667 | gl_cv_func_mbrtowc_incomplete_state=no | |
24668 | fi | |
24669 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24670 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24671 | fi | |
24672 | ||
c0c3707f | 24673 | fi |
6ec2e0f5 SDJ |
24674 | fi |
24675 | ||
24676 | fi | |
24677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 | |
24678 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
24679 | ||
24680 | ||
24681 | ||
24682 | ||
24683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 | |
24684 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 24685 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
6ec2e0f5 SDJ |
24686 | $as_echo_n "(cached) " >&6 |
24687 | else | |
24688 | ||
24689 | case "$host_os" in | |
24690 | # Guess no on Solaris 8. | |
24691 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
24692 | # Guess yes otherwise. | |
24693 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
24694 | esac | |
24695 | if test $LOCALE_ZH_CN != none; then | |
24696 | if test "$cross_compiling" = yes; then : | |
24697 | : | |
24698 | else | |
24699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24700 | /* end confdefs.h. */ | |
24701 | ||
24702 | #include <locale.h> | |
24703 | #include <stdlib.h> | |
24704 | #include <string.h> | |
6ec2e0f5 SDJ |
24705 | #include <wchar.h> |
24706 | int main () | |
24707 | { | |
24708 | /* This fails on Solaris 8: | |
24709 | mbrtowc returns 2, and sets wc to 0x00F0. | |
24710 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
24711 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
24712 | { | |
24713 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
24714 | mbstate_t state; | |
24715 | wchar_t wc; | |
24716 | ||
24717 | memset (&state, '\0', sizeof (mbstate_t)); | |
24718 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
24719 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 24720 | return 2; |
6ec2e0f5 | 24721 | } |
49e4877c PA |
24722 | return 0; |
24723 | } | |
24724 | _ACEOF | |
24725 | if ac_fn_c_try_run "$LINENO"; then : | |
6ec2e0f5 | 24726 | gl_cv_func_mbrtowc_sanitycheck=yes |
49e4877c | 24727 | else |
6ec2e0f5 | 24728 | gl_cv_func_mbrtowc_sanitycheck=no |
49e4877c PA |
24729 | fi |
24730 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24731 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24732 | fi | |
24733 | ||
6ec2e0f5 SDJ |
24734 | fi |
24735 | ||
49e4877c | 24736 | fi |
6ec2e0f5 SDJ |
24737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 |
24738 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
49e4877c | 24739 | |
6ec2e0f5 SDJ |
24740 | REPLACE_MBSTATE_T=0 |
24741 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
24742 | *yes) ;; | |
24743 | *) REPLACE_MBSTATE_T=1 ;; | |
24744 | esac | |
24745 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
24746 | *yes) ;; | |
24747 | *) REPLACE_MBSTATE_T=1 ;; | |
24748 | esac | |
24749 | else | |
24750 | REPLACE_MBSTATE_T=1 | |
24751 | fi | |
8690e634 | 24752 | |
8690e634 | 24753 | |
8690e634 | 24754 | |
6ec2e0f5 SDJ |
24755 | if test $ac_cv_func_mbsinit = no; then |
24756 | HAVE_MBSINIT=0 | |
24757 | ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " | |
9c9d63b1 | 24758 | #include <wchar.h> |
8690e634 | 24759 | |
6ec2e0f5 | 24760 | " |
d0ac1c44 | 24761 | if test "x$ac_cv_have_decl_mbsinit" = xyes; then : |
6ec2e0f5 SDJ |
24762 | ac_have_decl=1 |
24763 | else | |
24764 | ac_have_decl=0 | |
24765 | fi | |
4a626d0a | 24766 | |
6ec2e0f5 SDJ |
24767 | cat >>confdefs.h <<_ACEOF |
24768 | #define HAVE_DECL_MBSINIT $ac_have_decl | |
24769 | _ACEOF | |
49e4877c | 24770 | |
6ec2e0f5 SDJ |
24771 | if test $ac_cv_have_decl_mbsinit = yes; then |
24772 | REPLACE_MBSINIT=1 | |
24773 | fi | |
24774 | else | |
24775 | if test $REPLACE_MBSTATE_T = 1; then | |
24776 | REPLACE_MBSINIT=1 | |
24777 | else | |
24778 | case "$host_os" in | |
24779 | mingw*) REPLACE_MBSINIT=1 ;; | |
8690e634 | 24780 | esac |
c971b7fa PA |
24781 | fi |
24782 | fi | |
24783 | ||
6ec2e0f5 | 24784 | if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then |
c971b7fa | 24785 | |
c971b7fa | 24786 | |
c971b7fa PA |
24787 | |
24788 | ||
24789 | ||
24790 | ||
24791 | ||
24792 | ||
6ec2e0f5 | 24793 | gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" |
8690e634 JK |
24794 | |
24795 | ||
24796 | : | |
c971b7fa | 24797 | |
a512b375 | 24798 | fi |
c971b7fa | 24799 | |
8690e634 JK |
24800 | |
24801 | ||
24802 | ||
24803 | ||
6ec2e0f5 | 24804 | GNULIB_MBSINIT=1 |
8690e634 JK |
24805 | |
24806 | ||
24807 | ||
24808 | ||
8690e634 | 24809 | |
6ec2e0f5 | 24810 | $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h |
8690e634 JK |
24811 | |
24812 | ||
24813 | ||
24814 | ||
24815 | ||
24816 | ||
24817 | ||
24818 | ||
24819 | ||
24820 | ||
24821 | ||
c971b7fa | 24822 | |
c971b7fa | 24823 | |
5df4cba6 SM |
24824 | |
24825 | if case "$host_os" in | |
24826 | mingw*) true ;; | |
24827 | *) test $ac_cv_func_mbsinit = yes ;; | |
24828 | esac \ | |
24829 | && test $ac_cv_func_mbrtowc = yes; then | |
c971b7fa | 24830 | |
8690e634 JK |
24831 | |
24832 | ||
c0c3707f | 24833 | |
8690e634 JK |
24834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 |
24835 | $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } | |
d0ac1c44 | 24836 | if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : |
8690e634 JK |
24837 | $as_echo_n "(cached) " >&6 |
24838 | else | |
24839 | ||
24840 | case "$host_os" in | |
24841 | # Guess no on AIX and OSF/1. | |
24842 | aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; | |
24843 | # Guess yes otherwise. | |
24844 | *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; | |
24845 | esac | |
24846 | if test $LOCALE_JA != none; then | |
24847 | if test "$cross_compiling" = yes; then : | |
24848 | : | |
c971b7fa PA |
24849 | else |
24850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24851 | /* end confdefs.h. */ | |
24852 | ||
8690e634 JK |
24853 | #include <locale.h> |
24854 | #include <string.h> | |
8690e634 JK |
24855 | #include <wchar.h> |
24856 | int main () | |
c971b7fa | 24857 | { |
8690e634 | 24858 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) |
c971b7fa | 24859 | { |
8690e634 JK |
24860 | const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ |
24861 | mbstate_t state; | |
24862 | wchar_t wc; | |
24863 | ||
24864 | memset (&state, '\0', sizeof (mbstate_t)); | |
24865 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24866 | if (mbsinit (&state)) | |
c0c3707f CB |
24867 | return 2; |
24868 | } | |
24869 | return 0; | |
24870 | } | |
24871 | _ACEOF | |
24872 | if ac_fn_c_try_run "$LINENO"; then : | |
24873 | gl_cv_func_mbrtowc_incomplete_state=yes | |
24874 | else | |
24875 | gl_cv_func_mbrtowc_incomplete_state=no | |
24876 | fi | |
24877 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24878 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24879 | fi | |
24880 | ||
24881 | else | |
24882 | if test $LOCALE_FR_UTF8 != none; then | |
24883 | if test "$cross_compiling" = yes; then : | |
24884 | : | |
24885 | else | |
24886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24887 | /* end confdefs.h. */ | |
24888 | ||
24889 | #include <locale.h> | |
24890 | #include <string.h> | |
c0c3707f CB |
24891 | #include <wchar.h> |
24892 | int main () | |
24893 | { | |
24894 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
24895 | { | |
24896 | const char input[] = "B\303\274\303\237er"; /* "Büßer" */ | |
24897 | mbstate_t state; | |
24898 | wchar_t wc; | |
24899 | ||
24900 | memset (&state, '\0', sizeof (mbstate_t)); | |
24901 | if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) | |
24902 | if (mbsinit (&state)) | |
24903 | return 2; | |
c971b7fa | 24904 | } |
c971b7fa PA |
24905 | return 0; |
24906 | } | |
24907 | _ACEOF | |
24908 | if ac_fn_c_try_run "$LINENO"; then : | |
8690e634 | 24909 | gl_cv_func_mbrtowc_incomplete_state=yes |
c971b7fa | 24910 | else |
8690e634 | 24911 | gl_cv_func_mbrtowc_incomplete_state=no |
c971b7fa PA |
24912 | fi |
24913 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24914 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24915 | fi | |
24916 | ||
c0c3707f | 24917 | fi |
8690e634 | 24918 | fi |
c971b7fa PA |
24919 | |
24920 | fi | |
8690e634 JK |
24921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 |
24922 | $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } | |
c971b7fa PA |
24923 | |
24924 | ||
c971b7fa PA |
24925 | |
24926 | ||
8690e634 JK |
24927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 |
24928 | $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } | |
d0ac1c44 | 24929 | if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : |
c971b7fa PA |
24930 | $as_echo_n "(cached) " >&6 |
24931 | else | |
8690e634 JK |
24932 | |
24933 | case "$host_os" in | |
24934 | # Guess no on Solaris 8. | |
24935 | solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; | |
24936 | # Guess yes otherwise. | |
24937 | *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; | |
24938 | esac | |
24939 | if test $LOCALE_ZH_CN != none; then | |
24940 | if test "$cross_compiling" = yes; then : | |
24941 | : | |
24942 | else | |
c971b7fa PA |
24943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24944 | /* end confdefs.h. */ | |
8690e634 JK |
24945 | |
24946 | #include <locale.h> | |
24947 | #include <stdlib.h> | |
24948 | #include <string.h> | |
8690e634 JK |
24949 | #include <wchar.h> |
24950 | int main () | |
c971b7fa | 24951 | { |
8690e634 JK |
24952 | /* This fails on Solaris 8: |
24953 | mbrtowc returns 2, and sets wc to 0x00F0. | |
24954 | mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ | |
24955 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
24956 | { | |
24957 | char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ | |
24958 | mbstate_t state; | |
24959 | wchar_t wc; | |
24960 | ||
24961 | memset (&state, '\0', sizeof (mbstate_t)); | |
24962 | if (mbrtowc (&wc, input + 3, 6, &state) != 4 | |
24963 | && mbtowc (&wc, input + 3, 6) == 4) | |
c0c3707f | 24964 | return 2; |
8690e634 | 24965 | } |
c971b7fa PA |
24966 | return 0; |
24967 | } | |
24968 | _ACEOF | |
8690e634 JK |
24969 | if ac_fn_c_try_run "$LINENO"; then : |
24970 | gl_cv_func_mbrtowc_sanitycheck=yes | |
c971b7fa | 24971 | else |
8690e634 | 24972 | gl_cv_func_mbrtowc_sanitycheck=no |
c971b7fa | 24973 | fi |
8690e634 JK |
24974 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24975 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 24976 | fi |
c971b7fa | 24977 | |
8690e634 JK |
24978 | fi |
24979 | ||
24980 | fi | |
24981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 | |
24982 | $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } | |
c971b7fa | 24983 | |
8690e634 JK |
24984 | REPLACE_MBSTATE_T=0 |
24985 | case "$gl_cv_func_mbrtowc_incomplete_state" in | |
24986 | *yes) ;; | |
24987 | *) REPLACE_MBSTATE_T=1 ;; | |
24988 | esac | |
24989 | case "$gl_cv_func_mbrtowc_sanitycheck" in | |
24990 | *yes) ;; | |
24991 | *) REPLACE_MBSTATE_T=1 ;; | |
24992 | esac | |
24993 | else | |
24994 | REPLACE_MBSTATE_T=1 | |
c971b7fa PA |
24995 | fi |
24996 | ||
c971b7fa | 24997 | |
8690e634 | 24998 | |
6ec2e0f5 SDJ |
24999 | if test $ac_cv_func_mbsrtowcs = no; then |
25000 | HAVE_MBSRTOWCS=0 | |
25001 | ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " | |
9c9d63b1 | 25002 | #include <wchar.h> |
8690e634 JK |
25003 | |
25004 | " | |
d0ac1c44 | 25005 | if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then : |
8690e634 JK |
25006 | ac_have_decl=1 |
25007 | else | |
25008 | ac_have_decl=0 | |
c971b7fa | 25009 | fi |
c971b7fa | 25010 | |
8690e634 | 25011 | cat >>confdefs.h <<_ACEOF |
6ec2e0f5 | 25012 | #define HAVE_DECL_MBSRTOWCS $ac_have_decl |
c971b7fa | 25013 | _ACEOF |
c971b7fa | 25014 | |
6ec2e0f5 SDJ |
25015 | if test $ac_cv_have_decl_mbsrtowcs = yes; then |
25016 | REPLACE_MBSRTOWCS=1 | |
8690e634 JK |
25017 | fi |
25018 | else | |
25019 | if test $REPLACE_MBSTATE_T = 1; then | |
6ec2e0f5 | 25020 | REPLACE_MBSRTOWCS=1 |
8690e634 | 25021 | else |
6ec2e0f5 SDJ |
25022 | |
25023 | ||
25024 | ||
25025 | ||
25026 | ||
25027 | ||
25028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 | |
25029 | $as_echo_n "checking whether mbsrtowcs works... " >&6; } | |
d0ac1c44 | 25030 | if ${gl_cv_func_mbsrtowcs_works+:} false; then : |
6ec2e0f5 SDJ |
25031 | $as_echo_n "(cached) " >&6 |
25032 | else | |
25033 | ||
25034 | case "$host_os" in | |
25035 | # Guess no on HP-UX, Solaris, mingw. | |
25036 | hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; | |
25037 | # Guess yes otherwise. | |
25038 | *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; | |
25039 | esac | |
25040 | if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then | |
25041 | if test "$cross_compiling" = yes; then : | |
25042 | : | |
25043 | else | |
25044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25045 | /* end confdefs.h. */ | |
25046 | ||
25047 | #include <locale.h> | |
25048 | #include <string.h> | |
6ec2e0f5 SDJ |
25049 | #include <wchar.h> |
25050 | int main () | |
25051 | { | |
25052 | int result = 0; | |
25053 | /* Test whether the function supports a NULL destination argument. | |
25054 | This fails on native Windows. */ | |
25055 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | |
25056 | { | |
25057 | const char input[] = "\337er"; | |
25058 | const char *src = input; | |
25059 | mbstate_t state; | |
25060 | ||
25061 | memset (&state, '\0', sizeof (mbstate_t)); | |
25062 | if (mbsrtowcs (NULL, &src, 1, &state) != 3 | |
25063 | || src != input) | |
25064 | result |= 1; | |
25065 | } | |
25066 | /* Test whether the function works when started with a conversion state | |
25067 | in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ | |
25068 | if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | |
25069 | { | |
25070 | const char input[] = "B\303\274\303\237er"; | |
25071 | mbstate_t state; | |
25072 | ||
25073 | memset (&state, '\0', sizeof (mbstate_t)); | |
25074 | if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) | |
25075 | if (!mbsinit (&state)) | |
25076 | { | |
25077 | const char *src = input + 2; | |
25078 | if (mbsrtowcs (NULL, &src, 10, &state) != 4) | |
25079 | result |= 2; | |
25080 | } | |
25081 | } | |
25082 | if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) | |
25083 | { | |
25084 | const char input[] = "<\306\374\313\334\270\354>"; | |
25085 | mbstate_t state; | |
25086 | ||
25087 | memset (&state, '\0', sizeof (mbstate_t)); | |
25088 | if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) | |
25089 | if (!mbsinit (&state)) | |
25090 | { | |
25091 | const char *src = input + 4; | |
25092 | if (mbsrtowcs (NULL, &src, 10, &state) != 3) | |
25093 | result |= 4; | |
25094 | } | |
25095 | } | |
25096 | if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) | |
25097 | { | |
25098 | const char input[] = "B\250\271\201\060\211\070er"; | |
25099 | mbstate_t state; | |
25100 | ||
25101 | memset (&state, '\0', sizeof (mbstate_t)); | |
25102 | if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) | |
25103 | if (!mbsinit (&state)) | |
25104 | { | |
25105 | const char *src = input + 2; | |
25106 | if (mbsrtowcs (NULL, &src, 10, &state) != 4) | |
25107 | result |= 8; | |
25108 | } | |
25109 | } | |
25110 | return result; | |
25111 | } | |
25112 | _ACEOF | |
25113 | if ac_fn_c_try_run "$LINENO"; then : | |
25114 | gl_cv_func_mbsrtowcs_works=yes | |
25115 | else | |
25116 | gl_cv_func_mbsrtowcs_works=no | |
25117 | fi | |
25118 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25119 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25120 | fi | |
25121 | ||
25122 | fi | |
25123 | ||
25124 | fi | |
25125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 | |
25126 | $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } | |
25127 | ||
25128 | case "$gl_cv_func_mbsrtowcs_works" in | |
25129 | *yes) ;; | |
25130 | *) REPLACE_MBSRTOWCS=1 ;; | |
8690e634 JK |
25131 | esac |
25132 | fi | |
25133 | fi | |
c971b7fa | 25134 | |
6ec2e0f5 | 25135 | if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then |
c971b7fa PA |
25136 | |
25137 | ||
25138 | ||
25139 | ||
25140 | ||
25141 | ||
25142 | ||
25143 | ||
698be2d8 CB |
25144 | gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" |
25145 | ||
25146 | ||
25147 | ||
25148 | ||
25149 | ||
25150 | ||
25151 | ||
25152 | ||
25153 | ||
25154 | gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" | |
25155 | ||
25156 | ||
25157 | : | |
25158 | ||
25159 | fi | |
25160 | ||
25161 | ||
25162 | ||
25163 | ||
25164 | ||
25165 | GNULIB_MBSRTOWCS=1 | |
25166 | ||
25167 | ||
25168 | ||
25169 | ||
25170 | ||
25171 | $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h | |
25172 | ||
25173 | ||
25174 | ||
25175 | ||
25176 | ||
25177 | ||
25178 | for ac_func in mbtowc | |
25179 | do : | |
25180 | ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc" | |
25181 | if test "x$ac_cv_func_mbtowc" = xyes; then : | |
25182 | cat >>confdefs.h <<_ACEOF | |
25183 | #define HAVE_MBTOWC 1 | |
25184 | _ACEOF | |
25185 | ||
25186 | fi | |
25187 | done | |
25188 | ||
25189 | if test $ac_cv_func_mbtowc = no; then | |
25190 | HAVE_MBTOWC=0 | |
25191 | else | |
25192 | if false; then | |
25193 | REPLACE_MBTOWC=1 | |
25194 | fi | |
25195 | fi | |
6ec2e0f5 | 25196 | |
698be2d8 | 25197 | if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then |
6ec2e0f5 SDJ |
25198 | |
25199 | ||
25200 | ||
25201 | ||
25202 | ||
25203 | ||
25204 | ||
25205 | ||
698be2d8 | 25206 | gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" |
c971b7fa PA |
25207 | |
25208 | ||
8690e634 | 25209 | : |
c971b7fa | 25210 | |
a512b375 | 25211 | fi |
c971b7fa | 25212 | |
c971b7fa | 25213 | |
c971b7fa | 25214 | |
c971b7fa PA |
25215 | |
25216 | ||
698be2d8 | 25217 | GNULIB_MBTOWC=1 |
c971b7fa | 25218 | |
c971b7fa PA |
25219 | |
25220 | ||
25221 | ||
25222 | ||
698be2d8 | 25223 | $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h |
c971b7fa PA |
25224 | |
25225 | ||
c971b7fa | 25226 | |
c971b7fa | 25227 | |
9c9d63b1 | 25228 | if test $REPLACE_MEMCHR = 1; then |
c971b7fa PA |
25229 | |
25230 | ||
25231 | ||
c971b7fa | 25232 | |
c971b7fa PA |
25233 | |
25234 | ||
25235 | ||
25236 | ||
6ec2e0f5 | 25237 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" |
8690e634 | 25238 | |
c971b7fa | 25239 | |
6ec2e0f5 SDJ |
25240 | for ac_header in bp-sym.h |
25241 | do : | |
25242 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
d0ac1c44 | 25243 | if test "x$ac_cv_header_bp_sym_h" = xyes; then : |
6ec2e0f5 SDJ |
25244 | cat >>confdefs.h <<_ACEOF |
25245 | #define HAVE_BP_SYM_H 1 | |
25246 | _ACEOF | |
c971b7fa | 25247 | |
6ec2e0f5 | 25248 | fi |
c971b7fa | 25249 | |
6ec2e0f5 SDJ |
25250 | done |
25251 | ||
25252 | ||
25253 | fi | |
25254 | ||
25255 | ||
25256 | ||
25257 | ||
25258 | ||
25259 | GNULIB_MEMCHR=1 | |
25260 | ||
25261 | ||
25262 | ||
25263 | ||
25264 | ||
25265 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h | |
25266 | ||
25267 | ||
25268 | ||
25269 | ||
25270 | ||
25271 | if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then | |
25272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
25273 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
d0ac1c44 | 25274 | if ${gl_cv_func_memmem_works_fast+:} false; then : |
8690e634 JK |
25275 | $as_echo_n "(cached) " >&6 |
25276 | else | |
6ec2e0f5 SDJ |
25277 | if test "$cross_compiling" = yes; then : |
25278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25279 | /* end confdefs.h. */ | |
25280 | ||
25281 | #include <features.h> | |
25282 | #ifdef __GNU_LIBRARY__ | |
25283 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \ | |
25284 | && !defined __UCLIBC__ | |
25285 | Lucky user | |
25286 | #endif | |
25287 | #endif | |
25288 | #ifdef __CYGWIN__ | |
25289 | #include <cygwin/version.h> | |
25290 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0) | |
25291 | Lucky user | |
25292 | #endif | |
25293 | #endif | |
25294 | ||
25295 | _ACEOF | |
25296 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
25297 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
25298 | gl_cv_func_memmem_works_fast="guessing yes" | |
25299 | else | |
c0c3707f | 25300 | gl_cv_func_memmem_works_fast="$gl_cross_guess_normal" |
6ec2e0f5 SDJ |
25301 | fi |
25302 | rm -f conftest* | |
25303 | ||
c971b7fa | 25304 | |
8690e634 JK |
25305 | else |
25306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa | 25307 | /* end confdefs.h. */ |
c971b7fa | 25308 | |
6ec2e0f5 SDJ |
25309 | #include <signal.h> /* for signal */ |
25310 | #include <string.h> /* for memmem */ | |
25311 | #include <stdlib.h> /* for malloc */ | |
25312 | #include <unistd.h> /* for alarm */ | |
25313 | static void quit (int sig) { _exit (sig + 128); } | |
25314 | ||
25315 | int | |
25316 | main () | |
8690e634 | 25317 | { |
8690e634 | 25318 | |
6ec2e0f5 SDJ |
25319 | int result = 0; |
25320 | size_t m = 1000000; | |
25321 | char *haystack = (char *) malloc (2 * m + 1); | |
25322 | char *needle = (char *) malloc (m + 1); | |
25323 | /* Failure to compile this test due to missing alarm is okay, | |
25324 | since all such platforms (mingw) also lack memmem. */ | |
25325 | signal (SIGALRM, quit); | |
25326 | alarm (5); | |
25327 | /* Check for quadratic performance. */ | |
25328 | if (haystack && needle) | |
25329 | { | |
25330 | memset (haystack, 'A', 2 * m); | |
25331 | haystack[2 * m] = 'B'; | |
25332 | memset (needle, 'A', m); | |
25333 | needle[m] = 'B'; | |
25334 | if (!memmem (haystack, 2 * m + 1, needle, m + 1)) | |
25335 | result |= 1; | |
25336 | } | |
c0c3707f CB |
25337 | /* Free allocated memory, in case some sanitizer is watching. */ |
25338 | free (haystack); | |
25339 | free (needle); | |
6ec2e0f5 SDJ |
25340 | return result; |
25341 | ||
25342 | ; | |
c971b7fa PA |
25343 | return 0; |
25344 | } | |
25345 | _ACEOF | |
8690e634 | 25346 | if ac_fn_c_try_run "$LINENO"; then : |
6ec2e0f5 | 25347 | gl_cv_func_memmem_works_fast=yes |
8690e634 | 25348 | else |
6ec2e0f5 | 25349 | gl_cv_func_memmem_works_fast=no |
8690e634 JK |
25350 | fi |
25351 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25352 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 25353 | fi |
c971b7fa PA |
25354 | |
25355 | ||
8690e634 | 25356 | fi |
6ec2e0f5 SDJ |
25357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5 |
25358 | $as_echo "$gl_cv_func_memmem_works_fast" >&6; } | |
25359 | case "$gl_cv_func_memmem_works_fast" in | |
25360 | *yes) ;; | |
25361 | *) | |
25362 | REPLACE_MEMMEM=1 | |
25363 | ;; | |
25364 | esac | |
25365 | fi | |
c971b7fa | 25366 | |
6ec2e0f5 | 25367 | if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then |
8690e634 JK |
25368 | |
25369 | ||
25370 | ||
6ec2e0f5 SDJ |
25371 | |
25372 | ||
25373 | ||
25374 | ||
25375 | ||
25376 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
25377 | ||
25378 | fi | |
25379 | ||
25380 | ||
25381 | ||
25382 | ||
25383 | for ac_func in memmem | |
25384 | do : | |
25385 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
d0ac1c44 | 25386 | if test "x$ac_cv_func_memmem" = xyes; then : |
6ec2e0f5 SDJ |
25387 | cat >>confdefs.h <<_ACEOF |
25388 | #define HAVE_MEMMEM 1 | |
25389 | _ACEOF | |
25390 | ||
25391 | fi | |
25392 | done | |
25393 | ||
25394 | if test $ac_cv_func_memmem = yes; then | |
25395 | HAVE_MEMMEM=1 | |
25396 | else | |
25397 | HAVE_MEMMEM=0 | |
25398 | fi | |
25399 | ||
25400 | if test $ac_cv_have_decl_memmem = no; then | |
25401 | HAVE_DECL_MEMMEM=0 | |
25402 | else | |
25403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 | |
25404 | $as_echo_n "checking whether memmem works... " >&6; } | |
d0ac1c44 | 25405 | if ${gl_cv_func_memmem_works_always+:} false; then : |
c971b7fa PA |
25406 | $as_echo_n "(cached) " >&6 |
25407 | else | |
6ec2e0f5 SDJ |
25408 | if test "$cross_compiling" = yes; then : |
25409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25410 | /* end confdefs.h. */ | |
25411 | ||
25412 | #ifdef __GNU_LIBRARY__ | |
25413 | #include <features.h> | |
25414 | #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ | |
25415 | || __GLIBC_MINOR__ > 12)) \ | |
25416 | || (__GLIBC__ > 2)) \ | |
25417 | || defined __UCLIBC__ | |
25418 | Lucky user | |
25419 | #endif | |
25420 | #elif defined __CYGWIN__ | |
25421 | #include <cygwin/version.h> | |
25422 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
25423 | Lucky user | |
25424 | #endif | |
25425 | #else | |
25426 | Lucky user | |
25427 | #endif | |
25428 | ||
25429 | _ACEOF | |
25430 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
25431 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
25432 | gl_cv_func_memmem_works_always="guessing yes" | |
25433 | else | |
c0c3707f | 25434 | gl_cv_func_memmem_works_always="$gl_cross_guess_normal" |
6ec2e0f5 SDJ |
25435 | fi |
25436 | rm -f conftest* | |
25437 | ||
8690e634 | 25438 | |
8690e634 | 25439 | else |
c971b7fa PA |
25440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
25441 | /* end confdefs.h. */ | |
c971b7fa | 25442 | |
6ec2e0f5 SDJ |
25443 | #include <string.h> /* for memmem */ |
25444 | #define P "_EF_BF_BD" | |
25445 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
25446 | #define NEEDLE P P P P P | |
25447 | ||
25448 | int | |
25449 | main () | |
c971b7fa | 25450 | { |
8690e634 | 25451 | |
6ec2e0f5 SDJ |
25452 | int result = 0; |
25453 | if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) | |
25454 | result |= 1; | |
25455 | /* Check for empty needle behavior. */ | |
25456 | { | |
25457 | const char *haystack = "AAA"; | |
698be2d8 | 25458 | if (memmem (haystack, 3, (const char *) 1, 0) != haystack) |
6ec2e0f5 | 25459 | result |= 2; |
8690e634 | 25460 | } |
6ec2e0f5 SDJ |
25461 | return result; |
25462 | ||
25463 | ; | |
c971b7fa PA |
25464 | return 0; |
25465 | } | |
25466 | _ACEOF | |
8690e634 | 25467 | if ac_fn_c_try_run "$LINENO"; then : |
6ec2e0f5 | 25468 | gl_cv_func_memmem_works_always=yes |
c971b7fa | 25469 | else |
6ec2e0f5 | 25470 | gl_cv_func_memmem_works_always=no |
c971b7fa | 25471 | fi |
8690e634 JK |
25472 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
25473 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c971b7fa | 25474 | fi |
8690e634 | 25475 | |
8690e634 JK |
25476 | |
25477 | fi | |
6ec2e0f5 SDJ |
25478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 |
25479 | $as_echo "$gl_cv_func_memmem_works_always" >&6; } | |
25480 | case "$gl_cv_func_memmem_works_always" in | |
8690e634 | 25481 | *yes) ;; |
6ec2e0f5 SDJ |
25482 | *) |
25483 | REPLACE_MEMMEM=1 | |
25484 | ;; | |
8690e634 | 25485 | esac |
c971b7fa | 25486 | fi |
6ec2e0f5 | 25487 | : |
c971b7fa | 25488 | |
6ec2e0f5 | 25489 | if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then |
c971b7fa | 25490 | |
c971b7fa | 25491 | |
8690e634 | 25492 | |
c971b7fa | 25493 | |
6ec2e0f5 SDJ |
25494 | |
25495 | ||
25496 | ||
25497 | ||
25498 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
25499 | ||
25500 | fi | |
25501 | ||
25502 | ||
25503 | ||
25504 | ||
25505 | ||
25506 | GNULIB_MEMMEM=1 | |
25507 | ||
25508 | ||
25509 | ||
25510 | ||
25511 | ||
25512 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h | |
25513 | ||
25514 | ||
25515 | ||
25516 | ||
25517 | ||
25518 | ||
25519 | ||
25520 | ||
25521 | ||
25522 | for ac_func in mempcpy | |
25523 | do : | |
25524 | ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" | |
d0ac1c44 | 25525 | if test "x$ac_cv_func_mempcpy" = xyes; then : |
6ec2e0f5 SDJ |
25526 | cat >>confdefs.h <<_ACEOF |
25527 | #define HAVE_MEMPCPY 1 | |
8690e634 | 25528 | _ACEOF |
c971b7fa | 25529 | |
6ec2e0f5 SDJ |
25530 | fi |
25531 | done | |
c971b7fa | 25532 | |
6ec2e0f5 SDJ |
25533 | if test $ac_cv_func_mempcpy = no; then |
25534 | HAVE_MEMPCPY=0 | |
25535 | fi | |
8690e634 | 25536 | |
6ec2e0f5 | 25537 | if test $HAVE_MEMPCPY = 0; then |
8690e634 JK |
25538 | |
25539 | ||
25540 | ||
25541 | ||
8690e634 | 25542 | |
6ec2e0f5 SDJ |
25543 | |
25544 | ||
25545 | ||
25546 | gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" | |
25547 | ||
25548 | ||
8690e634 | 25549 | : |
c971b7fa | 25550 | |
6ec2e0f5 | 25551 | fi |
c971b7fa | 25552 | |
8690e634 | 25553 | |
8690e634 | 25554 | |
8690e634 | 25555 | |
6ec2e0f5 SDJ |
25556 | |
25557 | GNULIB_MEMPCPY=1 | |
25558 | ||
25559 | ||
25560 | ||
25561 | ||
25562 | ||
25563 | $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h | |
25564 | ||
25565 | ||
25566 | ||
25567 | ||
25568 | ||
25569 | ||
25570 | ||
25571 | ||
25572 | if test $ac_cv_have_decl_memrchr = no; then | |
25573 | HAVE_DECL_MEMRCHR=0 | |
25574 | fi | |
25575 | ||
25576 | for ac_func in memrchr | |
25577 | do : | |
25578 | ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" | |
d0ac1c44 | 25579 | if test "x$ac_cv_func_memrchr" = xyes; then : |
6ec2e0f5 SDJ |
25580 | cat >>confdefs.h <<_ACEOF |
25581 | #define HAVE_MEMRCHR 1 | |
c971b7fa | 25582 | _ACEOF |
6ec2e0f5 | 25583 | |
c971b7fa | 25584 | fi |
6ec2e0f5 | 25585 | done |
8690e634 | 25586 | |
8690e634 | 25587 | |
6ec2e0f5 | 25588 | if test $ac_cv_func_memrchr = no; then |
8690e634 | 25589 | |
6ec2e0f5 SDJ |
25590 | |
25591 | ||
25592 | ||
25593 | ||
25594 | ||
25595 | ||
25596 | ||
25597 | gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" | |
25598 | ||
25599 | : | |
c971b7fa PA |
25600 | fi |
25601 | ||
25602 | ||
c971b7fa | 25603 | |
c971b7fa | 25604 | |
c971b7fa | 25605 | |
6ec2e0f5 SDJ |
25606 | GNULIB_MEMRCHR=1 |
25607 | ||
25608 | ||
25609 | ||
25610 | ||
25611 | ||
25612 | $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h | |
25613 | ||
25614 | ||
25615 | ||
25616 | ||
2d8adcbd | 25617 | |
698be2d8 CB |
25618 | |
25619 | ||
25620 | ||
8a99096f SM |
25621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 |
25622 | $as_echo_n "checking whether mkdir handles trailing slash... " >&6; } | |
25623 | if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then : | |
25624 | $as_echo_n "(cached) " >&6 | |
25625 | else | |
25626 | rm -rf conftest.dir | |
9c9d63b1 | 25627 | if test "$cross_compiling" = yes; then : |
8a99096f | 25628 | case "$host_os" in |
9c9d63b1 PM |
25629 | # Guess yes on Linux systems. |
25630 | linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; | |
25631 | # Guess yes on glibc systems. | |
25632 | *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; | |
25633 | # Guess yes on MSVC, no on mingw. | |
25634 | mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c0c3707f CB |
25635 | /* end confdefs.h. */ |
25636 | ||
25637 | #ifdef _MSC_VER | |
25638 | Known | |
25639 | #endif | |
25640 | ||
25641 | _ACEOF | |
25642 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
25643 | $EGREP "Known" >/dev/null 2>&1; then : | |
25644 | gl_cv_func_mkdir_trailing_slash_works="guessing yes" | |
25645 | else | |
25646 | gl_cv_func_mkdir_trailing_slash_works="guessing no" | |
25647 | fi | |
25648 | rm -f conftest* | |
25649 | ||
9c9d63b1 PM |
25650 | ;; |
25651 | # If we don't know, obey --enable-cross-guesses. | |
25652 | *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;; | |
25653 | esac | |
8a99096f SM |
25654 | |
25655 | else | |
25656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25657 | /* end confdefs.h. */ | |
25658 | ||
9c9d63b1 PM |
25659 | #include <sys/types.h> |
25660 | #include <sys/stat.h> | |
25661 | ||
25662 | ||
25663 | $gl_mda_defines | |
8a99096f SM |
25664 | |
25665 | int | |
25666 | main () | |
25667 | { | |
25668 | return mkdir ("conftest.dir/", 0700); | |
25669 | ; | |
25670 | return 0; | |
25671 | } | |
25672 | _ACEOF | |
25673 | if ac_fn_c_try_run "$LINENO"; then : | |
25674 | gl_cv_func_mkdir_trailing_slash_works=yes | |
25675 | else | |
25676 | gl_cv_func_mkdir_trailing_slash_works=no | |
25677 | fi | |
25678 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25679 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25680 | fi | |
25681 | ||
9c9d63b1 | 25682 | rm -rf conftest.dir |
8a99096f SM |
25683 | |
25684 | fi | |
25685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 | |
25686 | $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } | |
25687 | case "$gl_cv_func_mkdir_trailing_slash_works" in | |
25688 | *yes) ;; | |
25689 | *) | |
25690 | REPLACE_MKDIR=1 | |
25691 | ;; | |
25692 | esac | |
25693 | ||
25694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 | |
25695 | $as_echo_n "checking whether mkdir handles trailing dot... " >&6; } | |
25696 | if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then : | |
25697 | $as_echo_n "(cached) " >&6 | |
25698 | else | |
25699 | rm -rf conftest.dir | |
9c9d63b1 | 25700 | if test "$cross_compiling" = yes; then : |
8a99096f | 25701 | case "$host_os" in |
9c9d63b1 PM |
25702 | # Guess yes on glibc systems. |
25703 | *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; | |
25704 | # Guess yes on musl systems. | |
25705 | *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; | |
25706 | # Guess no on native Windows. | |
25707 | mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; | |
25708 | # If we don't know, obey --enable-cross-guesses. | |
25709 | *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;; | |
25710 | esac | |
8a99096f SM |
25711 | |
25712 | else | |
25713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25714 | /* end confdefs.h. */ | |
25715 | ||
9c9d63b1 PM |
25716 | #include <sys/types.h> |
25717 | #include <sys/stat.h> | |
25718 | ||
25719 | ||
25720 | $gl_mda_defines | |
8a99096f SM |
25721 | |
25722 | int | |
25723 | main () | |
25724 | { | |
25725 | return !mkdir ("conftest.dir/./", 0700); | |
25726 | ; | |
25727 | return 0; | |
25728 | } | |
25729 | _ACEOF | |
25730 | if ac_fn_c_try_run "$LINENO"; then : | |
25731 | gl_cv_func_mkdir_trailing_dot_works=yes | |
25732 | else | |
25733 | gl_cv_func_mkdir_trailing_dot_works=no | |
25734 | fi | |
25735 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25736 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25737 | fi | |
25738 | ||
9c9d63b1 | 25739 | rm -rf conftest.dir |
8a99096f SM |
25740 | |
25741 | ||
25742 | fi | |
25743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 | |
25744 | $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } | |
25745 | case "$gl_cv_func_mkdir_trailing_dot_works" in | |
25746 | *yes) ;; | |
25747 | *) | |
25748 | REPLACE_MKDIR=1 | |
25749 | ||
25750 | $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h | |
25751 | ||
25752 | ;; | |
25753 | esac | |
25754 | ||
25755 | if test $REPLACE_MKDIR = 1; then | |
25756 | ||
25757 | ||
25758 | ||
25759 | ||
25760 | ||
25761 | ||
25762 | ||
25763 | ||
25764 | gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" | |
25765 | ||
25766 | fi | |
25767 | ||
25768 | ||
9c9d63b1 PM |
25769 | |
25770 | ||
25771 | ||
25772 | GNULIB_MKDIR=1 | |
25773 | ||
25774 | ||
25775 | ||
25776 | ||
25777 | ||
25778 | $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h | |
25779 | ||
25780 | ||
25781 | ||
25782 | ||
25783 | ||
e8d8cce6 SM |
25784 | for ac_func in mkdtemp |
25785 | do : | |
25786 | ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" | |
25787 | if test "x$ac_cv_func_mkdtemp" = xyes; then : | |
25788 | cat >>confdefs.h <<_ACEOF | |
25789 | #define HAVE_MKDTEMP 1 | |
25790 | _ACEOF | |
25791 | ||
25792 | fi | |
25793 | done | |
25794 | ||
25795 | if test $ac_cv_func_mkdtemp = no; then | |
25796 | HAVE_MKDTEMP=0 | |
25797 | fi | |
25798 | ||
25799 | if test $HAVE_MKDTEMP = 0; then | |
25800 | ||
25801 | ||
25802 | ||
25803 | ||
25804 | ||
25805 | ||
25806 | ||
25807 | ||
25808 | gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext" | |
25809 | ||
25810 | : | |
25811 | ||
25812 | fi | |
25813 | ||
25814 | ||
25815 | ||
25816 | ||
25817 | ||
25818 | GNULIB_MKDTEMP=1 | |
25819 | ||
25820 | ||
25821 | ||
25822 | ||
25823 | ||
25824 | $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h | |
25825 | ||
25826 | ||
25827 | ||
25828 | ||
25829 | ||
2d8adcbd MM |
25830 | |
25831 | ||
b3279b60 TT |
25832 | |
25833 | ||
b3279b60 TT |
25834 | if test $ac_cv_func_mkostemp != yes; then |
25835 | HAVE_MKOSTEMP=0 | |
25836 | fi | |
2d8adcbd | 25837 | |
b3279b60 | 25838 | if test $HAVE_MKOSTEMP = 0; then |
2d8adcbd | 25839 | |
2d8adcbd | 25840 | |
2d8adcbd | 25841 | |
2d8adcbd | 25842 | |
2d8adcbd MM |
25843 | |
25844 | ||
25845 | ||
25846 | ||
b3279b60 | 25847 | gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext" |
2d8adcbd MM |
25848 | |
25849 | ||
25850 | ||
b3279b60 | 25851 | fi |
2d8adcbd | 25852 | |
2d8adcbd | 25853 | |
b3279b60 TT |
25854 | cat >>confdefs.h <<_ACEOF |
25855 | #define GNULIB_MKOSTEMP 1 | |
25856 | _ACEOF | |
2d8adcbd MM |
25857 | |
25858 | ||
2d8adcbd MM |
25859 | |
25860 | ||
25861 | ||
25862 | ||
25863 | ||
b3279b60 | 25864 | GNULIB_MKOSTEMP=1 |
2d8adcbd MM |
25865 | |
25866 | ||
25867 | ||
25868 | ||
25869 | ||
b3279b60 | 25870 | $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h |
2d8adcbd MM |
25871 | |
25872 | ||
25873 | ||
25874 | ||
6ec2e0f5 SDJ |
25875 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
25876 | ||
25877 | ||
25878 | ||
c971b7fa | 25879 | |
c971b7fa | 25880 | |
c971b7fa PA |
25881 | |
25882 | ||
8690e634 | 25883 | |
6ec2e0f5 | 25884 | gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" |
8690e634 | 25885 | |
6ec2e0f5 | 25886 | fi |
8690e634 | 25887 | |
6ec2e0f5 | 25888 | if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then |
8690e634 JK |
25889 | |
25890 | ||
25891 | ||
25892 | ||
25893 | ||
25894 | ||
8690e634 JK |
25895 | |
25896 | ||
6ec2e0f5 | 25897 | gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" |
8690e634 | 25898 | |
a512b375 | 25899 | fi |
8690e634 JK |
25900 | |
25901 | ||
c0c3707f CB |
25902 | cat >>confdefs.h <<_ACEOF |
25903 | #define GNULIB_MSVC_NOTHROW 1 | |
25904 | _ACEOF | |
25905 | ||
25906 | ||
25907 | ||
25908 | ||
725e2999 JB |
25909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5 |
25910 | $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; } | |
25911 | if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then : | |
25912 | $as_echo_n "(cached) " >&6 | |
25913 | else | |
25914 | ||
25915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25916 | /* end confdefs.h. */ | |
25917 | #include <netinet/in.h> | |
25918 | int | |
25919 | main () | |
25920 | { | |
25921 | ||
25922 | ; | |
25923 | return 0; | |
25924 | } | |
25925 | _ACEOF | |
25926 | if ac_fn_c_try_compile "$LINENO"; then : | |
25927 | gl_cv_header_netinet_in_h_selfcontained=yes | |
25928 | else | |
25929 | gl_cv_header_netinet_in_h_selfcontained=no | |
25930 | fi | |
25931 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25932 | ||
25933 | fi | |
25934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 | |
25935 | $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } | |
25936 | if test $gl_cv_header_netinet_in_h_selfcontained = yes; then | |
25937 | NETINET_IN_H='' | |
25938 | else | |
25939 | NETINET_IN_H='netinet/in.h' | |
25940 | for ac_header in netinet/in.h | |
25941 | do : | |
25942 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
25943 | if test "x$ac_cv_header_netinet_in_h" = xyes; then : | |
25944 | cat >>confdefs.h <<_ACEOF | |
25945 | #define HAVE_NETINET_IN_H 1 | |
25946 | _ACEOF | |
25947 | ||
25948 | fi | |
25949 | ||
25950 | done | |
25951 | ||
25952 | ||
25953 | ||
25954 | ||
25955 | ||
25956 | ||
25957 | ||
725e2999 JB |
25958 | |
25959 | ||
25960 | ||
25961 | if test $gl_cv_have_include_next = yes; then | |
25962 | gl_cv_next_netinet_in_h='<'netinet/in.h'>' | |
25963 | else | |
25964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5 | |
25965 | $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; } | |
25966 | if ${gl_cv_next_netinet_in_h+:} false; then : | |
25967 | $as_echo_n "(cached) " >&6 | |
25968 | else | |
25969 | ||
25970 | if test $ac_cv_header_netinet_in_h = yes; then | |
25971 | ||
25972 | ||
25973 | ||
25974 | ||
25975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25976 | /* end confdefs.h. */ | |
25977 | #include <netinet/in.h> | |
25978 | _ACEOF | |
25979 | case "$host_os" in | |
25980 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25981 | *) gl_absname_cpp="$ac_cpp" ;; | |
25982 | esac | |
25983 | ||
25984 | case "$host_os" in | |
25985 | mingw*) | |
25986 | gl_dirsep_regex='[/\\]' | |
25987 | ;; | |
25988 | *) | |
25989 | gl_dirsep_regex='\/' | |
25990 | ;; | |
25991 | esac | |
25992 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
25993 | gl_header_literal_regex=`echo 'netinet/in.h' \ | |
25994 | | sed -e "$gl_make_literal_regex_sed"` | |
25995 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25996 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25997 | s|^/[^/]|//&| | |
25998 | p | |
25999 | q | |
26000 | }' | |
26001 | ||
26002 | gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26003 | sed -n "$gl_absolute_header_sed"` | |
26004 | ||
26005 | gl_header=$gl_cv_absolute_netinet_in_h | |
26006 | gl_cv_next_netinet_in_h='"'$gl_header'"' | |
26007 | else | |
26008 | gl_cv_next_netinet_in_h='<'netinet/in.h'>' | |
26009 | fi | |
26010 | ||
26011 | ||
26012 | fi | |
26013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 | |
26014 | $as_echo "$gl_cv_next_netinet_in_h" >&6; } | |
26015 | fi | |
26016 | NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h | |
26017 | ||
26018 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
26019 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26020 | gl_next_as_first_directive='<'netinet/in.h'>' | |
26021 | else | |
26022 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26023 | gl_next_as_first_directive=$gl_cv_next_netinet_in_h | |
26024 | fi | |
26025 | NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive | |
26026 | ||
26027 | ||
26028 | ||
26029 | ||
26030 | if test $ac_cv_header_netinet_in_h = yes; then | |
26031 | HAVE_NETINET_IN_H=1 | |
26032 | else | |
26033 | HAVE_NETINET_IN_H=0 | |
26034 | fi | |
26035 | ||
26036 | fi | |
26037 | ||
26038 | if test -n "$NETINET_IN_H"; then | |
26039 | GL_GENERATE_NETINET_IN_H_TRUE= | |
26040 | GL_GENERATE_NETINET_IN_H_FALSE='#' | |
26041 | else | |
26042 | GL_GENERATE_NETINET_IN_H_TRUE='#' | |
26043 | GL_GENERATE_NETINET_IN_H_FALSE= | |
26044 | fi | |
26045 | ||
26046 | ||
26047 | ||
26048 | ||
8690e634 | 26049 | |
c0c3707f | 26050 | |
6ec2e0f5 SDJ |
26051 | case "$host_os" in |
26052 | mingw* | pw*) | |
26053 | REPLACE_OPEN=1 | |
26054 | ;; | |
26055 | *) | |
26056 | ||
c0c3707f CB |
26057 | if test "$gl_cv_macro_O_CLOEXEC" != yes; then |
26058 | REPLACE_OPEN=1 | |
26059 | fi | |
472fa5ee SM |
26060 | |
26061 | ||
c0c3707f | 26062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 |
6ec2e0f5 | 26063 | $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } |
d0ac1c44 | 26064 | if ${gl_cv_func_open_slash+:} false; then : |
6ec2e0f5 SDJ |
26065 | $as_echo_n "(cached) " >&6 |
26066 | else | |
26067 | # Assume that if we have lstat, we can also check symlinks. | |
c0c3707f CB |
26068 | if test $ac_cv_func_lstat = yes; then |
26069 | touch conftest.tmp | |
26070 | ln -s conftest.tmp conftest.lnk | |
26071 | fi | |
26072 | if test "$cross_compiling" = yes; then : | |
8690e634 | 26073 | |
c0c3707f CB |
26074 | case "$host_os" in |
26075 | freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) | |
26076 | gl_cv_func_open_slash="guessing no" ;; | |
26077 | *) | |
26078 | gl_cv_func_open_slash="guessing yes" ;; | |
26079 | esac | |
8690e634 | 26080 | |
6ec2e0f5 SDJ |
26081 | else |
26082 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26083 | /* end confdefs.h. */ | |
26084 | ||
26085 | #include <fcntl.h> | |
26086 | #if HAVE_UNISTD_H | |
26087 | # include <unistd.h> | |
26088 | #endif | |
9c9d63b1 PM |
26089 | |
26090 | ||
26091 | $gl_mda_defines | |
26092 | ||
6ec2e0f5 SDJ |
26093 | int main () |
26094 | { | |
26095 | int result = 0; | |
26096 | #if HAVE_LSTAT | |
26097 | if (open ("conftest.lnk/", O_RDONLY) != -1) | |
26098 | result |= 1; | |
26099 | #endif | |
26100 | if (open ("conftest.sl/", O_CREAT, 0600) >= 0) | |
26101 | result |= 2; | |
26102 | return result; | |
26103 | } | |
26104 | _ACEOF | |
26105 | if ac_fn_c_try_run "$LINENO"; then : | |
26106 | gl_cv_func_open_slash=yes | |
26107 | else | |
26108 | gl_cv_func_open_slash=no | |
26109 | fi | |
26110 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26111 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26112 | fi | |
8690e634 | 26113 | |
c0c3707f | 26114 | rm -f conftest.sl conftest.tmp conftest.lnk |
8690e634 | 26115 | |
6ec2e0f5 SDJ |
26116 | fi |
26117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 | |
26118 | $as_echo "$gl_cv_func_open_slash" >&6; } | |
c0c3707f CB |
26119 | case "$gl_cv_func_open_slash" in |
26120 | *no) | |
8690e634 | 26121 | |
6ec2e0f5 | 26122 | $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h |
8690e634 | 26123 | |
6ec2e0f5 SDJ |
26124 | ;; |
26125 | esac | |
8690e634 | 26126 | |
c0c3707f CB |
26127 | case "$gl_cv_func_open_slash" in |
26128 | *no) | |
26129 | REPLACE_OPEN=1 | |
26130 | ;; | |
26131 | esac | |
26132 | ;; | |
26133 | esac | |
472fa5ee | 26134 | |
c0c3707f | 26135 | if test $REPLACE_OPEN = 0; then |
472fa5ee SM |
26136 | |
26137 | ||
26138 | ||
6ec2e0f5 SDJ |
26139 | if test $ac_cv_func_fchdir = no; then |
26140 | HAVE_FCHDIR=0 | |
26141 | fi | |
c971b7fa | 26142 | |
6ec2e0f5 SDJ |
26143 | if test $HAVE_FCHDIR = 0; then |
26144 | REPLACE_OPEN=1 | |
26145 | fi | |
26146 | fi | |
c971b7fa PA |
26147 | |
26148 | ||
26149 | ||
6ec2e0f5 | 26150 | if test $REPLACE_OPEN = 1; then |
c971b7fa PA |
26151 | |
26152 | ||
26153 | ||
26154 | ||
26155 | ||
c971b7fa PA |
26156 | |
26157 | ||
c971b7fa | 26158 | |
6ec2e0f5 | 26159 | gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" |
c971b7fa | 26160 | |
c971b7fa PA |
26161 | |
26162 | ||
6ec2e0f5 SDJ |
26163 | : |
26164 | ||
a512b375 | 26165 | fi |
c971b7fa PA |
26166 | |
26167 | ||
26168 | ||
26169 | ||
26170 | ||
6ec2e0f5 | 26171 | GNULIB_OPEN=1 |
c971b7fa PA |
26172 | |
26173 | ||
26174 | ||
26175 | ||
26176 | ||
6ec2e0f5 | 26177 | $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h |
c971b7fa PA |
26178 | |
26179 | ||
26180 | ||
26181 | ||
26182 | ||
c971b7fa | 26183 | |
c971b7fa | 26184 | |
472fa5ee | 26185 | |
63ce7108 | 26186 | |
c0c3707f CB |
26187 | case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in |
26188 | yes+*yes+yes) | |
6ec2e0f5 SDJ |
26189 | ;; |
26190 | yes+*) | |
c0c3707f | 26191 | # Solaris 10 lacks O_CLOEXEC. |
6ec2e0f5 SDJ |
26192 | # Solaris 9 has *at functions, but uniformly mishandles trailing |
26193 | # slash in all of them. | |
26194 | REPLACE_OPENAT=1 | |
26195 | ;; | |
26196 | *) | |
26197 | HAVE_OPENAT=0 | |
26198 | ;; | |
26199 | esac | |
63ce7108 | 26200 | |
6ec2e0f5 | 26201 | if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then |
63ce7108 | 26202 | |
63ce7108 | 26203 | |
63ce7108 | 26204 | |
63ce7108 | 26205 | |
63ce7108 TT |
26206 | |
26207 | ||
63ce7108 | 26208 | |
63ce7108 | 26209 | |
6ec2e0f5 | 26210 | gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" |
63ce7108 TT |
26211 | |
26212 | ||
26213 | ||
6ec2e0f5 | 26214 | : |
63ce7108 | 26215 | |
6ec2e0f5 | 26216 | fi |
63ce7108 TT |
26217 | |
26218 | ||
6ec2e0f5 SDJ |
26219 | cat >>confdefs.h <<_ACEOF |
26220 | #define GNULIB_OPENAT 1 | |
26221 | _ACEOF | |
63ce7108 | 26222 | |
63ce7108 | 26223 | |
63ce7108 TT |
26224 | |
26225 | ||
26226 | ||
26227 | ||
6ec2e0f5 | 26228 | GNULIB_OPENAT=1 |
63ce7108 | 26229 | |
63ce7108 | 26230 | |
63ce7108 | 26231 | |
63ce7108 | 26232 | |
63ce7108 | 26233 | |
6ec2e0f5 | 26234 | $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h |
63ce7108 TT |
26235 | |
26236 | ||
63ce7108 | 26237 | |
63ce7108 | 26238 | |
63ce7108 | 26239 | |
63ce7108 | 26240 | |
6ec2e0f5 SDJ |
26241 | for ac_func in opendir |
26242 | do : | |
26243 | ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" | |
d0ac1c44 | 26244 | if test "x$ac_cv_func_opendir" = xyes; then : |
6ec2e0f5 SDJ |
26245 | cat >>confdefs.h <<_ACEOF |
26246 | #define HAVE_OPENDIR 1 | |
63ce7108 | 26247 | _ACEOF |
6ec2e0f5 | 26248 | |
63ce7108 | 26249 | fi |
6ec2e0f5 | 26250 | done |
63ce7108 | 26251 | |
6ec2e0f5 SDJ |
26252 | if test $ac_cv_func_opendir = no; then |
26253 | HAVE_OPENDIR=0 | |
26254 | fi | |
63ce7108 | 26255 | |
6ec2e0f5 SDJ |
26256 | |
26257 | ||
26258 | ||
26259 | if test $ac_cv_func_fchdir = no; then | |
26260 | HAVE_FCHDIR=0 | |
63ce7108 | 26261 | fi |
63ce7108 | 26262 | |
6ec2e0f5 SDJ |
26263 | if test $HAVE_FCHDIR = 0; then |
26264 | if test $HAVE_OPENDIR = 1; then | |
26265 | REPLACE_OPENDIR=1 | |
26266 | fi | |
26267 | fi | |
26268 | ||
26269 | case $host_os,$HAVE_OPENDIR in | |
26270 | os2*,1) | |
26271 | REPLACE_OPENDIR=1;; | |
26272 | esac | |
26273 | ||
26274 | if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then | |
63ce7108 TT |
26275 | |
26276 | ||
26277 | ||
26278 | ||
26279 | ||
26280 | ||
26281 | ||
26282 | ||
6ec2e0f5 | 26283 | gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" |
63ce7108 TT |
26284 | |
26285 | fi | |
26286 | ||
26287 | ||
26288 | ||
26289 | ||
26290 | ||
6ec2e0f5 | 26291 | GNULIB_OPENDIR=1 |
63ce7108 TT |
26292 | |
26293 | ||
26294 | ||
26295 | ||
63ce7108 | 26296 | |
6ec2e0f5 | 26297 | $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h |
63ce7108 TT |
26298 | |
26299 | ||
26300 | ||
26301 | ||
26302 | ||
26303 | ||
26304 | ||
2196f55f YQ |
26305 | |
26306 | ||
8424cc97 | 26307 | |
9c9d63b1 PM |
26308 | if test $ac_cv_func_pipe != yes; then |
26309 | HAVE_PIPE=0 | |
26310 | fi | |
26311 | ||
26312 | if test $HAVE_PIPE = 0; then | |
26313 | ||
26314 | ||
26315 | ||
26316 | ||
26317 | ||
26318 | ||
26319 | ||
26320 | ||
26321 | gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext" | |
26322 | ||
26323 | fi | |
26324 | ||
26325 | ||
26326 | ||
26327 | ||
26328 | ||
26329 | GNULIB_PIPE=1 | |
26330 | ||
26331 | ||
26332 | ||
26333 | ||
26334 | ||
26335 | $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h | |
26336 | ||
26337 | ||
26338 | ||
26339 | ||
26340 | ||
26341 | ||
26342 | ||
8424cc97 SM |
26343 | for ac_func in rawmemchr |
26344 | do : | |
26345 | ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" | |
d0ac1c44 | 26346 | if test "x$ac_cv_func_rawmemchr" = xyes; then : |
8424cc97 SM |
26347 | cat >>confdefs.h <<_ACEOF |
26348 | #define HAVE_RAWMEMCHR 1 | |
26349 | _ACEOF | |
26350 | ||
26351 | fi | |
26352 | done | |
26353 | ||
26354 | if test $ac_cv_func_rawmemchr = no; then | |
26355 | HAVE_RAWMEMCHR=0 | |
26356 | fi | |
26357 | ||
26358 | if test $HAVE_RAWMEMCHR = 0; then | |
26359 | ||
26360 | ||
26361 | ||
26362 | ||
26363 | ||
26364 | ||
26365 | ||
26366 | ||
26367 | gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" | |
26368 | ||
26369 | : | |
26370 | fi | |
26371 | ||
26372 | ||
26373 | ||
26374 | ||
26375 | ||
26376 | GNULIB_RAWMEMCHR=1 | |
26377 | ||
26378 | ||
26379 | ||
26380 | ||
26381 | ||
26382 | $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h | |
26383 | ||
26384 | ||
26385 | ||
26386 | ||
26387 | ||
26388 | ||
6ec2e0f5 SDJ |
26389 | for ac_func in readdir |
26390 | do : | |
26391 | ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" | |
d0ac1c44 | 26392 | if test "x$ac_cv_func_readdir" = xyes; then : |
6ec2e0f5 SDJ |
26393 | cat >>confdefs.h <<_ACEOF |
26394 | #define HAVE_READDIR 1 | |
26395 | _ACEOF | |
26396 | ||
26397 | fi | |
26398 | done | |
26399 | ||
26400 | if test $ac_cv_func_readdir = no; then | |
26401 | HAVE_READDIR=0 | |
26402 | fi | |
26403 | ||
26404 | if test $HAVE_READDIR = 0; then | |
26405 | ||
26406 | ||
26407 | ||
26408 | ||
26409 | ||
26410 | ||
26411 | ||
26412 | ||
26413 | gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext" | |
26414 | ||
26415 | fi | |
26416 | ||
26417 | ||
26418 | ||
26419 | ||
26420 | ||
26421 | GNULIB_READDIR=1 | |
26422 | ||
26423 | ||
26424 | ||
26425 | ||
26426 | ||
26427 | $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h | |
26428 | ||
26429 | ||
26430 | ||
26431 | ||
26432 | ||
26433 | ||
2196f55f YQ |
26434 | if test $ac_cv_func_readlink = no; then |
26435 | HAVE_READLINK=0 | |
26436 | else | |
26437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
26438 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
d0ac1c44 | 26439 | if ${gl_cv_decl_readlink_works+:} false; then : |
2196f55f YQ |
26440 | $as_echo_n "(cached) " >&6 |
26441 | else | |
26442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26443 | /* end confdefs.h. */ | |
26444 | #include <unistd.h> | |
26445 | /* Cause compilation failure if original declaration has wrong type. */ | |
26446 | ssize_t readlink (const char *, char *, size_t); | |
26447 | int | |
26448 | main () | |
26449 | { | |
26450 | ||
26451 | ; | |
26452 | return 0; | |
26453 | } | |
26454 | _ACEOF | |
26455 | if ac_fn_c_try_compile "$LINENO"; then : | |
26456 | gl_cv_decl_readlink_works=yes | |
26457 | else | |
26458 | gl_cv_decl_readlink_works=no | |
26459 | fi | |
26460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26461 | fi | |
26462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
26463 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
26464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
26465 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
9c9d63b1 | 26466 | if ${gl_cv_func_readlink_trailing_slash+:} false; then : |
2196f55f YQ |
26467 | $as_echo_n "(cached) " >&6 |
26468 | else | |
26469 | # We have readlink, so assume ln -s works. | |
26470 | ln -s conftest.no-such conftest.link | |
26471 | ln -s conftest.link conftest.lnk2 | |
26472 | if test "$cross_compiling" = yes; then : | |
26473 | case "$host_os" in | |
9c9d63b1 PM |
26474 | # Guess yes on Linux or glibc systems. |
26475 | linux-* | linux | *-gnu* | gnu*) | |
26476 | gl_cv_func_readlink_trailing_slash="guessing yes" ;; | |
26477 | # Guess no on AIX or HP-UX. | |
26478 | aix* | hpux*) | |
26479 | gl_cv_func_readlink_trailing_slash="guessing no" ;; | |
26480 | # If we don't know, obey --enable-cross-guesses. | |
26481 | *) | |
26482 | gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;; | |
2196f55f YQ |
26483 | esac |
26484 | ||
26485 | else | |
26486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26487 | /* end confdefs.h. */ | |
26488 | #include <unistd.h> | |
26489 | ||
26490 | int | |
26491 | main () | |
26492 | { | |
26493 | char buf[20]; | |
26494 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
26495 | ; | |
26496 | return 0; | |
26497 | } | |
26498 | _ACEOF | |
26499 | if ac_fn_c_try_run "$LINENO"; then : | |
9c9d63b1 | 26500 | gl_cv_func_readlink_trailing_slash=yes |
2196f55f | 26501 | else |
9c9d63b1 | 26502 | gl_cv_func_readlink_trailing_slash=no |
2196f55f YQ |
26503 | fi |
26504 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26505 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26506 | fi | |
26507 | ||
26508 | rm -f conftest.link conftest.lnk2 | |
26509 | fi | |
9c9d63b1 PM |
26510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5 |
26511 | $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; } | |
26512 | case "$gl_cv_func_readlink_trailing_slash" in | |
2196f55f YQ |
26513 | *yes) |
26514 | if test "$gl_cv_decl_readlink_works" != yes; then | |
26515 | REPLACE_READLINK=1 | |
26516 | fi | |
26517 | ;; | |
26518 | *) | |
26519 | ||
26520 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | |
26521 | ||
26522 | REPLACE_READLINK=1 | |
26523 | ;; | |
26524 | esac | |
9c9d63b1 PM |
26525 | |
26526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5 | |
26527 | $as_echo_n "checking whether readlink truncates results correctly... " >&6; } | |
26528 | if ${gl_cv_func_readlink_truncate+:} false; then : | |
26529 | $as_echo_n "(cached) " >&6 | |
26530 | else | |
26531 | # We have readlink, so assume ln -s works. | |
26532 | ln -s ab conftest.link | |
26533 | if test "$cross_compiling" = yes; then : | |
26534 | case "$host_os" in | |
26535 | # Guess yes on Linux or glibc systems. | |
26536 | linux-* | linux | *-gnu* | gnu*) | |
26537 | gl_cv_func_readlink_truncate="guessing yes" ;; | |
26538 | # Guess no on AIX or HP-UX. | |
26539 | aix* | hpux*) | |
26540 | gl_cv_func_readlink_truncate="guessing no" ;; | |
26541 | # If we don't know, obey --enable-cross-guesses. | |
26542 | *) | |
26543 | gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;; | |
26544 | esac | |
26545 | ||
26546 | else | |
26547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26548 | /* end confdefs.h. */ | |
26549 | #include <unistd.h> | |
26550 | ||
26551 | int | |
26552 | main () | |
26553 | { | |
26554 | char c; | |
26555 | return readlink ("conftest.link", &c, 1) != 1; | |
26556 | ; | |
26557 | return 0; | |
26558 | } | |
26559 | _ACEOF | |
26560 | if ac_fn_c_try_run "$LINENO"; then : | |
26561 | gl_cv_func_readlink_truncate=yes | |
26562 | else | |
26563 | gl_cv_func_readlink_truncate=no | |
26564 | fi | |
26565 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26566 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26567 | fi | |
26568 | ||
26569 | rm -f conftest.link conftest.lnk2 | |
26570 | fi | |
26571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5 | |
26572 | $as_echo "$gl_cv_func_readlink_truncate" >&6; } | |
26573 | case $gl_cv_func_readlink_truncate in | |
26574 | *yes) | |
26575 | if test "$gl_cv_decl_readlink_works" != yes; then | |
26576 | REPLACE_READLINK=1 | |
26577 | fi | |
26578 | ;; | |
26579 | *) | |
26580 | ||
26581 | $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h | |
26582 | ||
26583 | REPLACE_READLINK=1 | |
26584 | ;; | |
26585 | esac | |
2196f55f YQ |
26586 | fi |
26587 | ||
26588 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
26589 | ||
26590 | ||
26591 | ||
26592 | ||
26593 | ||
26594 | ||
26595 | ||
26596 | ||
26597 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | |
26598 | ||
26599 | ||
26600 | : | |
26601 | ||
26602 | fi | |
26603 | ||
26604 | ||
26605 | ||
26606 | ||
26607 | ||
26608 | GNULIB_READLINK=1 | |
26609 | ||
26610 | ||
26611 | ||
26612 | ||
26613 | ||
26614 | $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h | |
26615 | ||
26616 | ||
26617 | ||
26618 | ||
6a29c58e YQ |
26619 | |
26620 | ||
6ec2e0f5 SDJ |
26621 | if test $gl_cv_func_malloc_posix = yes; then |
26622 | ||
26623 | $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h | |
26624 | ||
26625 | else | |
26626 | REPLACE_REALLOC=1 | |
26627 | fi | |
26628 | ||
26629 | if test $REPLACE_REALLOC = 1; then | |
26630 | ||
26631 | ||
26632 | ||
26633 | ||
26634 | ||
26635 | ||
26636 | ||
26637 | ||
26638 | gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" | |
26639 | ||
26640 | fi | |
26641 | ||
26642 | ||
26643 | ||
26644 | ||
26645 | ||
26646 | GNULIB_REALLOC_POSIX=1 | |
26647 | ||
26648 | ||
26649 | ||
26650 | ||
26651 | ||
26652 | $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h | |
26653 | ||
26654 | ||
26655 | ||
26656 | ||
26657 | ||
26658 | ||
6a29c58e YQ |
26659 | |
26660 | ||
26661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5 | |
26662 | $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } | |
d0ac1c44 | 26663 | if ${gl_cv_func_rename_slash_dst_works+:} false; then : |
6a29c58e YQ |
26664 | $as_echo_n "(cached) " >&6 |
26665 | else | |
26666 | rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk | |
26667 | touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || | |
d0ac1c44 | 26668 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
26669 | # Assume that if we have lstat, we can also check symlinks. |
26670 | if test $ac_cv_func_lstat = yes; then | |
26671 | ln -s conftest.f conftest.lnk | |
26672 | fi | |
26673 | if test "$cross_compiling" = yes; then : | |
26674 | case "$host_os" in | |
c0c3707f CB |
26675 | # Guess yes on Linux systems. |
26676 | linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;; | |
26677 | # Guess yes on glibc systems. | |
26678 | *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; | |
26679 | # Guess no on native Windows. | |
26680 | mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; | |
26681 | # If we don't know, obey --enable-cross-guesses. | |
26682 | *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
26683 | esac |
26684 | ||
26685 | else | |
26686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26687 | /* end confdefs.h. */ | |
26688 | ||
26689 | # include <stdio.h> | |
26690 | # include <stdlib.h> | |
26691 | ||
26692 | int | |
26693 | main () | |
26694 | { | |
26695 | int result = 0; | |
26696 | if (rename ("conftest.f1", "conftest.f2/") == 0) | |
26697 | result |= 1; | |
26698 | if (rename ("conftest.d1", "conftest.d2/") != 0) | |
26699 | result |= 2; | |
26700 | #if HAVE_LSTAT | |
26701 | if (rename ("conftest.f", "conftest.lnk/") == 0) | |
26702 | result |= 4; | |
26703 | #endif | |
26704 | return result; | |
26705 | ||
26706 | ; | |
26707 | return 0; | |
26708 | } | |
26709 | _ACEOF | |
26710 | if ac_fn_c_try_run "$LINENO"; then : | |
26711 | gl_cv_func_rename_slash_dst_works=yes | |
26712 | else | |
26713 | gl_cv_func_rename_slash_dst_works=no | |
26714 | fi | |
26715 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26716 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26717 | fi | |
26718 | ||
26719 | rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk | |
26720 | ||
26721 | fi | |
26722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5 | |
26723 | $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } | |
26724 | case "$gl_cv_func_rename_slash_dst_works" in | |
26725 | *yes) ;; | |
26726 | *) | |
26727 | REPLACE_RENAME=1 | |
26728 | ||
26729 | $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h | |
26730 | ||
26731 | ;; | |
26732 | esac | |
26733 | ||
26734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5 | |
26735 | $as_echo_n "checking whether rename honors trailing slash on source... " >&6; } | |
d0ac1c44 | 26736 | if ${gl_cv_func_rename_slash_src_works+:} false; then : |
6a29c58e YQ |
26737 | $as_echo_n "(cached) " >&6 |
26738 | else | |
26739 | rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk | |
26740 | touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || | |
d0ac1c44 | 26741 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
26742 | # Assume that if we have lstat, we can also check symlinks. |
26743 | if test $ac_cv_func_lstat = yes; then | |
26744 | ln -s conftest.f conftest.lnk | |
26745 | fi | |
26746 | if test "$cross_compiling" = yes; then : | |
26747 | case "$host_os" in | |
c0c3707f CB |
26748 | # Guess yes on Linux systems. |
26749 | linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
26750 | # Guess yes on glibc systems. | |
26751 | *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
26752 | # Guess yes on native Windows. | |
26753 | mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; | |
26754 | # If we don't know, obey --enable-cross-guesses. | |
26755 | *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
26756 | esac |
26757 | ||
26758 | else | |
26759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26760 | /* end confdefs.h. */ | |
26761 | ||
26762 | # include <stdio.h> | |
26763 | # include <stdlib.h> | |
26764 | ||
26765 | int | |
26766 | main () | |
26767 | { | |
26768 | int result = 0; | |
26769 | if (rename ("conftest.f1/", "conftest.d3") == 0) | |
26770 | result |= 1; | |
26771 | if (rename ("conftest.d1/", "conftest.d2") != 0) | |
26772 | result |= 2; | |
26773 | #if HAVE_LSTAT | |
26774 | if (rename ("conftest.lnk/", "conftest.f") == 0) | |
26775 | result |= 4; | |
26776 | #endif | |
26777 | return result; | |
26778 | ||
26779 | ; | |
26780 | return 0; | |
26781 | } | |
26782 | _ACEOF | |
26783 | if ac_fn_c_try_run "$LINENO"; then : | |
26784 | gl_cv_func_rename_slash_src_works=yes | |
26785 | else | |
26786 | gl_cv_func_rename_slash_src_works=no | |
26787 | fi | |
26788 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26789 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26790 | fi | |
26791 | ||
26792 | rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk | |
26793 | ||
26794 | fi | |
26795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5 | |
26796 | $as_echo "$gl_cv_func_rename_slash_src_works" >&6; } | |
26797 | case "$gl_cv_func_rename_slash_src_works" in | |
26798 | *yes) ;; | |
26799 | *) | |
26800 | REPLACE_RENAME=1 | |
26801 | ||
26802 | $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h | |
26803 | ||
26804 | ;; | |
26805 | esac | |
26806 | ||
26807 | ||
26808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5 | |
26809 | $as_echo_n "checking whether rename manages hard links correctly... " >&6; } | |
d0ac1c44 | 26810 | if ${gl_cv_func_rename_link_works+:} false; then : |
6a29c58e YQ |
26811 | $as_echo_n "(cached) " >&6 |
26812 | else | |
26813 | if test $ac_cv_func_link = yes; then | |
c0c3707f CB |
26814 | if test $cross_compiling != yes; then |
26815 | rm -rf conftest.f conftest.f1 conftest.f2 | |
26816 | if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && | |
26817 | set x `ls -i conftest.f conftest.f1` && test "" = ""; then | |
26818 | if test "$cross_compiling" = yes; then : | |
26819 | : | |
6a29c58e YQ |
26820 | |
26821 | else | |
26822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26823 | /* end confdefs.h. */ | |
26824 | ||
c0c3707f CB |
26825 | # include <errno.h> |
26826 | # include <stdio.h> | |
26827 | # include <stdlib.h> | |
26828 | # include <unistd.h> | |
6a29c58e | 26829 | |
9c9d63b1 PM |
26830 | |
26831 | $gl_mda_defines | |
26832 | ||
6a29c58e YQ |
26833 | int |
26834 | main () | |
26835 | { | |
26836 | int result = 0; | |
c0c3707f CB |
26837 | if (rename ("conftest.f", "conftest.f1")) |
26838 | result |= 1; | |
26839 | if (unlink ("conftest.f1")) | |
26840 | result |= 2; | |
26841 | ||
26842 | /* Allow either the POSIX-required behavior, where the | |
26843 | previous rename kept conftest.f, or the (better) NetBSD | |
26844 | behavior, where it removed conftest.f. */ | |
26845 | if (rename ("conftest.f", "conftest.f") != 0 | |
26846 | && errno != ENOENT) | |
26847 | result |= 4; | |
26848 | ||
26849 | if (rename ("conftest.f1", "conftest.f1") == 0) | |
26850 | result |= 8; | |
26851 | if (rename ("conftest.f2", "conftest.f2") != 0) | |
26852 | result |= 16; | |
26853 | return result; | |
6a29c58e YQ |
26854 | |
26855 | ; | |
26856 | return 0; | |
26857 | } | |
26858 | _ACEOF | |
26859 | if ac_fn_c_try_run "$LINENO"; then : | |
26860 | gl_cv_func_rename_link_works=yes | |
26861 | else | |
26862 | gl_cv_func_rename_link_works=no | |
26863 | fi | |
26864 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26865 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26866 | fi | |
26867 | ||
c0c3707f CB |
26868 | else |
26869 | gl_cv_func_rename_link_works="guessing no" | |
26870 | fi | |
26871 | rm -rf conftest.f conftest.f1 conftest.f2 | |
6a29c58e | 26872 | else |
c0c3707f CB |
26873 | case "$host_os" in |
26874 | # Guess yes on Linux systems. | |
26875 | linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; | |
26876 | # Guess yes on glibc systems. | |
26877 | *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; | |
26878 | # Guess yes on native Windows. | |
26879 | mingw*) gl_cv_func_rename_link_works="guessing yes" ;; | |
26880 | # If we don't know, obey --enable-cross-guesses. | |
26881 | *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;; | |
26882 | esac | |
6a29c58e | 26883 | fi |
6a29c58e YQ |
26884 | else |
26885 | gl_cv_func_rename_link_works=yes | |
26886 | fi | |
26887 | ||
26888 | fi | |
26889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5 | |
26890 | $as_echo "$gl_cv_func_rename_link_works" >&6; } | |
26891 | case "$gl_cv_func_rename_link_works" in | |
26892 | *yes) ;; | |
26893 | *) | |
26894 | REPLACE_RENAME=1 | |
26895 | ||
26896 | $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h | |
26897 | ||
26898 | ;; | |
26899 | esac | |
26900 | ||
26901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5 | |
26902 | $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } | |
d0ac1c44 | 26903 | if ${gl_cv_func_rename_dest_works+:} false; then : |
6a29c58e YQ |
26904 | $as_echo_n "(cached) " >&6 |
26905 | else | |
26906 | rm -rf conftest.f conftest.d1 conftest.d2 | |
26907 | touch conftest.f && mkdir conftest.d1 conftest.d2 || | |
d0ac1c44 | 26908 | as_fn_error $? "cannot create temporary files" "$LINENO" 5 |
6a29c58e YQ |
26909 | if test "$cross_compiling" = yes; then : |
26910 | case "$host_os" in | |
c0c3707f CB |
26911 | # Guess yes on Linux systems. |
26912 | linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;; | |
26913 | # Guess yes on glibc systems. | |
26914 | *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; | |
26915 | # Guess no on native Windows. | |
26916 | mingw*) gl_cv_func_rename_dest_works="guessing no" ;; | |
26917 | # If we don't know, obey --enable-cross-guesses. | |
26918 | *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
26919 | esac |
26920 | ||
26921 | else | |
26922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26923 | /* end confdefs.h. */ | |
26924 | ||
26925 | # include <stdio.h> | |
26926 | # include <stdlib.h> | |
26927 | ||
26928 | int | |
26929 | main () | |
26930 | { | |
26931 | int result = 0; | |
26932 | if (rename ("conftest.d1", "conftest.d2") != 0) | |
26933 | result |= 1; | |
26934 | if (rename ("conftest.d2", "conftest.f") == 0) | |
26935 | result |= 2; | |
26936 | return result; | |
26937 | ||
26938 | ; | |
26939 | return 0; | |
26940 | } | |
26941 | _ACEOF | |
26942 | if ac_fn_c_try_run "$LINENO"; then : | |
26943 | gl_cv_func_rename_dest_works=yes | |
26944 | else | |
26945 | gl_cv_func_rename_dest_works=no | |
26946 | fi | |
26947 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26948 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26949 | fi | |
26950 | ||
26951 | rm -rf conftest.f conftest.d1 conftest.d2 | |
26952 | ||
26953 | fi | |
26954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5 | |
26955 | $as_echo "$gl_cv_func_rename_dest_works" >&6; } | |
26956 | case "$gl_cv_func_rename_dest_works" in | |
26957 | *yes) ;; | |
26958 | *) | |
26959 | REPLACE_RENAME=1 | |
26960 | ||
26961 | $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h | |
26962 | ||
26963 | ;; | |
26964 | esac | |
26965 | ||
26966 | if test $REPLACE_RENAME = 1; then | |
26967 | ||
26968 | ||
26969 | ||
26970 | ||
26971 | ||
26972 | ||
26973 | ||
26974 | ||
26975 | gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" | |
26976 | ||
26977 | fi | |
26978 | ||
26979 | ||
26980 | ||
26981 | ||
26982 | ||
26983 | GNULIB_RENAME=1 | |
26984 | ||
26985 | ||
26986 | ||
26987 | ||
26988 | ||
26989 | $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h | |
26990 | ||
26991 | ||
26992 | ||
26993 | ||
26994 | ||
26995 | ||
6ec2e0f5 SDJ |
26996 | for ac_func in rewinddir |
26997 | do : | |
26998 | ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" | |
d0ac1c44 | 26999 | if test "x$ac_cv_func_rewinddir" = xyes; then : |
6ec2e0f5 SDJ |
27000 | cat >>confdefs.h <<_ACEOF |
27001 | #define HAVE_REWINDDIR 1 | |
27002 | _ACEOF | |
27003 | ||
27004 | fi | |
27005 | done | |
27006 | ||
27007 | if test $ac_cv_func_rewinddir = no; then | |
27008 | HAVE_REWINDDIR=0 | |
27009 | fi | |
27010 | ||
27011 | if test $HAVE_REWINDDIR = 0; then | |
27012 | ||
27013 | ||
27014 | ||
27015 | ||
27016 | ||
27017 | ||
27018 | ||
27019 | ||
27020 | gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext" | |
27021 | ||
27022 | fi | |
27023 | ||
27024 | ||
27025 | ||
27026 | ||
27027 | ||
27028 | GNULIB_REWINDDIR=1 | |
27029 | ||
27030 | ||
27031 | ||
27032 | ||
27033 | ||
27034 | $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h | |
27035 | ||
27036 | ||
27037 | ||
27038 | ||
27039 | ||
27040 | ||
6a29c58e YQ |
27041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 |
27042 | $as_echo_n "checking whether rmdir works... " >&6; } | |
d0ac1c44 | 27043 | if ${gl_cv_func_rmdir_works+:} false; then : |
6a29c58e YQ |
27044 | $as_echo_n "(cached) " >&6 |
27045 | else | |
27046 | mkdir conftest.dir | |
27047 | touch conftest.file | |
27048 | if test "$cross_compiling" = yes; then : | |
27049 | case "$host_os" in | |
c0c3707f CB |
27050 | # Guess yes on Linux systems. |
27051 | linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;; | |
27052 | # Guess yes on glibc systems. | |
27053 | *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; | |
27054 | # Guess no on native Windows. | |
27055 | mingw*) gl_cv_func_rmdir_works="guessing no" ;; | |
27056 | # If we don't know, obey --enable-cross-guesses. | |
27057 | *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;; | |
6a29c58e YQ |
27058 | esac |
27059 | ||
27060 | else | |
27061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27062 | /* end confdefs.h. */ | |
27063 | #include <stdio.h> | |
27064 | #include <errno.h> | |
27065 | #if HAVE_UNISTD_H | |
27066 | # include <unistd.h> | |
27067 | #else /* on Windows with MSVC */ | |
27068 | # include <direct.h> | |
27069 | #endif | |
27070 | ||
9c9d63b1 PM |
27071 | |
27072 | $gl_mda_defines | |
27073 | ||
6a29c58e YQ |
27074 | int |
27075 | main () | |
27076 | { | |
27077 | int result = 0; | |
9c9d63b1 PM |
27078 | if (!rmdir ("conftest.file/")) |
27079 | result |= 1; | |
27080 | else if (errno != ENOTDIR) | |
27081 | result |= 2; | |
27082 | if (!rmdir ("conftest.dir/./")) | |
27083 | result |= 4; | |
27084 | return result; | |
6a29c58e YQ |
27085 | |
27086 | ; | |
27087 | return 0; | |
27088 | } | |
27089 | _ACEOF | |
27090 | if ac_fn_c_try_run "$LINENO"; then : | |
27091 | gl_cv_func_rmdir_works=yes | |
27092 | else | |
27093 | gl_cv_func_rmdir_works=no | |
27094 | fi | |
27095 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27096 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27097 | fi | |
27098 | ||
27099 | rm -rf conftest.dir conftest.file | |
27100 | fi | |
27101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 | |
27102 | $as_echo "$gl_cv_func_rmdir_works" >&6; } | |
27103 | case "$gl_cv_func_rmdir_works" in | |
27104 | *yes) ;; | |
27105 | *) | |
27106 | REPLACE_RMDIR=1 | |
27107 | ;; | |
27108 | esac | |
27109 | ||
27110 | if test $REPLACE_RMDIR = 1; then | |
27111 | ||
27112 | ||
27113 | ||
27114 | ||
27115 | ||
27116 | ||
27117 | ||
27118 | ||
27119 | gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" | |
27120 | ||
27121 | fi | |
27122 | ||
27123 | ||
27124 | ||
27125 | ||
27126 | ||
27127 | GNULIB_RMDIR=1 | |
27128 | ||
27129 | ||
27130 | ||
27131 | ||
27132 | ||
27133 | $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h | |
27134 | ||
27135 | ||
27136 | ||
27137 | ||
0750520d | 27138 | |
5e8754f9 SDJ |
27139 | |
27140 | ||
27141 | ||
3d99e817 AK |
27142 | if test $ac_cv_func_setenv = no; then |
27143 | HAVE_SETENV=0 | |
27144 | else | |
27145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 | |
27146 | $as_echo_n "checking whether setenv validates arguments... " >&6; } | |
d0ac1c44 | 27147 | if ${gl_cv_func_setenv_works+:} false; then : |
3d99e817 AK |
27148 | $as_echo_n "(cached) " >&6 |
27149 | else | |
27150 | if test "$cross_compiling" = yes; then : | |
27151 | case "$host_os" in | |
c0c3707f CB |
27152 | # Guess yes on glibc systems. |
27153 | *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; | |
27154 | # Guess yes on musl systems. | |
27155 | *-musl*) gl_cv_func_setenv_works="guessing yes" ;; | |
27156 | # If we don't know, obey --enable-cross-guesses. | |
27157 | *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;; | |
3d99e817 AK |
27158 | esac |
27159 | ||
27160 | else | |
27161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27162 | /* end confdefs.h. */ | |
27163 | ||
27164 | #include <stdlib.h> | |
27165 | #include <errno.h> | |
27166 | #include <string.h> | |
27167 | ||
27168 | int | |
27169 | main () | |
27170 | { | |
27171 | ||
27172 | int result = 0; | |
27173 | { | |
27174 | if (setenv ("", "", 0) != -1) | |
27175 | result |= 1; | |
27176 | else if (errno != EINVAL) | |
27177 | result |= 2; | |
27178 | } | |
27179 | { | |
27180 | if (setenv ("a", "=", 1) != 0) | |
27181 | result |= 4; | |
27182 | else if (strcmp (getenv ("a"), "=") != 0) | |
27183 | result |= 8; | |
27184 | } | |
27185 | return result; | |
27186 | ||
27187 | ; | |
27188 | return 0; | |
27189 | } | |
27190 | _ACEOF | |
27191 | if ac_fn_c_try_run "$LINENO"; then : | |
27192 | gl_cv_func_setenv_works=yes | |
27193 | else | |
27194 | gl_cv_func_setenv_works=no | |
27195 | fi | |
27196 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27197 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27198 | fi | |
27199 | ||
27200 | fi | |
27201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 | |
27202 | $as_echo "$gl_cv_func_setenv_works" >&6; } | |
27203 | case "$gl_cv_func_setenv_works" in | |
27204 | *yes) ;; | |
27205 | *) | |
27206 | REPLACE_SETENV=1 | |
27207 | ;; | |
27208 | esac | |
27209 | fi | |
27210 | ||
27211 | if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then | |
27212 | ||
27213 | ||
27214 | ||
27215 | ||
27216 | ||
27217 | ||
27218 | ||
27219 | ||
27220 | gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" | |
27221 | ||
27222 | fi | |
27223 | ||
27224 | ||
27225 | ||
27226 | ||
27227 | ||
27228 | GNULIB_SETENV=1 | |
27229 | ||
27230 | ||
27231 | ||
27232 | ||
27233 | ||
27234 | $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h | |
27235 | ||
27236 | ||
27237 | ||
27238 | ||
27239 | ||
0750520d PA |
27240 | |
27241 | ||
27242 | ||
5df4cba6 SM |
27243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 |
27244 | $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } | |
27245 | if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : | |
27246 | $as_echo_n "(cached) " >&6 | |
27247 | else | |
27248 | case "$host_os" in | |
27249 | # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. | |
27250 | *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) | |
27251 | gl_cv_func_setlocale_null_all_mtsafe=no ;; | |
27252 | # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. | |
27253 | *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) | |
27254 | gl_cv_func_setlocale_null_all_mtsafe=yes ;; | |
27255 | # If we don't know, obey --enable-cross-guesses. | |
27256 | *) | |
27257 | gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; | |
27258 | esac | |
27259 | ||
27260 | fi | |
27261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 | |
27262 | $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } | |
27263 | case "$host_os" in | |
27264 | mingw*) ;; | |
27265 | *) | |
27266 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
27267 | gl_cv_func_setlocale_null_all_mtsafe="trivially yes" | |
27268 | fi | |
27269 | ;; | |
27270 | esac | |
27271 | case "$gl_cv_func_setlocale_null_all_mtsafe" in | |
27272 | *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; | |
27273 | *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; | |
27274 | esac | |
27275 | ||
27276 | cat >>confdefs.h <<_ACEOF | |
27277 | #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE | |
27278 | _ACEOF | |
27279 | ||
27280 | ||
27281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 | |
27282 | $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } | |
27283 | if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : | |
27284 | $as_echo_n "(cached) " >&6 | |
27285 | else | |
27286 | case "$host_os" in | |
27287 | # Guess no on OpenBSD, AIX. | |
27288 | openbsd* | aix*) | |
27289 | gl_cv_func_setlocale_null_one_mtsafe=no ;; | |
27290 | # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. | |
27291 | *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) | |
27292 | gl_cv_func_setlocale_null_one_mtsafe=yes ;; | |
27293 | # If we don't know, obey --enable-cross-guesses. | |
27294 | *) | |
27295 | gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; | |
27296 | esac | |
27297 | ||
27298 | fi | |
27299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 | |
27300 | $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } | |
27301 | case "$host_os" in | |
27302 | mingw*) ;; | |
27303 | *) | |
27304 | if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then | |
27305 | gl_cv_func_setlocale_null_one_mtsafe="trivially yes" | |
27306 | fi | |
27307 | ;; | |
27308 | esac | |
27309 | case "$gl_cv_func_setlocale_null_one_mtsafe" in | |
27310 | *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; | |
27311 | *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; | |
27312 | esac | |
27313 | ||
27314 | cat >>confdefs.h <<_ACEOF | |
27315 | #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE | |
27316 | _ACEOF | |
27317 | ||
27318 | ||
27319 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then | |
27320 | case "$host_os" in | |
27321 | mingw*) LIB_SETLOCALE_NULL= ;; | |
27322 | *) | |
27323 | ||
27324 | ||
27325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
27326 | $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } | |
27327 | if ${gl_cv_have_weak+:} false; then : | |
27328 | $as_echo_n "(cached) " >&6 | |
27329 | else | |
27330 | gl_cv_have_weak=no | |
27331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27332 | /* end confdefs.h. */ | |
27333 | extern void xyzzy (); | |
27334 | #pragma weak xyzzy | |
27335 | int | |
27336 | main () | |
27337 | { | |
27338 | xyzzy(); | |
27339 | ; | |
27340 | return 0; | |
27341 | } | |
27342 | _ACEOF | |
27343 | if ac_fn_c_try_link "$LINENO"; then : | |
27344 | gl_cv_have_weak=maybe | |
27345 | fi | |
27346 | rm -f core conftest.err conftest.$ac_objext \ | |
27347 | conftest$ac_exeext conftest.$ac_ext | |
27348 | if test $gl_cv_have_weak = maybe; then | |
27349 | if test "$cross_compiling" = yes; then : | |
27350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27351 | /* end confdefs.h. */ | |
27352 | #ifdef __ELF__ | |
27353 | Extensible Linking Format | |
27354 | #endif | |
27355 | ||
27356 | _ACEOF | |
27357 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
27358 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
27359 | gl_cv_have_weak="guessing yes" | |
27360 | else | |
27361 | gl_cv_have_weak="guessing no" | |
27362 | fi | |
27363 | rm -f conftest* | |
27364 | ||
27365 | ||
27366 | else | |
27367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27368 | /* end confdefs.h. */ | |
27369 | ||
27370 | #include <stdio.h> | |
27371 | #pragma weak fputs | |
27372 | int main () | |
27373 | { | |
27374 | return (fputs == NULL); | |
27375 | } | |
27376 | _ACEOF | |
27377 | if ac_fn_c_try_run "$LINENO"; then : | |
27378 | gl_cv_have_weak=yes | |
27379 | else | |
27380 | gl_cv_have_weak=no | |
27381 | fi | |
27382 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27383 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27384 | fi | |
27385 | ||
27386 | fi | |
27387 | case " $LDFLAGS " in | |
27388 | *" -static "*) gl_cv_have_weak=no ;; | |
27389 | esac | |
27390 | case "$gl_cv_have_weak" in | |
27391 | *yes) | |
27392 | case "$host_os" in | |
27393 | freebsd* | dragonfly*) | |
27394 | : > conftest1.c | |
27395 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
27396 | cat <<EOF > conftest2.c | |
27397 | #include <pthread.h> | |
27398 | #pragma weak pthread_mutexattr_gettype | |
27399 | int main () | |
27400 | { | |
27401 | return (pthread_mutexattr_gettype != NULL); | |
27402 | } | |
27403 | EOF | |
27404 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
27405 | || gl_cv_have_weak=no | |
27406 | rm -f conftest1.c libempty.so conftest2.c conftest | |
27407 | ;; | |
27408 | esac | |
27409 | ;; | |
27410 | esac | |
27411 | ||
27412 | fi | |
27413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
27414 | $as_echo "$gl_cv_have_weak" >&6; } | |
27415 | case "$gl_cv_have_weak" in | |
27416 | *yes) | |
27417 | ||
27418 | $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
27419 | ||
27420 | ;; | |
27421 | esac | |
27422 | ||
27423 | case "$gl_cv_have_weak" in | |
27424 | *yes) LIB_SETLOCALE_NULL= ;; | |
27425 | *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; | |
27426 | esac | |
27427 | ;; | |
27428 | esac | |
27429 | else | |
27430 | LIB_SETLOCALE_NULL= | |
27431 | fi | |
27432 | ||
27433 | ||
27434 | if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then | |
27435 | ||
27436 | ||
27437 | ||
27438 | ||
27439 | ||
27440 | ||
27441 | ||
27442 | ||
27443 | gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext" | |
27444 | ||
27445 | ||
27446 | ||
27447 | ||
27448 | CFLAG_VISIBILITY= | |
27449 | HAVE_VISIBILITY=0 | |
27450 | if test -n "$GCC"; then | |
27451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 | |
27452 | $as_echo_n "checking whether the -Werror option is usable... " >&6; } | |
27453 | if ${gl_cv_cc_vis_werror+:} false; then : | |
27454 | $as_echo_n "(cached) " >&6 | |
27455 | else | |
27456 | gl_save_CFLAGS="$CFLAGS" | |
27457 | CFLAGS="$CFLAGS -Werror" | |
27458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27459 | /* end confdefs.h. */ | |
27460 | ||
27461 | int | |
27462 | main () | |
27463 | { | |
27464 | ||
27465 | ; | |
27466 | return 0; | |
27467 | } | |
27468 | _ACEOF | |
27469 | if ac_fn_c_try_compile "$LINENO"; then : | |
27470 | gl_cv_cc_vis_werror=yes | |
27471 | else | |
27472 | gl_cv_cc_vis_werror=no | |
27473 | fi | |
27474 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27475 | CFLAGS="$gl_save_CFLAGS" | |
27476 | ||
27477 | fi | |
27478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 | |
27479 | $as_echo "$gl_cv_cc_vis_werror" >&6; } | |
27480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 | |
27481 | $as_echo_n "checking for simple visibility declarations... " >&6; } | |
27482 | if ${gl_cv_cc_visibility+:} false; then : | |
27483 | $as_echo_n "(cached) " >&6 | |
27484 | else | |
27485 | gl_save_CFLAGS="$CFLAGS" | |
27486 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
27487 | if test $gl_cv_cc_vis_werror = yes; then | |
27488 | CFLAGS="$CFLAGS -Werror" | |
27489 | fi | |
27490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27491 | /* end confdefs.h. */ | |
27492 | extern __attribute__((__visibility__("hidden"))) int hiddenvar; | |
27493 | extern __attribute__((__visibility__("default"))) int exportedvar; | |
27494 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | |
27495 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | |
27496 | void dummyfunc (void) {} | |
27497 | ||
27498 | int | |
27499 | main () | |
27500 | { | |
27501 | ||
27502 | ; | |
27503 | return 0; | |
27504 | } | |
27505 | _ACEOF | |
27506 | if ac_fn_c_try_compile "$LINENO"; then : | |
27507 | gl_cv_cc_visibility=yes | |
27508 | else | |
27509 | gl_cv_cc_visibility=no | |
27510 | fi | |
27511 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27512 | CFLAGS="$gl_save_CFLAGS" | |
27513 | ||
27514 | fi | |
27515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 | |
27516 | $as_echo "$gl_cv_cc_visibility" >&6; } | |
27517 | if test $gl_cv_cc_visibility = yes; then | |
27518 | CFLAG_VISIBILITY="-fvisibility=hidden" | |
27519 | HAVE_VISIBILITY=1 | |
27520 | fi | |
27521 | fi | |
27522 | ||
27523 | ||
27524 | ||
27525 | cat >>confdefs.h <<_ACEOF | |
27526 | #define HAVE_VISIBILITY $HAVE_VISIBILITY | |
27527 | _ACEOF | |
27528 | ||
27529 | ||
27530 | ||
27531 | fi | |
27532 | ||
27533 | ||
27534 | ||
27535 | ||
27536 | ||
27537 | GNULIB_SETLOCALE_NULL=1 | |
27538 | ||
27539 | ||
27540 | ||
27541 | ||
27542 | ||
27543 | $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h | |
27544 | ||
27545 | ||
27546 | ||
27547 | ||
27548 | ||
27549 | ||
27550 | ||
27551 | ||
0750520d PA |
27552 | |
27553 | ||
27554 | ||
27555 | ||
27556 | ||
27557 | ||
27558 | if test $gl_cv_have_include_next = yes; then | |
27559 | gl_cv_next_signal_h='<'signal.h'>' | |
27560 | else | |
27561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | |
27562 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
d0ac1c44 | 27563 | if ${gl_cv_next_signal_h+:} false; then : |
0750520d PA |
27564 | $as_echo_n "(cached) " >&6 |
27565 | else | |
27566 | ||
27567 | ||
27568 | ||
27569 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27570 | /* end confdefs.h. */ | |
27571 | #include <signal.h> | |
27572 | _ACEOF | |
27573 | case "$host_os" in | |
27574 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
27575 | *) gl_absname_cpp="$ac_cpp" ;; | |
27576 | esac | |
27577 | ||
27578 | case "$host_os" in | |
27579 | mingw*) | |
27580 | gl_dirsep_regex='[/\\]' | |
27581 | ;; | |
27582 | *) | |
27583 | gl_dirsep_regex='\/' | |
27584 | ;; | |
27585 | esac | |
27586 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
27587 | gl_header_literal_regex=`echo 'signal.h' \ | |
27588 | | sed -e "$gl_make_literal_regex_sed"` | |
27589 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
27590 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
27591 | s|^/[^/]|//&| | |
27592 | p | |
27593 | q | |
27594 | }' | |
27595 | ||
27596 | gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
27597 | sed -n "$gl_absolute_header_sed"` | |
27598 | ||
27599 | gl_header=$gl_cv_absolute_signal_h | |
27600 | gl_cv_next_signal_h='"'$gl_header'"' | |
27601 | ||
27602 | ||
27603 | fi | |
27604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | |
27605 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
27606 | fi | |
27607 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | |
27608 | ||
27609 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
27610 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
27611 | gl_next_as_first_directive='<'signal.h'>' | |
27612 | else | |
27613 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
27614 | gl_next_as_first_directive=$gl_cv_next_signal_h | |
27615 | fi | |
27616 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | |
27617 | ||
27618 | ||
27619 | ||
27620 | ||
27621 | ||
27622 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers | |
27623 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
27624 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
27625 | #include <signal.h> | |
27626 | ||
27627 | " | |
d0ac1c44 | 27628 | if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then : |
0750520d PA |
27629 | |
27630 | else | |
27631 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
27632 | fi | |
27633 | ||
27634 | ||
27635 | ||
27636 | ||
27637 | ||
27638 | ||
27639 | ||
27640 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | |
27641 | #include <signal.h> | |
27642 | ||
27643 | " | |
d0ac1c44 | 27644 | if test "x$ac_cv_type_sighandler_t" = xyes; then : |
0750520d PA |
27645 | |
27646 | else | |
27647 | HAVE_SIGHANDLER_T=0 | |
27648 | fi | |
27649 | ||
27650 | ||
27651 | ||
0750520d | 27652 | |
0750520d PA |
27653 | |
27654 | ||
698be2d8 CB |
27655 | |
27656 | ||
725e2999 JB |
27657 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
27658 | /* <sys/types.h> is not needed according to POSIX, but the | |
27659 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
27660 | powerpc-apple-darwin5.5 required it. */ | |
27661 | #include <sys/types.h> | |
27662 | #if HAVE_SYS_SOCKET_H | |
27663 | # include <sys/socket.h> | |
27664 | #elif HAVE_WS2TCPIP_H | |
27665 | # include <ws2tcpip.h> | |
27666 | #endif | |
27667 | ||
27668 | " | |
27669 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
27670 | ||
27671 | else | |
27672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 | |
27673 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
c0c3707f | 27674 | if ${gl_cv_socklen_t_equiv+:} false; then : |
725e2999 JB |
27675 | $as_echo_n "(cached) " >&6 |
27676 | else | |
27677 | # Systems have either "struct sockaddr *" or | |
27678 | # "void *" as the second argument to getpeername | |
27679 | gl_cv_socklen_t_equiv= | |
27680 | for arg2 in "struct sockaddr" void; do | |
27681 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
27682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27683 | /* end confdefs.h. */ | |
27684 | #include <sys/types.h> | |
27685 | #include <sys/socket.h> | |
27686 | ||
27687 | int getpeername (int, $arg2 *, $t *); | |
27688 | int | |
27689 | main () | |
27690 | { | |
27691 | $t len; | |
27692 | getpeername (0, 0, &len); | |
27693 | ; | |
27694 | return 0; | |
27695 | } | |
27696 | _ACEOF | |
27697 | if ac_fn_c_try_compile "$LINENO"; then : | |
27698 | gl_cv_socklen_t_equiv="$t" | |
27699 | fi | |
27700 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27701 | test "$gl_cv_socklen_t_equiv" != "" && break | |
27702 | done | |
27703 | test "$gl_cv_socklen_t_equiv" != "" && break | |
27704 | done | |
c0c3707f CB |
27705 | if test "$gl_cv_socklen_t_equiv" = ""; then |
27706 | as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
27707 | fi | |
725e2999 JB |
27708 | |
27709 | fi | |
c0c3707f | 27710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 |
725e2999 JB |
27711 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } |
27712 | ||
27713 | cat >>confdefs.h <<_ACEOF | |
27714 | #define socklen_t $gl_cv_socklen_t_equiv | |
27715 | _ACEOF | |
27716 | ||
27717 | fi | |
27718 | ||
0750520d | 27719 | |
63ce7108 TT |
27720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 |
27721 | $as_echo_n "checking for ssize_t... " >&6; } | |
d0ac1c44 | 27722 | if ${gt_cv_ssize_t+:} false; then : |
63ce7108 TT |
27723 | $as_echo_n "(cached) " >&6 |
27724 | else | |
27725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27726 | /* end confdefs.h. */ | |
27727 | #include <sys/types.h> | |
27728 | int | |
27729 | main () | |
27730 | { | |
27731 | int x = sizeof (ssize_t *) + sizeof (ssize_t); | |
27732 | return !x; | |
27733 | ; | |
27734 | return 0; | |
27735 | } | |
27736 | _ACEOF | |
27737 | if ac_fn_c_try_compile "$LINENO"; then : | |
27738 | gt_cv_ssize_t=yes | |
27739 | else | |
27740 | gt_cv_ssize_t=no | |
27741 | fi | |
27742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27743 | fi | |
27744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 | |
27745 | $as_echo "$gt_cv_ssize_t" >&6; } | |
27746 | if test $gt_cv_ssize_t = no; then | |
27747 | ||
27748 | $as_echo "#define ssize_t int" >>confdefs.h | |
27749 | ||
27750 | fi | |
27751 | ||
27752 | ||
27753 | ||
27754 | ||
472fa5ee | 27755 | |
c0c3707f CB |
27756 | case "$host_os" in |
27757 | mingw*) | |
d706b69e | 27758 | ;; |
c0c3707f CB |
27759 | *) |
27760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
27761 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
27762 | if ${gl_cv_func_stat_file_slash+:} false; then : | |
2196f55f YQ |
27763 | $as_echo_n "(cached) " >&6 |
27764 | else | |
c0c3707f CB |
27765 | touch conftest.tmp |
27766 | # Assume that if we have lstat, we can also check symlinks. | |
27767 | if test $ac_cv_func_lstat = yes; then | |
27768 | ln -s conftest.tmp conftest.lnk | |
27769 | fi | |
27770 | if test "$cross_compiling" = yes; then : | |
27771 | case "$host_os" in | |
27772 | # Guess yes on Linux systems. | |
27773 | linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; | |
27774 | # Guess yes on glibc systems. | |
27775 | *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; | |
27776 | # If we don't know, obey --enable-cross-guesses. | |
27777 | *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;; | |
27778 | esac | |
27779 | ||
2196f55f YQ |
27780 | else |
27781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27782 | /* end confdefs.h. */ | |
27783 | #include <sys/stat.h> | |
27784 | ||
27785 | int | |
27786 | main () | |
27787 | { | |
c0c3707f CB |
27788 | int result = 0; |
27789 | struct stat st; | |
27790 | if (!stat ("conftest.tmp/", &st)) | |
27791 | result |= 1; | |
27792 | #if HAVE_LSTAT | |
27793 | if (!stat ("conftest.lnk/", &st)) | |
27794 | result |= 2; | |
27795 | #endif | |
27796 | return result; | |
27797 | ||
2196f55f YQ |
27798 | ; |
27799 | return 0; | |
27800 | } | |
27801 | _ACEOF | |
27802 | if ac_fn_c_try_run "$LINENO"; then : | |
c0c3707f | 27803 | gl_cv_func_stat_file_slash=yes |
2196f55f | 27804 | else |
c0c3707f | 27805 | gl_cv_func_stat_file_slash=no |
2196f55f YQ |
27806 | fi |
27807 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27808 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27809 | fi | |
27810 | ||
c0c3707f | 27811 | rm -f conftest.tmp conftest.lnk |
2196f55f | 27812 | fi |
c0c3707f CB |
27813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 |
27814 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
27815 | case $gl_cv_func_stat_file_slash in | |
27816 | *no) | |
27817 | REPLACE_STAT=1 | |
27818 | ||
27819 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h | |
27820 | ;; | |
27821 | esac | |
27822 | case $host_os in | |
27823 | solaris*) | |
27824 | REPLACE_FSTAT=1 ;; | |
27825 | esac | |
27826 | ;; | |
27827 | esac | |
27828 | ||
27829 | if test $REPLACE_STAT = 1; then | |
27830 | ||
27831 | ||
27832 | ||
27833 | ||
27834 | ||
27835 | ||
27836 | ||
27837 | ||
27838 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" | |
27839 | ||
27840 | case "$host_os" in | |
27841 | mingw*) | |
27842 | ||
27843 | ||
27844 | ||
27845 | ||
27846 | ||
27847 | ||
27848 | ||
27849 | ||
27850 | gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" | |
27851 | ||
27852 | ;; | |
27853 | esac | |
27854 | ||
27855 | ||
9c9d63b1 | 27856 | |
c0c3707f CB |
27857 | : |
27858 | ||
27859 | fi | |
27860 | ||
27861 | ||
27862 | ||
27863 | ||
27864 | ||
27865 | GNULIB_STAT=1 | |
27866 | ||
27867 | ||
27868 | ||
27869 | ||
27870 | ||
27871 | $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h | |
27872 | ||
27873 | ||
27874 | ||
27875 | ||
7a6dbc2f | 27876 | |
c0c3707f CB |
27877 | |
27878 | ||
27879 | 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> | |
27880 | #include <sys/stat.h> | |
27881 | " | |
27882 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : | |
27883 | ||
27884 | cat >>confdefs.h <<_ACEOF | |
27885 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 | |
27886 | _ACEOF | |
27887 | ||
27888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
27889 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
27890 | if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : | |
27891 | $as_echo_n "(cached) " >&6 | |
2196f55f | 27892 | else |
5e8754f9 SDJ |
27893 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
27894 | /* end confdefs.h. */ | |
c0c3707f CB |
27895 | |
27896 | #include <sys/types.h> | |
27897 | #include <sys/stat.h> | |
27898 | #if HAVE_SYS_TIME_H | |
27899 | # include <sys/time.h> | |
27900 | #endif | |
27901 | #include <time.h> | |
27902 | struct timespec ts; | |
27903 | struct stat st; | |
7a6dbc2f | 27904 | |
5e8754f9 SDJ |
27905 | int |
27906 | main () | |
27907 | { | |
c0c3707f CB |
27908 | |
27909 | st.st_atim = ts; | |
7a6dbc2f | 27910 | |
5e8754f9 SDJ |
27911 | ; |
27912 | return 0; | |
27913 | } | |
27914 | _ACEOF | |
c0c3707f CB |
27915 | if ac_fn_c_try_compile "$LINENO"; then : |
27916 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
5e8754f9 | 27917 | else |
c0c3707f | 27918 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
2196f55f | 27919 | fi |
c0c3707f | 27920 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2196f55f | 27921 | fi |
c0c3707f CB |
27922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
27923 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
27924 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
2196f55f | 27925 | |
c0c3707f | 27926 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
2196f55f | 27927 | |
c0c3707f CB |
27928 | fi |
27929 | else | |
27930 | 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> | |
27931 | #include <sys/stat.h> | |
27932 | " | |
27933 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : | |
2196f55f | 27934 | |
c0c3707f CB |
27935 | cat >>confdefs.h <<_ACEOF |
27936 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 | |
27937 | _ACEOF | |
2196f55f | 27938 | |
c0c3707f CB |
27939 | |
27940 | else | |
27941 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> | |
27942 | #include <sys/stat.h> | |
27943 | " | |
27944 | if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : | |
27945 | ||
27946 | cat >>confdefs.h <<_ACEOF | |
27947 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
27948 | _ACEOF | |
2196f55f YQ |
27949 | |
27950 | ||
c0c3707f CB |
27951 | else |
27952 | 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> | |
27953 | #include <sys/stat.h> | |
27954 | " | |
27955 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : | |
2196f55f | 27956 | |
c0c3707f CB |
27957 | cat >>confdefs.h <<_ACEOF |
27958 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
27959 | _ACEOF | |
2196f55f YQ |
27960 | |
27961 | ||
c0c3707f | 27962 | fi |
2196f55f | 27963 | |
c0c3707f | 27964 | fi |
2196f55f | 27965 | |
c0c3707f | 27966 | fi |
2196f55f | 27967 | |
c0c3707f | 27968 | fi |
2196f55f YQ |
27969 | |
27970 | ||
27971 | ||
27972 | ||
27973 | ||
c0c3707f CB |
27974 | 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> |
27975 | #include <sys/stat.h> | |
27976 | " | |
27977 | if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : | |
2196f55f | 27978 | |
c0c3707f CB |
27979 | cat >>confdefs.h <<_ACEOF |
27980 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 | |
27981 | _ACEOF | |
2196f55f YQ |
27982 | |
27983 | ||
c0c3707f CB |
27984 | else |
27985 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> | |
27986 | #include <sys/stat.h> | |
27987 | " | |
27988 | if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : | |
2196f55f | 27989 | |
c0c3707f CB |
27990 | cat >>confdefs.h <<_ACEOF |
27991 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 | |
27992 | _ACEOF | |
2196f55f | 27993 | |
2196f55f | 27994 | |
c0c3707f CB |
27995 | else |
27996 | 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> | |
27997 | #include <sys/stat.h> | |
27998 | " | |
27999 | if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : | |
28000 | ||
28001 | cat >>confdefs.h <<_ACEOF | |
28002 | #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 | |
28003 | _ACEOF | |
28004 | ||
28005 | ||
28006 | fi | |
28007 | ||
28008 | fi | |
5e8754f9 | 28009 | |
c0c3707f | 28010 | fi |
2196f55f YQ |
28011 | |
28012 | ||
28013 | ||
725e2999 JB |
28014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
28015 | $as_echo_n "checking for working stdalign.h... " >&6; } | |
28016 | if ${gl_cv_header_working_stdalign_h+:} false; then : | |
28017 | $as_echo_n "(cached) " >&6 | |
28018 | else | |
28019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28020 | /* end confdefs.h. */ | |
28021 | #include <stdalign.h> | |
28022 | #include <stddef.h> | |
28023 | ||
28024 | /* Test that alignof yields a result consistent with offsetof. | |
28025 | This catches GCC bug 52023 | |
c0c3707f | 28026 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ |
725e2999 JB |
28027 | #ifdef __cplusplus |
28028 | template <class t> struct alignof_helper { char a; t b; }; | |
28029 | # define ao(type) offsetof (alignof_helper<type>, b) | |
28030 | #else | |
28031 | # define ao(type) offsetof (struct { char a; type b; }, b) | |
28032 | #endif | |
28033 | char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; | |
28034 | char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; | |
28035 | char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; | |
28036 | ||
28037 | /* Test _Alignas only on platforms where gnulib can help. */ | |
28038 | #if \ | |
28039 | ((defined __cplusplus && 201103 <= __cplusplus) \ | |
28040 | || (defined __APPLE__ && defined __MACH__ \ | |
28041 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ | |
28042 | : __GNUC__) \ | |
c0c3707f CB |
28043 | || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ |
28044 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ | |
725e2999 JB |
28045 | || 1300 <= _MSC_VER) |
28046 | struct alignas_test { char c; char alignas (8) alignas_8; }; | |
28047 | char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 | |
28048 | ? 1 : -1]; | |
28049 | #endif | |
28050 | ||
28051 | int | |
28052 | main () | |
28053 | { | |
28054 | ||
28055 | ; | |
28056 | return 0; | |
28057 | } | |
28058 | _ACEOF | |
28059 | if ac_fn_c_try_compile "$LINENO"; then : | |
28060 | gl_cv_header_working_stdalign_h=yes | |
28061 | else | |
28062 | gl_cv_header_working_stdalign_h=no | |
28063 | fi | |
28064 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
28065 | fi | |
28066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 | |
28067 | $as_echo "$gl_cv_header_working_stdalign_h" >&6; } | |
28068 | ||
28069 | if test $gl_cv_header_working_stdalign_h = yes; then | |
28070 | STDALIGN_H='' | |
28071 | else | |
28072 | STDALIGN_H='stdalign.h' | |
28073 | fi | |
28074 | ||
28075 | ||
28076 | if test -n "$STDALIGN_H"; then | |
28077 | GL_GENERATE_STDALIGN_H_TRUE= | |
28078 | GL_GENERATE_STDALIGN_H_FALSE='#' | |
28079 | else | |
28080 | GL_GENERATE_STDALIGN_H_TRUE='#' | |
28081 | GL_GENERATE_STDALIGN_H_FALSE= | |
28082 | fi | |
28083 | ||
28084 | ||
28085 | ||
2196f55f YQ |
28086 | |
28087 | ||
63ce7108 | 28088 | |
c0c3707f CB |
28089 | if test "$ac_cv_header_stdbool_h" = yes; then |
28090 | case "$host_os" in | |
28091 | solaris*) | |
28092 | if test -z "$GCC"; then | |
28093 | STDBOOL_H='stdbool.h' | |
28094 | else | |
28095 | STDBOOL_H='' | |
28096 | fi | |
28097 | ;; | |
28098 | *) | |
28099 | STDBOOL_H='' | |
28100 | ;; | |
28101 | esac | |
63ce7108 TT |
28102 | else |
28103 | STDBOOL_H='stdbool.h' | |
28104 | fi | |
28105 | ||
28106 | if test -n "$STDBOOL_H"; then | |
28107 | GL_GENERATE_STDBOOL_H_TRUE= | |
28108 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
28109 | else | |
28110 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
28111 | GL_GENERATE_STDBOOL_H_FALSE= | |
28112 | fi | |
28113 | ||
28114 | ||
28115 | if test "$ac_cv_type__Bool" = yes; then | |
28116 | HAVE__BOOL=1 | |
28117 | else | |
28118 | HAVE__BOOL=0 | |
28119 | fi | |
28120 | ||
28121 | ||
28122 | ||
28123 | ||
28124 | ||
9c9d63b1 PM |
28125 | |
28126 | ||
28127 | ||
63ce7108 | 28128 | STDDEF_H= |
4a626d0a | 28129 | |
c0c3707f CB |
28130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 |
28131 | $as_echo_n "checking for good max_align_t... " >&6; } | |
28132 | if ${gl_cv_type_max_align_t+:} false; then : | |
28133 | $as_echo_n "(cached) " >&6 | |
28134 | else | |
28135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28136 | /* end confdefs.h. */ | |
28137 | #include <stddef.h> | |
28138 | unsigned int s = sizeof (max_align_t); | |
9c9d63b1 | 28139 | #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__ |
c0c3707f CB |
28140 | int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; |
28141 | int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; | |
28142 | #endif | |
9c9d63b1 PM |
28143 | typedef struct { char a; max_align_t b; } max_helper; |
28144 | typedef struct { char a; long b; } long_helper; | |
28145 | typedef struct { char a; double b; } double_helper; | |
28146 | typedef struct { char a; long double b; } long_double_helper; | |
28147 | int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1]; | |
28148 | int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1]; | |
28149 | int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1]; | |
c0c3707f CB |
28150 | |
28151 | int | |
28152 | main () | |
28153 | { | |
4a626d0a | 28154 | |
c0c3707f CB |
28155 | ; |
28156 | return 0; | |
28157 | } | |
28158 | _ACEOF | |
28159 | if ac_fn_c_try_compile "$LINENO"; then : | |
28160 | gl_cv_type_max_align_t=yes | |
4a626d0a | 28161 | else |
c0c3707f | 28162 | gl_cv_type_max_align_t=no |
4a626d0a | 28163 | fi |
c0c3707f CB |
28164 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
28165 | ||
28166 | fi | |
28167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 | |
28168 | $as_echo "$gl_cv_type_max_align_t" >&6; } | |
28169 | if test $gl_cv_type_max_align_t = no; then | |
28170 | HAVE_MAX_ALIGN_T=0 | |
28171 | STDDEF_H=stddef.h | |
28172 | fi | |
4a626d0a | 28173 | |
63ce7108 TT |
28174 | if test $gt_cv_c_wchar_t = no; then |
28175 | HAVE_WCHAR_T=0 | |
28176 | STDDEF_H=stddef.h | |
28177 | fi | |
c0c3707f | 28178 | |
63ce7108 TT |
28179 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 |
28180 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
d0ac1c44 | 28181 | if ${gl_cv_decl_null_works+:} false; then : |
63ce7108 TT |
28182 | $as_echo_n "(cached) " >&6 |
28183 | else | |
28184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28185 | /* end confdefs.h. */ | |
28186 | #include <stddef.h> | |
28187 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
28188 | ||
28189 | int | |
28190 | main () | |
28191 | { | |
28192 | ||
28193 | ; | |
28194 | return 0; | |
28195 | } | |
28196 | _ACEOF | |
28197 | if ac_fn_c_try_compile "$LINENO"; then : | |
28198 | gl_cv_decl_null_works=yes | |
28199 | else | |
28200 | gl_cv_decl_null_works=no | |
28201 | fi | |
28202 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
28203 | fi | |
28204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
28205 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
28206 | if test $gl_cv_decl_null_works = no; then | |
28207 | REPLACE_NULL=1 | |
28208 | STDDEF_H=stddef.h | |
28209 | fi | |
28210 | ||
c0c3707f | 28211 | |
63ce7108 TT |
28212 | if test -n "$STDDEF_H"; then |
28213 | GL_GENERATE_STDDEF_H_TRUE= | |
28214 | GL_GENERATE_STDDEF_H_FALSE='#' | |
28215 | else | |
28216 | GL_GENERATE_STDDEF_H_TRUE='#' | |
28217 | GL_GENERATE_STDDEF_H_FALSE= | |
28218 | fi | |
28219 | ||
28220 | if test -n "$STDDEF_H"; then | |
28221 | ||
28222 | ||
28223 | ||
28224 | ||
28225 | ||
28226 | ||
28227 | ||
28228 | ||
28229 | if test $gl_cv_have_include_next = yes; then | |
28230 | gl_cv_next_stddef_h='<'stddef.h'>' | |
28231 | else | |
28232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
28233 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
d0ac1c44 | 28234 | if ${gl_cv_next_stddef_h+:} false; then : |
63ce7108 TT |
28235 | $as_echo_n "(cached) " >&6 |
28236 | else | |
28237 | ||
4a626d0a PA |
28238 | |
28239 | ||
28240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
63ce7108 TT |
28241 | /* end confdefs.h. */ |
28242 | #include <stddef.h> | |
63ce7108 | 28243 | _ACEOF |
4a626d0a PA |
28244 | case "$host_os" in |
28245 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28246 | *) gl_absname_cpp="$ac_cpp" ;; | |
28247 | esac | |
63ce7108 | 28248 | |
4a626d0a PA |
28249 | case "$host_os" in |
28250 | mingw*) | |
28251 | gl_dirsep_regex='[/\\]' | |
28252 | ;; | |
28253 | *) | |
28254 | gl_dirsep_regex='\/' | |
28255 | ;; | |
28256 | esac | |
28257 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28258 | gl_header_literal_regex=`echo 'stddef.h' \ | |
28259 | | sed -e "$gl_make_literal_regex_sed"` | |
28260 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28261 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28262 | s|^/[^/]|//&| | |
28263 | p | |
28264 | q | |
28265 | }' | |
63ce7108 | 28266 | |
4a626d0a PA |
28267 | gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
28268 | sed -n "$gl_absolute_header_sed"` | |
28269 | ||
28270 | gl_header=$gl_cv_absolute_stddef_h | |
28271 | gl_cv_next_stddef_h='"'$gl_header'"' | |
63ce7108 TT |
28272 | |
28273 | ||
28274 | fi | |
28275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
28276 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
28277 | fi | |
28278 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
28279 | ||
28280 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28281 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28282 | gl_next_as_first_directive='<'stddef.h'>' | |
28283 | else | |
28284 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28285 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
28286 | fi | |
28287 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
28288 | ||
28289 | ||
28290 | ||
28291 | ||
28292 | fi | |
28293 | ||
28294 | ||
28295 | ||
28296 | ||
49e4877c | 28297 | $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h |
63ce7108 TT |
28298 | |
28299 | ||
28300 | ||
98399780 YQ |
28301 | |
28302 | ||
28303 | ||
28304 | ||
28305 | ||
4a626d0a PA |
28306 | |
28307 | ||
6a29c58e YQ |
28308 | if test $gl_cv_have_include_next = yes; then |
28309 | gl_cv_next_stdio_h='<'stdio.h'>' | |
28310 | else | |
28311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
28312 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
d0ac1c44 | 28313 | if ${gl_cv_next_stdio_h+:} false; then : |
6a29c58e YQ |
28314 | $as_echo_n "(cached) " >&6 |
28315 | else | |
28316 | ||
4a626d0a PA |
28317 | |
28318 | ||
28319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6a29c58e YQ |
28320 | /* end confdefs.h. */ |
28321 | #include <stdio.h> | |
6a29c58e | 28322 | _ACEOF |
4a626d0a PA |
28323 | case "$host_os" in |
28324 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28325 | *) gl_absname_cpp="$ac_cpp" ;; | |
28326 | esac | |
28327 | ||
28328 | case "$host_os" in | |
28329 | mingw*) | |
28330 | gl_dirsep_regex='[/\\]' | |
28331 | ;; | |
28332 | *) | |
28333 | gl_dirsep_regex='\/' | |
28334 | ;; | |
28335 | esac | |
28336 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28337 | gl_header_literal_regex=`echo 'stdio.h' \ | |
28338 | | sed -e "$gl_make_literal_regex_sed"` | |
28339 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28340 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28341 | s|^/[^/]|//&| | |
28342 | p | |
28343 | q | |
28344 | }' | |
6a29c58e | 28345 | |
4a626d0a PA |
28346 | gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
28347 | sed -n "$gl_absolute_header_sed"` | |
6a29c58e | 28348 | |
4a626d0a PA |
28349 | gl_header=$gl_cv_absolute_stdio_h |
28350 | gl_cv_next_stdio_h='"'$gl_header'"' | |
6a29c58e YQ |
28351 | |
28352 | ||
28353 | fi | |
28354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 | |
28355 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
28356 | fi | |
28357 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
28358 | ||
28359 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28360 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28361 | gl_next_as_first_directive='<'stdio.h'>' | |
28362 | else | |
28363 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28364 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
28365 | fi | |
28366 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
28367 | ||
28368 | ||
28369 | ||
28370 | ||
28371 | ||
4a626d0a PA |
28372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 |
28373 | $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } | |
d0ac1c44 | 28374 | if ${gl_cv_func_printf_attribute_flavor+:} false; then : |
4a626d0a PA |
28375 | $as_echo_n "(cached) " >&6 |
28376 | else | |
28377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28378 | /* end confdefs.h. */ | |
28379 | ||
28380 | #define __STDC_FORMAT_MACROS 1 | |
28381 | #include <stdio.h> | |
28382 | #include <inttypes.h> | |
28383 | /* For non-mingw systems, compilation will trivially succeed. | |
28384 | For mingw, compilation will succeed for older mingw (system | |
28385 | printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ | |
c0c3707f | 28386 | #if (defined _WIN32 && ! defined __CYGWIN__) && \ |
4a626d0a PA |
28387 | (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |
28388 | extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; | |
28389 | #endif | |
28390 | ||
28391 | int | |
28392 | main () | |
28393 | { | |
28394 | ||
28395 | ; | |
28396 | return 0; | |
28397 | } | |
28398 | _ACEOF | |
28399 | if ac_fn_c_try_compile "$LINENO"; then : | |
28400 | gl_cv_func_printf_attribute_flavor=system | |
28401 | else | |
28402 | gl_cv_func_printf_attribute_flavor=gnu | |
28403 | fi | |
28404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
28405 | fi | |
28406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 | |
28407 | $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } | |
28408 | if test "$gl_cv_func_printf_attribute_flavor" = gnu; then | |
28409 | ||
28410 | $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h | |
28411 | ||
28412 | fi | |
28413 | ||
6a29c58e YQ |
28414 | GNULIB_FSCANF=1 |
28415 | ||
28416 | ||
28417 | cat >>confdefs.h <<_ACEOF | |
28418 | #define GNULIB_FSCANF 1 | |
28419 | _ACEOF | |
28420 | ||
28421 | ||
28422 | GNULIB_SCANF=1 | |
28423 | ||
28424 | ||
28425 | cat >>confdefs.h <<_ACEOF | |
28426 | #define GNULIB_SCANF 1 | |
28427 | _ACEOF | |
28428 | ||
28429 | ||
28430 | GNULIB_FGETC=1 | |
28431 | GNULIB_GETC=1 | |
28432 | GNULIB_GETCHAR=1 | |
28433 | GNULIB_FGETS=1 | |
28434 | GNULIB_FREAD=1 | |
28435 | ||
28436 | ||
28437 | GNULIB_FPRINTF=1 | |
28438 | GNULIB_PRINTF=1 | |
28439 | GNULIB_VFPRINTF=1 | |
28440 | GNULIB_VPRINTF=1 | |
28441 | GNULIB_FPUTC=1 | |
28442 | GNULIB_PUTC=1 | |
28443 | GNULIB_PUTCHAR=1 | |
28444 | GNULIB_FPUTS=1 | |
28445 | GNULIB_PUTS=1 | |
28446 | GNULIB_FWRITE=1 | |
28447 | ||
28448 | ||
28449 | ||
28450 | ||
6a29c58e | 28451 | |
6a29c58e YQ |
28452 | |
28453 | ||
28454 | ||
28455 | ||
28456 | ||
9c9d63b1 PM |
28457 | if test $ac_cv_have_decl_fcloseall = no; then |
28458 | HAVE_DECL_FCLOSEALL=0 | |
28459 | fi | |
28460 | ||
28461 | ||
6a29c58e YQ |
28462 | |
28463 | ||
28464 | ||
28465 | ||
28466 | ||
28467 | ||
28468 | ||
698be2d8 CB |
28469 | |
28470 | ||
98399780 YQ |
28471 | if test $gl_cv_have_include_next = yes; then |
28472 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
28473 | else | |
28474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
28475 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
d0ac1c44 | 28476 | if ${gl_cv_next_stdlib_h+:} false; then : |
98399780 YQ |
28477 | $as_echo_n "(cached) " >&6 |
28478 | else | |
28479 | ||
4a626d0a PA |
28480 | |
28481 | ||
28482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
98399780 YQ |
28483 | /* end confdefs.h. */ |
28484 | #include <stdlib.h> | |
98399780 | 28485 | _ACEOF |
4a626d0a PA |
28486 | case "$host_os" in |
28487 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
28488 | *) gl_absname_cpp="$ac_cpp" ;; | |
28489 | esac | |
28490 | ||
28491 | case "$host_os" in | |
28492 | mingw*) | |
28493 | gl_dirsep_regex='[/\\]' | |
28494 | ;; | |
28495 | *) | |
28496 | gl_dirsep_regex='\/' | |
28497 | ;; | |
28498 | esac | |
28499 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
28500 | gl_header_literal_regex=`echo 'stdlib.h' \ | |
28501 | | sed -e "$gl_make_literal_regex_sed"` | |
28502 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
28503 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
28504 | s|^/[^/]|//&| | |
28505 | p | |
28506 | q | |
28507 | }' | |
98399780 | 28508 | |
4a626d0a PA |
28509 | gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
28510 | sed -n "$gl_absolute_header_sed"` | |
98399780 | 28511 | |
4a626d0a PA |
28512 | gl_header=$gl_cv_absolute_stdlib_h |
28513 | gl_cv_next_stdlib_h='"'$gl_header'"' | |
98399780 YQ |
28514 | |
28515 | ||
28516 | fi | |
28517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 | |
28518 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
28519 | fi | |
28520 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
28521 | ||
28522 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
28523 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
28524 | gl_next_as_first_directive='<'stdlib.h'>' | |
28525 | else | |
28526 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
28527 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
28528 | fi | |
28529 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
28530 | ||
28531 | ||
28532 | ||
28533 | ||
28534 | ||
28535 | ||
98399780 | 28536 | |
98399780 YQ |
28537 | |
28538 | ||
28539 | ||
28540 | ||
28541 | ||
9c9d63b1 PM |
28542 | if test $ac_cv_have_decl_ecvt = no; then |
28543 | HAVE_DECL_ECVT=0 | |
28544 | fi | |
28545 | ||
28546 | if test $ac_cv_have_decl_fcvt = no; then | |
28547 | HAVE_DECL_FCVT=0 | |
28548 | fi | |
28549 | ||
28550 | if test $ac_cv_have_decl_gcvt = no; then | |
28551 | HAVE_DECL_GCVT=0 | |
28552 | fi | |
28553 | ||
28554 | ||
98399780 | 28555 | |
698be2d8 CB |
28556 | |
28557 | ||
8424cc97 SM |
28558 | for ac_func in strchrnul |
28559 | do : | |
28560 | ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" | |
d0ac1c44 | 28561 | if test "x$ac_cv_func_strchrnul" = xyes; then : |
8424cc97 SM |
28562 | cat >>confdefs.h <<_ACEOF |
28563 | #define HAVE_STRCHRNUL 1 | |
28564 | _ACEOF | |
28565 | ||
28566 | fi | |
28567 | done | |
28568 | ||
28569 | if test $ac_cv_func_strchrnul = no; then | |
28570 | HAVE_STRCHRNUL=0 | |
28571 | else | |
28572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 | |
28573 | $as_echo_n "checking whether strchrnul works... " >&6; } | |
d0ac1c44 | 28574 | if ${gl_cv_func_strchrnul_works+:} false; then : |
8424cc97 SM |
28575 | $as_echo_n "(cached) " >&6 |
28576 | else | |
28577 | if test "$cross_compiling" = yes; then : | |
28578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28579 | /* end confdefs.h. */ | |
28580 | ||
28581 | #if defined __CYGWIN__ | |
28582 | #include <cygwin/version.h> | |
28583 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) | |
28584 | Lucky user | |
28585 | #endif | |
28586 | #else | |
28587 | Lucky user | |
28588 | #endif | |
28589 | ||
28590 | _ACEOF | |
28591 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
28592 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
28593 | gl_cv_func_strchrnul_works="guessing yes" | |
28594 | else | |
28595 | gl_cv_func_strchrnul_works="guessing no" | |
28596 | fi | |
28597 | rm -f conftest* | |
28598 | ||
28599 | ||
28600 | else | |
28601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28602 | /* end confdefs.h. */ | |
28603 | ||
28604 | #include <string.h> /* for strchrnul */ | |
28605 | ||
28606 | int | |
28607 | main () | |
28608 | { | |
28609 | const char *buf = "a"; | |
28610 | return strchrnul (buf, 'b') != buf + 1; | |
28611 | ||
28612 | ; | |
28613 | return 0; | |
28614 | } | |
28615 | _ACEOF | |
28616 | if ac_fn_c_try_run "$LINENO"; then : | |
28617 | gl_cv_func_strchrnul_works=yes | |
28618 | else | |
28619 | gl_cv_func_strchrnul_works=no | |
28620 | fi | |
28621 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28622 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28623 | fi | |
28624 | ||
28625 | ||
28626 | fi | |
28627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5 | |
28628 | $as_echo "$gl_cv_func_strchrnul_works" >&6; } | |
28629 | case "$gl_cv_func_strchrnul_works" in | |
28630 | *yes) ;; | |
28631 | *) REPLACE_STRCHRNUL=1 ;; | |
28632 | esac | |
28633 | fi | |
28634 | ||
28635 | if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then | |
28636 | ||
28637 | ||
28638 | ||
28639 | ||
28640 | ||
28641 | ||
28642 | ||
28643 | ||
28644 | gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext" | |
28645 | ||
28646 | : | |
28647 | fi | |
28648 | ||
28649 | ||
28650 | ||
28651 | ||
28652 | ||
28653 | GNULIB_STRCHRNUL=1 | |
28654 | ||
28655 | ||
28656 | ||
28657 | ||
28658 | ||
28659 | $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h | |
28660 | ||
28661 | ||
28662 | ||
28663 | ||
28664 | ||
28665 | ||
9c9d63b1 PM |
28666 | if test $gl_cv_func_malloc_posix != yes; then |
28667 | REPLACE_STRDUP=1 | |
6ec2e0f5 SDJ |
28668 | fi |
28669 | ||
28670 | if test $ac_cv_have_decl_strdup = no; then | |
28671 | HAVE_DECL_STRDUP=0 | |
28672 | fi | |
28673 | ||
9c9d63b1 | 28674 | if test $REPLACE_STRDUP = 1; then |
6ec2e0f5 SDJ |
28675 | |
28676 | ||
28677 | ||
28678 | ||
28679 | ||
28680 | ||
28681 | ||
28682 | ||
28683 | gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" | |
28684 | ||
28685 | : | |
28686 | fi | |
28687 | ||
28688 | ||
28689 | ||
28690 | ||
28691 | ||
28692 | GNULIB_STRDUP=1 | |
28693 | ||
28694 | ||
28695 | ||
28696 | ||
28697 | ||
28698 | $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h | |
28699 | ||
28700 | ||
28701 | ||
28702 | ||
28703 | ||
28704 | ||
28705 | ||
28706 | ||
5abebf3c CB |
28707 | |
28708 | ||
6ec2e0f5 SDJ |
28709 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then |
28710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 | |
28711 | $as_echo_n "checking for working strerror function... " >&6; } | |
d0ac1c44 | 28712 | if ${gl_cv_func_working_strerror+:} false; then : |
6ec2e0f5 SDJ |
28713 | $as_echo_n "(cached) " >&6 |
28714 | else | |
28715 | if test "$cross_compiling" = yes; then : | |
28716 | case "$host_os" in | |
c0c3707f CB |
28717 | # Guess yes on glibc systems. |
28718 | *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; | |
28719 | # Guess yes on musl systems. | |
28720 | *-musl*) gl_cv_func_working_strerror="guessing yes" ;; | |
28721 | # If we don't know, obey --enable-cross-guesses. | |
28722 | *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; | |
6ec2e0f5 SDJ |
28723 | esac |
28724 | ||
28725 | else | |
28726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28727 | /* end confdefs.h. */ | |
28728 | #include <string.h> | |
28729 | ||
28730 | int | |
28731 | main () | |
28732 | { | |
28733 | if (!*strerror (-2)) return 1; | |
28734 | ; | |
28735 | return 0; | |
28736 | } | |
28737 | _ACEOF | |
28738 | if ac_fn_c_try_run "$LINENO"; then : | |
28739 | gl_cv_func_working_strerror=yes | |
28740 | else | |
28741 | gl_cv_func_working_strerror=no | |
28742 | fi | |
28743 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28744 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28745 | fi | |
28746 | ||
28747 | ||
28748 | fi | |
28749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 | |
28750 | $as_echo "$gl_cv_func_working_strerror" >&6; } | |
28751 | case "$gl_cv_func_working_strerror" in | |
28752 | *yes) ;; | |
28753 | *) | |
28754 | REPLACE_STRERROR=1 | |
28755 | ;; | |
28756 | esac | |
28757 | ||
5abebf3c CB |
28758 | case "$gl_cv_func_strerror_r_works" in |
28759 | *no) REPLACE_STRERROR=1 ;; | |
28760 | esac | |
28761 | ||
6ec2e0f5 SDJ |
28762 | else |
28763 | REPLACE_STRERROR=1 | |
28764 | fi | |
28765 | ||
28766 | if test $REPLACE_STRERROR = 1; then | |
28767 | ||
28768 | ||
28769 | ||
28770 | ||
28771 | ||
28772 | ||
28773 | ||
28774 | ||
28775 | gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" | |
28776 | ||
28777 | fi | |
28778 | ||
28779 | ||
28780 | cat >>confdefs.h <<_ACEOF | |
28781 | #define GNULIB_STRERROR 1 | |
28782 | _ACEOF | |
28783 | ||
28784 | ||
28785 | ||
28786 | ||
28787 | ||
28788 | ||
28789 | ||
28790 | GNULIB_STRERROR=1 | |
28791 | ||
28792 | ||
28793 | ||
28794 | ||
28795 | ||
28796 | $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h | |
28797 | ||
28798 | ||
28799 | ||
28800 | ||
28801 | ||
28802 | if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then | |
28803 | ||
28804 | ||
28805 | ||
28806 | ||
28807 | ||
28808 | ||
28809 | ||
28810 | ||
28811 | gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" | |
28812 | ||
28813 | ||
28814 | ||
28815 | ||
28816 | ||
28817 | if test $ac_cv_header_sys_socket_h != yes; then | |
28818 | for ac_header in winsock2.h | |
28819 | do : | |
28820 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
d0ac1c44 | 28821 | if test "x$ac_cv_header_winsock2_h" = xyes; then : |
6ec2e0f5 SDJ |
28822 | cat >>confdefs.h <<_ACEOF |
28823 | #define HAVE_WINSOCK2_H 1 | |
28824 | _ACEOF | |
28825 | ||
28826 | fi | |
28827 | ||
28828 | done | |
28829 | ||
28830 | fi | |
28831 | if test "$ac_cv_header_winsock2_h" = yes; then | |
28832 | HAVE_WINSOCK2_H=1 | |
28833 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
28834 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
28835 | else | |
28836 | HAVE_WINSOCK2_H=0 | |
28837 | fi | |
28838 | ||
28839 | ||
28840 | fi | |
28841 | ||
28842 | ||
28843 | ||
28844 | ||
98399780 | 28845 | |
5abebf3c | 28846 | |
5abebf3c | 28847 | |
c0c3707f CB |
28848 | if test $ac_cv_have_decl_strerror_r = no; then |
28849 | HAVE_DECL_STRERROR_R=0 | |
28850 | fi | |
5abebf3c CB |
28851 | |
28852 | if test $ac_cv_func_strerror_r = yes; then | |
28853 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then | |
28854 | if test $gl_cv_func_strerror_r_posix_signature = yes; then | |
28855 | case "$gl_cv_func_strerror_r_works" in | |
28856 | *no) REPLACE_STRERROR_R=1 ;; | |
28857 | esac | |
28858 | else | |
28859 | REPLACE_STRERROR_R=1 | |
28860 | fi | |
28861 | else | |
28862 | REPLACE_STRERROR_R=1 | |
28863 | fi | |
28864 | fi | |
28865 | ||
5abebf3c CB |
28866 | if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then |
28867 | ||
28868 | ||
28869 | ||
28870 | ||
28871 | ||
28872 | ||
28873 | ||
28874 | ||
28875 | gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext" | |
28876 | ||
28877 | ||
28878 | ||
5abebf3c CB |
28879 | |
28880 | ||
28881 | ||
c0c3707f | 28882 | fi |
5abebf3c CB |
28883 | |
28884 | ||
28885 | ||
28886 | ||
5abebf3c | 28887 | |
c0c3707f | 28888 | GNULIB_STRERROR_R=1 |
5abebf3c CB |
28889 | |
28890 | ||
28891 | ||
28892 | ||
5abebf3c | 28893 | |
c0c3707f | 28894 | $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h |
5abebf3c CB |
28895 | |
28896 | ||
28897 | ||
28898 | ||
5abebf3c | 28899 | |
c0c3707f CB |
28900 | cat >>confdefs.h <<_ACEOF |
28901 | #define GNULIB_STRERROR_R_POSIX 1 | |
28902 | _ACEOF | |
5abebf3c CB |
28903 | |
28904 | ||
28905 | ||
28906 | ||
28907 | ||
28908 | ||
28909 | ||
698be2d8 CB |
28910 | |
28911 | ||
28912 | ||
28913 | ||
32e2770e MF |
28914 | |
28915 | ||
28916 | ||
698be2d8 CB |
28917 | if test $ac_cv_have_decl_strnlen = no; then |
28918 | HAVE_DECL_STRNLEN=0 | |
28919 | else | |
28920 | ||
28921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 | |
28922 | $as_echo_n "checking for working strnlen... " >&6; } | |
28923 | if ${ac_cv_func_strnlen_working+:} false; then : | |
28924 | $as_echo_n "(cached) " >&6 | |
28925 | else | |
28926 | if test "$cross_compiling" = yes; then : | |
28927 | # Guess no on AIX systems, yes otherwise. | |
28928 | case "$host_os" in | |
28929 | aix*) ac_cv_func_strnlen_working=no;; | |
28930 | *) ac_cv_func_strnlen_working=yes;; | |
28931 | esac | |
28932 | else | |
28933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28934 | /* end confdefs.h. */ | |
28935 | $ac_includes_default | |
28936 | int | |
28937 | main () | |
28938 | { | |
28939 | ||
28940 | #define S "foobar" | |
28941 | #define S_LEN (sizeof S - 1) | |
28942 | ||
28943 | /* At least one implementation is buggy: that of AIX 4.3 would | |
28944 | give strnlen (S, 1) == 3. */ | |
28945 | ||
28946 | int i; | |
28947 | for (i = 0; i < S_LEN + 1; ++i) | |
28948 | { | |
28949 | int expected = i <= S_LEN ? i : S_LEN; | |
28950 | if (strnlen (S, i) != expected) | |
28951 | return 1; | |
28952 | } | |
28953 | return 0; | |
28954 | ||
28955 | ; | |
28956 | return 0; | |
28957 | } | |
28958 | _ACEOF | |
28959 | if ac_fn_c_try_run "$LINENO"; then : | |
28960 | ac_cv_func_strnlen_working=yes | |
28961 | else | |
28962 | ac_cv_func_strnlen_working=no | |
28963 | fi | |
28964 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28965 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28966 | fi | |
28967 | ||
28968 | fi | |
28969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 | |
28970 | $as_echo "$ac_cv_func_strnlen_working" >&6; } | |
28971 | test $ac_cv_func_strnlen_working = no && : | |
28972 | ||
28973 | ||
28974 | if test $ac_cv_func_strnlen_working = no; then | |
28975 | REPLACE_STRNLEN=1 | |
28976 | fi | |
28977 | fi | |
28978 | ||
28979 | if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then | |
28980 | ||
28981 | ||
28982 | ||
28983 | ||
28984 | ||
28985 | ||
28986 | ||
28987 | ||
28988 | gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" | |
28989 | ||
28990 | : | |
28991 | fi | |
28992 | ||
28993 | ||
28994 | ||
28995 | ||
28996 | ||
28997 | GNULIB_STRNLEN=1 | |
28998 | ||
28999 | ||
29000 | ||
29001 | ||
29002 | ||
29003 | $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h | |
29004 | ||
29005 | ||
29006 | ||
29007 | ||
29008 | ||
63ce7108 TT |
29009 | if test $REPLACE_STRSTR = 0; then |
29010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 | |
29011 | $as_echo_n "checking whether strstr works in linear time... " >&6; } | |
d0ac1c44 | 29012 | if ${gl_cv_func_strstr_linear+:} false; then : |
63ce7108 TT |
29013 | $as_echo_n "(cached) " >&6 |
29014 | else | |
29015 | if test "$cross_compiling" = yes; then : | |
29016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29017 | /* end confdefs.h. */ | |
29018 | ||
29019 | #include <features.h> | |
29020 | #ifdef __GNU_LIBRARY__ | |
29021 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ | |
29022 | && !(defined __i386__ || defined __x86_64__) \ | |
29023 | && !defined __UCLIBC__ | |
29024 | Lucky user | |
29025 | #endif | |
29026 | #endif | |
29027 | #ifdef __CYGWIN__ | |
29028 | #include <cygwin/version.h> | |
29029 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
29030 | Lucky user | |
29031 | #endif | |
29032 | #endif | |
29033 | ||
29034 | _ACEOF | |
29035 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
29036 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
29037 | gl_cv_func_strstr_linear="guessing yes" | |
c971b7fa | 29038 | else |
c0c3707f | 29039 | gl_cv_func_strstr_linear="$gl_cross_guess_normal" |
c971b7fa PA |
29040 | fi |
29041 | rm -f conftest* | |
29042 | ||
29043 | ||
29044 | else | |
29045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29046 | /* end confdefs.h. */ | |
29047 | ||
49e4877c PA |
29048 | #ifdef __MVS__ |
29049 | /* z/OS does not deliver signals while strstr() is running (thanks to | |
29050 | restrictions on its LE runtime), which prevents us from limiting the | |
29051 | running time of this test. */ | |
29052 | # error "This test does not work properly on z/OS" | |
29053 | #endif | |
c971b7fa | 29054 | #include <signal.h> /* for signal */ |
63ce7108 | 29055 | #include <string.h> /* for strstr */ |
c971b7fa PA |
29056 | #include <stdlib.h> /* for malloc */ |
29057 | #include <unistd.h> /* for alarm */ | |
49e4877c | 29058 | static void quit (int sig) { _exit (sig + 128); } |
c971b7fa PA |
29059 | |
29060 | int | |
29061 | main () | |
29062 | { | |
29063 | ||
29064 | int result = 0; | |
29065 | size_t m = 1000000; | |
63ce7108 TT |
29066 | char *haystack = (char *) malloc (2 * m + 2); |
29067 | char *needle = (char *) malloc (m + 2); | |
c971b7fa | 29068 | /* Failure to compile this test due to missing alarm is okay, |
63ce7108 | 29069 | since all such platforms (mingw) also have quadratic strstr. */ |
c971b7fa PA |
29070 | signal (SIGALRM, quit); |
29071 | alarm (5); | |
29072 | /* Check for quadratic performance. */ | |
29073 | if (haystack && needle) | |
29074 | { | |
29075 | memset (haystack, 'A', 2 * m); | |
29076 | haystack[2 * m] = 'B'; | |
63ce7108 | 29077 | haystack[2 * m + 1] = 0; |
c971b7fa PA |
29078 | memset (needle, 'A', m); |
29079 | needle[m] = 'B'; | |
63ce7108 TT |
29080 | needle[m + 1] = 0; |
29081 | if (!strstr (haystack, needle)) | |
c971b7fa PA |
29082 | result |= 1; |
29083 | } | |
c0c3707f CB |
29084 | /* Free allocated memory, in case some sanitizer is watching. */ |
29085 | free (haystack); | |
29086 | free (needle); | |
c971b7fa PA |
29087 | return result; |
29088 | ||
29089 | ; | |
29090 | return 0; | |
29091 | } | |
29092 | _ACEOF | |
29093 | if ac_fn_c_try_run "$LINENO"; then : | |
63ce7108 | 29094 | gl_cv_func_strstr_linear=yes |
c971b7fa | 29095 | else |
63ce7108 | 29096 | gl_cv_func_strstr_linear=no |
c971b7fa PA |
29097 | fi |
29098 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
29099 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
29100 | fi | |
29101 | ||
29102 | ||
29103 | fi | |
63ce7108 TT |
29104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 |
29105 | $as_echo "$gl_cv_func_strstr_linear" >&6; } | |
29106 | case "$gl_cv_func_strstr_linear" in | |
40a73391 JK |
29107 | *yes) ;; |
29108 | *) | |
63ce7108 | 29109 | REPLACE_STRSTR=1 |
40a73391 JK |
29110 | ;; |
29111 | esac | |
c971b7fa PA |
29112 | fi |
29113 | ||
63ce7108 | 29114 | if test $REPLACE_STRSTR = 1; then |
c971b7fa PA |
29115 | |
29116 | ||
29117 | ||
29118 | ||
29119 | ||
29120 | ||
29121 | ||
29122 | ||
63ce7108 | 29123 | gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" |
c971b7fa | 29124 | |
a512b375 | 29125 | fi |
c971b7fa PA |
29126 | |
29127 | ||
29128 | ||
9c9d63b1 | 29129 | if test $REPLACE_MEMCHR = 1; then |
63ce7108 | 29130 | REPLACE_STRSTR=1 |
c971b7fa | 29131 | else |
c0c3707f | 29132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 |
63ce7108 | 29133 | $as_echo_n "checking whether strstr works... " >&6; } |
d0ac1c44 | 29134 | if ${gl_cv_func_strstr_works_always+:} false; then : |
c971b7fa PA |
29135 | $as_echo_n "(cached) " >&6 |
29136 | else | |
29137 | if test "$cross_compiling" = yes; then : | |
c0c3707f | 29138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c971b7fa PA |
29139 | /* end confdefs.h. */ |
29140 | ||
29141 | #ifdef __GNU_LIBRARY__ | |
29142 | #include <features.h> | |
63ce7108 | 29143 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ |
c971b7fa PA |
29144 | || defined __UCLIBC__ |
29145 | Lucky user | |
29146 | #endif | |
29147 | #elif defined __CYGWIN__ | |
29148 | #include <cygwin/version.h> | |
29149 | #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) | |
29150 | Lucky user | |
29151 | #endif | |
29152 | #else | |
29153 | Lucky user | |
29154 | #endif | |
29155 | ||
29156 | _ACEOF | |
29157 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
29158 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
63ce7108 | 29159 | gl_cv_func_strstr_works_always="guessing yes" |
c971b7fa | 29160 | else |
c0c3707f | 29161 | gl_cv_func_strstr_works_always="$gl_cross_guess_normal" |
c971b7fa PA |
29162 | fi |
29163 | rm -f conftest* | |
29164 | ||
29165 | ||
29166 | else | |
29167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29168 | /* end confdefs.h. */ | |
29169 | ||
63ce7108 | 29170 | #include <string.h> /* for strstr */ |
c0c3707f CB |
29171 | #ifdef __GNU_LIBRARY__ |
29172 | #include <features.h> | |
29173 | #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 | |
29174 | Unlucky user | |
29175 | #endif | |
29176 | #endif | |
c971b7fa PA |
29177 | #define P "_EF_BF_BD" |
29178 | #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P | |
29179 | #define NEEDLE P P P P P | |
29180 | ||
29181 | int | |
29182 | main () | |
29183 | { | |
63ce7108 | 29184 | return !!strstr (HAYSTACK, NEEDLE); |
c971b7fa PA |
29185 | |
29186 | ; | |
29187 | return 0; | |
29188 | } | |
29189 | _ACEOF | |
29190 | if ac_fn_c_try_run "$LINENO"; then : | |
63ce7108 | 29191 | gl_cv_func_strstr_works_always=yes |
c971b7fa | 29192 | else |
63ce7108 | 29193 | gl_cv_func_strstr_works_always=no |
c971b7fa PA |
29194 | fi |
29195 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
29196 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
29197 | fi | |
29198 | ||
29199 | ||
29200 | fi | |
63ce7108 TT |
29201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 |
29202 | $as_echo "$gl_cv_func_strstr_works_always" >&6; } | |
29203 | case "$gl_cv_func_strstr_works_always" in | |
40a73391 JK |
29204 | *yes) ;; |
29205 | *) | |
63ce7108 | 29206 | REPLACE_STRSTR=1 |
40a73391 JK |
29207 | ;; |
29208 | esac | |
c971b7fa | 29209 | fi |
8839a007 | 29210 | |
63ce7108 | 29211 | if test $REPLACE_STRSTR = 1; then |
8839a007 | 29212 | |
8690e634 JK |
29213 | |
29214 | ||
8690e634 JK |
29215 | |
29216 | ||
29217 | ||
29218 | ||
29219 | ||
63ce7108 | 29220 | gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" |
8690e634 | 29221 | |
8690e634 JK |
29222 | fi |
29223 | ||
8690e634 JK |
29224 | |
29225 | ||
8690e634 | 29226 | |
8690e634 | 29227 | |
63ce7108 | 29228 | GNULIB_STRSTR=1 |
8690e634 JK |
29229 | |
29230 | ||
29231 | ||
8690e634 JK |
29232 | |
29233 | ||
63ce7108 | 29234 | $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h |
8690e634 JK |
29235 | |
29236 | ||
29237 | ||
29238 | ||
29239 | ||
29240 | ||
29241 | ||
421693b0 PA |
29242 | for ac_func in strtok_r |
29243 | do : | |
29244 | ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" | |
d0ac1c44 | 29245 | if test "x$ac_cv_func_strtok_r" = xyes; then : |
421693b0 PA |
29246 | cat >>confdefs.h <<_ACEOF |
29247 | #define HAVE_STRTOK_R 1 | |
29248 | _ACEOF | |
29249 | ||
29250 | fi | |
29251 | done | |
29252 | ||
29253 | if test $ac_cv_func_strtok_r = yes; then | |
29254 | HAVE_STRTOK_R=1 | |
29255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5 | |
29256 | $as_echo_n "checking whether strtok_r works... " >&6; } | |
d0ac1c44 | 29257 | if ${gl_cv_func_strtok_r_works+:} false; then : |
421693b0 PA |
29258 | $as_echo_n "(cached) " >&6 |
29259 | else | |
29260 | if test "$cross_compiling" = yes; then : | |
c0c3707f CB |
29261 | case "$host_os" in |
29262 | # Guess no on glibc systems. | |
29263 | *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;; | |
29264 | # Guess yes on native Windows. | |
29265 | mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; | |
29266 | *) gl_cv_func_strtok_r_works="guessing yes" ;; | |
421693b0 PA |
29267 | esac |
29268 | ||
29269 | else | |
29270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29271 | /* end confdefs.h. */ | |
29272 | ||
29273 | #ifndef __OPTIMIZE__ | |
29274 | # define __OPTIMIZE__ 1 | |
29275 | #endif | |
29276 | #undef __OPTIMIZE_SIZE__ | |
29277 | #undef __NO_INLINE__ | |
29278 | #include <stdlib.h> | |
29279 | #include <string.h> | |
29280 | ||
29281 | int | |
29282 | main () | |
29283 | { | |
29284 | static const char dummy[] = "\177\01a"; | |
29285 | char delimiters[] = "xxxxxxxx"; | |
29286 | char *save_ptr = (char *) dummy; | |
29287 | strtok_r (delimiters, "x", &save_ptr); | |
29288 | strtok_r (NULL, "x", &save_ptr); | |
29289 | return 0; | |
29290 | ||
29291 | ; | |
29292 | return 0; | |
29293 | } | |
29294 | ||
29295 | _ACEOF | |
29296 | if ac_fn_c_try_run "$LINENO"; then : | |
29297 | gl_cv_func_strtok_r_works=yes | |
29298 | else | |
29299 | gl_cv_func_strtok_r_works=no | |
29300 | fi | |
29301 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
29302 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
29303 | fi | |
29304 | ||
29305 | ||
29306 | fi | |
29307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5 | |
29308 | $as_echo "$gl_cv_func_strtok_r_works" >&6; } | |
29309 | case "$gl_cv_func_strtok_r_works" in | |
29310 | *no) | |
29311 | UNDEFINE_STRTOK_R=1 | |
29312 | ;; | |
29313 | esac | |
29314 | else | |
29315 | HAVE_STRTOK_R=0 | |
29316 | fi | |
29317 | ||
29318 | if test $ac_cv_have_decl_strtok_r = no; then | |
29319 | HAVE_DECL_STRTOK_R=0 | |
29320 | fi | |
29321 | ||
29322 | if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then | |
29323 | ||
29324 | ||
29325 | ||
29326 | ||
29327 | ||
29328 | ||
29329 | ||
29330 | ||
29331 | gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext" | |
29332 | ||
29333 | ||
29334 | : | |
29335 | ||
29336 | fi | |
29337 | ||
29338 | ||
29339 | ||
29340 | ||
29341 | ||
29342 | GNULIB_STRTOK_R=1 | |
29343 | ||
29344 | ||
29345 | ||
29346 | ||
29347 | ||
29348 | $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h | |
29349 | ||
29350 | ||
29351 | ||
29352 | ||
29353 | ||
29354 | ||
29355 | ||
8690e634 JK |
29356 | |
29357 | ||
29358 | ||
29359 | ||
29360 | ||
8690e634 | 29361 | |
09607c9e | 29362 | |
698be2d8 CB |
29363 | if test $gl_cv_have_include_next = yes; then |
29364 | gl_cv_next_sys_random_h='<'sys/random.h'>' | |
29365 | else | |
29366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5 | |
29367 | $as_echo_n "checking absolute name of <sys/random.h>... " >&6; } | |
29368 | if ${gl_cv_next_sys_random_h+:} false; then : | |
29369 | $as_echo_n "(cached) " >&6 | |
29370 | else | |
29371 | ||
29372 | if test $ac_cv_header_sys_random_h = yes; then | |
29373 | ||
29374 | ||
29375 | ||
29376 | ||
29377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29378 | /* end confdefs.h. */ | |
29379 | #include <sys/random.h> | |
29380 | _ACEOF | |
29381 | case "$host_os" in | |
29382 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29383 | *) gl_absname_cpp="$ac_cpp" ;; | |
29384 | esac | |
29385 | ||
29386 | case "$host_os" in | |
29387 | mingw*) | |
29388 | gl_dirsep_regex='[/\\]' | |
29389 | ;; | |
29390 | *) | |
29391 | gl_dirsep_regex='\/' | |
29392 | ;; | |
29393 | esac | |
29394 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29395 | gl_header_literal_regex=`echo 'sys/random.h' \ | |
29396 | | sed -e "$gl_make_literal_regex_sed"` | |
29397 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29398 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29399 | s|^/[^/]|//&| | |
29400 | p | |
29401 | q | |
29402 | }' | |
29403 | ||
29404 | gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29405 | sed -n "$gl_absolute_header_sed"` | |
29406 | ||
29407 | gl_header=$gl_cv_absolute_sys_random_h | |
29408 | gl_cv_next_sys_random_h='"'$gl_header'"' | |
29409 | else | |
29410 | gl_cv_next_sys_random_h='<'sys/random.h'>' | |
29411 | fi | |
29412 | ||
29413 | ||
29414 | fi | |
29415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5 | |
29416 | $as_echo "$gl_cv_next_sys_random_h" >&6; } | |
29417 | fi | |
29418 | NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h | |
29419 | ||
29420 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29421 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29422 | gl_next_as_first_directive='<'sys/random.h'>' | |
29423 | else | |
29424 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29425 | gl_next_as_first_directive=$gl_cv_next_sys_random_h | |
29426 | fi | |
29427 | NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive | |
29428 | ||
29429 | ||
29430 | ||
29431 | ||
29432 | if test $ac_cv_header_sys_random_h = yes; then | |
29433 | HAVE_SYS_RANDOM_H=1 | |
29434 | else | |
29435 | HAVE_SYS_RANDOM_H=0 | |
29436 | fi | |
29437 | ||
29438 | ||
29439 | ||
29440 | if test $ac_cv_header_sys_random_h = yes; then | |
29441 | UNISTD_H_HAVE_SYS_RANDOM_H=1 | |
29442 | fi | |
29443 | ||
29444 | ||
29445 | ||
29446 | ||
29447 | ||
29448 | ||
29449 | ||
29450 | ||
29451 | ||
29452 | ||
29453 | ||
29454 | ||
29455 | ||
29456 | ||
29457 | ||
29458 | ||
29459 | ||
725e2999 JB |
29460 | |
29461 | ||
09607c9e TT |
29462 | |
29463 | ||
29464 | ||
29465 | if test $gl_cv_have_include_next = yes; then | |
29466 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
29467 | else | |
29468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
29469 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
d0ac1c44 | 29470 | if ${gl_cv_next_sys_stat_h+:} false; then : |
09607c9e TT |
29471 | $as_echo_n "(cached) " >&6 |
29472 | else | |
29473 | ||
29474 | if test $ac_cv_header_sys_stat_h = yes; then | |
29475 | ||
29476 | ||
4a626d0a PA |
29477 | |
29478 | ||
29479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
09607c9e TT |
29480 | /* end confdefs.h. */ |
29481 | #include <sys/stat.h> | |
09607c9e | 29482 | _ACEOF |
4a626d0a PA |
29483 | case "$host_os" in |
29484 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29485 | *) gl_absname_cpp="$ac_cpp" ;; | |
29486 | esac | |
29487 | ||
29488 | case "$host_os" in | |
29489 | mingw*) | |
29490 | gl_dirsep_regex='[/\\]' | |
29491 | ;; | |
29492 | *) | |
29493 | gl_dirsep_regex='\/' | |
29494 | ;; | |
29495 | esac | |
29496 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29497 | gl_header_literal_regex=`echo 'sys/stat.h' \ | |
29498 | | sed -e "$gl_make_literal_regex_sed"` | |
29499 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29500 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29501 | s|^/[^/]|//&| | |
29502 | p | |
29503 | q | |
29504 | }' | |
29505 | ||
29506 | gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29507 | sed -n "$gl_absolute_header_sed"` | |
29508 | ||
29509 | gl_header=$gl_cv_absolute_sys_stat_h | |
29510 | gl_cv_next_sys_stat_h='"'$gl_header'"' | |
09607c9e TT |
29511 | else |
29512 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
29513 | fi | |
29514 | ||
29515 | ||
29516 | fi | |
29517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
29518 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
29519 | fi | |
29520 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
29521 | ||
29522 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29523 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29524 | gl_next_as_first_directive='<'sys/stat.h'>' | |
29525 | else | |
29526 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29527 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
29528 | fi | |
29529 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
29530 | ||
29531 | ||
29532 | ||
29533 | ||
29534 | ||
29535 | ||
29536 | ||
29537 | ||
c0c3707f CB |
29538 | WINDOWS_STAT_TIMESPEC=0 |
29539 | ||
29540 | ||
2196f55f | 29541 | |
09607c9e TT |
29542 | |
29543 | ||
09607c9e | 29544 | |
09607c9e | 29545 | |
09607c9e TT |
29546 | |
29547 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> | |
29548 | #include <sys/stat.h> | |
29549 | " | |
d0ac1c44 | 29550 | if test "x$ac_cv_type_nlink_t" = xyes; then : |
09607c9e TT |
29551 | |
29552 | else | |
29553 | ||
c0c3707f | 29554 | $as_echo "#define nlink_t int" >>confdefs.h |
09607c9e | 29555 | |
c0c3707f | 29556 | fi |
09607c9e TT |
29557 | |
29558 | ||
29559 | ||
29560 | ||
29561 | ||
29562 | ||
29563 | ||
29564 | ||
29565 | ||
29566 | ||
725e2999 JB |
29567 | |
29568 | ||
29569 | ||
29570 | ||
29571 | ||
29572 | ||
725e2999 JB |
29573 | |
29574 | ||
29575 | ||
29576 | ||
29577 | ||
698be2d8 CB |
29578 | |
29579 | ||
725e2999 JB |
29580 | |
29581 | ||
29582 | ||
29583 | if test $gl_cv_have_include_next = yes; then | |
29584 | gl_cv_next_sys_uio_h='<'sys/uio.h'>' | |
29585 | else | |
29586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5 | |
29587 | $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; } | |
29588 | if ${gl_cv_next_sys_uio_h+:} false; then : | |
29589 | $as_echo_n "(cached) " >&6 | |
29590 | else | |
29591 | ||
29592 | if test $ac_cv_header_sys_uio_h = yes; then | |
29593 | ||
29594 | ||
29595 | ||
29596 | ||
29597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29598 | /* end confdefs.h. */ | |
29599 | #include <sys/uio.h> | |
29600 | _ACEOF | |
29601 | case "$host_os" in | |
29602 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29603 | *) gl_absname_cpp="$ac_cpp" ;; | |
29604 | esac | |
29605 | ||
29606 | case "$host_os" in | |
29607 | mingw*) | |
29608 | gl_dirsep_regex='[/\\]' | |
29609 | ;; | |
29610 | *) | |
29611 | gl_dirsep_regex='\/' | |
29612 | ;; | |
29613 | esac | |
29614 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29615 | gl_header_literal_regex=`echo 'sys/uio.h' \ | |
29616 | | sed -e "$gl_make_literal_regex_sed"` | |
29617 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29618 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29619 | s|^/[^/]|//&| | |
29620 | p | |
29621 | q | |
29622 | }' | |
29623 | ||
29624 | gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29625 | sed -n "$gl_absolute_header_sed"` | |
29626 | ||
29627 | gl_header=$gl_cv_absolute_sys_uio_h | |
29628 | gl_cv_next_sys_uio_h='"'$gl_header'"' | |
29629 | else | |
29630 | gl_cv_next_sys_uio_h='<'sys/uio.h'>' | |
29631 | fi | |
29632 | ||
29633 | ||
29634 | fi | |
29635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 | |
29636 | $as_echo "$gl_cv_next_sys_uio_h" >&6; } | |
29637 | fi | |
29638 | NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h | |
29639 | ||
29640 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29641 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29642 | gl_next_as_first_directive='<'sys/uio.h'>' | |
29643 | else | |
29644 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29645 | gl_next_as_first_directive=$gl_cv_next_sys_uio_h | |
29646 | fi | |
29647 | NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive | |
29648 | ||
29649 | ||
29650 | ||
29651 | ||
29652 | if test $ac_cv_header_sys_uio_h = yes; then | |
29653 | HAVE_SYS_UIO_H=1 | |
29654 | else | |
29655 | HAVE_SYS_UIO_H=0 | |
29656 | fi | |
29657 | ||
29658 | ||
29659 | ||
29660 | ||
29661 | ||
2d8adcbd MM |
29662 | : |
29663 | ||
29664 | ||
29665 | ||
29666 | ||
9c9d63b1 PM |
29667 | cat >>confdefs.h <<_ACEOF |
29668 | #define GNULIB_TEMPNAME 1 | |
29669 | _ACEOF | |
29670 | ||
29671 | ||
29672 | ||
29673 | ||
09607c9e TT |
29674 | |
29675 | ||
29676 | ||
8839a007 PA |
29677 | |
29678 | ||
29679 | ||
29680 | ||
09607c9e | 29681 | |
c0c3707f CB |
29682 | 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, |
29683 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
29684 | been included before. */ | |
29685 | #if defined __MINGW32__ | |
29686 | # include <unistd.h> | |
29687 | #endif | |
29688 | #include <time.h> | |
09607c9e | 29689 | |
f8e27d88 CB |
29690 | " |
29691 | if test "x$ac_cv_have_decl_localtime_r" = xyes; then : | |
29692 | ac_have_decl=1 | |
29693 | else | |
29694 | ac_have_decl=0 | |
29695 | fi | |
29696 | ||
29697 | cat >>confdefs.h <<_ACEOF | |
29698 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
29699 | _ACEOF | |
29700 | ||
29701 | if test $ac_cv_have_decl_localtime_r = no; then | |
29702 | HAVE_DECL_LOCALTIME_R=0 | |
29703 | fi | |
29704 | ||
29705 | ||
f8e27d88 CB |
29706 | if test $ac_cv_func_localtime_r = yes; then |
29707 | HAVE_LOCALTIME_R=1 | |
29708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
29709 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
29710 | if ${gl_cv_time_r_posix+:} false; then : | |
29711 | $as_echo_n "(cached) " >&6 | |
29712 | else | |
29713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29714 | /* end confdefs.h. */ | |
c0c3707f CB |
29715 | /* mingw's <time.h> provides the functions asctime_r, ctime_r, |
29716 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
29717 | been included before. */ | |
29718 | #if defined __MINGW32__ | |
29719 | # include <unistd.h> | |
29720 | #endif | |
29721 | #include <time.h> | |
29722 | ||
f8e27d88 CB |
29723 | int |
29724 | main () | |
29725 | { | |
29726 | /* We don't need to append 'restrict's to the argument types, | |
29727 | even though the POSIX signature has the 'restrict's, | |
29728 | since C99 says they can't affect type compatibility. */ | |
29729 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
29730 | if (ptr) return 0; | |
29731 | /* Check the return type is a pointer. | |
29732 | On HP-UX 10 it is 'int'. */ | |
29733 | *localtime_r (0, 0); | |
29734 | ; | |
29735 | return 0; | |
29736 | } | |
29737 | ||
29738 | _ACEOF | |
29739 | if ac_fn_c_try_compile "$LINENO"; then : | |
29740 | gl_cv_time_r_posix=yes | |
29741 | else | |
29742 | gl_cv_time_r_posix=no | |
29743 | fi | |
29744 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
29745 | ||
29746 | fi | |
29747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
29748 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
29749 | if test $gl_cv_time_r_posix = yes; then | |
29750 | REPLACE_LOCALTIME_R=0 | |
29751 | else | |
29752 | REPLACE_LOCALTIME_R=1 | |
29753 | fi | |
29754 | else | |
29755 | HAVE_LOCALTIME_R=0 | |
c0c3707f CB |
29756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5 |
29757 | $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; } | |
29758 | if ${gl_cv_func_localtime_r_inline+:} false; then : | |
29759 | $as_echo_n "(cached) " >&6 | |
29760 | else | |
29761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29762 | /* end confdefs.h. */ | |
29763 | /* mingw's <time.h> provides the functions asctime_r, ctime_r, | |
29764 | gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has | |
29765 | been included before. */ | |
29766 | #if defined __MINGW32__ | |
29767 | # include <unistd.h> | |
29768 | #endif | |
29769 | #include <time.h> | |
29770 | ||
29771 | int | |
29772 | main () | |
29773 | { | |
29774 | time_t a; | |
29775 | struct tm r; | |
29776 | localtime_r (&a, &r); | |
29777 | ||
29778 | ; | |
29779 | return 0; | |
29780 | } | |
29781 | ||
29782 | _ACEOF | |
29783 | if ac_fn_c_try_link "$LINENO"; then : | |
29784 | gl_cv_func_localtime_r_inline=yes | |
29785 | else | |
29786 | gl_cv_func_localtime_r_inline=no | |
29787 | fi | |
29788 | rm -f core conftest.err conftest.$ac_objext \ | |
29789 | conftest$ac_exeext conftest.$ac_ext | |
29790 | ||
29791 | fi | |
29792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5 | |
29793 | $as_echo "$gl_cv_func_localtime_r_inline" >&6; } | |
29794 | if test $gl_cv_func_localtime_r_inline = yes; then | |
29795 | REPLACE_LOCALTIME_R=1 | |
29796 | fi | |
f8e27d88 CB |
29797 | fi |
29798 | ||
29799 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then | |
29800 | ||
29801 | ||
29802 | ||
29803 | ||
29804 | ||
29805 | ||
29806 | ||
29807 | ||
29808 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" | |
29809 | ||
29810 | ||
29811 | : | |
29812 | ||
29813 | fi | |
29814 | ||
29815 | ||
29816 | ||
29817 | ||
29818 | ||
29819 | GNULIB_TIME_R=1 | |
29820 | ||
29821 | ||
29822 | ||
29823 | ||
29824 | ||
29825 | $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h | |
29826 | ||
29827 | ||
29828 | ||
29829 | ||
29830 | ||
29831 | ||
29832 | ||
29833 | ||
29834 | ||
5abebf3c CB |
29835 | |
29836 | ||
29837 | ||
8839a007 PA |
29838 | |
29839 | ||
29840 | ||
29841 | if test $gl_cv_have_include_next = yes; then | |
29842 | gl_cv_next_unistd_h='<'unistd.h'>' | |
29843 | else | |
29844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
29845 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
d0ac1c44 | 29846 | if ${gl_cv_next_unistd_h+:} false; then : |
8839a007 PA |
29847 | $as_echo_n "(cached) " >&6 |
29848 | else | |
29849 | ||
29850 | if test $ac_cv_header_unistd_h = yes; then | |
29851 | ||
29852 | ||
4a626d0a PA |
29853 | |
29854 | ||
29855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8839a007 PA |
29856 | /* end confdefs.h. */ |
29857 | #include <unistd.h> | |
8839a007 | 29858 | _ACEOF |
4a626d0a PA |
29859 | case "$host_os" in |
29860 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
29861 | *) gl_absname_cpp="$ac_cpp" ;; | |
29862 | esac | |
29863 | ||
29864 | case "$host_os" in | |
29865 | mingw*) | |
29866 | gl_dirsep_regex='[/\\]' | |
29867 | ;; | |
29868 | *) | |
29869 | gl_dirsep_regex='\/' | |
29870 | ;; | |
29871 | esac | |
29872 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
29873 | gl_header_literal_regex=`echo 'unistd.h' \ | |
29874 | | sed -e "$gl_make_literal_regex_sed"` | |
29875 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
29876 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
29877 | s|^/[^/]|//&| | |
29878 | p | |
29879 | q | |
29880 | }' | |
29881 | ||
29882 | gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
29883 | sed -n "$gl_absolute_header_sed"` | |
29884 | ||
29885 | gl_header=$gl_cv_absolute_unistd_h | |
29886 | gl_cv_next_unistd_h='"'$gl_header'"' | |
8839a007 PA |
29887 | else |
29888 | gl_cv_next_unistd_h='<'unistd.h'>' | |
29889 | fi | |
29890 | ||
29891 | ||
29892 | fi | |
29893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 | |
29894 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
29895 | fi | |
29896 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
29897 | ||
29898 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
29899 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
29900 | gl_next_as_first_directive='<'unistd.h'>' | |
29901 | else | |
29902 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
29903 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
29904 | fi | |
29905 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
29906 | ||
29907 | ||
29908 | ||
29909 | ||
29910 | if test $ac_cv_header_unistd_h = yes; then | |
29911 | HAVE_UNISTD_H=1 | |
29912 | else | |
29913 | HAVE_UNISTD_H=0 | |
29914 | fi | |
29915 | ||
29916 | ||
29917 | ||
29918 | ||
29919 | ||
29920 | ||
29921 | ||
472fa5ee SM |
29922 | |
29923 | ||
29924 | ||
29925 | ||
29926 | ||
8839a007 | 29927 | |
9c9d63b1 PM |
29928 | if test $ac_cv_have_decl_execvpe = no; then |
29929 | HAVE_DECL_EXECVPE=0 | |
29930 | fi | |
29931 | ||
29932 | ||
6ec2e0f5 SDJ |
29933 | |
29934 | ||
29935 | ||
698be2d8 CB |
29936 | |
29937 | ||
3d99e817 AK |
29938 | if test $ac_cv_have_decl_unsetenv = no; then |
29939 | HAVE_DECL_UNSETENV=0 | |
29940 | fi | |
29941 | for ac_func in unsetenv | |
29942 | do : | |
29943 | ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" | |
d0ac1c44 | 29944 | if test "x$ac_cv_func_unsetenv" = xyes; then : |
3d99e817 AK |
29945 | cat >>confdefs.h <<_ACEOF |
29946 | #define HAVE_UNSETENV 1 | |
29947 | _ACEOF | |
29948 | ||
29949 | fi | |
29950 | done | |
29951 | ||
29952 | if test $ac_cv_func_unsetenv = no; then | |
29953 | HAVE_UNSETENV=0 | |
29954 | else | |
29955 | HAVE_UNSETENV=1 | |
29956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 | |
29957 | $as_echo_n "checking for unsetenv() return type... " >&6; } | |
d0ac1c44 | 29958 | if ${gt_cv_func_unsetenv_ret+:} false; then : |
3d99e817 AK |
29959 | $as_echo_n "(cached) " >&6 |
29960 | else | |
29961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
29962 | /* end confdefs.h. */ | |
29963 | ||
29964 | #undef _BSD | |
29965 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | |
29966 | #include <stdlib.h> | |
29967 | extern | |
29968 | #ifdef __cplusplus | |
29969 | "C" | |
29970 | #endif | |
29971 | int unsetenv (const char *name); | |
29972 | ||
29973 | int | |
29974 | main () | |
29975 | { | |
29976 | ||
29977 | ; | |
29978 | return 0; | |
29979 | } | |
29980 | _ACEOF | |
29981 | if ac_fn_c_try_compile "$LINENO"; then : | |
29982 | gt_cv_func_unsetenv_ret='int' | |
29983 | else | |
29984 | gt_cv_func_unsetenv_ret='void' | |
29985 | fi | |
29986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
29987 | fi | |
29988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 | |
29989 | $as_echo "$gt_cv_func_unsetenv_ret" >&6; } | |
29990 | if test $gt_cv_func_unsetenv_ret = 'void'; then | |
29991 | ||
29992 | $as_echo "#define VOID_UNSETENV 1" >>confdefs.h | |
29993 | ||
29994 | REPLACE_UNSETENV=1 | |
29995 | fi | |
29996 | ||
29997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 | |
29998 | $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } | |
d0ac1c44 | 29999 | if ${gl_cv_func_unsetenv_works+:} false; then : |
3d99e817 AK |
30000 | $as_echo_n "(cached) " >&6 |
30001 | else | |
30002 | if test "$cross_compiling" = yes; then : | |
30003 | case "$host_os" in | |
9c9d63b1 PM |
30004 | # Guess yes on glibc systems. |
30005 | *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; | |
30006 | # If we don't know, obey --enable-cross-guesses. | |
30007 | *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;; | |
30008 | esac | |
3d99e817 AK |
30009 | |
30010 | else | |
30011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
30012 | /* end confdefs.h. */ | |
30013 | ||
9c9d63b1 PM |
30014 | #include <stdlib.h> |
30015 | #include <errno.h> | |
30016 | extern char **environ; | |
30017 | ||
30018 | ||
30019 | $gl_mda_defines | |
3d99e817 AK |
30020 | |
30021 | int | |
30022 | main () | |
30023 | { | |
30024 | ||
9c9d63b1 PM |
30025 | char entry1[] = "a=1"; |
30026 | char entry2[] = "b=2"; | |
30027 | char *env[] = { entry1, entry2, NULL }; | |
30028 | if (putenv ((char *) "a=1")) return 1; | |
30029 | if (putenv (entry2)) return 2; | |
30030 | entry2[0] = 'a'; | |
30031 | unsetenv ("a"); | |
30032 | if (getenv ("a")) return 3; | |
30033 | if (!unsetenv ("") || errno != EINVAL) return 4; | |
30034 | entry2[0] = 'b'; | |
30035 | environ = env; | |
30036 | if (!getenv ("a")) return 5; | |
30037 | entry2[0] = 'a'; | |
30038 | unsetenv ("a"); | |
30039 | if (getenv ("a")) return 6; | |
3d99e817 AK |
30040 | |
30041 | ; | |
30042 | return 0; | |
30043 | } | |
30044 | _ACEOF | |
30045 | if ac_fn_c_try_run "$LINENO"; then : | |
30046 | gl_cv_func_unsetenv_works=yes | |
30047 | else | |
30048 | gl_cv_func_unsetenv_works=no | |
30049 | fi | |
30050 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
30051 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
30052 | fi | |
30053 | ||
9c9d63b1 | 30054 | |
3d99e817 AK |
30055 | fi |
30056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 | |
30057 | $as_echo "$gl_cv_func_unsetenv_works" >&6; } | |
30058 | case "$gl_cv_func_unsetenv_works" in | |
30059 | *yes) ;; | |
30060 | *) | |
30061 | REPLACE_UNSETENV=1 | |
30062 | ;; | |
30063 | esac | |
30064 | fi | |
30065 | ||
30066 | if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then | |
30067 | ||
30068 | ||
30069 | ||
30070 | ||
30071 | ||
30072 | ||
30073 | ||
30074 | ||
30075 | gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" | |
30076 | ||
30077 | ||
30078 | ||
30079 | ||
30080 | ||
30081 | fi | |
30082 | ||
30083 | ||
30084 | ||
30085 | ||
30086 | ||
30087 | GNULIB_UNSETENV=1 | |
30088 | ||
30089 | ||
30090 | ||
30091 | ||
30092 | ||
30093 | $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h | |
30094 | ||
30095 | ||
30096 | ||
30097 | ||
30098 | ||
30099 | ||
8839a007 PA |
30100 | |
30101 | ||
30102 | ||
30103 | ||
30104 | ||
30105 | ||
30106 | ||
8690e634 JK |
30107 | |
30108 | ||
30109 | if test $gl_cv_have_include_next = yes; then | |
30110 | gl_cv_next_wchar_h='<'wchar.h'>' | |
30111 | else | |
30112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 | |
30113 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
d0ac1c44 | 30114 | if ${gl_cv_next_wchar_h+:} false; then : |
8690e634 JK |
30115 | $as_echo_n "(cached) " >&6 |
30116 | else | |
30117 | ||
30118 | if test $ac_cv_header_wchar_h = yes; then | |
30119 | ||
30120 | ||
4a626d0a PA |
30121 | |
30122 | ||
30123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8690e634 JK |
30124 | /* end confdefs.h. */ |
30125 | #include <wchar.h> | |
8690e634 | 30126 | _ACEOF |
4a626d0a PA |
30127 | case "$host_os" in |
30128 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
30129 | *) gl_absname_cpp="$ac_cpp" ;; | |
30130 | esac | |
30131 | ||
30132 | case "$host_os" in | |
30133 | mingw*) | |
30134 | gl_dirsep_regex='[/\\]' | |
30135 | ;; | |
30136 | *) | |
30137 | gl_dirsep_regex='\/' | |
30138 | ;; | |
30139 | esac | |
30140 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
30141 | gl_header_literal_regex=`echo 'wchar.h' \ | |
30142 | | sed -e "$gl_make_literal_regex_sed"` | |
30143 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
30144 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
30145 | s|^/[^/]|//&| | |
30146 | p | |
30147 | q | |
30148 | }' | |
30149 | ||
30150 | gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
30151 | sed -n "$gl_absolute_header_sed"` | |
30152 | ||
30153 | gl_header=$gl_cv_absolute_wchar_h | |
30154 | gl_cv_next_wchar_h='"'$gl_header'"' | |
8690e634 JK |
30155 | else |
30156 | gl_cv_next_wchar_h='<'wchar.h'>' | |
30157 | fi | |
30158 | ||
30159 | ||
30160 | fi | |
30161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 | |
30162 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
30163 | fi | |
30164 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
30165 | ||
30166 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
30167 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
30168 | gl_next_as_first_directive='<'wchar.h'>' | |
30169 | else | |
30170 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
30171 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
30172 | fi | |
30173 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
30174 | ||
30175 | ||
30176 | ||
30177 | ||
30178 | if test $ac_cv_header_wchar_h = yes; then | |
30179 | HAVE_WCHAR_H=1 | |
30180 | else | |
30181 | HAVE_WCHAR_H=0 | |
30182 | fi | |
30183 | ||
c971b7fa PA |
30184 | |
30185 | ||
30186 | ||
30187 | ||
8690e634 JK |
30188 | if test $gt_cv_c_wint_t = yes; then |
30189 | HAVE_WINT_T=1 | |
30190 | else | |
30191 | HAVE_WINT_T=0 | |
30192 | fi | |
c971b7fa PA |
30193 | |
30194 | ||
30195 | ||
8690e634 JK |
30196 | |
30197 | ||
30198 | ||
30199 | ||
30200 | ||
472fa5ee SM |
30201 | |
30202 | ||
9c9d63b1 PM |
30203 | ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" " |
30204 | #include <wchar.h> | |
30205 | ||
30206 | " | |
30207 | if test "x$ac_cv_have_decl_wcsdup" = xyes; then : | |
30208 | ac_have_decl=1 | |
30209 | else | |
30210 | ac_have_decl=0 | |
30211 | fi | |
30212 | ||
30213 | cat >>confdefs.h <<_ACEOF | |
30214 | #define HAVE_DECL_WCSDUP $ac_have_decl | |
30215 | _ACEOF | |
30216 | ||
30217 | if test $ac_cv_have_decl_wcsdup = no; then | |
30218 | HAVE_DECL_WCSDUP=0 | |
30219 | fi | |
30220 | ||
472fa5ee SM |
30221 | |
30222 | ||
30223 | ||
698be2d8 CB |
30224 | |
30225 | ||
8690e634 JK |
30226 | if test $ac_cv_func_iswcntrl = yes; then |
30227 | HAVE_ISWCNTRL=1 | |
30228 | else | |
30229 | HAVE_ISWCNTRL=0 | |
30230 | fi | |
30231 | ||
30232 | ||
30233 | ||
8690e634 JK |
30234 | if test $gt_cv_c_wint_t = yes; then |
30235 | HAVE_WINT_T=1 | |
30236 | else | |
30237 | HAVE_WINT_T=0 | |
30238 | fi | |
30239 | ||
30240 | ||
30241 | ||
30242 | ||
30243 | ||
30244 | ||
c971b7fa | 30245 | |
8690e634 | 30246 | |
472fa5ee SM |
30247 | |
30248 | ||
c971b7fa PA |
30249 | |
30250 | ||
30251 | ||
30252 | if test $gl_cv_have_include_next = yes; then | |
8690e634 | 30253 | gl_cv_next_wctype_h='<'wctype.h'>' |
c971b7fa | 30254 | else |
8690e634 JK |
30255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5 |
30256 | $as_echo_n "checking absolute name of <wctype.h>... " >&6; } | |
d0ac1c44 | 30257 | if ${gl_cv_next_wctype_h+:} false; then : |
c971b7fa PA |
30258 | $as_echo_n "(cached) " >&6 |
30259 | else | |
30260 | ||
8690e634 JK |
30261 | if test $ac_cv_header_wctype_h = yes; then |
30262 | ||
30263 | ||
4a626d0a PA |
30264 | |
30265 | ||
30266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c971b7fa | 30267 | /* end confdefs.h. */ |
8690e634 | 30268 | #include <wctype.h> |
c971b7fa | 30269 | _ACEOF |
4a626d0a PA |
30270 | case "$host_os" in |
30271 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
30272 | *) gl_absname_cpp="$ac_cpp" ;; | |
30273 | esac | |
30274 | ||
30275 | case "$host_os" in | |
30276 | mingw*) | |
30277 | gl_dirsep_regex='[/\\]' | |
30278 | ;; | |
30279 | *) | |
30280 | gl_dirsep_regex='\/' | |
30281 | ;; | |
30282 | esac | |
30283 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
30284 | gl_header_literal_regex=`echo 'wctype.h' \ | |
30285 | | sed -e "$gl_make_literal_regex_sed"` | |
30286 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
30287 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
30288 | s|^/[^/]|//&| | |
30289 | p | |
30290 | q | |
30291 | }' | |
30292 | ||
30293 | gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
30294 | sed -n "$gl_absolute_header_sed"` | |
30295 | ||
30296 | gl_header=$gl_cv_absolute_wctype_h | |
30297 | gl_cv_next_wctype_h='"'$gl_header'"' | |
8690e634 JK |
30298 | else |
30299 | gl_cv_next_wctype_h='<'wctype.h'>' | |
30300 | fi | |
c971b7fa PA |
30301 | |
30302 | ||
30303 | fi | |
8690e634 JK |
30304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 |
30305 | $as_echo "$gl_cv_next_wctype_h" >&6; } | |
c971b7fa | 30306 | fi |
8690e634 | 30307 | NEXT_WCTYPE_H=$gl_cv_next_wctype_h |
c971b7fa PA |
30308 | |
30309 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
30310 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
8690e634 | 30311 | gl_next_as_first_directive='<'wctype.h'>' |
c971b7fa PA |
30312 | else |
30313 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
8690e634 | 30314 | gl_next_as_first_directive=$gl_cv_next_wctype_h |
c971b7fa | 30315 | fi |
8690e634 JK |
30316 | NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive |
30317 | ||
30318 | ||
30319 | ||
30320 | ||
30321 | if test $ac_cv_header_wctype_h = yes; then | |
30322 | if test $ac_cv_func_iswcntrl = yes; then | |
30323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 | |
30324 | $as_echo_n "checking whether iswcntrl works... " >&6; } | |
d0ac1c44 | 30325 | if ${gl_cv_func_iswcntrl_works+:} false; then : |
8690e634 JK |
30326 | $as_echo_n "(cached) " >&6 |
30327 | else | |
30328 | ||
30329 | if test "$cross_compiling" = yes; then : | |
c0c3707f | 30330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8690e634 JK |
30331 | /* end confdefs.h. */ |
30332 | #include <stdlib.h> | |
30333 | #if __GNU_LIBRARY__ == 1 | |
30334 | Linux libc5 i18n is broken. | |
30335 | #endif | |
30336 | int | |
30337 | main () | |
30338 | { | |
30339 | ||
30340 | ; | |
30341 | return 0; | |
30342 | } | |
30343 | _ACEOF | |
30344 | if ac_fn_c_try_compile "$LINENO"; then : | |
30345 | gl_cv_func_iswcntrl_works="guessing yes" | |
30346 | else | |
30347 | gl_cv_func_iswcntrl_works="guessing no" | |
30348 | fi | |
30349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
30350 | ||
30351 | else | |
30352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
30353 | /* end confdefs.h. */ | |
30354 | ||
8690e634 JK |
30355 | #include <wchar.h> |
30356 | #include <wctype.h> | |
30357 | int main () { return iswprint ('x') == 0; } | |
30358 | ||
30359 | _ACEOF | |
30360 | if ac_fn_c_try_run "$LINENO"; then : | |
30361 | gl_cv_func_iswcntrl_works=yes | |
30362 | else | |
30363 | gl_cv_func_iswcntrl_works=no | |
30364 | fi | |
30365 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
30366 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
30367 | fi | |
30368 | ||
30369 | ||
30370 | fi | |
30371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 | |
30372 | $as_echo "$gl_cv_func_iswcntrl_works" >&6; } | |
30373 | fi | |
30374 | HAVE_WCTYPE_H=1 | |
30375 | else | |
30376 | HAVE_WCTYPE_H=0 | |
30377 | fi | |
30378 | ||
30379 | ||
c0c3707f CB |
30380 | if test $GNULIB_OVERRIDES_WINT_T = 1; then |
30381 | REPLACE_ISWCNTRL=1 | |
30382 | else | |
30383 | case "$gl_cv_func_iswcntrl_works" in | |
30384 | *yes) REPLACE_ISWCNTRL=0 ;; | |
30385 | *) REPLACE_ISWCNTRL=1 ;; | |
30386 | esac | |
30387 | fi | |
8690e634 JK |
30388 | |
30389 | ||
30390 | if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then | |
30391 | : | |
30392 | fi | |
30393 | ||
30394 | if test $REPLACE_ISWCNTRL = 1; then | |
30395 | REPLACE_TOWLOWER=1 | |
30396 | else | |
30397 | for ac_func in towlower | |
30398 | do : | |
30399 | ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" | |
d0ac1c44 | 30400 | if test "x$ac_cv_func_towlower" = xyes; then : |
8690e634 JK |
30401 | cat >>confdefs.h <<_ACEOF |
30402 | #define HAVE_TOWLOWER 1 | |
30403 | _ACEOF | |
30404 | ||
30405 | fi | |
30406 | done | |
30407 | ||
30408 | if test $ac_cv_func_towlower = yes; then | |
30409 | REPLACE_TOWLOWER=0 | |
30410 | else | |
9c9d63b1 | 30411 | ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h> |
8690e634 JK |
30412 | #if HAVE_WCTYPE_H |
30413 | # include <wctype.h> | |
30414 | #endif | |
30415 | ||
30416 | " | |
d0ac1c44 | 30417 | if test "x$ac_cv_have_decl_towlower" = xyes; then : |
8690e634 JK |
30418 | ac_have_decl=1 |
30419 | else | |
30420 | ac_have_decl=0 | |
30421 | fi | |
30422 | ||
30423 | cat >>confdefs.h <<_ACEOF | |
30424 | #define HAVE_DECL_TOWLOWER $ac_have_decl | |
30425 | _ACEOF | |
30426 | ||
30427 | if test $ac_cv_have_decl_towlower = yes; then | |
30428 | REPLACE_TOWLOWER=1 | |
30429 | else | |
30430 | REPLACE_TOWLOWER=0 | |
30431 | fi | |
30432 | fi | |
30433 | fi | |
30434 | ||
30435 | ||
30436 | if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then | |
30437 | : | |
30438 | fi | |
30439 | ||
30440 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 | |
30441 | $as_echo_n "checking for wctype_t... " >&6; } | |
d0ac1c44 | 30442 | if ${gl_cv_type_wctype_t+:} false; then : |
8690e634 JK |
30443 | $as_echo_n "(cached) " >&6 |
30444 | else | |
30445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
30446 | /* end confdefs.h. */ | |
9c9d63b1 | 30447 | #include <wchar.h> |
8690e634 JK |
30448 | #if HAVE_WCTYPE_H |
30449 | # include <wctype.h> | |
30450 | #endif | |
30451 | wctype_t a; | |
30452 | ||
30453 | int | |
30454 | main () | |
30455 | { | |
30456 | ||
30457 | ; | |
30458 | return 0; | |
30459 | } | |
30460 | _ACEOF | |
30461 | if ac_fn_c_try_compile "$LINENO"; then : | |
30462 | gl_cv_type_wctype_t=yes | |
30463 | else | |
30464 | gl_cv_type_wctype_t=no | |
30465 | fi | |
30466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 30467 | |
8690e634 JK |
30468 | fi |
30469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 | |
30470 | $as_echo "$gl_cv_type_wctype_t" >&6; } | |
30471 | if test $gl_cv_type_wctype_t = no; then | |
30472 | HAVE_WCTYPE_T=0 | |
30473 | fi | |
30474 | ||
30475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 | |
30476 | $as_echo_n "checking for wctrans_t... " >&6; } | |
d0ac1c44 | 30477 | if ${gl_cv_type_wctrans_t+:} false; then : |
8690e634 JK |
30478 | $as_echo_n "(cached) " >&6 |
30479 | else | |
30480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
30481 | /* end confdefs.h. */ | |
9c9d63b1 | 30482 | #include <wchar.h> |
8690e634 JK |
30483 | #include <wctype.h> |
30484 | wctrans_t a; | |
c971b7fa | 30485 | |
8690e634 JK |
30486 | int |
30487 | main () | |
30488 | { | |
c971b7fa | 30489 | |
8690e634 JK |
30490 | ; |
30491 | return 0; | |
30492 | } | |
30493 | _ACEOF | |
30494 | if ac_fn_c_try_compile "$LINENO"; then : | |
30495 | gl_cv_type_wctrans_t=yes | |
30496 | else | |
30497 | gl_cv_type_wctrans_t=no | |
30498 | fi | |
30499 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
c971b7fa | 30500 | |
8690e634 JK |
30501 | fi |
30502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 | |
30503 | $as_echo "$gl_cv_type_wctrans_t" >&6; } | |
30504 | if test $gl_cv_type_wctrans_t = no; then | |
30505 | HAVE_WCTRANS_T=0 | |
c971b7fa PA |
30506 | fi |
30507 | ||
30508 | ||
5e8754f9 | 30509 | |
5e8754f9 | 30510 | |
c971b7fa | 30511 | |
c0c3707f CB |
30512 | |
30513 | case "$host_os" in | |
30514 | mingw*) | |
30515 | ||
30516 | ||
30517 | ||
30518 | ||
30519 | ||
30520 | ||
30521 | ||
30522 | ||
30523 | gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext" | |
30524 | ||
30525 | ;; | |
30526 | esac | |
30527 | ||
30528 | case "$host_os" in | |
30529 | mingw*) | |
30530 | ||
30531 | ||
30532 | ||
30533 | ||
30534 | ||
30535 | ||
30536 | ||
30537 | ||
30538 | gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext" | |
30539 | ||
30540 | ;; | |
30541 | esac | |
30542 | ||
30543 | case "$host_os" in | |
30544 | mingw*) | |
30545 | ||
30546 | ||
c971b7fa PA |
30547 | |
30548 | ||
c0c3707f CB |
30549 | |
30550 | ||
30551 | ||
30552 | ||
30553 | gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext" | |
30554 | ||
30555 | ;; | |
30556 | esac | |
30557 | ||
30558 | case "$host_os" in | |
30559 | mingw*) | |
30560 | ||
30561 | ||
30562 | ||
30563 | ||
30564 | ||
30565 | ||
30566 | ||
30567 | ||
30568 | gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext" | |
30569 | ||
30570 | ;; | |
30571 | esac | |
698be2d8 CB |
30572 | |
30573 | ||
30574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5 | |
30575 | $as_echo_n "checking for wmemchr... " >&6; } | |
30576 | if ${gl_cv_func_wmemchr+:} false; then : | |
30577 | $as_echo_n "(cached) " >&6 | |
30578 | else | |
30579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
30580 | /* end confdefs.h. */ | |
698be2d8 CB |
30581 | #include <wchar.h> |
30582 | ||
30583 | int | |
30584 | main () | |
30585 | { | |
30586 | return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0); | |
30587 | ; | |
30588 | return 0; | |
30589 | } | |
30590 | ||
30591 | _ACEOF | |
30592 | if ac_fn_c_try_link "$LINENO"; then : | |
30593 | gl_cv_func_wmemchr=yes | |
30594 | else | |
30595 | gl_cv_func_wmemchr=no | |
30596 | fi | |
30597 | rm -f core conftest.err conftest.$ac_objext \ | |
30598 | conftest$ac_exeext conftest.$ac_ext | |
30599 | ||
30600 | fi | |
30601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5 | |
30602 | $as_echo "$gl_cv_func_wmemchr" >&6; } | |
30603 | if test $gl_cv_func_wmemchr = no; then | |
30604 | HAVE_WMEMCHR=0 | |
30605 | fi | |
30606 | ||
30607 | if test $HAVE_WMEMCHR = 0; then | |
30608 | ||
30609 | ||
30610 | ||
30611 | ||
30612 | ||
30613 | ||
30614 | ||
30615 | ||
30616 | gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext" | |
30617 | ||
30618 | fi | |
30619 | ||
30620 | ||
30621 | ||
30622 | ||
30623 | ||
30624 | GNULIB_WMEMCHR=1 | |
30625 | ||
30626 | ||
30627 | ||
30628 | ||
30629 | ||
30630 | $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h | |
30631 | ||
30632 | ||
30633 | ||
30634 | ||
30635 | ||
30636 | ||
30637 | ||
30638 | ||
30639 | ||
30640 | ||
30641 | ||
30642 | if test $ac_cv_func_wmempcpy = no; then | |
30643 | HAVE_WMEMPCPY=0 | |
30644 | fi | |
30645 | ||
30646 | if test $HAVE_WMEMPCPY = 0; then | |
30647 | ||
30648 | ||
30649 | ||
30650 | ||
30651 | ||
30652 | ||
30653 | ||
30654 | ||
30655 | gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext" | |
30656 | ||
30657 | fi | |
30658 | ||
30659 | ||
30660 | ||
30661 | ||
30662 | ||
30663 | GNULIB_WMEMPCPY=1 | |
30664 | ||
30665 | ||
30666 | ||
30667 | ||
30668 | ||
30669 | $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h | |
30670 | ||
30671 | ||
30672 | ||
c971b7fa PA |
30673 | # End of code from modules |
30674 | ||
30675 | ||
30676 | ||
30677 | ||
30678 | ||
30679 | ||
30680 | ||
30681 | ||
30682 | ||
30683 | gltests_libdeps= | |
30684 | gltests_ltlibdeps= | |
30685 | ||
30686 | ||
30687 | ||
30688 | ||
30689 | ||
30690 | ||
30691 | ||
30692 | ||
30693 | ||
5df4cba6 | 30694 | |
c971b7fa PA |
30695 | gl_source_base='tests' |
30696 | 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 | |
30697 | ||
30698 | gl_module_indicator_condition=$gltests_WITNESS | |
30699 | ||
30700 | ||
30701 | ||
30702 | ||
30703 | ||
30704 | ||
30705 | ||
30706 | ||
30707 | ||
30708 | LIBGNU_LIBDEPS="$gl_libdeps" | |
30709 | ||
30710 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
30711 | ||
30712 | ||
30713 | ||
d0ac1c44 | 30714 | am__api_version='1.15' |
c971b7fa PA |
30715 | |
30716 | # Find a good install program. We prefer a C program (faster), | |
30717 | # so one script is as good as another. But avoid the broken or | |
30718 | # incompatible versions: | |
30719 | # SysV /etc/install, /usr/sbin/install | |
30720 | # SunOS /usr/etc/install | |
30721 | # IRIX /sbin/install | |
30722 | # AIX /bin/install | |
30723 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
30724 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
30725 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
30726 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
30727 | # OS/2's system install, which has a completely different semantic | |
30728 | # ./install, which can be erroneously created by make from ./install.sh. | |
30729 | # Reject install programs that cannot install multiple files. | |
30730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
30731 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
30732 | if test -z "$INSTALL"; then | |
d0ac1c44 | 30733 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
30734 | $as_echo_n "(cached) " >&6 |
30735 | else | |
30736 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30737 | for as_dir in $PATH | |
30738 | do | |
30739 | IFS=$as_save_IFS | |
30740 | test -z "$as_dir" && as_dir=. | |
30741 | # Account for people who put trailing slashes in PATH elements. | |
30742 | case $as_dir/ in #(( | |
30743 | ./ | .// | /[cC]/* | \ | |
30744 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
30745 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
30746 | /usr/ucb/* ) ;; | |
30747 | *) | |
30748 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
30749 | # Don't use installbsd from OSF since it installs stuff as root | |
30750 | # by default. | |
30751 | for ac_prog in ginstall scoinst install; do | |
30752 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30753 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
30754 | if test $ac_prog = install && |
30755 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
30756 | # AIX install. It has an incompatible calling convention. | |
30757 | : | |
30758 | elif test $ac_prog = install && | |
30759 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
30760 | # program-specific install script used by HP pwplus--don't use. | |
30761 | : | |
30762 | else | |
30763 | rm -rf conftest.one conftest.two conftest.dir | |
30764 | echo one > conftest.one | |
30765 | echo two > conftest.two | |
30766 | mkdir conftest.dir | |
30767 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
30768 | test -s conftest.one && test -s conftest.two && | |
30769 | test -s conftest.dir/conftest.one && | |
30770 | test -s conftest.dir/conftest.two | |
30771 | then | |
30772 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
30773 | break 3 | |
30774 | fi | |
30775 | fi | |
30776 | fi | |
30777 | done | |
30778 | done | |
30779 | ;; | |
30780 | esac | |
30781 | ||
30782 | done | |
30783 | IFS=$as_save_IFS | |
30784 | ||
30785 | rm -rf conftest.one conftest.two conftest.dir | |
30786 | ||
30787 | fi | |
30788 | if test "${ac_cv_path_install+set}" = set; then | |
30789 | INSTALL=$ac_cv_path_install | |
30790 | else | |
30791 | # As a last resort, use the slow shell script. Don't cache a | |
30792 | # value for INSTALL within a source directory, because that will | |
30793 | # break other packages using the cache if that directory is | |
30794 | # removed, or if the value is a relative name. | |
30795 | INSTALL=$ac_install_sh | |
30796 | fi | |
30797 | fi | |
30798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
30799 | $as_echo "$INSTALL" >&6; } | |
30800 | ||
30801 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
30802 | # It thinks the first close brace ends the variable substitution. | |
30803 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
30804 | ||
30805 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
30806 | ||
30807 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
30808 | ||
30809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 | |
30810 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
c971b7fa PA |
30811 | # Reject unsafe characters in $srcdir or the absolute working directory |
30812 | # name. Accept space and tab only in the latter. | |
30813 | am_lf=' | |
30814 | ' | |
30815 | case `pwd` in | |
30816 | *[\\\"\#\$\&\'\`$am_lf]*) | |
d0ac1c44 | 30817 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; |
c971b7fa PA |
30818 | esac |
30819 | case $srcdir in | |
30820 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
d0ac1c44 | 30821 | as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; |
c971b7fa PA |
30822 | esac |
30823 | ||
d0ac1c44 | 30824 | # Do 'set' in a subshell so we don't clobber the current shell's |
c971b7fa PA |
30825 | # arguments. Must try -L first in case configure is actually a |
30826 | # symlink; some systems play weird games with the mod time of symlinks | |
30827 | # (eg FreeBSD returns the mod time of the symlink's containing | |
30828 | # directory). | |
30829 | if ( | |
d0ac1c44 SM |
30830 | am_has_slept=no |
30831 | for am_try in 1 2; do | |
30832 | echo "timestamp, slept: $am_has_slept" > conftest.file | |
30833 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
30834 | if test "$*" = "X"; then | |
30835 | # -L didn't work. | |
30836 | set X `ls -t "$srcdir/configure" conftest.file` | |
30837 | fi | |
30838 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
30839 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
30840 | ||
30841 | # If neither matched, then we have a broken ls. This can happen | |
30842 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
30843 | # broken ls alias from the environment. This has actually | |
30844 | # happened. Such a system could not be considered "sane". | |
30845 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
30846 | alias in your environment" "$LINENO" 5 | |
30847 | fi | |
30848 | if test "$2" = conftest.file || test $am_try -eq 2; then | |
30849 | break | |
30850 | fi | |
30851 | # Just in case. | |
30852 | sleep 1 | |
30853 | am_has_slept=yes | |
30854 | done | |
c971b7fa PA |
30855 | test "$2" = conftest.file |
30856 | ) | |
30857 | then | |
30858 | # Ok. | |
30859 | : | |
30860 | else | |
d0ac1c44 | 30861 | as_fn_error $? "newly created file is older than distributed files! |
c971b7fa PA |
30862 | Check your system clock" "$LINENO" 5 |
30863 | fi | |
30864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
30865 | $as_echo "yes" >&6; } | |
d0ac1c44 SM |
30866 | # If we didn't sleep, we still need to ensure time stamps of config.status and |
30867 | # generated files are strictly newer. | |
30868 | am_sleep_pid= | |
30869 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
30870 | ( sleep 1 ) & | |
30871 | am_sleep_pid=$! | |
30872 | fi | |
30873 | ||
30874 | rm -f conftest.file | |
30875 | ||
c971b7fa PA |
30876 | test "$program_prefix" != NONE && |
30877 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
30878 | # Use a double $ so make ignores it. | |
30879 | test "$program_suffix" != NONE && | |
30880 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
30881 | # Double any \ or $. | |
30882 | # By default was `s,x,x', remove it if useless. | |
30883 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
30884 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
30885 | ||
c0c3707f CB |
30886 | # Expand $ac_aux_dir to an absolute path. |
30887 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
30888 | ||
c971b7fa PA |
30889 | if test x"${MISSING+set}" != xset; then |
30890 | case $am_aux_dir in | |
30891 | *\ * | *\ *) | |
30892 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
30893 | *) | |
30894 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
30895 | esac | |
30896 | fi | |
30897 | # Use eval to expand $SHELL | |
d0ac1c44 SM |
30898 | if eval "$MISSING --is-lightweight"; then |
30899 | am_missing_run="$MISSING " | |
c971b7fa PA |
30900 | else |
30901 | am_missing_run= | |
d0ac1c44 SM |
30902 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 |
30903 | $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} | |
c971b7fa PA |
30904 | fi |
30905 | ||
d0ac1c44 | 30906 | if test x"${install_sh+set}" != xset; then |
c971b7fa PA |
30907 | case $am_aux_dir in |
30908 | *\ * | *\ *) | |
30909 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
30910 | *) | |
30911 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
30912 | esac | |
30913 | fi | |
30914 | ||
d0ac1c44 SM |
30915 | # Installed binaries are usually stripped using 'strip' when the user |
30916 | # run "make install-strip". However 'strip' might not be the right | |
c971b7fa | 30917 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 30918 | # will honor the 'STRIP' environment variable to overrule this program. |
c971b7fa PA |
30919 | if test "$cross_compiling" != no; then |
30920 | if test -n "$ac_tool_prefix"; then | |
30921 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
30922 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
30923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30924 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30925 | if ${ac_cv_prog_STRIP+:} false; then : |
c971b7fa PA |
30926 | $as_echo_n "(cached) " >&6 |
30927 | else | |
30928 | if test -n "$STRIP"; then | |
30929 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
30930 | else | |
30931 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30932 | for as_dir in $PATH | |
30933 | do | |
30934 | IFS=$as_save_IFS | |
30935 | test -z "$as_dir" && as_dir=. | |
30936 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30937 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30938 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
30939 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30940 | break 2 | |
30941 | fi | |
30942 | done | |
30943 | done | |
30944 | IFS=$as_save_IFS | |
30945 | ||
30946 | fi | |
30947 | fi | |
30948 | STRIP=$ac_cv_prog_STRIP | |
30949 | if test -n "$STRIP"; then | |
30950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
30951 | $as_echo "$STRIP" >&6; } | |
30952 | else | |
30953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30954 | $as_echo "no" >&6; } | |
30955 | fi | |
30956 | ||
30957 | ||
30958 | fi | |
30959 | if test -z "$ac_cv_prog_STRIP"; then | |
30960 | ac_ct_STRIP=$STRIP | |
30961 | # Extract the first word of "strip", so it can be a program name with args. | |
30962 | set dummy strip; ac_word=$2 | |
30963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
30964 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 30965 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
c971b7fa PA |
30966 | $as_echo_n "(cached) " >&6 |
30967 | else | |
30968 | if test -n "$ac_ct_STRIP"; then | |
30969 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
30970 | else | |
30971 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
30972 | for as_dir in $PATH | |
30973 | do | |
30974 | IFS=$as_save_IFS | |
30975 | test -z "$as_dir" && as_dir=. | |
30976 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 30977 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
30978 | ac_cv_prog_ac_ct_STRIP="strip" |
30979 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
30980 | break 2 | |
30981 | fi | |
30982 | done | |
30983 | done | |
30984 | IFS=$as_save_IFS | |
30985 | ||
30986 | fi | |
30987 | fi | |
30988 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
30989 | if test -n "$ac_ct_STRIP"; then | |
30990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
30991 | $as_echo "$ac_ct_STRIP" >&6; } | |
30992 | else | |
30993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
30994 | $as_echo "no" >&6; } | |
30995 | fi | |
30996 | ||
30997 | if test "x$ac_ct_STRIP" = x; then | |
30998 | STRIP=":" | |
30999 | else | |
31000 | case $cross_compiling:$ac_tool_warned in | |
31001 | yes:) | |
31002 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
31003 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
31004 | ac_tool_warned=yes ;; | |
31005 | esac | |
31006 | STRIP=$ac_ct_STRIP | |
31007 | fi | |
31008 | else | |
31009 | STRIP="$ac_cv_prog_STRIP" | |
31010 | fi | |
31011 | ||
31012 | fi | |
31013 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
31014 | ||
c971b7fa PA |
31015 | for ac_prog in gawk mawk nawk awk |
31016 | do | |
31017 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
31018 | set dummy $ac_prog; ac_word=$2 | |
31019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
31020 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 31021 | if ${ac_cv_prog_AWK+:} false; then : |
c971b7fa PA |
31022 | $as_echo_n "(cached) " >&6 |
31023 | else | |
31024 | if test -n "$AWK"; then | |
31025 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
31026 | else | |
31027 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31028 | for as_dir in $PATH | |
31029 | do | |
31030 | IFS=$as_save_IFS | |
31031 | test -z "$as_dir" && as_dir=. | |
31032 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 31033 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
31034 | ac_cv_prog_AWK="$ac_prog" |
31035 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
31036 | break 2 | |
31037 | fi | |
31038 | done | |
31039 | done | |
31040 | IFS=$as_save_IFS | |
31041 | ||
31042 | fi | |
31043 | fi | |
31044 | AWK=$ac_cv_prog_AWK | |
31045 | if test -n "$AWK"; then | |
31046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
31047 | $as_echo "$AWK" >&6; } | |
31048 | else | |
31049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31050 | $as_echo "no" >&6; } | |
31051 | fi | |
31052 | ||
31053 | ||
31054 | test -n "$AWK" && break | |
31055 | done | |
31056 | ||
31057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
31058 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
31059 | set x ${MAKE-make} | |
31060 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
d0ac1c44 | 31061 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
c971b7fa PA |
31062 | $as_echo_n "(cached) " >&6 |
31063 | else | |
31064 | cat >conftest.make <<\_ACEOF | |
31065 | SHELL = /bin/sh | |
31066 | all: | |
31067 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
31068 | _ACEOF | |
d0ac1c44 | 31069 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
c971b7fa PA |
31070 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
31071 | *@@@%%%=?*=@@@%%%*) | |
31072 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
31073 | *) | |
31074 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
31075 | esac | |
31076 | rm -f conftest.make | |
31077 | fi | |
31078 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
31079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
31080 | $as_echo "yes" >&6; } | |
31081 | SET_MAKE= | |
31082 | else | |
31083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31084 | $as_echo "no" >&6; } | |
31085 | SET_MAKE="MAKE=${MAKE-make}" | |
31086 | fi | |
31087 | ||
31088 | rm -rf .tst 2>/dev/null | |
31089 | mkdir .tst 2>/dev/null | |
31090 | if test -d .tst; then | |
31091 | am__leading_dot=. | |
31092 | else | |
31093 | am__leading_dot=_ | |
31094 | fi | |
31095 | rmdir .tst 2>/dev/null | |
31096 | ||
31097 | DEPDIR="${am__leading_dot}deps" | |
31098 | ||
31099 | ac_config_commands="$ac_config_commands depfiles" | |
31100 | ||
31101 | ||
31102 | am_make=${MAKE-make} | |
31103 | cat > confinc << 'END' | |
31104 | am__doit: | |
31105 | @echo this is the am__doit target | |
31106 | .PHONY: am__doit | |
31107 | END | |
31108 | # If we don't find an include directive, just comment out the code. | |
31109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
31110 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
31111 | am__include="#" | |
31112 | am__quote= | |
31113 | _am_result=none | |
31114 | # First try GNU make style include. | |
31115 | echo "include confinc" > confmf | |
d0ac1c44 | 31116 | # Ignore all kinds of additional output from 'make'. |
c971b7fa PA |
31117 | case `$am_make -s -f confmf 2> /dev/null` in #( |
31118 | *the\ am__doit\ target*) | |
31119 | am__include=include | |
31120 | am__quote= | |
31121 | _am_result=GNU | |
31122 | ;; | |
31123 | esac | |
31124 | # Now try BSD make style include. | |
31125 | if test "$am__include" = "#"; then | |
31126 | echo '.include "confinc"' > confmf | |
31127 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
31128 | *the\ am__doit\ target*) | |
31129 | am__include=.include | |
31130 | am__quote="\"" | |
31131 | _am_result=BSD | |
31132 | ;; | |
31133 | esac | |
31134 | fi | |
31135 | ||
31136 | ||
31137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
31138 | $as_echo "$_am_result" >&6; } | |
31139 | rm -f confinc confmf | |
31140 | ||
31141 | # Check whether --enable-dependency-tracking was given. | |
31142 | if test "${enable_dependency_tracking+set}" = set; then : | |
31143 | enableval=$enable_dependency_tracking; | |
31144 | fi | |
31145 | ||
31146 | if test "x$enable_dependency_tracking" != xno; then | |
31147 | am_depcomp="$ac_aux_dir/depcomp" | |
31148 | AMDEPBACKSLASH='\' | |
d0ac1c44 | 31149 | am__nodep='_no' |
c971b7fa PA |
31150 | fi |
31151 | if test "x$enable_dependency_tracking" != xno; then | |
31152 | AMDEP_TRUE= | |
31153 | AMDEP_FALSE='#' | |
31154 | else | |
31155 | AMDEP_TRUE='#' | |
31156 | AMDEP_FALSE= | |
31157 | fi | |
31158 | ||
31159 | ||
d0ac1c44 SM |
31160 | # Check whether --enable-silent-rules was given. |
31161 | if test "${enable_silent_rules+set}" = set; then : | |
31162 | enableval=$enable_silent_rules; | |
31163 | fi | |
31164 | ||
31165 | case $enable_silent_rules in # ((( | |
31166 | yes) AM_DEFAULT_VERBOSITY=0;; | |
31167 | no) AM_DEFAULT_VERBOSITY=1;; | |
31168 | *) AM_DEFAULT_VERBOSITY=1;; | |
31169 | esac | |
31170 | am_make=${MAKE-make} | |
31171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
31172 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
31173 | if ${am_cv_make_support_nested_variables+:} false; then : | |
31174 | $as_echo_n "(cached) " >&6 | |
31175 | else | |
31176 | if $as_echo 'TRUE=$(BAR$(V)) | |
31177 | BAR0=false | |
31178 | BAR1=true | |
31179 | V=1 | |
31180 | am__doit: | |
31181 | @$(TRUE) | |
31182 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
31183 | am_cv_make_support_nested_variables=yes | |
31184 | else | |
31185 | am_cv_make_support_nested_variables=no | |
31186 | fi | |
31187 | fi | |
31188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
31189 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
31190 | if test $am_cv_make_support_nested_variables = yes; then | |
31191 | AM_V='$(V)' | |
31192 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
31193 | else | |
31194 | AM_V=$AM_DEFAULT_VERBOSITY | |
31195 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
31196 | fi | |
31197 | AM_BACKSLASH='\' | |
31198 | ||
c971b7fa PA |
31199 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
31200 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
31201 | # is not polluted with repeated "-I." | |
31202 | am__isrc=' -I$(srcdir)' | |
31203 | # test to see if srcdir already configured | |
31204 | if test -f $srcdir/config.status; then | |
d0ac1c44 | 31205 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
c971b7fa PA |
31206 | fi |
31207 | fi | |
31208 | ||
31209 | # test whether we have cygpath | |
31210 | if test -z "$CYGPATH_W"; then | |
31211 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
31212 | CYGPATH_W='cygpath -w' | |
31213 | else | |
31214 | CYGPATH_W=echo | |
31215 | fi | |
31216 | fi | |
31217 | ||
31218 | ||
31219 | # Define the identity of the package. | |
d0ac1c44 SM |
31220 | PACKAGE='libgnu' |
31221 | VERSION='UNUSED-VERSION' | |
c971b7fa PA |
31222 | |
31223 | ||
31224 | # Some tools Automake needs. | |
31225 | ||
31226 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
31227 | ||
31228 | ||
31229 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
31230 | ||
31231 | ||
31232 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
31233 | ||
31234 | ||
31235 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
31236 | ||
31237 | ||
31238 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
31239 | ||
d0ac1c44 SM |
31240 | # For better backward compatibility. To be removed once Automake 1.9.x |
31241 | # dies out for good. For more background, see: | |
31242 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
31243 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
31244 | mkdir_p='$(MKDIR_P)' | |
31245 | ||
31246 | # We need awk for the "check" target (and possibly the TAP driver). The | |
31247 | # system "awk" is bad on some platforms. | |
31248 | # Always define AMTAR for backward compatibility. Yes, it's still used | |
31249 | # in the wild :-( We should find a proper way to deprecate it ... | |
31250 | AMTAR='$${TAR-tar}' | |
31251 | ||
31252 | ||
31253 | # We'll loop over all known methods to create a tar archive until one works. | |
31254 | _am_tools='gnutar pax cpio none' | |
c971b7fa | 31255 | |
d0ac1c44 | 31256 | am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' |
c971b7fa | 31257 | |
c971b7fa PA |
31258 | |
31259 | ||
31260 | ||
31261 | ||
31262 | depcc="$CC" am_compiler_list= | |
31263 | ||
31264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
31265 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 31266 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
c971b7fa PA |
31267 | $as_echo_n "(cached) " >&6 |
31268 | else | |
31269 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
31270 | # We make a subdir and do the tests there. Otherwise we can end up | |
31271 | # making bogus files that we don't know about and never remove. For | |
31272 | # instance it was reported that on HP-UX the gcc test will end up | |
d0ac1c44 SM |
31273 | # making a dummy file named 'D' -- because '-MD' means "put the output |
31274 | # in D". | |
31275 | rm -rf conftest.dir | |
c971b7fa PA |
31276 | mkdir conftest.dir |
31277 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
31278 | # using a relative directory. | |
31279 | cp "$am_depcomp" conftest.dir | |
31280 | cd conftest.dir | |
31281 | # We will build objects and dependencies in a subdirectory because | |
31282 | # it helps to detect inapplicable dependency modes. For instance | |
31283 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
31284 | # side effect of compilation, but ICC will put the dependencies in | |
31285 | # the current directory while Tru64 will put them in the object | |
31286 | # directory. | |
31287 | mkdir sub | |
31288 | ||
31289 | am_cv_CC_dependencies_compiler_type=none | |
31290 | if test "$am_compiler_list" = ""; then | |
31291 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
31292 | fi | |
31293 | am__universal=false | |
31294 | case " $depcc " in #( | |
31295 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
31296 | esac | |
31297 | ||
31298 | for depmode in $am_compiler_list; do | |
31299 | # Setup a source with many dependencies, because some compilers | |
31300 | # like to wrap large dependency lists on column 80 (with \), and | |
31301 | # we should not choose a depcomp mode which is confused by this. | |
31302 | # | |
31303 | # We need to recreate these files for each test, as the compiler may | |
31304 | # overwrite some of them when testing with obscure command lines. | |
31305 | # This happens at least with the AIX C compiler. | |
31306 | : > sub/conftest.c | |
31307 | for i in 1 2 3 4 5 6; do | |
31308 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
d0ac1c44 SM |
31309 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with |
31310 | # Solaris 10 /bin/sh. | |
31311 | echo '/* dummy */' > sub/conftst$i.h | |
c971b7fa PA |
31312 | done |
31313 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
31314 | ||
d0ac1c44 | 31315 | # We check with '-c' and '-o' for the sake of the "dashmstdout" |
c971b7fa | 31316 | # mode. It turns out that the SunPro C++ compiler does not properly |
d0ac1c44 SM |
31317 | # handle '-M -o', and we need to detect this. Also, some Intel |
31318 | # versions had trouble with output in subdirs. | |
c971b7fa PA |
31319 | am__obj=sub/conftest.${OBJEXT-o} |
31320 | am__minus_obj="-o $am__obj" | |
31321 | case $depmode in | |
31322 | gcc) | |
31323 | # This depmode causes a compiler race in universal mode. | |
31324 | test "$am__universal" = false || continue | |
31325 | ;; | |
31326 | nosideeffect) | |
d0ac1c44 SM |
31327 | # After this tag, mechanisms are not by side-effect, so they'll |
31328 | # only be used when explicitly requested. | |
c971b7fa PA |
31329 | if test "x$enable_dependency_tracking" = xyes; then |
31330 | continue | |
31331 | else | |
31332 | break | |
31333 | fi | |
31334 | ;; | |
d0ac1c44 SM |
31335 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
31336 | # This compiler won't grok '-c -o', but also, the minuso test has | |
c971b7fa PA |
31337 | # not run yet. These depmodes are late enough in the game, and |
31338 | # so weak that their functioning should not be impacted. | |
31339 | am__obj=conftest.${OBJEXT-o} | |
31340 | am__minus_obj= | |
31341 | ;; | |
31342 | none) break ;; | |
31343 | esac | |
31344 | if depmode=$depmode \ | |
31345 | source=sub/conftest.c object=$am__obj \ | |
31346 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
31347 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
31348 | >/dev/null 2>conftest.err && | |
31349 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
31350 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
31351 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
31352 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
31353 | # icc doesn't choke on unknown options, it will just issue warnings | |
31354 | # or remarks (even with -Werror). So we grep stderr for any message | |
31355 | # that says an option was ignored or not supported. | |
31356 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
31357 | # icc: Command line warning: ignoring option '-M'; no argument required | |
31358 | # The diagnosis changed in icc 8.0: | |
31359 | # icc: Command line remark: option '-MP' not supported | |
31360 | if (grep 'ignoring option' conftest.err || | |
31361 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
31362 | am_cv_CC_dependencies_compiler_type=$depmode | |
31363 | break | |
31364 | fi | |
31365 | fi | |
31366 | done | |
31367 | ||
31368 | cd .. | |
31369 | rm -rf conftest.dir | |
31370 | else | |
31371 | am_cv_CC_dependencies_compiler_type=none | |
31372 | fi | |
31373 | ||
31374 | fi | |
31375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
31376 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
31377 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
31378 | ||
31379 | if | |
31380 | test "x$enable_dependency_tracking" != xno \ | |
31381 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
31382 | am__fastdepCC_TRUE= | |
31383 | am__fastdepCC_FALSE='#' | |
31384 | else | |
31385 | am__fastdepCC_TRUE='#' | |
31386 | am__fastdepCC_FALSE= | |
31387 | fi | |
31388 | ||
31389 | ||
31390 | ||
d0ac1c44 SM |
31391 | # POSIX will say in a future version that running "rm -f" with no argument |
31392 | # is OK; and we want to be able to make that assumption in our Makefile | |
31393 | # recipes. So use an aggressive probe to check that the usage we want is | |
31394 | # actually supported "in the wild" to an acceptable degree. | |
31395 | # See automake bug#10828. | |
31396 | # To make any issue more visible, cause the running configure to be aborted | |
31397 | # by default if the 'rm' program in use doesn't match our expectations; the | |
31398 | # user can still override this though. | |
31399 | if rm -f && rm -fr && rm -rf; then : OK; else | |
31400 | cat >&2 <<'END' | |
31401 | Oops! | |
31402 | ||
31403 | Your 'rm' program seems unable to run without file operands specified | |
31404 | on the command line, even when the '-f' option is present. This is contrary | |
31405 | to the behaviour of most rm programs out there, and not conforming with | |
31406 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
31407 | ||
31408 | Please tell bug-automake@gnu.org about your system, including the value | |
31409 | of your $PATH and any error possibly output before this message. This | |
31410 | can help us improve future automake versions. | |
31411 | ||
31412 | END | |
31413 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
31414 | echo 'Configuration will proceed anyway, since you have set the' >&2 | |
31415 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
31416 | echo >&2 | |
31417 | else | |
31418 | cat >&2 <<'END' | |
31419 | Aborting the configuration process, to ensure you take notice of the issue. | |
31420 | ||
31421 | You can download and install GNU coreutils to get an 'rm' implementation | |
31422 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
31423 | ||
31424 | If you want to complete the configuration process using your problematic | |
31425 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
31426 | to "yes", and re-run configure. | |
31427 | ||
31428 | END | |
31429 | as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 | |
31430 | fi | |
31431 | fi | |
31432 | ||
c971b7fa | 31433 | |
39be3c7e SM |
31434 | # Check whether --enable-silent-rules was given. |
31435 | if test "${enable_silent_rules+set}" = set; then : | |
31436 | enableval=$enable_silent_rules; | |
31437 | fi | |
31438 | ||
d0ac1c44 SM |
31439 | case $enable_silent_rules in # ((( |
31440 | yes) AM_DEFAULT_VERBOSITY=0;; | |
31441 | no) AM_DEFAULT_VERBOSITY=1;; | |
31442 | *) AM_DEFAULT_VERBOSITY=0;; | |
39be3c7e | 31443 | esac |
d0ac1c44 SM |
31444 | am_make=${MAKE-make} |
31445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
31446 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
31447 | if ${am_cv_make_support_nested_variables+:} false; then : | |
31448 | $as_echo_n "(cached) " >&6 | |
31449 | else | |
31450 | if $as_echo 'TRUE=$(BAR$(V)) | |
31451 | BAR0=false | |
31452 | BAR1=true | |
31453 | V=1 | |
31454 | am__doit: | |
31455 | @$(TRUE) | |
31456 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
31457 | am_cv_make_support_nested_variables=yes | |
31458 | else | |
31459 | am_cv_make_support_nested_variables=no | |
31460 | fi | |
31461 | fi | |
31462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
31463 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
31464 | if test $am_cv_make_support_nested_variables = yes; then | |
31465 | AM_V='$(V)' | |
31466 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
31467 | else | |
31468 | AM_V=$AM_DEFAULT_VERBOSITY | |
31469 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
31470 | fi | |
39be3c7e SM |
31471 | AM_BACKSLASH='\' |
31472 | ||
31473 | ||
c971b7fa PA |
31474 | # --------------------- # |
31475 | # Checks for programs. # | |
31476 | # --------------------- # | |
31477 | ||
31478 | ||
31479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 | |
31480 | $as_echo_n "checking whether ln -s works... " >&6; } | |
31481 | LN_S=$as_ln_s | |
31482 | if test "$LN_S" = "ln -s"; then | |
31483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
31484 | $as_echo "yes" >&6; } | |
31485 | else | |
31486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 | |
31487 | $as_echo "no, using $LN_S" >&6; } | |
31488 | fi | |
31489 | ||
31490 | if test -n "$ac_tool_prefix"; then | |
31491 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
31492 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
31493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
31494 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 31495 | if ${ac_cv_prog_RANLIB+:} false; then : |
c971b7fa PA |
31496 | $as_echo_n "(cached) " >&6 |
31497 | else | |
31498 | if test -n "$RANLIB"; then | |
31499 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
31500 | else | |
31501 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31502 | for as_dir in $PATH | |
31503 | do | |
31504 | IFS=$as_save_IFS | |
31505 | test -z "$as_dir" && as_dir=. | |
31506 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 31507 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
31508 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
31509 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
31510 | break 2 | |
31511 | fi | |
31512 | done | |
31513 | done | |
31514 | IFS=$as_save_IFS | |
31515 | ||
31516 | fi | |
31517 | fi | |
31518 | RANLIB=$ac_cv_prog_RANLIB | |
31519 | if test -n "$RANLIB"; then | |
31520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
31521 | $as_echo "$RANLIB" >&6; } | |
31522 | else | |
31523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31524 | $as_echo "no" >&6; } | |
31525 | fi | |
31526 | ||
31527 | ||
31528 | fi | |
31529 | if test -z "$ac_cv_prog_RANLIB"; then | |
31530 | ac_ct_RANLIB=$RANLIB | |
31531 | # Extract the first word of "ranlib", so it can be a program name with args. | |
31532 | set dummy ranlib; ac_word=$2 | |
31533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
31534 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 31535 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
c971b7fa PA |
31536 | $as_echo_n "(cached) " >&6 |
31537 | else | |
31538 | if test -n "$ac_ct_RANLIB"; then | |
31539 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
31540 | else | |
31541 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31542 | for as_dir in $PATH | |
31543 | do | |
31544 | IFS=$as_save_IFS | |
31545 | test -z "$as_dir" && as_dir=. | |
31546 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 31547 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
31548 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
31549 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
31550 | break 2 | |
31551 | fi | |
31552 | done | |
31553 | done | |
31554 | IFS=$as_save_IFS | |
31555 | ||
31556 | fi | |
31557 | fi | |
31558 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
31559 | if test -n "$ac_ct_RANLIB"; then | |
31560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
31561 | $as_echo "$ac_ct_RANLIB" >&6; } | |
31562 | else | |
31563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31564 | $as_echo "no" >&6; } | |
31565 | fi | |
31566 | ||
31567 | if test "x$ac_ct_RANLIB" = x; then | |
31568 | RANLIB=":" | |
31569 | else | |
31570 | case $cross_compiling:$ac_tool_warned in | |
31571 | yes:) | |
31572 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
31573 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
31574 | ac_tool_warned=yes ;; | |
31575 | esac | |
31576 | RANLIB=$ac_ct_RANLIB | |
31577 | fi | |
31578 | else | |
31579 | RANLIB="$ac_cv_prog_RANLIB" | |
31580 | fi | |
31581 | ||
31582 | ||
31583 | if test -n "$ac_tool_prefix"; then | |
31584 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
31585 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
31586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
31587 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 31588 | if ${ac_cv_prog_AR+:} false; then : |
c971b7fa PA |
31589 | $as_echo_n "(cached) " >&6 |
31590 | else | |
31591 | if test -n "$AR"; then | |
31592 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
31593 | else | |
31594 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31595 | for as_dir in $PATH | |
31596 | do | |
31597 | IFS=$as_save_IFS | |
31598 | test -z "$as_dir" && as_dir=. | |
31599 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 31600 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
31601 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
31602 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
31603 | break 2 | |
31604 | fi | |
31605 | done | |
31606 | done | |
31607 | IFS=$as_save_IFS | |
31608 | ||
31609 | fi | |
31610 | fi | |
31611 | AR=$ac_cv_prog_AR | |
31612 | if test -n "$AR"; then | |
31613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
31614 | $as_echo "$AR" >&6; } | |
31615 | else | |
31616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31617 | $as_echo "no" >&6; } | |
31618 | fi | |
31619 | ||
31620 | ||
31621 | fi | |
31622 | if test -z "$ac_cv_prog_AR"; then | |
31623 | ac_ct_AR=$AR | |
31624 | # Extract the first word of "ar", so it can be a program name with args. | |
31625 | set dummy ar; ac_word=$2 | |
31626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
31627 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 31628 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
c971b7fa PA |
31629 | $as_echo_n "(cached) " >&6 |
31630 | else | |
31631 | if test -n "$ac_ct_AR"; then | |
31632 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
31633 | else | |
31634 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
31635 | for as_dir in $PATH | |
31636 | do | |
31637 | IFS=$as_save_IFS | |
31638 | test -z "$as_dir" && as_dir=. | |
31639 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 31640 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
c971b7fa PA |
31641 | ac_cv_prog_ac_ct_AR="ar" |
31642 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
31643 | break 2 | |
31644 | fi | |
31645 | done | |
31646 | done | |
31647 | IFS=$as_save_IFS | |
31648 | ||
31649 | fi | |
31650 | fi | |
31651 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
31652 | if test -n "$ac_ct_AR"; then | |
31653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
31654 | $as_echo "$ac_ct_AR" >&6; } | |
31655 | else | |
31656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
31657 | $as_echo "no" >&6; } | |
31658 | fi | |
31659 | ||
31660 | if test "x$ac_ct_AR" = x; then | |
31661 | AR="" | |
31662 | else | |
31663 | case $cross_compiling:$ac_tool_warned in | |
31664 | yes:) | |
31665 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
31666 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
31667 | ac_tool_warned=yes ;; | |
31668 | esac | |
31669 | AR=$ac_ct_AR | |
31670 | fi | |
31671 | else | |
31672 | AR="$ac_cv_prog_AR" | |
31673 | fi | |
31674 | ||
31675 | ||
31676 | # ---------------------- # | |
31677 | # Checks for libraries. # | |
31678 | # ---------------------- # | |
31679 | ||
361cb219 AB |
31680 | ac_config_files="$ac_config_files Makefile.gnulib.inc" |
31681 | ||
31682 | ||
c971b7fa PA |
31683 | ac_config_files="$ac_config_files Makefile import/Makefile" |
31684 | ||
31685 | ac_config_commands="$ac_config_commands default" | |
31686 | ||
31687 | cat >confcache <<\_ACEOF | |
31688 | # This file is a shell script that caches the results of configure | |
31689 | # tests run on this system so they can be shared between configure | |
31690 | # scripts and configure runs, see configure's option --config-cache. | |
31691 | # It is not useful on other systems. If it contains results you don't | |
31692 | # want to keep, you may remove or edit it. | |
31693 | # | |
31694 | # config.status only pays attention to the cache file if you give it | |
31695 | # the --recheck option to rerun configure. | |
31696 | # | |
31697 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
31698 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
31699 | # following values. | |
31700 | ||
31701 | _ACEOF | |
31702 | ||
31703 | # The following way of writing the cache mishandles newlines in values, | |
31704 | # but we know of no workaround that is simple, portable, and efficient. | |
31705 | # So, we kill variables containing newlines. | |
31706 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
31707 | # and sets the high bit in the cache file unless we assign to the vars. | |
31708 | ( | |
31709 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
31710 | eval ac_val=\$$ac_var | |
31711 | case $ac_val in #( | |
31712 | *${as_nl}*) | |
31713 | case $ac_var in #( | |
31714 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
31715 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
31716 | esac | |
31717 | case $ac_var in #( | |
31718 | _ | IFS | as_nl) ;; #( | |
31719 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
31720 | *) { eval $ac_var=; unset $ac_var;} ;; | |
31721 | esac ;; | |
31722 | esac | |
31723 | done | |
31724 | ||
31725 | (set) 2>&1 | | |
31726 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
31727 | *${as_nl}ac_space=\ *) | |
31728 | # `set' does not quote correctly, so add quotes: double-quote | |
31729 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
31730 | sed -n \ | |
31731 | "s/'/'\\\\''/g; | |
31732 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
31733 | ;; #( | |
31734 | *) | |
31735 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
31736 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
31737 | ;; | |
31738 | esac | | |
31739 | sort | |
31740 | ) | | |
31741 | sed ' | |
31742 | /^ac_cv_env_/b end | |
31743 | t clear | |
31744 | :clear | |
31745 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
31746 | t end | |
31747 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
31748 | :end' >>confcache | |
31749 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
31750 | if test -w "$cache_file"; then | |
d0ac1c44 | 31751 | if test "x$cache_file" != "x/dev/null"; then |
c971b7fa PA |
31752 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
31753 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
31754 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
31755 | cat confcache >"$cache_file" | |
31756 | else | |
31757 | case $cache_file in #( | |
31758 | */* | ?:*) | |
31759 | mv -f confcache "$cache_file"$$ && | |
31760 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
31761 | *) | |
31762 | mv -f confcache "$cache_file" ;; | |
31763 | esac | |
31764 | fi | |
31765 | fi | |
c971b7fa PA |
31766 | else |
31767 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
31768 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
31769 | fi | |
31770 | fi | |
31771 | rm -f confcache | |
31772 | ||
31773 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
31774 | # Let make expand exec_prefix. | |
31775 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
31776 | ||
31777 | DEFS=-DHAVE_CONFIG_H | |
31778 | ||
31779 | ac_libobjs= | |
31780 | ac_ltlibobjs= | |
31781 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
31782 | # 1. Remove the extension, and $U if already installed. | |
31783 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
31784 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
31785 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
31786 | # will be set to the directory where LIBOBJS objects are built. | |
31787 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
31788 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
31789 | done | |
31790 | LIBOBJS=$ac_libobjs | |
31791 | ||
31792 | LTLIBOBJS=$ac_ltlibobjs | |
31793 | ||
31794 | ||
31795 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then | |
d0ac1c44 | 31796 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
c971b7fa PA |
31797 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31798 | fi | |
31799 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then | |
d0ac1c44 | 31800 | as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. |
c971b7fa PA |
31801 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31802 | fi | |
8690e634 | 31803 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
d0ac1c44 | 31804 | as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. |
8690e634 JK |
31805 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31806 | fi | |
18848e28 | 31807 | if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then |
d0ac1c44 | 31808 | as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. |
18848e28 GF |
31809 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31810 | fi | |
88b48903 | 31811 | if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then |
d0ac1c44 | 31812 | as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. |
88b48903 WN |
31813 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31814 | fi | |
8690e634 | 31815 | if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then |
d0ac1c44 | 31816 | as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. |
8690e634 JK |
31817 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31818 | fi | |
c0c3707f CB |
31819 | if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then |
31820 | as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. | |
31821 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
31822 | fi | |
31823 | if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then | |
31824 | as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. | |
31825 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
31826 | fi | |
6ec2e0f5 | 31827 | if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then |
d0ac1c44 | 31828 | as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. |
6ec2e0f5 SDJ |
31829 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31830 | fi | |
49e4877c | 31831 | if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then |
d0ac1c44 | 31832 | as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. |
49e4877c PA |
31833 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31834 | fi | |
31835 | if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then | |
d0ac1c44 | 31836 | as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. |
49e4877c PA |
31837 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31838 | fi | |
c971b7fa | 31839 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
d0ac1c44 | 31840 | as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
c971b7fa PA |
31841 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31842 | fi | |
88b48903 WN |
31843 | |
31844 | ||
5df4cba6 SM |
31845 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then |
31846 | as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. | |
31847 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
31848 | fi | |
725e2999 JB |
31849 | if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then |
31850 | as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. | |
31851 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
31852 | fi | |
31853 | if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then | |
31854 | as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. | |
31855 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
31856 | fi | |
8690e634 | 31857 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
d0ac1c44 | 31858 | as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
8690e634 JK |
31859 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31860 | fi | |
c971b7fa | 31861 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then |
d0ac1c44 | 31862 | as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
c971b7fa PA |
31863 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31864 | fi | |
31865 | ||
31866 | gl_libobjs= | |
31867 | gl_ltlibobjs= | |
31868 | if test -n "$gl_LIBOBJS"; then | |
31869 | # Remove the extension. | |
31870 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
31871 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
31872 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
31873 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
31874 | done | |
31875 | fi | |
31876 | gl_LIBOBJS=$gl_libobjs | |
31877 | ||
31878 | gl_LTLIBOBJS=$gl_ltlibobjs | |
31879 | ||
31880 | ||
31881 | ||
31882 | gltests_libobjs= | |
31883 | gltests_ltlibobjs= | |
31884 | if test -n "$gltests_LIBOBJS"; then | |
31885 | # Remove the extension. | |
31886 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
31887 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
31888 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
31889 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
31890 | done | |
31891 | fi | |
31892 | gltests_LIBOBJS=$gltests_libobjs | |
31893 | ||
31894 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
31895 | ||
31896 | ||
d0ac1c44 SM |
31897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 |
31898 | $as_echo_n "checking that generated files are newer than configure... " >&6; } | |
31899 | if test -n "$am_sleep_pid"; then | |
31900 | # Hide warnings about reused PIDs. | |
31901 | wait $am_sleep_pid 2>/dev/null | |
31902 | fi | |
31903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 | |
31904 | $as_echo "done" >&6; } | |
c971b7fa | 31905 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
d0ac1c44 | 31906 | as_fn_error $? "conditional \"AMDEP\" was never defined. |
c971b7fa PA |
31907 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31908 | fi | |
31909 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
d0ac1c44 | 31910 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. |
c971b7fa PA |
31911 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
31912 | fi | |
31913 | if test -n "$EXEEXT"; then | |
31914 | am__EXEEXT_TRUE= | |
31915 | am__EXEEXT_FALSE='#' | |
31916 | else | |
31917 | am__EXEEXT_TRUE='#' | |
31918 | am__EXEEXT_FALSE= | |
31919 | fi | |
31920 | ||
31921 | ||
d0ac1c44 | 31922 | : "${CONFIG_STATUS=./config.status}" |
c971b7fa PA |
31923 | ac_write_fail=0 |
31924 | ac_clean_files_save=$ac_clean_files | |
31925 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
31926 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
31927 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
31928 | as_write_fail=0 | |
31929 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
31930 | #! $SHELL | |
31931 | # Generated by $as_me. | |
31932 | # Run this file to recreate the current configuration. | |
31933 | # Compiler output produced by configure, useful for debugging | |
31934 | # configure, is in config.log if it exists. | |
31935 | ||
31936 | debug=false | |
31937 | ac_cs_recheck=false | |
31938 | ac_cs_silent=false | |
31939 | ||
31940 | SHELL=\${CONFIG_SHELL-$SHELL} | |
31941 | export SHELL | |
31942 | _ASEOF | |
31943 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
31944 | ## -------------------- ## | |
31945 | ## M4sh Initialization. ## | |
31946 | ## -------------------- ## | |
31947 | ||
31948 | # Be more Bourne compatible | |
31949 | DUALCASE=1; export DUALCASE # for MKS sh | |
31950 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
31951 | emulate sh | |
31952 | NULLCMD=: | |
31953 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
31954 | # is contrary to our usage. Disable this feature. | |
31955 | alias -g '${1+"$@"}'='"$@"' | |
31956 | setopt NO_GLOB_SUBST | |
31957 | else | |
31958 | case `(set -o) 2>/dev/null` in #( | |
31959 | *posix*) : | |
31960 | set -o posix ;; #( | |
31961 | *) : | |
31962 | ;; | |
31963 | esac | |
31964 | fi | |
31965 | ||
31966 | ||
31967 | as_nl=' | |
31968 | ' | |
31969 | export as_nl | |
31970 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
31971 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
31972 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
31973 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
31974 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
31975 | # but without wasting forks for bash or zsh. | |
31976 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
31977 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
31978 | as_echo='print -r --' | |
31979 | as_echo_n='print -rn --' | |
31980 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
31981 | as_echo='printf %s\n' | |
31982 | as_echo_n='printf %s' | |
31983 | else | |
31984 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
31985 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
31986 | as_echo_n='/usr/ucb/echo -n' | |
31987 | else | |
31988 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
31989 | as_echo_n_body='eval | |
31990 | arg=$1; | |
31991 | case $arg in #( | |
31992 | *"$as_nl"*) | |
31993 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
31994 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
31995 | esac; | |
31996 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
31997 | ' | |
31998 | export as_echo_n_body | |
31999 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
32000 | fi | |
32001 | export as_echo_body | |
32002 | as_echo='sh -c $as_echo_body as_echo' | |
32003 | fi | |
32004 | ||
32005 | # The user is always right. | |
32006 | if test "${PATH_SEPARATOR+set}" != set; then | |
32007 | PATH_SEPARATOR=: | |
32008 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
32009 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
32010 | PATH_SEPARATOR=';' | |
32011 | } | |
32012 | fi | |
32013 | ||
32014 | ||
32015 | # IFS | |
32016 | # We need space, tab and new line, in precisely that order. Quoting is | |
32017 | # there to prevent editors from complaining about space-tab. | |
32018 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
32019 | # splitting by setting IFS to empty value.) | |
32020 | IFS=" "" $as_nl" | |
32021 | ||
32022 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 32023 | as_myself= |
c971b7fa PA |
32024 | case $0 in #(( |
32025 | *[\\/]* ) as_myself=$0 ;; | |
32026 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
32027 | for as_dir in $PATH | |
32028 | do | |
32029 | IFS=$as_save_IFS | |
32030 | test -z "$as_dir" && as_dir=. | |
32031 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
32032 | done | |
32033 | IFS=$as_save_IFS | |
32034 | ||
32035 | ;; | |
32036 | esac | |
32037 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
32038 | # in which case we are not to be found in the path. | |
32039 | if test "x$as_myself" = x; then | |
32040 | as_myself=$0 | |
32041 | fi | |
32042 | if test ! -f "$as_myself"; then | |
32043 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
32044 | exit 1 | |
32045 | fi | |
32046 | ||
32047 | # Unset variables that we do not need and which cause bugs (e.g. in | |
32048 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
32049 | # suppresses any "Segmentation fault" message there. '((' could | |
32050 | # trigger a bug in pdksh 5.2.14. | |
32051 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
32052 | do eval test x\${$as_var+set} = xset \ | |
32053 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
32054 | done | |
32055 | PS1='$ ' | |
32056 | PS2='> ' | |
32057 | PS4='+ ' | |
32058 | ||
32059 | # NLS nuisances. | |
32060 | LC_ALL=C | |
32061 | export LC_ALL | |
32062 | LANGUAGE=C | |
32063 | export LANGUAGE | |
32064 | ||
32065 | # CDPATH. | |
32066 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
32067 | ||
32068 | ||
d0ac1c44 SM |
32069 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
32070 | # ---------------------------------------- | |
c971b7fa PA |
32071 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
32072 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 32073 | # script with STATUS, using 1 if that was 0. |
c971b7fa PA |
32074 | as_fn_error () |
32075 | { | |
d0ac1c44 SM |
32076 | as_status=$1; test $as_status -eq 0 && as_status=1 |
32077 | if test "$4"; then | |
32078 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
32079 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
c971b7fa | 32080 | fi |
d0ac1c44 | 32081 | $as_echo "$as_me: error: $2" >&2 |
c971b7fa PA |
32082 | as_fn_exit $as_status |
32083 | } # as_fn_error | |
32084 | ||
32085 | ||
32086 | # as_fn_set_status STATUS | |
32087 | # ----------------------- | |
32088 | # Set $? to STATUS, without forking. | |
32089 | as_fn_set_status () | |
32090 | { | |
32091 | return $1 | |
32092 | } # as_fn_set_status | |
32093 | ||
32094 | # as_fn_exit STATUS | |
32095 | # ----------------- | |
32096 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
32097 | as_fn_exit () | |
32098 | { | |
32099 | set +e | |
32100 | as_fn_set_status $1 | |
32101 | exit $1 | |
32102 | } # as_fn_exit | |
32103 | ||
32104 | # as_fn_unset VAR | |
32105 | # --------------- | |
32106 | # Portably unset VAR. | |
32107 | as_fn_unset () | |
32108 | { | |
32109 | { eval $1=; unset $1;} | |
32110 | } | |
32111 | as_unset=as_fn_unset | |
32112 | # as_fn_append VAR VALUE | |
32113 | # ---------------------- | |
32114 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
32115 | # advantage of any shell optimizations that allow amortized linear growth over | |
32116 | # repeated appends, instead of the typical quadratic growth present in naive | |
32117 | # implementations. | |
32118 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
32119 | eval 'as_fn_append () | |
32120 | { | |
32121 | eval $1+=\$2 | |
32122 | }' | |
32123 | else | |
32124 | as_fn_append () | |
32125 | { | |
32126 | eval $1=\$$1\$2 | |
32127 | } | |
32128 | fi # as_fn_append | |
32129 | ||
32130 | # as_fn_arith ARG... | |
32131 | # ------------------ | |
32132 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
32133 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
32134 | # must be portable across $(()) and expr. | |
32135 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
32136 | eval 'as_fn_arith () | |
32137 | { | |
32138 | as_val=$(( $* )) | |
32139 | }' | |
32140 | else | |
32141 | as_fn_arith () | |
32142 | { | |
32143 | as_val=`expr "$@" || test $? -eq 1` | |
32144 | } | |
32145 | fi # as_fn_arith | |
32146 | ||
32147 | ||
32148 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
32149 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
32150 | as_expr=expr | |
32151 | else | |
32152 | as_expr=false | |
32153 | fi | |
32154 | ||
32155 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
32156 | as_basename=basename | |
32157 | else | |
32158 | as_basename=false | |
32159 | fi | |
32160 | ||
32161 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
32162 | as_dirname=dirname | |
32163 | else | |
32164 | as_dirname=false | |
32165 | fi | |
32166 | ||
32167 | as_me=`$as_basename -- "$0" || | |
32168 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
32169 | X"$0" : 'X\(//\)$' \| \ | |
32170 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
32171 | $as_echo X/"$0" | | |
32172 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
32173 | s//\1/ | |
32174 | q | |
32175 | } | |
32176 | /^X\/\(\/\/\)$/{ | |
32177 | s//\1/ | |
32178 | q | |
32179 | } | |
32180 | /^X\/\(\/\).*/{ | |
32181 | s//\1/ | |
32182 | q | |
32183 | } | |
32184 | s/.*/./; q'` | |
32185 | ||
32186 | # Avoid depending upon Character Ranges. | |
32187 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
32188 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
32189 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
32190 | as_cr_digits='0123456789' | |
32191 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
32192 | ||
32193 | ECHO_C= ECHO_N= ECHO_T= | |
32194 | case `echo -n x` in #((((( | |
32195 | -n*) | |
32196 | case `echo 'xy\c'` in | |
32197 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
32198 | xy) ECHO_C='\c';; | |
32199 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
32200 | ECHO_T=' ';; | |
32201 | esac;; | |
32202 | *) | |
32203 | ECHO_N='-n';; | |
32204 | esac | |
32205 | ||
32206 | rm -f conf$$ conf$$.exe conf$$.file | |
32207 | if test -d conf$$.dir; then | |
32208 | rm -f conf$$.dir/conf$$.file | |
32209 | else | |
32210 | rm -f conf$$.dir | |
32211 | mkdir conf$$.dir 2>/dev/null | |
32212 | fi | |
32213 | if (echo >conf$$.file) 2>/dev/null; then | |
32214 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
32215 | as_ln_s='ln -s' | |
32216 | # ... but there are two gotchas: | |
32217 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
32218 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 32219 | # In both cases, we have to default to `cp -pR'. |
c971b7fa | 32220 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 32221 | as_ln_s='cp -pR' |
c971b7fa PA |
32222 | elif ln conf$$.file conf$$ 2>/dev/null; then |
32223 | as_ln_s=ln | |
32224 | else | |
d0ac1c44 | 32225 | as_ln_s='cp -pR' |
c971b7fa PA |
32226 | fi |
32227 | else | |
d0ac1c44 | 32228 | as_ln_s='cp -pR' |
c971b7fa PA |
32229 | fi |
32230 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
32231 | rmdir conf$$.dir 2>/dev/null | |
32232 | ||
32233 | ||
32234 | # as_fn_mkdir_p | |
32235 | # ------------- | |
32236 | # Create "$as_dir" as a directory, including parents if necessary. | |
32237 | as_fn_mkdir_p () | |
32238 | { | |
32239 | ||
32240 | case $as_dir in #( | |
32241 | -*) as_dir=./$as_dir;; | |
32242 | esac | |
32243 | test -d "$as_dir" || eval $as_mkdir_p || { | |
32244 | as_dirs= | |
32245 | while :; do | |
32246 | case $as_dir in #( | |
32247 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
32248 | *) as_qdir=$as_dir;; | |
32249 | esac | |
32250 | as_dirs="'$as_qdir' $as_dirs" | |
32251 | as_dir=`$as_dirname -- "$as_dir" || | |
32252 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32253 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
32254 | X"$as_dir" : 'X\(//\)$' \| \ | |
32255 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
32256 | $as_echo X"$as_dir" | | |
32257 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32258 | s//\1/ | |
32259 | q | |
32260 | } | |
32261 | /^X\(\/\/\)[^/].*/{ | |
32262 | s//\1/ | |
32263 | q | |
32264 | } | |
32265 | /^X\(\/\/\)$/{ | |
32266 | s//\1/ | |
32267 | q | |
32268 | } | |
32269 | /^X\(\/\).*/{ | |
32270 | s//\1/ | |
32271 | q | |
32272 | } | |
32273 | s/.*/./; q'` | |
32274 | test -d "$as_dir" && break | |
32275 | done | |
32276 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 32277 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
c971b7fa PA |
32278 | |
32279 | ||
32280 | } # as_fn_mkdir_p | |
32281 | if mkdir -p . 2>/dev/null; then | |
32282 | as_mkdir_p='mkdir -p "$as_dir"' | |
32283 | else | |
32284 | test -d ./-p && rmdir ./-p | |
32285 | as_mkdir_p=false | |
32286 | fi | |
32287 | ||
d0ac1c44 SM |
32288 | |
32289 | # as_fn_executable_p FILE | |
32290 | # ----------------------- | |
32291 | # Test if FILE is an executable regular file. | |
32292 | as_fn_executable_p () | |
32293 | { | |
32294 | test -f "$1" && test -x "$1" | |
32295 | } # as_fn_executable_p | |
32296 | as_test_x='test -x' | |
32297 | as_executable_p=as_fn_executable_p | |
c971b7fa PA |
32298 | |
32299 | # Sed expression to map a string onto a valid CPP name. | |
32300 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
32301 | ||
32302 | # Sed expression to map a string onto a valid variable name. | |
32303 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
32304 | ||
32305 | ||
32306 | exec 6>&1 | |
32307 | ## ----------------------------------- ## | |
32308 | ## Main body of $CONFIG_STATUS script. ## | |
32309 | ## ----------------------------------- ## | |
32310 | _ASEOF | |
32311 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
32312 | ||
32313 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32314 | # Save the log message, to keep $0 and so on meaningful, and to | |
32315 | # report actual input values of CONFIG_FILES etc. instead of their | |
32316 | # values after options handling. | |
32317 | ac_log=" | |
d0ac1c44 SM |
32318 | This file was extended by libgnu $as_me UNUSED-VERSION, which was |
32319 | generated by GNU Autoconf 2.69. Invocation command line was | |
c971b7fa PA |
32320 | |
32321 | CONFIG_FILES = $CONFIG_FILES | |
32322 | CONFIG_HEADERS = $CONFIG_HEADERS | |
32323 | CONFIG_LINKS = $CONFIG_LINKS | |
32324 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
32325 | $ $0 $@ | |
32326 | ||
32327 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
32328 | " | |
32329 | ||
32330 | _ACEOF | |
32331 | ||
32332 | case $ac_config_files in *" | |
32333 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
32334 | esac | |
32335 | ||
32336 | case $ac_config_headers in *" | |
32337 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
32338 | esac | |
32339 | ||
32340 | ||
32341 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32342 | # Files that config.status was made for. | |
32343 | config_files="$ac_config_files" | |
32344 | config_headers="$ac_config_headers" | |
32345 | config_commands="$ac_config_commands" | |
32346 | ||
32347 | _ACEOF | |
32348 | ||
32349 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32350 | ac_cs_usage="\ | |
32351 | \`$as_me' instantiates files and other configuration actions | |
32352 | from templates according to the current configuration. Unless the files | |
32353 | and actions are specified as TAGs, all are instantiated by default. | |
32354 | ||
32355 | Usage: $0 [OPTION]... [TAG]... | |
32356 | ||
32357 | -h, --help print this help, then exit | |
32358 | -V, --version print version number and configuration settings, then exit | |
d0ac1c44 | 32359 | --config print configuration, then exit |
c971b7fa PA |
32360 | -q, --quiet, --silent |
32361 | do not print progress messages | |
32362 | -d, --debug don't remove temporary files | |
32363 | --recheck update $as_me by reconfiguring in the same conditions | |
32364 | --file=FILE[:TEMPLATE] | |
32365 | instantiate the configuration file FILE | |
32366 | --header=FILE[:TEMPLATE] | |
32367 | instantiate the configuration header FILE | |
32368 | ||
32369 | Configuration files: | |
32370 | $config_files | |
32371 | ||
32372 | Configuration headers: | |
32373 | $config_headers | |
32374 | ||
32375 | Configuration commands: | |
32376 | $config_commands | |
32377 | ||
32378 | Report bugs to the package provider." | |
32379 | ||
32380 | _ACEOF | |
32381 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 32382 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
c971b7fa | 32383 | ac_cs_version="\\ |
d0ac1c44 SM |
32384 | libgnu config.status UNUSED-VERSION |
32385 | configured by $0, generated by GNU Autoconf 2.69, | |
32386 | with options \\"\$ac_cs_config\\" | |
c971b7fa | 32387 | |
d0ac1c44 | 32388 | Copyright (C) 2012 Free Software Foundation, Inc. |
c971b7fa PA |
32389 | This config.status script is free software; the Free Software Foundation |
32390 | gives unlimited permission to copy, distribute and modify it." | |
32391 | ||
32392 | ac_pwd='$ac_pwd' | |
32393 | srcdir='$srcdir' | |
32394 | INSTALL='$INSTALL' | |
32395 | MKDIR_P='$MKDIR_P' | |
32396 | AWK='$AWK' | |
32397 | test -n "\$AWK" || AWK=awk | |
32398 | _ACEOF | |
32399 | ||
32400 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32401 | # The default lists apply if the user does not specify any file. | |
32402 | ac_need_defaults=: | |
32403 | while test $# != 0 | |
32404 | do | |
32405 | case $1 in | |
d0ac1c44 | 32406 | --*=?*) |
c971b7fa PA |
32407 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
32408 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
32409 | ac_shift=: | |
32410 | ;; | |
d0ac1c44 SM |
32411 | --*=) |
32412 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
32413 | ac_optarg= | |
32414 | ac_shift=: | |
32415 | ;; | |
c971b7fa PA |
32416 | *) |
32417 | ac_option=$1 | |
32418 | ac_optarg=$2 | |
32419 | ac_shift=shift | |
32420 | ;; | |
32421 | esac | |
32422 | ||
32423 | case $ac_option in | |
32424 | # Handling of the options. | |
32425 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
32426 | ac_cs_recheck=: ;; | |
32427 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
32428 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
32429 | --config | --confi | --conf | --con | --co | --c ) |
32430 | $as_echo "$ac_cs_config"; exit ;; | |
c971b7fa PA |
32431 | --debug | --debu | --deb | --de | --d | -d ) |
32432 | debug=: ;; | |
32433 | --file | --fil | --fi | --f ) | |
32434 | $ac_shift | |
32435 | case $ac_optarg in | |
32436 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 32437 | '') as_fn_error $? "missing file argument" ;; |
c971b7fa PA |
32438 | esac |
32439 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
32440 | ac_need_defaults=false;; | |
32441 | --header | --heade | --head | --hea ) | |
32442 | $ac_shift | |
32443 | case $ac_optarg in | |
32444 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
32445 | esac | |
32446 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
32447 | ac_need_defaults=false;; | |
32448 | --he | --h) | |
32449 | # Conflict between --help and --header | |
d0ac1c44 | 32450 | as_fn_error $? "ambiguous option: \`$1' |
c971b7fa PA |
32451 | Try \`$0 --help' for more information.";; |
32452 | --help | --hel | -h ) | |
32453 | $as_echo "$ac_cs_usage"; exit ;; | |
32454 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
32455 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
32456 | ac_cs_silent=: ;; | |
32457 | ||
32458 | # This is an error. | |
d0ac1c44 | 32459 | -*) as_fn_error $? "unrecognized option: \`$1' |
c971b7fa PA |
32460 | Try \`$0 --help' for more information." ;; |
32461 | ||
32462 | *) as_fn_append ac_config_targets " $1" | |
32463 | ac_need_defaults=false ;; | |
32464 | ||
32465 | esac | |
32466 | shift | |
32467 | done | |
32468 | ||
32469 | ac_configure_extra_args= | |
32470 | ||
32471 | if $ac_cs_silent; then | |
32472 | exec 6>/dev/null | |
32473 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
32474 | fi | |
32475 | ||
32476 | _ACEOF | |
32477 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32478 | if \$ac_cs_recheck; then | |
d0ac1c44 | 32479 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
c971b7fa PA |
32480 | shift |
32481 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
32482 | CONFIG_SHELL='$SHELL' | |
32483 | export CONFIG_SHELL | |
32484 | exec "\$@" | |
32485 | fi | |
32486 | ||
32487 | _ACEOF | |
32488 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32489 | exec 5>>config.log | |
32490 | { | |
32491 | echo | |
32492 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
32493 | ## Running $as_me. ## | |
32494 | _ASBOX | |
32495 | $as_echo "$ac_log" | |
32496 | } >&5 | |
32497 | ||
32498 | _ACEOF | |
32499 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32500 | # | |
32501 | # INIT-COMMANDS | |
32502 | # | |
32503 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | |
32504 | ||
32505 | _ACEOF | |
32506 | ||
32507 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32508 | ||
32509 | # Handling of arguments. | |
32510 | for ac_config_target in $ac_config_targets | |
32511 | do | |
32512 | case $ac_config_target in | |
32513 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
32514 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
361cb219 | 32515 | "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;; |
c971b7fa PA |
32516 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
32517 | "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;; | |
32518 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
32519 | ||
d0ac1c44 | 32520 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c971b7fa PA |
32521 | esac |
32522 | done | |
32523 | ||
32524 | ||
32525 | # If the user did not use the arguments to specify the items to instantiate, | |
32526 | # then the envvar interface is used. Set only those that are not. | |
32527 | # We use the long form for the default assignment because of an extremely | |
32528 | # bizarre bug on SunOS 4.1.3. | |
32529 | if $ac_need_defaults; then | |
32530 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
32531 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
32532 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
32533 | fi | |
32534 | ||
32535 | # Have a temporary directory for convenience. Make it in the build tree | |
32536 | # simply because there is no reason against having it here, and in addition, | |
32537 | # creating and moving files from /tmp can sometimes cause problems. | |
32538 | # Hook for its removal unless debugging. | |
32539 | # Note that there is a small window in which the directory will not be cleaned: | |
32540 | # after its creation but before its name has been assigned to `$tmp'. | |
32541 | $debug || | |
32542 | { | |
d0ac1c44 | 32543 | tmp= ac_tmp= |
c971b7fa | 32544 | trap 'exit_status=$? |
d0ac1c44 SM |
32545 | : "${ac_tmp:=$tmp}" |
32546 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
c971b7fa PA |
32547 | ' 0 |
32548 | trap 'as_fn_exit 1' 1 2 13 15 | |
32549 | } | |
32550 | # Create a (secure) tmp directory for tmp files. | |
32551 | ||
32552 | { | |
32553 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 32554 | test -d "$tmp" |
c971b7fa PA |
32555 | } || |
32556 | { | |
32557 | tmp=./conf$$-$RANDOM | |
32558 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
32559 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
32560 | ac_tmp=$tmp | |
c971b7fa PA |
32561 | |
32562 | # Set up the scripts for CONFIG_FILES section. | |
32563 | # No need to generate them if there are no CONFIG_FILES. | |
32564 | # This happens for instance with `./config.status config.h'. | |
32565 | if test -n "$CONFIG_FILES"; then | |
32566 | ||
32567 | ||
32568 | ac_cr=`echo X | tr X '\015'` | |
32569 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
32570 | # But we know of no other shell where ac_cr would be empty at this | |
32571 | # point, so we can use a bashism as a fallback. | |
32572 | if test "x$ac_cr" = x; then | |
32573 | eval ac_cr=\$\'\\r\' | |
32574 | fi | |
32575 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
32576 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 32577 | ac_cs_awk_cr='\\r' |
c971b7fa PA |
32578 | else |
32579 | ac_cs_awk_cr=$ac_cr | |
32580 | fi | |
32581 | ||
d0ac1c44 | 32582 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
c971b7fa PA |
32583 | _ACEOF |
32584 | ||
32585 | ||
32586 | { | |
32587 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
32588 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
32589 | echo "_ACEOF" | |
32590 | } >conf$$subs.sh || | |
d0ac1c44 SM |
32591 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
32592 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
c971b7fa PA |
32593 | ac_delim='%!_!# ' |
32594 | for ac_last_try in false false false false false :; do | |
32595 | . ./conf$$subs.sh || | |
d0ac1c44 | 32596 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
32597 | |
32598 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
32599 | if test $ac_delim_n = $ac_delim_num; then | |
32600 | break | |
32601 | elif $ac_last_try; then | |
d0ac1c44 | 32602 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
32603 | else |
32604 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
32605 | fi | |
32606 | done | |
32607 | rm -f conf$$subs.sh | |
32608 | ||
32609 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 32610 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
c971b7fa PA |
32611 | _ACEOF |
32612 | sed -n ' | |
32613 | h | |
32614 | s/^/S["/; s/!.*/"]=/ | |
32615 | p | |
32616 | g | |
32617 | s/^[^!]*!// | |
32618 | :repl | |
32619 | t repl | |
32620 | s/'"$ac_delim"'$// | |
32621 | t delim | |
32622 | :nl | |
32623 | h | |
d0ac1c44 | 32624 | s/\(.\{148\}\)..*/\1/ |
c971b7fa PA |
32625 | t more1 |
32626 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
32627 | p | |
32628 | n | |
32629 | b repl | |
32630 | :more1 | |
32631 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
32632 | p | |
32633 | g | |
32634 | s/.\{148\}// | |
32635 | t nl | |
32636 | :delim | |
32637 | h | |
d0ac1c44 | 32638 | s/\(.\{148\}\)..*/\1/ |
c971b7fa PA |
32639 | t more2 |
32640 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
32641 | p | |
32642 | b | |
32643 | :more2 | |
32644 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
32645 | p | |
32646 | g | |
32647 | s/.\{148\}// | |
32648 | t delim | |
32649 | ' <conf$$subs.awk | sed ' | |
32650 | /^[^""]/{ | |
32651 | N | |
32652 | s/\n// | |
32653 | } | |
32654 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
32655 | rm -f conf$$subs.awk | |
32656 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32657 | _ACAWK | |
d0ac1c44 | 32658 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
c971b7fa PA |
32659 | for (key in S) S_is_set[key] = 1 |
32660 | FS = "\a" | |
32661 | ||
32662 | } | |
32663 | { | |
32664 | line = $ 0 | |
32665 | nfields = split(line, field, "@") | |
32666 | substed = 0 | |
32667 | len = length(field[1]) | |
32668 | for (i = 2; i < nfields; i++) { | |
32669 | key = field[i] | |
32670 | keylen = length(key) | |
32671 | if (S_is_set[key]) { | |
32672 | value = S[key] | |
32673 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
32674 | len += length(value) + length(field[++i]) | |
32675 | substed = 1 | |
32676 | } else | |
32677 | len += 1 + keylen | |
32678 | } | |
32679 | ||
32680 | print line | |
32681 | } | |
32682 | ||
32683 | _ACAWK | |
32684 | _ACEOF | |
32685 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32686 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
32687 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
32688 | else | |
32689 | cat | |
d0ac1c44 SM |
32690 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
32691 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
c971b7fa PA |
32692 | _ACEOF |
32693 | ||
d0ac1c44 SM |
32694 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
32695 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
c971b7fa PA |
32696 | # trailing colons and then remove the whole line if VPATH becomes empty |
32697 | # (actually we leave an empty line to preserve line numbers). | |
32698 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
32699 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
32700 | h | |
32701 | s/// | |
32702 | s/^/:/ | |
32703 | s/[ ]*$/:/ | |
32704 | s/:\$(srcdir):/:/g | |
32705 | s/:\${srcdir}:/:/g | |
32706 | s/:@srcdir@:/:/g | |
32707 | s/^:*// | |
c971b7fa | 32708 | s/:*$// |
d0ac1c44 SM |
32709 | x |
32710 | s/\(=[ ]*\).*/\1/ | |
32711 | G | |
32712 | s/\n// | |
c971b7fa PA |
32713 | s/^[^=]*=[ ]*$// |
32714 | }' | |
32715 | fi | |
32716 | ||
32717 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32718 | fi # test -n "$CONFIG_FILES" | |
32719 | ||
32720 | # Set up the scripts for CONFIG_HEADERS section. | |
32721 | # No need to generate them if there are no CONFIG_HEADERS. | |
32722 | # This happens for instance with `./config.status Makefile'. | |
32723 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 32724 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
c971b7fa PA |
32725 | BEGIN { |
32726 | _ACEOF | |
32727 | ||
32728 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
32729 | # here-document in config.status, that substitutes the proper values into | |
32730 | # config.h.in to produce config.h. | |
32731 | ||
32732 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
32733 | # handling of long lines. | |
32734 | ac_delim='%!_!# ' | |
32735 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
32736 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
32737 | if test -z "$ac_tt"; then | |
c971b7fa PA |
32738 | break |
32739 | elif $ac_last_try; then | |
d0ac1c44 | 32740 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
c971b7fa PA |
32741 | else |
32742 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
32743 | fi | |
32744 | done | |
32745 | ||
32746 | # For the awk script, D is an array of macro values keyed by name, | |
32747 | # likewise P contains macro parameters if any. Preserve backslash | |
32748 | # newline sequences. | |
32749 | ||
32750 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
32751 | sed -n ' | |
32752 | s/.\{148\}/&'"$ac_delim"'/g | |
32753 | t rset | |
32754 | :rset | |
32755 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
32756 | t def | |
32757 | d | |
32758 | :def | |
32759 | s/\\$// | |
32760 | t bsnl | |
32761 | s/["\\]/\\&/g | |
32762 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
32763 | D["\1"]=" \3"/p | |
32764 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
32765 | d | |
32766 | :bsnl | |
32767 | s/["\\]/\\&/g | |
32768 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
32769 | D["\1"]=" \3\\\\\\n"\\/p | |
32770 | t cont | |
32771 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
32772 | t cont | |
32773 | d | |
32774 | :cont | |
32775 | n | |
32776 | s/.\{148\}/&'"$ac_delim"'/g | |
32777 | t clear | |
32778 | :clear | |
32779 | s/\\$// | |
32780 | t bsnlc | |
32781 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
32782 | d | |
32783 | :bsnlc | |
32784 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
32785 | b cont | |
32786 | ' <confdefs.h | sed ' | |
32787 | s/'"$ac_delim"'/"\\\ | |
32788 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
32789 | ||
32790 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32791 | for (key in D) D_is_set[key] = 1 | |
32792 | FS = "\a" | |
32793 | } | |
32794 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
32795 | line = \$ 0 | |
32796 | split(line, arg, " ") | |
32797 | if (arg[1] == "#") { | |
32798 | defundef = arg[2] | |
32799 | mac1 = arg[3] | |
32800 | } else { | |
32801 | defundef = substr(arg[1], 2) | |
32802 | mac1 = arg[2] | |
32803 | } | |
32804 | split(mac1, mac2, "(") #) | |
32805 | macro = mac2[1] | |
32806 | prefix = substr(line, 1, index(line, defundef) - 1) | |
32807 | if (D_is_set[macro]) { | |
32808 | # Preserve the white space surrounding the "#". | |
32809 | print prefix "define", macro P[macro] D[macro] | |
32810 | next | |
32811 | } else { | |
32812 | # Replace #undef with comments. This is necessary, for example, | |
32813 | # in the case of _POSIX_SOURCE, which is predefined and required | |
32814 | # on some systems where configure will not decide to define it. | |
32815 | if (defundef == "undef") { | |
32816 | print "/*", prefix defundef, macro, "*/" | |
32817 | next | |
32818 | } | |
32819 | } | |
32820 | } | |
32821 | { print } | |
32822 | _ACAWK | |
32823 | _ACEOF | |
32824 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 32825 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
c971b7fa PA |
32826 | fi # test -n "$CONFIG_HEADERS" |
32827 | ||
32828 | ||
32829 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
32830 | shift | |
32831 | for ac_tag | |
32832 | do | |
32833 | case $ac_tag in | |
32834 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
32835 | esac | |
32836 | case $ac_mode$ac_tag in | |
32837 | :[FHL]*:*);; | |
d0ac1c44 | 32838 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
c971b7fa PA |
32839 | :[FH]-) ac_tag=-:-;; |
32840 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
32841 | esac | |
32842 | ac_save_IFS=$IFS | |
32843 | IFS=: | |
32844 | set x $ac_tag | |
32845 | IFS=$ac_save_IFS | |
32846 | shift | |
32847 | ac_file=$1 | |
32848 | shift | |
32849 | ||
32850 | case $ac_mode in | |
32851 | :L) ac_source=$1;; | |
32852 | :[FH]) | |
32853 | ac_file_inputs= | |
32854 | for ac_f | |
32855 | do | |
32856 | case $ac_f in | |
d0ac1c44 | 32857 | -) ac_f="$ac_tmp/stdin";; |
c971b7fa PA |
32858 | *) # Look for the file first in the build tree, then in the source tree |
32859 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
32860 | # because $ac_f cannot contain `:'. | |
32861 | test -f "$ac_f" || | |
32862 | case $ac_f in | |
32863 | [\\/$]*) false;; | |
32864 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
32865 | esac || | |
d0ac1c44 | 32866 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
c971b7fa PA |
32867 | esac |
32868 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
32869 | as_fn_append ac_file_inputs " '$ac_f'" | |
32870 | done | |
32871 | ||
32872 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
32873 | # use $as_me), people would be surprised to read: | |
32874 | # /* config.h. Generated by config.status. */ | |
32875 | configure_input='Generated from '` | |
32876 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
32877 | `' by configure.' | |
32878 | if test x"$ac_file" != x-; then | |
32879 | configure_input="$ac_file. $configure_input" | |
32880 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
32881 | $as_echo "$as_me: creating $ac_file" >&6;} | |
32882 | fi | |
32883 | # Neutralize special characters interpreted by sed in replacement strings. | |
32884 | case $configure_input in #( | |
32885 | *\&* | *\|* | *\\* ) | |
32886 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
32887 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
32888 | *) ac_sed_conf_input=$configure_input;; | |
32889 | esac | |
32890 | ||
32891 | case $ac_tag in | |
d0ac1c44 SM |
32892 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
32893 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
c971b7fa PA |
32894 | esac |
32895 | ;; | |
32896 | esac | |
32897 | ||
32898 | ac_dir=`$as_dirname -- "$ac_file" || | |
32899 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
32900 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
32901 | X"$ac_file" : 'X\(//\)$' \| \ | |
32902 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
32903 | $as_echo X"$ac_file" | | |
32904 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
32905 | s//\1/ | |
32906 | q | |
32907 | } | |
32908 | /^X\(\/\/\)[^/].*/{ | |
32909 | s//\1/ | |
32910 | q | |
32911 | } | |
32912 | /^X\(\/\/\)$/{ | |
32913 | s//\1/ | |
32914 | q | |
32915 | } | |
32916 | /^X\(\/\).*/{ | |
32917 | s//\1/ | |
32918 | q | |
32919 | } | |
32920 | s/.*/./; q'` | |
32921 | as_dir="$ac_dir"; as_fn_mkdir_p | |
32922 | ac_builddir=. | |
32923 | ||
32924 | case "$ac_dir" in | |
32925 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
32926 | *) | |
32927 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
32928 | # A ".." for each directory in $ac_dir_suffix. | |
32929 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
32930 | case $ac_top_builddir_sub in | |
32931 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
32932 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
32933 | esac ;; | |
32934 | esac | |
32935 | ac_abs_top_builddir=$ac_pwd | |
32936 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
32937 | # for backward compatibility: | |
32938 | ac_top_builddir=$ac_top_build_prefix | |
32939 | ||
32940 | case $srcdir in | |
32941 | .) # We are building in place. | |
32942 | ac_srcdir=. | |
32943 | ac_top_srcdir=$ac_top_builddir_sub | |
32944 | ac_abs_top_srcdir=$ac_pwd ;; | |
32945 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
32946 | ac_srcdir=$srcdir$ac_dir_suffix; | |
32947 | ac_top_srcdir=$srcdir | |
32948 | ac_abs_top_srcdir=$srcdir ;; | |
32949 | *) # Relative name. | |
32950 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
32951 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
32952 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
32953 | esac | |
32954 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
32955 | ||
32956 | ||
32957 | case $ac_mode in | |
32958 | :F) | |
32959 | # | |
32960 | # CONFIG_FILE | |
32961 | # | |
32962 | ||
32963 | case $INSTALL in | |
32964 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
32965 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
32966 | esac | |
32967 | ac_MKDIR_P=$MKDIR_P | |
32968 | case $MKDIR_P in | |
32969 | [\\/$]* | ?:[\\/]* ) ;; | |
32970 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
32971 | esac | |
32972 | _ACEOF | |
32973 | ||
32974 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
32975 | # If the template does not know about datarootdir, expand it. | |
32976 | # FIXME: This hack should be removed a few years after 2.60. | |
32977 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
32978 | ac_sed_dataroot=' | |
32979 | /datarootdir/ { | |
32980 | p | |
32981 | q | |
32982 | } | |
32983 | /@datadir@/p | |
32984 | /@docdir@/p | |
32985 | /@infodir@/p | |
32986 | /@localedir@/p | |
32987 | /@mandir@/p' | |
32988 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
32989 | *datarootdir*) ac_datarootdir_seen=yes;; | |
32990 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
32991 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
32992 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
32993 | _ACEOF | |
32994 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
32995 | ac_datarootdir_hack=' | |
32996 | s&@datadir@&$datadir&g | |
32997 | s&@docdir@&$docdir&g | |
32998 | s&@infodir@&$infodir&g | |
32999 | s&@localedir@&$localedir&g | |
33000 | s&@mandir@&$mandir&g | |
33001 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
33002 | esac | |
33003 | _ACEOF | |
33004 | ||
33005 | # Neutralize VPATH when `$srcdir' = `.'. | |
33006 | # Shell code in configure.ac might set extrasub. | |
33007 | # FIXME: do we really want to maintain this feature? | |
33008 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
33009 | ac_sed_extra="$ac_vpsub | |
33010 | $extrasub | |
33011 | _ACEOF | |
33012 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
33013 | :t | |
33014 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
33015 | s|@configure_input@|$ac_sed_conf_input|;t t | |
33016 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
33017 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
33018 | s&@srcdir@&$ac_srcdir&;t t | |
33019 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
33020 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
33021 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
33022 | s&@builddir@&$ac_builddir&;t t | |
33023 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
33024 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
33025 | s&@INSTALL@&$ac_INSTALL&;t t | |
33026 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
33027 | $ac_datarootdir_hack | |
33028 | " | |
d0ac1c44 SM |
33029 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
33030 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
c971b7fa PA |
33031 | |
33032 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
33033 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
33034 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
33035 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
c971b7fa | 33036 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 33037 | which seems to be undefined. Please make sure it is defined" >&5 |
c971b7fa | 33038 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 33039 | which seems to be undefined. Please make sure it is defined" >&2;} |
c971b7fa | 33040 | |
d0ac1c44 | 33041 | rm -f "$ac_tmp/stdin" |
c971b7fa | 33042 | case $ac_file in |
d0ac1c44 SM |
33043 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
33044 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
c971b7fa | 33045 | esac \ |
d0ac1c44 | 33046 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
c971b7fa PA |
33047 | ;; |
33048 | :H) | |
33049 | # | |
33050 | # CONFIG_HEADER | |
33051 | # | |
33052 | if test x"$ac_file" != x-; then | |
33053 | { | |
33054 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
33055 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
33056 | } >"$ac_tmp/config.h" \ | |
33057 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
33058 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
c971b7fa PA |
33059 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
33060 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
33061 | else | |
33062 | rm -f "$ac_file" | |
d0ac1c44 SM |
33063 | mv "$ac_tmp/config.h" "$ac_file" \ |
33064 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
c971b7fa PA |
33065 | fi |
33066 | else | |
33067 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
33068 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
33069 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
c971b7fa PA |
33070 | fi |
33071 | # Compute "$ac_file"'s index in $config_headers. | |
33072 | _am_arg="$ac_file" | |
33073 | _am_stamp_count=1 | |
33074 | for _am_header in $config_headers :; do | |
33075 | case $_am_header in | |
33076 | $_am_arg | $_am_arg:* ) | |
33077 | break ;; | |
33078 | * ) | |
33079 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
33080 | esac | |
33081 | done | |
33082 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
33083 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
33084 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
33085 | X"$_am_arg" : 'X\(//\)$' \| \ | |
33086 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
33087 | $as_echo X"$_am_arg" | | |
33088 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
33089 | s//\1/ | |
33090 | q | |
33091 | } | |
33092 | /^X\(\/\/\)[^/].*/{ | |
33093 | s//\1/ | |
33094 | q | |
33095 | } | |
33096 | /^X\(\/\/\)$/{ | |
33097 | s//\1/ | |
33098 | q | |
33099 | } | |
33100 | /^X\(\/\).*/{ | |
33101 | s//\1/ | |
33102 | q | |
33103 | } | |
33104 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
33105 | ;; | |
33106 | ||
33107 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
33108 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
33109 | ;; | |
33110 | esac | |
33111 | ||
33112 | ||
33113 | case $ac_file$ac_mode in | |
33114 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
d0ac1c44 | 33115 | # Older Autoconf quotes --file arguments for eval, but not when files |
c971b7fa PA |
33116 | # are listed without --file. Let's play safe and only enable the eval |
33117 | # if we detect the quoting. | |
33118 | case $CONFIG_FILES in | |
33119 | *\'*) eval set x "$CONFIG_FILES" ;; | |
33120 | *) set x $CONFIG_FILES ;; | |
33121 | esac | |
33122 | shift | |
33123 | for mf | |
33124 | do | |
33125 | # Strip MF so we end up with the name of the file. | |
33126 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
33127 | # Check whether this is an Automake generated Makefile or not. | |
d0ac1c44 | 33128 | # We used to match only the files named 'Makefile.in', but |
c971b7fa PA |
33129 | # some people rename them; so instead we look at the file content. |
33130 | # Grep'ing the first line is not enough: some people post-process | |
33131 | # each Makefile.in and add a new line on top of each file to say so. | |
33132 | # Grep'ing the whole file is not good either: AIX grep has a line | |
33133 | # limit of 2048, but all sed's we know have understand at least 4000. | |
33134 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
33135 | dirpart=`$as_dirname -- "$mf" || | |
33136 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
33137 | X"$mf" : 'X\(//\)[^/]' \| \ | |
33138 | X"$mf" : 'X\(//\)$' \| \ | |
33139 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
33140 | $as_echo X"$mf" | | |
33141 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
33142 | s//\1/ | |
33143 | q | |
33144 | } | |
33145 | /^X\(\/\/\)[^/].*/{ | |
33146 | s//\1/ | |
33147 | q | |
33148 | } | |
33149 | /^X\(\/\/\)$/{ | |
33150 | s//\1/ | |
33151 | q | |
33152 | } | |
33153 | /^X\(\/\).*/{ | |
33154 | s//\1/ | |
33155 | q | |
33156 | } | |
33157 | s/.*/./; q'` | |
33158 | else | |
33159 | continue | |
33160 | fi | |
33161 | # Extract the definition of DEPDIR, am__include, and am__quote | |
d0ac1c44 | 33162 | # from the Makefile without running 'make'. |
c971b7fa PA |
33163 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
33164 | test -z "$DEPDIR" && continue | |
33165 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
d0ac1c44 | 33166 | test -z "$am__include" && continue |
c971b7fa | 33167 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
c971b7fa PA |
33168 | # Find all dependency output files, they are included files with |
33169 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
33170 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
33171 | # expansion. | |
33172 | for file in `sed -n " | |
33173 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
d0ac1c44 | 33174 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do |
c971b7fa PA |
33175 | # Make sure the directory exists. |
33176 | test -f "$dirpart/$file" && continue | |
33177 | fdir=`$as_dirname -- "$file" || | |
33178 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
33179 | X"$file" : 'X\(//\)[^/]' \| \ | |
33180 | X"$file" : 'X\(//\)$' \| \ | |
33181 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
33182 | $as_echo X"$file" | | |
33183 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
33184 | s//\1/ | |
33185 | q | |
33186 | } | |
33187 | /^X\(\/\/\)[^/].*/{ | |
33188 | s//\1/ | |
33189 | q | |
33190 | } | |
33191 | /^X\(\/\/\)$/{ | |
33192 | s//\1/ | |
33193 | q | |
33194 | } | |
33195 | /^X\(\/\).*/{ | |
33196 | s//\1/ | |
33197 | q | |
33198 | } | |
33199 | s/.*/./; q'` | |
33200 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
33201 | # echo "creating $dirpart/$file" | |
33202 | echo '# dummy' > "$dirpart/$file" | |
33203 | done | |
33204 | done | |
33205 | } | |
33206 | ;; | |
33207 | "default":C) | |
33208 | case x$CONFIG_HEADERS in | |
33209 | xconfig.h:config.in) | |
33210 | echo > stamp-h ;; | |
33211 | esac | |
33212 | ;; | |
33213 | ||
33214 | esac | |
33215 | done # for ac_tag | |
33216 | ||
33217 | ||
33218 | as_fn_exit 0 | |
33219 | _ACEOF | |
33220 | ac_clean_files=$ac_clean_files_save | |
33221 | ||
33222 | test $ac_write_fail = 0 || | |
d0ac1c44 | 33223 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
c971b7fa PA |
33224 | |
33225 | ||
33226 | # configure is writing to config.log, and then calls config.status. | |
33227 | # config.status does its own redirection, appending to config.log. | |
33228 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
33229 | # by configure, so config.status won't be able to write to it; its | |
33230 | # output is simply discarded. So we exec the FD to /dev/null, | |
33231 | # effectively closing config.log, so it can be properly (re)opened and | |
33232 | # appended to by config.status. When coming back to configure, we | |
33233 | # need to make the FD available again. | |
33234 | if test "$no_create" != yes; then | |
33235 | ac_cs_success=: | |
33236 | ac_config_status_args= | |
33237 | test "$silent" = yes && | |
33238 | ac_config_status_args="$ac_config_status_args --quiet" | |
33239 | exec 5>/dev/null | |
33240 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
33241 | exec 5>>config.log | |
33242 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
33243 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 33244 | $ac_cs_success || as_fn_exit 1 |
c971b7fa PA |
33245 | fi |
33246 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
33247 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
33248 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
33249 | fi | |
33250 | ||
33251 | ||
33252 | exit 0 |