Commit | Line | Data |
---|---|---|
067d23c9 KY |
1 | #! /bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
c574bc34 | 3 | # Generated by GNU Autoconf 2.65 for emacs 24.3.50. |
067d23c9 KY |
4 | # |
5 | # | |
6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
a9bec17c GM |
7 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
8 | # Inc. | |
067d23c9 KY |
9 | # |
10 | # | |
11 | # This configure script is free software; the Free Software Foundation | |
12 | # gives unlimited permission to copy, distribute and modify it. | |
13 | ## -------------------- ## | |
14 | ## M4sh Initialization. ## | |
15 | ## -------------------- ## | |
16 | ||
17 | # Be more Bourne compatible | |
18 | DUALCASE=1; export DUALCASE # for MKS sh | |
19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
20 | emulate sh | |
21 | NULLCMD=: | |
22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
23 | # is contrary to our usage. Disable this feature. | |
24 | alias -g '${1+"$@"}'='"$@"' | |
25 | setopt NO_GLOB_SUBST | |
26 | else | |
27 | case `(set -o) 2>/dev/null` in #( | |
28 | *posix*) : | |
29 | set -o posix ;; #( | |
30 | *) : | |
31 | ;; | |
32 | esac | |
33 | fi | |
34 | ||
35 | ||
36 | as_nl=' | |
37 | ' | |
38 | export as_nl | |
39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
44 | # but without wasting forks for bash or zsh. | |
45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
47 | as_echo='print -r --' | |
48 | as_echo_n='print -rn --' | |
49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
50 | as_echo='printf %s\n' | |
51 | as_echo_n='printf %s' | |
52 | else | |
53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
55 | as_echo_n='/usr/ucb/echo -n' | |
56 | else | |
57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
58 | as_echo_n_body='eval | |
59 | arg=$1; | |
60 | case $arg in #( | |
61 | *"$as_nl"*) | |
62 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
64 | esac; | |
65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
66 | ' | |
67 | export as_echo_n_body | |
68 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
69 | fi | |
70 | export as_echo_body | |
71 | as_echo='sh -c $as_echo_body as_echo' | |
72 | fi | |
73 | ||
74 | # The user is always right. | |
75 | if test "${PATH_SEPARATOR+set}" != set; then | |
76 | PATH_SEPARATOR=: | |
77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
79 | PATH_SEPARATOR=';' | |
80 | } | |
81 | fi | |
82 | ||
83 | ||
84 | # IFS | |
85 | # We need space, tab and new line, in precisely that order. Quoting is | |
86 | # there to prevent editors from complaining about space-tab. | |
87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
88 | # splitting by setting IFS to empty value.) | |
89 | IFS=" "" $as_nl" | |
90 | ||
91 | # Find who we are. Look in the path if we contain no directory separator. | |
92 | case $0 in #(( | |
93 | *[\\/]* ) as_myself=$0 ;; | |
94 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
95 | for as_dir in $PATH | |
96 | do | |
97 | IFS=$as_save_IFS | |
98 | test -z "$as_dir" && as_dir=. | |
99 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
100 | done | |
101 | IFS=$as_save_IFS | |
102 | ||
103 | ;; | |
104 | esac | |
105 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
106 | # in which case we are not to be found in the path. | |
107 | if test "x$as_myself" = x; then | |
108 | as_myself=$0 | |
109 | fi | |
110 | if test ! -f "$as_myself"; then | |
111 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
112 | exit 1 | |
113 | fi | |
114 | ||
115 | # Unset variables that we do not need and which cause bugs (e.g. in | |
116 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
117 | # suppresses any "Segmentation fault" message there. '((' could | |
118 | # trigger a bug in pdksh 5.2.14. | |
119 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
120 | do eval test x\${$as_var+set} = xset \ | |
121 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
122 | done | |
123 | PS1='$ ' | |
124 | PS2='> ' | |
125 | PS4='+ ' | |
126 | ||
127 | # NLS nuisances. | |
128 | LC_ALL=C | |
129 | export LC_ALL | |
130 | LANGUAGE=C | |
131 | export LANGUAGE | |
132 | ||
133 | # CDPATH. | |
134 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
135 | ||
136 | if test "x$CONFIG_SHELL" = x; then | |
137 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
138 | emulate sh | |
139 | NULLCMD=: | |
140 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
141 | # is contrary to our usage. Disable this feature. | |
142 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
143 | setopt NO_GLOB_SUBST | |
144 | else | |
145 | case \`(set -o) 2>/dev/null\` in #( | |
146 | *posix*) : | |
147 | set -o posix ;; #( | |
148 | *) : | |
149 | ;; | |
150 | esac | |
151 | fi | |
152 | " | |
153 | as_required="as_fn_return () { (exit \$1); } | |
154 | as_fn_success () { as_fn_return 0; } | |
155 | as_fn_failure () { as_fn_return 1; } | |
156 | as_fn_ret_success () { return 0; } | |
157 | as_fn_ret_failure () { return 1; } | |
158 | ||
159 | exitcode=0 | |
160 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
161 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
162 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
163 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
164 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
165 | ||
166 | else | |
167 | exitcode=1; echo positional parameters were not saved. | |
168 | fi | |
169 | test x\$exitcode = x0 || exit 1" | |
170 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
171 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
172 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
173 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
174 | test \$(( 1 + 1 )) = 2 || exit 1" | |
175 | if (eval "$as_required") 2>/dev/null; then : | |
176 | as_have_required=yes | |
177 | else | |
178 | as_have_required=no | |
179 | fi | |
180 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
181 | ||
182 | else | |
183 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
184 | as_found=false | |
185 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
186 | do | |
187 | IFS=$as_save_IFS | |
188 | test -z "$as_dir" && as_dir=. | |
189 | as_found=: | |
190 | case $as_dir in #( | |
191 | /*) | |
192 | for as_base in sh bash ksh sh5; do | |
193 | # Try only shells that exist, to save several forks. | |
194 | as_shell=$as_dir/$as_base | |
195 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
196 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | CONFIG_SHELL=$as_shell as_have_required=yes | |
198 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
199 | break 2 | |
200 | fi | |
201 | fi | |
202 | done;; | |
203 | esac | |
204 | as_found=false | |
205 | done | |
206 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
207 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
208 | CONFIG_SHELL=$SHELL as_have_required=yes | |
209 | fi; } | |
210 | IFS=$as_save_IFS | |
211 | ||
212 | ||
213 | if test "x$CONFIG_SHELL" != x; then : | |
214 | # We cannot yet assume a decent shell, so we have to provide a | |
215 | # neutralization value for shells without unset; and this also | |
216 | # works around shells that cannot unset nonexistent variables. | |
217 | BASH_ENV=/dev/null | |
218 | ENV=/dev/null | |
219 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
220 | export CONFIG_SHELL | |
a9bec17c | 221 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} |
067d23c9 KY |
222 | fi |
223 | ||
224 | if test x$as_have_required = xno; then : | |
225 | $as_echo "$0: This script requires a shell more modern than all" | |
226 | $as_echo "$0: the shells that I found on your system." | |
227 | if test x${ZSH_VERSION+set} = xset ; then | |
228 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
229 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
230 | else | |
231 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, | |
232 | $0: including any error possibly output before this | |
233 | $0: message. Then install a modern shell, or manually run | |
234 | $0: the script under such a shell if you do have one." | |
235 | fi | |
236 | exit 1 | |
237 | fi | |
238 | fi | |
239 | fi | |
240 | SHELL=${CONFIG_SHELL-/bin/sh} | |
241 | export SHELL | |
242 | # Unset more variables known to interfere with behavior of common tools. | |
243 | CLICOLOR_FORCE= GREP_OPTIONS= | |
244 | unset CLICOLOR_FORCE GREP_OPTIONS | |
245 | ||
246 | ## --------------------- ## | |
247 | ## M4sh Shell Functions. ## | |
248 | ## --------------------- ## | |
249 | # as_fn_unset VAR | |
250 | # --------------- | |
251 | # Portably unset VAR. | |
252 | as_fn_unset () | |
253 | { | |
254 | { eval $1=; unset $1;} | |
255 | } | |
256 | as_unset=as_fn_unset | |
257 | ||
258 | # as_fn_set_status STATUS | |
259 | # ----------------------- | |
260 | # Set $? to STATUS, without forking. | |
261 | as_fn_set_status () | |
262 | { | |
263 | return $1 | |
264 | } # as_fn_set_status | |
265 | ||
266 | # as_fn_exit STATUS | |
267 | # ----------------- | |
268 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
269 | as_fn_exit () | |
270 | { | |
271 | set +e | |
272 | as_fn_set_status $1 | |
273 | exit $1 | |
274 | } # as_fn_exit | |
275 | ||
276 | # as_fn_mkdir_p | |
277 | # ------------- | |
278 | # Create "$as_dir" as a directory, including parents if necessary. | |
279 | as_fn_mkdir_p () | |
280 | { | |
281 | ||
282 | case $as_dir in #( | |
283 | -*) as_dir=./$as_dir;; | |
284 | esac | |
285 | test -d "$as_dir" || eval $as_mkdir_p || { | |
286 | as_dirs= | |
287 | while :; do | |
288 | case $as_dir in #( | |
289 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
290 | *) as_qdir=$as_dir;; | |
291 | esac | |
292 | as_dirs="'$as_qdir' $as_dirs" | |
293 | as_dir=`$as_dirname -- "$as_dir" || | |
294 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
295 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
296 | X"$as_dir" : 'X\(//\)$' \| \ | |
297 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
298 | $as_echo X"$as_dir" | | |
299 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
300 | s//\1/ | |
301 | q | |
302 | } | |
303 | /^X\(\/\/\)[^/].*/{ | |
304 | s//\1/ | |
305 | q | |
306 | } | |
307 | /^X\(\/\/\)$/{ | |
308 | s//\1/ | |
309 | q | |
310 | } | |
311 | /^X\(\/\).*/{ | |
312 | s//\1/ | |
313 | q | |
314 | } | |
315 | s/.*/./; q'` | |
316 | test -d "$as_dir" && break | |
317 | done | |
318 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
a9bec17c | 319 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
320 | |
321 | ||
322 | } # as_fn_mkdir_p | |
323 | # as_fn_append VAR VALUE | |
324 | # ---------------------- | |
325 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
326 | # advantage of any shell optimizations that allow amortized linear growth over | |
327 | # repeated appends, instead of the typical quadratic growth present in naive | |
328 | # implementations. | |
329 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
330 | eval 'as_fn_append () | |
331 | { | |
332 | eval $1+=\$2 | |
333 | }' | |
334 | else | |
335 | as_fn_append () | |
336 | { | |
337 | eval $1=\$$1\$2 | |
338 | } | |
339 | fi # as_fn_append | |
340 | ||
341 | # as_fn_arith ARG... | |
342 | # ------------------ | |
343 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
344 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
345 | # must be portable across $(()) and expr. | |
346 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
347 | eval 'as_fn_arith () | |
348 | { | |
349 | as_val=$(( $* )) | |
350 | }' | |
351 | else | |
352 | as_fn_arith () | |
353 | { | |
354 | as_val=`expr "$@" || test $? -eq 1` | |
355 | } | |
356 | fi # as_fn_arith | |
357 | ||
358 | ||
a9bec17c GM |
359 | # as_fn_error ERROR [LINENO LOG_FD] |
360 | # --------------------------------- | |
067d23c9 KY |
361 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
362 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
a9bec17c | 363 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
364 | as_fn_error () |
365 | { | |
a9bec17c GM |
366 | as_status=$?; test $as_status -eq 0 && as_status=1 |
367 | if test "$3"; then | |
368 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
369 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 370 | fi |
a9bec17c | 371 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
372 | as_fn_exit $as_status |
373 | } # as_fn_error | |
374 | ||
375 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
376 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
377 | as_expr=expr | |
378 | else | |
379 | as_expr=false | |
380 | fi | |
381 | ||
382 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
383 | as_basename=basename | |
384 | else | |
385 | as_basename=false | |
386 | fi | |
387 | ||
388 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
389 | as_dirname=dirname | |
390 | else | |
391 | as_dirname=false | |
392 | fi | |
393 | ||
394 | as_me=`$as_basename -- "$0" || | |
395 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
396 | X"$0" : 'X\(//\)$' \| \ | |
397 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
398 | $as_echo X/"$0" | | |
399 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
400 | s//\1/ | |
401 | q | |
402 | } | |
403 | /^X\/\(\/\/\)$/{ | |
404 | s//\1/ | |
405 | q | |
406 | } | |
407 | /^X\/\(\/\).*/{ | |
408 | s//\1/ | |
409 | q | |
410 | } | |
411 | s/.*/./; q'` | |
412 | ||
413 | # Avoid depending upon Character Ranges. | |
414 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
415 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
416 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
417 | as_cr_digits='0123456789' | |
418 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
419 | ||
420 | ||
421 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
422 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
423 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
424 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
425 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
426 | sed -n ' | |
427 | p | |
428 | /[$]LINENO/= | |
429 | ' <$as_myself | | |
430 | sed ' | |
431 | s/[$]LINENO.*/&-/ | |
432 | t lineno | |
433 | b | |
434 | :lineno | |
435 | N | |
436 | :loop | |
437 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
438 | t loop | |
439 | s/-\n.*// | |
440 | ' >$as_me.lineno && | |
441 | chmod +x "$as_me.lineno" || | |
442 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
443 | ||
444 | # Don't try to exec as it changes $[0], causing all sort of problems | |
445 | # (the dirname of $[0] is not the place where we might find the | |
446 | # original and so on. Autoconf is especially sensitive to this). | |
447 | . "./$as_me.lineno" | |
448 | # Exit status is that of the last command. | |
449 | exit | |
450 | } | |
451 | ||
452 | ECHO_C= ECHO_N= ECHO_T= | |
453 | case `echo -n x` in #((((( | |
454 | -n*) | |
455 | case `echo 'xy\c'` in | |
456 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
457 | xy) ECHO_C='\c';; | |
458 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
459 | ECHO_T=' ';; | |
460 | esac;; | |
461 | *) | |
462 | ECHO_N='-n';; | |
463 | esac | |
464 | ||
465 | rm -f conf$$ conf$$.exe conf$$.file | |
466 | if test -d conf$$.dir; then | |
467 | rm -f conf$$.dir/conf$$.file | |
468 | else | |
469 | rm -f conf$$.dir | |
470 | mkdir conf$$.dir 2>/dev/null | |
471 | fi | |
472 | if (echo >conf$$.file) 2>/dev/null; then | |
473 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
474 | as_ln_s='ln -s' | |
475 | # ... but there are two gotchas: | |
476 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
477 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
478 | # In both cases, we have to default to `cp -p'. | |
479 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
480 | as_ln_s='cp -p' | |
481 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
482 | as_ln_s=ln | |
483 | else | |
484 | as_ln_s='cp -p' | |
485 | fi | |
486 | else | |
487 | as_ln_s='cp -p' | |
488 | fi | |
489 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
490 | rmdir conf$$.dir 2>/dev/null | |
491 | ||
492 | if mkdir -p . 2>/dev/null; then | |
493 | as_mkdir_p='mkdir -p "$as_dir"' | |
494 | else | |
495 | test -d ./-p && rmdir ./-p | |
496 | as_mkdir_p=false | |
497 | fi | |
498 | ||
499 | if test -x / >/dev/null 2>&1; then | |
500 | as_test_x='test -x' | |
501 | else | |
502 | if ls -dL / >/dev/null 2>&1; then | |
503 | as_ls_L_option=L | |
504 | else | |
505 | as_ls_L_option= | |
506 | fi | |
507 | as_test_x=' | |
508 | eval sh -c '\'' | |
509 | if test -d "$1"; then | |
510 | test -d "$1/."; | |
511 | else | |
512 | case $1 in #( | |
513 | -*)set "./$1";; | |
514 | esac; | |
515 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
516 | ???[sx]*):;;*)false;;esac;fi | |
517 | '\'' sh | |
518 | ' | |
519 | fi | |
520 | as_executable_p=$as_test_x | |
521 | ||
522 | # Sed expression to map a string onto a valid CPP name. | |
523 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
524 | ||
525 | # Sed expression to map a string onto a valid variable name. | |
526 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
527 | ||
528 | ||
529 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
530 | exec 6>&1 | |
531 | ||
532 | # Name of the host. | |
a9bec17c | 533 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, |
067d23c9 KY |
534 | # so uname gets run too. |
535 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
536 | ||
537 | # | |
538 | # Initializations. | |
539 | # | |
540 | ac_default_prefix=/usr/local | |
541 | ac_clean_files= | |
542 | ac_config_libobj_dir=. | |
543 | LIBOBJS= | |
544 | cross_compiling=no | |
545 | subdirs= | |
546 | MFLAGS= | |
547 | MAKEFLAGS= | |
548 | ||
549 | # Identity of this package. | |
550 | PACKAGE_NAME='emacs' | |
551 | PACKAGE_TARNAME='emacs' | |
c574bc34 GM |
552 | PACKAGE_VERSION='24.3.50' |
553 | PACKAGE_STRING='emacs 24.3.50' | |
067d23c9 KY |
554 | PACKAGE_BUGREPORT='' |
555 | PACKAGE_URL='' | |
556 | ||
557 | ac_unique_file="src/lisp.h" | |
558 | # Factoring default headers for most tests. | |
559 | ac_includes_default="\ | |
560 | #include <stdio.h> | |
561 | #ifdef HAVE_SYS_TYPES_H | |
562 | # include <sys/types.h> | |
563 | #endif | |
564 | #ifdef HAVE_SYS_STAT_H | |
565 | # include <sys/stat.h> | |
566 | #endif | |
567 | #ifdef STDC_HEADERS | |
568 | # include <stdlib.h> | |
569 | # include <stddef.h> | |
570 | #else | |
571 | # ifdef HAVE_STDLIB_H | |
572 | # include <stdlib.h> | |
573 | # endif | |
574 | #endif | |
575 | #ifdef HAVE_STRING_H | |
576 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
577 | # include <memory.h> | |
578 | # endif | |
579 | # include <string.h> | |
580 | #endif | |
581 | #ifdef HAVE_STRINGS_H | |
582 | # include <strings.h> | |
583 | #endif | |
584 | #ifdef HAVE_INTTYPES_H | |
585 | # include <inttypes.h> | |
586 | #endif | |
587 | #ifdef HAVE_STDINT_H | |
588 | # include <stdint.h> | |
589 | #endif | |
590 | #ifdef HAVE_UNISTD_H | |
591 | # include <unistd.h> | |
592 | #endif" | |
593 | ||
f199cab1 | 594 | ac_header_list= |
5476a9a4 | 595 | ac_func_list= |
e275c824 | 596 | gl_getopt_required=POSIX |
7e723570 | 597 | gl_getopt_required=POSIX |
743c80a7 PE |
598 | ac_subst_vars='gltests_LTLIBOBJS |
599 | gltests_LIBOBJS | |
600 | gl_LTLIBOBJS | |
601 | gl_LIBOBJS | |
602 | am__EXEEXT_FALSE | |
603 | am__EXEEXT_TRUE | |
604 | LTLIBOBJS | |
1f5d53eb | 605 | LIBOBJS |
73b78882 | 606 | SUBDIR_MAKEFILES_IN |
42dcba54 | 607 | WINDOW_SYSTEM_OBJ |
7c61eaab GM |
608 | EMACS_HEAPSIZE |
609 | TEMACS_POST_LINK | |
610 | ADDSECTION | |
067d23c9 | 611 | LD_SWITCH_SYSTEM_TEMACS |
743c80a7 PE |
612 | LIBGNU_LTLIBDEPS |
613 | LIBGNU_LIBDEPS | |
614 | gltests_WITNESS | |
710f5812 GM |
615 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE |
616 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE | |
6d153f56 GM |
617 | gl_GNULIB_ENABLED_strtoull_FALSE |
618 | gl_GNULIB_ENABLED_strtoull_TRUE | |
3e0be4ab GM |
619 | gl_GNULIB_ENABLED_strtoll_FALSE |
620 | gl_GNULIB_ENABLED_strtoll_TRUE | |
6d153f56 GM |
621 | gl_GNULIB_ENABLED_stat_FALSE |
622 | gl_GNULIB_ENABLED_stat_TRUE | |
710f5812 GM |
623 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE |
624 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE | |
a0a61e58 GM |
625 | gl_GNULIB_ENABLED_pathmax_FALSE |
626 | gl_GNULIB_ENABLED_pathmax_TRUE | |
d7ad186c GM |
627 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE |
628 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE | |
710f5812 GM |
629 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE |
630 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE | |
6d153f56 GM |
631 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
632 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | |
710f5812 GM |
633 | gl_GNULIB_ENABLED_getgroups_FALSE |
634 | gl_GNULIB_ENABLED_getgroups_TRUE | |
0cdca42a GM |
635 | gl_GNULIB_ENABLED_getdtablesize_FALSE |
636 | gl_GNULIB_ENABLED_getdtablesize_TRUE | |
710f5812 GM |
637 | gl_GNULIB_ENABLED_euidaccess_FALSE |
638 | gl_GNULIB_ENABLED_euidaccess_TRUE | |
6d153f56 GM |
639 | gl_GNULIB_ENABLED_dosname_FALSE |
640 | gl_GNULIB_ENABLED_dosname_TRUE | |
d7ad186c GM |
641 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE |
642 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE | |
6d153f56 GM |
643 | LTLIBINTL |
644 | LIBINTL | |
710f5812 | 645 | LIB_EACCESS |
f199cab1 | 646 | WINDOWS_64_BIT_OFF_T |
e275c824 PE |
647 | HAVE_UNISTD_H |
648 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
649 | NEXT_UNISTD_H | |
f077f61d | 650 | LIB_TIMER_TIME |
1fd182f0 PE |
651 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
652 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
653 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
654 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
655 | NEXT_TIME_H | |
0eb775a3 | 656 | WINDOWS_64_BIT_ST_SIZE |
5fa4ac76 PE |
657 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
658 | NEXT_SYS_STAT_H | |
283c7aed GM |
659 | NEXT_AS_FIRST_DIRECTIVE_STRING_H |
660 | NEXT_STRING_H | |
1f5d53eb PE |
661 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
662 | NEXT_STDLIB_H | |
6ad6792b GM |
663 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
664 | NEXT_STDIO_H | |
665 | REPLACE_VSPRINTF | |
666 | REPLACE_VSNPRINTF | |
667 | REPLACE_VPRINTF | |
668 | REPLACE_VFPRINTF | |
669 | REPLACE_VDPRINTF | |
670 | REPLACE_VASPRINTF | |
671 | REPLACE_TMPFILE | |
672 | REPLACE_STDIO_WRITE_FUNCS | |
ca36e0ff | 673 | REPLACE_STDIO_READ_FUNCS |
6ad6792b GM |
674 | REPLACE_SPRINTF |
675 | REPLACE_SNPRINTF | |
676 | REPLACE_RENAMEAT | |
677 | REPLACE_RENAME | |
678 | REPLACE_REMOVE | |
679 | REPLACE_PRINTF | |
680 | REPLACE_POPEN | |
681 | REPLACE_PERROR | |
682 | REPLACE_OBSTACK_PRINTF | |
683 | REPLACE_GETLINE | |
684 | REPLACE_GETDELIM | |
685 | REPLACE_FTELLO | |
686 | REPLACE_FTELL | |
687 | REPLACE_FSEEKO | |
688 | REPLACE_FSEEK | |
689 | REPLACE_FREOPEN | |
690 | REPLACE_FPURGE | |
691 | REPLACE_FPRINTF | |
692 | REPLACE_FOPEN | |
693 | REPLACE_FFLUSH | |
2b1928b8 | 694 | REPLACE_FDOPEN |
6ad6792b GM |
695 | REPLACE_FCLOSE |
696 | REPLACE_DPRINTF | |
697 | HAVE_VDPRINTF | |
698 | HAVE_VASPRINTF | |
699 | HAVE_RENAMEAT | |
2b1928b8 GM |
700 | HAVE_POPEN |
701 | HAVE_PCLOSE | |
6ad6792b GM |
702 | HAVE_FTELLO |
703 | HAVE_FSEEKO | |
704 | HAVE_DPRINTF | |
705 | HAVE_DECL_VSNPRINTF | |
706 | HAVE_DECL_SNPRINTF | |
707 | HAVE_DECL_OBSTACK_PRINTF | |
708 | HAVE_DECL_GETLINE | |
709 | HAVE_DECL_GETDELIM | |
710 | HAVE_DECL_FTELLO | |
711 | HAVE_DECL_FSEEKO | |
712 | HAVE_DECL_FPURGE | |
713 | GNULIB_VSPRINTF_POSIX | |
714 | GNULIB_VSNPRINTF | |
715 | GNULIB_VPRINTF_POSIX | |
716 | GNULIB_VPRINTF | |
717 | GNULIB_VFPRINTF_POSIX | |
718 | GNULIB_VFPRINTF | |
719 | GNULIB_VDPRINTF | |
ca36e0ff GM |
720 | GNULIB_VSCANF |
721 | GNULIB_VFSCANF | |
6ad6792b GM |
722 | GNULIB_VASPRINTF |
723 | GNULIB_TMPFILE | |
724 | GNULIB_STDIO_H_SIGPIPE | |
ca36e0ff | 725 | GNULIB_STDIO_H_NONBLOCKING |
6ad6792b GM |
726 | GNULIB_SPRINTF_POSIX |
727 | GNULIB_SNPRINTF | |
ca36e0ff | 728 | GNULIB_SCANF |
6ad6792b GM |
729 | GNULIB_RENAMEAT |
730 | GNULIB_RENAME | |
731 | GNULIB_REMOVE | |
732 | GNULIB_PUTS | |
733 | GNULIB_PUTCHAR | |
734 | GNULIB_PUTC | |
735 | GNULIB_PRINTF_POSIX | |
736 | GNULIB_PRINTF | |
737 | GNULIB_POPEN | |
738 | GNULIB_PERROR | |
2b1928b8 | 739 | GNULIB_PCLOSE |
6ad6792b GM |
740 | GNULIB_OBSTACK_PRINTF_POSIX |
741 | GNULIB_OBSTACK_PRINTF | |
742 | GNULIB_GETLINE | |
743 | GNULIB_GETDELIM | |
ca36e0ff GM |
744 | GNULIB_GETCHAR |
745 | GNULIB_GETC | |
6ad6792b GM |
746 | GNULIB_FWRITE |
747 | GNULIB_FTELLO | |
748 | GNULIB_FTELL | |
749 | GNULIB_FSEEKO | |
750 | GNULIB_FSEEK | |
ca36e0ff | 751 | GNULIB_FSCANF |
6ad6792b | 752 | GNULIB_FREOPEN |
ca36e0ff | 753 | GNULIB_FREAD |
6ad6792b GM |
754 | GNULIB_FPUTS |
755 | GNULIB_FPUTC | |
756 | GNULIB_FPURGE | |
757 | GNULIB_FPRINTF_POSIX | |
758 | GNULIB_FPRINTF | |
759 | GNULIB_FOPEN | |
ca36e0ff GM |
760 | GNULIB_FGETS |
761 | GNULIB_FGETC | |
6ad6792b | 762 | GNULIB_FFLUSH |
2b1928b8 | 763 | GNULIB_FDOPEN |
6ad6792b GM |
764 | GNULIB_FCLOSE |
765 | GNULIB_DPRINTF | |
1fd182f0 PE |
766 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
767 | NEXT_STDDEF_H | |
6c051bab GM |
768 | GL_GENERATE_STDDEF_H_FALSE |
769 | GL_GENERATE_STDDEF_H_TRUE | |
1fd182f0 PE |
770 | STDDEF_H |
771 | HAVE_WCHAR_T | |
772 | REPLACE_NULL | |
16c3e636 | 773 | HAVE__BOOL |
6c051bab GM |
774 | GL_GENERATE_STDBOOL_H_FALSE |
775 | GL_GENERATE_STDBOOL_H_TRUE | |
16c3e636 | 776 | STDBOOL_H |
6d153f56 GM |
777 | GL_GENERATE_STDARG_H_FALSE |
778 | GL_GENERATE_STDARG_H_TRUE | |
779 | STDARG_H | |
780 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | |
781 | NEXT_STDARG_H | |
0eb775a3 GM |
782 | GL_GENERATE_STDALIGN_H_FALSE |
783 | GL_GENERATE_STDALIGN_H_TRUE | |
784 | STDALIGN_H | |
3e0be4ab GM |
785 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
786 | NEXT_SIGNAL_H | |
3a019ab4 GM |
787 | USE_ACL |
788 | LIB_ACL | |
0eb775a3 | 789 | LIB_PTHREAD_SIGMASK |
2b1928b8 | 790 | REPLACE_RAISE |
3e0be4ab GM |
791 | REPLACE_PTHREAD_SIGMASK |
792 | HAVE_SIGHANDLER_T | |
793 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
794 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
795 | HAVE_SIGACTION | |
796 | HAVE_SIGINFO_T | |
797 | HAVE_SIGSET_T | |
2b1928b8 | 798 | HAVE_RAISE |
3e0be4ab GM |
799 | HAVE_PTHREAD_SIGMASK |
800 | HAVE_POSIX_SIGNALBLOCKING | |
801 | GNULIB_SIGACTION | |
802 | GNULIB_SIGPROCMASK | |
803 | GNULIB_SIGNAL_H_SIGPIPE | |
2b1928b8 | 804 | GNULIB_RAISE |
3e0be4ab | 805 | GNULIB_PTHREAD_SIGMASK |
f199cab1 GM |
806 | HAVE_SYS_SELECT_H |
807 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H | |
808 | NEXT_SYS_SELECT_H | |
809 | REPLACE_SELECT | |
810 | REPLACE_PSELECT | |
811 | HAVE_PSELECT | |
812 | GNULIB_SELECT | |
813 | GNULIB_PSELECT | |
1fd182f0 PE |
814 | REPLACE_TIMEGM |
815 | REPLACE_NANOSLEEP | |
816 | REPLACE_MKTIME | |
817 | REPLACE_LOCALTIME_R | |
818 | HAVE_TIMEGM | |
819 | HAVE_STRPTIME | |
820 | HAVE_NANOSLEEP | |
821 | HAVE_DECL_LOCALTIME_R | |
822 | GNULIB_TIME_R | |
823 | GNULIB_TIMEGM | |
824 | GNULIB_STRPTIME | |
825 | GNULIB_NANOSLEEP | |
826 | GNULIB_MKTIME | |
283c7aed GM |
827 | UNDEFINE_STRTOK_R |
828 | REPLACE_STRTOK_R | |
829 | REPLACE_STRSIGNAL | |
830 | REPLACE_STRNLEN | |
831 | REPLACE_STRNDUP | |
832 | REPLACE_STRNCAT | |
833 | REPLACE_STRERROR_R | |
834 | REPLACE_STRERROR | |
835 | REPLACE_STRCHRNUL | |
836 | REPLACE_STRCASESTR | |
837 | REPLACE_STRSTR | |
838 | REPLACE_STRDUP | |
839 | REPLACE_STPNCPY | |
840 | REPLACE_MEMMEM | |
841 | REPLACE_MEMCHR | |
842 | HAVE_STRVERSCMP | |
843 | HAVE_DECL_STRSIGNAL | |
844 | HAVE_DECL_STRERROR_R | |
845 | HAVE_DECL_STRTOK_R | |
846 | HAVE_STRCASESTR | |
847 | HAVE_STRSEP | |
848 | HAVE_STRPBRK | |
849 | HAVE_DECL_STRNLEN | |
850 | HAVE_DECL_STRNDUP | |
851 | HAVE_DECL_STRDUP | |
852 | HAVE_STRCHRNUL | |
853 | HAVE_STPNCPY | |
854 | HAVE_STPCPY | |
855 | HAVE_RAWMEMCHR | |
856 | HAVE_DECL_MEMRCHR | |
857 | HAVE_MEMPCPY | |
858 | HAVE_DECL_MEMMEM | |
859 | HAVE_MEMCHR | |
860 | HAVE_FFSLL | |
861 | HAVE_FFSL | |
862 | HAVE_MBSLEN | |
863 | GNULIB_STRVERSCMP | |
864 | GNULIB_STRSIGNAL | |
865 | GNULIB_STRERROR_R | |
866 | GNULIB_STRERROR | |
867 | GNULIB_MBSTOK_R | |
868 | GNULIB_MBSSEP | |
869 | GNULIB_MBSSPN | |
870 | GNULIB_MBSPBRK | |
871 | GNULIB_MBSCSPN | |
872 | GNULIB_MBSCASESTR | |
873 | GNULIB_MBSPCASECMP | |
874 | GNULIB_MBSNCASECMP | |
875 | GNULIB_MBSCASECMP | |
876 | GNULIB_MBSSTR | |
877 | GNULIB_MBSRCHR | |
878 | GNULIB_MBSCHR | |
879 | GNULIB_MBSNLEN | |
880 | GNULIB_MBSLEN | |
881 | GNULIB_STRTOK_R | |
882 | GNULIB_STRCASESTR | |
883 | GNULIB_STRSTR | |
884 | GNULIB_STRSEP | |
885 | GNULIB_STRPBRK | |
886 | GNULIB_STRNLEN | |
887 | GNULIB_STRNDUP | |
888 | GNULIB_STRNCAT | |
889 | GNULIB_STRDUP | |
890 | GNULIB_STRCHRNUL | |
891 | GNULIB_STPNCPY | |
892 | GNULIB_STPCPY | |
893 | GNULIB_RAWMEMCHR | |
894 | GNULIB_MEMRCHR | |
895 | GNULIB_MEMPCPY | |
896 | GNULIB_MEMMEM | |
897 | GNULIB_MEMCHR | |
898 | GNULIB_FFSLL | |
899 | GNULIB_FFSL | |
4fda9c95 GM |
900 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
901 | NEXT_INTTYPES_H | |
902 | UINT64_MAX_EQ_ULONG_MAX | |
903 | UINT32_MAX_LT_UINTMAX_MAX | |
904 | PRIPTR_PREFIX | |
905 | PRI_MACROS_BROKEN | |
906 | INT64_MAX_EQ_LONG_MAX | |
907 | INT32_MAX_LT_INTMAX_MAX | |
0eb775a3 | 908 | REPLACE_STRTOIMAX |
4fda9c95 GM |
909 | HAVE_DECL_STRTOUMAX |
910 | HAVE_DECL_STRTOIMAX | |
911 | HAVE_DECL_IMAXDIV | |
912 | HAVE_DECL_IMAXABS | |
913 | GNULIB_STRTOUMAX | |
914 | GNULIB_STRTOIMAX | |
915 | GNULIB_IMAXDIV | |
916 | GNULIB_IMAXABS | |
917 | GL_GENERATE_STDINT_H_FALSE | |
918 | GL_GENERATE_STDINT_H_TRUE | |
919 | STDINT_H | |
920 | WINT_T_SUFFIX | |
921 | WCHAR_T_SUFFIX | |
922 | SIG_ATOMIC_T_SUFFIX | |
923 | SIZE_T_SUFFIX | |
924 | PTRDIFF_T_SUFFIX | |
925 | HAVE_SIGNED_WINT_T | |
926 | HAVE_SIGNED_WCHAR_T | |
927 | HAVE_SIGNED_SIG_ATOMIC_T | |
928 | BITSIZEOF_WINT_T | |
929 | BITSIZEOF_WCHAR_T | |
930 | BITSIZEOF_SIG_ATOMIC_T | |
931 | BITSIZEOF_SIZE_T | |
932 | BITSIZEOF_PTRDIFF_T | |
933 | APPLE_UNIVERSAL_BUILD | |
934 | HAVE_SYS_BITYPES_H | |
935 | HAVE_SYS_INTTYPES_H | |
936 | HAVE_STDINT_H | |
937 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
938 | NEXT_STDINT_H | |
939 | HAVE_SYS_TYPES_H | |
940 | HAVE_INTTYPES_H | |
941 | HAVE_WCHAR_H | |
942 | HAVE_UNSIGNED_LONG_LONG_INT | |
943 | HAVE_LONG_LONG_INT | |
f199cab1 GM |
944 | HAVE_WINSOCK2_H |
945 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H | |
946 | NEXT_SYS_TIME_H | |
947 | REPLACE_STRUCT_TIMEVAL | |
948 | REPLACE_GETTIMEOFDAY | |
949 | HAVE_SYS_TIME_H | |
950 | HAVE_STRUCT_TIMEVAL | |
951 | HAVE_GETTIMEOFDAY | |
952 | GNULIB_GETTIMEOFDAY | |
0eb775a3 | 953 | GNULIB_GL_UNISTD_H_GETOPT |
e275c824 PE |
954 | GETOPT_H |
955 | HAVE_GETOPT_H | |
956 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
957 | NEXT_GETOPT_H | |
7d2a1c5e GM |
958 | GETLOADAVG_LIBS |
959 | REPLACE_WCTOMB | |
960 | REPLACE_UNSETENV | |
961 | REPLACE_STRTOD | |
962 | REPLACE_SETENV | |
963 | REPLACE_REALPATH | |
964 | REPLACE_REALLOC | |
0eb775a3 | 965 | REPLACE_RANDOM_R |
7d2a1c5e | 966 | REPLACE_PUTENV |
0eb775a3 | 967 | REPLACE_PTSNAME_R |
b6c9d18d | 968 | REPLACE_PTSNAME |
7d2a1c5e GM |
969 | REPLACE_MKSTEMP |
970 | REPLACE_MBTOWC | |
971 | REPLACE_MALLOC | |
972 | REPLACE_CANONICALIZE_FILE_NAME | |
973 | REPLACE_CALLOC | |
974 | HAVE_DECL_UNSETENV | |
975 | HAVE_UNLOCKPT | |
976 | HAVE_SYS_LOADAVG_H | |
977 | HAVE_STRUCT_RANDOM_DATA | |
978 | HAVE_STRTOULL | |
979 | HAVE_STRTOLL | |
980 | HAVE_STRTOD | |
981 | HAVE_DECL_SETENV | |
982 | HAVE_SETENV | |
2cdd55fc | 983 | HAVE_SECURE_GETENV |
7d2a1c5e GM |
984 | HAVE_RPMATCH |
985 | HAVE_REALPATH | |
986 | HAVE_RANDOM_R | |
987 | HAVE_RANDOM_H | |
0eb775a3 GM |
988 | HAVE_RANDOM |
989 | HAVE_PTSNAME_R | |
7d2a1c5e | 990 | HAVE_PTSNAME |
0eb775a3 | 991 | HAVE_POSIX_OPENPT |
7d2a1c5e GM |
992 | HAVE_MKSTEMPS |
993 | HAVE_MKSTEMP | |
994 | HAVE_MKOSTEMPS | |
995 | HAVE_MKOSTEMP | |
996 | HAVE_MKDTEMP | |
997 | HAVE_GRANTPT | |
998 | HAVE_GETSUBOPT | |
999 | HAVE_DECL_GETLOADAVG | |
1000 | HAVE_CANONICALIZE_FILE_NAME | |
1001 | HAVE_ATOLL | |
1002 | HAVE__EXIT | |
1003 | GNULIB_WCTOMB | |
1004 | GNULIB_UNSETENV | |
1005 | GNULIB_UNLOCKPT | |
1006 | GNULIB_SYSTEM_POSIX | |
1007 | GNULIB_STRTOULL | |
1008 | GNULIB_STRTOLL | |
1009 | GNULIB_STRTOD | |
1010 | GNULIB_SETENV | |
2cdd55fc | 1011 | GNULIB_SECURE_GETENV |
7d2a1c5e GM |
1012 | GNULIB_RPMATCH |
1013 | GNULIB_REALPATH | |
1014 | GNULIB_REALLOC_POSIX | |
1015 | GNULIB_RANDOM_R | |
0eb775a3 | 1016 | GNULIB_RANDOM |
7d2a1c5e | 1017 | GNULIB_PUTENV |
0eb775a3 | 1018 | GNULIB_PTSNAME_R |
7d2a1c5e | 1019 | GNULIB_PTSNAME |
0eb775a3 | 1020 | GNULIB_POSIX_OPENPT |
7d2a1c5e GM |
1021 | GNULIB_MKSTEMPS |
1022 | GNULIB_MKSTEMP | |
1023 | GNULIB_MKOSTEMPS | |
1024 | GNULIB_MKOSTEMP | |
1025 | GNULIB_MKDTEMP | |
1026 | GNULIB_MBTOWC | |
1027 | GNULIB_MALLOC_POSIX | |
1028 | GNULIB_GRANTPT | |
1029 | GNULIB_GETSUBOPT | |
1030 | GNULIB_GETLOADAVG | |
1031 | GNULIB_CANONICALIZE_FILE_NAME | |
1032 | GNULIB_CALLOC_POSIX | |
1033 | GNULIB_ATOLL | |
1034 | GNULIB__EXIT | |
d7ad186c GM |
1035 | REPLACE_UTIMENSAT |
1036 | REPLACE_STAT | |
1037 | REPLACE_MKNOD | |
1038 | REPLACE_MKFIFO | |
1039 | REPLACE_MKDIR | |
1040 | REPLACE_LSTAT | |
1041 | REPLACE_FUTIMENS | |
1042 | REPLACE_FSTATAT | |
1043 | REPLACE_FSTAT | |
1044 | HAVE_UTIMENSAT | |
1045 | HAVE_MKNODAT | |
1046 | HAVE_MKNOD | |
1047 | HAVE_MKFIFOAT | |
1048 | HAVE_MKFIFO | |
1049 | HAVE_MKDIRAT | |
1050 | HAVE_LSTAT | |
1051 | HAVE_LCHMOD | |
1052 | HAVE_FUTIMENS | |
1053 | HAVE_FSTATAT | |
1054 | HAVE_FCHMODAT | |
1055 | GNULIB_UTIMENSAT | |
1056 | GNULIB_STAT | |
1057 | GNULIB_MKNODAT | |
1058 | GNULIB_MKNOD | |
1059 | GNULIB_MKFIFOAT | |
1060 | GNULIB_MKFIFO | |
1061 | GNULIB_MKDIRAT | |
1062 | GNULIB_LSTAT | |
1063 | GNULIB_LCHMOD | |
1064 | GNULIB_FUTIMENS | |
1065 | GNULIB_FSTATAT | |
1066 | GNULIB_FSTAT | |
1067 | GNULIB_FCHMODAT | |
2407788f | 1068 | LIB_FDATASYNC |
710f5812 GM |
1069 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H |
1070 | NEXT_FCNTL_H | |
710f5812 GM |
1071 | REPLACE_OPENAT |
1072 | REPLACE_OPEN | |
1073 | REPLACE_FCNTL | |
1074 | HAVE_OPENAT | |
1075 | HAVE_FCNTL | |
1076 | GNULIB_OPENAT | |
1077 | GNULIB_OPEN | |
1078 | GNULIB_NONBLOCKING | |
1079 | GNULIB_FCNTL | |
8966cbff GM |
1080 | GL_GENERATE_EXECINFO_H_FALSE |
1081 | GL_GENERATE_EXECINFO_H_TRUE | |
1082 | LIB_EXECINFO | |
1083 | EXECINFO_H | |
3a019ab4 GM |
1084 | EOVERFLOW_VALUE |
1085 | EOVERFLOW_HIDDEN | |
1086 | ENOLINK_VALUE | |
1087 | ENOLINK_HIDDEN | |
1088 | EMULTIHOP_VALUE | |
1089 | EMULTIHOP_HIDDEN | |
1090 | GL_GENERATE_ERRNO_H_FALSE | |
1091 | GL_GENERATE_ERRNO_H_TRUE | |
1092 | ERRNO_H | |
1093 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H | |
1094 | NEXT_ERRNO_H | |
d7ad186c GM |
1095 | HAVE_DIRENT_H |
1096 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H | |
1097 | NEXT_DIRENT_H | |
1098 | PRAGMA_COLUMNS | |
1099 | PRAGMA_SYSTEM_HEADER | |
1100 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
1101 | INCLUDE_NEXT | |
1102 | REPLACE_FDOPENDIR | |
1103 | REPLACE_DIRFD | |
1104 | REPLACE_CLOSEDIR | |
1105 | REPLACE_OPENDIR | |
1106 | HAVE_ALPHASORT | |
1107 | HAVE_SCANDIR | |
1108 | HAVE_FDOPENDIR | |
1109 | HAVE_DECL_FDOPENDIR | |
1110 | HAVE_DECL_DIRFD | |
1111 | HAVE_CLOSEDIR | |
1112 | HAVE_REWINDDIR | |
1113 | HAVE_READDIR | |
1114 | HAVE_OPENDIR | |
1115 | GNULIB_ALPHASORT | |
1116 | GNULIB_SCANDIR | |
1117 | GNULIB_FDOPENDIR | |
1118 | GNULIB_DIRFD | |
1119 | GNULIB_CLOSEDIR | |
1120 | GNULIB_REWINDDIR | |
1121 | GNULIB_READDIR | |
1122 | GNULIB_OPENDIR | |
e275c824 PE |
1123 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
1124 | UNISTD_H_HAVE_WINSOCK2_H | |
1125 | REPLACE_WRITE | |
1126 | REPLACE_USLEEP | |
1127 | REPLACE_UNLINKAT | |
1128 | REPLACE_UNLINK | |
1129 | REPLACE_TTYNAME_R | |
1130 | REPLACE_SYMLINK | |
1131 | REPLACE_SLEEP | |
1132 | REPLACE_RMDIR | |
1133 | REPLACE_READLINK | |
ca36e0ff | 1134 | REPLACE_READ |
e275c824 PE |
1135 | REPLACE_PWRITE |
1136 | REPLACE_PREAD | |
1137 | REPLACE_LSEEK | |
1138 | REPLACE_LINKAT | |
1139 | REPLACE_LINK | |
1140 | REPLACE_LCHOWN | |
0eb775a3 | 1141 | REPLACE_ISATTY |
e275c824 PE |
1142 | REPLACE_GETPAGESIZE |
1143 | REPLACE_GETGROUPS | |
1144 | REPLACE_GETLOGIN_R | |
1145 | REPLACE_GETDOMAINNAME | |
1146 | REPLACE_GETCWD | |
0eb775a3 | 1147 | REPLACE_FTRUNCATE |
e275c824 PE |
1148 | REPLACE_FCHOWNAT |
1149 | REPLACE_DUP2 | |
1150 | REPLACE_DUP | |
1151 | REPLACE_CLOSE | |
1152 | REPLACE_CHOWN | |
1153 | HAVE_SYS_PARAM_H | |
1154 | HAVE_OS_H | |
1155 | HAVE_DECL_TTYNAME_R | |
0eb775a3 | 1156 | HAVE_DECL_SETHOSTNAME |
e275c824 PE |
1157 | HAVE_DECL_GETUSERSHELL |
1158 | HAVE_DECL_GETPAGESIZE | |
1159 | HAVE_DECL_GETLOGIN_R | |
1160 | HAVE_DECL_GETDOMAINNAME | |
2b1928b8 | 1161 | HAVE_DECL_FDATASYNC |
e275c824 PE |
1162 | HAVE_DECL_FCHDIR |
1163 | HAVE_DECL_ENVIRON | |
1164 | HAVE_USLEEP | |
1165 | HAVE_UNLINKAT | |
1166 | HAVE_SYMLINKAT | |
1167 | HAVE_SYMLINK | |
1168 | HAVE_SLEEP | |
0eb775a3 | 1169 | HAVE_SETHOSTNAME |
e275c824 PE |
1170 | HAVE_READLINKAT |
1171 | HAVE_READLINK | |
1172 | HAVE_PWRITE | |
1173 | HAVE_PREAD | |
1174 | HAVE_PIPE2 | |
1175 | HAVE_PIPE | |
1176 | HAVE_LINKAT | |
1177 | HAVE_LINK | |
1178 | HAVE_LCHOWN | |
da6c8463 | 1179 | HAVE_GROUP_MEMBER |
e275c824 PE |
1180 | HAVE_GETPAGESIZE |
1181 | HAVE_GETLOGIN | |
1182 | HAVE_GETHOSTNAME | |
1183 | HAVE_GETGROUPS | |
1184 | HAVE_GETDTABLESIZE | |
1185 | HAVE_FTRUNCATE | |
1186 | HAVE_FSYNC | |
2b1928b8 | 1187 | HAVE_FDATASYNC |
e275c824 PE |
1188 | HAVE_FCHOWNAT |
1189 | HAVE_FCHDIR | |
1190 | HAVE_FACCESSAT | |
1191 | HAVE_EUIDACCESS | |
1192 | HAVE_DUP3 | |
1193 | HAVE_DUP2 | |
1194 | HAVE_CHOWN | |
1195 | GNULIB_WRITE | |
1196 | GNULIB_USLEEP | |
1197 | GNULIB_UNLINKAT | |
1198 | GNULIB_UNLINK | |
1199 | GNULIB_UNISTD_H_SIGPIPE | |
ca36e0ff | 1200 | GNULIB_UNISTD_H_NONBLOCKING |
e275c824 PE |
1201 | GNULIB_TTYNAME_R |
1202 | GNULIB_SYMLINKAT | |
1203 | GNULIB_SYMLINK | |
1204 | GNULIB_SLEEP | |
0eb775a3 | 1205 | GNULIB_SETHOSTNAME |
e275c824 PE |
1206 | GNULIB_RMDIR |
1207 | GNULIB_READLINKAT | |
1208 | GNULIB_READLINK | |
ca36e0ff | 1209 | GNULIB_READ |
e275c824 PE |
1210 | GNULIB_PWRITE |
1211 | GNULIB_PREAD | |
1212 | GNULIB_PIPE2 | |
1213 | GNULIB_PIPE | |
1214 | GNULIB_LSEEK | |
1215 | GNULIB_LINKAT | |
1216 | GNULIB_LINK | |
1217 | GNULIB_LCHOWN | |
0eb775a3 | 1218 | GNULIB_ISATTY |
da6c8463 | 1219 | GNULIB_GROUP_MEMBER |
e275c824 PE |
1220 | GNULIB_GETUSERSHELL |
1221 | GNULIB_GETPAGESIZE | |
1222 | GNULIB_GETLOGIN_R | |
1223 | GNULIB_GETLOGIN | |
1224 | GNULIB_GETHOSTNAME | |
1225 | GNULIB_GETGROUPS | |
1226 | GNULIB_GETDTABLESIZE | |
1227 | GNULIB_GETDOMAINNAME | |
1228 | GNULIB_GETCWD | |
1229 | GNULIB_FTRUNCATE | |
1230 | GNULIB_FSYNC | |
2b1928b8 | 1231 | GNULIB_FDATASYNC |
e275c824 PE |
1232 | GNULIB_FCHOWNAT |
1233 | GNULIB_FCHDIR | |
1234 | GNULIB_FACCESSAT | |
1235 | GNULIB_EUIDACCESS | |
1236 | GNULIB_ENVIRON | |
1237 | GNULIB_DUP3 | |
1238 | GNULIB_DUP2 | |
2b1928b8 | 1239 | GNULIB_DUP |
e275c824 PE |
1240 | GNULIB_CLOSE |
1241 | GNULIB_CHOWN | |
2b1928b8 | 1242 | GNULIB_CHDIR |
f199cab1 | 1243 | LIB_CLOCK_GETTIME |
4fc2b746 GM |
1244 | GL_GENERATE_ALLOCA_H_FALSE |
1245 | GL_GENERATE_ALLOCA_H_TRUE | |
1246 | ALLOCA_H | |
1247 | ALLOCA | |
743c80a7 PE |
1248 | GL_COND_LIBTOOL_FALSE |
1249 | GL_COND_LIBTOOL_TRUE | |
5476a9a4 GM |
1250 | POST_ALLOC_OBJ |
1251 | PRE_ALLOC_OBJ | |
1252 | CYGWIN_OBJ | |
1253 | RALLOC_OBJ | |
1254 | OLDXMENU_DEPS | |
1255 | LIBX_OTHER | |
1256 | LIBXMENU | |
1257 | OLDXMENU | |
1258 | OLDXMENU_TARGET | |
1259 | LIBXT_OTHER | |
1260 | TOOLKIT_LIBW | |
1261 | WIDGET_OBJ | |
1262 | XOBJ | |
1263 | XMENU_OBJ | |
1264 | FONT_OBJ | |
1265 | OTHER_FILES | |
1266 | GNU_OBJC_CFLAGS | |
1267 | ns_appsrc | |
1268 | ns_appresdir | |
1269 | ns_appbindir | |
1270 | ns_appdir | |
5476a9a4 GM |
1271 | X_TOOLKIT_TYPE |
1272 | GNUSTEP_CFLAGS | |
1273 | C_SWITCH_X_SITE | |
1274 | LD_SWITCH_X_SITE | |
1275 | gameuser | |
1276 | gamedir | |
1277 | bitmapdir | |
1278 | archlibdir | |
1279 | etcdir | |
1280 | x_default_search_path | |
1281 | lisppath | |
1282 | locallisppath | |
1283 | standardlisppath | |
1284 | leimdir | |
1285 | lispdir | |
1286 | srcdir | |
1287 | canonical | |
1288 | configuration | |
1289 | version | |
bb7dce39 | 1290 | copyright |
0f55a32e | 1291 | XGSELOBJ |
5476a9a4 GM |
1292 | KRB4LIB |
1293 | DESLIB | |
1294 | KRB5LIB | |
1295 | CRYPTOLIB | |
1296 | COM_ERRLIB | |
1297 | LIBRESOLV | |
1298 | LIBHESIOD | |
1299 | TERMCAP_OBJ | |
1300 | LIBS_TERMCAP | |
1301 | BLESSMAIL_TARGET | |
1302 | LIBS_MAIL | |
1303 | liblockfile | |
1304 | LIBXML2_LIBS | |
1305 | LIBXML2_CFLAGS | |
910833ae GM |
1306 | XINERAMA_LIBS |
1307 | XINERAMA_CFLAGS | |
1308 | XRANDR_LIBS | |
1309 | XRANDR_CFLAGS | |
5476a9a4 GM |
1310 | LIBXSM |
1311 | LIBGPM | |
1312 | LIBGIF | |
1313 | LIBTIFF | |
1314 | LIBPNG | |
1315 | LIBJPEG | |
1316 | LIBXPM | |
1317 | M17N_FLT_LIBS | |
1318 | M17N_FLT_CFLAGS | |
1319 | LIBOTF_LIBS | |
1320 | LIBOTF_CFLAGS | |
1321 | FREETYPE_LIBS | |
1322 | FREETYPE_CFLAGS | |
1323 | XFT_LIBS | |
1324 | XFT_CFLAGS | |
1325 | FONTCONFIG_LIBS | |
1326 | FONTCONFIG_CFLAGS | |
1327 | LIBXMU | |
1328 | LIBXTR6 | |
0f55a32e GM |
1329 | NOTIFY_OBJ |
1330 | GFILENOTIFY_LIBS | |
1331 | GFILENOTIFY_CFLAGS | |
5476a9a4 GM |
1332 | LIBGNUTLS_LIBS |
1333 | LIBGNUTLS_CFLAGS | |
1334 | LIBSELINUX_LIBS | |
1335 | SETTINGS_LIBS | |
1336 | SETTINGS_CFLAGS | |
dcde497f GM |
1337 | GOBJECT_LIBS |
1338 | GOBJECT_CFLAGS | |
5476a9a4 GM |
1339 | GCONF_LIBS |
1340 | GCONF_CFLAGS | |
1341 | GSETTINGS_LIBS | |
1342 | GSETTINGS_CFLAGS | |
1343 | DBUS_OBJ | |
1344 | DBUS_LIBS | |
1345 | DBUS_CFLAGS | |
1346 | GTK_OBJ | |
1347 | GTK_LIBS | |
1348 | GTK_CFLAGS | |
1349 | IMAGEMAGICK_LIBS | |
1350 | IMAGEMAGICK_CFLAGS | |
1351 | RSVG_LIBS | |
1352 | RSVG_CFLAGS | |
1353 | LIB_PTHREAD | |
1354 | VMLIMIT_OBJ | |
1355 | GMALLOC_OBJ | |
1356 | HAVE_XSERVER | |
7c61eaab GM |
1357 | XARGS_LIMIT |
1358 | NTLIB | |
1359 | LIB_WSOCK32 | |
1360 | LIBS_ECLIENT | |
1361 | CM_OBJ | |
1362 | NTDIR | |
1363 | FIRSTFILE_OBJ | |
b5eb356a | 1364 | W32_RES_LINK |
7c61eaab GM |
1365 | CLIENTW |
1366 | CLIENTRES | |
1367 | EMACS_MANIFEST | |
1368 | EMACSRES | |
5c0255d9 GM |
1369 | W32_LIBS |
1370 | W32_OBJ | |
b5eb356a | 1371 | WINDRES |
5476a9a4 GM |
1372 | NS_OBJC_OBJ |
1373 | NS_OBJ | |
1374 | ns_self_contained | |
1375 | INSTALL_ARCH_INDEP_EXTRA | |
4efe5ef9 | 1376 | LIBS_GNUSTEP |
5476a9a4 GM |
1377 | LD_SWITCH_X_SITE_RPATH |
1378 | XMKMF | |
1379 | DEPFLAGS | |
1380 | MKDEPDIR | |
1381 | CFLAGS_SOUND | |
1382 | ALSA_LIBS | |
1383 | ALSA_CFLAGS | |
1384 | LIBSOUND | |
1385 | PKG_CONFIG | |
067d23c9 | 1386 | LIB_MATH |
067d23c9 KY |
1387 | LIBS_SYSTEM |
1388 | C_SWITCH_SYSTEM | |
1389 | UNEXEC_OBJ | |
1390 | C_SWITCH_MACHINE | |
1391 | LD_SWITCH_SYSTEM | |
1392 | CANNOT_DUMP | |
141d074d GM |
1393 | INFO_OPTS |
1394 | INFO_EXT | |
96f129d5 | 1395 | HAVE_MAKEINFO |
9c29597b | 1396 | PAXCTL |
067d23c9 KY |
1397 | GZIP_PROG |
1398 | INSTALL_INFO | |
4c5f4270 | 1399 | LN_S_FILEONLY |
a6b92a4a | 1400 | GNULIB_WARN_CFLAGS |
0eb775a3 | 1401 | WARN_CFLAGS |
a6b92a4a | 1402 | WERROR_CFLAGS |
369e19fc PE |
1403 | RANLIB |
1404 | ARFLAGS | |
1405 | AR | |
067d23c9 KY |
1406 | EGREP |
1407 | GREP | |
1408 | CPP | |
7c61eaab GM |
1409 | BUILDING_FOR_WINDOWSNT_FALSE |
1410 | BUILDING_FOR_WINDOWSNT_TRUE | |
743c80a7 PE |
1411 | am__fastdepCC_FALSE |
1412 | am__fastdepCC_TRUE | |
1413 | CCDEPMODE | |
1414 | AMDEPBACKSLASH | |
1415 | AMDEP_FALSE | |
1416 | AMDEP_TRUE | |
1417 | am__quote | |
1418 | am__include | |
1419 | DEPDIR | |
067d23c9 KY |
1420 | OBJEXT |
1421 | EXEEXT | |
1422 | ac_ct_CC | |
1423 | CPPFLAGS | |
1424 | LDFLAGS | |
1425 | CFLAGS | |
1426 | CC | |
1427 | host_os | |
1428 | host_vendor | |
1429 | host_cpu | |
1430 | host | |
1431 | build_os | |
1432 | build_vendor | |
1433 | build_cpu | |
1434 | build | |
1435 | PROFILING_CFLAGS | |
067d23c9 | 1436 | GZIP_INFO |
c3a461a5 | 1437 | cache_file |
743c80a7 PE |
1438 | am__untar |
1439 | am__tar | |
1440 | AMTAR | |
1441 | am__leading_dot | |
1442 | SET_MAKE | |
1443 | AWK | |
1444 | mkdir_p | |
1445 | MKDIR_P | |
1446 | INSTALL_STRIP_PROGRAM | |
1447 | STRIP | |
1448 | install_sh | |
1449 | MAKEINFO | |
1450 | AUTOHEADER | |
1451 | AUTOMAKE | |
1452 | AUTOCONF | |
1453 | ACLOCAL | |
1454 | VERSION | |
1455 | PACKAGE | |
1456 | CYGPATH_W | |
1457 | am__isrc | |
1458 | INSTALL_DATA | |
1459 | INSTALL_SCRIPT | |
1460 | INSTALL_PROGRAM | |
067d23c9 KY |
1461 | target_alias |
1462 | host_alias | |
1463 | build_alias | |
1464 | LIBS | |
1465 | ECHO_T | |
1466 | ECHO_N | |
1467 | ECHO_C | |
1468 | DEFS | |
1469 | mandir | |
1470 | localedir | |
1471 | libdir | |
1472 | psdir | |
1473 | pdfdir | |
1474 | dvidir | |
1475 | htmldir | |
1476 | infodir | |
1477 | docdir | |
1478 | oldincludedir | |
1479 | includedir | |
1480 | localstatedir | |
1481 | sharedstatedir | |
1482 | sysconfdir | |
1483 | datadir | |
1484 | datarootdir | |
1485 | libexecdir | |
1486 | sbindir | |
1487 | bindir | |
1488 | program_transform_name | |
1489 | prefix | |
1490 | exec_prefix | |
1491 | PACKAGE_URL | |
1492 | PACKAGE_BUGREPORT | |
1493 | PACKAGE_STRING | |
1494 | PACKAGE_VERSION | |
1495 | PACKAGE_TARNAME | |
1496 | PACKAGE_NAME | |
1497 | PATH_SEPARATOR | |
1498 | SHELL' | |
1499 | ac_subst_files='deps_frag | |
bb7dce39 | 1500 | lisp_frag' |
067d23c9 KY |
1501 | ac_user_opts=' |
1502 | enable_option_checking | |
ee77919d | 1503 | with_all |
067d23c9 KY |
1504 | with_pop |
1505 | with_kerberos | |
1506 | with_kerberos5 | |
1507 | with_hesiod | |
1508 | with_mmdf | |
1509 | with_mail_unlink | |
1510 | with_mailhost | |
1511 | with_sound | |
067d23c9 | 1512 | with_x_toolkit |
0442dc7f | 1513 | with_wide_int |
067d23c9 KY |
1514 | with_xpm |
1515 | with_jpeg | |
1516 | with_tiff | |
1517 | with_gif | |
1518 | with_png | |
1519 | with_rsvg | |
1520 | with_xml2 | |
1521 | with_imagemagick | |
1522 | with_xft | |
1523 | with_libotf | |
1524 | with_m17n_flt | |
1525 | with_toolkit_scroll_bars | |
1526 | with_xaw3d | |
1527 | with_xim | |
1528 | with_ns | |
5c0255d9 | 1529 | with_w32 |
067d23c9 KY |
1530 | with_gpm |
1531 | with_dbus | |
1532 | with_gconf | |
f527bd02 | 1533 | with_gsettings |
067d23c9 KY |
1534 | with_selinux |
1535 | with_gnutls | |
0f55a32e | 1536 | with_file_notification |
067d23c9 KY |
1537 | with_makeinfo |
1538 | with_compress_info | |
1539 | with_pkg_config_prog | |
4fc5868a | 1540 | with_gameuser |
067d23c9 KY |
1541 | with_gnustep_conf |
1542 | enable_ns_self_contained | |
067d23c9 KY |
1543 | enable_locallisppath |
1544 | enable_checking | |
afd07e01 | 1545 | enable_check_lisp_object_type |
067d23c9 KY |
1546 | enable_profiling |
1547 | enable_autodepend | |
4efe5ef9 | 1548 | enable_gtk_deprecation_warnings |
743c80a7 | 1549 | enable_dependency_tracking |
067d23c9 | 1550 | enable_largefile |
a6b92a4a | 1551 | enable_gcc_warnings |
e4d35030 | 1552 | enable_link_time_optimization |
067d23c9 | 1553 | with_x |
3a019ab4 | 1554 | enable_acl |
067d23c9 KY |
1555 | ' |
1556 | ac_precious_vars='build_alias | |
1557 | host_alias | |
1558 | target_alias | |
1559 | CC | |
1560 | CFLAGS | |
1561 | LDFLAGS | |
1562 | LIBS | |
1563 | CPPFLAGS | |
1564 | CPP | |
1565 | XMKMF' | |
1566 | ||
1567 | ||
1568 | # Initialize some variables set by options. | |
1569 | ac_init_help= | |
1570 | ac_init_version=false | |
1571 | ac_unrecognized_opts= | |
1572 | ac_unrecognized_sep= | |
1573 | # The variables have the same names as the options, with | |
1574 | # dashes changed to underlines. | |
1575 | cache_file=/dev/null | |
1576 | exec_prefix=NONE | |
1577 | no_create= | |
1578 | no_recursion= | |
1579 | prefix=NONE | |
1580 | program_prefix=NONE | |
1581 | program_suffix=NONE | |
1582 | program_transform_name=s,x,x, | |
1583 | silent= | |
1584 | site= | |
1585 | srcdir= | |
1586 | verbose= | |
1587 | x_includes=NONE | |
1588 | x_libraries=NONE | |
1589 | ||
1590 | # Installation directory options. | |
1591 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1592 | # and all the variables that are supposed to be based on exec_prefix | |
1593 | # by default will actually change. | |
1594 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1595 | # (The list follows the same order as the GNU Coding Standards.) | |
1596 | bindir='${exec_prefix}/bin' | |
1597 | sbindir='${exec_prefix}/sbin' | |
1598 | libexecdir='${exec_prefix}/libexec' | |
1599 | datarootdir='${prefix}/share' | |
1600 | datadir='${datarootdir}' | |
1601 | sysconfdir='${prefix}/etc' | |
1602 | sharedstatedir='${prefix}/com' | |
1603 | localstatedir='${prefix}/var' | |
1604 | includedir='${prefix}/include' | |
1605 | oldincludedir='/usr/include' | |
1606 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1607 | infodir='${datarootdir}/info' | |
1608 | htmldir='${docdir}' | |
1609 | dvidir='${docdir}' | |
1610 | pdfdir='${docdir}' | |
1611 | psdir='${docdir}' | |
1612 | libdir='${exec_prefix}/lib' | |
1613 | localedir='${datarootdir}/locale' | |
1614 | mandir='${datarootdir}/man' | |
1615 | ||
1616 | ac_prev= | |
1617 | ac_dashdash= | |
1618 | for ac_option | |
1619 | do | |
1620 | # If the previous option needs an argument, assign it. | |
1621 | if test -n "$ac_prev"; then | |
1622 | eval $ac_prev=\$ac_option | |
1623 | ac_prev= | |
1624 | continue | |
1625 | fi | |
1626 | ||
1627 | case $ac_option in | |
a9bec17c GM |
1628 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1629 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1630 | esac |
1631 | ||
1632 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1633 | ||
1634 | case $ac_dashdash$ac_option in | |
1635 | --) | |
1636 | ac_dashdash=yes ;; | |
1637 | ||
1638 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1639 | ac_prev=bindir ;; | |
1640 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1641 | bindir=$ac_optarg ;; | |
1642 | ||
1643 | -build | --build | --buil | --bui | --bu) | |
1644 | ac_prev=build_alias ;; | |
1645 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1646 | build_alias=$ac_optarg ;; | |
1647 | ||
1648 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1649 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1650 | ac_prev=cache_file ;; | |
1651 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1652 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1653 | cache_file=$ac_optarg ;; | |
1654 | ||
1655 | --config-cache | -C) | |
1656 | cache_file=config.cache ;; | |
1657 | ||
1658 | -datadir | --datadir | --datadi | --datad) | |
1659 | ac_prev=datadir ;; | |
1660 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1661 | datadir=$ac_optarg ;; | |
1662 | ||
1663 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1664 | | --dataroo | --dataro | --datar) | |
1665 | ac_prev=datarootdir ;; | |
1666 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1667 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1668 | datarootdir=$ac_optarg ;; | |
1669 | ||
1670 | -disable-* | --disable-*) | |
1671 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1672 | # Reject names that are not valid shell variable names. | |
1673 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1674 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1675 | ac_useropt_orig=$ac_useropt |
1676 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1677 | case $ac_user_opts in | |
1678 | *" | |
1679 | "enable_$ac_useropt" | |
1680 | "*) ;; | |
1681 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1682 | ac_unrecognized_sep=', ';; | |
1683 | esac | |
1684 | eval enable_$ac_useropt=no ;; | |
1685 | ||
1686 | -docdir | --docdir | --docdi | --doc | --do) | |
1687 | ac_prev=docdir ;; | |
1688 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1689 | docdir=$ac_optarg ;; | |
1690 | ||
1691 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1692 | ac_prev=dvidir ;; | |
1693 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1694 | dvidir=$ac_optarg ;; | |
1695 | ||
1696 | -enable-* | --enable-*) | |
1697 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1698 | # Reject names that are not valid shell variable names. | |
1699 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1700 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1701 | ac_useropt_orig=$ac_useropt |
1702 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1703 | case $ac_user_opts in | |
1704 | *" | |
1705 | "enable_$ac_useropt" | |
1706 | "*) ;; | |
1707 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1708 | ac_unrecognized_sep=', ';; | |
1709 | esac | |
1710 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1711 | ||
1712 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1713 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1714 | | --exec | --exe | --ex) | |
1715 | ac_prev=exec_prefix ;; | |
1716 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1717 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1718 | | --exec=* | --exe=* | --ex=*) | |
1719 | exec_prefix=$ac_optarg ;; | |
1720 | ||
1721 | -gas | --gas | --ga | --g) | |
1722 | # Obsolete; use --with-gas. | |
1723 | with_gas=yes ;; | |
1724 | ||
1725 | -help | --help | --hel | --he | -h) | |
1726 | ac_init_help=long ;; | |
1727 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1728 | ac_init_help=recursive ;; | |
1729 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1730 | ac_init_help=short ;; | |
1731 | ||
1732 | -host | --host | --hos | --ho) | |
1733 | ac_prev=host_alias ;; | |
1734 | -host=* | --host=* | --hos=* | --ho=*) | |
1735 | host_alias=$ac_optarg ;; | |
1736 | ||
1737 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1738 | ac_prev=htmldir ;; | |
1739 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1740 | | --ht=*) | |
1741 | htmldir=$ac_optarg ;; | |
1742 | ||
1743 | -includedir | --includedir | --includedi | --included | --include \ | |
1744 | | --includ | --inclu | --incl | --inc) | |
1745 | ac_prev=includedir ;; | |
1746 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1747 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1748 | includedir=$ac_optarg ;; | |
1749 | ||
1750 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1751 | ac_prev=infodir ;; | |
1752 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1753 | infodir=$ac_optarg ;; | |
1754 | ||
1755 | -libdir | --libdir | --libdi | --libd) | |
1756 | ac_prev=libdir ;; | |
1757 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1758 | libdir=$ac_optarg ;; | |
1759 | ||
1760 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1761 | | --libexe | --libex | --libe) | |
1762 | ac_prev=libexecdir ;; | |
1763 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1764 | | --libexe=* | --libex=* | --libe=*) | |
1765 | libexecdir=$ac_optarg ;; | |
1766 | ||
1767 | -localedir | --localedir | --localedi | --localed | --locale) | |
1768 | ac_prev=localedir ;; | |
1769 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1770 | localedir=$ac_optarg ;; | |
1771 | ||
1772 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1773 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1774 | ac_prev=localstatedir ;; | |
1775 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1776 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1777 | localstatedir=$ac_optarg ;; | |
1778 | ||
1779 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1780 | ac_prev=mandir ;; | |
1781 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1782 | mandir=$ac_optarg ;; | |
1783 | ||
1784 | -nfp | --nfp | --nf) | |
1785 | # Obsolete; use --without-fp. | |
1786 | with_fp=no ;; | |
1787 | ||
1788 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1789 | | --no-cr | --no-c | -n) | |
1790 | no_create=yes ;; | |
1791 | ||
1792 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1793 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1794 | no_recursion=yes ;; | |
1795 | ||
1796 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1797 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1798 | | --oldin | --oldi | --old | --ol | --o) | |
1799 | ac_prev=oldincludedir ;; | |
1800 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1801 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1802 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1803 | oldincludedir=$ac_optarg ;; | |
1804 | ||
1805 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1806 | ac_prev=prefix ;; | |
1807 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1808 | prefix=$ac_optarg ;; | |
1809 | ||
1810 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1811 | | --program-pre | --program-pr | --program-p) | |
1812 | ac_prev=program_prefix ;; | |
1813 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1814 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1815 | program_prefix=$ac_optarg ;; | |
1816 | ||
1817 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1818 | | --program-suf | --program-su | --program-s) | |
1819 | ac_prev=program_suffix ;; | |
1820 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1821 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1822 | program_suffix=$ac_optarg ;; | |
1823 | ||
1824 | -program-transform-name | --program-transform-name \ | |
1825 | | --program-transform-nam | --program-transform-na \ | |
1826 | | --program-transform-n | --program-transform- \ | |
1827 | | --program-transform | --program-transfor \ | |
1828 | | --program-transfo | --program-transf \ | |
1829 | | --program-trans | --program-tran \ | |
1830 | | --progr-tra | --program-tr | --program-t) | |
1831 | ac_prev=program_transform_name ;; | |
1832 | -program-transform-name=* | --program-transform-name=* \ | |
1833 | | --program-transform-nam=* | --program-transform-na=* \ | |
1834 | | --program-transform-n=* | --program-transform-=* \ | |
1835 | | --program-transform=* | --program-transfor=* \ | |
1836 | | --program-transfo=* | --program-transf=* \ | |
1837 | | --program-trans=* | --program-tran=* \ | |
1838 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1839 | program_transform_name=$ac_optarg ;; | |
1840 | ||
1841 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1842 | ac_prev=pdfdir ;; | |
1843 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1844 | pdfdir=$ac_optarg ;; | |
1845 | ||
1846 | -psdir | --psdir | --psdi | --psd | --ps) | |
1847 | ac_prev=psdir ;; | |
1848 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1849 | psdir=$ac_optarg ;; | |
1850 | ||
1851 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1852 | | -silent | --silent | --silen | --sile | --sil) | |
1853 | silent=yes ;; | |
1854 | ||
1855 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1856 | ac_prev=sbindir ;; | |
1857 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1858 | | --sbi=* | --sb=*) | |
1859 | sbindir=$ac_optarg ;; | |
1860 | ||
1861 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1862 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1863 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1864 | | --sha | --sh) | |
1865 | ac_prev=sharedstatedir ;; | |
1866 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1867 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1868 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1869 | | --sha=* | --sh=*) | |
1870 | sharedstatedir=$ac_optarg ;; | |
1871 | ||
1872 | -site | --site | --sit) | |
1873 | ac_prev=site ;; | |
1874 | -site=* | --site=* | --sit=*) | |
1875 | site=$ac_optarg ;; | |
1876 | ||
1877 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1878 | ac_prev=srcdir ;; | |
1879 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1880 | srcdir=$ac_optarg ;; | |
1881 | ||
1882 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1883 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1884 | ac_prev=sysconfdir ;; | |
1885 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1886 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1887 | sysconfdir=$ac_optarg ;; | |
1888 | ||
1889 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1890 | ac_prev=target_alias ;; | |
1891 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1892 | target_alias=$ac_optarg ;; | |
1893 | ||
1894 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1895 | verbose=yes ;; | |
1896 | ||
1897 | -version | --version | --versio | --versi | --vers | -V) | |
1898 | ac_init_version=: ;; | |
1899 | ||
1900 | -with-* | --with-*) | |
1901 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1902 | # Reject names that are not valid shell variable names. | |
1903 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1904 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1905 | ac_useropt_orig=$ac_useropt |
1906 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1907 | case $ac_user_opts in | |
1908 | *" | |
1909 | "with_$ac_useropt" | |
1910 | "*) ;; | |
1911 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1912 | ac_unrecognized_sep=', ';; | |
1913 | esac | |
1914 | eval with_$ac_useropt=\$ac_optarg ;; | |
1915 | ||
1916 | -without-* | --without-*) | |
1917 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1918 | # Reject names that are not valid shell variable names. | |
1919 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1920 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1921 | ac_useropt_orig=$ac_useropt |
1922 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1923 | case $ac_user_opts in | |
1924 | *" | |
1925 | "with_$ac_useropt" | |
1926 | "*) ;; | |
1927 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1928 | ac_unrecognized_sep=', ';; | |
1929 | esac | |
1930 | eval with_$ac_useropt=no ;; | |
1931 | ||
1932 | --x) | |
1933 | # Obsolete; use --with-x. | |
1934 | with_x=yes ;; | |
1935 | ||
1936 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1937 | | --x-incl | --x-inc | --x-in | --x-i) | |
1938 | ac_prev=x_includes ;; | |
1939 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1940 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1941 | x_includes=$ac_optarg ;; | |
1942 | ||
1943 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1944 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1945 | ac_prev=x_libraries ;; | |
1946 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1947 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1948 | x_libraries=$ac_optarg ;; | |
1949 | ||
a9bec17c GM |
1950 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1951 | Try \`$0 --help' for more information." | |
067d23c9 KY |
1952 | ;; |
1953 | ||
1954 | *=*) | |
1955 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1956 | # Reject names that are not valid shell variable names. | |
1957 | case $ac_envvar in #( | |
1958 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
a9bec17c | 1959 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1960 | esac |
1961 | eval $ac_envvar=\$ac_optarg | |
1962 | export $ac_envvar ;; | |
1963 | ||
1964 | *) | |
1965 | # FIXME: should be removed in autoconf 3.0. | |
1966 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1967 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1968 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
a9bec17c | 1969 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1970 | ;; |
1971 | ||
1972 | esac | |
1973 | done | |
1974 | ||
1975 | if test -n "$ac_prev"; then | |
1976 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
a9bec17c | 1977 | as_fn_error "missing argument to $ac_option" |
067d23c9 KY |
1978 | fi |
1979 | ||
1980 | if test -n "$ac_unrecognized_opts"; then | |
1981 | case $enable_option_checking in | |
1982 | no) ;; | |
a9bec17c | 1983 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1984 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1985 | esac | |
1986 | fi | |
1987 | ||
1988 | # Check all directory arguments for consistency. | |
1989 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1990 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1991 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1992 | libdir localedir mandir | |
1993 | do | |
1994 | eval ac_val=\$$ac_var | |
1995 | # Remove trailing slashes. | |
1996 | case $ac_val in | |
1997 | */ ) | |
1998 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1999 | eval $ac_var=\$ac_val;; | |
2000 | esac | |
2001 | # Be sure to have absolute directory names. | |
2002 | case $ac_val in | |
2003 | [\\/$]* | ?:[\\/]* ) continue;; | |
2004 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
2005 | esac | |
a9bec17c | 2006 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
2007 | done |
2008 | ||
2009 | # There might be people who depend on the old broken behavior: `$host' | |
2010 | # used to hold the argument of --host etc. | |
2011 | # FIXME: To remove some day. | |
2012 | build=$build_alias | |
2013 | host=$host_alias | |
2014 | target=$target_alias | |
2015 | ||
2016 | # FIXME: To remove some day. | |
2017 | if test "x$host_alias" != x; then | |
2018 | if test "x$build_alias" = x; then | |
2019 | cross_compiling=maybe | |
a9bec17c GM |
2020 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
2021 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
067d23c9 KY |
2022 | elif test "x$build_alias" != "x$host_alias"; then |
2023 | cross_compiling=yes | |
2024 | fi | |
2025 | fi | |
2026 | ||
2027 | ac_tool_prefix= | |
2028 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
2029 | ||
2030 | test "$silent" = yes && exec 6>/dev/null | |
2031 | ||
2032 | ||
2033 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
2034 | ac_ls_di=`ls -di .` && | |
2035 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
a9bec17c | 2036 | as_fn_error "working directory cannot be determined" |
067d23c9 | 2037 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
a9bec17c | 2038 | as_fn_error "pwd does not report name of working directory" |
067d23c9 KY |
2039 | |
2040 | ||
2041 | # Find the source files, if location was not specified. | |
2042 | if test -z "$srcdir"; then | |
2043 | ac_srcdir_defaulted=yes | |
2044 | # Try the directory containing this script, then the parent directory. | |
2045 | ac_confdir=`$as_dirname -- "$as_myself" || | |
2046 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
2047 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
2048 | X"$as_myself" : 'X\(//\)$' \| \ | |
2049 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
2050 | $as_echo X"$as_myself" | | |
2051 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
2052 | s//\1/ | |
2053 | q | |
2054 | } | |
2055 | /^X\(\/\/\)[^/].*/{ | |
2056 | s//\1/ | |
2057 | q | |
2058 | } | |
2059 | /^X\(\/\/\)$/{ | |
2060 | s//\1/ | |
2061 | q | |
2062 | } | |
2063 | /^X\(\/\).*/{ | |
2064 | s//\1/ | |
2065 | q | |
2066 | } | |
2067 | s/.*/./; q'` | |
2068 | srcdir=$ac_confdir | |
2069 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2070 | srcdir=.. | |
2071 | fi | |
2072 | else | |
2073 | ac_srcdir_defaulted=no | |
2074 | fi | |
2075 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2076 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
a9bec17c | 2077 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
2078 | fi |
2079 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
2080 | ac_abs_confdir=`( | |
a9bec17c | 2081 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
067d23c9 KY |
2082 | pwd)` |
2083 | # When building in place, set srcdir=. | |
2084 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
2085 | srcdir=. | |
2086 | fi | |
2087 | # Remove unnecessary trailing slashes from srcdir. | |
2088 | # Double slashes in file names in object file debugging info | |
2089 | # mess up M-x gdb in Emacs. | |
2090 | case $srcdir in | |
2091 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
2092 | esac | |
2093 | for ac_var in $ac_precious_vars; do | |
2094 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
2095 | eval ac_env_${ac_var}_value=\$${ac_var} | |
2096 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
2097 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
2098 | done | |
2099 | ||
2100 | # | |
2101 | # Report the --help message. | |
2102 | # | |
2103 | if test "$ac_init_help" = "long"; then | |
2104 | # Omit some internal or obsolete options to make the list less imposing. | |
2105 | # This message is too long to be a string in the A/UX 3.1 sh. | |
2106 | cat <<_ACEOF | |
c574bc34 | 2107 | \`configure' configures emacs 24.3.50 to adapt to many kinds of systems. |
067d23c9 KY |
2108 | |
2109 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
2110 | ||
2111 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
2112 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
2113 | ||
2114 | Defaults for the options are specified in brackets. | |
2115 | ||
2116 | Configuration: | |
2117 | -h, --help display this help and exit | |
2118 | --help=short display options specific to this package | |
2119 | --help=recursive display the short help of all the included packages | |
2120 | -V, --version display version information and exit | |
a9bec17c | 2121 | -q, --quiet, --silent do not print \`checking...' messages |
067d23c9 KY |
2122 | --cache-file=FILE cache test results in FILE [disabled] |
2123 | -C, --config-cache alias for \`--cache-file=config.cache' | |
2124 | -n, --no-create do not create output files | |
2125 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
2126 | ||
2127 | Installation directories: | |
2128 | --prefix=PREFIX install architecture-independent files in PREFIX | |
2129 | [$ac_default_prefix] | |
2130 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
2131 | [PREFIX] | |
2132 | ||
2133 | By default, \`make install' will install all the files in | |
2134 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
2135 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
2136 | for instance \`--prefix=\$HOME'. | |
2137 | ||
2138 | For better control, use the options below. | |
2139 | ||
2140 | Fine tuning of the installation directories: | |
2141 | --bindir=DIR user executables [EPREFIX/bin] | |
2142 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
2143 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
2144 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
2145 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
2146 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
2147 | --libdir=DIR object code libraries [EPREFIX/lib] | |
2148 | --includedir=DIR C header files [PREFIX/include] | |
2149 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
2150 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
2151 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
2152 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
2153 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
2154 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
2155 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
2156 | --htmldir=DIR html documentation [DOCDIR] | |
2157 | --dvidir=DIR dvi documentation [DOCDIR] | |
2158 | --pdfdir=DIR pdf documentation [DOCDIR] | |
2159 | --psdir=DIR ps documentation [DOCDIR] | |
2160 | _ACEOF | |
2161 | ||
2162 | cat <<\_ACEOF | |
2163 | ||
2164 | Program names: | |
2165 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
2166 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
2167 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
2168 | ||
2169 | X features: | |
2170 | --x-includes=DIR X include files are in DIR | |
2171 | --x-libraries=DIR X library files are in DIR | |
2172 | ||
2173 | System types: | |
2174 | --build=BUILD configure for building on BUILD [guessed] | |
2175 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
2176 | _ACEOF | |
2177 | fi | |
2178 | ||
2179 | if test -n "$ac_init_help"; then | |
2180 | case $ac_init_help in | |
c574bc34 | 2181 | short | recursive ) echo "Configuration of emacs 24.3.50:";; |
067d23c9 KY |
2182 | esac |
2183 | cat <<\_ACEOF | |
2184 | ||
2185 | Optional Features: | |
2186 | --disable-option-checking ignore unrecognized --enable/--with options | |
2187 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2188 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
2189 | --disable-ns-self-contained | |
2190 | disable self contained build under NeXTstep | |
067d23c9 KY |
2191 | --enable-locallisppath=PATH |
2192 | directories Emacs should search for lisp files | |
2193 | specific to this site | |
2194 | --enable-checking[=LIST] | |
2195 | enable expensive run-time checks. With LIST, enable | |
2196 | only specific categories of checks. Categories are: | |
2197 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
7ee3791f | 2198 | stringfreelist, xmallocoverrun, conslist, glyphs |
afd07e01 GM |
2199 | --enable-check-lisp-object-type |
2200 | enable compile time checks for the Lisp_Object data | |
2201 | type. This is useful for development for catching | |
2202 | certain types of bugs. | |
3dc00ee8 GM |
2203 | --enable-profiling build emacs with low-level, gprof profiling support. |
2204 | Mainly useful for debugging Emacs itself. May not | |
2205 | work on all platforms. Stops profiler.el working. | |
067d23c9 KY |
2206 | --enable-autodepend automatically generate dependencies to .h-files. |
2207 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
2208 | Gcc is found | |
4efe5ef9 GM |
2209 | --enable-gtk-deprecation-warnings |
2210 | Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0 | |
743c80a7 PE |
2211 | --disable-dependency-tracking speeds up one-time build |
2212 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 | 2213 | --disable-largefile omit support for large files |
ac924f35 GM |
2214 | --enable-gcc-warnings turn on lots of GCC warnings/errors. This is |
2215 | intended for developers, and may generate false | |
2216 | alarms when used with older or non-GNU development | |
2217 | tools. | |
e4d35030 GM |
2218 | --enable-link-time-optimization |
2219 | build emacs with link-time optimization. This is | |
2220 | supported only for GCC since 4.5.0. | |
3a019ab4 | 2221 | --disable-acl do not support ACLs |
067d23c9 KY |
2222 | |
2223 | Optional Packages: | |
2224 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
2225 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
ee77919d GM |
2226 | --without-all omit almost all features and build small executable |
2227 | with minimal dependencies | |
067d23c9 KY |
2228 | --without-pop don't support POP mail retrieval with movemail |
2229 | --with-kerberos support Kerberos-authenticated POP | |
2230 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
2231 | --with-hesiod support Hesiod to get the POP server host | |
2232 | --with-mmdf support MMDF mailboxes | |
2233 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
2234 | --with-mailhost=HOSTNAME | |
2235 | string giving default POP mail host | |
2236 | --without-sound don't compile with sound support | |
4fa92495 GM |
2237 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, |
2238 | gtk3, lucid or athena, motif, no) | |
0442dc7f | 2239 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
067d23c9 KY |
2240 | --without-xpm don't compile with XPM image support |
2241 | --without-jpeg don't compile with JPEG image support | |
2242 | --without-tiff don't compile with TIFF image support | |
2243 | --without-gif don't compile with GIF image support | |
2244 | --without-png don't compile with PNG image support | |
2245 | --without-rsvg don't compile with SVG image support | |
2246 | --without-xml2 don't compile with XML parsing support | |
2247 | --without-imagemagick don't compile with ImageMagick image support | |
2248 | --without-xft don't use XFT for anti aliased fonts | |
2249 | --without-libotf don't use libotf for OpenType font support | |
2250 | --without-m17n-flt don't use m17n-flt for text shaping | |
2251 | --without-toolkit-scroll-bars | |
2252 | don't use Motif or Xaw3d scroll bars | |
2253 | --without-xaw3d don't use Xaw3d | |
2254 | --without-xim don't use X11 XIM | |
7834125e | 2255 | --with-ns use NeXTstep (Cocoa or GNUstep) windowing system |
7c61eaab | 2256 | --with-w32 use native MS Windows GUI in a Cygwin build |
067d23c9 KY |
2257 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux |
2258 | console | |
2259 | --without-dbus don't compile with D-Bus support | |
2260 | --without-gconf don't compile with GConf support | |
f527bd02 | 2261 | --without-gsettings don't compile with GSettings support |
067d23c9 KY |
2262 | --without-selinux don't compile with SELinux support |
2263 | --without-gnutls don't use -lgnutls for SSL/TLS support | |
0f55a32e GM |
2264 | --with-file-notification=LIB |
2265 | use a file notification library (LIB one of: yes, | |
2266 | gfile, inotify, w32, no) | |
067d23c9 KY |
2267 | --without-makeinfo don't require makeinfo for building manuals |
2268 | --without-compress-info don't compress the installed Info pages | |
b5591ebb GM |
2269 | --with-pkg-config-prog=FILENAME |
2270 | file name of pkg-config for finding GTK and librsvg | |
4fc5868a | 2271 | --with-gameuser=USER user for shared game score files |
b5591ebb GM |
2272 | --with-gnustep-conf=FILENAME |
2273 | name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
067d23c9 KY |
2274 | or /etc/GNUstep/GNUstep.conf |
2275 | --with-x use the X Window System | |
2276 | ||
2277 | Some influential environment variables: | |
2278 | CC C compiler command | |
2279 | CFLAGS C compiler flags | |
2280 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2281 | nonstandard directory <lib dir> | |
2282 | LIBS libraries to pass to the linker, e.g. -l<library> | |
2283 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
2284 | you have headers in a nonstandard directory <include dir> | |
2285 | CPP C preprocessor | |
2286 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
2287 | ||
2288 | Use these variables to override the choices made by `configure' or to help | |
2289 | it to find libraries and programs with nonstandard names/locations. | |
2290 | ||
2291 | Report bugs to the package provider. | |
2292 | _ACEOF | |
2293 | ac_status=$? | |
2294 | fi | |
2295 | ||
2296 | if test "$ac_init_help" = "recursive"; then | |
2297 | # If there are subdirs, report their specific --help. | |
2298 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2299 | test -d "$ac_dir" || | |
2300 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2301 | continue | |
2302 | ac_builddir=. | |
2303 | ||
2304 | case "$ac_dir" in | |
2305 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2306 | *) | |
2307 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2308 | # A ".." for each directory in $ac_dir_suffix. | |
2309 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2310 | case $ac_top_builddir_sub in | |
2311 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2312 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2313 | esac ;; | |
2314 | esac | |
2315 | ac_abs_top_builddir=$ac_pwd | |
2316 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2317 | # for backward compatibility: | |
2318 | ac_top_builddir=$ac_top_build_prefix | |
2319 | ||
2320 | case $srcdir in | |
2321 | .) # We are building in place. | |
2322 | ac_srcdir=. | |
2323 | ac_top_srcdir=$ac_top_builddir_sub | |
2324 | ac_abs_top_srcdir=$ac_pwd ;; | |
2325 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2326 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2327 | ac_top_srcdir=$srcdir | |
2328 | ac_abs_top_srcdir=$srcdir ;; | |
2329 | *) # Relative name. | |
2330 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2331 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2332 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2333 | esac | |
2334 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2335 | ||
2336 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2337 | # Check for guested configure. | |
2338 | if test -f "$ac_srcdir/configure.gnu"; then | |
2339 | echo && | |
2340 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2341 | elif test -f "$ac_srcdir/configure"; then | |
2342 | echo && | |
2343 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2344 | else | |
2345 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2346 | fi || ac_status=$? | |
2347 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2348 | done | |
2349 | fi | |
2350 | ||
2351 | test -n "$ac_init_help" && exit $ac_status | |
2352 | if $ac_init_version; then | |
2353 | cat <<\_ACEOF | |
c574bc34 | 2354 | emacs configure 24.3.50 |
a9bec17c | 2355 | generated by GNU Autoconf 2.65 |
067d23c9 | 2356 | |
a9bec17c | 2357 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
2358 | This configure script is free software; the Free Software Foundation |
2359 | gives unlimited permission to copy, distribute and modify it. | |
2360 | _ACEOF | |
2361 | exit | |
2362 | fi | |
2363 | ||
2364 | ## ------------------------ ## | |
2365 | ## Autoconf initialization. ## | |
2366 | ## ------------------------ ## | |
2367 | ||
2368 | # ac_fn_c_try_compile LINENO | |
2369 | # -------------------------- | |
2370 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2371 | ac_fn_c_try_compile () | |
2372 | { | |
2373 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2374 | rm -f conftest.$ac_objext | |
2375 | if { { ac_try="$ac_compile" | |
2376 | case "(($ac_try" in | |
2377 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2378 | *) ac_try_echo=$ac_try;; | |
2379 | esac | |
2380 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2381 | $as_echo "$ac_try_echo"; } >&5 | |
2382 | (eval "$ac_compile") 2>conftest.err | |
2383 | ac_status=$? | |
2384 | if test -s conftest.err; then | |
2385 | grep -v '^ *+' conftest.err >conftest.er1 | |
2386 | cat conftest.er1 >&5 | |
2387 | mv -f conftest.er1 conftest.err | |
2388 | fi | |
2389 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2390 | test $ac_status = 0; } && { | |
2391 | test -z "$ac_c_werror_flag" || | |
2392 | test ! -s conftest.err | |
2393 | } && test -s conftest.$ac_objext; then : | |
2394 | ac_retval=0 | |
2395 | else | |
2396 | $as_echo "$as_me: failed program was:" >&5 | |
2397 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2398 | ||
2399 | ac_retval=1 | |
2400 | fi | |
a9bec17c | 2401 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2402 | as_fn_set_status $ac_retval |
2403 | ||
2404 | } # ac_fn_c_try_compile | |
2405 | ||
067d23c9 KY |
2406 | # ac_fn_c_try_cpp LINENO |
2407 | # ---------------------- | |
2408 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2409 | ac_fn_c_try_cpp () | |
2410 | { | |
2411 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2412 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
2413 | case "(($ac_try" in | |
2414 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2415 | *) ac_try_echo=$ac_try;; | |
2416 | esac | |
2417 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2418 | $as_echo "$ac_try_echo"; } >&5 | |
2419 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
2420 | ac_status=$? | |
2421 | if test -s conftest.err; then | |
2422 | grep -v '^ *+' conftest.err >conftest.er1 | |
2423 | cat conftest.er1 >&5 | |
2424 | mv -f conftest.er1 conftest.err | |
2425 | fi | |
2426 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
a9bec17c | 2427 | test $ac_status = 0; } >/dev/null && { |
067d23c9 KY |
2428 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2429 | test ! -s conftest.err | |
2430 | }; then : | |
2431 | ac_retval=0 | |
2432 | else | |
2433 | $as_echo "$as_me: failed program was:" >&5 | |
2434 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2435 | ||
2436 | ac_retval=1 | |
2437 | fi | |
a9bec17c | 2438 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2439 | as_fn_set_status $ac_retval |
2440 | ||
2441 | } # ac_fn_c_try_cpp | |
2442 | ||
2443 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2444 | # ------------------------------------------------------- | |
2445 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2446 | # the include files in INCLUDES and setting the cache variable VAR | |
2447 | # accordingly. | |
2448 | ac_fn_c_check_header_mongrel () | |
2449 | { | |
2450 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
a9bec17c | 2451 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2453 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2454 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2455 | $as_echo_n "(cached) " >&6 |
2456 | fi | |
2457 | eval ac_res=\$$3 | |
2458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2459 | $as_echo "$ac_res" >&6; } | |
2460 | else | |
2461 | # Is the header compilable? | |
2462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2463 | $as_echo_n "checking $2 usability... " >&6; } | |
2464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2465 | /* end confdefs.h. */ | |
2466 | $4 | |
2467 | #include <$2> | |
2468 | _ACEOF | |
2469 | if ac_fn_c_try_compile "$LINENO"; then : | |
2470 | ac_header_compiler=yes | |
2471 | else | |
2472 | ac_header_compiler=no | |
2473 | fi | |
2474 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2476 | $as_echo "$ac_header_compiler" >&6; } | |
2477 | ||
2478 | # Is the header present? | |
2479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2480 | $as_echo_n "checking $2 presence... " >&6; } | |
2481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2482 | /* end confdefs.h. */ | |
2483 | #include <$2> | |
2484 | _ACEOF | |
2485 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2486 | ac_header_preproc=yes | |
2487 | else | |
2488 | ac_header_preproc=no | |
2489 | fi | |
a9bec17c | 2490 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2492 | $as_echo "$ac_header_preproc" >&6; } | |
2493 | ||
2494 | # So? What about this header? | |
2495 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2496 | yes:no: ) | |
2497 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2498 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2499 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2500 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2501 | ;; | |
2502 | no:yes:* ) | |
2503 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2504 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2505 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2506 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2507 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2508 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2509 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2510 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2511 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2512 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2513 | ;; | |
2514 | esac | |
2515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2516 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2517 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2518 | $as_echo_n "(cached) " >&6 |
2519 | else | |
2520 | eval "$3=\$ac_header_compiler" | |
2521 | fi | |
2522 | eval ac_res=\$$3 | |
2523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2524 | $as_echo "$ac_res" >&6; } | |
2525 | fi | |
a9bec17c | 2526 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2527 | |
2528 | } # ac_fn_c_check_header_mongrel | |
2529 | ||
2530 | # ac_fn_c_try_run LINENO | |
2531 | # ---------------------- | |
2532 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2533 | # that executables *can* be run. | |
2534 | ac_fn_c_try_run () | |
2535 | { | |
2536 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2537 | if { { ac_try="$ac_link" | |
2538 | case "(($ac_try" in | |
2539 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2540 | *) ac_try_echo=$ac_try;; | |
2541 | esac | |
2542 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2543 | $as_echo "$ac_try_echo"; } >&5 | |
2544 | (eval "$ac_link") 2>&5 | |
2545 | ac_status=$? | |
2546 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2547 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2548 | { { case "(($ac_try" in | |
2549 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2550 | *) ac_try_echo=$ac_try;; | |
2551 | esac | |
2552 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2553 | $as_echo "$ac_try_echo"; } >&5 | |
2554 | (eval "$ac_try") 2>&5 | |
2555 | ac_status=$? | |
2556 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2557 | test $ac_status = 0; }; }; then : | |
2558 | ac_retval=0 | |
2559 | else | |
2560 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2561 | $as_echo "$as_me: failed program was:" >&5 | |
2562 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2563 | ||
2564 | ac_retval=$ac_status | |
2565 | fi | |
2566 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2567 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2568 | as_fn_set_status $ac_retval |
2569 | ||
2570 | } # ac_fn_c_try_run | |
2571 | ||
2572 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2573 | # ------------------------------------------------------- | |
2574 | # Tests whether HEADER exists and can be compiled using the include files in | |
2575 | # INCLUDES, setting the cache variable VAR accordingly. | |
2576 | ac_fn_c_check_header_compile () | |
2577 | { | |
2578 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2580 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2581 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2582 | $as_echo_n "(cached) " >&6 |
2583 | else | |
2584 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2585 | /* end confdefs.h. */ | |
2586 | $4 | |
2587 | #include <$2> | |
2588 | _ACEOF | |
2589 | if ac_fn_c_try_compile "$LINENO"; then : | |
2590 | eval "$3=yes" | |
2591 | else | |
2592 | eval "$3=no" | |
2593 | fi | |
2594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2595 | fi | |
2596 | eval ac_res=\$$3 | |
2597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2598 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2599 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2600 | |
2601 | } # ac_fn_c_check_header_compile | |
2602 | ||
1fd182f0 PE |
2603 | # ac_fn_c_try_link LINENO |
2604 | # ----------------------- | |
2605 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2606 | ac_fn_c_try_link () | |
2607 | { | |
2608 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2609 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2610 | if { { ac_try="$ac_link" | |
2611 | case "(($ac_try" in | |
2612 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2613 | *) ac_try_echo=$ac_try;; | |
2614 | esac | |
2615 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2616 | $as_echo "$ac_try_echo"; } >&5 | |
2617 | (eval "$ac_link") 2>conftest.err | |
2618 | ac_status=$? | |
2619 | if test -s conftest.err; then | |
2620 | grep -v '^ *+' conftest.err >conftest.er1 | |
2621 | cat conftest.er1 >&5 | |
2622 | mv -f conftest.er1 conftest.err | |
2623 | fi | |
2624 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2625 | test $ac_status = 0; } && { | |
2626 | test -z "$ac_c_werror_flag" || | |
2627 | test ! -s conftest.err | |
2628 | } && test -s conftest$ac_exeext && { | |
2629 | test "$cross_compiling" = yes || | |
2630 | $as_test_x conftest$ac_exeext | |
2631 | }; then : | |
2632 | ac_retval=0 | |
2633 | else | |
2634 | $as_echo "$as_me: failed program was:" >&5 | |
2635 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2636 | ||
2637 | ac_retval=1 | |
2638 | fi | |
2639 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2640 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2641 | # interfere with the next link command; also delete a directory that is | |
2642 | # left behind by Apple's compiler. We do this before executing the actions. | |
2643 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2644 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2645 | as_fn_set_status $ac_retval |
2646 | ||
2647 | } # ac_fn_c_try_link | |
2648 | ||
42bbbe8b GM |
2649 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2650 | # ------------------------------------ | |
2651 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2652 | ac_fn_c_check_decl () | |
2653 | { | |
2654 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2656 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2657 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2658 | $as_echo_n "(cached) " >&6 | |
2659 | else | |
2660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2661 | /* end confdefs.h. */ | |
2662 | $4 | |
2663 | int | |
2664 | main () | |
2665 | { | |
2666 | #ifndef $2 | |
2667 | (void) $2; | |
2668 | #endif | |
2669 | ||
2670 | ; | |
2671 | return 0; | |
2672 | } | |
2673 | _ACEOF | |
2674 | if ac_fn_c_try_compile "$LINENO"; then : | |
2675 | eval "$3=yes" | |
2676 | else | |
2677 | eval "$3=no" | |
2678 | fi | |
2679 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2680 | fi | |
2681 | eval ac_res=\$$3 | |
2682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2683 | $as_echo "$ac_res" >&6; } | |
2684 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2685 | ||
2686 | } # ac_fn_c_check_decl | |
2687 | ||
5476a9a4 GM |
2688 | # ac_fn_c_check_header_preproc LINENO HEADER VAR |
2689 | # ---------------------------------------------- | |
2690 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2691 | ac_fn_c_check_header_preproc () | |
067d23c9 KY |
2692 | { |
2693 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2695 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2696 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2697 | $as_echo_n "(cached) " >&6 |
2698 | else | |
2699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2700 | /* end confdefs.h. */ | |
5476a9a4 GM |
2701 | #include <$2> |
2702 | _ACEOF | |
2703 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2704 | eval "$3=yes" | |
2705 | else | |
2706 | eval "$3=no" | |
2707 | fi | |
2708 | rm -f conftest.err conftest.$ac_ext | |
2709 | fi | |
2710 | eval ac_res=\$$3 | |
2711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2712 | $as_echo "$ac_res" >&6; } | |
2713 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
067d23c9 | 2714 | |
5476a9a4 | 2715 | } # ac_fn_c_check_header_preproc |
067d23c9 | 2716 | |
5476a9a4 GM |
2717 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2718 | # ---------------------------------------------------- | |
2719 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2720 | # INCLUDES, setting cache variable VAR accordingly. | |
2721 | ac_fn_c_check_member () | |
2722 | { | |
2723 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2725 | $as_echo_n "checking for $2.$3... " >&6; } | |
2726 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2727 | $as_echo_n "(cached) " >&6 | |
2728 | else | |
2729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2730 | /* end confdefs.h. */ | |
2731 | $5 | |
2732 | int | |
2733 | main () | |
2734 | { | |
2735 | static $2 ac_aggr; | |
2736 | if (ac_aggr.$3) | |
2737 | return 0; | |
2738 | ; | |
2739 | return 0; | |
2740 | } | |
2741 | _ACEOF | |
2742 | if ac_fn_c_try_compile "$LINENO"; then : | |
2743 | eval "$4=yes" | |
2744 | else | |
2745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2746 | /* end confdefs.h. */ | |
2747 | $5 | |
2748 | int | |
2749 | main () | |
2750 | { | |
2751 | static $2 ac_aggr; | |
2752 | if (sizeof ac_aggr.$3) | |
2753 | return 0; | |
2754 | ; | |
2755 | return 0; | |
2756 | } | |
2757 | _ACEOF | |
2758 | if ac_fn_c_try_compile "$LINENO"; then : | |
2759 | eval "$4=yes" | |
2760 | else | |
2761 | eval "$4=no" | |
2762 | fi | |
2763 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2764 | fi | |
2765 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2766 | fi | |
2767 | eval ac_res=\$$4 | |
2768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2769 | $as_echo "$ac_res" >&6; } | |
2770 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2771 | ||
2772 | } # ac_fn_c_check_member | |
2773 | ||
2774 | # ac_fn_c_check_func LINENO FUNC VAR | |
2775 | # ---------------------------------- | |
2776 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2777 | ac_fn_c_check_func () | |
2778 | { | |
2779 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2781 | $as_echo_n "checking for $2... " >&6; } | |
2782 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2783 | $as_echo_n "(cached) " >&6 | |
2784 | else | |
2785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2786 | /* end confdefs.h. */ | |
2787 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2788 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2789 | #define $2 innocuous_$2 | |
2790 | ||
2791 | /* System header to define __stub macros and hopefully few prototypes, | |
2792 | which can conflict with char $2 (); below. | |
2793 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2794 | <limits.h> exists even on freestanding compilers. */ | |
2795 | ||
2796 | #ifdef __STDC__ | |
067d23c9 KY |
2797 | # include <limits.h> |
2798 | #else | |
2799 | # include <assert.h> | |
2800 | #endif | |
2801 | ||
2802 | #undef $2 | |
2803 | ||
2804 | /* Override any GCC internal prototype to avoid an error. | |
2805 | Use char because int might match the return type of a GCC | |
2806 | builtin and then its argument prototype would still apply. */ | |
2807 | #ifdef __cplusplus | |
2808 | extern "C" | |
2809 | #endif | |
2810 | char $2 (); | |
2811 | /* The GNU C library defines this for functions which it implements | |
2812 | to always fail with ENOSYS. Some functions are actually named | |
2813 | something starting with __ and the normal name is an alias. */ | |
2814 | #if defined __stub_$2 || defined __stub___$2 | |
2815 | choke me | |
2816 | #endif | |
2817 | ||
2818 | int | |
2819 | main () | |
2820 | { | |
2821 | return $2 (); | |
2822 | ; | |
2823 | return 0; | |
2824 | } | |
2825 | _ACEOF | |
2826 | if ac_fn_c_try_link "$LINENO"; then : | |
2827 | eval "$3=yes" | |
2828 | else | |
2829 | eval "$3=no" | |
2830 | fi | |
2831 | rm -f core conftest.err conftest.$ac_objext \ | |
2832 | conftest$ac_exeext conftest.$ac_ext | |
2833 | fi | |
2834 | eval ac_res=\$$3 | |
2835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2836 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2837 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2838 | |
2839 | } # ac_fn_c_check_func | |
2840 | ||
5476a9a4 GM |
2841 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2842 | # ------------------------------------------- | |
2843 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2844 | # variable VAR accordingly. | |
2845 | ac_fn_c_check_type () | |
3e0be4ab GM |
2846 | { |
2847 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5476a9a4 GM |
2848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2849 | $as_echo_n "checking for $2... " >&6; } | |
2850 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
2851 | $as_echo_n "(cached) " >&6 |
2852 | else | |
5476a9a4 | 2853 | eval "$3=no" |
3e0be4ab GM |
2854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2855 | /* end confdefs.h. */ | |
5476a9a4 | 2856 | $4 |
3e0be4ab GM |
2857 | int |
2858 | main () | |
2859 | { | |
5476a9a4 GM |
2860 | if (sizeof ($2)) |
2861 | return 0; | |
3e0be4ab GM |
2862 | ; |
2863 | return 0; | |
2864 | } | |
2865 | _ACEOF | |
2866 | if ac_fn_c_try_compile "$LINENO"; then : | |
2867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2868 | /* end confdefs.h. */ | |
5476a9a4 | 2869 | $4 |
3e0be4ab GM |
2870 | int |
2871 | main () | |
2872 | { | |
5476a9a4 GM |
2873 | if (sizeof (($2))) |
2874 | return 0; | |
3e0be4ab GM |
2875 | ; |
2876 | return 0; | |
2877 | } | |
2878 | _ACEOF | |
2879 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 2880 | |
3e0be4ab | 2881 | else |
5476a9a4 | 2882 | eval "$3=yes" |
3e0be4ab GM |
2883 | fi |
2884 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2885 | fi | |
2886 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2887 | fi | |
5476a9a4 | 2888 | eval ac_res=\$$3 |
3e0be4ab GM |
2889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
2890 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2891 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
3e0be4ab | 2892 | |
5476a9a4 | 2893 | } # ac_fn_c_check_type |
3e0be4ab | 2894 | |
5f90be1b PE |
2895 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2896 | # -------------------------------------------- | |
2897 | # Tries to find the compile-time value of EXPR in a program that includes | |
2898 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2899 | # computed | |
2900 | ac_fn_c_compute_int () | |
2901 | { | |
2902 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2903 | if test "$cross_compiling" = yes; then | |
2904 | # Depending upon the size, compute the lo and hi bounds. | |
2905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2906 | /* end confdefs.h. */ | |
2907 | $4 | |
2908 | int | |
2909 | main () | |
2910 | { | |
2911 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2912 | test_array [0] = 0 | |
2913 | ||
2914 | ; | |
2915 | return 0; | |
2916 | } | |
2917 | _ACEOF | |
2918 | if ac_fn_c_try_compile "$LINENO"; then : | |
2919 | ac_lo=0 ac_mid=0 | |
2920 | while :; do | |
2921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2922 | /* end confdefs.h. */ | |
2923 | $4 | |
2924 | int | |
2925 | main () | |
2926 | { | |
2927 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2928 | test_array [0] = 0 | |
2929 | ||
2930 | ; | |
2931 | return 0; | |
2932 | } | |
2933 | _ACEOF | |
2934 | if ac_fn_c_try_compile "$LINENO"; then : | |
2935 | ac_hi=$ac_mid; break | |
2936 | else | |
2937 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2938 | if test $ac_lo -le $ac_mid; then | |
2939 | ac_lo= ac_hi= | |
2940 | break | |
2941 | fi | |
2942 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2943 | fi | |
2944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2945 | done | |
2946 | else | |
2947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2948 | /* end confdefs.h. */ | |
2949 | $4 | |
2950 | int | |
2951 | main () | |
2952 | { | |
2953 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2954 | test_array [0] = 0 | |
2955 | ||
2956 | ; | |
2957 | return 0; | |
2958 | } | |
2959 | _ACEOF | |
2960 | if ac_fn_c_try_compile "$LINENO"; then : | |
2961 | ac_hi=-1 ac_mid=-1 | |
2962 | while :; do | |
2963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2964 | /* end confdefs.h. */ | |
2965 | $4 | |
2966 | int | |
2967 | main () | |
2968 | { | |
2969 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2970 | test_array [0] = 0 | |
2971 | ||
2972 | ; | |
2973 | return 0; | |
2974 | } | |
2975 | _ACEOF | |
2976 | if ac_fn_c_try_compile "$LINENO"; then : | |
2977 | ac_lo=$ac_mid; break | |
2978 | else | |
2979 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2980 | if test $ac_mid -le $ac_hi; then | |
2981 | ac_lo= ac_hi= | |
2982 | break | |
2983 | fi | |
2984 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2985 | fi | |
2986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2987 | done | |
2988 | else | |
2989 | ac_lo= ac_hi= | |
2990 | fi | |
2991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2992 | fi | |
2993 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2994 | # Binary search between lo and hi bounds. | |
2995 | while test "x$ac_lo" != "x$ac_hi"; do | |
2996 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2998 | /* end confdefs.h. */ | |
2999 | $4 | |
3000 | int | |
3001 | main () | |
3002 | { | |
3003 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
3004 | test_array [0] = 0 | |
3005 | ||
3006 | ; | |
3007 | return 0; | |
3008 | } | |
3009 | _ACEOF | |
3010 | if ac_fn_c_try_compile "$LINENO"; then : | |
3011 | ac_hi=$ac_mid | |
3012 | else | |
3013 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
3014 | fi | |
3015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3016 | done | |
3017 | case $ac_lo in #(( | |
3018 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
3019 | '') ac_retval=1 ;; | |
3020 | esac | |
3021 | else | |
3022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3023 | /* end confdefs.h. */ | |
3024 | $4 | |
3025 | static long int longval () { return $2; } | |
3026 | static unsigned long int ulongval () { return $2; } | |
3027 | #include <stdio.h> | |
3028 | #include <stdlib.h> | |
3029 | int | |
3030 | main () | |
3031 | { | |
3032 | ||
3033 | FILE *f = fopen ("conftest.val", "w"); | |
3034 | if (! f) | |
3035 | return 1; | |
3036 | if (($2) < 0) | |
3037 | { | |
3038 | long int i = longval (); | |
3039 | if (i != ($2)) | |
3040 | return 1; | |
3041 | fprintf (f, "%ld", i); | |
3042 | } | |
3043 | else | |
3044 | { | |
3045 | unsigned long int i = ulongval (); | |
3046 | if (i != ($2)) | |
3047 | return 1; | |
3048 | fprintf (f, "%lu", i); | |
3049 | } | |
3050 | /* Do not output a trailing newline, as this causes \r\n confusion | |
3051 | on some platforms. */ | |
3052 | return ferror (f) || fclose (f) != 0; | |
3053 | ||
3054 | ; | |
3055 | return 0; | |
3056 | } | |
3057 | _ACEOF | |
3058 | if ac_fn_c_try_run "$LINENO"; then : | |
3059 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
3060 | else | |
3061 | ac_retval=1 | |
3062 | fi | |
3063 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
3064 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3065 | rm -f conftest.val | |
3066 | ||
3067 | fi | |
a9bec17c | 3068 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
5f90be1b PE |
3069 | as_fn_set_status $ac_retval |
3070 | ||
3071 | } # ac_fn_c_compute_int | |
067d23c9 KY |
3072 | cat >config.log <<_ACEOF |
3073 | This file contains any messages produced by compilers while | |
3074 | running configure, to aid debugging if configure makes a mistake. | |
3075 | ||
c574bc34 | 3076 | It was created by emacs $as_me 24.3.50, which was |
a9bec17c | 3077 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
3078 | |
3079 | $ $0 $@ | |
3080 | ||
3081 | _ACEOF | |
3082 | exec 5>>config.log | |
3083 | { | |
3084 | cat <<_ASUNAME | |
3085 | ## --------- ## | |
3086 | ## Platform. ## | |
3087 | ## --------- ## | |
3088 | ||
3089 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
3090 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
3091 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
3092 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
3093 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
3094 | ||
3095 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
3096 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
3097 | ||
3098 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
3099 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
3100 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
3101 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
3102 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
3103 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
3104 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
3105 | ||
3106 | _ASUNAME | |
3107 | ||
3108 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3109 | for as_dir in $PATH | |
3110 | do | |
3111 | IFS=$as_save_IFS | |
3112 | test -z "$as_dir" && as_dir=. | |
3113 | $as_echo "PATH: $as_dir" | |
3114 | done | |
3115 | IFS=$as_save_IFS | |
3116 | ||
3117 | } >&5 | |
3118 | ||
3119 | cat >&5 <<_ACEOF | |
3120 | ||
3121 | ||
3122 | ## ----------- ## | |
3123 | ## Core tests. ## | |
3124 | ## ----------- ## | |
3125 | ||
3126 | _ACEOF | |
3127 | ||
3128 | ||
3129 | # Keep a trace of the command line. | |
3130 | # Strip out --no-create and --no-recursion so they do not pile up. | |
3131 | # Strip out --silent because we don't want to record it for future runs. | |
3132 | # Also quote any args containing shell meta-characters. | |
3133 | # Make two passes to allow for proper duplicate-argument suppression. | |
3134 | ac_configure_args= | |
3135 | ac_configure_args0= | |
3136 | ac_configure_args1= | |
3137 | ac_must_keep_next=false | |
3138 | for ac_pass in 1 2 | |
3139 | do | |
3140 | for ac_arg | |
3141 | do | |
3142 | case $ac_arg in | |
3143 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
3144 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
3145 | | -silent | --silent | --silen | --sile | --sil) | |
3146 | continue ;; | |
3147 | *\'*) | |
3148 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3149 | esac | |
3150 | case $ac_pass in | |
3151 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
3152 | 2) | |
3153 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
3154 | if test $ac_must_keep_next = true; then | |
3155 | ac_must_keep_next=false # Got value, back to normal. | |
3156 | else | |
3157 | case $ac_arg in | |
3158 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
3159 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
3160 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
3161 | | -with-* | --with-* | -without-* | --without-* | --x) | |
3162 | case "$ac_configure_args0 " in | |
3163 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
3164 | esac | |
3165 | ;; | |
3166 | -* ) ac_must_keep_next=true ;; | |
3167 | esac | |
3168 | fi | |
3169 | as_fn_append ac_configure_args " '$ac_arg'" | |
3170 | ;; | |
3171 | esac | |
3172 | done | |
3173 | done | |
3174 | { ac_configure_args0=; unset ac_configure_args0;} | |
3175 | { ac_configure_args1=; unset ac_configure_args1;} | |
3176 | ||
3177 | # When interrupted or exit'd, cleanup temporary files, and complete | |
3178 | # config.log. We remove comments because anyway the quotes in there | |
3179 | # would cause problems or look ugly. | |
3180 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
3181 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
3182 | trap 'exit_status=$? | |
3183 | # Save into config.log some information that might help in debugging. | |
3184 | { | |
3185 | echo | |
3186 | ||
a9bec17c GM |
3187 | cat <<\_ASBOX |
3188 | ## ---------------- ## | |
067d23c9 | 3189 | ## Cache variables. ## |
a9bec17c GM |
3190 | ## ---------------- ## |
3191 | _ASBOX | |
067d23c9 KY |
3192 | echo |
3193 | # The following way of writing the cache mishandles newlines in values, | |
3194 | ( | |
3195 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
3196 | eval ac_val=\$$ac_var | |
3197 | case $ac_val in #( | |
3198 | *${as_nl}*) | |
3199 | case $ac_var in #( | |
3200 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
3201 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
3202 | esac | |
3203 | case $ac_var in #( | |
3204 | _ | IFS | as_nl) ;; #( | |
3205 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
3206 | *) { eval $ac_var=; unset $ac_var;} ;; | |
3207 | esac ;; | |
3208 | esac | |
3209 | done | |
3210 | (set) 2>&1 | | |
3211 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
3212 | *${as_nl}ac_space=\ *) | |
3213 | sed -n \ | |
3214 | "s/'\''/'\''\\\\'\'''\''/g; | |
3215 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
3216 | ;; #( | |
3217 | *) | |
3218 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
3219 | ;; | |
3220 | esac | | |
3221 | sort | |
3222 | ) | |
3223 | echo | |
3224 | ||
a9bec17c GM |
3225 | cat <<\_ASBOX |
3226 | ## ----------------- ## | |
067d23c9 | 3227 | ## Output variables. ## |
a9bec17c GM |
3228 | ## ----------------- ## |
3229 | _ASBOX | |
067d23c9 KY |
3230 | echo |
3231 | for ac_var in $ac_subst_vars | |
3232 | do | |
3233 | eval ac_val=\$$ac_var | |
3234 | case $ac_val in | |
3235 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3236 | esac | |
3237 | $as_echo "$ac_var='\''$ac_val'\''" | |
3238 | done | sort | |
3239 | echo | |
3240 | ||
3241 | if test -n "$ac_subst_files"; then | |
a9bec17c GM |
3242 | cat <<\_ASBOX |
3243 | ## ------------------- ## | |
067d23c9 | 3244 | ## File substitutions. ## |
a9bec17c GM |
3245 | ## ------------------- ## |
3246 | _ASBOX | |
067d23c9 KY |
3247 | echo |
3248 | for ac_var in $ac_subst_files | |
3249 | do | |
3250 | eval ac_val=\$$ac_var | |
3251 | case $ac_val in | |
3252 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3253 | esac | |
3254 | $as_echo "$ac_var='\''$ac_val'\''" | |
3255 | done | sort | |
3256 | echo | |
3257 | fi | |
3258 | ||
3259 | if test -s confdefs.h; then | |
a9bec17c GM |
3260 | cat <<\_ASBOX |
3261 | ## ----------- ## | |
067d23c9 | 3262 | ## confdefs.h. ## |
a9bec17c GM |
3263 | ## ----------- ## |
3264 | _ASBOX | |
067d23c9 KY |
3265 | echo |
3266 | cat confdefs.h | |
3267 | echo | |
3268 | fi | |
3269 | test "$ac_signal" != 0 && | |
3270 | $as_echo "$as_me: caught signal $ac_signal" | |
3271 | $as_echo "$as_me: exit $exit_status" | |
3272 | } >&5 | |
3273 | rm -f core *.core core.conftest.* && | |
3274 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3275 | exit $exit_status | |
3276 | ' 0 | |
3277 | for ac_signal in 1 2 13 15; do | |
3278 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3279 | done | |
3280 | ac_signal=0 | |
3281 | ||
3282 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3283 | rm -f -r conftest* confdefs.h | |
3284 | ||
3285 | $as_echo "/* confdefs.h */" > confdefs.h | |
3286 | ||
3287 | # Predefined preprocessor variables. | |
3288 | ||
3289 | cat >>confdefs.h <<_ACEOF | |
3290 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3291 | _ACEOF | |
3292 | ||
3293 | cat >>confdefs.h <<_ACEOF | |
3294 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3295 | _ACEOF | |
3296 | ||
3297 | cat >>confdefs.h <<_ACEOF | |
3298 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3299 | _ACEOF | |
3300 | ||
3301 | cat >>confdefs.h <<_ACEOF | |
3302 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3303 | _ACEOF | |
3304 | ||
3305 | cat >>confdefs.h <<_ACEOF | |
3306 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3307 | _ACEOF | |
3308 | ||
3309 | cat >>confdefs.h <<_ACEOF | |
3310 | #define PACKAGE_URL "$PACKAGE_URL" | |
3311 | _ACEOF | |
3312 | ||
3313 | ||
3314 | # Let the site file select an alternate cache file if it wants to. | |
3315 | # Prefer an explicitly selected file to automatically selected ones. | |
3316 | ac_site_file1=NONE | |
3317 | ac_site_file2=NONE | |
3318 | if test -n "$CONFIG_SITE"; then | |
a9bec17c | 3319 | ac_site_file1=$CONFIG_SITE |
067d23c9 KY |
3320 | elif test "x$prefix" != xNONE; then |
3321 | ac_site_file1=$prefix/share/config.site | |
3322 | ac_site_file2=$prefix/etc/config.site | |
3323 | else | |
3324 | ac_site_file1=$ac_default_prefix/share/config.site | |
3325 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3326 | fi | |
3327 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3328 | do | |
3329 | test "x$ac_site_file" = xNONE && continue | |
3330 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
3331 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
3332 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3333 | sed 's/^/| /' "$ac_site_file" >&5 | |
a9bec17c | 3334 | . "$ac_site_file" |
067d23c9 KY |
3335 | fi |
3336 | done | |
3337 | ||
3338 | if test -r "$cache_file"; then | |
3339 | # Some versions of bash will fail to source /dev/null (special files | |
3340 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3341 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
3342 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
3343 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3344 | case $cache_file in | |
3345 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3346 | *) . "./$cache_file";; | |
3347 | esac | |
3348 | fi | |
3349 | else | |
3350 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3351 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3352 | >$cache_file | |
3353 | fi | |
3354 | ||
5476a9a4 | 3355 | as_fn_append ac_header_list " sys/systeminfo.h" |
5476a9a4 GM |
3356 | as_fn_append ac_header_list " coff.h" |
3357 | as_fn_append ac_header_list " pty.h" | |
5476a9a4 GM |
3358 | as_fn_append ac_header_list " sys/resource.h" |
3359 | as_fn_append ac_header_list " sys/utsname.h" | |
3360 | as_fn_append ac_header_list " pwd.h" | |
3361 | as_fn_append ac_header_list " utmp.h" | |
5476a9a4 GM |
3362 | as_fn_append ac_header_list " util.h" |
3363 | as_fn_append ac_header_list " sys/socket.h" | |
3364 | as_fn_append ac_header_list " stdlib.h" | |
3365 | as_fn_append ac_header_list " unistd.h" | |
7e723570 | 3366 | as_fn_append ac_header_list " sys/param.h" |
5476a9a4 GM |
3367 | as_fn_append ac_header_list " pthread.h" |
3368 | as_fn_append ac_header_list " malloc/malloc.h" | |
3369 | as_fn_append ac_header_list " maillock.h" | |
3370 | as_fn_append ac_header_list " sys/un.h" | |
3371 | as_fn_append ac_func_list " tzset" | |
3372 | as_fn_append ac_func_list " readlinkat" | |
d7ad186c | 3373 | as_fn_append ac_header_list " dirent.h" |
8966cbff | 3374 | as_fn_append ac_header_list " execinfo.h" |
710f5812 | 3375 | as_fn_append ac_func_list " faccessat" |
0cdca42a | 3376 | as_fn_append ac_func_list " fcntl" |
d7ad186c | 3377 | as_fn_append ac_func_list " fdopendir" |
eda33f78 | 3378 | as_fn_append ac_header_list " stdio_ext.h" |
3bf26e96 | 3379 | as_fn_append ac_func_list " __fpending" |
d7ad186c | 3380 | as_fn_append ac_func_list " fstatat" |
2407788f | 3381 | as_fn_append ac_func_list " fsync" |
f199cab1 GM |
3382 | gl_getopt_required=GNU |
3383 | as_fn_append ac_header_list " getopt.h" | |
3384 | as_fn_append ac_func_list " gettimeofday" | |
3385 | as_fn_append ac_func_list " nanotime" | |
e700232f | 3386 | as_fn_append ac_header_list " sys/time.h" |
f199cab1 GM |
3387 | as_fn_append ac_header_list " wchar.h" |
3388 | as_fn_append ac_header_list " stdint.h" | |
3389 | as_fn_append ac_header_list " inttypes.h" | |
3390 | as_fn_append ac_func_list " lstat" | |
0cdca42a | 3391 | as_fn_append ac_func_list " pipe2" |
f199cab1 GM |
3392 | as_fn_append ac_header_list " sys/select.h" |
3393 | as_fn_append ac_func_list " pselect" | |
3394 | as_fn_append ac_func_list " pthread_sigmask" | |
3395 | as_fn_append ac_func_list " readlink" | |
f199cab1 GM |
3396 | as_fn_append ac_func_list " strtoimax" |
3397 | as_fn_append ac_func_list " strtoumax" | |
3398 | as_fn_append ac_func_list " symlink" | |
3399 | as_fn_append ac_header_list " sys/stat.h" | |
3400 | as_fn_append ac_func_list " localtime_r" | |
e700232f | 3401 | as_fn_append ac_header_list " utime.h" |
f199cab1 GM |
3402 | as_fn_append ac_func_list " futimes" |
3403 | as_fn_append ac_func_list " futimesat" | |
3404 | as_fn_append ac_func_list " futimens" | |
3405 | as_fn_append ac_func_list " utimensat" | |
3406 | as_fn_append ac_func_list " lutimes" | |
0cdca42a | 3407 | as_fn_append ac_func_list " getdtablesize" |
067d23c9 KY |
3408 | # Check that the precious variables saved in the cache have kept the same |
3409 | # value. | |
3410 | ac_cache_corrupted=false | |
3411 | for ac_var in $ac_precious_vars; do | |
3412 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3413 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3414 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3415 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3416 | case $ac_old_set,$ac_new_set in | |
3417 | set,) | |
3418 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3419 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3420 | ac_cache_corrupted=: ;; | |
3421 | ,set) | |
3422 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3423 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3424 | ac_cache_corrupted=: ;; | |
3425 | ,);; | |
3426 | *) | |
3427 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3428 | # differences in whitespace do not lead to failure. | |
3429 | ac_old_val_w=`echo x $ac_old_val` | |
3430 | ac_new_val_w=`echo x $ac_new_val` | |
3431 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3432 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3433 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3434 | ac_cache_corrupted=: | |
3435 | else | |
3436 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3437 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3438 | eval $ac_var=\$ac_old_val | |
3439 | fi | |
3440 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3441 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3442 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3443 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3444 | fi;; | |
3445 | esac | |
3446 | # Pass precious variables to config.status. | |
3447 | if test "$ac_new_set" = set; then | |
3448 | case $ac_new_val in | |
3449 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3450 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3451 | esac | |
3452 | case " $ac_configure_args " in | |
3453 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3454 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3455 | esac | |
3456 | fi | |
3457 | done | |
3458 | if $ac_cache_corrupted; then | |
3459 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3460 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3461 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3462 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
a9bec17c | 3463 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
3464 | fi |
3465 | ## -------------------- ## | |
3466 | ## Main body of script. ## | |
3467 | ## -------------------- ## | |
3468 | ||
3469 | ac_ext=c | |
3470 | ac_cpp='$CPP $CPPFLAGS' | |
3471 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3472 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3473 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3474 | ||
3475 | ||
2f559cd2 | 3476 | |
e25a10b7 | 3477 | emacs_config_options="$@" |
2f559cd2 GM |
3478 | ## Add some environment variables, if they were passed via the environment |
3479 | ## rather than on the command-line. | |
3480 | for var in CFLAGS CPPFLAGS LDFLAGS; do | |
3481 | case "$emacs_config_options" in | |
3482 | *$var=*) continue ;; | |
3483 | esac | |
3484 | eval val="\$${var}" | |
3485 | test x"$val" = x && continue | |
71b84316 | 3486 | emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\"" |
2f559cd2 GM |
3487 | done |
3488 | ||
067d23c9 KY |
3489 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" |
3490 | ||
3491 | ||
743c80a7 | 3492 | ac_aux_dir= |
369e19fc | 3493 | for ac_dir in build-aux "$srcdir"/build-aux; do |
a9bec17c GM |
3494 | for ac_t in install-sh install.sh shtool; do |
3495 | if test -f "$ac_dir/$ac_t"; then | |
3496 | ac_aux_dir=$ac_dir | |
3497 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3498 | break 2 | |
3499 | fi | |
3500 | done | |
743c80a7 PE |
3501 | done |
3502 | if test -z "$ac_aux_dir"; then | |
a9bec17c | 3503 | as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 |
743c80a7 | 3504 | fi |
067d23c9 | 3505 | |
743c80a7 PE |
3506 | # These three variables are undocumented and unsupported, |
3507 | # and are intended to be withdrawn in a future Autoconf release. | |
3508 | # They can cause serious problems if a builder's source tree is in a directory | |
3509 | # whose full name contains unusual characters. | |
3510 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3511 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3512 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 3513 | |
067d23c9 | 3514 | |
369e19fc PE |
3515 | am__api_version='1.11' |
3516 | ||
743c80a7 PE |
3517 | # Find a good install program. We prefer a C program (faster), |
3518 | # so one script is as good as another. But avoid the broken or | |
3519 | # incompatible versions: | |
3520 | # SysV /etc/install, /usr/sbin/install | |
3521 | # SunOS /usr/etc/install | |
3522 | # IRIX /sbin/install | |
3523 | # AIX /bin/install | |
3524 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
3525 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3526 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3527 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3528 | # OS/2's system install, which has a completely different semantic | |
3529 | # ./install, which can be erroneously created by make from ./install.sh. | |
3530 | # Reject install programs that cannot install multiple files. | |
3531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
3532 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
3533 | if test -z "$INSTALL"; then | |
a9bec17c | 3534 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
3535 | $as_echo_n "(cached) " >&6 |
3536 | else | |
3537 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3538 | for as_dir in $PATH | |
3539 | do | |
3540 | IFS=$as_save_IFS | |
3541 | test -z "$as_dir" && as_dir=. | |
3542 | # Account for people who put trailing slashes in PATH elements. | |
3543 | case $as_dir/ in #(( | |
3544 | ./ | .// | /[cC]/* | \ | |
3545 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3546 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
3547 | /usr/ucb/* ) ;; | |
3548 | *) | |
3549 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3550 | # Don't use installbsd from OSF since it installs stuff as root | |
3551 | # by default. | |
3552 | for ac_prog in ginstall scoinst install; do | |
3553 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3554 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
3555 | if test $ac_prog = install && | |
3556 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3557 | # AIX install. It has an incompatible calling convention. | |
3558 | : | |
3559 | elif test $ac_prog = install && | |
3560 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3561 | # program-specific install script used by HP pwplus--don't use. | |
3562 | : | |
3563 | else | |
3564 | rm -rf conftest.one conftest.two conftest.dir | |
3565 | echo one > conftest.one | |
3566 | echo two > conftest.two | |
3567 | mkdir conftest.dir | |
3568 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
3569 | test -s conftest.one && test -s conftest.two && | |
3570 | test -s conftest.dir/conftest.one && | |
3571 | test -s conftest.dir/conftest.two | |
3572 | then | |
3573 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3574 | break 3 | |
3575 | fi | |
3576 | fi | |
3577 | fi | |
3578 | done | |
3579 | done | |
3580 | ;; | |
3581 | esac | |
067d23c9 | 3582 | |
743c80a7 PE |
3583 | done |
3584 | IFS=$as_save_IFS | |
067d23c9 | 3585 | |
743c80a7 | 3586 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 3587 | |
067d23c9 | 3588 | fi |
743c80a7 PE |
3589 | if test "${ac_cv_path_install+set}" = set; then |
3590 | INSTALL=$ac_cv_path_install | |
3591 | else | |
3592 | # As a last resort, use the slow shell script. Don't cache a | |
3593 | # value for INSTALL within a source directory, because that will | |
3594 | # break other packages using the cache if that directory is | |
3595 | # removed, or if the value is a relative name. | |
3596 | INSTALL=$ac_install_sh | |
3597 | fi | |
067d23c9 | 3598 | fi |
743c80a7 PE |
3599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
3600 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 3601 | |
743c80a7 PE |
3602 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
3603 | # It thinks the first close brace ends the variable substitution. | |
3604 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 3605 | |
743c80a7 | 3606 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 3607 | |
743c80a7 | 3608 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 3609 | |
743c80a7 PE |
3610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
3611 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3612 | # Just in case | |
3613 | sleep 1 | |
3614 | echo timestamp > conftest.file | |
3615 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3616 | # name. Accept space and tab only in the latter. | |
3617 | am_lf=' | |
3618 | ' | |
3619 | case `pwd` in | |
3620 | *[\\\"\#\$\&\'\`$am_lf]*) | |
a9bec17c | 3621 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
3622 | esac |
3623 | case $srcdir in | |
3624 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
a9bec17c | 3625 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 3626 | esac |
067d23c9 | 3627 | |
743c80a7 PE |
3628 | # Do `set' in a subshell so we don't clobber the current shell's |
3629 | # arguments. Must try -L first in case configure is actually a | |
3630 | # symlink; some systems play weird games with the mod time of symlinks | |
3631 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3632 | # directory). | |
3633 | if ( | |
3634 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3635 | if test "$*" = "X"; then | |
3636 | # -L didn't work. | |
3637 | set X `ls -t "$srcdir/configure" conftest.file` | |
3638 | fi | |
3639 | rm -f conftest.file | |
3640 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3641 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3642 | ||
3643 | # If neither matched, then we have a broken ls. This can happen | |
3644 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3645 | # broken ls alias from the environment. This has actually | |
3646 | # happened. Such a system could not be considered "sane". | |
a9bec17c | 3647 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
743c80a7 PE |
3648 | alias in your environment" "$LINENO" 5 |
3649 | fi | |
067d23c9 | 3650 | |
743c80a7 PE |
3651 | test "$2" = conftest.file |
3652 | ) | |
3653 | then | |
3654 | # Ok. | |
3655 | : | |
067d23c9 | 3656 | else |
a9bec17c | 3657 | as_fn_error "newly created file is older than distributed files! |
743c80a7 | 3658 | Check your system clock" "$LINENO" 5 |
067d23c9 | 3659 | fi |
743c80a7 PE |
3660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3661 | $as_echo "yes" >&6; } | |
3662 | test "$program_prefix" != NONE && | |
3663 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3664 | # Use a double $ so make ignores it. | |
3665 | test "$program_suffix" != NONE && | |
3666 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3667 | # Double any \ or $. | |
3668 | # By default was `s,x,x', remove it if useless. | |
3669 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3670 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 3671 | |
743c80a7 PE |
3672 | # expand $ac_aux_dir to an absolute path |
3673 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 3674 | |
743c80a7 PE |
3675 | if test x"${MISSING+set}" != xset; then |
3676 | case $am_aux_dir in | |
3677 | *\ * | *\ *) | |
3678 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3679 | *) | |
3680 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3681 | esac | |
067d23c9 | 3682 | fi |
743c80a7 PE |
3683 | # Use eval to expand $SHELL |
3684 | if eval "$MISSING --run true"; then | |
3685 | am_missing_run="$MISSING --run " | |
067d23c9 | 3686 | else |
743c80a7 PE |
3687 | am_missing_run= |
3688 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
3689 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
3690 | fi |
3691 | ||
743c80a7 PE |
3692 | if test x"${install_sh}" != xset; then |
3693 | case $am_aux_dir in | |
3694 | *\ * | *\ *) | |
3695 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3696 | *) | |
3697 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3698 | esac | |
067d23c9 KY |
3699 | fi |
3700 | ||
743c80a7 PE |
3701 | # Installed binaries are usually stripped using `strip' when the user |
3702 | # run `make install-strip'. However `strip' might not be the right | |
3703 | # tool to use in cross-compilation environments, therefore Automake | |
3704 | # will honor the `STRIP' environment variable to overrule this program. | |
3705 | if test "$cross_compiling" != no; then | |
3706 | if test -n "$ac_tool_prefix"; then | |
3707 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3708 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3710 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3711 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 3712 | $as_echo_n "(cached) " >&6 |
067d23c9 | 3713 | else |
743c80a7 PE |
3714 | if test -n "$STRIP"; then |
3715 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3716 | else | |
3717 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3718 | for as_dir in $PATH | |
3719 | do | |
3720 | IFS=$as_save_IFS | |
3721 | test -z "$as_dir" && as_dir=. | |
3722 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3723 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3724 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3725 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3726 | break 2 | |
3727 | fi | |
3728 | done | |
3729 | done | |
3730 | IFS=$as_save_IFS | |
067d23c9 KY |
3731 | |
3732 | fi | |
067d23c9 | 3733 | fi |
743c80a7 PE |
3734 | STRIP=$ac_cv_prog_STRIP |
3735 | if test -n "$STRIP"; then | |
3736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3737 | $as_echo "$STRIP" >&6; } | |
3738 | else | |
3739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3740 | $as_echo "no" >&6; } | |
067d23c9 KY |
3741 | fi |
3742 | ||
3743 | ||
067d23c9 | 3744 | fi |
743c80a7 PE |
3745 | if test -z "$ac_cv_prog_STRIP"; then |
3746 | ac_ct_STRIP=$STRIP | |
3747 | # Extract the first word of "strip", so it can be a program name with args. | |
3748 | set dummy strip; ac_word=$2 | |
3749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3750 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3751 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
3752 | $as_echo_n "(cached) " >&6 |
3753 | else | |
3754 | if test -n "$ac_ct_STRIP"; then | |
3755 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3756 | else | |
3757 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3758 | for as_dir in $PATH | |
3759 | do | |
3760 | IFS=$as_save_IFS | |
3761 | test -z "$as_dir" && as_dir=. | |
3762 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3763 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3764 | ac_cv_prog_ac_ct_STRIP="strip" | |
3765 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3766 | break 2 | |
3767 | fi | |
3768 | done | |
3769 | done | |
3770 | IFS=$as_save_IFS | |
3771 | ||
3772 | fi | |
3773 | fi | |
3774 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3775 | if test -n "$ac_ct_STRIP"; then | |
3776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3777 | $as_echo "$ac_ct_STRIP" >&6; } | |
3778 | else | |
3779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3780 | $as_echo "no" >&6; } | |
3781 | fi | |
3782 | ||
3783 | if test "x$ac_ct_STRIP" = x; then | |
3784 | STRIP=":" | |
3785 | else | |
3786 | case $cross_compiling:$ac_tool_warned in | |
3787 | yes:) | |
3788 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3789 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3790 | ac_tool_warned=yes ;; | |
3791 | esac | |
3792 | STRIP=$ac_ct_STRIP | |
3793 | fi | |
3794 | else | |
3795 | STRIP="$ac_cv_prog_STRIP" | |
3796 | fi | |
3797 | ||
3798 | fi | |
3799 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3800 | ||
3801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3802 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3803 | if test -z "$MKDIR_P"; then | |
a9bec17c | 3804 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3805 | $as_echo_n "(cached) " >&6 |
3806 | else | |
3807 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3808 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3809 | do | |
3810 | IFS=$as_save_IFS | |
3811 | test -z "$as_dir" && as_dir=. | |
3812 | for ac_prog in mkdir gmkdir; do | |
3813 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3814 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3815 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3816 | 'mkdir (GNU coreutils) '* | \ | |
3817 | 'mkdir (coreutils) '* | \ | |
3818 | 'mkdir (fileutils) '4.1*) | |
3819 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3820 | break 3;; | |
3821 | esac | |
3822 | done | |
3823 | done | |
3824 | done | |
3825 | IFS=$as_save_IFS | |
3826 | ||
3827 | fi | |
3828 | ||
3829 | test -d ./--version && rmdir ./--version | |
3830 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3831 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3832 | else | |
3833 | # As a last resort, use the slow shell script. Don't cache a | |
3834 | # value for MKDIR_P within a source directory, because that will | |
3835 | # break other packages using the cache if that directory is | |
3836 | # removed, or if the value is a relative name. | |
3837 | MKDIR_P="$ac_install_sh -d" | |
3838 | fi | |
3839 | fi | |
3840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3841 | $as_echo "$MKDIR_P" >&6; } | |
3842 | ||
3843 | mkdir_p="$MKDIR_P" | |
3844 | case $mkdir_p in | |
3845 | [\\/$]* | ?:[\\/]*) ;; | |
3846 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3847 | esac | |
3848 | ||
3849 | for ac_prog in gawk mawk nawk awk | |
3850 | do | |
3851 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3852 | set dummy $ac_prog; ac_word=$2 | |
3853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3854 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3855 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3856 | $as_echo_n "(cached) " >&6 |
3857 | else | |
3858 | if test -n "$AWK"; then | |
3859 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3860 | else | |
3861 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3862 | for as_dir in $PATH | |
3863 | do | |
3864 | IFS=$as_save_IFS | |
3865 | test -z "$as_dir" && as_dir=. | |
3866 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3867 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3868 | ac_cv_prog_AWK="$ac_prog" | |
3869 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3870 | break 2 | |
3871 | fi | |
3872 | done | |
3873 | done | |
3874 | IFS=$as_save_IFS | |
3875 | ||
3876 | fi | |
3877 | fi | |
3878 | AWK=$ac_cv_prog_AWK | |
3879 | if test -n "$AWK"; then | |
3880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3881 | $as_echo "$AWK" >&6; } | |
3882 | else | |
3883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3884 | $as_echo "no" >&6; } | |
3885 | fi | |
3886 | ||
3887 | ||
3888 | test -n "$AWK" && break | |
3889 | done | |
3890 | ||
3891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3892 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3893 | set x ${MAKE-make} | |
3894 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
a9bec17c | 3895 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
3896 | $as_echo_n "(cached) " >&6 |
3897 | else | |
3898 | cat >conftest.make <<\_ACEOF | |
3899 | SHELL = /bin/sh | |
3900 | all: | |
3901 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3902 | _ACEOF | |
a9bec17c | 3903 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
743c80a7 PE |
3904 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
3905 | *@@@%%%=?*=@@@%%%*) | |
3906 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3907 | *) | |
3908 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3909 | esac | |
3910 | rm -f conftest.make | |
3911 | fi | |
3912 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3914 | $as_echo "yes" >&6; } | |
3915 | SET_MAKE= | |
3916 | else | |
3917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3918 | $as_echo "no" >&6; } | |
3919 | SET_MAKE="MAKE=${MAKE-make}" | |
3920 | fi | |
3921 | ||
3922 | rm -rf .tst 2>/dev/null | |
3923 | mkdir .tst 2>/dev/null | |
3924 | if test -d .tst; then | |
3925 | am__leading_dot=. | |
3926 | else | |
3927 | am__leading_dot=_ | |
3928 | fi | |
3929 | rmdir .tst 2>/dev/null | |
3930 | ||
3931 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3932 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3933 | # is not polluted with repeated "-I." | |
3934 | am__isrc=' -I$(srcdir)' | |
3935 | # test to see if srcdir already configured | |
3936 | if test -f $srcdir/config.status; then | |
a9bec17c | 3937 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
743c80a7 PE |
3938 | fi |
3939 | fi | |
3940 | ||
3941 | # test whether we have cygpath | |
3942 | if test -z "$CYGPATH_W"; then | |
3943 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3944 | CYGPATH_W='cygpath -w' | |
3945 | else | |
3946 | CYGPATH_W=echo | |
3947 | fi | |
3948 | fi | |
3949 | ||
3950 | ||
3951 | # Define the identity of the package. | |
3952 | PACKAGE='emacs' | |
c574bc34 | 3953 | VERSION='24.3.50' |
743c80a7 PE |
3954 | |
3955 | ||
3956 | cat >>confdefs.h <<_ACEOF | |
3957 | #define PACKAGE "$PACKAGE" | |
3958 | _ACEOF | |
3959 | ||
3960 | ||
3961 | cat >>confdefs.h <<_ACEOF | |
3962 | #define VERSION "$VERSION" | |
3963 | _ACEOF | |
3964 | ||
3965 | # Some tools Automake needs. | |
3966 | ||
3967 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3968 | ||
3969 | ||
3970 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3971 | ||
3972 | ||
3973 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3974 | ||
3975 | ||
3976 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3977 | ||
3978 | ||
3979 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3980 | ||
3981 | # We need awk for the "check" target. The system "awk" is bad on | |
3982 | # some platforms. | |
3983 | # Always define AMTAR for backward compatibility. | |
3984 | ||
3985 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3986 | ||
3987 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3988 | ||
3989 | ||
3990 | ||
3991 | ||
3992 | ||
3993 | ||
3994 | ||
3995 | ||
3996 | lispdir='${datadir}/emacs/${version}/lisp' | |
e1939eb1 | 3997 | leimdir='${datadir}/emacs/${version}/leim' |
397f7161 | 3998 | standardlisppath='${lispdir}:${leimdir}' |
743c80a7 PE |
3999 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ |
4000 | '${datadir}/emacs/site-lisp' | |
397f7161 | 4001 | lisppath='${locallisppath}:${standardlisppath}' |
743c80a7 PE |
4002 | etcdir='${datadir}/emacs/${version}/etc' |
4003 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
4004 | docdir='${datadir}/emacs/${version}/etc' | |
4005 | gamedir='${localstatedir}/games/emacs' | |
4006 | ||
ee77919d GM |
4007 | |
4008 | # Check whether --with-all was given. | |
4009 | if test "${with_all+set}" = set; then : | |
4010 | withval=$with_all; with_features=$withval | |
c0528ebe | 4011 | else |
ee77919d | 4012 | with_features=yes |
c0528ebe GM |
4013 | fi |
4014 | ||
4015 | ||
743c80a7 PE |
4016 | |
4017 | ||
4018 | ||
4019 | # Check whether --with-pop was given. | |
4020 | if test "${with_pop+set}" = set; then : | |
4021 | withval=$with_pop; | |
4022 | else | |
ee77919d | 4023 | with_pop=$with_features |
743c80a7 PE |
4024 | fi |
4025 | ||
4026 | if test "$with_pop" = yes; then | |
4027 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
4028 | ||
4029 | fi | |
4030 | ||
4031 | ||
4032 | # Check whether --with-kerberos was given. | |
4033 | if test "${with_kerberos+set}" = set; then : | |
4034 | withval=$with_kerberos; | |
4035 | else | |
4036 | with_kerberos=no | |
4037 | fi | |
4038 | ||
4039 | if test "$with_kerberos" != no; then | |
4040 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
4041 | ||
4042 | fi | |
4043 | ||
4044 | ||
4045 | # Check whether --with-kerberos5 was given. | |
4046 | if test "${with_kerberos5+set}" = set; then : | |
4047 | withval=$with_kerberos5; | |
4048 | else | |
4049 | with_kerberos5=no | |
4050 | fi | |
4051 | ||
4052 | if test "${with_kerberos5}" != no; then | |
4053 | if test "${with_kerberos}" = no; then | |
4054 | with_kerberos=yes | |
4055 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
4056 | ||
4057 | fi | |
4058 | ||
4059 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
4060 | ||
4061 | fi | |
4062 | ||
4063 | ||
4064 | # Check whether --with-hesiod was given. | |
4065 | if test "${with_hesiod+set}" = set; then : | |
4066 | withval=$with_hesiod; | |
4067 | else | |
4068 | with_hesiod=no | |
4069 | fi | |
4070 | ||
4071 | if test "$with_hesiod" != no; then | |
4072 | ||
4073 | $as_echo "#define HESIOD 1" >>confdefs.h | |
4074 | ||
4075 | fi | |
4076 | ||
4077 | ||
4078 | # Check whether --with-mmdf was given. | |
4079 | if test "${with_mmdf+set}" = set; then : | |
4080 | withval=$with_mmdf; | |
4081 | else | |
4082 | with_mmdf=no | |
4083 | fi | |
4084 | ||
4085 | if test "$with_mmdf" != no; then | |
4086 | ||
4087 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
4088 | ||
4089 | fi | |
4090 | ||
4091 | ||
4092 | # Check whether --with-mail-unlink was given. | |
4093 | if test "${with_mail_unlink+set}" = set; then : | |
4094 | withval=$with_mail_unlink; | |
4095 | else | |
4096 | with_mail_unlink=no | |
4097 | fi | |
4098 | ||
4099 | if test "$with_mail_unlink" != no; then | |
4100 | ||
4101 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
4102 | ||
4103 | fi | |
4104 | ||
4105 | ||
4106 | # Check whether --with-mailhost was given. | |
4107 | if test "${with_mailhost+set}" = set; then : | |
4108 | withval=$with_mailhost; | |
4109 | cat >>confdefs.h <<_ACEOF | |
4110 | #define MAILHOST "$withval" | |
4111 | _ACEOF | |
4112 | ||
4113 | fi | |
4114 | ||
4115 | ||
4116 | ||
067d23c9 KY |
4117 | # Check whether --with-sound was given. |
4118 | if test "${with_sound+set}" = set; then : | |
4119 | withval=$with_sound; | |
4120 | else | |
ee77919d | 4121 | with_sound=$with_features |
067d23c9 KY |
4122 | fi |
4123 | ||
4124 | ||
4125 | ||
067d23c9 KY |
4126 | # Check whether --with-x-toolkit was given. |
4127 | if test "${with_x_toolkit+set}" = set; then : | |
4128 | withval=$with_x_toolkit; case "${withval}" in | |
4129 | y | ye | yes ) val=gtk ;; | |
4130 | n | no ) val=no ;; | |
4131 | l | lu | luc | luci | lucid ) val=lucid ;; | |
4132 | a | at | ath | athe | athen | athena ) val=athena ;; | |
4133 | m | mo | mot | moti | motif ) val=motif ;; | |
4134 | g | gt | gtk ) val=gtk ;; | |
4fa92495 | 4135 | gtk2 ) val=gtk2 ;; |
067d23c9 KY |
4136 | gtk3 ) val=gtk3 ;; |
4137 | * ) | |
a9bec17c | 4138 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
4fa92495 GM |
4139 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk', |
4140 | \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms. | |
4141 | \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
067d23c9 KY |
4142 | ;; |
4143 | esac | |
4144 | with_x_toolkit=$val | |
4145 | ||
4146 | fi | |
4147 | ||
4148 | ||
4149 | ||
0442dc7f GM |
4150 | # Check whether --with-wide-int was given. |
4151 | if test "${with_wide_int+set}" = set; then : | |
4152 | withval=$with_wide_int; | |
4153 | else | |
4154 | with_wide_int=no | |
4155 | fi | |
4156 | ||
4157 | if test "$with_wide_int" = yes; then | |
4158 | ||
4159 | $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h | |
4160 | ||
4161 | fi | |
4162 | ||
4163 | ||
067d23c9 KY |
4164 | # Check whether --with-xpm was given. |
4165 | if test "${with_xpm+set}" = set; then : | |
4166 | withval=$with_xpm; | |
4167 | else | |
ee77919d | 4168 | with_xpm=$with_features |
067d23c9 KY |
4169 | fi |
4170 | ||
4171 | ||
4172 | # Check whether --with-jpeg was given. | |
4173 | if test "${with_jpeg+set}" = set; then : | |
4174 | withval=$with_jpeg; | |
4175 | else | |
ee77919d | 4176 | with_jpeg=$with_features |
067d23c9 KY |
4177 | fi |
4178 | ||
4179 | ||
4180 | # Check whether --with-tiff was given. | |
4181 | if test "${with_tiff+set}" = set; then : | |
4182 | withval=$with_tiff; | |
4183 | else | |
ee77919d | 4184 | with_tiff=$with_features |
067d23c9 KY |
4185 | fi |
4186 | ||
4187 | ||
4188 | # Check whether --with-gif was given. | |
4189 | if test "${with_gif+set}" = set; then : | |
4190 | withval=$with_gif; | |
4191 | else | |
ee77919d | 4192 | with_gif=$with_features |
067d23c9 KY |
4193 | fi |
4194 | ||
4195 | ||
4196 | # Check whether --with-png was given. | |
4197 | if test "${with_png+set}" = set; then : | |
4198 | withval=$with_png; | |
4199 | else | |
ee77919d | 4200 | with_png=$with_features |
067d23c9 KY |
4201 | fi |
4202 | ||
4203 | ||
4204 | # Check whether --with-rsvg was given. | |
4205 | if test "${with_rsvg+set}" = set; then : | |
4206 | withval=$with_rsvg; | |
4207 | else | |
ee77919d | 4208 | with_rsvg=$with_features |
067d23c9 KY |
4209 | fi |
4210 | ||
4211 | ||
4212 | # Check whether --with-xml2 was given. | |
4213 | if test "${with_xml2+set}" = set; then : | |
4214 | withval=$with_xml2; | |
4215 | else | |
ee77919d | 4216 | with_xml2=$with_features |
067d23c9 KY |
4217 | fi |
4218 | ||
4219 | ||
4220 | # Check whether --with-imagemagick was given. | |
4221 | if test "${with_imagemagick+set}" = set; then : | |
4222 | withval=$with_imagemagick; | |
4223 | else | |
ee77919d | 4224 | with_imagemagick=$with_features |
067d23c9 KY |
4225 | fi |
4226 | ||
4227 | ||
4228 | ||
4229 | # Check whether --with-xft was given. | |
4230 | if test "${with_xft+set}" = set; then : | |
4231 | withval=$with_xft; | |
4232 | else | |
ee77919d | 4233 | with_xft=$with_features |
067d23c9 KY |
4234 | fi |
4235 | ||
4236 | ||
4237 | # Check whether --with-libotf was given. | |
4238 | if test "${with_libotf+set}" = set; then : | |
4239 | withval=$with_libotf; | |
4240 | else | |
ee77919d | 4241 | with_libotf=$with_features |
067d23c9 KY |
4242 | fi |
4243 | ||
4244 | ||
4245 | # Check whether --with-m17n-flt was given. | |
4246 | if test "${with_m17n_flt+set}" = set; then : | |
4247 | withval=$with_m17n_flt; | |
4248 | else | |
ee77919d | 4249 | with_m17n_flt=$with_features |
067d23c9 KY |
4250 | fi |
4251 | ||
4252 | ||
4253 | ||
4254 | # Check whether --with-toolkit-scroll-bars was given. | |
4255 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
4256 | withval=$with_toolkit_scroll_bars; | |
4257 | else | |
ee77919d | 4258 | with_toolkit_scroll_bars=$with_features |
067d23c9 KY |
4259 | fi |
4260 | ||
4261 | ||
4262 | # Check whether --with-xaw3d was given. | |
4263 | if test "${with_xaw3d+set}" = set; then : | |
4264 | withval=$with_xaw3d; | |
4265 | else | |
ee77919d | 4266 | with_xaw3d=$with_features |
067d23c9 KY |
4267 | fi |
4268 | ||
4269 | ||
4270 | # Check whether --with-xim was given. | |
4271 | if test "${with_xim+set}" = set; then : | |
4272 | withval=$with_xim; | |
4273 | else | |
ee77919d | 4274 | with_xim=$with_features |
067d23c9 KY |
4275 | fi |
4276 | ||
4277 | ||
4278 | # Check whether --with-ns was given. | |
4279 | if test "${with_ns+set}" = set; then : | |
4280 | withval=$with_ns; | |
4281 | else | |
4282 | with_ns=no | |
4283 | fi | |
4284 | ||
4285 | ||
5c0255d9 GM |
4286 | # Check whether --with-w32 was given. |
4287 | if test "${with_w32+set}" = set; then : | |
4288 | withval=$with_w32; | |
4289 | else | |
4290 | with_w32=no | |
4291 | fi | |
4292 | ||
4293 | ||
067d23c9 KY |
4294 | |
4295 | # Check whether --with-gpm was given. | |
4296 | if test "${with_gpm+set}" = set; then : | |
4297 | withval=$with_gpm; | |
4298 | else | |
ee77919d | 4299 | with_gpm=$with_features |
067d23c9 KY |
4300 | fi |
4301 | ||
4302 | ||
4303 | # Check whether --with-dbus was given. | |
4304 | if test "${with_dbus+set}" = set; then : | |
4305 | withval=$with_dbus; | |
4306 | else | |
ee77919d | 4307 | with_dbus=$with_features |
067d23c9 KY |
4308 | fi |
4309 | ||
4310 | ||
4311 | # Check whether --with-gconf was given. | |
4312 | if test "${with_gconf+set}" = set; then : | |
4313 | withval=$with_gconf; | |
4314 | else | |
ee77919d | 4315 | with_gconf=$with_features |
067d23c9 KY |
4316 | fi |
4317 | ||
4318 | ||
f527bd02 GM |
4319 | # Check whether --with-gsettings was given. |
4320 | if test "${with_gsettings+set}" = set; then : | |
4321 | withval=$with_gsettings; | |
4322 | else | |
ee77919d | 4323 | with_gsettings=$with_features |
f527bd02 GM |
4324 | fi |
4325 | ||
4326 | ||
067d23c9 KY |
4327 | # Check whether --with-selinux was given. |
4328 | if test "${with_selinux+set}" = set; then : | |
4329 | withval=$with_selinux; | |
4330 | else | |
ee77919d | 4331 | with_selinux=$with_features |
067d23c9 KY |
4332 | fi |
4333 | ||
4334 | ||
4335 | # Check whether --with-gnutls was given. | |
4336 | if test "${with_gnutls+set}" = set; then : | |
4337 | withval=$with_gnutls; | |
4338 | else | |
ee77919d | 4339 | with_gnutls=$with_features |
067d23c9 KY |
4340 | fi |
4341 | ||
4342 | ||
0f55a32e GM |
4343 | |
4344 | # Check whether --with-file-notification was given. | |
4345 | if test "${with_file_notification+set}" = set; then : | |
4346 | withval=$with_file_notification; case "${withval}" in | |
4347 | y | ye | yes ) val=yes ;; | |
4348 | n | no ) val=no ;; | |
4349 | g | gf | gfi | gfil | gfile ) val=gfile ;; | |
4350 | i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;; | |
4351 | w | w3 | w32 ) val=w32 ;; | |
4352 | * ) as_fn_error "\`--with-file-notification=$withval' is invalid; | |
4353 | this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'. | |
6ee585de GM |
4354 | \`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep, |
4355 | otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5 | |
0f55a32e GM |
4356 | ;; |
4357 | esac | |
4358 | with_file_notification=$val | |
4359 | ||
b5eb356a | 4360 | else |
09220615 | 4361 | with_file_notification=$with_features |
b5eb356a GM |
4362 | fi |
4363 | ||
4364 | ||
067d23c9 KY |
4365 | ## For the times when you want to build Emacs but don't have |
4366 | ## a suitable makeinfo, and can live without the manuals. | |
4367 | ||
4368 | # Check whether --with-makeinfo was given. | |
4369 | if test "${with_makeinfo+set}" = set; then : | |
4370 | withval=$with_makeinfo; | |
4371 | else | |
ee77919d | 4372 | with_makeinfo=$with_features |
067d23c9 KY |
4373 | fi |
4374 | ||
4375 | ||
c3a461a5 GM |
4376 | ## Makefile.in needs the cache file name. |
4377 | ||
4378 | ||
067d23c9 KY |
4379 | ## This is an option because I do not know if all info/man support |
4380 | ## compressed files, nor how to test if they do so. | |
4381 | ||
4382 | # Check whether --with-compress-info was given. | |
4383 | if test "${with_compress_info+set}" = set; then : | |
4384 | withval=$with_compress_info; | |
4385 | else | |
ee77919d | 4386 | with_compress_info=$with_features |
067d23c9 KY |
4387 | fi |
4388 | ||
4389 | if test $with_compress_info = yes; then | |
4390 | GZIP_INFO=yes | |
4391 | else | |
4392 | GZIP_INFO= | |
4393 | fi | |
4394 | ||
4395 | ||
4396 | ||
4397 | # Check whether --with-pkg-config-prog was given. | |
4398 | if test "${with_pkg_config_prog+set}" = set; then : | |
4399 | withval=$with_pkg_config_prog; | |
4400 | fi | |
4401 | ||
4402 | if test "X${with_pkg_config_prog}" != X; then | |
4403 | if test "${with_pkg_config_prog}" != yes; then | |
4404 | PKG_CONFIG="${with_pkg_config_prog}" | |
4405 | fi | |
4406 | fi | |
4407 | ||
067d23c9 | 4408 | |
4fc5868a UM |
4409 | # Check whether --with-gameuser was given. |
4410 | if test "${with_gameuser+set}" = set; then : | |
4411 | withval=$with_gameuser; | |
4412 | fi | |
4413 | ||
4414 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
4415 | && gameuser="${with_gameuser}" | |
4416 | test "X$gameuser" = X && gameuser=games | |
4417 | ||
4418 | ||
067d23c9 KY |
4419 | # Check whether --with-gnustep-conf was given. |
4420 | if test "${with_gnustep_conf+set}" = set; then : | |
4421 | withval=$with_gnustep_conf; | |
4422 | fi | |
4423 | ||
4424 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
4425 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
4426 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
4427 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
4428 | ||
4429 | # Check whether --enable-ns-self-contained was given. | |
4430 | if test "${enable_ns_self_contained+set}" = set; then : | |
4431 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
4432 | else | |
4433 | EN_NS_SELF_CONTAINED=yes | |
4434 | fi | |
4435 | ||
4436 | ||
067d23c9 KY |
4437 | # Check whether --enable-locallisppath was given. |
4438 | if test "${enable_locallisppath+set}" = set; then : | |
4439 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
4440 | locallisppath= | |
4441 | elif test "${enableval}" != "yes"; then | |
4442 | locallisppath=${enableval} | |
4443 | fi | |
4444 | fi | |
4445 | ||
4446 | ||
4447 | # Check whether --enable-checking was given. | |
4448 | if test "${enable_checking+set}" = set; then : | |
4449 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
4450 | fi | |
4451 | ||
4452 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
4453 | for check in $ac_checking_flags | |
4454 | do | |
4455 | case $check in | |
4456 | # these set all the flags to specific states | |
4457 | yes) ac_enable_checking=1 ;; | |
4458 | no) ac_enable_checking= ; | |
4459 | ac_gc_check_stringbytes= ; | |
4460 | ac_gc_check_string_overrun= ; | |
4461 | ac_gc_check_string_free_list= ; | |
4462 | ac_xmalloc_overrun= ; | |
7ee3791f | 4463 | ac_gc_check_cons_list= ; |
e4d35030 | 4464 | ac_glyphs_debug= ;; |
067d23c9 KY |
4465 | all) ac_enable_checking=1 ; |
4466 | ac_gc_check_stringbytes=1 ; | |
4467 | ac_gc_check_string_overrun=1 ; | |
4468 | ac_gc_check_string_free_list=1 ; | |
4469 | ac_xmalloc_overrun=1 ; | |
7ee3791f | 4470 | ac_gc_check_cons_list=1 ; |
e4d35030 | 4471 | ac_glyphs_debug=1 ;; |
067d23c9 KY |
4472 | # these enable particular checks |
4473 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
4474 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
4475 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
4476 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
4477 | conslist) ac_gc_check_cons_list=1 ;; | |
e4d35030 | 4478 | glyphs) ac_glyphs_debug=1 ;; |
a9bec17c | 4479 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
4480 | esac |
4481 | done | |
4482 | IFS="$ac_save_IFS" | |
4483 | ||
4484 | if test x$ac_enable_checking != x ; then | |
4485 | ||
4486 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
4487 | ||
4488 | fi | |
4489 | if test x$ac_gc_check_stringbytes != x ; then | |
4490 | ||
4491 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
4492 | ||
4493 | fi | |
4fda9c95 | 4494 | if test x$ac_gc_check_string_overrun != x ; then |
067d23c9 KY |
4495 | |
4496 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
4497 | ||
4498 | fi | |
4499 | if test x$ac_gc_check_string_free_list != x ; then | |
4500 | ||
4501 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
4502 | ||
4503 | fi | |
4504 | if test x$ac_xmalloc_overrun != x ; then | |
4505 | ||
4506 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
4507 | ||
4508 | fi | |
4509 | if test x$ac_gc_check_cons_list != x ; then | |
4510 | ||
4511 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
4512 | ||
7ee3791f | 4513 | fi |
e4d35030 | 4514 | if test x$ac_glyphs_debug != x ; then |
7ee3791f GM |
4515 | |
4516 | $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h | |
4517 | ||
067d23c9 KY |
4518 | fi |
4519 | ||
afd07e01 GM |
4520 | # Check whether --enable-check-lisp-object-type was given. |
4521 | if test "${enable_check_lisp_object_type+set}" = set; then : | |
4522 | enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then | |
067d23c9 | 4523 | |
afd07e01 | 4524 | $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h |
067d23c9 KY |
4525 | |
4526 | fi | |
4527 | fi | |
4528 | ||
4529 | ||
4530 | ||
4531 | # Check whether --enable-profiling was given. | |
4532 | if test "${enable_profiling+set}" = set; then : | |
4533 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
4534 | fi | |
4535 | ||
4536 | if test x$ac_enable_profiling != x ; then | |
4537 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
4538 | else | |
4539 | PROFILING_CFLAGS= | |
4540 | fi | |
4541 | ||
4542 | ||
4543 | # Check whether --enable-autodepend was given. | |
4544 | if test "${enable_autodepend+set}" = set; then : | |
4545 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
4546 | else | |
4547 | ac_enable_autodepend=yes | |
4548 | fi | |
4549 | ||
4550 | ||
4efe5ef9 GM |
4551 | # Check whether --enable-gtk-deprecation-warnings was given. |
4552 | if test "${enable_gtk_deprecation_warnings+set}" = set; then : | |
4553 | enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}" | |
4554 | fi | |
4555 | ||
4556 | ||
067d23c9 | 4557 | #### Make srcdir absolute, if it isn't already. It's important to |
b5591ebb | 4558 | #### avoid running the file name through pwd unnecessarily, since pwd can |
067d23c9 KY |
4559 | #### give you automounter prefixes, which can go away. We do all this |
4560 | #### so Emacs can find its files when run uninstalled. | |
4561 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
4562 | unset CDPATH | |
4563 | case "${srcdir}" in | |
7c61eaab | 4564 | [\\/]* | ?:[\\/]*) ;; |
067d23c9 KY |
4565 | . ) |
4566 | ## We may be able to use the $PWD environment variable to make this | |
4567 | ## absolute. But sometimes PWD is inaccurate. | |
b5591ebb | 4568 | ## Note: we used to use $PWD at the end instead of `pwd`, |
067d23c9 KY |
4569 | ## but that tested only for a well-formed and valid PWD, |
4570 | ## it did not object when PWD was well-formed and valid but just wrong. | |
b5591ebb | 4571 | if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ; |
067d23c9 KY |
4572 | then |
4573 | srcdir="$PWD" | |
4574 | else | |
b5591ebb | 4575 | srcdir=`(cd "$srcdir"; pwd)` |
067d23c9 KY |
4576 | fi |
4577 | ;; | |
b5591ebb | 4578 | * ) srcdir=`(cd "$srcdir"; pwd)` ;; |
067d23c9 KY |
4579 | esac |
4580 | ||
067d23c9 KY |
4581 | ### Canonicalize the configuration name. |
4582 | ||
067d23c9 KY |
4583 | # Make sure we can run config.sub. |
4584 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
a9bec17c | 4585 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
4586 | |
4587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4588 | $as_echo_n "checking build system type... " >&6; } | |
a9bec17c | 4589 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
4590 | $as_echo_n "(cached) " >&6 |
4591 | else | |
4592 | ac_build_alias=$build_alias | |
4593 | test "x$ac_build_alias" = x && | |
4594 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4595 | test "x$ac_build_alias" = x && | |
a9bec17c | 4596 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 4597 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
a9bec17c | 4598 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
4599 | |
4600 | fi | |
4601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4602 | $as_echo "$ac_cv_build" >&6; } | |
4603 | case $ac_cv_build in | |
4604 | *-*-*) ;; | |
a9bec17c | 4605 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
4606 | esac |
4607 | build=$ac_cv_build | |
4608 | ac_save_IFS=$IFS; IFS='-' | |
4609 | set x $ac_cv_build | |
4610 | shift | |
4611 | build_cpu=$1 | |
4612 | build_vendor=$2 | |
4613 | shift; shift | |
4614 | # Remember, the first character of IFS is used to create $*, | |
4615 | # except with old shells: | |
4616 | build_os=$* | |
4617 | IFS=$ac_save_IFS | |
4618 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4619 | ||
4620 | ||
4621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4622 | $as_echo_n "checking host system type... " >&6; } | |
a9bec17c | 4623 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
4624 | $as_echo_n "(cached) " >&6 |
4625 | else | |
4626 | if test "x$host_alias" = x; then | |
4627 | ac_cv_host=$ac_cv_build | |
4628 | else | |
4629 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
a9bec17c | 4630 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
4631 | fi |
4632 | ||
4633 | fi | |
4634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4635 | $as_echo "$ac_cv_host" >&6; } | |
4636 | case $ac_cv_host in | |
4637 | *-*-*) ;; | |
a9bec17c | 4638 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
4639 | esac |
4640 | host=$ac_cv_host | |
4641 | ac_save_IFS=$IFS; IFS='-' | |
4642 | set x $ac_cv_host | |
4643 | shift | |
4644 | host_cpu=$1 | |
4645 | host_vendor=$2 | |
4646 | shift; shift | |
4647 | # Remember, the first character of IFS is used to create $*, | |
4648 | # except with old shells: | |
4649 | host_os=$* | |
4650 | IFS=$ac_save_IFS | |
4651 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4652 | ||
4653 | ||
4654 | canonical=$host | |
4655 | configuration=${host_alias-${build_alias-$host}} | |
4656 | ||
4657 | ||
4658 | ||
4659 | ### If you add support for a new configuration, add code to this | |
4660 | ### switch statement to recognize your configuration name and select | |
42bbbe8b | 4661 | ### the appropriate operating system file. |
067d23c9 | 4662 | |
42bbbe8b | 4663 | ### You would hope that you could choose an s/*.h |
067d23c9 | 4664 | ### file based on the operating system portion. However, it turns out |
42bbbe8b | 4665 | ### that each s/*.h file is pretty manufacturer-specific. |
067d23c9 KY |
4666 | ### So we basically have to have a special case for each |
4667 | ### configuration name. | |
4668 | ### | |
4669 | ### As far as handling version numbers on operating systems is | |
4670 | ### concerned, make sure things will fail in a fixable way. If | |
4671 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
4672 | ### prepared to handle anything reasonably. If version numbers | |
4673 | ### matter, be sure /etc/MACHINES says something about it. | |
4674 | ||
42bbbe8b | 4675 | opsys='' unported=no |
067d23c9 KY |
4676 | case "${canonical}" in |
4677 | ||
9b6e5515 GM |
4678 | ## GNU/Linux and similar ports |
4679 | *-*-linux* ) | |
d6a003a8 | 4680 | opsys=gnu-linux |
d6a003a8 AS |
4681 | ;; |
4682 | ||
067d23c9 KY |
4683 | ## FreeBSD ports |
4684 | *-*-freebsd* ) | |
4685 | opsys=freebsd | |
067d23c9 KY |
4686 | ;; |
4687 | ||
87e1a811 GM |
4688 | ## DragonFly ports |
4689 | *-*-dragonfly* ) | |
4690 | opsys=dragonfly | |
4691 | ;; | |
4692 | ||
067d23c9 KY |
4693 | ## FreeBSD kernel + glibc based userland |
4694 | *-*-kfreebsd*gnu* ) | |
4695 | opsys=gnu-kfreebsd | |
067d23c9 KY |
4696 | ;; |
4697 | ||
4698 | ## NetBSD ports | |
4699 | *-*-netbsd* ) | |
4700 | opsys=netbsd | |
067d23c9 KY |
4701 | ;; |
4702 | ||
4703 | ## OpenBSD ports | |
4704 | *-*-openbsd* ) | |
4705 | opsys=openbsd | |
067d23c9 KY |
4706 | ;; |
4707 | ||
067d23c9 KY |
4708 | ## Apple Darwin / Mac OS X |
4709 | *-apple-darwin* ) | |
4710 | case "${canonical}" in | |
42bbbe8b GM |
4711 | i[3456]86-* ) ;; |
4712 | powerpc-* ) ;; | |
4713 | x86_64-* ) ;; | |
067d23c9 KY |
4714 | * ) unported=yes ;; |
4715 | esac | |
4716 | opsys=darwin | |
adf4198e GM |
4717 | ## Use fink packages if available. |
4718 | ## FIXME find a better way to do this: http://debbugs.gnu.org/11507 | |
4719 | ## if test -d /sw/include && test -d /sw/lib; then | |
4720 | ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
4721 | ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
4722 | ## fi | |
067d23c9 KY |
4723 | ;; |
4724 | ||
8c35e3c3 GM |
4725 | ## Cygwin ports |
4726 | *-*-cygwin ) | |
4727 | opsys=cygwin | |
4728 | ;; | |
4729 | ||
067d23c9 KY |
4730 | ## HP 9000 series 700 and 800, running HP/UX |
4731 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4732 | opsys=hpux10-20 |
067d23c9 KY |
4733 | ;; |
4734 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4735 | opsys=hpux11 |
067d23c9 KY |
4736 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4737 | ;; | |
4738 | ||
067d23c9 | 4739 | ## IBM machines |
067d23c9 | 4740 | rs6000-ibm-aix4.[23]* ) |
42bbbe8b | 4741 | opsys=aix4-2 |
067d23c9 KY |
4742 | ;; |
4743 | powerpc-ibm-aix4.[23]* ) | |
42bbbe8b | 4744 | opsys=aix4-2 |
067d23c9 KY |
4745 | ;; |
4746 | rs6000-ibm-aix[56]* ) | |
42bbbe8b | 4747 | opsys=aix4-2 |
067d23c9 KY |
4748 | ;; |
4749 | powerpc-ibm-aix[56]* ) | |
42bbbe8b | 4750 | opsys=aix4-2 |
067d23c9 KY |
4751 | ;; |
4752 | ||
067d23c9 KY |
4753 | ## Silicon Graphics machines |
4754 | ## Iris 4D | |
4755 | mips-sgi-irix6.5 ) | |
fd44db7f | 4756 | opsys=irix6-5 |
067d23c9 KY |
4757 | # Without defining _LANGUAGE_C, things get masked out in the headers |
4758 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4759 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
067d23c9 KY |
4760 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" |
4761 | ;; | |
4762 | ||
4763 | ## Suns | |
067d23c9 KY |
4764 | *-sun-solaris* \ |
4765 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4766 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4767 | case "${canonical}" in | |
42bbbe8b GM |
4768 | i[3456]86-*-* ) ;; |
4769 | amd64-*-*|x86_64-*-*) ;; | |
4770 | sparc* ) ;; | |
067d23c9 KY |
4771 | * ) unported=yes ;; |
4772 | esac | |
4773 | case "${canonical}" in | |
4774 | *-sunos5.6* | *-solaris2.6* ) | |
4775 | opsys=sol2-6 | |
067d23c9 KY |
4776 | RANLIB="ar -ts" |
4777 | ;; | |
4778 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4779 | opsys=sol2-6 | |
4780 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4781 | ;; |
4782 | *-sunos5* | *-solaris* ) | |
4783 | opsys=sol2-10 | |
4784 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4785 | ;; |
4786 | esac | |
4787 | ## Watch out for a compiler that we know will not work. | |
4788 | case "${canonical}" in | |
4789 | *-solaris* | *-sunos5* ) | |
4790 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4791 | ## /usr/ucb/cc doesn't work; | |
4792 | ## we should find some other compiler that does work. | |
4793 | unset CC | |
4794 | fi | |
4795 | ;; | |
4796 | *) ;; | |
4797 | esac | |
4798 | ;; | |
4799 | ||
067d23c9 KY |
4800 | ## Intel 386 machines where we don't care about the manufacturer. |
4801 | i[3456]86-*-* ) | |
067d23c9 | 4802 | case "${canonical}" in |
5ec54608 | 4803 | *-darwin* ) opsys=darwin ;; |
7c61eaab GM |
4804 | *-mingw32 ) |
4805 | opsys=mingw32 | |
4806 | # MinGW overrides and adds some system headers in nt/inc. | |
4807 | GCC_TEST_OPTIONS="-I $srcdir/nt/inc" | |
4808 | ;; | |
5ec54608 GM |
4809 | *-sysv4.2uw* ) opsys=unixware ;; |
4810 | *-sysv5uw* ) opsys=unixware ;; | |
4811 | *-sysv5OpenUNIX* ) opsys=unixware ;; | |
067d23c9 KY |
4812 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
4813 | esac | |
4814 | ;; | |
4815 | ||
067d23c9 KY |
4816 | * ) |
4817 | unported=yes | |
4818 | ;; | |
4819 | esac | |
4820 | ||
4821 | ### If the code above didn't choose an operating system, just choose | |
4822 | ### an operating system based on the configuration name. You really | |
4823 | ### only want to use this when you have no idea what the right | |
4824 | ### operating system is; if you know what operating systems a machine | |
4825 | ### runs, it's cleaner to make it explicit in the case statement | |
4826 | ### above. | |
4827 | if test x"${opsys}" = x; then | |
4828 | case "${canonical}" in | |
4829 | *-gnu* ) opsys=gnu ;; | |
4830 | * ) | |
4831 | unported=yes | |
4832 | ;; | |
4833 | esac | |
4834 | fi | |
4835 | ||
4836 | ||
4837 | ||
4838 | if test $unported = yes; then | |
a9bec17c | 4839 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4840 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4841 | fi | |
4842 | ||
067d23c9 KY |
4843 | |
4844 | #### Choose a compiler. | |
067d23c9 KY |
4845 | |
4846 | ac_ext=c | |
4847 | ac_cpp='$CPP $CPPFLAGS' | |
4848 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4849 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4850 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4851 | if test -n "$ac_tool_prefix"; then | |
4852 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4853 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4855 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4856 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4857 | $as_echo_n "(cached) " >&6 |
4858 | else | |
4859 | if test -n "$CC"; then | |
4860 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4861 | else | |
4862 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4863 | for as_dir in $PATH | |
4864 | do | |
4865 | IFS=$as_save_IFS | |
4866 | test -z "$as_dir" && as_dir=. | |
4867 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4868 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4869 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4870 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4871 | break 2 | |
4872 | fi | |
4873 | done | |
4874 | done | |
4875 | IFS=$as_save_IFS | |
4876 | ||
4877 | fi | |
4878 | fi | |
4879 | CC=$ac_cv_prog_CC | |
4880 | if test -n "$CC"; then | |
4881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4882 | $as_echo "$CC" >&6; } | |
4883 | else | |
4884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4885 | $as_echo "no" >&6; } | |
4886 | fi | |
4887 | ||
4888 | ||
4889 | fi | |
4890 | if test -z "$ac_cv_prog_CC"; then | |
4891 | ac_ct_CC=$CC | |
4892 | # Extract the first word of "gcc", so it can be a program name with args. | |
4893 | set dummy gcc; ac_word=$2 | |
4894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4895 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4896 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4897 | $as_echo_n "(cached) " >&6 |
4898 | else | |
4899 | if test -n "$ac_ct_CC"; then | |
4900 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4901 | else | |
4902 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4903 | for as_dir in $PATH | |
4904 | do | |
4905 | IFS=$as_save_IFS | |
4906 | test -z "$as_dir" && as_dir=. | |
4907 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4908 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4909 | ac_cv_prog_ac_ct_CC="gcc" | |
4910 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4911 | break 2 | |
4912 | fi | |
4913 | done | |
4914 | done | |
4915 | IFS=$as_save_IFS | |
4916 | ||
4917 | fi | |
4918 | fi | |
4919 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4920 | if test -n "$ac_ct_CC"; then | |
4921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4922 | $as_echo "$ac_ct_CC" >&6; } | |
4923 | else | |
4924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4925 | $as_echo "no" >&6; } | |
4926 | fi | |
4927 | ||
4928 | if test "x$ac_ct_CC" = x; then | |
4929 | CC="" | |
4930 | else | |
4931 | case $cross_compiling:$ac_tool_warned in | |
4932 | yes:) | |
4933 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4934 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4935 | ac_tool_warned=yes ;; | |
4936 | esac | |
4937 | CC=$ac_ct_CC | |
4938 | fi | |
4939 | else | |
4940 | CC="$ac_cv_prog_CC" | |
4941 | fi | |
4942 | ||
4943 | if test -z "$CC"; then | |
4944 | if test -n "$ac_tool_prefix"; then | |
4945 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4946 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4948 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4949 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4950 | $as_echo_n "(cached) " >&6 |
4951 | else | |
4952 | if test -n "$CC"; then | |
4953 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4954 | else | |
4955 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4956 | for as_dir in $PATH | |
4957 | do | |
4958 | IFS=$as_save_IFS | |
4959 | test -z "$as_dir" && as_dir=. | |
4960 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4961 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4962 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4963 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4964 | break 2 | |
4965 | fi | |
4966 | done | |
4967 | done | |
4968 | IFS=$as_save_IFS | |
4969 | ||
4970 | fi | |
4971 | fi | |
4972 | CC=$ac_cv_prog_CC | |
4973 | if test -n "$CC"; then | |
4974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4975 | $as_echo "$CC" >&6; } | |
4976 | else | |
4977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4978 | $as_echo "no" >&6; } | |
4979 | fi | |
4980 | ||
4981 | ||
4982 | fi | |
4983 | fi | |
4984 | if test -z "$CC"; then | |
4985 | # Extract the first word of "cc", so it can be a program name with args. | |
4986 | set dummy cc; ac_word=$2 | |
4987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4988 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4989 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4990 | $as_echo_n "(cached) " >&6 |
4991 | else | |
4992 | if test -n "$CC"; then | |
4993 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4994 | else | |
4995 | ac_prog_rejected=no | |
4996 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4997 | for as_dir in $PATH | |
4998 | do | |
4999 | IFS=$as_save_IFS | |
5000 | test -z "$as_dir" && as_dir=. | |
5001 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5002 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5003 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
5004 | ac_prog_rejected=yes | |
5005 | continue | |
5006 | fi | |
5007 | ac_cv_prog_CC="cc" | |
5008 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5009 | break 2 | |
5010 | fi | |
5011 | done | |
5012 | done | |
5013 | IFS=$as_save_IFS | |
5014 | ||
5015 | if test $ac_prog_rejected = yes; then | |
5016 | # We found a bogon in the path, so make sure we never use it. | |
5017 | set dummy $ac_cv_prog_CC | |
5018 | shift | |
5019 | if test $# != 0; then | |
5020 | # We chose a different compiler from the bogus one. | |
5021 | # However, it has the same basename, so the bogon will be chosen | |
5022 | # first if we set CC to just the basename; use the full file name. | |
5023 | shift | |
5024 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
5025 | fi | |
5026 | fi | |
5027 | fi | |
5028 | fi | |
5029 | CC=$ac_cv_prog_CC | |
5030 | if test -n "$CC"; then | |
5031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
5032 | $as_echo "$CC" >&6; } | |
5033 | else | |
5034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5035 | $as_echo "no" >&6; } | |
5036 | fi | |
5037 | ||
5038 | ||
5039 | fi | |
5040 | if test -z "$CC"; then | |
5041 | if test -n "$ac_tool_prefix"; then | |
5042 | for ac_prog in cl.exe | |
5043 | do | |
5044 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
5045 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
5046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5047 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 5048 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
5049 | $as_echo_n "(cached) " >&6 |
5050 | else | |
5051 | if test -n "$CC"; then | |
5052 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
5053 | else | |
5054 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5055 | for as_dir in $PATH | |
5056 | do | |
5057 | IFS=$as_save_IFS | |
5058 | test -z "$as_dir" && as_dir=. | |
5059 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5060 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5061 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
5062 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5063 | break 2 | |
5064 | fi | |
5065 | done | |
5066 | done | |
5067 | IFS=$as_save_IFS | |
5068 | ||
5069 | fi | |
5070 | fi | |
5071 | CC=$ac_cv_prog_CC | |
5072 | if test -n "$CC"; then | |
5073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
5074 | $as_echo "$CC" >&6; } | |
5075 | else | |
5076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5077 | $as_echo "no" >&6; } | |
5078 | fi | |
5079 | ||
5080 | ||
5081 | test -n "$CC" && break | |
5082 | done | |
5083 | fi | |
5084 | if test -z "$CC"; then | |
5085 | ac_ct_CC=$CC | |
5086 | for ac_prog in cl.exe | |
5087 | do | |
5088 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5089 | set dummy $ac_prog; ac_word=$2 | |
5090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5091 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 5092 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
5093 | $as_echo_n "(cached) " >&6 |
5094 | else | |
5095 | if test -n "$ac_ct_CC"; then | |
5096 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
5097 | else | |
5098 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5099 | for as_dir in $PATH | |
5100 | do | |
5101 | IFS=$as_save_IFS | |
5102 | test -z "$as_dir" && as_dir=. | |
5103 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5104 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5105 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
5106 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5107 | break 2 | |
5108 | fi | |
5109 | done | |
5110 | done | |
5111 | IFS=$as_save_IFS | |
5112 | ||
5113 | fi | |
5114 | fi | |
5115 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
5116 | if test -n "$ac_ct_CC"; then | |
5117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
5118 | $as_echo "$ac_ct_CC" >&6; } | |
5119 | else | |
5120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5121 | $as_echo "no" >&6; } | |
5122 | fi | |
5123 | ||
5124 | ||
5125 | test -n "$ac_ct_CC" && break | |
5126 | done | |
5127 | ||
5128 | if test "x$ac_ct_CC" = x; then | |
5129 | CC="" | |
5130 | else | |
5131 | case $cross_compiling:$ac_tool_warned in | |
5132 | yes:) | |
5133 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5134 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5135 | ac_tool_warned=yes ;; | |
5136 | esac | |
5137 | CC=$ac_ct_CC | |
5138 | fi | |
5139 | fi | |
5140 | ||
5141 | fi | |
5142 | ||
5143 | ||
5144 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5145 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5146 | as_fn_error "no acceptable C compiler found in \$PATH |
5147 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5148 | |
5149 | # Provide some information about the compiler. | |
5150 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
5151 | set X $ac_compile | |
5152 | ac_compiler=$2 | |
5153 | for ac_option in --version -v -V -qversion; do | |
5154 | { { ac_try="$ac_compiler $ac_option >&5" | |
5155 | case "(($ac_try" in | |
5156 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5157 | *) ac_try_echo=$ac_try;; | |
5158 | esac | |
5159 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5160 | $as_echo "$ac_try_echo"; } >&5 | |
5161 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
5162 | ac_status=$? | |
5163 | if test -s conftest.err; then | |
5164 | sed '10a\ | |
5165 | ... rest of stderr output deleted ... | |
5166 | 10q' conftest.err >conftest.er1 | |
5167 | cat conftest.er1 >&5 | |
5168 | fi | |
5169 | rm -f conftest.er1 conftest.err | |
5170 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5171 | test $ac_status = 0; } | |
5172 | done | |
5173 | ||
5174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5175 | /* end confdefs.h. */ | |
5176 | ||
5177 | int | |
5178 | main () | |
5179 | { | |
5180 | ||
5181 | ; | |
5182 | return 0; | |
5183 | } | |
5184 | _ACEOF | |
5185 | ac_clean_files_save=$ac_clean_files | |
5186 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
5187 | # Try to create an executable without -o first, disregard a.out. | |
5188 | # It will help us diagnose broken compilers, and finding out an intuition | |
5189 | # of exeext. | |
5190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
5191 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
5192 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
5193 | ||
5194 | # The possible output files: | |
5195 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
5196 | ||
5197 | ac_rmfiles= | |
5198 | for ac_file in $ac_files | |
5199 | do | |
5200 | case $ac_file in | |
5201 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5202 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
5203 | esac | |
5204 | done | |
5205 | rm -f $ac_rmfiles | |
5206 | ||
5207 | if { { ac_try="$ac_link_default" | |
5208 | case "(($ac_try" in | |
5209 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5210 | *) ac_try_echo=$ac_try;; | |
5211 | esac | |
5212 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5213 | $as_echo "$ac_try_echo"; } >&5 | |
5214 | (eval "$ac_link_default") 2>&5 | |
5215 | ac_status=$? | |
5216 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5217 | test $ac_status = 0; }; then : | |
5218 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
5219 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
5220 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
5221 | # so that the user can short-circuit this test for compilers unknown to | |
5222 | # Autoconf. | |
5223 | for ac_file in $ac_files '' | |
5224 | do | |
5225 | test -f "$ac_file" || continue | |
5226 | case $ac_file in | |
5227 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
5228 | ;; | |
5229 | [ab].out ) | |
5230 | # We found the default executable, but exeext='' is most | |
5231 | # certainly right. | |
5232 | break;; | |
5233 | *.* ) | |
5234 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
5235 | then :; else | |
5236 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5237 | fi | |
5238 | # We set ac_cv_exeext here because the later test for it is not | |
5239 | # safe: cross compilers may not add the suffix if given an `-o' | |
5240 | # argument, so we may need to know it at that point already. | |
5241 | # Even if this section looks crufty: it has the advantage of | |
5242 | # actually working. | |
5243 | break;; | |
5244 | * ) | |
5245 | break;; | |
5246 | esac | |
5247 | done | |
5248 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5249 | ||
5250 | else | |
5251 | ac_file='' | |
5252 | fi | |
5253 | if test -z "$ac_file"; then : | |
5254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5255 | $as_echo "no" >&6; } | |
5256 | $as_echo "$as_me: failed program was:" >&5 | |
5257 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5258 | ||
5259 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5260 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5261 | { as_fn_set_status 77 |
5262 | as_fn_error "C compiler cannot create executables | |
5263 | See \`config.log' for more details." "$LINENO" 5; }; } | |
067d23c9 KY |
5264 | else |
5265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5266 | $as_echo "yes" >&6; } | |
5267 | fi | |
5268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
5269 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
5270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
5271 | $as_echo "$ac_file" >&6; } | |
5272 | ac_exeext=$ac_cv_exeext | |
5273 | ||
5274 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
5275 | ac_clean_files=$ac_clean_files_save | |
5276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
5277 | $as_echo_n "checking for suffix of executables... " >&6; } | |
5278 | if { { ac_try="$ac_link" | |
5279 | case "(($ac_try" in | |
5280 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5281 | *) ac_try_echo=$ac_try;; | |
5282 | esac | |
5283 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5284 | $as_echo "$ac_try_echo"; } >&5 | |
5285 | (eval "$ac_link") 2>&5 | |
5286 | ac_status=$? | |
5287 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5288 | test $ac_status = 0; }; then : | |
5289 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
5290 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
5291 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
5292 | # `rm'. | |
5293 | for ac_file in conftest.exe conftest conftest.*; do | |
5294 | test -f "$ac_file" || continue | |
5295 | case $ac_file in | |
5296 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5297 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5298 | break;; | |
5299 | * ) break;; | |
5300 | esac | |
5301 | done | |
5302 | else | |
5303 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5304 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5305 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
5306 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5307 | fi |
5308 | rm -f conftest conftest$ac_cv_exeext | |
5309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
5310 | $as_echo "$ac_cv_exeext" >&6; } | |
5311 | ||
5312 | rm -f conftest.$ac_ext | |
5313 | EXEEXT=$ac_cv_exeext | |
5314 | ac_exeext=$EXEEXT | |
5315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5316 | /* end confdefs.h. */ | |
5317 | #include <stdio.h> | |
5318 | int | |
5319 | main () | |
5320 | { | |
5321 | FILE *f = fopen ("conftest.out", "w"); | |
5322 | return ferror (f) || fclose (f) != 0; | |
5323 | ||
5324 | ; | |
5325 | return 0; | |
5326 | } | |
5327 | _ACEOF | |
5328 | ac_clean_files="$ac_clean_files conftest.out" | |
5329 | # Check that the compiler produces executables we can run. If not, either | |
5330 | # the compiler is broken, or we cross compile. | |
5331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
5332 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
5333 | if test "$cross_compiling" != yes; then | |
5334 | { { ac_try="$ac_link" | |
5335 | case "(($ac_try" in | |
5336 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5337 | *) ac_try_echo=$ac_try;; | |
5338 | esac | |
5339 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5340 | $as_echo "$ac_try_echo"; } >&5 | |
5341 | (eval "$ac_link") 2>&5 | |
5342 | ac_status=$? | |
5343 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5344 | test $ac_status = 0; } | |
5345 | if { ac_try='./conftest$ac_cv_exeext' | |
5346 | { { case "(($ac_try" in | |
5347 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5348 | *) ac_try_echo=$ac_try;; | |
5349 | esac | |
5350 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5351 | $as_echo "$ac_try_echo"; } >&5 | |
5352 | (eval "$ac_try") 2>&5 | |
5353 | ac_status=$? | |
5354 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5355 | test $ac_status = 0; }; }; then | |
5356 | cross_compiling=no | |
5357 | else | |
5358 | if test "$cross_compiling" = maybe; then | |
5359 | cross_compiling=yes | |
5360 | else | |
5361 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5362 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c | 5363 | as_fn_error "cannot run C compiled programs. |
067d23c9 | 5364 | If you meant to cross compile, use \`--host'. |
a9bec17c | 5365 | See \`config.log' for more details." "$LINENO" 5; } |
067d23c9 KY |
5366 | fi |
5367 | fi | |
5368 | fi | |
5369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
5370 | $as_echo "$cross_compiling" >&6; } | |
5371 | ||
5372 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
5373 | ac_clean_files=$ac_clean_files_save | |
5374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
5375 | $as_echo_n "checking for suffix of object files... " >&6; } | |
a9bec17c | 5376 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
5377 | $as_echo_n "(cached) " >&6 |
5378 | else | |
5379 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5380 | /* end confdefs.h. */ | |
5381 | ||
5382 | int | |
5383 | main () | |
5384 | { | |
5385 | ||
5386 | ; | |
5387 | return 0; | |
5388 | } | |
5389 | _ACEOF | |
5390 | rm -f conftest.o conftest.obj | |
5391 | if { { ac_try="$ac_compile" | |
5392 | case "(($ac_try" in | |
5393 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5394 | *) ac_try_echo=$ac_try;; | |
5395 | esac | |
5396 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5397 | $as_echo "$ac_try_echo"; } >&5 | |
5398 | (eval "$ac_compile") 2>&5 | |
5399 | ac_status=$? | |
5400 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5401 | test $ac_status = 0; }; then : | |
5402 | for ac_file in conftest.o conftest.obj conftest.*; do | |
5403 | test -f "$ac_file" || continue; | |
5404 | case $ac_file in | |
5405 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
5406 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
5407 | break;; | |
5408 | esac | |
5409 | done | |
5410 | else | |
5411 | $as_echo "$as_me: failed program was:" >&5 | |
5412 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5413 | ||
5414 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5415 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5416 | as_fn_error "cannot compute suffix of object files: cannot compile |
5417 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5418 | fi |
5419 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
5420 | fi | |
5421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
5422 | $as_echo "$ac_cv_objext" >&6; } | |
5423 | OBJEXT=$ac_cv_objext | |
5424 | ac_objext=$OBJEXT | |
5425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
5426 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
a9bec17c | 5427 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
5428 | $as_echo_n "(cached) " >&6 |
5429 | else | |
5430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5431 | /* end confdefs.h. */ | |
5432 | ||
5433 | int | |
5434 | main () | |
5435 | { | |
5436 | #ifndef __GNUC__ | |
5437 | choke me | |
5438 | #endif | |
5439 | ||
5440 | ; | |
5441 | return 0; | |
5442 | } | |
5443 | _ACEOF | |
5444 | if ac_fn_c_try_compile "$LINENO"; then : | |
5445 | ac_compiler_gnu=yes | |
5446 | else | |
5447 | ac_compiler_gnu=no | |
5448 | fi | |
5449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5450 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
5451 | ||
5452 | fi | |
5453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
5454 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
5455 | if test $ac_compiler_gnu = yes; then | |
5456 | GCC=yes | |
5457 | else | |
5458 | GCC= | |
5459 | fi | |
5460 | ac_test_CFLAGS=${CFLAGS+set} | |
5461 | ac_save_CFLAGS=$CFLAGS | |
5462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
5463 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
a9bec17c | 5464 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
5465 | $as_echo_n "(cached) " >&6 |
5466 | else | |
5467 | ac_save_c_werror_flag=$ac_c_werror_flag | |
5468 | ac_c_werror_flag=yes | |
5469 | ac_cv_prog_cc_g=no | |
5470 | CFLAGS="-g" | |
5471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5472 | /* end confdefs.h. */ | |
5473 | ||
5474 | int | |
5475 | main () | |
5476 | { | |
5477 | ||
5478 | ; | |
5479 | return 0; | |
5480 | } | |
5481 | _ACEOF | |
5482 | if ac_fn_c_try_compile "$LINENO"; then : | |
5483 | ac_cv_prog_cc_g=yes | |
5484 | else | |
5485 | CFLAGS="" | |
5486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5487 | /* end confdefs.h. */ | |
5488 | ||
5489 | int | |
5490 | main () | |
5491 | { | |
5492 | ||
5493 | ; | |
5494 | return 0; | |
5495 | } | |
5496 | _ACEOF | |
5497 | if ac_fn_c_try_compile "$LINENO"; then : | |
5498 | ||
5499 | else | |
5500 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5501 | CFLAGS="-g" | |
5502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5503 | /* end confdefs.h. */ | |
5504 | ||
5505 | int | |
5506 | main () | |
5507 | { | |
5508 | ||
5509 | ; | |
5510 | return 0; | |
5511 | } | |
5512 | _ACEOF | |
5513 | if ac_fn_c_try_compile "$LINENO"; then : | |
5514 | ac_cv_prog_cc_g=yes | |
5515 | fi | |
5516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5517 | fi | |
5518 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5519 | fi | |
5520 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5521 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5522 | fi | |
5523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
5524 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
5525 | if test "$ac_test_CFLAGS" = set; then | |
5526 | CFLAGS=$ac_save_CFLAGS | |
5527 | elif test $ac_cv_prog_cc_g = yes; then | |
5528 | if test "$GCC" = yes; then | |
5529 | CFLAGS="-g -O2" | |
5530 | else | |
5531 | CFLAGS="-g" | |
5532 | fi | |
5533 | else | |
5534 | if test "$GCC" = yes; then | |
5535 | CFLAGS="-O2" | |
5536 | else | |
5537 | CFLAGS= | |
5538 | fi | |
5539 | fi | |
5540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
5541 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 5542 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
5543 | $as_echo_n "(cached) " >&6 |
5544 | else | |
5545 | ac_cv_prog_cc_c89=no | |
5546 | ac_save_CC=$CC | |
5547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5548 | /* end confdefs.h. */ | |
5549 | #include <stdarg.h> | |
5550 | #include <stdio.h> | |
5551 | #include <sys/types.h> | |
5552 | #include <sys/stat.h> | |
5553 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5554 | struct buf { int x; }; | |
5555 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5556 | static char *e (p, i) | |
5557 | char **p; | |
5558 | int i; | |
5559 | { | |
5560 | return p[i]; | |
5561 | } | |
5562 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5563 | { | |
5564 | char *s; | |
5565 | va_list v; | |
5566 | va_start (v,p); | |
5567 | s = g (p, va_arg (v,int)); | |
5568 | va_end (v); | |
5569 | return s; | |
5570 | } | |
5571 | ||
5572 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5573 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5574 | These don't provoke an error unfortunately, instead are silently treated | |
5575 | as 'x'. The following induces an error, until -std is added to get | |
5576 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5577 | array size at least. It's necessary to write '\x00'==0 to get something | |
5578 | that's true only with -std. */ | |
5579 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5580 | ||
5581 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5582 | inside strings and character constants. */ | |
5583 | #define FOO(x) 'x' | |
5584 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
5585 | ||
5586 | int test (int i, double x); | |
5587 | struct s1 {int (*f) (int a);}; | |
5588 | struct s2 {int (*f) (double a);}; | |
5589 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5590 | int argc; | |
5591 | char **argv; | |
5592 | int | |
5593 | main () | |
5594 | { | |
5595 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5596 | ; | |
5597 | return 0; | |
5598 | } | |
5599 | _ACEOF | |
5600 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
5601 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5602 | do | |
5603 | CC="$ac_save_CC $ac_arg" | |
5604 | if ac_fn_c_try_compile "$LINENO"; then : | |
5605 | ac_cv_prog_cc_c89=$ac_arg | |
5606 | fi | |
5607 | rm -f core conftest.err conftest.$ac_objext | |
5608 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5609 | done | |
743c80a7 PE |
5610 | rm -f conftest.$ac_ext |
5611 | CC=$ac_save_CC | |
5612 | ||
5613 | fi | |
5614 | # AC_CACHE_VAL | |
5615 | case "x$ac_cv_prog_cc_c89" in | |
5616 | x) | |
5617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5618 | $as_echo "none needed" >&6; } ;; | |
5619 | xno) | |
5620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5621 | $as_echo "unsupported" >&6; } ;; | |
5622 | *) | |
5623 | CC="$CC $ac_cv_prog_cc_c89" | |
5624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5625 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5626 | esac | |
5627 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5628 | ||
5629 | fi | |
5630 | ||
5631 | ac_ext=c | |
5632 | ac_cpp='$CPP $CPPFLAGS' | |
5633 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5634 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5635 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5636 | DEPDIR="${am__leading_dot}deps" | |
5637 | ||
5638 | ac_config_commands="$ac_config_commands depfiles" | |
5639 | ||
5640 | ||
5641 | am_make=${MAKE-make} | |
5642 | cat > confinc << 'END' | |
5643 | am__doit: | |
5644 | @echo this is the am__doit target | |
5645 | .PHONY: am__doit | |
5646 | END | |
5647 | # If we don't find an include directive, just comment out the code. | |
5648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
5649 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
5650 | am__include="#" | |
5651 | am__quote= | |
5652 | _am_result=none | |
5653 | # First try GNU make style include. | |
5654 | echo "include confinc" > confmf | |
5655 | # Ignore all kinds of additional output from `make'. | |
5656 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5657 | *the\ am__doit\ target*) | |
5658 | am__include=include | |
5659 | am__quote= | |
5660 | _am_result=GNU | |
5661 | ;; | |
5662 | esac | |
5663 | # Now try BSD make style include. | |
5664 | if test "$am__include" = "#"; then | |
5665 | echo '.include "confinc"' > confmf | |
5666 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5667 | *the\ am__doit\ target*) | |
5668 | am__include=.include | |
5669 | am__quote="\"" | |
5670 | _am_result=BSD | |
5671 | ;; | |
5672 | esac | |
5673 | fi | |
5674 | ||
5675 | ||
5676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
5677 | $as_echo "$_am_result" >&6; } | |
5678 | rm -f confinc confmf | |
5679 | ||
5680 | # Check whether --enable-dependency-tracking was given. | |
5681 | if test "${enable_dependency_tracking+set}" = set; then : | |
5682 | enableval=$enable_dependency_tracking; | |
5683 | fi | |
5684 | ||
5685 | if test "x$enable_dependency_tracking" != xno; then | |
5686 | am_depcomp="$ac_aux_dir/depcomp" | |
5687 | AMDEPBACKSLASH='\' | |
5688 | fi | |
5689 | if test "x$enable_dependency_tracking" != xno; then | |
5690 | AMDEP_TRUE= | |
5691 | AMDEP_FALSE='#' | |
5692 | else | |
5693 | AMDEP_TRUE='#' | |
5694 | AMDEP_FALSE= | |
5695 | fi | |
5696 | ||
5697 | ||
5698 | ||
5699 | depcc="$CC" am_compiler_list= | |
5700 | ||
5701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
5702 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
a9bec17c | 5703 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
5704 | $as_echo_n "(cached) " >&6 |
5705 | else | |
5706 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5707 | # We make a subdir and do the tests there. Otherwise we can end up | |
5708 | # making bogus files that we don't know about and never remove. For | |
5709 | # instance it was reported that on HP-UX the gcc test will end up | |
5710 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5711 | # in D'. | |
5712 | mkdir conftest.dir | |
5713 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5714 | # using a relative directory. | |
5715 | cp "$am_depcomp" conftest.dir | |
5716 | cd conftest.dir | |
5717 | # We will build objects and dependencies in a subdirectory because | |
5718 | # it helps to detect inapplicable dependency modes. For instance | |
5719 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5720 | # side effect of compilation, but ICC will put the dependencies in | |
5721 | # the current directory while Tru64 will put them in the object | |
5722 | # directory. | |
5723 | mkdir sub | |
5724 | ||
5725 | am_cv_CC_dependencies_compiler_type=none | |
5726 | if test "$am_compiler_list" = ""; then | |
5727 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5728 | fi | |
5729 | am__universal=false | |
5730 | case " $depcc " in #( | |
5731 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5732 | esac | |
5733 | ||
5734 | for depmode in $am_compiler_list; do | |
5735 | # Setup a source with many dependencies, because some compilers | |
5736 | # like to wrap large dependency lists on column 80 (with \), and | |
5737 | # we should not choose a depcomp mode which is confused by this. | |
5738 | # | |
5739 | # We need to recreate these files for each test, as the compiler may | |
5740 | # overwrite some of them when testing with obscure command lines. | |
5741 | # This happens at least with the AIX C compiler. | |
5742 | : > sub/conftest.c | |
5743 | for i in 1 2 3 4 5 6; do | |
5744 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5745 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5746 | # Solaris 8's {/usr,}/bin/sh. | |
5747 | touch sub/conftst$i.h | |
5748 | done | |
5749 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5750 | ||
5751 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5752 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5753 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5754 | # versions had trouble with output in subdirs | |
5755 | am__obj=sub/conftest.${OBJEXT-o} | |
5756 | am__minus_obj="-o $am__obj" | |
5757 | case $depmode in | |
5758 | gcc) | |
5759 | # This depmode causes a compiler race in universal mode. | |
5760 | test "$am__universal" = false || continue | |
5761 | ;; | |
5762 | nosideeffect) | |
5763 | # after this tag, mechanisms are not by side-effect, so they'll | |
5764 | # only be used when explicitly requested | |
5765 | if test "x$enable_dependency_tracking" = xyes; then | |
5766 | continue | |
5767 | else | |
5768 | break | |
5769 | fi | |
5770 | ;; | |
5771 | msvisualcpp | msvcmsys) | |
5772 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5773 | # not run yet. These depmodes are late enough in the game, and | |
5774 | # so weak that their functioning should not be impacted. | |
5775 | am__obj=conftest.${OBJEXT-o} | |
5776 | am__minus_obj= | |
5777 | ;; | |
5778 | none) break ;; | |
5779 | esac | |
5780 | if depmode=$depmode \ | |
5781 | source=sub/conftest.c object=$am__obj \ | |
5782 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5783 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5784 | >/dev/null 2>conftest.err && | |
5785 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5786 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5787 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5788 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5789 | # icc doesn't choke on unknown options, it will just issue warnings | |
5790 | # or remarks (even with -Werror). So we grep stderr for any message | |
5791 | # that says an option was ignored or not supported. | |
5792 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5793 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5794 | # The diagnosis changed in icc 8.0: | |
5795 | # icc: Command line remark: option '-MP' not supported | |
5796 | if (grep 'ignoring option' conftest.err || | |
5797 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5798 | am_cv_CC_dependencies_compiler_type=$depmode | |
5799 | break | |
5800 | fi | |
5801 | fi | |
5802 | done | |
5803 | ||
5804 | cd .. | |
5805 | rm -rf conftest.dir | |
5806 | else | |
5807 | am_cv_CC_dependencies_compiler_type=none | |
5808 | fi | |
5809 | ||
5810 | fi | |
5811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5812 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5813 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5814 | ||
5815 | if | |
5816 | test "x$enable_dependency_tracking" != xno \ | |
5817 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5818 | am__fastdepCC_TRUE= | |
5819 | am__fastdepCC_FALSE='#' | |
5820 | else | |
5821 | am__fastdepCC_TRUE='#' | |
5822 | am__fastdepCC_FALSE= | |
5823 | fi | |
5824 | ||
5825 | ||
5826 | if test "x$CC" != xcc; then | |
5827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5828 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5829 | else | |
5830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5831 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5832 | fi | |
5833 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5834 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
a9bec17c | 5835 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
5836 | $as_echo_n "(cached) " >&6 |
5837 | else | |
5838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5839 | /* end confdefs.h. */ | |
5840 | ||
5841 | int | |
5842 | main () | |
5843 | { | |
5844 | ||
5845 | ; | |
5846 | return 0; | |
5847 | } | |
5848 | _ACEOF | |
5849 | # Make sure it works both with $CC and with simple cc. | |
5850 | # We do the test twice because some compilers refuse to overwrite an | |
5851 | # existing .o file with -o, though they will create one. | |
5852 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5853 | rm -f conftest2.* | |
5854 | if { { case "(($ac_try" in | |
5855 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5856 | *) ac_try_echo=$ac_try;; | |
5857 | esac | |
5858 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5859 | $as_echo "$ac_try_echo"; } >&5 | |
5860 | (eval "$ac_try") 2>&5 | |
5861 | ac_status=$? | |
5862 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5863 | test $ac_status = 0; } && | |
5864 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5865 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5866 | *) ac_try_echo=$ac_try;; | |
5867 | esac | |
5868 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5869 | $as_echo "$ac_try_echo"; } >&5 | |
5870 | (eval "$ac_try") 2>&5 | |
5871 | ac_status=$? | |
5872 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5873 | test $ac_status = 0; }; | |
5874 | then | |
5875 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5876 | if test "x$CC" != xcc; then | |
5877 | # Test first that cc exists at all. | |
5878 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5879 | { { case "(($ac_try" in | |
5880 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5881 | *) ac_try_echo=$ac_try;; | |
5882 | esac | |
5883 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5884 | $as_echo "$ac_try_echo"; } >&5 | |
5885 | (eval "$ac_try") 2>&5 | |
5886 | ac_status=$? | |
5887 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5888 | test $ac_status = 0; }; }; then | |
5889 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5890 | rm -f conftest2.* | |
5891 | if { { case "(($ac_try" in | |
5892 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5893 | *) ac_try_echo=$ac_try;; | |
5894 | esac | |
5895 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5896 | $as_echo "$ac_try_echo"; } >&5 | |
5897 | (eval "$ac_try") 2>&5 | |
5898 | ac_status=$? | |
5899 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5900 | test $ac_status = 0; } && | |
5901 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5902 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5903 | *) ac_try_echo=$ac_try;; | |
5904 | esac | |
5905 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5906 | $as_echo "$ac_try_echo"; } >&5 | |
5907 | (eval "$ac_try") 2>&5 | |
5908 | ac_status=$? | |
5909 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5910 | test $ac_status = 0; }; | |
5911 | then | |
5912 | # cc works too. | |
5913 | : | |
5914 | else | |
5915 | # cc exists but doesn't like -o. | |
5916 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5917 | fi | |
5918 | fi | |
5919 | fi | |
5920 | else | |
5921 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5922 | fi | |
5923 | rm -f core conftest* | |
5924 | ||
5925 | fi | |
5926 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5928 | $as_echo "yes" >&6; } | |
5929 | else | |
5930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5931 | $as_echo "no" >&6; } | |
5932 | ||
5933 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5934 | ||
5935 | fi | |
5936 | ||
5937 | # FIXME: we rely on the cache variable name because | |
5938 | # there is no other way. | |
5939 | set dummy $CC | |
5940 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5941 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5942 | if test "$am_t" != yes; then | |
5943 | # Losing compiler, so override with the script. | |
5944 | # FIXME: It is wrong to rewrite CC. | |
5945 | # But if we don't then we get into trouble of one sort or another. | |
5946 | # A longer-term fix would be to have automake use am__CC in this case, | |
5947 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5948 | CC="$am_aux_dir/compile $CC" | |
5949 | fi | |
5950 | ||
5951 | ||
5952 | ||
5ec54608 GM |
5953 | if test x$GCC = xyes; then |
5954 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
5955 | else | |
5956 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
5957 | fi | |
5958 | ||
7c61eaab GM |
5959 | if test "x$opsys" = "xmingw32"; then |
5960 | BUILDING_FOR_WINDOWSNT_TRUE= | |
5961 | BUILDING_FOR_WINDOWSNT_FALSE='#' | |
5962 | else | |
5963 | BUILDING_FOR_WINDOWSNT_TRUE='#' | |
5964 | BUILDING_FOR_WINDOWSNT_FALSE= | |
5965 | fi | |
5966 | ||
5967 | ||
34fd7a48 GM |
5968 | # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, |
5969 | # as we don't use them. | |
710f5812 | 5970 | |
f077f61d GM |
5971 | # Avoid gnulib's threadlib module, as we do threads our own way. |
5972 | ||
5973 | ||
5ec54608 | 5974 | # Initialize gnulib right after choosing the compiler. |
743c80a7 | 5975 | |
067d23c9 KY |
5976 | ac_ext=c |
5977 | ac_cpp='$CPP $CPPFLAGS' | |
5978 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5979 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5980 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5982 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5983 | # On Suns, sometimes $CPP names a directory. | |
5984 | if test -n "$CPP" && test -d "$CPP"; then | |
5985 | CPP= | |
5986 | fi | |
5987 | if test -z "$CPP"; then | |
a9bec17c | 5988 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5989 | $as_echo_n "(cached) " >&6 |
5990 | else | |
5991 | # Double quotes because CPP needs to be expanded | |
5992 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5993 | do | |
5994 | ac_preproc_ok=false | |
5995 | for ac_c_preproc_warn_flag in '' yes | |
5996 | do | |
5997 | # Use a header file that comes with gcc, so configuring glibc | |
5998 | # with a fresh cross-compiler works. | |
5999 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6000 | # <limits.h> exists even on freestanding compilers. | |
6001 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6002 | # not just through cpp. "Syntax error" is here to catch this case. | |
6003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6004 | /* end confdefs.h. */ | |
6005 | #ifdef __STDC__ | |
6006 | # include <limits.h> | |
6007 | #else | |
6008 | # include <assert.h> | |
6009 | #endif | |
6010 | Syntax error | |
6011 | _ACEOF | |
6012 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6013 | ||
6014 | else | |
6015 | # Broken: fails on valid input. | |
6016 | continue | |
6017 | fi | |
a9bec17c | 6018 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6019 | |
6020 | # OK, works on sane cases. Now check whether nonexistent headers | |
6021 | # can be detected and how. | |
6022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6023 | /* end confdefs.h. */ | |
6024 | #include <ac_nonexistent.h> | |
6025 | _ACEOF | |
6026 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6027 | # Broken: success on invalid input. | |
6028 | continue | |
6029 | else | |
6030 | # Passes both tests. | |
6031 | ac_preproc_ok=: | |
6032 | break | |
6033 | fi | |
a9bec17c | 6034 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6035 | |
6036 | done | |
6037 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
a9bec17c | 6038 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6039 | if $ac_preproc_ok; then : |
6040 | break | |
6041 | fi | |
6042 | ||
6043 | done | |
6044 | ac_cv_prog_CPP=$CPP | |
6045 | ||
6046 | fi | |
6047 | CPP=$ac_cv_prog_CPP | |
6048 | else | |
6049 | ac_cv_prog_CPP=$CPP | |
6050 | fi | |
6051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
6052 | $as_echo "$CPP" >&6; } | |
6053 | ac_preproc_ok=false | |
6054 | for ac_c_preproc_warn_flag in '' yes | |
6055 | do | |
6056 | # Use a header file that comes with gcc, so configuring glibc | |
6057 | # with a fresh cross-compiler works. | |
6058 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6059 | # <limits.h> exists even on freestanding compilers. | |
6060 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
6061 | # not just through cpp. "Syntax error" is here to catch this case. | |
6062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6063 | /* end confdefs.h. */ | |
6064 | #ifdef __STDC__ | |
6065 | # include <limits.h> | |
6066 | #else | |
6067 | # include <assert.h> | |
6068 | #endif | |
6069 | Syntax error | |
6070 | _ACEOF | |
6071 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6072 | ||
6073 | else | |
6074 | # Broken: fails on valid input. | |
6075 | continue | |
6076 | fi | |
a9bec17c | 6077 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6078 | |
6079 | # OK, works on sane cases. Now check whether nonexistent headers | |
6080 | # can be detected and how. | |
6081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6082 | /* end confdefs.h. */ | |
6083 | #include <ac_nonexistent.h> | |
6084 | _ACEOF | |
6085 | if ac_fn_c_try_cpp "$LINENO"; then : | |
6086 | # Broken: success on invalid input. | |
6087 | continue | |
6088 | else | |
6089 | # Passes both tests. | |
6090 | ac_preproc_ok=: | |
6091 | break | |
6092 | fi | |
a9bec17c | 6093 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6094 | |
6095 | done | |
6096 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
a9bec17c | 6097 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
6098 | if $ac_preproc_ok; then : |
6099 | ||
6100 | else | |
6101 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6102 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
6103 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
6104 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
6105 | fi |
6106 | ||
6107 | ac_ext=c | |
6108 | ac_cpp='$CPP $CPPFLAGS' | |
6109 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6110 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6111 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6112 | ||
6113 | ||
6114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
6115 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
a9bec17c | 6116 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
6117 | $as_echo_n "(cached) " >&6 |
6118 | else | |
6119 | if test -z "$GREP"; then | |
6120 | ac_path_GREP_found=false | |
6121 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6122 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6123 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6124 | do | |
6125 | IFS=$as_save_IFS | |
6126 | test -z "$as_dir" && as_dir=. | |
6127 | for ac_prog in grep ggrep; do | |
6128 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6129 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
6130 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
6131 | # Check for GNU ac_path_GREP and select it if it is found. | |
6132 | # Check for GNU $ac_path_GREP | |
6133 | case `"$ac_path_GREP" --version 2>&1` in | |
6134 | *GNU*) | |
6135 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
6136 | *) | |
6137 | ac_count=0 | |
6138 | $as_echo_n 0123456789 >"conftest.in" | |
6139 | while : | |
6140 | do | |
6141 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6142 | mv "conftest.tmp" "conftest.in" | |
6143 | cp "conftest.in" "conftest.nl" | |
6144 | $as_echo 'GREP' >> "conftest.nl" | |
6145 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6146 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6147 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6148 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
6149 | # Best one so far, save it but keep looking for a better one | |
6150 | ac_cv_path_GREP="$ac_path_GREP" | |
6151 | ac_path_GREP_max=$ac_count | |
6152 | fi | |
6153 | # 10*(2^10) chars as input seems more than enough | |
6154 | test $ac_count -gt 10 && break | |
6155 | done | |
6156 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6157 | esac | |
6158 | ||
6159 | $ac_path_GREP_found && break 3 | |
6160 | done | |
6161 | done | |
6162 | done | |
6163 | IFS=$as_save_IFS | |
6164 | if test -z "$ac_cv_path_GREP"; then | |
a9bec17c | 6165 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6166 | fi |
6167 | else | |
6168 | ac_cv_path_GREP=$GREP | |
6169 | fi | |
6170 | ||
6171 | fi | |
6172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
6173 | $as_echo "$ac_cv_path_GREP" >&6; } | |
6174 | GREP="$ac_cv_path_GREP" | |
6175 | ||
6176 | ||
6177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
6178 | $as_echo_n "checking for egrep... " >&6; } | |
a9bec17c | 6179 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
6180 | $as_echo_n "(cached) " >&6 |
6181 | else | |
6182 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
6183 | then ac_cv_path_EGREP="$GREP -E" | |
6184 | else | |
6185 | if test -z "$EGREP"; then | |
6186 | ac_path_EGREP_found=false | |
6187 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6188 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6189 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6190 | do | |
6191 | IFS=$as_save_IFS | |
6192 | test -z "$as_dir" && as_dir=. | |
6193 | for ac_prog in egrep; do | |
6194 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6195 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
6196 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
6197 | # Check for GNU ac_path_EGREP and select it if it is found. | |
6198 | # Check for GNU $ac_path_EGREP | |
6199 | case `"$ac_path_EGREP" --version 2>&1` in | |
6200 | *GNU*) | |
6201 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
6202 | *) | |
6203 | ac_count=0 | |
6204 | $as_echo_n 0123456789 >"conftest.in" | |
6205 | while : | |
6206 | do | |
6207 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6208 | mv "conftest.tmp" "conftest.in" | |
6209 | cp "conftest.in" "conftest.nl" | |
6210 | $as_echo 'EGREP' >> "conftest.nl" | |
6211 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6212 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6213 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6214 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
6215 | # Best one so far, save it but keep looking for a better one | |
6216 | ac_cv_path_EGREP="$ac_path_EGREP" | |
6217 | ac_path_EGREP_max=$ac_count | |
6218 | fi | |
6219 | # 10*(2^10) chars as input seems more than enough | |
6220 | test $ac_count -gt 10 && break | |
6221 | done | |
6222 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6223 | esac | |
6224 | ||
6225 | $ac_path_EGREP_found && break 3 | |
6226 | done | |
6227 | done | |
6228 | done | |
6229 | IFS=$as_save_IFS | |
6230 | if test -z "$ac_cv_path_EGREP"; then | |
a9bec17c | 6231 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6232 | fi |
6233 | else | |
6234 | ac_cv_path_EGREP=$EGREP | |
6235 | fi | |
6236 | ||
6237 | fi | |
6238 | fi | |
6239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
6240 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
6241 | EGREP="$ac_cv_path_EGREP" | |
6242 | ||
6243 | ||
369e19fc PE |
6244 | |
6245 | ||
6246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 | |
6247 | $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } | |
a9bec17c | 6248 | if test "${gl_cv_c_amsterdam_compiler+set}" = set; then : |
369e19fc PE |
6249 | $as_echo_n "(cached) " >&6 |
6250 | else | |
6251 | ||
6252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6253 | /* end confdefs.h. */ | |
6254 | ||
6255 | #ifdef __ACK__ | |
6256 | Amsterdam | |
6257 | #endif | |
6258 | ||
6259 | _ACEOF | |
6260 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6261 | $EGREP "Amsterdam" >/dev/null 2>&1; then : | |
6262 | gl_cv_c_amsterdam_compiler=yes | |
6263 | else | |
6264 | gl_cv_c_amsterdam_compiler=no | |
6265 | fi | |
6266 | rm -f conftest* | |
6267 | ||
6268 | ||
6269 | fi | |
6270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 | |
6271 | $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } | |
6272 | if test -z "$AR"; then | |
6273 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6274 | AR='cc -c.a' | |
6275 | if test -z "$ARFLAGS"; then | |
6276 | ARFLAGS='-o' | |
6277 | fi | |
6278 | else | |
6279 | if test -n "$ac_tool_prefix"; then | |
6280 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6281 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
6282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6283 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6284 | if test "${ac_cv_prog_AR+set}" = set; then : |
369e19fc PE |
6285 | $as_echo_n "(cached) " >&6 |
6286 | else | |
6287 | if test -n "$AR"; then | |
6288 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6289 | else | |
6290 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6291 | for as_dir in $PATH | |
6292 | do | |
6293 | IFS=$as_save_IFS | |
6294 | test -z "$as_dir" && as_dir=. | |
6295 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6296 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6297 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
6298 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6299 | break 2 | |
6300 | fi | |
6301 | done | |
6302 | done | |
6303 | IFS=$as_save_IFS | |
6304 | ||
6305 | fi | |
6306 | fi | |
6307 | AR=$ac_cv_prog_AR | |
6308 | if test -n "$AR"; then | |
6309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
6310 | $as_echo "$AR" >&6; } | |
6311 | else | |
6312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6313 | $as_echo "no" >&6; } | |
6314 | fi | |
6315 | ||
6316 | ||
6317 | fi | |
6318 | if test -z "$ac_cv_prog_AR"; then | |
6319 | ac_ct_AR=$AR | |
6320 | # Extract the first word of "ar", so it can be a program name with args. | |
6321 | set dummy ar; ac_word=$2 | |
6322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6323 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6324 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : |
369e19fc PE |
6325 | $as_echo_n "(cached) " >&6 |
6326 | else | |
6327 | if test -n "$ac_ct_AR"; then | |
6328 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6329 | else | |
6330 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6331 | for as_dir in $PATH | |
6332 | do | |
6333 | IFS=$as_save_IFS | |
6334 | test -z "$as_dir" && as_dir=. | |
6335 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6336 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6337 | ac_cv_prog_ac_ct_AR="ar" | |
6338 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6339 | break 2 | |
6340 | fi | |
6341 | done | |
6342 | done | |
6343 | IFS=$as_save_IFS | |
6344 | ||
6345 | fi | |
6346 | fi | |
6347 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6348 | if test -n "$ac_ct_AR"; then | |
6349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
6350 | $as_echo "$ac_ct_AR" >&6; } | |
6351 | else | |
6352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6353 | $as_echo "no" >&6; } | |
6354 | fi | |
6355 | ||
6356 | if test "x$ac_ct_AR" = x; then | |
6357 | AR="ar" | |
6358 | else | |
6359 | case $cross_compiling:$ac_tool_warned in | |
6360 | yes:) | |
6361 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6362 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6363 | ac_tool_warned=yes ;; | |
6364 | esac | |
6365 | AR=$ac_ct_AR | |
6366 | fi | |
6367 | else | |
6368 | AR="$ac_cv_prog_AR" | |
6369 | fi | |
6370 | ||
6371 | if test -z "$ARFLAGS"; then | |
6372 | ARFLAGS='cru' | |
6373 | fi | |
6374 | fi | |
6375 | else | |
6376 | if test -z "$ARFLAGS"; then | |
6377 | ARFLAGS='cru' | |
6378 | fi | |
6379 | fi | |
6380 | ||
6381 | ||
6382 | if test -z "$RANLIB"; then | |
6383 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6384 | RANLIB=':' | |
6385 | else | |
6386 | if test -n "$ac_tool_prefix"; then | |
6387 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6388 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6390 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6391 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
369e19fc PE |
6392 | $as_echo_n "(cached) " >&6 |
6393 | else | |
6394 | if test -n "$RANLIB"; then | |
6395 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6396 | else | |
6397 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6398 | for as_dir in $PATH | |
6399 | do | |
6400 | IFS=$as_save_IFS | |
6401 | test -z "$as_dir" && as_dir=. | |
6402 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6403 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6404 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6405 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6406 | break 2 | |
6407 | fi | |
6408 | done | |
6409 | done | |
6410 | IFS=$as_save_IFS | |
6411 | ||
6412 | fi | |
6413 | fi | |
6414 | RANLIB=$ac_cv_prog_RANLIB | |
6415 | if test -n "$RANLIB"; then | |
6416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6417 | $as_echo "$RANLIB" >&6; } | |
6418 | else | |
6419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6420 | $as_echo "no" >&6; } | |
6421 | fi | |
6422 | ||
6423 | ||
6424 | fi | |
6425 | if test -z "$ac_cv_prog_RANLIB"; then | |
6426 | ac_ct_RANLIB=$RANLIB | |
6427 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6428 | set dummy ranlib; ac_word=$2 | |
6429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6430 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6431 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
369e19fc PE |
6432 | $as_echo_n "(cached) " >&6 |
6433 | else | |
6434 | if test -n "$ac_ct_RANLIB"; then | |
6435 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6436 | else | |
6437 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6438 | for as_dir in $PATH | |
6439 | do | |
6440 | IFS=$as_save_IFS | |
6441 | test -z "$as_dir" && as_dir=. | |
6442 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6443 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6444 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6445 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6446 | break 2 | |
6447 | fi | |
6448 | done | |
6449 | done | |
6450 | IFS=$as_save_IFS | |
6451 | ||
6452 | fi | |
6453 | fi | |
6454 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6455 | if test -n "$ac_ct_RANLIB"; then | |
6456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6457 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6458 | else | |
6459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6460 | $as_echo "no" >&6; } | |
6461 | fi | |
6462 | ||
6463 | if test "x$ac_ct_RANLIB" = x; then | |
6464 | RANLIB=":" | |
6465 | else | |
6466 | case $cross_compiling:$ac_tool_warned in | |
6467 | yes:) | |
6468 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6469 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6470 | ac_tool_warned=yes ;; | |
6471 | esac | |
6472 | RANLIB=$ac_ct_RANLIB | |
6473 | fi | |
6474 | else | |
6475 | RANLIB="$ac_cv_prog_RANLIB" | |
6476 | fi | |
6477 | ||
6478 | fi | |
6479 | fi | |
6480 | ||
6481 | ||
067d23c9 KY |
6482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6483 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
a9bec17c | 6484 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
6485 | $as_echo_n "(cached) " >&6 |
6486 | else | |
6487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6488 | /* end confdefs.h. */ | |
6489 | #include <stdlib.h> | |
6490 | #include <stdarg.h> | |
6491 | #include <string.h> | |
6492 | #include <float.h> | |
6493 | ||
6494 | int | |
6495 | main () | |
6496 | { | |
6497 | ||
6498 | ; | |
6499 | return 0; | |
6500 | } | |
6501 | _ACEOF | |
6502 | if ac_fn_c_try_compile "$LINENO"; then : | |
6503 | ac_cv_header_stdc=yes | |
6504 | else | |
6505 | ac_cv_header_stdc=no | |
6506 | fi | |
6507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6508 | ||
6509 | if test $ac_cv_header_stdc = yes; then | |
6510 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6512 | /* end confdefs.h. */ | |
6513 | #include <string.h> | |
6514 | ||
6515 | _ACEOF | |
6516 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6517 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6518 | ||
6519 | else | |
6520 | ac_cv_header_stdc=no | |
6521 | fi | |
6522 | rm -f conftest* | |
6523 | ||
6524 | fi | |
6525 | ||
6526 | if test $ac_cv_header_stdc = yes; then | |
6527 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6529 | /* end confdefs.h. */ | |
6530 | #include <stdlib.h> | |
6531 | ||
6532 | _ACEOF | |
6533 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6534 | $EGREP "free" >/dev/null 2>&1; then : | |
6535 | ||
6536 | else | |
6537 | ac_cv_header_stdc=no | |
6538 | fi | |
6539 | rm -f conftest* | |
6540 | ||
6541 | fi | |
6542 | ||
6543 | if test $ac_cv_header_stdc = yes; then | |
6544 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6545 | if test "$cross_compiling" = yes; then : | |
6546 | : | |
6547 | else | |
6548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6549 | /* end confdefs.h. */ | |
6550 | #include <ctype.h> | |
6551 | #include <stdlib.h> | |
6552 | #if ((' ' & 0x0FF) == 0x020) | |
6553 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6554 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6555 | #else | |
6556 | # define ISLOWER(c) \ | |
6557 | (('a' <= (c) && (c) <= 'i') \ | |
6558 | || ('j' <= (c) && (c) <= 'r') \ | |
6559 | || ('s' <= (c) && (c) <= 'z')) | |
6560 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6561 | #endif | |
6562 | ||
6563 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6564 | int | |
6565 | main () | |
6566 | { | |
6567 | int i; | |
6568 | for (i = 0; i < 256; i++) | |
6569 | if (XOR (islower (i), ISLOWER (i)) | |
6570 | || toupper (i) != TOUPPER (i)) | |
6571 | return 2; | |
6572 | return 0; | |
6573 | } | |
6574 | _ACEOF | |
6575 | if ac_fn_c_try_run "$LINENO"; then : | |
6576 | ||
6577 | else | |
6578 | ac_cv_header_stdc=no | |
6579 | fi | |
6580 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6581 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6582 | fi | |
6583 | ||
6584 | fi | |
6585 | fi | |
6586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6587 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6588 | if test $ac_cv_header_stdc = yes; then | |
6589 | ||
6590 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6591 | ||
6592 | fi | |
6593 | ||
6594 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
6595 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
6596 | inttypes.h stdint.h unistd.h | |
6597 | do : | |
6598 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6599 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6600 | " | |
a9bec17c GM |
6601 | eval as_val=\$$as_ac_Header |
6602 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
6603 | cat >>confdefs.h <<_ACEOF |
6604 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6605 | _ACEOF | |
6606 | ||
6607 | fi | |
6608 | ||
6609 | done | |
6610 | ||
6611 | ||
6612 | ||
6613 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
a9bec17c | 6614 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
6615 | MINIX=yes |
6616 | else | |
6617 | MINIX= | |
6618 | fi | |
6619 | ||
6620 | ||
6621 | if test "$MINIX" = yes; then | |
6622 | ||
6623 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
6624 | ||
6625 | ||
6626 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
6627 | ||
6628 | ||
6629 | $as_echo "#define _MINIX 1" >>confdefs.h | |
6630 | ||
1fd182f0 | 6631 | |
2cdd55fc | 6632 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
1fd182f0 | 6633 | |
2cdd55fc | 6634 | fi |
1fd182f0 | 6635 | |
067d23c9 KY |
6636 | |
6637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
6638 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
a9bec17c | 6639 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
6640 | $as_echo_n "(cached) " >&6 |
6641 | else | |
6642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6643 | /* end confdefs.h. */ | |
369e19fc PE |
6644 | |
6645 | # define __EXTENSIONS__ 1 | |
6646 | $ac_includes_default | |
6647 | int | |
6648 | main () | |
6649 | { | |
6650 | ||
6651 | ; | |
6652 | return 0; | |
6653 | } | |
6654 | _ACEOF | |
6655 | if ac_fn_c_try_compile "$LINENO"; then : | |
6656 | ac_cv_safe_to_define___extensions__=yes | |
6657 | else | |
6658 | ac_cv_safe_to_define___extensions__=no | |
6659 | fi | |
6660 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6661 | fi | |
6662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
6663 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
6664 | test $ac_cv_safe_to_define___extensions__ = yes && | |
6665 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
6666 | ||
6667 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
6668 | ||
6669 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
6670 | ||
6671 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
6672 | ||
6673 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
6674 | ||
6675 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
6676 | ||
2cdd55fc GM |
6677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 |
6678 | $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } | |
6679 | if test "${ac_cv_should_define__xopen_source+set}" = set; then : | |
6680 | $as_echo_n "(cached) " >&6 | |
6681 | else | |
6682 | ac_cv_should_define__xopen_source=no | |
6683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6684 | /* end confdefs.h. */ | |
6685 | ||
6686 | #include <wchar.h> | |
6687 | mbstate_t x; | |
6688 | int | |
6689 | main () | |
6690 | { | |
6691 | ||
6692 | ; | |
6693 | return 0; | |
6694 | } | |
6695 | _ACEOF | |
6696 | if ac_fn_c_try_compile "$LINENO"; then : | |
6697 | ||
6698 | else | |
6699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6700 | /* end confdefs.h. */ | |
6701 | ||
6702 | #define _XOPEN_SOURCE 500 | |
6703 | #include <wchar.h> | |
6704 | mbstate_t x; | |
6705 | int | |
6706 | main () | |
6707 | { | |
6708 | ||
6709 | ; | |
6710 | return 0; | |
6711 | } | |
6712 | _ACEOF | |
6713 | if ac_fn_c_try_compile "$LINENO"; then : | |
6714 | ac_cv_should_define__xopen_source=yes | |
6715 | fi | |
6716 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6717 | fi | |
6718 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6719 | fi | |
6720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 | |
6721 | $as_echo "$ac_cv_should_define__xopen_source" >&6; } | |
6722 | test $ac_cv_should_define__xopen_source = yes && | |
6723 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
6724 | ||
369e19fc PE |
6725 | |
6726 | ||
6727 | ||
6728 | ||
6729 | ||
6730 | ||
6731 | ||
6732 | # Check whether --enable-largefile was given. | |
6733 | if test "${enable_largefile+set}" = set; then : | |
6734 | enableval=$enable_largefile; | |
6735 | fi | |
6736 | ||
6737 | if test "$enable_largefile" != no; then | |
6738 | ||
6739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6740 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
a9bec17c | 6741 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
369e19fc PE |
6742 | $as_echo_n "(cached) " >&6 |
6743 | else | |
6744 | ac_cv_sys_largefile_CC=no | |
6745 | if test "$GCC" != yes; then | |
6746 | ac_save_CC=$CC | |
6747 | while :; do | |
6748 | # IRIX 6.2 and later do not support large files by default, | |
6749 | # so use the C compiler's -n32 option if that helps. | |
6750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6751 | /* end confdefs.h. */ | |
6752 | #include <sys/types.h> | |
6753 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6754 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6755 | since some C++ compilers masquerading as C compilers | |
6756 | incorrectly reject 9223372036854775807. */ | |
6757 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6758 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6759 | && LARGE_OFF_T % 2147483647 == 1) | |
6760 | ? 1 : -1]; | |
6761 | int | |
6762 | main () | |
6763 | { | |
6764 | ||
6765 | ; | |
6766 | return 0; | |
6767 | } | |
6768 | _ACEOF | |
6769 | if ac_fn_c_try_compile "$LINENO"; then : | |
6770 | break | |
6771 | fi | |
6772 | rm -f core conftest.err conftest.$ac_objext | |
6773 | CC="$CC -n32" | |
6774 | if ac_fn_c_try_compile "$LINENO"; then : | |
6775 | ac_cv_sys_largefile_CC=' -n32'; break | |
6776 | fi | |
6777 | rm -f core conftest.err conftest.$ac_objext | |
6778 | break | |
6779 | done | |
6780 | CC=$ac_save_CC | |
6781 | rm -f conftest.$ac_ext | |
6782 | fi | |
6783 | fi | |
6784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6785 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6786 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6787 | CC=$CC$ac_cv_sys_largefile_CC | |
6788 | fi | |
6789 | ||
6790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6791 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
a9bec17c | 6792 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
369e19fc PE |
6793 | $as_echo_n "(cached) " >&6 |
6794 | else | |
6795 | while :; do | |
6796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6797 | /* end confdefs.h. */ | |
6798 | #include <sys/types.h> | |
6799 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6800 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6801 | since some C++ compilers masquerading as C compilers | |
6802 | incorrectly reject 9223372036854775807. */ | |
6803 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6804 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6805 | && LARGE_OFF_T % 2147483647 == 1) | |
6806 | ? 1 : -1]; | |
6807 | int | |
6808 | main () | |
6809 | { | |
6810 | ||
6811 | ; | |
6812 | return 0; | |
6813 | } | |
6814 | _ACEOF | |
6815 | if ac_fn_c_try_compile "$LINENO"; then : | |
6816 | ac_cv_sys_file_offset_bits=no; break | |
6817 | fi | |
6818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6820 | /* end confdefs.h. */ | |
6821 | #define _FILE_OFFSET_BITS 64 | |
6822 | #include <sys/types.h> | |
6823 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6824 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6825 | since some C++ compilers masquerading as C compilers | |
6826 | incorrectly reject 9223372036854775807. */ | |
6827 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6828 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6829 | && LARGE_OFF_T % 2147483647 == 1) | |
6830 | ? 1 : -1]; | |
6831 | int | |
6832 | main () | |
6833 | { | |
6834 | ||
6835 | ; | |
6836 | return 0; | |
6837 | } | |
6838 | _ACEOF | |
6839 | if ac_fn_c_try_compile "$LINENO"; then : | |
6840 | ac_cv_sys_file_offset_bits=64; break | |
6841 | fi | |
6842 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6843 | ac_cv_sys_file_offset_bits=unknown | |
6844 | break | |
6845 | done | |
6846 | fi | |
6847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6848 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6849 | case $ac_cv_sys_file_offset_bits in #( | |
6850 | no | unknown) ;; | |
6851 | *) | |
6852 | cat >>confdefs.h <<_ACEOF | |
6853 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6854 | _ACEOF | |
6855 | ;; | |
6856 | esac | |
6857 | rm -rf conftest* | |
6858 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6859 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6860 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
a9bec17c | 6861 | if test "${ac_cv_sys_large_files+set}" = set; then : |
369e19fc PE |
6862 | $as_echo_n "(cached) " >&6 |
6863 | else | |
6864 | while :; do | |
6865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6866 | /* end confdefs.h. */ | |
6867 | #include <sys/types.h> | |
6868 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6869 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6870 | since some C++ compilers masquerading as C compilers | |
6871 | incorrectly reject 9223372036854775807. */ | |
6872 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6873 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6874 | && LARGE_OFF_T % 2147483647 == 1) | |
6875 | ? 1 : -1]; | |
6876 | int | |
6877 | main () | |
6878 | { | |
6879 | ||
6880 | ; | |
6881 | return 0; | |
6882 | } | |
6883 | _ACEOF | |
6884 | if ac_fn_c_try_compile "$LINENO"; then : | |
6885 | ac_cv_sys_large_files=no; break | |
6886 | fi | |
6887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6889 | /* end confdefs.h. */ | |
6890 | #define _LARGE_FILES 1 | |
6891 | #include <sys/types.h> | |
6892 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6893 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6894 | since some C++ compilers masquerading as C compilers | |
6895 | incorrectly reject 9223372036854775807. */ | |
6896 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6897 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6898 | && LARGE_OFF_T % 2147483647 == 1) | |
6899 | ? 1 : -1]; | |
067d23c9 KY |
6900 | int |
6901 | main () | |
6902 | { | |
6903 | ||
6904 | ; | |
6905 | return 0; | |
6906 | } | |
6907 | _ACEOF | |
6908 | if ac_fn_c_try_compile "$LINENO"; then : | |
369e19fc | 6909 | ac_cv_sys_large_files=1; break |
067d23c9 KY |
6910 | fi |
6911 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
369e19fc PE |
6912 | ac_cv_sys_large_files=unknown |
6913 | break | |
6914 | done | |
067d23c9 | 6915 | fi |
369e19fc PE |
6916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
6917 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6918 | case $ac_cv_sys_large_files in #( | |
6919 | no | unknown) ;; | |
6920 | *) | |
6921 | cat >>confdefs.h <<_ACEOF | |
6922 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6923 | _ACEOF | |
6924 | ;; | |
6925 | esac | |
6926 | rm -rf conftest* | |
6927 | fi | |
1fd182f0 PE |
6928 | |
6929 | ||
858c7150 GM |
6930 | $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h |
6931 | ||
369e19fc | 6932 | fi |
1fd182f0 | 6933 | |
6d153f56 GM |
6934 | case $ac_cv_prog_cc_stdc in #( |
6935 | no) : | |
6936 | ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( | |
6937 | *) : | |
6938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
6939 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
a9bec17c | 6940 | if test "${ac_cv_prog_cc_c99+set}" = set; then : |
6d153f56 GM |
6941 | $as_echo_n "(cached) " >&6 |
6942 | else | |
6943 | ac_cv_prog_cc_c99=no | |
6944 | ac_save_CC=$CC | |
6945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6946 | /* end confdefs.h. */ | |
6947 | #include <stdarg.h> | |
6948 | #include <stdbool.h> | |
6949 | #include <stdlib.h> | |
6950 | #include <wchar.h> | |
6951 | #include <stdio.h> | |
6952 | ||
6953 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
6954 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
6955 | #define showlist(...) puts (#__VA_ARGS__) | |
6956 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
6957 | static void | |
6958 | test_varargs_macros (void) | |
6959 | { | |
6960 | int x = 1234; | |
6961 | int y = 5678; | |
6962 | debug ("Flag"); | |
6963 | debug ("X = %d\n", x); | |
6964 | showlist (The first, second, and third items.); | |
6965 | report (x>y, "x is %d but y is %d", x, y); | |
6966 | } | |
6967 | ||
6968 | // Check long long types. | |
6969 | #define BIG64 18446744073709551615ull | |
6970 | #define BIG32 4294967295ul | |
6971 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
6972 | #if !BIG_OK | |
6973 | your preprocessor is broken; | |
6974 | #endif | |
6975 | #if BIG_OK | |
6976 | #else | |
6977 | your preprocessor is broken; | |
6978 | #endif | |
6979 | static long long int bignum = -9223372036854775807LL; | |
6980 | static unsigned long long int ubignum = BIG64; | |
6981 | ||
6982 | struct incomplete_array | |
6983 | { | |
6984 | int datasize; | |
6985 | double data[]; | |
6986 | }; | |
6987 | ||
6988 | struct named_init { | |
6989 | int number; | |
6990 | const wchar_t *name; | |
6991 | double average; | |
6992 | }; | |
6993 | ||
6994 | typedef const char *ccp; | |
6995 | ||
6996 | static inline int | |
6997 | test_restrict (ccp restrict text) | |
6998 | { | |
6999 | // See if C++-style comments work. | |
7000 | // Iterate through items via the restricted pointer. | |
7001 | // Also check for declarations in for loops. | |
7002 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
7003 | continue; | |
7004 | return 0; | |
7005 | } | |
7006 | ||
7007 | // Check varargs and va_copy. | |
7008 | static void | |
7009 | test_varargs (const char *format, ...) | |
7010 | { | |
7011 | va_list args; | |
7012 | va_start (args, format); | |
7013 | va_list args_copy; | |
7014 | va_copy (args_copy, args); | |
7015 | ||
7016 | const char *str; | |
7017 | int number; | |
7018 | float fnumber; | |
7019 | ||
7020 | while (*format) | |
7021 | { | |
7022 | switch (*format++) | |
7023 | { | |
7024 | case 's': // string | |
7025 | str = va_arg (args_copy, const char *); | |
7026 | break; | |
7027 | case 'd': // int | |
7028 | number = va_arg (args_copy, int); | |
7029 | break; | |
7030 | case 'f': // float | |
7031 | fnumber = va_arg (args_copy, double); | |
7032 | break; | |
7033 | default: | |
7034 | break; | |
7035 | } | |
7036 | } | |
7037 | va_end (args_copy); | |
7038 | va_end (args); | |
7039 | } | |
7040 | ||
7041 | int | |
7042 | main () | |
7043 | { | |
7044 | ||
7045 | // Check bool. | |
7046 | _Bool success = false; | |
7047 | ||
7048 | // Check restrict. | |
7049 | if (test_restrict ("String literal") == 0) | |
7050 | success = true; | |
7051 | char *restrict newvar = "Another string"; | |
7052 | ||
7053 | // Check varargs. | |
7054 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
7055 | test_varargs_macros (); | |
7056 | ||
7057 | // Check flexible array members. | |
7058 | struct incomplete_array *ia = | |
7059 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
7060 | ia->datasize = 10; | |
7061 | for (int i = 0; i < ia->datasize; ++i) | |
7062 | ia->data[i] = i * 1.234; | |
7063 | ||
7064 | // Check named initializers. | |
7065 | struct named_init ni = { | |
7066 | .number = 34, | |
7067 | .name = L"Test wide string", | |
7068 | .average = 543.34343, | |
7069 | }; | |
7070 | ||
7071 | ni.number = 58; | |
7072 | ||
7073 | int dynamic_array[ni.number]; | |
7074 | dynamic_array[ni.number - 1] = 543; | |
7075 | ||
7076 | // work around unused variable warnings | |
7077 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
7078 | || dynamic_array[ni.number - 1] != 543); | |
7079 | ||
7080 | ; | |
7081 | return 0; | |
7082 | } | |
7083 | _ACEOF | |
7084 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 | |
7085 | do | |
7086 | CC="$ac_save_CC $ac_arg" | |
7087 | if ac_fn_c_try_compile "$LINENO"; then : | |
7088 | ac_cv_prog_cc_c99=$ac_arg | |
7089 | fi | |
7090 | rm -f core conftest.err conftest.$ac_objext | |
7091 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
7092 | done | |
7093 | rm -f conftest.$ac_ext | |
7094 | CC=$ac_save_CC | |
7095 | ||
7096 | fi | |
7097 | # AC_CACHE_VAL | |
7098 | case "x$ac_cv_prog_cc_c99" in | |
7099 | x) | |
7100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7101 | $as_echo "none needed" >&6; } ;; | |
7102 | xno) | |
7103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7104 | $as_echo "unsupported" >&6; } ;; | |
7105 | *) | |
7106 | CC="$CC $ac_cv_prog_cc_c99" | |
7107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
7108 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
7109 | esac | |
7110 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
7111 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
7112 | else | |
7113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
7114 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 7115 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
6d153f56 GM |
7116 | $as_echo_n "(cached) " >&6 |
7117 | else | |
7118 | ac_cv_prog_cc_c89=no | |
7119 | ac_save_CC=$CC | |
7120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7121 | /* end confdefs.h. */ | |
7122 | #include <stdarg.h> | |
7123 | #include <stdio.h> | |
7124 | #include <sys/types.h> | |
7125 | #include <sys/stat.h> | |
7126 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
7127 | struct buf { int x; }; | |
7128 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
7129 | static char *e (p, i) | |
7130 | char **p; | |
7131 | int i; | |
7132 | { | |
7133 | return p[i]; | |
7134 | } | |
7135 | static char *f (char * (*g) (char **, int), char **p, ...) | |
7136 | { | |
7137 | char *s; | |
7138 | va_list v; | |
7139 | va_start (v,p); | |
7140 | s = g (p, va_arg (v,int)); | |
7141 | va_end (v); | |
7142 | return s; | |
7143 | } | |
7144 | ||
7145 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
7146 | function prototypes and stuff, but not '\xHH' hex character constants. | |
7147 | These don't provoke an error unfortunately, instead are silently treated | |
7148 | as 'x'. The following induces an error, until -std is added to get | |
7149 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
7150 | array size at least. It's necessary to write '\x00'==0 to get something | |
7151 | that's true only with -std. */ | |
7152 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
7153 | ||
7154 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
7155 | inside strings and character constants. */ | |
7156 | #define FOO(x) 'x' | |
7157 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
7158 | ||
7159 | int test (int i, double x); | |
7160 | struct s1 {int (*f) (int a);}; | |
7161 | struct s2 {int (*f) (double a);}; | |
7162 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
7163 | int argc; | |
7164 | char **argv; | |
7165 | int | |
7166 | main () | |
7167 | { | |
7168 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
7169 | ; | |
7170 | return 0; | |
7171 | } | |
7172 | _ACEOF | |
7173 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
7174 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
7175 | do | |
7176 | CC="$ac_save_CC $ac_arg" | |
7177 | if ac_fn_c_try_compile "$LINENO"; then : | |
7178 | ac_cv_prog_cc_c89=$ac_arg | |
7179 | fi | |
7180 | rm -f core conftest.err conftest.$ac_objext | |
7181 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
7182 | done | |
7183 | rm -f conftest.$ac_ext | |
7184 | CC=$ac_save_CC | |
7185 | ||
7186 | fi | |
7187 | # AC_CACHE_VAL | |
7188 | case "x$ac_cv_prog_cc_c89" in | |
7189 | x) | |
7190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7191 | $as_echo "none needed" >&6; } ;; | |
7192 | xno) | |
7193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7194 | $as_echo "unsupported" >&6; } ;; | |
7195 | *) | |
7196 | CC="$CC $ac_cv_prog_cc_c89" | |
7197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
7198 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
7199 | esac | |
7200 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
7201 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
7202 | else | |
7203 | ac_cv_prog_cc_stdc=no | |
7204 | fi | |
7205 | ||
7206 | fi | |
7207 | ;; | |
7208 | esac | |
7209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 | |
7210 | $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } | |
a9bec17c | 7211 | if test "${ac_cv_prog_cc_stdc+set}" = set; then : |
6d153f56 GM |
7212 | $as_echo_n "(cached) " >&6 |
7213 | fi | |
7214 | ||
7215 | case $ac_cv_prog_cc_stdc in #( | |
7216 | no) : | |
7217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7218 | $as_echo "unsupported" >&6; } ;; #( | |
7219 | '') : | |
7220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7221 | $as_echo "none needed" >&6; } ;; #( | |
7222 | *) : | |
7223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 | |
7224 | $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; | |
7225 | esac | |
7226 | ||
1fd182f0 PE |
7227 | |
7228 | ||
4fc2b746 | 7229 | # Code from module alloca-opt: |
8d8af66d | 7230 | # Code from module allocator: |
d7ad186c | 7231 | # Code from module at-internal: |
20c9c1dc | 7232 | # Code from module binary-io: |
938a4ef9 GM |
7233 | # Code from module c-ctype: |
7234 | # Code from module c-strcase: | |
6c051bab | 7235 | # Code from module careadlinkat: |
f199cab1 | 7236 | # Code from module clock-time: |
3bf26e96 | 7237 | # Code from module close-stream: |
942f733f | 7238 | # Code from module crypto/md5: |
40e27e7f | 7239 | # Code from module crypto/sha1: |
d87ffdb7 GM |
7240 | # Code from module crypto/sha256: |
7241 | # Code from module crypto/sha512: | |
d7ad186c | 7242 | # Code from module dirent: |
36f13e16 | 7243 | # Code from module dosname: |
f737437b | 7244 | # Code from module dtoastr: |
f199cab1 | 7245 | # Code from module dtotimespec: |
7d2a1c5e | 7246 | # Code from module dup2: |
93131e11 | 7247 | # Code from module environ: |
3a019ab4 | 7248 | # Code from module errno: |
710f5812 | 7249 | # Code from module euidaccess: |
8966cbff | 7250 | # Code from module execinfo: |
1fd182f0 PE |
7251 | # Code from module extensions: |
7252 | ||
7cd2ed2c | 7253 | # Code from module extern-inline: |
710f5812 | 7254 | # Code from module faccessat: |
0cdca42a | 7255 | # Code from module fcntl: |
710f5812 | 7256 | # Code from module fcntl-h: |
2407788f | 7257 | # Code from module fdatasync: |
d7ad186c | 7258 | # Code from module fdopendir: |
5fa4ac76 | 7259 | # Code from module filemode: |
3bf26e96 | 7260 | # Code from module fpending: |
d7ad186c | 7261 | # Code from module fstatat: |
2407788f | 7262 | # Code from module fsync: |
0cdca42a | 7263 | # Code from module getdtablesize: |
710f5812 | 7264 | # Code from module getgroups: |
1f5d53eb | 7265 | # Code from module getloadavg: |
e275c824 PE |
7266 | # Code from module getopt-gnu: |
7267 | # Code from module getopt-posix: | |
7268 | # Code from module gettext-h: | |
f199cab1 GM |
7269 | # Code from module gettime: |
7270 | # Code from module gettimeofday: | |
710f5812 | 7271 | # Code from module group-member: |
1fd182f0 PE |
7272 | # Code from module include_next: |
7273 | # Code from module intprops: | |
4fda9c95 | 7274 | # Code from module inttypes-incomplete: |
369e19fc PE |
7275 | # Code from module largefile: |
7276 | ||
ae0d7250 | 7277 | # Code from module lstat: |
ac1ca7e9 | 7278 | # Code from module manywarnings: |
283c7aed | 7279 | # Code from module memrchr: |
1fd182f0 PE |
7280 | # Code from module mktime: |
7281 | # Code from module multiarch: | |
369e19fc | 7282 | # Code from module nocrash: |
d7ad186c | 7283 | # Code from module openat-h: |
a0a61e58 | 7284 | # Code from module pathmax: |
0cdca42a | 7285 | # Code from module pipe2: |
f199cab1 | 7286 | # Code from module pselect: |
3e0be4ab | 7287 | # Code from module pthread_sigmask: |
b5591ebb | 7288 | # Code from module putenv: |
3a019ab4 | 7289 | # Code from module qacl: |
ae0d7250 | 7290 | # Code from module readlink: |
d7ad186c | 7291 | # Code from module readlinkat: |
710f5812 | 7292 | # Code from module root-uid: |
e4184a20 | 7293 | # Code from module sig2str: |
2b1928b8 | 7294 | # Code from module signal-h: |
369e19fc PE |
7295 | # Code from module snippet/_Noreturn: |
7296 | # Code from module snippet/arg-nonnull: | |
7297 | # Code from module snippet/c++defs: | |
7298 | # Code from module snippet/warn-on-use: | |
6ad6792b | 7299 | # Code from module socklen: |
6c051bab | 7300 | # Code from module ssize_t: |
ae0d7250 | 7301 | # Code from module stat: |
f199cab1 | 7302 | # Code from module stat-time: |
0eb775a3 | 7303 | # Code from module stdalign: |
6d153f56 GM |
7304 | # Code from module stdarg: |
7305 | ||
8c069cc7 GM |
7306 | |
7307 | ||
16c3e636 | 7308 | # Code from module stdbool: |
1fd182f0 | 7309 | # Code from module stddef: |
5f90be1b | 7310 | # Code from module stdint: |
6ad6792b | 7311 | # Code from module stdio: |
1f5d53eb | 7312 | # Code from module stdlib: |
16c3e636 | 7313 | # Code from module strftime: |
283c7aed | 7314 | # Code from module string: |
3e0be4ab GM |
7315 | # Code from module strtoimax: |
7316 | # Code from module strtoll: | |
4fda9c95 GM |
7317 | # Code from module strtoull: |
7318 | # Code from module strtoumax: | |
ae0d7250 | 7319 | # Code from module symlink: |
f199cab1 | 7320 | # Code from module sys_select: |
5fa4ac76 | 7321 | # Code from module sys_stat: |
f199cab1 | 7322 | # Code from module sys_time: |
1fd182f0 PE |
7323 | # Code from module time: |
7324 | # Code from module time_r: | |
f077f61d | 7325 | # Code from module timer-time: |
f199cab1 GM |
7326 | # Code from module timespec: |
7327 | # Code from module timespec-add: | |
7328 | # Code from module timespec-sub: | |
d87ffdb7 | 7329 | # Code from module u64: |
e275c824 | 7330 | # Code from module unistd: |
b5591ebb | 7331 | # Code from module unsetenv: |
f199cab1 | 7332 | # Code from module utimens: |
4fda9c95 | 7333 | # Code from module verify: |
ac1ca7e9 | 7334 | # Code from module warnings: |
710f5812 | 7335 | # Code from module xalloc-oversized: |
1fd182f0 PE |
7336 | |
7337 | ||
6bd1cda5 | 7338 | if test "$ac_test_CFLAGS" != set; then |
8beecaed GM |
7339 | # It's helpful to have C macros available to GDB, so prefer -g3 to -g |
7340 | # if -g3 works and the user does not specify CFLAGS. | |
7341 | # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. | |
6bd1cda5 GM |
7342 | case $CFLAGS in |
7343 | '-g') | |
7344 | emacs_g3_CFLAGS='-g3';; | |
7345 | '-g -O2') | |
7346 | emacs_g3_CFLAGS='-g3 -O2';; | |
7347 | *) | |
7348 | emacs_g3_CFLAGS='';; | |
7349 | esac | |
7350 | if test -n "$emacs_g3_CFLAGS"; then | |
7351 | emacs_save_CFLAGS=$CFLAGS | |
7352 | CFLAGS=$emacs_g3_CFLAGS | |
7353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5 | |
7354 | $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; } | |
7355 | if test "${emacs_cv_prog_cc_g3+set}" = set; then : | |
7356 | $as_echo_n "(cached) " >&6 | |
7357 | else | |
7358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7359 | /* end confdefs.h. */ | |
7360 | ||
7361 | int | |
7362 | main () | |
7363 | { | |
7364 | ||
7365 | ; | |
7366 | return 0; | |
7367 | } | |
7368 | _ACEOF | |
7369 | if ac_fn_c_try_link "$LINENO"; then : | |
7370 | emacs_cv_prog_cc_g3=yes | |
7371 | else | |
7372 | emacs_cv_prog_cc_g3=no | |
7373 | fi | |
7374 | rm -f core conftest.err conftest.$ac_objext \ | |
7375 | conftest$ac_exeext conftest.$ac_ext | |
7376 | fi | |
7377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 | |
7378 | $as_echo "$emacs_cv_prog_cc_g3" >&6; } | |
8beecaed | 7379 | if test $emacs_cv_prog_cc_g3 != yes; then |
6bd1cda5 GM |
7380 | CFLAGS=$emacs_save_CFLAGS |
7381 | fi | |
7c61eaab GM |
7382 | if test $opsys = mingw32; then |
7383 | CFLAGS="$CFLAGS -gdwarf-2" | |
7384 | fi | |
6bd1cda5 | 7385 | fi |
8beecaed GM |
7386 | |
7387 | case $CFLAGS in | |
7388 | *-O*) ;; | |
7389 | *) | |
7390 | # No optimization flag was inferred for this non-GCC compiler. | |
7391 | # Try -O. This is needed for xlc on AIX; see Bug#14258. | |
7392 | emacs_save_CFLAGS=$CFLAGS | |
7393 | test -z "$CFLAGS" || CFLAGS="$CFLAGS " | |
7394 | CFLAGS=${CFLAGS}-O | |
7395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5 | |
7396 | $as_echo_n "checking whether $CC accepts -O... " >&6; } | |
7397 | if test "${emacs_cv_prog_cc_o+set}" = set; then : | |
7398 | $as_echo_n "(cached) " >&6 | |
7399 | else | |
7400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7401 | /* end confdefs.h. */ | |
7402 | ||
7403 | int | |
7404 | main () | |
7405 | { | |
7406 | ||
7407 | ; | |
7408 | return 0; | |
7409 | } | |
7410 | _ACEOF | |
7411 | if ac_fn_c_try_link "$LINENO"; then : | |
7412 | emacs_cv_prog_cc_o=yes | |
7413 | else | |
7414 | emacs_cv_prog_cc_o=no | |
7415 | fi | |
7416 | rm -f core conftest.err conftest.$ac_objext \ | |
7417 | conftest$ac_exeext conftest.$ac_ext | |
7418 | fi | |
7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5 | |
7420 | $as_echo "$emacs_cv_prog_cc_o" >&6; } | |
7421 | if test $emacs_cv_prog_cc_o != yes; then | |
7422 | CFLAGS=$emacs_save_CFLAGS | |
7423 | fi ;; | |
7424 | esac | |
6bd1cda5 GM |
7425 | fi |
7426 | ||
a6b92a4a GM |
7427 | # Check whether --enable-gcc-warnings was given. |
7428 | if test "${enable_gcc_warnings+set}" = set; then : | |
7429 | enableval=$enable_gcc_warnings; case $enableval in | |
7430 | yes|no) ;; | |
7431 | *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;; | |
7432 | esac | |
7433 | gl_gcc_warnings=$enableval | |
7434 | else | |
7435 | gl_gcc_warnings=no | |
7436 | ||
7437 | fi | |
7438 | ||
7439 | ||
e4d35030 GM |
7440 | # Check whether --enable-link-time-optimization was given. |
7441 | if test "${enable_link_time_optimization+set}" = set; then : | |
7442 | enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then | |
7443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5 | |
7444 | $as_echo_n "checking whether link-time optimization is supported... " >&6; } | |
7445 | ac_lto_supported=no | |
7446 | if test x$GCC = xyes; then | |
7447 | CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null` | |
7448 | if test x$CPUS != x; then | |
7449 | LTO="-flto=$CPUS" | |
7450 | else | |
7451 | LTO="-flto" | |
7452 | fi | |
7453 | old_CFLAGS=$CFLAGS | |
7454 | CFLAGS="$CFLAGS $LTO" | |
7455 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7456 | /* end confdefs.h. */ | |
7457 | ||
7458 | int | |
7459 | main () | |
7460 | { | |
7461 | ||
7462 | ; | |
7463 | return 0; | |
7464 | } | |
7465 | _ACEOF | |
7466 | if ac_fn_c_try_compile "$LINENO"; then : | |
7467 | ac_lto_supported=yes | |
7468 | else | |
7469 | ac_lto_supported=no | |
7470 | fi | |
7471 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7472 | CFLAGS="$old_CFLAGS" | |
7473 | fi | |
7474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5 | |
7475 | $as_echo "$ac_lto_supported" >&6; } | |
7476 | if test "$ac_lto_supported" = "yes"; then | |
7477 | CFLAGS="$CFLAGS $LTO" | |
7478 | fi | |
7479 | fi | |
7480 | fi | |
7481 | ||
7482 | ||
a6b92a4a GM |
7483 | # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) |
7484 | # ------------------------------------------------ | |
7485 | # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. | |
7486 | # Otherwise, run RUN-IF-NOT-FOUND. | |
7487 | ||
7488 | ||
7489 | # When compiling with GCC, prefer -isystem to -I when including system | |
7490 | # include files, to avoid generating useless diagnostics for the files. | |
7491 | if test "$gl_gcc_warnings" != yes; then | |
7492 | isystem='-I' | |
7493 | else | |
7494 | isystem='-isystem ' | |
7495 | ||
7496 | # This, $nw, is the list of warnings we disable. | |
7497 | nw= | |
7498 | ||
7499 | case $with_x_toolkit in | |
7500 | lucid | athena | motif) | |
7501 | # Old toolkits mishandle 'const'. | |
7502 | nw="$nw -Wwrite-strings" | |
7503 | ;; | |
7504 | *) | |
dcfda130 GM |
7505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 |
7506 | $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; } | |
7507 | if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then : | |
7508 | $as_echo_n "(cached) " >&6 | |
7509 | else | |
7510 | ||
7511 | gl_save_compiler_FLAGS="$CFLAGS" | |
7512 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" | |
7513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7514 | /* end confdefs.h. */ | |
7515 | ||
7516 | int | |
7517 | main () | |
7518 | { | |
7519 | ||
7520 | ; | |
7521 | return 0; | |
7522 | } | |
7523 | _ACEOF | |
7524 | if ac_fn_c_try_compile "$LINENO"; then : | |
7525 | gl_cv_warn_c__Werror__Wunknown_warning_option=yes | |
7526 | else | |
7527 | gl_cv_warn_c__Werror__Wunknown_warning_option=no | |
7528 | fi | |
7529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7530 | CFLAGS="$gl_save_compiler_FLAGS" | |
7531 | ||
7532 | fi | |
7533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5 | |
7534 | $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; } | |
7535 | if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then : | |
7536 | gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' | |
7537 | else | |
7538 | gl_unknown_warnings_are_errors= | |
7539 | fi | |
7540 | ||
7541 | ||
7542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 | |
a6b92a4a GM |
7543 | $as_echo_n "checking whether C compiler handles -Werror... " >&6; } |
7544 | if test "${gl_cv_warn_c__Werror+set}" = set; then : | |
7545 | $as_echo_n "(cached) " >&6 | |
7546 | else | |
7547 | ||
7548 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 7549 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror" |
a6b92a4a | 7550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
7551 | /* end confdefs.h. */ |
7552 | ||
7553 | int | |
7554 | main () | |
7555 | { | |
7556 | ||
7557 | ; | |
7558 | return 0; | |
7559 | } | |
7560 | _ACEOF | |
7561 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7562 | gl_cv_warn_c__Werror=yes |
067d23c9 | 7563 | else |
a6b92a4a | 7564 | gl_cv_warn_c__Werror=no |
067d23c9 KY |
7565 | fi |
7566 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7567 | CFLAGS="$gl_save_compiler_FLAGS" |
7568 | ||
7569 | fi | |
7570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5 | |
7571 | $as_echo "$gl_cv_warn_c__Werror" >&6; } | |
7572 | if test "x$gl_cv_warn_c__Werror" = x""yes; then : | |
7573 | as_fn_append WERROR_CFLAGS " -Werror" | |
7574 | fi | |
7575 | ||
0eb775a3 | 7576 | |
a6b92a4a GM |
7577 | ;; |
7578 | esac | |
7579 | ||
7580 | ||
a6b92a4a | 7581 | nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings |
a6b92a4a | 7582 | nw="$nw -Woverlength-strings" # Not a problem these days |
a6b92a4a | 7583 | nw="$nw -Wlogical-op" # any use of fwrite provokes this |
fd9d2a9d | 7584 | nw="$nw -Wformat-nonliteral" # we do this a lot |
a6b92a4a GM |
7585 | nw="$nw -Wvla" # warnings in gettext.h |
7586 | nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ | |
a6b92a4a | 7587 | nw="$nw -Wswitch-default" # Too many warnings for now |
fd9d2a9d | 7588 | nw="$nw -Winline" # OK to ignore 'inline' |
6ec9a5a7 | 7589 | nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. |
da8ed5ba GM |
7590 | nw="$nw -Wstrict-overflow" # OK to optimize assuming that |
7591 | # signed overflow has undefined behavior | |
fd9d2a9d GM |
7592 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning |
7593 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations | |
372c83ba | 7594 | nw="$nw -Wbad-function-cast" # These casts are no worse than others. |
a6b92a4a GM |
7595 | |
7596 | # Emacs doesn't care about shadowing; see | |
7597 | # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | |
7598 | nw="$nw -Wshadow" | |
7599 | ||
ad33cb00 GM |
7600 | # Emacs's use of alloca inhibits protecting the stack. |
7601 | nw="$nw -Wstack-protector" | |
7602 | ||
da8ed5ba | 7603 | # The following line should be removable at some point. |
a6b92a4a GM |
7604 | nw="$nw -Wsuggest-attribute=pure" |
7605 | ||
c081121f GM |
7606 | # clang is unduly picky about some things. |
7607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 | |
7608 | $as_echo_n "checking whether the compiler is clang... " >&6; } | |
7609 | if test "${emacs_cv_clang+set}" = set; then : | |
7610 | $as_echo_n "(cached) " >&6 | |
7611 | else | |
7612 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7613 | /* end confdefs.h. */ | |
7614 | ||
7615 | #ifndef __clang__ | |
7616 | #error "not clang" | |
7617 | #endif | |
7618 | ||
7619 | int | |
7620 | main () | |
7621 | { | |
7622 | ||
7623 | ; | |
7624 | return 0; | |
7625 | } | |
7626 | _ACEOF | |
7627 | if ac_fn_c_try_compile "$LINENO"; then : | |
7628 | emacs_cv_clang=yes | |
7629 | else | |
7630 | emacs_cv_clang=no | |
7631 | fi | |
7632 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7633 | fi | |
7634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5 | |
7635 | $as_echo "$emacs_cv_clang" >&6; } | |
7636 | if test $emacs_cv_clang = yes; then | |
7637 | nw="$nw -Wcast-align" | |
7638 | fi | |
7639 | ||
a6b92a4a GM |
7640 | |
7641 | ||
7642 | if test -n "$GCC"; then | |
7643 | ||
7644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 | |
7645 | $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } | |
7646 | if test "${gl_cv_cc_nomfi_supported+set}" = set; then : | |
7647 | $as_echo_n "(cached) " >&6 | |
7648 | else | |
7649 | ||
7650 | gl_save_CFLAGS="$CFLAGS" | |
7651 | CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" | |
7652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
7653 | /* end confdefs.h. */ |
7654 | ||
7655 | int | |
7656 | main () | |
7657 | { | |
7658 | ||
7659 | ; | |
7660 | return 0; | |
7661 | } | |
7662 | _ACEOF | |
7663 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7664 | gl_cv_cc_nomfi_supported=yes |
067d23c9 | 7665 | else |
a6b92a4a | 7666 | gl_cv_cc_nomfi_supported=no |
067d23c9 KY |
7667 | fi |
7668 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7669 | CFLAGS="$gl_save_CFLAGS" |
7670 | fi | |
7671 | ||
7672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 | |
7673 | $as_echo "$gl_cv_cc_nomfi_supported" >&6; } | |
7674 | ||
7675 | if test "$gl_cv_cc_nomfi_supported" = yes; then | |
7676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 | |
7677 | $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } | |
7678 | if test "${gl_cv_cc_nomfi_needed+set}" = set; then : | |
7679 | $as_echo_n "(cached) " >&6 | |
7680 | else | |
7681 | ||
7682 | gl_save_CFLAGS="$CFLAGS" | |
7683 | CFLAGS="$CFLAGS -W -Werror" | |
7684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7685 | /* end confdefs.h. */ | |
7686 | void f (void) | |
7687 | { | |
7688 | typedef struct { int a; int b; } s_t; | |
7689 | s_t s1 = { 0, }; | |
7690 | } | |
7691 | ||
7692 | int | |
7693 | main () | |
7694 | { | |
7695 | ||
7696 | ; | |
7697 | return 0; | |
7698 | } | |
7699 | _ACEOF | |
7700 | if ac_fn_c_try_compile "$LINENO"; then : | |
7701 | gl_cv_cc_nomfi_needed=no | |
7702 | else | |
7703 | gl_cv_cc_nomfi_needed=yes | |
7704 | fi | |
7705 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7706 | CFLAGS="$gl_save_CFLAGS" | |
7707 | ||
7708 | fi | |
7709 | ||
7710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 | |
7711 | $as_echo "$gl_cv_cc_nomfi_needed" >&6; } | |
7712 | fi | |
b6c9d18d GM |
7713 | |
7714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5 | |
7715 | $as_echo_n "checking whether -Wuninitialized is supported... " >&6; } | |
7716 | if test "${gl_cv_cc_uninitialized_supported+set}" = set; then : | |
7717 | $as_echo_n "(cached) " >&6 | |
7718 | else | |
7719 | ||
7720 | gl_save_CFLAGS="$CFLAGS" | |
7721 | CFLAGS="$CFLAGS -Werror -Wuninitialized" | |
7722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7723 | /* end confdefs.h. */ | |
7724 | ||
7725 | int | |
7726 | main () | |
7727 | { | |
7728 | ||
7729 | ; | |
7730 | return 0; | |
7731 | } | |
7732 | _ACEOF | |
7733 | if ac_fn_c_try_compile "$LINENO"; then : | |
7734 | gl_cv_cc_uninitialized_supported=yes | |
7735 | else | |
7736 | gl_cv_cc_uninitialized_supported=no | |
7737 | fi | |
7738 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7739 | CFLAGS="$gl_save_CFLAGS" | |
7740 | fi | |
7741 | ||
7742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5 | |
7743 | $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } | |
7744 | ||
a6b92a4a GM |
7745 | fi |
7746 | ||
b6c9d18d | 7747 | # List all gcc warning categories. |
a6b92a4a GM |
7748 | gl_manywarn_set= |
7749 | for gl_manywarn_item in \ | |
a6b92a4a | 7750 | -W \ |
dcde497f GM |
7751 | -Wabi \ |
7752 | -Waddress \ | |
dcfda130 | 7753 | -Waggressive-loop-optimizations \ |
dcde497f GM |
7754 | -Wall \ |
7755 | -Warray-bounds \ | |
7756 | -Wattributes \ | |
a6b92a4a | 7757 | -Wbad-function-cast \ |
a6b92a4a | 7758 | -Wbuiltin-macro-redefined \ |
dcde497f GM |
7759 | -Wcast-align \ |
7760 | -Wchar-subscripts \ | |
7761 | -Wclobbered \ | |
7762 | -Wcomment \ | |
7763 | -Wcomments \ | |
a6b92a4a | 7764 | -Wcoverage-mismatch \ |
a6b92a4a GM |
7765 | -Wcpp \ |
7766 | -Wdeprecated \ | |
7767 | -Wdeprecated-declarations \ | |
dcde497f | 7768 | -Wdisabled-optimization \ |
a6b92a4a GM |
7769 | -Wdiv-by-zero \ |
7770 | -Wdouble-promotion \ | |
dcde497f | 7771 | -Wempty-body \ |
a6b92a4a | 7772 | -Wendif-labels \ |
dcde497f | 7773 | -Wenum-compare \ |
a6b92a4a GM |
7774 | -Wextra \ |
7775 | -Wformat-contains-nul \ | |
7776 | -Wformat-extra-args \ | |
dcde497f GM |
7777 | -Wformat-nonliteral \ |
7778 | -Wformat-security \ | |
7779 | -Wformat-y2k \ | |
a6b92a4a | 7780 | -Wformat-zero-length \ |
dcde497f GM |
7781 | -Wfree-nonheap-object \ |
7782 | -Wignored-qualifiers \ | |
7783 | -Wimplicit \ | |
7784 | -Wimplicit-function-declaration \ | |
7785 | -Wimplicit-int \ | |
7786 | -Winit-self \ | |
7787 | -Winline \ | |
7788 | -Wint-to-pointer-cast \ | |
7789 | -Winvalid-memory-model \ | |
7790 | -Winvalid-pch \ | |
7791 | -Wjump-misses-init \ | |
7792 | -Wlogical-op \ | |
7793 | -Wmain \ | |
7794 | -Wmaybe-uninitialized \ | |
7795 | -Wmissing-braces \ | |
7796 | -Wmissing-declarations \ | |
7797 | -Wmissing-field-initializers \ | |
dcde497f | 7798 | -Wmissing-include-dirs \ |
dcde497f GM |
7799 | -Wmissing-parameter-type \ |
7800 | -Wmissing-prototypes \ | |
7801 | -Wmudflap \ | |
a6b92a4a | 7802 | -Wmultichar \ |
dcde497f GM |
7803 | -Wnarrowing \ |
7804 | -Wnested-externs \ | |
7805 | -Wnonnull \ | |
a6b92a4a | 7806 | -Wnormalized=nfc \ |
dcde497f GM |
7807 | -Wold-style-declaration \ |
7808 | -Wold-style-definition \ | |
a6b92a4a | 7809 | -Woverflow \ |
dcde497f GM |
7810 | -Woverlength-strings \ |
7811 | -Woverride-init \ | |
7812 | -Wpacked \ | |
7813 | -Wpacked-bitfield-compat \ | |
7814 | -Wparentheses \ | |
7815 | -Wpointer-arith \ | |
7816 | -Wpointer-sign \ | |
a6b92a4a GM |
7817 | -Wpointer-to-int-cast \ |
7818 | -Wpragmas \ | |
dcfda130 | 7819 | -Wreturn-local-addr \ |
dcde497f GM |
7820 | -Wreturn-type \ |
7821 | -Wsequence-point \ | |
7822 | -Wshadow \ | |
7823 | -Wsizeof-pointer-memaccess \ | |
7824 | -Wstack-protector \ | |
7825 | -Wstrict-aliasing \ | |
7826 | -Wstrict-overflow \ | |
7827 | -Wstrict-prototypes \ | |
a6b92a4a | 7828 | -Wsuggest-attribute=const \ |
dcde497f | 7829 | -Wsuggest-attribute=format \ |
a6b92a4a GM |
7830 | -Wsuggest-attribute=noreturn \ |
7831 | -Wsuggest-attribute=pure \ | |
dcde497f GM |
7832 | -Wswitch \ |
7833 | -Wswitch-default \ | |
7834 | -Wsync-nand \ | |
7835 | -Wsystem-headers \ | |
a6b92a4a | 7836 | -Wtrampolines \ |
dcde497f GM |
7837 | -Wtrigraphs \ |
7838 | -Wtype-limits \ | |
7839 | -Wuninitialized \ | |
7840 | -Wunknown-pragmas \ | |
dcde497f GM |
7841 | -Wunsafe-loop-optimizations \ |
7842 | -Wunused \ | |
7843 | -Wunused-but-set-parameter \ | |
7844 | -Wunused-but-set-variable \ | |
7845 | -Wunused-function \ | |
7846 | -Wunused-label \ | |
7847 | -Wunused-local-typedefs \ | |
7848 | -Wunused-macros \ | |
7849 | -Wunused-parameter \ | |
7850 | -Wunused-result \ | |
7851 | -Wunused-value \ | |
7852 | -Wunused-variable \ | |
7853 | -Wvarargs \ | |
7854 | -Wvariadic-macros \ | |
7855 | -Wvector-operation-performance \ | |
7856 | -Wvla \ | |
7857 | -Wvolatile-register-var \ | |
7858 | -Wwrite-strings \ | |
7859 | \ | |
a6b92a4a GM |
7860 | ; do |
7861 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | |
7862 | done | |
7863 | ||
b6c9d18d | 7864 | # Disable specific options as needed. |
a6b92a4a GM |
7865 | if test "$gl_cv_cc_nomfi_needed" = yes; then |
7866 | gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" | |
7867 | fi | |
7868 | ||
b6c9d18d GM |
7869 | if test "$gl_cv_cc_uninitialized_supported" = no; then |
7870 | gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized" | |
7871 | fi | |
7872 | ||
a6b92a4a GM |
7873 | ws=$gl_manywarn_set |
7874 | ||
7875 | ||
7876 | gl_warn_set= | |
7877 | set x $ws; shift | |
7878 | for gl_warn_item | |
7879 | do | |
7880 | case " $nw " in | |
7881 | *" $gl_warn_item "*) | |
7882 | ;; | |
7883 | *) | |
7884 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
7885 | ;; | |
7886 | esac | |
7887 | done | |
7888 | ws=$gl_warn_set | |
7889 | ||
7890 | for w in $ws; do | |
dcfda130 GM |
7891 | |
7892 | as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh` | |
a6b92a4a GM |
7893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5 |
7894 | $as_echo_n "checking whether C compiler handles $w... " >&6; } | |
7895 | if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7896 | $as_echo_n "(cached) " >&6 | |
7897 | else | |
7898 | ||
7899 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 7900 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w" |
a6b92a4a GM |
7901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7902 | /* end confdefs.h. */ | |
7903 | ||
7904 | int | |
7905 | main () | |
7906 | { | |
7907 | ||
7908 | ; | |
7909 | return 0; | |
7910 | } | |
7911 | _ACEOF | |
7912 | if ac_fn_c_try_compile "$LINENO"; then : | |
7913 | eval "$as_gl_Warn=yes" | |
7914 | else | |
7915 | eval "$as_gl_Warn=no" | |
7916 | fi | |
7917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7918 | CFLAGS="$gl_save_compiler_FLAGS" | |
7919 | ||
7920 | fi | |
7921 | eval ac_res=\$$as_gl_Warn | |
7922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7923 | $as_echo "$ac_res" >&6; } | |
7924 | eval as_val=\$$as_gl_Warn | |
7925 | if test "x$as_val" = x""yes; then : | |
7926 | as_fn_append WARN_CFLAGS " $w" | |
7927 | fi | |
7928 | ||
0eb775a3 | 7929 | |
a6b92a4a | 7930 | done |
dcfda130 GM |
7931 | |
7932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 | |
a6b92a4a GM |
7933 | $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } |
7934 | if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then : | |
7935 | $as_echo_n "(cached) " >&6 | |
7936 | else | |
7937 | ||
7938 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 7939 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers" |
a6b92a4a GM |
7940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7941 | /* end confdefs.h. */ | |
7942 | ||
7943 | int | |
7944 | main () | |
7945 | { | |
7946 | ||
7947 | ; | |
7948 | return 0; | |
7949 | } | |
7950 | _ACEOF | |
7951 | if ac_fn_c_try_compile "$LINENO"; then : | |
7952 | gl_cv_warn_c__Wno_missing_field_initializers=yes | |
7953 | else | |
7954 | gl_cv_warn_c__Wno_missing_field_initializers=no | |
7955 | fi | |
7956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7957 | CFLAGS="$gl_save_compiler_FLAGS" | |
7958 | ||
7959 | fi | |
7960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5 | |
7961 | $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; } | |
7962 | if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then : | |
7963 | as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" | |
7964 | fi | |
0eb775a3 | 7965 | |
a6b92a4a | 7966 | # We need this one |
dcfda130 GM |
7967 | |
7968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 | |
a6b92a4a GM |
7969 | $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; } |
7970 | if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then : | |
7971 | $as_echo_n "(cached) " >&6 | |
7972 | else | |
7973 | ||
7974 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 7975 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare" |
a6b92a4a GM |
7976 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7977 | /* end confdefs.h. */ | |
7978 | ||
7979 | int | |
7980 | main () | |
7981 | { | |
7982 | ||
7983 | ; | |
7984 | return 0; | |
7985 | } | |
7986 | _ACEOF | |
7987 | if ac_fn_c_try_compile "$LINENO"; then : | |
7988 | gl_cv_warn_c__Wno_sign_compare=yes | |
7989 | else | |
7990 | gl_cv_warn_c__Wno_sign_compare=no | |
7991 | fi | |
7992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7993 | CFLAGS="$gl_save_compiler_FLAGS" | |
7994 | ||
7995 | fi | |
7996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5 | |
7997 | $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; } | |
7998 | if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then : | |
7999 | as_fn_append WARN_CFLAGS " -Wno-sign-compare" | |
8000 | fi | |
0eb775a3 | 8001 | |
a6b92a4a | 8002 | # Too many warnings for now |
dcfda130 GM |
8003 | |
8004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5 | |
a6b92a4a GM |
8005 | $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; } |
8006 | if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then : | |
8007 | $as_echo_n "(cached) " >&6 | |
8008 | else | |
8009 | ||
8010 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8011 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits" |
a6b92a4a GM |
8012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8013 | /* end confdefs.h. */ | |
8014 | ||
8015 | int | |
8016 | main () | |
8017 | { | |
8018 | ||
8019 | ; | |
8020 | return 0; | |
8021 | } | |
8022 | _ACEOF | |
8023 | if ac_fn_c_try_compile "$LINENO"; then : | |
8024 | gl_cv_warn_c__Wno_type_limits=yes | |
8025 | else | |
8026 | gl_cv_warn_c__Wno_type_limits=no | |
8027 | fi | |
8028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8029 | CFLAGS="$gl_save_compiler_FLAGS" | |
8030 | ||
8031 | fi | |
8032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5 | |
8033 | $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; } | |
8034 | if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then : | |
8035 | as_fn_append WARN_CFLAGS " -Wno-type-limits" | |
8036 | fi | |
0eb775a3 | 8037 | |
a6b92a4a | 8038 | # Too many warnings for now |
dcfda130 GM |
8039 | |
8040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5 | |
a6b92a4a GM |
8041 | $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; } |
8042 | if test "${gl_cv_warn_c__Wno_switch+set}" = set; then : | |
8043 | $as_echo_n "(cached) " >&6 | |
8044 | else | |
8045 | ||
8046 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8047 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch" |
a6b92a4a GM |
8048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8049 | /* end confdefs.h. */ | |
8050 | ||
8051 | int | |
8052 | main () | |
8053 | { | |
8054 | ||
8055 | ; | |
8056 | return 0; | |
8057 | } | |
8058 | _ACEOF | |
8059 | if ac_fn_c_try_compile "$LINENO"; then : | |
8060 | gl_cv_warn_c__Wno_switch=yes | |
8061 | else | |
8062 | gl_cv_warn_c__Wno_switch=no | |
8063 | fi | |
8064 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8065 | CFLAGS="$gl_save_compiler_FLAGS" | |
8066 | ||
8067 | fi | |
8068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5 | |
8069 | $as_echo "$gl_cv_warn_c__Wno_switch" >&6; } | |
8070 | if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then : | |
8071 | as_fn_append WARN_CFLAGS " -Wno-switch" | |
8072 | fi | |
0eb775a3 | 8073 | |
a6b92a4a | 8074 | # Too many warnings for now |
dcfda130 GM |
8075 | |
8076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 | |
a6b92a4a GM |
8077 | $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; } |
8078 | if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then : | |
8079 | $as_echo_n "(cached) " >&6 | |
8080 | else | |
8081 | ||
8082 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8083 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter" |
a6b92a4a GM |
8084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8085 | /* end confdefs.h. */ | |
8086 | ||
8087 | int | |
8088 | main () | |
8089 | { | |
8090 | ||
8091 | ; | |
8092 | return 0; | |
8093 | } | |
8094 | _ACEOF | |
8095 | if ac_fn_c_try_compile "$LINENO"; then : | |
8096 | gl_cv_warn_c__Wno_unused_parameter=yes | |
8097 | else | |
8098 | gl_cv_warn_c__Wno_unused_parameter=no | |
8099 | fi | |
8100 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8101 | CFLAGS="$gl_save_compiler_FLAGS" | |
8102 | ||
8103 | fi | |
8104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5 | |
8105 | $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; } | |
8106 | if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then : | |
8107 | as_fn_append WARN_CFLAGS " -Wno-unused-parameter" | |
8108 | fi | |
0eb775a3 | 8109 | |
a6b92a4a | 8110 | # Too many warnings for now |
dcfda130 GM |
8111 | |
8112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 | |
a6b92a4a GM |
8113 | $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } |
8114 | if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then : | |
8115 | $as_echo_n "(cached) " >&6 | |
8116 | else | |
8117 | ||
8118 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8119 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral" |
a6b92a4a GM |
8120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8121 | /* end confdefs.h. */ | |
8122 | ||
8123 | int | |
8124 | main () | |
8125 | { | |
8126 | ||
8127 | ; | |
8128 | return 0; | |
8129 | } | |
8130 | _ACEOF | |
8131 | if ac_fn_c_try_compile "$LINENO"; then : | |
8132 | gl_cv_warn_c__Wno_format_nonliteral=yes | |
8133 | else | |
8134 | gl_cv_warn_c__Wno_format_nonliteral=no | |
8135 | fi | |
8136 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8137 | CFLAGS="$gl_save_compiler_FLAGS" | |
8138 | ||
8139 | fi | |
8140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5 | |
8141 | $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; } | |
8142 | if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then : | |
8143 | as_fn_append WARN_CFLAGS " -Wno-format-nonliteral" | |
8144 | fi | |
8145 | ||
8146 | ||
0eb775a3 | 8147 | |
a6b92a4a GM |
8148 | # In spite of excluding -Wlogical-op above, it is enabled, as of |
8149 | # gcc 4.5.0 20090517. | |
dcfda130 GM |
8150 | |
8151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 | |
a6b92a4a GM |
8152 | $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; } |
8153 | if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then : | |
8154 | $as_echo_n "(cached) " >&6 | |
8155 | else | |
8156 | ||
8157 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8158 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op" |
a6b92a4a GM |
8159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8160 | /* end confdefs.h. */ | |
8161 | ||
8162 | int | |
8163 | main () | |
8164 | { | |
8165 | ||
8166 | ; | |
8167 | return 0; | |
8168 | } | |
8169 | _ACEOF | |
8170 | if ac_fn_c_try_compile "$LINENO"; then : | |
8171 | gl_cv_warn_c__Wno_logical_op=yes | |
8172 | else | |
8173 | gl_cv_warn_c__Wno_logical_op=no | |
8174 | fi | |
8175 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8176 | CFLAGS="$gl_save_compiler_FLAGS" | |
8177 | ||
8178 | fi | |
8179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5 | |
8180 | $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; } | |
8181 | if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then : | |
8182 | as_fn_append WARN_CFLAGS " -Wno-logical-op" | |
8183 | fi | |
8184 | ||
8185 | ||
0eb775a3 | 8186 | |
c081121f GM |
8187 | # More things that clang is unduly picky about. |
8188 | if test $emacs_cv_clang = yes; then | |
8189 | ||
8190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5 | |
8191 | $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; } | |
8192 | if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then : | |
8193 | $as_echo_n "(cached) " >&6 | |
8194 | else | |
8195 | ||
8196 | gl_save_compiler_FLAGS="$CFLAGS" | |
8197 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args" | |
8198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8199 | /* end confdefs.h. */ | |
8200 | ||
8201 | int | |
8202 | main () | |
8203 | { | |
8204 | ||
8205 | ; | |
8206 | return 0; | |
8207 | } | |
8208 | _ACEOF | |
8209 | if ac_fn_c_try_compile "$LINENO"; then : | |
8210 | gl_cv_warn_c__Wno_format_extra_args=yes | |
8211 | else | |
8212 | gl_cv_warn_c__Wno_format_extra_args=no | |
8213 | fi | |
8214 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8215 | CFLAGS="$gl_save_compiler_FLAGS" | |
8216 | ||
8217 | fi | |
8218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5 | |
8219 | $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; } | |
8220 | if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then : | |
8221 | as_fn_append WARN_CFLAGS " -Wno-format-extra-args" | |
8222 | fi | |
8223 | ||
8224 | ||
8225 | ||
8226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5 | |
8227 | $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; } | |
8228 | if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then : | |
8229 | $as_echo_n "(cached) " >&6 | |
8230 | else | |
8231 | ||
8232 | gl_save_compiler_FLAGS="$CFLAGS" | |
8233 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare" | |
8234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8235 | /* end confdefs.h. */ | |
8236 | ||
8237 | int | |
8238 | main () | |
8239 | { | |
8240 | ||
8241 | ; | |
8242 | return 0; | |
8243 | } | |
8244 | _ACEOF | |
8245 | if ac_fn_c_try_compile "$LINENO"; then : | |
8246 | gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes | |
8247 | else | |
8248 | gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no | |
8249 | fi | |
8250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8251 | CFLAGS="$gl_save_compiler_FLAGS" | |
8252 | ||
8253 | fi | |
8254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5 | |
8255 | $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; } | |
8256 | if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then : | |
8257 | as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare" | |
8258 | fi | |
8259 | ||
8260 | ||
8261 | ||
8262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5 | |
8263 | $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; } | |
8264 | if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then : | |
8265 | $as_echo_n "(cached) " >&6 | |
8266 | else | |
8267 | ||
8268 | gl_save_compiler_FLAGS="$CFLAGS" | |
8269 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument" | |
8270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8271 | /* end confdefs.h. */ | |
8272 | ||
8273 | int | |
8274 | main () | |
8275 | { | |
8276 | ||
8277 | ; | |
8278 | return 0; | |
8279 | } | |
8280 | _ACEOF | |
8281 | if ac_fn_c_try_compile "$LINENO"; then : | |
8282 | gl_cv_warn_c__Wno_unused_command_line_argument=yes | |
8283 | else | |
8284 | gl_cv_warn_c__Wno_unused_command_line_argument=no | |
8285 | fi | |
8286 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8287 | CFLAGS="$gl_save_compiler_FLAGS" | |
8288 | ||
8289 | fi | |
8290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5 | |
8291 | $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; } | |
8292 | if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then : | |
8293 | as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument" | |
8294 | fi | |
8295 | ||
8296 | ||
8297 | ||
8298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5 | |
8299 | $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; } | |
8300 | if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then : | |
8301 | $as_echo_n "(cached) " >&6 | |
8302 | else | |
8303 | ||
8304 | gl_save_compiler_FLAGS="$CFLAGS" | |
8305 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value" | |
8306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8307 | /* end confdefs.h. */ | |
8308 | ||
8309 | int | |
8310 | main () | |
8311 | { | |
8312 | ||
8313 | ; | |
8314 | return 0; | |
8315 | } | |
8316 | _ACEOF | |
8317 | if ac_fn_c_try_compile "$LINENO"; then : | |
8318 | gl_cv_warn_c__Wno_unused_value=yes | |
8319 | else | |
8320 | gl_cv_warn_c__Wno_unused_value=no | |
8321 | fi | |
8322 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8323 | CFLAGS="$gl_save_compiler_FLAGS" | |
8324 | ||
8325 | fi | |
8326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5 | |
8327 | $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; } | |
8328 | if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then : | |
8329 | as_fn_append WARN_CFLAGS " -Wno-unused-value" | |
8330 | fi | |
8331 | ||
8332 | ||
8333 | fi | |
8334 | ||
dcfda130 GM |
8335 | |
8336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 | |
a6b92a4a GM |
8337 | $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } |
8338 | if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then : | |
8339 | $as_echo_n "(cached) " >&6 | |
8340 | else | |
8341 | ||
8342 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8343 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option" |
a6b92a4a | 8344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
8345 | /* end confdefs.h. */ |
8346 | ||
8347 | int | |
8348 | main () | |
8349 | { | |
8350 | ||
8351 | ; | |
8352 | return 0; | |
8353 | } | |
8354 | _ACEOF | |
8355 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 8356 | gl_cv_warn_c__fdiagnostics_show_option=yes |
067d23c9 | 8357 | else |
a6b92a4a | 8358 | gl_cv_warn_c__fdiagnostics_show_option=no |
067d23c9 KY |
8359 | fi |
8360 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
8361 | CFLAGS="$gl_save_compiler_FLAGS" |
8362 | ||
8363 | fi | |
8364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5 | |
8365 | $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; } | |
8366 | if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then : | |
8367 | as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" | |
067d23c9 | 8368 | fi |
067d23c9 | 8369 | |
0eb775a3 | 8370 | |
dcfda130 GM |
8371 | |
8372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 | |
a6b92a4a GM |
8373 | $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } |
8374 | if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then : | |
8375 | $as_echo_n "(cached) " >&6 | |
8376 | else | |
8377 | ||
8378 | gl_save_compiler_FLAGS="$CFLAGS" | |
dcfda130 | 8379 | as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time" |
a6b92a4a GM |
8380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8381 | /* end confdefs.h. */ | |
8382 | ||
8383 | int | |
8384 | main () | |
8385 | { | |
8386 | ||
8387 | ; | |
8388 | return 0; | |
8389 | } | |
8390 | _ACEOF | |
8391 | if ac_fn_c_try_compile "$LINENO"; then : | |
8392 | gl_cv_warn_c__funit_at_a_time=yes | |
8393 | else | |
8394 | gl_cv_warn_c__funit_at_a_time=no | |
8395 | fi | |
8396 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8397 | CFLAGS="$gl_save_compiler_FLAGS" | |
8398 | ||
8399 | fi | |
8400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5 | |
8401 | $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; } | |
8402 | if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then : | |
8403 | as_fn_append WARN_CFLAGS " -funit-at-a-time" | |
8404 | fi | |
8405 | ||
8406 | ||
8407 | ||
0eb775a3 | 8408 | |
a6b92a4a GM |
8409 | $as_echo "#define lint 1" >>confdefs.h |
8410 | ||
8411 | ||
a6b92a4a GM |
8412 | |
8413 | $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h | |
8414 | ||
8415 | ||
8416 | # We use a slightly smaller set of warning options for lib/. | |
8417 | # Remove the following and save the result in GNULIB_WARN_CFLAGS. | |
8418 | nw= | |
8419 | nw="$nw -Wunused-macros" | |
8420 | ||
8421 | ||
8422 | gl_warn_set= | |
8423 | set x $WARN_CFLAGS; shift | |
8424 | for gl_warn_item | |
8425 | do | |
8426 | case " $nw " in | |
8427 | *" $gl_warn_item "*) | |
8428 | ;; | |
8429 | *) | |
8430 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
8431 | ;; | |
8432 | esac | |
8433 | done | |
8434 | GNULIB_WARN_CFLAGS=$gl_warn_set | |
8435 | ||
8436 | ||
8437 | fi | |
067d23c9 KY |
8438 | |
8439 | ||
8440 | ||
4c5f4270 GM |
8441 | |
8442 | ||
8443 | ||
8444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5 | |
8445 | $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; } | |
8446 | rm -f conf$$ conf$$.file | |
8447 | ||
8448 | LN_S_FILEONLY='cp -p' | |
8449 | ||
8450 | if (echo >conf$$.file) 2>/dev/null; then | |
8451 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
8452 | LN_S_FILEONLY='ln -s' | |
8453 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
8454 | LN_S_FILEONLY=ln | |
8455 | fi | |
8456 | fi | |
8457 | ||
8458 | rm -f conf$$ conf$$.file | |
8459 | ||
8460 | if test "$LN_S_FILEONLY" = "ln -s"; then | |
8461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
0e733db9 GM |
8462 | $as_echo "yes" >&6; } |
8463 | else | |
4c5f4270 GM |
8464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5 |
8465 | $as_echo "no, using $LN_S_FILEONLY" >&6; } | |
0e733db9 GM |
8466 | fi |
8467 | ||
067d23c9 | 8468 | |
4c5f4270 GM |
8469 | |
8470 | ||
7c61eaab GM |
8471 | if test "$opsys" = "mingw32"; then |
8472 | LN_S="ln" | |
8473 | fi | |
8474 | ||
067d23c9 KY |
8475 | # Extract the first word of "install-info", so it can be a program name with args. |
8476 | set dummy install-info; ac_word=$2 | |
8477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8478 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8479 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
8480 | $as_echo_n "(cached) " >&6 |
8481 | else | |
8482 | case $INSTALL_INFO in | |
8483 | [\\/]* | ?:[\\/]*) | |
8484 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
8485 | ;; | |
8486 | *) | |
8487 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e700232f | 8488 | for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin |
067d23c9 KY |
8489 | do |
8490 | IFS=$as_save_IFS | |
8491 | test -z "$as_dir" && as_dir=. | |
8492 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8493 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8494 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
8495 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8496 | break 2 | |
8497 | fi | |
8498 | done | |
8499 | done | |
8500 | IFS=$as_save_IFS | |
8501 | ||
8502 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
8503 | ;; | |
8504 | esac | |
8505 | fi | |
8506 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
8507 | if test -n "$INSTALL_INFO"; then | |
8508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
8509 | $as_echo "$INSTALL_INFO" >&6; } | |
8510 | else | |
8511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8512 | $as_echo "no" >&6; } | |
8513 | fi | |
8514 | ||
8515 | ||
8516 | # Extract the first word of "gzip", so it can be a program name with args. | |
8517 | set dummy gzip; ac_word=$2 | |
8518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8519 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8520 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
8521 | $as_echo_n "(cached) " >&6 |
8522 | else | |
8523 | case $GZIP_PROG in | |
8524 | [\\/]* | ?:[\\/]*) | |
8525 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
8526 | ;; | |
8527 | *) | |
8528 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8529 | for as_dir in $PATH | |
8530 | do | |
8531 | IFS=$as_save_IFS | |
8532 | test -z "$as_dir" && as_dir=. | |
8533 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8534 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8535 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
8536 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8537 | break 2 | |
8538 | fi | |
8539 | done | |
8540 | done | |
8541 | IFS=$as_save_IFS | |
8542 | ||
8543 | ;; | |
8544 | esac | |
8545 | fi | |
8546 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
8547 | if test -n "$GZIP_PROG"; then | |
8548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
8549 | $as_echo "$GZIP_PROG" >&6; } | |
8550 | else | |
8551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8552 | $as_echo "no" >&6; } | |
8553 | fi | |
8554 | ||
8555 | ||
7ee3791f GM |
8556 | |
8557 | if test $opsys = gnu-linux; then | |
8558 | # Extract the first word of "paxctl", so it can be a program name with args. | |
9c29597b GM |
8559 | set dummy paxctl; ac_word=$2 |
8560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8561 | $as_echo_n "checking for $ac_word... " >&6; } | |
8562 | if test "${ac_cv_path_PAXCTL+set}" = set; then : | |
8563 | $as_echo_n "(cached) " >&6 | |
8564 | else | |
8565 | case $PAXCTL in | |
8566 | [\\/]* | ?:[\\/]*) | |
8567 | ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path. | |
8568 | ;; | |
8569 | *) | |
8570 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8571 | for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin | |
8572 | do | |
8573 | IFS=$as_save_IFS | |
8574 | test -z "$as_dir" && as_dir=. | |
8575 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8576 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8577 | ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext" | |
8578 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8579 | break 2 | |
8580 | fi | |
8581 | done | |
8582 | done | |
8583 | IFS=$as_save_IFS | |
8584 | ||
8585 | ;; | |
8586 | esac | |
8587 | fi | |
8588 | PAXCTL=$ac_cv_path_PAXCTL | |
8589 | if test -n "$PAXCTL"; then | |
8590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5 | |
8591 | $as_echo "$PAXCTL" >&6; } | |
8592 | else | |
8593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8594 | $as_echo "no" >&6; } | |
8595 | fi | |
8596 | ||
8597 | ||
685e57ea GM |
8598 | if test "X$PAXCTL" != X; then |
8599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5 | |
8600 | $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; } | |
8601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8602 | /* end confdefs.h. */ | |
8603 | ||
8604 | int | |
8605 | main () | |
8606 | { | |
8607 | ||
8608 | ; | |
8609 | return 0; | |
8610 | } | |
8611 | _ACEOF | |
8612 | if ac_fn_c_try_link "$LINENO"; then : | |
8613 | if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8614 | $as_echo "yes" >&6; } | |
8615 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8616 | $as_echo "no" >&6; }; PAXCTL=""; fi | |
8617 | fi | |
8618 | rm -f core conftest.err conftest.$ac_objext \ | |
8619 | conftest$ac_exeext conftest.$ac_ext | |
8620 | fi | |
7ee3791f | 8621 | fi |
067d23c9 | 8622 | |
9e40dda4 | 8623 | ## Need makeinfo >= 4.7 (?) to build the manuals. |
067d23c9 KY |
8624 | # Extract the first word of "makeinfo", so it can be a program name with args. |
8625 | set dummy makeinfo; ac_word=$2 | |
8626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8627 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8628 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
8629 | $as_echo_n "(cached) " >&6 |
8630 | else | |
8631 | case $MAKEINFO in | |
8632 | [\\/]* | ?:[\\/]*) | |
8633 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
8634 | ;; | |
8635 | *) | |
8636 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8637 | for as_dir in $PATH | |
8638 | do | |
8639 | IFS=$as_save_IFS | |
8640 | test -z "$as_dir" && as_dir=. | |
8641 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8642 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8643 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
8644 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8645 | break 2 | |
8646 | fi | |
8647 | done | |
8648 | done | |
8649 | IFS=$as_save_IFS | |
8650 | ||
8651 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
8652 | ;; | |
8653 | esac | |
8654 | fi | |
8655 | MAKEINFO=$ac_cv_path_MAKEINFO | |
8656 | if test -n "$MAKEINFO"; then | |
8657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
8658 | $as_echo "$MAKEINFO" >&6; } | |
8659 | else | |
8660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8661 | $as_echo "no" >&6; } | |
8662 | fi | |
8663 | ||
8664 | ||
b5591ebb GM |
8665 | if test "$MAKEINFO" != "no"; then |
8666 | case ` | |
8667 | $MAKEINFO --version 2> /dev/null | | |
8668 | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)' | |
8669 | ` in | |
8670 | '') MAKEINFO=no;; | |
8671 | esac | |
067d23c9 KY |
8672 | fi |
8673 | ||
8674 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
8675 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
8676 | ## therefore in the category of "special tools" not normally required, which | |
8677 | ## configure does not have to check for (eg autoconf itself). | |
8678 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
8679 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
8680 | ## should test for it as it does for any other build requirement. | |
8681 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
8682 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
8683 | HAVE_MAKEINFO=yes |
8684 | ||
067d23c9 | 8685 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 8686 | MAKEINFO=makeinfo |
067d23c9 | 8687 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 8688 | HAVE_MAKEINFO=no |
b5591ebb | 8689 | elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then |
9e40dda4 | 8690 | as_fn_error "You do not seem to have makeinfo >= 4.7, and your |
067d23c9 KY |
8691 | source tree does not seem to have pre-built manuals in the \`info' directory. |
8692 | Either install a suitable version of makeinfo, or re-run configure | |
8693 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
8694 | fi | |
8695 | fi | |
8696 | ||
8697 | ||
141d074d GM |
8698 | INFO_EXT=.info |
8699 | INFO_OPTS=--no-split | |
8700 | ||
8701 | ||
8702 | ||
96f129d5 | 8703 | |
067d23c9 KY |
8704 | if test x$GCC = xyes; then |
8705 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
8706 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
8707 | else | |
8708 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
8709 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
8710 | fi | |
8711 | ||
8712 | ||
8713 | late_LDFLAGS=$LDFLAGS | |
8714 | if test x$GCC = xyes; then | |
8715 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
8716 | else | |
8717 | LDFLAGS="$LDFLAGS -znocombreloc" | |
8718 | fi | |
8719 | ||
8720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
8721 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
8722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8723 | /* end confdefs.h. */ | |
8724 | ||
8725 | int | |
8726 | main () | |
8727 | { | |
8728 | ||
8729 | ; | |
8730 | return 0; | |
8731 | } | |
8732 | _ACEOF | |
8733 | if ac_fn_c_try_link "$LINENO"; then : | |
8734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8735 | $as_echo "yes" >&6; } | |
8736 | else | |
8737 | LDFLAGS=$late_LDFLAGS | |
8738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8739 | $as_echo "no" >&6; } | |
8740 | fi | |
8741 | rm -f core conftest.err conftest.$ac_objext \ | |
8742 | conftest$ac_exeext conftest.$ac_ext | |
8743 | ||
8744 | ||
125c3718 | 8745 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 8746 | case "$opsys" in |
125c3718 PE |
8747 | your-opsys-here) CANNOT_DUMP=yes ;; |
8748 | esac | |
8749 | ||
8750 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
8751 | |
8752 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
8753 | ||
125c3718 | 8754 | |
067d23c9 KY |
8755 | |
8756 | ||
8757 | ||
8758 | UNEXEC_OBJ=unexelf.o | |
8759 | case "$opsys" in | |
8760 | # MSDOS uses unexcoff.o | |
067d23c9 KY |
8761 | aix4-2) |
8762 | UNEXEC_OBJ=unexaix.o | |
8763 | ;; | |
8764 | cygwin) | |
8765 | UNEXEC_OBJ=unexcw.o | |
8766 | ;; | |
8767 | darwin) | |
8768 | UNEXEC_OBJ=unexmacosx.o | |
8769 | ;; | |
8770 | hpux10-20 | hpux11) | |
8771 | UNEXEC_OBJ=unexhp9k800.o | |
8772 | ;; | |
7c61eaab GM |
8773 | mingw32) |
8774 | UNEXEC_OBJ=unexw32.o | |
8775 | ;; | |
067d23c9 KY |
8776 | sol2-10) |
8777 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
8778 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
8779 | # The resulting binary has a complete symbol table, and is better | |
8780 | # for debugging and other observability tools (debuggers, pstack, etc). | |
8781 | # | |
8782 | # If you encounter a problem using dldump(), please consider sending | |
8783 | # a message to the OpenSolaris tools-linking mailing list: | |
8784 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
8785 | # | |
8786 | # It is likely that dldump() works with older Solaris too, but this has | |
8787 | # not been tested, so for now this change is for Solaris 10 or newer. | |
8788 | UNEXEC_OBJ=unexsol.o | |
8789 | ;; | |
8790 | esac | |
8791 | ||
8792 | LD_SWITCH_SYSTEM= | |
8793 | case "$opsys" in | |
87e1a811 | 8794 | freebsd|dragonfly) |
067d23c9 KY |
8795 | ## Let `ld' find image libs and similar things in /usr/local/lib. |
8796 | ## The system compiler, GCC, has apparently been modified to not | |
8797 | ## look there, contrary to what a stock GCC would do. | |
a7479549 GM |
8798 | ### It's not our place to do this. See bug#10313#17. |
8799 | ### LD_SWITCH_SYSTEM=-L/usr/local/lib | |
8800 | : | |
067d23c9 KY |
8801 | ;; |
8802 | ||
8803 | gnu-linux) | |
8804 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 8805 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
8806 | ;; |
8807 | ||
8808 | netbsd) | |
a7479549 GM |
8809 | ### It's not our place to do this. See bug#10313#17. |
8810 | ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
8811 | : | |
067d23c9 KY |
8812 | ;; |
8813 | ||
8814 | openbsd) | |
3766b742 | 8815 | ## Han Boetes <han@boetes.org> says this is necessary, |
067d23c9 KY |
8816 | ## otherwise Emacs dumps core on elf systems. |
8817 | LD_SWITCH_SYSTEM="-Z" | |
8818 | ;; | |
8819 | esac | |
8820 | ||
8821 | ||
8822 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
8823 | ||
ae629dae | 8824 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH, |
067d23c9 KY |
8825 | ## which has not been defined yet. When this was handled with cpp, |
8826 | ## it was expanded to null when configure sourced the s/*.h file. | |
8827 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
8828 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
8829 | ## (or somesuch), but because it is supposed to go at the _front_ | |
8830 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
8831 | ## Compare with the gnu-linux case below, which added to the end | |
8832 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
8833 | ## LD_SWITCH_SYSTEM_TEMACS. | |
8834 | case "$opsys" in | |
8835 | netbsd|openbsd) | |
ae629dae | 8836 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;; |
067d23c9 KY |
8837 | esac |
8838 | ||
8839 | ||
8840 | C_SWITCH_MACHINE= | |
42bbbe8b GM |
8841 | case $canonical in |
8842 | alpha*) | |
067d23c9 | 8843 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" |
a9bec17c | 8844 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
8845 | |
8846 | fi | |
8847 | ||
8848 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
8849 | ## With ELF, make sure that all common symbols get allocated to in the | |
8850 | ## data section. Otherwise, the dump of temacs may miss variables in | |
8851 | ## the shared library that have been initialized. For example, with | |
8852 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
8853 | ## shared library's .bss section, which is fatal. | |
8854 | if test "x$GCC" = "xyes"; then | |
8855 | C_SWITCH_MACHINE="-fno-common" | |
8856 | else | |
a9bec17c | 8857 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
8858 | fi |
8859 | else | |
8860 | UNEXEC_OBJ=unexalpha.o | |
8861 | fi | |
42bbbe8b GM |
8862 | ;; |
8863 | esac | |
067d23c9 KY |
8864 | |
8865 | ||
8866 | ||
8867 | ||
8868 | C_SWITCH_SYSTEM= | |
8869 | ## Some programs in src produce warnings saying certain subprograms | |
8870 | ## are too complex and need a MAXMEM value greater than 2000 for | |
8871 | ## additional optimization. --nils@exp-math.uni-essen.de | |
8872 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
8873 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
7c61eaab | 8874 | test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4" |
067d23c9 KY |
8875 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. |
8876 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
8877 | ||
8878 | ||
8879 | ||
8880 | LIBS_SYSTEM= | |
8881 | case "$opsys" in | |
8882 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
8883 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
8884 | ||
87e1a811 | 8885 | freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;; |
067d23c9 KY |
8886 | |
8887 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
8888 | ||
1f5d53eb | 8889 | sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; |
067d23c9 KY |
8890 | |
8891 | ## Motif needs -lgen. | |
8892 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
8893 | esac | |
8894 | ||
8895 | ||
8896 | ||
8897 | ### Make sure subsequent tests use flags consistent with the build flags. | |
8898 | ||
8899 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
8900 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
8901 | else | |
8902 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
8903 | fi | |
8904 | ||
4fda9c95 GM |
8905 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
8906 | ||
3e0be4ab GM |
8907 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. |
8908 | ||
4fda9c95 | 8909 | |
067d23c9 | 8910 | |
067d23c9 | 8911 | LIB_MATH=-lm |
4717915f | 8912 | SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'` |
067d23c9 KY |
8913 | |
8914 | case $opsys in | |
8915 | cygwin ) | |
8916 | LIB_MATH= | |
067d23c9 KY |
8917 | ;; |
8918 | darwin ) | |
8919 | ## Adding -lm confuses the dynamic linker, so omit it. | |
8920 | LIB_MATH= | |
067d23c9 | 8921 | ;; |
87e1a811 | 8922 | freebsd | dragonfly ) |
15f79fcd | 8923 | SYSTEM_TYPE=berkeley-unix |
067d23c9 KY |
8924 | ;; |
8925 | gnu-linux | gnu-kfreebsd ) | |
067d23c9 KY |
8926 | ;; |
8927 | hpux10-20 | hpux11 ) | |
067d23c9 | 8928 | ;; |
7c61eaab GM |
8929 | mingw32 ) |
8930 | LIB_MATH= | |
8931 | SYSTEM_TYPE=windows-nt | |
8932 | ;; | |
bb72ce91 | 8933 | netbsd | openbsd ) |
15f79fcd | 8934 | SYSTEM_TYPE=berkeley-unix |
067d23c9 | 8935 | ;; |
15f79fcd GM |
8936 | |
8937 | sol2* | unixware ) | |
8938 | SYSTEM_TYPE=usg-unix-v | |
8939 | ;; | |
8940 | ||
067d23c9 KY |
8941 | esac |
8942 | ||
8943 | ||
8944 | ||
15f79fcd GM |
8945 | cat >>confdefs.h <<_ACEOF |
8946 | #define SYSTEM_TYPE "$SYSTEM_TYPE" | |
8947 | _ACEOF | |
8948 | ||
8949 | ||
130f1dac | 8950 | |
5476a9a4 GM |
8951 | pre_PKG_CONFIG_CFLAGS=$CFLAGS |
8952 | pre_PKG_CONFIG_LIBS=$LIBS | |
067d23c9 | 8953 | |
5476a9a4 GM |
8954 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8955 | set dummy pkg-config; ac_word=$2 | |
8956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8957 | $as_echo_n "checking for $ac_word... " >&6; } | |
8958 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8959 | $as_echo_n "(cached) " >&6 | |
8960 | else | |
8961 | case $PKG_CONFIG in | |
8962 | [\\/]* | ?:[\\/]*) | |
8963 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8964 | ;; | |
8965 | *) | |
8966 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8967 | for as_dir in $PATH | |
8968 | do | |
8969 | IFS=$as_save_IFS | |
8970 | test -z "$as_dir" && as_dir=. | |
8971 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8972 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8973 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8974 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8975 | break 2 | |
8976 | fi | |
8977 | done | |
8978 | done | |
8979 | IFS=$as_save_IFS | |
8980 | ||
8981 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8982 | ;; | |
8983 | esac | |
8984 | fi | |
8985 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8986 | if test -n "$PKG_CONFIG"; then | |
8987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8988 | $as_echo "$PKG_CONFIG" >&6; } | |
8989 | else | |
8990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8991 | $as_echo "no" >&6; } | |
8992 | fi | |
f199cab1 GM |
8993 | |
8994 | ||
f199cab1 | 8995 | |
5476a9a4 GM |
8996 | |
8997 | ||
5476a9a4 | 8998 | if test "${with_sound}" != "no"; then |
7c61eaab | 8999 | # Sound support for GNU/Linux, the free BSDs, and MinGW. |
db7863f4 | 9000 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h |
5476a9a4 GM |
9001 | do : |
9002 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7c61eaab GM |
9003 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " |
9004 | #ifdef __MINGW32__ | |
9005 | #define WIN32_LEAN_AND_MEAN | |
9006 | #include <windows.h> | |
9007 | #endif | |
9008 | ||
9009 | " | |
5476a9a4 GM |
9010 | eval as_val=\$$as_ac_Header |
9011 | if test "x$as_val" = x""yes; then : | |
9012 | cat >>confdefs.h <<_ACEOF | |
9013 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9014 | _ACEOF | |
9015 | have_sound_header=yes | |
9016 | fi | |
9017 | ||
9018 | done | |
9019 | ||
9020 | # Emulation library used on NetBSD. | |
9021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
9022 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
9023 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : | |
067d23c9 KY |
9024 | $as_echo_n "(cached) " >&6 |
9025 | else | |
5476a9a4 GM |
9026 | ac_check_lib_save_LIBS=$LIBS |
9027 | LIBS="-lossaudio $LIBS" | |
9028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 9029 | /* end confdefs.h. */ |
5476a9a4 GM |
9030 | |
9031 | /* Override any GCC internal prototype to avoid an error. | |
9032 | Use char because int might match the return type of a GCC | |
9033 | builtin and then its argument prototype would still apply. */ | |
9034 | #ifdef __cplusplus | |
9035 | extern "C" | |
9036 | #endif | |
9037 | char _oss_ioctl (); | |
067d23c9 KY |
9038 | int |
9039 | main () | |
9040 | { | |
5476a9a4 | 9041 | return _oss_ioctl (); |
067d23c9 KY |
9042 | ; |
9043 | return 0; | |
9044 | } | |
9045 | _ACEOF | |
9046 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 9047 | ac_cv_lib_ossaudio__oss_ioctl=yes |
067d23c9 | 9048 | else |
5476a9a4 | 9049 | ac_cv_lib_ossaudio__oss_ioctl=no |
067d23c9 KY |
9050 | fi |
9051 | rm -f core conftest.err conftest.$ac_objext \ | |
9052 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
9053 | LIBS=$ac_check_lib_save_LIBS |
9054 | fi | |
9055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
9056 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
9057 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : | |
9058 | LIBSOUND=-lossaudio | |
9059 | else | |
9060 | LIBSOUND= | |
067d23c9 KY |
9061 | fi |
9062 | ||
9063 | ||
9064 | ||
5476a9a4 GM |
9065 | ALSA_REQUIRED=1.0.0 |
9066 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
9067 | ||
9068 | succeeded=no | |
9069 | ||
9070 | if test "$PKG_CONFIG" = "no" ; then | |
9071 | HAVE_ALSA=no | |
9072 | else | |
9073 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 9074 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
9075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 |
9076 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
9077 | ||
b5591ebb GM |
9078 | if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 && |
9079 | ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` && | |
9080 | ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then | |
5476a9a4 GM |
9081 | edit_cflags=" |
9082 | s,///*,/,g | |
9083 | s/^/ / | |
9084 | s/ -I/ $isystem/g | |
9085 | s/^ // | |
9086 | " | |
9087 | ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` | |
9088 | ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` | |
9089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 | |
9090 | $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } | |
9091 | succeeded=yes | |
9092 | else | |
9093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9094 | $as_echo "no" >&6; } | |
9095 | ALSA_CFLAGS="" | |
9096 | ALSA_LIBS="" | |
9097 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
9098 | ## do set a variable so people can do so. Do it in a subshell |
9099 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 9100 | ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1` |
5476a9a4 GM |
9101 | |
9102 | fi | |
9103 | ||
9104 | ||
9105 | ||
9106 | else | |
9107 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
9108 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
9109 | fi | |
9110 | fi | |
9111 | ||
9112 | if test $succeeded = yes; then | |
9113 | HAVE_ALSA=yes | |
9114 | else | |
9115 | HAVE_ALSA=no | |
9116 | fi | |
f199cab1 | 9117 | |
5476a9a4 GM |
9118 | if test $HAVE_ALSA = yes; then |
9119 | SAVE_CFLAGS="$CFLAGS" | |
9120 | SAVE_LIBS="$LIBS" | |
9121 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
9122 | LIBS="$ALSA_LIBS $LIBS" | |
9123 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9124 | /* end confdefs.h. */ | |
9125 | #include <asoundlib.h> | |
067d23c9 KY |
9126 | int |
9127 | main () | |
9128 | { | |
5476a9a4 | 9129 | snd_lib_error_set_handler (0); |
067d23c9 KY |
9130 | ; |
9131 | return 0; | |
9132 | } | |
9133 | _ACEOF | |
5476a9a4 GM |
9134 | if ac_fn_c_try_compile "$LINENO"; then : |
9135 | emacs_alsa_normal=yes | |
067d23c9 | 9136 | else |
5476a9a4 | 9137 | emacs_alsa_normal=no |
067d23c9 | 9138 | fi |
5476a9a4 GM |
9139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9140 | if test "$emacs_alsa_normal" != yes; then | |
9141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9142 | /* end confdefs.h. */ | |
9143 | #include <alsa/asoundlib.h> | |
9144 | int | |
9145 | main () | |
9146 | { | |
9147 | snd_lib_error_set_handler (0); | |
9148 | ; | |
9149 | return 0; | |
9150 | } | |
9151 | _ACEOF | |
9152 | if ac_fn_c_try_compile "$LINENO"; then : | |
9153 | emacs_alsa_subdir=yes | |
9154 | else | |
9155 | emacs_alsa_subdir=no | |
f199cab1 | 9156 | fi |
5476a9a4 GM |
9157 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9158 | if test "$emacs_alsa_subdir" != yes; then | |
9159 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 | |
9160 | fi | |
9161 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
9162 | fi | |
067d23c9 | 9163 | |
5476a9a4 GM |
9164 | CFLAGS="$SAVE_CFLAGS" |
9165 | LIBS="$SAVE_LIBS" | |
9166 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
9167 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
067d23c9 | 9168 | |
5476a9a4 | 9169 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h |
067d23c9 | 9170 | |
5476a9a4 | 9171 | fi |
067d23c9 | 9172 | |
5476a9a4 GM |
9173 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then |
9174 | case "$opsys" in | |
7c61eaab | 9175 | gnu-linux|freebsd|netbsd|mingw32) |
067d23c9 | 9176 | |
5476a9a4 | 9177 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h |
067d23c9 | 9178 | |
5476a9a4 GM |
9179 | ;; |
9180 | esac | |
9181 | fi | |
067d23c9 KY |
9182 | |
9183 | ||
5476a9a4 | 9184 | fi |
067d23c9 | 9185 | |
e700232f GM |
9186 | |
9187 | ||
9188 | ||
5476a9a4 GM |
9189 | for ac_header in $ac_header_list |
9190 | do : | |
9191 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9192 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
9193 | " | |
9194 | eval as_val=\$$as_ac_Header | |
9195 | if test "x$as_val" = x""yes; then : | |
9196 | cat >>confdefs.h <<_ACEOF | |
9197 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
067d23c9 KY |
9198 | _ACEOF |
9199 | ||
f199cab1 | 9200 | fi |
e700232f | 9201 | |
5476a9a4 GM |
9202 | done |
9203 | ||
9204 | ||
e700232f GM |
9205 | |
9206 | ||
9207 | ||
f199cab1 | 9208 | |
067d23c9 | 9209 | |
067d23c9 | 9210 | |
067d23c9 | 9211 | |
067d23c9 | 9212 | |
f199cab1 GM |
9213 | |
9214 | ||
9215 | ||
067d23c9 | 9216 | |
067d23c9 | 9217 | |
f199cab1 GM |
9218 | |
9219 | ||
9220 | ||
5476a9a4 GM |
9221 | |
9222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
9223 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
9224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9225 | /* end confdefs.h. */ | |
9226 | #include <sys/personality.h> | |
067d23c9 KY |
9227 | int |
9228 | main () | |
9229 | { | |
5476a9a4 | 9230 | personality (PER_LINUX32) |
067d23c9 KY |
9231 | ; |
9232 | return 0; | |
9233 | } | |
9234 | _ACEOF | |
9235 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 9236 | emacs_cv_personality_linux32=yes |
067d23c9 | 9237 | else |
5476a9a4 | 9238 | emacs_cv_personality_linux32=no |
067d23c9 | 9239 | fi |
f199cab1 | 9240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
9241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 |
9242 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
f199cab1 | 9243 | |
5476a9a4 | 9244 | if test $emacs_cv_personality_linux32 = yes; then |
f199cab1 | 9245 | |
5476a9a4 GM |
9246 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h |
9247 | ||
9248 | fi | |
9249 | ||
9250 | for ac_header in term.h | |
9251 | do : | |
9252 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
9253 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
9254 | cat >>confdefs.h <<_ACEOF | |
9255 | #define HAVE_TERM_H 1 | |
067d23c9 | 9256 | _ACEOF |
5476a9a4 GM |
9257 | |
9258 | fi | |
9259 | ||
9260 | done | |
9261 | ||
9262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
9263 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
9264 | if test "${ac_cv_header_time+set}" = set; then : | |
9265 | $as_echo_n "(cached) " >&6 | |
9266 | else | |
9267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 9268 | /* end confdefs.h. */ |
5476a9a4 GM |
9269 | #include <sys/types.h> |
9270 | #include <sys/time.h> | |
9271 | #include <time.h> | |
f199cab1 | 9272 | |
067d23c9 KY |
9273 | int |
9274 | main () | |
9275 | { | |
5476a9a4 GM |
9276 | if ((struct tm *) 0) |
9277 | return 0; | |
067d23c9 KY |
9278 | ; |
9279 | return 0; | |
9280 | } | |
9281 | _ACEOF | |
9282 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 9283 | ac_cv_header_time=yes |
067d23c9 | 9284 | else |
5476a9a4 | 9285 | ac_cv_header_time=no |
067d23c9 KY |
9286 | fi |
9287 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9288 | fi | |
5476a9a4 GM |
9289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
9290 | $as_echo "$ac_cv_header_time" >&6; } | |
9291 | if test $ac_cv_header_time = yes; then | |
f199cab1 | 9292 | |
5476a9a4 GM |
9293 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
9294 | ||
9295 | fi | |
9296 | ||
dc67e786 GM |
9297 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h> |
9298 | ||
9299 | " | |
5476a9a4 GM |
9300 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : |
9301 | ac_have_decl=1 | |
9302 | else | |
9303 | ac_have_decl=0 | |
9304 | fi | |
9305 | ||
9306 | cat >>confdefs.h <<_ACEOF | |
9307 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
067d23c9 | 9308 | _ACEOF |
5476a9a4 GM |
9309 | |
9310 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
9311 | # For Tru64, at least: | |
dc67e786 GM |
9312 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h> |
9313 | ||
9314 | " | |
5476a9a4 GM |
9315 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : |
9316 | ac_have_decl=1 | |
9317 | else | |
9318 | ac_have_decl=0 | |
067d23c9 | 9319 | fi |
5476a9a4 GM |
9320 | |
9321 | cat >>confdefs.h <<_ACEOF | |
9322 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
9323 | _ACEOF | |
9324 | ||
5476a9a4 GM |
9325 | fi |
9326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
9327 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
9328 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
9329 | $as_echo_n "(cached) " >&6 | |
067d23c9 KY |
9330 | else |
9331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9332 | /* end confdefs.h. */ | |
5476a9a4 GM |
9333 | #include <sys/types.h> |
9334 | #include <sys/wait.h> | |
9335 | #ifndef WEXITSTATUS | |
9336 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
9337 | #endif | |
9338 | #ifndef WIFEXITED | |
9339 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
9340 | #endif | |
9341 | ||
067d23c9 KY |
9342 | int |
9343 | main () | |
9344 | { | |
5476a9a4 GM |
9345 | int s; |
9346 | wait (&s); | |
9347 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
067d23c9 KY |
9348 | ; |
9349 | return 0; | |
9350 | } | |
9351 | _ACEOF | |
5476a9a4 GM |
9352 | if ac_fn_c_try_compile "$LINENO"; then : |
9353 | ac_cv_header_sys_wait_h=yes | |
067d23c9 | 9354 | else |
5476a9a4 | 9355 | ac_cv_header_sys_wait_h=no |
067d23c9 | 9356 | fi |
5476a9a4 | 9357 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 9358 | fi |
5476a9a4 GM |
9359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 |
9360 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
9361 | if test $ac_cv_header_sys_wait_h = yes; then | |
067d23c9 | 9362 | |
5476a9a4 | 9363 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
7417b37c | 9364 | |
5476a9a4 | 9365 | fi |
7417b37c | 9366 | |
7417b37c | 9367 | |
067d23c9 KY |
9368 | |
9369 | ||
e700232f | 9370 | |
5476a9a4 GM |
9371 | for ac_header in net/if.h |
9372 | do : | |
9373 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
9374 | #if HAVE_SYS_SOCKET_H | |
9375 | #include <sys/socket.h> | |
9376 | #endif | |
9377 | " | |
9378 | if test "x$ac_cv_header_net_if_h" = x""yes; then : | |
9379 | cat >>confdefs.h <<_ACEOF | |
9380 | #define HAVE_NET_IF_H 1 | |
067d23c9 | 9381 | _ACEOF |
7cae64b4 | 9382 | |
067d23c9 | 9383 | fi |
067d23c9 | 9384 | |
5476a9a4 | 9385 | done |
4d4b75e8 | 9386 | |
5476a9a4 GM |
9387 | for ac_header in ifaddrs.h |
9388 | do : | |
9389 | ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default | |
9390 | #if HAVE_SYS_SOCKET_H | |
9391 | #include <sys/socket.h> | |
9392 | #endif | |
9393 | " | |
9394 | if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : | |
9395 | cat >>confdefs.h <<_ACEOF | |
9396 | #define HAVE_IFADDRS_H 1 | |
9397 | _ACEOF | |
4d4b75e8 | 9398 | |
5476a9a4 | 9399 | fi |
4d4b75e8 | 9400 | |
5476a9a4 | 9401 | done |
7e723570 | 9402 | |
5476a9a4 | 9403 | for ac_header in net/if_dl.h |
7e723570 | 9404 | do : |
5476a9a4 GM |
9405 | ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default |
9406 | #if HAVE_SYS_SOCKET_H | |
9407 | #include <sys/socket.h> | |
9408 | #endif | |
7e723570 | 9409 | " |
5476a9a4 | 9410 | if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : |
7e723570 | 9411 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 9412 | #define HAVE_NET_IF_DL_H 1 |
7e723570 GM |
9413 | _ACEOF |
9414 | ||
9415 | fi | |
9416 | ||
9417 | done | |
9418 | ||
9419 | ||
5476a9a4 GM |
9420 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default |
9421 | #if HAVE_SYS_SOCKET_H | |
9422 | #include <sys/socket.h> | |
9423 | #endif | |
9424 | #if HAVE_NET_IF_H | |
9425 | #include <net/if.h> | |
9426 | #endif | |
9427 | " | |
9428 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : | |
7e723570 | 9429 | |
5476a9a4 GM |
9430 | cat >>confdefs.h <<_ACEOF |
9431 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
9432 | _ACEOF | |
7e723570 GM |
9433 | |
9434 | ||
5476a9a4 GM |
9435 | fi |
9436 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
9437 | #if HAVE_SYS_SOCKET_H | |
9438 | #include <sys/socket.h> | |
f199cab1 | 9439 | #endif |
5476a9a4 GM |
9440 | #if HAVE_NET_IF_H |
9441 | #include <net/if.h> | |
f199cab1 | 9442 | #endif |
5476a9a4 GM |
9443 | " |
9444 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : | |
9445 | ||
9446 | cat >>confdefs.h <<_ACEOF | |
9447 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
9448 | _ACEOF | |
9449 | ||
9450 | ||
9451 | fi | |
9452 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
9453 | #if HAVE_SYS_SOCKET_H | |
9454 | #include <sys/socket.h> | |
f199cab1 | 9455 | #endif |
5476a9a4 GM |
9456 | #if HAVE_NET_IF_H |
9457 | #include <net/if.h> | |
9458 | #endif | |
9459 | " | |
9460 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : | |
9461 | ||
9462 | cat >>confdefs.h <<_ACEOF | |
9463 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
f199cab1 | 9464 | _ACEOF |
5476a9a4 GM |
9465 | |
9466 | ||
9467 | fi | |
9468 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
9469 | #if HAVE_SYS_SOCKET_H | |
9470 | #include <sys/socket.h> | |
9471 | #endif | |
9472 | #if HAVE_NET_IF_H | |
9473 | #include <net/if.h> | |
9474 | #endif | |
9475 | " | |
9476 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : | |
9477 | ||
9478 | cat >>confdefs.h <<_ACEOF | |
9479 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
f199cab1 | 9480 | _ACEOF |
5476a9a4 GM |
9481 | |
9482 | ||
067d23c9 | 9483 | fi |
5476a9a4 GM |
9484 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default |
9485 | #if HAVE_SYS_SOCKET_H | |
9486 | #include <sys/socket.h> | |
9487 | #endif | |
9488 | #if HAVE_NET_IF_H | |
9489 | #include <net/if.h> | |
9490 | #endif | |
9491 | " | |
9492 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : | |
9493 | ||
9494 | cat >>confdefs.h <<_ACEOF | |
9495 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
9496 | _ACEOF | |
9497 | ||
067d23c9 | 9498 | |
f199cab1 | 9499 | fi |
5476a9a4 GM |
9500 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default |
9501 | #if HAVE_SYS_SOCKET_H | |
9502 | #include <sys/socket.h> | |
9503 | #endif | |
9504 | #if HAVE_NET_IF_H | |
9505 | #include <net/if.h> | |
9506 | #endif | |
9507 | " | |
9508 | if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : | |
9509 | ||
9510 | cat >>confdefs.h <<_ACEOF | |
9511 | #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 | |
9512 | _ACEOF | |
9513 | ||
067d23c9 KY |
9514 | |
9515 | fi | |
9516 | ||
9517 | ||
067d23c9 | 9518 | |
f199cab1 | 9519 | |
5476a9a4 GM |
9520 | DEPFLAGS= |
9521 | MKDEPDIR=":" | |
9522 | deps_frag=deps.mk | |
9523 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
9524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
9525 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
9526 | HAVE_GNU_MAKE=no | |
9527 | testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` | |
9528 | if test "x$testval" != x; then | |
9529 | HAVE_GNU_MAKE=yes | |
9530 | else | |
9531 | ac_enable_autodepend=no | |
9532 | fi | |
9533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
9534 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
9535 | if test $HAVE_GNU_MAKE = yes; then | |
9536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
9537 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
9538 | SAVE_CFLAGS="$CFLAGS" | |
9539 | CFLAGS="$CFLAGS -MMD -MF deps.d -MP" | |
9540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9541 | /* end confdefs.h. */ | |
f199cab1 | 9542 | |
5476a9a4 GM |
9543 | int |
9544 | main () | |
9545 | { | |
f199cab1 | 9546 | |
5476a9a4 GM |
9547 | ; |
9548 | return 0; | |
9549 | } | |
9550 | _ACEOF | |
9551 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 | 9552 | |
5476a9a4 GM |
9553 | else |
9554 | ac_enable_autodepend=no | |
9555 | fi | |
9556 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9557 | CFLAGS="$SAVE_CFLAGS" | |
9558 | test -f deps.d || ac_enable_autodepend=no | |
9559 | rm -rf deps.d | |
9560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
9561 | $as_echo "$ac_enable_autodepend" >&6; } | |
9562 | fi | |
9563 | if test $ac_enable_autodepend = yes; then | |
9564 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' | |
9565 | ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. | |
9566 | MKDEPDIR='${MKDIR_P} ${DEPDIR}' | |
9567 | deps_frag=autodeps.mk | |
9568 | fi | |
9569 | fi | |
9570 | deps_frag=$srcdir/src/$deps_frag | |
f199cab1 GM |
9571 | |
9572 | ||
9573 | ||
9574 | ||
9575 | ||
5476a9a4 | 9576 | lisp_frag=$srcdir/src/lisp.mk |
f199cab1 GM |
9577 | |
9578 | ||
9579 | ||
5476a9a4 GM |
9580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 |
9581 | $as_echo_n "checking for long file names... " >&6; } | |
9582 | if test "${ac_cv_sys_long_file_names+set}" = set; then : | |
9583 | $as_echo_n "(cached) " >&6 | |
9584 | else | |
9585 | ac_cv_sys_long_file_names=yes | |
9586 | # Test for long file names in all the places we know might matter: | |
9587 | # . the current directory, where building will happen | |
9588 | # $prefix/lib where we will be installing things | |
9589 | # $exec_prefix/lib likewise | |
9590 | # $TMPDIR if set, where it might want to write temporary files | |
9591 | # /tmp where it might want to write temporary files | |
9592 | # /var/tmp likewise | |
9593 | # /usr/tmp likewise | |
9594 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
9595 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
9596 | # in the usual case where exec_prefix is '${prefix}'. | |
9597 | case $ac_dir in #( | |
9598 | . | /* | ?:[\\/]*) ;; #( | |
9599 | *) continue;; | |
9600 | esac | |
9601 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
9602 | ac_xdir=$ac_dir/cf$$ | |
9603 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
9604 | ac_tf1=$ac_xdir/conftest9012345 | |
9605 | ac_tf2=$ac_xdir/conftest9012346 | |
9606 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
9607 | ac_cv_sys_long_file_names=no | |
9608 | rm -f -r "$ac_xdir" 2>/dev/null | |
9609 | test $ac_cv_sys_long_file_names = no && break | |
9610 | done | |
9611 | fi | |
9612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
9613 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
9614 | if test $ac_cv_sys_long_file_names = yes; then | |
f199cab1 | 9615 | |
5476a9a4 | 9616 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h |
f199cab1 | 9617 | |
5476a9a4 | 9618 | fi |
f199cab1 | 9619 | |
f199cab1 | 9620 | |
5476a9a4 | 9621 | #### Choose a window system. |
f199cab1 | 9622 | |
42dcba54 GM |
9623 | ## We leave window_system equal to none if |
9624 | ## we end up building without one. Any new window system should | |
9625 | ## set window_system to an appropriate value and add objects to | |
9626 | ## window-system-specific substs. | |
9627 | ||
9628 | window_system=none | |
5476a9a4 GM |
9629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
9630 | $as_echo_n "checking for X... " >&6; } | |
f199cab1 | 9631 | |
f199cab1 | 9632 | |
5476a9a4 GM |
9633 | # Check whether --with-x was given. |
9634 | if test "${with_x+set}" = set; then : | |
9635 | withval=$with_x; | |
9636 | fi | |
f199cab1 | 9637 | |
5476a9a4 GM |
9638 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
9639 | if test "x$with_x" = xno; then | |
9640 | # The user explicitly disabled X. | |
9641 | have_x=disabled | |
9642 | else | |
9643 | case $x_includes,$x_libraries in #( | |
9644 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
9645 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
9646 | $as_echo_n "(cached) " >&6 | |
9647 | else | |
9648 | # One or both of the vars are not set, and there is no cached value. | |
9649 | ac_x_includes=no ac_x_libraries=no | |
9650 | rm -f -r conftest.dir | |
9651 | if mkdir conftest.dir; then | |
9652 | cd conftest.dir | |
9653 | cat >Imakefile <<'_ACEOF' | |
9654 | incroot: | |
9655 | @echo incroot='${INCROOT}' | |
9656 | usrlibdir: | |
9657 | @echo usrlibdir='${USRLIBDIR}' | |
9658 | libdir: | |
9659 | @echo libdir='${LIBDIR}' | |
9660 | _ACEOF | |
9661 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
9662 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9663 | for ac_var in incroot usrlibdir libdir; do | |
9664 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
9665 | done | |
9666 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9667 | for ac_extension in a so sl dylib la dll; do | |
9668 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
9669 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
9670 | ac_im_usrlibdir=$ac_im_libdir; break | |
9671 | fi | |
9672 | done | |
9673 | # Screen out bogus values from the imake configuration. They are | |
9674 | # bogus both because they are the default anyway, and because | |
9675 | # using them would break gcc on systems where it needs fixed includes. | |
9676 | case $ac_im_incroot in | |
9677 | /usr/include) ac_x_includes= ;; | |
9678 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
9679 | esac | |
9680 | case $ac_im_usrlibdir in | |
9681 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
9682 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
9683 | esac | |
9684 | fi | |
9685 | cd .. | |
9686 | rm -f -r conftest.dir | |
067d23c9 KY |
9687 | fi |
9688 | ||
5476a9a4 GM |
9689 | # Standard set of common directories for X headers. |
9690 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9691 | ac_x_header_dirs=' | |
9692 | /usr/X11/include | |
9693 | /usr/X11R7/include | |
9694 | /usr/X11R6/include | |
9695 | /usr/X11R5/include | |
9696 | /usr/X11R4/include | |
067d23c9 | 9697 | |
5476a9a4 GM |
9698 | /usr/include/X11 |
9699 | /usr/include/X11R7 | |
9700 | /usr/include/X11R6 | |
9701 | /usr/include/X11R5 | |
9702 | /usr/include/X11R4 | |
067d23c9 | 9703 | |
5476a9a4 GM |
9704 | /usr/local/X11/include |
9705 | /usr/local/X11R7/include | |
9706 | /usr/local/X11R6/include | |
9707 | /usr/local/X11R5/include | |
9708 | /usr/local/X11R4/include | |
067d23c9 | 9709 | |
5476a9a4 GM |
9710 | /usr/local/include/X11 |
9711 | /usr/local/include/X11R7 | |
9712 | /usr/local/include/X11R6 | |
9713 | /usr/local/include/X11R5 | |
9714 | /usr/local/include/X11R4 | |
067d23c9 | 9715 | |
5476a9a4 GM |
9716 | /usr/X386/include |
9717 | /usr/x386/include | |
9718 | /usr/XFree86/include/X11 | |
067d23c9 | 9719 | |
5476a9a4 GM |
9720 | /usr/include |
9721 | /usr/local/include | |
9722 | /usr/unsupported/include | |
9723 | /usr/athena/include | |
9724 | /usr/local/x11r5/include | |
9725 | /usr/lpp/Xamples/include | |
067d23c9 | 9726 | |
5476a9a4 GM |
9727 | /usr/openwin/include |
9728 | /usr/openwin/share/include' | |
067d23c9 | 9729 | |
5476a9a4 GM |
9730 | if test "$ac_x_includes" = no; then |
9731 | # Guess where to find include files, by looking for Xlib.h. | |
9732 | # First, try using that file with no special directory specified. | |
9733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9734 | /* end confdefs.h. */ | |
9735 | #include <X11/Xlib.h> | |
067d23c9 | 9736 | _ACEOF |
5476a9a4 GM |
9737 | if ac_fn_c_try_cpp "$LINENO"; then : |
9738 | # We can compile using X headers with no special include directory. | |
9739 | ac_x_includes= | |
067d23c9 | 9740 | else |
5476a9a4 GM |
9741 | for ac_dir in $ac_x_header_dirs; do |
9742 | if test -r "$ac_dir/X11/Xlib.h"; then | |
9743 | ac_x_includes=$ac_dir | |
9744 | break | |
f199cab1 | 9745 | fi |
f199cab1 | 9746 | done |
5476a9a4 GM |
9747 | fi |
9748 | rm -f conftest.err conftest.$ac_ext | |
9749 | fi # $ac_x_includes = no | |
067d23c9 | 9750 | |
5476a9a4 GM |
9751 | if test "$ac_x_libraries" = no; then |
9752 | # Check for the libraries. | |
9753 | # See if we find them without any special options. | |
9754 | # Don't add to $LIBS permanently. | |
9755 | ac_save_LIBS=$LIBS | |
9756 | LIBS="-lX11 $LIBS" | |
7ee3791f | 9757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 9758 | /* end confdefs.h. */ |
5476a9a4 | 9759 | #include <X11/Xlib.h> |
067d23c9 KY |
9760 | int |
9761 | main () | |
9762 | { | |
5476a9a4 GM |
9763 | XrmInitialize () |
9764 | ; | |
067d23c9 KY |
9765 | return 0; |
9766 | } | |
9767 | _ACEOF | |
5476a9a4 GM |
9768 | if ac_fn_c_try_link "$LINENO"; then : |
9769 | LIBS=$ac_save_LIBS | |
9770 | # We can link X programs with no special library path. | |
9771 | ac_x_libraries= | |
7ee3791f | 9772 | else |
5476a9a4 GM |
9773 | LIBS=$ac_save_LIBS |
9774 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
9775 | do | |
9776 | # Don't even attempt the hair of trying to link an X program! | |
9777 | for ac_extension in a so sl dylib la dll; do | |
9778 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
9779 | ac_x_libraries=$ac_dir | |
9780 | break 2 | |
9781 | fi | |
9782 | done | |
9783 | done | |
7ee3791f | 9784 | fi |
5476a9a4 GM |
9785 | rm -f core conftest.err conftest.$ac_objext \ |
9786 | conftest$ac_exeext conftest.$ac_ext | |
9787 | fi # $ac_x_libraries = no | |
7ee3791f | 9788 | |
5476a9a4 GM |
9789 | case $ac_x_includes,$ac_x_libraries in #( |
9790 | no,* | *,no | *\'*) | |
9791 | # Didn't find X, or a directory has "'" in its name. | |
9792 | ac_cv_have_x="have_x=no";; #( | |
9793 | *) | |
9794 | # Record where we found X for the cache. | |
9795 | ac_cv_have_x="have_x=yes\ | |
9796 | ac_x_includes='$ac_x_includes'\ | |
9797 | ac_x_libraries='$ac_x_libraries'" | |
9798 | esac | |
9799 | fi | |
9800 | ;; #( | |
9801 | *) have_x=yes;; | |
9802 | esac | |
9803 | eval "$ac_cv_have_x" | |
9804 | fi # $with_x != no | |
9805 | ||
9806 | if test "$have_x" != yes; then | |
9807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
9808 | $as_echo "$have_x" >&6; } | |
9809 | no_x=yes | |
9810 | else | |
9811 | # If each of the values was on the command line, it overrides each guess. | |
9812 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9813 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9814 | # Update the cache value to reflect the command line values. | |
9815 | ac_cv_have_x="have_x=yes\ | |
9816 | ac_x_includes='$x_includes'\ | |
9817 | ac_x_libraries='$x_libraries'" | |
9818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
9819 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
9820 | fi | |
9821 | ||
42dcba54 | 9822 | if test "$no_x" != yes; then |
5476a9a4 GM |
9823 | window_system=x11 |
9824 | fi | |
9825 | ||
9826 | LD_SWITCH_X_SITE_RPATH= | |
9827 | if test "${x_libraries}" != NONE; then | |
9828 | if test -n "${x_libraries}"; then | |
9829 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
9830 | LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` | |
9831 | fi | |
9832 | x_default_search_path="" | |
9833 | x_search_path=${x_libraries} | |
9834 | if test -z "${x_search_path}"; then | |
9835 | x_search_path=/usr/lib | |
9836 | fi | |
9837 | for x_library in `echo ${x_search_path}: | \ | |
9838 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
9839 | x_search_path="\ | |
9840 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
9841 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
9842 | ${x_library}/X11/%T/%N%C%S:\ | |
9843 | ${x_library}/X11/%L/%T/%N%S:\ | |
9844 | ${x_library}/X11/%l/%T/%N%S:\ | |
9845 | ${x_library}/X11/%T/%N%S" | |
9846 | if test x"${x_default_search_path}" = x; then | |
9847 | x_default_search_path=${x_search_path} | |
9848 | else | |
9849 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
9850 | fi | |
9851 | done | |
9852 | fi | |
9853 | ||
9854 | ||
9855 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
9856 | C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` | |
9857 | fi | |
9858 | ||
9859 | if test x"${x_includes}" = x; then | |
9860 | bitmapdir=/usr/include/X11/bitmaps | |
9861 | else | |
9862 | # accumulate include directories that have X11 bitmap subdirectories | |
9863 | bmd_acc="dummyval" | |
9864 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
9865 | if test -d "${bmd}/X11/bitmaps"; then | |
9866 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
9867 | fi | |
9868 | if test -d "${bmd}/bitmaps"; then | |
9869 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
9870 | fi | |
9871 | done | |
9872 | if test ${bmd_acc} != "dummyval"; then | |
9873 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
9874 | fi | |
9875 | fi | |
7ee3791f | 9876 | |
5476a9a4 GM |
9877 | HAVE_NS=no |
9878 | NS_IMPL_COCOA=no | |
9879 | NS_IMPL_GNUSTEP=no | |
9880 | tmp_CPPFLAGS="$CPPFLAGS" | |
9881 | tmp_CFLAGS="$CFLAGS" | |
9882 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
9883 | CFLAGS="$CFLAGS -x objective-c" | |
5476a9a4 | 9884 | GNU_OBJC_CFLAGS= |
4efe5ef9 | 9885 | LIBS_GNUSTEP= |
5476a9a4 GM |
9886 | if test "${with_ns}" != no; then |
9887 | if test "${opsys}" = darwin; then | |
9888 | NS_IMPL_COCOA=yes | |
9889 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9890 | ns_appbindir=${ns_appdir}/Contents/MacOS | |
9891 | ns_appresdir=${ns_appdir}/Contents/Resources | |
bb7dce39 | 9892 | ns_appsrc=Cocoa/Emacs.base |
5476a9a4 GM |
9893 | elif test -f $GNUSTEP_CONFIG_FILE; then |
9894 | NS_IMPL_GNUSTEP=yes | |
9895 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9896 | ns_appbindir=${ns_appdir} | |
9897 | ns_appresdir=${ns_appdir}/Resources | |
bb7dce39 | 9898 | ns_appsrc=GNUstep/Emacs.base |
5476a9a4 GM |
9899 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" |
9900 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
9901 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
9902 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
9903 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
9904 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
9905 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
9906 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
9907 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9908 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9909 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
4efe5ef9 | 9910 | LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread" |
5476a9a4 GM |
9911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 |
9912 | $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } | |
9913 | if test "${emacs_cv_objc_exceptions+set}" = set; then : | |
9914 | $as_echo_n "(cached) " >&6 | |
9915 | else | |
9916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9917 | /* end confdefs.h. */ | |
9918 | #include <GNUstepBase/GSConfig.h> | |
39b3d70b GM |
9919 | int |
9920 | main () | |
9921 | { | |
5476a9a4 GM |
9922 | #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 |
9923 | 1; | |
9924 | #else | |
9925 | fail; | |
9926 | #endif | |
9927 | ; | |
39b3d70b GM |
9928 | return 0; |
9929 | } | |
9930 | _ACEOF | |
5476a9a4 GM |
9931 | if ac_fn_c_try_compile "$LINENO"; then : |
9932 | emacs_cv_objc_exceptions=yes | |
39b3d70b | 9933 | else |
5476a9a4 | 9934 | emacs_cv_objc_exceptions=no |
39b3d70b | 9935 | fi |
5476a9a4 | 9936 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
39b3d70b | 9937 | fi |
5476a9a4 GM |
9938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 |
9939 | $as_echo "$emacs_cv_objc_exceptions" >&6; } | |
9940 | if test $emacs_cv_objc_exceptions = yes; then | |
39b3d70b | 9941 | |
5476a9a4 GM |
9942 | $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h |
9943 | ||
9944 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | |
9945 | fi | |
9946 | fi | |
9947 | ||
9948 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | |
9949 | ||
9950 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
9951 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : | |
9952 | HAVE_NS=yes | |
067d23c9 | 9953 | else |
5476a9a4 GM |
9954 | as_fn_error "\`--with-ns' was specified, but the include |
9955 | files are missing or cannot be compiled." "$LINENO" 5 | |
9956 | fi | |
f199cab1 | 9957 | |
f199cab1 | 9958 | |
dc67e786 GM |
9959 | |
9960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9961 | /* end confdefs.h. */ | |
9962 | #include <AppKit/AppKit.h> | |
9963 | int | |
9964 | main () | |
9965 | { | |
9966 | ||
9967 | #ifdef MAC_OS_X_VERSION_MAX_ALLOWED | |
9968 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 | |
9969 | ; /* OK */ | |
9970 | #else | |
9971 | #error "OSX 10.4 or newer required" | |
9972 | #endif | |
9973 | #endif | |
9974 | ||
9975 | ; | |
9976 | return 0; | |
9977 | } | |
9978 | _ACEOF | |
9979 | if ac_fn_c_try_compile "$LINENO"; then : | |
9980 | ns_osx_have_104=yes | |
9981 | else | |
9982 | ns_osx_have_104=no | |
9983 | fi | |
9984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 GM |
9985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9986 | /* end confdefs.h. */ | |
9987 | #include <Foundation/NSObjCRuntime.h> | |
067d23c9 KY |
9988 | int |
9989 | main () | |
9990 | { | |
5476a9a4 GM |
9991 | NSInteger i; |
9992 | ; | |
067d23c9 KY |
9993 | return 0; |
9994 | } | |
9995 | _ACEOF | |
5476a9a4 GM |
9996 | if ac_fn_c_try_compile "$LINENO"; then : |
9997 | ns_have_nsinteger=yes | |
067d23c9 | 9998 | else |
5476a9a4 | 9999 | ns_have_nsinteger=no |
067d23c9 | 10000 | fi |
5476a9a4 | 10001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dc67e786 GM |
10002 | if test $ns_osx_have_104 = no; then |
10003 | as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5; | |
10004 | fi | |
5476a9a4 | 10005 | if test $ns_have_nsinteger = yes; then |
067d23c9 | 10006 | |
5476a9a4 | 10007 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h |
067d23c9 | 10008 | |
067d23c9 | 10009 | fi |
5476a9a4 | 10010 | fi |
067d23c9 | 10011 | |
5476a9a4 | 10012 | |
5c0255d9 | 10013 | |
5476a9a4 GM |
10014 | INSTALL_ARCH_INDEP_EXTRA=install-etc |
10015 | ns_self_contained=no | |
5476a9a4 GM |
10016 | NS_OBJ= |
10017 | NS_OBJC_OBJ= | |
10018 | if test "${HAVE_NS}" = yes; then | |
10019 | if test "$with_toolkit_scroll_bars" = "no"; then | |
10020 | as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5 | |
10021 | fi | |
10022 | ||
10023 | window_system=nextstep | |
5476a9a4 GM |
10024 | # set up packaging dirs |
10025 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
10026 | ns_self_contained=yes | |
10027 | prefix=${ns_appresdir} | |
10028 | exec_prefix=${ns_appbindir} | |
10029 | libexecdir="\${ns_appbindir}/libexec" | |
10030 | archlibdir="\${ns_appbindir}/libexec" | |
10031 | docdir="\${ns_appresdir}/etc" | |
10032 | etcdir="\${ns_appresdir}/etc" | |
10033 | infodir="\${ns_appresdir}/info" | |
10034 | mandir="\${ns_appresdir}/man" | |
10035 | lispdir="\${ns_appresdir}/lisp" | |
10036 | leimdir="\${ns_appresdir}/leim" | |
10037 | INSTALL_ARCH_INDEP_EXTRA= | |
10038 | fi | |
5476a9a4 GM |
10039 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
10040 | fi | |
10041 | CFLAGS="$tmp_CFLAGS" | |
10042 | CPPFLAGS="$tmp_CPPFLAGS" | |
10043 | ||
10044 | ||
10045 | ||
10046 | ||
10047 | ||
5c0255d9 GM |
10048 | HAVE_W32=no |
10049 | W32_OBJ= | |
10050 | W32_LIBS= | |
7c61eaab GM |
10051 | EMACSRES= |
10052 | CLIENTRES= | |
10053 | CLIENTW= | |
b5eb356a | 10054 | W32_RES_LINK= |
7c61eaab | 10055 | EMACS_MANIFEST= |
5c0255d9 | 10056 | if test "${with_w32}" != no; then |
7c61eaab GM |
10057 | case "${opsys}" in |
10058 | cygwin) | |
10059 | ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
5c0255d9 GM |
10060 | if test "x$ac_cv_header_windows_h" = x""yes; then : |
10061 | HAVE_W32=yes | |
10062 | else | |
10063 | as_fn_error "\`--with-w32' was specified, but windows.h | |
7c61eaab GM |
10064 | cannot be found." "$LINENO" 5 |
10065 | fi | |
10066 | ||
10067 | ||
10068 | ;; | |
10069 | mingw32) | |
10070 | ## Using --with-w32 with MinGW is a no-op, but we allow it. | |
10071 | ;; | |
10072 | *) | |
10073 | as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5 | |
10074 | ;; | |
10075 | esac | |
5c0255d9 GM |
10076 | fi |
10077 | ||
7c61eaab GM |
10078 | if test "${opsys}" = "mingw32"; then |
10079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5 | |
10080 | $as_echo_n "checking whether Windows API headers are recent enough... " >&6; } | |
10081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10082 | /* end confdefs.h. */ | |
10083 | ||
10084 | #include <windows.h> | |
10085 | #include <usp10.h> | |
10086 | int | |
10087 | main () | |
10088 | { | |
20c9c1dc GM |
10089 | PIMAGE_NT_HEADERS pHeader; |
10090 | PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader) | |
7c61eaab GM |
10091 | ; |
10092 | return 0; | |
10093 | } | |
10094 | _ACEOF | |
10095 | if ac_fn_c_try_compile "$LINENO"; then : | |
10096 | emacs_cv_w32api=yes | |
10097 | HAVE_W32=yes | |
10098 | else | |
10099 | emacs_cv_w32api=no | |
10100 | fi | |
10101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5 | |
10103 | $as_echo "$emacs_cv_w32api" >&6; } | |
10104 | if test "${emacs_cv_w32api}" = "no"; then | |
10105 | as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5 | |
10106 | fi | |
10107 | fi | |
5c0255d9 | 10108 | |
7c61eaab GM |
10109 | FIRSTFILE_OBJ= |
10110 | NTDIR= | |
10111 | LIBS_ECLIENT= | |
10112 | LIB_WSOCK32= | |
10113 | NTLIB= | |
10114 | CM_OBJ="cm.o" | |
10115 | XARGS_LIMIT= | |
10116 | if test "${HAVE_W32}" = "yes"; then | |
5c0255d9 GM |
10117 | |
10118 | $as_echo "#define HAVE_NTGUI 1" >>confdefs.h | |
10119 | ||
b5eb356a GM |
10120 | if test -n "$ac_tool_prefix"; then |
10121 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
10122 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
10123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10124 | $as_echo_n "checking for $ac_word... " >&6; } | |
10125 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
10126 | $as_echo_n "(cached) " >&6 | |
10127 | else | |
10128 | if test -n "$WINDRES"; then | |
10129 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
10130 | else | |
10131 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10132 | for as_dir in $PATH | |
10133 | do | |
10134 | IFS=$as_save_IFS | |
10135 | test -z "$as_dir" && as_dir=. | |
10136 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10137 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10138 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
10139 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10140 | break 2 | |
10141 | fi | |
10142 | done | |
10143 | done | |
10144 | IFS=$as_save_IFS | |
10145 | ||
10146 | fi | |
10147 | fi | |
10148 | WINDRES=$ac_cv_prog_WINDRES | |
10149 | if test -n "$WINDRES"; then | |
10150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 | |
10151 | $as_echo "$WINDRES" >&6; } | |
10152 | else | |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10154 | $as_echo "no" >&6; } | |
10155 | fi | |
10156 | ||
10157 | ||
10158 | fi | |
10159 | if test -z "$ac_cv_prog_WINDRES"; then | |
10160 | ac_ct_WINDRES=$WINDRES | |
10161 | # Extract the first word of "windres", so it can be a program name with args. | |
10162 | set dummy windres; ac_word=$2 | |
10163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10164 | $as_echo_n "checking for $ac_word... " >&6; } | |
10165 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
10166 | $as_echo_n "(cached) " >&6 | |
10167 | else | |
10168 | if test -n "$ac_ct_WINDRES"; then | |
10169 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
10170 | else | |
10171 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10172 | for as_dir in $PATH | |
10173 | do | |
10174 | IFS=$as_save_IFS | |
10175 | test -z "$as_dir" && as_dir=. | |
10176 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10177 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10178 | ac_cv_prog_ac_ct_WINDRES="windres" | |
10179 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10180 | break 2 | |
10181 | fi | |
10182 | done | |
10183 | done | |
10184 | IFS=$as_save_IFS | |
10185 | ||
10186 | fi | |
10187 | fi | |
10188 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
10189 | if test -n "$ac_ct_WINDRES"; then | |
10190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 | |
10191 | $as_echo "$ac_ct_WINDRES" >&6; } | |
10192 | else | |
10193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10194 | $as_echo "no" >&6; } | |
10195 | fi | |
10196 | ||
10197 | if test "x$ac_ct_WINDRES" = x; then | |
10198 | WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5" | |
10199 | else | |
10200 | case $cross_compiling:$ac_tool_warned in | |
10201 | yes:) | |
10202 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10203 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10204 | ac_tool_warned=yes ;; | |
10205 | esac | |
10206 | WINDRES=$ac_ct_WINDRES | |
10207 | fi | |
10208 | else | |
10209 | WINDRES="$ac_cv_prog_WINDRES" | |
10210 | fi | |
10211 | ||
5c0255d9 GM |
10212 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" |
10213 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" | |
7c61eaab GM |
10214 | EMACSRES="emacs.res" |
10215 | case "$canonical" in | |
10216 | x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; | |
10217 | *) EMACS_MANIFEST="emacs-x86.manifest" ;; | |
10218 | esac | |
10219 | if test "${opsys}" = "cygwin"; then | |
10220 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" | |
10221 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" | |
10222 | # Tell the linker that emacs.res is an object (which we compile from | |
10223 | # the rc file), not a linker script. | |
10224 | W32_RES_LINK="-Wl,emacs.res" | |
10225 | else | |
10226 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" | |
7c61eaab GM |
10227 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" |
10228 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" | |
10229 | W32_RES_LINK="\$(EMACSRES)" | |
10230 | CLIENTRES="emacsclient.res" | |
10231 | CLIENTW="emacsclientw\$(EXEEXT)" | |
10232 | FIRSTFILE_OBJ=firstfile.o | |
10233 | NTDIR=nt | |
10234 | CM_OBJ= | |
10235 | LIBS_ECLIENT="-lcomctl32" | |
10236 | LIB_WSOCK32="-lwsock32" | |
10237 | NTLIB="ntlib.$ac_objext" | |
10238 | XARGS_LIMIT="-s 10000" | |
10239 | fi | |
5c0255d9 GM |
10240 | fi |
10241 | ||
10242 | ||
10243 | ||
b5eb356a GM |
10244 | |
10245 | ||
7c61eaab GM |
10246 | |
10247 | ||
10248 | ||
10249 | ||
10250 | ||
10251 | ||
10252 | ||
10253 | ||
10254 | ||
10255 | ||
5c0255d9 GM |
10256 | if test "${HAVE_W32}" = "yes"; then |
10257 | window_system=w32 | |
10258 | with_xft=no | |
10259 | fi | |
10260 | ||
42dcba54 GM |
10261 | ## $window_system is now set to the window system we will |
10262 | ## ultimately use. | |
10263 | ||
10264 | term_header= | |
10265 | HAVE_X_WINDOWS=no | |
10266 | HAVE_X11=no | |
10267 | USE_X_TOOLKIT=none | |
10268 | ||
5476a9a4 GM |
10269 | case "${window_system}" in |
10270 | x11 ) | |
10271 | HAVE_X_WINDOWS=yes | |
10272 | HAVE_X11=yes | |
42dcba54 | 10273 | term_header=xterm.h |
5476a9a4 GM |
10274 | case "${with_x_toolkit}" in |
10275 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
10276 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
10277 | gtk ) with_gtk=yes | |
42dcba54 | 10278 | term_header=gtkutil.h |
5476a9a4 | 10279 | USE_X_TOOLKIT=none ;; |
4fa92495 GM |
10280 | gtk2 ) with_gtk2=yes |
10281 | term_header=gtkutil.h | |
10282 | USE_X_TOOLKIT=none ;; | |
5476a9a4 | 10283 | gtk3 ) with_gtk3=yes |
42dcba54 | 10284 | term_header=gtkutil.h |
5476a9a4 GM |
10285 | USE_X_TOOLKIT=none ;; |
10286 | no ) USE_X_TOOLKIT=none ;; | |
10287 | * ) USE_X_TOOLKIT=maybe ;; | |
10288 | esac | |
10289 | ;; | |
42dcba54 GM |
10290 | nextstep ) |
10291 | term_header=nsterm.h | |
5476a9a4 | 10292 | ;; |
5c0255d9 GM |
10293 | w32 ) |
10294 | term_header=w32term.h | |
10295 | ;; | |
5476a9a4 GM |
10296 | esac |
10297 | ||
10298 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
10299 | # Extract the first word of "X", so it can be a program name with args. | |
10300 | set dummy X; ac_word=$2 | |
10301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10302 | $as_echo_n "checking for $ac_word... " >&6; } | |
10303 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : | |
10304 | $as_echo_n "(cached) " >&6 | |
10305 | else | |
10306 | if test -n "$HAVE_XSERVER"; then | |
10307 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
10308 | else | |
10309 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10310 | for as_dir in $PATH | |
10311 | do | |
10312 | IFS=$as_save_IFS | |
10313 | test -z "$as_dir" && as_dir=. | |
10314 | for ac_exec_ext in '' $ac_executable_extensions; do | |
10315 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
10316 | ac_cv_prog_HAVE_XSERVER="true" | |
10317 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10318 | break 2 | |
10319 | fi | |
10320 | done | |
10321 | done | |
10322 | IFS=$as_save_IFS | |
10323 | ||
10324 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
10325 | fi | |
10326 | fi | |
10327 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
10328 | if test -n "$HAVE_XSERVER"; then | |
10329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
10330 | $as_echo "$HAVE_XSERVER" >&6; } | |
10331 | else | |
10332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10333 | $as_echo "no" >&6; } | |
10334 | fi | |
10335 | ||
10336 | ||
10337 | if test "$HAVE_XSERVER" = true || | |
10338 | test -n "$DISPLAY" || | |
10339 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
10340 | as_fn_error "You seem to be running X, but no X development libraries | |
10341 | were found. You should install the relevant development files for X | |
10342 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
10343 | sure you have development files for image handling, i.e. | |
10344 | tiff, gif, jpeg, png and xpm. | |
10345 | If you are sure you want Emacs compiled without X window support, pass | |
10346 | --without-x | |
10347 | to configure." "$LINENO" 5 | |
10348 | fi | |
10349 | fi | |
10350 | ||
10351 | ### If we're using X11, we should use the X menu package. | |
10352 | HAVE_MENUS=no | |
10353 | case ${HAVE_X11} in | |
10354 | yes ) HAVE_MENUS=yes ;; | |
10355 | esac | |
10356 | ||
10357 | # Does the opsystem file prohibit the use of the GNU malloc? | |
10358 | # Assume not, until told otherwise. | |
10359 | GNU_MALLOC=yes | |
10360 | ||
10361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5 | |
10362 | $as_echo_n "checking whether malloc is Doug Lea style... " >&6; } | |
10363 | if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then : | |
067d23c9 KY |
10364 | $as_echo_n "(cached) " >&6 |
10365 | else | |
5476a9a4 GM |
10366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10367 | /* end confdefs.h. */ | |
10368 | #include <malloc.h> | |
10369 | static void hook (void) {} | |
10370 | int | |
10371 | main () | |
10372 | { | |
10373 | malloc_set_state (malloc_get_state ()); | |
10374 | __after_morecore_hook = hook; | |
10375 | __malloc_initialize_hook = hook; | |
10376 | ; | |
10377 | return 0; | |
10378 | } | |
10379 | _ACEOF | |
10380 | if ac_fn_c_try_link "$LINENO"; then : | |
10381 | emacs_cv_var_doug_lea_malloc=yes | |
10382 | else | |
10383 | emacs_cv_var_doug_lea_malloc=no | |
10384 | fi | |
10385 | rm -f core conftest.err conftest.$ac_objext \ | |
10386 | conftest$ac_exeext conftest.$ac_ext | |
10387 | fi | |
10388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5 | |
10389 | $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; } | |
10390 | doug_lea_malloc=$emacs_cv_var_doug_lea_malloc | |
10391 | ||
10392 | ||
10393 | system_malloc=no | |
10394 | case "$opsys" in | |
10395 | ## darwin ld insists on the use of malloc routines in the System framework. | |
10396 | darwin|sol2-10) system_malloc=yes ;; | |
10397 | esac | |
10398 | ||
10399 | if test "${system_malloc}" = "yes"; then | |
10400 | ||
10401 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
10402 | ||
10403 | GNU_MALLOC=no | |
10404 | GNU_MALLOC_reason=" | |
10405 | (The GNU allocators don't work with this system configuration.)" | |
10406 | GMALLOC_OBJ= | |
10407 | VMLIMIT_OBJ= | |
10408 | else | |
10409 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
10410 | VMLIMIT_OBJ=vm-limit.o | |
ce9ae7ca GM |
10411 | |
10412 | for ac_header in sys/vlimit.h | |
10413 | do : | |
10414 | ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default" | |
10415 | if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then : | |
10416 | cat >>confdefs.h <<_ACEOF | |
10417 | #define HAVE_SYS_VLIMIT_H 1 | |
10418 | _ACEOF | |
10419 | ||
10420 | fi | |
10421 | ||
10422 | done | |
10423 | ||
10424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5 | |
10425 | $as_echo_n "checking for data_start... " >&6; } | |
10426 | if test "${emacs_cv_data_start+set}" = set; then : | |
10427 | $as_echo_n "(cached) " >&6 | |
10428 | else | |
10429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10430 | /* end confdefs.h. */ | |
10431 | extern char data_start[]; char ch; | |
10432 | int | |
10433 | main () | |
10434 | { | |
71e41a46 | 10435 | return data_start < &ch; |
ce9ae7ca GM |
10436 | ; |
10437 | return 0; | |
10438 | } | |
10439 | _ACEOF | |
10440 | if ac_fn_c_try_link "$LINENO"; then : | |
10441 | emacs_cv_data_start=yes | |
10442 | else | |
10443 | emacs_cv_data_start=no | |
10444 | fi | |
10445 | rm -f core conftest.err conftest.$ac_objext \ | |
10446 | conftest$ac_exeext conftest.$ac_ext | |
10447 | fi | |
10448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5 | |
10449 | $as_echo "$emacs_cv_data_start" >&6; } | |
10450 | if test $emacs_cv_data_start = yes; then | |
10451 | ||
10452 | $as_echo "#define HAVE_DATA_START 1" >>confdefs.h | |
10453 | ||
10454 | fi | |
5476a9a4 GM |
10455 | fi |
10456 | ||
10457 | ||
10458 | ||
10459 | if test "$doug_lea_malloc" = "yes" ; then | |
10460 | if test "$GNU_MALLOC" = yes ; then | |
10461 | GNU_MALLOC_reason=" | |
10462 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
10463 | fi | |
10464 | ||
10465 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
10466 | ||
10467 | ||
10468 | ## Use mmap directly for allocating larger buffers. | |
10469 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
10470 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
10471 | ## Does the AC_FUNC_MMAP test below make this check unnecessary? | |
10472 | case "$opsys" in | |
10473 | gnu*) REL_ALLOC=no ;; | |
10474 | esac | |
10475 | fi | |
10476 | ||
10477 | if test x"${REL_ALLOC}" = x; then | |
10478 | REL_ALLOC=${GNU_MALLOC} | |
10479 | fi | |
10480 | ||
10481 | use_mmap_for_buffers=no | |
10482 | case "$opsys" in | |
10483 | cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
10484 | esac | |
10485 | ||
10486 | ||
10487 | ||
10488 | ||
10489 | ||
10490 | ||
10491 | ||
10492 | ||
10493 | for ac_func in getpagesize | |
10494 | do : | |
10495 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10496 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
10497 | cat >>confdefs.h <<_ACEOF | |
10498 | #define HAVE_GETPAGESIZE 1 | |
10499 | _ACEOF | |
10500 | ||
10501 | fi | |
10502 | done | |
10503 | ||
10504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
10505 | $as_echo_n "checking for working mmap... " >&6; } | |
10506 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
10507 | $as_echo_n "(cached) " >&6 | |
10508 | else | |
10509 | if test "$cross_compiling" = yes; then : | |
10510 | ac_cv_func_mmap_fixed_mapped=no | |
10511 | else | |
10512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10513 | /* end confdefs.h. */ | |
10514 | $ac_includes_default | |
10515 | /* malloc might have been renamed as rpl_malloc. */ | |
10516 | #undef malloc | |
10517 | ||
10518 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
10519 | Here is a matrix of mmap possibilities: | |
10520 | mmap private not fixed | |
10521 | mmap private fixed at somewhere currently unmapped | |
10522 | mmap private fixed at somewhere already mapped | |
10523 | mmap shared not fixed | |
10524 | mmap shared fixed at somewhere currently unmapped | |
10525 | mmap shared fixed at somewhere already mapped | |
10526 | For private mappings, we should verify that changes cannot be read() | |
10527 | back from the file, nor mmap's back from the file at a different | |
10528 | address. (There have been systems where private was not correctly | |
10529 | implemented like the infamous i386 svr4.0, and systems where the | |
10530 | VM page cache was not coherent with the file system buffer cache | |
10531 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10532 | For shared mappings, we should conversely verify that changes get | |
10533 | propagated back to all the places they're supposed to be. | |
10534 | ||
10535 | Grep wants private fixed already mapped. | |
10536 | The main things grep needs to know about mmap are: | |
10537 | * does it exist and is it safe to write into the mmap'd area | |
10538 | * how to use it (BSD variants) */ | |
10539 | ||
10540 | #include <fcntl.h> | |
10541 | #include <sys/mman.h> | |
10542 | ||
10543 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
10544 | char *malloc (); | |
10545 | #endif | |
10546 | ||
10547 | /* This mess was copied from the GNU getpagesize.h. */ | |
10548 | #ifndef HAVE_GETPAGESIZE | |
10549 | # ifdef _SC_PAGESIZE | |
10550 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10551 | # else /* no _SC_PAGESIZE */ | |
10552 | # ifdef HAVE_SYS_PARAM_H | |
10553 | # include <sys/param.h> | |
10554 | # ifdef EXEC_PAGESIZE | |
10555 | # define getpagesize() EXEC_PAGESIZE | |
10556 | # else /* no EXEC_PAGESIZE */ | |
10557 | # ifdef NBPG | |
10558 | # define getpagesize() NBPG * CLSIZE | |
10559 | # ifndef CLSIZE | |
10560 | # define CLSIZE 1 | |
10561 | # endif /* no CLSIZE */ | |
10562 | # else /* no NBPG */ | |
10563 | # ifdef NBPC | |
10564 | # define getpagesize() NBPC | |
10565 | # else /* no NBPC */ | |
10566 | # ifdef PAGESIZE | |
10567 | # define getpagesize() PAGESIZE | |
10568 | # endif /* PAGESIZE */ | |
10569 | # endif /* no NBPC */ | |
10570 | # endif /* no NBPG */ | |
10571 | # endif /* no EXEC_PAGESIZE */ | |
10572 | # else /* no HAVE_SYS_PARAM_H */ | |
10573 | # define getpagesize() 8192 /* punt totally */ | |
10574 | # endif /* no HAVE_SYS_PARAM_H */ | |
10575 | # endif /* no _SC_PAGESIZE */ | |
10576 | ||
10577 | #endif /* no HAVE_GETPAGESIZE */ | |
10578 | ||
10579 | int | |
10580 | main () | |
10581 | { | |
10582 | char *data, *data2, *data3; | |
10583 | const char *cdata2; | |
10584 | int i, pagesize; | |
10585 | int fd, fd2; | |
10586 | ||
10587 | pagesize = getpagesize (); | |
10588 | ||
10589 | /* First, make a file with some known garbage in it. */ | |
10590 | data = (char *) malloc (pagesize); | |
10591 | if (!data) | |
10592 | return 1; | |
10593 | for (i = 0; i < pagesize; ++i) | |
10594 | *(data + i) = rand (); | |
10595 | umask (0); | |
10596 | fd = creat ("conftest.mmap", 0600); | |
10597 | if (fd < 0) | |
10598 | return 2; | |
10599 | if (write (fd, data, pagesize) != pagesize) | |
10600 | return 3; | |
10601 | close (fd); | |
10602 | ||
10603 | /* Next, check that the tail of a page is zero-filled. File must have | |
10604 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
10605 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
10606 | if (fd2 < 0) | |
10607 | return 4; | |
10608 | cdata2 = ""; | |
10609 | if (write (fd2, cdata2, 1) != 1) | |
10610 | return 5; | |
10611 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
10612 | if (data2 == MAP_FAILED) | |
10613 | return 6; | |
10614 | for (i = 0; i < pagesize; ++i) | |
10615 | if (*(data2 + i)) | |
10616 | return 7; | |
10617 | close (fd2); | |
10618 | if (munmap (data2, pagesize)) | |
10619 | return 8; | |
10620 | ||
10621 | /* Next, try to mmap the file at a fixed address which already has | |
10622 | something else allocated at it. If we can, also make sure that | |
10623 | we see the same garbage. */ | |
10624 | fd = open ("conftest.mmap", O_RDWR); | |
10625 | if (fd < 0) | |
10626 | return 9; | |
10627 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
10628 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
10629 | return 10; | |
10630 | for (i = 0; i < pagesize; ++i) | |
10631 | if (*(data + i) != *(data2 + i)) | |
10632 | return 11; | |
10633 | ||
10634 | /* Finally, make sure that changes to the mapped area do not | |
10635 | percolate back to the file as seen by read(). (This is a bug on | |
10636 | some variants of i386 svr4.0.) */ | |
10637 | for (i = 0; i < pagesize; ++i) | |
10638 | *(data2 + i) = *(data2 + i) + 1; | |
10639 | data3 = (char *) malloc (pagesize); | |
10640 | if (!data3) | |
10641 | return 12; | |
10642 | if (read (fd, data3, pagesize) != pagesize) | |
10643 | return 13; | |
10644 | for (i = 0; i < pagesize; ++i) | |
10645 | if (*(data + i) != *(data3 + i)) | |
10646 | return 14; | |
10647 | close (fd); | |
10648 | return 0; | |
10649 | } | |
10650 | _ACEOF | |
10651 | if ac_fn_c_try_run "$LINENO"; then : | |
10652 | ac_cv_func_mmap_fixed_mapped=yes | |
10653 | else | |
10654 | ac_cv_func_mmap_fixed_mapped=no | |
10655 | fi | |
10656 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10657 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10658 | fi | |
10659 | ||
10660 | fi | |
10661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
10662 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
10663 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
10664 | ||
10665 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
10666 | ||
10667 | fi | |
10668 | rm -f conftest.mmap conftest.txt | |
10669 | ||
10670 | if test $use_mmap_for_buffers = yes; then | |
f199cab1 | 10671 | |
5476a9a4 GM |
10672 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h |
10673 | ||
10674 | REL_ALLOC=no | |
10675 | fi | |
10676 | ||
10677 | LIBS="$LIBS_SYSTEM $LIBS" | |
10678 | ||
10679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
10680 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
10681 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : | |
10682 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 10683 | else |
5476a9a4 GM |
10684 | ac_check_lib_save_LIBS=$LIBS |
10685 | LIBS="-ldnet $LIBS" | |
10686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 10687 | /* end confdefs.h. */ |
067d23c9 | 10688 | |
5476a9a4 GM |
10689 | /* Override any GCC internal prototype to avoid an error. |
10690 | Use char because int might match the return type of a GCC | |
10691 | builtin and then its argument prototype would still apply. */ | |
10692 | #ifdef __cplusplus | |
10693 | extern "C" | |
10694 | #endif | |
10695 | char dnet_ntoa (); | |
10696 | int | |
10697 | main () | |
f199cab1 | 10698 | { |
5476a9a4 GM |
10699 | return dnet_ntoa (); |
10700 | ; | |
10701 | return 0; | |
f199cab1 | 10702 | } |
5476a9a4 GM |
10703 | _ACEOF |
10704 | if ac_fn_c_try_link "$LINENO"; then : | |
10705 | ac_cv_lib_dnet_dnet_ntoa=yes | |
10706 | else | |
10707 | ac_cv_lib_dnet_dnet_ntoa=no | |
10708 | fi | |
10709 | rm -f core conftest.err conftest.$ac_objext \ | |
10710 | conftest$ac_exeext conftest.$ac_ext | |
10711 | LIBS=$ac_check_lib_save_LIBS | |
10712 | fi | |
10713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
10714 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
10715 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : | |
10716 | cat >>confdefs.h <<_ACEOF | |
10717 | #define HAVE_LIBDNET 1 | |
10718 | _ACEOF | |
10719 | ||
10720 | LIBS="-ldnet $LIBS" | |
10721 | ||
10722 | fi | |
10723 | ||
10724 | ||
10725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
10726 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
10727 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : | |
10728 | $as_echo_n "(cached) " >&6 | |
10729 | else | |
10730 | ac_check_lib_save_LIBS=$LIBS | |
10731 | LIBS="-lXbsd $LIBS" | |
10732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10733 | /* end confdefs.h. */ | |
10734 | ||
10735 | ||
10736 | int | |
10737 | main () | |
f199cab1 | 10738 | { |
5476a9a4 GM |
10739 | return main (); |
10740 | ; | |
10741 | return 0; | |
f199cab1 | 10742 | } |
5476a9a4 GM |
10743 | _ACEOF |
10744 | if ac_fn_c_try_link "$LINENO"; then : | |
10745 | ac_cv_lib_Xbsd_main=yes | |
10746 | else | |
10747 | ac_cv_lib_Xbsd_main=no | |
10748 | fi | |
10749 | rm -f core conftest.err conftest.$ac_objext \ | |
10750 | conftest$ac_exeext conftest.$ac_ext | |
10751 | LIBS=$ac_check_lib_save_LIBS | |
10752 | fi | |
10753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
10754 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
10755 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : | |
10756 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" | |
10757 | fi | |
10758 | ||
10759 | ||
10760 | LIB_PTHREAD= | |
10761 | ||
10762 | ||
10763 | ||
10764 | if test "$ac_cv_header_pthread_h"; then | |
10765 | if test "$GMALLOC_OBJ" = gmalloc.o; then | |
10766 | emacs_pthread_function=pthread_atfork | |
10767 | else | |
10768 | emacs_pthread_function=pthread_self | |
10769 | fi | |
10770 | as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` | |
10771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 | |
10772 | $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } | |
10773 | if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : | |
10774 | $as_echo_n "(cached) " >&6 | |
10775 | else | |
10776 | ac_check_lib_save_LIBS=$LIBS | |
10777 | LIBS="-lpthread $LIBS" | |
10778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10779 | /* end confdefs.h. */ | |
10780 | ||
10781 | /* Override any GCC internal prototype to avoid an error. | |
10782 | Use char because int might match the return type of a GCC | |
10783 | builtin and then its argument prototype would still apply. */ | |
10784 | #ifdef __cplusplus | |
10785 | extern "C" | |
10786 | #endif | |
10787 | char $emacs_pthread_function (); | |
10788 | int | |
10789 | main () | |
f199cab1 | 10790 | { |
5476a9a4 GM |
10791 | return $emacs_pthread_function (); |
10792 | ; | |
10793 | return 0; | |
f199cab1 | 10794 | } |
5476a9a4 GM |
10795 | _ACEOF |
10796 | if ac_fn_c_try_link "$LINENO"; then : | |
10797 | eval "$as_ac_Lib=yes" | |
10798 | else | |
10799 | eval "$as_ac_Lib=no" | |
10800 | fi | |
10801 | rm -f core conftest.err conftest.$ac_objext \ | |
10802 | conftest$ac_exeext conftest.$ac_ext | |
10803 | LIBS=$ac_check_lib_save_LIBS | |
10804 | fi | |
10805 | eval ac_res=\$$as_ac_Lib | |
10806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
10807 | $as_echo "$ac_res" >&6; } | |
10808 | eval as_val=\$$as_ac_Lib | |
10809 | if test "x$as_val" = x""yes; then : | |
10810 | HAVE_PTHREAD=yes | |
10811 | fi | |
10812 | ||
10813 | fi | |
10814 | if test "$HAVE_PTHREAD" = yes; then | |
10815 | case "${canonical}" in | |
10816 | *-hpux*) ;; | |
10817 | *) LIB_PTHREAD="-lpthread" | |
10818 | LIBS="$LIB_PTHREAD $LIBS" ;; | |
10819 | esac | |
10820 | ||
10821 | $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h | |
10822 | ||
10823 | fi | |
10824 | ||
10825 | ||
10826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
10827 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
10828 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : | |
10829 | $as_echo_n "(cached) " >&6 | |
10830 | else | |
10831 | ac_check_lib_save_LIBS=$LIBS | |
10832 | LIBS="-lpthreads $LIBS" | |
10833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10834 | /* end confdefs.h. */ | |
10835 | ||
10836 | /* Override any GCC internal prototype to avoid an error. | |
10837 | Use char because int might match the return type of a GCC | |
10838 | builtin and then its argument prototype would still apply. */ | |
10839 | #ifdef __cplusplus | |
10840 | extern "C" | |
f199cab1 | 10841 | #endif |
5476a9a4 GM |
10842 | char cma_open (); |
10843 | int | |
10844 | main () | |
10845 | { | |
10846 | return cma_open (); | |
10847 | ; | |
10848 | return 0; | |
f199cab1 | 10849 | } |
5476a9a4 GM |
10850 | _ACEOF |
10851 | if ac_fn_c_try_link "$LINENO"; then : | |
10852 | ac_cv_lib_pthreads_cma_open=yes | |
10853 | else | |
10854 | ac_cv_lib_pthreads_cma_open=no | |
10855 | fi | |
10856 | rm -f core conftest.err conftest.$ac_objext \ | |
10857 | conftest$ac_exeext conftest.$ac_ext | |
10858 | LIBS=$ac_check_lib_save_LIBS | |
10859 | fi | |
10860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
10861 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
10862 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : | |
10863 | cat >>confdefs.h <<_ACEOF | |
10864 | #define HAVE_LIBPTHREADS 1 | |
10865 | _ACEOF | |
10866 | ||
10867 | LIBS="-lpthreads $LIBS" | |
10868 | ||
10869 | fi | |
10870 | ||
10871 | ||
10872 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
10873 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
10874 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
10875 | ## added to LIBS in configure would never contain the pthreads part, | |
10876 | ## but the value used in Makefiles might. FIXME? | |
10877 | ## | |
10878 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
10879 | ## be harmless on older versions of X where it happens to exist. | |
10880 | test "$opsys" = "aix4-2" && \ | |
10881 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
10882 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
10883 | ||
10884 | ||
10885 | case ${host_os} in | |
10886 | aix*) | |
10887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
10888 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
10889 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
10890 | $as_echo_n "(cached) " >&6 | |
10891 | else | |
10892 | ||
10893 | case $GCC in | |
10894 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
10895 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
10896 | esac | |
067d23c9 | 10897 | |
5476a9a4 GM |
10898 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
10899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10900 | /* end confdefs.h. */ | |
067d23c9 KY |
10901 | |
10902 | int | |
10903 | main () | |
10904 | { | |
5476a9a4 GM |
10905 | int i; |
10906 | ; | |
10907 | return 0; | |
10908 | } | |
10909 | _ACEOF | |
10910 | if ac_fn_c_try_link "$LINENO"; then : | |
067d23c9 | 10911 | |
5476a9a4 GM |
10912 | else |
10913 | gdb_cv_bigtoc= | |
10914 | fi | |
10915 | rm -f core conftest.err conftest.$ac_objext \ | |
10916 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 10917 | |
5476a9a4 GM |
10918 | fi |
10919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
10920 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
10921 | ;; | |
10922 | esac | |
067d23c9 | 10923 | |
5476a9a4 GM |
10924 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
10925 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
10926 | # REAL_CPPFLAGS later on. | |
067d23c9 | 10927 | |
5476a9a4 GM |
10928 | REAL_CFLAGS="$CFLAGS" |
10929 | REAL_CPPFLAGS="$CPPFLAGS" | |
10930 | ||
10931 | if test "${HAVE_X11}" = "yes"; then | |
10932 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
10933 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
10934 | LIBS="-lX11 $LIBS" | |
10935 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
10936 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
10937 | ||
10938 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
10939 | # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, | |
10940 | # but it's more convenient here to set LD_RUN_PATH since this | |
10941 | # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. | |
10942 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
10943 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
10944 | export LD_RUN_PATH | |
10945 | fi | |
10946 | ||
10947 | if test "${opsys}" = "gnu-linux"; then | |
10948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
10949 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
10950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10951 | /* end confdefs.h. */ | |
067d23c9 | 10952 | |
5476a9a4 GM |
10953 | int |
10954 | main () | |
10955 | { | |
10956 | XOpenDisplay ("foo"); | |
f199cab1 | 10957 | ; |
067d23c9 KY |
10958 | return 0; |
10959 | } | |
10960 | _ACEOF | |
5476a9a4 GM |
10961 | if ac_fn_c_try_link "$LINENO"; then : |
10962 | xgnu_linux_first_failure=no | |
067d23c9 | 10963 | else |
5476a9a4 | 10964 | xgnu_linux_first_failure=yes |
067d23c9 | 10965 | fi |
5476a9a4 GM |
10966 | rm -f core conftest.err conftest.$ac_objext \ |
10967 | conftest$ac_exeext conftest.$ac_ext | |
10968 | if test "${xgnu_linux_first_failure}" = "yes"; then | |
10969 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
10970 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
10971 | OLD_CPPFLAGS="$CPPFLAGS" | |
10972 | OLD_LIBS="$LIBS" | |
10973 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
10974 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
10975 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
10976 | LIBS="$LIBS -b i486-linuxaout" | |
10977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10978 | /* end confdefs.h. */ | |
067d23c9 | 10979 | |
5476a9a4 GM |
10980 | int |
10981 | main () | |
10982 | { | |
10983 | XOpenDisplay ("foo"); | |
10984 | ; | |
10985 | return 0; | |
10986 | } | |
10987 | _ACEOF | |
10988 | if ac_fn_c_try_link "$LINENO"; then : | |
10989 | xgnu_linux_second_failure=no | |
10990 | else | |
10991 | xgnu_linux_second_failure=yes | |
067d23c9 | 10992 | fi |
5476a9a4 GM |
10993 | rm -f core conftest.err conftest.$ac_objext \ |
10994 | conftest$ac_exeext conftest.$ac_ext | |
10995 | if test "${xgnu_linux_second_failure}" = "yes"; then | |
10996 | # If we get the same failure with -b, there is no use adding -b. | |
10997 | # So take it out. This plays safe. | |
10998 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
10999 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
11000 | CPPFLAGS="$OLD_CPPFLAGS" | |
11001 | LIBS="$OLD_LIBS" | |
11002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11003 | $as_echo "no" >&6; } | |
11004 | else | |
11005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11006 | $as_echo "yes" >&6; } | |
11007 | fi | |
0eb4e0df | 11008 | else |
5476a9a4 GM |
11009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11010 | $as_echo "no" >&6; } | |
11011 | fi | |
11012 | fi | |
0eb4e0df | 11013 | |
5476a9a4 GM |
11014 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
11015 | # header files included from there. | |
11016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
11017 | $as_echo_n "checking for Xkb... " >&6; } | |
0eb4e0df GM |
11018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11019 | /* end confdefs.h. */ | |
5476a9a4 GM |
11020 | #include <X11/Xlib.h> |
11021 | #include <X11/XKBlib.h> | |
0eb4e0df GM |
11022 | int |
11023 | main () | |
11024 | { | |
5476a9a4 | 11025 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); |
0eb4e0df GM |
11026 | ; |
11027 | return 0; | |
11028 | } | |
11029 | _ACEOF | |
5476a9a4 GM |
11030 | if ac_fn_c_try_link "$LINENO"; then : |
11031 | emacs_xkb=yes | |
0eb4e0df | 11032 | else |
5476a9a4 | 11033 | emacs_xkb=no |
0eb4e0df | 11034 | fi |
5476a9a4 GM |
11035 | rm -f core conftest.err conftest.$ac_objext \ |
11036 | conftest$ac_exeext conftest.$ac_ext | |
11037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
11038 | $as_echo "$emacs_xkb" >&6; } | |
11039 | if test $emacs_xkb = yes; then | |
1abfdc54 | 11040 | |
f46ba47d GM |
11041 | $as_echo "#define HAVE_XKB 1" >>confdefs.h |
11042 | ||
e1fefc61 | 11043 | fi |
1abfdc54 | 11044 | |
5476a9a4 GM |
11045 | for ac_func in XrmSetDatabase XScreenResourceString \ |
11046 | XScreenNumberOfScreen | |
11047 | do : | |
11048 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11049 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11050 | eval as_val=\$$as_ac_var | |
11051 | if test "x$as_val" = x""yes; then : | |
11052 | cat >>confdefs.h <<_ACEOF | |
11053 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
f199cab1 | 11054 | _ACEOF |
1abfdc54 | 11055 | |
5476a9a4 GM |
11056 | fi |
11057 | done | |
1abfdc54 | 11058 | |
5476a9a4 | 11059 | fi |
1abfdc54 | 11060 | |
5476a9a4 GM |
11061 | if test "${window_system}" = "x11"; then |
11062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
11063 | $as_echo_n "checking X11 version 6... " >&6; } | |
11064 | if test "${emacs_cv_x11_version_6+set}" = set; then : | |
067d23c9 KY |
11065 | $as_echo_n "(cached) " >&6 |
11066 | else | |
5476a9a4 | 11067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 11068 | /* end confdefs.h. */ |
5476a9a4 | 11069 | #include <X11/Xlib.h> |
067d23c9 KY |
11070 | int |
11071 | main () | |
11072 | { | |
5476a9a4 GM |
11073 | #if XlibSpecificationRelease < 6 |
11074 | fail; | |
11075 | #endif | |
11076 | ||
067d23c9 KY |
11077 | ; |
11078 | return 0; | |
11079 | } | |
11080 | _ACEOF | |
5476a9a4 GM |
11081 | if ac_fn_c_try_link "$LINENO"; then : |
11082 | emacs_cv_x11_version_6=yes | |
11083 | else | |
11084 | emacs_cv_x11_version_6=no | |
11085 | fi | |
11086 | rm -f core conftest.err conftest.$ac_objext \ | |
11087 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 11088 | fi |
f199cab1 | 11089 | |
5476a9a4 GM |
11090 | if test $emacs_cv_x11_version_6 = yes; then |
11091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
11092 | $as_echo "6 or newer" >&6; } | |
f199cab1 | 11093 | |
5476a9a4 | 11094 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h |
f199cab1 GM |
11095 | |
11096 | ||
5476a9a4 | 11097 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h |
f199cab1 | 11098 | |
5476a9a4 GM |
11099 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style |
11100 | ## XIM support. | |
11101 | case "$opsys" in | |
11102 | sol2-*) : ;; | |
11103 | *) | |
11104 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
f199cab1 | 11105 | |
5476a9a4 GM |
11106 | ;; |
11107 | esac | |
11108 | else | |
11109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
11110 | $as_echo "before 6" >&6; } | |
11111 | fi | |
11112 | fi | |
f199cab1 | 11113 | |
067d23c9 | 11114 | |
5476a9a4 GM |
11115 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. |
11116 | HAVE_RSVG=no | |
7c61eaab | 11117 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then |
5476a9a4 GM |
11118 | if test "${with_rsvg}" != "no"; then |
11119 | RSVG_REQUIRED=2.11.0 | |
11120 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
067d23c9 | 11121 | |
f199cab1 | 11122 | |
5476a9a4 | 11123 | succeeded=no |
067d23c9 | 11124 | |
5476a9a4 GM |
11125 | if test "$PKG_CONFIG" = "no" ; then |
11126 | : | |
11127 | else | |
11128 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11129 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 |
11131 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
f199cab1 | 11132 | |
b5591ebb GM |
11133 | if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 && |
11134 | RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` && | |
11135 | RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then | |
5476a9a4 GM |
11136 | edit_cflags=" |
11137 | s,///*,/,g | |
11138 | s/^/ / | |
11139 | s/ -I/ $isystem/g | |
11140 | s/^ // | |
11141 | " | |
11142 | RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` | |
11143 | RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` | |
11144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 | |
11145 | $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } | |
11146 | succeeded=yes | |
11147 | else | |
11148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11149 | $as_echo "no" >&6; } | |
11150 | RSVG_CFLAGS="" | |
11151 | RSVG_LIBS="" | |
11152 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11153 | ## do set a variable so people can do so. Do it in a subshell |
11154 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11155 | RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1` |
f199cab1 | 11156 | |
5476a9a4 | 11157 | fi |
067d23c9 | 11158 | |
067d23c9 | 11159 | |
067d23c9 | 11160 | |
f199cab1 | 11161 | else |
5476a9a4 GM |
11162 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
11163 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 11164 | fi |
5476a9a4 GM |
11165 | fi |
11166 | ||
11167 | if test $succeeded = yes; then | |
11168 | HAVE_RSVG=yes | |
11169 | else | |
11170 | : | |
11171 | fi | |
067d23c9 | 11172 | |
067d23c9 | 11173 | |
067d23c9 | 11174 | |
f199cab1 | 11175 | |
5476a9a4 | 11176 | if test $HAVE_RSVG = yes; then |
f199cab1 | 11177 | |
5476a9a4 GM |
11178 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h |
11179 | ||
11180 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
11181 | LIBS="$RSVG_LIBS $LIBS" | |
11182 | fi | |
f199cab1 | 11183 | fi |
5476a9a4 | 11184 | fi |
f199cab1 | 11185 | |
5476a9a4 | 11186 | HAVE_IMAGEMAGICK=no |
d236c302 | 11187 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then |
5476a9a4 GM |
11188 | if test "${with_imagemagick}" != "no"; then |
11189 | ## 6.2.8 is the earliest version known to work, but earlier versions | |
11190 | ## might work - let us know if you find one. | |
11191 | ## 6.0.7 does not work. See bug#7955. | |
0cb77136 GM |
11192 | ## 6.8.2 makes Emacs crash; see Bug#13867. |
11193 | IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2" | |
f199cab1 | 11194 | |
5476a9a4 | 11195 | succeeded=no |
f199cab1 | 11196 | |
5476a9a4 GM |
11197 | if test "$PKG_CONFIG" = "no" ; then |
11198 | : | |
11199 | else | |
11200 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11201 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 |
11203 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
f199cab1 | 11204 | |
b5591ebb GM |
11205 | if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 && |
11206 | IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` && | |
11207 | IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then | |
5476a9a4 GM |
11208 | edit_cflags=" |
11209 | s,///*,/,g | |
11210 | s/^/ / | |
11211 | s/ -I/ $isystem/g | |
11212 | s/^ // | |
11213 | " | |
11214 | IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` | |
11215 | IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` | |
11216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 | |
11217 | $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } | |
11218 | succeeded=yes | |
11219 | else | |
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11221 | $as_echo "no" >&6; } | |
11222 | IMAGEMAGICK_CFLAGS="" | |
11223 | IMAGEMAGICK_LIBS="" | |
11224 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11225 | ## do set a variable so people can do so. Do it in a subshell |
11226 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11227 | IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1` |
f199cab1 | 11228 | |
5476a9a4 | 11229 | fi |
f199cab1 | 11230 | |
f199cab1 | 11231 | |
f199cab1 | 11232 | |
5476a9a4 GM |
11233 | else |
11234 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11235 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11236 | fi | |
f199cab1 | 11237 | fi |
5476a9a4 GM |
11238 | |
11239 | if test $succeeded = yes; then | |
11240 | HAVE_IMAGEMAGICK=yes | |
f199cab1 | 11241 | else |
5476a9a4 | 11242 | : |
067d23c9 KY |
11243 | fi |
11244 | ||
f199cab1 | 11245 | |
067d23c9 | 11246 | |
f199cab1 | 11247 | |
5476a9a4 | 11248 | if test $HAVE_IMAGEMAGICK = yes; then |
067d23c9 | 11249 | |
5476a9a4 | 11250 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h |
f199cab1 | 11251 | |
5476a9a4 GM |
11252 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" |
11253 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
11254 | for ac_func in MagickExportImagePixels MagickMergeImageLayers | |
11255 | do : | |
11256 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11257 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11258 | eval as_val=\$$as_ac_var | |
11259 | if test "x$as_val" = x""yes; then : | |
11260 | cat >>confdefs.h <<_ACEOF | |
11261 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
067d23c9 | 11262 | _ACEOF |
f199cab1 GM |
11263 | |
11264 | fi | |
5476a9a4 GM |
11265 | done |
11266 | ||
067d23c9 KY |
11267 | fi |
11268 | fi | |
5476a9a4 | 11269 | fi |
067d23c9 | 11270 | |
f199cab1 | 11271 | |
5476a9a4 GM |
11272 | HAVE_GTK=no |
11273 | GTK_OBJ= | |
6d89e343 | 11274 | gtk_term_header=$term_header |
4fa92495 GM |
11275 | check_gtk2=no |
11276 | gtk3_pkg_errors= | |
7c61eaab GM |
11277 | if test "${opsys}" != "mingw32"; then |
11278 | if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
11279 | GLIB_REQUIRED=2.28 | |
11280 | GTK_REQUIRED=3.0 | |
11281 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 GM |
11282 | |
11283 | ||
5476a9a4 | 11284 | succeeded=no |
f199cab1 | 11285 | |
5476a9a4 GM |
11286 | if test "$PKG_CONFIG" = "no" ; then |
11287 | pkg_check_gtk=no | |
11288 | else | |
11289 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11290 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 |
11292 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
f199cab1 | 11293 | |
b5591ebb GM |
11294 | if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 && |
11295 | GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` && | |
11296 | GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then | |
5476a9a4 GM |
11297 | edit_cflags=" |
11298 | s,///*,/,g | |
11299 | s/^/ / | |
11300 | s/ -I/ $isystem/g | |
11301 | s/^ // | |
11302 | " | |
11303 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
11304 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
11305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
11306 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
11307 | succeeded=yes | |
11308 | else | |
11309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11310 | $as_echo "no" >&6; } | |
11311 | GTK_CFLAGS="" | |
11312 | GTK_LIBS="" | |
11313 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11314 | ## do set a variable so people can do so. Do it in a subshell |
11315 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11316 | GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1` |
f199cab1 | 11317 | |
5476a9a4 | 11318 | fi |
f199cab1 | 11319 | |
f199cab1 | 11320 | |
f199cab1 | 11321 | |
5476a9a4 GM |
11322 | else |
11323 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11324 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 11325 | fi |
5476a9a4 | 11326 | fi |
067d23c9 | 11327 | |
5476a9a4 GM |
11328 | if test $succeeded = yes; then |
11329 | pkg_check_gtk=yes | |
11330 | else | |
11331 | pkg_check_gtk=no | |
11332 | fi | |
067d23c9 | 11333 | |
7c61eaab GM |
11334 | if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then |
11335 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 | |
11336 | fi | |
11337 | if test "$pkg_check_gtk" = "yes"; then | |
067d23c9 | 11338 | |
5476a9a4 | 11339 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h |
067d23c9 | 11340 | |
7c61eaab | 11341 | GTK_OBJ=emacsgtkfixed.o |
6d89e343 | 11342 | gtk_term_header=gtkutil.h |
7c61eaab GM |
11343 | USE_GTK_TOOLKIT="GTK3" |
11344 | if test "x$ac_enable_gtk_deprecation_warnings" = x; then | |
11345 | GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" | |
c081121f | 11346 | GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS" |
7c61eaab GM |
11347 | fi |
11348 | else | |
11349 | check_gtk2=yes | |
11350 | gtk3_pkg_errors="$GTK_PKG_ERRORS " | |
11351 | fi | |
4fa92495 | 11352 | fi |
067d23c9 | 11353 | |
7c61eaab GM |
11354 | if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then |
11355 | GLIB_REQUIRED=2.10 | |
11356 | GTK_REQUIRED=2.10 | |
11357 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 | 11358 | |
5476a9a4 GM |
11359 | |
11360 | succeeded=no | |
11361 | ||
11362 | if test "$PKG_CONFIG" = "no" ; then | |
11363 | pkg_check_gtk=no | |
11364 | else | |
11365 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11366 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 |
11368 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
11369 | ||
b5591ebb GM |
11370 | if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 && |
11371 | GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` && | |
11372 | GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then | |
5476a9a4 GM |
11373 | edit_cflags=" |
11374 | s,///*,/,g | |
11375 | s/^/ / | |
11376 | s/ -I/ $isystem/g | |
11377 | s/^ // | |
11378 | " | |
11379 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
11380 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
11381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
11382 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
11383 | succeeded=yes | |
11384 | else | |
11385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11386 | $as_echo "no" >&6; } | |
11387 | GTK_CFLAGS="" | |
11388 | GTK_LIBS="" | |
11389 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11390 | ## do set a variable so people can do so. Do it in a subshell |
11391 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11392 | GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1` |
5476a9a4 GM |
11393 | |
11394 | fi | |
11395 | ||
11396 | ||
11397 | ||
11398 | else | |
11399 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11400 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11401 | fi | |
11402 | fi | |
11403 | ||
11404 | if test $succeeded = yes; then | |
11405 | pkg_check_gtk=yes | |
11406 | else | |
11407 | pkg_check_gtk=no | |
11408 | fi | |
11409 | ||
7c61eaab GM |
11410 | if test "$pkg_check_gtk" = "no" && |
11411 | { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } | |
11412 | then | |
11413 | as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 | |
11414 | fi | |
11415 | test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2" | |
5476a9a4 | 11416 | fi |
067d23c9 | 11417 | fi |
067d23c9 | 11418 | |
5476a9a4 GM |
11419 | if test x"$pkg_check_gtk" = xyes; then |
11420 | ||
11421 | ||
11422 | ||
11423 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
11424 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
11425 | LIBS="$GTK_LIBS $LIBS" | |
646b9499 GM |
11426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5 |
11427 | $as_echo_n "checking whether GTK compiles... " >&6; } | |
11428 | GTK_COMPILES=no | |
11429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11430 | /* end confdefs.h. */ | |
11431 | /* Check the Gtk and Glib APIs. */ | |
11432 | #include <gtk/gtk.h> | |
11433 | #include <glib-object.h> | |
11434 | static void | |
11435 | callback (GObject *go, GParamSpec *spec, gpointer user_data) | |
11436 | {} | |
11437 | ||
11438 | int | |
11439 | main () | |
11440 | { | |
11441 | ||
11442 | GtkSettings *gs = 0; | |
11443 | /* Use G_CALLBACK to make sure function pointers can be cast to void *; | |
11444 | strict C prohibits this. Use gtk_main_iteration to test that the | |
11445 | libraries are there. */ | |
11446 | if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC, | |
11447 | 0, 0, 0, G_CALLBACK (callback), 0)) | |
11448 | gtk_main_iteration (); | |
11449 | ||
11450 | ; | |
11451 | return 0; | |
11452 | } | |
5476a9a4 | 11453 | _ACEOF |
646b9499 GM |
11454 | if ac_fn_c_try_link "$LINENO"; then : |
11455 | GTK_COMPILES=yes | |
f199cab1 | 11456 | fi |
646b9499 GM |
11457 | rm -f core conftest.err conftest.$ac_objext \ |
11458 | conftest$ac_exeext conftest.$ac_ext | |
11459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5 | |
11460 | $as_echo "$GTK_COMPILES" >&6; } | |
5476a9a4 | 11461 | if test "${GTK_COMPILES}" != "yes"; then |
6d89e343 | 11462 | GTK_OBJ= |
5476a9a4 GM |
11463 | if test "$USE_X_TOOLKIT" != "maybe"; then |
11464 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; | |
11465 | fi | |
11466 | else | |
11467 | HAVE_GTK=yes | |
11468 | ||
11469 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
067d23c9 | 11470 | |
5476a9a4 | 11471 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
6d89e343 | 11472 | term_header=$gtk_term_header |
5476a9a4 | 11473 | USE_X_TOOLKIT=none |
b5591ebb | 11474 | if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then |
5476a9a4 GM |
11475 | : |
11476 | else | |
11477 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
11478 | closing open displays. This is no problem if you just use | |
11479 | one display, but if you use more than one and close one of them | |
11480 | Emacs may crash." >&5 | |
11481 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
11482 | closing open displays. This is no problem if you just use | |
11483 | one display, but if you use more than one and close one of them | |
11484 | Emacs may crash." >&2;} | |
11485 | sleep 3 | |
11486 | fi | |
067d23c9 KY |
11487 | fi |
11488 | ||
5476a9a4 | 11489 | fi |
067d23c9 KY |
11490 | |
11491 | ||
11492 | ||
5476a9a4 | 11493 | if test "${HAVE_GTK}" = "yes"; then |
067d23c9 | 11494 | |
5476a9a4 GM |
11495 | if test "$with_toolkit_scroll_bars" != no; then |
11496 | with_toolkit_scroll_bars=yes | |
11497 | fi | |
067d23c9 | 11498 | |
5476a9a4 GM |
11499 | HAVE_GTK_FILE_SELECTION=no |
11500 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
11501 | #include <gtk/gtk.h> | |
11502 | " | |
11503 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : | |
11504 | HAVE_GTK_FILE_SELECTION=yes | |
11505 | else | |
11506 | HAVE_GTK_FILE_SELECTION=no | |
11507 | fi | |
067d23c9 | 11508 | |
5476a9a4 GM |
11509 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then |
11510 | for ac_func in gtk_file_selection_new | |
11511 | do : | |
11512 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
11513 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : | |
11514 | cat >>confdefs.h <<_ACEOF | |
11515 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
f199cab1 | 11516 | _ACEOF |
067d23c9 | 11517 | |
f199cab1 | 11518 | fi |
5476a9a4 GM |
11519 | done |
11520 | ||
f199cab1 | 11521 | fi |
067d23c9 | 11522 | |
4efe5ef9 GM |
11523 | HAVE_GTK_HANDLE_BOX=no |
11524 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default | |
11525 | #include <gtk/gtk.h> | |
11526 | " | |
11527 | if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then : | |
11528 | HAVE_GTK_HANDLE_BOX=yes | |
11529 | else | |
11530 | HAVE_GTK_HANDLE_BOX=no | |
11531 | fi | |
11532 | ||
11533 | if test "$HAVE_GTK_HANDLE_BOX" = yes; then | |
11534 | for ac_func in gtk_handle_box_new | |
11535 | do : | |
11536 | ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new" | |
11537 | if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then : | |
11538 | cat >>confdefs.h <<_ACEOF | |
11539 | #define HAVE_GTK_HANDLE_BOX_NEW 1 | |
11540 | _ACEOF | |
11541 | ||
11542 | fi | |
11543 | done | |
11544 | ||
11545 | fi | |
11546 | ||
11547 | HAVE_GTK_TEAROFF_MENU_ITEM=no | |
11548 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default | |
11549 | #include <gtk/gtk.h> | |
11550 | " | |
11551 | if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then : | |
11552 | HAVE_GTK_TEAROFF_MENU_ITEM=yes | |
11553 | else | |
11554 | HAVE_GTK_TEAROFF_MENU_ITEM=no | |
11555 | fi | |
11556 | ||
11557 | if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then | |
11558 | for ac_func in gtk_tearoff_menu_item_new | |
11559 | do : | |
11560 | ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new" | |
11561 | if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then : | |
11562 | cat >>confdefs.h <<_ACEOF | |
11563 | #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1 | |
11564 | _ACEOF | |
11565 | ||
11566 | fi | |
11567 | done | |
11568 | ||
11569 | fi | |
067d23c9 | 11570 | |
5476a9a4 GM |
11571 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ |
11572 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
11573 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
11574 | gtk_orientable_set_orientation \ | |
11575 | gtk_window_set_has_resize_grip | |
11576 | do : | |
11577 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11578 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11579 | eval as_val=\$$as_ac_var | |
11580 | if test "x$as_val" = x""yes; then : | |
11581 | cat >>confdefs.h <<_ACEOF | |
11582 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11583 | _ACEOF | |
067d23c9 | 11584 | |
5476a9a4 GM |
11585 | fi |
11586 | done | |
067d23c9 | 11587 | |
42dcba54 GM |
11588 | |
11589 | term_header=gtkutil.h | |
5476a9a4 | 11590 | fi |
067d23c9 | 11591 | |
5476a9a4 GM |
11592 | HAVE_DBUS=no |
11593 | DBUS_OBJ= | |
11594 | if test "${with_dbus}" = "yes"; then | |
067d23c9 | 11595 | |
5476a9a4 | 11596 | succeeded=no |
067d23c9 | 11597 | |
5476a9a4 GM |
11598 | if test "$PKG_CONFIG" = "no" ; then |
11599 | HAVE_DBUS=no | |
f199cab1 | 11600 | else |
5476a9a4 | 11601 | PKG_CONFIG_MIN_VERSION=0.9.0 |
b5591ebb | 11602 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 |
11604 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
067d23c9 | 11605 | |
b5591ebb GM |
11606 | if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 && |
11607 | DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` && | |
11608 | DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then | |
5476a9a4 GM |
11609 | edit_cflags=" |
11610 | s,///*,/,g | |
11611 | s/^/ / | |
11612 | s/ -I/ $isystem/g | |
11613 | s/^ // | |
11614 | " | |
11615 | DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` | |
11616 | DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` | |
11617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 | |
11618 | $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } | |
11619 | succeeded=yes | |
11620 | else | |
11621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11622 | $as_echo "no" >&6; } | |
11623 | DBUS_CFLAGS="" | |
11624 | DBUS_LIBS="" | |
11625 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11626 | ## do set a variable so people can do so. Do it in a subshell |
11627 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11628 | DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1` |
067d23c9 | 11629 | |
5476a9a4 | 11630 | fi |
067d23c9 | 11631 | |
15f79fcd | 11632 | |
067d23c9 | 11633 | |
5476a9a4 GM |
11634 | else |
11635 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11636 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11637 | fi | |
067d23c9 | 11638 | fi |
067d23c9 | 11639 | |
5476a9a4 GM |
11640 | if test $succeeded = yes; then |
11641 | HAVE_DBUS=yes | |
f199cab1 | 11642 | else |
5476a9a4 | 11643 | HAVE_DBUS=no |
f199cab1 | 11644 | fi |
067d23c9 | 11645 | |
5476a9a4 GM |
11646 | if test "$HAVE_DBUS" = yes; then |
11647 | LIBS="$LIBS $DBUS_LIBS" | |
067d23c9 | 11648 | |
5476a9a4 | 11649 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h |
067d23c9 | 11650 | |
5476a9a4 GM |
11651 | for ac_func in dbus_watch_get_unix_fd \ |
11652 | dbus_type_is_valid \ | |
11653 | dbus_validate_bus_name \ | |
11654 | dbus_validate_path \ | |
11655 | dbus_validate_interface \ | |
11656 | dbus_validate_member | |
11657 | do : | |
11658 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11659 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11660 | eval as_val=\$$as_ac_var | |
11661 | if test "x$as_val" = x""yes; then : | |
11662 | cat >>confdefs.h <<_ACEOF | |
11663 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11664 | _ACEOF | |
067d23c9 | 11665 | |
5476a9a4 GM |
11666 | fi |
11667 | done | |
067d23c9 | 11668 | |
5476a9a4 GM |
11669 | DBUS_OBJ=dbusbind.o |
11670 | fi | |
11671 | fi | |
067d23c9 KY |
11672 | |
11673 | ||
5476a9a4 GM |
11674 | HAVE_GSETTINGS=no |
11675 | if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then | |
067d23c9 | 11676 | |
5476a9a4 | 11677 | succeeded=no |
067d23c9 | 11678 | |
5476a9a4 GM |
11679 | if test "$PKG_CONFIG" = "no" ; then |
11680 | HAVE_GSETTINGS=no | |
11681 | else | |
11682 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11683 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 |
11685 | $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } | |
0afb4571 | 11686 | |
b5591ebb GM |
11687 | if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 && |
11688 | GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` && | |
11689 | GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then | |
5476a9a4 GM |
11690 | edit_cflags=" |
11691 | s,///*,/,g | |
11692 | s/^/ / | |
11693 | s/ -I/ $isystem/g | |
11694 | s/^ // | |
11695 | " | |
11696 | GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` | |
11697 | GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` | |
11698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 | |
11699 | $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } | |
11700 | succeeded=yes | |
11701 | else | |
11702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11703 | $as_echo "no" >&6; } | |
11704 | GSETTINGS_CFLAGS="" | |
11705 | GSETTINGS_LIBS="" | |
11706 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11707 | ## do set a variable so people can do so. Do it in a subshell |
11708 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11709 | GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1` |
0afb4571 | 11710 | |
5476a9a4 | 11711 | fi |
067d23c9 KY |
11712 | |
11713 | ||
11714 | ||
11715 | else | |
5476a9a4 GM |
11716 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
11717 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
067d23c9 | 11718 | fi |
5476a9a4 | 11719 | fi |
067d23c9 | 11720 | |
5476a9a4 GM |
11721 | if test $succeeded = yes; then |
11722 | HAVE_GSETTINGS=yes | |
11723 | else | |
11724 | HAVE_GSETTINGS=no | |
11725 | fi | |
f199cab1 | 11726 | |
5476a9a4 | 11727 | if test "$HAVE_GSETTINGS" = "yes"; then |
f199cab1 | 11728 | |
5476a9a4 | 11729 | $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h |
f199cab1 | 11730 | |
5476a9a4 GM |
11731 | SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" |
11732 | SETTINGS_LIBS="$GSETTINGS_LIBS" | |
11733 | fi | |
11734 | fi | |
067d23c9 | 11735 | |
5476a9a4 GM |
11736 | HAVE_GCONF=no |
11737 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
067d23c9 | 11738 | |
5476a9a4 | 11739 | succeeded=no |
067d23c9 | 11740 | |
5476a9a4 GM |
11741 | if test "$PKG_CONFIG" = "no" ; then |
11742 | HAVE_GCONF=no | |
11743 | else | |
11744 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11745 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 |
11747 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
067d23c9 | 11748 | |
b5591ebb GM |
11749 | if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 && |
11750 | GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` && | |
11751 | GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then | |
5476a9a4 GM |
11752 | edit_cflags=" |
11753 | s,///*,/,g | |
11754 | s/^/ / | |
11755 | s/ -I/ $isystem/g | |
11756 | s/^ // | |
11757 | " | |
11758 | GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` | |
11759 | GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` | |
11760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 | |
11761 | $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } | |
11762 | succeeded=yes | |
11763 | else | |
11764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11765 | $as_echo "no" >&6; } | |
11766 | GCONF_CFLAGS="" | |
11767 | GCONF_LIBS="" | |
11768 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11769 | ## do set a variable so people can do so. Do it in a subshell |
11770 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11771 | GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1` |
067d23c9 | 11772 | |
5476a9a4 | 11773 | fi |
f199cab1 | 11774 | |
f199cab1 GM |
11775 | |
11776 | ||
5476a9a4 GM |
11777 | else |
11778 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11779 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11780 | fi | |
11781 | fi | |
f199cab1 | 11782 | |
5476a9a4 GM |
11783 | if test $succeeded = yes; then |
11784 | HAVE_GCONF=yes | |
11785 | else | |
11786 | HAVE_GCONF=no | |
11787 | fi | |
f199cab1 | 11788 | |
5476a9a4 | 11789 | if test "$HAVE_GCONF" = yes; then |
f199cab1 | 11790 | |
5476a9a4 | 11791 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h |
f199cab1 | 11792 | |
5476a9a4 GM |
11793 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" |
11794 | SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" | |
11795 | fi | |
11796 | fi | |
f199cab1 | 11797 | |
5476a9a4 | 11798 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then |
dcde497f GM |
11799 | |
11800 | succeeded=no | |
11801 | ||
11802 | if test "$PKG_CONFIG" = "no" ; then | |
11803 | HAVE_GOBJECT=no | |
11804 | else | |
11805 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11806 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
dcde497f GM |
11807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5 |
11808 | $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; } | |
11809 | ||
b5591ebb GM |
11810 | if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 && |
11811 | GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` && | |
11812 | GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then | |
dcde497f GM |
11813 | edit_cflags=" |
11814 | s,///*,/,g | |
11815 | s/^/ / | |
11816 | s/ -I/ $isystem/g | |
11817 | s/^ // | |
11818 | " | |
11819 | GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"` | |
11820 | GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'` | |
11821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5 | |
11822 | $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; } | |
11823 | succeeded=yes | |
11824 | else | |
11825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11826 | $as_echo "no" >&6; } | |
11827 | GOBJECT_CFLAGS="" | |
11828 | GOBJECT_LIBS="" | |
11829 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11830 | ## do set a variable so people can do so. Do it in a subshell |
11831 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11832 | GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1` |
dcde497f GM |
11833 | |
11834 | fi | |
11835 | ||
11836 | ||
11837 | ||
11838 | else | |
11839 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11840 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11841 | fi | |
11842 | fi | |
11843 | ||
11844 | if test $succeeded = yes; then | |
11845 | HAVE_GOBJECT=yes | |
11846 | else | |
11847 | HAVE_GOBJECT=no | |
11848 | fi | |
11849 | ||
11850 | if test "$HAVE_GOBJECT" = "yes"; then | |
11851 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" | |
11852 | SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" | |
11853 | fi | |
5476a9a4 GM |
11854 | SAVE_CFLAGS="$CFLAGS" |
11855 | SAVE_LIBS="$LIBS" | |
11856 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | |
11857 | LIBS="$SETTINGS_LIBS $LIBS" | |
11858 | for ac_func in g_type_init | |
11859 | do : | |
11860 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
11861 | if test "x$ac_cv_func_g_type_init" = x""yes; then : | |
11862 | cat >>confdefs.h <<_ACEOF | |
11863 | #define HAVE_G_TYPE_INIT 1 | |
067d23c9 | 11864 | _ACEOF |
067d23c9 | 11865 | |
5476a9a4 GM |
11866 | fi |
11867 | done | |
067d23c9 | 11868 | |
5476a9a4 GM |
11869 | CFLAGS="$SAVE_CFLAGS" |
11870 | LIBS="$SAVE_LIBS" | |
11871 | fi | |
067d23c9 | 11872 | |
067d23c9 | 11873 | |
f199cab1 | 11874 | |
067d23c9 | 11875 | |
5476a9a4 GM |
11876 | HAVE_LIBSELINUX=no |
11877 | LIBSELINUX_LIBS= | |
11878 | if test "${with_selinux}" = "yes"; then | |
11879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
11880 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
11881 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : | |
11882 | $as_echo_n "(cached) " >&6 | |
11883 | else | |
11884 | ac_check_lib_save_LIBS=$LIBS | |
11885 | LIBS="-lselinux $LIBS" | |
11886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11887 | /* end confdefs.h. */ | |
067d23c9 | 11888 | |
5476a9a4 GM |
11889 | /* Override any GCC internal prototype to avoid an error. |
11890 | Use char because int might match the return type of a GCC | |
11891 | builtin and then its argument prototype would still apply. */ | |
11892 | #ifdef __cplusplus | |
11893 | extern "C" | |
f199cab1 | 11894 | #endif |
5476a9a4 | 11895 | char lgetfilecon (); |
f199cab1 GM |
11896 | int |
11897 | main () | |
11898 | { | |
5476a9a4 | 11899 | return lgetfilecon (); |
f199cab1 GM |
11900 | ; |
11901 | return 0; | |
11902 | } | |
11903 | _ACEOF | |
5476a9a4 GM |
11904 | if ac_fn_c_try_link "$LINENO"; then : |
11905 | ac_cv_lib_selinux_lgetfilecon=yes | |
11906 | else | |
11907 | ac_cv_lib_selinux_lgetfilecon=no | |
f199cab1 | 11908 | fi |
5476a9a4 GM |
11909 | rm -f core conftest.err conftest.$ac_objext \ |
11910 | conftest$ac_exeext conftest.$ac_ext | |
11911 | LIBS=$ac_check_lib_save_LIBS | |
11912 | fi | |
11913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
11914 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
11915 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : | |
11916 | HAVE_LIBSELINUX=yes | |
11917 | else | |
11918 | HAVE_LIBSELINUX=no | |
067d23c9 KY |
11919 | fi |
11920 | ||
5476a9a4 | 11921 | if test "$HAVE_LIBSELINUX" = yes; then |
067d23c9 | 11922 | |
5476a9a4 | 11923 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h |
067d23c9 | 11924 | |
5476a9a4 GM |
11925 | LIBSELINUX_LIBS=-lselinux |
11926 | fi | |
f199cab1 | 11927 | fi |
067d23c9 | 11928 | |
067d23c9 | 11929 | |
5476a9a4 | 11930 | HAVE_GNUTLS=no |
5476a9a4 | 11931 | if test "${with_gnutls}" = "yes" ; then |
067d23c9 | 11932 | |
5476a9a4 | 11933 | succeeded=no |
067d23c9 | 11934 | |
5476a9a4 GM |
11935 | if test "$PKG_CONFIG" = "no" ; then |
11936 | HAVE_GNUTLS=no | |
11937 | else | |
11938 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11939 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5 |
11941 | $as_echo_n "checking for gnutls >= 2.6.6... " >&6; } | |
067d23c9 | 11942 | |
b5591ebb GM |
11943 | if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 && |
11944 | LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` && | |
11945 | LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then | |
5476a9a4 GM |
11946 | edit_cflags=" |
11947 | s,///*,/,g | |
11948 | s/^/ / | |
11949 | s/ -I/ $isystem/g | |
11950 | s/^ // | |
11951 | " | |
11952 | LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` | |
11953 | LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` | |
11954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 | |
11955 | $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } | |
11956 | succeeded=yes | |
11957 | else | |
11958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11959 | $as_echo "no" >&6; } | |
11960 | LIBGNUTLS_CFLAGS="" | |
11961 | LIBGNUTLS_LIBS="" | |
11962 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11963 | ## do set a variable so people can do so. Do it in a subshell |
11964 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11965 | LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1` |
067d23c9 | 11966 | |
5476a9a4 | 11967 | fi |
067d23c9 | 11968 | |
067d23c9 | 11969 | |
067d23c9 | 11970 | |
5476a9a4 GM |
11971 | else |
11972 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11973 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11974 | fi | |
11975 | fi | |
067d23c9 | 11976 | |
5476a9a4 GM |
11977 | if test $succeeded = yes; then |
11978 | HAVE_GNUTLS=yes | |
11979 | else | |
11980 | HAVE_GNUTLS=no | |
11981 | fi | |
067d23c9 | 11982 | |
5476a9a4 | 11983 | if test "${HAVE_GNUTLS}" = "yes"; then |
067d23c9 | 11984 | |
5476a9a4 | 11985 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h |
067d23c9 | 11986 | |
5476a9a4 | 11987 | fi |
f199cab1 | 11988 | |
7c61eaab GM |
11989 | # Windows loads GnuTLS dynamically |
11990 | if test "${opsys}" = "mingw32"; then | |
7c61eaab | 11991 | LIBGNUTLS_LIBS= |
db7863f4 GM |
11992 | else |
11993 | CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" | |
11994 | LIBS="$LIBGNUTLS_LIBS $LIBS" | |
7c61eaab | 11995 | fi |
5476a9a4 | 11996 | fi |
f527bd02 | 11997 | |
f527bd02 | 11998 | |
5476a9a4 GM |
11999 | |
12000 | ||
0f55a32e GM |
12001 | NOTIFY_OBJ= |
12002 | NOTIFY_SUMMARY=no | |
12003 | ||
6ee585de GM |
12004 | if test "${with_ns}" = yes && test ${with_file_notification} = yes; then |
12005 | with_file_notification=no | |
12006 | fi | |
12007 | ||
12008 | case $with_file_notification,$opsys in | |
12009 | w32,* | yes,mingw32) | |
12010 | ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
12011 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
12012 | ||
0f55a32e GM |
12013 | fi |
12014 | ||
6ee585de GM |
12015 | |
12016 | if test "$ac_cv_header_windows_h" = yes ; then | |
12017 | ||
12018 | $as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h | |
12019 | ||
12020 | NOTIFY_OBJ=w32notify.o | |
12021 | NOTIFY_SUMMARY="yes (w32)" | |
12022 | fi ;; | |
12023 | esac | |
12024 | ||
12025 | case $with_file_notification,$NOTIFY_OBJ in | |
12026 | gfile, | yes,) | |
0f55a32e GM |
12027 | |
12028 | succeeded=no | |
12029 | ||
12030 | if test "$PKG_CONFIG" = "no" ; then | |
12031 | HAVE_GFILENOTIFY=no | |
12032 | else | |
12033 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
12034 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
12035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5 | |
12036 | $as_echo_n "checking for gio-2.0 >= 2.24... " >&6; } | |
12037 | ||
12038 | if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 && | |
12039 | GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` && | |
12040 | GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then | |
12041 | edit_cflags=" | |
12042 | s,///*,/,g | |
12043 | s/^/ / | |
12044 | s/ -I/ $isystem/g | |
12045 | s/^ // | |
12046 | " | |
12047 | GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"` | |
12048 | GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'` | |
12049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5 | |
12050 | $as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; } | |
12051 | succeeded=yes | |
12052 | else | |
12053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12054 | $as_echo "no" >&6; } | |
12055 | GFILENOTIFY_CFLAGS="" | |
12056 | GFILENOTIFY_LIBS="" | |
12057 | ## If we have a custom action on failure, don't print errors, but | |
12058 | ## do set a variable so people can do so. Do it in a subshell | |
12059 | ## to capture any diagnostics in invoking pkg-config. | |
12060 | GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1` | |
12061 | ||
12062 | fi | |
12063 | ||
12064 | ||
12065 | ||
12066 | else | |
12067 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12068 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12069 | fi | |
12070 | fi | |
12071 | ||
12072 | if test $succeeded = yes; then | |
12073 | HAVE_GFILENOTIFY=yes | |
12074 | else | |
12075 | HAVE_GFILENOTIFY=no | |
12076 | fi | |
12077 | ||
6ee585de | 12078 | if test "$HAVE_GFILENOTIFY" = "yes"; then |
0f55a32e GM |
12079 | |
12080 | $as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h | |
12081 | ||
6ee585de GM |
12082 | NOTIFY_OBJ=gfilenotify.o |
12083 | NOTIFY_SUMMARY="yes -lgio (gfile)" | |
12084 | fi ;; | |
12085 | esac | |
12086 | ||
12087 | case $with_file_notification,$NOTIFY_OBJ in | |
12088 | inotify, | yes,) | |
12089 | ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" | |
b5eb356a | 12090 | if test "x$ac_cv_header_sys_inotify_h" = x""yes; then : |
b5eb356a GM |
12091 | |
12092 | fi | |
12093 | ||
b5eb356a | 12094 | |
6ee585de GM |
12095 | if test "$ac_cv_header_sys_inotify_h" = yes ; then |
12096 | ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1" | |
b5eb356a GM |
12097 | if test "x$ac_cv_func_inotify_init1" = x""yes; then : |
12098 | ||
12099 | fi | |
12100 | ||
6ee585de | 12101 | if test "$ac_cv_func_inotify_init1" = yes; then |
0f55a32e GM |
12102 | |
12103 | $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h | |
12104 | ||
6ee585de GM |
12105 | NOTIFY_OBJ=inotify.o |
12106 | NOTIFY_SUMMARY="yes -lglibc (inotify)" | |
12107 | fi | |
12108 | fi ;; | |
12109 | esac | |
0f55a32e | 12110 | |
6ee585de GM |
12111 | case $with_file_notification,$NOTIFY_OBJ in |
12112 | yes,* | no,* | *,?*) ;; | |
12113 | *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;; | |
12114 | esac | |
0f55a32e | 12115 | |
0f55a32e | 12116 | if test -n "$NOTIFY_OBJ"; then |
b5eb356a | 12117 | |
0f55a32e | 12118 | $as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h |
b5eb356a GM |
12119 | |
12120 | fi | |
12121 | ||
0f55a32e GM |
12122 | |
12123 | ||
12124 | ||
5476a9a4 GM |
12125 | HAVE_XAW3D=no |
12126 | LUCID_LIBW= | |
12127 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
12128 | if test "$with_xaw3d" != no; then | |
5476a9a4 | 12129 | if test "${emacs_cv_xaw3d+set}" = set; then : |
f199cab1 GM |
12130 | $as_echo_n "(cached) " >&6 |
12131 | else | |
5476a9a4 GM |
12132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12133 | /* end confdefs.h. */ | |
f527bd02 | 12134 | |
5476a9a4 GM |
12135 | #include <X11/Intrinsic.h> |
12136 | #include <X11/Xaw3d/Simple.h> | |
12137 | int | |
12138 | main () | |
12139 | { | |
12140 | ||
12141 | ; | |
12142 | return 0; | |
12143 | } | |
12144 | _ACEOF | |
12145 | if ac_fn_c_try_link "$LINENO"; then : | |
12146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 | |
12147 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
12148 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : | |
12149 | $as_echo_n "(cached) " >&6 | |
12150 | else | |
12151 | ac_check_lib_save_LIBS=$LIBS | |
12152 | LIBS="-lXaw3d $LIBS" | |
12153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12154 | /* end confdefs.h. */ | |
f527bd02 | 12155 | |
5476a9a4 GM |
12156 | /* Override any GCC internal prototype to avoid an error. |
12157 | Use char because int might match the return type of a GCC | |
12158 | builtin and then its argument prototype would still apply. */ | |
12159 | #ifdef __cplusplus | |
12160 | extern "C" | |
12161 | #endif | |
12162 | char XawScrollbarSetThumb (); | |
12163 | int | |
12164 | main () | |
12165 | { | |
12166 | return XawScrollbarSetThumb (); | |
12167 | ; | |
12168 | return 0; | |
12169 | } | |
12170 | _ACEOF | |
12171 | if ac_fn_c_try_link "$LINENO"; then : | |
12172 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes | |
f199cab1 | 12173 | else |
5476a9a4 | 12174 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
f199cab1 | 12175 | fi |
5476a9a4 GM |
12176 | rm -f core conftest.err conftest.$ac_objext \ |
12177 | conftest$ac_exeext conftest.$ac_ext | |
12178 | LIBS=$ac_check_lib_save_LIBS | |
12179 | fi | |
12180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 | |
12181 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
12182 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : | |
12183 | emacs_cv_xaw3d=yes | |
12184 | else | |
12185 | emacs_cv_xaw3d=no | |
f199cab1 | 12186 | fi |
f527bd02 | 12187 | |
5476a9a4 GM |
12188 | else |
12189 | emacs_cv_xaw3d=no | |
12190 | fi | |
12191 | rm -f core conftest.err conftest.$ac_objext \ | |
12192 | conftest$ac_exeext conftest.$ac_ext | |
12193 | fi | |
f527bd02 | 12194 | |
5476a9a4 GM |
12195 | else |
12196 | emacs_cv_xaw3d=no | |
12197 | fi | |
12198 | if test $emacs_cv_xaw3d = yes; then | |
4fa92495 GM |
12199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 |
12200 | $as_echo_n "checking for xaw3d... " >&6; } | |
5476a9a4 GM |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 |
12202 | $as_echo "yes; using Lucid toolkit" >&6; } | |
12203 | USE_X_TOOLKIT=LUCID | |
12204 | HAVE_XAW3D=yes | |
12205 | LUCID_LIBW=-lXaw3d | |
f527bd02 | 12206 | |
5476a9a4 | 12207 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h |
f527bd02 | 12208 | |
5476a9a4 | 12209 | else |
4fa92495 GM |
12210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 |
12211 | $as_echo_n "checking for xaw3d... " >&6; } | |
5476a9a4 GM |
12212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12213 | $as_echo "no" >&6; } | |
12214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
12215 | $as_echo_n "checking for libXaw... " >&6; } | |
12216 | if test "${emacs_cv_xaw+set}" = set; then : | |
f199cab1 GM |
12217 | $as_echo_n "(cached) " >&6 |
12218 | else | |
12219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12220 | /* end confdefs.h. */ | |
067d23c9 | 12221 | |
5476a9a4 GM |
12222 | #include <X11/Intrinsic.h> |
12223 | #include <X11/Xaw/Simple.h> | |
f199cab1 GM |
12224 | int |
12225 | main () | |
12226 | { | |
067d23c9 | 12227 | |
f199cab1 GM |
12228 | ; |
12229 | return 0; | |
12230 | } | |
12231 | _ACEOF | |
5476a9a4 GM |
12232 | if ac_fn_c_try_link "$LINENO"; then : |
12233 | emacs_cv_xaw=yes | |
f199cab1 | 12234 | else |
5476a9a4 | 12235 | emacs_cv_xaw=no |
f199cab1 | 12236 | fi |
5476a9a4 GM |
12237 | rm -f core conftest.err conftest.$ac_objext \ |
12238 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 12239 | fi |
067d23c9 | 12240 | |
5476a9a4 GM |
12241 | if test $emacs_cv_xaw = yes; then |
12242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
12243 | $as_echo "yes; using Lucid toolkit" >&6; } | |
12244 | USE_X_TOOLKIT=LUCID | |
12245 | LUCID_LIBW=-lXaw | |
12246 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
12247 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 | |
f199cab1 | 12248 | else |
5476a9a4 GM |
12249 | as_fn_error "No X toolkit could be found. |
12250 | If you are sure you want Emacs compiled without an X toolkit, pass | |
12251 | --with-x-toolkit=no | |
12252 | to configure. Otherwise, install the development libraries for the toolkit | |
12253 | that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 | |
f199cab1 | 12254 | fi |
5476a9a4 GM |
12255 | fi |
12256 | fi | |
067d23c9 | 12257 | |
5476a9a4 | 12258 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
067d23c9 | 12259 | |
5476a9a4 GM |
12260 | LIBXTR6= |
12261 | if test "${USE_X_TOOLKIT}" != "none"; then | |
12262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
12263 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
12264 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : | |
f199cab1 GM |
12265 | $as_echo_n "(cached) " >&6 |
12266 | else | |
5476a9a4 | 12267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 12268 | /* end confdefs.h. */ |
5476a9a4 | 12269 | #include <X11/Intrinsic.h> |
f199cab1 GM |
12270 | int |
12271 | main () | |
12272 | { | |
5476a9a4 GM |
12273 | #if XtSpecificationRelease < 6 |
12274 | fail; | |
12275 | #endif | |
f527bd02 | 12276 | |
f199cab1 GM |
12277 | ; |
12278 | return 0; | |
12279 | } | |
067d23c9 | 12280 | _ACEOF |
5476a9a4 GM |
12281 | if ac_fn_c_try_link "$LINENO"; then : |
12282 | emacs_cv_x11_toolkit_version_6=yes | |
12283 | else | |
12284 | emacs_cv_x11_toolkit_version_6=no | |
067d23c9 | 12285 | fi |
5476a9a4 GM |
12286 | rm -f core conftest.err conftest.$ac_objext \ |
12287 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 KY |
12288 | fi |
12289 | ||
5476a9a4 GM |
12290 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
12291 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
12292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
12293 | $as_echo "6 or newer" >&6; } | |
f527bd02 | 12294 | |
5476a9a4 | 12295 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h |
f527bd02 | 12296 | |
5476a9a4 GM |
12297 | LIBXTR6="-lSM -lICE" |
12298 | case "$opsys" in | |
12299 | ## Use libw.a along with X11R6 Xt. | |
12300 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
12301 | esac | |
12302 | else | |
12303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
12304 | $as_echo "before 6" >&6; } | |
f199cab1 | 12305 | fi |
f527bd02 | 12306 | |
5476a9a4 GM |
12307 | OLDLIBS="$LIBS" |
12308 | if test x$HAVE_X11XTR6 = xyes; then | |
12309 | LIBS="-lXt -lSM -lICE $LIBS" | |
12310 | else | |
12311 | LIBS="-lXt $LIBS" | |
12312 | fi | |
12313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
12314 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
12315 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : | |
12316 | $as_echo_n "(cached) " >&6 | |
12317 | else | |
12318 | ac_check_lib_save_LIBS=$LIBS | |
12319 | LIBS="-lXmu $LIBS" | |
12320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12321 | /* end confdefs.h. */ | |
f199cab1 | 12322 | |
5476a9a4 GM |
12323 | /* Override any GCC internal prototype to avoid an error. |
12324 | Use char because int might match the return type of a GCC | |
12325 | builtin and then its argument prototype would still apply. */ | |
12326 | #ifdef __cplusplus | |
12327 | extern "C" | |
12328 | #endif | |
12329 | char XmuConvertStandardSelection (); | |
067d23c9 KY |
12330 | int |
12331 | main () | |
12332 | { | |
5476a9a4 | 12333 | return XmuConvertStandardSelection (); |
067d23c9 KY |
12334 | ; |
12335 | return 0; | |
12336 | } | |
12337 | _ACEOF | |
5476a9a4 GM |
12338 | if ac_fn_c_try_link "$LINENO"; then : |
12339 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
12340 | else | |
12341 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
067d23c9 | 12342 | fi |
5476a9a4 GM |
12343 | rm -f core conftest.err conftest.$ac_objext \ |
12344 | conftest$ac_exeext conftest.$ac_ext | |
12345 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 12346 | fi |
5476a9a4 GM |
12347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 |
12348 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
12349 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : | |
12350 | cat >>confdefs.h <<_ACEOF | |
12351 | #define HAVE_LIBXMU 1 | |
f199cab1 GM |
12352 | _ACEOF |
12353 | ||
5476a9a4 | 12354 | LIBS="-lXmu $LIBS" |
f199cab1 | 12355 | |
067d23c9 KY |
12356 | fi |
12357 | ||
5476a9a4 GM |
12358 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
12359 | fi | |
067d23c9 | 12360 | |
067d23c9 | 12361 | |
5476a9a4 GM |
12362 | LIBXMU=-lXmu |
12363 | case $opsys in | |
12364 | ## These systems don't supply Xmu. | |
12365 | hpux* | aix4-2 ) | |
12366 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
12367 | ;; | |
7c61eaab GM |
12368 | mingw32 ) |
12369 | LIBXMU= | |
12370 | ;; | |
5476a9a4 | 12371 | esac |
067d23c9 KY |
12372 | |
12373 | ||
5476a9a4 GM |
12374 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. |
12375 | if test "${HAVE_X11}" = "yes"; then | |
12376 | if test "${USE_X_TOOLKIT}" != "none"; then | |
12377 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
12378 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
12379 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : | |
f199cab1 GM |
12380 | $as_echo_n "(cached) " >&6 |
12381 | else | |
5476a9a4 GM |
12382 | ac_check_lib_save_LIBS=$LIBS |
12383 | LIBS="-lXext $LIBS" | |
12384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 12385 | /* end confdefs.h. */ |
f199cab1 | 12386 | |
5476a9a4 GM |
12387 | /* Override any GCC internal prototype to avoid an error. |
12388 | Use char because int might match the return type of a GCC | |
12389 | builtin and then its argument prototype would still apply. */ | |
12390 | #ifdef __cplusplus | |
12391 | extern "C" | |
12392 | #endif | |
12393 | char XShapeQueryExtension (); | |
12394 | int | |
12395 | main () | |
12396 | { | |
12397 | return XShapeQueryExtension (); | |
12398 | ; | |
12399 | return 0; | |
12400 | } | |
e7d4e61f | 12401 | _ACEOF |
5476a9a4 GM |
12402 | if ac_fn_c_try_link "$LINENO"; then : |
12403 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
12404 | else | |
12405 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
067d23c9 | 12406 | fi |
5476a9a4 GM |
12407 | rm -f core conftest.err conftest.$ac_objext \ |
12408 | conftest$ac_exeext conftest.$ac_ext | |
12409 | LIBS=$ac_check_lib_save_LIBS | |
12410 | fi | |
12411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
12412 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
12413 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : | |
12414 | cat >>confdefs.h <<_ACEOF | |
12415 | #define HAVE_LIBXEXT 1 | |
12416 | _ACEOF | |
f199cab1 | 12417 | |
5476a9a4 | 12418 | LIBS="-lXext $LIBS" |
f199cab1 | 12419 | |
5476a9a4 | 12420 | fi |
f199cab1 | 12421 | |
5476a9a4 GM |
12422 | fi |
12423 | fi | |
f199cab1 | 12424 | |
5476a9a4 GM |
12425 | LIBXP= |
12426 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
8ad96b1d GM |
12427 | # OpenMotif may be installed in such a way on some GNU/Linux systems. |
12428 | if test -d /usr/include/openmotif; then | |
12429 | CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS" | |
12430 | emacs_cv_openmotif=yes | |
12431 | case "$canonical" in | |
12432 | x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) | |
12433 | test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS" | |
12434 | ;; | |
12435 | *) | |
12436 | test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS" | |
12437 | esac | |
12438 | else | |
12439 | emacs_cv_openmotif=no | |
12440 | fi | |
12441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5 | |
12442 | $as_echo_n "checking for (Open)Motif version 2.1... " >&6; } | |
5476a9a4 | 12443 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
ae1362a3 AS |
12444 | $as_echo_n "(cached) " >&6 |
12445 | else | |
f199cab1 GM |
12446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12447 | /* end confdefs.h. */ | |
5476a9a4 GM |
12448 | #include <Xm/Xm.h> |
12449 | int | |
12450 | main () | |
12451 | { | |
12452 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
12453 | int x = 5; | |
12454 | #else | |
12455 | Motif version prior to 2.1. | |
12456 | #endif | |
12457 | ; | |
12458 | return 0; | |
12459 | } | |
12460 | _ACEOF | |
12461 | if ac_fn_c_try_compile "$LINENO"; then : | |
12462 | emacs_cv_motif_version_2_1=yes | |
12463 | else | |
12464 | emacs_cv_motif_version_2_1=no | |
12465 | fi | |
12466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12467 | fi | |
12468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
12469 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
12470 | if test $emacs_cv_motif_version_2_1 = yes; then | |
12471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
12472 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
12473 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : | |
12474 | $as_echo_n "(cached) " >&6 | |
12475 | else | |
12476 | ac_check_lib_save_LIBS=$LIBS | |
12477 | LIBS="-lXp $LIBS" | |
12478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12479 | /* end confdefs.h. */ | |
f199cab1 | 12480 | |
5476a9a4 GM |
12481 | /* Override any GCC internal prototype to avoid an error. |
12482 | Use char because int might match the return type of a GCC | |
12483 | builtin and then its argument prototype would still apply. */ | |
12484 | #ifdef __cplusplus | |
12485 | extern "C" | |
12486 | #endif | |
12487 | char XpCreateContext (); | |
ae1362a3 AS |
12488 | int |
12489 | main () | |
12490 | { | |
5476a9a4 | 12491 | return XpCreateContext (); |
ae1362a3 AS |
12492 | ; |
12493 | return 0; | |
12494 | } | |
12495 | _ACEOF | |
5476a9a4 GM |
12496 | if ac_fn_c_try_link "$LINENO"; then : |
12497 | ac_cv_lib_Xp_XpCreateContext=yes | |
067d23c9 | 12498 | else |
5476a9a4 | 12499 | ac_cv_lib_Xp_XpCreateContext=no |
067d23c9 | 12500 | fi |
5476a9a4 GM |
12501 | rm -f core conftest.err conftest.$ac_objext \ |
12502 | conftest$ac_exeext conftest.$ac_ext | |
12503 | LIBS=$ac_check_lib_save_LIBS | |
12504 | fi | |
12505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
12506 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
12507 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : | |
12508 | LIBXP=-lXp | |
067d23c9 | 12509 | fi |
f199cab1 | 12510 | |
8ad96b1d GM |
12511 | if test x$emacs_cv_openmotif = xyes; then |
12512 | REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS" | |
12513 | fi | |
5476a9a4 GM |
12514 | else |
12515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
12516 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
12517 | if test "${emacs_cv_lesstif+set}" = set; then : | |
067d23c9 | 12518 | $as_echo_n "(cached) " >&6 |
f199cab1 | 12519 | else |
5476a9a4 GM |
12520 | # We put this in CFLAGS temporarily to precede other -I options |
12521 | # that might be in CFLAGS temporarily. | |
12522 | # We put this in CPPFLAGS where it precedes the other -I options. | |
12523 | OLD_CPPFLAGS=$CPPFLAGS | |
12524 | OLD_CFLAGS=$CFLAGS | |
12525 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
12526 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
12527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12528 | /* end confdefs.h. */ |
5476a9a4 | 12529 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> |
067d23c9 KY |
12530 | int |
12531 | main () | |
12532 | { | |
5476a9a4 | 12533 | int x = 5; |
067d23c9 KY |
12534 | ; |
12535 | return 0; | |
12536 | } | |
12537 | _ACEOF | |
5476a9a4 GM |
12538 | if ac_fn_c_try_compile "$LINENO"; then : |
12539 | emacs_cv_lesstif=yes | |
067d23c9 | 12540 | else |
5476a9a4 | 12541 | emacs_cv_lesstif=no |
067d23c9 | 12542 | fi |
5476a9a4 | 12543 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 12544 | fi |
5476a9a4 GM |
12545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 |
12546 | $as_echo "$emacs_cv_lesstif" >&6; } | |
12547 | if test $emacs_cv_lesstif = yes; then | |
12548 | # Make sure this -I option remains in CPPFLAGS after it is set | |
12549 | # back to REAL_CPPFLAGS. | |
12550 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
12551 | # have those other -I options anyway. Ultimately, having this | |
12552 | # directory ultimately in CPPFLAGS will be enough. | |
12553 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
12554 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
12555 | else | |
12556 | CFLAGS=$OLD_CFLAGS | |
12557 | CPPFLAGS=$OLD_CPPFLAGS | |
12558 | fi | |
12559 | fi | |
12560 | ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default" | |
12561 | if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then : | |
067d23c9 | 12562 | |
5476a9a4 GM |
12563 | else |
12564 | as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5 | |
067d23c9 | 12565 | fi |
f199cab1 GM |
12566 | |
12567 | ||
5476a9a4 | 12568 | fi |
f199cab1 GM |
12569 | |
12570 | ||
5476a9a4 GM |
12571 | USE_TOOLKIT_SCROLL_BARS=no |
12572 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
12573 | if test "${USE_X_TOOLKIT}" != "none"; then | |
12574 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
12575 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12576 | |
5476a9a4 GM |
12577 | HAVE_XAW3D=no |
12578 | USE_TOOLKIT_SCROLL_BARS=yes | |
12579 | elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then | |
12580 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12581 | |
5476a9a4 GM |
12582 | USE_TOOLKIT_SCROLL_BARS=yes |
12583 | fi | |
12584 | elif test "${HAVE_GTK}" = "yes"; then | |
12585 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12586 | |
5476a9a4 GM |
12587 | USE_TOOLKIT_SCROLL_BARS=yes |
12588 | elif test "${HAVE_NS}" = "yes"; then | |
12589 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12590 | |
5c0255d9 GM |
12591 | USE_TOOLKIT_SCROLL_BARS=yes |
12592 | elif test "${HAVE_W32}" = "yes"; then | |
12593 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
12594 | ||
5476a9a4 GM |
12595 | USE_TOOLKIT_SCROLL_BARS=yes |
12596 | fi | |
12597 | fi | |
f199cab1 | 12598 | |
5476a9a4 | 12599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 12600 | /* end confdefs.h. */ |
5476a9a4 GM |
12601 | |
12602 | #include <X11/Xlib.h> | |
12603 | #include <X11/Xresource.h> | |
067d23c9 KY |
12604 | int |
12605 | main () | |
12606 | { | |
5476a9a4 | 12607 | XIMProc callback; |
067d23c9 KY |
12608 | ; |
12609 | return 0; | |
12610 | } | |
12611 | _ACEOF | |
f199cab1 | 12612 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 GM |
12613 | HAVE_XIM=yes |
12614 | ||
12615 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
12616 | ||
067d23c9 | 12617 | else |
5476a9a4 | 12618 | HAVE_XIM=no |
067d23c9 | 12619 | fi |
f199cab1 | 12620 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 12621 | |
f199cab1 | 12622 | |
5476a9a4 GM |
12623 | if test "${with_xim}" != "no"; then |
12624 | ||
12625 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
12626 | ||
12627 | fi | |
12628 | ||
12629 | ||
12630 | if test "${HAVE_XIM}" != "no"; then | |
12631 | late_CFLAGS=$CFLAGS | |
12632 | if test "$GCC" = yes; then | |
12633 | CFLAGS="$CFLAGS --pedantic-errors" | |
12634 | fi | |
12635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12636 | /* end confdefs.h. */ | |
f199cab1 | 12637 | |
5476a9a4 GM |
12638 | #include <X11/Xlib.h> |
12639 | #include <X11/Xresource.h> | |
12640 | int | |
12641 | main () | |
12642 | { | |
12643 | Display *display; | |
12644 | XrmDatabase db; | |
12645 | char *res_name; | |
12646 | char *res_class; | |
12647 | XIMProc callback; | |
12648 | XPointer *client_data; | |
12649 | #ifndef __GNUC__ | |
12650 | /* If we're not using GCC, it's probably not XFree86, and this is | |
12651 | probably right, but we can't use something like --pedantic-errors. */ | |
12652 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
12653 | char*, XIMProc, XPointer*); | |
12654 | #endif | |
12655 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
12656 | client_data); | |
067d23c9 KY |
12657 | ; |
12658 | return 0; | |
12659 | } | |
12660 | _ACEOF | |
5476a9a4 GM |
12661 | if ac_fn_c_try_compile "$LINENO"; then : |
12662 | emacs_cv_arg6_star=yes | |
067d23c9 | 12663 | fi |
f199cab1 | 12664 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
12665 | if test "$emacs_cv_arg6_star" = yes; then |
12666 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
12667 | ||
12668 | else | |
12669 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
067d23c9 | 12670 | |
5476a9a4 GM |
12671 | fi |
12672 | CFLAGS=$late_CFLAGS | |
067d23c9 KY |
12673 | fi |
12674 | ||
5476a9a4 GM |
12675 | ### Start of font-backend (under any platform) section. |
12676 | # (nothing here yet -- this is a placeholder) | |
12677 | ### End of font-backend (under any platform) section. | |
067d23c9 | 12678 | |
5476a9a4 GM |
12679 | ### Start of font-backend (under X11) section. |
12680 | if test "${HAVE_X11}" = "yes"; then | |
067d23c9 | 12681 | |
5476a9a4 | 12682 | succeeded=no |
067d23c9 | 12683 | |
5476a9a4 GM |
12684 | if test "$PKG_CONFIG" = "no" ; then |
12685 | HAVE_FC=no | |
12686 | else | |
12687 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12688 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 |
12690 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
f199cab1 | 12691 | |
b5591ebb GM |
12692 | if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 && |
12693 | FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` && | |
12694 | FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then | |
5476a9a4 GM |
12695 | edit_cflags=" |
12696 | s,///*,/,g | |
12697 | s/^/ / | |
12698 | s/ -I/ $isystem/g | |
12699 | s/^ // | |
12700 | " | |
12701 | FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` | |
12702 | FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` | |
12703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 | |
12704 | $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } | |
12705 | succeeded=yes | |
12706 | else | |
12707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12708 | $as_echo "no" >&6; } | |
12709 | FONTCONFIG_CFLAGS="" | |
12710 | FONTCONFIG_LIBS="" | |
12711 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12712 | ## do set a variable so people can do so. Do it in a subshell |
12713 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12714 | FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1` |
f199cab1 | 12715 | |
5476a9a4 | 12716 | fi |
f199cab1 GM |
12717 | |
12718 | ||
12719 | ||
f199cab1 | 12720 | else |
5476a9a4 GM |
12721 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
12722 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12723 | fi | |
12724 | fi | |
f199cab1 | 12725 | |
5476a9a4 GM |
12726 | if test $succeeded = yes; then |
12727 | HAVE_FC=yes | |
12728 | else | |
12729 | HAVE_FC=no | |
12730 | fi | |
f199cab1 | 12731 | |
067d23c9 | 12732 | |
5476a9a4 GM |
12733 | ## Use -lXft if available, unless `--with-xft=no'. |
12734 | HAVE_XFT=maybe | |
12735 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
12736 | with_xft="no"; | |
12737 | fi | |
12738 | if test "x${with_xft}" != "xno"; then | |
f199cab1 | 12739 | |
f199cab1 | 12740 | |
5476a9a4 | 12741 | succeeded=no |
f199cab1 | 12742 | |
5476a9a4 GM |
12743 | if test "$PKG_CONFIG" = "no" ; then |
12744 | HAVE_XFT=no | |
12745 | else | |
12746 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12747 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 |
12749 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
f199cab1 | 12750 | |
b5591ebb GM |
12751 | if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 && |
12752 | XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` && | |
12753 | XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then | |
5476a9a4 GM |
12754 | edit_cflags=" |
12755 | s,///*,/,g | |
12756 | s/^/ / | |
12757 | s/ -I/ $isystem/g | |
12758 | s/^ // | |
12759 | " | |
12760 | XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` | |
12761 | XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` | |
12762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 | |
12763 | $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } | |
12764 | succeeded=yes | |
12765 | else | |
12766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12767 | $as_echo "no" >&6; } | |
12768 | XFT_CFLAGS="" | |
12769 | XFT_LIBS="" | |
12770 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12771 | ## do set a variable so people can do so. Do it in a subshell |
12772 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12773 | XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1` |
f199cab1 | 12774 | |
5476a9a4 | 12775 | fi |
f199cab1 GM |
12776 | |
12777 | ||
12778 | ||
5476a9a4 GM |
12779 | else |
12780 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12781 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12782 | fi | |
12783 | fi | |
f199cab1 | 12784 | |
5476a9a4 GM |
12785 | if test $succeeded = yes; then |
12786 | : | |
f199cab1 | 12787 | else |
5476a9a4 | 12788 | HAVE_XFT=no |
f199cab1 GM |
12789 | fi |
12790 | ||
5476a9a4 GM |
12791 | ## Because xftfont.c uses XRenderQueryExtension, we also |
12792 | ## need to link to -lXrender. | |
12793 | HAVE_XRENDER=no | |
12794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
12795 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
12796 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : | |
12797 | $as_echo_n "(cached) " >&6 | |
12798 | else | |
12799 | ac_check_lib_save_LIBS=$LIBS | |
12800 | LIBS="-lXrender $LIBS" | |
12801 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12802 | /* end confdefs.h. */ | |
f199cab1 | 12803 | |
5476a9a4 GM |
12804 | /* Override any GCC internal prototype to avoid an error. |
12805 | Use char because int might match the return type of a GCC | |
12806 | builtin and then its argument prototype would still apply. */ | |
12807 | #ifdef __cplusplus | |
12808 | extern "C" | |
12809 | #endif | |
12810 | char XRenderQueryExtension (); | |
12811 | int | |
12812 | main () | |
12813 | { | |
12814 | return XRenderQueryExtension (); | |
12815 | ; | |
12816 | return 0; | |
12817 | } | |
12818 | _ACEOF | |
12819 | if ac_fn_c_try_link "$LINENO"; then : | |
12820 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
12821 | else | |
12822 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
12823 | fi | |
12824 | rm -f core conftest.err conftest.$ac_objext \ | |
12825 | conftest$ac_exeext conftest.$ac_ext | |
12826 | LIBS=$ac_check_lib_save_LIBS | |
12827 | fi | |
12828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
12829 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
12830 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : | |
12831 | HAVE_XRENDER=yes | |
12832 | fi | |
f199cab1 | 12833 | |
5476a9a4 GM |
12834 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then |
12835 | OLD_CPPFLAGS="$CPPFLAGS" | |
12836 | OLD_CFLAGS="$CFLAGS" | |
12837 | OLD_LIBS="$LIBS" | |
12838 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
12839 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
12840 | XFT_LIBS="-lXrender $XFT_LIBS" | |
12841 | LIBS="$XFT_LIBS $LIBS" | |
46f74982 GM |
12842 | ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h> |
12843 | " | |
5476a9a4 GM |
12844 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : |
12845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 | |
12846 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
12847 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : | |
12848 | $as_echo_n "(cached) " >&6 | |
12849 | else | |
12850 | ac_check_lib_save_LIBS=$LIBS | |
12851 | LIBS="-lXft $XFT_LIBS $LIBS" | |
12852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12853 | /* end confdefs.h. */ | |
f199cab1 | 12854 | |
5476a9a4 GM |
12855 | /* Override any GCC internal prototype to avoid an error. |
12856 | Use char because int might match the return type of a GCC | |
12857 | builtin and then its argument prototype would still apply. */ | |
12858 | #ifdef __cplusplus | |
12859 | extern "C" | |
12860 | #endif | |
12861 | char XftFontOpen (); | |
12862 | int | |
12863 | main () | |
12864 | { | |
12865 | return XftFontOpen (); | |
12866 | ; | |
12867 | return 0; | |
12868 | } | |
067d23c9 | 12869 | _ACEOF |
5476a9a4 GM |
12870 | if ac_fn_c_try_link "$LINENO"; then : |
12871 | ac_cv_lib_Xft_XftFontOpen=yes | |
12872 | else | |
12873 | ac_cv_lib_Xft_XftFontOpen=no | |
12874 | fi | |
12875 | rm -f core conftest.err conftest.$ac_objext \ | |
12876 | conftest$ac_exeext conftest.$ac_ext | |
12877 | LIBS=$ac_check_lib_save_LIBS | |
12878 | fi | |
12879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
12880 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
12881 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : | |
12882 | HAVE_XFT=yes | |
f199cab1 GM |
12883 | fi |
12884 | ||
5476a9a4 | 12885 | fi |
f199cab1 GM |
12886 | |
12887 | ||
f199cab1 | 12888 | |
5476a9a4 | 12889 | if test "${HAVE_XFT}" = "yes"; then |
f199cab1 | 12890 | |
5476a9a4 | 12891 | $as_echo "#define HAVE_XFT 1" >>confdefs.h |
f199cab1 | 12892 | |
067d23c9 | 12893 | |
5476a9a4 GM |
12894 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" |
12895 | else | |
12896 | CPPFLAGS="$OLD_CPPFLAGS" | |
12897 | CFLAGS="$OLD_CFLAGS" | |
12898 | LIBS="$OLD_LIBS" | |
12899 | fi # "${HAVE_XFT}" = "yes" | |
12900 | fi # "$HAVE_XFT" != no | |
12901 | fi # "x${with_xft}" != "xno" | |
f199cab1 | 12902 | |
5476a9a4 GM |
12903 | ## We used to allow building with FreeType and without Xft. |
12904 | ## However, the ftx font backend driver is not in good shape. | |
12905 | if test "$HAVE_XFT" != "yes"; then | |
12906 | HAVE_XFT=no | |
12907 | HAVE_FREETYPE=no | |
12908 | else | |
f199cab1 | 12909 | |
5476a9a4 | 12910 | succeeded=no |
f199cab1 | 12911 | |
5476a9a4 GM |
12912 | if test "$PKG_CONFIG" = "no" ; then |
12913 | HAVE_FREETYPE=no | |
12914 | else | |
12915 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12916 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 |
12918 | $as_echo_n "checking for freetype2... " >&6; } | |
f199cab1 | 12919 | |
b5591ebb GM |
12920 | if "$PKG_CONFIG" --exists "freetype2" 2>&5 && |
12921 | FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` && | |
12922 | FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then | |
5476a9a4 GM |
12923 | edit_cflags=" |
12924 | s,///*,/,g | |
12925 | s/^/ / | |
12926 | s/ -I/ $isystem/g | |
12927 | s/^ // | |
12928 | " | |
12929 | FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` | |
12930 | FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` | |
12931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 | |
12932 | $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } | |
12933 | succeeded=yes | |
12934 | else | |
12935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12936 | $as_echo "no" >&6; } | |
12937 | FREETYPE_CFLAGS="" | |
12938 | FREETYPE_LIBS="" | |
12939 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12940 | ## do set a variable so people can do so. Do it in a subshell |
12941 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12942 | FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1` |
f199cab1 | 12943 | |
5476a9a4 | 12944 | fi |
f199cab1 | 12945 | |
f199cab1 | 12946 | |
067d23c9 | 12947 | |
5476a9a4 GM |
12948 | else |
12949 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12950 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12951 | fi | |
067d23c9 | 12952 | fi |
f199cab1 | 12953 | |
5476a9a4 GM |
12954 | if test $succeeded = yes; then |
12955 | HAVE_FREETYPE=yes | |
12956 | else | |
12957 | HAVE_FREETYPE=no | |
12958 | fi | |
f199cab1 | 12959 | |
f199cab1 | 12960 | |
5476a9a4 GM |
12961 | test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 |
12962 | fi | |
f199cab1 | 12963 | |
5476a9a4 GM |
12964 | HAVE_LIBOTF=no |
12965 | if test "${HAVE_FREETYPE}" = "yes"; then | |
f199cab1 | 12966 | |
5476a9a4 | 12967 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h |
f199cab1 | 12968 | |
5476a9a4 | 12969 | if test "${with_libotf}" != "no"; then |
f199cab1 | 12970 | |
5476a9a4 | 12971 | succeeded=no |
f199cab1 | 12972 | |
5476a9a4 GM |
12973 | if test "$PKG_CONFIG" = "no" ; then |
12974 | HAVE_LIBOTF=no | |
12975 | else | |
12976 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12977 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 |
12979 | $as_echo_n "checking for libotf... " >&6; } | |
f199cab1 | 12980 | |
b5591ebb GM |
12981 | if "$PKG_CONFIG" --exists "libotf" 2>&5 && |
12982 | LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` && | |
12983 | LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then | |
5476a9a4 GM |
12984 | edit_cflags=" |
12985 | s,///*,/,g | |
12986 | s/^/ / | |
12987 | s/ -I/ $isystem/g | |
12988 | s/^ // | |
12989 | " | |
12990 | LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` | |
12991 | LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` | |
12992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 | |
12993 | $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } | |
12994 | succeeded=yes | |
12995 | else | |
12996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12997 | $as_echo "no" >&6; } | |
12998 | LIBOTF_CFLAGS="" | |
12999 | LIBOTF_LIBS="" | |
13000 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
13001 | ## do set a variable so people can do so. Do it in a subshell |
13002 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 13003 | LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1` |
067d23c9 | 13004 | |
5476a9a4 | 13005 | fi |
f199cab1 GM |
13006 | |
13007 | ||
067d23c9 | 13008 | |
5476a9a4 GM |
13009 | else |
13010 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
13011 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
13012 | fi | |
13013 | fi | |
f199cab1 | 13014 | |
5476a9a4 GM |
13015 | if test $succeeded = yes; then |
13016 | HAVE_LIBOTF=yes | |
13017 | else | |
13018 | HAVE_LIBOTF=no | |
13019 | fi | |
f199cab1 | 13020 | |
5476a9a4 | 13021 | if test "$HAVE_LIBOTF" = "yes"; then |
f199cab1 | 13022 | |
5476a9a4 | 13023 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h |
f199cab1 | 13024 | |
5476a9a4 GM |
13025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 |
13026 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
13027 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : | |
067d23c9 KY |
13028 | $as_echo_n "(cached) " >&6 |
13029 | else | |
5476a9a4 GM |
13030 | ac_check_lib_save_LIBS=$LIBS |
13031 | LIBS="-lotf $LIBS" | |
13032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13033 | /* end confdefs.h. */ |
5476a9a4 GM |
13034 | |
13035 | /* Override any GCC internal prototype to avoid an error. | |
13036 | Use char because int might match the return type of a GCC | |
13037 | builtin and then its argument prototype would still apply. */ | |
13038 | #ifdef __cplusplus | |
13039 | extern "C" | |
13040 | #endif | |
13041 | char OTF_get_variation_glyphs (); | |
067d23c9 KY |
13042 | int |
13043 | main () | |
13044 | { | |
5476a9a4 | 13045 | return OTF_get_variation_glyphs (); |
067d23c9 KY |
13046 | ; |
13047 | return 0; | |
13048 | } | |
13049 | _ACEOF | |
5476a9a4 GM |
13050 | if ac_fn_c_try_link "$LINENO"; then : |
13051 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
067d23c9 | 13052 | else |
5476a9a4 | 13053 | ac_cv_lib_otf_OTF_get_variation_glyphs=no |
067d23c9 | 13054 | fi |
5476a9a4 GM |
13055 | rm -f core conftest.err conftest.$ac_objext \ |
13056 | conftest$ac_exeext conftest.$ac_ext | |
13057 | LIBS=$ac_check_lib_save_LIBS | |
13058 | fi | |
13059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
13060 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
13061 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : | |
13062 | HAVE_OTF_GET_VARIATION_GLYPHS=yes | |
13063 | else | |
13064 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
067d23c9 | 13065 | fi |
067d23c9 | 13066 | |
5476a9a4 GM |
13067 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then |
13068 | ||
13069 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
13070 | ||
13071 | fi | |
13072 | fi | |
13073 | fi | |
13074 | fi | |
13075 | ||
13076 | HAVE_M17N_FLT=no | |
13077 | if test "${HAVE_LIBOTF}" = yes; then | |
13078 | if test "${with_m17n_flt}" != "no"; then | |
13079 | ||
13080 | succeeded=no | |
13081 | ||
13082 | if test "$PKG_CONFIG" = "no" ; then | |
13083 | HAVE_M17N_FLT=no | |
13084 | else | |
13085 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 13086 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
13087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 |
13088 | $as_echo_n "checking for m17n-flt... " >&6; } | |
13089 | ||
b5591ebb GM |
13090 | if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 && |
13091 | M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` && | |
13092 | M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then | |
5476a9a4 GM |
13093 | edit_cflags=" |
13094 | s,///*,/,g | |
13095 | s/^/ / | |
13096 | s/ -I/ $isystem/g | |
13097 | s/^ // | |
13098 | " | |
13099 | M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` | |
13100 | M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` | |
13101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 | |
13102 | $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } | |
13103 | succeeded=yes | |
13104 | else | |
13105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13106 | $as_echo "no" >&6; } | |
13107 | M17N_FLT_CFLAGS="" | |
13108 | M17N_FLT_LIBS="" | |
13109 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
13110 | ## do set a variable so people can do so. Do it in a subshell |
13111 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 13112 | M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1` |
5476a9a4 GM |
13113 | |
13114 | fi | |
13115 | ||
13116 | ||
067d23c9 | 13117 | |
5476a9a4 GM |
13118 | else |
13119 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
13120 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
13121 | fi | |
f199cab1 | 13122 | fi |
067d23c9 | 13123 | |
5476a9a4 GM |
13124 | if test $succeeded = yes; then |
13125 | HAVE_M17N_FLT=yes | |
13126 | else | |
13127 | HAVE_M17N_FLT=no | |
13128 | fi | |
13129 | ||
13130 | if test "$HAVE_M17N_FLT" = "yes"; then | |
13131 | ||
13132 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
13133 | ||
13134 | fi | |
13135 | fi | |
13136 | fi | |
13137 | else | |
13138 | HAVE_XFT=no | |
13139 | HAVE_FREETYPE=no | |
13140 | HAVE_LIBOTF=no | |
13141 | HAVE_M17N_FLT=no | |
13142 | fi | |
13143 | ||
13144 | ### End of font-backend (under X11) section. | |
13145 | ||
13146 | ||
067d23c9 | 13147 | |
067d23c9 | 13148 | |
5476a9a4 GM |
13149 | |
13150 | ||
13151 | ||
13152 | ||
13153 | ||
13154 | ||
13155 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
7c61eaab | 13156 | ### mingw32 doesn't use -lXpm, since it loads the library dynamically. |
5476a9a4 GM |
13157 | HAVE_XPM=no |
13158 | LIBXPM= | |
7c61eaab | 13159 | if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then |
5c0255d9 GM |
13160 | if test "${with_xpm}" != "no"; then |
13161 | SAVE_CPPFLAGS="$CPPFLAGS" | |
13162 | SAVE_LDFLAGS="$LDFLAGS" | |
13163 | CPPFLAGS="$CPPFLAGS -I/usr/include/noX" | |
13164 | LDFLAGS="$LDFLAGS -L/usr/lib/noX" | |
13165 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
13166 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
13167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5 | |
13168 | $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; } | |
13169 | if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then : | |
13170 | $as_echo_n "(cached) " >&6 | |
13171 | else | |
13172 | ac_check_lib_save_LIBS=$LIBS | |
13173 | LIBS="-lXpm $LIBS" | |
13174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13175 | /* end confdefs.h. */ | |
13176 | ||
13177 | /* Override any GCC internal prototype to avoid an error. | |
13178 | Use char because int might match the return type of a GCC | |
13179 | builtin and then its argument prototype would still apply. */ | |
13180 | #ifdef __cplusplus | |
13181 | extern "C" | |
13182 | #endif | |
13183 | char XpmReadFileToImage (); | |
13184 | int | |
13185 | main () | |
13186 | { | |
13187 | return XpmReadFileToImage (); | |
13188 | ; | |
13189 | return 0; | |
13190 | } | |
13191 | _ACEOF | |
13192 | if ac_fn_c_try_link "$LINENO"; then : | |
13193 | ac_cv_lib_Xpm_XpmReadFileToImage=yes | |
13194 | else | |
13195 | ac_cv_lib_Xpm_XpmReadFileToImage=no | |
13196 | fi | |
13197 | rm -f core conftest.err conftest.$ac_objext \ | |
13198 | conftest$ac_exeext conftest.$ac_ext | |
13199 | LIBS=$ac_check_lib_save_LIBS | |
13200 | fi | |
13201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5 | |
13202 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; } | |
13203 | if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then : | |
13204 | HAVE_XPM=yes | |
13205 | fi | |
13206 | ||
13207 | fi | |
13208 | ||
13209 | ||
13210 | if test "${HAVE_XPM}" = "yes"; then | |
13211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
13212 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
13213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13214 | /* end confdefs.h. */ | |
13215 | #include "X11/xpm.h" | |
13216 | #ifndef XpmReturnAllocPixels | |
13217 | no_return_alloc_pixels | |
13218 | #endif | |
13219 | ||
13220 | _ACEOF | |
13221 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13222 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
13223 | HAVE_XPM=no | |
13224 | else | |
13225 | HAVE_XPM=yes | |
13226 | fi | |
13227 | rm -f conftest* | |
13228 | ||
13229 | ||
13230 | if test "${HAVE_XPM}" = "yes"; then | |
13231 | REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX" | |
13232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
13233 | $as_echo "yes" >&6; } | |
13234 | else | |
13235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13236 | $as_echo "no" >&6; } | |
13237 | CPPFLAGS="$SAVE_CPPFLAGS" | |
13238 | LDFLAGS="$SAVE_LDFLAGS" | |
13239 | fi | |
13240 | fi | |
13241 | fi | |
13242 | ||
13243 | if test "${HAVE_XPM}" = "yes"; then | |
13244 | ||
13245 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
13246 | ||
13247 | LIBXPM=-lXpm | |
13248 | fi | |
13249 | fi | |
13250 | ||
5476a9a4 GM |
13251 | if test "${HAVE_X11}" = "yes"; then |
13252 | if test "${with_xpm}" != "no"; then | |
13253 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
13254 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
13255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 | |
13256 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
13257 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : | |
f199cab1 GM |
13258 | $as_echo_n "(cached) " >&6 |
13259 | else | |
5476a9a4 GM |
13260 | ac_check_lib_save_LIBS=$LIBS |
13261 | LIBS="-lXpm -lX11 $LIBS" | |
13262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13263 | /* end confdefs.h. */ |
13264 | ||
5476a9a4 GM |
13265 | /* Override any GCC internal prototype to avoid an error. |
13266 | Use char because int might match the return type of a GCC | |
13267 | builtin and then its argument prototype would still apply. */ | |
13268 | #ifdef __cplusplus | |
13269 | extern "C" | |
13270 | #endif | |
13271 | char XpmReadFileToPixmap (); | |
067d23c9 KY |
13272 | int |
13273 | main () | |
13274 | { | |
5476a9a4 | 13275 | return XpmReadFileToPixmap (); |
067d23c9 KY |
13276 | ; |
13277 | return 0; | |
13278 | } | |
13279 | _ACEOF | |
5476a9a4 GM |
13280 | if ac_fn_c_try_link "$LINENO"; then : |
13281 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
067d23c9 | 13282 | else |
5476a9a4 | 13283 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no |
067d23c9 | 13284 | fi |
5476a9a4 GM |
13285 | rm -f core conftest.err conftest.$ac_objext \ |
13286 | conftest$ac_exeext conftest.$ac_ext | |
13287 | LIBS=$ac_check_lib_save_LIBS | |
13288 | fi | |
13289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
13290 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
13291 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : | |
13292 | HAVE_XPM=yes | |
f199cab1 | 13293 | fi |
067d23c9 KY |
13294 | |
13295 | fi | |
13296 | ||
13297 | ||
5476a9a4 GM |
13298 | if test "${HAVE_XPM}" = "yes"; then |
13299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
13300 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
13301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13302 | /* end confdefs.h. */ | |
13303 | #include "X11/xpm.h" | |
13304 | #ifndef XpmReturnAllocPixels | |
13305 | no_return_alloc_pixels | |
13306 | #endif | |
067d23c9 | 13307 | |
067d23c9 | 13308 | _ACEOF |
5476a9a4 GM |
13309 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13310 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
13311 | HAVE_XPM=no | |
13312 | else | |
13313 | HAVE_XPM=yes | |
13314 | fi | |
13315 | rm -f conftest* | |
067d23c9 | 13316 | |
067d23c9 | 13317 | |
5476a9a4 GM |
13318 | if test "${HAVE_XPM}" = "yes"; then |
13319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
13320 | $as_echo "yes" >&6; } | |
13321 | else | |
13322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13323 | $as_echo "no" >&6; } | |
13324 | fi | |
13325 | fi | |
13326 | fi | |
067d23c9 | 13327 | |
5476a9a4 | 13328 | if test "${HAVE_XPM}" = "yes"; then |
067d23c9 | 13329 | |
5476a9a4 | 13330 | $as_echo "#define HAVE_XPM 1" >>confdefs.h |
067d23c9 | 13331 | |
5476a9a4 GM |
13332 | LIBXPM=-lXpm |
13333 | fi | |
067d23c9 KY |
13334 | fi |
13335 | ||
7c61eaab GM |
13336 | ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's |
13337 | ### slightly different requirements wrt image libraries (it doesn't | |
13338 | ### use -lXpm because it loads the xpm shared library dynamically at | |
13339 | ### run time). | |
13340 | if test "${opsys}" = "mingw32"; then | |
13341 | if test "${with_xpm}" != "no"; then | |
13342 | ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" " | |
13343 | #define FOR_MSW 1 | |
13344 | " | |
13345 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
13346 | HAVE_XPM=yes | |
13347 | else | |
13348 | HAVE_XPM=no | |
13349 | fi | |
13350 | ||
13351 | ||
13352 | fi | |
13353 | ||
13354 | if test "${HAVE_XPM}" = "yes"; then | |
13355 | ||
13356 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
13357 | ||
13358 | fi | |
13359 | fi | |
13360 | ||
f199cab1 | 13361 | |
5c0255d9 | 13362 | |
5476a9a4 | 13363 | ### Use -ljpeg if available, unless `--with-jpeg=no'. |
7c61eaab | 13364 | ### mingw32 doesn't use -ljpeg, since it loads the library dynamically. |
5476a9a4 GM |
13365 | HAVE_JPEG=no |
13366 | LIBJPEG= | |
7c61eaab GM |
13367 | if test "${opsys}" = "mingw32"; then |
13368 | if test "${with_jpeg}" != "no"; then | |
13369 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
13370 | if test "x$ac_cv_header_jerror_h" = x""yes; then : | |
13371 | HAVE_JPEG=yes | |
13372 | else | |
13373 | HAVE_JPEG=no | |
13374 | fi | |
13375 | ||
13376 | ||
13377 | fi | |
13378 | if test "${HAVE_JPEG}" = "yes"; then | |
13379 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
13380 | ||
13381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13382 | /* end confdefs.h. */ | |
13383 | #include <jpeglib.h> | |
13384 | version=JPEG_LIB_VERSION | |
13385 | ||
13386 | _ACEOF | |
13387 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13388 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
13389 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
13390 | ||
13391 | else | |
13392 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
13393 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
13394 | HAVE_JPEG=no | |
13395 | fi | |
13396 | rm -f conftest* | |
13397 | ||
13398 | fi | |
13399 | elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then | |
5476a9a4 GM |
13400 | if test "${with_jpeg}" != "no"; then |
13401 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
13402 | if test "x$ac_cv_header_jerror_h" = x""yes; then : | |
13403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 | |
13404 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
13405 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : | |
067d23c9 KY |
13406 | $as_echo_n "(cached) " >&6 |
13407 | else | |
5476a9a4 GM |
13408 | ac_check_lib_save_LIBS=$LIBS |
13409 | LIBS="-ljpeg $LIBS" | |
13410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 13411 | /* end confdefs.h. */ |
f199cab1 | 13412 | |
5476a9a4 GM |
13413 | /* Override any GCC internal prototype to avoid an error. |
13414 | Use char because int might match the return type of a GCC | |
13415 | builtin and then its argument prototype would still apply. */ | |
13416 | #ifdef __cplusplus | |
13417 | extern "C" | |
13418 | #endif | |
13419 | char jpeg_destroy_compress (); | |
067d23c9 KY |
13420 | int |
13421 | main () | |
13422 | { | |
5476a9a4 | 13423 | return jpeg_destroy_compress (); |
067d23c9 KY |
13424 | ; |
13425 | return 0; | |
13426 | } | |
13427 | _ACEOF | |
13428 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 13429 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes |
067d23c9 | 13430 | else |
5476a9a4 | 13431 | ac_cv_lib_jpeg_jpeg_destroy_compress=no |
067d23c9 KY |
13432 | fi |
13433 | rm -f core conftest.err conftest.$ac_objext \ | |
13434 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
13435 | LIBS=$ac_check_lib_save_LIBS |
13436 | fi | |
13437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
13438 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
13439 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : | |
13440 | HAVE_JPEG=yes | |
13441 | fi | |
13442 | ||
067d23c9 | 13443 | fi |
f199cab1 | 13444 | |
f199cab1 GM |
13445 | |
13446 | fi | |
067d23c9 | 13447 | |
5476a9a4 GM |
13448 | if test "${HAVE_JPEG}" = "yes"; then |
13449 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 13450 | |
5476a9a4 GM |
13451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13452 | /* end confdefs.h. */ | |
13453 | #include <jpeglib.h> | |
13454 | version=JPEG_LIB_VERSION | |
f199cab1 | 13455 | |
5476a9a4 GM |
13456 | _ACEOF |
13457 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13458 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
13459 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 13460 | |
5476a9a4 GM |
13461 | else |
13462 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
13463 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
7c61eaab | 13464 | HAVE_JPEG=no |
067d23c9 | 13465 | fi |
5476a9a4 | 13466 | rm -f conftest* |
067d23c9 | 13467 | |
5476a9a4 GM |
13468 | fi |
13469 | if test "${HAVE_JPEG}" = "yes"; then | |
13470 | LIBJPEG=-ljpeg | |
13471 | fi | |
13472 | fi | |
067d23c9 KY |
13473 | |
13474 | ||
5476a9a4 | 13475 | ### Use -lpng if available, unless `--with-png=no'. |
7c61eaab | 13476 | ### mingw32 doesn't use -lpng, since it loads the library dynamically. |
5476a9a4 GM |
13477 | HAVE_PNG=no |
13478 | LIBPNG= | |
7c61eaab GM |
13479 | if test "${opsys}" = "mingw32"; then |
13480 | if test "${with_png}" != "no"; then | |
13481 | ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" | |
13482 | if test "x$ac_cv_header_png_h" = x""yes; then : | |
13483 | HAVE_PNG=yes | |
13484 | else | |
13485 | HAVE_PNG=no | |
13486 | fi | |
13487 | ||
13488 | ||
13489 | fi | |
13490 | if test "${HAVE_PNG}" = "yes"; then | |
13491 | ||
13492 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
13493 | ||
13494 | ||
13495 | ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H | |
13496 | # include <libpng/png.h> | |
13497 | #else | |
13498 | # include <png.h> | |
13499 | #endif | |
13500 | ||
13501 | " | |
13502 | if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : | |
13503 | ||
13504 | else | |
13505 | ||
13506 | $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h | |
13507 | ||
13508 | fi | |
13509 | ||
13510 | fi | |
13511 | elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then | |
5476a9a4 GM |
13512 | if test "${with_png}" != "no"; then |
13513 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
13514 | # in /usr/include/libpng. | |
13515 | for ac_header in png.h libpng/png.h | |
13516 | do : | |
13517 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13518 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13519 | eval as_val=\$$as_ac_Header | |
13520 | if test "x$as_val" = x""yes; then : | |
13521 | cat >>confdefs.h <<_ACEOF | |
13522 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13523 | _ACEOF | |
13524 | break | |
13525 | fi | |
067d23c9 | 13526 | |
5476a9a4 | 13527 | done |
067d23c9 | 13528 | |
5476a9a4 GM |
13529 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then |
13530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
13531 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
13532 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : | |
13533 | $as_echo_n "(cached) " >&6 | |
13534 | else | |
13535 | ac_check_lib_save_LIBS=$LIBS | |
13536 | LIBS="-lpng -lz -lm $LIBS" | |
13537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13538 | /* end confdefs.h. */ | |
067d23c9 | 13539 | |
5476a9a4 GM |
13540 | /* Override any GCC internal prototype to avoid an error. |
13541 | Use char because int might match the return type of a GCC | |
13542 | builtin and then its argument prototype would still apply. */ | |
13543 | #ifdef __cplusplus | |
13544 | extern "C" | |
13545 | #endif | |
13546 | char png_get_channels (); | |
13547 | int | |
13548 | main () | |
13549 | { | |
13550 | return png_get_channels (); | |
13551 | ; | |
13552 | return 0; | |
13553 | } | |
13554 | _ACEOF | |
13555 | if ac_fn_c_try_link "$LINENO"; then : | |
13556 | ac_cv_lib_png_png_get_channels=yes | |
f199cab1 | 13557 | else |
5476a9a4 GM |
13558 | ac_cv_lib_png_png_get_channels=no |
13559 | fi | |
13560 | rm -f core conftest.err conftest.$ac_objext \ | |
13561 | conftest$ac_exeext conftest.$ac_ext | |
13562 | LIBS=$ac_check_lib_save_LIBS | |
13563 | fi | |
13564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
13565 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
13566 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : | |
13567 | HAVE_PNG=yes | |
f199cab1 | 13568 | fi |
067d23c9 | 13569 | |
5476a9a4 GM |
13570 | fi |
13571 | fi | |
7834125e | 13572 | |
5476a9a4 GM |
13573 | if test "${HAVE_PNG}" = "yes"; then |
13574 | ||
13575 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
13576 | ||
13577 | LIBPNG="-lpng -lz -lm" | |
13578 | ||
13579 | ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H | |
13580 | # include <libpng/png.h> | |
13581 | #else | |
13582 | # include <png.h> | |
13583 | #endif | |
13584 | ||
13585 | " | |
13586 | if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : | |
13587 | ||
13588 | else | |
7834125e | 13589 | |
5476a9a4 | 13590 | $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h |
7834125e | 13591 | |
f199cab1 | 13592 | fi |
7834125e | 13593 | |
5476a9a4 GM |
13594 | fi |
13595 | fi | |
7834125e GM |
13596 | |
13597 | ||
5476a9a4 | 13598 | ### Use -ltiff if available, unless `--with-tiff=no'. |
7c61eaab | 13599 | ### mingw32 doesn't use -ltiff, since it loads the library dynamically. |
5476a9a4 GM |
13600 | HAVE_TIFF=no |
13601 | LIBTIFF= | |
7c61eaab GM |
13602 | if test "${opsys}" = "mingw32"; then |
13603 | if test "${with_tiff}" != "no"; then | |
13604 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
13605 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : | |
13606 | HAVE_TIFF=yes | |
13607 | else | |
13608 | HAVE_TIFF=no | |
13609 | fi | |
13610 | ||
13611 | ||
13612 | fi | |
13613 | if test "${HAVE_TIFF}" = "yes"; then | |
13614 | ||
13615 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h | |
13616 | ||
13617 | fi | |
13618 | elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then | |
5476a9a4 GM |
13619 | if test "${with_tiff}" != "no"; then |
13620 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
13621 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : | |
13622 | tifflibs="-lz -lm" | |
13623 | # At least one tiff package requires the jpeg library. | |
13624 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
13625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
13626 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
13627 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : | |
f199cab1 GM |
13628 | $as_echo_n "(cached) " >&6 |
13629 | else | |
5476a9a4 GM |
13630 | ac_check_lib_save_LIBS=$LIBS |
13631 | LIBS="-ltiff $tifflibs $LIBS" | |
13632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13633 | /* end confdefs.h. */ |
067d23c9 | 13634 | |
5476a9a4 GM |
13635 | /* Override any GCC internal prototype to avoid an error. |
13636 | Use char because int might match the return type of a GCC | |
13637 | builtin and then its argument prototype would still apply. */ | |
13638 | #ifdef __cplusplus | |
13639 | extern "C" | |
f199cab1 | 13640 | #endif |
5476a9a4 GM |
13641 | char TIFFGetVersion (); |
13642 | int | |
13643 | main () | |
13644 | { | |
13645 | return TIFFGetVersion (); | |
13646 | ; | |
13647 | return 0; | |
13648 | } | |
f199cab1 | 13649 | _ACEOF |
5476a9a4 GM |
13650 | if ac_fn_c_try_link "$LINENO"; then : |
13651 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
f199cab1 | 13652 | else |
5476a9a4 | 13653 | ac_cv_lib_tiff_TIFFGetVersion=no |
f199cab1 | 13654 | fi |
5476a9a4 GM |
13655 | rm -f core conftest.err conftest.$ac_objext \ |
13656 | conftest$ac_exeext conftest.$ac_ext | |
13657 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 13658 | fi |
5476a9a4 GM |
13659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 |
13660 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
13661 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : | |
13662 | HAVE_TIFF=yes | |
f199cab1 | 13663 | fi |
067d23c9 | 13664 | |
5476a9a4 | 13665 | fi |
067d23c9 | 13666 | |
067d23c9 | 13667 | |
5476a9a4 | 13668 | fi |
f199cab1 | 13669 | |
5476a9a4 | 13670 | if test "${HAVE_TIFF}" = "yes"; then |
067d23c9 | 13671 | |
5476a9a4 | 13672 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h |
067d23c9 | 13673 | |
5476a9a4 GM |
13674 | LIBTIFF=-ltiff |
13675 | fi | |
f199cab1 | 13676 | fi |
067d23c9 | 13677 | |
067d23c9 | 13678 | |
5476a9a4 | 13679 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. |
7c61eaab | 13680 | ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically. |
5476a9a4 GM |
13681 | HAVE_GIF=no |
13682 | LIBGIF= | |
7c61eaab GM |
13683 | if test "${opsys}" = "mingw32"; then |
13684 | if test "${with_gif}" != "no"; then | |
13685 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" | |
13686 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : | |
13687 | HAVE_GIF=yes | |
13688 | else | |
13689 | HAVE_GIF=no | |
13690 | fi | |
13691 | ||
13692 | ||
13693 | fi | |
13694 | if test "${HAVE_GIF}" = "yes"; then | |
13695 | ||
13696 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
13697 | ||
13698 | fi | |
13699 | elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \ | |
5c0255d9 | 13700 | || test "${HAVE_W32}" = "yes"; then |
5476a9a4 GM |
13701 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" |
13702 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : | |
13703 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. | |
13704 | # Earlier versions can crash Emacs. | |
13705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
13706 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
13707 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
13708 | $as_echo_n "(cached) " >&6 |
13709 | else | |
5476a9a4 GM |
13710 | ac_check_lib_save_LIBS=$LIBS |
13711 | LIBS="-lgif $LIBS" | |
13712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13713 | /* end confdefs.h. */ |
067d23c9 | 13714 | |
5476a9a4 GM |
13715 | /* Override any GCC internal prototype to avoid an error. |
13716 | Use char because int might match the return type of a GCC | |
13717 | builtin and then its argument prototype would still apply. */ | |
13718 | #ifdef __cplusplus | |
13719 | extern "C" | |
13720 | #endif | |
13721 | char EGifPutExtensionLast (); | |
f199cab1 GM |
13722 | int |
13723 | main () | |
13724 | { | |
5476a9a4 | 13725 | return EGifPutExtensionLast (); |
f199cab1 GM |
13726 | ; |
13727 | return 0; | |
13728 | } | |
13729 | _ACEOF | |
5476a9a4 GM |
13730 | if ac_fn_c_try_link "$LINENO"; then : |
13731 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
f199cab1 | 13732 | else |
5476a9a4 | 13733 | ac_cv_lib_gif_EGifPutExtensionLast=no |
f199cab1 | 13734 | fi |
5476a9a4 GM |
13735 | rm -f core conftest.err conftest.$ac_objext \ |
13736 | conftest$ac_exeext conftest.$ac_ext | |
13737 | LIBS=$ac_check_lib_save_LIBS | |
13738 | fi | |
13739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
13740 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
13741 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : | |
13742 | HAVE_GIF=yes | |
13743 | else | |
13744 | HAVE_GIF=maybe | |
f199cab1 | 13745 | fi |
067d23c9 | 13746 | |
5476a9a4 GM |
13747 | fi |
13748 | ||
13749 | ||
13750 | ||
13751 | if test "$HAVE_GIF" = yes; then | |
13752 | LIBGIF=-lgif | |
13753 | elif test "$HAVE_GIF" = maybe; then | |
13754 | # If gif_lib.h but no libgif, try libungif. | |
13755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
13756 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
13757 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
13758 | $as_echo_n "(cached) " >&6 |
13759 | else | |
5476a9a4 GM |
13760 | ac_check_lib_save_LIBS=$LIBS |
13761 | LIBS="-lungif $LIBS" | |
13762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13763 | /* end confdefs.h. */ |
f199cab1 | 13764 | |
5476a9a4 GM |
13765 | /* Override any GCC internal prototype to avoid an error. |
13766 | Use char because int might match the return type of a GCC | |
13767 | builtin and then its argument prototype would still apply. */ | |
13768 | #ifdef __cplusplus | |
13769 | extern "C" | |
13770 | #endif | |
13771 | char EGifPutExtensionLast (); | |
f199cab1 GM |
13772 | int |
13773 | main () | |
13774 | { | |
5476a9a4 | 13775 | return EGifPutExtensionLast (); |
f199cab1 GM |
13776 | ; |
13777 | return 0; | |
13778 | } | |
13779 | _ACEOF | |
5476a9a4 GM |
13780 | if ac_fn_c_try_link "$LINENO"; then : |
13781 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
f199cab1 | 13782 | else |
5476a9a4 | 13783 | ac_cv_lib_ungif_EGifPutExtensionLast=no |
f199cab1 | 13784 | fi |
5476a9a4 GM |
13785 | rm -f core conftest.err conftest.$ac_objext \ |
13786 | conftest$ac_exeext conftest.$ac_ext | |
13787 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 13788 | fi |
5476a9a4 GM |
13789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 |
13790 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
13791 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : | |
13792 | HAVE_GIF=yes | |
13793 | else | |
13794 | HAVE_GIF=no | |
13795 | fi | |
13796 | ||
13797 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
13798 | fi | |
13799 | ||
13800 | if test "${HAVE_GIF}" = "yes"; then | |
13801 | ||
13802 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
13803 | ||
13804 | fi | |
13805 | fi | |
13806 | ||
13807 | ||
13808 | if test "${HAVE_X11}" = "yes"; then | |
13809 | MISSING="" | |
13810 | WITH_NO="" | |
13811 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
13812 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
13813 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
13814 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
13815 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
13816 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
13817 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
13818 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
13819 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
13820 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
13821 | ||
13822 | if test "X${MISSING}" != X; then | |
13823 | as_fn_error "The following required libraries were not found: | |
13824 | $MISSING | |
13825 | Maybe some development libraries/packages are missing? | |
13826 | If you don't want to link with them give | |
13827 | $WITH_NO | |
13828 | as options to configure" "$LINENO" 5 | |
13829 | fi | |
13830 | fi | |
13831 | ||
13832 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
13833 | HAVE_GPM=no | |
13834 | LIBGPM= | |
13835 | if test "${with_gpm}" != "no"; then | |
13836 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
13837 | if test "x$ac_cv_header_gpm_h" = x""yes; then : | |
13838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 | |
13839 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
13840 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : | |
067d23c9 KY |
13841 | $as_echo_n "(cached) " >&6 |
13842 | else | |
5476a9a4 GM |
13843 | ac_check_lib_save_LIBS=$LIBS |
13844 | LIBS="-lgpm $LIBS" | |
13845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13846 | /* end confdefs.h. */ |
13847 | ||
5476a9a4 GM |
13848 | /* Override any GCC internal prototype to avoid an error. |
13849 | Use char because int might match the return type of a GCC | |
13850 | builtin and then its argument prototype would still apply. */ | |
13851 | #ifdef __cplusplus | |
13852 | extern "C" | |
13853 | #endif | |
13854 | char Gpm_Open (); | |
067d23c9 KY |
13855 | int |
13856 | main () | |
13857 | { | |
5476a9a4 | 13858 | return Gpm_Open (); |
067d23c9 KY |
13859 | ; |
13860 | return 0; | |
13861 | } | |
13862 | _ACEOF | |
5476a9a4 GM |
13863 | if ac_fn_c_try_link "$LINENO"; then : |
13864 | ac_cv_lib_gpm_Gpm_Open=yes | |
067d23c9 | 13865 | else |
5476a9a4 | 13866 | ac_cv_lib_gpm_Gpm_Open=no |
067d23c9 | 13867 | fi |
5476a9a4 GM |
13868 | rm -f core conftest.err conftest.$ac_objext \ |
13869 | conftest$ac_exeext conftest.$ac_ext | |
13870 | LIBS=$ac_check_lib_save_LIBS | |
13871 | fi | |
13872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
13873 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
13874 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : | |
13875 | HAVE_GPM=yes | |
067d23c9 | 13876 | fi |
f199cab1 | 13877 | |
5476a9a4 | 13878 | fi |
f199cab1 | 13879 | |
f199cab1 | 13880 | |
f199cab1 | 13881 | |
5476a9a4 | 13882 | if test "${HAVE_GPM}" = "yes"; then |
f199cab1 | 13883 | |
5476a9a4 | 13884 | $as_echo "#define HAVE_GPM 1" >>confdefs.h |
f199cab1 | 13885 | |
5476a9a4 GM |
13886 | LIBGPM=-lgpm |
13887 | fi | |
067d23c9 | 13888 | fi |
067d23c9 KY |
13889 | |
13890 | ||
13891 | ||
13892 | ||
13893 | ||
13894 | ||
5476a9a4 GM |
13895 | GNUSTEP_CFLAGS= |
13896 | ### Use NeXTstep API to implement GUI. | |
13897 | if test "${HAVE_NS}" = "yes"; then | |
067d23c9 | 13898 | |
5476a9a4 | 13899 | $as_echo "#define HAVE_NS 1" >>confdefs.h |
067d23c9 | 13900 | |
5476a9a4 | 13901 | if test "${NS_IMPL_COCOA}" = "yes"; then |
067d23c9 | 13902 | |
5476a9a4 | 13903 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h |
f199cab1 | 13904 | |
5476a9a4 GM |
13905 | fi |
13906 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
f199cab1 | 13907 | |
5476a9a4 | 13908 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h |
f199cab1 | 13909 | |
5476a9a4 GM |
13910 | # See also .m.o rule in Makefile.in */ |
13911 | # FIXME: are all these flags really needed? Document here why. */ | |
13912 | GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
13913 | ## Extra CFLAGS applied to src/*.m files. | |
13914 | GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | |
13915 | fi | |
13916 | # We also have mouse menus. | |
13917 | HAVE_MENUS=yes | |
13918 | OTHER_FILES=ns-app | |
13919 | fi | |
f199cab1 | 13920 | |
5c0255d9 GM |
13921 | if test "${HAVE_W32}" = "yes"; then |
13922 | HAVE_MENUS=yes | |
13923 | fi | |
f199cab1 | 13924 | |
5476a9a4 GM |
13925 | ### Use session management (-lSM -lICE) if available |
13926 | HAVE_X_SM=no | |
13927 | LIBXSM= | |
13928 | if test "${HAVE_X11}" = "yes"; then | |
13929 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
13930 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : | |
13931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 | |
13932 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
13933 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : | |
067d23c9 KY |
13934 | $as_echo_n "(cached) " >&6 |
13935 | else | |
5476a9a4 GM |
13936 | ac_check_lib_save_LIBS=$LIBS |
13937 | LIBS="-lSM -lICE $LIBS" | |
13938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13939 | /* end confdefs.h. */ |
13940 | ||
5476a9a4 GM |
13941 | /* Override any GCC internal prototype to avoid an error. |
13942 | Use char because int might match the return type of a GCC | |
13943 | builtin and then its argument prototype would still apply. */ | |
13944 | #ifdef __cplusplus | |
13945 | extern "C" | |
13946 | #endif | |
13947 | char SmcOpenConnection (); | |
f199cab1 GM |
13948 | int |
13949 | main () | |
13950 | { | |
5476a9a4 GM |
13951 | return SmcOpenConnection (); |
13952 | ; | |
13953 | return 0; | |
f199cab1 | 13954 | } |
067d23c9 | 13955 | _ACEOF |
5476a9a4 GM |
13956 | if ac_fn_c_try_link "$LINENO"; then : |
13957 | ac_cv_lib_SM_SmcOpenConnection=yes | |
067d23c9 | 13958 | else |
5476a9a4 | 13959 | ac_cv_lib_SM_SmcOpenConnection=no |
f199cab1 | 13960 | fi |
5476a9a4 GM |
13961 | rm -f core conftest.err conftest.$ac_objext \ |
13962 | conftest$ac_exeext conftest.$ac_ext | |
13963 | LIBS=$ac_check_lib_save_LIBS | |
13964 | fi | |
13965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
13966 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
13967 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : | |
13968 | HAVE_X_SM=yes | |
067d23c9 | 13969 | fi |
067d23c9 | 13970 | |
f199cab1 | 13971 | fi |
f199cab1 | 13972 | |
f199cab1 | 13973 | |
067d23c9 | 13974 | |
5476a9a4 GM |
13975 | if test "${HAVE_X_SM}" = "yes"; then |
13976 | ||
13977 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
13978 | ||
13979 | LIBXSM="-lSM -lICE" | |
13980 | case "$LIBS" in | |
13981 | *-lSM*) ;; | |
13982 | *) LIBS="$LIBXSM $LIBS" ;; | |
13983 | esac | |
067d23c9 | 13984 | fi |
5476a9a4 | 13985 | fi |
067d23c9 | 13986 | |
067d23c9 | 13987 | |
910833ae GM |
13988 | ### Use XRandr (-lXrandr) if available |
13989 | HAVE_XRANDR=no | |
13990 | if test "${HAVE_X11}" = "yes"; then | |
13991 | XRANDR_REQUIRED=1.2.2 | |
13992 | XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED" | |
13993 | ||
13994 | succeeded=no | |
13995 | ||
13996 | if test "$PKG_CONFIG" = "no" ; then | |
13997 | HAVE_XRANDR=no | |
13998 | else | |
13999 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
14000 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
14001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5 | |
14002 | $as_echo_n "checking for $XRANDR_MODULES... " >&6; } | |
14003 | ||
14004 | if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 && | |
14005 | XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` && | |
14006 | XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then | |
14007 | edit_cflags=" | |
14008 | s,///*,/,g | |
14009 | s/^/ / | |
14010 | s/ -I/ $isystem/g | |
14011 | s/^ // | |
14012 | " | |
14013 | XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"` | |
14014 | XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'` | |
14015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5 | |
14016 | $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; } | |
14017 | succeeded=yes | |
14018 | else | |
14019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14020 | $as_echo "no" >&6; } | |
14021 | XRANDR_CFLAGS="" | |
14022 | XRANDR_LIBS="" | |
14023 | ## If we have a custom action on failure, don't print errors, but | |
14024 | ## do set a variable so people can do so. Do it in a subshell | |
14025 | ## to capture any diagnostics in invoking pkg-config. | |
14026 | XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1` | |
14027 | ||
14028 | fi | |
14029 | ||
14030 | ||
14031 | ||
14032 | else | |
14033 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
14034 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
14035 | fi | |
14036 | fi | |
14037 | ||
14038 | if test $succeeded = yes; then | |
14039 | HAVE_XRANDR=yes | |
14040 | else | |
14041 | HAVE_XRANDR=no | |
14042 | fi | |
14043 | ||
14044 | if test $HAVE_XRANDR = no; then | |
14045 | # Test old way in case pkg-config doesn't have it (older machines). | |
14046 | ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default" | |
14047 | if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then : | |
c31effdb GM |
14048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5 |
14049 | $as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; } | |
14050 | if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then : | |
910833ae GM |
14051 | $as_echo_n "(cached) " >&6 |
14052 | else | |
14053 | ac_check_lib_save_LIBS=$LIBS | |
14054 | LIBS="-lXrandr $LIBS" | |
14055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14056 | /* end confdefs.h. */ | |
14057 | ||
14058 | /* Override any GCC internal prototype to avoid an error. | |
14059 | Use char because int might match the return type of a GCC | |
14060 | builtin and then its argument prototype would still apply. */ | |
14061 | #ifdef __cplusplus | |
14062 | extern "C" | |
14063 | #endif | |
c31effdb | 14064 | char XRRGetScreenResources (); |
910833ae GM |
14065 | int |
14066 | main () | |
14067 | { | |
c31effdb | 14068 | return XRRGetScreenResources (); |
910833ae GM |
14069 | ; |
14070 | return 0; | |
14071 | } | |
14072 | _ACEOF | |
14073 | if ac_fn_c_try_link "$LINENO"; then : | |
c31effdb | 14074 | ac_cv_lib_Xrandr_XRRGetScreenResources=yes |
910833ae | 14075 | else |
c31effdb | 14076 | ac_cv_lib_Xrandr_XRRGetScreenResources=no |
910833ae GM |
14077 | fi |
14078 | rm -f core conftest.err conftest.$ac_objext \ | |
14079 | conftest$ac_exeext conftest.$ac_ext | |
14080 | LIBS=$ac_check_lib_save_LIBS | |
14081 | fi | |
c31effdb GM |
14082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5 |
14083 | $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; } | |
14084 | if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then : | |
910833ae GM |
14085 | HAVE_XRANDR=yes |
14086 | fi | |
14087 | ||
14088 | fi | |
14089 | ||
14090 | ||
14091 | if test $HAVE_XRANDR = yes; then | |
14092 | XRANDR_LIBS=-lXrandr | |
14093 | ||
14094 | fi | |
14095 | fi | |
14096 | if test $HAVE_XRANDR = yes; then | |
14097 | SAVE_CFLAGS="$CFLAGS" | |
14098 | SAVE_LIBS="$LIBS" | |
14099 | CFLAGS="$XRANDR_CFLAGS $CFLAGS" | |
14100 | LIBS="$XRANDR_LIBS $LIBS" | |
14101 | for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent | |
14102 | do : | |
14103 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14104 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14105 | eval as_val=\$$as_ac_var | |
14106 | if test "x$as_val" = x""yes; then : | |
14107 | cat >>confdefs.h <<_ACEOF | |
14108 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14109 | _ACEOF | |
14110 | ||
14111 | fi | |
14112 | done | |
14113 | ||
14114 | CFLAGS="$SAVE_CFLAGS" | |
14115 | LIBS="$SAVE_LIBS" | |
14116 | ||
14117 | ||
14118 | $as_echo "#define HAVE_XRANDR 1" >>confdefs.h | |
14119 | ||
14120 | fi | |
14121 | fi | |
14122 | ||
14123 | ### Use Xinerama (-lXinerama) if available | |
14124 | HAVE_XINERAMA=no | |
14125 | if test "${HAVE_X11}" = "yes"; then | |
14126 | XINERAMA_REQUIRED=1.0.2 | |
14127 | XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED" | |
14128 | ||
14129 | succeeded=no | |
14130 | ||
14131 | if test "$PKG_CONFIG" = "no" ; then | |
14132 | HAVE_XINERAMA=no | |
14133 | else | |
14134 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
14135 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then | |
14136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5 | |
14137 | $as_echo_n "checking for $XINERAMA_MODULES... " >&6; } | |
14138 | ||
14139 | if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 && | |
14140 | XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` && | |
14141 | XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then | |
14142 | edit_cflags=" | |
14143 | s,///*,/,g | |
14144 | s/^/ / | |
14145 | s/ -I/ $isystem/g | |
14146 | s/^ // | |
14147 | " | |
14148 | XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"` | |
14149 | XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'` | |
14150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5 | |
14151 | $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; } | |
14152 | succeeded=yes | |
14153 | else | |
14154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14155 | $as_echo "no" >&6; } | |
14156 | XINERAMA_CFLAGS="" | |
14157 | XINERAMA_LIBS="" | |
14158 | ## If we have a custom action on failure, don't print errors, but | |
14159 | ## do set a variable so people can do so. Do it in a subshell | |
14160 | ## to capture any diagnostics in invoking pkg-config. | |
14161 | XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1` | |
14162 | ||
14163 | fi | |
14164 | ||
14165 | ||
14166 | ||
14167 | else | |
14168 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
14169 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
14170 | fi | |
14171 | fi | |
14172 | ||
14173 | if test $succeeded = yes; then | |
14174 | HAVE_XINERAMA=yes | |
14175 | else | |
14176 | HAVE_XINERAMA=no | |
14177 | fi | |
14178 | ||
14179 | if test $HAVE_XINERAMA = no; then | |
14180 | # Test old way in case pkg-config doesn't have it (older machines). | |
14181 | ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default" | |
14182 | if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then : | |
14183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5 | |
14184 | $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; } | |
14185 | if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then : | |
14186 | $as_echo_n "(cached) " >&6 | |
14187 | else | |
14188 | ac_check_lib_save_LIBS=$LIBS | |
14189 | LIBS="-lXinerama $LIBS" | |
14190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14191 | /* end confdefs.h. */ | |
14192 | ||
14193 | /* Override any GCC internal prototype to avoid an error. | |
14194 | Use char because int might match the return type of a GCC | |
14195 | builtin and then its argument prototype would still apply. */ | |
14196 | #ifdef __cplusplus | |
14197 | extern "C" | |
14198 | #endif | |
14199 | char XineramaQueryExtension (); | |
14200 | int | |
14201 | main () | |
14202 | { | |
14203 | return XineramaQueryExtension (); | |
14204 | ; | |
14205 | return 0; | |
14206 | } | |
14207 | _ACEOF | |
14208 | if ac_fn_c_try_link "$LINENO"; then : | |
14209 | ac_cv_lib_Xinerama_XineramaQueryExtension=yes | |
14210 | else | |
14211 | ac_cv_lib_Xinerama_XineramaQueryExtension=no | |
14212 | fi | |
14213 | rm -f core conftest.err conftest.$ac_objext \ | |
14214 | conftest$ac_exeext conftest.$ac_ext | |
14215 | LIBS=$ac_check_lib_save_LIBS | |
14216 | fi | |
14217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5 | |
14218 | $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; } | |
14219 | if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then : | |
14220 | HAVE_XINERAMA=yes | |
14221 | fi | |
14222 | ||
14223 | fi | |
14224 | ||
14225 | ||
14226 | if test $HAVE_XINERAMA = yes; then | |
14227 | XINERAMA_LIBS=-lXinerama | |
14228 | ||
14229 | fi | |
14230 | fi | |
14231 | if test $HAVE_XINERAMA = yes; then | |
14232 | ||
14233 | $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h | |
14234 | ||
14235 | fi | |
14236 | fi | |
14237 | ||
14238 | ||
5476a9a4 | 14239 | ### Use libxml (-lxml2) if available |
7c61eaab | 14240 | ### mingw32 doesn't use -lxml2, since it loads the library dynamically. |
5476a9a4 GM |
14241 | HAVE_LIBXML2=no |
14242 | if test "${with_xml2}" != "no"; then | |
14243 | ### I'm not sure what the version number should be, so I just guessed. | |
067d23c9 | 14244 | |
5476a9a4 | 14245 | succeeded=no |
067d23c9 | 14246 | |
5476a9a4 GM |
14247 | if test "$PKG_CONFIG" = "no" ; then |
14248 | HAVE_LIBXML2=no | |
14249 | else | |
14250 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 14251 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
14252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
14253 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 14254 | |
b5591ebb GM |
14255 | if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 && |
14256 | LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` && | |
14257 | LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then | |
5476a9a4 GM |
14258 | edit_cflags=" |
14259 | s,///*,/,g | |
14260 | s/^/ / | |
14261 | s/ -I/ $isystem/g | |
14262 | s/^ // | |
14263 | " | |
14264 | LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` | |
14265 | LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` | |
14266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 | |
14267 | $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } | |
14268 | succeeded=yes | |
14269 | else | |
14270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14271 | $as_echo "no" >&6; } | |
14272 | LIBXML2_CFLAGS="" | |
14273 | LIBXML2_LIBS="" | |
14274 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
14275 | ## do set a variable so people can do so. Do it in a subshell |
14276 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 14277 | LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1` |
5476a9a4 GM |
14278 | |
14279 | fi | |
14280 | ||
14281 | ||
14282 | ||
14283 | else | |
14284 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
14285 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
14286 | fi | |
14287 | fi | |
14288 | ||
14289 | if test $succeeded = yes; then | |
14290 | HAVE_LIBXML2=yes | |
14291 | else | |
14292 | HAVE_LIBXML2=no | |
14293 | fi | |
14294 | ||
4628c0bf GM |
14295 | # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc. |
14296 | if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then | |
14297 | SAVE_CPPFLAGS="$CPPFLAGS" | |
14298 | CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" | |
14299 | ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default" | |
14300 | if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then : | |
14301 | ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h> | |
14302 | " | |
14303 | if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then : | |
14304 | HAVE_LIBXML2=yes | |
14305 | fi | |
14306 | ||
14307 | fi | |
14308 | ||
14309 | ||
14310 | CPPFLAGS="$SAVE_CPPFLAGS" | |
14311 | if test "${HAVE_LIBXML2}" = "yes"; then | |
14312 | LIBXML2_LIBS="-lxml2" | |
14313 | LIBXML2_CFLAGS="-I/usr/include/libxml2" | |
14314 | fi | |
14315 | fi | |
5476a9a4 | 14316 | if test "${HAVE_LIBXML2}" = "yes"; then |
7c61eaab GM |
14317 | if test "${opsys}" != "mingw32"; then |
14318 | LIBS="$LIBXML2_LIBS $LIBS" | |
14319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
5476a9a4 GM |
14320 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } |
14321 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : | |
067d23c9 KY |
14322 | $as_echo_n "(cached) " >&6 |
14323 | else | |
5476a9a4 GM |
14324 | ac_check_lib_save_LIBS=$LIBS |
14325 | LIBS="-lxml2 $LIBS" | |
14326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
14327 | /* end confdefs.h. */ |
14328 | ||
5476a9a4 GM |
14329 | /* Override any GCC internal prototype to avoid an error. |
14330 | Use char because int might match the return type of a GCC | |
14331 | builtin and then its argument prototype would still apply. */ | |
14332 | #ifdef __cplusplus | |
14333 | extern "C" | |
14334 | #endif | |
14335 | char htmlReadMemory (); | |
067d23c9 KY |
14336 | int |
14337 | main () | |
14338 | { | |
5476a9a4 | 14339 | return htmlReadMemory (); |
067d23c9 KY |
14340 | ; |
14341 | return 0; | |
14342 | } | |
14343 | _ACEOF | |
5476a9a4 GM |
14344 | if ac_fn_c_try_link "$LINENO"; then : |
14345 | ac_cv_lib_xml2_htmlReadMemory=yes | |
067d23c9 | 14346 | else |
5476a9a4 | 14347 | ac_cv_lib_xml2_htmlReadMemory=no |
067d23c9 | 14348 | fi |
5476a9a4 GM |
14349 | rm -f core conftest.err conftest.$ac_objext \ |
14350 | conftest$ac_exeext conftest.$ac_ext | |
14351 | LIBS=$ac_check_lib_save_LIBS | |
14352 | fi | |
14353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
14354 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
14355 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : | |
14356 | HAVE_LIBXML2=yes | |
14357 | else | |
14358 | HAVE_LIBXML2=no | |
067d23c9 KY |
14359 | fi |
14360 | ||
7c61eaab GM |
14361 | else |
14362 | LIBXML2_LIBS="" | |
14363 | fi | |
5476a9a4 | 14364 | if test "${HAVE_LIBXML2}" = "yes"; then |
067d23c9 | 14365 | |
5476a9a4 | 14366 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h |
067d23c9 | 14367 | |
5476a9a4 GM |
14368 | else |
14369 | LIBXML2_LIBS="" | |
14370 | LIBXML2_CFLAGS="" | |
14371 | fi | |
067d23c9 | 14372 | fi |
5476a9a4 | 14373 | fi |
067d23c9 | 14374 | |
067d23c9 | 14375 | |
067d23c9 | 14376 | |
5476a9a4 | 14377 | # If netdb.h doesn't declare h_errno, we must declare it by hand. |
7c61eaab GM |
14378 | # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c. |
14379 | if test "${opsys}" = "mingw32"; then | |
14380 | emacs_cv_netdb_declares_h_errno=yes | |
14381 | fi | |
5476a9a4 GM |
14382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 |
14383 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
14384 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : | |
14385 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 14386 | else |
5476a9a4 GM |
14387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14388 | /* end confdefs.h. */ | |
14389 | #include <netdb.h> | |
14390 | int | |
14391 | main () | |
14392 | { | |
14393 | return h_errno; | |
14394 | ; | |
14395 | return 0; | |
14396 | } | |
14397 | _ACEOF | |
14398 | if ac_fn_c_try_link "$LINENO"; then : | |
14399 | emacs_cv_netdb_declares_h_errno=yes | |
14400 | else | |
14401 | emacs_cv_netdb_declares_h_errno=no | |
067d23c9 | 14402 | fi |
5476a9a4 GM |
14403 | rm -f core conftest.err conftest.$ac_objext \ |
14404 | conftest$ac_exeext conftest.$ac_ext | |
14405 | fi | |
14406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
14407 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
14408 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
067d23c9 | 14409 | |
5476a9a4 | 14410 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h |
f199cab1 | 14411 | |
5476a9a4 | 14412 | fi |
f199cab1 | 14413 | |
2c98a625 | 14414 | # sqrt and other floating-point functions such as fmod and frexp |
7c61eaab GM |
14415 | # are found in -lm on most systems, but mingw32 doesn't use -lm. |
14416 | if test "${opsys}" != "mingw32"; then | |
14417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 | |
5476a9a4 GM |
14418 | $as_echo_n "checking for sqrt in -lm... " >&6; } |
14419 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : | |
14420 | $as_echo_n "(cached) " >&6 | |
14421 | else | |
14422 | ac_check_lib_save_LIBS=$LIBS | |
14423 | LIBS="-lm $LIBS" | |
14424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14425 | /* end confdefs.h. */ | |
f199cab1 | 14426 | |
5476a9a4 GM |
14427 | /* Override any GCC internal prototype to avoid an error. |
14428 | Use char because int might match the return type of a GCC | |
14429 | builtin and then its argument prototype would still apply. */ | |
14430 | #ifdef __cplusplus | |
14431 | extern "C" | |
14432 | #endif | |
14433 | char sqrt (); | |
14434 | int | |
14435 | main () | |
14436 | { | |
14437 | return sqrt (); | |
14438 | ; | |
14439 | return 0; | |
14440 | } | |
14441 | _ACEOF | |
14442 | if ac_fn_c_try_link "$LINENO"; then : | |
14443 | ac_cv_lib_m_sqrt=yes | |
14444 | else | |
14445 | ac_cv_lib_m_sqrt=no | |
14446 | fi | |
14447 | rm -f core conftest.err conftest.$ac_objext \ | |
14448 | conftest$ac_exeext conftest.$ac_ext | |
14449 | LIBS=$ac_check_lib_save_LIBS | |
14450 | fi | |
14451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
14452 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
14453 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : | |
14454 | cat >>confdefs.h <<_ACEOF | |
14455 | #define HAVE_LIBM 1 | |
14456 | _ACEOF | |
f199cab1 | 14457 | |
5476a9a4 | 14458 | LIBS="-lm $LIBS" |
f199cab1 | 14459 | |
5476a9a4 | 14460 | fi |
f199cab1 | 14461 | |
7c61eaab | 14462 | fi |
f199cab1 | 14463 | |
5476a9a4 GM |
14464 | # Check for mail-locking functions in a "mail" library. Probably this should |
14465 | # have the same check as for liblockfile below. | |
14466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
14467 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
14468 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : | |
067d23c9 KY |
14469 | $as_echo_n "(cached) " >&6 |
14470 | else | |
5476a9a4 GM |
14471 | ac_check_lib_save_LIBS=$LIBS |
14472 | LIBS="-lmail $LIBS" | |
14473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
14474 | /* end confdefs.h. */ |
14475 | ||
5476a9a4 GM |
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" | |
067d23c9 | 14481 | #endif |
5476a9a4 GM |
14482 | char maillock (); |
14483 | int | |
14484 | main () | |
14485 | { | |
14486 | return maillock (); | |
14487 | ; | |
14488 | return 0; | |
14489 | } | |
067d23c9 | 14490 | _ACEOF |
5476a9a4 GM |
14491 | if ac_fn_c_try_link "$LINENO"; then : |
14492 | ac_cv_lib_mail_maillock=yes | |
067d23c9 | 14493 | else |
5476a9a4 | 14494 | ac_cv_lib_mail_maillock=no |
067d23c9 | 14495 | fi |
5476a9a4 GM |
14496 | rm -f core conftest.err conftest.$ac_objext \ |
14497 | conftest$ac_exeext conftest.$ac_ext | |
14498 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 14499 | fi |
5476a9a4 GM |
14500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 |
14501 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
14502 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : | |
14503 | have_mail=yes | |
f199cab1 | 14504 | else |
5476a9a4 | 14505 | have_mail=no |
067d23c9 KY |
14506 | fi |
14507 | ||
5476a9a4 GM |
14508 | if test $have_mail = yes; then |
14509 | LIBS_MAIL=-lmail | |
14510 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 14511 | |
5476a9a4 | 14512 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h |
067d23c9 | 14513 | |
5476a9a4 GM |
14514 | else |
14515 | LIBS_MAIL= | |
14516 | fi | |
14517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
14518 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
14519 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : | |
067d23c9 KY |
14520 | $as_echo_n "(cached) " >&6 |
14521 | else | |
5476a9a4 GM |
14522 | ac_check_lib_save_LIBS=$LIBS |
14523 | LIBS="-llockfile $LIBS" | |
067d23c9 KY |
14524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14525 | /* end confdefs.h. */ | |
14526 | ||
14527 | /* Override any GCC internal prototype to avoid an error. | |
14528 | Use char because int might match the return type of a GCC | |
14529 | builtin and then its argument prototype would still apply. */ | |
14530 | #ifdef __cplusplus | |
14531 | extern "C" | |
14532 | #endif | |
5476a9a4 | 14533 | char maillock (); |
067d23c9 KY |
14534 | int |
14535 | main () | |
14536 | { | |
5476a9a4 | 14537 | return maillock (); |
067d23c9 KY |
14538 | ; |
14539 | return 0; | |
14540 | } | |
14541 | _ACEOF | |
5476a9a4 GM |
14542 | if ac_fn_c_try_link "$LINENO"; then : |
14543 | ac_cv_lib_lockfile_maillock=yes | |
14544 | else | |
14545 | ac_cv_lib_lockfile_maillock=no | |
067d23c9 KY |
14546 | fi |
14547 | rm -f core conftest.err conftest.$ac_objext \ | |
5476a9a4 GM |
14548 | conftest$ac_exeext conftest.$ac_ext |
14549 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 14550 | fi |
5476a9a4 GM |
14551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 |
14552 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
14553 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : | |
14554 | have_lockfile=yes | |
067d23c9 | 14555 | else |
5476a9a4 | 14556 | have_lockfile=no |
f199cab1 GM |
14557 | fi |
14558 | ||
5476a9a4 GM |
14559 | if test $have_lockfile = yes; then |
14560 | LIBS_MAIL=-llockfile | |
14561 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 14562 | |
5476a9a4 | 14563 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h |
067d23c9 | 14564 | |
5476a9a4 GM |
14565 | else |
14566 | # If we have the shared liblockfile, assume we must use it for mail | |
14567 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
14568 | # (no liblockfile.a installed), ensure that we don't need to. | |
14569 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
14570 | set dummy liblockfile.so; ac_word=$2 | |
14571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14572 | $as_echo_n "checking for $ac_word... " >&6; } | |
14573 | if test "${ac_cv_prog_liblockfile+set}" = set; then : | |
14574 | $as_echo_n "(cached) " >&6 | |
14575 | else | |
14576 | if test -n "$liblockfile"; then | |
14577 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
14578 | else | |
14579 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14580 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
14581 | for as_dir in $as_dummy | |
14582 | do | |
14583 | IFS=$as_save_IFS | |
14584 | test -z "$as_dir" && as_dir=. | |
14585 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14586 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
14587 | ac_cv_prog_liblockfile="yes" | |
14588 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14589 | break 2 | |
14590 | fi | |
14591 | done | |
14592 | done | |
14593 | IFS=$as_save_IFS | |
067d23c9 | 14594 | |
5476a9a4 GM |
14595 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" |
14596 | fi | |
14597 | fi | |
14598 | liblockfile=$ac_cv_prog_liblockfile | |
14599 | if test -n "$liblockfile"; then | |
14600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
14601 | $as_echo "$liblockfile" >&6; } | |
14602 | else | |
14603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14604 | $as_echo "no" >&6; } | |
14605 | fi | |
067d23c9 | 14606 | |
067d23c9 | 14607 | |
5476a9a4 GM |
14608 | if test $ac_cv_prog_liblockfile = yes; then |
14609 | as_fn_error "Shared liblockfile found but can't link against it. | |
14610 | This probably means that movemail could lose mail. | |
14611 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
14612 | fi | |
14613 | fi | |
067d23c9 | 14614 | |
067d23c9 | 14615 | |
067d23c9 | 14616 | |
067d23c9 KY |
14617 | |
14618 | ||
5476a9a4 GM |
14619 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to |
14620 | ## interlock access to the mail spool. The alternative is a lock file named | |
14621 | ## /usr/spool/mail/$USER.lock. | |
14622 | mail_lock=no | |
14623 | case "$opsys" in | |
14624 | aix4-2) mail_lock="lockf" ;; | |
067d23c9 | 14625 | |
87e1a811 | 14626 | gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; |
067d23c9 | 14627 | |
5476a9a4 GM |
14628 | ## On GNU/Linux systems, both methods are used by various mail programs. |
14629 | ## I assume most people are using newer mailers that have heard of flock. | |
14630 | ## Change this if you need to. | |
14631 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
14632 | ## configure gets the right answers, and that means *NOT* using flock. | |
14633 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
14634 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
14635 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
14636 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
14637 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
14638 | ## correct logic. -- fx | |
14639 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
14640 | ## liblockfile is a Free Software replacement for libmail, used on | |
14641 | ## Debian systems and elsewhere. -rfr. | |
14642 | gnu-*) | |
14643 | mail_lock="flock" | |
14644 | if test $have_mail = yes || test $have_lockfile = yes; then | |
14645 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
14646 | fi | |
14647 | ;; | |
7c61eaab GM |
14648 | |
14649 | mingw32) | |
14650 | mail_lock="none-needed" ;; | |
5476a9a4 | 14651 | esac |
f199cab1 | 14652 | |
5476a9a4 GM |
14653 | BLESSMAIL_TARGET= |
14654 | case "$mail_lock" in | |
14655 | flock) | |
14656 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
14657 | ;; | |
f199cab1 | 14658 | |
5476a9a4 GM |
14659 | lockf) |
14660 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
14661 | ;; | |
f199cab1 | 14662 | |
7c61eaab GM |
14663 | none-needed) ;; |
14664 | ||
5476a9a4 GM |
14665 | *) BLESSMAIL_TARGET="need-blessmail" ;; |
14666 | esac | |
f199cab1 GM |
14667 | |
14668 | ||
14669 | ||
0cdca42a | 14670 | for ac_func in accept4 gethostname \ |
e7d0e5ee | 14671 | getrusage get_current_dir_name \ |
eda33f78 | 14672 | lrand48 \ |
a455a5ce | 14673 | select getpagesize setlocale \ |
db7863f4 | 14674 | getrlimit setrlimit shutdown getaddrinfo \ |
eda33f78 | 14675 | strsignal setitimer \ |
5476a9a4 | 14676 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ |
0cdca42a | 14677 | gai_strerror mkostemp mkstemp getline getdelim sync \ |
5476a9a4 GM |
14678 | difftime posix_memalign \ |
14679 | getpwent endpwent getgrent endgrent \ | |
14680 | touchlock \ | |
4628c0bf | 14681 | cfmakeraw cfsetspeed copysign __executable_start log2 |
5476a9a4 GM |
14682 | do : |
14683 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14684 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14685 | eval as_val=\$$as_ac_var | |
14686 | if test "x$as_val" = x""yes; then : | |
14687 | cat >>confdefs.h <<_ACEOF | |
14688 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14689 | _ACEOF | |
f199cab1 | 14690 | |
5476a9a4 GM |
14691 | fi |
14692 | done | |
f199cab1 GM |
14693 | |
14694 | ||
5476a9a4 GM |
14695 | ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines |
14696 | ## has a broken `rint' in some library versions including math library | |
14697 | ## version number A.09.05. | |
14698 | ## You can fix the math library by installing patch number PHSS_4630. | |
14699 | ## But we can fix it more reliably for Emacs by just not using rint. | |
8ad96b1d | 14700 | ## We also skip HAVE_RANDOM - see comments in src/conf_post.h. |
5476a9a4 GM |
14701 | case $opsys in |
14702 | hpux*) : ;; | |
14703 | *) for ac_func in random rint | |
14704 | do : | |
14705 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14706 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14707 | eval as_val=\$$as_ac_var | |
14708 | if test "x$as_val" = x""yes; then : | |
14709 | cat >>confdefs.h <<_ACEOF | |
14710 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14711 | _ACEOF | |
f199cab1 | 14712 | |
5476a9a4 GM |
14713 | fi |
14714 | done | |
14715 | ;; | |
14716 | esac | |
f199cab1 | 14717 | |
5476a9a4 GM |
14718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
14719 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
14720 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : | |
067d23c9 | 14721 | $as_echo_n "(cached) " >&6 |
f199cab1 GM |
14722 | else |
14723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
14724 | /* end confdefs.h. */ |
14725 | ||
067d23c9 KY |
14726 | int |
14727 | main () | |
14728 | { | |
5476a9a4 | 14729 | __builtin_unwind_init (); |
067d23c9 KY |
14730 | ; |
14731 | return 0; | |
14732 | } | |
14733 | _ACEOF | |
5476a9a4 GM |
14734 | if ac_fn_c_try_link "$LINENO"; then : |
14735 | emacs_cv_func___builtin_unwind_init=yes | |
067d23c9 | 14736 | else |
5476a9a4 | 14737 | emacs_cv_func___builtin_unwind_init=no |
067d23c9 | 14738 | fi |
5476a9a4 GM |
14739 | rm -f core conftest.err conftest.$ac_objext \ |
14740 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 14741 | fi |
5476a9a4 GM |
14742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 |
14743 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
14744 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
067d23c9 | 14745 | |
5476a9a4 | 14746 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h |
f199cab1 | 14747 | |
067d23c9 | 14748 | fi |
067d23c9 | 14749 | |
f199cab1 GM |
14750 | |
14751 | ||
14752 | ||
14753 | ||
5476a9a4 GM |
14754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
14755 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
14756 | if test "${ac_cv_sys_largefile_source+set}" = set; then : | |
14757 | $as_echo_n "(cached) " >&6 | |
14758 | else | |
14759 | while :; do | |
14760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14761 | /* end confdefs.h. */ | |
14762 | #include <sys/types.h> /* for off_t */ | |
14763 | #include <stdio.h> | |
14764 | int | |
14765 | main () | |
14766 | { | |
14767 | int (*fp) (FILE *, off_t, int) = fseeko; | |
14768 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
14769 | ; | |
14770 | return 0; | |
14771 | } | |
14772 | _ACEOF | |
14773 | if ac_fn_c_try_link "$LINENO"; then : | |
14774 | ac_cv_sys_largefile_source=no; break | |
067d23c9 | 14775 | fi |
5476a9a4 GM |
14776 | rm -f core conftest.err conftest.$ac_objext \ |
14777 | conftest$ac_exeext conftest.$ac_ext | |
14778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14779 | /* end confdefs.h. */ | |
14780 | #define _LARGEFILE_SOURCE 1 | |
14781 | #include <sys/types.h> /* for off_t */ | |
14782 | #include <stdio.h> | |
14783 | int | |
14784 | main () | |
14785 | { | |
14786 | int (*fp) (FILE *, off_t, int) = fseeko; | |
14787 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
14788 | ; | |
14789 | return 0; | |
14790 | } | |
14791 | _ACEOF | |
14792 | if ac_fn_c_try_link "$LINENO"; then : | |
14793 | ac_cv_sys_largefile_source=1; break | |
14794 | fi | |
14795 | rm -f core conftest.err conftest.$ac_objext \ | |
14796 | conftest$ac_exeext conftest.$ac_ext | |
14797 | ac_cv_sys_largefile_source=unknown | |
14798 | break | |
14799 | done | |
14800 | fi | |
14801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
14802 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
14803 | case $ac_cv_sys_largefile_source in #( | |
14804 | no | unknown) ;; | |
14805 | *) | |
14806 | cat >>confdefs.h <<_ACEOF | |
14807 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
14808 | _ACEOF | |
14809 | ;; | |
14810 | esac | |
14811 | rm -rf conftest* | |
067d23c9 | 14812 | |
5476a9a4 GM |
14813 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
14814 | # in glibc 2.1.3, but that breaks too many other things. | |
14815 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
14816 | if test $ac_cv_sys_largefile_source != unknown; then | |
067d23c9 | 14817 | |
5476a9a4 | 14818 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h |
067d23c9 | 14819 | |
5476a9a4 | 14820 | fi |
067d23c9 KY |
14821 | |
14822 | ||
5476a9a4 GM |
14823 | # UNIX98 PTYs. |
14824 | for ac_func in grantpt | |
14825 | do : | |
14826 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
14827 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
14828 | cat >>confdefs.h <<_ACEOF | |
14829 | #define HAVE_GRANTPT 1 | |
14830 | _ACEOF | |
f199cab1 | 14831 | |
5476a9a4 GM |
14832 | fi |
14833 | done | |
f199cab1 | 14834 | |
f199cab1 | 14835 | |
5476a9a4 | 14836 | # PTY-related GNU extensions. |
1146da8d | 14837 | for ac_func in getpt posix_openpt |
5476a9a4 | 14838 | do : |
1146da8d GM |
14839 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
14840 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14841 | eval as_val=\$$as_ac_var | |
14842 | if test "x$as_val" = x""yes; then : | |
5476a9a4 | 14843 | cat >>confdefs.h <<_ACEOF |
1146da8d | 14844 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
5476a9a4 | 14845 | _ACEOF |
f199cab1 | 14846 | |
5476a9a4 GM |
14847 | fi |
14848 | done | |
f199cab1 | 14849 | |
f199cab1 | 14850 | |
5476a9a4 GM |
14851 | # Check this now, so that we will NOT find the above functions in ncurses. |
14852 | # That is because we have not set up to link ncurses in lib-src. | |
14853 | # It's better to believe a function is not available | |
14854 | # than to expect to find it in ncurses. | |
14855 | # Also we need tputs and friends to be able to build at all. | |
14856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
14857 | $as_echo_n "checking for library containing tputs... " >&6; } | |
14858 | # Run a test program that contains a call to tputs, a call that is | |
14859 | # never executed. This tests whether a pre-'main' dynamic linker | |
14860 | # works with the library. It's too much trouble to actually call | |
14861 | # tputs in the test program, due to portability hassles. When | |
14862 | # cross-compiling, assume the test program will run if it links. | |
f199cab1 | 14863 | |
7c61eaab GM |
14864 | if test "${opsys}" = "mingw32"; then |
14865 | msg='none required' | |
14866 | else | |
14867 | # Maybe curses should be tried earlier? | |
14868 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 | |
14869 | for tputs_library in '' tinfo ncurses terminfo termcap curses; do | |
14870 | OLIBS=$LIBS | |
14871 | if test -z "$tputs_library"; then | |
14872 | LIBS_TERMCAP= | |
14873 | msg='none required' | |
14874 | else | |
14875 | LIBS_TERMCAP=-l$tputs_library | |
14876 | msg=$LIBS_TERMCAP | |
14877 | LIBS="$LIBS_TERMCAP $LIBS" | |
14878 | fi | |
14879 | if test "$cross_compiling" = yes; then : | |
5476a9a4 | 14880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
14881 | /* end confdefs.h. */ |
14882 | ||
5476a9a4 GM |
14883 | extern void tputs (const char *, int, int (*)(int)); |
14884 | int main (int argc, char **argv) | |
14885 | { | |
14886 | if (argc == 10000) | |
14887 | tputs (argv[0], 0, 0); | |
14888 | return 0; | |
14889 | } | |
14890 | ||
067d23c9 KY |
14891 | _ACEOF |
14892 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14893 | |
067d23c9 | 14894 | else |
5476a9a4 | 14895 | msg=no |
067d23c9 KY |
14896 | fi |
14897 | rm -f core conftest.err conftest.$ac_objext \ | |
14898 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 14899 | else |
5476a9a4 | 14900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
14901 | /* end confdefs.h. */ |
14902 | ||
5476a9a4 GM |
14903 | extern void tputs (const char *, int, int (*)(int)); |
14904 | int main (int argc, char **argv) | |
14905 | { | |
14906 | if (argc == 10000) | |
14907 | tputs (argv[0], 0, 0); | |
14908 | return 0; | |
14909 | } | |
14910 | ||
067d23c9 | 14911 | _ACEOF |
5476a9a4 GM |
14912 | if ac_fn_c_try_run "$LINENO"; then : |
14913 | ||
067d23c9 | 14914 | else |
5476a9a4 | 14915 | msg=no |
067d23c9 | 14916 | fi |
5476a9a4 GM |
14917 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14918 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 14919 | fi |
5476a9a4 | 14920 | |
7c61eaab GM |
14921 | LIBS=$OLIBS |
14922 | if test "X$msg" != Xno; then | |
14923 | break | |
14924 | fi | |
14925 | done | |
14926 | fi | |
5476a9a4 GM |
14927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 |
14928 | $as_echo "$msg" >&6; } | |
14929 | if test "X$msg" = Xno; then | |
14930 | as_fn_error "The required function \`tputs' was not found in any library. | |
14931 | The following libraries were tried (in order): | |
14932 | libtinfo, libncurses, libterminfo, libtermcap, libcurses | |
14933 | Please try installing whichever of these libraries is most appropriate | |
14934 | for your system, together with its header files. | |
14935 | For example, a libncurses-dev(el) or similar package." "$LINENO" 5 | |
067d23c9 KY |
14936 | fi |
14937 | ||
5476a9a4 GM |
14938 | ## Use termcap instead of terminfo? |
14939 | ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. | |
14940 | TERMINFO=yes | |
14941 | ## FIXME? In the cases below where we unconditionally set | |
14942 | ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, | |
14943 | ## if that was found above to have tputs. | |
14944 | ## Should we use the gnu* logic everywhere? | |
14945 | case "$opsys" in | |
14946 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
14947 | ## The ncurses library has been moved out of the System framework in | |
14948 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
14949 | ## option to use it. | |
14950 | darwin) LIBS_TERMCAP="-lncurses" ;; | |
14951 | ||
14952 | gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; | |
14953 | ||
14954 | freebsd) | |
14955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
14956 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
14957 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
067d23c9 KY |
14958 | $as_echo_n "(cached) " >&6 |
14959 | else | |
5476a9a4 | 14960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 14961 | /* end confdefs.h. */ |
5476a9a4 | 14962 | #include <osreldate.h> |
067d23c9 KY |
14963 | int |
14964 | main () | |
14965 | { | |
5476a9a4 GM |
14966 | #if __FreeBSD_version < 400000 |
14967 | fail; | |
14968 | #endif | |
14969 | ||
067d23c9 KY |
14970 | ; |
14971 | return 0; | |
14972 | } | |
14973 | _ACEOF | |
14974 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14975 | emacs_cv_freebsd_terminfo=yes |
067d23c9 | 14976 | else |
5476a9a4 | 14977 | emacs_cv_freebsd_terminfo=no |
067d23c9 KY |
14978 | fi |
14979 | rm -f core conftest.err conftest.$ac_objext \ | |
14980 | conftest$ac_exeext conftest.$ac_ext | |
14981 | fi | |
5476a9a4 GM |
14982 | |
14983 | ||
14984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
14985 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
14986 | ||
14987 | if test $emacs_cv_freebsd_terminfo = yes; then | |
14988 | LIBS_TERMCAP="-lncurses" | |
14989 | else | |
14990 | TERMINFO=no | |
14991 | LIBS_TERMCAP="-ltermcap" | |
14992 | fi | |
14993 | ;; | |
14994 | ||
7c61eaab GM |
14995 | mingw32) |
14996 | TERMINFO=no | |
14997 | LIBS_TERMCAP= | |
14998 | ;; | |
14999 | ||
5476a9a4 GM |
15000 | netbsd) |
15001 | if test "x$LIBS_TERMCAP" != "x-lterminfo"; then | |
15002 | TERMINFO=no | |
15003 | LIBS_TERMCAP="-ltermcap" | |
15004 | fi | |
15005 | ;; | |
15006 | ||
87e1a811 | 15007 | openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;; |
5476a9a4 GM |
15008 | |
15009 | ## hpux: Make sure we get select from libc rather than from libcurses | |
15010 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
15011 | ## We used to use -lc -lcurses, but this may be cleaner. | |
15012 | ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly | |
15013 | # set that way, now it uses the default). Isn't this a contradiction? | |
15014 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
15015 | ||
15016 | esac | |
15017 | ||
15018 | TERMCAP_OBJ=tparam.o | |
15019 | if test $TERMINFO = yes; then | |
15020 | ||
15021 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
15022 | ||
15023 | TERMCAP_OBJ=terminfo.o | |
067d23c9 | 15024 | fi |
20d5e28a GM |
15025 | if test "X$LIBS_TERMCAP" = "X-lncurses"; then |
15026 | ||
15027 | $as_echo "#define USE_NCURSES 1" >>confdefs.h | |
15028 | ||
15029 | fi | |
067d23c9 | 15030 | |
f199cab1 | 15031 | |
067d23c9 | 15032 | |
5476a9a4 GM |
15033 | |
15034 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
15035 | # On Darwin, res_init appears not to be useful: see bug#562 and | |
15036 | # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html | |
15037 | resolv=no | |
15038 | ||
15039 | if test $opsys != darwin; then | |
15040 | ||
15041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15042 | /* end confdefs.h. */ | |
15043 | #include <netinet/in.h> | |
15044 | #include <arpa/nameser.h> | |
15045 | #include <resolv.h> | |
067d23c9 KY |
15046 | int |
15047 | main () | |
15048 | { | |
5476a9a4 | 15049 | return res_init(); |
067d23c9 KY |
15050 | ; |
15051 | return 0; | |
15052 | } | |
15053 | _ACEOF | |
15054 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 15055 | have_res_init=yes |
067d23c9 | 15056 | else |
5476a9a4 | 15057 | have_res_init=no |
067d23c9 KY |
15058 | fi |
15059 | rm -f core conftest.err conftest.$ac_objext \ | |
15060 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
15061 | if test "$have_res_init" = no; then |
15062 | OLIBS="$LIBS" | |
15063 | LIBS="$LIBS -lresolv" | |
15064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
15065 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
15066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 15067 | /* end confdefs.h. */ |
5476a9a4 GM |
15068 | #include <netinet/in.h> |
15069 | #include <arpa/nameser.h> | |
15070 | #include <resolv.h> | |
067d23c9 KY |
15071 | int |
15072 | main () | |
15073 | { | |
5476a9a4 | 15074 | return res_init(); |
067d23c9 KY |
15075 | ; |
15076 | return 0; | |
15077 | } | |
15078 | _ACEOF | |
15079 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 15080 | have_res_init=yes |
067d23c9 | 15081 | else |
5476a9a4 | 15082 | have_res_init=no |
067d23c9 KY |
15083 | fi |
15084 | rm -f core conftest.err conftest.$ac_objext \ | |
15085 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
15086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 |
15087 | $as_echo "$have_res_init" >&6; } | |
15088 | if test "$have_res_init" = yes ; then | |
15089 | resolv=yes | |
15090 | fi | |
15091 | LIBS="$OLIBS" | |
15092 | fi | |
067d23c9 | 15093 | |
5476a9a4 GM |
15094 | if test "$have_res_init" = yes; then |
15095 | ||
15096 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
067d23c9 | 15097 | |
5476a9a4 | 15098 | fi |
067d23c9 | 15099 | fi |
5476a9a4 GM |
15100 | # Do we need the Hesiod library to provide the support routines? |
15101 | LIBHESIOD= | |
15102 | if test "$with_hesiod" != no ; then | |
15103 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
15104 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
15105 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
f199cab1 | 15106 | |
5476a9a4 GM |
15107 | else |
15108 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
15109 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
f199cab1 | 15110 | |
5476a9a4 GM |
15111 | else |
15112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
15113 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
15114 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
067d23c9 KY |
15115 | $as_echo_n "(cached) " >&6 |
15116 | else | |
15117 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 15118 | LIBS="-lresolv $LIBS" |
067d23c9 KY |
15119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15120 | /* end confdefs.h. */ | |
15121 | ||
15122 | /* Override any GCC internal prototype to avoid an error. | |
15123 | Use char because int might match the return type of a GCC | |
15124 | builtin and then its argument prototype would still apply. */ | |
15125 | #ifdef __cplusplus | |
15126 | extern "C" | |
15127 | #endif | |
5476a9a4 | 15128 | char res_send (); |
067d23c9 KY |
15129 | int |
15130 | main () | |
15131 | { | |
5476a9a4 | 15132 | return res_send (); |
067d23c9 KY |
15133 | ; |
15134 | return 0; | |
15135 | } | |
15136 | _ACEOF | |
15137 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 15138 | ac_cv_lib_resolv_res_send=yes |
067d23c9 | 15139 | else |
5476a9a4 | 15140 | ac_cv_lib_resolv_res_send=no |
067d23c9 KY |
15141 | fi |
15142 | rm -f core conftest.err conftest.$ac_objext \ | |
f199cab1 GM |
15143 | conftest$ac_exeext conftest.$ac_ext |
15144 | LIBS=$ac_check_lib_save_LIBS | |
15145 | fi | |
5476a9a4 GM |
15146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 |
15147 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
15148 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
15149 | resolv=yes | |
15150 | else | |
15151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
15152 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
15153 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
f199cab1 GM |
15154 | $as_echo_n "(cached) " >&6 |
15155 | else | |
15156 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 15157 | LIBS="-lresolv $LIBS" |
f199cab1 GM |
15158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15159 | /* end confdefs.h. */ | |
4717915f | 15160 | |
f199cab1 GM |
15161 | /* Override any GCC internal prototype to avoid an error. |
15162 | Use char because int might match the return type of a GCC | |
15163 | builtin and then its argument prototype would still apply. */ | |
15164 | #ifdef __cplusplus | |
15165 | extern "C" | |
15166 | #endif | |
5476a9a4 | 15167 | char __res_send (); |
f199cab1 GM |
15168 | int |
15169 | main () | |
15170 | { | |
5476a9a4 | 15171 | return __res_send (); |
f199cab1 GM |
15172 | ; |
15173 | return 0; | |
15174 | } | |
15175 | _ACEOF | |
15176 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 15177 | ac_cv_lib_resolv___res_send=yes |
f199cab1 | 15178 | else |
5476a9a4 | 15179 | ac_cv_lib_resolv___res_send=no |
f199cab1 GM |
15180 | fi |
15181 | rm -f core conftest.err conftest.$ac_objext \ | |
15182 | conftest$ac_exeext conftest.$ac_ext | |
15183 | LIBS=$ac_check_lib_save_LIBS | |
15184 | fi | |
5476a9a4 GM |
15185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 |
15186 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
15187 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
15188 | resolv=yes | |
067d23c9 | 15189 | fi |
f199cab1 | 15190 | |
5476a9a4 | 15191 | fi |
1f5d53eb | 15192 | |
5476a9a4 | 15193 | fi |
067d23c9 | 15194 | |
067d23c9 KY |
15195 | fi |
15196 | ||
5476a9a4 GM |
15197 | if test "$resolv" = yes ; then |
15198 | RESOLVLIB=-lresolv | |
15199 | else | |
15200 | RESOLVLIB= | |
15201 | fi | |
15202 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
15203 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
15204 | ||
15205 | else | |
15206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
15207 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
15208 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
15209 | $as_echo_n "(cached) " >&6 | |
15210 | else | |
15211 | ac_check_lib_save_LIBS=$LIBS | |
15212 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
15213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 15214 | /* end confdefs.h. */ |
5476a9a4 GM |
15215 | |
15216 | /* Override any GCC internal prototype to avoid an error. | |
15217 | Use char because int might match the return type of a GCC | |
15218 | builtin and then its argument prototype would still apply. */ | |
15219 | #ifdef __cplusplus | |
15220 | extern "C" | |
15221 | #endif | |
15222 | char hes_getmailhost (); | |
067d23c9 KY |
15223 | int |
15224 | main () | |
15225 | { | |
5476a9a4 | 15226 | return hes_getmailhost (); |
067d23c9 KY |
15227 | ; |
15228 | return 0; | |
15229 | } | |
15230 | _ACEOF | |
f199cab1 | 15231 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 GM |
15232 | ac_cv_lib_hesiod_hes_getmailhost=yes |
15233 | else | |
15234 | ac_cv_lib_hesiod_hes_getmailhost=no | |
067d23c9 | 15235 | fi |
f199cab1 GM |
15236 | rm -f core conftest.err conftest.$ac_objext \ |
15237 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 15238 | LIBS=$ac_check_lib_save_LIBS |
067d23c9 | 15239 | fi |
5476a9a4 GM |
15240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 |
15241 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
15242 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
15243 | hesiod=yes | |
15244 | else | |
15245 | : | |
067d23c9 KY |
15246 | fi |
15247 | ||
c5a68906 | 15248 | fi |
f199cab1 GM |
15249 | |
15250 | ||
5476a9a4 | 15251 | if test x"$hesiod" = xyes; then |
5476a9a4 | 15252 | LIBHESIOD=-lhesiod |
c5a68906 | 15253 | fi |
5476a9a4 | 15254 | fi |
4fc2b746 | 15255 | |
4fc2b746 | 15256 | |
5476a9a4 GM |
15257 | # Do we need libresolv (due to res_init or Hesiod)? |
15258 | if test "$resolv" = yes && test $opsys != darwin; then | |
5476a9a4 GM |
15259 | LIBRESOLV=-lresolv |
15260 | else | |
15261 | LIBRESOLV= | |
15262 | fi | |
4fc2b746 | 15263 | |
4fc2b746 | 15264 | |
5476a9a4 GM |
15265 | # These tell us which Kerberos-related libraries to use. |
15266 | COM_ERRLIB= | |
15267 | CRYPTOLIB= | |
15268 | KRB5LIB= | |
15269 | DESLIB= | |
15270 | KRB4LIB= | |
4fc2b746 | 15271 | |
5476a9a4 GM |
15272 | if test "${with_kerberos}" != no; then |
15273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
15274 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
15275 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
15276 | $as_echo_n "(cached) " >&6 | |
15277 | else | |
15278 | ac_check_lib_save_LIBS=$LIBS | |
15279 | LIBS="-lcom_err $LIBS" | |
15280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15281 | /* end confdefs.h. */ | |
4fc2b746 | 15282 | |
5476a9a4 GM |
15283 | /* Override any GCC internal prototype to avoid an error. |
15284 | Use char because int might match the return type of a GCC | |
15285 | builtin and then its argument prototype would still apply. */ | |
15286 | #ifdef __cplusplus | |
15287 | extern "C" | |
15288 | #endif | |
15289 | char com_err (); | |
15290 | int | |
15291 | main () | |
15292 | { | |
15293 | return com_err (); | |
15294 | ; | |
15295 | return 0; | |
15296 | } | |
15297 | _ACEOF | |
15298 | if ac_fn_c_try_link "$LINENO"; then : | |
15299 | ac_cv_lib_com_err_com_err=yes | |
15300 | else | |
15301 | ac_cv_lib_com_err_com_err=no | |
15302 | fi | |
15303 | rm -f core conftest.err conftest.$ac_objext \ | |
15304 | conftest$ac_exeext conftest.$ac_ext | |
15305 | LIBS=$ac_check_lib_save_LIBS | |
15306 | fi | |
15307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
15308 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
15309 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
15310 | have_com_err=yes | |
15311 | else | |
15312 | have_com_err=no | |
15313 | fi | |
f199cab1 | 15314 | |
5476a9a4 GM |
15315 | if test $have_com_err = yes; then |
15316 | COM_ERRLIB=-lcom_err | |
15317 | LIBS="$COM_ERRLIB $LIBS" | |
5476a9a4 GM |
15318 | fi |
15319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
15320 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
15321 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
15322 | $as_echo_n "(cached) " >&6 | |
15323 | else | |
15324 | ac_check_lib_save_LIBS=$LIBS | |
15325 | LIBS="-lcrypto $LIBS" | |
15326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15327 | /* end confdefs.h. */ | |
f199cab1 | 15328 | |
5476a9a4 GM |
15329 | /* Override any GCC internal prototype to avoid an error. |
15330 | Use char because int might match the return type of a GCC | |
15331 | builtin and then its argument prototype would still apply. */ | |
15332 | #ifdef __cplusplus | |
15333 | extern "C" | |
15334 | #endif | |
15335 | char mit_des_cbc_encrypt (); | |
15336 | int | |
15337 | main () | |
15338 | { | |
15339 | return mit_des_cbc_encrypt (); | |
15340 | ; | |
15341 | return 0; | |
15342 | } | |
15343 | _ACEOF | |
15344 | if ac_fn_c_try_link "$LINENO"; then : | |
15345 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
15346 | else | |
15347 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
15348 | fi | |
15349 | rm -f core conftest.err conftest.$ac_objext \ | |
15350 | conftest$ac_exeext conftest.$ac_ext | |
15351 | LIBS=$ac_check_lib_save_LIBS | |
15352 | fi | |
15353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
15354 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
15355 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
15356 | have_crypto=yes | |
15357 | else | |
15358 | have_crypto=no | |
15359 | fi | |
f199cab1 | 15360 | |
5476a9a4 GM |
15361 | if test $have_crypto = yes; then |
15362 | CRYPTOLIB=-lcrypto | |
15363 | LIBS="$CRYPTOLIB $LIBS" | |
5476a9a4 GM |
15364 | fi |
15365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
15366 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
15367 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
15368 | $as_echo_n "(cached) " >&6 | |
15369 | else | |
15370 | ac_check_lib_save_LIBS=$LIBS | |
15371 | LIBS="-lk5crypto $LIBS" | |
15372 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15373 | /* end confdefs.h. */ | |
f199cab1 | 15374 | |
5476a9a4 GM |
15375 | /* Override any GCC internal prototype to avoid an error. |
15376 | Use char because int might match the return type of a GCC | |
15377 | builtin and then its argument prototype would still apply. */ | |
15378 | #ifdef __cplusplus | |
15379 | extern "C" | |
15380 | #endif | |
15381 | char mit_des_cbc_encrypt (); | |
15382 | int | |
15383 | main () | |
15384 | { | |
15385 | return mit_des_cbc_encrypt (); | |
15386 | ; | |
15387 | return 0; | |
15388 | } | |
15389 | _ACEOF | |
15390 | if ac_fn_c_try_link "$LINENO"; then : | |
15391 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
15392 | else | |
15393 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
15394 | fi | |
15395 | rm -f core conftest.err conftest.$ac_objext \ | |
15396 | conftest$ac_exeext conftest.$ac_ext | |
15397 | LIBS=$ac_check_lib_save_LIBS | |
15398 | fi | |
15399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
15400 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
15401 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
15402 | have_k5crypto=yes | |
15403 | else | |
15404 | have_k5crypto=no | |
4fc2b746 | 15405 | fi |
4fc2b746 | 15406 | |
5476a9a4 GM |
15407 | if test $have_k5crypto = yes; then |
15408 | CRYPTOLIB=-lk5crypto | |
15409 | LIBS="$CRYPTOLIB $LIBS" | |
5476a9a4 GM |
15410 | fi |
15411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
15412 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
15413 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
15414 | $as_echo_n "(cached) " >&6 | |
15415 | else | |
15416 | ac_check_lib_save_LIBS=$LIBS | |
15417 | LIBS="-lkrb5 $LIBS" | |
15418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15419 | /* end confdefs.h. */ | |
4fc2b746 | 15420 | |
5476a9a4 GM |
15421 | /* Override any GCC internal prototype to avoid an error. |
15422 | Use char because int might match the return type of a GCC | |
15423 | builtin and then its argument prototype would still apply. */ | |
15424 | #ifdef __cplusplus | |
15425 | extern "C" | |
15426 | #endif | |
15427 | char krb5_init_context (); | |
15428 | int | |
15429 | main () | |
15430 | { | |
15431 | return krb5_init_context (); | |
15432 | ; | |
15433 | return 0; | |
15434 | } | |
15435 | _ACEOF | |
15436 | if ac_fn_c_try_link "$LINENO"; then : | |
15437 | ac_cv_lib_krb5_krb5_init_context=yes | |
15438 | else | |
15439 | ac_cv_lib_krb5_krb5_init_context=no | |
15440 | fi | |
15441 | rm -f core conftest.err conftest.$ac_objext \ | |
15442 | conftest$ac_exeext conftest.$ac_ext | |
15443 | LIBS=$ac_check_lib_save_LIBS | |
15444 | fi | |
15445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
15446 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
15447 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
15448 | have_krb5=yes | |
15449 | else | |
15450 | have_krb5=no | |
15451 | fi | |
f199cab1 | 15452 | |
5476a9a4 GM |
15453 | if test $have_krb5=yes; then |
15454 | KRB5LIB=-lkrb5 | |
15455 | LIBS="$KRB5LIB $LIBS" | |
5476a9a4 GM |
15456 | fi |
15457 | if test "${with_kerberos5}" = no; then | |
15458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
15459 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
15460 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
f199cab1 GM |
15461 | $as_echo_n "(cached) " >&6 |
15462 | else | |
5476a9a4 GM |
15463 | ac_check_lib_save_LIBS=$LIBS |
15464 | LIBS="-ldes425 $LIBS" | |
15465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 15466 | /* end confdefs.h. */ |
f199cab1 | 15467 | |
5476a9a4 GM |
15468 | /* Override any GCC internal prototype to avoid an error. |
15469 | Use char because int might match the return type of a GCC | |
15470 | builtin and then its argument prototype would still apply. */ | |
15471 | #ifdef __cplusplus | |
15472 | extern "C" | |
15473 | #endif | |
15474 | char des_cbc_encrypt (); | |
3e0be4ab GM |
15475 | int |
15476 | main () | |
15477 | { | |
5476a9a4 | 15478 | return des_cbc_encrypt (); |
3e0be4ab GM |
15479 | ; |
15480 | return 0; | |
15481 | } | |
15482 | _ACEOF | |
5476a9a4 GM |
15483 | if ac_fn_c_try_link "$LINENO"; then : |
15484 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
3e0be4ab | 15485 | else |
5476a9a4 | 15486 | ac_cv_lib_des425_des_cbc_encrypt=no |
3e0be4ab | 15487 | fi |
5476a9a4 GM |
15488 | rm -f core conftest.err conftest.$ac_objext \ |
15489 | conftest$ac_exeext conftest.$ac_ext | |
15490 | LIBS=$ac_check_lib_save_LIBS | |
4fc2b746 | 15491 | fi |
5476a9a4 GM |
15492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 |
15493 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
15494 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
15495 | have_des425=yes | |
15496 | else | |
15497 | have_des425=no | |
f199cab1 | 15498 | fi |
6c051bab | 15499 | |
5476a9a4 GM |
15500 | if test $have_des425 = yes; then |
15501 | DESLIB=-ldes425 | |
15502 | LIBS="$DESLIB $LIBS" | |
5476a9a4 GM |
15503 | else |
15504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
15505 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
15506 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
15507 | $as_echo_n "(cached) " >&6 | |
15508 | else | |
15509 | ac_check_lib_save_LIBS=$LIBS | |
15510 | LIBS="-ldes $LIBS" | |
15511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15512 | /* end confdefs.h. */ | |
f199cab1 | 15513 | |
5476a9a4 GM |
15514 | /* Override any GCC internal prototype to avoid an error. |
15515 | Use char because int might match the return type of a GCC | |
15516 | builtin and then its argument prototype would still apply. */ | |
15517 | #ifdef __cplusplus | |
15518 | extern "C" | |
15519 | #endif | |
15520 | char des_cbc_encrypt (); | |
15521 | int | |
15522 | main () | |
15523 | { | |
15524 | return des_cbc_encrypt (); | |
15525 | ; | |
15526 | return 0; | |
15527 | } | |
15528 | _ACEOF | |
15529 | if ac_fn_c_try_link "$LINENO"; then : | |
15530 | ac_cv_lib_des_des_cbc_encrypt=yes | |
15531 | else | |
15532 | ac_cv_lib_des_des_cbc_encrypt=no | |
15533 | fi | |
15534 | rm -f core conftest.err conftest.$ac_objext \ | |
15535 | conftest$ac_exeext conftest.$ac_ext | |
15536 | LIBS=$ac_check_lib_save_LIBS | |
15537 | fi | |
15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
15539 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
15540 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
15541 | have_des=yes | |
15542 | else | |
15543 | have_des=no | |
15544 | fi | |
f199cab1 | 15545 | |
5476a9a4 GM |
15546 | if test $have_des = yes; then |
15547 | DESLIB=-ldes | |
15548 | LIBS="$DESLIB $LIBS" | |
5476a9a4 GM |
15549 | fi |
15550 | fi | |
15551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
15552 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
15553 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
942f733f PE |
15554 | $as_echo_n "(cached) " >&6 |
15555 | else | |
5476a9a4 GM |
15556 | ac_check_lib_save_LIBS=$LIBS |
15557 | LIBS="-lkrb4 $LIBS" | |
15558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 15559 | /* end confdefs.h. */ |
942f733f | 15560 | |
5476a9a4 GM |
15561 | /* Override any GCC internal prototype to avoid an error. |
15562 | Use char because int might match the return type of a GCC | |
15563 | builtin and then its argument prototype would still apply. */ | |
15564 | #ifdef __cplusplus | |
15565 | extern "C" | |
15566 | #endif | |
15567 | char krb_get_cred (); | |
942f733f PE |
15568 | int |
15569 | main () | |
15570 | { | |
5476a9a4 | 15571 | return krb_get_cred (); |
942f733f PE |
15572 | ; |
15573 | return 0; | |
15574 | } | |
15575 | _ACEOF | |
5476a9a4 GM |
15576 | if ac_fn_c_try_link "$LINENO"; then : |
15577 | ac_cv_lib_krb4_krb_get_cred=yes | |
15578 | else | |
15579 | ac_cv_lib_krb4_krb_get_cred=no | |
15580 | fi | |
15581 | rm -f core conftest.err conftest.$ac_objext \ | |
15582 | conftest$ac_exeext conftest.$ac_ext | |
15583 | LIBS=$ac_check_lib_save_LIBS | |
15584 | fi | |
15585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
15586 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
15587 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
15588 | have_krb4=yes | |
15589 | else | |
15590 | have_krb4=no | |
15591 | fi | |
15592 | ||
15593 | if test $have_krb4 = yes; then | |
15594 | KRB4LIB=-lkrb4 | |
15595 | LIBS="$KRB4LIB $LIBS" | |
5476a9a4 GM |
15596 | else |
15597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
15598 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
15599 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
15600 | $as_echo_n "(cached) " >&6 | |
3e0be4ab | 15601 | else |
5476a9a4 GM |
15602 | ac_check_lib_save_LIBS=$LIBS |
15603 | LIBS="-lkrb $LIBS" | |
15604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 15605 | /* end confdefs.h. */ |
942f733f | 15606 | |
5476a9a4 GM |
15607 | /* Override any GCC internal prototype to avoid an error. |
15608 | Use char because int might match the return type of a GCC | |
15609 | builtin and then its argument prototype would still apply. */ | |
15610 | #ifdef __cplusplus | |
15611 | extern "C" | |
15612 | #endif | |
15613 | char krb_get_cred (); | |
942f733f PE |
15614 | int |
15615 | main () | |
15616 | { | |
5476a9a4 | 15617 | return krb_get_cred (); |
942f733f PE |
15618 | ; |
15619 | return 0; | |
15620 | } | |
15621 | _ACEOF | |
5476a9a4 GM |
15622 | if ac_fn_c_try_link "$LINENO"; then : |
15623 | ac_cv_lib_krb_krb_get_cred=yes | |
942f733f | 15624 | else |
5476a9a4 | 15625 | ac_cv_lib_krb_krb_get_cred=no |
942f733f | 15626 | fi |
5476a9a4 GM |
15627 | rm -f core conftest.err conftest.$ac_objext \ |
15628 | conftest$ac_exeext conftest.$ac_ext | |
15629 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 15630 | fi |
5476a9a4 GM |
15631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 |
15632 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
15633 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
15634 | have_krb=yes | |
15635 | else | |
15636 | have_krb=no | |
942f733f | 15637 | fi |
f199cab1 | 15638 | |
5476a9a4 GM |
15639 | if test $have_krb = yes; then |
15640 | KRB4LIB=-lkrb | |
15641 | LIBS="$KRB4LIB $LIBS" | |
5476a9a4 GM |
15642 | fi |
15643 | fi | |
f199cab1 GM |
15644 | fi |
15645 | ||
5476a9a4 GM |
15646 | if test "${with_kerberos5}" != no; then |
15647 | for ac_header in krb5.h | |
15648 | do : | |
15649 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
15650 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
15651 | cat >>confdefs.h <<_ACEOF | |
15652 | #define HAVE_KRB5_H 1 | |
15653 | _ACEOF | |
15654 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
15655 | " | |
15656 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
15657 | ||
f199cab1 | 15658 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 15659 | #define HAVE_KRB5_ERROR_TEXT 1 |
f199cab1 GM |
15660 | _ACEOF |
15661 | ||
15662 | ||
5476a9a4 GM |
15663 | fi |
15664 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
15665 | " | |
15666 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
f199cab1 | 15667 | |
5476a9a4 GM |
15668 | cat >>confdefs.h <<_ACEOF |
15669 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
15670 | _ACEOF | |
f199cab1 GM |
15671 | |
15672 | ||
5476a9a4 | 15673 | fi |
f199cab1 | 15674 | |
5476a9a4 | 15675 | fi |
f199cab1 | 15676 | |
5476a9a4 | 15677 | done |
f199cab1 | 15678 | |
5476a9a4 | 15679 | else |
5476a9a4 | 15680 | for ac_header in krb.h |
f199cab1 | 15681 | do : |
5476a9a4 GM |
15682 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" |
15683 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
f199cab1 | 15684 | cat >>confdefs.h <<_ACEOF |
5476a9a4 GM |
15685 | #define HAVE_KRB_H 1 |
15686 | _ACEOF | |
15687 | ||
15688 | else | |
15689 | for ac_header in kerberosIV/krb.h | |
15690 | do : | |
15691 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
15692 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
15693 | cat >>confdefs.h <<_ACEOF | |
15694 | #define HAVE_KERBEROSIV_KRB_H 1 | |
15695 | _ACEOF | |
15696 | ||
15697 | else | |
15698 | for ac_header in kerberos/krb.h | |
15699 | do : | |
15700 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
15701 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
15702 | cat >>confdefs.h <<_ACEOF | |
15703 | #define HAVE_KERBEROS_KRB_H 1 | |
f199cab1 | 15704 | _ACEOF |
942f733f | 15705 | |
3e0be4ab | 15706 | fi |
942f733f | 15707 | |
f199cab1 GM |
15708 | done |
15709 | ||
5476a9a4 GM |
15710 | fi |
15711 | ||
15712 | done | |
15713 | ||
15714 | fi | |
15715 | ||
15716 | done | |
15717 | ||
15718 | fi | |
15719 | for ac_header in com_err.h | |
f199cab1 | 15720 | do : |
5476a9a4 GM |
15721 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" |
15722 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
f199cab1 | 15723 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 15724 | #define HAVE_COM_ERR_H 1 |
f199cab1 GM |
15725 | _ACEOF |
15726 | ||
3e0be4ab | 15727 | fi |
f199cab1 | 15728 | |
5476a9a4 | 15729 | done |
3e0be4ab GM |
15730 | |
15731 | fi | |
15732 | ||
f199cab1 GM |
15733 | |
15734 | ||
15735 | ||
15736 | ||
f199cab1 GM |
15737 | |
15738 | ||
15739 | ||
15740 | ||
15741 | ||
5476a9a4 GM |
15742 | for ac_func in $ac_func_list |
15743 | do : | |
15744 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15745 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15746 | eval as_val=\$$as_ac_var | |
15747 | if test "x$as_val" = x""yes; then : | |
15748 | cat >>confdefs.h <<_ACEOF | |
15749 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15750 | _ACEOF | |
15751 | ||
15752 | fi | |
15753 | done | |
15754 | ||
f199cab1 GM |
15755 | |
15756 | ||
15757 | ||
5476a9a4 GM |
15758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 |
15759 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
15760 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
15761 | $as_echo_n "(cached) " >&6 | |
15762 | else | |
15763 | if test x$ac_cv_func_tzset = xyes; then | |
15764 | if test "$cross_compiling" = yes; then : | |
15765 | # If we have tzset, assume the worst when cross-compiling. | |
15766 | emacs_cv_localtime_cache=yes | |
15767 | else | |
15768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15769 | /* end confdefs.h. */ | |
15770 | #include <time.h> | |
15771 | char TZ_GMT0[] = "TZ=GMT0"; | |
15772 | char TZ_PST8[] = "TZ=PST8"; | |
15773 | main() | |
15774 | { | |
15775 | time_t now = time ((time_t *) 0); | |
15776 | int hour_GMT0, hour_unset; | |
15777 | if (putenv (TZ_GMT0) != 0) | |
15778 | exit (1); | |
15779 | hour_GMT0 = localtime (&now)->tm_hour; | |
15780 | unsetenv("TZ"); | |
15781 | hour_unset = localtime (&now)->tm_hour; | |
15782 | if (putenv (TZ_PST8) != 0) | |
15783 | exit (1); | |
15784 | if (localtime (&now)->tm_hour == hour_GMT0) | |
15785 | exit (1); | |
15786 | unsetenv("TZ"); | |
15787 | if (localtime (&now)->tm_hour != hour_unset) | |
15788 | exit (1); | |
15789 | exit (0); | |
15790 | } | |
15791 | _ACEOF | |
15792 | if ac_fn_c_try_run "$LINENO"; then : | |
15793 | emacs_cv_localtime_cache=no | |
15794 | else | |
15795 | emacs_cv_localtime_cache=yes | |
15796 | fi | |
15797 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15798 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15799 | fi | |
f199cab1 | 15800 | |
5476a9a4 GM |
15801 | else |
15802 | # If we lack tzset, report that localtime does not cache TZ, | |
15803 | # since we can't invalidate the cache if we don't have tzset. | |
15804 | emacs_cv_localtime_cache=no | |
15805 | fi | |
15806 | fi | |
15807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
15808 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
15809 | if test $emacs_cv_localtime_cache = yes; then | |
f199cab1 | 15810 | |
5476a9a4 | 15811 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h |
f199cab1 | 15812 | |
5476a9a4 | 15813 | fi |
f199cab1 | 15814 | |
5476a9a4 GM |
15815 | ok_so_far=yes |
15816 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
15817 | if test "x$ac_cv_func_socket" = x""yes; then : | |
3e0be4ab | 15818 | |
5476a9a4 GM |
15819 | else |
15820 | ok_so_far=no | |
15821 | fi | |
f199cab1 | 15822 | |
5476a9a4 GM |
15823 | if test $ok_so_far = yes; then |
15824 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
15825 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
f199cab1 | 15826 | |
5476a9a4 GM |
15827 | else |
15828 | ok_so_far=no | |
15829 | fi | |
f199cab1 GM |
15830 | |
15831 | ||
5476a9a4 GM |
15832 | fi |
15833 | if test $ok_so_far = yes; then | |
15834 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
15835 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
f199cab1 | 15836 | |
5476a9a4 GM |
15837 | else |
15838 | ok_so_far=no | |
15839 | fi | |
f199cab1 GM |
15840 | |
15841 | ||
5476a9a4 GM |
15842 | fi |
15843 | if test $ok_so_far = yes; then | |
f199cab1 | 15844 | |
5476a9a4 | 15845 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
f199cab1 | 15846 | |
5476a9a4 | 15847 | fi |
f199cab1 | 15848 | |
bb7dce39 GM |
15849 | case $canonical in |
15850 | *-solaris2.4 | *-solaris2.4.*) | |
15851 | : ${ac_cv_func_vfork_works=no};; | |
15852 | esac | |
15853 | ||
5476a9a4 GM |
15854 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
15855 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
3e0be4ab | 15856 | |
5476a9a4 | 15857 | else |
3e0be4ab | 15858 | |
5476a9a4 GM |
15859 | cat >>confdefs.h <<_ACEOF |
15860 | #define pid_t int | |
15861 | _ACEOF | |
f199cab1 | 15862 | |
5476a9a4 | 15863 | fi |
f199cab1 | 15864 | |
5476a9a4 GM |
15865 | for ac_header in vfork.h |
15866 | do : | |
15867 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
15868 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
15869 | cat >>confdefs.h <<_ACEOF | |
15870 | #define HAVE_VFORK_H 1 | |
15871 | _ACEOF | |
f199cab1 | 15872 | |
5476a9a4 | 15873 | fi |
f199cab1 | 15874 | |
5476a9a4 | 15875 | done |
f199cab1 | 15876 | |
5476a9a4 GM |
15877 | for ac_func in fork vfork |
15878 | do : | |
15879 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15880 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15881 | eval as_val=\$$as_ac_var | |
15882 | if test "x$as_val" = x""yes; then : | |
15883 | cat >>confdefs.h <<_ACEOF | |
15884 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15885 | _ACEOF | |
f199cab1 | 15886 | |
5476a9a4 GM |
15887 | fi |
15888 | done | |
f199cab1 | 15889 | |
5476a9a4 GM |
15890 | if test "x$ac_cv_func_fork" = xyes; then |
15891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
15892 | $as_echo_n "checking for working fork... " >&6; } | |
15893 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
15894 | $as_echo_n "(cached) " >&6 | |
15895 | else | |
15896 | if test "$cross_compiling" = yes; then : | |
15897 | ac_cv_func_fork_works=cross | |
15898 | else | |
15899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15900 | /* end confdefs.h. */ | |
15901 | $ac_includes_default | |
15902 | int | |
15903 | main () | |
15904 | { | |
f199cab1 | 15905 | |
5476a9a4 GM |
15906 | /* By Ruediger Kuhlmann. */ |
15907 | return fork () < 0; | |
f199cab1 | 15908 | |
5476a9a4 GM |
15909 | ; |
15910 | return 0; | |
15911 | } | |
15912 | _ACEOF | |
15913 | if ac_fn_c_try_run "$LINENO"; then : | |
15914 | ac_cv_func_fork_works=yes | |
15915 | else | |
15916 | ac_cv_func_fork_works=no | |
15917 | fi | |
15918 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15919 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15920 | fi | |
f199cab1 | 15921 | |
5476a9a4 GM |
15922 | fi |
15923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
15924 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
f199cab1 | 15925 | |
5476a9a4 GM |
15926 | else |
15927 | ac_cv_func_fork_works=$ac_cv_func_fork | |
15928 | fi | |
15929 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15930 | case $host in | |
15931 | *-*-amigaos* | *-*-msdosdjgpp*) | |
15932 | # Override, as these systems have only a dummy fork() stub | |
15933 | ac_cv_func_fork_works=no | |
15934 | ;; | |
15935 | *) | |
15936 | ac_cv_func_fork_works=yes | |
15937 | ;; | |
15938 | esac | |
15939 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
15940 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
15941 | fi | |
15942 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15943 | if test "x$ac_cv_func_vfork" = xyes; then | |
15944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
15945 | $as_echo_n "checking for working vfork... " >&6; } | |
15946 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
f199cab1 GM |
15947 | $as_echo_n "(cached) " >&6 |
15948 | else | |
15949 | if test "$cross_compiling" = yes; then : | |
5476a9a4 | 15950 | ac_cv_func_vfork_works=cross |
f199cab1 GM |
15951 | else |
15952 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15953 | /* end confdefs.h. */ | |
5476a9a4 GM |
15954 | /* Thanks to Paul Eggert for this test. */ |
15955 | $ac_includes_default | |
15956 | #include <sys/wait.h> | |
15957 | #ifdef HAVE_VFORK_H | |
15958 | # include <vfork.h> | |
f199cab1 | 15959 | #endif |
5476a9a4 GM |
15960 | /* On some sparc systems, changes by the child to local and incoming |
15961 | argument registers are propagated back to the parent. The compiler | |
15962 | is told about this with #include <vfork.h>, but some compilers | |
15963 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
15964 | static variable whose address is put into a register that is | |
15965 | clobbered by the vfork. */ | |
15966 | static void | |
15967 | #ifdef __cplusplus | |
15968 | sparc_address_test (int arg) | |
15969 | # else | |
15970 | sparc_address_test (arg) int arg; | |
f199cab1 | 15971 | #endif |
5476a9a4 GM |
15972 | { |
15973 | static pid_t child; | |
15974 | if (!child) { | |
15975 | child = vfork (); | |
15976 | if (child < 0) { | |
15977 | perror ("vfork"); | |
15978 | _exit(2); | |
15979 | } | |
15980 | if (!child) { | |
15981 | arg = getpid(); | |
15982 | write(-1, "", 0); | |
15983 | _exit (arg); | |
15984 | } | |
15985 | } | |
15986 | } | |
f199cab1 | 15987 | |
5476a9a4 GM |
15988 | int |
15989 | main () | |
15990 | { | |
15991 | pid_t parent = getpid (); | |
15992 | pid_t child; | |
f199cab1 | 15993 | |
5476a9a4 | 15994 | sparc_address_test (0); |
f199cab1 | 15995 | |
5476a9a4 | 15996 | child = vfork (); |
3e0be4ab | 15997 | |
5476a9a4 GM |
15998 | if (child == 0) { |
15999 | /* Here is another test for sparc vfork register problems. This | |
16000 | test uses lots of local variables, at least as many local | |
16001 | variables as main has allocated so far including compiler | |
16002 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
16003 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
16004 | reuse the register of parent for one of the local variables, | |
16005 | since it will think that parent can't possibly be used any more | |
16006 | in this routine. Assigning to the local variable will thus | |
16007 | munge parent in the parent process. */ | |
16008 | pid_t | |
16009 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
16010 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
16011 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
16012 | use the same hardware register for all 8 local variables. */ | |
16013 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
16014 | || p != p5 || p != p6 || p != p7) | |
16015 | _exit(1); | |
3e0be4ab | 16016 | |
5476a9a4 GM |
16017 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
16018 | from child file descriptors. If the child closes a descriptor | |
16019 | before it execs or exits, this munges the parent's descriptor | |
16020 | as well. Test for this by closing stdout in the child. */ | |
16021 | _exit(close(fileno(stdout)) != 0); | |
16022 | } else { | |
16023 | int status; | |
16024 | struct stat st; | |
3e0be4ab | 16025 | |
5476a9a4 GM |
16026 | while (wait(&status) != child) |
16027 | ; | |
16028 | return ( | |
16029 | /* Was there some problem with vforking? */ | |
16030 | child < 0 | |
3e0be4ab | 16031 | |
5476a9a4 GM |
16032 | /* Did the child fail? (This shouldn't happen.) */ |
16033 | || status | |
16034 | ||
16035 | /* Did the vfork/compiler bug occur? */ | |
16036 | || parent != getpid() | |
16037 | ||
16038 | /* Did the file descriptor bug occur? */ | |
16039 | || fstat(fileno(stdout), &st) != 0 | |
16040 | ); | |
16041 | } | |
f199cab1 | 16042 | } |
5476a9a4 GM |
16043 | _ACEOF |
16044 | if ac_fn_c_try_run "$LINENO"; then : | |
16045 | ac_cv_func_vfork_works=yes | |
16046 | else | |
16047 | ac_cv_func_vfork_works=no | |
16048 | fi | |
16049 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16050 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16051 | fi | |
16052 | ||
16053 | fi | |
16054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
16055 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
16056 | ||
16057 | fi; | |
16058 | if test "x$ac_cv_func_fork_works" = xcross; then | |
16059 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
16060 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
16061 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
16062 | fi | |
16063 | ||
16064 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
3e0be4ab | 16065 | |
5476a9a4 | 16066 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
3e0be4ab | 16067 | |
5476a9a4 | 16068 | else |
3e0be4ab | 16069 | |
5476a9a4 | 16070 | $as_echo "#define vfork fork" >>confdefs.h |
942f733f | 16071 | |
5476a9a4 GM |
16072 | fi |
16073 | if test "x$ac_cv_func_fork_works" = xyes; then | |
942f733f | 16074 | |
5476a9a4 | 16075 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
942f733f | 16076 | |
5476a9a4 | 16077 | fi |
f199cab1 | 16078 | |
f199cab1 | 16079 | |
5476a9a4 GM |
16080 | for ac_func in snprintf |
16081 | do : | |
16082 | ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" | |
16083 | if test "x$ac_cv_func_snprintf" = x""yes; then : | |
16084 | cat >>confdefs.h <<_ACEOF | |
16085 | #define HAVE_SNPRINTF 1 | |
16086 | _ACEOF | |
16087 | ||
16088 | fi | |
16089 | done | |
16090 | ||
942f733f | 16091 | |
0f55a32e GM |
16092 | XGSELOBJ= |
16093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5 | |
16094 | $as_echo_n "checking whether GLib is linked in... " >&6; } | |
16095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16096 | /* end confdefs.h. */ | |
16097 | #include <glib.h> | |
16098 | ||
16099 | int | |
16100 | main () | |
16101 | { | |
16102 | g_print ("Hello world"); | |
16103 | ; | |
16104 | return 0; | |
16105 | } | |
16106 | _ACEOF | |
16107 | if ac_fn_c_try_link "$LINENO"; then : | |
16108 | links_glib=yes | |
16109 | else | |
16110 | links_glib=no | |
16111 | fi | |
16112 | rm -f core conftest.err conftest.$ac_objext \ | |
16113 | conftest$ac_exeext conftest.$ac_ext | |
16114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5 | |
16115 | $as_echo "$links_glib" >&6; } | |
16116 | if test "${links_glib}" = "yes"; then | |
16117 | ||
16118 | $as_echo "#define HAVE_GLIB 1" >>confdefs.h | |
16119 | ||
7cee6e79 GM |
16120 | if test "$HAVE_NS" = no;then |
16121 | XGSELOBJ=xgselect.o | |
16122 | fi | |
0f55a32e GM |
16123 | fi |
16124 | ||
16125 | ||
5476a9a4 GM |
16126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
16127 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
16128 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | |
16129 | $as_echo_n "(cached) " >&6 | |
16130 | else | |
16131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16132 | /* end confdefs.h. */ | |
16133 | #include <langinfo.h> | |
3e0be4ab GM |
16134 | int |
16135 | main () | |
16136 | { | |
5476a9a4 GM |
16137 | char* cs = nl_langinfo(CODESET); |
16138 | ; | |
16139 | return 0; | |
16140 | } | |
16141 | _ACEOF | |
16142 | if ac_fn_c_try_link "$LINENO"; then : | |
16143 | emacs_cv_langinfo_codeset=yes | |
16144 | else | |
16145 | emacs_cv_langinfo_codeset=no | |
16146 | fi | |
16147 | rm -f core conftest.err conftest.$ac_objext \ | |
16148 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 16149 | |
5476a9a4 GM |
16150 | fi |
16151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
16152 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
16153 | if test $emacs_cv_langinfo_codeset = yes; then | |
f199cab1 | 16154 | |
5476a9a4 | 16155 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
f199cab1 | 16156 | |
5476a9a4 | 16157 | fi |
f199cab1 | 16158 | |
5476a9a4 GM |
16159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
16160 | $as_echo_n "checking for mbstate_t... " >&6; } | |
16161 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | |
16162 | $as_echo_n "(cached) " >&6 | |
16163 | else | |
16164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16165 | /* end confdefs.h. */ | |
16166 | $ac_includes_default | |
16167 | # include <wchar.h> | |
16168 | int | |
16169 | main () | |
16170 | { | |
16171 | mbstate_t x; return sizeof x; | |
16172 | ; | |
16173 | return 0; | |
3e0be4ab | 16174 | } |
942f733f | 16175 | _ACEOF |
5476a9a4 GM |
16176 | if ac_fn_c_try_compile "$LINENO"; then : |
16177 | ac_cv_type_mbstate_t=yes | |
3e0be4ab | 16178 | else |
5476a9a4 | 16179 | ac_cv_type_mbstate_t=no |
942f733f | 16180 | fi |
5476a9a4 | 16181 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 16182 | fi |
5476a9a4 GM |
16183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 |
16184 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
16185 | if test $ac_cv_type_mbstate_t = yes; then | |
f199cab1 | 16186 | |
5476a9a4 | 16187 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
f199cab1 | 16188 | |
5476a9a4 | 16189 | else |
f199cab1 | 16190 | |
5476a9a4 | 16191 | $as_echo "#define mbstate_t int" >>confdefs.h |
f199cab1 | 16192 | |
5476a9a4 GM |
16193 | fi |
16194 | ||
16195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | |
16196 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
16197 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | |
16198 | $as_echo_n "(cached) " >&6 | |
16199 | else | |
16200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16201 | /* end confdefs.h. */ | |
16202 | void fred (int x[__restrict]); | |
16203 | int | |
16204 | main () | |
16205 | { | |
16206 | ||
16207 | ; | |
16208 | return 0; | |
16209 | } | |
16210 | _ACEOF | |
16211 | if ac_fn_c_try_compile "$LINENO"; then : | |
16212 | emacs_cv_c_restrict_arr=yes | |
16213 | else | |
16214 | emacs_cv_c_restrict_arr=no | |
16215 | fi | |
16216 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16217 | fi | |
16218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
16219 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
16220 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
f199cab1 | 16221 | |
5476a9a4 | 16222 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
f199cab1 | 16223 | |
5476a9a4 | 16224 | fi |
f199cab1 GM |
16225 | |
16226 | ||
7c61eaab | 16227 | if test "${opsys}" != "mingw32"; then |
f199cab1 | 16228 | |
8ad96b1d GM |
16229 | $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h |
16230 | ||
7c61eaab | 16231 | fi |
8ad96b1d GM |
16232 | |
16233 | ||
5476a9a4 | 16234 | $as_echo "#define CLASH_DETECTION 1" >>confdefs.h |
f199cab1 GM |
16235 | |
16236 | ||
5476a9a4 | 16237 | ## Note: PTYs are broken on darwin <6. Use at your own risk. |
7c61eaab | 16238 | if test "${opsys}" != "mingw32"; then |
f199cab1 | 16239 | |
5476a9a4 | 16240 | $as_echo "#define HAVE_PTYS 1" >>confdefs.h |
f199cab1 | 16241 | |
7c61eaab | 16242 | fi |
f199cab1 GM |
16243 | |
16244 | ||
5476a9a4 | 16245 | $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h |
f199cab1 | 16246 | |
942f733f | 16247 | |
942f733f | 16248 | |
6b10626d GM |
16249 | |
16250 | ||
7c61eaab GM |
16251 | if test "${opsys}" = "mingw32"; then |
16252 | $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h | |
16253 | ||
16254 | else | |
16255 | $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h | |
16256 | ||
16257 | fi | |
8ad96b1d GM |
16258 | |
16259 | ||
7c61eaab GM |
16260 | if test "${opsys}" = "mingw32"; then |
16261 | $as_echo "#define SEPCHAR ';'" >>confdefs.h | |
8ad96b1d | 16262 | |
7c61eaab GM |
16263 | else |
16264 | $as_echo "#define SEPCHAR ':'" >>confdefs.h | |
8ad96b1d | 16265 | |
7c61eaab | 16266 | fi |
8ad96b1d GM |
16267 | |
16268 | ||
16269 | $as_echo "#define subprocesses 1" >>confdefs.h | |
16270 | ||
16271 | ||
16272 | ||
16273 | $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h | |
16274 | ||
16275 | ||
16276 | ||
942f733f | 16277 | |
9ff736dc GM |
16278 | $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h |
16279 | ||
16280 | ||
7c61eaab | 16281 | if test "${opsys}" = "mingw32"; then |
7c61eaab | 16282 | |
db7863f4 | 16283 | $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h |
f199cab1 | 16284 | |
6b10626d | 16285 | |
7c61eaab GM |
16286 | |
16287 | $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h | |
16288 | ||
16289 | ||
16290 | ||
16291 | $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h | |
16292 | ||
16293 | else | |
16294 | ||
6b10626d GM |
16295 | $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h |
16296 | ||
16297 | ||
16298 | ||
16299 | $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h | |
16300 | ||
16301 | ||
16302 | ||
16303 | $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h | |
16304 | ||
7c61eaab | 16305 | fi |
6b10626d GM |
16306 | |
16307 | ||
16308 | ||
5476a9a4 GM |
16309 | case $opsys in |
16310 | aix4-2) | |
16311 | if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then | |
16312 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 16313 | |
5476a9a4 GM |
16314 | fi |
16315 | ;; | |
f199cab1 | 16316 | |
5476a9a4 GM |
16317 | hpux*) |
16318 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 16319 | |
5476a9a4 GM |
16320 | ;; |
16321 | esac | |
f199cab1 GM |
16322 | |
16323 | ||
5476a9a4 | 16324 | case $opsys in |
5476a9a4 | 16325 | irix6-5 | sol2* | unixware ) |
f199cab1 | 16326 | |
5476a9a4 | 16327 | $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h |
f199cab1 | 16328 | |
5476a9a4 GM |
16329 | ;; |
16330 | esac | |
f199cab1 | 16331 | |
4fa92495 | 16332 | emacs_broken_SIGIO=no |
f199cab1 | 16333 | |
5476a9a4 | 16334 | case $opsys in |
db7863f4 | 16335 | hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd ) |
4fa92495 | 16336 | emacs_broken_SIGIO=yes |
5476a9a4 | 16337 | ;; |
f199cab1 | 16338 | |
5476a9a4 | 16339 | aix4-2) |
f199cab1 | 16340 | |
5476a9a4 | 16341 | $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h |
067d23c9 | 16342 | |
5476a9a4 | 16343 | ;; |
067d23c9 | 16344 | |
5476a9a4 | 16345 | freebsd) |
f199cab1 | 16346 | |
5476a9a4 | 16347 | $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h |
f199cab1 | 16348 | |
5476a9a4 | 16349 | ;; |
5476a9a4 | 16350 | esac |
f199cab1 | 16351 | |
5476a9a4 GM |
16352 | case $opsys in |
16353 | gnu-* | sol2-10 ) | |
f199cab1 | 16354 | |
5476a9a4 | 16355 | $as_echo "#define HAVE_PROCFS 1" >>confdefs.h |
f199cab1 | 16356 | |
5476a9a4 GM |
16357 | ;; |
16358 | esac | |
f199cab1 | 16359 | |
5476a9a4 | 16360 | case $opsys in |
87e1a811 | 16361 | darwin | dragonfly | freebsd | netbsd | openbsd ) |
f199cab1 | 16362 | |
5476a9a4 | 16363 | $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h |
f199cab1 | 16364 | |
5476a9a4 GM |
16365 | ;; |
16366 | esac | |
f199cab1 | 16367 | |
5476a9a4 GM |
16368 | case $opsys in |
16369 | netbsd | openbsd) sound_device="/dev/audio" ;; | |
16370 | *) sound_device="/dev/dsp" ;; | |
16371 | esac | |
f199cab1 | 16372 | |
f199cab1 | 16373 | |
5476a9a4 GM |
16374 | cat >>confdefs.h <<_ACEOF |
16375 | #define DEFAULT_SOUND_DEVICE "$sound_device" | |
16376 | _ACEOF | |
f199cab1 GM |
16377 | |
16378 | ||
16379 | ||
5476a9a4 GM |
16380 | case $opsys in |
16381 | darwin | gnu-linux | gnu-kfreebsd ) | |
f199cab1 | 16382 | |
5476a9a4 | 16383 | $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h |
f199cab1 | 16384 | |
5476a9a4 GM |
16385 | ;; |
16386 | esac | |
f199cab1 | 16387 | |
f199cab1 | 16388 | |
5476a9a4 GM |
16389 | case $opsys in |
16390 | cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) | |
f199cab1 | 16391 | |
5476a9a4 | 16392 | $as_echo "#define NARROWPROTO 1" >>confdefs.h |
067d23c9 | 16393 | |
5476a9a4 GM |
16394 | ;; |
16395 | esac | |
f199cab1 GM |
16396 | |
16397 | ||
067d23c9 | 16398 | |
1f5d53eb PE |
16399 | |
16400 | ||
f199cab1 | 16401 | |
f199cab1 | 16402 | |
7d2a1c5e | 16403 | |
5476a9a4 GM |
16404 | case $opsys in |
16405 | aix4-2 ) | |
a09508f2 | 16406 | $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h |
f199cab1 | 16407 | |
a09508f2 | 16408 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h |
f199cab1 | 16409 | |
a09508f2 | 16410 | $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h |
7d2a1c5e | 16411 | |
5476a9a4 | 16412 | ;; |
7d2a1c5e | 16413 | |
5476a9a4 | 16414 | cygwin ) |
a09508f2 | 16415 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 16416 | |
843f2634 | 16417 | $as_echo "#define PTY_OPEN do { int dummy; sigset_t blocked, procmask; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h |
f199cab1 | 16418 | |
a09508f2 | 16419 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
7d2a1c5e | 16420 | |
a09508f2 | 16421 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16422 | |
5476a9a4 | 16423 | ;; |
f199cab1 | 16424 | |
1146da8d | 16425 | darwin ) |
a09508f2 | 16426 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 16427 | |
5476a9a4 | 16428 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
7d2a1c5e | 16429 | |
a09508f2 | 16430 | $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)" >>confdefs.h |
7d2a1c5e | 16431 | |
a09508f2 | 16432 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16433 | |
a09508f2 | 16434 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16435 | |
5476a9a4 | 16436 | ;; |
f199cab1 | 16437 | |
1146da8d | 16438 | gnu | openbsd ) |
5476a9a4 | 16439 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
f199cab1 | 16440 | |
5476a9a4 | 16441 | ;; |
f199cab1 | 16442 | |
87e1a811 | 16443 | gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd ) |
5476a9a4 | 16444 | if test "x$ac_cv_func_grantpt" = xyes; then |
f199cab1 | 16445 | |
5476a9a4 | 16446 | $as_echo "#define UNIX98_PTYS 1" >>confdefs.h |
f199cab1 | 16447 | |
a09508f2 | 16448 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
f199cab1 | 16449 | |
75bdb32a | 16450 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h |
f199cab1 | 16451 | |
1146da8d | 16452 | if test "x$ac_cv_func_posix_openpt" = xyes; then |
0cdca42a | 16453 | $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h |
1146da8d GM |
16454 | |
16455 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h | |
16456 | ||
16457 | elif test "x$ac_cv_func_getpt" = xyes; then | |
5476a9a4 | 16458 | $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h |
f199cab1 | 16459 | |
a09508f2 | 16460 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16461 | |
5476a9a4 | 16462 | else |
a09508f2 | 16463 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
f199cab1 | 16464 | |
5476a9a4 GM |
16465 | fi |
16466 | else | |
16467 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 16468 | |
5476a9a4 GM |
16469 | fi |
16470 | ;; | |
f199cab1 | 16471 | |
5476a9a4 GM |
16472 | hpux*) |
16473 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 16474 | |
a09508f2 | 16475 | $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 16476 | |
a09508f2 | 16477 | $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 16478 | |
5476a9a4 | 16479 | ;; |
f199cab1 | 16480 | |
5476a9a4 GM |
16481 | irix6-5 ) |
16482 | $as_echo "#define PTY_ITERATION /**/" >>confdefs.h | |
f199cab1 | 16483 | |
5476a9a4 | 16484 | $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h |
f199cab1 | 16485 | |
e4184a20 | 16486 | $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCHLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCHLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }" >>confdefs.h |
f199cab1 | 16487 | |
a09508f2 | 16488 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16489 | |
a09508f2 | 16490 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 16491 | |
5476a9a4 | 16492 | ;; |
f199cab1 | 16493 | |
5476a9a4 | 16494 | sol2* ) |
75bdb32a | 16495 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h |
f199cab1 | 16496 | |
5476a9a4 | 16497 | ;; |
f199cab1 | 16498 | |
5476a9a4 | 16499 | unixware ) |
75bdb32a | 16500 | $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h |
5476a9a4 GM |
16501 | |
16502 | ;; | |
16503 | esac | |
16504 | ||
16505 | ||
16506 | case $opsys in | |
16507 | sol2* | unixware ) | |
16508 | $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h | |
16509 | ||
a09508f2 | 16510 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
5476a9a4 GM |
16511 | |
16512 | ||
16513 | $as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h | |
16514 | ||
16515 | ;; | |
16516 | esac | |
16517 | ||
16518 | ||
16519 | ||
16520 | ||
16521 | case $opsys in | |
87e1a811 | 16522 | aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin ) |
5476a9a4 GM |
16523 | $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h |
16524 | ||
16525 | ;; | |
16526 | ||
16527 | gnu-linux | gnu-kfreebsd ) | |
16528 | ||
16529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5 | |
16530 | $as_echo_n "checking for signals via characters... " >&6; } | |
16531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 16532 | /* end confdefs.h. */ |
5476a9a4 GM |
16533 | |
16534 | #include <linux/version.h> | |
16535 | #if LINUX_VERSION_CODE < 0x20400 | |
16536 | # error "Linux version too old" | |
16537 | #endif | |
16538 | ||
3e0be4ab GM |
16539 | int |
16540 | main () | |
16541 | { | |
f199cab1 | 16542 | |
3e0be4ab GM |
16543 | ; |
16544 | return 0; | |
16545 | } | |
067d23c9 | 16546 | _ACEOF |
5476a9a4 GM |
16547 | if ac_fn_c_try_cpp "$LINENO"; then : |
16548 | emacs_signals_via_chars=yes | |
1f5d53eb | 16549 | else |
5476a9a4 | 16550 | emacs_signals_via_chars=no |
067d23c9 | 16551 | fi |
5476a9a4 | 16552 | rm -f conftest.err conftest.$ac_ext |
067d23c9 | 16553 | |
5476a9a4 GM |
16554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5 |
16555 | $as_echo "$emacs_signals_via_chars" >&6; } | |
16556 | test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h | |
16557 | ||
16558 | ;; | |
16559 | esac | |
16560 | ||
16561 | ||
16562 | ||
16563 | ||
5476a9a4 | 16564 | case $opsys in |
0f63df79 | 16565 | aix*) |
ce9ae7ca | 16566 | $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h |
0f63df79 GM |
16567 | |
16568 | ;; | |
5476a9a4 | 16569 | hpux*) |
ce9ae7ca | 16570 | $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h |
067d23c9 | 16571 | |
5476a9a4 GM |
16572 | ;; |
16573 | irix6-5) | |
5476a9a4 | 16574 | $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h |
067d23c9 | 16575 | |
5476a9a4 GM |
16576 | ;; |
16577 | esac | |
067d23c9 | 16578 | |
1f5d53eb | 16579 | |
1f5d53eb | 16580 | |
067d23c9 | 16581 | |
5476a9a4 GM |
16582 | case $opsys in |
16583 | darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h | |
16584 | ;; | |
f199cab1 | 16585 | |
87e1a811 | 16586 | gnu | dragonfly | freebsd | netbsd | openbsd ) |
f199cab1 | 16587 | |
5476a9a4 | 16588 | $as_echo "#define TABDLY OXTABS" >>confdefs.h |
f199cab1 | 16589 | |
5476a9a4 | 16590 | $as_echo "#define TAB3 OXTABS" >>confdefs.h |
f199cab1 | 16591 | |
5476a9a4 | 16592 | ;; |
f199cab1 | 16593 | |
5476a9a4 | 16594 | gnu-linux | gnu-kfreebsd ) |
5476a9a4 GM |
16595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16596 | /* end confdefs.h. */ | |
3e0be4ab | 16597 | |
5476a9a4 GM |
16598 | #ifndef __ia64__ |
16599 | # error "not ia64" | |
16600 | #endif | |
067d23c9 | 16601 | |
5476a9a4 GM |
16602 | int |
16603 | main () | |
16604 | { | |
3e0be4ab | 16605 | |
5476a9a4 GM |
16606 | ; |
16607 | return 0; | |
16608 | } | |
16609 | _ACEOF | |
16610 | if ac_fn_c_try_cpp "$LINENO"; then : | |
f199cab1 | 16611 | |
5476a9a4 | 16612 | $as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h |
067d23c9 | 16613 | |
3e0be4ab | 16614 | fi |
5476a9a4 GM |
16615 | rm -f conftest.err conftest.$ac_ext |
16616 | ;; | |
067d23c9 | 16617 | |
5476a9a4 | 16618 | hpux*) |
3e0be4ab | 16619 | |
5476a9a4 | 16620 | $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h |
3e0be4ab | 16621 | |
5476a9a4 | 16622 | ;; |
5476a9a4 | 16623 | esac |
3e0be4ab GM |
16624 | |
16625 | ||
f199cab1 | 16626 | |
e700232f GM |
16627 | |
16628 | ||
5476a9a4 | 16629 | case $opsys in |
5476a9a4 GM |
16630 | gnu-linux | gnu-kfreebsd ) |
16631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 16632 | /* end confdefs.h. */ |
f199cab1 | 16633 | |
5476a9a4 GM |
16634 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
16635 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | |
16636 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | |
16637 | || defined __ia64__ || defined __sh__ | |
16638 | /* ok */ | |
16639 | #else | |
16640 | # error "setjmp not known to work on this arch" | |
16641 | #endif | |
16642 | ||
f199cab1 GM |
16643 | int |
16644 | main () | |
1fd182f0 | 16645 | { |
5476a9a4 | 16646 | |
f199cab1 GM |
16647 | ; |
16648 | return 0; | |
1fd182f0 PE |
16649 | } |
16650 | _ACEOF | |
5476a9a4 GM |
16651 | if ac_fn_c_try_cpp "$LINENO"; then : |
16652 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
f199cab1 | 16653 | |
1f5d53eb | 16654 | fi |
5476a9a4 GM |
16655 | rm -f conftest.err conftest.$ac_ext |
16656 | ;; | |
16657 | esac | |
1fd182f0 | 16658 | |
f199cab1 | 16659 | |
5476a9a4 GM |
16660 | if test x$GCC = xyes; then |
16661 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
16662 | ||
1fd182f0 | 16663 | else |
5476a9a4 | 16664 | case $opsys in |
87e1a811 | 16665 | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) |
5476a9a4 | 16666 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h |
1fd182f0 | 16667 | |
5476a9a4 GM |
16668 | ;; |
16669 | esac | |
16670 | fi | |
6ec9a5a7 GM |
16671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5 |
16672 | $as_echo_n "checking for _setjmp... " >&6; } | |
16673 | if test "${emacs_cv_func__setjmp+set}" = set; then : | |
16674 | $as_echo_n "(cached) " >&6 | |
16675 | else | |
16676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16677 | /* end confdefs.h. */ | |
16678 | #include <setjmp.h> | |
7c61eaab GM |
16679 | #ifdef __MINGW32__ |
16680 | # define _longjmp longjmp | |
16681 | #endif | |
1fd182f0 | 16682 | |
6ec9a5a7 GM |
16683 | int |
16684 | main () | |
16685 | { | |
16686 | jmp_buf j; | |
16687 | if (! _setjmp (j)) | |
16688 | _longjmp (j, 1); | |
16689 | ; | |
16690 | return 0; | |
16691 | } | |
16692 | _ACEOF | |
16693 | if ac_fn_c_try_link "$LINENO"; then : | |
16694 | emacs_cv_func__setjmp=yes | |
16695 | else | |
16696 | emacs_cv_func__setjmp=no | |
16697 | fi | |
16698 | rm -f core conftest.err conftest.$ac_objext \ | |
16699 | conftest$ac_exeext conftest.$ac_ext | |
16700 | fi | |
16701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 | |
16702 | $as_echo "$emacs_cv_func__setjmp" >&6; } | |
e2d8f316 | 16703 | if test $emacs_cv_func__setjmp = yes; then |
906debc3 | 16704 | |
e2d8f316 | 16705 | $as_echo "#define HAVE__SETJMP 1" >>confdefs.h |
906debc3 | 16706 | |
e2d8f316 GM |
16707 | else |
16708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
16709 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
16710 | if test "${emacs_cv_func_sigsetjmp+set}" = set; then : | |
16711 | $as_echo_n "(cached) " >&6 | |
16712 | else | |
16713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16714 | /* end confdefs.h. */ | |
16715 | #include <setjmp.h> | |
16716 | ||
16717 | int | |
16718 | main () | |
16719 | { | |
16720 | sigjmp_buf j; | |
16721 | if (! sigsetjmp (j, 1)) | |
16722 | siglongjmp (j, 1); | |
16723 | ; | |
16724 | return 0; | |
16725 | } | |
16726 | _ACEOF | |
16727 | if ac_fn_c_try_link "$LINENO"; then : | |
16728 | emacs_cv_func_sigsetjmp=yes | |
16729 | else | |
16730 | emacs_cv_func_sigsetjmp=no | |
16731 | fi | |
16732 | rm -f core conftest.err conftest.$ac_objext \ | |
16733 | conftest$ac_exeext conftest.$ac_ext | |
16734 | fi | |
16735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5 | |
16736 | $as_echo "$emacs_cv_func_sigsetjmp" >&6; } | |
16737 | if test $emacs_cv_func_sigsetjmp = yes; then | |
906debc3 | 16738 | |
e2d8f316 | 16739 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
906debc3 | 16740 | |
e2d8f316 | 16741 | fi |
6ec9a5a7 GM |
16742 | fi |
16743 | ||
16744 | case $opsys in | |
16745 | sol2* | unixware ) | |
906debc3 GM |
16746 | |
16747 | $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h | |
16748 | ||
16749 | ;; | |
16750 | esac | |
16751 | ||
906debc3 | 16752 | |
5476a9a4 GM |
16753 | case $opsys in |
16754 | hpux* | sol2* ) | |
1f5d53eb | 16755 | |
5476a9a4 | 16756 | $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h |
1f5d53eb | 16757 | |
5476a9a4 GM |
16758 | ;; |
16759 | esac | |
1f5d53eb | 16760 | |
1f5d53eb | 16761 | |
4fda9c95 | 16762 | |
3e0be4ab | 16763 | |
4fda9c95 | 16764 | |
4fda9c95 | 16765 | |
f199cab1 | 16766 | |
5476a9a4 GM |
16767 | case $opsys in |
16768 | aix4-2) | |
16769 | $as_echo "#define USG /**/" >>confdefs.h | |
16770 | ||
5476a9a4 GM |
16771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16772 | /* end confdefs.h. */ | |
16773 | ||
16774 | #ifndef _AIX | |
16775 | # error "_AIX not defined" | |
16776 | #endif | |
f199cab1 | 16777 | |
4fda9c95 GM |
16778 | int |
16779 | main () | |
16780 | { | |
3e0be4ab | 16781 | |
4fda9c95 GM |
16782 | ; |
16783 | return 0; | |
16784 | } | |
16785 | _ACEOF | |
5476a9a4 | 16786 | if ac_fn_c_try_cpp "$LINENO"; then : |
4fda9c95 | 16787 | |
3e0be4ab | 16788 | else |
4fda9c95 | 16789 | |
5476a9a4 | 16790 | $as_echo "#define _AIX /**/" >>confdefs.h |
3e0be4ab | 16791 | |
5476a9a4 GM |
16792 | fi |
16793 | rm -f conftest.err conftest.$ac_ext | |
16794 | ;; | |
4fda9c95 | 16795 | |
5476a9a4 | 16796 | cygwin) |
3e0be4ab | 16797 | |
5476a9a4 | 16798 | $as_echo "#define CYGWIN 1" >>confdefs.h |
f199cab1 | 16799 | |
5476a9a4 | 16800 | ;; |
f199cab1 | 16801 | |
5476a9a4 | 16802 | darwin) |
f199cab1 | 16803 | |
5476a9a4 | 16804 | $as_echo "#define DARWIN_OS /**/" >>confdefs.h |
f199cab1 | 16805 | |
5476a9a4 | 16806 | ;; |
4fda9c95 | 16807 | |
5476a9a4 GM |
16808 | gnu-linux | gnu-kfreebsd ) |
16809 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 16810 | |
f199cab1 | 16811 | |
5476a9a4 | 16812 | $as_echo "#define GNU_LINUX /**/" >>confdefs.h |
4fda9c95 | 16813 | |
5476a9a4 | 16814 | ;; |
4fda9c95 | 16815 | |
5476a9a4 GM |
16816 | hpux*) |
16817 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 16818 | |
4717915f | 16819 | |
5476a9a4 | 16820 | $as_echo "#define HPUX /**/" >>confdefs.h |
697210c4 | 16821 | |
5476a9a4 | 16822 | ;; |
697210c4 | 16823 | |
5476a9a4 GM |
16824 | irix6-5) |
16825 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 16826 | |
906debc3 GM |
16827 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16828 | ||
f199cab1 | 16829 | |
5476a9a4 | 16830 | $as_echo "#define IRIX6_5 /**/" >>confdefs.h |
f199cab1 | 16831 | |
5476a9a4 | 16832 | ;; |
f199cab1 | 16833 | |
7c61eaab GM |
16834 | mingw32) |
16835 | $as_echo "#define DOS_NT /**/" >>confdefs.h | |
16836 | ||
16837 | ||
16838 | $as_echo "#define WINDOWSNT 1" >>confdefs.h | |
16839 | ||
16840 | if test "x$ac_enable_checking" != "x" ; then | |
16841 | ||
16842 | $as_echo "#define EMACSDEBUG 1" >>confdefs.h | |
16843 | ||
16844 | fi | |
16845 | ;; | |
16846 | ||
5476a9a4 GM |
16847 | sol2*) |
16848 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 16849 | |
906debc3 GM |
16850 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16851 | ||
4fda9c95 | 16852 | |
5476a9a4 | 16853 | $as_echo "#define SOLARIS2 /**/" >>confdefs.h |
f199cab1 | 16854 | |
5476a9a4 | 16855 | ;; |
f199cab1 | 16856 | |
5476a9a4 GM |
16857 | unixware) |
16858 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 16859 | |
906debc3 GM |
16860 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16861 | ||
5476a9a4 GM |
16862 | ;; |
16863 | esac | |
f199cab1 | 16864 | |
4fa92495 GM |
16865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5 |
16866 | $as_echo_n "checking for usable FIONREAD... " >&6; } | |
16867 | if test "${emacs_cv_usable_FIONREAD+set}" = set; then : | |
16868 | $as_echo_n "(cached) " >&6 | |
16869 | else | |
16870 | case $opsys in | |
16871 | aix4-2) | |
16872 | emacs_cv_usable_FIONREAD=no | |
16873 | ;; | |
16874 | ||
7c61eaab GM |
16875 | mingw32) |
16876 | emacs_cv_usable_FIONREAD=yes | |
16877 | ;; | |
16878 | ||
4fa92495 GM |
16879 | *) |
16880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16881 | /* end confdefs.h. */ | |
16882 | #include <sys/types.h> | |
16883 | #include <sys/ioctl.h> | |
16884 | #ifdef USG5_4 | |
16885 | # include <sys/filio.h> | |
16886 | #endif | |
16887 | ||
16888 | int | |
16889 | main () | |
16890 | { | |
16891 | int foo = ioctl (0, FIONREAD, &foo); | |
16892 | ; | |
16893 | return 0; | |
16894 | } | |
16895 | _ACEOF | |
16896 | if ac_fn_c_try_compile "$LINENO"; then : | |
16897 | emacs_cv_usable_FIONREAD=yes | |
16898 | else | |
16899 | emacs_cv_usable_FIONREAD=no | |
16900 | fi | |
16901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16902 | ;; | |
16903 | esac | |
16904 | fi | |
16905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5 | |
16906 | $as_echo "$emacs_cv_usable_FIONREAD" >&6; } | |
16907 | if test $emacs_cv_usable_FIONREAD = yes; then | |
16908 | ||
16909 | $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h | |
16910 | ||
16911 | ||
16912 | if test $emacs_broken_SIGIO = no; then | |
16913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5 | |
16914 | $as_echo_n "checking for usable SIGIO... " >&6; } | |
16915 | if test "${emacs_cv_usable_SIGIO+set}" = set; then : | |
16916 | $as_echo_n "(cached) " >&6 | |
16917 | else | |
16918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16919 | /* end confdefs.h. */ | |
16920 | #include <fcntl.h> | |
16921 | #include <signal.h> | |
16922 | ||
16923 | int | |
16924 | main () | |
16925 | { | |
16926 | int foo = SIGIO | F_SETFL | FASYNC; | |
16927 | ; | |
16928 | return 0; | |
16929 | } | |
16930 | _ACEOF | |
16931 | if ac_fn_c_try_compile "$LINENO"; then : | |
16932 | emacs_cv_usable_SIGIO=yes | |
16933 | else | |
16934 | emacs_cv_usable_SIGIO=no | |
16935 | fi | |
16936 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16937 | fi | |
16938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5 | |
16939 | $as_echo "$emacs_cv_usable_SIGIO" >&6; } | |
16940 | if test $emacs_cv_usable_SIGIO = yes; then | |
16941 | ||
16942 | $as_echo "#define USABLE_SIGIO 1" >>confdefs.h | |
16943 | ||
16944 | fi | |
16945 | fi | |
16946 | fi | |
16947 | ||
4fda9c95 | 16948 | |
5476a9a4 GM |
16949 | case $opsys in |
16950 | cygwin) | |
4fda9c95 | 16951 | |
5476a9a4 | 16952 | $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h |
4fda9c95 | 16953 | |
5476a9a4 | 16954 | ;; |
4fda9c95 | 16955 | |
5476a9a4 | 16956 | hpux11) |
f199cab1 | 16957 | |
5476a9a4 | 16958 | $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h |
f199cab1 | 16959 | |
5476a9a4 | 16960 | ;; |
f199cab1 | 16961 | |
5476a9a4 | 16962 | irix6-5) |
f199cab1 | 16963 | |
5476a9a4 | 16964 | $as_echo "#define PREFER_VSUSP 1" >>confdefs.h |
f199cab1 | 16965 | |
5476a9a4 | 16966 | ;; |
f199cab1 | 16967 | |
5476a9a4 | 16968 | sol2-10) |
f199cab1 | 16969 | |
5476a9a4 | 16970 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h |
f199cab1 | 16971 | |
5476a9a4 GM |
16972 | ;; |
16973 | esac | |
f199cab1 | 16974 | |
5476a9a4 GM |
16975 | # Set up the CFLAGS for real compilation, so we can substitute it. |
16976 | CFLAGS="$REAL_CFLAGS" | |
16977 | CPPFLAGS="$REAL_CPPFLAGS" | |
f199cab1 | 16978 | |
5476a9a4 GM |
16979 | ## Hack to detect a buggy GCC version. |
16980 | if test "x$GCC" = xyes \ | |
16981 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
16982 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
16983 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
16984 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | |
16985 | fi | |
f199cab1 | 16986 | |
5476a9a4 | 16987 | version=$PACKAGE_VERSION |
f199cab1 | 16988 | |
0778f6f0 | 16989 | copyright="Copyright (C) 2013 Free Software Foundation, Inc." |
bb7dce39 GM |
16990 | |
16991 | cat >>confdefs.h <<_ACEOF | |
16992 | #define COPYRIGHT "$copyright" | |
16993 | _ACEOF | |
16994 | ||
16995 | ||
16996 | ||
5476a9a4 GM |
16997 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
16998 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
4fda9c95 | 16999 | |
f199cab1 | 17000 | |
5476a9a4 | 17001 | ## Unused? |
4fda9c95 GM |
17002 | |
17003 | ||
17004 | ||
17005 | ||
4717915f | 17006 | |
4717915f | 17007 | |
4717915f | 17008 | |
4717915f | 17009 | |
4717915f | 17010 | |
4717915f | 17011 | |
4717915f | 17012 | |
4717915f | 17013 | |
4717915f | 17014 | |
4717915f | 17015 | |
4717915f | 17016 | |
4717915f GM |
17017 | |
17018 | ||
4717915f GM |
17019 | |
17020 | ||
4717915f | 17021 | |
4717915f | 17022 | |
4717915f | 17023 | |
5476a9a4 GM |
17024 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
17025 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
17026 | ## end of LIBX_BASE, but nothing ever set it. | |
4717915f | 17027 | |
4717915f | 17028 | |
4fda9c95 | 17029 | |
4fda9c95 | 17030 | |
5476a9a4 GM |
17031 | ## Used in lwlib/Makefile.in. |
17032 | ||
4fda9c95 | 17033 | |
4fda9c95 | 17034 | |
4fda9c95 GM |
17035 | |
17036 | ||
17037 | ||
17038 | ||
4fda9c95 | 17039 | |
42dcba54 GM |
17040 | if test -n "${term_header}"; then |
17041 | ||
17042 | cat >>confdefs.h <<_ACEOF | |
17043 | #define TERM_HEADER "${term_header}" | |
17044 | _ACEOF | |
17045 | ||
17046 | fi | |
17047 | ||
4fda9c95 | 17048 | |
5476a9a4 GM |
17049 | cat >>confdefs.h <<_ACEOF |
17050 | #define EMACS_CONFIGURATION "${canonical}" | |
17051 | _ACEOF | |
4fda9c95 | 17052 | |
1e8a045a | 17053 | emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"` |
4fda9c95 | 17054 | |
5476a9a4 | 17055 | cat >>confdefs.h <<_ACEOF |
e25a10b7 | 17056 | #define EMACS_CONFIG_OPTIONS "${emacs_config_options}" |
5476a9a4 GM |
17057 | _ACEOF |
17058 | ||
5476a9a4 | 17059 | |
4fda9c95 | 17060 | |
7c61eaab GM |
17061 | case $opsys in |
17062 | mingw32) | |
17063 | $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h | |
17064 | ||
17065 | ;; | |
17066 | esac | |
17067 | ||
5476a9a4 GM |
17068 | XMENU_OBJ= |
17069 | XOBJ= | |
17070 | FONT_OBJ= | |
17071 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
17072 | ||
17073 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
4fda9c95 | 17074 | |
5476a9a4 | 17075 | XMENU_OBJ=xmenu.o |
0f55a32e | 17076 | XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o" |
5476a9a4 GM |
17077 | FONT_OBJ=xfont.o |
17078 | if test "$HAVE_XFT" = "yes"; then | |
17079 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
17080 | elif test "$HAVE_FREETYPE" = "yes"; then | |
17081 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
17082 | fi | |
4fda9c95 | 17083 | |
f199cab1 | 17084 | fi |
4fda9c95 | 17085 | |
4fda9c95 | 17086 | |
4fda9c95 | 17087 | |
4fda9c95 | 17088 | |
5476a9a4 GM |
17089 | WIDGET_OBJ= |
17090 | MOTIF_LIBW= | |
17091 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
17092 | WIDGET_OBJ=widget.o | |
17093 | ||
17094 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
17095 | ||
17096 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
17097 | ||
17098 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
e1939eb1 | 17099 | |
5476a9a4 | 17100 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
4fda9c95 | 17101 | |
5476a9a4 | 17102 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
3e0be4ab | 17103 | |
5476a9a4 GM |
17104 | MOTIF_LIBW=-lXm |
17105 | case "$opsys" in | |
17106 | gnu-linux) | |
17107 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
17108 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
17109 | ;; | |
3e0be4ab | 17110 | |
5476a9a4 GM |
17111 | unixware) |
17112 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
17113 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
17114 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
17115 | ;; | |
3e0be4ab | 17116 | |
5476a9a4 GM |
17117 | aix4-2) |
17118 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
17119 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
17120 | ;; | |
17121 | esac | |
17122 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
17123 | fi | |
17124 | fi | |
4fda9c95 | 17125 | |
3e0be4ab | 17126 | |
5476a9a4 GM |
17127 | TOOLKIT_LIBW= |
17128 | case "$USE_X_TOOLKIT" in | |
17129 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
17130 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
17131 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
17132 | esac | |
4fda9c95 GM |
17133 | |
17134 | ||
7c61eaab GM |
17135 | if test "${opsys}" != "mingw32"; then |
17136 | if test "$USE_X_TOOLKIT" = "none"; then | |
17137 | LIBXT_OTHER="\$(LIBXSM)" | |
17138 | OLDXMENU_TARGET="really-oldXMenu" | |
17139 | else | |
17140 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
17141 | OLDXMENU_TARGET="really-lwlib" | |
17142 | fi | |
5476a9a4 | 17143 | fi |
4fda9c95 GM |
17144 | |
17145 | ||
5476a9a4 GM |
17146 | ## The X Menu stuff is present in the X10 distribution, but missing |
17147 | ## from X11. If we have X10, just use the installed library; | |
17148 | ## otherwise, use our own copy. | |
17149 | if test "${HAVE_X11}" = "yes" ; then | |
4fda9c95 | 17150 | |
5476a9a4 | 17151 | $as_echo "#define HAVE_X11 1" >>confdefs.h |
4fda9c95 | 17152 | |
4fda9c95 | 17153 | |
5476a9a4 GM |
17154 | if test "$USE_X_TOOLKIT" = "none"; then |
17155 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
17156 | else | |
17157 | OLDXMENU="\${lwlibdir}/liblw.a" | |
17158 | fi | |
17159 | LIBXMENU="\$(OLDXMENU)" | |
17160 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
17161 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
f199cab1 | 17162 | else |
5476a9a4 GM |
17163 | ## For a syntactically valid Makefile; not actually used for anything. |
17164 | ## See comments in src/Makefile.in. | |
17165 | OLDXMENU=nothing | |
17166 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
17167 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
17168 | LIBXMENU="-lXMenu" | |
17169 | else | |
17170 | LIBXMENU= | |
17171 | fi | |
17172 | LIBX_OTHER= | |
17173 | OLDXMENU_DEPS= | |
17174 | fi | |
4fda9c95 | 17175 | |
5476a9a4 GM |
17176 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
17177 | OLDXMENU_TARGET= | |
17178 | OLDXMENU=nothing | |
17179 | LIBXMENU= | |
17180 | OLDXMENU_DEPS= | |
17181 | fi | |
4fda9c95 | 17182 | |
4fda9c95 GM |
17183 | |
17184 | ||
3e0be4ab | 17185 | |
4fda9c95 | 17186 | |
3e0be4ab | 17187 | |
3e0be4ab | 17188 | |
5476a9a4 | 17189 | if test "${HAVE_MENUS}" = "yes" ; then |
3e0be4ab | 17190 | |
5476a9a4 | 17191 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h |
4fda9c95 | 17192 | |
5476a9a4 | 17193 | fi |
4fda9c95 | 17194 | |
5476a9a4 | 17195 | if test "${GNU_MALLOC}" = "yes" ; then |
4fda9c95 | 17196 | |
5476a9a4 | 17197 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
4fda9c95 | 17198 | |
5476a9a4 | 17199 | fi |
3e0be4ab | 17200 | |
5476a9a4 GM |
17201 | RALLOC_OBJ= |
17202 | if test "${REL_ALLOC}" = "yes" ; then | |
17203 | ||
17204 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
4fda9c95 GM |
17205 | |
17206 | ||
5476a9a4 GM |
17207 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o |
17208 | fi | |
4fda9c95 | 17209 | |
4fda9c95 | 17210 | |
5476a9a4 | 17211 | if test "$opsys" = "cygwin"; then |
5c0255d9 | 17212 | CYGWIN_OBJ="sheap.o cygw32.o" |
5476a9a4 GM |
17213 | ## Cygwin differs because of its unexec(). |
17214 | PRE_ALLOC_OBJ= | |
17215 | POST_ALLOC_OBJ=lastfile.o | |
7c61eaab GM |
17216 | elif test "$opsys" = "mingw32"; then |
17217 | CYGWIN_OBJ= | |
17218 | PRE_ALLOC_OBJ= | |
17219 | POST_ALLOC_OBJ=lastfile.o | |
5476a9a4 GM |
17220 | else |
17221 | CYGWIN_OBJ= | |
17222 | PRE_ALLOC_OBJ=lastfile.o | |
17223 | POST_ALLOC_OBJ= | |
17224 | fi | |
4fda9c95 | 17225 | |
3e0be4ab | 17226 | |
3e0be4ab | 17227 | |
3e0be4ab | 17228 | |
5476a9a4 GM |
17229 | # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. |
17230 | # it temporarily reverts them to their pre-pkg-config values, | |
17231 | # because gnulib needs to work with both src (which uses the | |
17232 | # pkg-config stuff) and lib-src (which does not). For example, gnulib | |
17233 | # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, | |
17234 | # and it therefore needs to run in an environment where LIBS does not | |
17235 | # already contain -lrt merely because 'pkg-config --libs' printed '-lrt' | |
17236 | # for some package unrelated to lib-src. | |
17237 | SAVE_CFLAGS=$CFLAGS | |
17238 | SAVE_LIBS=$LIBS | |
17239 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | |
17240 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | |
3e0be4ab | 17241 | |
3e0be4ab GM |
17242 | |
17243 | ||
4fda9c95 | 17244 | |
4fda9c95 | 17245 | |
3e0be4ab | 17246 | |
3e0be4ab GM |
17247 | |
17248 | ||
4fda9c95 | 17249 | |
3e0be4ab GM |
17250 | |
17251 | ||
5476a9a4 GM |
17252 | LIBC_FATAL_STDERR_=1 |
17253 | export LIBC_FATAL_STDERR_ | |
3e0be4ab | 17254 | |
5476a9a4 GM |
17255 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
17256 | # for constant arguments. Useless! | |
17257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
17258 | $as_echo_n "checking for working alloca.h... " >&6; } | |
17259 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
17260 | $as_echo_n "(cached) " >&6 | |
17261 | else | |
17262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17263 | /* end confdefs.h. */ | |
17264 | #include <alloca.h> | |
17265 | int | |
17266 | main () | |
17267 | { | |
17268 | char *p = (char *) alloca (2 * sizeof (int)); | |
17269 | if (p) return 0; | |
17270 | ; | |
17271 | return 0; | |
17272 | } | |
17273 | _ACEOF | |
17274 | if ac_fn_c_try_link "$LINENO"; then : | |
17275 | ac_cv_working_alloca_h=yes | |
17276 | else | |
17277 | ac_cv_working_alloca_h=no | |
17278 | fi | |
17279 | rm -f core conftest.err conftest.$ac_objext \ | |
17280 | conftest$ac_exeext conftest.$ac_ext | |
17281 | fi | |
17282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
17283 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
17284 | if test $ac_cv_working_alloca_h = yes; then | |
3e0be4ab | 17285 | |
5476a9a4 | 17286 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
3e0be4ab | 17287 | |
5476a9a4 | 17288 | fi |
3e0be4ab | 17289 | |
5476a9a4 GM |
17290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
17291 | $as_echo_n "checking for alloca... " >&6; } | |
17292 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
f199cab1 GM |
17293 | $as_echo_n "(cached) " >&6 |
17294 | else | |
5476a9a4 | 17295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 17296 | /* end confdefs.h. */ |
5476a9a4 GM |
17297 | #ifdef __GNUC__ |
17298 | # define alloca __builtin_alloca | |
17299 | #else | |
17300 | # ifdef _MSC_VER | |
17301 | # include <malloc.h> | |
17302 | # define alloca _alloca | |
17303 | # else | |
17304 | # ifdef HAVE_ALLOCA_H | |
17305 | # include <alloca.h> | |
17306 | # else | |
17307 | # ifdef _AIX | |
17308 | #pragma alloca | |
17309 | # else | |
17310 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
17311 | char *alloca (); | |
17312 | # endif | |
17313 | # endif | |
17314 | # endif | |
17315 | # endif | |
17316 | #endif | |
17317 | ||
17318 | int | |
17319 | main () | |
17320 | { | |
17321 | char *p = (char *) alloca (1); | |
17322 | if (p) return 0; | |
17323 | ; | |
17324 | return 0; | |
17325 | } | |
17326 | _ACEOF | |
17327 | if ac_fn_c_try_link "$LINENO"; then : | |
17328 | ac_cv_func_alloca_works=yes | |
17329 | else | |
17330 | ac_cv_func_alloca_works=no | |
17331 | fi | |
17332 | rm -f core conftest.err conftest.$ac_objext \ | |
17333 | conftest$ac_exeext conftest.$ac_ext | |
17334 | fi | |
17335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
17336 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
17337 | ||
17338 | if test $ac_cv_func_alloca_works = yes; then | |
17339 | ||
17340 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
17341 | ||
17342 | else | |
17343 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
17344 | # that cause trouble. Some versions do not even contain alloca or | |
17345 | # contain a buggy version. If you still want to use their alloca, | |
17346 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3e0be4ab | 17347 | |
4fda9c95 | 17348 | |
4fda9c95 | 17349 | |
4fda9c95 GM |
17350 | |
17351 | ||
5476a9a4 | 17352 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
4fda9c95 | 17353 | |
5476a9a4 | 17354 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
4fda9c95 | 17355 | |
4fda9c95 | 17356 | |
5476a9a4 GM |
17357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5 |
17358 | $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; } | |
17359 | if test "${ac_cv_os_cray+set}" = set; then : | |
17360 | $as_echo_n "(cached) " >&6 | |
17361 | else | |
17362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17363 | /* end confdefs.h. */ | |
17364 | #if defined CRAY && ! defined CRAY2 | |
17365 | webecray | |
17366 | #else | |
17367 | wenotbecray | |
17368 | #endif | |
4fda9c95 | 17369 | |
5476a9a4 GM |
17370 | _ACEOF |
17371 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
17372 | $EGREP "webecray" >/dev/null 2>&1; then : | |
17373 | ac_cv_os_cray=yes | |
17374 | else | |
17375 | ac_cv_os_cray=no | |
17376 | fi | |
17377 | rm -f conftest* | |
4fda9c95 | 17378 | |
5476a9a4 GM |
17379 | fi |
17380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
17381 | $as_echo "$ac_cv_os_cray" >&6; } | |
17382 | if test $ac_cv_os_cray = yes; then | |
17383 | for ac_func in _getb67 GETB67 getb67; do | |
17384 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
17385 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
17386 | eval as_val=\$$as_ac_var | |
17387 | if test "x$as_val" = x""yes; then : | |
4fda9c95 | 17388 | |
5476a9a4 GM |
17389 | cat >>confdefs.h <<_ACEOF |
17390 | #define CRAY_STACKSEG_END $ac_func | |
17391 | _ACEOF | |
4fda9c95 | 17392 | |
5476a9a4 GM |
17393 | break |
17394 | fi | |
4fda9c95 | 17395 | |
5476a9a4 GM |
17396 | done |
17397 | fi | |
4fda9c95 | 17398 | |
5476a9a4 GM |
17399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
17400 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
17401 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
17402 | $as_echo_n "(cached) " >&6 | |
17403 | else | |
17404 | if test "$cross_compiling" = yes; then : | |
17405 | ac_cv_c_stack_direction=0 | |
17406 | else | |
17407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17408 | /* end confdefs.h. */ | |
17409 | $ac_includes_default | |
17410 | int | |
17411 | find_stack_direction (int *addr, int depth) | |
17412 | { | |
17413 | int dir, dummy = 0; | |
17414 | if (! addr) | |
17415 | addr = &dummy; | |
17416 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
17417 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
17418 | return dir + dummy; | |
17419 | } | |
4fda9c95 | 17420 | |
5476a9a4 GM |
17421 | int |
17422 | main (int argc, char **argv) | |
17423 | { | |
17424 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
17425 | } | |
17426 | _ACEOF | |
17427 | if ac_fn_c_try_run "$LINENO"; then : | |
17428 | ac_cv_c_stack_direction=1 | |
17429 | else | |
17430 | ac_cv_c_stack_direction=-1 | |
17431 | fi | |
17432 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17433 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17434 | fi | |
4fda9c95 | 17435 | |
5476a9a4 GM |
17436 | fi |
17437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
17438 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
17439 | cat >>confdefs.h <<_ACEOF | |
17440 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
17441 | _ACEOF | |
3e0be4ab GM |
17442 | |
17443 | ||
5476a9a4 | 17444 | fi |
3e0be4ab GM |
17445 | |
17446 | ||
17447 | ||
17448 | ||
5476a9a4 GM |
17449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
17450 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
17451 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
17452 | $as_echo_n "(cached) " >&6 | |
17453 | else | |
17454 | ac_cv_c_bigendian=unknown | |
17455 | # See if we're dealing with a universal compiler. | |
17456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17457 | /* end confdefs.h. */ | |
17458 | #ifndef __APPLE_CC__ | |
17459 | not a universal capable compiler | |
17460 | #endif | |
17461 | typedef int dummy; | |
17462 | ||
17463 | _ACEOF | |
17464 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 17465 | |
5476a9a4 GM |
17466 | # Check for potential -arch flags. It is not universal unless |
17467 | # there are at least two -arch flags with different values. | |
17468 | ac_arch= | |
17469 | ac_prev= | |
17470 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
17471 | if test -n "$ac_prev"; then | |
17472 | case $ac_word in | |
17473 | i?86 | x86_64 | ppc | ppc64) | |
17474 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
17475 | ac_arch=$ac_word | |
17476 | else | |
17477 | ac_cv_c_bigendian=universal | |
17478 | break | |
17479 | fi | |
17480 | ;; | |
17481 | esac | |
17482 | ac_prev= | |
17483 | elif test "x$ac_word" = "x-arch"; then | |
17484 | ac_prev=arch | |
17485 | fi | |
17486 | done | |
17487 | fi | |
17488 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17489 | if test $ac_cv_c_bigendian = unknown; then | |
17490 | # See if sys/param.h defines the BYTE_ORDER macro. | |
17491 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17492 | /* end confdefs.h. */ | |
17493 | #include <sys/types.h> | |
17494 | #include <sys/param.h> | |
3e0be4ab | 17495 | |
5476a9a4 GM |
17496 | int |
17497 | main () | |
17498 | { | |
17499 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
17500 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
17501 | && LITTLE_ENDIAN) | |
17502 | bogus endian macros | |
17503 | #endif | |
3e0be4ab | 17504 | |
5476a9a4 GM |
17505 | ; |
17506 | return 0; | |
17507 | } | |
17508 | _ACEOF | |
17509 | if ac_fn_c_try_compile "$LINENO"; then : | |
17510 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
17511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17512 | /* end confdefs.h. */ | |
17513 | #include <sys/types.h> | |
17514 | #include <sys/param.h> | |
369e19fc | 17515 | |
5476a9a4 GM |
17516 | int |
17517 | main () | |
17518 | { | |
17519 | #if BYTE_ORDER != BIG_ENDIAN | |
17520 | not big endian | |
17521 | #endif | |
3e0be4ab | 17522 | |
5476a9a4 GM |
17523 | ; |
17524 | return 0; | |
17525 | } | |
17526 | _ACEOF | |
17527 | if ac_fn_c_try_compile "$LINENO"; then : | |
17528 | ac_cv_c_bigendian=yes | |
17529 | else | |
17530 | ac_cv_c_bigendian=no | |
17531 | fi | |
17532 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17533 | fi | |
17534 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17535 | fi | |
17536 | if test $ac_cv_c_bigendian = unknown; then | |
17537 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
17538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17539 | /* end confdefs.h. */ | |
17540 | #include <limits.h> | |
4fda9c95 | 17541 | |
5476a9a4 GM |
17542 | int |
17543 | main () | |
17544 | { | |
17545 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
17546 | bogus endian macros | |
17547 | #endif | |
4fda9c95 | 17548 | |
5476a9a4 GM |
17549 | ; |
17550 | return 0; | |
17551 | } | |
17552 | _ACEOF | |
17553 | if ac_fn_c_try_compile "$LINENO"; then : | |
17554 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
17555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17556 | /* end confdefs.h. */ | |
17557 | #include <limits.h> | |
4fda9c95 | 17558 | |
5476a9a4 GM |
17559 | int |
17560 | main () | |
17561 | { | |
17562 | #ifndef _BIG_ENDIAN | |
17563 | not big endian | |
17564 | #endif | |
f199cab1 | 17565 | |
5476a9a4 GM |
17566 | ; |
17567 | return 0; | |
17568 | } | |
17569 | _ACEOF | |
17570 | if ac_fn_c_try_compile "$LINENO"; then : | |
17571 | ac_cv_c_bigendian=yes | |
f199cab1 | 17572 | else |
5476a9a4 GM |
17573 | ac_cv_c_bigendian=no |
17574 | fi | |
17575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17576 | fi | |
17577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17578 | fi | |
17579 | if test $ac_cv_c_bigendian = unknown; then | |
17580 | # Compile a test program. | |
17581 | if test "$cross_compiling" = yes; then : | |
17582 | # Try to guess by grepping values from an object file. | |
17583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17584 | /* end confdefs.h. */ | |
17585 | short int ascii_mm[] = | |
17586 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
17587 | short int ascii_ii[] = | |
17588 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
17589 | int use_ascii (int i) { | |
17590 | return ascii_mm[i] + ascii_ii[i]; | |
17591 | } | |
17592 | short int ebcdic_ii[] = | |
17593 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
17594 | short int ebcdic_mm[] = | |
17595 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
17596 | int use_ebcdic (int i) { | |
17597 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
17598 | } | |
17599 | extern int foo; | |
f199cab1 | 17600 | |
5476a9a4 GM |
17601 | int |
17602 | main () | |
17603 | { | |
17604 | return use_ascii (foo) == use_ebcdic (foo); | |
17605 | ; | |
17606 | return 0; | |
17607 | } | |
17608 | _ACEOF | |
17609 | if ac_fn_c_try_compile "$LINENO"; then : | |
17610 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
17611 | ac_cv_c_bigendian=yes | |
17612 | fi | |
17613 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
17614 | if test "$ac_cv_c_bigendian" = unknown; then | |
17615 | ac_cv_c_bigendian=no | |
17616 | else | |
17617 | # finding both strings is unlikely to happen, but who knows? | |
17618 | ac_cv_c_bigendian=unknown | |
17619 | fi | |
17620 | fi | |
17621 | fi | |
17622 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4fda9c95 | 17623 | else |
3e0be4ab | 17624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 17625 | /* end confdefs.h. */ |
5476a9a4 GM |
17626 | $ac_includes_default |
17627 | int | |
17628 | main () | |
4fda9c95 | 17629 | { |
5476a9a4 GM |
17630 | |
17631 | /* Are we little or big endian? From Harbison&Steele. */ | |
17632 | union | |
17633 | { | |
17634 | long int l; | |
17635 | char c[sizeof (long int)]; | |
17636 | } u; | |
17637 | u.l = 1; | |
17638 | return u.c[sizeof (long int) - 1] == 1; | |
17639 | ||
17640 | ; | |
4fda9c95 GM |
17641 | return 0; |
17642 | } | |
17643 | _ACEOF | |
f199cab1 | 17644 | if ac_fn_c_try_run "$LINENO"; then : |
5476a9a4 | 17645 | ac_cv_c_bigendian=no |
3e0be4ab | 17646 | else |
5476a9a4 | 17647 | ac_cv_c_bigendian=yes |
4fda9c95 | 17648 | fi |
f199cab1 GM |
17649 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
17650 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 17651 | fi |
4fda9c95 | 17652 | |
5476a9a4 | 17653 | fi |
f199cab1 | 17654 | fi |
5476a9a4 GM |
17655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
17656 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
17657 | case $ac_cv_c_bigendian in #( | |
17658 | yes) | |
17659 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
17660 | ;; #( | |
17661 | no) | |
17662 | ;; #( | |
17663 | universal) | |
3e0be4ab | 17664 | |
5476a9a4 | 17665 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
3e0be4ab | 17666 | |
5476a9a4 GM |
17667 | ;; #( |
17668 | *) | |
17669 | as_fn_error "unknown endianness | |
17670 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
17671 | esac | |
4fda9c95 | 17672 | |
4fda9c95 | 17673 | |
da6c8463 | 17674 | |
5476a9a4 GM |
17675 | GNULIB_CHDIR=0; |
17676 | GNULIB_CHOWN=0; | |
17677 | GNULIB_CLOSE=0; | |
17678 | GNULIB_DUP=0; | |
17679 | GNULIB_DUP2=0; | |
17680 | GNULIB_DUP3=0; | |
17681 | GNULIB_ENVIRON=0; | |
17682 | GNULIB_EUIDACCESS=0; | |
17683 | GNULIB_FACCESSAT=0; | |
17684 | GNULIB_FCHDIR=0; | |
17685 | GNULIB_FCHOWNAT=0; | |
17686 | GNULIB_FDATASYNC=0; | |
17687 | GNULIB_FSYNC=0; | |
17688 | GNULIB_FTRUNCATE=0; | |
17689 | GNULIB_GETCWD=0; | |
17690 | GNULIB_GETDOMAINNAME=0; | |
17691 | GNULIB_GETDTABLESIZE=0; | |
17692 | GNULIB_GETGROUPS=0; | |
17693 | GNULIB_GETHOSTNAME=0; | |
17694 | GNULIB_GETLOGIN=0; | |
17695 | GNULIB_GETLOGIN_R=0; | |
17696 | GNULIB_GETPAGESIZE=0; | |
17697 | GNULIB_GETUSERSHELL=0; | |
17698 | GNULIB_GROUP_MEMBER=0; | |
17699 | GNULIB_ISATTY=0; | |
17700 | GNULIB_LCHOWN=0; | |
17701 | GNULIB_LINK=0; | |
17702 | GNULIB_LINKAT=0; | |
17703 | GNULIB_LSEEK=0; | |
17704 | GNULIB_PIPE=0; | |
17705 | GNULIB_PIPE2=0; | |
17706 | GNULIB_PREAD=0; | |
17707 | GNULIB_PWRITE=0; | |
17708 | GNULIB_READ=0; | |
17709 | GNULIB_READLINK=0; | |
17710 | GNULIB_READLINKAT=0; | |
17711 | GNULIB_RMDIR=0; | |
17712 | GNULIB_SETHOSTNAME=0; | |
17713 | GNULIB_SLEEP=0; | |
17714 | GNULIB_SYMLINK=0; | |
17715 | GNULIB_SYMLINKAT=0; | |
17716 | GNULIB_TTYNAME_R=0; | |
17717 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
17718 | GNULIB_UNISTD_H_SIGPIPE=0; | |
17719 | GNULIB_UNLINK=0; | |
17720 | GNULIB_UNLINKAT=0; | |
17721 | GNULIB_USLEEP=0; | |
17722 | GNULIB_WRITE=0; | |
17723 | HAVE_CHOWN=1; | |
17724 | HAVE_DUP2=1; | |
17725 | HAVE_DUP3=1; | |
17726 | HAVE_EUIDACCESS=1; | |
17727 | HAVE_FACCESSAT=1; | |
17728 | HAVE_FCHDIR=1; | |
17729 | HAVE_FCHOWNAT=1; | |
17730 | HAVE_FDATASYNC=1; | |
17731 | HAVE_FSYNC=1; | |
17732 | HAVE_FTRUNCATE=1; | |
17733 | HAVE_GETDTABLESIZE=1; | |
17734 | HAVE_GETGROUPS=1; | |
17735 | HAVE_GETHOSTNAME=1; | |
17736 | HAVE_GETLOGIN=1; | |
17737 | HAVE_GETPAGESIZE=1; | |
17738 | HAVE_GROUP_MEMBER=1; | |
17739 | HAVE_LCHOWN=1; | |
17740 | HAVE_LINK=1; | |
17741 | HAVE_LINKAT=1; | |
17742 | HAVE_PIPE=1; | |
17743 | HAVE_PIPE2=1; | |
17744 | HAVE_PREAD=1; | |
17745 | HAVE_PWRITE=1; | |
17746 | HAVE_READLINK=1; | |
17747 | HAVE_READLINKAT=1; | |
17748 | HAVE_SETHOSTNAME=1; | |
17749 | HAVE_SLEEP=1; | |
17750 | HAVE_SYMLINK=1; | |
17751 | HAVE_SYMLINKAT=1; | |
17752 | HAVE_UNLINKAT=1; | |
17753 | HAVE_USLEEP=1; | |
17754 | HAVE_DECL_ENVIRON=1; | |
17755 | HAVE_DECL_FCHDIR=1; | |
17756 | HAVE_DECL_FDATASYNC=1; | |
17757 | HAVE_DECL_GETDOMAINNAME=1; | |
17758 | HAVE_DECL_GETLOGIN_R=1; | |
17759 | HAVE_DECL_GETPAGESIZE=1; | |
17760 | HAVE_DECL_GETUSERSHELL=1; | |
17761 | HAVE_DECL_SETHOSTNAME=1; | |
17762 | HAVE_DECL_TTYNAME_R=1; | |
17763 | HAVE_OS_H=0; | |
17764 | HAVE_SYS_PARAM_H=0; | |
17765 | REPLACE_CHOWN=0; | |
17766 | REPLACE_CLOSE=0; | |
17767 | REPLACE_DUP=0; | |
17768 | REPLACE_DUP2=0; | |
17769 | REPLACE_FCHOWNAT=0; | |
17770 | REPLACE_FTRUNCATE=0; | |
17771 | REPLACE_GETCWD=0; | |
17772 | REPLACE_GETDOMAINNAME=0; | |
17773 | REPLACE_GETLOGIN_R=0; | |
17774 | REPLACE_GETGROUPS=0; | |
17775 | REPLACE_GETPAGESIZE=0; | |
17776 | REPLACE_ISATTY=0; | |
17777 | REPLACE_LCHOWN=0; | |
17778 | REPLACE_LINK=0; | |
17779 | REPLACE_LINKAT=0; | |
17780 | REPLACE_LSEEK=0; | |
17781 | REPLACE_PREAD=0; | |
17782 | REPLACE_PWRITE=0; | |
17783 | REPLACE_READ=0; | |
17784 | REPLACE_READLINK=0; | |
17785 | REPLACE_RMDIR=0; | |
17786 | REPLACE_SLEEP=0; | |
17787 | REPLACE_SYMLINK=0; | |
17788 | REPLACE_TTYNAME_R=0; | |
17789 | REPLACE_UNLINK=0; | |
17790 | REPLACE_UNLINKAT=0; | |
17791 | REPLACE_USLEEP=0; | |
17792 | REPLACE_WRITE=0; | |
17793 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
17794 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
f199cab1 GM |
17795 | |
17796 | ||
93131e11 | 17797 | |
d7ad186c GM |
17798 | GNULIB_OPENDIR=0; |
17799 | GNULIB_READDIR=0; | |
17800 | GNULIB_REWINDDIR=0; | |
17801 | GNULIB_CLOSEDIR=0; | |
17802 | GNULIB_DIRFD=0; | |
17803 | GNULIB_FDOPENDIR=0; | |
17804 | GNULIB_SCANDIR=0; | |
17805 | GNULIB_ALPHASORT=0; | |
17806 | HAVE_OPENDIR=1; | |
17807 | HAVE_READDIR=1; | |
17808 | HAVE_REWINDDIR=1; | |
17809 | HAVE_CLOSEDIR=1; | |
17810 | HAVE_DECL_DIRFD=1; | |
17811 | HAVE_DECL_FDOPENDIR=1; | |
17812 | HAVE_FDOPENDIR=1; | |
17813 | HAVE_SCANDIR=1; | |
17814 | HAVE_ALPHASORT=1; | |
17815 | REPLACE_OPENDIR=0; | |
17816 | REPLACE_CLOSEDIR=0; | |
17817 | REPLACE_DIRFD=0; | |
17818 | REPLACE_FDOPENDIR=0; | |
710f5812 GM |
17819 | |
17820 | ||
17821 | ||
17822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
17823 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
17824 | if test "${gl_cv_have_include_next+set}" = set; then : | |
17825 | $as_echo_n "(cached) " >&6 | |
17826 | else | |
17827 | rm -rf conftestd1a conftestd1b conftestd2 | |
17828 | mkdir conftestd1a conftestd1b conftestd2 | |
17829 | cat <<EOF > conftestd1a/conftest.h | |
17830 | #define DEFINED_IN_CONFTESTD1 | |
17831 | #include_next <conftest.h> | |
17832 | #ifdef DEFINED_IN_CONFTESTD2 | |
17833 | int foo; | |
17834 | #else | |
17835 | #error "include_next doesn't work" | |
17836 | #endif | |
17837 | EOF | |
17838 | cat <<EOF > conftestd1b/conftest.h | |
17839 | #define DEFINED_IN_CONFTESTD1 | |
17840 | #include <stdio.h> | |
17841 | #include_next <conftest.h> | |
17842 | #ifdef DEFINED_IN_CONFTESTD2 | |
17843 | int foo; | |
17844 | #else | |
17845 | #error "include_next doesn't work" | |
17846 | #endif | |
17847 | EOF | |
17848 | cat <<EOF > conftestd2/conftest.h | |
17849 | #ifndef DEFINED_IN_CONFTESTD1 | |
17850 | #error "include_next test doesn't work" | |
17851 | #endif | |
17852 | #define DEFINED_IN_CONFTESTD2 | |
17853 | EOF | |
17854 | gl_save_CPPFLAGS="$CPPFLAGS" | |
17855 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
17856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17857 | /* end confdefs.h. */ | |
17858 | #include <conftest.h> | |
17859 | _ACEOF | |
17860 | if ac_fn_c_try_compile "$LINENO"; then : | |
17861 | gl_cv_have_include_next=yes | |
17862 | else | |
17863 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
17864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17865 | /* end confdefs.h. */ | |
17866 | #include <conftest.h> | |
17867 | _ACEOF | |
17868 | if ac_fn_c_try_compile "$LINENO"; then : | |
17869 | gl_cv_have_include_next=buggy | |
17870 | else | |
17871 | gl_cv_have_include_next=no | |
17872 | fi | |
17873 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17874 | ||
17875 | fi | |
17876 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17877 | CPPFLAGS="$gl_save_CPPFLAGS" | |
17878 | rm -rf conftestd1a conftestd1b conftestd2 | |
17879 | ||
17880 | fi | |
17881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
17882 | $as_echo "$gl_cv_have_include_next" >&6; } | |
17883 | PRAGMA_SYSTEM_HEADER= | |
17884 | if test $gl_cv_have_include_next = yes; then | |
17885 | INCLUDE_NEXT=include_next | |
17886 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
17887 | if test -n "$GCC"; then | |
17888 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
17889 | fi | |
17890 | else | |
17891 | if test $gl_cv_have_include_next = buggy; then | |
17892 | INCLUDE_NEXT=include | |
17893 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
17894 | else | |
17895 | INCLUDE_NEXT=include | |
17896 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
17897 | fi | |
17898 | fi | |
17899 | ||
17900 | ||
17901 | ||
17902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
17903 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
17904 | if test "${gl_cv_pragma_columns+set}" = set; then : | |
17905 | $as_echo_n "(cached) " >&6 | |
17906 | else | |
17907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17908 | /* end confdefs.h. */ | |
17909 | ||
17910 | #ifdef __TANDEM | |
17911 | choke me | |
17912 | #endif | |
17913 | ||
17914 | _ACEOF | |
17915 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
17916 | $EGREP "choke me" >/dev/null 2>&1; then : | |
17917 | gl_cv_pragma_columns=yes | |
17918 | else | |
17919 | gl_cv_pragma_columns=no | |
17920 | fi | |
17921 | rm -f conftest* | |
17922 | ||
17923 | ||
17924 | fi | |
17925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
17926 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
17927 | if test $gl_cv_pragma_columns = yes; then | |
17928 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
17929 | else | |
17930 | PRAGMA_COLUMNS= | |
17931 | fi | |
17932 | ||
17933 | ||
710f5812 | 17934 | |
710f5812 | 17935 | |
710f5812 | 17936 | |
d7ad186c GM |
17937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 |
17938 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
17939 | if test "${gl_cv_func_c99_strtold+set}" = set; then : | |
f199cab1 | 17940 | $as_echo_n "(cached) " >&6 |
ae0d7250 | 17941 | else |
f199cab1 | 17942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 17943 | /* end confdefs.h. */ |
d7ad186c GM |
17944 | /* On HP-UX before 11.23, strtold returns a struct instead of |
17945 | long double. Reject implementations like that, by requiring | |
17946 | compatibility with the C99 prototype. */ | |
17947 | #include <stdlib.h> | |
17948 | static long double (*p) (char const *, char **) = strtold; | |
17949 | static long double | |
17950 | test (char const *nptr, char **endptr) | |
17951 | { | |
17952 | long double r; | |
17953 | r = strtold (nptr, endptr); | |
17954 | return r; | |
17955 | } | |
3e0be4ab GM |
17956 | int |
17957 | main () | |
17958 | { | |
d7ad186c | 17959 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; |
3e0be4ab GM |
17960 | ; |
17961 | return 0; | |
17962 | } | |
6ad6792b | 17963 | _ACEOF |
d7ad186c GM |
17964 | if ac_fn_c_try_link "$LINENO"; then : |
17965 | gl_cv_func_c99_strtold=yes | |
f199cab1 | 17966 | else |
d7ad186c | 17967 | gl_cv_func_c99_strtold=no |
f199cab1 | 17968 | fi |
d7ad186c GM |
17969 | rm -f core conftest.err conftest.$ac_objext \ |
17970 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 17971 | fi |
d7ad186c GM |
17972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 |
17973 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
17974 | if test $gl_cv_func_c99_strtold = yes; then | |
f199cab1 | 17975 | |
d7ad186c | 17976 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h |
f199cab1 | 17977 | |
5476a9a4 | 17978 | fi |
f199cab1 | 17979 | |
f199cab1 | 17980 | |
f199cab1 GM |
17981 | |
17982 | ||
4fda9c95 | 17983 | |
3bf26e96 GM |
17984 | |
17985 | ||
eda33f78 | 17986 | |
d7ad186c GM |
17987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 |
17988 | $as_echo_n "checking if environ is properly declared... " >&6; } | |
17989 | if test "${gt_cv_var_environ_declaration+set}" = set; then : | |
17990 | $as_echo_n "(cached) " >&6 | |
17991 | else | |
eda33f78 | 17992 | |
d7ad186c GM |
17993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17994 | /* end confdefs.h. */ | |
17995 | #if HAVE_UNISTD_H | |
17996 | #include <unistd.h> | |
17997 | #endif | |
17998 | /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ | |
17999 | #include <stdlib.h> | |
18000 | ||
18001 | extern struct { int foo; } environ; | |
18002 | int | |
18003 | main () | |
18004 | { | |
18005 | environ.foo = 1; | |
18006 | ; | |
18007 | return 0; | |
18008 | } | |
18009 | _ACEOF | |
18010 | if ac_fn_c_try_compile "$LINENO"; then : | |
18011 | gt_cv_var_environ_declaration=no | |
18012 | else | |
18013 | gt_cv_var_environ_declaration=yes | |
18014 | fi | |
18015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18016 | fi | |
18017 | ||
18018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 | |
18019 | $as_echo "$gt_cv_var_environ_declaration" >&6; } | |
18020 | if test $gt_cv_var_environ_declaration = yes; then | |
18021 | ||
18022 | $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |
18023 | ||
18024 | fi | |
18025 | ||
18026 | ||
18027 | if test $gt_cv_var_environ_declaration != yes; then | |
18028 | HAVE_DECL_ENVIRON=0 | |
18029 | fi | |
18030 | ||
18031 | ||
18032 | ||
3a019ab4 GM |
18033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 |
18034 | $as_echo_n "checking for complete errno.h... " >&6; } | |
18035 | if test "${gl_cv_header_errno_h_complete+set}" = set; then : | |
18036 | $as_echo_n "(cached) " >&6 | |
18037 | else | |
18038 | ||
18039 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18040 | /* end confdefs.h. */ | |
18041 | ||
18042 | #include <errno.h> | |
18043 | #if !defined ETXTBSY | |
18044 | booboo | |
18045 | #endif | |
18046 | #if !defined ENOMSG | |
18047 | booboo | |
18048 | #endif | |
18049 | #if !defined EIDRM | |
18050 | booboo | |
18051 | #endif | |
18052 | #if !defined ENOLINK | |
18053 | booboo | |
18054 | #endif | |
18055 | #if !defined EPROTO | |
18056 | booboo | |
18057 | #endif | |
18058 | #if !defined EMULTIHOP | |
18059 | booboo | |
18060 | #endif | |
18061 | #if !defined EBADMSG | |
18062 | booboo | |
18063 | #endif | |
18064 | #if !defined EOVERFLOW | |
18065 | booboo | |
18066 | #endif | |
18067 | #if !defined ENOTSUP | |
18068 | booboo | |
18069 | #endif | |
18070 | #if !defined ENETRESET | |
18071 | booboo | |
18072 | #endif | |
18073 | #if !defined ECONNABORTED | |
18074 | booboo | |
18075 | #endif | |
18076 | #if !defined ESTALE | |
18077 | booboo | |
18078 | #endif | |
18079 | #if !defined EDQUOT | |
18080 | booboo | |
18081 | #endif | |
18082 | #if !defined ECANCELED | |
18083 | booboo | |
18084 | #endif | |
18085 | #if !defined EOWNERDEAD | |
18086 | booboo | |
18087 | #endif | |
18088 | #if !defined ENOTRECOVERABLE | |
18089 | booboo | |
18090 | #endif | |
18091 | #if !defined EILSEQ | |
18092 | booboo | |
18093 | #endif | |
18094 | ||
18095 | _ACEOF | |
18096 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18097 | $EGREP "booboo" >/dev/null 2>&1; then : | |
18098 | gl_cv_header_errno_h_complete=no | |
18099 | else | |
18100 | gl_cv_header_errno_h_complete=yes | |
18101 | fi | |
18102 | rm -f conftest* | |
18103 | ||
d7ad186c | 18104 | |
3a019ab4 GM |
18105 | fi |
18106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 | |
18107 | $as_echo "$gl_cv_header_errno_h_complete" >&6; } | |
18108 | if test $gl_cv_header_errno_h_complete = yes; then | |
18109 | ERRNO_H='' | |
18110 | else | |
d7ad186c GM |
18111 | |
18112 | ||
18113 | ||
18114 | ||
18115 | ||
d7ad186c GM |
18116 | |
18117 | ||
d7ad186c | 18118 | |
3a019ab4 GM |
18119 | if test $gl_cv_have_include_next = yes; then |
18120 | gl_cv_next_errno_h='<'errno.h'>' | |
18121 | else | |
18122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5 | |
18123 | $as_echo_n "checking absolute name of <errno.h>... " >&6; } | |
18124 | if test "${gl_cv_next_errno_h+set}" = set; then : | |
18125 | $as_echo_n "(cached) " >&6 | |
d7ad186c GM |
18126 | else |
18127 | ||
3a019ab4 GM |
18128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18129 | /* end confdefs.h. */ | |
18130 | #include <errno.h> | |
18131 | ||
d7ad186c | 18132 | _ACEOF |
3a019ab4 GM |
18133 | case "$host_os" in |
18134 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18135 | *) gl_absname_cpp="$ac_cpp" ;; | |
18136 | esac | |
18137 | ||
18138 | case "$host_os" in | |
18139 | mingw*) | |
18140 | gl_dirsep_regex='[/\\]' | |
18141 | ;; | |
18142 | *) | |
18143 | gl_dirsep_regex='\/' | |
18144 | ;; | |
18145 | esac | |
18146 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
18147 | ||
18148 | gl_header_literal_regex=`echo 'errno.h' \ | |
18149 | | sed -e "$gl_make_literal_regex_sed"` | |
18150 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18151 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18152 | s|^/[^/]|//&| | |
18153 | p | |
18154 | q | |
18155 | }' | |
18156 | gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18157 | sed -n "$gl_absolute_header_sed"`'"' | |
d7ad186c | 18158 | |
d7ad186c | 18159 | |
2407788f | 18160 | fi |
3a019ab4 GM |
18161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 |
18162 | $as_echo "$gl_cv_next_errno_h" >&6; } | |
18163 | fi | |
18164 | NEXT_ERRNO_H=$gl_cv_next_errno_h | |
2407788f | 18165 | |
3a019ab4 GM |
18166 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18167 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18168 | gl_next_as_first_directive='<'errno.h'>' | |
18169 | else | |
18170 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18171 | gl_next_as_first_directive=$gl_cv_next_errno_h | |
18172 | fi | |
18173 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive | |
2407788f | 18174 | |
d7ad186c GM |
18175 | |
18176 | ||
d7ad186c | 18177 | |
3a019ab4 GM |
18178 | ERRNO_H='errno.h' |
18179 | fi | |
18180 | ||
18181 | if test -n "$ERRNO_H"; then | |
18182 | GL_GENERATE_ERRNO_H_TRUE= | |
18183 | GL_GENERATE_ERRNO_H_FALSE='#' | |
d7ad186c | 18184 | else |
3a019ab4 GM |
18185 | GL_GENERATE_ERRNO_H_TRUE='#' |
18186 | GL_GENERATE_ERRNO_H_FALSE= | |
d7ad186c | 18187 | fi |
d7ad186c | 18188 | |
d7ad186c | 18189 | |
3a019ab4 GM |
18190 | if test -n "$ERRNO_H"; then |
18191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 | |
18192 | $as_echo_n "checking for EMULTIHOP value... " >&6; } | |
18193 | if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then : | |
18194 | $as_echo_n "(cached) " >&6 | |
18195 | else | |
d7ad186c | 18196 | |
3a019ab4 GM |
18197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18198 | /* end confdefs.h. */ | |
d7ad186c | 18199 | |
3a019ab4 GM |
18200 | #include <errno.h> |
18201 | #ifdef EMULTIHOP | |
18202 | yes | |
18203 | #endif | |
d7ad186c | 18204 | |
3a019ab4 GM |
18205 | _ACEOF |
18206 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18207 | $EGREP "yes" >/dev/null 2>&1; then : | |
18208 | gl_cv_header_errno_h_EMULTIHOP=yes | |
d7ad186c | 18209 | else |
3a019ab4 | 18210 | gl_cv_header_errno_h_EMULTIHOP=no |
d7ad186c | 18211 | fi |
3a019ab4 GM |
18212 | rm -f conftest* |
18213 | ||
18214 | if test $gl_cv_header_errno_h_EMULTIHOP = no; then | |
18215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18216 | /* end confdefs.h. */ | |
18217 | ||
18218 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18219 | #include <errno.h> | |
18220 | #ifdef EMULTIHOP | |
18221 | yes | |
18222 | #endif | |
d7ad186c | 18223 | |
d7ad186c | 18224 | _ACEOF |
3a019ab4 GM |
18225 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
18226 | $EGREP "yes" >/dev/null 2>&1; then : | |
18227 | gl_cv_header_errno_h_EMULTIHOP=hidden | |
18228 | fi | |
18229 | rm -f conftest* | |
d7ad186c | 18230 | |
3a019ab4 GM |
18231 | if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then |
18232 | if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " | |
18233 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18234 | #include <errno.h> | |
18235 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
18236 | #include <stdio.h> | |
18237 | #include <stdlib.h> | |
18238 | "; then : | |
d7ad186c | 18239 | |
3a019ab4 | 18240 | fi |
d7ad186c | 18241 | |
3a019ab4 GM |
18242 | fi |
18243 | fi | |
d7ad186c | 18244 | |
3a019ab4 GM |
18245 | fi |
18246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 | |
18247 | $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } | |
18248 | case $gl_cv_header_errno_h_EMULTIHOP in | |
18249 | yes | no) | |
18250 | EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= | |
18251 | ;; | |
18252 | *) | |
18253 | EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" | |
18254 | ;; | |
18255 | esac | |
d7ad186c GM |
18256 | |
18257 | ||
3a019ab4 | 18258 | fi |
d7ad186c GM |
18259 | |
18260 | ||
3a019ab4 GM |
18261 | if test -n "$ERRNO_H"; then |
18262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 | |
18263 | $as_echo_n "checking for ENOLINK value... " >&6; } | |
18264 | if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then : | |
d7ad186c GM |
18265 | $as_echo_n "(cached) " >&6 |
18266 | else | |
d7ad186c | 18267 | |
3a019ab4 | 18268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d7ad186c | 18269 | /* end confdefs.h. */ |
3a019ab4 GM |
18270 | |
18271 | #include <errno.h> | |
18272 | #ifdef ENOLINK | |
18273 | yes | |
18274 | #endif | |
18275 | ||
18276 | _ACEOF | |
18277 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18278 | $EGREP "yes" >/dev/null 2>&1; then : | |
18279 | gl_cv_header_errno_h_ENOLINK=yes | |
18280 | else | |
18281 | gl_cv_header_errno_h_ENOLINK=no | |
18282 | fi | |
18283 | rm -f conftest* | |
18284 | ||
18285 | if test $gl_cv_header_errno_h_ENOLINK = no; then | |
18286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18287 | /* end confdefs.h. */ | |
18288 | ||
18289 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18290 | #include <errno.h> | |
18291 | #ifdef ENOLINK | |
18292 | yes | |
18293 | #endif | |
18294 | ||
18295 | _ACEOF | |
18296 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18297 | $EGREP "yes" >/dev/null 2>&1; then : | |
18298 | gl_cv_header_errno_h_ENOLINK=hidden | |
18299 | fi | |
18300 | rm -f conftest* | |
18301 | ||
18302 | if test $gl_cv_header_errno_h_ENOLINK = hidden; then | |
18303 | if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " | |
18304 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18305 | #include <errno.h> | |
18306 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
18307 | #include <stdio.h> | |
18308 | #include <stdlib.h> | |
18309 | "; then : | |
18310 | ||
18311 | fi | |
18312 | ||
18313 | fi | |
18314 | fi | |
18315 | ||
18316 | fi | |
18317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 | |
18318 | $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } | |
18319 | case $gl_cv_header_errno_h_ENOLINK in | |
18320 | yes | no) | |
18321 | ENOLINK_HIDDEN=0; ENOLINK_VALUE= | |
18322 | ;; | |
18323 | *) | |
18324 | ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" | |
18325 | ;; | |
18326 | esac | |
18327 | ||
18328 | ||
18329 | fi | |
18330 | ||
18331 | ||
18332 | if test -n "$ERRNO_H"; then | |
18333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 | |
18334 | $as_echo_n "checking for EOVERFLOW value... " >&6; } | |
18335 | if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then : | |
18336 | $as_echo_n "(cached) " >&6 | |
18337 | else | |
18338 | ||
18339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18340 | /* end confdefs.h. */ | |
18341 | ||
18342 | #include <errno.h> | |
18343 | #ifdef EOVERFLOW | |
18344 | yes | |
18345 | #endif | |
18346 | ||
18347 | _ACEOF | |
18348 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18349 | $EGREP "yes" >/dev/null 2>&1; then : | |
18350 | gl_cv_header_errno_h_EOVERFLOW=yes | |
18351 | else | |
18352 | gl_cv_header_errno_h_EOVERFLOW=no | |
18353 | fi | |
18354 | rm -f conftest* | |
18355 | ||
18356 | if test $gl_cv_header_errno_h_EOVERFLOW = no; then | |
18357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18358 | /* end confdefs.h. */ | |
18359 | ||
18360 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18361 | #include <errno.h> | |
18362 | #ifdef EOVERFLOW | |
18363 | yes | |
18364 | #endif | |
18365 | ||
18366 | _ACEOF | |
18367 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
18368 | $EGREP "yes" >/dev/null 2>&1; then : | |
18369 | gl_cv_header_errno_h_EOVERFLOW=hidden | |
18370 | fi | |
18371 | rm -f conftest* | |
18372 | ||
18373 | if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then | |
18374 | if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " | |
18375 | #define _XOPEN_SOURCE_EXTENDED 1 | |
18376 | #include <errno.h> | |
18377 | /* The following two lines are a workaround against an autoconf-2.52 bug. */ | |
18378 | #include <stdio.h> | |
18379 | #include <stdlib.h> | |
18380 | "; then : | |
18381 | ||
18382 | fi | |
18383 | ||
18384 | fi | |
18385 | fi | |
18386 | ||
18387 | fi | |
18388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 | |
18389 | $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } | |
18390 | case $gl_cv_header_errno_h_EOVERFLOW in | |
18391 | yes | no) | |
18392 | EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= | |
18393 | ;; | |
18394 | *) | |
18395 | EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" | |
18396 | ;; | |
18397 | esac | |
18398 | ||
18399 | ||
18400 | fi | |
18401 | ||
18402 | ||
18403 | ||
18404 | ||
18405 | ||
18406 | ||
18407 | ||
18408 | ||
18409 | ||
18410 | ||
18411 | GNULIB_FCNTL=0; | |
18412 | GNULIB_NONBLOCKING=0; | |
18413 | GNULIB_OPEN=0; | |
18414 | GNULIB_OPENAT=0; | |
18415 | HAVE_FCNTL=1; | |
18416 | HAVE_OPENAT=1; | |
18417 | REPLACE_FCNTL=0; | |
18418 | REPLACE_OPEN=0; | |
18419 | REPLACE_OPENAT=0; | |
18420 | ||
18421 | ||
0cdca42a GM |
18422 | |
18423 | ||
3a019ab4 GM |
18424 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
18425 | if test "x$ac_cv_type_mode_t" = x""yes; then : | |
18426 | ||
18427 | else | |
18428 | ||
18429 | cat >>confdefs.h <<_ACEOF | |
18430 | #define mode_t int | |
18431 | _ACEOF | |
18432 | ||
18433 | fi | |
18434 | ||
18435 | ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default" | |
18436 | if test "x$ac_cv_have_decl_fdatasync" = x""yes; then : | |
18437 | ac_have_decl=1 | |
18438 | else | |
18439 | ac_have_decl=0 | |
18440 | fi | |
18441 | ||
18442 | cat >>confdefs.h <<_ACEOF | |
18443 | #define HAVE_DECL_FDATASYNC $ac_have_decl | |
18444 | _ACEOF | |
18445 | ||
18446 | ||
18447 | ||
18448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 | |
18449 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | |
18450 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | |
18451 | $as_echo_n "(cached) " >&6 | |
18452 | else | |
18453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18454 | /* end confdefs.h. */ | |
18455 | ||
18456 | #include <sys/types.h> | |
18457 | #include <sys/stat.h> | |
18458 | int | |
18459 | main () | |
18460 | { | |
18461 | struct stat s; s.st_dm_mode; | |
18462 | ; | |
18463 | return 0; | |
18464 | } | |
18465 | _ACEOF | |
18466 | if ac_fn_c_try_compile "$LINENO"; then : | |
18467 | ac_cv_struct_st_dm_mode=yes | |
18468 | else | |
18469 | ac_cv_struct_st_dm_mode=no | |
18470 | fi | |
18471 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
18472 | fi | |
18473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 | |
18474 | $as_echo "$ac_cv_struct_st_dm_mode" >&6; } | |
18475 | ||
18476 | if test $ac_cv_struct_st_dm_mode = yes; then | |
18477 | ||
18478 | $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h | |
18479 | ||
18480 | fi | |
18481 | ||
18482 | ||
18483 | ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" | |
18484 | if test "x$ac_cv_have_decl_strmode" = x""yes; then : | |
18485 | ac_have_decl=1 | |
18486 | else | |
18487 | ac_have_decl=0 | |
18488 | fi | |
18489 | ||
18490 | cat >>confdefs.h <<_ACEOF | |
18491 | #define HAVE_DECL_STRMODE $ac_have_decl | |
18492 | _ACEOF | |
18493 | ||
18494 | ||
18495 | ||
18496 | ||
18497 | ||
18498 | ||
18499 | GNULIB_FCHMODAT=0; | |
18500 | GNULIB_FSTAT=0; | |
18501 | GNULIB_FSTATAT=0; | |
18502 | GNULIB_FUTIMENS=0; | |
18503 | GNULIB_LCHMOD=0; | |
18504 | GNULIB_LSTAT=0; | |
18505 | GNULIB_MKDIRAT=0; | |
18506 | GNULIB_MKFIFO=0; | |
18507 | GNULIB_MKFIFOAT=0; | |
18508 | GNULIB_MKNOD=0; | |
18509 | GNULIB_MKNODAT=0; | |
18510 | GNULIB_STAT=0; | |
18511 | GNULIB_UTIMENSAT=0; | |
18512 | HAVE_FCHMODAT=1; | |
18513 | HAVE_FSTATAT=1; | |
18514 | HAVE_FUTIMENS=1; | |
18515 | HAVE_LCHMOD=1; | |
18516 | HAVE_LSTAT=1; | |
18517 | HAVE_MKDIRAT=1; | |
18518 | HAVE_MKFIFO=1; | |
18519 | HAVE_MKFIFOAT=1; | |
18520 | HAVE_MKNOD=1; | |
18521 | HAVE_MKNODAT=1; | |
18522 | HAVE_UTIMENSAT=1; | |
18523 | REPLACE_FSTAT=0; | |
18524 | REPLACE_FSTATAT=0; | |
18525 | REPLACE_FUTIMENS=0; | |
18526 | REPLACE_LSTAT=0; | |
18527 | REPLACE_MKDIR=0; | |
18528 | REPLACE_MKFIFO=0; | |
18529 | REPLACE_MKNOD=0; | |
18530 | REPLACE_STAT=0; | |
18531 | REPLACE_UTIMENSAT=0; | |
18532 | ||
18533 | ||
18534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | |
18535 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
18536 | if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : | |
18537 | $as_echo_n "(cached) " >&6 | |
18538 | else | |
18539 | rm -f conftest.sym conftest.file | |
18540 | echo >conftest.file | |
18541 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
18542 | if test "$cross_compiling" = yes; then : | |
18543 | case "$host_os" in | |
18544 | # Guess yes on glibc systems. | |
18545 | *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
18546 | # If we don't know, assume the worst. | |
18547 | *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; | |
18548 | esac | |
18549 | ||
18550 | else | |
18551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18552 | /* end confdefs.h. */ | |
18553 | $ac_includes_default | |
18554 | int | |
18555 | main () | |
18556 | { | |
18557 | struct stat sbuf; | |
18558 | /* Linux will dereference the symlink and fail, as required by | |
d7ad186c GM |
18559 | POSIX. That is better in the sense that it means we will not |
18560 | have to compile and use the lstat wrapper. */ | |
18561 | return lstat ("conftest.sym/", &sbuf) == 0; | |
18562 | ||
18563 | ; | |
18564 | return 0; | |
18565 | } | |
18566 | _ACEOF | |
18567 | if ac_fn_c_try_run "$LINENO"; then : | |
18568 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
18569 | else | |
18570 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
18571 | fi | |
18572 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18573 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18574 | fi | |
18575 | ||
18576 | else | |
18577 | # If the 'ln -s' command failed, then we probably don't even | |
18578 | # have an lstat function. | |
18579 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" | |
18580 | fi | |
18581 | rm -f conftest.sym conftest.file | |
18582 | ||
18583 | fi | |
18584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 | |
18585 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
18586 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
18587 | *yes) | |
18588 | ||
18589 | cat >>confdefs.h <<_ACEOF | |
18590 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
18591 | _ACEOF | |
18592 | ||
18593 | ;; | |
18594 | esac | |
18595 | ||
18596 | ||
18597 | ||
18598 | ||
2407788f GM |
18599 | |
18600 | ||
d7ad186c GM |
18601 | GNULIB__EXIT=0; |
18602 | GNULIB_ATOLL=0; | |
18603 | GNULIB_CALLOC_POSIX=0; | |
18604 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
18605 | GNULIB_GETLOADAVG=0; | |
18606 | GNULIB_GETSUBOPT=0; | |
18607 | GNULIB_GRANTPT=0; | |
5476a9a4 GM |
18608 | GNULIB_MALLOC_POSIX=0; |
18609 | GNULIB_MBTOWC=0; | |
18610 | GNULIB_MKDTEMP=0; | |
18611 | GNULIB_MKOSTEMP=0; | |
18612 | GNULIB_MKOSTEMPS=0; | |
18613 | GNULIB_MKSTEMP=0; | |
18614 | GNULIB_MKSTEMPS=0; | |
18615 | GNULIB_POSIX_OPENPT=0; | |
18616 | GNULIB_PTSNAME=0; | |
18617 | GNULIB_PTSNAME_R=0; | |
18618 | GNULIB_PUTENV=0; | |
18619 | GNULIB_RANDOM=0; | |
18620 | GNULIB_RANDOM_R=0; | |
18621 | GNULIB_REALLOC_POSIX=0; | |
18622 | GNULIB_REALPATH=0; | |
18623 | GNULIB_RPMATCH=0; | |
2cdd55fc | 18624 | GNULIB_SECURE_GETENV=0; |
5476a9a4 GM |
18625 | GNULIB_SETENV=0; |
18626 | GNULIB_STRTOD=0; | |
18627 | GNULIB_STRTOLL=0; | |
18628 | GNULIB_STRTOULL=0; | |
18629 | GNULIB_SYSTEM_POSIX=0; | |
18630 | GNULIB_UNLOCKPT=0; | |
18631 | GNULIB_UNSETENV=0; | |
18632 | GNULIB_WCTOMB=0; | |
18633 | HAVE__EXIT=1; | |
18634 | HAVE_ATOLL=1; | |
18635 | HAVE_CANONICALIZE_FILE_NAME=1; | |
18636 | HAVE_DECL_GETLOADAVG=1; | |
18637 | HAVE_GETSUBOPT=1; | |
18638 | HAVE_GRANTPT=1; | |
18639 | HAVE_MKDTEMP=1; | |
18640 | HAVE_MKOSTEMP=1; | |
18641 | HAVE_MKOSTEMPS=1; | |
18642 | HAVE_MKSTEMP=1; | |
18643 | HAVE_MKSTEMPS=1; | |
18644 | HAVE_POSIX_OPENPT=1; | |
18645 | HAVE_PTSNAME=1; | |
18646 | HAVE_PTSNAME_R=1; | |
18647 | HAVE_RANDOM=1; | |
18648 | HAVE_RANDOM_H=1; | |
18649 | HAVE_RANDOM_R=1; | |
18650 | HAVE_REALPATH=1; | |
18651 | HAVE_RPMATCH=1; | |
2cdd55fc | 18652 | HAVE_SECURE_GETENV=1; |
5476a9a4 GM |
18653 | HAVE_SETENV=1; |
18654 | HAVE_DECL_SETENV=1; | |
18655 | HAVE_STRTOD=1; | |
18656 | HAVE_STRTOLL=1; | |
18657 | HAVE_STRTOULL=1; | |
18658 | HAVE_STRUCT_RANDOM_DATA=1; | |
18659 | HAVE_SYS_LOADAVG_H=0; | |
18660 | HAVE_UNLOCKPT=1; | |
18661 | HAVE_DECL_UNSETENV=1; | |
18662 | REPLACE_CALLOC=0; | |
18663 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
18664 | REPLACE_MALLOC=0; | |
18665 | REPLACE_MBTOWC=0; | |
18666 | REPLACE_MKSTEMP=0; | |
b6c9d18d | 18667 | REPLACE_PTSNAME=0; |
5476a9a4 GM |
18668 | REPLACE_PTSNAME_R=0; |
18669 | REPLACE_PUTENV=0; | |
18670 | REPLACE_RANDOM_R=0; | |
18671 | REPLACE_REALLOC=0; | |
18672 | REPLACE_REALPATH=0; | |
18673 | REPLACE_SETENV=0; | |
18674 | REPLACE_STRTOD=0; | |
18675 | REPLACE_UNSETENV=0; | |
18676 | REPLACE_WCTOMB=0; | |
f199cab1 GM |
18677 | |
18678 | ||
18679 | ||
f199cab1 GM |
18680 | |
18681 | ||
18682 | ||
18683 | ||
18684 | ||
18685 | ||
18686 | ||
18687 | ||
18688 | ||
18689 | ||
5f90be1b | 18690 | |
f199cab1 GM |
18691 | |
18692 | ||
18693 | if test $gl_cv_have_include_next = yes; then | |
5476a9a4 | 18694 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 18695 | else |
5476a9a4 GM |
18696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 |
18697 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
18698 | if test "${gl_cv_next_getopt_h+set}" = set; then : | |
5f90be1b | 18699 | $as_echo_n "(cached) " >&6 |
5f90be1b | 18700 | else |
f199cab1 | 18701 | |
5476a9a4 | 18702 | if test $ac_cv_header_getopt_h = yes; then |
f199cab1 GM |
18703 | |
18704 | ||
18705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 18706 | /* end confdefs.h. */ |
5476a9a4 | 18707 | #include <getopt.h> |
4fda9c95 | 18708 | |
5f90be1b | 18709 | _ACEOF |
f199cab1 GM |
18710 | case "$host_os" in |
18711 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18712 | *) gl_absname_cpp="$ac_cpp" ;; | |
18713 | esac | |
5f90be1b | 18714 | |
f199cab1 GM |
18715 | case "$host_os" in |
18716 | mingw*) | |
18717 | gl_dirsep_regex='[/\\]' | |
18718 | ;; | |
18719 | *) | |
18720 | gl_dirsep_regex='\/' | |
18721 | ;; | |
18722 | esac | |
18723 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
5f90be1b | 18724 | |
5476a9a4 | 18725 | gl_header_literal_regex=`echo 'getopt.h' \ |
f199cab1 GM |
18726 | | sed -e "$gl_make_literal_regex_sed"` |
18727 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18728 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18729 | s|^/[^/]|//&| | |
18730 | p | |
18731 | q | |
18732 | }' | |
5476a9a4 | 18733 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
f199cab1 GM |
18734 | sed -n "$gl_absolute_header_sed"`'"' |
18735 | else | |
5476a9a4 | 18736 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 18737 | fi |
5f90be1b PE |
18738 | |
18739 | ||
3e0be4ab | 18740 | fi |
5476a9a4 GM |
18741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 |
18742 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
f199cab1 | 18743 | fi |
5476a9a4 | 18744 | NEXT_GETOPT_H=$gl_cv_next_getopt_h |
3e0be4ab | 18745 | |
f199cab1 GM |
18746 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18747 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5476a9a4 | 18748 | gl_next_as_first_directive='<'getopt.h'>' |
f199cab1 GM |
18749 | else |
18750 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5476a9a4 | 18751 | gl_next_as_first_directive=$gl_cv_next_getopt_h |
f199cab1 | 18752 | fi |
5476a9a4 | 18753 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive |
f199cab1 GM |
18754 | |
18755 | ||
f199cab1 | 18756 | |
f199cab1 | 18757 | |
5476a9a4 GM |
18758 | if test $ac_cv_header_getopt_h = yes; then |
18759 | HAVE_GETOPT_H=1 | |
18760 | else | |
18761 | HAVE_GETOPT_H=0 | |
f199cab1 GM |
18762 | fi |
18763 | ||
f199cab1 | 18764 | |
5476a9a4 | 18765 | gl_replace_getopt= |
f199cab1 | 18766 | |
5476a9a4 GM |
18767 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
18768 | for ac_header in getopt.h | |
18769 | do : | |
18770 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
18771 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
18772 | cat >>confdefs.h <<_ACEOF | |
18773 | #define HAVE_GETOPT_H 1 | |
18774 | _ACEOF | |
f199cab1 | 18775 | |
5476a9a4 GM |
18776 | else |
18777 | gl_replace_getopt=yes | |
3e0be4ab | 18778 | fi |
3e0be4ab | 18779 | |
5476a9a4 | 18780 | done |
3e0be4ab | 18781 | |
5476a9a4 | 18782 | fi |
3e0be4ab | 18783 | |
5476a9a4 GM |
18784 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
18785 | for ac_func in getopt_long_only | |
18786 | do : | |
18787 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
18788 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
18789 | cat >>confdefs.h <<_ACEOF | |
18790 | #define HAVE_GETOPT_LONG_ONLY 1 | |
18791 | _ACEOF | |
3e0be4ab | 18792 | |
3e0be4ab | 18793 | else |
5476a9a4 | 18794 | gl_replace_getopt=yes |
3e0be4ab | 18795 | fi |
5476a9a4 | 18796 | done |
3e0be4ab | 18797 | |
f199cab1 | 18798 | fi |
3e0be4ab | 18799 | |
5476a9a4 GM |
18800 | if test -z "$gl_replace_getopt"; then |
18801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
18802 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
18803 | if test "${gl_cv_func_getopt_posix+set}" = set; then : | |
3e0be4ab | 18804 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
18805 | else |
18806 | ||
18807 | if test $cross_compiling = no; then | |
18808 | if test "$cross_compiling" = yes; then : | |
18809 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
18810 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
18811 | as_fn_error "cannot run test program while cross compiling | |
18812 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 18813 | else |
f199cab1 | 18814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 18815 | /* end confdefs.h. */ |
5476a9a4 GM |
18816 | |
18817 | #include <unistd.h> | |
18818 | #include <stdlib.h> | |
18819 | #include <string.h> | |
18820 | ||
f199cab1 GM |
18821 | int |
18822 | main () | |
18823 | { | |
5476a9a4 GM |
18824 | static char program[] = "program"; |
18825 | static char a[] = "-a"; | |
18826 | static char foo[] = "foo"; | |
18827 | static char bar[] = "bar"; | |
18828 | char *argv[] = { program, a, foo, bar, NULL }; | |
18829 | int c; | |
18830 | ||
18831 | c = getopt (4, argv, "ab"); | |
18832 | if (!(c == 'a')) | |
18833 | return 1; | |
18834 | c = getopt (4, argv, "ab"); | |
18835 | if (!(c == -1)) | |
18836 | return 2; | |
18837 | if (!(optind == 2)) | |
18838 | return 3; | |
f199cab1 GM |
18839 | return 0; |
18840 | } | |
18841 | ||
3e0be4ab | 18842 | _ACEOF |
5476a9a4 GM |
18843 | if ac_fn_c_try_run "$LINENO"; then : |
18844 | gl_cv_func_getopt_posix=maybe | |
3e0be4ab | 18845 | else |
5476a9a4 | 18846 | gl_cv_func_getopt_posix=no |
3e0be4ab | 18847 | fi |
5476a9a4 GM |
18848 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
18849 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
18850 | fi |
18851 | ||
5476a9a4 GM |
18852 | if test $gl_cv_func_getopt_posix = maybe; then |
18853 | if test "$cross_compiling" = yes; then : | |
18854 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
18855 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
18856 | as_fn_error "cannot run test program while cross compiling | |
18857 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 18858 | else |
5476a9a4 GM |
18859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18860 | /* end confdefs.h. */ | |
3e0be4ab | 18861 | |
5476a9a4 GM |
18862 | #include <unistd.h> |
18863 | #include <stdlib.h> | |
18864 | #include <string.h> | |
3e0be4ab | 18865 | |
5476a9a4 GM |
18866 | int |
18867 | main () | |
18868 | { | |
18869 | static char program[] = "program"; | |
18870 | static char donald[] = "donald"; | |
18871 | static char p[] = "-p"; | |
18872 | static char billy[] = "billy"; | |
18873 | static char duck[] = "duck"; | |
18874 | static char a[] = "-a"; | |
18875 | static char bar[] = "bar"; | |
18876 | char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; | |
18877 | int c; | |
3e0be4ab | 18878 | |
5476a9a4 GM |
18879 | c = getopt (7, argv, "+abp:q:"); |
18880 | if (!(c == -1)) | |
18881 | return 4; | |
18882 | if (!(strcmp (argv[0], "program") == 0)) | |
18883 | return 5; | |
18884 | if (!(strcmp (argv[1], "donald") == 0)) | |
18885 | return 6; | |
18886 | if (!(strcmp (argv[2], "-p") == 0)) | |
18887 | return 7; | |
18888 | if (!(strcmp (argv[3], "billy") == 0)) | |
18889 | return 8; | |
18890 | if (!(strcmp (argv[4], "duck") == 0)) | |
18891 | return 9; | |
18892 | if (!(strcmp (argv[5], "-a") == 0)) | |
18893 | return 10; | |
18894 | if (!(strcmp (argv[6], "bar") == 0)) | |
18895 | return 11; | |
18896 | if (!(optind == 1)) | |
18897 | return 12; | |
18898 | return 0; | |
18899 | } | |
3e0be4ab GM |
18900 | |
18901 | _ACEOF | |
5476a9a4 GM |
18902 | if ac_fn_c_try_run "$LINENO"; then : |
18903 | gl_cv_func_getopt_posix=maybe | |
18904 | else | |
18905 | gl_cv_func_getopt_posix=no | |
18906 | fi | |
18907 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18908 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18909 | fi | |
b0415a03 | 18910 | |
5476a9a4 GM |
18911 | fi |
18912 | if test $gl_cv_func_getopt_posix = maybe; then | |
18913 | if test "$cross_compiling" = yes; then : | |
18914 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
18915 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
18916 | as_fn_error "cannot run test program while cross compiling | |
18917 | See \`config.log' for more details." "$LINENO" 5; } | |
18918 | else | |
18919 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18920 | /* end confdefs.h. */ | |
b0415a03 | 18921 | |
5476a9a4 GM |
18922 | #include <unistd.h> |
18923 | #include <stdlib.h> | |
18924 | #include <string.h> | |
3e0be4ab | 18925 | |
5476a9a4 GM |
18926 | int |
18927 | main () | |
18928 | { | |
18929 | static char program[] = "program"; | |
18930 | static char ab[] = "-ab"; | |
18931 | char *argv[3] = { program, ab, NULL }; | |
18932 | if (getopt (2, argv, "ab:") != 'a') | |
18933 | return 13; | |
18934 | if (getopt (2, argv, "ab:") != '?') | |
18935 | return 14; | |
18936 | if (optopt != 'b') | |
18937 | return 15; | |
18938 | if (optind != 2) | |
18939 | return 16; | |
18940 | return 0; | |
18941 | } | |
3e0be4ab | 18942 | |
5476a9a4 GM |
18943 | _ACEOF |
18944 | if ac_fn_c_try_run "$LINENO"; then : | |
18945 | gl_cv_func_getopt_posix=yes | |
18946 | else | |
18947 | gl_cv_func_getopt_posix=no | |
18948 | fi | |
18949 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18950 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3e0be4ab | 18951 | fi |
3e0be4ab | 18952 | |
5476a9a4 GM |
18953 | fi |
18954 | else | |
18955 | case "$host_os" in | |
18956 | darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
18957 | *) gl_cv_func_getopt_posix="guessing yes";; | |
18958 | esac | |
18959 | fi | |
3e0be4ab | 18960 | |
5476a9a4 GM |
18961 | fi |
18962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
18963 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
18964 | case "$gl_cv_func_getopt_posix" in | |
18965 | *no) gl_replace_getopt=yes ;; | |
18966 | esac | |
3e0be4ab GM |
18967 | fi |
18968 | ||
5476a9a4 GM |
18969 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
18970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
18971 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
18972 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : | |
18973 | $as_echo_n "(cached) " >&6 | |
18974 | else | |
18975 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
18976 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
18977 | # semantics for supporting options interspersed with files. | |
18978 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
18979 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
18980 | # so take care to revert to the correct (non-)export state. | |
18981 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
18982 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
18983 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
18984 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
18985 | *) gl_had_POSIXLY_CORRECT= ;; | |
18986 | esac | |
18987 | POSIXLY_CORRECT=1 | |
18988 | export POSIXLY_CORRECT | |
18989 | if test "$cross_compiling" = yes; then : | |
18990 | gl_cv_func_getopt_gnu="guessing no" | |
3e0be4ab | 18991 | |
5476a9a4 GM |
18992 | else |
18993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18994 | /* end confdefs.h. */ | |
18995 | #include <getopt.h> | |
18996 | #include <stddef.h> | |
18997 | #include <string.h> | |
3e0be4ab | 18998 | |
5476a9a4 GM |
18999 | #include <stdlib.h> |
19000 | #if defined __MACH__ && defined __APPLE__ | |
19001 | /* Avoid a crash on Mac OS X. */ | |
19002 | #include <mach/mach.h> | |
19003 | #include <mach/mach_error.h> | |
19004 | #include <mach/thread_status.h> | |
19005 | #include <mach/exception.h> | |
19006 | #include <mach/task.h> | |
19007 | #include <pthread.h> | |
19008 | /* The exception port on which our thread listens. */ | |
19009 | static mach_port_t our_exception_port; | |
19010 | /* The main function of the thread listening for exceptions of type | |
19011 | EXC_BAD_ACCESS. */ | |
19012 | static void * | |
19013 | mach_exception_thread (void *arg) | |
19014 | { | |
19015 | /* Buffer for a message to be received. */ | |
19016 | struct { | |
19017 | mach_msg_header_t head; | |
19018 | mach_msg_body_t msgh_body; | |
19019 | char data[1024]; | |
19020 | } msg; | |
19021 | mach_msg_return_t retval; | |
19022 | /* Wait for a message on the exception port. */ | |
19023 | retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), | |
19024 | our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | |
19025 | if (retval != MACH_MSG_SUCCESS) | |
19026 | abort (); | |
19027 | exit (1); | |
19028 | } | |
19029 | static void | |
19030 | nocrash_init (void) | |
19031 | { | |
19032 | mach_port_t self = mach_task_self (); | |
19033 | /* Allocate a port on which the thread shall listen for exceptions. */ | |
19034 | if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) | |
19035 | == KERN_SUCCESS) { | |
19036 | /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ | |
19037 | if (mach_port_insert_right (self, our_exception_port, our_exception_port, | |
19038 | MACH_MSG_TYPE_MAKE_SEND) | |
19039 | == KERN_SUCCESS) { | |
19040 | /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting | |
19041 | for us. */ | |
19042 | exception_mask_t mask = EXC_MASK_BAD_ACCESS; | |
19043 | /* Create the thread listening on the exception port. */ | |
19044 | pthread_attr_t attr; | |
19045 | pthread_t thread; | |
19046 | if (pthread_attr_init (&attr) == 0 | |
19047 | && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 | |
19048 | && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { | |
19049 | pthread_attr_destroy (&attr); | |
19050 | /* Replace the exception port info for these exceptions with our own. | |
19051 | Note that we replace the exception port for the entire task, not only | |
19052 | for a particular thread. This has the effect that when our exception | |
19053 | port gets the message, the thread specific exception port has already | |
19054 | been asked, and we don't need to bother about it. | |
19055 | See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ | |
19056 | task_set_exception_ports (self, mask, our_exception_port, | |
19057 | EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); | |
19058 | } | |
19059 | } | |
19060 | } | |
19061 | } | |
19062 | #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | |
19063 | /* Avoid a crash on native Windows. */ | |
19064 | #define WIN32_LEAN_AND_MEAN | |
19065 | #include <windows.h> | |
19066 | #include <winerror.h> | |
19067 | static LONG WINAPI | |
19068 | exception_filter (EXCEPTION_POINTERS *ExceptionInfo) | |
19069 | { | |
19070 | switch (ExceptionInfo->ExceptionRecord->ExceptionCode) | |
19071 | { | |
19072 | case EXCEPTION_ACCESS_VIOLATION: | |
19073 | case EXCEPTION_IN_PAGE_ERROR: | |
19074 | case EXCEPTION_STACK_OVERFLOW: | |
19075 | case EXCEPTION_GUARD_PAGE: | |
19076 | case EXCEPTION_PRIV_INSTRUCTION: | |
19077 | case EXCEPTION_ILLEGAL_INSTRUCTION: | |
19078 | case EXCEPTION_DATATYPE_MISALIGNMENT: | |
19079 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: | |
19080 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: | |
19081 | exit (1); | |
19082 | } | |
19083 | return EXCEPTION_CONTINUE_SEARCH; | |
19084 | } | |
19085 | static void | |
19086 | nocrash_init (void) | |
19087 | { | |
19088 | SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); | |
19089 | } | |
19090 | #else | |
19091 | /* Avoid a crash on POSIX systems. */ | |
19092 | #include <signal.h> | |
19093 | /* A POSIX signal handler. */ | |
19094 | static void | |
19095 | exception_handler (int sig) | |
19096 | { | |
19097 | exit (1); | |
19098 | } | |
19099 | static void | |
19100 | nocrash_init (void) | |
19101 | { | |
19102 | #ifdef SIGSEGV | |
19103 | signal (SIGSEGV, exception_handler); | |
19104 | #endif | |
19105 | #ifdef SIGBUS | |
19106 | signal (SIGBUS, exception_handler); | |
19107 | #endif | |
19108 | } | |
19109 | #endif | |
3e0be4ab | 19110 | |
3e0be4ab | 19111 | |
5476a9a4 GM |
19112 | int |
19113 | main () | |
19114 | { | |
3e0be4ab | 19115 | |
5476a9a4 | 19116 | int result = 0; |
3e0be4ab | 19117 | |
5476a9a4 | 19118 | nocrash_init(); |
3e0be4ab | 19119 | |
5476a9a4 GM |
19120 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, |
19121 | and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
19122 | OSF/1 5.1, Solaris 10. */ | |
19123 | { | |
19124 | static char conftest[] = "conftest"; | |
19125 | static char plus[] = "-+"; | |
19126 | char *argv[3] = { conftest, plus, NULL }; | |
19127 | opterr = 0; | |
19128 | if (getopt (2, argv, "+a") != '?') | |
19129 | result |= 1; | |
19130 | } | |
19131 | /* This code succeeds on glibc 2.8, mingw, | |
19132 | and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
19133 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
19134 | { | |
19135 | static char program[] = "program"; | |
19136 | static char p[] = "-p"; | |
19137 | static char foo[] = "foo"; | |
19138 | static char bar[] = "bar"; | |
19139 | char *argv[] = { program, p, foo, bar, NULL }; | |
3e0be4ab | 19140 | |
5476a9a4 GM |
19141 | optind = 1; |
19142 | if (getopt (4, argv, "p::") != 'p') | |
19143 | result |= 2; | |
19144 | else if (optarg != NULL) | |
19145 | result |= 4; | |
19146 | else if (getopt (4, argv, "p::") != -1) | |
19147 | result |= 6; | |
19148 | else if (optind != 2) | |
19149 | result |= 8; | |
19150 | } | |
19151 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
19152 | { | |
19153 | static char program[] = "program"; | |
19154 | static char foo[] = "foo"; | |
19155 | static char p[] = "-p"; | |
19156 | char *argv[] = { program, foo, p, NULL }; | |
19157 | optind = 0; | |
19158 | if (getopt (3, argv, "-p") != 1) | |
19159 | result |= 16; | |
19160 | else if (getopt (3, argv, "-p") != 'p') | |
19161 | result |= 16; | |
19162 | } | |
19163 | /* This code fails on glibc 2.11. */ | |
19164 | { | |
19165 | static char program[] = "program"; | |
19166 | static char b[] = "-b"; | |
19167 | static char a[] = "-a"; | |
19168 | char *argv[] = { program, b, a, NULL }; | |
19169 | optind = opterr = 0; | |
19170 | if (getopt (3, argv, "+:a:b") != 'b') | |
19171 | result |= 32; | |
19172 | else if (getopt (3, argv, "+:a:b") != ':') | |
19173 | result |= 32; | |
19174 | } | |
19175 | /* This code dumps core on glibc 2.14. */ | |
19176 | { | |
19177 | static char program[] = "program"; | |
19178 | static char w[] = "-W"; | |
19179 | static char dummy[] = "dummy"; | |
19180 | char *argv[] = { program, w, dummy, NULL }; | |
19181 | optind = opterr = 1; | |
19182 | if (getopt (3, argv, "W;") != 'W') | |
19183 | result |= 64; | |
19184 | } | |
19185 | return result; | |
3e0be4ab | 19186 | |
5476a9a4 GM |
19187 | ; |
19188 | return 0; | |
19189 | } | |
19190 | _ACEOF | |
19191 | if ac_fn_c_try_run "$LINENO"; then : | |
19192 | gl_cv_func_getopt_gnu=yes | |
19193 | else | |
19194 | gl_cv_func_getopt_gnu=no | |
19195 | fi | |
19196 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19197 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19198 | fi | |
3e0be4ab | 19199 | |
5476a9a4 GM |
19200 | case $gl_had_POSIXLY_CORRECT in |
19201 | exported) ;; | |
19202 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
19203 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
19204 | esac | |
3e0be4ab | 19205 | |
5476a9a4 GM |
19206 | fi |
19207 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 | |
19208 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
19209 | if test "$gl_cv_func_getopt_gnu" != yes; then | |
19210 | gl_replace_getopt=yes | |
19211 | else | |
19212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 | |
19213 | $as_echo_n "checking for working GNU getopt_long function... " >&6; } | |
19214 | if test "${gl_cv_func_getopt_long_gnu+set}" = set; then : | |
f199cab1 GM |
19215 | $as_echo_n "(cached) " >&6 |
19216 | else | |
5476a9a4 GM |
19217 | if test "$cross_compiling" = yes; then : |
19218 | case "$host_os" in | |
19219 | openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; | |
19220 | *) gl_cv_func_getopt_long_gnu="guessing yes";; | |
19221 | esac | |
3e0be4ab GM |
19222 | |
19223 | else | |
19224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19225 | /* end confdefs.h. */ | |
5476a9a4 GM |
19226 | #include <getopt.h> |
19227 | #include <stddef.h> | |
19228 | #include <string.h> | |
f199cab1 GM |
19229 | |
19230 | int | |
19231 | main () | |
369e19fc | 19232 | { |
5476a9a4 GM |
19233 | static const struct option long_options[] = |
19234 | { | |
19235 | { "xtremely-",no_argument, NULL, 1003 }, | |
19236 | { "xtra", no_argument, NULL, 1001 }, | |
19237 | { "xtreme", no_argument, NULL, 1002 }, | |
19238 | { "xtremely", no_argument, NULL, 1003 }, | |
19239 | { NULL, 0, NULL, 0 } | |
19240 | }; | |
19241 | /* This code fails on OpenBSD 5.0. */ | |
19242 | { | |
19243 | static char program[] = "program"; | |
19244 | static char xtremel[] = "--xtremel"; | |
19245 | char *argv[] = { program, xtremel, NULL }; | |
19246 | int option_index; | |
19247 | optind = 1; opterr = 0; | |
19248 | if (getopt_long (2, argv, "", long_options, &option_index) != 1003) | |
19249 | return 1; | |
19250 | } | |
19251 | return 0; | |
f199cab1 GM |
19252 | |
19253 | ; | |
19254 | return 0; | |
369e19fc | 19255 | } |
f199cab1 GM |
19256 | _ACEOF |
19257 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 19258 | gl_cv_func_getopt_long_gnu=yes |
f199cab1 | 19259 | else |
5476a9a4 | 19260 | gl_cv_func_getopt_long_gnu=no |
f199cab1 GM |
19261 | fi |
19262 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19263 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19264 | fi | |
19265 | ||
5476a9a4 | 19266 | |
f199cab1 | 19267 | fi |
5476a9a4 GM |
19268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 |
19269 | $as_echo "$gl_cv_func_getopt_long_gnu" >&6; } | |
19270 | case "$gl_cv_func_getopt_long_gnu" in | |
19271 | *yes) ;; | |
19272 | *) gl_replace_getopt=yes ;; | |
19273 | esac | |
19274 | fi | |
19275 | fi | |
f199cab1 | 19276 | |
f199cab1 | 19277 | |
f199cab1 | 19278 | |
369e19fc PE |
19279 | |
19280 | ||
5476a9a4 GM |
19281 | |
19282 | REPLACE_GETOPT=0 | |
19283 | if test -n "$gl_replace_getopt"; then | |
19284 | REPLACE_GETOPT=1 | |
f199cab1 | 19285 | fi |
3e0be4ab | 19286 | |
5476a9a4 | 19287 | if test $REPLACE_GETOPT = 1; then |
369e19fc | 19288 | |
5476a9a4 | 19289 | GETOPT_H=getopt.h |
369e19fc | 19290 | |
5476a9a4 | 19291 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
6ad6792b GM |
19292 | |
19293 | ||
f199cab1 | 19294 | |
5476a9a4 | 19295 | fi |
f199cab1 | 19296 | |
5476a9a4 GM |
19297 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" |
19298 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : | |
19299 | ac_have_decl=1 | |
3e0be4ab | 19300 | else |
5476a9a4 | 19301 | ac_have_decl=0 |
3e0be4ab | 19302 | fi |
e275c824 | 19303 | |
5476a9a4 GM |
19304 | cat >>confdefs.h <<_ACEOF |
19305 | #define HAVE_DECL_GETENV $ac_have_decl | |
19306 | _ACEOF | |
19307 | ||
a6342fc8 | 19308 | : |
f199cab1 | 19309 | |
5476a9a4 GM |
19310 | |
19311 | ||
19312 | ||
19313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
19314 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
19315 | if test "${ac_cv_c_restrict+set}" = set; then : | |
19316 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 19317 | else |
5476a9a4 GM |
19318 | ac_cv_c_restrict=no |
19319 | # The order here caters to the fact that C++ does not require restrict. | |
19320 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
19321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 19322 | /* end confdefs.h. */ |
5476a9a4 GM |
19323 | typedef int * int_ptr; |
19324 | int foo (int_ptr $ac_kw ip) { | |
19325 | return ip[0]; | |
19326 | } | |
f199cab1 GM |
19327 | int |
19328 | main () | |
19329 | { | |
5476a9a4 GM |
19330 | int s[1]; |
19331 | int * $ac_kw t = s; | |
19332 | t[0] = 0; | |
19333 | return foo(t) | |
f199cab1 GM |
19334 | ; |
19335 | return 0; | |
19336 | } | |
19337 | _ACEOF | |
5476a9a4 GM |
19338 | if ac_fn_c_try_compile "$LINENO"; then : |
19339 | ac_cv_c_restrict=$ac_kw | |
f199cab1 | 19340 | fi |
5476a9a4 GM |
19341 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
19342 | test "$ac_cv_c_restrict" != no && break | |
19343 | done | |
f199cab1 | 19344 | |
f199cab1 | 19345 | fi |
5476a9a4 GM |
19346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
19347 | $as_echo "$ac_cv_c_restrict" >&6; } | |
f199cab1 | 19348 | |
5476a9a4 GM |
19349 | case $ac_cv_c_restrict in |
19350 | restrict) ;; | |
19351 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
19352 | ;; | |
19353 | *) cat >>confdefs.h <<_ACEOF | |
19354 | #define restrict $ac_cv_c_restrict | |
19355 | _ACEOF | |
19356 | ;; | |
19357 | esac | |
f199cab1 | 19358 | |
f199cab1 | 19359 | |
5476a9a4 GM |
19360 | GNULIB_GETTIMEOFDAY=0; |
19361 | HAVE_GETTIMEOFDAY=1; | |
19362 | HAVE_STRUCT_TIMEVAL=1; | |
19363 | HAVE_SYS_TIME_H=1; | |
19364 | REPLACE_GETTIMEOFDAY=0; | |
19365 | REPLACE_STRUCT_TIMEVAL=0; | |
e275c824 | 19366 | |
e275c824 | 19367 | |
e275c824 | 19368 | |
e275c824 | 19369 | |
4fda9c95 | 19370 | |
5fa4ac76 | 19371 | |
5fa4ac76 | 19372 | |
5fa4ac76 | 19373 | |
f199cab1 GM |
19374 | |
19375 | ||
19376 | ||
5fa4ac76 | 19377 | |
5fa4ac76 | 19378 | |
5fa4ac76 | 19379 | |
5fa4ac76 | 19380 | |
5fa4ac76 | 19381 | |
5476a9a4 GM |
19382 | if test $gl_cv_have_include_next = yes; then |
19383 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
19384 | else | |
19385 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 | |
19386 | $as_echo_n "checking absolute name of <sys/time.h>... " >&6; } | |
19387 | if test "${gl_cv_next_sys_time_h+set}" = set; then : | |
19388 | $as_echo_n "(cached) " >&6 | |
19389 | else | |
5fa4ac76 | 19390 | |
5476a9a4 | 19391 | if test $ac_cv_header_sys_time_h = yes; then |
5fa4ac76 PE |
19392 | |
19393 | ||
5476a9a4 GM |
19394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19395 | /* end confdefs.h. */ | |
19396 | #include <sys/time.h> | |
5fa4ac76 | 19397 | |
5476a9a4 GM |
19398 | _ACEOF |
19399 | case "$host_os" in | |
19400 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19401 | *) gl_absname_cpp="$ac_cpp" ;; | |
19402 | esac | |
1f5d53eb | 19403 | |
5476a9a4 GM |
19404 | case "$host_os" in |
19405 | mingw*) | |
19406 | gl_dirsep_regex='[/\\]' | |
19407 | ;; | |
19408 | *) | |
19409 | gl_dirsep_regex='\/' | |
19410 | ;; | |
19411 | esac | |
19412 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1f5d53eb | 19413 | |
5476a9a4 GM |
19414 | gl_header_literal_regex=`echo 'sys/time.h' \ |
19415 | | sed -e "$gl_make_literal_regex_sed"` | |
19416 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19417 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19418 | s|^/[^/]|//&| | |
19419 | p | |
19420 | q | |
19421 | }' | |
19422 | gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19423 | sed -n "$gl_absolute_header_sed"`'"' | |
19424 | else | |
19425 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
19426 | fi | |
1f5d53eb | 19427 | |
1f5d53eb | 19428 | |
5476a9a4 GM |
19429 | fi |
19430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 | |
19431 | $as_echo "$gl_cv_next_sys_time_h" >&6; } | |
19432 | fi | |
19433 | NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h | |
3e0be4ab | 19434 | |
5476a9a4 GM |
19435 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19436 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19437 | gl_next_as_first_directive='<'sys/time.h'>' | |
19438 | else | |
19439 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19440 | gl_next_as_first_directive=$gl_cv_next_sys_time_h | |
19441 | fi | |
19442 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive | |
3e0be4ab | 19443 | |
e275c824 | 19444 | |
3e0be4ab | 19445 | |
f199cab1 GM |
19446 | |
19447 | ||
5476a9a4 GM |
19448 | if test $ac_cv_header_sys_time_h != yes; then |
19449 | HAVE_SYS_TIME_H=0 | |
19450 | fi | |
f199cab1 GM |
19451 | |
19452 | ||
19453 | ||
19454 | ||
19455 | ||
5476a9a4 GM |
19456 | if test $ac_cv_header_sys_socket_h != yes; then |
19457 | for ac_header in winsock2.h | |
19458 | do : | |
19459 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
19460 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
19461 | cat >>confdefs.h <<_ACEOF | |
19462 | #define HAVE_WINSOCK2_H 1 | |
19463 | _ACEOF | |
f199cab1 | 19464 | |
5476a9a4 | 19465 | fi |
3e0be4ab | 19466 | |
5476a9a4 | 19467 | done |
3e0be4ab | 19468 | |
5476a9a4 GM |
19469 | fi |
19470 | if test "$ac_cv_header_winsock2_h" = yes; then | |
19471 | HAVE_WINSOCK2_H=1 | |
19472 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
19473 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
19474 | else | |
19475 | HAVE_WINSOCK2_H=0 | |
19476 | fi | |
19477 | ||
19478 | ||
19479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
19480 | $as_echo_n "checking for struct timeval... " >&6; } | |
19481 | if test "${gl_cv_sys_struct_timeval+set}" = set; then : | |
19482 | $as_echo_n "(cached) " >&6 | |
19483 | else | |
19484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19485 | /* end confdefs.h. */ | |
19486 | #if HAVE_SYS_TIME_H | |
19487 | #include <sys/time.h> | |
19488 | #endif | |
19489 | #include <time.h> | |
19490 | #if HAVE_WINSOCK2_H | |
19491 | # include <winsock2.h> | |
19492 | #endif | |
f199cab1 | 19493 | |
5476a9a4 GM |
19494 | int |
19495 | main () | |
19496 | { | |
19497 | static struct timeval x; x.tv_sec = x.tv_usec; | |
19498 | ; | |
19499 | return 0; | |
19500 | } | |
19501 | _ACEOF | |
19502 | if ac_fn_c_try_compile "$LINENO"; then : | |
19503 | gl_cv_sys_struct_timeval=yes | |
19504 | else | |
19505 | gl_cv_sys_struct_timeval=no | |
f199cab1 | 19506 | fi |
5476a9a4 | 19507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 19508 | |
5476a9a4 GM |
19509 | fi |
19510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 | |
19511 | $as_echo "$gl_cv_sys_struct_timeval" >&6; } | |
19512 | if test $gl_cv_sys_struct_timeval != yes; then | |
19513 | HAVE_STRUCT_TIMEVAL=0 | |
19514 | else | |
19515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 | |
19516 | $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } | |
19517 | if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then : | |
19518 | $as_echo_n "(cached) " >&6 | |
19519 | else | |
19520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19521 | /* end confdefs.h. */ | |
19522 | #if HAVE_SYS_TIME_H | |
19523 | #include <sys/time.h> | |
19524 | #endif | |
19525 | #include <time.h> | |
19526 | #if HAVE_WINSOCK2_H | |
19527 | # include <winsock2.h> | |
19528 | #endif | |
f199cab1 | 19529 | |
5476a9a4 GM |
19530 | int |
19531 | main () | |
19532 | { | |
19533 | static struct timeval x; | |
19534 | typedef int verify_tv_sec_type[ | |
19535 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | |
19536 | ]; | |
f199cab1 | 19537 | |
5476a9a4 GM |
19538 | ; |
19539 | return 0; | |
19540 | } | |
19541 | _ACEOF | |
19542 | if ac_fn_c_try_compile "$LINENO"; then : | |
19543 | gl_cv_sys_struct_timeval_tv_sec=yes | |
19544 | else | |
19545 | gl_cv_sys_struct_timeval_tv_sec=no | |
19546 | fi | |
19547 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
f199cab1 | 19548 | |
5476a9a4 GM |
19549 | fi |
19550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 | |
19551 | $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } | |
19552 | if test $gl_cv_sys_struct_timeval_tv_sec != yes; then | |
19553 | REPLACE_STRUCT_TIMEVAL=1 | |
19554 | fi | |
19555 | fi | |
f199cab1 | 19556 | |
f199cab1 GM |
19557 | |
19558 | ||
19559 | ||
19560 | ||
19561 | ||
f199cab1 | 19562 | |
5476a9a4 GM |
19563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
19564 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
19565 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
19566 | $as_echo_n "(cached) " >&6 | |
19567 | else | |
19568 | ac_cv_type_unsigned_long_long_int=yes | |
19569 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
19570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19571 | /* end confdefs.h. */ | |
f199cab1 | 19572 | |
5476a9a4 GM |
19573 | /* For now, do not test the preprocessor; as of 2007 there are too many |
19574 | implementations with broken preprocessors. Perhaps this can | |
19575 | be revisited in 2012. In the meantime, code should not expect | |
19576 | #if to work with literals wider than 32 bits. */ | |
19577 | /* Test literals. */ | |
19578 | long long int ll = 9223372036854775807ll; | |
19579 | long long int nll = -9223372036854775807LL; | |
19580 | unsigned long long int ull = 18446744073709551615ULL; | |
19581 | /* Test constant expressions. */ | |
19582 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
19583 | ? 1 : -1)]; | |
19584 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
19585 | ? 1 : -1)]; | |
19586 | int i = 63; | |
19587 | int | |
19588 | main () | |
19589 | { | |
19590 | /* Test availability of runtime routines for shift and division. */ | |
19591 | long long int llmax = 9223372036854775807ll; | |
19592 | unsigned long long int ullmax = 18446744073709551615ull; | |
19593 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
19594 | | (llmax / ll) | (llmax % ll) | |
19595 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
19596 | | (ullmax / ull) | (ullmax % ull)); | |
19597 | ; | |
19598 | return 0; | |
19599 | } | |
f199cab1 | 19600 | |
e275c824 | 19601 | _ACEOF |
5476a9a4 | 19602 | if ac_fn_c_try_link "$LINENO"; then : |
3e0be4ab | 19603 | |
5476a9a4 GM |
19604 | else |
19605 | ac_cv_type_unsigned_long_long_int=no | |
e275c824 | 19606 | fi |
5476a9a4 GM |
19607 | rm -f core conftest.err conftest.$ac_objext \ |
19608 | conftest$ac_exeext conftest.$ac_ext | |
19609 | fi | |
19610 | fi | |
19611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
19612 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
19613 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
e275c824 | 19614 | |
5476a9a4 | 19615 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 19616 | |
5476a9a4 | 19617 | fi |
e275c824 PE |
19618 | |
19619 | ||
f199cab1 | 19620 | |
5476a9a4 GM |
19621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
19622 | $as_echo_n "checking for long long int... " >&6; } | |
19623 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
19624 | $as_echo_n "(cached) " >&6 | |
19625 | else | |
19626 | ac_cv_type_long_long_int=yes | |
19627 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
19628 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
19629 | if test $ac_cv_type_long_long_int = yes; then | |
19630 | if test "$cross_compiling" = yes; then : | |
f199cab1 | 19631 | : |
5476a9a4 GM |
19632 | else |
19633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19634 | /* end confdefs.h. */ | |
19635 | #include <limits.h> | |
19636 | #ifndef LLONG_MAX | |
19637 | # define HALF \ | |
19638 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
19639 | # define LLONG_MAX (HALF - 1 + HALF) | |
19640 | #endif | |
19641 | int | |
19642 | main () | |
19643 | { | |
19644 | long long int n = 1; | |
19645 | int i; | |
19646 | for (i = 0; ; i++) | |
19647 | { | |
19648 | long long int m = n << i; | |
19649 | if (m >> i != n) | |
19650 | return 1; | |
19651 | if (LLONG_MAX / 2 < m) | |
19652 | break; | |
19653 | } | |
19654 | return 0; | |
19655 | ; | |
19656 | return 0; | |
19657 | } | |
19658 | _ACEOF | |
19659 | if ac_fn_c_try_run "$LINENO"; then : | |
19660 | ||
19661 | else | |
19662 | ac_cv_type_long_long_int=no | |
19663 | fi | |
19664 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
19665 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
19666 | fi | |
e275c824 | 19667 | |
5476a9a4 GM |
19668 | fi |
19669 | fi | |
1f5d53eb | 19670 | fi |
5476a9a4 GM |
19671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
19672 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
19673 | if test $ac_cv_type_long_long_int = yes; then | |
e275c824 | 19674 | |
5476a9a4 | 19675 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 19676 | |
5476a9a4 | 19677 | fi |
e275c824 PE |
19678 | |
19679 | ||
e275c824 PE |
19680 | |
19681 | ||
19682 | ||
19683 | ||
5476a9a4 GM |
19684 | gl_cv_c_multiarch=no |
19685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19686 | /* end confdefs.h. */ | |
19687 | #ifndef __APPLE_CC__ | |
19688 | not a universal capable compiler | |
19689 | #endif | |
19690 | typedef int dummy; | |
e275c824 | 19691 | |
5476a9a4 GM |
19692 | _ACEOF |
19693 | if ac_fn_c_try_compile "$LINENO"; then : | |
e275c824 | 19694 | |
5476a9a4 GM |
19695 | arch= |
19696 | prev= | |
19697 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
19698 | if test -n "$prev"; then | |
19699 | case $word in | |
19700 | i?86 | x86_64 | ppc | ppc64) | |
19701 | if test -z "$arch" || test "$arch" = "$word"; then | |
19702 | arch="$word" | |
19703 | else | |
19704 | gl_cv_c_multiarch=yes | |
19705 | fi | |
19706 | ;; | |
19707 | esac | |
19708 | prev= | |
19709 | else | |
19710 | if test "x$word" = "x-arch"; then | |
19711 | prev=arch | |
19712 | fi | |
19713 | fi | |
19714 | done | |
f199cab1 | 19715 | |
f199cab1 | 19716 | fi |
5476a9a4 GM |
19717 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
19718 | if test $gl_cv_c_multiarch = yes; then | |
19719 | APPLE_UNIVERSAL_BUILD=1 | |
19720 | else | |
19721 | APPLE_UNIVERSAL_BUILD=0 | |
19722 | fi | |
e275c824 PE |
19723 | |
19724 | ||
67342916 | 19725 | |
67342916 | 19726 | |
67342916 | 19727 | |
5476a9a4 GM |
19728 | if test $ac_cv_type_long_long_int = yes; then |
19729 | HAVE_LONG_LONG_INT=1 | |
19730 | else | |
19731 | HAVE_LONG_LONG_INT=0 | |
19732 | fi | |
e275c824 | 19733 | |
e275c824 | 19734 | |
5476a9a4 GM |
19735 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
19736 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
19737 | else | |
19738 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
19739 | fi | |
e275c824 PE |
19740 | |
19741 | ||
19742 | ||
5476a9a4 GM |
19743 | if test $ac_cv_header_wchar_h = yes; then |
19744 | HAVE_WCHAR_H=1 | |
19745 | else | |
19746 | HAVE_WCHAR_H=0 | |
19747 | fi | |
e275c824 | 19748 | |
e275c824 | 19749 | |
5476a9a4 GM |
19750 | if test $ac_cv_header_inttypes_h = yes; then |
19751 | HAVE_INTTYPES_H=1 | |
19752 | else | |
19753 | HAVE_INTTYPES_H=0 | |
19754 | fi | |
6c051bab | 19755 | |
942f733f | 19756 | |
5476a9a4 GM |
19757 | if test $ac_cv_header_sys_types_h = yes; then |
19758 | HAVE_SYS_TYPES_H=1 | |
19759 | else | |
19760 | HAVE_SYS_TYPES_H=0 | |
19761 | fi | |
4fc2b746 | 19762 | |
4fc2b746 | 19763 | |
f199cab1 GM |
19764 | |
19765 | ||
19766 | ||
19767 | ||
19768 | ||
19769 | ||
19770 | ||
19771 | ||
19772 | ||
5476a9a4 GM |
19773 | if test $gl_cv_have_include_next = yes; then |
19774 | gl_cv_next_stdint_h='<'stdint.h'>' | |
19775 | else | |
19776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
19777 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
19778 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
19779 | $as_echo_n "(cached) " >&6 | |
19780 | else | |
f199cab1 | 19781 | |
5476a9a4 | 19782 | if test $ac_cv_header_stdint_h = yes; then |
f199cab1 GM |
19783 | |
19784 | ||
5476a9a4 GM |
19785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19786 | /* end confdefs.h. */ | |
19787 | #include <stdint.h> | |
f199cab1 | 19788 | |
5476a9a4 GM |
19789 | _ACEOF |
19790 | case "$host_os" in | |
19791 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19792 | *) gl_absname_cpp="$ac_cpp" ;; | |
19793 | esac | |
f199cab1 | 19794 | |
5476a9a4 GM |
19795 | case "$host_os" in |
19796 | mingw*) | |
19797 | gl_dirsep_regex='[/\\]' | |
19798 | ;; | |
19799 | *) | |
19800 | gl_dirsep_regex='\/' | |
19801 | ;; | |
19802 | esac | |
19803 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
4fc2b746 | 19804 | |
5476a9a4 GM |
19805 | gl_header_literal_regex=`echo 'stdint.h' \ |
19806 | | sed -e "$gl_make_literal_regex_sed"` | |
19807 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19808 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19809 | s|^/[^/]|//&| | |
19810 | p | |
19811 | q | |
19812 | }' | |
19813 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19814 | sed -n "$gl_absolute_header_sed"`'"' | |
19815 | else | |
19816 | gl_cv_next_stdint_h='<'stdint.h'>' | |
19817 | fi | |
4fc2b746 | 19818 | |
4fc2b746 | 19819 | |
5476a9a4 GM |
19820 | fi |
19821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
19822 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
19823 | fi | |
19824 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
b0415a03 | 19825 | |
5476a9a4 GM |
19826 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19827 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19828 | gl_next_as_first_directive='<'stdint.h'>' | |
19829 | else | |
19830 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19831 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
19832 | fi | |
19833 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
b0415a03 | 19834 | |
4fc2b746 | 19835 | |
f199cab1 | 19836 | |
f199cab1 | 19837 | |
5476a9a4 GM |
19838 | if test $ac_cv_header_stdint_h = yes; then |
19839 | HAVE_STDINT_H=1 | |
19840 | else | |
19841 | HAVE_STDINT_H=0 | |
19842 | fi | |
f199cab1 GM |
19843 | |
19844 | ||
5476a9a4 GM |
19845 | if test $ac_cv_header_stdint_h = yes; then |
19846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
19847 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
19848 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
f199cab1 GM |
19849 | $as_echo_n "(cached) " >&6 |
19850 | else | |
5476a9a4 GM |
19851 | gl_cv_header_working_stdint_h=no |
19852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19853 | /* end confdefs.h. */ | |
4fc2b746 GM |
19854 | |
19855 | ||
5476a9a4 GM |
19856 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
19857 | #include <stdint.h> | |
19858 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
19859 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
19860 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
19861 | #endif | |
4fc2b746 | 19862 | |
942f733f | 19863 | |
5476a9a4 GM |
19864 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
19865 | included before <wchar.h>. */ | |
19866 | #include <stddef.h> | |
19867 | #include <signal.h> | |
19868 | #if HAVE_WCHAR_H | |
19869 | # include <stdio.h> | |
19870 | # include <time.h> | |
19871 | # include <wchar.h> | |
19872 | #endif | |
e275c824 | 19873 | |
f199cab1 | 19874 | |
5476a9a4 GM |
19875 | #ifdef INT8_MAX |
19876 | int8_t a1 = INT8_MAX; | |
19877 | int8_t a1min = INT8_MIN; | |
19878 | #endif | |
19879 | #ifdef INT16_MAX | |
19880 | int16_t a2 = INT16_MAX; | |
19881 | int16_t a2min = INT16_MIN; | |
19882 | #endif | |
19883 | #ifdef INT32_MAX | |
19884 | int32_t a3 = INT32_MAX; | |
19885 | int32_t a3min = INT32_MIN; | |
19886 | #endif | |
19887 | #ifdef INT64_MAX | |
19888 | int64_t a4 = INT64_MAX; | |
19889 | int64_t a4min = INT64_MIN; | |
19890 | #endif | |
19891 | #ifdef UINT8_MAX | |
19892 | uint8_t b1 = UINT8_MAX; | |
19893 | #else | |
19894 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
19895 | #endif | |
19896 | #ifdef UINT16_MAX | |
19897 | uint16_t b2 = UINT16_MAX; | |
19898 | #endif | |
19899 | #ifdef UINT32_MAX | |
19900 | uint32_t b3 = UINT32_MAX; | |
19901 | #endif | |
19902 | #ifdef UINT64_MAX | |
19903 | uint64_t b4 = UINT64_MAX; | |
19904 | #endif | |
19905 | int_least8_t c1 = INT8_C (0x7f); | |
19906 | int_least8_t c1max = INT_LEAST8_MAX; | |
19907 | int_least8_t c1min = INT_LEAST8_MIN; | |
19908 | int_least16_t c2 = INT16_C (0x7fff); | |
19909 | int_least16_t c2max = INT_LEAST16_MAX; | |
19910 | int_least16_t c2min = INT_LEAST16_MIN; | |
19911 | int_least32_t c3 = INT32_C (0x7fffffff); | |
19912 | int_least32_t c3max = INT_LEAST32_MAX; | |
19913 | int_least32_t c3min = INT_LEAST32_MIN; | |
19914 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
19915 | int_least64_t c4max = INT_LEAST64_MAX; | |
19916 | int_least64_t c4min = INT_LEAST64_MIN; | |
19917 | uint_least8_t d1 = UINT8_C (0xff); | |
19918 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
19919 | uint_least16_t d2 = UINT16_C (0xffff); | |
19920 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
19921 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
19922 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
19923 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
19924 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
19925 | int_fast8_t e1 = INT_FAST8_MAX; | |
19926 | int_fast8_t e1min = INT_FAST8_MIN; | |
19927 | int_fast16_t e2 = INT_FAST16_MAX; | |
19928 | int_fast16_t e2min = INT_FAST16_MIN; | |
19929 | int_fast32_t e3 = INT_FAST32_MAX; | |
19930 | int_fast32_t e3min = INT_FAST32_MIN; | |
19931 | int_fast64_t e4 = INT_FAST64_MAX; | |
19932 | int_fast64_t e4min = INT_FAST64_MIN; | |
19933 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
19934 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
19935 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
19936 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
19937 | #ifdef INTPTR_MAX | |
19938 | intptr_t g = INTPTR_MAX; | |
19939 | intptr_t gmin = INTPTR_MIN; | |
19940 | #endif | |
19941 | #ifdef UINTPTR_MAX | |
19942 | uintptr_t h = UINTPTR_MAX; | |
19943 | #endif | |
19944 | intmax_t i = INTMAX_MAX; | |
19945 | uintmax_t j = UINTMAX_MAX; | |
5fa4ac76 | 19946 | |
5476a9a4 GM |
19947 | #include <limits.h> /* for CHAR_BIT */ |
19948 | #define TYPE_MINIMUM(t) \ | |
19949 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
19950 | #define TYPE_MAXIMUM(t) \ | |
19951 | ((t) ((t) 0 < (t) -1 \ | |
19952 | ? (t) -1 \ | |
19953 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
19954 | struct s { | |
19955 | int check_PTRDIFF: | |
19956 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
19957 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
19958 | ? 1 : -1; | |
19959 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
19960 | int check_SIG_ATOMIC: | |
19961 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
19962 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
19963 | ? 1 : -1; | |
19964 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
19965 | int check_WCHAR: | |
19966 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
19967 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
19968 | ? 1 : -1; | |
19969 | /* Detect bug in mingw. */ | |
19970 | int check_WINT: | |
19971 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
19972 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
19973 | ? 1 : -1; | |
5fa4ac76 | 19974 | |
5476a9a4 GM |
19975 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
19976 | int check_UINT8_C: | |
19977 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
19978 | int check_UINT16_C: | |
19979 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
19980 | ||
19981 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
19982 | #ifdef UINT8_MAX | |
19983 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
3e0be4ab | 19984 | #endif |
5476a9a4 GM |
19985 | #ifdef UINT16_MAX |
19986 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
19987 | #endif | |
19988 | #ifdef UINT32_MAX | |
19989 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
19990 | #endif | |
19991 | #ifdef UINT64_MAX | |
19992 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
19993 | #endif | |
19994 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
19995 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
19996 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
19997 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
19998 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
19999 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
20000 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
20001 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
20002 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
20003 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
20004 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
20005 | }; | |
20006 | ||
f199cab1 GM |
20007 | int |
20008 | main () | |
20009 | { | |
5476a9a4 | 20010 | |
f199cab1 GM |
20011 | ; |
20012 | return 0; | |
20013 | } | |
20014 | _ACEOF | |
5476a9a4 GM |
20015 | if ac_fn_c_try_compile "$LINENO"; then : |
20016 | if test "$cross_compiling" = yes; then : | |
20017 | gl_cv_header_working_stdint_h=yes | |
40e27e7f | 20018 | |
5476a9a4 GM |
20019 | else |
20020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20021 | /* end confdefs.h. */ | |
40e27e7f | 20022 | |
f199cab1 | 20023 | |
5476a9a4 GM |
20024 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
20025 | #include <stdint.h> | |
f199cab1 GM |
20026 | |
20027 | ||
5476a9a4 GM |
20028 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
20029 | included before <wchar.h>. */ | |
20030 | #include <stddef.h> | |
20031 | #include <signal.h> | |
20032 | #if HAVE_WCHAR_H | |
20033 | # include <stdio.h> | |
20034 | # include <time.h> | |
20035 | # include <wchar.h> | |
20036 | #endif | |
f199cab1 | 20037 | |
d87ffdb7 | 20038 | |
5476a9a4 GM |
20039 | #include <stdio.h> |
20040 | #include <string.h> | |
20041 | #define MVAL(macro) MVAL1(macro) | |
20042 | #define MVAL1(expression) #expression | |
20043 | static const char *macro_values[] = | |
20044 | { | |
20045 | #ifdef INT8_MAX | |
20046 | MVAL (INT8_MAX), | |
20047 | #endif | |
20048 | #ifdef INT16_MAX | |
20049 | MVAL (INT16_MAX), | |
20050 | #endif | |
20051 | #ifdef INT32_MAX | |
20052 | MVAL (INT32_MAX), | |
20053 | #endif | |
20054 | #ifdef INT64_MAX | |
20055 | MVAL (INT64_MAX), | |
20056 | #endif | |
20057 | #ifdef UINT8_MAX | |
20058 | MVAL (UINT8_MAX), | |
20059 | #endif | |
20060 | #ifdef UINT16_MAX | |
20061 | MVAL (UINT16_MAX), | |
20062 | #endif | |
20063 | #ifdef UINT32_MAX | |
20064 | MVAL (UINT32_MAX), | |
20065 | #endif | |
20066 | #ifdef UINT64_MAX | |
20067 | MVAL (UINT64_MAX), | |
20068 | #endif | |
20069 | NULL | |
20070 | }; | |
f199cab1 | 20071 | |
3e0be4ab GM |
20072 | int |
20073 | main () | |
20074 | { | |
5476a9a4 GM |
20075 | |
20076 | const char **mv; | |
20077 | for (mv = macro_values; *mv != NULL; mv++) | |
20078 | { | |
20079 | const char *value = *mv; | |
20080 | /* Test whether it looks like a cast expression. */ | |
20081 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
20082 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
20083 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
20084 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
20085 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
20086 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
20087 | return mv - macro_values + 1; | |
20088 | } | |
3e0be4ab | 20089 | return 0; |
5476a9a4 | 20090 | |
f199cab1 GM |
20091 | ; |
20092 | return 0; | |
20093 | } | |
20094 | _ACEOF | |
5476a9a4 GM |
20095 | if ac_fn_c_try_run "$LINENO"; then : |
20096 | gl_cv_header_working_stdint_h=yes | |
f199cab1 | 20097 | fi |
5476a9a4 GM |
20098 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
20099 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
20100 | fi |
20101 | ||
d87ffdb7 | 20102 | |
5476a9a4 GM |
20103 | fi |
20104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
d87ffdb7 | 20105 | |
5476a9a4 GM |
20106 | fi |
20107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
20108 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
20109 | fi | |
20110 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
20111 | STDINT_H= | |
20112 | else | |
20113 | for ac_header in sys/inttypes.h sys/bitypes.h | |
20114 | do : | |
20115 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
20116 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
20117 | eval as_val=\$$as_ac_Header | |
20118 | if test "x$as_val" = x""yes; then : | |
20119 | cat >>confdefs.h <<_ACEOF | |
20120 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
20121 | _ACEOF | |
d87ffdb7 | 20122 | |
5476a9a4 | 20123 | fi |
d87ffdb7 | 20124 | |
5476a9a4 | 20125 | done |
7d2a1c5e | 20126 | |
5476a9a4 GM |
20127 | if test $ac_cv_header_sys_inttypes_h = yes; then |
20128 | HAVE_SYS_INTTYPES_H=1 | |
20129 | else | |
20130 | HAVE_SYS_INTTYPES_H=0 | |
20131 | fi | |
7d2a1c5e | 20132 | |
5476a9a4 GM |
20133 | if test $ac_cv_header_sys_bitypes_h = yes; then |
20134 | HAVE_SYS_BITYPES_H=1 | |
20135 | else | |
20136 | HAVE_SYS_BITYPES_H=0 | |
20137 | fi | |
7d2a1c5e | 20138 | |
f199cab1 GM |
20139 | |
20140 | ||
20141 | ||
5476a9a4 | 20142 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
f199cab1 GM |
20143 | |
20144 | ||
5476a9a4 GM |
20145 | for gltype in ptrdiff_t size_t ; do |
20146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
20147 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
20148 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
20149 | $as_echo_n "(cached) " >&6 | |
20150 | else | |
20151 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
20152 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
20153 | included before <wchar.h>. */ | |
20154 | #include <stddef.h> | |
20155 | #include <signal.h> | |
20156 | #if HAVE_WCHAR_H | |
20157 | # include <stdio.h> | |
20158 | # include <time.h> | |
20159 | # include <wchar.h> | |
20160 | #endif | |
f199cab1 | 20161 | |
5476a9a4 | 20162 | #include <limits.h>"; then : |
f199cab1 | 20163 | |
5476a9a4 GM |
20164 | else |
20165 | result=unknown | |
20166 | fi | |
f199cab1 | 20167 | |
5476a9a4 | 20168 | eval gl_cv_bitsizeof_${gltype}=\$result |
f199cab1 | 20169 | |
5476a9a4 GM |
20170 | fi |
20171 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
20172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
20173 | $as_echo "$ac_res" >&6; } | |
20174 | eval result=\$gl_cv_bitsizeof_${gltype} | |
20175 | if test $result = unknown; then | |
20176 | result=0 | |
20177 | fi | |
20178 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
20179 | cat >>confdefs.h <<_ACEOF | |
20180 | #define BITSIZEOF_${GLTYPE} $result | |
20181 | _ACEOF | |
f199cab1 | 20182 | |
5476a9a4 GM |
20183 | eval BITSIZEOF_${GLTYPE}=\$result |
20184 | done | |
f199cab1 GM |
20185 | |
20186 | ||
5476a9a4 | 20187 | fi |
f199cab1 GM |
20188 | |
20189 | ||
5476a9a4 GM |
20190 | for gltype in sig_atomic_t wchar_t wint_t ; do |
20191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
20192 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
20193 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
20194 | $as_echo_n "(cached) " >&6 | |
20195 | else | |
20196 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
20197 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
20198 | included before <wchar.h>. */ | |
20199 | #include <stddef.h> | |
20200 | #include <signal.h> | |
20201 | #if HAVE_WCHAR_H | |
20202 | # include <stdio.h> | |
20203 | # include <time.h> | |
20204 | # include <wchar.h> | |
20205 | #endif | |
f199cab1 | 20206 | |
5476a9a4 | 20207 | #include <limits.h>"; then : |
f199cab1 | 20208 | |
f199cab1 | 20209 | else |
5476a9a4 | 20210 | result=unknown |
7d2a1c5e | 20211 | fi |
7d2a1c5e | 20212 | |
5476a9a4 | 20213 | eval gl_cv_bitsizeof_${gltype}=\$result |
7d2a1c5e | 20214 | |
3e0be4ab | 20215 | fi |
5476a9a4 GM |
20216 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
20217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
20218 | $as_echo "$ac_res" >&6; } | |
20219 | eval result=\$gl_cv_bitsizeof_${gltype} | |
20220 | if test $result = unknown; then | |
20221 | result=0 | |
20222 | fi | |
20223 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
20224 | cat >>confdefs.h <<_ACEOF | |
20225 | #define BITSIZEOF_${GLTYPE} $result | |
3e0be4ab | 20226 | _ACEOF |
7d2a1c5e | 20227 | |
5476a9a4 GM |
20228 | eval BITSIZEOF_${GLTYPE}=\$result |
20229 | done | |
7d2a1c5e GM |
20230 | |
20231 | ||
5476a9a4 GM |
20232 | |
20233 | ||
20234 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
20235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
20236 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
20237 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
20238 | $as_echo_n "(cached) " >&6 |
20239 | else | |
f199cab1 GM |
20240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20241 | /* end confdefs.h. */ | |
f199cab1 | 20242 | |
5476a9a4 GM |
20243 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
20244 | included before <wchar.h>. */ | |
20245 | #include <stddef.h> | |
20246 | #include <signal.h> | |
20247 | #if HAVE_WCHAR_H | |
20248 | # include <stdio.h> | |
20249 | # include <time.h> | |
20250 | # include <wchar.h> | |
20251 | #endif | |
20252 | ||
20253 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
f199cab1 GM |
20254 | int |
20255 | main () | |
20256 | { | |
5476a9a4 | 20257 | |
f199cab1 GM |
20258 | ; |
20259 | return 0; | |
20260 | } | |
20261 | _ACEOF | |
20262 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 20263 | result=yes |
f199cab1 | 20264 | else |
5476a9a4 | 20265 | result=no |
f199cab1 GM |
20266 | fi |
20267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 | 20268 | eval gl_cv_type_${gltype}_signed=\$result |
7d2a1c5e | 20269 | |
3e0be4ab | 20270 | fi |
5476a9a4 GM |
20271 | eval ac_res=\$gl_cv_type_${gltype}_signed |
20272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
20273 | $as_echo "$ac_res" >&6; } | |
20274 | eval result=\$gl_cv_type_${gltype}_signed | |
20275 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
20276 | if test "$result" = yes; then | |
20277 | cat >>confdefs.h <<_ACEOF | |
20278 | #define HAVE_SIGNED_${GLTYPE} 1 | |
f199cab1 | 20279 | _ACEOF |
d87ffdb7 | 20280 | |
5476a9a4 GM |
20281 | eval HAVE_SIGNED_${GLTYPE}=1 |
20282 | else | |
20283 | eval HAVE_SIGNED_${GLTYPE}=0 | |
20284 | fi | |
20285 | done | |
f199cab1 | 20286 | |
e275c824 | 20287 | |
5476a9a4 GM |
20288 | gl_cv_type_ptrdiff_t_signed=yes |
20289 | gl_cv_type_size_t_signed=no | |
20290 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
e275c824 | 20291 | |
e275c824 | 20292 | |
5476a9a4 GM |
20293 | for gltype in ptrdiff_t size_t ; do |
20294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
20295 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
20296 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
16c3e636 PE |
20297 | $as_echo_n "(cached) " >&6 |
20298 | else | |
5476a9a4 GM |
20299 | eval gl_cv_type_${gltype}_suffix=no |
20300 | eval result=\$gl_cv_type_${gltype}_signed | |
20301 | if test "$result" = yes; then | |
20302 | glsufu= | |
20303 | else | |
20304 | glsufu=u | |
20305 | fi | |
20306 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
20307 | case $glsuf in | |
20308 | '') gltype1='int';; | |
20309 | l) gltype1='long int';; | |
20310 | ll) gltype1='long long int';; | |
20311 | i64) gltype1='__int64';; | |
20312 | u) gltype1='unsigned int';; | |
20313 | ul) gltype1='unsigned long int';; | |
20314 | ull) gltype1='unsigned long long int';; | |
20315 | ui64)gltype1='unsigned __int64';; | |
20316 | esac | |
20317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 20318 | /* end confdefs.h. */ |
16c3e636 | 20319 | |
5476a9a4 GM |
20320 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
20321 | included before <wchar.h>. */ | |
20322 | #include <stddef.h> | |
20323 | #include <signal.h> | |
20324 | #if HAVE_WCHAR_H | |
20325 | # include <stdio.h> | |
20326 | # include <time.h> | |
20327 | # include <wchar.h> | |
20328 | #endif | |
1f5d53eb | 20329 | |
5476a9a4 GM |
20330 | extern $gltype foo; |
20331 | extern $gltype1 foo; | |
f199cab1 GM |
20332 | int |
20333 | main () | |
20334 | { | |
5476a9a4 | 20335 | |
f199cab1 GM |
20336 | ; |
20337 | return 0; | |
20338 | } | |
20339 | _ACEOF | |
20340 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 20341 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
f199cab1 GM |
20342 | fi |
20343 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 GM |
20344 | eval result=\$gl_cv_type_${gltype}_suffix |
20345 | test "$result" != no && break | |
20346 | done | |
f199cab1 | 20347 | fi |
5476a9a4 GM |
20348 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
20349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
20350 | $as_echo "$ac_res" >&6; } | |
20351 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
20352 | eval result=\$gl_cv_type_${gltype}_suffix | |
20353 | test "$result" = no && result= | |
20354 | eval ${GLTYPE}_SUFFIX=\$result | |
20355 | cat >>confdefs.h <<_ACEOF | |
20356 | #define ${GLTYPE}_SUFFIX $result | |
20357 | _ACEOF | |
16c3e636 | 20358 | |
5476a9a4 | 20359 | done |
16c3e636 | 20360 | |
3e0be4ab | 20361 | |
5476a9a4 GM |
20362 | fi |
20363 | ||
20364 | ||
20365 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
20366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
20367 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
20368 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
20369 | $as_echo_n "(cached) " >&6 |
20370 | else | |
5476a9a4 GM |
20371 | eval gl_cv_type_${gltype}_suffix=no |
20372 | eval result=\$gl_cv_type_${gltype}_signed | |
20373 | if test "$result" = yes; then | |
20374 | glsufu= | |
20375 | else | |
20376 | glsufu=u | |
20377 | fi | |
20378 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
20379 | case $glsuf in | |
20380 | '') gltype1='int';; | |
20381 | l) gltype1='long int';; | |
20382 | ll) gltype1='long long int';; | |
20383 | i64) gltype1='__int64';; | |
20384 | u) gltype1='unsigned int';; | |
20385 | ul) gltype1='unsigned long int';; | |
20386 | ull) gltype1='unsigned long long int';; | |
20387 | ui64)gltype1='unsigned __int64';; | |
20388 | esac | |
20389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 20390 | /* end confdefs.h. */ |
5476a9a4 GM |
20391 | |
20392 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
20393 | included before <wchar.h>. */ | |
20394 | #include <stddef.h> | |
20395 | #include <signal.h> | |
20396 | #if HAVE_WCHAR_H | |
20397 | # include <stdio.h> | |
20398 | # include <time.h> | |
20399 | # include <wchar.h> | |
20400 | #endif | |
20401 | ||
20402 | extern $gltype foo; | |
20403 | extern $gltype1 foo; | |
1fd182f0 PE |
20404 | int |
20405 | main () | |
20406 | { | |
5476a9a4 | 20407 | |
1fd182f0 PE |
20408 | ; |
20409 | return 0; | |
20410 | } | |
20411 | _ACEOF | |
3e0be4ab | 20412 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 20413 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
1f5d53eb | 20414 | fi |
3e0be4ab | 20415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
20416 | eval result=\$gl_cv_type_${gltype}_suffix |
20417 | test "$result" != no && break | |
20418 | done | |
f199cab1 | 20419 | fi |
5476a9a4 GM |
20420 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
20421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
20422 | $as_echo "$ac_res" >&6; } | |
20423 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
20424 | eval result=\$gl_cv_type_${gltype}_suffix | |
20425 | test "$result" = no && result= | |
20426 | eval ${GLTYPE}_SUFFIX=\$result | |
20427 | cat >>confdefs.h <<_ACEOF | |
20428 | #define ${GLTYPE}_SUFFIX $result | |
f199cab1 GM |
20429 | _ACEOF |
20430 | ||
5476a9a4 | 20431 | done |
f199cab1 | 20432 | |
f199cab1 | 20433 | |
f199cab1 | 20434 | |
5476a9a4 GM |
20435 | if test $BITSIZEOF_WINT_T -lt 32; then |
20436 | BITSIZEOF_WINT_T=32 | |
20437 | fi | |
f199cab1 | 20438 | |
5476a9a4 GM |
20439 | STDINT_H=stdint.h |
20440 | fi | |
f199cab1 | 20441 | |
5476a9a4 GM |
20442 | if test -n "$STDINT_H"; then |
20443 | GL_GENERATE_STDINT_H_TRUE= | |
20444 | GL_GENERATE_STDINT_H_FALSE='#' | |
20445 | else | |
20446 | GL_GENERATE_STDINT_H_TRUE='#' | |
20447 | GL_GENERATE_STDINT_H_FALSE= | |
f199cab1 GM |
20448 | fi |
20449 | ||
f199cab1 | 20450 | |
f199cab1 | 20451 | |
3e0be4ab | 20452 | |
f199cab1 | 20453 | |
5476a9a4 GM |
20454 | GNULIB_IMAXABS=0; |
20455 | GNULIB_IMAXDIV=0; | |
20456 | GNULIB_STRTOIMAX=0; | |
20457 | GNULIB_STRTOUMAX=0; | |
20458 | HAVE_DECL_IMAXABS=1; | |
20459 | HAVE_DECL_IMAXDIV=1; | |
20460 | HAVE_DECL_STRTOIMAX=1; | |
20461 | HAVE_DECL_STRTOUMAX=1; | |
20462 | REPLACE_STRTOIMAX=0; | |
20463 | INT32_MAX_LT_INTMAX_MAX=1; | |
20464 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
20465 | PRI_MACROS_BROKEN=0; | |
20466 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
20467 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
20468 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
1fd182f0 | 20469 | |
1fd182f0 | 20470 | |
1f5d53eb | 20471 | |
3e0be4ab GM |
20472 | |
20473 | ||
1fd182f0 | 20474 | |
3e0be4ab | 20475 | |
3e0be4ab | 20476 | |
f199cab1 | 20477 | |
1fd182f0 | 20478 | |
1f5d53eb | 20479 | |
1f5d53eb | 20480 | |
1f5d53eb | 20481 | |
3e0be4ab | 20482 | |
3e0be4ab | 20483 | |
5476a9a4 GM |
20484 | if test $gl_cv_have_include_next = yes; then |
20485 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
20486 | else | |
20487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
20488 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
20489 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
20490 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 20491 | else |
2b1928b8 | 20492 | |
5476a9a4 | 20493 | if test $ac_cv_header_inttypes_h = yes; then |
3e0be4ab GM |
20494 | |
20495 | ||
5476a9a4 | 20496 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 20497 | /* end confdefs.h. */ |
5476a9a4 | 20498 | #include <inttypes.h> |
3e0be4ab | 20499 | |
f199cab1 | 20500 | _ACEOF |
5476a9a4 GM |
20501 | case "$host_os" in |
20502 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20503 | *) gl_absname_cpp="$ac_cpp" ;; | |
20504 | esac | |
1fd182f0 | 20505 | |
5476a9a4 GM |
20506 | case "$host_os" in |
20507 | mingw*) | |
20508 | gl_dirsep_regex='[/\\]' | |
20509 | ;; | |
20510 | *) | |
20511 | gl_dirsep_regex='\/' | |
20512 | ;; | |
20513 | esac | |
20514 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1fd182f0 | 20515 | |
5476a9a4 GM |
20516 | gl_header_literal_regex=`echo 'inttypes.h' \ |
20517 | | sed -e "$gl_make_literal_regex_sed"` | |
20518 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
20519 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
20520 | s|^/[^/]|//&| | |
20521 | p | |
20522 | q | |
20523 | }' | |
20524 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20525 | sed -n "$gl_absolute_header_sed"`'"' | |
20526 | else | |
20527 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
20528 | fi | |
1fd182f0 PE |
20529 | |
20530 | ||
5476a9a4 GM |
20531 | fi |
20532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | |
20533 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
20534 | fi | |
20535 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
1fd182f0 | 20536 | |
5476a9a4 GM |
20537 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20538 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20539 | gl_next_as_first_directive='<'inttypes.h'>' | |
20540 | else | |
20541 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20542 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
20543 | fi | |
20544 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
34119902 GM |
20545 | |
20546 | ||
3e0be4ab | 20547 | |
34119902 | 20548 | |
3e0be4ab | 20549 | |
34119902 | 20550 | |
b0415a03 | 20551 | |
b0415a03 | 20552 | |
3e0be4ab | 20553 | |
34119902 | 20554 | |
34119902 | 20555 | |
5476a9a4 GM |
20556 | case "$host_os" in |
20557 | mingw*) | |
20558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 | |
20559 | $as_echo_n "checking for 64-bit off_t... " >&6; } | |
20560 | if test "${gl_cv_type_off_t_64+set}" = set; then : | |
f199cab1 GM |
20561 | $as_echo_n "(cached) " >&6 |
20562 | else | |
5476a9a4 GM |
20563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20564 | /* end confdefs.h. */ | |
20565 | #include <sys/types.h> | |
20566 | int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; | |
20567 | ||
20568 | int | |
20569 | main () | |
20570 | { | |
20571 | ||
20572 | ; | |
20573 | return 0; | |
20574 | } | |
f199cab1 | 20575 | _ACEOF |
5476a9a4 GM |
20576 | if ac_fn_c_try_compile "$LINENO"; then : |
20577 | gl_cv_type_off_t_64=yes | |
20578 | else | |
20579 | gl_cv_type_off_t_64=no | |
f199cab1 | 20580 | fi |
5476a9a4 | 20581 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
34119902 | 20582 | |
5476a9a4 GM |
20583 | fi |
20584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 | |
20585 | $as_echo "$gl_cv_type_off_t_64" >&6; } | |
20586 | if test $gl_cv_type_off_t_64 = no; then | |
20587 | WINDOWS_64_BIT_OFF_T=1 | |
20588 | else | |
20589 | WINDOWS_64_BIT_OFF_T=0 | |
20590 | fi | |
20591 | WINDOWS_64_BIT_ST_SIZE=1 | |
20592 | ;; | |
20593 | *) | |
20594 | WINDOWS_64_BIT_OFF_T=0 | |
20595 | WINDOWS_64_BIT_ST_SIZE=0 | |
20596 | ;; | |
20597 | esac | |
34119902 GM |
20598 | |
20599 | ||
34119902 GM |
20600 | |
20601 | ||
283c7aed GM |
20602 | GNULIB_FFSL=0; |
20603 | GNULIB_FFSLL=0; | |
20604 | GNULIB_MEMCHR=0; | |
20605 | GNULIB_MEMMEM=0; | |
20606 | GNULIB_MEMPCPY=0; | |
20607 | GNULIB_MEMRCHR=0; | |
20608 | GNULIB_RAWMEMCHR=0; | |
20609 | GNULIB_STPCPY=0; | |
20610 | GNULIB_STPNCPY=0; | |
20611 | GNULIB_STRCHRNUL=0; | |
20612 | GNULIB_STRDUP=0; | |
20613 | GNULIB_STRNCAT=0; | |
20614 | GNULIB_STRNDUP=0; | |
20615 | GNULIB_STRNLEN=0; | |
20616 | GNULIB_STRPBRK=0; | |
20617 | GNULIB_STRSEP=0; | |
20618 | GNULIB_STRSTR=0; | |
20619 | GNULIB_STRCASESTR=0; | |
20620 | GNULIB_STRTOK_R=0; | |
20621 | GNULIB_MBSLEN=0; | |
20622 | GNULIB_MBSNLEN=0; | |
20623 | GNULIB_MBSCHR=0; | |
20624 | GNULIB_MBSRCHR=0; | |
20625 | GNULIB_MBSSTR=0; | |
20626 | GNULIB_MBSCASECMP=0; | |
20627 | GNULIB_MBSNCASECMP=0; | |
20628 | GNULIB_MBSPCASECMP=0; | |
20629 | GNULIB_MBSCASESTR=0; | |
20630 | GNULIB_MBSCSPN=0; | |
20631 | GNULIB_MBSPBRK=0; | |
20632 | GNULIB_MBSSPN=0; | |
20633 | GNULIB_MBSSEP=0; | |
20634 | GNULIB_MBSTOK_R=0; | |
20635 | GNULIB_STRERROR=0; | |
20636 | GNULIB_STRERROR_R=0; | |
20637 | GNULIB_STRSIGNAL=0; | |
20638 | GNULIB_STRVERSCMP=0; | |
20639 | HAVE_MBSLEN=0; | |
20640 | HAVE_FFSL=1; | |
20641 | HAVE_FFSLL=1; | |
20642 | HAVE_MEMCHR=1; | |
20643 | HAVE_DECL_MEMMEM=1; | |
20644 | HAVE_MEMPCPY=1; | |
20645 | HAVE_DECL_MEMRCHR=1; | |
20646 | HAVE_RAWMEMCHR=1; | |
20647 | HAVE_STPCPY=1; | |
20648 | HAVE_STPNCPY=1; | |
20649 | HAVE_STRCHRNUL=1; | |
20650 | HAVE_DECL_STRDUP=1; | |
20651 | HAVE_DECL_STRNDUP=1; | |
20652 | HAVE_DECL_STRNLEN=1; | |
20653 | HAVE_STRPBRK=1; | |
20654 | HAVE_STRSEP=1; | |
20655 | HAVE_STRCASESTR=1; | |
20656 | HAVE_DECL_STRTOK_R=1; | |
20657 | HAVE_DECL_STRERROR_R=1; | |
20658 | HAVE_DECL_STRSIGNAL=1; | |
20659 | HAVE_STRVERSCMP=1; | |
20660 | REPLACE_MEMCHR=0; | |
20661 | REPLACE_MEMMEM=0; | |
20662 | REPLACE_STPNCPY=0; | |
20663 | REPLACE_STRDUP=0; | |
20664 | REPLACE_STRSTR=0; | |
20665 | REPLACE_STRCASESTR=0; | |
20666 | REPLACE_STRCHRNUL=0; | |
20667 | REPLACE_STRERROR=0; | |
20668 | REPLACE_STRERROR_R=0; | |
20669 | REPLACE_STRNCAT=0; | |
20670 | REPLACE_STRNDUP=0; | |
20671 | REPLACE_STRNLEN=0; | |
20672 | REPLACE_STRSIGNAL=0; | |
20673 | REPLACE_STRTOK_R=0; | |
20674 | UNDEFINE_STRTOK_R=0; | |
20675 | ||
20676 | ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" | |
20677 | if test "x$ac_cv_have_decl_memrchr" = x""yes; then : | |
20678 | ac_have_decl=1 | |
20679 | else | |
20680 | ac_have_decl=0 | |
20681 | fi | |
20682 | ||
20683 | cat >>confdefs.h <<_ACEOF | |
20684 | #define HAVE_DECL_MEMRCHR $ac_have_decl | |
20685 | _ACEOF | |
20686 | ||
20687 | ||
5476a9a4 GM |
20688 | GNULIB_MKTIME=0; |
20689 | GNULIB_NANOSLEEP=0; | |
20690 | GNULIB_STRPTIME=0; | |
20691 | GNULIB_TIMEGM=0; | |
20692 | GNULIB_TIME_R=0; | |
20693 | HAVE_DECL_LOCALTIME_R=1; | |
20694 | HAVE_NANOSLEEP=1; | |
20695 | HAVE_STRPTIME=1; | |
20696 | HAVE_TIMEGM=1; | |
20697 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
20698 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
20699 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
20700 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
34119902 | 20701 | |
2393bc74 GM |
20702 | ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" |
20703 | if test "x$ac_cv_have_decl_alarm" = x""yes; then : | |
20704 | ac_have_decl=1 | |
20705 | else | |
20706 | ac_have_decl=0 | |
20707 | fi | |
3e0be4ab | 20708 | |
2393bc74 GM |
20709 | cat >>confdefs.h <<_ACEOF |
20710 | #define HAVE_DECL_ALARM $ac_have_decl | |
20711 | _ACEOF | |
3e0be4ab GM |
20712 | |
20713 | ||
0cdca42a GM |
20714 | |
20715 | ||
5476a9a4 GM |
20716 | GNULIB_PSELECT=0; |
20717 | GNULIB_SELECT=0; | |
20718 | HAVE_PSELECT=1; | |
20719 | REPLACE_PSELECT=0; | |
20720 | REPLACE_SELECT=0; | |
20721 | ||
20722 | ||
3e0be4ab | 20723 | |
5476a9a4 GM |
20724 | |
20725 | ||
20726 | ||
20727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 | |
20728 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
20729 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
f199cab1 | 20730 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 20731 | else |
5476a9a4 GM |
20732 | |
20733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 20734 | /* end confdefs.h. */ |
5476a9a4 | 20735 | #include <sys/select.h> |
3e0be4ab GM |
20736 | int |
20737 | main () | |
20738 | { | |
5476a9a4 | 20739 | struct timeval b; |
3e0be4ab GM |
20740 | ; |
20741 | return 0; | |
20742 | } | |
34119902 | 20743 | _ACEOF |
f199cab1 | 20744 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 20745 | gl_cv_header_sys_select_h_selfcontained=yes |
3e0be4ab | 20746 | else |
5476a9a4 | 20747 | gl_cv_header_sys_select_h_selfcontained=no |
3e0be4ab | 20748 | fi |
f199cab1 | 20749 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
20750 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then |
20751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20752 | /* end confdefs.h. */ | |
20753 | #include <sys/select.h> | |
20754 | int | |
20755 | main () | |
20756 | { | |
20757 | int memset; int bzero; | |
20758 | ; | |
20759 | return 0; | |
20760 | } | |
3e0be4ab | 20761 | |
5476a9a4 GM |
20762 | _ACEOF |
20763 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 GM |
20764 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20765 | /* end confdefs.h. */ | |
5476a9a4 | 20766 | #include <sys/select.h> |
f199cab1 GM |
20767 | int |
20768 | main () | |
20769 | { | |
5476a9a4 GM |
20770 | |
20771 | #undef memset | |
20772 | #define memset nonexistent_memset | |
20773 | extern | |
20774 | #ifdef __cplusplus | |
20775 | "C" | |
20776 | #endif | |
20777 | void *memset (void *, int, unsigned long); | |
20778 | #undef bzero | |
20779 | #define bzero nonexistent_bzero | |
20780 | extern | |
20781 | #ifdef __cplusplus | |
20782 | "C" | |
20783 | #endif | |
20784 | void bzero (void *, unsigned long); | |
20785 | fd_set fds; | |
20786 | FD_ZERO (&fds); | |
20787 | ||
f199cab1 GM |
20788 | ; |
20789 | return 0; | |
20790 | } | |
5476a9a4 | 20791 | |
f199cab1 | 20792 | _ACEOF |
5476a9a4 GM |
20793 | if ac_fn_c_try_link "$LINENO"; then : |
20794 | ||
f199cab1 | 20795 | else |
5476a9a4 | 20796 | gl_cv_header_sys_select_h_selfcontained=no |
f199cab1 | 20797 | fi |
5476a9a4 GM |
20798 | rm -f core conftest.err conftest.$ac_objext \ |
20799 | conftest$ac_exeext conftest.$ac_ext | |
1fd182f0 | 20800 | |
f199cab1 | 20801 | fi |
5476a9a4 GM |
20802 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
20803 | fi | |
1fd182f0 | 20804 | |
f199cab1 | 20805 | fi |
5476a9a4 GM |
20806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 |
20807 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
1fd182f0 PE |
20808 | |
20809 | ||
b06b1098 | 20810 | |
0eb775a3 GM |
20811 | |
20812 | ||
b06b1098 | 20813 | |
1fd182f0 | 20814 | |
1fd182f0 | 20815 | |
5476a9a4 GM |
20816 | |
20817 | if test $gl_cv_have_include_next = yes; then | |
20818 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
20819 | else | |
20820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
20821 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
20822 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
f199cab1 | 20823 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 20824 | else |
1fd182f0 | 20825 | |
5476a9a4 GM |
20826 | if test $ac_cv_header_sys_select_h = yes; then |
20827 | ||
20828 | ||
20829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20830 | /* end confdefs.h. */ | |
20831 | #include <sys/select.h> | |
20832 | ||
20833 | _ACEOF | |
20834 | case "$host_os" in | |
20835 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20836 | *) gl_absname_cpp="$ac_cpp" ;; | |
20837 | esac | |
20838 | ||
20839 | case "$host_os" in | |
20840 | mingw*) | |
20841 | gl_dirsep_regex='[/\\]' | |
20842 | ;; | |
20843 | *) | |
20844 | gl_dirsep_regex='\/' | |
20845 | ;; | |
20846 | esac | |
20847 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
20848 | ||
20849 | gl_header_literal_regex=`echo 'sys/select.h' \ | |
20850 | | sed -e "$gl_make_literal_regex_sed"` | |
20851 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
20852 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
20853 | s|^/[^/]|//&| | |
20854 | p | |
20855 | q | |
20856 | }' | |
20857 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20858 | sed -n "$gl_absolute_header_sed"`'"' | |
20859 | else | |
20860 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
20861 | fi | |
1fd182f0 | 20862 | |
3e0be4ab | 20863 | |
1f5d53eb | 20864 | fi |
5476a9a4 GM |
20865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 |
20866 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
20867 | fi | |
20868 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
1fd182f0 | 20869 | |
5476a9a4 GM |
20870 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20871 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20872 | gl_next_as_first_directive='<'sys/select.h'>' | |
20873 | else | |
20874 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20875 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
20876 | fi | |
20877 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
1fd182f0 PE |
20878 | |
20879 | ||
5476a9a4 GM |
20880 | |
20881 | ||
20882 | if test $ac_cv_header_sys_select_h = yes; then | |
20883 | HAVE_SYS_SELECT_H=1 | |
20884 | else | |
20885 | HAVE_SYS_SELECT_H=0 | |
20886 | fi | |
20887 | ||
20888 | ||
20889 | ||
20890 | ||
20891 | ||
20892 | if test $ac_cv_header_sys_socket_h != yes; then | |
20893 | for ac_header in winsock2.h | |
20894 | do : | |
20895 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
20896 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
20897 | cat >>confdefs.h <<_ACEOF | |
20898 | #define HAVE_WINSOCK2_H 1 | |
f199cab1 | 20899 | _ACEOF |
5476a9a4 | 20900 | |
f199cab1 | 20901 | fi |
3e0be4ab | 20902 | |
5476a9a4 | 20903 | done |
3e0be4ab | 20904 | |
5476a9a4 GM |
20905 | fi |
20906 | if test "$ac_cv_header_winsock2_h" = yes; then | |
20907 | HAVE_WINSOCK2_H=1 | |
20908 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
20909 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
20910 | else | |
20911 | HAVE_WINSOCK2_H=0 | |
20912 | fi | |
f199cab1 | 20913 | |
f199cab1 | 20914 | |
f199cab1 | 20915 | |
f199cab1 | 20916 | |
3e0be4ab | 20917 | |
3e0be4ab | 20918 | |
3e0be4ab | 20919 | |
3e0be4ab | 20920 | |
5476a9a4 GM |
20921 | GNULIB_PTHREAD_SIGMASK=0; |
20922 | GNULIB_RAISE=0; | |
20923 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
20924 | GNULIB_SIGPROCMASK=0; | |
20925 | GNULIB_SIGACTION=0; | |
20926 | HAVE_POSIX_SIGNALBLOCKING=1; | |
20927 | HAVE_PTHREAD_SIGMASK=1; | |
20928 | HAVE_RAISE=1; | |
20929 | HAVE_SIGSET_T=1; | |
20930 | HAVE_SIGINFO_T=1; | |
20931 | HAVE_SIGACTION=1; | |
20932 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
20933 | ||
20934 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; | |
f199cab1 | 20935 | |
5476a9a4 GM |
20936 | HAVE_SIGHANDLER_T=1; |
20937 | REPLACE_PTHREAD_SIGMASK=0; | |
20938 | REPLACE_RAISE=0; | |
1f5d53eb | 20939 | |
1fd182f0 | 20940 | |
b06b1098 | 20941 | |
1fd182f0 | 20942 | |
3e0be4ab GM |
20943 | |
20944 | ||
f077f61d | 20945 | |
5476a9a4 GM |
20946 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
20947 | #include <signal.h> | |
20948 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
20949 | #include <sys/types.h> | |
20950 | ||
20951 | " | |
20952 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | |
20953 | ||
20954 | cat >>confdefs.h <<_ACEOF | |
20955 | #define HAVE_SIGSET_T 1 | |
f199cab1 | 20956 | _ACEOF |
3e0be4ab | 20957 | |
5476a9a4 GM |
20958 | gl_cv_type_sigset_t=yes |
20959 | else | |
20960 | gl_cv_type_sigset_t=no | |
f199cab1 | 20961 | fi |
3e0be4ab | 20962 | |
5476a9a4 GM |
20963 | if test $gl_cv_type_sigset_t != yes; then |
20964 | HAVE_SIGSET_T=0 | |
20965 | fi | |
3e0be4ab | 20966 | |
1f5d53eb | 20967 | |
3e0be4ab | 20968 | |
5476a9a4 GM |
20969 | if test $ac_cv_header_sys_socket_h = no; then |
20970 | for ac_header in ws2tcpip.h | |
20971 | do : | |
20972 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
20973 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | |
20974 | cat >>confdefs.h <<_ACEOF | |
20975 | #define HAVE_WS2TCPIP_H 1 | |
20976 | _ACEOF | |
3e0be4ab | 20977 | |
5476a9a4 | 20978 | fi |
3e0be4ab | 20979 | |
5476a9a4 GM |
20980 | done |
20981 | ||
20982 | fi | |
20983 | ||
20984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | |
20985 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
20986 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | |
20987 | $as_echo_n "(cached) " >&6 | |
20988 | else | |
20989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20990 | /* end confdefs.h. */ | |
1f5d53eb | 20991 | |
5476a9a4 GM |
20992 | #include <stdbool.h> |
20993 | #ifndef bool | |
20994 | "error: bool is not defined" | |
20995 | #endif | |
20996 | #ifndef false | |
20997 | "error: false is not defined" | |
20998 | #endif | |
20999 | #if false | |
21000 | "error: false is not 0" | |
21001 | #endif | |
21002 | #ifndef true | |
21003 | "error: true is not defined" | |
21004 | #endif | |
21005 | #if true != 1 | |
21006 | "error: true is not 1" | |
21007 | #endif | |
21008 | #ifndef __bool_true_false_are_defined | |
21009 | "error: __bool_true_false_are_defined is not defined" | |
21010 | #endif | |
21011 | ||
21012 | struct s { _Bool s: 1; _Bool t; } s; | |
21013 | ||
21014 | char a[true == 1 ? 1 : -1]; | |
21015 | char b[false == 0 ? 1 : -1]; | |
21016 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
21017 | char d[(bool) 0.5 == true ? 1 : -1]; | |
21018 | /* See body of main program for 'e'. */ | |
21019 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
21020 | char g[true]; | |
21021 | char h[sizeof (_Bool)]; | |
21022 | char i[sizeof s.t]; | |
21023 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
21024 | /* The following fails for | |
21025 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
21026 | _Bool n[m]; | |
21027 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
21028 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
21029 | /* Catch a bug in an HP-UX C compiler. See | |
21030 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
21031 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
21032 | */ | |
21033 | _Bool q = true; | |
21034 | _Bool *pq = &q; | |
1ebc9c87 GM |
21035 | |
21036 | int | |
21037 | main () | |
21038 | { | |
f199cab1 | 21039 | |
5476a9a4 GM |
21040 | bool e = &s; |
21041 | *pq |= q; | |
21042 | *pq |= ! q; | |
21043 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
21044 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
21045 | + !m + !n + !o + !p + !q + !pq); | |
f199cab1 | 21046 | |
5476a9a4 | 21047 | ; |
1ebc9c87 GM |
21048 | return 0; |
21049 | } | |
21050 | _ACEOF | |
5476a9a4 GM |
21051 | if ac_fn_c_try_compile "$LINENO"; then : |
21052 | ac_cv_header_stdbool_h=yes | |
1ebc9c87 | 21053 | else |
5476a9a4 | 21054 | ac_cv_header_stdbool_h=no |
1ebc9c87 | 21055 | fi |
5476a9a4 | 21056 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 21057 | fi |
5476a9a4 GM |
21058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 |
21059 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
21060 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
21061 | if test "x$ac_cv_type__Bool" = x""yes; then : | |
1ebc9c87 | 21062 | |
5476a9a4 GM |
21063 | cat >>confdefs.h <<_ACEOF |
21064 | #define HAVE__BOOL 1 | |
21065 | _ACEOF | |
1ebc9c87 | 21066 | |
1ebc9c87 GM |
21067 | |
21068 | fi | |
21069 | ||
1ebc9c87 | 21070 | |
1ebc9c87 | 21071 | |
5476a9a4 GM |
21072 | REPLACE_NULL=0; |
21073 | HAVE_WCHAR_T=1; | |
21074 | ||
21075 | ||
21076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
21077 | $as_echo_n "checking for wchar_t... " >&6; } | |
21078 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
21079 | $as_echo_n "(cached) " >&6 | |
21080 | else | |
21081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21082 | /* end confdefs.h. */ | |
21083 | #include <stddef.h> | |
21084 | wchar_t foo = (wchar_t)'\0'; | |
21085 | int | |
21086 | main () | |
21087 | { | |
21088 | ||
21089 | ; | |
21090 | return 0; | |
21091 | } | |
21092 | _ACEOF | |
21093 | if ac_fn_c_try_compile "$LINENO"; then : | |
21094 | gt_cv_c_wchar_t=yes | |
21095 | else | |
21096 | gt_cv_c_wchar_t=no | |
21097 | fi | |
21098 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1ebc9c87 | 21099 | fi |
5476a9a4 GM |
21100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 |
21101 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
21102 | if test $gt_cv_c_wchar_t = yes; then | |
1ebc9c87 | 21103 | |
5476a9a4 GM |
21104 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
21105 | ||
21106 | fi | |
21107 | ||
21108 | ||
21109 | GNULIB_DPRINTF=0; | |
21110 | GNULIB_FCLOSE=0; | |
21111 | GNULIB_FDOPEN=0; | |
21112 | GNULIB_FFLUSH=0; | |
21113 | GNULIB_FGETC=0; | |
21114 | GNULIB_FGETS=0; | |
21115 | GNULIB_FOPEN=0; | |
21116 | GNULIB_FPRINTF=0; | |
21117 | GNULIB_FPRINTF_POSIX=0; | |
21118 | GNULIB_FPURGE=0; | |
21119 | GNULIB_FPUTC=0; | |
21120 | GNULIB_FPUTS=0; | |
21121 | GNULIB_FREAD=0; | |
21122 | GNULIB_FREOPEN=0; | |
21123 | GNULIB_FSCANF=0; | |
21124 | GNULIB_FSEEK=0; | |
21125 | GNULIB_FSEEKO=0; | |
21126 | GNULIB_FTELL=0; | |
21127 | GNULIB_FTELLO=0; | |
21128 | GNULIB_FWRITE=0; | |
21129 | GNULIB_GETC=0; | |
21130 | GNULIB_GETCHAR=0; | |
21131 | GNULIB_GETDELIM=0; | |
21132 | GNULIB_GETLINE=0; | |
21133 | GNULIB_OBSTACK_PRINTF=0; | |
21134 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
21135 | GNULIB_PCLOSE=0; | |
21136 | GNULIB_PERROR=0; | |
21137 | GNULIB_POPEN=0; | |
21138 | GNULIB_PRINTF=0; | |
21139 | GNULIB_PRINTF_POSIX=0; | |
21140 | GNULIB_PUTC=0; | |
21141 | GNULIB_PUTCHAR=0; | |
21142 | GNULIB_PUTS=0; | |
21143 | GNULIB_REMOVE=0; | |
21144 | GNULIB_RENAME=0; | |
21145 | GNULIB_RENAMEAT=0; | |
21146 | GNULIB_SCANF=0; | |
21147 | GNULIB_SNPRINTF=0; | |
21148 | GNULIB_SPRINTF_POSIX=0; | |
21149 | GNULIB_STDIO_H_NONBLOCKING=0; | |
21150 | GNULIB_STDIO_H_SIGPIPE=0; | |
21151 | GNULIB_TMPFILE=0; | |
21152 | GNULIB_VASPRINTF=0; | |
21153 | GNULIB_VFSCANF=0; | |
21154 | GNULIB_VSCANF=0; | |
21155 | GNULIB_VDPRINTF=0; | |
21156 | GNULIB_VFPRINTF=0; | |
21157 | GNULIB_VFPRINTF_POSIX=0; | |
21158 | GNULIB_VPRINTF=0; | |
21159 | GNULIB_VPRINTF_POSIX=0; | |
21160 | GNULIB_VSNPRINTF=0; | |
21161 | GNULIB_VSPRINTF_POSIX=0; | |
21162 | HAVE_DECL_FPURGE=1; | |
21163 | HAVE_DECL_FSEEKO=1; | |
21164 | HAVE_DECL_FTELLO=1; | |
21165 | HAVE_DECL_GETDELIM=1; | |
21166 | HAVE_DECL_GETLINE=1; | |
21167 | HAVE_DECL_OBSTACK_PRINTF=1; | |
21168 | HAVE_DECL_SNPRINTF=1; | |
21169 | HAVE_DECL_VSNPRINTF=1; | |
21170 | HAVE_DPRINTF=1; | |
21171 | HAVE_FSEEKO=1; | |
21172 | HAVE_FTELLO=1; | |
21173 | HAVE_PCLOSE=1; | |
21174 | HAVE_POPEN=1; | |
21175 | HAVE_RENAMEAT=1; | |
21176 | HAVE_VASPRINTF=1; | |
21177 | HAVE_VDPRINTF=1; | |
21178 | REPLACE_DPRINTF=0; | |
21179 | REPLACE_FCLOSE=0; | |
21180 | REPLACE_FDOPEN=0; | |
21181 | REPLACE_FFLUSH=0; | |
21182 | REPLACE_FOPEN=0; | |
21183 | REPLACE_FPRINTF=0; | |
21184 | REPLACE_FPURGE=0; | |
21185 | REPLACE_FREOPEN=0; | |
21186 | REPLACE_FSEEK=0; | |
21187 | REPLACE_FSEEKO=0; | |
21188 | REPLACE_FTELL=0; | |
21189 | REPLACE_FTELLO=0; | |
21190 | REPLACE_GETDELIM=0; | |
21191 | REPLACE_GETLINE=0; | |
21192 | REPLACE_OBSTACK_PRINTF=0; | |
21193 | REPLACE_PERROR=0; | |
21194 | REPLACE_POPEN=0; | |
21195 | REPLACE_PRINTF=0; | |
21196 | REPLACE_REMOVE=0; | |
21197 | REPLACE_RENAME=0; | |
21198 | REPLACE_RENAMEAT=0; | |
21199 | REPLACE_SNPRINTF=0; | |
21200 | REPLACE_SPRINTF=0; | |
21201 | REPLACE_STDIO_READ_FUNCS=0; | |
21202 | REPLACE_STDIO_WRITE_FUNCS=0; | |
21203 | REPLACE_TMPFILE=0; | |
21204 | REPLACE_VASPRINTF=0; | |
21205 | REPLACE_VDPRINTF=0; | |
21206 | REPLACE_VFPRINTF=0; | |
21207 | REPLACE_VPRINTF=0; | |
21208 | REPLACE_VSNPRINTF=0; | |
21209 | REPLACE_VSPRINTF=0; | |
1ebc9c87 | 21210 | |
5476a9a4 GM |
21211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
21212 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
21213 | if test "${ac_cv_struct_tm+set}" = set; then : | |
1ebc9c87 GM |
21214 | $as_echo_n "(cached) " >&6 |
21215 | else | |
5476a9a4 | 21216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1ebc9c87 | 21217 | /* end confdefs.h. */ |
5476a9a4 GM |
21218 | #include <sys/types.h> |
21219 | #include <time.h> | |
1ebc9c87 GM |
21220 | |
21221 | int | |
21222 | main () | |
21223 | { | |
5476a9a4 GM |
21224 | struct tm tm; |
21225 | int *p = &tm.tm_sec; | |
21226 | return !p; | |
1ebc9c87 GM |
21227 | ; |
21228 | return 0; | |
21229 | } | |
21230 | _ACEOF | |
5476a9a4 GM |
21231 | if ac_fn_c_try_compile "$LINENO"; then : |
21232 | ac_cv_struct_tm=time.h | |
1ebc9c87 | 21233 | else |
5476a9a4 | 21234 | ac_cv_struct_tm=sys/time.h |
1ebc9c87 | 21235 | fi |
5476a9a4 | 21236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 21237 | fi |
5476a9a4 GM |
21238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
21239 | $as_echo "$ac_cv_struct_tm" >&6; } | |
21240 | if test $ac_cv_struct_tm = sys/time.h; then | |
1ebc9c87 | 21241 | |
5476a9a4 | 21242 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
1ebc9c87 | 21243 | |
1ebc9c87 GM |
21244 | fi |
21245 | ||
5476a9a4 GM |
21246 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
21247 | #include <$ac_cv_struct_tm> | |
1fd182f0 | 21248 | |
5476a9a4 GM |
21249 | " |
21250 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : | |
1fd182f0 | 21251 | |
5476a9a4 GM |
21252 | cat >>confdefs.h <<_ACEOF |
21253 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
f199cab1 | 21254 | _ACEOF |
5476a9a4 GM |
21255 | |
21256 | ||
1f5d53eb | 21257 | fi |
1fd182f0 | 21258 | |
5476a9a4 | 21259 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
1f5d53eb | 21260 | |
5476a9a4 | 21261 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
1fd182f0 | 21262 | |
5476a9a4 GM |
21263 | else |
21264 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
21265 | " | |
21266 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : | |
21267 | ac_have_decl=1 | |
21268 | else | |
21269 | ac_have_decl=0 | |
21270 | fi | |
1fd182f0 | 21271 | |
5476a9a4 GM |
21272 | cat >>confdefs.h <<_ACEOF |
21273 | #define HAVE_DECL_TZNAME $ac_have_decl | |
21274 | _ACEOF | |
f199cab1 | 21275 | |
5476a9a4 GM |
21276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
21277 | $as_echo_n "checking for tzname... " >&6; } | |
21278 | if test "${ac_cv_var_tzname+set}" = set; then : | |
f199cab1 | 21279 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 21280 | else |
5476a9a4 | 21281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 21282 | /* end confdefs.h. */ |
5476a9a4 GM |
21283 | #include <time.h> |
21284 | #if !HAVE_DECL_TZNAME | |
21285 | extern char *tzname[]; | |
f199cab1 | 21286 | #endif |
5476a9a4 | 21287 | |
f199cab1 GM |
21288 | int |
21289 | main () | |
21290 | { | |
5476a9a4 | 21291 | return tzname[0][0]; |
f199cab1 GM |
21292 | ; |
21293 | return 0; | |
21294 | } | |
3e0be4ab | 21295 | _ACEOF |
f199cab1 | 21296 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21297 | ac_cv_var_tzname=yes |
3e0be4ab | 21298 | else |
5476a9a4 | 21299 | ac_cv_var_tzname=no |
f199cab1 GM |
21300 | fi |
21301 | rm -f core conftest.err conftest.$ac_objext \ | |
21302 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 21303 | fi |
5476a9a4 GM |
21304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
21305 | $as_echo "$ac_cv_var_tzname" >&6; } | |
21306 | if test $ac_cv_var_tzname = yes; then | |
21307 | ||
21308 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
f199cab1 | 21309 | |
5476a9a4 | 21310 | fi |
3e0be4ab | 21311 | fi |
cc322c06 | 21312 | |
5476a9a4 GM |
21313 | |
21314 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
21315 | " | |
21316 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
21317 | ||
21318 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
cc322c06 | 21319 | |
f199cab1 | 21320 | fi |
cc322c06 | 21321 | |
1f5d53eb | 21322 | |
e275c824 | 21323 | |
5476a9a4 | 21324 | |
283c7aed GM |
21325 | |
21326 | ||
21327 | ||
21328 | ||
21329 | ||
21330 | ||
21331 | ||
21332 | ||
21333 | ||
21334 | if test $gl_cv_have_include_next = yes; then | |
21335 | gl_cv_next_string_h='<'string.h'>' | |
21336 | else | |
21337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
21338 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
21339 | if test "${gl_cv_next_string_h+set}" = set; then : | |
21340 | $as_echo_n "(cached) " >&6 | |
21341 | else | |
21342 | ||
21343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21344 | /* end confdefs.h. */ | |
21345 | #include <string.h> | |
21346 | ||
21347 | _ACEOF | |
21348 | case "$host_os" in | |
21349 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
21350 | *) gl_absname_cpp="$ac_cpp" ;; | |
21351 | esac | |
21352 | ||
21353 | case "$host_os" in | |
21354 | mingw*) | |
21355 | gl_dirsep_regex='[/\\]' | |
21356 | ;; | |
21357 | *) | |
21358 | gl_dirsep_regex='\/' | |
21359 | ;; | |
21360 | esac | |
21361 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
21362 | ||
21363 | gl_header_literal_regex=`echo 'string.h' \ | |
21364 | | sed -e "$gl_make_literal_regex_sed"` | |
21365 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
21366 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
21367 | s|^/[^/]|//&| | |
21368 | p | |
21369 | q | |
21370 | }' | |
21371 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
21372 | sed -n "$gl_absolute_header_sed"`'"' | |
21373 | ||
21374 | ||
21375 | fi | |
21376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
21377 | $as_echo "$gl_cv_next_string_h" >&6; } | |
21378 | fi | |
21379 | NEXT_STRING_H=$gl_cv_next_string_h | |
21380 | ||
21381 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
21382 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21383 | gl_next_as_first_directive='<'string.h'>' | |
21384 | else | |
21385 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
21386 | gl_next_as_first_directive=$gl_cv_next_string_h | |
21387 | fi | |
21388 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
21389 | ||
21390 | ||
21391 | ||
21392 | ||
21393 | ||
21394 | ||
21395 | ||
21396 | ||
21397 | ||
5476a9a4 GM |
21398 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" |
21399 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
21400 | ac_have_decl=1 | |
3e0be4ab | 21401 | else |
5476a9a4 | 21402 | ac_have_decl=0 |
3e0be4ab | 21403 | fi |
5476a9a4 GM |
21404 | |
21405 | cat >>confdefs.h <<_ACEOF | |
21406 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
f199cab1 | 21407 | _ACEOF |
e275c824 PE |
21408 | |
21409 | ||
5476a9a4 GM |
21410 | |
21411 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" | |
21412 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
21413 | ac_have_decl=1 | |
21414 | else | |
21415 | ac_have_decl=0 | |
3e0be4ab | 21416 | fi |
e275c824 | 21417 | |
5476a9a4 GM |
21418 | cat >>confdefs.h <<_ACEOF |
21419 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
21420 | _ACEOF | |
e275c824 PE |
21421 | |
21422 | ||
2b1928b8 | 21423 | |
5476a9a4 GM |
21424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
21425 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
21426 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
f199cab1 | 21427 | $as_echo_n "(cached) " >&6 |
2b1928b8 | 21428 | else |
5476a9a4 GM |
21429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21430 | /* end confdefs.h. */ | |
21431 | #include <sys/types.h> | |
21432 | #include <sys/stat.h> | |
2b1928b8 | 21433 | |
5476a9a4 GM |
21434 | #if defined S_ISBLK && defined S_IFDIR |
21435 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
21436 | #endif | |
2b1928b8 | 21437 | |
5476a9a4 GM |
21438 | #if defined S_ISBLK && defined S_IFCHR |
21439 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
21440 | #endif | |
0eb775a3 | 21441 | |
5476a9a4 GM |
21442 | #if defined S_ISLNK && defined S_IFREG |
21443 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
21444 | #endif | |
21445 | ||
21446 | #if defined S_ISSOCK && defined S_IFREG | |
21447 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
21448 | #endif | |
0eb775a3 | 21449 | |
5476a9a4 GM |
21450 | _ACEOF |
21451 | if ac_fn_c_try_compile "$LINENO"; then : | |
21452 | ac_cv_header_stat_broken=no | |
f199cab1 | 21453 | else |
5476a9a4 | 21454 | ac_cv_header_stat_broken=yes |
f199cab1 | 21455 | fi |
5476a9a4 | 21456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 21457 | fi |
5476a9a4 GM |
21458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
21459 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
21460 | if test $ac_cv_header_stat_broken = yes; then | |
0eb775a3 | 21461 | |
5476a9a4 | 21462 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
0eb775a3 | 21463 | |
5476a9a4 | 21464 | fi |
0eb775a3 GM |
21465 | |
21466 | ||
21467 | ||
5476a9a4 GM |
21468 | |
21469 | ||
21470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 | |
21471 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
21472 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : | |
21473 | $as_echo_n "(cached) " >&6 | |
21474 | else | |
21475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 21476 | /* end confdefs.h. */ |
5476a9a4 | 21477 | #include <time.h> |
52724a05 | 21478 | |
3e0be4ab GM |
21479 | int |
21480 | main () | |
21481 | { | |
5476a9a4 | 21482 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
21483 | ; |
21484 | return 0; | |
21485 | } | |
21486 | _ACEOF | |
5476a9a4 GM |
21487 | if ac_fn_c_try_compile "$LINENO"; then : |
21488 | gl_cv_sys_struct_timespec_in_time_h=yes | |
3e0be4ab | 21489 | else |
5476a9a4 | 21490 | gl_cv_sys_struct_timespec_in_time_h=no |
3e0be4ab | 21491 | fi |
5476a9a4 GM |
21492 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
21493 | fi | |
21494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
21495 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
52724a05 | 21496 | |
5476a9a4 GM |
21497 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
21498 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
21499 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
21500 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
21501 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
21502 | else | |
21503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
21504 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
21505 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : | |
21506 | $as_echo_n "(cached) " >&6 | |
21507 | else | |
3e0be4ab GM |
21508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21509 | /* end confdefs.h. */ | |
5476a9a4 GM |
21510 | #include <sys/time.h> |
21511 | ||
3e0be4ab GM |
21512 | int |
21513 | main () | |
21514 | { | |
5476a9a4 | 21515 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
21516 | ; |
21517 | return 0; | |
21518 | } | |
21519 | _ACEOF | |
5476a9a4 GM |
21520 | if ac_fn_c_try_compile "$LINENO"; then : |
21521 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
3e0be4ab | 21522 | else |
5476a9a4 | 21523 | gl_cv_sys_struct_timespec_in_sys_time_h=no |
3e0be4ab | 21524 | fi |
5476a9a4 | 21525 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 21526 | fi |
5476a9a4 GM |
21527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 |
21528 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
21529 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
21530 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
21531 | else | |
21532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
21533 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
21534 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : | |
3e0be4ab GM |
21535 | $as_echo_n "(cached) " >&6 |
21536 | else | |
21537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21538 | /* end confdefs.h. */ | |
5476a9a4 GM |
21539 | #include <pthread.h> |
21540 | ||
3e0be4ab GM |
21541 | int |
21542 | main () | |
21543 | { | |
5476a9a4 | 21544 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
21545 | ; |
21546 | return 0; | |
21547 | } | |
21548 | _ACEOF | |
5476a9a4 GM |
21549 | if ac_fn_c_try_compile "$LINENO"; then : |
21550 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
3e0be4ab | 21551 | else |
5476a9a4 | 21552 | gl_cv_sys_struct_timespec_in_pthread_h=no |
3e0be4ab | 21553 | fi |
5476a9a4 | 21554 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 21555 | fi |
5476a9a4 GM |
21556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 |
21557 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
21558 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
21559 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
21560 | fi | |
21561 | fi | |
f199cab1 | 21562 | fi |
e275c824 PE |
21563 | |
21564 | ||
b0415a03 | 21565 | |
b0415a03 | 21566 | |
e275c824 | 21567 | |
e275c824 PE |
21568 | |
21569 | ||
f199cab1 | 21570 | |
e275c824 PE |
21571 | |
21572 | ||
21573 | ||
21574 | ||
21575 | ||
21576 | ||
21577 | ||
5476a9a4 GM |
21578 | if test $gl_cv_have_include_next = yes; then |
21579 | gl_cv_next_time_h='<'time.h'>' | |
21580 | else | |
21581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
21582 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
21583 | if test "${gl_cv_next_time_h+set}" = set; then : | |
21584 | $as_echo_n "(cached) " >&6 | |
21585 | else | |
e275c824 | 21586 | |
5476a9a4 GM |
21587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21588 | /* end confdefs.h. */ | |
21589 | #include <time.h> | |
e275c824 | 21590 | |
5476a9a4 GM |
21591 | _ACEOF |
21592 | case "$host_os" in | |
21593 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
21594 | *) gl_absname_cpp="$ac_cpp" ;; | |
21595 | esac | |
e275c824 | 21596 | |
5476a9a4 GM |
21597 | case "$host_os" in |
21598 | mingw*) | |
21599 | gl_dirsep_regex='[/\\]' | |
21600 | ;; | |
21601 | *) | |
21602 | gl_dirsep_regex='\/' | |
21603 | ;; | |
21604 | esac | |
21605 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
e275c824 | 21606 | |
5476a9a4 GM |
21607 | gl_header_literal_regex=`echo 'time.h' \ |
21608 | | sed -e "$gl_make_literal_regex_sed"` | |
21609 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
21610 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
21611 | s|^/[^/]|//&| | |
21612 | p | |
21613 | q | |
21614 | }' | |
21615 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
21616 | sed -n "$gl_absolute_header_sed"`'"' | |
e275c824 PE |
21617 | |
21618 | ||
5476a9a4 GM |
21619 | fi |
21620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
21621 | $as_echo "$gl_cv_next_time_h" >&6; } | |
21622 | fi | |
21623 | NEXT_TIME_H=$gl_cv_next_time_h | |
67342916 | 21624 | |
5476a9a4 GM |
21625 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
21626 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21627 | gl_next_as_first_directive='<'time.h'>' | |
f199cab1 | 21628 | else |
5476a9a4 GM |
21629 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' |
21630 | gl_next_as_first_directive=$gl_cv_next_time_h | |
f199cab1 | 21631 | fi |
5476a9a4 | 21632 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive |
4fda9c95 GM |
21633 | |
21634 | ||
52724a05 GM |
21635 | |
21636 | ||
21637 | ||
21638 | ||
21639 | ||
21640 | ||
21641 | ||
ae0d7250 PE |
21642 | |
21643 | ||
21644 | ||
cc322c06 | 21645 | |
f199cab1 | 21646 | |
b5591ebb GM |
21647 | ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" |
21648 | if test "x$ac_cv_have_decl_unsetenv" = x""yes; then : | |
21649 | ac_have_decl=1 | |
21650 | else | |
21651 | ac_have_decl=0 | |
21652 | fi | |
21653 | ||
21654 | cat >>confdefs.h <<_ACEOF | |
21655 | #define HAVE_DECL_UNSETENV $ac_have_decl | |
21656 | _ACEOF | |
21657 | ||
cc322c06 | 21658 | |
5476a9a4 GM |
21659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5 |
21660 | $as_echo_n "checking whether the utimes function works... " >&6; } | |
21661 | if test "${gl_cv_func_working_utimes+set}" = set; then : | |
21662 | $as_echo_n "(cached) " >&6 | |
21663 | else | |
1fd182f0 | 21664 | |
5476a9a4 GM |
21665 | if test "$cross_compiling" = yes; then : |
21666 | gl_cv_func_working_utimes=no | |
21667 | else | |
21668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21669 | /* end confdefs.h. */ | |
21670 | ||
21671 | #include <sys/types.h> | |
21672 | #include <sys/stat.h> | |
21673 | #include <fcntl.h> | |
21674 | #include <sys/time.h> | |
21675 | #include <time.h> | |
21676 | #include <unistd.h> | |
21677 | #include <stdlib.h> | |
21678 | #include <stdio.h> | |
21679 | #include <utime.h> | |
1fd182f0 | 21680 | |
5476a9a4 GM |
21681 | static int |
21682 | inorder (time_t a, time_t b, time_t c) | |
21683 | { | |
21684 | return a <= b && b <= c; | |
21685 | } | |
1fd182f0 | 21686 | |
5476a9a4 GM |
21687 | int |
21688 | main () | |
21689 | { | |
21690 | int result = 0; | |
21691 | char const *file = "conftest.utimes"; | |
21692 | static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; | |
1fd182f0 | 21693 | |
5476a9a4 GM |
21694 | /* Test whether utimes() essentially works. */ |
21695 | { | |
21696 | struct stat sbuf; | |
21697 | FILE *f = fopen (file, "w"); | |
21698 | if (f == NULL) | |
21699 | result |= 1; | |
21700 | else if (fclose (f) != 0) | |
21701 | result |= 1; | |
21702 | else if (utimes (file, timeval) != 0) | |
21703 | result |= 2; | |
21704 | else if (lstat (file, &sbuf) != 0) | |
21705 | result |= 1; | |
21706 | else if (!(sbuf.st_atime == timeval[0].tv_sec | |
21707 | && sbuf.st_mtime == timeval[1].tv_sec)) | |
21708 | result |= 4; | |
21709 | if (unlink (file) != 0) | |
21710 | result |= 1; | |
21711 | } | |
1fd182f0 | 21712 | |
5476a9a4 GM |
21713 | /* Test whether utimes() with a NULL argument sets the file's timestamp |
21714 | to the current time. Use 'fstat' as well as 'time' to | |
21715 | determine the "current" time, to accommodate NFS file systems | |
21716 | if there is a time skew between the host and the NFS server. */ | |
21717 | { | |
21718 | int fd = open (file, O_WRONLY|O_CREAT, 0644); | |
21719 | if (fd < 0) | |
21720 | result |= 1; | |
21721 | else | |
21722 | { | |
21723 | time_t t0, t2; | |
21724 | struct stat st0, st1, st2; | |
21725 | if (time (&t0) == (time_t) -1) | |
21726 | result |= 1; | |
21727 | else if (fstat (fd, &st0) != 0) | |
21728 | result |= 1; | |
21729 | else if (utimes (file, timeval) != 0) | |
21730 | result |= 2; | |
21731 | else if (utimes (file, NULL) != 0) | |
21732 | result |= 8; | |
21733 | else if (fstat (fd, &st1) != 0) | |
21734 | result |= 1; | |
21735 | else if (write (fd, "\n", 1) != 1) | |
21736 | result |= 1; | |
21737 | else if (fstat (fd, &st2) != 0) | |
21738 | result |= 1; | |
21739 | else if (time (&t2) == (time_t) -1) | |
21740 | result |= 1; | |
21741 | else | |
21742 | { | |
21743 | int m_ok_POSIX = inorder (t0, st1.st_mtime, t2); | |
21744 | int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime); | |
21745 | if (! (st1.st_atime == st1.st_mtime)) | |
21746 | result |= 16; | |
21747 | if (! (m_ok_POSIX || m_ok_NFS)) | |
21748 | result |= 32; | |
21749 | } | |
21750 | if (close (fd) != 0) | |
21751 | result |= 1; | |
21752 | } | |
21753 | if (unlink (file) != 0) | |
21754 | result |= 1; | |
21755 | } | |
52724a05 | 21756 | |
5476a9a4 GM |
21757 | /* Test whether utimes() with a NULL argument works on read-only files. */ |
21758 | { | |
21759 | int fd = open (file, O_WRONLY|O_CREAT, 0444); | |
21760 | if (fd < 0) | |
21761 | result |= 1; | |
21762 | else if (close (fd) != 0) | |
21763 | result |= 1; | |
21764 | else if (utimes (file, NULL) != 0) | |
21765 | result |= 64; | |
21766 | if (unlink (file) != 0) | |
21767 | result |= 1; | |
21768 | } | |
1fd182f0 | 21769 | |
5476a9a4 GM |
21770 | return result; |
21771 | } | |
1fd182f0 | 21772 | |
5476a9a4 GM |
21773 | _ACEOF |
21774 | if ac_fn_c_try_run "$LINENO"; then : | |
21775 | gl_cv_func_working_utimes=yes | |
21776 | else | |
21777 | gl_cv_func_working_utimes=no | |
21778 | fi | |
21779 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21780 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 21781 | fi |
1fd182f0 | 21782 | |
5476a9a4 GM |
21783 | fi |
21784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5 | |
21785 | $as_echo "$gl_cv_func_working_utimes" >&6; } | |
1fd182f0 | 21786 | |
5476a9a4 | 21787 | if test $gl_cv_func_working_utimes = yes; then |
1fd182f0 | 21788 | |
5476a9a4 | 21789 | $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h |
1fd182f0 | 21790 | |
5476a9a4 | 21791 | fi |
1fd182f0 | 21792 | |
1fd182f0 | 21793 | |
1fd182f0 | 21794 | |
1fd182f0 | 21795 | |
1fd182f0 | 21796 | |
5476a9a4 GM |
21797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 |
21798 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
21799 | if test "${gl_cv_sys_struct_utimbuf+set}" = set; then : | |
21800 | $as_echo_n "(cached) " >&6 | |
21801 | else | |
21802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21803 | /* end confdefs.h. */ | |
21804 | #if HAVE_SYS_TIME_H | |
21805 | #include <sys/time.h> | |
21806 | #endif | |
21807 | #include <time.h> | |
21808 | #ifdef HAVE_UTIME_H | |
21809 | #include <utime.h> | |
21810 | #endif | |
1fd182f0 | 21811 | |
5476a9a4 GM |
21812 | int |
21813 | main () | |
21814 | { | |
21815 | static struct utimbuf x; x.actime = x.modtime; | |
21816 | ; | |
21817 | return 0; | |
21818 | } | |
21819 | _ACEOF | |
21820 | if ac_fn_c_try_compile "$LINENO"; then : | |
21821 | gl_cv_sys_struct_utimbuf=yes | |
21822 | else | |
21823 | gl_cv_sys_struct_utimbuf=no | |
f199cab1 | 21824 | fi |
5476a9a4 | 21825 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 21826 | fi |
5476a9a4 GM |
21827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5 |
21828 | $as_echo "$gl_cv_sys_struct_utimbuf" >&6; } | |
1fd182f0 | 21829 | |
5476a9a4 | 21830 | if test $gl_cv_sys_struct_utimbuf = yes; then |
1fd182f0 | 21831 | |
5476a9a4 | 21832 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h |
1fd182f0 | 21833 | |
5476a9a4 | 21834 | fi |
1fd182f0 | 21835 | |
1fd182f0 | 21836 | |
1fd182f0 | 21837 | |
1fd182f0 | 21838 | |
1fd182f0 | 21839 | |
1fd182f0 | 21840 | |
1fd182f0 | 21841 | |
3e0be4ab | 21842 | |
f199cab1 | 21843 | |
f199cab1 | 21844 | |
067d23c9 | 21845 | |
710f5812 GM |
21846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 |
21847 | $as_echo_n "checking type of array argument to getgroups... " >&6; } | |
21848 | if test "${ac_cv_type_getgroups+set}" = set; then : | |
21849 | $as_echo_n "(cached) " >&6 | |
21850 | else | |
21851 | if test "$cross_compiling" = yes; then : | |
21852 | ac_cv_type_getgroups=cross | |
21853 | else | |
21854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21855 | /* end confdefs.h. */ | |
21856 | /* Thanks to Mike Rendell for this test. */ | |
21857 | $ac_includes_default | |
21858 | #define NGID 256 | |
21859 | #undef MAX | |
21860 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
21861 | ||
21862 | int | |
21863 | main () | |
21864 | { | |
21865 | gid_t gidset[NGID]; | |
21866 | int i, n; | |
21867 | union { gid_t gval; long int lval; } val; | |
21868 | ||
21869 | val.lval = -1; | |
21870 | for (i = 0; i < NGID; i++) | |
21871 | gidset[i] = val.gval; | |
21872 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
21873 | gidset); | |
21874 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
21875 | happens when gid_t is short int but getgroups modifies an array | |
21876 | of ints. */ | |
21877 | return n > 0 && gidset[n] != val.gval; | |
21878 | } | |
21879 | _ACEOF | |
21880 | if ac_fn_c_try_run "$LINENO"; then : | |
21881 | ac_cv_type_getgroups=gid_t | |
21882 | else | |
21883 | ac_cv_type_getgroups=int | |
21884 | fi | |
21885 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21886 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21887 | fi | |
21888 | ||
21889 | if test $ac_cv_type_getgroups = cross; then | |
21890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21891 | /* end confdefs.h. */ | |
21892 | #include <unistd.h> | |
21893 | ||
21894 | _ACEOF | |
21895 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
21896 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : | |
21897 | ac_cv_type_getgroups=gid_t | |
21898 | else | |
21899 | ac_cv_type_getgroups=int | |
21900 | fi | |
21901 | rm -f conftest* | |
21902 | ||
21903 | fi | |
21904 | fi | |
21905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 | |
21906 | $as_echo "$ac_cv_type_getgroups" >&6; } | |
21907 | ||
21908 | cat >>confdefs.h <<_ACEOF | |
21909 | #define GETGROUPS_T $ac_cv_type_getgroups | |
21910 | _ACEOF | |
21911 | ||
21912 | ||
21913 | ||
067d23c9 | 21914 | |
0cdca42a GM |
21915 | |
21916 | ||
5476a9a4 GM |
21917 | if false; then |
21918 | GL_COND_LIBTOOL_TRUE= | |
21919 | GL_COND_LIBTOOL_FALSE='#' | |
21920 | else | |
21921 | GL_COND_LIBTOOL_TRUE='#' | |
21922 | GL_COND_LIBTOOL_FALSE= | |
1fd182f0 | 21923 | fi |
067d23c9 | 21924 | |
5476a9a4 GM |
21925 | gl_cond_libtool=false |
21926 | gl_libdeps= | |
21927 | gl_ltlibdeps= | |
21928 | gl_m4_base='m4' | |
067d23c9 | 21929 | |
f199cab1 | 21930 | |
f199cab1 | 21931 | |
f199cab1 | 21932 | |
067d23c9 | 21933 | |
f199cab1 | 21934 | |
f199cab1 | 21935 | |
f199cab1 | 21936 | |
067d23c9 | 21937 | |
5476a9a4 | 21938 | gl_source_base='lib' |
cc322c06 GM |
21939 | |
21940 | ||
5476a9a4 GM |
21941 | if test $ac_cv_func_alloca_works = no; then |
21942 | : | |
f199cab1 | 21943 | fi |
cc322c06 | 21944 | |
5476a9a4 GM |
21945 | # Define an additional variable used in the Makefile substitution. |
21946 | if test $ac_cv_working_alloca_h = yes; then | |
21947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
21948 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
21949 | if test "${gl_cv_rpl_alloca+set}" = set; then : | |
21950 | $as_echo_n "(cached) " >&6 | |
21951 | else | |
cc322c06 | 21952 | |
5476a9a4 GM |
21953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21954 | /* end confdefs.h. */ | |
067d23c9 | 21955 | |
5476a9a4 GM |
21956 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
21957 | Need own alloca | |
21958 | #endif | |
067d23c9 | 21959 | |
f199cab1 | 21960 | _ACEOF |
5476a9a4 GM |
21961 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
21962 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
21963 | gl_cv_rpl_alloca=yes | |
21964 | else | |
21965 | gl_cv_rpl_alloca=no | |
369e19fc | 21966 | fi |
5476a9a4 | 21967 | rm -f conftest* |
067d23c9 | 21968 | |
ae0d7250 | 21969 | |
5476a9a4 GM |
21970 | fi |
21971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 | |
21972 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
21973 | if test $gl_cv_rpl_alloca = yes; then | |
52724a05 | 21974 | |
5476a9a4 | 21975 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
ae0d7250 | 21976 | |
5476a9a4 GM |
21977 | ALLOCA_H=alloca.h |
21978 | else | |
21979 | ALLOCA_H= | |
21980 | fi | |
f199cab1 | 21981 | else |
5476a9a4 GM |
21982 | ALLOCA_H=alloca.h |
21983 | fi | |
ae0d7250 | 21984 | |
5476a9a4 GM |
21985 | if test -n "$ALLOCA_H"; then |
21986 | GL_GENERATE_ALLOCA_H_TRUE= | |
21987 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
21988 | else | |
21989 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
21990 | GL_GENERATE_ALLOCA_H_FALSE= | |
21991 | fi | |
f199cab1 | 21992 | |
ae0d7250 PE |
21993 | |
21994 | ||
21995 | ||
21996 | ||
21997 | ||
5476a9a4 GM |
21998 | # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. |
21999 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. | |
ae0d7250 | 22000 | |
5476a9a4 GM |
22001 | # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* |
22002 | # programs in the package would end up linked with that potentially-shared | |
22003 | # library, inducing unnecessary run-time overhead. | |
22004 | LIB_CLOCK_GETTIME= | |
ae0d7250 | 22005 | |
5476a9a4 GM |
22006 | gl_saved_libs=$LIBS |
22007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 | |
22008 | $as_echo_n "checking for library containing clock_gettime... " >&6; } | |
22009 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
22010 | $as_echo_n "(cached) " >&6 | |
22011 | else | |
22012 | ac_func_search_save_LIBS=$LIBS | |
22013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22014 | /* end confdefs.h. */ | |
22015 | ||
22016 | /* Override any GCC internal prototype to avoid an error. | |
22017 | Use char because int might match the return type of a GCC | |
22018 | builtin and then its argument prototype would still apply. */ | |
22019 | #ifdef __cplusplus | |
22020 | extern "C" | |
22021 | #endif | |
22022 | char clock_gettime (); | |
22023 | int | |
22024 | main () | |
22025 | { | |
22026 | return clock_gettime (); | |
22027 | ; | |
22028 | return 0; | |
22029 | } | |
22030 | _ACEOF | |
22031 | for ac_lib in '' rt posix4; do | |
22032 | if test -z "$ac_lib"; then | |
22033 | ac_res="none required" | |
22034 | else | |
22035 | ac_res=-l$ac_lib | |
22036 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
22037 | fi | |
22038 | if ac_fn_c_try_link "$LINENO"; then : | |
22039 | ac_cv_search_clock_gettime=$ac_res | |
f199cab1 | 22040 | fi |
5476a9a4 GM |
22041 | rm -f core conftest.err conftest.$ac_objext \ |
22042 | conftest$ac_exeext | |
22043 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
22044 | break | |
22045 | fi | |
22046 | done | |
22047 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
ae0d7250 | 22048 | |
5476a9a4 GM |
22049 | else |
22050 | ac_cv_search_clock_gettime=no | |
22051 | fi | |
22052 | rm conftest.$ac_ext | |
22053 | LIBS=$ac_func_search_save_LIBS | |
22054 | fi | |
22055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 | |
22056 | $as_echo "$ac_cv_search_clock_gettime" >&6; } | |
22057 | ac_res=$ac_cv_search_clock_gettime | |
22058 | if test "$ac_res" != no; then : | |
22059 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
22060 | test "$ac_cv_search_clock_gettime" = "none required" || | |
22061 | LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime | |
22062 | fi | |
ae0d7250 | 22063 | |
5476a9a4 GM |
22064 | for ac_func in clock_gettime clock_settime |
22065 | do : | |
22066 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
22067 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22068 | eval as_val=\$$as_ac_var | |
22069 | if test "x$as_val" = x""yes; then : | |
22070 | cat >>confdefs.h <<_ACEOF | |
22071 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
22072 | _ACEOF | |
ae0d7250 | 22073 | |
d7ad186c GM |
22074 | fi |
22075 | done | |
22076 | ||
22077 | LIBS=$gl_saved_libs | |
22078 | ||
22079 | ||
22080 | : | |
22081 | ||
22082 | ||
22083 | ||
22084 | cat >>confdefs.h <<_ACEOF | |
22085 | #define GNULIB_CLOSE_STREAM 1 | |
22086 | _ACEOF | |
22087 | ||
22088 | ||
22089 | ||
22090 | ||
22091 | : | |
22092 | ||
22093 | ||
22094 | ||
22095 | : | |
22096 | ||
22097 | ||
22098 | ||
22099 | ||
22100 | ||
22101 | ||
22102 | ||
22103 | ||
22104 | ||
22105 | ||
22106 | ||
22107 | ||
22108 | ||
22109 | ||
22110 | ||
22111 | ||
22112 | ||
ae0d7250 | 22113 | |
3e0be4ab | 22114 | |
d7ad186c GM |
22115 | if test $gl_cv_have_include_next = yes; then |
22116 | gl_cv_next_dirent_h='<'dirent.h'>' | |
22117 | else | |
22118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 | |
22119 | $as_echo_n "checking absolute name of <dirent.h>... " >&6; } | |
22120 | if test "${gl_cv_next_dirent_h+set}" = set; then : | |
22121 | $as_echo_n "(cached) " >&6 | |
22122 | else | |
3e0be4ab | 22123 | |
d7ad186c | 22124 | if test $ac_cv_header_dirent_h = yes; then |
3bf26e96 GM |
22125 | |
22126 | ||
d7ad186c GM |
22127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22128 | /* end confdefs.h. */ | |
22129 | #include <dirent.h> | |
3bf26e96 | 22130 | |
3bf26e96 | 22131 | _ACEOF |
d7ad186c GM |
22132 | case "$host_os" in |
22133 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22134 | *) gl_absname_cpp="$ac_cpp" ;; | |
22135 | esac | |
3bf26e96 | 22136 | |
d7ad186c GM |
22137 | case "$host_os" in |
22138 | mingw*) | |
22139 | gl_dirsep_regex='[/\\]' | |
22140 | ;; | |
22141 | *) | |
22142 | gl_dirsep_regex='\/' | |
22143 | ;; | |
22144 | esac | |
22145 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
3bf26e96 | 22146 | |
d7ad186c GM |
22147 | gl_header_literal_regex=`echo 'dirent.h' \ |
22148 | | sed -e "$gl_make_literal_regex_sed"` | |
22149 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22150 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22151 | s|^/[^/]|//&| | |
22152 | p | |
22153 | q | |
22154 | }' | |
22155 | gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22156 | sed -n "$gl_absolute_header_sed"`'"' | |
22157 | else | |
22158 | gl_cv_next_dirent_h='<'dirent.h'>' | |
22159 | fi | |
3bf26e96 | 22160 | |
3e0be4ab | 22161 | |
d7ad186c GM |
22162 | fi |
22163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 | |
22164 | $as_echo "$gl_cv_next_dirent_h" >&6; } | |
22165 | fi | |
22166 | NEXT_DIRENT_H=$gl_cv_next_dirent_h | |
f199cab1 | 22167 | |
d7ad186c GM |
22168 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
22169 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22170 | gl_next_as_first_directive='<'dirent.h'>' | |
22171 | else | |
22172 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22173 | gl_next_as_first_directive=$gl_cv_next_dirent_h | |
22174 | fi | |
22175 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive | |
f199cab1 | 22176 | |
3e0be4ab | 22177 | |
f199cab1 | 22178 | |
f199cab1 | 22179 | |
d7ad186c GM |
22180 | if test $ac_cv_header_dirent_h = yes; then |
22181 | HAVE_DIRENT_H=1 | |
22182 | else | |
22183 | HAVE_DIRENT_H=0 | |
22184 | fi | |
3e0be4ab | 22185 | |
f199cab1 GM |
22186 | |
22187 | ||
22188 | ||
5476a9a4 GM |
22189 | |
22190 | ||
22191 | ||
22192 | ||
22193 | ||
22194 | ||
5476a9a4 GM |
22195 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
22196 | ||
22197 | ||
22198 | if test $HAVE_DUP2 = 1; then | |
22199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
22200 | $as_echo_n "checking whether dup2 works... " >&6; } | |
22201 | if test "${gl_cv_func_dup2_works+set}" = set; then : | |
3e0be4ab GM |
22202 | $as_echo_n "(cached) " >&6 |
22203 | else | |
5476a9a4 GM |
22204 | if test "$cross_compiling" = yes; then : |
22205 | case "$host_os" in | |
22206 | mingw*) # on this platform, dup2 always returns 0 for success | |
22207 | gl_cv_func_dup2_works="guessing no" ;; | |
22208 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
22209 | gl_cv_func_dup2_works="guessing no" ;; | |
22210 | linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a | |
22211 | # closed fd may yield -EBADF instead of -1 / errno=EBADF. | |
22212 | gl_cv_func_dup2_works="guessing no" ;; | |
22213 | freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. | |
22214 | gl_cv_func_dup2_works="guessing no" ;; | |
22215 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
22216 | gl_cv_func_dup2_works="guessing no" ;; | |
22217 | *) gl_cv_func_dup2_works="guessing yes" ;; | |
22218 | esac | |
22219 | else | |
22220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 22221 | /* end confdefs.h. */ |
ae0d7250 | 22222 | |
5476a9a4 GM |
22223 | #include <unistd.h> |
22224 | #include <fcntl.h> | |
22225 | #include <errno.h> | |
3e0be4ab GM |
22226 | int |
22227 | main () | |
22228 | { | |
5476a9a4 GM |
22229 | int result = 0; |
22230 | #ifdef FD_CLOEXEC | |
22231 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
22232 | result |= 1; | |
22233 | #endif | |
22234 | if (dup2 (1, 1) == 0) | |
22235 | result |= 2; | |
22236 | #ifdef FD_CLOEXEC | |
22237 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
22238 | result |= 4; | |
22239 | #endif | |
22240 | close (0); | |
22241 | if (dup2 (0, 0) != -1) | |
22242 | result |= 8; | |
22243 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
22244 | if (dup2 (2, 1000000) == -1 && errno != EBADF) | |
22245 | result |= 16; | |
0d1f53ad GM |
22246 | /* Flush out a cygwin core dump. */ |
22247 | if (dup2 (2, -1) != -1 || errno != EBADF) | |
22248 | result |= 32; | |
5476a9a4 GM |
22249 | return result; |
22250 | ||
ae0d7250 PE |
22251 | ; |
22252 | return 0; | |
22253 | } | |
5476a9a4 | 22254 | |
ae0d7250 | 22255 | _ACEOF |
5476a9a4 GM |
22256 | if ac_fn_c_try_run "$LINENO"; then : |
22257 | gl_cv_func_dup2_works=yes | |
ae0d7250 | 22258 | else |
5476a9a4 | 22259 | gl_cv_func_dup2_works=no |
ae0d7250 | 22260 | fi |
5476a9a4 GM |
22261 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
22262 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ae0d7250 | 22263 | fi |
5476a9a4 GM |
22264 | |
22265 | ||
3e0be4ab | 22266 | fi |
5476a9a4 GM |
22267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
22268 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
22269 | case "$gl_cv_func_dup2_works" in | |
22270 | *yes) ;; | |
22271 | *) | |
22272 | REPLACE_DUP2=1 | |
22273 | ;; | |
22274 | esac | |
22275 | fi | |
3e0be4ab | 22276 | |
3e0be4ab | 22277 | |
a6342fc8 | 22278 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then |
f199cab1 | 22279 | |
f199cab1 GM |
22280 | |
22281 | ||
f199cab1 | 22282 | |
f199cab1 | 22283 | |
f199cab1 | 22284 | |
f199cab1 | 22285 | |
f199cab1 | 22286 | |
5476a9a4 | 22287 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
f199cab1 GM |
22288 | |
22289 | ||
a6342fc8 | 22290 | fi |
f199cab1 | 22291 | |
f199cab1 | 22292 | |
f199cab1 | 22293 | |
f199cab1 | 22294 | |
f199cab1 | 22295 | |
5476a9a4 | 22296 | GNULIB_DUP2=1 |
f199cab1 GM |
22297 | |
22298 | ||
f199cab1 | 22299 | |
f199cab1 | 22300 | |
3e0be4ab | 22301 | |
3e0be4ab | 22302 | |
f199cab1 GM |
22303 | |
22304 | ||
ae0d7250 | 22305 | |
ae0d7250 | 22306 | |
5476a9a4 | 22307 | |
93131e11 GM |
22308 | GNULIB_ENVIRON=1 |
22309 | ||
22310 | ||
22311 | ||
22312 | ||
22313 | ||
22314 | ||
22315 | ||
22316 | ||
3a019ab4 | 22317 | |
8966cbff GM |
22318 | LIB_EXECINFO='' |
22319 | EXECINFO_H='execinfo.h' | |
22320 | ||
22321 | if test $ac_cv_header_execinfo_h = yes; then | |
22322 | gl_saved_libs=$LIBS | |
22323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5 | |
22324 | $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; } | |
22325 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
22326 | $as_echo_n "(cached) " >&6 | |
22327 | else | |
22328 | ac_func_search_save_LIBS=$LIBS | |
22329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22330 | /* end confdefs.h. */ | |
22331 | ||
22332 | /* Override any GCC internal prototype to avoid an error. | |
22333 | Use char because int might match the return type of a GCC | |
22334 | builtin and then its argument prototype would still apply. */ | |
22335 | #ifdef __cplusplus | |
22336 | extern "C" | |
22337 | #endif | |
22338 | char backtrace_symbols_fd (); | |
22339 | int | |
22340 | main () | |
22341 | { | |
22342 | return backtrace_symbols_fd (); | |
22343 | ; | |
22344 | return 0; | |
22345 | } | |
22346 | _ACEOF | |
22347 | for ac_lib in '' execinfo; do | |
22348 | if test -z "$ac_lib"; then | |
22349 | ac_res="none required" | |
22350 | else | |
22351 | ac_res=-l$ac_lib | |
22352 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
22353 | fi | |
22354 | if ac_fn_c_try_link "$LINENO"; then : | |
22355 | ac_cv_search_backtrace_symbols_fd=$ac_res | |
22356 | fi | |
22357 | rm -f core conftest.err conftest.$ac_objext \ | |
22358 | conftest$ac_exeext | |
22359 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
22360 | break | |
22361 | fi | |
22362 | done | |
22363 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
22364 | ||
22365 | else | |
22366 | ac_cv_search_backtrace_symbols_fd=no | |
22367 | fi | |
22368 | rm conftest.$ac_ext | |
22369 | LIBS=$ac_func_search_save_LIBS | |
22370 | fi | |
22371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5 | |
22372 | $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; } | |
22373 | ac_res=$ac_cv_search_backtrace_symbols_fd | |
22374 | if test "$ac_res" != no; then : | |
22375 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
22376 | test "$ac_cv_search_backtrace_symbols_fd" = "none required" || | |
22377 | LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd | |
22378 | fi | |
22379 | ||
22380 | LIBS=$gl_saved_libs | |
22381 | test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' | |
22382 | fi | |
22383 | ||
22384 | if test -n "$EXECINFO_H"; then | |
22385 | ||
22386 | ||
22387 | ||
22388 | ||
22389 | ||
22390 | ||
22391 | ||
22392 | ||
22393 | gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext" | |
22394 | ||
22395 | fi | |
22396 | ||
22397 | ||
22398 | ||
22399 | if test -n "$EXECINFO_H"; then | |
22400 | GL_GENERATE_EXECINFO_H_TRUE= | |
22401 | GL_GENERATE_EXECINFO_H_FALSE='#' | |
22402 | else | |
22403 | GL_GENERATE_EXECINFO_H_TRUE='#' | |
22404 | GL_GENERATE_EXECINFO_H_FALSE= | |
22405 | fi | |
22406 | ||
22407 | ||
22408 | ||
22409 | ||
22410 | ||
93131e11 GM |
22411 | |
22412 | ||
22413 | ||
7cd2ed2c | 22414 | |
710f5812 GM |
22415 | if test $ac_cv_func_faccessat = no; then |
22416 | HAVE_FACCESSAT=0 | |
22417 | fi | |
22418 | ||
22419 | if test $HAVE_FACCESSAT = 0; then | |
22420 | ||
22421 | ||
22422 | ||
22423 | ||
22424 | ||
22425 | ||
22426 | ||
22427 | ||
22428 | gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext" | |
22429 | ||
22430 | ||
22431 | for ac_func in access | |
22432 | do : | |
22433 | ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" | |
22434 | if test "x$ac_cv_func_access" = x""yes; then : | |
22435 | cat >>confdefs.h <<_ACEOF | |
22436 | #define HAVE_ACCESS 1 | |
22437 | _ACEOF | |
22438 | ||
22439 | fi | |
22440 | done | |
22441 | ||
22442 | ||
22443 | fi | |
22444 | ||
22445 | ||
22446 | cat >>confdefs.h <<_ACEOF | |
22447 | #define GNULIB_FACCESSAT 1 | |
22448 | _ACEOF | |
22449 | ||
22450 | ||
22451 | ||
22452 | ||
22453 | ||
22454 | ||
22455 | ||
22456 | GNULIB_FACCESSAT=1 | |
22457 | ||
22458 | ||
22459 | ||
22460 | ||
22461 | ||
22462 | ||
22463 | ||
22464 | ||
22465 | ||
22466 | ||
0cdca42a GM |
22467 | if test $ac_cv_func_fcntl = no; then |
22468 | ||
22469 | ||
22470 | ||
22471 | if test $ac_cv_func_fcntl = no; then | |
22472 | HAVE_FCNTL=0 | |
22473 | else | |
22474 | REPLACE_FCNTL=1 | |
22475 | fi | |
22476 | ||
22477 | else | |
22478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 | |
22479 | $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } | |
22480 | if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then : | |
22481 | $as_echo_n "(cached) " >&6 | |
22482 | else | |
22483 | if test "$cross_compiling" = yes; then : | |
22484 | # Guess that it works on glibc systems | |
22485 | case $host_os in #(( | |
22486 | *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; | |
22487 | *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; | |
22488 | esac | |
22489 | else | |
22490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22491 | /* end confdefs.h. */ | |
22492 | ||
22493 | #include <fcntl.h> | |
22494 | #include <errno.h> | |
22495 | ||
22496 | int | |
22497 | main () | |
22498 | { | |
22499 | int result = 0; | |
22500 | if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; | |
22501 | if (errno != EINVAL) result |= 2; | |
22502 | return result; | |
22503 | ||
22504 | ; | |
22505 | return 0; | |
22506 | } | |
22507 | _ACEOF | |
22508 | if ac_fn_c_try_run "$LINENO"; then : | |
22509 | gl_cv_func_fcntl_f_dupfd_works=yes | |
22510 | else | |
22511 | gl_cv_func_fcntl_f_dupfd_works=no | |
22512 | fi | |
22513 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22514 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22515 | fi | |
22516 | ||
22517 | fi | |
22518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 | |
22519 | $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } | |
22520 | case $gl_cv_func_fcntl_f_dupfd_works in | |
22521 | *yes) ;; | |
22522 | *) | |
22523 | ||
22524 | ||
22525 | if test $ac_cv_func_fcntl = no; then | |
22526 | HAVE_FCNTL=0 | |
22527 | else | |
22528 | REPLACE_FCNTL=1 | |
22529 | fi | |
22530 | ||
22531 | ||
22532 | $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h | |
22533 | ;; | |
22534 | esac | |
22535 | ||
22536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 | |
22537 | $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } | |
22538 | if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then : | |
22539 | $as_echo_n "(cached) " >&6 | |
22540 | else | |
22541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22542 | /* end confdefs.h. */ | |
22543 | ||
22544 | #include <fcntl.h> | |
22545 | #ifndef F_DUPFD_CLOEXEC | |
22546 | choke me | |
22547 | #endif | |
22548 | ||
22549 | int | |
22550 | main () | |
22551 | { | |
22552 | ||
22553 | ; | |
22554 | return 0; | |
22555 | } | |
22556 | _ACEOF | |
22557 | if ac_fn_c_try_compile "$LINENO"; then : | |
22558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22559 | /* end confdefs.h. */ | |
22560 | ||
22561 | #ifdef __linux__ | |
22562 | /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace | |
22563 | it to support the semantics on older kernels that failed with EINVAL. */ | |
22564 | choke me | |
22565 | #endif | |
22566 | ||
22567 | int | |
22568 | main () | |
22569 | { | |
22570 | ||
22571 | ; | |
22572 | return 0; | |
22573 | } | |
22574 | _ACEOF | |
22575 | if ac_fn_c_try_compile "$LINENO"; then : | |
22576 | gl_cv_func_fcntl_f_dupfd_cloexec=yes | |
22577 | else | |
22578 | gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" | |
22579 | fi | |
22580 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22581 | else | |
22582 | gl_cv_func_fcntl_f_dupfd_cloexec=no | |
22583 | fi | |
22584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
22585 | fi | |
22586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 | |
22587 | $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } | |
22588 | if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then | |
22589 | ||
22590 | ||
22591 | ||
22592 | if test $ac_cv_func_fcntl = no; then | |
22593 | HAVE_FCNTL=0 | |
22594 | else | |
22595 | REPLACE_FCNTL=1 | |
22596 | fi | |
22597 | ||
22598 | fi | |
22599 | fi | |
22600 | ||
22601 | ||
22602 | if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then | |
22603 | ||
22604 | ||
22605 | ||
22606 | ||
22607 | ||
22608 | ||
22609 | ||
22610 | ||
22611 | gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" | |
22612 | ||
22613 | fi | |
22614 | ||
22615 | ||
22616 | ||
22617 | ||
22618 | ||
22619 | GNULIB_FCNTL=1 | |
22620 | ||
22621 | ||
22622 | ||
22623 | ||
22624 | ||
22625 | ||
22626 | ||
22627 | ||
22628 | ||
22629 | ||
710f5812 GM |
22630 | |
22631 | ||
22632 | ||
22633 | ||
22634 | ||
22635 | ||
22636 | if test $gl_cv_have_include_next = yes; then | |
22637 | gl_cv_next_fcntl_h='<'fcntl.h'>' | |
22638 | else | |
22639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 | |
22640 | $as_echo_n "checking absolute name of <fcntl.h>... " >&6; } | |
22641 | if test "${gl_cv_next_fcntl_h+set}" = set; then : | |
22642 | $as_echo_n "(cached) " >&6 | |
22643 | else | |
22644 | ||
22645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22646 | /* end confdefs.h. */ | |
22647 | #include <fcntl.h> | |
22648 | ||
22649 | _ACEOF | |
22650 | case "$host_os" in | |
22651 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
22652 | *) gl_absname_cpp="$ac_cpp" ;; | |
22653 | esac | |
22654 | ||
22655 | case "$host_os" in | |
22656 | mingw*) | |
22657 | gl_dirsep_regex='[/\\]' | |
22658 | ;; | |
22659 | *) | |
22660 | gl_dirsep_regex='\/' | |
22661 | ;; | |
22662 | esac | |
22663 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
22664 | ||
22665 | gl_header_literal_regex=`echo 'fcntl.h' \ | |
22666 | | sed -e "$gl_make_literal_regex_sed"` | |
22667 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
22668 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
22669 | s|^/[^/]|//&| | |
22670 | p | |
22671 | q | |
22672 | }' | |
22673 | gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
22674 | sed -n "$gl_absolute_header_sed"`'"' | |
22675 | ||
22676 | ||
22677 | fi | |
22678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 | |
22679 | $as_echo "$gl_cv_next_fcntl_h" >&6; } | |
22680 | fi | |
22681 | NEXT_FCNTL_H=$gl_cv_next_fcntl_h | |
22682 | ||
22683 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
22684 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
22685 | gl_next_as_first_directive='<'fcntl.h'>' | |
22686 | else | |
22687 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
22688 | gl_next_as_first_directive=$gl_cv_next_fcntl_h | |
22689 | fi | |
22690 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive | |
22691 | ||
22692 | ||
22693 | ||
22694 | ||
22695 | ||
22696 | ||
22697 | ||
22698 | ||
22699 | ||
22700 | ||
22701 | ||
22702 | ||
22703 | ||
22704 | ||
22705 | ||
2407788f GM |
22706 | LIB_FDATASYNC= |
22707 | ||
22708 | ||
22709 | if test $ac_cv_have_decl_fdatasync = no; then | |
22710 | HAVE_DECL_FDATASYNC=0 | |
22711 | for ac_func in fdatasync | |
22712 | do : | |
22713 | ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" | |
22714 | if test "x$ac_cv_func_fdatasync" = x""yes; then : | |
22715 | cat >>confdefs.h <<_ACEOF | |
22716 | #define HAVE_FDATASYNC 1 | |
22717 | _ACEOF | |
22718 | ||
22719 | fi | |
22720 | done | |
22721 | ||
22722 | if test $ac_cv_func_fdatasync = no; then | |
22723 | HAVE_FDATASYNC=0 | |
22724 | fi | |
22725 | else | |
22726 | gl_saved_libs=$LIBS | |
22727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 | |
22728 | $as_echo_n "checking for library containing fdatasync... " >&6; } | |
22729 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
22730 | $as_echo_n "(cached) " >&6 | |
22731 | else | |
22732 | ac_func_search_save_LIBS=$LIBS | |
22733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22734 | /* end confdefs.h. */ | |
22735 | ||
22736 | /* Override any GCC internal prototype to avoid an error. | |
22737 | Use char because int might match the return type of a GCC | |
22738 | builtin and then its argument prototype would still apply. */ | |
22739 | #ifdef __cplusplus | |
22740 | extern "C" | |
22741 | #endif | |
22742 | char fdatasync (); | |
22743 | int | |
22744 | main () | |
22745 | { | |
22746 | return fdatasync (); | |
22747 | ; | |
22748 | return 0; | |
22749 | } | |
22750 | _ACEOF | |
22751 | for ac_lib in '' rt posix4; do | |
22752 | if test -z "$ac_lib"; then | |
22753 | ac_res="none required" | |
22754 | else | |
22755 | ac_res=-l$ac_lib | |
22756 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
22757 | fi | |
22758 | if ac_fn_c_try_link "$LINENO"; then : | |
22759 | ac_cv_search_fdatasync=$ac_res | |
22760 | fi | |
22761 | rm -f core conftest.err conftest.$ac_objext \ | |
22762 | conftest$ac_exeext | |
22763 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
22764 | break | |
22765 | fi | |
22766 | done | |
22767 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
22768 | ||
22769 | else | |
22770 | ac_cv_search_fdatasync=no | |
22771 | fi | |
22772 | rm conftest.$ac_ext | |
22773 | LIBS=$ac_func_search_save_LIBS | |
22774 | fi | |
22775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 | |
22776 | $as_echo "$ac_cv_search_fdatasync" >&6; } | |
22777 | ac_res=$ac_cv_search_fdatasync | |
22778 | if test "$ac_res" != no; then : | |
22779 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
22780 | test "$ac_cv_search_fdatasync" = "none required" || | |
22781 | LIB_FDATASYNC=$ac_cv_search_fdatasync | |
22782 | fi | |
22783 | ||
22784 | LIBS=$gl_saved_libs | |
22785 | fi | |
22786 | ||
22787 | if test $HAVE_FDATASYNC = 0; then | |
22788 | ||
22789 | ||
22790 | ||
22791 | ||
22792 | ||
22793 | ||
22794 | ||
22795 | ||
22796 | gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext" | |
22797 | ||
22798 | fi | |
22799 | ||
22800 | ||
22801 | ||
22802 | ||
22803 | ||
22804 | GNULIB_FDATASYNC=1 | |
22805 | ||
22806 | ||
22807 | ||
22808 | ||
22809 | ||
22810 | ||
22811 | ||
22812 | ||
22813 | ||
710f5812 | 22814 | |
d7ad186c GM |
22815 | ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " |
22816 | #include <dirent.h> | |
22817 | ||
22818 | " | |
22819 | if test "x$ac_cv_have_decl_fdopendir" = x""yes; then : | |
22820 | ac_have_decl=1 | |
22821 | else | |
22822 | ac_have_decl=0 | |
22823 | fi | |
22824 | ||
22825 | cat >>confdefs.h <<_ACEOF | |
22826 | #define HAVE_DECL_FDOPENDIR $ac_have_decl | |
22827 | _ACEOF | |
22828 | if test $ac_have_decl = 1; then : | |
22829 | ||
22830 | else | |
22831 | HAVE_DECL_FDOPENDIR=0 | |
22832 | fi | |
22833 | ||
22834 | ||
22835 | if test $ac_cv_func_fdopendir = no; then | |
22836 | HAVE_FDOPENDIR=0 | |
22837 | else | |
22838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 | |
22839 | $as_echo_n "checking whether fdopendir works... " >&6; } | |
22840 | if test "${gl_cv_func_fdopendir_works+set}" = set; then : | |
22841 | $as_echo_n "(cached) " >&6 | |
22842 | else | |
22843 | if test "$cross_compiling" = yes; then : | |
22844 | case "$host_os" in | |
22845 | # Guess yes on glibc systems. | |
22846 | *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
22847 | # If we don't know, assume the worst. | |
22848 | *) gl_cv_func_fdopendir_works="guessing no" ;; | |
22849 | esac | |
22850 | ||
22851 | else | |
22852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22853 | /* end confdefs.h. */ | |
22854 | ||
22855 | #include <dirent.h> | |
22856 | #include <fcntl.h> | |
22857 | #include <unistd.h> | |
22858 | #if !HAVE_DECL_FDOPENDIR | |
22859 | extern | |
22860 | # ifdef __cplusplus | |
22861 | "C" | |
22862 | # endif | |
22863 | DIR *fdopendir (int); | |
22864 | #endif | |
22865 | ||
22866 | int | |
22867 | main () | |
22868 | { | |
22869 | int result = 0; | |
22870 | int fd = open ("conftest.c", O_RDONLY); | |
22871 | if (fd < 0) result |= 1; | |
22872 | if (fdopendir (fd)) result |= 2; | |
22873 | if (close (fd)) result |= 4; | |
22874 | return result; | |
22875 | ; | |
22876 | return 0; | |
22877 | } | |
22878 | _ACEOF | |
22879 | if ac_fn_c_try_run "$LINENO"; then : | |
22880 | gl_cv_func_fdopendir_works=yes | |
22881 | else | |
22882 | gl_cv_func_fdopendir_works=no | |
22883 | fi | |
22884 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22885 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22886 | fi | |
22887 | ||
22888 | fi | |
22889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 | |
22890 | $as_echo "$gl_cv_func_fdopendir_works" >&6; } | |
22891 | case "$gl_cv_func_fdopendir_works" in | |
22892 | *yes) ;; | |
22893 | *) | |
22894 | REPLACE_FDOPENDIR=1 | |
22895 | ;; | |
22896 | esac | |
22897 | fi | |
22898 | ||
22899 | if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then | |
22900 | ||
22901 | ||
22902 | ||
22903 | ||
22904 | ||
22905 | ||
22906 | ||
22907 | ||
22908 | gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" | |
22909 | ||
22910 | fi | |
22911 | ||
22912 | ||
22913 | ||
22914 | ||
22915 | ||
22916 | GNULIB_FDOPENDIR=1 | |
22917 | ||
22918 | ||
22919 | ||
22920 | ||
22921 | ||
22922 | ||
22923 | ||
22924 | cat >>confdefs.h <<_ACEOF | |
22925 | #define GNULIB_FDOPENDIR 1 | |
22926 | _ACEOF | |
22927 | ||
22928 | ||
22929 | ||
22930 | ||
22931 | ||
22932 | ||
22933 | ||
710f5812 | 22934 | |
3bf26e96 GM |
22935 | |
22936 | fp_headers=' | |
22937 | # include <stdio.h> | |
22938 | # if HAVE_STDIO_EXT_H | |
22939 | # include <stdio_ext.h> | |
22940 | # endif | |
22941 | ' | |
22942 | ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers | |
22943 | " | |
22944 | if test "x$ac_cv_have_decl___fpending" = x""yes; then : | |
22945 | ac_have_decl=1 | |
22946 | else | |
22947 | ac_have_decl=0 | |
22948 | fi | |
22949 | ||
22950 | cat >>confdefs.h <<_ACEOF | |
22951 | #define HAVE_DECL___FPENDING $ac_have_decl | |
22952 | _ACEOF | |
22953 | ||
22954 | ||
22955 | if test $ac_cv_func___fpending = no; then | |
22956 | ||
22957 | ||
22958 | ||
22959 | ||
22960 | ||
22961 | ||
22962 | ||
22963 | ||
22964 | gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" | |
22965 | ||
22966 | ||
22967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 | |
22968 | $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } | |
22969 | if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then : | |
22970 | $as_echo_n "(cached) " >&6 | |
22971 | else | |
22972 | ||
22973 | for ac_expr in \ | |
22974 | \ | |
22975 | '# glibc2' \ | |
22976 | 'fp->_IO_write_ptr - fp->_IO_write_base' \ | |
22977 | \ | |
22978 | '# traditional Unix' \ | |
22979 | 'fp->_ptr - fp->_base' \ | |
22980 | \ | |
22981 | '# BSD' \ | |
22982 | 'fp->_p - fp->_bf._base' \ | |
22983 | \ | |
22984 | '# SCO, Unixware' \ | |
22985 | '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ | |
22986 | \ | |
22987 | '# QNX' \ | |
22988 | '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ | |
22989 | \ | |
22990 | '# old glibc?' \ | |
22991 | 'fp->__bufp - fp->__buffer' \ | |
22992 | \ | |
22993 | '# old glibc iostream?' \ | |
22994 | 'fp->_pptr - fp->_pbase' \ | |
22995 | \ | |
22996 | '# emx+gcc' \ | |
22997 | 'fp->_ptr - fp->_buffer' \ | |
22998 | \ | |
22999 | '# Minix' \ | |
23000 | 'fp->_ptr - fp->_buf' \ | |
23001 | \ | |
23002 | '# Plan9' \ | |
23003 | 'fp->wp - fp->buf' \ | |
23004 | \ | |
23005 | '# VMS' \ | |
23006 | '(*fp)->_ptr - (*fp)->_base' \ | |
23007 | \ | |
23008 | '# e.g., DGUX R4.11; the info is not available' \ | |
23009 | 1 \ | |
23010 | ; do | |
23011 | ||
23012 | # Skip each embedded comment. | |
23013 | case "$ac_expr" in '#'*) continue;; esac | |
23014 | ||
23015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23016 | /* end confdefs.h. */ | |
23017 | #include <stdio.h> | |
23018 | int | |
23019 | main () | |
23020 | { | |
23021 | FILE *fp = stdin; (void) ($ac_expr); | |
23022 | ; | |
23023 | return 0; | |
23024 | } | |
23025 | _ACEOF | |
23026 | if ac_fn_c_try_compile "$LINENO"; then : | |
23027 | fp_done=yes | |
23028 | ||
23029 | fi | |
23030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
23031 | test "$fp_done" = yes && break | |
23032 | done | |
23033 | ||
23034 | ac_cv_sys_pending_output_n_bytes=$ac_expr | |
23035 | ||
23036 | ||
23037 | fi | |
23038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 | |
23039 | $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } | |
23040 | ||
23041 | cat >>confdefs.h <<_ACEOF | |
23042 | #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes | |
23043 | _ACEOF | |
23044 | ||
23045 | ||
23046 | fi | |
23047 | ||
23048 | ||
d7ad186c GM |
23049 | |
23050 | ||
23051 | ||
23052 | ||
23053 | if test $ac_cv_func_fstatat = no; then | |
23054 | HAVE_FSTATAT=0 | |
23055 | else | |
23056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 | |
23057 | $as_echo_n "checking whether fstatat (..., 0) works... " >&6; } | |
23058 | if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then : | |
23059 | $as_echo_n "(cached) " >&6 | |
23060 | else | |
23061 | if test "$cross_compiling" = yes; then : | |
23062 | case "$host_os" in | |
23063 | aix*) gl_cv_func_fstatat_zero_flag="guessing no";; | |
23064 | *) gl_cv_func_fstatat_zero_flag="guessing yes";; | |
23065 | esac | |
23066 | ||
23067 | else | |
23068 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23069 | /* end confdefs.h. */ | |
23070 | ||
23071 | #include <fcntl.h> | |
23072 | #include <sys/stat.h> | |
23073 | int | |
23074 | main (void) | |
23075 | { | |
23076 | struct stat a; | |
23077 | return fstatat (AT_FDCWD, ".", &a, 0) != 0; | |
23078 | } | |
23079 | ||
23080 | _ACEOF | |
23081 | if ac_fn_c_try_run "$LINENO"; then : | |
23082 | gl_cv_func_fstatat_zero_flag=yes | |
23083 | else | |
23084 | gl_cv_func_fstatat_zero_flag=no | |
23085 | fi | |
23086 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23087 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23088 | fi | |
23089 | ||
23090 | ||
23091 | fi | |
23092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 | |
23093 | $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } | |
23094 | ||
23095 | case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in | |
23096 | *yes+*yes) ;; | |
23097 | *) REPLACE_FSTATAT=1 | |
23098 | case $gl_cv_func_fstatat_zero_flag in | |
23099 | *yes) | |
23100 | ||
23101 | $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h | |
23102 | ||
23103 | ;; | |
23104 | esac | |
23105 | ;; | |
23106 | esac | |
23107 | fi | |
23108 | ||
23109 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
23110 | ||
23111 | ||
23112 | ||
23113 | ||
23114 | ||
23115 | ||
23116 | ||
23117 | ||
23118 | gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" | |
23119 | ||
23120 | fi | |
23121 | ||
23122 | ||
23123 | ||
23124 | ||
23125 | ||
23126 | GNULIB_FSTATAT=1 | |
23127 | ||
23128 | ||
23129 | ||
23130 | ||
23131 | ||
23132 | ||
23133 | ||
2407788f GM |
23134 | |
23135 | if test $ac_cv_func_fsync = no; then | |
23136 | HAVE_FSYNC=0 | |
23137 | fi | |
23138 | ||
23139 | if test $HAVE_FSYNC = 0; then | |
23140 | ||
23141 | ||
23142 | ||
23143 | ||
23144 | ||
23145 | ||
23146 | ||
23147 | ||
23148 | gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext" | |
23149 | ||
23150 | : | |
23151 | fi | |
23152 | ||
23153 | ||
23154 | ||
23155 | ||
23156 | ||
23157 | GNULIB_FSYNC=1 | |
23158 | ||
23159 | ||
23160 | ||
23161 | ||
23162 | ||
23163 | ||
23164 | ||
5476a9a4 GM |
23165 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
23166 | ||
23167 | ||
23168 | gl_save_LIBS=$LIBS | |
23169 | ||
23170 | # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, | |
23171 | # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. | |
23172 | HAVE_GETLOADAVG=1 | |
23173 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
23174 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
23175 | ||
23176 | else | |
23177 | gl_func_getloadavg_done=no | |
23178 | ||
23179 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
23180 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
23181 | # to get the right answer into the cache. | |
23182 | # For kstat on solaris, we need to test for libelf and libkvm to force the | |
23183 | # definition of SVR4 below. | |
23184 | if test $gl_func_getloadavg_done = no; then | |
23185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
23186 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
23187 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
6ad6792b GM |
23188 | $as_echo_n "(cached) " >&6 |
23189 | else | |
3e0be4ab | 23190 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 23191 | LIBS="-lelf $LIBS" |
3e0be4ab | 23192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ad6792b | 23193 | /* end confdefs.h. */ |
6ad6792b | 23194 | |
3e0be4ab GM |
23195 | /* Override any GCC internal prototype to avoid an error. |
23196 | Use char because int might match the return type of a GCC | |
23197 | builtin and then its argument prototype would still apply. */ | |
23198 | #ifdef __cplusplus | |
23199 | extern "C" | |
23200 | #endif | |
5476a9a4 | 23201 | char elf_begin (); |
6ad6792b GM |
23202 | int |
23203 | main () | |
23204 | { | |
5476a9a4 | 23205 | return elf_begin (); |
6ad6792b GM |
23206 | ; |
23207 | return 0; | |
23208 | } | |
23209 | _ACEOF | |
3e0be4ab | 23210 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 23211 | ac_cv_lib_elf_elf_begin=yes |
3e0be4ab | 23212 | else |
5476a9a4 | 23213 | ac_cv_lib_elf_elf_begin=no |
6ad6792b | 23214 | fi |
3e0be4ab GM |
23215 | rm -f core conftest.err conftest.$ac_objext \ |
23216 | conftest$ac_exeext conftest.$ac_ext | |
23217 | LIBS=$ac_check_lib_save_LIBS | |
6ad6792b | 23218 | fi |
5476a9a4 GM |
23219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 |
23220 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
23221 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
23222 | LIBS="-lelf $LIBS" | |
6ad6792b GM |
23223 | fi |
23224 | ||
5476a9a4 GM |
23225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 |
23226 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
23227 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
6c051bab GM |
23228 | $as_echo_n "(cached) " >&6 |
23229 | else | |
5476a9a4 GM |
23230 | ac_check_lib_save_LIBS=$LIBS |
23231 | LIBS="-lkvm $LIBS" | |
23232 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6c051bab | 23233 | /* end confdefs.h. */ |
3e0be4ab | 23234 | |
5476a9a4 GM |
23235 | /* Override any GCC internal prototype to avoid an error. |
23236 | Use char because int might match the return type of a GCC | |
23237 | builtin and then its argument prototype would still apply. */ | |
23238 | #ifdef __cplusplus | |
23239 | extern "C" | |
23240 | #endif | |
23241 | char kvm_open (); | |
6c051bab GM |
23242 | int |
23243 | main () | |
23244 | { | |
5476a9a4 | 23245 | return kvm_open (); |
6c051bab GM |
23246 | ; |
23247 | return 0; | |
23248 | } | |
23249 | _ACEOF | |
3e0be4ab | 23250 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 23251 | ac_cv_lib_kvm_kvm_open=yes |
6c051bab | 23252 | else |
5476a9a4 | 23253 | ac_cv_lib_kvm_kvm_open=no |
6c051bab | 23254 | fi |
3e0be4ab GM |
23255 | rm -f core conftest.err conftest.$ac_objext \ |
23256 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 23257 | LIBS=$ac_check_lib_save_LIBS |
6c051bab | 23258 | fi |
5476a9a4 GM |
23259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
23260 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
23261 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
23262 | LIBS="-lkvm $LIBS" | |
3e0be4ab | 23263 | fi |
6c051bab | 23264 | |
5476a9a4 GM |
23265 | # Check for the 4.4BSD definition of getloadavg. |
23266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
23267 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
23268 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
ae0d7250 PE |
23269 | $as_echo_n "(cached) " >&6 |
23270 | else | |
5476a9a4 GM |
23271 | ac_check_lib_save_LIBS=$LIBS |
23272 | LIBS="-lutil $LIBS" | |
23273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6d153f56 | 23274 | /* end confdefs.h. */ |
5476a9a4 GM |
23275 | |
23276 | /* Override any GCC internal prototype to avoid an error. | |
23277 | Use char because int might match the return type of a GCC | |
23278 | builtin and then its argument prototype would still apply. */ | |
23279 | #ifdef __cplusplus | |
23280 | extern "C" | |
23281 | #endif | |
23282 | char getloadavg (); | |
ae0d7250 PE |
23283 | int |
23284 | main () | |
23285 | { | |
5476a9a4 | 23286 | return getloadavg (); |
ae0d7250 PE |
23287 | ; |
23288 | return 0; | |
23289 | } | |
23290 | _ACEOF | |
3e0be4ab | 23291 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 23292 | ac_cv_lib_util_getloadavg=yes |
ae0d7250 | 23293 | else |
5476a9a4 | 23294 | ac_cv_lib_util_getloadavg=no |
ae0d7250 | 23295 | fi |
3e0be4ab GM |
23296 | rm -f core conftest.err conftest.$ac_objext \ |
23297 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
23298 | LIBS=$ac_check_lib_save_LIBS |
23299 | fi | |
23300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
23301 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
23302 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
23303 | LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes | |
3e0be4ab | 23304 | fi |
6d153f56 | 23305 | |
5476a9a4 | 23306 | fi |
6d153f56 | 23307 | |
5476a9a4 GM |
23308 | if test $gl_func_getloadavg_done = no; then |
23309 | # There is a commonly available library for RS/6000 AIX. | |
23310 | # Since it is not a standard part of AIX, it might be installed locally. | |
23311 | gl_getloadavg_LIBS=$LIBS | |
23312 | LIBS="-L/usr/local/lib $LIBS" | |
23313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
23314 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
23315 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
f199cab1 | 23316 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 23317 | else |
f199cab1 | 23318 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 23319 | LIBS="-lgetloadavg $LIBS" |
f199cab1 GM |
23320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23321 | /* end confdefs.h. */ | |
3e0be4ab | 23322 | |
f199cab1 GM |
23323 | /* Override any GCC internal prototype to avoid an error. |
23324 | Use char because int might match the return type of a GCC | |
23325 | builtin and then its argument prototype would still apply. */ | |
23326 | #ifdef __cplusplus | |
23327 | extern "C" | |
23328 | #endif | |
5476a9a4 | 23329 | char getloadavg (); |
f199cab1 GM |
23330 | int |
23331 | main () | |
23332 | { | |
5476a9a4 | 23333 | return getloadavg (); |
f199cab1 GM |
23334 | ; |
23335 | return 0; | |
23336 | } | |
ae0d7250 | 23337 | _ACEOF |
f199cab1 | 23338 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 23339 | ac_cv_lib_getloadavg_getloadavg=yes |
f199cab1 | 23340 | else |
5476a9a4 | 23341 | ac_cv_lib_getloadavg_getloadavg=no |
ae0d7250 | 23342 | fi |
f199cab1 GM |
23343 | rm -f core conftest.err conftest.$ac_objext \ |
23344 | conftest$ac_exeext conftest.$ac_ext | |
23345 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 23346 | fi |
5476a9a4 GM |
23347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
23348 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
23349 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
23350 | LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes | |
23351 | else | |
23352 | LIBS=$gl_getloadavg_LIBS | |
6d153f56 | 23353 | fi |
ae0d7250 | 23354 | |
5476a9a4 | 23355 | fi |
16c3e636 | 23356 | |
5476a9a4 GM |
23357 | # Set up the replacement function if necessary. |
23358 | if test $gl_func_getloadavg_done = no; then | |
23359 | HAVE_GETLOADAVG=0 | |
16c3e636 | 23360 | |
5476a9a4 GM |
23361 | # Solaris has libkstat which does not require root. |
23362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
23363 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
23364 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
f199cab1 GM |
23365 | $as_echo_n "(cached) " >&6 |
23366 | else | |
23367 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 23368 | LIBS="-lkstat $LIBS" |
f199cab1 GM |
23369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23370 | /* end confdefs.h. */ | |
5f90be1b | 23371 | |
f199cab1 GM |
23372 | /* Override any GCC internal prototype to avoid an error. |
23373 | Use char because int might match the return type of a GCC | |
23374 | builtin and then its argument prototype would still apply. */ | |
23375 | #ifdef __cplusplus | |
23376 | extern "C" | |
23377 | #endif | |
5476a9a4 | 23378 | char kstat_open (); |
f199cab1 GM |
23379 | int |
23380 | main () | |
23381 | { | |
5476a9a4 | 23382 | return kstat_open (); |
f199cab1 GM |
23383 | ; |
23384 | return 0; | |
23385 | } | |
3e0be4ab | 23386 | _ACEOF |
f199cab1 | 23387 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 23388 | ac_cv_lib_kstat_kstat_open=yes |
f199cab1 | 23389 | else |
5476a9a4 | 23390 | ac_cv_lib_kstat_kstat_open=no |
5f90be1b | 23391 | fi |
f199cab1 GM |
23392 | rm -f core conftest.err conftest.$ac_objext \ |
23393 | conftest$ac_exeext conftest.$ac_ext | |
23394 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 23395 | fi |
5476a9a4 GM |
23396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
23397 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
23398 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
3e0be4ab | 23399 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 23400 | #define HAVE_LIBKSTAT 1 |
3e0be4ab | 23401 | _ACEOF |
5f90be1b | 23402 | |
5476a9a4 | 23403 | LIBS="-lkstat $LIBS" |
5f90be1b | 23404 | |
f199cab1 | 23405 | fi |
5f90be1b | 23406 | |
5476a9a4 | 23407 | test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes |
da6c8463 | 23408 | |
5476a9a4 GM |
23409 | # AIX has libperfstat which does not require root |
23410 | if test $gl_func_getloadavg_done = no; then | |
23411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 | |
23412 | $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } | |
23413 | if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : | |
f199cab1 GM |
23414 | $as_echo_n "(cached) " >&6 |
23415 | else | |
5476a9a4 GM |
23416 | ac_check_lib_save_LIBS=$LIBS |
23417 | LIBS="-lperfstat $LIBS" | |
23418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 23419 | /* end confdefs.h. */ |
5476a9a4 GM |
23420 | |
23421 | /* Override any GCC internal prototype to avoid an error. | |
23422 | Use char because int might match the return type of a GCC | |
23423 | builtin and then its argument prototype would still apply. */ | |
23424 | #ifdef __cplusplus | |
23425 | extern "C" | |
23426 | #endif | |
23427 | char perfstat_cpu_total (); | |
5f90be1b PE |
23428 | int |
23429 | main () | |
23430 | { | |
5476a9a4 | 23431 | return perfstat_cpu_total (); |
5f90be1b PE |
23432 | ; |
23433 | return 0; | |
23434 | } | |
23435 | _ACEOF | |
5476a9a4 GM |
23436 | if ac_fn_c_try_link "$LINENO"; then : |
23437 | ac_cv_lib_perfstat_perfstat_cpu_total=yes | |
f199cab1 | 23438 | else |
5476a9a4 | 23439 | ac_cv_lib_perfstat_perfstat_cpu_total=no |
f199cab1 | 23440 | fi |
5476a9a4 GM |
23441 | rm -f core conftest.err conftest.$ac_objext \ |
23442 | conftest$ac_exeext conftest.$ac_ext | |
23443 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 23444 | fi |
5476a9a4 GM |
23445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 |
23446 | $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } | |
23447 | if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : | |
23448 | cat >>confdefs.h <<_ACEOF | |
23449 | #define HAVE_LIBPERFSTAT 1 | |
23450 | _ACEOF | |
23451 | ||
23452 | LIBS="-lperfstat $LIBS" | |
23453 | ||
23454 | fi | |
23455 | ||
23456 | test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes | |
23457 | fi | |
23458 | ||
23459 | if test $gl_func_getloadavg_done = no; then | |
23460 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
23461 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
23462 | gl_func_getloadavg_done=yes | |
23463 | ||
23464 | $as_echo "#define DGUX 1" >>confdefs.h | |
23465 | ||
23466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
23467 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
23468 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
f199cab1 GM |
23469 | $as_echo_n "(cached) " >&6 |
23470 | else | |
23471 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 23472 | LIBS="-ldgc $LIBS" |
f199cab1 GM |
23473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23474 | /* end confdefs.h. */ | |
3e0be4ab | 23475 | |
f199cab1 GM |
23476 | /* Override any GCC internal prototype to avoid an error. |
23477 | Use char because int might match the return type of a GCC | |
23478 | builtin and then its argument prototype would still apply. */ | |
23479 | #ifdef __cplusplus | |
23480 | extern "C" | |
23481 | #endif | |
5476a9a4 | 23482 | char dg_sys_info (); |
f199cab1 GM |
23483 | int |
23484 | main () | |
23485 | { | |
5476a9a4 | 23486 | return dg_sys_info (); |
f199cab1 GM |
23487 | ; |
23488 | return 0; | |
23489 | } | |
23490 | _ACEOF | |
23491 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 23492 | ac_cv_lib_dgc_dg_sys_info=yes |
f199cab1 | 23493 | else |
5476a9a4 | 23494 | ac_cv_lib_dgc_dg_sys_info=no |
5f90be1b | 23495 | fi |
3e0be4ab GM |
23496 | rm -f core conftest.err conftest.$ac_objext \ |
23497 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 23498 | LIBS=$ac_check_lib_save_LIBS |
5f90be1b | 23499 | fi |
5476a9a4 GM |
23500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
23501 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
23502 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
23503 | cat >>confdefs.h <<_ACEOF | |
23504 | #define HAVE_LIBDGC 1 | |
23505 | _ACEOF | |
23506 | ||
23507 | LIBS="-ldgc $LIBS" | |
23508 | ||
da6c8463 GM |
23509 | fi |
23510 | ||
5476a9a4 GM |
23511 | fi |
23512 | ||
23513 | ||
23514 | fi | |
23515 | fi | |
23516 | fi | |
23517 | ||
23518 | ||
23519 | if test "x$gl_save_LIBS" = x; then | |
23520 | GETLOADAVG_LIBS=$LIBS | |
f199cab1 | 23521 | else |
5476a9a4 GM |
23522 | GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` |
23523 | fi | |
23524 | LIBS=$gl_save_LIBS | |
23525 | ||
23526 | ||
23527 | # Test whether the system declares getloadavg. Solaris has the function | |
23528 | # but declares it in <sys/loadavg.h>, not <stdlib.h>. | |
23529 | for ac_header in sys/loadavg.h | |
23530 | do : | |
23531 | ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" | |
23532 | if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : | |
23533 | cat >>confdefs.h <<_ACEOF | |
23534 | #define HAVE_SYS_LOADAVG_H 1 | |
f199cab1 | 23535 | _ACEOF |
5476a9a4 | 23536 | |
f199cab1 | 23537 | fi |
5476a9a4 GM |
23538 | |
23539 | done | |
23540 | ||
23541 | if test $ac_cv_header_sys_loadavg_h = yes; then | |
23542 | HAVE_SYS_LOADAVG_H=1 | |
23543 | else | |
23544 | HAVE_SYS_LOADAVG_H=0 | |
f199cab1 | 23545 | fi |
5476a9a4 GM |
23546 | ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H |
23547 | # include <sys/loadavg.h> | |
23548 | #endif | |
23549 | #include <stdlib.h> | |
23550 | " | |
23551 | if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : | |
5f90be1b | 23552 | |
f199cab1 | 23553 | else |
5476a9a4 | 23554 | HAVE_DECL_GETLOADAVG=0 |
f199cab1 | 23555 | fi |
5f90be1b | 23556 | |
5f90be1b | 23557 | |
a6342fc8 | 23558 | if test $HAVE_GETLOADAVG = 0; then |
5476a9a4 GM |
23559 | |
23560 | ||
23561 | ||
23562 | ||
23563 | ||
23564 | ||
23565 | ||
23566 | ||
23567 | gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" | |
23568 | ||
23569 | ||
23570 | # Figure out what our getloadavg.c needs. | |
23571 | ||
23572 | ||
23573 | ||
23574 | # On HPUX9, an unprivileged user can get load averages this way. | |
23575 | if test $gl_func_getloadavg_done = no; then | |
23576 | for ac_func in pstat_getdynamic | |
23577 | do : | |
23578 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
23579 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
23580 | cat >>confdefs.h <<_ACEOF | |
23581 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
23582 | _ACEOF | |
23583 | gl_func_getloadavg_done=yes | |
3e0be4ab | 23584 | fi |
5476a9a4 | 23585 | done |
6ad6792b | 23586 | |
5476a9a4 | 23587 | fi |
6ad6792b | 23588 | |
5476a9a4 GM |
23589 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
23590 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
23591 | # Irix 4.0.5F has the header but not the library. | |
23592 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | |
23593 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
23594 | gl_func_getloadavg_done=yes | |
6ad6792b | 23595 | |
5476a9a4 | 23596 | $as_echo "#define SVR4 1" >>confdefs.h |
6ad6792b | 23597 | |
5476a9a4 GM |
23598 | fi |
23599 | ||
23600 | if test $gl_func_getloadavg_done = no; then | |
23601 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
23602 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
23603 | gl_func_getloadavg_done=yes | |
23604 | ||
23605 | $as_echo "#define UMAX 1" >>confdefs.h | |
23606 | ||
23607 | ||
23608 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
23609 | ||
23610 | fi | |
23611 | ||
23612 | ||
23613 | fi | |
23614 | ||
23615 | if test $gl_func_getloadavg_done = no; then | |
23616 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
23617 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
23618 | gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
23619 | ||
23620 | fi | |
23621 | ||
23622 | ||
23623 | fi | |
23624 | ||
23625 | if test $gl_func_getloadavg_done = no; then | |
23626 | for ac_header in mach/mach.h | |
23627 | do : | |
23628 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
23629 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
23630 | cat >>confdefs.h <<_ACEOF | |
23631 | #define HAVE_MACH_MACH_H 1 | |
23632 | _ACEOF | |
23633 | ||
23634 | fi | |
23635 | ||
23636 | done | |
23637 | ||
23638 | fi | |
23639 | ||
23640 | for ac_header in nlist.h | |
23641 | do : | |
23642 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
23643 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
23644 | cat >>confdefs.h <<_ACEOF | |
23645 | #define HAVE_NLIST_H 1 | |
23646 | _ACEOF | |
23647 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
23648 | " | |
23649 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
23650 | ||
23651 | cat >>confdefs.h <<_ACEOF | |
23652 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
23653 | _ACEOF | |
6ad6792b | 23654 | |
0eb775a3 | 23655 | |
f199cab1 | 23656 | fi |
3e0be4ab | 23657 | |
5476a9a4 | 23658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 23659 | /* end confdefs.h. */ |
5476a9a4 | 23660 | #include <nlist.h> |
f199cab1 GM |
23661 | int |
23662 | main () | |
23663 | { | |
5476a9a4 GM |
23664 | struct nlist x; |
23665 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | |
23666 | x.n_un.n_name = ""; | |
23667 | #else | |
23668 | x.n_name = ""; | |
23669 | #endif | |
f199cab1 GM |
23670 | ; |
23671 | return 0; | |
23672 | } | |
23673 | _ACEOF | |
5476a9a4 | 23674 | if ac_fn_c_try_link "$LINENO"; then : |
6ad6792b | 23675 | |
5476a9a4 | 23676 | $as_echo "#define N_NAME_POINTER 1" >>confdefs.h |
6ad6792b GM |
23677 | |
23678 | fi | |
5476a9a4 GM |
23679 | rm -f core conftest.err conftest.$ac_objext \ |
23680 | conftest$ac_exeext conftest.$ac_ext | |
6ad6792b | 23681 | |
5476a9a4 | 23682 | fi |
6ad6792b | 23683 | |
5476a9a4 | 23684 | done |
6ad6792b | 23685 | |
a6342fc8 | 23686 | fi |
ca36e0ff | 23687 | |
ca36e0ff GM |
23688 | |
23689 | ||
1f5d53eb PE |
23690 | |
23691 | ||
5476a9a4 | 23692 | GNULIB_GETLOADAVG=1 |
1f5d53eb PE |
23693 | |
23694 | ||
23695 | ||
23696 | ||
23697 | ||
23698 | ||
23699 | ||
1f5d53eb | 23700 | |
1f5d53eb | 23701 | |
3e0be4ab | 23702 | |
a6342fc8 | 23703 | if test $REPLACE_GETOPT = 1; then |
3e0be4ab | 23704 | |
1f5d53eb PE |
23705 | |
23706 | ||
1f5d53eb | 23707 | |
1f5d53eb PE |
23708 | |
23709 | ||
23710 | ||
23711 | ||
5476a9a4 | 23712 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
0eb775a3 GM |
23713 | |
23714 | ||
1f5d53eb PE |
23715 | |
23716 | ||
16c3e636 | 23717 | |
5476a9a4 GM |
23718 | |
23719 | ||
23720 | ||
23721 | ||
23722 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
23723 | ||
23724 | ||
23725 | ||
23726 | ||
a6342fc8 GM |
23727 | GNULIB_GL_UNISTD_H_GETOPT=1 |
23728 | fi | |
16c3e636 PE |
23729 | |
23730 | ||
23731 | ||
4fda9c95 GM |
23732 | |
23733 | ||
23734 | ||
23735 | ||
5476a9a4 GM |
23736 | REPLACE_GETOPT=0 |
23737 | if test -n "$gl_replace_getopt"; then | |
23738 | REPLACE_GETOPT=1 | |
23739 | fi | |
23740 | ||
23741 | if test $REPLACE_GETOPT = 1; then | |
23742 | ||
23743 | GETOPT_H=getopt.h | |
23744 | ||
23745 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
23746 | ||
23747 | ||
23748 | ||
23749 | fi | |
23750 | ||
a6342fc8 | 23751 | if test $REPLACE_GETOPT = 1; then |
5476a9a4 GM |
23752 | |
23753 | ||
23754 | ||
23755 | ||
23756 | ||
23757 | ||
23758 | ||
23759 | ||
23760 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
23761 | ||
23762 | ||
23763 | ||
23764 | ||
23765 | ||
23766 | ||
23767 | ||
23768 | ||
23769 | ||
23770 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
4fda9c95 GM |
23771 | |
23772 | ||
23773 | ||
23774 | ||
a6342fc8 GM |
23775 | GNULIB_GL_UNISTD_H_GETOPT=1 |
23776 | fi | |
4fda9c95 GM |
23777 | |
23778 | ||
23779 | ||
23780 | ||
4fda9c95 | 23781 | |
4fda9c95 | 23782 | |
4fda9c95 | 23783 | |
5476a9a4 GM |
23784 | |
23785 | ||
23786 | ||
23787 | ||
23788 | ||
23789 | gl_gettimeofday_timezone=void | |
23790 | if test $ac_cv_func_gettimeofday != yes; then | |
23791 | HAVE_GETTIMEOFDAY=0 | |
f199cab1 | 23792 | else |
4fda9c95 GM |
23793 | |
23794 | ||
3e0be4ab | 23795 | |
5476a9a4 GM |
23796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 |
23797 | $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } | |
23798 | if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : | |
23799 | $as_echo_n "(cached) " >&6 | |
23800 | else | |
23801 | if test "$cross_compiling" = yes; then : | |
23802 | # When cross-compiling: | |
23803 | case "$host_os" in | |
23804 | # Guess all is fine on glibc systems. | |
23805 | *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
23806 | # If we don't know, assume the worst. | |
23807 | *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; | |
23808 | esac | |
4fda9c95 | 23809 | |
5476a9a4 GM |
23810 | else |
23811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23812 | /* end confdefs.h. */ | |
23813 | #include <string.h> | |
23814 | #include <sys/time.h> | |
23815 | #include <time.h> | |
23816 | #include <stdlib.h> | |
4fda9c95 | 23817 | |
5476a9a4 GM |
23818 | int |
23819 | main () | |
23820 | { | |
4fda9c95 | 23821 | |
5476a9a4 GM |
23822 | time_t t = 0; |
23823 | struct tm *lt; | |
23824 | struct tm saved_lt; | |
23825 | struct timeval tv; | |
23826 | lt = localtime (&t); | |
23827 | saved_lt = *lt; | |
23828 | gettimeofday (&tv, NULL); | |
23829 | return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; | |
cc322c06 | 23830 | |
5476a9a4 GM |
23831 | ; |
23832 | return 0; | |
23833 | } | |
23834 | _ACEOF | |
23835 | if ac_fn_c_try_run "$LINENO"; then : | |
23836 | gl_cv_func_gettimeofday_clobber=no | |
23837 | else | |
23838 | gl_cv_func_gettimeofday_clobber=yes | |
23839 | fi | |
23840 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23841 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23842 | fi | |
cc322c06 | 23843 | |
5476a9a4 GM |
23844 | fi |
23845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 | |
23846 | $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } | |
cc322c06 | 23847 | |
5476a9a4 GM |
23848 | case "$gl_cv_func_gettimeofday_clobber" in |
23849 | *yes) | |
23850 | REPLACE_GETTIMEOFDAY=1 | |
cc322c06 | 23851 | |
4fda9c95 | 23852 | |
5476a9a4 | 23853 | $as_echo "#define gmtime rpl_gmtime" >>confdefs.h |
4fda9c95 | 23854 | |
ae0d7250 | 23855 | |
5476a9a4 | 23856 | $as_echo "#define localtime rpl_localtime" >>confdefs.h |
ae0d7250 PE |
23857 | |
23858 | ||
ae0d7250 | 23859 | |
5476a9a4 GM |
23860 | $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h |
23861 | ||
23862 | ;; | |
23863 | esac | |
23864 | ||
23865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 | |
23866 | $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } | |
23867 | if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : | |
f199cab1 GM |
23868 | $as_echo_n "(cached) " >&6 |
23869 | else | |
5476a9a4 GM |
23870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23871 | /* end confdefs.h. */ | |
23872 | #include <sys/time.h> | |
23873 | struct timeval c; | |
23874 | int gettimeofday (struct timeval *restrict, void *restrict); | |
23875 | ||
23876 | int | |
23877 | main () | |
23878 | { | |
23879 | /* glibc uses struct timezone * rather than the POSIX void * | |
23880 | if _GNU_SOURCE is defined. However, since the only portable | |
23881 | use of gettimeofday uses NULL as the second parameter, and | |
23882 | since the glibc definition is actually more typesafe, it is | |
23883 | not worth wrapping this to get a compliant signature. */ | |
23884 | int (*f) (struct timeval *restrict, void *restrict) | |
23885 | = gettimeofday; | |
23886 | int x = f (&c, 0); | |
23887 | return !(x | c.tv_sec | c.tv_usec); | |
23888 | ||
23889 | ; | |
23890 | return 0; | |
23891 | } | |
23892 | _ACEOF | |
23893 | if ac_fn_c_try_compile "$LINENO"; then : | |
23894 | gl_cv_func_gettimeofday_posix_signature=yes | |
23895 | else | |
23896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 23897 | /* end confdefs.h. */ |
5476a9a4 GM |
23898 | #include <sys/time.h> |
23899 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | |
ae0d7250 | 23900 | |
f199cab1 GM |
23901 | int |
23902 | main () | |
23903 | { | |
5476a9a4 | 23904 | |
f199cab1 GM |
23905 | ; |
23906 | return 0; | |
ae0d7250 PE |
23907 | } |
23908 | _ACEOF | |
5476a9a4 GM |
23909 | if ac_fn_c_try_compile "$LINENO"; then : |
23910 | gl_cv_func_gettimeofday_posix_signature=almost | |
ae0d7250 | 23911 | else |
5476a9a4 | 23912 | gl_cv_func_gettimeofday_posix_signature=no |
ae0d7250 | 23913 | fi |
5476a9a4 | 23914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ae0d7250 | 23915 | fi |
5476a9a4 | 23916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
52724a05 | 23917 | fi |
5476a9a4 GM |
23918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 |
23919 | $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } | |
23920 | if test $gl_cv_func_gettimeofday_posix_signature = almost; then | |
23921 | gl_gettimeofday_timezone='struct timezone' | |
23922 | elif test $gl_cv_func_gettimeofday_posix_signature != yes; then | |
23923 | REPLACE_GETTIMEOFDAY=1 | |
23924 | fi | |
23925 | if test $REPLACE_STRUCT_TIMEVAL = 1; then | |
23926 | REPLACE_GETTIMEOFDAY=1 | |
23927 | fi | |
3e0be4ab | 23928 | |
5476a9a4 | 23929 | fi |
ae0d7250 | 23930 | |
5476a9a4 GM |
23931 | cat >>confdefs.h <<_ACEOF |
23932 | #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone | |
23933 | _ACEOF | |
f199cab1 | 23934 | |
ae0d7250 | 23935 | |
a6342fc8 | 23936 | if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then |
ae0d7250 | 23937 | |
cc322c06 GM |
23938 | |
23939 | ||
cc322c06 GM |
23940 | |
23941 | ||
ae0d7250 PE |
23942 | |
23943 | ||
23944 | ||
5476a9a4 | 23945 | gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" |
5fa4ac76 PE |
23946 | |
23947 | ||
5476a9a4 GM |
23948 | for ac_header in sys/timeb.h |
23949 | do : | |
23950 | ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" | |
23951 | if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : | |
23952 | cat >>confdefs.h <<_ACEOF | |
23953 | #define HAVE_SYS_TIMEB_H 1 | |
23954 | _ACEOF | |
5fa4ac76 | 23955 | |
3e0be4ab | 23956 | fi |
5fa4ac76 | 23957 | |
5476a9a4 | 23958 | done |
f199cab1 | 23959 | |
5476a9a4 GM |
23960 | for ac_func in _ftime |
23961 | do : | |
23962 | ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" | |
23963 | if test "x$ac_cv_func__ftime" = x""yes; then : | |
23964 | cat >>confdefs.h <<_ACEOF | |
23965 | #define HAVE__FTIME 1 | |
23966 | _ACEOF | |
5fa4ac76 | 23967 | |
5476a9a4 GM |
23968 | fi |
23969 | done | |
5fa4ac76 PE |
23970 | |
23971 | ||
a6342fc8 | 23972 | fi |
5fa4ac76 PE |
23973 | |
23974 | ||
23975 | ||
23976 | ||
23977 | ||
5476a9a4 | 23978 | GNULIB_GETTIMEOFDAY=1 |
5fa4ac76 PE |
23979 | |
23980 | ||
23981 | ||
23982 | ||
0eb775a3 GM |
23983 | |
23984 | ||
369e19fc PE |
23985 | |
23986 | ||
369e19fc PE |
23987 | |
23988 | ||
5476a9a4 GM |
23989 | if test $ac_cv_func_lstat = yes; then |
23990 | ||
23991 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
23992 | *no) | |
23993 | REPLACE_LSTAT=1 | |
23994 | ;; | |
23995 | esac | |
23996 | else | |
23997 | HAVE_LSTAT=0 | |
f199cab1 | 23998 | fi |
369e19fc | 23999 | |
a6342fc8 | 24000 | if test $REPLACE_LSTAT = 1; then |
369e19fc | 24001 | |
5fa4ac76 | 24002 | |
369e19fc | 24003 | |
369e19fc | 24004 | |
369e19fc | 24005 | |
369e19fc | 24006 | |
369e19fc | 24007 | |
369e19fc | 24008 | |
5476a9a4 | 24009 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" |
f199cab1 | 24010 | |
45d4966b | 24011 | : |
a6342fc8 | 24012 | fi |
369e19fc | 24013 | |
369e19fc | 24014 | |
369e19fc | 24015 | |
5fa4ac76 PE |
24016 | |
24017 | ||
5476a9a4 | 24018 | GNULIB_LSTAT=1 |
5fa4ac76 | 24019 | |
5fa4ac76 | 24020 | |
27505cf5 | 24021 | |
27505cf5 | 24022 | |
27505cf5 | 24023 | |
27505cf5 | 24024 | |
27505cf5 | 24025 | |
27505cf5 | 24026 | |
5fa4ac76 PE |
24027 | |
24028 | ||
283c7aed GM |
24029 | if test $ac_cv_have_decl_memrchr = no; then |
24030 | HAVE_DECL_MEMRCHR=0 | |
24031 | fi | |
24032 | ||
24033 | for ac_func in memrchr | |
24034 | do : | |
24035 | ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" | |
24036 | if test "x$ac_cv_func_memrchr" = x""yes; then : | |
24037 | cat >>confdefs.h <<_ACEOF | |
24038 | #define HAVE_MEMRCHR 1 | |
24039 | _ACEOF | |
24040 | ||
24041 | fi | |
24042 | done | |
24043 | ||
24044 | ||
24045 | if test $ac_cv_func_memrchr = no; then | |
24046 | ||
24047 | ||
24048 | ||
24049 | ||
24050 | ||
24051 | ||
24052 | ||
24053 | ||
24054 | gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" | |
24055 | ||
24056 | : | |
24057 | fi | |
24058 | ||
24059 | ||
24060 | ||
24061 | ||
24062 | ||
24063 | GNULIB_MEMRCHR=1 | |
24064 | ||
24065 | ||
24066 | ||
24067 | ||
24068 | ||
24069 | ||
24070 | ||
24071 | ||
24072 | ||
24073 | ||
5476a9a4 GM |
24074 | |
24075 | if test $APPLE_UNIVERSAL_BUILD = 1; then | |
24076 | # A universal build on Apple Mac OS X platforms. | |
24077 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
24078 | # But we need a configuration result that is valid in both modes. | |
24079 | gl_cv_func_working_mktime=no | |
24080 | fi | |
24081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
24082 | $as_echo_n "checking for working mktime... " >&6; } | |
24083 | if test "${gl_cv_func_working_mktime+set}" = set; then : | |
f199cab1 GM |
24084 | $as_echo_n "(cached) " >&6 |
24085 | else | |
5476a9a4 GM |
24086 | if test "$cross_compiling" = yes; then : |
24087 | gl_cv_func_working_mktime=no | |
24088 | else | |
24089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 24090 | /* end confdefs.h. */ |
5476a9a4 GM |
24091 | /* Test program from Paul Eggert and Tony Leneis. */ |
24092 | #include <limits.h> | |
24093 | #include <stdlib.h> | |
24094 | #include <time.h> | |
5fa4ac76 | 24095 | |
5476a9a4 GM |
24096 | #ifdef HAVE_UNISTD_H |
24097 | # include <unistd.h> | |
f199cab1 | 24098 | #endif |
5476a9a4 | 24099 | |
2393bc74 GM |
24100 | #if HAVE_DECL_ALARM |
24101 | # include <signal.h> | |
5476a9a4 GM |
24102 | #endif |
24103 | ||
24104 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
24105 | #undef putenv | |
24106 | ||
24107 | static time_t time_t_max; | |
24108 | static time_t time_t_min; | |
24109 | ||
24110 | /* Values we'll use to set the TZ environment variable. */ | |
24111 | static char *tz_strings[] = { | |
24112 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
24113 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
24114 | }; | |
24115 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
24116 | ||
24117 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
24118 | Based on a problem report from Andreas Jaeger. */ | |
24119 | static int | |
24120 | spring_forward_gap () | |
f199cab1 | 24121 | { |
5476a9a4 GM |
24122 | /* glibc (up to about 1998-10-07) failed this test. */ |
24123 | struct tm tm; | |
24124 | ||
24125 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
24126 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
24127 | on systems that don't support the Olson extension, or don't have the | |
24128 | full zoneinfo tables installed. */ | |
24129 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
24130 | ||
24131 | tm.tm_year = 98; | |
24132 | tm.tm_mon = 3; | |
24133 | tm.tm_mday = 5; | |
24134 | tm.tm_hour = 2; | |
24135 | tm.tm_min = 0; | |
24136 | tm.tm_sec = 0; | |
24137 | tm.tm_isdst = -1; | |
24138 | return mktime (&tm) != (time_t) -1; | |
f199cab1 | 24139 | } |
5fa4ac76 | 24140 | |
5476a9a4 GM |
24141 | static int |
24142 | mktime_test1 (time_t now) | |
24143 | { | |
24144 | struct tm *lt; | |
24145 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
24146 | } | |
5fa4ac76 | 24147 | |
5476a9a4 GM |
24148 | static int |
24149 | mktime_test (time_t now) | |
24150 | { | |
24151 | return (mktime_test1 (now) | |
24152 | && mktime_test1 ((time_t) (time_t_max - now)) | |
24153 | && mktime_test1 ((time_t) (time_t_min + now))); | |
24154 | } | |
067d23c9 | 24155 | |
5476a9a4 GM |
24156 | static int |
24157 | irix_6_4_bug () | |
24158 | { | |
24159 | /* Based on code from Ariel Faigon. */ | |
24160 | struct tm tm; | |
24161 | tm.tm_year = 96; | |
24162 | tm.tm_mon = 3; | |
24163 | tm.tm_mday = 0; | |
24164 | tm.tm_hour = 0; | |
24165 | tm.tm_min = 0; | |
24166 | tm.tm_sec = 0; | |
24167 | tm.tm_isdst = -1; | |
24168 | mktime (&tm); | |
24169 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
24170 | } | |
24171 | ||
24172 | static int | |
24173 | bigtime_test (int j) | |
24174 | { | |
24175 | struct tm tm; | |
24176 | time_t now; | |
24177 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
24178 | now = mktime (&tm); | |
24179 | if (now != (time_t) -1) | |
24180 | { | |
24181 | struct tm *lt = localtime (&now); | |
24182 | if (! (lt | |
24183 | && lt->tm_year == tm.tm_year | |
24184 | && lt->tm_mon == tm.tm_mon | |
24185 | && lt->tm_mday == tm.tm_mday | |
24186 | && lt->tm_hour == tm.tm_hour | |
24187 | && lt->tm_min == tm.tm_min | |
24188 | && lt->tm_sec == tm.tm_sec | |
24189 | && lt->tm_yday == tm.tm_yday | |
24190 | && lt->tm_wday == tm.tm_wday | |
24191 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
24192 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
24193 | return 0; | |
24194 | } | |
24195 | return 1; | |
24196 | } | |
369e19fc | 24197 | |
5476a9a4 GM |
24198 | static int |
24199 | year_2050_test () | |
24200 | { | |
24201 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
24202 | ignoring leap seconds. */ | |
24203 | unsigned long int answer = 2527315200UL; | |
369e19fc | 24204 | |
5476a9a4 GM |
24205 | struct tm tm; |
24206 | time_t t; | |
24207 | tm.tm_year = 2050 - 1900; | |
24208 | tm.tm_mon = 2 - 1; | |
24209 | tm.tm_mday = 1; | |
24210 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
24211 | tm.tm_isdst = -1; | |
369e19fc | 24212 | |
5476a9a4 GM |
24213 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
24214 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
24215 | on systems that don't support the Olson extension, or don't have the | |
24216 | full zoneinfo tables installed. */ | |
24217 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
067d23c9 | 24218 | |
5476a9a4 | 24219 | t = mktime (&tm); |
067d23c9 | 24220 | |
5476a9a4 GM |
24221 | /* Check that the result is either a failure, or close enough |
24222 | to the correct answer that we can assume the discrepancy is | |
24223 | due to leap seconds. */ | |
24224 | return (t == (time_t) -1 | |
24225 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
24226 | } | |
067d23c9 | 24227 | |
f199cab1 GM |
24228 | int |
24229 | main () | |
24230 | { | |
5476a9a4 GM |
24231 | int result = 0; |
24232 | time_t t, delta; | |
24233 | int i, j; | |
24234 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; | |
24235 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
067d23c9 | 24236 | |
2393bc74 | 24237 | #if HAVE_DECL_ALARM |
5476a9a4 GM |
24238 | /* This test makes some buggy mktime implementations loop. |
24239 | Give up after 60 seconds; a mktime slower than that | |
24240 | isn't worth using anyway. */ | |
2393bc74 | 24241 | signal (SIGALRM, SIG_DFL); |
5476a9a4 | 24242 | alarm (60); |
2393bc74 | 24243 | #endif |
067d23c9 | 24244 | |
5476a9a4 GM |
24245 | time_t_max = (! time_t_signed |
24246 | ? (time_t) -1 | |
24247 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
24248 | * 2 + 1)); | |
24249 | time_t_min = (! time_t_signed | |
24250 | ? (time_t) 0 | |
24251 | : time_t_signed_magnitude | |
24252 | ? ~ (time_t) 0 | |
24253 | : ~ time_t_max); | |
3e0be4ab | 24254 | |
5476a9a4 GM |
24255 | delta = time_t_max / 997; /* a suitable prime number */ |
24256 | for (i = 0; i < N_STRINGS; i++) | |
24257 | { | |
24258 | if (tz_strings[i]) | |
24259 | putenv (tz_strings[i]); | |
3e0be4ab | 24260 | |
5476a9a4 GM |
24261 | for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) |
24262 | if (! mktime_test (t)) | |
24263 | result |= 1; | |
24264 | if ((result & 2) == 0 | |
24265 | && ! (mktime_test ((time_t) 1) | |
24266 | && mktime_test ((time_t) (60 * 60)) | |
24267 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
24268 | result |= 2; | |
f199cab1 | 24269 | |
5476a9a4 GM |
24270 | for (j = 1; (result & 4) == 0; j <<= 1) |
24271 | { | |
24272 | if (! bigtime_test (j)) | |
24273 | result |= 4; | |
24274 | if (INT_MAX / 2 < j) | |
24275 | break; | |
24276 | } | |
24277 | if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) | |
24278 | result |= 8; | |
24279 | } | |
24280 | if (! irix_6_4_bug ()) | |
24281 | result |= 16; | |
24282 | if (! spring_forward_gap ()) | |
24283 | result |= 32; | |
24284 | if (! year_2050_test ()) | |
24285 | result |= 64; | |
24286 | return result; | |
067d23c9 KY |
24287 | } |
24288 | _ACEOF | |
5476a9a4 GM |
24289 | if ac_fn_c_try_run "$LINENO"; then : |
24290 | gl_cv_func_working_mktime=yes | |
067d23c9 | 24291 | else |
5476a9a4 | 24292 | gl_cv_func_working_mktime=no |
3e0be4ab | 24293 | fi |
5476a9a4 GM |
24294 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24295 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
24296 | fi |
24297 | ||
f199cab1 | 24298 | |
5476a9a4 GM |
24299 | fi |
24300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 | |
24301 | $as_echo "$gl_cv_func_working_mktime" >&6; } | |
f199cab1 | 24302 | |
5476a9a4 GM |
24303 | if test $gl_cv_func_working_mktime = no; then |
24304 | REPLACE_MKTIME=1 | |
24305 | else | |
24306 | REPLACE_MKTIME=0 | |
f199cab1 | 24307 | fi |
f199cab1 | 24308 | |
a6342fc8 | 24309 | if test $REPLACE_MKTIME = 1; then |
f199cab1 | 24310 | |
f199cab1 | 24311 | |
0eb775a3 | 24312 | |
067d23c9 | 24313 | |
a451f14b | 24314 | |
a451f14b | 24315 | |
743c80a7 PE |
24316 | |
24317 | ||
5476a9a4 GM |
24318 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
24319 | ||
a6342fc8 GM |
24320 | : |
24321 | fi | |
a451f14b PE |
24322 | |
24323 | ||
24324 | ||
e275c824 PE |
24325 | |
24326 | ||
5476a9a4 | 24327 | GNULIB_MKTIME=1 |
e275c824 PE |
24328 | |
24329 | ||
24330 | ||
24331 | ||
24332 | ||
24333 | ||
24334 | ||
24335 | ||
d87ffdb7 | 24336 | |
5476a9a4 GM |
24337 | |
24338 | ||
0cdca42a GM |
24339 | |
24340 | if test $ac_cv_func_pipe2 != yes; then | |
24341 | HAVE_PIPE2=0 | |
24342 | fi | |
24343 | ||
24344 | ||
24345 | ||
24346 | ||
24347 | ||
24348 | ||
24349 | GNULIB_PIPE2=1 | |
24350 | ||
24351 | ||
24352 | ||
24353 | ||
24354 | ||
24355 | ||
24356 | ||
24357 | ||
24358 | ||
24359 | ||
5476a9a4 GM |
24360 | if test $ac_cv_func_pselect = yes; then |
24361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5 | |
24362 | $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; } | |
24363 | if test "${gl_cv_sig_pselect+set}" = set; then : | |
e275c824 PE |
24364 | $as_echo_n "(cached) " >&6 |
24365 | else | |
5476a9a4 | 24366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e275c824 | 24367 | /* end confdefs.h. */ |
5476a9a4 | 24368 | #include <sys/select.h> |
e275c824 | 24369 | |
f199cab1 GM |
24370 | int |
24371 | main () | |
24372 | { | |
5476a9a4 GM |
24373 | int (*p) (int, fd_set *, fd_set *, fd_set *restrict, |
24374 | struct timespec const *restrict, | |
24375 | sigset_t const *restrict) = pselect; | |
24376 | return !p; | |
f199cab1 GM |
24377 | ; |
24378 | return 0; | |
24379 | } | |
e275c824 | 24380 | _ACEOF |
f199cab1 | 24381 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 24382 | gl_cv_sig_pselect=yes |
3e0be4ab | 24383 | else |
5476a9a4 | 24384 | gl_cv_sig_pselect=no |
f199cab1 GM |
24385 | fi |
24386 | rm -f core conftest.err conftest.$ac_objext \ | |
24387 | conftest$ac_exeext conftest.$ac_ext | |
3e0be4ab | 24388 | fi |
5476a9a4 GM |
24389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5 |
24390 | $as_echo "$gl_cv_sig_pselect" >&6; } | |
b6c9d18d GM |
24391 | |
24392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5 | |
24393 | $as_echo_n "checking whether pselect detects invalid fds... " >&6; } | |
24394 | if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then : | |
24395 | $as_echo_n "(cached) " >&6 | |
24396 | else | |
24397 | ||
24398 | if test "$cross_compiling" = yes; then : | |
24399 | ||
24400 | case "$host_os" in | |
24401 | # Guess yes on glibc systems. | |
24402 | *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; | |
24403 | # If we don't know, assume the worst. | |
24404 | *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; | |
24405 | esac | |
24406 | ||
24407 | else | |
24408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24409 | /* end confdefs.h. */ | |
24410 | ||
24411 | #include <sys/types.h> | |
24412 | #include <sys/time.h> | |
24413 | #if HAVE_SYS_SELECT_H | |
24414 | # include <sys/select.h> | |
24415 | #endif | |
24416 | #include <unistd.h> | |
24417 | #include <errno.h> | |
24418 | ||
24419 | int | |
24420 | main () | |
24421 | { | |
24422 | ||
24423 | fd_set set; | |
24424 | dup2(0, 16); | |
24425 | FD_ZERO(&set); | |
24426 | FD_SET(16, &set); | |
24427 | close(16); | |
24428 | struct timespec timeout; | |
24429 | timeout.tv_sec = 0; | |
24430 | timeout.tv_nsec = 5000; | |
24431 | return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF; | |
24432 | ||
24433 | ; | |
24434 | return 0; | |
24435 | } | |
24436 | _ACEOF | |
24437 | if ac_fn_c_try_run "$LINENO"; then : | |
24438 | gl_cv_func_pselect_detects_ebadf=yes | |
24439 | else | |
24440 | gl_cv_func_pselect_detects_ebadf=no | |
24441 | fi | |
24442 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24443 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24444 | fi | |
24445 | ||
24446 | ||
24447 | fi | |
24448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5 | |
24449 | $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; } | |
24450 | case $gl_cv_func_pselect_detects_ebadf in | |
24451 | *yes) ;; | |
24452 | *) REPLACE_PSELECT=1 ;; | |
24453 | esac | |
5476a9a4 | 24454 | fi |
3e0be4ab | 24455 | |
5476a9a4 GM |
24456 | if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then |
24457 | REPLACE_PSELECT=1 | |
24458 | fi | |
3e0be4ab | 24459 | |
a6342fc8 | 24460 | if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then |
3e0be4ab GM |
24461 | |
24462 | ||
3e0be4ab | 24463 | |
3e0be4ab | 24464 | |
3e0be4ab | 24465 | |
3e0be4ab | 24466 | |
3e0be4ab | 24467 | |
3e0be4ab | 24468 | |
5476a9a4 | 24469 | gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext" |
3e0be4ab | 24470 | |
a6342fc8 | 24471 | fi |
3e0be4ab GM |
24472 | |
24473 | ||
f199cab1 | 24474 | |
f199cab1 | 24475 | |
f199cab1 | 24476 | |
5476a9a4 | 24477 | GNULIB_PSELECT=1 |
f199cab1 | 24478 | |
6d153f56 | 24479 | |
f199cab1 | 24480 | |
3e0be4ab | 24481 | |
3e0be4ab GM |
24482 | |
24483 | ||
f199cab1 | 24484 | |
0eb775a3 GM |
24485 | |
24486 | ||
5476a9a4 | 24487 | LIB_PTHREAD_SIGMASK= |
0eb775a3 | 24488 | |
f199cab1 | 24489 | |
f077f61d GM |
24490 | |
24491 | ||
24492 | if test "$gl_threads_api" = posix; then | |
24493 | if test $ac_cv_func_pthread_sigmask = yes; then | |
24494 | : | |
24495 | else | |
24496 | if test -n "$LIBMULTITHREAD"; then | |
24497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5 | |
24498 | $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; } | |
24499 | if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then : | |
24500 | $as_echo_n "(cached) " >&6 | |
24501 | else | |
24502 | gl_save_LIBS="$LIBS" | |
24503 | LIBS="$LIBS $LIBMULTITHREAD" | |
24504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24505 | /* end confdefs.h. */ | |
24506 | #include <pthread.h> | |
24507 | #include <signal.h> | |
24508 | ||
24509 | int | |
24510 | main () | |
24511 | { | |
24512 | return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0); | |
24513 | ; | |
24514 | return 0; | |
24515 | } | |
24516 | ||
24517 | _ACEOF | |
24518 | if ac_fn_c_try_link "$LINENO"; then : | |
24519 | gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes | |
24520 | else | |
24521 | gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no | |
24522 | fi | |
24523 | rm -f core conftest.err conftest.$ac_objext \ | |
24524 | conftest$ac_exeext conftest.$ac_ext | |
24525 | LIBS="$gl_save_LIBS" | |
24526 | ||
24527 | fi | |
24528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5 | |
24529 | $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; } | |
24530 | if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then | |
24531 | LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" | |
24532 | else | |
24533 | HAVE_PTHREAD_SIGMASK=0 | |
24534 | fi | |
24535 | else | |
24536 | HAVE_PTHREAD_SIGMASK=0 | |
24537 | fi | |
24538 | fi | |
5476a9a4 | 24539 | else |
f077f61d GM |
24540 | if test $ac_cv_func_pthread_sigmask = yes; then |
24541 | REPLACE_PTHREAD_SIGMASK=1 | |
24542 | else | |
24543 | HAVE_PTHREAD_SIGMASK=0 | |
24544 | fi | |
5476a9a4 | 24545 | fi |
6d153f56 | 24546 | |
52724a05 | 24547 | |
6d153f56 GM |
24548 | |
24549 | ||
5476a9a4 GM |
24550 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
24551 | ||
24552 | ||
24553 | if test -z "$LIB_PTHREAD_SIGMASK"; then | |
24554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5 | |
24555 | $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; } | |
24556 | if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then : | |
f199cab1 GM |
24557 | $as_echo_n "(cached) " >&6 |
24558 | else | |
5476a9a4 GM |
24559 | |
24560 | if test "$cross_compiling" = yes; then : | |
24561 | ||
24562 | case "$host_os" in | |
24563 | freebsd* | hpux* | solaris | solaris2.[2-9]*) | |
24564 | gl_cv_func_pthread_sigmask_in_libc_works="guessing no";; | |
24565 | *) | |
24566 | gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";; | |
24567 | esac | |
24568 | ||
24569 | else | |
24570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 24571 | /* end confdefs.h. */ |
6d153f56 | 24572 | |
5476a9a4 GM |
24573 | #include <pthread.h> |
24574 | #include <signal.h> | |
24575 | #include <stddef.h> | |
24576 | int main () | |
f199cab1 | 24577 | { |
5476a9a4 GM |
24578 | sigset_t set; |
24579 | sigemptyset (&set); | |
24580 | return pthread_sigmask (1729, &set, NULL) != 0; | |
f199cab1 GM |
24581 | } |
24582 | _ACEOF | |
5476a9a4 GM |
24583 | if ac_fn_c_try_run "$LINENO"; then : |
24584 | gl_cv_func_pthread_sigmask_in_libc_works=no | |
f199cab1 | 24585 | else |
5476a9a4 | 24586 | gl_cv_func_pthread_sigmask_in_libc_works=yes |
f199cab1 | 24587 | fi |
5476a9a4 GM |
24588 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24589 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 24590 | fi |
5476a9a4 GM |
24591 | |
24592 | ||
f199cab1 | 24593 | fi |
5476a9a4 GM |
24594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5 |
24595 | $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; } | |
24596 | case "$gl_cv_func_pthread_sigmask_in_libc_works" in | |
24597 | *no) | |
24598 | REPLACE_PTHREAD_SIGMASK=1 | |
cc322c06 | 24599 | |
5476a9a4 | 24600 | $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h |
cc322c06 | 24601 | |
5476a9a4 GM |
24602 | ;; |
24603 | esac | |
24604 | fi | |
3e0be4ab | 24605 | |
5476a9a4 GM |
24606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5 |
24607 | $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; } | |
24608 | if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then : | |
3e0be4ab GM |
24609 | $as_echo_n "(cached) " >&6 |
24610 | else | |
5476a9a4 GM |
24611 | |
24612 | gl_save_LIBS="$LIBS" | |
24613 | LIBS="$LIBS $LIB_PTHREAD_SIGMASK" | |
24614 | if test "$cross_compiling" = yes; then : | |
24615 | case "$host_os" in | |
24616 | cygwin*) | |
24617 | gl_cv_func_pthread_sigmask_return_works="guessing no";; | |
24618 | *) | |
24619 | gl_cv_func_pthread_sigmask_return_works="guessing yes";; | |
24620 | esac | |
24621 | ||
24622 | else | |
24623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 24624 | /* end confdefs.h. */ |
f199cab1 | 24625 | |
5476a9a4 GM |
24626 | #include <pthread.h> |
24627 | #include <signal.h> | |
24628 | #include <stddef.h> | |
24629 | int main () | |
3e0be4ab | 24630 | { |
5476a9a4 GM |
24631 | sigset_t set; |
24632 | sigemptyset (&set); | |
24633 | if (pthread_sigmask (1729, &set, NULL) == -1) | |
24634 | return 1; | |
3e0be4ab GM |
24635 | return 0; |
24636 | } | |
6d153f56 | 24637 | _ACEOF |
5476a9a4 GM |
24638 | if ac_fn_c_try_run "$LINENO"; then : |
24639 | gl_cv_func_pthread_sigmask_return_works=yes | |
3e0be4ab | 24640 | else |
5476a9a4 | 24641 | gl_cv_func_pthread_sigmask_return_works=no |
6d153f56 | 24642 | fi |
5476a9a4 GM |
24643 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24644 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 24645 | fi |
5476a9a4 GM |
24646 | |
24647 | LIBS="$gl_save_LIBS" | |
24648 | ||
52724a05 | 24649 | fi |
5476a9a4 GM |
24650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5 |
24651 | $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; } | |
24652 | case "$gl_cv_func_pthread_sigmask_return_works" in | |
24653 | *no) | |
24654 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 24655 | |
5476a9a4 | 24656 | $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h |
6d153f56 | 24657 | |
5476a9a4 GM |
24658 | ;; |
24659 | esac | |
cc322c06 | 24660 | |
5476a9a4 GM |
24661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5 |
24662 | $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; } | |
24663 | if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then : | |
f199cab1 GM |
24664 | $as_echo_n "(cached) " >&6 |
24665 | else | |
5476a9a4 GM |
24666 | |
24667 | case "$host_os" in | |
24668 | irix*) | |
24669 | gl_cv_func_pthread_sigmask_unblock_works="guessing no";; | |
24670 | *) | |
24671 | gl_cv_func_pthread_sigmask_unblock_works="guessing yes";; | |
24672 | esac | |
24673 | gl_save_LIBS="$LIBS" | |
24674 | LIBS="$LIBS $LIBMULTITHREAD" | |
24675 | if test "$cross_compiling" = yes; then : | |
24676 | : | |
f199cab1 | 24677 | else |
5476a9a4 GM |
24678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24679 | /* end confdefs.h. */ | |
6d153f56 | 24680 | |
5476a9a4 GM |
24681 | #include <pthread.h> |
24682 | #include <signal.h> | |
24683 | #include <stdio.h> | |
24684 | #include <stdlib.h> | |
24685 | #include <unistd.h> | |
24686 | static volatile int sigint_occurred; | |
24687 | static void | |
24688 | sigint_handler (int sig) | |
24689 | { | |
24690 | sigint_occurred++; | |
24691 | } | |
24692 | int main () | |
24693 | { | |
24694 | sigset_t set; | |
24695 | int pid = getpid (); | |
24696 | char command[80]; | |
24697 | signal (SIGINT, sigint_handler); | |
24698 | sigemptyset (&set); | |
24699 | sigaddset (&set, SIGINT); | |
24700 | if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0)) | |
24701 | return 1; | |
24702 | sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid); | |
24703 | if (!(system (command) == 0)) | |
24704 | return 2; | |
24705 | sleep (2); | |
24706 | if (!(sigint_occurred == 0)) | |
24707 | return 3; | |
24708 | if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0)) | |
24709 | return 4; | |
24710 | if (!(sigint_occurred == 1)) /* This fails on IRIX. */ | |
24711 | return 5; | |
24712 | return 0; | |
24713 | } | |
24714 | _ACEOF | |
24715 | if ac_fn_c_try_run "$LINENO"; then : | |
24716 | : | |
24717 | else | |
24718 | gl_cv_func_pthread_sigmask_unblock_works=no | |
f199cab1 | 24719 | fi |
5476a9a4 GM |
24720 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24721 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 24722 | fi |
5476a9a4 GM |
24723 | |
24724 | LIBS="$gl_save_LIBS" | |
24725 | ||
f199cab1 | 24726 | fi |
5476a9a4 GM |
24727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5 |
24728 | $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; } | |
24729 | case "$gl_cv_func_pthread_sigmask_unblock_works" in | |
24730 | *no) | |
24731 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 24732 | |
5476a9a4 | 24733 | $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h |
6d153f56 | 24734 | |
5476a9a4 GM |
24735 | ;; |
24736 | esac | |
6d153f56 | 24737 | fi |
6d153f56 | 24738 | |
a6342fc8 | 24739 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then |
a451f14b | 24740 | |
a451f14b | 24741 | |
743c80a7 PE |
24742 | |
24743 | ||
24744 | ||
24745 | ||
24746 | ||
f199cab1 | 24747 | |
5476a9a4 | 24748 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" |
743c80a7 PE |
24749 | |
24750 | ||
5476a9a4 | 24751 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
743c80a7 | 24752 | |
5476a9a4 | 24753 | $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h |
743c80a7 | 24754 | |
5476a9a4 | 24755 | fi |
743c80a7 | 24756 | |
a6342fc8 | 24757 | fi |
938a4ef9 | 24758 | |
938a4ef9 | 24759 | |
938a4ef9 | 24760 | |
938a4ef9 | 24761 | |
938a4ef9 | 24762 | |
5476a9a4 | 24763 | GNULIB_PTHREAD_SIGMASK=1 |
a451f14b | 24764 | |
a451f14b | 24765 | |
743c80a7 PE |
24766 | |
24767 | ||
24768 | ||
24769 | ||
24770 | ||
b5591ebb GM |
24771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 |
24772 | $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; } | |
24773 | if test "${gl_cv_func_svid_putenv+set}" = set; then : | |
24774 | $as_echo_n "(cached) " >&6 | |
24775 | else | |
24776 | if test "$cross_compiling" = yes; then : | |
24777 | case "$host_os" in | |
24778 | # Guess yes on glibc systems. | |
24779 | *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; | |
24780 | # If we don't know, assume the worst. | |
24781 | *) gl_cv_func_svid_putenv="guessing no" ;; | |
24782 | esac | |
24783 | ||
24784 | else | |
24785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24786 | /* end confdefs.h. */ | |
24787 | $ac_includes_default | |
24788 | int | |
24789 | main () | |
24790 | { | |
24791 | ||
24792 | /* Put it in env. */ | |
24793 | if (putenv ("CONFTEST_putenv=val")) | |
24794 | return 1; | |
24795 | ||
24796 | /* Try to remove it. */ | |
24797 | if (putenv ("CONFTEST_putenv")) | |
24798 | return 2; | |
24799 | ||
24800 | /* Make sure it was deleted. */ | |
24801 | if (getenv ("CONFTEST_putenv") != 0) | |
24802 | return 3; | |
24803 | ||
24804 | return 0; | |
24805 | ||
24806 | ; | |
24807 | return 0; | |
24808 | } | |
24809 | _ACEOF | |
24810 | if ac_fn_c_try_run "$LINENO"; then : | |
24811 | gl_cv_func_svid_putenv=yes | |
24812 | else | |
24813 | gl_cv_func_svid_putenv=no | |
24814 | fi | |
24815 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24816 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24817 | fi | |
24818 | ||
24819 | ||
24820 | fi | |
24821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 | |
24822 | $as_echo "$gl_cv_func_svid_putenv" >&6; } | |
24823 | case "$gl_cv_func_svid_putenv" in | |
24824 | *yes) ;; | |
24825 | *) | |
24826 | REPLACE_PUTENV=1 | |
24827 | ;; | |
24828 | esac | |
24829 | ||
24830 | if test $REPLACE_PUTENV = 1; then | |
24831 | ||
24832 | ||
24833 | ||
24834 | ||
24835 | ||
24836 | ||
24837 | ||
24838 | ||
24839 | gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext" | |
24840 | ||
c175d440 | 24841 | |
2393bc74 GM |
24842 | ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" |
24843 | if test "x$ac_cv_have_decl__putenv" = x""yes; then : | |
24844 | ac_have_decl=1 | |
24845 | else | |
24846 | ac_have_decl=0 | |
c175d440 | 24847 | fi |
2393bc74 GM |
24848 | |
24849 | cat >>confdefs.h <<_ACEOF | |
24850 | #define HAVE_DECL__PUTENV $ac_have_decl | |
24851 | _ACEOF | |
c175d440 GM |
24852 | |
24853 | ||
b5591ebb GM |
24854 | fi |
24855 | ||
24856 | ||
24857 | ||
24858 | ||
24859 | ||
24860 | GNULIB_PUTENV=1 | |
24861 | ||
24862 | ||
24863 | ||
24864 | ||
24865 | ||
24866 | ||
3a019ab4 GM |
24867 | # Check whether --enable-acl was given. |
24868 | if test "${enable_acl+set}" = set; then : | |
24869 | enableval=$enable_acl; | |
24870 | else | |
24871 | enable_acl=auto | |
24872 | fi | |
b5591ebb | 24873 | |
743c80a7 | 24874 | |
3a019ab4 GM |
24875 | LIB_ACL= |
24876 | use_acl=0 | |
24877 | if test "x$enable_acl" != "xno"; then | |
24878 | for ac_header in sys/acl.h | |
24879 | do : | |
24880 | ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" | |
24881 | if test "x$ac_cv_header_sys_acl_h" = x""yes; then : | |
24882 | cat >>confdefs.h <<_ACEOF | |
24883 | #define HAVE_SYS_ACL_H 1 | |
24884 | _ACEOF | |
24885 | ||
24886 | fi | |
24887 | ||
24888 | done | |
24889 | ||
24890 | if test $ac_cv_header_sys_acl_h = yes; then | |
24891 | ac_save_LIBS=$LIBS | |
24892 | ||
24893 | if test $use_acl = 0; then | |
24894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5 | |
24895 | $as_echo_n "checking for library containing acl_get_file... " >&6; } | |
24896 | if test "${ac_cv_search_acl_get_file+set}" = set; then : | |
24897 | $as_echo_n "(cached) " >&6 | |
24898 | else | |
24899 | ac_func_search_save_LIBS=$LIBS | |
24900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24901 | /* end confdefs.h. */ | |
24902 | ||
24903 | /* Override any GCC internal prototype to avoid an error. | |
24904 | Use char because int might match the return type of a GCC | |
24905 | builtin and then its argument prototype would still apply. */ | |
24906 | #ifdef __cplusplus | |
24907 | extern "C" | |
24908 | #endif | |
24909 | char acl_get_file (); | |
24910 | int | |
24911 | main () | |
24912 | { | |
24913 | return acl_get_file (); | |
24914 | ; | |
24915 | return 0; | |
24916 | } | |
24917 | _ACEOF | |
24918 | for ac_lib in '' acl pacl; do | |
24919 | if test -z "$ac_lib"; then | |
24920 | ac_res="none required" | |
24921 | else | |
24922 | ac_res=-l$ac_lib | |
24923 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
24924 | fi | |
24925 | if ac_fn_c_try_link "$LINENO"; then : | |
24926 | ac_cv_search_acl_get_file=$ac_res | |
24927 | fi | |
24928 | rm -f core conftest.err conftest.$ac_objext \ | |
24929 | conftest$ac_exeext | |
24930 | if test "${ac_cv_search_acl_get_file+set}" = set; then : | |
24931 | break | |
24932 | fi | |
24933 | done | |
24934 | if test "${ac_cv_search_acl_get_file+set}" = set; then : | |
24935 | ||
24936 | else | |
24937 | ac_cv_search_acl_get_file=no | |
24938 | fi | |
24939 | rm conftest.$ac_ext | |
24940 | LIBS=$ac_func_search_save_LIBS | |
24941 | fi | |
24942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5 | |
24943 | $as_echo "$ac_cv_search_acl_get_file" >&6; } | |
24944 | ac_res=$ac_cv_search_acl_get_file | |
24945 | if test "$ac_res" != no; then : | |
24946 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
24947 | if test "$ac_cv_search_acl_get_file" != "none required"; then | |
24948 | LIB_ACL=$ac_cv_search_acl_get_file | |
24949 | fi | |
24950 | for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \ | |
24951 | acl_free acl_from_mode acl_from_text \ | |
24952 | acl_delete_def_file acl_extended_file \ | |
24953 | acl_delete_fd_np acl_delete_file_np \ | |
24954 | acl_copy_ext_native acl_create_entry_np \ | |
24955 | acl_to_short_text acl_free_text | |
24956 | do : | |
24957 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
24958 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
24959 | eval as_val=\$$as_ac_var | |
24960 | if test "x$as_val" = x""yes; then : | |
24961 | cat >>confdefs.h <<_ACEOF | |
24962 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
24963 | _ACEOF | |
24964 | ||
24965 | fi | |
24966 | done | |
24967 | ||
24968 | # If the acl_get_file bug is detected, don't enable the ACL support. | |
24969 | ||
24970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5 | |
24971 | $as_echo_n "checking for working acl_get_file... " >&6; } | |
24972 | if test "${gl_cv_func_working_acl_get_file+set}" = set; then : | |
24973 | $as_echo_n "(cached) " >&6 | |
24974 | else | |
24975 | if test "$cross_compiling" = yes; then : | |
24976 | gl_cv_func_working_acl_get_file=cross-compiling | |
24977 | else | |
24978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24979 | /* end confdefs.h. */ | |
24980 | #include <sys/types.h> | |
24981 | #include <sys/acl.h> | |
24982 | #include <errno.h> | |
24983 | ||
24984 | int | |
24985 | main () | |
24986 | { | |
24987 | if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT) | |
24988 | return 1; | |
24989 | return 0; | |
24990 | ||
24991 | ; | |
24992 | return 0; | |
24993 | } | |
24994 | _ACEOF | |
24995 | if ac_fn_c_try_run "$LINENO"; then : | |
24996 | gl_cv_func_working_acl_get_file=yes | |
24997 | else | |
24998 | gl_cv_func_working_acl_get_file=no | |
24999 | fi | |
25000 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25001 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25002 | fi | |
25003 | ||
25004 | fi | |
25005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5 | |
25006 | $as_echo "$gl_cv_func_working_acl_get_file" >&6; } | |
25007 | ||
25008 | if test $gl_cv_func_working_acl_get_file = yes; then : | |
25009 | use_acl=1 | |
25010 | fi | |
25011 | ||
25012 | if test $use_acl = 1; then | |
25013 | for ac_header in acl/libacl.h | |
25014 | do : | |
25015 | ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default" | |
25016 | if test "x$ac_cv_header_acl_libacl_h" = x""yes; then : | |
25017 | cat >>confdefs.h <<_ACEOF | |
25018 | #define HAVE_ACL_LIBACL_H 1 | |
25019 | _ACEOF | |
25020 | ||
25021 | fi | |
25022 | ||
25023 | done | |
25024 | ||
25025 | ||
25026 | ||
25027 | ||
25028 | ||
25029 | ||
25030 | ||
25031 | ||
25032 | ||
25033 | for ac_func in acl_entries | |
25034 | do : | |
25035 | ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries" | |
25036 | if test "x$ac_cv_func_acl_entries" = x""yes; then : | |
25037 | cat >>confdefs.h <<_ACEOF | |
25038 | #define HAVE_ACL_ENTRIES 1 | |
25039 | _ACEOF | |
25040 | ||
25041 | else | |
25042 | ||
25043 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
25044 | ||
25045 | fi | |
25046 | done | |
25047 | ||
25048 | ||
25049 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5 | |
25050 | $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; } | |
25051 | if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then : | |
25052 | $as_echo_n "(cached) " >&6 | |
25053 | else | |
25054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25055 | /* end confdefs.h. */ | |
25056 | #include <sys/types.h> | |
25057 | #include <sys/acl.h> | |
25058 | int type = ACL_FIRST_ENTRY; | |
25059 | int | |
25060 | main () | |
25061 | { | |
25062 | ||
25063 | ; | |
25064 | return 0; | |
25065 | } | |
25066 | _ACEOF | |
25067 | if ac_fn_c_try_compile "$LINENO"; then : | |
25068 | gl_cv_acl_ACL_FIRST_ENTRY=yes | |
25069 | else | |
25070 | gl_cv_acl_ACL_FIRST_ENTRY=no | |
25071 | fi | |
25072 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25073 | fi | |
25074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5 | |
25075 | $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; } | |
25076 | if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then | |
25077 | ||
25078 | $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h | |
25079 | ||
25080 | fi | |
25081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5 | |
25082 | $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; } | |
25083 | if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then : | |
25084 | $as_echo_n "(cached) " >&6 | |
25085 | else | |
25086 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25087 | /* end confdefs.h. */ | |
25088 | #include <sys/types.h> | |
25089 | #include <sys/acl.h> | |
25090 | int type = ACL_TYPE_EXTENDED; | |
25091 | int | |
25092 | main () | |
25093 | { | |
25094 | ||
25095 | ; | |
25096 | return 0; | |
25097 | } | |
25098 | _ACEOF | |
25099 | if ac_fn_c_try_compile "$LINENO"; then : | |
25100 | gl_cv_acl_ACL_TYPE_EXTENDED=yes | |
25101 | else | |
25102 | gl_cv_acl_ACL_TYPE_EXTENDED=no | |
25103 | fi | |
25104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25105 | fi | |
25106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5 | |
25107 | $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; } | |
25108 | if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then | |
25109 | ||
25110 | $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h | |
25111 | ||
25112 | fi | |
25113 | else | |
25114 | LIB_ACL= | |
25115 | fi | |
25116 | ||
25117 | fi | |
25118 | ||
25119 | fi | |
25120 | ||
25121 | if test $use_acl = 0; then | |
25122 | for ac_func in facl | |
25123 | do : | |
25124 | ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl" | |
25125 | if test "x$ac_cv_func_facl" = x""yes; then : | |
25126 | cat >>confdefs.h <<_ACEOF | |
25127 | #define HAVE_FACL 1 | |
25128 | _ACEOF | |
25129 | ||
25130 | fi | |
25131 | done | |
25132 | ||
25133 | if test $ac_cv_func_facl = yes; then | |
25134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5 | |
25135 | $as_echo_n "checking for library containing acl_trivial... " >&6; } | |
25136 | if test "${ac_cv_search_acl_trivial+set}" = set; then : | |
25137 | $as_echo_n "(cached) " >&6 | |
25138 | else | |
25139 | ac_func_search_save_LIBS=$LIBS | |
25140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25141 | /* end confdefs.h. */ | |
25142 | ||
25143 | /* Override any GCC internal prototype to avoid an error. | |
25144 | Use char because int might match the return type of a GCC | |
25145 | builtin and then its argument prototype would still apply. */ | |
25146 | #ifdef __cplusplus | |
25147 | extern "C" | |
25148 | #endif | |
25149 | char acl_trivial (); | |
25150 | int | |
25151 | main () | |
25152 | { | |
25153 | return acl_trivial (); | |
25154 | ; | |
25155 | return 0; | |
25156 | } | |
25157 | _ACEOF | |
25158 | for ac_lib in '' sec; do | |
25159 | if test -z "$ac_lib"; then | |
25160 | ac_res="none required" | |
25161 | else | |
25162 | ac_res=-l$ac_lib | |
25163 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
25164 | fi | |
25165 | if ac_fn_c_try_link "$LINENO"; then : | |
25166 | ac_cv_search_acl_trivial=$ac_res | |
25167 | fi | |
25168 | rm -f core conftest.err conftest.$ac_objext \ | |
25169 | conftest$ac_exeext | |
25170 | if test "${ac_cv_search_acl_trivial+set}" = set; then : | |
25171 | break | |
25172 | fi | |
25173 | done | |
25174 | if test "${ac_cv_search_acl_trivial+set}" = set; then : | |
25175 | ||
25176 | else | |
25177 | ac_cv_search_acl_trivial=no | |
25178 | fi | |
25179 | rm conftest.$ac_ext | |
25180 | LIBS=$ac_func_search_save_LIBS | |
25181 | fi | |
25182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5 | |
25183 | $as_echo "$ac_cv_search_acl_trivial" >&6; } | |
25184 | ac_res=$ac_cv_search_acl_trivial | |
25185 | if test "$ac_res" != no; then : | |
25186 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
25187 | if test "$ac_cv_search_acl_trivial" != "none required"; then | |
25188 | LIB_ACL=$ac_cv_search_acl_trivial | |
25189 | fi | |
25190 | ||
25191 | fi | |
25192 | ||
25193 | for ac_func in acl_trivial | |
25194 | do : | |
25195 | ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial" | |
25196 | if test "x$ac_cv_func_acl_trivial" = x""yes; then : | |
25197 | cat >>confdefs.h <<_ACEOF | |
25198 | #define HAVE_ACL_TRIVIAL 1 | |
25199 | _ACEOF | |
25200 | ||
25201 | fi | |
25202 | done | |
25203 | ||
25204 | use_acl=1 | |
25205 | fi | |
25206 | fi | |
25207 | ||
25208 | if test $use_acl = 0; then | |
25209 | for ac_func in getacl | |
25210 | do : | |
25211 | ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl" | |
25212 | if test "x$ac_cv_func_getacl" = x""yes; then : | |
25213 | cat >>confdefs.h <<_ACEOF | |
25214 | #define HAVE_GETACL 1 | |
25215 | _ACEOF | |
25216 | ||
25217 | fi | |
25218 | done | |
25219 | ||
25220 | if test $ac_cv_func_getacl = yes; then | |
25221 | use_acl=1 | |
25222 | fi | |
25223 | for ac_header in aclv.h | |
25224 | do : | |
25225 | ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h> | |
25226 | " | |
25227 | if test "x$ac_cv_header_aclv_h" = x""yes; then : | |
25228 | cat >>confdefs.h <<_ACEOF | |
25229 | #define HAVE_ACLV_H 1 | |
25230 | _ACEOF | |
25231 | ||
25232 | fi | |
25233 | ||
25234 | done | |
25235 | ||
25236 | fi | |
25237 | ||
25238 | if test $use_acl = 0; then | |
25239 | for ac_func in aclx_get | |
25240 | do : | |
25241 | ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get" | |
25242 | if test "x$ac_cv_func_aclx_get" = x""yes; then : | |
25243 | cat >>confdefs.h <<_ACEOF | |
25244 | #define HAVE_ACLX_GET 1 | |
25245 | _ACEOF | |
25246 | ||
25247 | fi | |
25248 | done | |
25249 | ||
25250 | if test $ac_cv_func_aclx_get = yes; then | |
25251 | use_acl=1 | |
25252 | fi | |
25253 | fi | |
25254 | ||
25255 | if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then | |
25256 | for ac_func in statacl | |
25257 | do : | |
25258 | ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl" | |
25259 | if test "x$ac_cv_func_statacl" = x""yes; then : | |
25260 | cat >>confdefs.h <<_ACEOF | |
25261 | #define HAVE_STATACL 1 | |
25262 | _ACEOF | |
25263 | ||
25264 | fi | |
25265 | done | |
25266 | ||
25267 | if test $ac_cv_func_statacl = yes; then | |
25268 | use_acl=1 | |
25269 | fi | |
25270 | fi | |
25271 | ||
25272 | if test $use_acl = 0; then | |
25273 | for ac_func in aclsort | |
25274 | do : | |
25275 | ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort" | |
25276 | if test "x$ac_cv_func_aclsort" = x""yes; then : | |
25277 | cat >>confdefs.h <<_ACEOF | |
25278 | #define HAVE_ACLSORT 1 | |
25279 | _ACEOF | |
25280 | ||
25281 | fi | |
25282 | done | |
25283 | ||
25284 | if test $ac_cv_func_aclsort = yes; then | |
25285 | use_acl=1 | |
25286 | fi | |
25287 | fi | |
25288 | ||
25289 | LIBS=$ac_save_LIBS | |
25290 | fi | |
25291 | if test "x$enable_acl$use_acl" = "xyes0"; then | |
25292 | as_fn_error "ACLs enabled but support not detected" "$LINENO" 5 | |
25293 | elif test "x$enable_acl$use_acl" = "xauto0"; then | |
25294 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5 | |
25295 | $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;} | |
25296 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5 | |
25297 | $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;} | |
25298 | fi | |
25299 | fi | |
25300 | ||
25301 | ||
25302 | cat >>confdefs.h <<_ACEOF | |
25303 | #define USE_ACL $use_acl | |
25304 | _ACEOF | |
25305 | ||
25306 | USE_ACL=$use_acl | |
25307 | ||
25308 | ||
25309 | ||
25310 | ||
25311 | ||
25312 | if test $ac_cv_func_readlink = no; then | |
25313 | HAVE_READLINK=0 | |
25314 | else | |
25315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
25316 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
25317 | if test "${gl_cv_decl_readlink_works+set}" = set; then : | |
25318 | $as_echo_n "(cached) " >&6 | |
25319 | else | |
25320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25321 | /* end confdefs.h. */ | |
25322 | #include <unistd.h> | |
25323 | /* Cause compilation failure if original declaration has wrong type. */ | |
25324 | ssize_t readlink (const char *, char *, size_t); | |
25325 | int | |
f199cab1 GM |
25326 | main () |
25327 | { | |
5476a9a4 | 25328 | |
f199cab1 GM |
25329 | ; |
25330 | return 0; | |
25331 | } | |
3e0be4ab | 25332 | _ACEOF |
5476a9a4 GM |
25333 | if ac_fn_c_try_compile "$LINENO"; then : |
25334 | gl_cv_decl_readlink_works=yes | |
25335 | else | |
25336 | gl_cv_decl_readlink_works=no | |
3e0be4ab | 25337 | fi |
5476a9a4 GM |
25338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
25339 | fi | |
25340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
25341 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
25342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
25343 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
25344 | if test "${gl_cv_func_readlink_works+set}" = set; then : | |
25345 | $as_echo_n "(cached) " >&6 | |
25346 | else | |
25347 | # We have readlink, so assume ln -s works. | |
25348 | ln -s conftest.no-such conftest.link | |
25349 | ln -s conftest.link conftest.lnk2 | |
25350 | if test "$cross_compiling" = yes; then : | |
25351 | case "$host_os" in | |
25352 | # Guess yes on glibc systems. | |
25353 | *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; | |
25354 | # If we don't know, assume the worst. | |
25355 | *) gl_cv_func_readlink_works="guessing no" ;; | |
25356 | esac | |
25357 | ||
25358 | else | |
f199cab1 | 25359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 25360 | /* end confdefs.h. */ |
5476a9a4 GM |
25361 | #include <unistd.h> |
25362 | ||
f199cab1 GM |
25363 | int |
25364 | main () | |
25365 | { | |
5476a9a4 GM |
25366 | char buf[20]; |
25367 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
f199cab1 GM |
25368 | ; |
25369 | return 0; | |
25370 | } | |
067d23c9 | 25371 | _ACEOF |
5476a9a4 GM |
25372 | if ac_fn_c_try_run "$LINENO"; then : |
25373 | gl_cv_func_readlink_works=yes | |
25374 | else | |
25375 | gl_cv_func_readlink_works=no | |
067d23c9 | 25376 | fi |
5476a9a4 GM |
25377 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
25378 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 25379 | fi |
067d23c9 | 25380 | |
5476a9a4 | 25381 | rm -f conftest.link conftest.lnk2 |
f199cab1 | 25382 | fi |
5476a9a4 GM |
25383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 |
25384 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
25385 | case "$gl_cv_func_readlink_works" in | |
25386 | *yes) | |
25387 | if test "$gl_cv_decl_readlink_works" != yes; then | |
25388 | REPLACE_READLINK=1 | |
25389 | fi | |
25390 | ;; | |
25391 | *) | |
067d23c9 | 25392 | |
5476a9a4 | 25393 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h |
067d23c9 | 25394 | |
5476a9a4 GM |
25395 | REPLACE_READLINK=1 |
25396 | ;; | |
25397 | esac | |
25398 | fi | |
3e0be4ab | 25399 | |
a6342fc8 | 25400 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
3e0be4ab GM |
25401 | |
25402 | ||
25403 | ||
25404 | ||
3e0be4ab GM |
25405 | |
25406 | ||
5476a9a4 GM |
25407 | |
25408 | ||
25409 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | |
25410 | ||
25411 | ||
25412 | : | |
3e0be4ab | 25413 | |
a6342fc8 | 25414 | fi |
3e0be4ab | 25415 | |
067d23c9 | 25416 | |
067d23c9 | 25417 | |
067d23c9 | 25418 | |
067d23c9 | 25419 | |
5476a9a4 | 25420 | GNULIB_READLINK=1 |
067d23c9 | 25421 | |
067d23c9 | 25422 | |
067d23c9 | 25423 | |
067d23c9 KY |
25424 | |
25425 | ||
067d23c9 | 25426 | |
d7ad186c GM |
25427 | |
25428 | ||
25429 | ||
25430 | if test $ac_cv_func_readlinkat = no; then | |
25431 | HAVE_READLINKAT=0 | |
25432 | fi | |
25433 | ||
25434 | if test $HAVE_READLINKAT = 0; then | |
25435 | ||
25436 | ||
25437 | ||
25438 | ||
25439 | ||
25440 | ||
25441 | ||
25442 | ||
25443 | gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" | |
25444 | ||
25445 | fi | |
25446 | ||
25447 | ||
25448 | ||
25449 | ||
25450 | ||
25451 | GNULIB_READLINKAT=1 | |
25452 | ||
25453 | ||
25454 | ||
25455 | ||
25456 | ||
25457 | ||
e4184a20 GM |
25458 | for ac_func in sig2str |
25459 | do : | |
25460 | ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str" | |
25461 | if test "x$ac_cv_func_sig2str" = x""yes; then : | |
25462 | cat >>confdefs.h <<_ACEOF | |
25463 | #define HAVE_SIG2STR 1 | |
25464 | _ACEOF | |
25465 | ||
25466 | fi | |
25467 | done | |
25468 | ||
25469 | ||
25470 | if test $ac_cv_func_sig2str = no; then | |
25471 | ||
25472 | ||
25473 | ||
25474 | ||
25475 | ||
25476 | ||
25477 | ||
25478 | ||
25479 | gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext" | |
25480 | ||
25481 | ||
25482 | : | |
25483 | ||
25484 | fi | |
25485 | ||
369e19fc | 25486 | |
067d23c9 | 25487 | |
5476a9a4 GM |
25488 | |
25489 | ||
25490 | ||
25491 | ||
25492 | ||
25493 | ||
25494 | ||
25495 | ||
25496 | if test $gl_cv_have_include_next = yes; then | |
25497 | gl_cv_next_signal_h='<'signal.h'>' | |
25498 | else | |
25499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | |
25500 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
25501 | if test "${gl_cv_next_signal_h+set}" = set; then : | |
0eb775a3 | 25502 | $as_echo_n "(cached) " >&6 |
0eb775a3 | 25503 | else |
5476a9a4 GM |
25504 | |
25505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0eb775a3 | 25506 | /* end confdefs.h. */ |
5476a9a4 | 25507 | #include <signal.h> |
f199cab1 | 25508 | |
0eb775a3 | 25509 | _ACEOF |
5476a9a4 GM |
25510 | case "$host_os" in |
25511 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25512 | *) gl_absname_cpp="$ac_cpp" ;; | |
25513 | esac | |
0eb775a3 | 25514 | |
5476a9a4 GM |
25515 | case "$host_os" in |
25516 | mingw*) | |
25517 | gl_dirsep_regex='[/\\]' | |
25518 | ;; | |
25519 | *) | |
25520 | gl_dirsep_regex='\/' | |
25521 | ;; | |
25522 | esac | |
25523 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
0eb775a3 | 25524 | |
5476a9a4 GM |
25525 | gl_header_literal_regex=`echo 'signal.h' \ |
25526 | | sed -e "$gl_make_literal_regex_sed"` | |
25527 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25528 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25529 | s|^/[^/]|//&| | |
25530 | p | |
25531 | q | |
25532 | }' | |
25533 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
25534 | sed -n "$gl_absolute_header_sed"`'"' | |
0eb775a3 | 25535 | |
f199cab1 | 25536 | |
5476a9a4 GM |
25537 | fi |
25538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | |
25539 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
25540 | fi | |
25541 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | |
067d23c9 | 25542 | |
5476a9a4 GM |
25543 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
25544 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
25545 | gl_next_as_first_directive='<'signal.h'>' | |
25546 | else | |
25547 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
25548 | gl_next_as_first_directive=$gl_cv_next_signal_h | |
25549 | fi | |
25550 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | |
067d23c9 | 25551 | |
067d23c9 KY |
25552 | |
25553 | ||
067d23c9 | 25554 | |
067d23c9 | 25555 | |
5476a9a4 GM |
25556 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
25557 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
25558 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
25559 | #include <signal.h> | |
25560 | ||
25561 | " | |
25562 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | |
25563 | ||
25564 | else | |
25565 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
f199cab1 | 25566 | fi |
067d23c9 | 25567 | |
067d23c9 | 25568 | |
067d23c9 | 25569 | |
067d23c9 | 25570 | |
938a4ef9 | 25571 | |
938a4ef9 | 25572 | |
5476a9a4 GM |
25573 | |
25574 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | |
25575 | #include <signal.h> | |
25576 | ||
25577 | " | |
25578 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | |
25579 | ||
25580 | else | |
25581 | HAVE_SIGHANDLER_T=0 | |
25582 | fi | |
25583 | ||
25584 | ||
25585 | ||
25586 | ||
a6342fc8 | 25587 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
5476a9a4 GM |
25588 | /* <sys/types.h> is not needed according to POSIX, but the |
25589 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
25590 | powerpc-apple-darwin5.5 required it. */ | |
25591 | #include <sys/types.h> | |
25592 | #if HAVE_SYS_SOCKET_H | |
25593 | # include <sys/socket.h> | |
25594 | #elif HAVE_WS2TCPIP_H | |
25595 | # include <ws2tcpip.h> | |
25596 | #endif | |
25597 | ||
25598 | " | |
25599 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
25600 | ||
067d23c9 | 25601 | else |
5476a9a4 GM |
25602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 |
25603 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
25604 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | |
25605 | $as_echo_n "(cached) " >&6 | |
25606 | else | |
25607 | # Systems have either "struct sockaddr *" or | |
25608 | # "void *" as the second argument to getpeername | |
25609 | gl_cv_socklen_t_equiv= | |
25610 | for arg2 in "struct sockaddr" void; do | |
25611 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
25612 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 25613 | /* end confdefs.h. */ |
5476a9a4 GM |
25614 | #include <sys/types.h> |
25615 | #include <sys/socket.h> | |
25616 | ||
25617 | int getpeername (int, $arg2 *, $t *); | |
f199cab1 GM |
25618 | int |
25619 | main () | |
25620 | { | |
5476a9a4 GM |
25621 | $t len; |
25622 | getpeername (0, 0, &len); | |
f199cab1 GM |
25623 | ; |
25624 | return 0; | |
25625 | } | |
3e0be4ab | 25626 | _ACEOF |
5476a9a4 GM |
25627 | if ac_fn_c_try_compile "$LINENO"; then : |
25628 | gl_cv_socklen_t_equiv="$t" | |
067d23c9 | 25629 | fi |
5476a9a4 GM |
25630 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
25631 | test "$gl_cv_socklen_t_equiv" != "" && break | |
25632 | done | |
25633 | test "$gl_cv_socklen_t_equiv" != "" && break | |
25634 | done | |
067d23c9 | 25635 | |
5476a9a4 | 25636 | fi |
067d23c9 | 25637 | |
5476a9a4 GM |
25638 | if test "$gl_cv_socklen_t_equiv" = ""; then |
25639 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
25640 | fi | |
25641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | |
25642 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | |
25643 | ||
25644 | cat >>confdefs.h <<_ACEOF | |
25645 | #define socklen_t $gl_cv_socklen_t_equiv | |
25646 | _ACEOF | |
067d23c9 | 25647 | |
f199cab1 | 25648 | fi |
3e0be4ab | 25649 | |
3e0be4ab | 25650 | |
5476a9a4 GM |
25651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 |
25652 | $as_echo_n "checking for ssize_t... " >&6; } | |
25653 | if test "${gt_cv_ssize_t+set}" = set; then : | |
f199cab1 GM |
25654 | $as_echo_n "(cached) " >&6 |
25655 | else | |
5476a9a4 | 25656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 25657 | /* end confdefs.h. */ |
5476a9a4 | 25658 | #include <sys/types.h> |
f199cab1 GM |
25659 | int |
25660 | main () | |
25661 | { | |
5476a9a4 GM |
25662 | int x = sizeof (ssize_t *) + sizeof (ssize_t); |
25663 | return !x; | |
f199cab1 GM |
25664 | ; |
25665 | return 0; | |
25666 | } | |
25667 | _ACEOF | |
5476a9a4 GM |
25668 | if ac_fn_c_try_compile "$LINENO"; then : |
25669 | gt_cv_ssize_t=yes | |
067d23c9 | 25670 | else |
5476a9a4 | 25671 | gt_cv_ssize_t=no |
f199cab1 | 25672 | fi |
5476a9a4 | 25673 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 25674 | fi |
5476a9a4 GM |
25675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 |
25676 | $as_echo "$gt_cv_ssize_t" >&6; } | |
25677 | if test $gt_cv_ssize_t = no; then | |
25678 | ||
25679 | $as_echo "#define ssize_t int" >>confdefs.h | |
25680 | ||
25681 | fi | |
25682 | ||
25683 | ||
25684 | ||
25685 | ||
25686 | ||
5476a9a4 GM |
25687 | 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> |
25688 | #include <sys/stat.h> | |
25689 | " | |
25690 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then : | |
25691 | ||
25692 | cat >>confdefs.h <<_ACEOF | |
25693 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 | |
25694 | _ACEOF | |
25695 | ||
25696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
25697 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
25698 | if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then : | |
f199cab1 GM |
25699 | $as_echo_n "(cached) " >&6 |
25700 | else | |
5476a9a4 | 25701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 25702 | /* end confdefs.h. */ |
3e0be4ab | 25703 | |
5476a9a4 GM |
25704 | #include <sys/types.h> |
25705 | #include <sys/stat.h> | |
25706 | #if HAVE_SYS_TIME_H | |
25707 | # include <sys/time.h> | |
25708 | #endif | |
25709 | #include <time.h> | |
25710 | struct timespec ts; | |
25711 | struct stat st; | |
25712 | ||
f199cab1 GM |
25713 | int |
25714 | main () | |
25715 | { | |
5476a9a4 GM |
25716 | |
25717 | st.st_atim = ts; | |
25718 | ||
f199cab1 GM |
25719 | ; |
25720 | return 0; | |
25721 | } | |
3e0be4ab | 25722 | _ACEOF |
5476a9a4 GM |
25723 | if ac_fn_c_try_compile "$LINENO"; then : |
25724 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
f199cab1 | 25725 | else |
5476a9a4 | 25726 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
f199cab1 | 25727 | fi |
5476a9a4 | 25728 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 25729 | fi |
5476a9a4 GM |
25730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
25731 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
25732 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
067d23c9 | 25733 | |
5476a9a4 | 25734 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
067d23c9 | 25735 | |
5476a9a4 GM |
25736 | fi |
25737 | else | |
25738 | 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> | |
25739 | #include <sys/stat.h> | |
25740 | " | |
25741 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then : | |
067d23c9 | 25742 | |
5476a9a4 GM |
25743 | cat >>confdefs.h <<_ACEOF |
25744 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 | |
25745 | _ACEOF | |
3e0be4ab | 25746 | |
0eb775a3 | 25747 | |
3e0be4ab | 25748 | else |
5476a9a4 GM |
25749 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> |
25750 | #include <sys/stat.h> | |
25751 | " | |
25752 | if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then : | |
25753 | ||
25754 | cat >>confdefs.h <<_ACEOF | |
25755 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
067d23c9 | 25756 | _ACEOF |
5476a9a4 GM |
25757 | |
25758 | ||
067d23c9 | 25759 | else |
5476a9a4 GM |
25760 | 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> |
25761 | #include <sys/stat.h> | |
25762 | " | |
25763 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then : | |
25764 | ||
25765 | cat >>confdefs.h <<_ACEOF | |
25766 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
25767 | _ACEOF | |
25768 | ||
25769 | ||
3e0be4ab | 25770 | fi |
5476a9a4 | 25771 | |
067d23c9 | 25772 | fi |
5476a9a4 | 25773 | |
067d23c9 | 25774 | fi |
067d23c9 KY |
25775 | |
25776 | fi | |
25777 | ||
067d23c9 | 25778 | |
067d23c9 | 25779 | |
067d23c9 | 25780 | |
067d23c9 | 25781 | |
5476a9a4 GM |
25782 | 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> |
25783 | #include <sys/stat.h> | |
25784 | " | |
25785 | if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then : | |
25786 | ||
25787 | cat >>confdefs.h <<_ACEOF | |
25788 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 | |
25789 | _ACEOF | |
067d23c9 KY |
25790 | |
25791 | ||
f199cab1 | 25792 | else |
5476a9a4 GM |
25793 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> |
25794 | #include <sys/stat.h> | |
25795 | " | |
25796 | if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then : | |
067d23c9 | 25797 | |
5476a9a4 GM |
25798 | cat >>confdefs.h <<_ACEOF |
25799 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 | |
25800 | _ACEOF | |
067d23c9 | 25801 | |
3e0be4ab | 25802 | |
067d23c9 | 25803 | else |
5476a9a4 GM |
25804 | 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> |
25805 | #include <sys/stat.h> | |
25806 | " | |
25807 | if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then : | |
067d23c9 | 25808 | |
5476a9a4 GM |
25809 | cat >>confdefs.h <<_ACEOF |
25810 | #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 | |
067d23c9 | 25811 | _ACEOF |
5476a9a4 GM |
25812 | |
25813 | ||
f199cab1 | 25814 | fi |
5476a9a4 | 25815 | |
f199cab1 | 25816 | fi |
5476a9a4 | 25817 | |
067d23c9 | 25818 | fi |
0eb775a3 | 25819 | |
0eb775a3 | 25820 | |
0eb775a3 | 25821 | |
5476a9a4 GM |
25822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
25823 | $as_echo_n "checking for working stdalign.h... " >&6; } | |
25824 | if test "${gl_cv_header_working_stdalign_h+set}" = set; then : | |
f199cab1 | 25825 | $as_echo_n "(cached) " >&6 |
067d23c9 | 25826 | else |
5476a9a4 | 25827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 25828 | /* end confdefs.h. */ |
5476a9a4 GM |
25829 | #include <stdalign.h> |
25830 | #include <stddef.h> | |
25831 | ||
25832 | /* Test that alignof yields a result consistent with offsetof. | |
25833 | This catches GCC bug 52023 | |
25834 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ | |
25835 | #ifdef __cplusplus | |
25836 | template <class t> struct alignof_helper { char a; t b; }; | |
25837 | # define ao(type) offsetof (alignof_helper<type>, b) | |
25838 | #else | |
25839 | # define ao(type) offsetof (struct { char a; type b; }, b) | |
25840 | #endif | |
25841 | char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; | |
25842 | char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; | |
25843 | char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; | |
25844 | ||
25845 | /* Test _Alignas only on platforms where gnulib can help. */ | |
25846 | #if \ | |
0cdca42a GM |
25847 | ((defined __cplusplus && 201103 <= __cplusplus) \ |
25848 | || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ | |
5476a9a4 | 25849 | || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) |
6ea3f01e GM |
25850 | struct alignas_test { char c; char alignas (8) alignas_8; }; |
25851 | char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 | |
25852 | ? 1 : -1]; | |
5476a9a4 | 25853 | #endif |
067d23c9 | 25854 | |
f199cab1 GM |
25855 | int |
25856 | main () | |
25857 | { | |
5476a9a4 | 25858 | |
f199cab1 GM |
25859 | ; |
25860 | return 0; | |
25861 | } | |
25862 | _ACEOF | |
5476a9a4 GM |
25863 | if ac_fn_c_try_compile "$LINENO"; then : |
25864 | gl_cv_header_working_stdalign_h=yes | |
f199cab1 | 25865 | else |
5476a9a4 | 25866 | gl_cv_header_working_stdalign_h=no |
f199cab1 | 25867 | fi |
5476a9a4 | 25868 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 25869 | fi |
5476a9a4 GM |
25870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 |
25871 | $as_echo "$gl_cv_header_working_stdalign_h" >&6; } | |
067d23c9 | 25872 | |
5476a9a4 GM |
25873 | if test $gl_cv_header_working_stdalign_h = yes; then |
25874 | STDALIGN_H='' | |
25875 | else | |
25876 | STDALIGN_H='stdalign.h' | |
f199cab1 | 25877 | fi |
0eb775a3 | 25878 | |
5476a9a4 GM |
25879 | |
25880 | if test -n "$STDALIGN_H"; then | |
25881 | GL_GENERATE_STDALIGN_H_TRUE= | |
25882 | GL_GENERATE_STDALIGN_H_FALSE='#' | |
f199cab1 | 25883 | else |
5476a9a4 GM |
25884 | GL_GENERATE_STDALIGN_H_TRUE='#' |
25885 | GL_GENERATE_STDALIGN_H_FALSE= | |
0eb775a3 | 25886 | fi |
0eb775a3 GM |
25887 | |
25888 | ||
25889 | ||
5476a9a4 GM |
25890 | STDARG_H='' |
25891 | NEXT_STDARG_H='<stdarg.h>' | |
25892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 | |
25893 | $as_echo_n "checking for va_copy... " >&6; } | |
25894 | if test "${gl_cv_func_va_copy+set}" = set; then : | |
f199cab1 | 25895 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
25896 | else |
25897 | ||
25898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25899 | /* end confdefs.h. */ | |
25900 | #include <stdarg.h> | |
f199cab1 GM |
25901 | int |
25902 | main () | |
25903 | { | |
5476a9a4 GM |
25904 | |
25905 | #ifndef va_copy | |
25906 | void (*func) (va_list, va_list) = va_copy; | |
25907 | #endif | |
25908 | ||
f199cab1 GM |
25909 | ; |
25910 | return 0; | |
25911 | } | |
25912 | _ACEOF | |
5476a9a4 GM |
25913 | if ac_fn_c_try_compile "$LINENO"; then : |
25914 | gl_cv_func_va_copy=yes | |
f199cab1 | 25915 | else |
5476a9a4 | 25916 | gl_cv_func_va_copy=no |
f199cab1 | 25917 | fi |
5476a9a4 | 25918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 25919 | fi |
5476a9a4 GM |
25920 | |
25921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 | |
25922 | $as_echo "$gl_cv_func_va_copy" >&6; } | |
25923 | if test $gl_cv_func_va_copy = no; then | |
25924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25925 | /* end confdefs.h. */ | |
25926 | #if defined _AIX && !defined __GNUC__ | |
25927 | AIX vaccine | |
25928 | #endif | |
25929 | ||
25930 | _ACEOF | |
25931 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
25932 | $EGREP "vaccine" >/dev/null 2>&1; then : | |
25933 | gl_aixcc=yes | |
f199cab1 | 25934 | else |
5476a9a4 | 25935 | gl_aixcc=no |
f199cab1 | 25936 | fi |
5476a9a4 | 25937 | rm -f conftest* |
0eb775a3 | 25938 | |
5476a9a4 GM |
25939 | if test $gl_aixcc = yes; then |
25940 | STDARG_H=stdarg.h | |
0eb775a3 GM |
25941 | |
25942 | ||
5476a9a4 GM |
25943 | |
25944 | ||
25945 | ||
25946 | ||
25947 | ||
25948 | ||
25949 | if test $gl_cv_have_include_next = yes; then | |
25950 | gl_cv_next_stdarg_h='<'stdarg.h'>' | |
25951 | else | |
25952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5 | |
25953 | $as_echo_n "checking absolute name of <stdarg.h>... " >&6; } | |
25954 | if test "${gl_cv_next_stdarg_h+set}" = set; then : | |
f199cab1 GM |
25955 | $as_echo_n "(cached) " >&6 |
25956 | else | |
5476a9a4 GM |
25957 | |
25958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 25959 | /* end confdefs.h. */ |
5476a9a4 | 25960 | #include <stdarg.h> |
0eb775a3 | 25961 | |
f199cab1 | 25962 | _ACEOF |
5476a9a4 GM |
25963 | case "$host_os" in |
25964 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25965 | *) gl_absname_cpp="$ac_cpp" ;; | |
25966 | esac | |
25967 | ||
25968 | case "$host_os" in | |
25969 | mingw*) | |
25970 | gl_dirsep_regex='[/\\]' | |
25971 | ;; | |
25972 | *) | |
25973 | gl_dirsep_regex='\/' | |
25974 | ;; | |
25975 | esac | |
25976 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
25977 | ||
25978 | gl_header_literal_regex=`echo 'stdarg.h' \ | |
25979 | | sed -e "$gl_make_literal_regex_sed"` | |
25980 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25981 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25982 | s|^/[^/]|//&| | |
25983 | p | |
25984 | q | |
25985 | }' | |
25986 | gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
25987 | sed -n "$gl_absolute_header_sed"`'"' | |
25988 | ||
25989 | ||
f199cab1 | 25990 | fi |
5476a9a4 GM |
25991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 |
25992 | $as_echo "$gl_cv_next_stdarg_h" >&6; } | |
25993 | fi | |
25994 | NEXT_STDARG_H=$gl_cv_next_stdarg_h | |
25995 | ||
25996 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
25997 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
25998 | gl_next_as_first_directive='<'stdarg.h'>' | |
25999 | else | |
26000 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26001 | gl_next_as_first_directive=$gl_cv_next_stdarg_h | |
26002 | fi | |
26003 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive | |
0eb775a3 GM |
26004 | |
26005 | ||
26006 | ||
5476a9a4 GM |
26007 | |
26008 | if test "$gl_cv_next_stdarg_h" = '""'; then | |
26009 | gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' | |
26010 | NEXT_STDARG_H="$gl_cv_next_stdarg_h" | |
26011 | fi | |
f199cab1 | 26012 | else |
5476a9a4 GM |
26013 | |
26014 | saved_as_echo_n="$as_echo_n" | |
26015 | as_echo_n=':' | |
26016 | if test "${gl_cv_func___va_copy+set}" = set; then : | |
f199cab1 GM |
26017 | $as_echo_n "(cached) " >&6 |
26018 | else | |
0eb775a3 | 26019 | |
5476a9a4 GM |
26020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
26021 | /* end confdefs.h. */ | |
26022 | #include <stdarg.h> | |
f199cab1 GM |
26023 | int |
26024 | main () | |
26025 | { | |
5476a9a4 GM |
26026 | |
26027 | #ifndef __va_copy | |
26028 | error, bail out | |
26029 | #endif | |
26030 | ||
f199cab1 GM |
26031 | ; |
26032 | return 0; | |
26033 | } | |
26034 | _ACEOF | |
5476a9a4 GM |
26035 | if ac_fn_c_try_compile "$LINENO"; then : |
26036 | gl_cv_func___va_copy=yes | |
f199cab1 | 26037 | else |
5476a9a4 | 26038 | gl_cv_func___va_copy=no |
f199cab1 | 26039 | fi |
5476a9a4 | 26040 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 26041 | fi |
0eb775a3 | 26042 | |
5476a9a4 GM |
26043 | as_echo_n="$saved_as_echo_n" |
26044 | ||
26045 | if test $gl_cv_func___va_copy = yes; then | |
26046 | ||
26047 | $as_echo "#define va_copy __va_copy" >>confdefs.h | |
26048 | ||
26049 | else | |
0eb775a3 | 26050 | |
5476a9a4 GM |
26051 | |
26052 | $as_echo "#define va_copy gl_va_copy" >>confdefs.h | |
0eb775a3 | 26053 | |
f199cab1 GM |
26054 | fi |
26055 | fi | |
5476a9a4 GM |
26056 | fi |
26057 | ||
26058 | if test -n "$STDARG_H"; then | |
26059 | GL_GENERATE_STDARG_H_TRUE= | |
26060 | GL_GENERATE_STDARG_H_FALSE='#' | |
26061 | else | |
26062 | GL_GENERATE_STDARG_H_TRUE='#' | |
26063 | GL_GENERATE_STDARG_H_FALSE= | |
26064 | fi | |
26065 | ||
26066 | ||
26067 | ||
26068 | ||
26069 | ||
26070 | ||
26071 | # Define two additional variables used in the Makefile substitution. | |
26072 | ||
26073 | if test "$ac_cv_header_stdbool_h" = yes; then | |
26074 | STDBOOL_H='' | |
26075 | else | |
26076 | STDBOOL_H='stdbool.h' | |
26077 | fi | |
26078 | ||
26079 | if test -n "$STDBOOL_H"; then | |
26080 | GL_GENERATE_STDBOOL_H_TRUE= | |
26081 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
26082 | else | |
26083 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
26084 | GL_GENERATE_STDBOOL_H_FALSE= | |
26085 | fi | |
26086 | ||
26087 | ||
26088 | if test "$ac_cv_type__Bool" = yes; then | |
26089 | HAVE__BOOL=1 | |
26090 | else | |
26091 | HAVE__BOOL=0 | |
26092 | fi | |
26093 | ||
26094 | ||
26095 | ||
26096 | ||
26097 | ||
26098 | STDDEF_H= | |
26099 | if test $gt_cv_c_wchar_t = no; then | |
26100 | HAVE_WCHAR_T=0 | |
26101 | STDDEF_H=stddef.h | |
26102 | fi | |
26103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
26104 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
26105 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
f199cab1 GM |
26106 | $as_echo_n "(cached) " >&6 |
26107 | else | |
5476a9a4 | 26108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 26109 | /* end confdefs.h. */ |
5476a9a4 GM |
26110 | #include <stddef.h> |
26111 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
3e0be4ab | 26112 | |
f199cab1 GM |
26113 | int |
26114 | main () | |
26115 | { | |
5476a9a4 | 26116 | |
f199cab1 GM |
26117 | ; |
26118 | return 0; | |
26119 | } | |
26120 | _ACEOF | |
5476a9a4 GM |
26121 | if ac_fn_c_try_compile "$LINENO"; then : |
26122 | gl_cv_decl_null_works=yes | |
f199cab1 | 26123 | else |
5476a9a4 | 26124 | gl_cv_decl_null_works=no |
f199cab1 | 26125 | fi |
5476a9a4 | 26126 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 26127 | fi |
5476a9a4 GM |
26128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
26129 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
26130 | if test $gl_cv_decl_null_works = no; then | |
26131 | REPLACE_NULL=1 | |
26132 | STDDEF_H=stddef.h | |
26133 | fi | |
26134 | ||
26135 | if test -n "$STDDEF_H"; then | |
26136 | GL_GENERATE_STDDEF_H_TRUE= | |
26137 | GL_GENERATE_STDDEF_H_FALSE='#' | |
f199cab1 | 26138 | else |
5476a9a4 GM |
26139 | GL_GENERATE_STDDEF_H_TRUE='#' |
26140 | GL_GENERATE_STDDEF_H_FALSE= | |
f199cab1 | 26141 | fi |
3e0be4ab | 26142 | |
5476a9a4 | 26143 | if test -n "$STDDEF_H"; then |
3e0be4ab GM |
26144 | |
26145 | ||
5476a9a4 GM |
26146 | |
26147 | ||
26148 | ||
26149 | ||
26150 | ||
26151 | ||
26152 | if test $gl_cv_have_include_next = yes; then | |
26153 | gl_cv_next_stddef_h='<'stddef.h'>' | |
26154 | else | |
26155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
26156 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
26157 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
067d23c9 KY |
26158 | $as_echo_n "(cached) " >&6 |
26159 | else | |
5476a9a4 GM |
26160 | |
26161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 26162 | /* end confdefs.h. */ |
5476a9a4 | 26163 | #include <stddef.h> |
f199cab1 | 26164 | |
067d23c9 | 26165 | _ACEOF |
5476a9a4 GM |
26166 | case "$host_os" in |
26167 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26168 | *) gl_absname_cpp="$ac_cpp" ;; | |
26169 | esac | |
26170 | ||
26171 | case "$host_os" in | |
26172 | mingw*) | |
26173 | gl_dirsep_regex='[/\\]' | |
26174 | ;; | |
26175 | *) | |
26176 | gl_dirsep_regex='\/' | |
26177 | ;; | |
26178 | esac | |
26179 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
26180 | ||
26181 | gl_header_literal_regex=`echo 'stddef.h' \ | |
26182 | | sed -e "$gl_make_literal_regex_sed"` | |
26183 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26184 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26185 | s|^/[^/]|//&| | |
26186 | p | |
26187 | q | |
26188 | }' | |
26189 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26190 | sed -n "$gl_absolute_header_sed"`'"' | |
26191 | ||
26192 | ||
f199cab1 | 26193 | fi |
5476a9a4 GM |
26194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
26195 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
26196 | fi | |
26197 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
26198 | ||
26199 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
26200 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26201 | gl_next_as_first_directive='<'stddef.h'>' | |
26202 | else | |
26203 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26204 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
26205 | fi | |
26206 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
26207 | ||
f199cab1 | 26208 | |
f199cab1 | 26209 | |
f199cab1 | 26210 | |
067d23c9 | 26211 | fi |
067d23c9 | 26212 | |
f199cab1 | 26213 | |
067d23c9 | 26214 | |
067d23c9 | 26215 | |
067d23c9 | 26216 | |
067d23c9 KY |
26217 | |
26218 | ||
067d23c9 | 26219 | |
067d23c9 KY |
26220 | |
26221 | ||
067d23c9 | 26222 | |
3e0be4ab | 26223 | |
5476a9a4 GM |
26224 | if test $gl_cv_have_include_next = yes; then |
26225 | gl_cv_next_stdio_h='<'stdio.h'>' | |
26226 | else | |
26227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
26228 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
26229 | if test "${gl_cv_next_stdio_h+set}" = set; then : | |
26230 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 26231 | else |
5476a9a4 GM |
26232 | |
26233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26234 | /* end confdefs.h. */ | |
26235 | #include <stdio.h> | |
26236 | ||
f199cab1 | 26237 | _ACEOF |
5476a9a4 GM |
26238 | case "$host_os" in |
26239 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26240 | *) gl_absname_cpp="$ac_cpp" ;; | |
26241 | esac | |
067d23c9 | 26242 | |
5476a9a4 GM |
26243 | case "$host_os" in |
26244 | mingw*) | |
26245 | gl_dirsep_regex='[/\\]' | |
26246 | ;; | |
26247 | *) | |
26248 | gl_dirsep_regex='\/' | |
26249 | ;; | |
26250 | esac | |
26251 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
26252 | ||
26253 | gl_header_literal_regex=`echo 'stdio.h' \ | |
26254 | | sed -e "$gl_make_literal_regex_sed"` | |
26255 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26256 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26257 | s|^/[^/]|//&| | |
26258 | p | |
26259 | q | |
26260 | }' | |
26261 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26262 | sed -n "$gl_absolute_header_sed"`'"' | |
067d23c9 | 26263 | |
067d23c9 | 26264 | |
f199cab1 | 26265 | fi |
5476a9a4 GM |
26266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 |
26267 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
26268 | fi | |
26269 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
067d23c9 | 26270 | |
5476a9a4 GM |
26271 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
26272 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26273 | gl_next_as_first_directive='<'stdio.h'>' | |
26274 | else | |
26275 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26276 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
26277 | fi | |
26278 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
26279 | ||
26280 | ||
26281 | ||
26282 | ||
26283 | ||
26284 | GNULIB_FSCANF=1 | |
26285 | ||
26286 | ||
26287 | cat >>confdefs.h <<_ACEOF | |
26288 | #define GNULIB_FSCANF 1 | |
26289 | _ACEOF | |
067d23c9 | 26290 | |
067d23c9 | 26291 | |
5476a9a4 | 26292 | GNULIB_SCANF=1 |
f199cab1 | 26293 | |
f199cab1 | 26294 | |
5476a9a4 GM |
26295 | cat >>confdefs.h <<_ACEOF |
26296 | #define GNULIB_SCANF 1 | |
f199cab1 GM |
26297 | _ACEOF |
26298 | ||
067d23c9 | 26299 | |
5476a9a4 GM |
26300 | GNULIB_FGETC=1 |
26301 | GNULIB_GETC=1 | |
26302 | GNULIB_GETCHAR=1 | |
26303 | GNULIB_FGETS=1 | |
26304 | GNULIB_FREAD=1 | |
067d23c9 | 26305 | |
067d23c9 | 26306 | |
5476a9a4 GM |
26307 | GNULIB_FPRINTF=1 |
26308 | GNULIB_PRINTF=1 | |
26309 | GNULIB_VFPRINTF=1 | |
26310 | GNULIB_VPRINTF=1 | |
26311 | GNULIB_FPUTC=1 | |
26312 | GNULIB_PUTC=1 | |
26313 | GNULIB_PUTCHAR=1 | |
26314 | GNULIB_FPUTS=1 | |
26315 | GNULIB_PUTS=1 | |
26316 | GNULIB_FWRITE=1 | |
067d23c9 | 26317 | |
067d23c9 | 26318 | |
067d23c9 | 26319 | |
067d23c9 | 26320 | |
067d23c9 | 26321 | |
067d23c9 | 26322 | |
067d23c9 | 26323 | |
067d23c9 | 26324 | |
3e0be4ab GM |
26325 | |
26326 | ||
26327 | ||
26328 | ||
26329 | ||
26330 | ||
3e0be4ab | 26331 | |
5476a9a4 GM |
26332 | if test $gl_cv_have_include_next = yes; then |
26333 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
26334 | else | |
26335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
26336 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
26337 | if test "${gl_cv_next_stdlib_h+set}" = set; then : | |
067d23c9 KY |
26338 | $as_echo_n "(cached) " >&6 |
26339 | else | |
5476a9a4 GM |
26340 | |
26341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 26342 | /* end confdefs.h. */ |
5476a9a4 GM |
26343 | #include <stdlib.h> |
26344 | ||
f199cab1 | 26345 | _ACEOF |
5476a9a4 GM |
26346 | case "$host_os" in |
26347 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26348 | *) gl_absname_cpp="$ac_cpp" ;; | |
26349 | esac | |
067d23c9 | 26350 | |
5476a9a4 GM |
26351 | case "$host_os" in |
26352 | mingw*) | |
26353 | gl_dirsep_regex='[/\\]' | |
26354 | ;; | |
26355 | *) | |
26356 | gl_dirsep_regex='\/' | |
26357 | ;; | |
26358 | esac | |
26359 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
26360 | ||
26361 | gl_header_literal_regex=`echo 'stdlib.h' \ | |
26362 | | sed -e "$gl_make_literal_regex_sed"` | |
26363 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26364 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26365 | s|^/[^/]|//&| | |
26366 | p | |
26367 | q | |
26368 | }' | |
26369 | gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26370 | sed -n "$gl_absolute_header_sed"`'"' | |
3e0be4ab | 26371 | |
067d23c9 | 26372 | |
f199cab1 | 26373 | fi |
5476a9a4 GM |
26374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 |
26375 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
26376 | fi | |
26377 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
b0415a03 | 26378 | |
5476a9a4 GM |
26379 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
26380 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26381 | gl_next_as_first_directive='<'stdlib.h'>' | |
26382 | else | |
26383 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26384 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
26385 | fi | |
26386 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
b0415a03 | 26387 | |
067d23c9 | 26388 | |
067d23c9 | 26389 | |
067d23c9 | 26390 | |
067d23c9 | 26391 | |
067d23c9 | 26392 | |
067d23c9 | 26393 | |
067d23c9 | 26394 | |
067d23c9 | 26395 | |
5476a9a4 | 26396 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. |
067d23c9 | 26397 | |
067d23c9 | 26398 | |
067d23c9 | 26399 | |
b0415a03 GM |
26400 | |
26401 | ||
ac1ca7e9 | 26402 | |
0eb775a3 | 26403 | |
5476a9a4 | 26404 | $as_echo "#define my_strftime nstrftime" >>confdefs.h |
067d23c9 | 26405 | |
067d23c9 | 26406 | |
a0a61e58 GM |
26407 | |
26408 | ||
26409 | ||
3e0be4ab | 26410 | |
5476a9a4 GM |
26411 | |
26412 | ||
283c7aed GM |
26413 | |
26414 | ||
26415 | ||
5476a9a4 GM |
26416 | if test "$ac_cv_have_decl_strtoimax" != yes; then |
26417 | HAVE_DECL_STRTOIMAX=0 | |
26418 | fi | |
26419 | ||
26420 | if test $ac_cv_func_strtoimax = yes; then | |
26421 | HAVE_STRTOIMAX=1 | |
26422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5 | |
26423 | $as_echo_n "checking whether strtoimax works... " >&6; } | |
26424 | if test "${gl_cv_func_strtoimax+set}" = set; then : | |
f199cab1 GM |
26425 | $as_echo_n "(cached) " >&6 |
26426 | else | |
26427 | if test "$cross_compiling" = yes; then : | |
5476a9a4 GM |
26428 | case "$host_os" in |
26429 | # Guess no on AIX 5. | |
26430 | aix5*) gl_cv_func_strtoimax="guessing no" ;; | |
26431 | # Guess yes otherwise. | |
26432 | *) gl_cv_func_strtoimax="guessing yes" ;; | |
26433 | esac | |
26434 | ||
f199cab1 GM |
26435 | else |
26436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26437 | /* end confdefs.h. */ | |
3e0be4ab | 26438 | |
5476a9a4 GM |
26439 | #include <errno.h> |
26440 | #include <string.h> | |
26441 | #include <inttypes.h> | |
26442 | int main () | |
26443 | { | |
26444 | if (sizeof (intmax_t) > sizeof (int)) | |
26445 | { | |
26446 | const char *s = "4294967295"; | |
26447 | char *p; | |
26448 | intmax_t res; | |
26449 | errno = 0; | |
26450 | res = strtoimax (s, &p, 10); | |
26451 | if (p != s + strlen (s)) | |
26452 | return 1; | |
26453 | if (errno != 0) | |
26454 | return 2; | |
26455 | if (res != (intmax_t) 65535 * (intmax_t) 65537) | |
26456 | return 3; | |
26457 | } | |
26458 | else | |
26459 | { | |
26460 | const char *s = "2147483647"; | |
26461 | char *p; | |
26462 | intmax_t res; | |
26463 | errno = 0; | |
26464 | res = strtoimax (s, &p, 10); | |
26465 | if (p != s + strlen (s)) | |
26466 | return 1; | |
26467 | if (errno != 0) | |
26468 | return 2; | |
26469 | if (res != 2147483647) | |
26470 | return 3; | |
26471 | } | |
f199cab1 GM |
26472 | return 0; |
26473 | } | |
5476a9a4 | 26474 | |
f199cab1 GM |
26475 | _ACEOF |
26476 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 26477 | gl_cv_func_strtoimax=yes |
f199cab1 | 26478 | else |
5476a9a4 | 26479 | gl_cv_func_strtoimax=no |
f199cab1 GM |
26480 | fi |
26481 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26482 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 KY |
26483 | fi |
26484 | ||
3e0be4ab | 26485 | |
f199cab1 | 26486 | fi |
5476a9a4 GM |
26487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5 |
26488 | $as_echo "$gl_cv_func_strtoimax" >&6; } | |
26489 | case "$gl_cv_func_strtoimax" in | |
26490 | *no) REPLACE_STRTOIMAX=1 ;; | |
26491 | esac | |
26492 | else | |
26493 | HAVE_STRTOIMAX=0 | |
26494 | fi | |
067d23c9 | 26495 | |
a6342fc8 | 26496 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then |
067d23c9 | 26497 | |
067d23c9 | 26498 | |
067d23c9 | 26499 | |
067d23c9 | 26500 | |
067d23c9 | 26501 | |
3e0be4ab | 26502 | |
2b1928b8 GM |
26503 | |
26504 | ||
5476a9a4 GM |
26505 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" |
26506 | ||
26507 | ||
26508 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
26509 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
26510 | ac_have_decl=1 | |
f199cab1 | 26511 | else |
5476a9a4 | 26512 | ac_have_decl=0 |
f199cab1 | 26513 | fi |
2b1928b8 | 26514 | |
5476a9a4 GM |
26515 | cat >>confdefs.h <<_ACEOF |
26516 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
26517 | _ACEOF | |
26518 | ||
26519 | ||
067d23c9 | 26520 | |
a6342fc8 | 26521 | fi |
067d23c9 | 26522 | |
3e0be4ab GM |
26523 | |
26524 | ||
26525 | ||
3e0be4ab | 26526 | |
5476a9a4 | 26527 | GNULIB_STRTOIMAX=1 |
3e0be4ab GM |
26528 | |
26529 | ||
26530 | ||
26531 | ||
3e0be4ab GM |
26532 | |
26533 | ||
26534 | ||
f199cab1 | 26535 | |
f199cab1 | 26536 | |
5476a9a4 GM |
26537 | if test "$ac_cv_have_decl_strtoumax" != yes; then |
26538 | HAVE_DECL_STRTOUMAX=0 | |
26539 | fi | |
067d23c9 | 26540 | |
a6342fc8 | 26541 | if test $ac_cv_func_strtoumax = no; then |
0eb775a3 | 26542 | |
5476a9a4 GM |
26543 | |
26544 | ||
26545 | ||
26546 | ||
26547 | ||
26548 | ||
26549 | ||
26550 | gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" | |
26551 | ||
26552 | ||
26553 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
26554 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
26555 | ac_have_decl=1 | |
067d23c9 | 26556 | else |
5476a9a4 | 26557 | ac_have_decl=0 |
067d23c9 | 26558 | fi |
5476a9a4 GM |
26559 | |
26560 | cat >>confdefs.h <<_ACEOF | |
26561 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
26562 | _ACEOF | |
26563 | ||
26564 | ||
26565 | ||
a6342fc8 | 26566 | fi |
067d23c9 | 26567 | |
067d23c9 | 26568 | |
067d23c9 | 26569 | |
067d23c9 | 26570 | |
067d23c9 | 26571 | |
5476a9a4 GM |
26572 | GNULIB_STRTOUMAX=1 |
26573 | ||
26574 | ||
26575 | ||
26576 | ||
26577 | ||
26578 | ||
26579 | ||
26580 | if test $ac_cv_func_symlink = no; then | |
26581 | HAVE_SYMLINK=0 | |
26582 | else | |
26583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | |
26584 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | |
26585 | if test "${gl_cv_func_symlink_works+set}" = set; then : | |
f199cab1 | 26586 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
26587 | else |
26588 | if test "$cross_compiling" = yes; then : | |
26589 | case "$host_os" in | |
26590 | # Guess yes on glibc systems. | |
26591 | *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; | |
26592 | # If we don't know, assume the worst. | |
26593 | *) gl_cv_func_symlink_works="guessing no" ;; | |
26594 | esac | |
26595 | ||
f199cab1 GM |
26596 | else |
26597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26598 | /* end confdefs.h. */ | |
5476a9a4 GM |
26599 | #include <unistd.h> |
26600 | ||
f199cab1 GM |
26601 | int |
26602 | main () | |
26603 | { | |
5476a9a4 GM |
26604 | int result = 0; |
26605 | if (!symlink ("a", "conftest.link/")) | |
26606 | result |= 1; | |
26607 | if (symlink ("conftest.f", "conftest.lnk2")) | |
26608 | result |= 2; | |
26609 | else if (!symlink ("a", "conftest.lnk2/")) | |
26610 | result |= 4; | |
26611 | return result; | |
067d23c9 | 26612 | |
f199cab1 GM |
26613 | ; |
26614 | return 0; | |
26615 | } | |
26616 | _ACEOF | |
5476a9a4 GM |
26617 | if ac_fn_c_try_run "$LINENO"; then : |
26618 | gl_cv_func_symlink_works=yes | |
f199cab1 | 26619 | else |
5476a9a4 | 26620 | gl_cv_func_symlink_works=no |
f199cab1 | 26621 | fi |
5476a9a4 GM |
26622 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
26623 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 26624 | fi |
067d23c9 | 26625 | |
5476a9a4 | 26626 | rm -f conftest.f conftest.link conftest.lnk2 |
f199cab1 | 26627 | fi |
5476a9a4 GM |
26628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 |
26629 | $as_echo "$gl_cv_func_symlink_works" >&6; } | |
26630 | case "$gl_cv_func_symlink_works" in | |
26631 | *yes) ;; | |
26632 | *) | |
26633 | REPLACE_SYMLINK=1 | |
26634 | ;; | |
26635 | esac | |
26636 | fi | |
067d23c9 | 26637 | |
a6342fc8 | 26638 | if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then |
067d23c9 | 26639 | |
7e723570 | 26640 | |
7e723570 GM |
26641 | |
26642 | ||
dd0d840e | 26643 | |
dd0d840e GM |
26644 | |
26645 | ||
26646 | ||
5476a9a4 | 26647 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" |
dd0d840e | 26648 | |
a6342fc8 | 26649 | fi |
dd0d840e GM |
26650 | |
26651 | ||
d3127c14 GM |
26652 | |
26653 | ||
d3127c14 | 26654 | |
5476a9a4 | 26655 | GNULIB_SYMLINK=1 |
d3127c14 | 26656 | |
d3127c14 | 26657 | |
d3127c14 GM |
26658 | |
26659 | ||
067d23c9 | 26660 | |
067d23c9 | 26661 | |
d3127c14 | 26662 | |
d3127c14 | 26663 | |
5476a9a4 GM |
26664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 |
26665 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
26666 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
26667 | $as_echo_n "(cached) " >&6 | |
26668 | else | |
d3127c14 | 26669 | |
5476a9a4 GM |
26670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
26671 | /* end confdefs.h. */ | |
26672 | #include <sys/select.h> | |
26673 | int | |
26674 | main () | |
26675 | { | |
26676 | struct timeval b; | |
26677 | ; | |
26678 | return 0; | |
26679 | } | |
26680 | _ACEOF | |
26681 | if ac_fn_c_try_compile "$LINENO"; then : | |
26682 | gl_cv_header_sys_select_h_selfcontained=yes | |
26683 | else | |
26684 | gl_cv_header_sys_select_h_selfcontained=no | |
26685 | fi | |
26686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26687 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then | |
26688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26689 | /* end confdefs.h. */ | |
26690 | #include <sys/select.h> | |
26691 | int | |
26692 | main () | |
26693 | { | |
26694 | int memset; int bzero; | |
26695 | ; | |
26696 | return 0; | |
26697 | } | |
3e0be4ab | 26698 | |
5476a9a4 GM |
26699 | _ACEOF |
26700 | if ac_fn_c_try_compile "$LINENO"; then : | |
26701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26702 | /* end confdefs.h. */ | |
26703 | #include <sys/select.h> | |
26704 | int | |
26705 | main () | |
26706 | { | |
dd0d840e | 26707 | |
5476a9a4 GM |
26708 | #undef memset |
26709 | #define memset nonexistent_memset | |
26710 | extern | |
26711 | #ifdef __cplusplus | |
26712 | "C" | |
26713 | #endif | |
26714 | void *memset (void *, int, unsigned long); | |
26715 | #undef bzero | |
26716 | #define bzero nonexistent_bzero | |
26717 | extern | |
26718 | #ifdef __cplusplus | |
26719 | "C" | |
26720 | #endif | |
26721 | void bzero (void *, unsigned long); | |
26722 | fd_set fds; | |
26723 | FD_ZERO (&fds); | |
3e0be4ab | 26724 | |
5476a9a4 GM |
26725 | ; |
26726 | return 0; | |
26727 | } | |
067d23c9 | 26728 | |
5476a9a4 GM |
26729 | _ACEOF |
26730 | if ac_fn_c_try_link "$LINENO"; then : | |
dd0d840e | 26731 | |
5476a9a4 GM |
26732 | else |
26733 | gl_cv_header_sys_select_h_selfcontained=no | |
26734 | fi | |
26735 | rm -f core conftest.err conftest.$ac_objext \ | |
26736 | conftest$ac_exeext conftest.$ac_ext | |
dd0d840e | 26737 | |
5476a9a4 GM |
26738 | fi |
26739 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
26740 | fi | |
dd0d840e | 26741 | |
5476a9a4 GM |
26742 | fi |
26743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 | |
26744 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
dd0d840e | 26745 | |
dd0d840e GM |
26746 | |
26747 | ||
dd0d840e GM |
26748 | |
26749 | ||
dd0d840e GM |
26750 | |
26751 | ||
26752 | ||
dd0d840e | 26753 | |
5476a9a4 GM |
26754 | if test $gl_cv_have_include_next = yes; then |
26755 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
26756 | else | |
26757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
26758 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
26759 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
26760 | $as_echo_n "(cached) " >&6 | |
26761 | else | |
dd0d840e | 26762 | |
5476a9a4 | 26763 | if test $ac_cv_header_sys_select_h = yes; then |
dd0d840e | 26764 | |
dd0d840e | 26765 | |
5476a9a4 GM |
26766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
26767 | /* end confdefs.h. */ | |
26768 | #include <sys/select.h> | |
dd0d840e | 26769 | |
5476a9a4 GM |
26770 | _ACEOF |
26771 | case "$host_os" in | |
26772 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26773 | *) gl_absname_cpp="$ac_cpp" ;; | |
26774 | esac | |
dd0d840e | 26775 | |
5476a9a4 GM |
26776 | case "$host_os" in |
26777 | mingw*) | |
26778 | gl_dirsep_regex='[/\\]' | |
26779 | ;; | |
26780 | *) | |
26781 | gl_dirsep_regex='\/' | |
26782 | ;; | |
26783 | esac | |
26784 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 26785 | |
5476a9a4 GM |
26786 | gl_header_literal_regex=`echo 'sys/select.h' \ |
26787 | | sed -e "$gl_make_literal_regex_sed"` | |
26788 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26789 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26790 | s|^/[^/]|//&| | |
26791 | p | |
26792 | q | |
26793 | }' | |
26794 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26795 | sed -n "$gl_absolute_header_sed"`'"' | |
26796 | else | |
26797 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
26798 | fi | |
067d23c9 | 26799 | |
067d23c9 | 26800 | |
5476a9a4 GM |
26801 | fi |
26802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 | |
26803 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
26804 | fi | |
26805 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
26806 | ||
26807 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
26808 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26809 | gl_next_as_first_directive='<'sys/select.h'>' | |
26810 | else | |
26811 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26812 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
26813 | fi | |
26814 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
26815 | ||
26816 | ||
26817 | ||
26818 | ||
26819 | if test $ac_cv_header_sys_select_h = yes; then | |
26820 | HAVE_SYS_SELECT_H=1 | |
26821 | else | |
26822 | HAVE_SYS_SELECT_H=0 | |
26823 | fi | |
067d23c9 KY |
26824 | |
26825 | ||
7e723570 | 26826 | |
7e723570 | 26827 | |
7e723570 | 26828 | |
5476a9a4 GM |
26829 | if test $ac_cv_header_sys_socket_h != yes; then |
26830 | for ac_header in winsock2.h | |
26831 | do : | |
26832 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
26833 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
26834 | cat >>confdefs.h <<_ACEOF | |
26835 | #define HAVE_WINSOCK2_H 1 | |
26836 | _ACEOF | |
7e723570 | 26837 | |
5476a9a4 | 26838 | fi |
7e723570 | 26839 | |
5476a9a4 | 26840 | done |
7e723570 | 26841 | |
5476a9a4 GM |
26842 | fi |
26843 | if test "$ac_cv_header_winsock2_h" = yes; then | |
26844 | HAVE_WINSOCK2_H=1 | |
26845 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
26846 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
26847 | else | |
26848 | HAVE_WINSOCK2_H=0 | |
26849 | fi | |
7e723570 GM |
26850 | |
26851 | ||
dd0d840e | 26852 | |
dd0d840e | 26853 | |
dd0d840e GM |
26854 | |
26855 | ||
dd0d840e | 26856 | |
dd0d840e | 26857 | |
dd0d840e GM |
26858 | |
26859 | ||
26860 | ||
26861 | ||
26862 | ||
26863 | ||
26864 | ||
26865 | ||
dd0d840e | 26866 | |
dd0d840e | 26867 | |
dd0d840e | 26868 | |
dd0d840e | 26869 | |
5476a9a4 GM |
26870 | if test $gl_cv_have_include_next = yes; then |
26871 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
26872 | else | |
26873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
26874 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
26875 | if test "${gl_cv_next_sys_stat_h+set}" = set; then : | |
26876 | $as_echo_n "(cached) " >&6 | |
26877 | else | |
dd0d840e | 26878 | |
5476a9a4 | 26879 | if test $ac_cv_header_sys_stat_h = yes; then |
dd0d840e | 26880 | |
dd0d840e | 26881 | |
5476a9a4 GM |
26882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
26883 | /* end confdefs.h. */ | |
26884 | #include <sys/stat.h> | |
dd0d840e | 26885 | |
5476a9a4 GM |
26886 | _ACEOF |
26887 | case "$host_os" in | |
26888 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
26889 | *) gl_absname_cpp="$ac_cpp" ;; | |
26890 | esac | |
dd0d840e | 26891 | |
5476a9a4 GM |
26892 | case "$host_os" in |
26893 | mingw*) | |
26894 | gl_dirsep_regex='[/\\]' | |
26895 | ;; | |
26896 | *) | |
26897 | gl_dirsep_regex='\/' | |
26898 | ;; | |
26899 | esac | |
26900 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 26901 | |
5476a9a4 GM |
26902 | gl_header_literal_regex=`echo 'sys/stat.h' \ |
26903 | | sed -e "$gl_make_literal_regex_sed"` | |
26904 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
26905 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
26906 | s|^/[^/]|//&| | |
26907 | p | |
26908 | q | |
26909 | }' | |
26910 | gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
26911 | sed -n "$gl_absolute_header_sed"`'"' | |
26912 | else | |
26913 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
26914 | fi | |
dd0d840e | 26915 | |
dd0d840e | 26916 | |
5476a9a4 GM |
26917 | fi |
26918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
26919 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
26920 | fi | |
26921 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
dd0d840e | 26922 | |
5476a9a4 GM |
26923 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
26924 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
26925 | gl_next_as_first_directive='<'sys/stat.h'>' | |
26926 | else | |
26927 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
26928 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
26929 | fi | |
26930 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
dd0d840e | 26931 | |
dd0d840e | 26932 | |
d3127c14 | 26933 | |
d3127c14 | 26934 | |
dd0d840e | 26935 | |
dd0d840e | 26936 | |
dd0d840e | 26937 | |
dd0d840e | 26938 | |
dd0d840e | 26939 | |
dd0d840e | 26940 | |
dd0d840e | 26941 | |
5476a9a4 | 26942 | if test $WINDOWS_64_BIT_ST_SIZE = 1; then |
dd0d840e | 26943 | |
5476a9a4 | 26944 | $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h |
dd0d840e | 26945 | |
5476a9a4 | 26946 | fi |
dd0d840e | 26947 | |
5476a9a4 GM |
26948 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> |
26949 | #include <sys/stat.h> | |
26950 | " | |
26951 | if test "x$ac_cv_type_nlink_t" = x""yes; then : | |
dd0d840e | 26952 | |
5476a9a4 | 26953 | else |
dd0d840e | 26954 | |
5476a9a4 | 26955 | $as_echo "#define nlink_t int" >>confdefs.h |
dd0d840e | 26956 | |
5476a9a4 | 26957 | fi |
dd0d840e | 26958 | |
dd0d840e | 26959 | |
dd0d840e | 26960 | |
dd0d840e | 26961 | |
dd0d840e | 26962 | |
dd0d840e | 26963 | |
dd0d840e | 26964 | |
c9ca3f76 | 26965 | |
dd0d840e | 26966 | |
dd0d840e | 26967 | |
dd0d840e | 26968 | |
c9ca3f76 | 26969 | |
dd0d840e | 26970 | |
dd0d840e GM |
26971 | |
26972 | ||
7e723570 GM |
26973 | |
26974 | ||
7e723570 | 26975 | |
5476a9a4 GM |
26976 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h> |
26977 | " | |
26978 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : | |
26979 | ac_have_decl=1 | |
26980 | else | |
26981 | ac_have_decl=0 | |
26982 | fi | |
7e723570 | 26983 | |
5476a9a4 GM |
26984 | cat >>confdefs.h <<_ACEOF |
26985 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
26986 | _ACEOF | |
7e723570 | 26987 | |
5476a9a4 GM |
26988 | if test $ac_cv_have_decl_localtime_r = no; then |
26989 | HAVE_DECL_LOCALTIME_R=0 | |
26990 | fi | |
7e723570 | 26991 | |
7e723570 | 26992 | |
5476a9a4 GM |
26993 | if test $ac_cv_func_localtime_r = yes; then |
26994 | HAVE_LOCALTIME_R=1 | |
26995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
26996 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
26997 | if test "${gl_cv_time_r_posix+set}" = set; then : | |
26998 | $as_echo_n "(cached) " >&6 | |
26999 | else | |
27000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27001 | /* end confdefs.h. */ | |
27002 | #include <time.h> | |
7e723570 GM |
27003 | int |
27004 | main () | |
27005 | { | |
5476a9a4 GM |
27006 | /* We don't need to append 'restrict's to the argument types, |
27007 | even though the POSIX signature has the 'restrict's, | |
27008 | since C99 says they can't affect type compatibility. */ | |
27009 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
27010 | if (ptr) return 0; | |
27011 | /* Check the return type is a pointer. | |
27012 | On HP-UX 10 it is 'int'. */ | |
27013 | *localtime_r (0, 0); | |
7e723570 GM |
27014 | ; |
27015 | return 0; | |
27016 | } | |
5476a9a4 | 27017 | |
7e723570 | 27018 | _ACEOF |
5476a9a4 GM |
27019 | if ac_fn_c_try_compile "$LINENO"; then : |
27020 | gl_cv_time_r_posix=yes | |
7e723570 | 27021 | else |
5476a9a4 | 27022 | gl_cv_time_r_posix=no |
7e723570 | 27023 | fi |
5476a9a4 | 27024 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
02bd7257 | 27025 | |
5476a9a4 GM |
27026 | fi |
27027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
27028 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
27029 | if test $gl_cv_time_r_posix = yes; then | |
27030 | REPLACE_LOCALTIME_R=0 | |
27031 | else | |
27032 | REPLACE_LOCALTIME_R=1 | |
27033 | fi | |
27034 | else | |
27035 | HAVE_LOCALTIME_R=0 | |
27036 | fi | |
02bd7257 | 27037 | |
a6342fc8 | 27038 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then |
02bd7257 GM |
27039 | |
27040 | ||
02bd7257 | 27041 | |
02bd7257 | 27042 | |
02bd7257 | 27043 | |
02bd7257 | 27044 | |
7e723570 | 27045 | |
7e723570 | 27046 | |
5476a9a4 GM |
27047 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
27048 | ||
27049 | ||
27050 | : | |
7e723570 | 27051 | |
a6342fc8 | 27052 | fi |
7e723570 | 27053 | |
7e723570 | 27054 | |
7e723570 | 27055 | |
7e723570 | 27056 | |
7e723570 | 27057 | |
5476a9a4 | 27058 | GNULIB_TIME_R=1 |
7e723570 | 27059 | |
7e723570 | 27060 | |
7e723570 | 27061 | |
7e723570 | 27062 | |
7e723570 | 27063 | |
f077f61d GM |
27064 | |
27065 | ||
27066 | ||
27067 | ||
27068 | ||
27069 | LIB_TIMER_TIME= | |
27070 | ||
27071 | gl_saved_libs=$LIBS | |
27072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5 | |
27073 | $as_echo_n "checking for library containing timer_settime... " >&6; } | |
27074 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
27075 | $as_echo_n "(cached) " >&6 | |
27076 | else | |
27077 | ac_func_search_save_LIBS=$LIBS | |
27078 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27079 | /* end confdefs.h. */ | |
27080 | ||
27081 | /* Override any GCC internal prototype to avoid an error. | |
27082 | Use char because int might match the return type of a GCC | |
27083 | builtin and then its argument prototype would still apply. */ | |
27084 | #ifdef __cplusplus | |
27085 | extern "C" | |
27086 | #endif | |
27087 | char timer_settime (); | |
27088 | int | |
27089 | main () | |
27090 | { | |
27091 | return timer_settime (); | |
27092 | ; | |
27093 | return 0; | |
27094 | } | |
27095 | _ACEOF | |
27096 | for ac_lib in '' rt posix4; do | |
27097 | if test -z "$ac_lib"; then | |
27098 | ac_res="none required" | |
27099 | else | |
27100 | ac_res=-l$ac_lib | |
27101 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
27102 | fi | |
27103 | if ac_fn_c_try_link "$LINENO"; then : | |
27104 | ac_cv_search_timer_settime=$ac_res | |
27105 | fi | |
27106 | rm -f core conftest.err conftest.$ac_objext \ | |
27107 | conftest$ac_exeext | |
27108 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
27109 | break | |
27110 | fi | |
27111 | done | |
27112 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
27113 | ||
27114 | else | |
27115 | ac_cv_search_timer_settime=no | |
27116 | fi | |
27117 | rm conftest.$ac_ext | |
27118 | LIBS=$ac_func_search_save_LIBS | |
27119 | fi | |
27120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5 | |
27121 | $as_echo "$ac_cv_search_timer_settime" >&6; } | |
27122 | ac_res=$ac_cv_search_timer_settime | |
27123 | if test "$ac_res" != no; then : | |
27124 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
27125 | test "$ac_cv_search_timer_settime" = "none required" || | |
27126 | LIB_TIMER_TIME=$ac_cv_search_timer_settime | |
27127 | fi | |
27128 | ||
27129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27130 | /* end confdefs.h. */ | |
27131 | ||
27132 | #include <features.h> | |
27133 | #ifdef __GNU_LIBRARY__ | |
27134 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \ | |
27135 | && !defined __UCLIBC__ | |
27136 | Thread emulation available | |
27137 | #endif | |
27138 | #endif | |
27139 | ||
27140 | _ACEOF | |
27141 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
27142 | $EGREP "Thread" >/dev/null 2>&1; then : | |
27143 | LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD" | |
27144 | fi | |
27145 | rm -f conftest* | |
27146 | ||
27147 | for ac_func in timer_settime | |
27148 | do : | |
27149 | ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime" | |
27150 | if test "x$ac_cv_func_timer_settime" = x""yes; then : | |
27151 | cat >>confdefs.h <<_ACEOF | |
27152 | #define HAVE_TIMER_SETTIME 1 | |
27153 | _ACEOF | |
27154 | ||
27155 | fi | |
27156 | done | |
27157 | ||
27158 | LIBS=$gl_saved_libs | |
27159 | ||
a6342fc8 | 27160 | : |
7e723570 | 27161 | |
02bd7257 | 27162 | |
02bd7257 | 27163 | |
02bd7257 | 27164 | |
02bd7257 | 27165 | |
02bd7257 | 27166 | |
02bd7257 | 27167 | |
02bd7257 | 27168 | |
dd0d840e GM |
27169 | |
27170 | ||
27171 | ||
dd0d840e | 27172 | |
5476a9a4 GM |
27173 | if test $gl_cv_have_include_next = yes; then |
27174 | gl_cv_next_unistd_h='<'unistd.h'>' | |
27175 | else | |
27176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
27177 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
27178 | if test "${gl_cv_next_unistd_h+set}" = set; then : | |
27179 | $as_echo_n "(cached) " >&6 | |
27180 | else | |
dd0d840e | 27181 | |
5476a9a4 | 27182 | if test $ac_cv_header_unistd_h = yes; then |
dd0d840e | 27183 | |
dd0d840e | 27184 | |
5476a9a4 | 27185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3127c14 | 27186 | /* end confdefs.h. */ |
5476a9a4 | 27187 | #include <unistd.h> |
d3127c14 | 27188 | |
5476a9a4 GM |
27189 | _ACEOF |
27190 | case "$host_os" in | |
27191 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
27192 | *) gl_absname_cpp="$ac_cpp" ;; | |
27193 | esac | |
d3127c14 | 27194 | |
5476a9a4 GM |
27195 | case "$host_os" in |
27196 | mingw*) | |
27197 | gl_dirsep_regex='[/\\]' | |
27198 | ;; | |
27199 | *) | |
27200 | gl_dirsep_regex='\/' | |
27201 | ;; | |
27202 | esac | |
27203 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
27204 | ||
27205 | gl_header_literal_regex=`echo 'unistd.h' \ | |
27206 | | sed -e "$gl_make_literal_regex_sed"` | |
27207 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
27208 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
27209 | s|^/[^/]|//&| | |
27210 | p | |
27211 | q | |
27212 | }' | |
27213 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
27214 | sed -n "$gl_absolute_header_sed"`'"' | |
27215 | else | |
27216 | gl_cv_next_unistd_h='<'unistd.h'>' | |
27217 | fi | |
d3127c14 | 27218 | |
d3127c14 | 27219 | |
c9ca3f76 | 27220 | fi |
5476a9a4 GM |
27221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 |
27222 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
27223 | fi | |
27224 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
c9ca3f76 | 27225 | |
5476a9a4 GM |
27226 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
27227 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
27228 | gl_next_as_first_directive='<'unistd.h'>' | |
27229 | else | |
27230 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
27231 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
27232 | fi | |
27233 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
c9ca3f76 | 27234 | |
c9ca3f76 | 27235 | |
c9ca3f76 | 27236 | |
c9ca3f76 | 27237 | |
5476a9a4 GM |
27238 | if test $ac_cv_header_unistd_h = yes; then |
27239 | HAVE_UNISTD_H=1 | |
27240 | else | |
27241 | HAVE_UNISTD_H=0 | |
27242 | fi | |
c9ca3f76 | 27243 | |
d3127c14 | 27244 | |
dd0d840e | 27245 | |
dd0d840e | 27246 | |
d3127c14 | 27247 | |
d3127c14 | 27248 | |
dd0d840e GM |
27249 | |
27250 | ||
c9ca3f76 GM |
27251 | |
27252 | ||
27253 | ||
b5591ebb GM |
27254 | if test $ac_cv_have_decl_unsetenv = no; then |
27255 | HAVE_DECL_UNSETENV=0 | |
27256 | fi | |
27257 | for ac_func in unsetenv | |
27258 | do : | |
27259 | ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" | |
27260 | if test "x$ac_cv_func_unsetenv" = x""yes; then : | |
27261 | cat >>confdefs.h <<_ACEOF | |
27262 | #define HAVE_UNSETENV 1 | |
27263 | _ACEOF | |
27264 | ||
27265 | fi | |
27266 | done | |
27267 | ||
27268 | if test $ac_cv_func_unsetenv = no; then | |
27269 | HAVE_UNSETENV=0 | |
27270 | else | |
27271 | HAVE_UNSETENV=1 | |
27272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 | |
27273 | $as_echo_n "checking for unsetenv() return type... " >&6; } | |
27274 | if test "${gt_cv_func_unsetenv_ret+set}" = set; then : | |
27275 | $as_echo_n "(cached) " >&6 | |
27276 | else | |
27277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27278 | /* end confdefs.h. */ | |
27279 | ||
27280 | #undef _BSD | |
27281 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | |
27282 | #include <stdlib.h> | |
27283 | extern | |
27284 | #ifdef __cplusplus | |
27285 | "C" | |
27286 | #endif | |
27287 | int unsetenv (const char *name); | |
27288 | ||
27289 | int | |
27290 | main () | |
27291 | { | |
27292 | ||
27293 | ; | |
27294 | return 0; | |
27295 | } | |
27296 | _ACEOF | |
27297 | if ac_fn_c_try_compile "$LINENO"; then : | |
27298 | gt_cv_func_unsetenv_ret='int' | |
27299 | else | |
27300 | gt_cv_func_unsetenv_ret='void' | |
27301 | fi | |
27302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
27303 | fi | |
27304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 | |
27305 | $as_echo "$gt_cv_func_unsetenv_ret" >&6; } | |
27306 | if test $gt_cv_func_unsetenv_ret = 'void'; then | |
27307 | ||
27308 | $as_echo "#define VOID_UNSETENV 1" >>confdefs.h | |
27309 | ||
27310 | REPLACE_UNSETENV=1 | |
27311 | fi | |
27312 | ||
27313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 | |
27314 | $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } | |
27315 | if test "${gl_cv_func_unsetenv_works+set}" = set; then : | |
27316 | $as_echo_n "(cached) " >&6 | |
27317 | else | |
27318 | if test "$cross_compiling" = yes; then : | |
27319 | case "$host_os" in | |
27320 | # Guess yes on glibc systems. | |
27321 | *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; | |
27322 | # If we don't know, assume the worst. | |
27323 | *) gl_cv_func_unsetenv_works="guessing no" ;; | |
27324 | esac | |
27325 | ||
27326 | else | |
27327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27328 | /* end confdefs.h. */ | |
27329 | ||
27330 | #include <stdlib.h> | |
27331 | #include <errno.h> | |
27332 | extern char **environ; | |
27333 | ||
27334 | int | |
27335 | main () | |
27336 | { | |
27337 | ||
27338 | char entry1[] = "a=1"; | |
27339 | char entry2[] = "b=2"; | |
27340 | char *env[] = { entry1, entry2, NULL }; | |
27341 | if (putenv ((char *) "a=1")) return 1; | |
27342 | if (putenv (entry2)) return 2; | |
27343 | entry2[0] = 'a'; | |
27344 | unsetenv ("a"); | |
27345 | if (getenv ("a")) return 3; | |
27346 | if (!unsetenv ("") || errno != EINVAL) return 4; | |
27347 | entry2[0] = 'b'; | |
27348 | environ = env; | |
27349 | if (!getenv ("a")) return 5; | |
27350 | entry2[0] = 'a'; | |
27351 | unsetenv ("a"); | |
27352 | if (getenv ("a")) return 6; | |
27353 | ||
27354 | ; | |
27355 | return 0; | |
27356 | } | |
27357 | _ACEOF | |
27358 | if ac_fn_c_try_run "$LINENO"; then : | |
27359 | gl_cv_func_unsetenv_works=yes | |
27360 | else | |
27361 | gl_cv_func_unsetenv_works=no | |
27362 | fi | |
27363 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27364 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27365 | fi | |
27366 | ||
27367 | fi | |
27368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 | |
27369 | $as_echo "$gl_cv_func_unsetenv_works" >&6; } | |
27370 | case "$gl_cv_func_unsetenv_works" in | |
27371 | *yes) ;; | |
27372 | *) | |
27373 | REPLACE_UNSETENV=1 | |
27374 | ;; | |
27375 | esac | |
27376 | fi | |
27377 | ||
27378 | if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then | |
27379 | ||
27380 | ||
27381 | ||
27382 | ||
27383 | ||
27384 | ||
27385 | ||
27386 | ||
27387 | gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" | |
27388 | ||
27389 | ||
27390 | ||
27391 | ||
27392 | ||
27393 | fi | |
27394 | ||
27395 | ||
27396 | ||
27397 | ||
27398 | ||
27399 | GNULIB_UNSETENV=1 | |
27400 | ||
27401 | ||
27402 | ||
27403 | ||
27404 | ||
27405 | ||
27406 | ||
27407 | ||
c9ca3f76 GM |
27408 | |
27409 | ||
c9ca3f76 | 27410 | |
5476a9a4 GM |
27411 | if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then |
27412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5 | |
27413 | $as_echo_n "checking whether futimesat handles NULL file... " >&6; } | |
27414 | if test "${gl_cv_func_futimesat_works+set}" = set; then : | |
27415 | $as_echo_n "(cached) " >&6 | |
27416 | else | |
27417 | touch conftest.file | |
27418 | if test "$cross_compiling" = yes; then : | |
27419 | case "$host_os" in | |
27420 | # Guess yes on glibc systems. | |
27421 | *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; | |
27422 | # If we don't know, assume the worst. | |
27423 | *) gl_cv_func_futimesat_works="guessing no" ;; | |
27424 | esac | |
c9ca3f76 | 27425 | |
5476a9a4 GM |
27426 | else |
27427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c9ca3f76 GM |
27428 | /* end confdefs.h. */ |
27429 | ||
5476a9a4 GM |
27430 | #include <stddef.h> |
27431 | #include <sys/times.h> | |
27432 | #include <fcntl.h> | |
c9ca3f76 GM |
27433 | |
27434 | int | |
27435 | main () | |
27436 | { | |
5476a9a4 GM |
27437 | int fd = open ("conftest.file", O_RDWR); |
27438 | if (fd < 0) return 1; | |
27439 | if (futimesat (fd, NULL, NULL)) return 2; | |
c9ca3f76 GM |
27440 | |
27441 | ; | |
27442 | return 0; | |
27443 | } | |
27444 | _ACEOF | |
5476a9a4 GM |
27445 | if ac_fn_c_try_run "$LINENO"; then : |
27446 | gl_cv_func_futimesat_works=yes | |
c9ca3f76 | 27447 | else |
5476a9a4 | 27448 | gl_cv_func_futimesat_works=no |
c9ca3f76 | 27449 | fi |
5476a9a4 GM |
27450 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
27451 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c9ca3f76 GM |
27452 | fi |
27453 | ||
5476a9a4 GM |
27454 | rm -f conftest.file |
27455 | fi | |
27456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5 | |
27457 | $as_echo "$gl_cv_func_futimesat_works" >&6; } | |
27458 | case "$gl_cv_func_futimesat_works" in | |
27459 | *yes) ;; | |
27460 | *) | |
7e723570 | 27461 | |
5476a9a4 | 27462 | $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h |
067d23c9 | 27463 | |
5476a9a4 GM |
27464 | ;; |
27465 | esac | |
27466 | fi | |
dd0d840e | 27467 | |
d7ad186c | 27468 | gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false |
5476a9a4 | 27469 | gl_gnulib_enabled_dosname=false |
710f5812 | 27470 | gl_gnulib_enabled_euidaccess=false |
0cdca42a | 27471 | gl_gnulib_enabled_getdtablesize=false |
710f5812 | 27472 | gl_gnulib_enabled_getgroups=false |
5476a9a4 | 27473 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false |
710f5812 | 27474 | gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false |
d7ad186c | 27475 | gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false |
5476a9a4 | 27476 | gl_gnulib_enabled_pathmax=false |
710f5812 | 27477 | gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false |
5476a9a4 GM |
27478 | gl_gnulib_enabled_stat=false |
27479 | gl_gnulib_enabled_strtoll=false | |
27480 | gl_gnulib_enabled_strtoull=false | |
710f5812 | 27481 | gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false |
d7ad186c GM |
27482 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b () |
27483 | { | |
27484 | if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then | |
27485 | ||
27486 | ||
27487 | ||
27488 | ||
27489 | ||
27490 | ||
27491 | ||
27492 | ||
27493 | gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" | |
27494 | ||
27495 | gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true | |
27496 | fi | |
27497 | } | |
5476a9a4 GM |
27498 | func_gl_gnulib_m4code_dosname () |
27499 | { | |
27500 | if ! $gl_gnulib_enabled_dosname; then | |
27501 | gl_gnulib_enabled_dosname=true | |
27502 | fi | |
27503 | } | |
710f5812 | 27504 | func_gl_gnulib_m4code_euidaccess () |
5476a9a4 | 27505 | { |
710f5812 | 27506 | if ! $gl_gnulib_enabled_euidaccess; then |
dd0d840e | 27507 | |
d3127c14 GM |
27508 | |
27509 | ||
27510 | ||
27511 | ||
710f5812 GM |
27512 | for ac_func in euidaccess |
27513 | do : | |
27514 | ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess" | |
27515 | if test "x$ac_cv_func_euidaccess" = x""yes; then : | |
27516 | cat >>confdefs.h <<_ACEOF | |
27517 | #define HAVE_EUIDACCESS 1 | |
27518 | _ACEOF | |
d3127c14 | 27519 | |
710f5812 GM |
27520 | fi |
27521 | done | |
d3127c14 | 27522 | |
710f5812 GM |
27523 | if test $ac_cv_func_euidaccess = no; then |
27524 | HAVE_EUIDACCESS=0 | |
27525 | fi | |
d3127c14 | 27526 | |
710f5812 GM |
27527 | if test $HAVE_EUIDACCESS = 0; then |
27528 | ||
27529 | ||
27530 | ||
27531 | ||
27532 | ||
27533 | ||
27534 | ||
27535 | ||
27536 | gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext" | |
27537 | ||
27538 | ||
27539 | ||
27540 | for ac_header in libgen.h | |
27541 | do : | |
27542 | ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default" | |
27543 | if test "x$ac_cv_header_libgen_h" = x""yes; then : | |
27544 | cat >>confdefs.h <<_ACEOF | |
27545 | #define HAVE_LIBGEN_H 1 | |
27546 | _ACEOF | |
27547 | ||
27548 | fi | |
27549 | ||
27550 | done | |
27551 | ||
27552 | ||
27553 | ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" | |
27554 | if test "x$ac_cv_func_getgroups" = x""yes; then : | |
27555 | ||
27556 | fi | |
27557 | ||
27558 | ||
27559 | # If we don't yet have getgroups, see if it's in -lbsd. | |
27560 | # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. | |
27561 | ac_save_LIBS=$LIBS | |
27562 | if test $ac_cv_func_getgroups = no; then | |
27563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 | |
27564 | $as_echo_n "checking for getgroups in -lbsd... " >&6; } | |
27565 | if test "${ac_cv_lib_bsd_getgroups+set}" = set; then : | |
5476a9a4 GM |
27566 | $as_echo_n "(cached) " >&6 |
27567 | else | |
710f5812 GM |
27568 | ac_check_lib_save_LIBS=$LIBS |
27569 | LIBS="-lbsd $LIBS" | |
27570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 27571 | /* end confdefs.h. */ |
d3127c14 | 27572 | |
710f5812 GM |
27573 | /* Override any GCC internal prototype to avoid an error. |
27574 | Use char because int might match the return type of a GCC | |
27575 | builtin and then its argument prototype would still apply. */ | |
27576 | #ifdef __cplusplus | |
27577 | extern "C" | |
27578 | #endif | |
27579 | char getgroups (); | |
d3127c14 GM |
27580 | int |
27581 | main () | |
27582 | { | |
710f5812 | 27583 | return getgroups (); |
d3127c14 GM |
27584 | ; |
27585 | return 0; | |
27586 | } | |
27587 | _ACEOF | |
710f5812 GM |
27588 | if ac_fn_c_try_link "$LINENO"; then : |
27589 | ac_cv_lib_bsd_getgroups=yes | |
d3127c14 | 27590 | else |
710f5812 | 27591 | ac_cv_lib_bsd_getgroups=no |
5476a9a4 | 27592 | fi |
710f5812 GM |
27593 | rm -f core conftest.err conftest.$ac_objext \ |
27594 | conftest$ac_exeext conftest.$ac_ext | |
27595 | LIBS=$ac_check_lib_save_LIBS | |
d3127c14 | 27596 | fi |
710f5812 GM |
27597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 |
27598 | $as_echo "$ac_cv_lib_bsd_getgroups" >&6; } | |
27599 | if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then : | |
27600 | GETGROUPS_LIB=-lbsd | |
5476a9a4 | 27601 | fi |
710f5812 GM |
27602 | |
27603 | fi | |
27604 | ||
27605 | # Run the program to test the functionality of the system-supplied | |
27606 | # getgroups function only if there is such a function. | |
27607 | if test $ac_cv_func_getgroups = yes; then | |
27608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 | |
27609 | $as_echo_n "checking for working getgroups... " >&6; } | |
27610 | if test "${ac_cv_func_getgroups_works+set}" = set; then : | |
5476a9a4 GM |
27611 | $as_echo_n "(cached) " >&6 |
27612 | else | |
710f5812 GM |
27613 | if test "$cross_compiling" = yes; then : |
27614 | case "$host_os" in # (( | |
5476a9a4 | 27615 | # Guess yes on glibc systems. |
710f5812 | 27616 | *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; |
5476a9a4 | 27617 | # If we don't know, assume the worst. |
710f5812 | 27618 | *) ac_cv_func_getgroups_works="guessing no" ;; |
5476a9a4 | 27619 | esac |
d3127c14 | 27620 | |
5476a9a4 GM |
27621 | else |
27622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 27623 | /* end confdefs.h. */ |
710f5812 | 27624 | $ac_includes_default |
d3127c14 GM |
27625 | int |
27626 | main () | |
27627 | { | |
710f5812 GM |
27628 | /* On Ultrix 4.3, getgroups (0, 0) always fails. */ |
27629 | return getgroups (0, 0) == -1; | |
27630 | ; | |
27631 | return 0; | |
27632 | } | |
27633 | ||
27634 | _ACEOF | |
27635 | if ac_fn_c_try_run "$LINENO"; then : | |
27636 | ac_cv_func_getgroups_works=yes | |
27637 | else | |
27638 | ac_cv_func_getgroups_works=no | |
27639 | fi | |
27640 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27641 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27642 | fi | |
27643 | ||
27644 | ||
27645 | fi | |
27646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 | |
27647 | $as_echo "$ac_cv_func_getgroups_works" >&6; } | |
27648 | else | |
27649 | ac_cv_func_getgroups_works=no | |
27650 | fi | |
27651 | case "$ac_cv_func_getgroups_works" in | |
27652 | *yes) | |
27653 | ||
27654 | $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h | |
27655 | ||
27656 | ;; | |
27657 | esac | |
27658 | LIBS=$ac_save_LIBS | |
27659 | ||
27660 | ||
27661 | # Solaris 9 and 10 need -lgen to get the eaccess function. | |
27662 | # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* | |
27663 | # programs in the package would end up linked with that potentially-shared | |
27664 | # library, inducing unnecessary run-time overhead. | |
27665 | LIB_EACCESS= | |
27666 | ||
27667 | gl_saved_libs=$LIBS | |
27668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5 | |
27669 | $as_echo_n "checking for library containing eaccess... " >&6; } | |
27670 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
27671 | $as_echo_n "(cached) " >&6 | |
27672 | else | |
27673 | ac_func_search_save_LIBS=$LIBS | |
27674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27675 | /* end confdefs.h. */ | |
27676 | ||
27677 | /* Override any GCC internal prototype to avoid an error. | |
27678 | Use char because int might match the return type of a GCC | |
27679 | builtin and then its argument prototype would still apply. */ | |
27680 | #ifdef __cplusplus | |
27681 | extern "C" | |
27682 | #endif | |
27683 | char eaccess (); | |
27684 | int | |
27685 | main () | |
27686 | { | |
27687 | return eaccess (); | |
27688 | ; | |
27689 | return 0; | |
27690 | } | |
27691 | _ACEOF | |
27692 | for ac_lib in '' gen; do | |
27693 | if test -z "$ac_lib"; then | |
27694 | ac_res="none required" | |
27695 | else | |
27696 | ac_res=-l$ac_lib | |
27697 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
27698 | fi | |
27699 | if ac_fn_c_try_link "$LINENO"; then : | |
27700 | ac_cv_search_eaccess=$ac_res | |
27701 | fi | |
27702 | rm -f core conftest.err conftest.$ac_objext \ | |
27703 | conftest$ac_exeext | |
27704 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
27705 | break | |
27706 | fi | |
27707 | done | |
27708 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
27709 | ||
27710 | else | |
27711 | ac_cv_search_eaccess=no | |
27712 | fi | |
27713 | rm conftest.$ac_ext | |
27714 | LIBS=$ac_func_search_save_LIBS | |
27715 | fi | |
27716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5 | |
27717 | $as_echo "$ac_cv_search_eaccess" >&6; } | |
27718 | ac_res=$ac_cv_search_eaccess | |
27719 | if test "$ac_res" != no; then : | |
27720 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
27721 | test "$ac_cv_search_eaccess" = "none required" || | |
27722 | LIB_EACCESS=$ac_cv_search_eaccess | |
27723 | fi | |
27724 | ||
27725 | for ac_func in eaccess | |
27726 | do : | |
27727 | ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" | |
27728 | if test "x$ac_cv_func_eaccess" = x""yes; then : | |
27729 | cat >>confdefs.h <<_ACEOF | |
27730 | #define HAVE_EACCESS 1 | |
27731 | _ACEOF | |
27732 | ||
27733 | fi | |
27734 | done | |
27735 | ||
27736 | LIBS=$gl_saved_libs | |
27737 | ||
27738 | fi | |
27739 | ||
27740 | ||
27741 | ||
27742 | ||
27743 | ||
27744 | GNULIB_EUIDACCESS=1 | |
27745 | ||
27746 | ||
27747 | ||
27748 | ||
27749 | ||
27750 | gl_gnulib_enabled_euidaccess=true | |
27751 | if test $HAVE_EUIDACCESS = 0; then | |
27752 | func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 | |
27753 | fi | |
27754 | func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c | |
27755 | if test $HAVE_EUIDACCESS = 0; then | |
27756 | func_gl_gnulib_m4code_stat | |
27757 | fi | |
27758 | fi | |
27759 | } | |
0cdca42a GM |
27760 | func_gl_gnulib_m4code_getdtablesize () |
27761 | { | |
27762 | if ! $gl_gnulib_enabled_getdtablesize; then | |
27763 | ||
27764 | ||
27765 | ||
27766 | if test $ac_cv_func_getdtablesize != yes; then | |
27767 | HAVE_GETDTABLESIZE=0 | |
27768 | fi | |
27769 | ||
27770 | if test $HAVE_GETDTABLESIZE = 0; then | |
27771 | ||
27772 | ||
27773 | ||
27774 | ||
27775 | ||
27776 | ||
27777 | ||
27778 | ||
27779 | gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" | |
27780 | ||
27781 | : | |
27782 | fi | |
27783 | ||
27784 | ||
27785 | ||
27786 | ||
27787 | ||
27788 | GNULIB_GETDTABLESIZE=1 | |
27789 | ||
27790 | ||
27791 | ||
27792 | ||
27793 | ||
27794 | gl_gnulib_enabled_getdtablesize=true | |
27795 | fi | |
27796 | } | |
710f5812 GM |
27797 | func_gl_gnulib_m4code_getgroups () |
27798 | { | |
27799 | if ! $gl_gnulib_enabled_getgroups; then | |
27800 | ||
27801 | ||
27802 | ||
27803 | ||
27804 | ||
27805 | ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" | |
27806 | if test "x$ac_cv_func_getgroups" = x""yes; then : | |
27807 | ||
27808 | fi | |
27809 | ||
27810 | ||
27811 | # If we don't yet have getgroups, see if it's in -lbsd. | |
27812 | # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. | |
27813 | ac_save_LIBS=$LIBS | |
27814 | if test $ac_cv_func_getgroups = no; then | |
27815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 | |
27816 | $as_echo_n "checking for getgroups in -lbsd... " >&6; } | |
27817 | if test "${ac_cv_lib_bsd_getgroups+set}" = set; then : | |
27818 | $as_echo_n "(cached) " >&6 | |
27819 | else | |
27820 | ac_check_lib_save_LIBS=$LIBS | |
27821 | LIBS="-lbsd $LIBS" | |
27822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27823 | /* end confdefs.h. */ | |
27824 | ||
27825 | /* Override any GCC internal prototype to avoid an error. | |
27826 | Use char because int might match the return type of a GCC | |
27827 | builtin and then its argument prototype would still apply. */ | |
27828 | #ifdef __cplusplus | |
27829 | extern "C" | |
27830 | #endif | |
27831 | char getgroups (); | |
27832 | int | |
27833 | main () | |
27834 | { | |
27835 | return getgroups (); | |
27836 | ; | |
27837 | return 0; | |
27838 | } | |
27839 | _ACEOF | |
27840 | if ac_fn_c_try_link "$LINENO"; then : | |
27841 | ac_cv_lib_bsd_getgroups=yes | |
27842 | else | |
27843 | ac_cv_lib_bsd_getgroups=no | |
27844 | fi | |
27845 | rm -f core conftest.err conftest.$ac_objext \ | |
27846 | conftest$ac_exeext conftest.$ac_ext | |
27847 | LIBS=$ac_check_lib_save_LIBS | |
27848 | fi | |
27849 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 | |
27850 | $as_echo "$ac_cv_lib_bsd_getgroups" >&6; } | |
27851 | if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then : | |
27852 | GETGROUPS_LIB=-lbsd | |
27853 | fi | |
27854 | ||
27855 | fi | |
27856 | ||
27857 | # Run the program to test the functionality of the system-supplied | |
27858 | # getgroups function only if there is such a function. | |
27859 | if test $ac_cv_func_getgroups = yes; then | |
27860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 | |
27861 | $as_echo_n "checking for working getgroups... " >&6; } | |
27862 | if test "${ac_cv_func_getgroups_works+set}" = set; then : | |
27863 | $as_echo_n "(cached) " >&6 | |
27864 | else | |
27865 | if test "$cross_compiling" = yes; then : | |
27866 | case "$host_os" in # (( | |
27867 | # Guess yes on glibc systems. | |
27868 | *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; | |
27869 | # If we don't know, assume the worst. | |
27870 | *) ac_cv_func_getgroups_works="guessing no" ;; | |
27871 | esac | |
27872 | ||
27873 | else | |
27874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27875 | /* end confdefs.h. */ | |
27876 | $ac_includes_default | |
27877 | int | |
27878 | main () | |
27879 | { | |
27880 | /* On Ultrix 4.3, getgroups (0, 0) always fails. */ | |
27881 | return getgroups (0, 0) == -1; | |
27882 | ; | |
27883 | return 0; | |
27884 | } | |
27885 | ||
27886 | _ACEOF | |
27887 | if ac_fn_c_try_run "$LINENO"; then : | |
27888 | ac_cv_func_getgroups_works=yes | |
27889 | else | |
27890 | ac_cv_func_getgroups_works=no | |
27891 | fi | |
27892 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27893 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27894 | fi | |
27895 | ||
27896 | ||
27897 | fi | |
27898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 | |
27899 | $as_echo "$ac_cv_func_getgroups_works" >&6; } | |
27900 | else | |
27901 | ac_cv_func_getgroups_works=no | |
27902 | fi | |
27903 | case "$ac_cv_func_getgroups_works" in | |
27904 | *yes) | |
27905 | ||
27906 | $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h | |
27907 | ||
27908 | ;; | |
27909 | esac | |
27910 | LIBS=$ac_save_LIBS | |
27911 | ||
27912 | if test $ac_cv_func_getgroups != yes; then | |
27913 | HAVE_GETGROUPS=0 | |
27914 | else | |
27915 | if test "$ac_cv_type_getgroups" != gid_t \ | |
27916 | || { case "$ac_cv_func_getgroups_works" in | |
27917 | *yes) false;; | |
27918 | *) true;; | |
27919 | esac | |
27920 | }; then | |
27921 | REPLACE_GETGROUPS=1 | |
27922 | ||
27923 | $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h | |
27924 | ||
27925 | else | |
27926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 | |
27927 | $as_echo_n "checking whether getgroups handles negative values... " >&6; } | |
27928 | if test "${gl_cv_func_getgroups_works+set}" = set; then : | |
27929 | $as_echo_n "(cached) " >&6 | |
27930 | else | |
27931 | if test "$cross_compiling" = yes; then : | |
27932 | case "$host_os" in | |
27933 | # Guess yes on glibc systems. | |
27934 | *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;; | |
27935 | # If we don't know, assume the worst. | |
27936 | *) gl_cv_func_getgroups_works="guessing no" ;; | |
27937 | esac | |
27938 | ||
27939 | else | |
27940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
27941 | /* end confdefs.h. */ | |
27942 | $ac_includes_default | |
27943 | int | |
27944 | main () | |
27945 | { | |
27946 | int size = getgroups (0, 0); | |
27947 | gid_t *list = malloc (size * sizeof *list); | |
27948 | return getgroups (-1, list) != -1; | |
27949 | ; | |
27950 | return 0; | |
27951 | } | |
27952 | _ACEOF | |
27953 | if ac_fn_c_try_run "$LINENO"; then : | |
27954 | gl_cv_func_getgroups_works=yes | |
27955 | else | |
27956 | gl_cv_func_getgroups_works=no | |
27957 | fi | |
27958 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
27959 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
27960 | fi | |
27961 | ||
27962 | fi | |
27963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5 | |
27964 | $as_echo "$gl_cv_func_getgroups_works" >&6; } | |
27965 | case "$gl_cv_func_getgroups_works" in | |
27966 | *yes) ;; | |
27967 | *) REPLACE_GETGROUPS=1 ;; | |
27968 | esac | |
27969 | fi | |
27970 | fi | |
27971 | test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" | |
27972 | ||
27973 | if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then | |
27974 | ||
27975 | ||
27976 | ||
27977 | ||
27978 | ||
27979 | ||
27980 | ||
27981 | ||
27982 | gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" | |
27983 | ||
27984 | fi | |
27985 | ||
27986 | ||
27987 | ||
27988 | ||
27989 | ||
27990 | GNULIB_GETGROUPS=1 | |
27991 | ||
27992 | ||
27993 | ||
27994 | ||
27995 | ||
27996 | gl_gnulib_enabled_getgroups=true | |
27997 | fi | |
27998 | } | |
27999 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () | |
28000 | { | |
28001 | if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then | |
28002 | ||
28003 | ||
28004 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true | |
28005 | fi | |
28006 | } | |
28007 | func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 () | |
28008 | { | |
28009 | if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then | |
28010 | ||
28011 | ||
28012 | ||
28013 | ||
28014 | ||
28015 | ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member" | |
28016 | if test "x$ac_cv_func_group_member" = x""yes; then : | |
28017 | ||
28018 | else | |
28019 | ||
28020 | HAVE_GROUP_MEMBER=0 | |
28021 | ||
28022 | fi | |
28023 | ||
28024 | ||
28025 | if test $HAVE_GROUP_MEMBER = 0; then | |
28026 | ||
28027 | ||
28028 | ||
28029 | ||
28030 | ||
28031 | ||
28032 | ||
28033 | ||
28034 | gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext" | |
28035 | ||
28036 | ||
28037 | ||
28038 | ||
28039 | fi | |
28040 | ||
28041 | ||
28042 | ||
28043 | ||
28044 | ||
28045 | GNULIB_GROUP_MEMBER=1 | |
28046 | ||
28047 | ||
28048 | ||
28049 | ||
28050 | ||
28051 | gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true | |
28052 | if test $HAVE_GROUP_MEMBER = 0; then | |
28053 | func_gl_gnulib_m4code_getgroups | |
28054 | fi | |
28055 | if test $HAVE_GROUP_MEMBER = 0; then | |
28056 | func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec | |
28057 | fi | |
28058 | fi | |
28059 | } | |
d7ad186c GM |
28060 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 () |
28061 | { | |
28062 | if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then | |
28063 | gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true | |
28064 | fi | |
28065 | } | |
710f5812 GM |
28066 | func_gl_gnulib_m4code_pathmax () |
28067 | { | |
28068 | if ! $gl_gnulib_enabled_pathmax; then | |
28069 | ||
28070 | ||
28071 | ||
28072 | gl_gnulib_enabled_pathmax=true | |
28073 | fi | |
28074 | } | |
28075 | func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c () | |
28076 | { | |
28077 | if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then | |
28078 | gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true | |
28079 | fi | |
28080 | } | |
28081 | func_gl_gnulib_m4code_stat () | |
28082 | { | |
28083 | if ! $gl_gnulib_enabled_stat; then | |
28084 | ||
28085 | ||
28086 | ||
28087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 | |
28088 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | |
28089 | if test "${gl_cv_func_stat_dir_slash+set}" = set; then : | |
28090 | $as_echo_n "(cached) " >&6 | |
28091 | else | |
28092 | if test "$cross_compiling" = yes; then : | |
28093 | case $host_os in | |
28094 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | |
28095 | *) gl_cv_func_stat_dir_slash="guessing yes";; | |
28096 | esac | |
28097 | else | |
28098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28099 | /* end confdefs.h. */ | |
28100 | #include <sys/stat.h> | |
28101 | ||
28102 | int | |
28103 | main () | |
28104 | { | |
28105 | struct stat st; return stat (".", &st) != stat ("./", &st); | |
28106 | ; | |
28107 | return 0; | |
28108 | } | |
28109 | _ACEOF | |
28110 | if ac_fn_c_try_run "$LINENO"; then : | |
28111 | gl_cv_func_stat_dir_slash=yes | |
28112 | else | |
28113 | gl_cv_func_stat_dir_slash=no | |
28114 | fi | |
28115 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28116 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28117 | fi | |
28118 | ||
28119 | fi | |
28120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 | |
28121 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | |
28122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
28123 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
28124 | if test "${gl_cv_func_stat_file_slash+set}" = set; then : | |
28125 | $as_echo_n "(cached) " >&6 | |
28126 | else | |
28127 | touch conftest.tmp | |
28128 | # Assume that if we have lstat, we can also check symlinks. | |
28129 | if test $ac_cv_func_lstat = yes; then | |
28130 | ln -s conftest.tmp conftest.lnk | |
28131 | fi | |
28132 | if test "$cross_compiling" = yes; then : | |
28133 | case "$host_os" in | |
28134 | # Guess yes on glibc systems. | |
28135 | *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; | |
28136 | # If we don't know, assume the worst. | |
28137 | *) gl_cv_func_stat_file_slash="guessing no" ;; | |
28138 | esac | |
28139 | ||
28140 | else | |
28141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
28142 | /* end confdefs.h. */ | |
28143 | #include <sys/stat.h> | |
28144 | ||
28145 | int | |
28146 | main () | |
28147 | { | |
28148 | int result = 0; | |
28149 | struct stat st; | |
28150 | if (!stat ("conftest.tmp/", &st)) | |
28151 | result |= 1; | |
28152 | #if HAVE_LSTAT | |
28153 | if (!stat ("conftest.lnk/", &st)) | |
5476a9a4 GM |
28154 | result |= 2; |
28155 | #endif | |
28156 | return result; | |
d3127c14 GM |
28157 | |
28158 | ; | |
28159 | return 0; | |
28160 | } | |
28161 | _ACEOF | |
5476a9a4 GM |
28162 | if ac_fn_c_try_run "$LINENO"; then : |
28163 | gl_cv_func_stat_file_slash=yes | |
d3127c14 | 28164 | else |
5476a9a4 GM |
28165 | gl_cv_func_stat_file_slash=no |
28166 | fi | |
28167 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
28168 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
d3127c14 | 28169 | fi |
d3127c14 | 28170 | |
5476a9a4 GM |
28171 | rm -f conftest.tmp conftest.lnk |
28172 | fi | |
28173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | |
28174 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
28175 | case $gl_cv_func_stat_dir_slash in | |
28176 | *no) REPLACE_STAT=1 | |
d3127c14 | 28177 | |
5476a9a4 GM |
28178 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h |
28179 | ;; | |
28180 | esac | |
28181 | case $gl_cv_func_stat_file_slash in | |
28182 | *no) REPLACE_STAT=1 | |
d3127c14 | 28183 | |
5476a9a4 GM |
28184 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h |
28185 | ;; | |
28186 | esac | |
d3127c14 | 28187 | |
a6342fc8 | 28188 | if test $REPLACE_STAT = 1; then |
d3127c14 | 28189 | |
dd0d840e | 28190 | |
dd0d840e | 28191 | |
dd0d840e | 28192 | |
dd0d840e | 28193 | |
dd0d840e | 28194 | |
067d23c9 KY |
28195 | |
28196 | ||
5476a9a4 | 28197 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" |
067d23c9 | 28198 | |
45d4966b | 28199 | : |
a6342fc8 | 28200 | fi |
067d23c9 | 28201 | |
dd0d840e GM |
28202 | |
28203 | ||
dd0d840e | 28204 | |
dd0d840e | 28205 | |
5476a9a4 | 28206 | GNULIB_STAT=1 |
dd0d840e | 28207 | |
067d23c9 KY |
28208 | |
28209 | ||
28210 | ||
28211 | ||
5476a9a4 GM |
28212 | gl_gnulib_enabled_stat=true |
28213 | if test $REPLACE_STAT = 1; then | |
28214 | func_gl_gnulib_m4code_dosname | |
28215 | fi | |
28216 | if test $REPLACE_STAT = 1; then | |
28217 | func_gl_gnulib_m4code_pathmax | |
28218 | fi | |
5476a9a4 GM |
28219 | fi |
28220 | } | |
28221 | func_gl_gnulib_m4code_strtoll () | |
28222 | { | |
28223 | if ! $gl_gnulib_enabled_strtoll; then | |
067d23c9 KY |
28224 | |
28225 | ||
28226 | ||
5476a9a4 GM |
28227 | if test "$ac_cv_type_long_long_int" = yes; then |
28228 | for ac_func in strtoll | |
28229 | do : | |
28230 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
28231 | if test "x$ac_cv_func_strtoll" = x""yes; then : | |
28232 | cat >>confdefs.h <<_ACEOF | |
28233 | #define HAVE_STRTOLL 1 | |
28234 | _ACEOF | |
067d23c9 | 28235 | |
5476a9a4 GM |
28236 | fi |
28237 | done | |
067d23c9 | 28238 | |
5476a9a4 GM |
28239 | if test $ac_cv_func_strtoll = no; then |
28240 | HAVE_STRTOLL=0 | |
28241 | fi | |
28242 | fi | |
067d23c9 | 28243 | |
a6342fc8 | 28244 | if test $HAVE_STRTOLL = 0; then |
067d23c9 KY |
28245 | |
28246 | ||
28247 | ||
067d23c9 KY |
28248 | |
28249 | ||
28250 | ||
28251 | ||
28252 | ||
5476a9a4 | 28253 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" |
067d23c9 KY |
28254 | |
28255 | ||
5476a9a4 | 28256 | : |
067d23c9 | 28257 | |
a6342fc8 | 28258 | fi |
067d23c9 KY |
28259 | |
28260 | ||
28261 | ||
067d23c9 | 28262 | |
067d23c9 | 28263 | |
5476a9a4 | 28264 | GNULIB_STRTOLL=1 |
067d23c9 | 28265 | |
397f7161 | 28266 | |
067d23c9 KY |
28267 | |
28268 | ||
067d23c9 | 28269 | |
5476a9a4 GM |
28270 | gl_gnulib_enabled_strtoll=true |
28271 | fi | |
28272 | } | |
28273 | func_gl_gnulib_m4code_strtoull () | |
28274 | { | |
28275 | if ! $gl_gnulib_enabled_strtoull; then | |
067d23c9 | 28276 | |
067d23c9 | 28277 | |
067d23c9 | 28278 | |
5476a9a4 GM |
28279 | if test "$ac_cv_type_unsigned_long_long_int" = yes; then |
28280 | for ac_func in strtoull | |
28281 | do : | |
28282 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
28283 | if test "x$ac_cv_func_strtoull" = x""yes; then : | |
28284 | cat >>confdefs.h <<_ACEOF | |
28285 | #define HAVE_STRTOULL 1 | |
28286 | _ACEOF | |
067d23c9 | 28287 | |
f199cab1 | 28288 | fi |
5476a9a4 | 28289 | done |
067d23c9 | 28290 | |
5476a9a4 GM |
28291 | if test $ac_cv_func_strtoull = no; then |
28292 | HAVE_STRTOULL=0 | |
28293 | fi | |
28294 | fi | |
067d23c9 | 28295 | |
a6342fc8 | 28296 | if test $HAVE_STRTOULL = 0; then |
067d23c9 KY |
28297 | |
28298 | ||
067d23c9 | 28299 | |
067d23c9 | 28300 | |
067d23c9 | 28301 | |
067d23c9 | 28302 | |
067d23c9 | 28303 | |
067d23c9 | 28304 | |
5476a9a4 | 28305 | gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" |
067d23c9 | 28306 | |
067d23c9 | 28307 | |
5476a9a4 | 28308 | : |
067d23c9 | 28309 | |
a6342fc8 | 28310 | fi |
067d23c9 KY |
28311 | |
28312 | ||
3e0be4ab | 28313 | |
3e0be4ab | 28314 | |
067d23c9 | 28315 | |
5476a9a4 | 28316 | GNULIB_STRTOULL=1 |
067d23c9 | 28317 | |
a0a61e58 | 28318 | |
067d23c9 | 28319 | |
067d23c9 KY |
28320 | |
28321 | ||
5476a9a4 GM |
28322 | gl_gnulib_enabled_strtoull=true |
28323 | fi | |
28324 | } | |
710f5812 GM |
28325 | func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec () |
28326 | { | |
28327 | if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then | |
28328 | gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true | |
28329 | fi | |
28330 | } | |
d7ad186c GM |
28331 | if test $HAVE_FACCESSAT = 0; then |
28332 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
28333 | fi | |
710f5812 GM |
28334 | if test $HAVE_FACCESSAT = 0; then |
28335 | func_gl_gnulib_m4code_dosname | |
28336 | fi | |
28337 | if test $HAVE_FACCESSAT = 0; then | |
28338 | func_gl_gnulib_m4code_euidaccess | |
28339 | fi | |
d7ad186c GM |
28340 | if test $HAVE_FACCESSAT = 0; then |
28341 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
28342 | fi | |
0cdca42a GM |
28343 | if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then |
28344 | func_gl_gnulib_m4code_getdtablesize | |
28345 | fi | |
d7ad186c GM |
28346 | if test $HAVE_FDOPENDIR = 0; then |
28347 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
28348 | fi | |
28349 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
28350 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
28351 | fi | |
28352 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
28353 | func_gl_gnulib_m4code_dosname | |
28354 | fi | |
28355 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
28356 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
28357 | fi | |
5476a9a4 GM |
28358 | if test $REPLACE_GETOPT = 1; then |
28359 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | |
28360 | fi | |
28361 | if test $REPLACE_LSTAT = 1; then | |
28362 | func_gl_gnulib_m4code_dosname | |
28363 | fi | |
28364 | if test $REPLACE_LSTAT = 1; then | |
28365 | func_gl_gnulib_m4code_stat | |
28366 | fi | |
28367 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
28368 | func_gl_gnulib_m4code_stat | |
28369 | fi | |
d7ad186c GM |
28370 | if test $HAVE_READLINKAT = 0; then |
28371 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
28372 | fi | |
28373 | if test $HAVE_READLINKAT = 0; then | |
28374 | func_gl_gnulib_m4code_dosname | |
28375 | fi | |
28376 | if test $HAVE_READLINKAT = 0; then | |
28377 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
28378 | fi | |
5476a9a4 GM |
28379 | if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then |
28380 | func_gl_gnulib_m4code_strtoll | |
28381 | fi | |
5476a9a4 GM |
28382 | if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then |
28383 | func_gl_gnulib_m4code_strtoull | |
28384 | fi | |
067d23c9 | 28385 | |
d7ad186c GM |
28386 | if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then |
28387 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE= | |
28388 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#' | |
28389 | else | |
28390 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#' | |
28391 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE= | |
28392 | fi | |
28393 | ||
5476a9a4 GM |
28394 | if $gl_gnulib_enabled_dosname; then |
28395 | gl_GNULIB_ENABLED_dosname_TRUE= | |
28396 | gl_GNULIB_ENABLED_dosname_FALSE='#' | |
28397 | else | |
28398 | gl_GNULIB_ENABLED_dosname_TRUE='#' | |
28399 | gl_GNULIB_ENABLED_dosname_FALSE= | |
28400 | fi | |
067d23c9 | 28401 | |
710f5812 GM |
28402 | if $gl_gnulib_enabled_euidaccess; then |
28403 | gl_GNULIB_ENABLED_euidaccess_TRUE= | |
28404 | gl_GNULIB_ENABLED_euidaccess_FALSE='#' | |
28405 | else | |
28406 | gl_GNULIB_ENABLED_euidaccess_TRUE='#' | |
28407 | gl_GNULIB_ENABLED_euidaccess_FALSE= | |
28408 | fi | |
28409 | ||
0cdca42a GM |
28410 | if $gl_gnulib_enabled_getdtablesize; then |
28411 | gl_GNULIB_ENABLED_getdtablesize_TRUE= | |
28412 | gl_GNULIB_ENABLED_getdtablesize_FALSE='#' | |
28413 | else | |
28414 | gl_GNULIB_ENABLED_getdtablesize_TRUE='#' | |
28415 | gl_GNULIB_ENABLED_getdtablesize_FALSE= | |
28416 | fi | |
28417 | ||
710f5812 GM |
28418 | if $gl_gnulib_enabled_getgroups; then |
28419 | gl_GNULIB_ENABLED_getgroups_TRUE= | |
28420 | gl_GNULIB_ENABLED_getgroups_FALSE='#' | |
28421 | else | |
28422 | gl_GNULIB_ENABLED_getgroups_TRUE='#' | |
28423 | gl_GNULIB_ENABLED_getgroups_FALSE= | |
28424 | fi | |
28425 | ||
5476a9a4 GM |
28426 | if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then |
28427 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= | |
28428 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' | |
28429 | else | |
28430 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' | |
28431 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | |
28432 | fi | |
067d23c9 | 28433 | |
710f5812 GM |
28434 | if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then |
28435 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE= | |
28436 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#' | |
28437 | else | |
28438 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#' | |
28439 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE= | |
28440 | fi | |
28441 | ||
d7ad186c GM |
28442 | if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then |
28443 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE= | |
28444 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#' | |
28445 | else | |
28446 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#' | |
28447 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE= | |
28448 | fi | |
28449 | ||
5476a9a4 GM |
28450 | if $gl_gnulib_enabled_pathmax; then |
28451 | gl_GNULIB_ENABLED_pathmax_TRUE= | |
28452 | gl_GNULIB_ENABLED_pathmax_FALSE='#' | |
28453 | else | |
28454 | gl_GNULIB_ENABLED_pathmax_TRUE='#' | |
28455 | gl_GNULIB_ENABLED_pathmax_FALSE= | |
28456 | fi | |
067d23c9 | 28457 | |
710f5812 GM |
28458 | if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then |
28459 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE= | |
28460 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#' | |
28461 | else | |
28462 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#' | |
28463 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE= | |
28464 | fi | |
28465 | ||
5476a9a4 GM |
28466 | if $gl_gnulib_enabled_stat; then |
28467 | gl_GNULIB_ENABLED_stat_TRUE= | |
28468 | gl_GNULIB_ENABLED_stat_FALSE='#' | |
28469 | else | |
28470 | gl_GNULIB_ENABLED_stat_TRUE='#' | |
28471 | gl_GNULIB_ENABLED_stat_FALSE= | |
28472 | fi | |
067d23c9 | 28473 | |
5476a9a4 GM |
28474 | if $gl_gnulib_enabled_strtoll; then |
28475 | gl_GNULIB_ENABLED_strtoll_TRUE= | |
28476 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | |
28477 | else | |
28478 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | |
28479 | gl_GNULIB_ENABLED_strtoll_FALSE= | |
28480 | fi | |
067d23c9 | 28481 | |
5476a9a4 GM |
28482 | if $gl_gnulib_enabled_strtoull; then |
28483 | gl_GNULIB_ENABLED_strtoull_TRUE= | |
28484 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | |
28485 | else | |
28486 | gl_GNULIB_ENABLED_strtoull_TRUE='#' | |
28487 | gl_GNULIB_ENABLED_strtoull_FALSE= | |
f199cab1 | 28488 | fi |
067d23c9 | 28489 | |
710f5812 GM |
28490 | if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then |
28491 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE= | |
28492 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#' | |
28493 | else | |
28494 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#' | |
28495 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE= | |
28496 | fi | |
28497 | ||
5476a9a4 | 28498 | # End of code from modules |
067d23c9 | 28499 | |
067d23c9 | 28500 | |
067d23c9 | 28501 | |
067d23c9 | 28502 | |
f199cab1 | 28503 | |
f199cab1 GM |
28504 | |
28505 | ||
067d23c9 | 28506 | |
5476a9a4 GM |
28507 | |
28508 | gltests_libdeps= | |
28509 | gltests_ltlibdeps= | |
067d23c9 | 28510 | |
067d23c9 | 28511 | |
067d23c9 KY |
28512 | |
28513 | ||
067d23c9 KY |
28514 | |
28515 | ||
3e0be4ab | 28516 | |
3e0be4ab | 28517 | |
3e0be4ab | 28518 | |
5476a9a4 GM |
28519 | gl_source_base='tests' |
28520 | 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 | |
3e0be4ab | 28521 | |
5476a9a4 | 28522 | gl_module_indicator_condition=$gltests_WITNESS |
3e0be4ab GM |
28523 | |
28524 | ||
28525 | ||
28526 | ||
28527 | ||
067d23c9 KY |
28528 | |
28529 | ||
28530 | ||
3e0be4ab | 28531 | |
3e0be4ab | 28532 | |
5476a9a4 GM |
28533 | LIBGNU_LIBDEPS="$gl_libdeps" |
28534 | ||
28535 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
28536 | ||
067d23c9 | 28537 | |
5476a9a4 GM |
28538 | CFLAGS=$SAVE_CFLAGS |
28539 | LIBS=$SAVE_LIBS | |
067d23c9 | 28540 | |
7c61eaab GM |
28541 | if test "${opsys}" = "mingw32"; then |
28542 | CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc" | |
28543 | # Remove unneeded switches from the value of CC that goes to Makefiles | |
28544 | CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"` | |
28545 | fi | |
28546 | ||
067d23c9 KY |
28547 | case "$opsys" in |
28548 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
28549 | ||
28550 | darwin) | |
28551 | ## The -headerpad option tells ld (see man page) to leave room at the | |
28552 | ## end of the header for adding load commands. Needed for dumping. | |
28553 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
28554 | ## each); under Cocoa 31 commands are required. | |
28555 | if test "$HAVE_NS" = "yes"; then | |
28556 | libs_nsgui="-framework AppKit" | |
cc70ee9b GM |
28557 | if test "$NS_IMPL_COCOA" = "yes"; then |
28558 | libs_nsgui="$libs_nsgui -framework IOKit" | |
28559 | fi | |
067d23c9 KY |
28560 | headerpad_extra=6C8 |
28561 | else | |
28562 | libs_nsgui= | |
28563 | headerpad_extra=690 | |
28564 | fi | |
85cf5029 | 28565 | LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" |
067d23c9 KY |
28566 | |
28567 | ## This is here because src/Makefile.in did some extra fiddling around | |
2407788f GM |
28568 | ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in |
28569 | ## LD_SWITCH_SYSTEM_TEMACS instead, | |
067d23c9 KY |
28570 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ |
28571 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
28572 | ;; | |
28573 | ||
ae629dae GM |
28574 | ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to |
28575 | ## find X at run-time. | |
28576 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the | |
28577 | ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH | |
067d23c9 KY |
28578 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM |
28579 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
28580 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
ae629dae | 28581 | gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; |
067d23c9 | 28582 | |
7c61eaab GM |
28583 | mingw32) |
28584 | ## MinGW64 does not prepend an underscore to symbols, so we must | |
28585 | ## pass a different -entry switch to linker. FIXME: It is better | |
28586 | ## to make the entry points the same by changing unexw32.c. | |
28587 | case "$canonical" in | |
28588 | x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;; | |
28589 | *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; | |
28590 | esac | |
28591 | ;; | |
28592 | ||
3766b742 GM |
28593 | openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;; |
28594 | ||
067d23c9 KY |
28595 | *) LD_SWITCH_SYSTEM_TEMACS= ;; |
28596 | esac | |
28597 | ||
26256684 GM |
28598 | if test x$ac_enable_profiling != x ; then |
28599 | case $opsys in | |
28600 | *freebsd | gnu-linux) ;; | |
28601 | *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;; | |
28602 | esac | |
28603 | fi | |
28604 | ||
067d23c9 KY |
28605 | |
28606 | ||
7c61eaab GM |
28607 | ## MinGW-specific post-link processing of temacs. |
28608 | TEMACS_POST_LINK=":" | |
28609 | ADDSECTION= | |
28610 | EMACS_HEAPSIZE= | |
28611 | if test "${opsys}" = "mingw32"; then | |
28612 | TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)" | |
28613 | ADDSECTION="../nt/addsection\$(EXEEXT)" | |
28614 | ## Preload heap size of temacs.exe in MB. | |
28615 | case "$canonical" in | |
28616 | x86_64-*-*) EMACS_HEAPSIZE=42 ;; | |
28617 | *) EMACS_HEAPSIZE=27 ;; | |
28618 | esac | |
28619 | fi | |
28620 | ||
28621 | ||
28622 | ||
28623 | ||
28624 | ||
42dcba54 GM |
28625 | ## Common for all window systems |
28626 | if test "$window_system" != "none"; then | |
067d23c9 KY |
28627 | |
28628 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
28629 | ||
42dcba54 | 28630 | WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o" |
067d23c9 KY |
28631 | fi |
28632 | ||
28633 | ||
28634 | ||
28635 | ||
42dcba54 | 28636 | |
067d23c9 KY |
28637 | #### Report on what we decided to do. |
28638 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
28639 | #### It makes printing result more understandable as using GTK sets | |
28640 | #### toolkit_scroll_bars to yes by default. | |
28641 | if test "${HAVE_GTK}" = "yes"; then | |
a732eace | 28642 | USE_X_TOOLKIT="$USE_GTK_TOOLKIT" |
067d23c9 KY |
28643 | fi |
28644 | ||
28237e48 GM |
28645 | if test $USE_ACL -ne 0; then |
28646 | acl_summary="yes $LIB_ACL" | |
28647 | else | |
28648 | acl_summary=no | |
28649 | fi | |
28650 | ||
067d23c9 KY |
28651 | echo " |
28652 | Configured for \`${canonical}'. | |
28653 | ||
28654 | Where should the build process find the source code? ${srcdir} | |
067d23c9 KY |
28655 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
28656 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
28657 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
28658 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
28659 | What window system should Emacs use? ${window_system} | |
28660 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
28661 | ||
28662 | if test -n "${x_includes}"; then | |
28663 | echo " Where do we find X Windows header files? ${x_includes}" | |
28664 | else | |
28665 | echo " Where do we find X Windows header files? Standard dirs" | |
28666 | fi | |
28667 | if test -n "${x_libraries}"; then | |
28668 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
28669 | else | |
28670 | echo " Where do we find X Windows libraries? Standard dirs" | |
28671 | fi | |
28672 | ||
28673 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
28674 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
28675 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
28676 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
28677 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
28678 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
28679 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
28680 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
28681 | ||
28682 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
28683 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
28684 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
f527bd02 | 28685 | echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" |
0f55a32e | 28686 | echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}" |
28237e48 | 28687 | echo " Does Emacs use access control lists? ${acl_summary}" |
067d23c9 | 28688 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
27f5a136 | 28689 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" |
067d23c9 KY |
28690 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |
28691 | ||
28692 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
28693 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
28694 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
28695 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
28696 | ||
28697 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
28698 | echo | |
28699 | ||
eb39a72d GM |
28700 | if test -n "${EMACSDATA}"; then |
28701 | echo " Environment variable EMACSDATA set to: $EMACSDATA" | |
28702 | fi | |
28703 | if test -n "${EMACSDOC}"; then | |
28704 | echo " Environment variable EMACSDOC set to: $EMACSDOC" | |
28705 | fi | |
28706 | ||
067d23c9 KY |
28707 | echo |
28708 | ||
28709 | if test "$HAVE_NS" = "yes"; then | |
28710 | echo | |
3d0788a9 | 28711 | echo "You must run \"${MAKE-make} install\" in order to test the built application. |
067d23c9 KY |
28712 | The installed application will go to nextstep/Emacs.app and can be |
28713 | run or moved from there." | |
28714 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
28715 | echo "The application will be fully self-contained." | |
28716 | else | |
28717 | echo "The lisp resources for the application will be installed under ${prefix}. | |
3d0788a9 | 28718 | You may need to run \"${MAKE-make} install\" with sudo. The application will fail |
067d23c9 KY |
28719 | to run if these resources are not installed." |
28720 | fi | |
28721 | echo | |
28722 | fi | |
28723 | ||
031fabfc GM |
28724 | if test "${opsys}" = "cygwin"; then |
28725 | case `uname -r` in | |
28726 | 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5 | |
28727 | $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;} | |
28728 | echo | |
28729 | ;; | |
28730 | esac | |
28731 | fi | |
067d23c9 KY |
28732 | |
28733 | # Remove any trailing slashes in these variables. | |
28734 | test "${prefix}" != NONE && | |
28735 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
28736 | test "${exec_prefix}" != NONE && | |
28737 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
28738 | ||
bb7dce39 GM |
28739 | if test "$HAVE_NS" = "yes"; then |
28740 | if test "$NS_IMPL_GNUSTEP" = yes; then | |
28741 | ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" | |
28742 | ||
28743 | else | |
28744 | ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" | |
28745 | ||
28746 | fi | |
28747 | fi | |
28748 | ||
7c61eaab | 28749 | SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile" |
56ade35c | 28750 | |
7c61eaab | 28751 | ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile" |
56ade35c | 28752 | |
a877df06 | 28753 | |
73b78882 | 28754 | opt_makefile=test/automated/Makefile |
a877df06 | 28755 | |
b5591ebb | 28756 | if test -f "$srcdir/$opt_makefile.in"; then |
73b78882 | 28757 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
56ade35c | 28758 | ac_config_files="$ac_config_files test/automated/Makefile" |
a877df06 | 28759 | |
56ade35c | 28760 | fi |
73b78882 | 28761 | |
40b65096 GM |
28762 | |
28763 | opt_makefile=admin/unidata/Makefile | |
28764 | ||
b5591ebb | 28765 | if test -f "$srcdir/$opt_makefile.in"; then |
40b65096 GM |
28766 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
28767 | ac_config_files="$ac_config_files admin/unidata/Makefile" | |
28768 | ||
28769 | fi | |
28770 | ||
28771 | ||
56ade35c | 28772 | SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` |
73b78882 | 28773 | |
067d23c9 | 28774 | |
9411886d PE |
28775 | |
28776 | ac_config_commands="$ac_config_commands mkdirs" | |
28777 | ||
28778 | ||
28779 | ac_config_commands="$ac_config_commands epaths" | |
28780 | ||
28781 | ||
28782 | ac_config_commands="$ac_config_commands gdbinit" | |
28783 | ||
067d23c9 KY |
28784 | |
28785 | cat >confcache <<\_ACEOF | |
28786 | # This file is a shell script that caches the results of configure | |
28787 | # tests run on this system so they can be shared between configure | |
28788 | # scripts and configure runs, see configure's option --config-cache. | |
28789 | # It is not useful on other systems. If it contains results you don't | |
28790 | # want to keep, you may remove or edit it. | |
28791 | # | |
28792 | # config.status only pays attention to the cache file if you give it | |
28793 | # the --recheck option to rerun configure. | |
28794 | # | |
28795 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
28796 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
28797 | # following values. | |
28798 | ||
28799 | _ACEOF | |
28800 | ||
28801 | # The following way of writing the cache mishandles newlines in values, | |
28802 | # but we know of no workaround that is simple, portable, and efficient. | |
28803 | # So, we kill variables containing newlines. | |
28804 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
28805 | # and sets the high bit in the cache file unless we assign to the vars. | |
28806 | ( | |
28807 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
28808 | eval ac_val=\$$ac_var | |
28809 | case $ac_val in #( | |
28810 | *${as_nl}*) | |
28811 | case $ac_var in #( | |
28812 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
28813 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
28814 | esac | |
28815 | case $ac_var in #( | |
28816 | _ | IFS | as_nl) ;; #( | |
28817 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
28818 | *) { eval $ac_var=; unset $ac_var;} ;; | |
28819 | esac ;; | |
28820 | esac | |
28821 | done | |
28822 | ||
28823 | (set) 2>&1 | | |
28824 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
28825 | *${as_nl}ac_space=\ *) | |
28826 | # `set' does not quote correctly, so add quotes: double-quote | |
28827 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
28828 | sed -n \ | |
28829 | "s/'/'\\\\''/g; | |
28830 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
28831 | ;; #( | |
28832 | *) | |
28833 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
28834 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
28835 | ;; | |
28836 | esac | | |
28837 | sort | |
28838 | ) | | |
28839 | sed ' | |
28840 | /^ac_cv_env_/b end | |
28841 | t clear | |
28842 | :clear | |
28843 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
28844 | t end | |
28845 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
28846 | :end' >>confcache | |
28847 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
28848 | if test -w "$cache_file"; then | |
a9bec17c | 28849 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
28850 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
28851 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
a9bec17c | 28852 | cat confcache >$cache_file |
067d23c9 KY |
28853 | else |
28854 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
28855 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
28856 | fi | |
28857 | fi | |
28858 | rm -f confcache | |
28859 | ||
28860 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
28861 | # Let make expand exec_prefix. | |
28862 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
28863 | ||
28864 | DEFS=-DHAVE_CONFIG_H | |
28865 | ||
28866 | ac_libobjs= | |
28867 | ac_ltlibobjs= | |
28868 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
28869 | # 1. Remove the extension, and $U if already installed. | |
28870 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
28871 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
28872 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
28873 | # will be set to the directory where LIBOBJS objects are built. | |
28874 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
28875 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
28876 | done | |
28877 | LIBOBJS=$ac_libobjs | |
28878 | ||
28879 | LTLIBOBJS=$ac_ltlibobjs | |
28880 | ||
28881 | ||
743c80a7 PE |
28882 | if test -n "$EXEEXT"; then |
28883 | am__EXEEXT_TRUE= | |
28884 | am__EXEEXT_FALSE='#' | |
28885 | else | |
28886 | am__EXEEXT_TRUE='#' | |
28887 | am__EXEEXT_FALSE= | |
28888 | fi | |
28889 | ||
28890 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
a9bec17c | 28891 | as_fn_error "conditional \"AMDEP\" was never defined. |
743c80a7 PE |
28892 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28893 | fi | |
28894 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
a9bec17c | 28895 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
743c80a7 PE |
28896 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28897 | fi | |
7c61eaab GM |
28898 | if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then |
28899 | as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined. | |
28900 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28901 | fi | |
743c80a7 | 28902 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
a9bec17c | 28903 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
743c80a7 PE |
28904 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28905 | fi | |
4fc2b746 | 28906 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
a9bec17c | 28907 | as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. |
4fc2b746 GM |
28908 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28909 | fi | |
743c80a7 | 28910 | |
3a019ab4 GM |
28911 | if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then |
28912 | as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined. | |
28913 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28914 | fi | |
8966cbff GM |
28915 | if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then |
28916 | as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined. | |
28917 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28918 | fi | |
4fda9c95 | 28919 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
a9bec17c | 28920 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
4fda9c95 GM |
28921 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28922 | fi | |
0eb775a3 GM |
28923 | if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then |
28924 | as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. | |
28925 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28926 | fi | |
6d153f56 | 28927 | if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then |
a9bec17c | 28928 | as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. |
6d153f56 GM |
28929 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28930 | fi | |
6c051bab | 28931 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
a9bec17c | 28932 | as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
6c051bab GM |
28933 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28934 | fi | |
28935 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then | |
a9bec17c | 28936 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
6c051bab GM |
28937 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28938 | fi | |
d7ad186c GM |
28939 | if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then |
28940 | as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined. | |
28941 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28942 | fi | |
6d153f56 | 28943 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
a9bec17c | 28944 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. |
6d153f56 GM |
28945 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28946 | fi | |
710f5812 GM |
28947 | if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then |
28948 | as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined. | |
28949 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28950 | fi | |
0cdca42a GM |
28951 | if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then |
28952 | as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined. | |
28953 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28954 | fi | |
710f5812 GM |
28955 | if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then |
28956 | as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined. | |
28957 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28958 | fi | |
6d153f56 | 28959 | if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then |
a9bec17c | 28960 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. |
6d153f56 GM |
28961 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28962 | fi | |
710f5812 GM |
28963 | if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then |
28964 | as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined. | |
28965 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28966 | fi | |
d7ad186c GM |
28967 | if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then |
28968 | as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined. | |
28969 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28970 | fi | |
a0a61e58 GM |
28971 | if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then |
28972 | as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined. | |
28973 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28974 | fi | |
710f5812 GM |
28975 | if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then |
28976 | as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined. | |
28977 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
28978 | fi | |
6d153f56 | 28979 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
a9bec17c | 28980 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. |
6d153f56 GM |
28981 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28982 | fi | |
3e0be4ab | 28983 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then |
a9bec17c | 28984 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. |
3e0be4ab GM |
28985 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28986 | fi | |
6d153f56 | 28987 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
a9bec17c | 28988 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. |
6d153f56 GM |
28989 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
28990 | fi | |
710f5812 GM |
28991 | if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then |
28992 | as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined. | |
28993 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
6c051bab | 28994 | fi |
942f733f | 28995 | |
743c80a7 PE |
28996 | gl_libobjs= |
28997 | gl_ltlibobjs= | |
28998 | if test -n "$gl_LIBOBJS"; then | |
28999 | # Remove the extension. | |
29000 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
29001 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
29002 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
29003 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
29004 | done | |
29005 | fi | |
29006 | gl_LIBOBJS=$gl_libobjs | |
29007 | ||
29008 | gl_LTLIBOBJS=$gl_ltlibobjs | |
29009 | ||
29010 | ||
29011 | ||
29012 | gltests_libobjs= | |
29013 | gltests_ltlibobjs= | |
29014 | if test -n "$gltests_LIBOBJS"; then | |
29015 | # Remove the extension. | |
29016 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
29017 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
29018 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
29019 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
29020 | done | |
29021 | fi | |
29022 | gltests_LIBOBJS=$gltests_libobjs | |
29023 | ||
29024 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
29025 | ||
067d23c9 KY |
29026 | |
29027 | ||
a9bec17c | 29028 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
29029 | ac_write_fail=0 |
29030 | ac_clean_files_save=$ac_clean_files | |
29031 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
29032 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
29033 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
29034 | as_write_fail=0 | |
29035 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
29036 | #! $SHELL | |
29037 | # Generated by $as_me. | |
29038 | # Run this file to recreate the current configuration. | |
29039 | # Compiler output produced by configure, useful for debugging | |
29040 | # configure, is in config.log if it exists. | |
29041 | ||
29042 | debug=false | |
29043 | ac_cs_recheck=false | |
29044 | ac_cs_silent=false | |
29045 | ||
29046 | SHELL=\${CONFIG_SHELL-$SHELL} | |
29047 | export SHELL | |
29048 | _ASEOF | |
29049 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
29050 | ## -------------------- ## | |
29051 | ## M4sh Initialization. ## | |
29052 | ## -------------------- ## | |
29053 | ||
29054 | # Be more Bourne compatible | |
29055 | DUALCASE=1; export DUALCASE # for MKS sh | |
29056 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
29057 | emulate sh | |
29058 | NULLCMD=: | |
29059 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
29060 | # is contrary to our usage. Disable this feature. | |
29061 | alias -g '${1+"$@"}'='"$@"' | |
29062 | setopt NO_GLOB_SUBST | |
29063 | else | |
29064 | case `(set -o) 2>/dev/null` in #( | |
29065 | *posix*) : | |
29066 | set -o posix ;; #( | |
29067 | *) : | |
29068 | ;; | |
29069 | esac | |
29070 | fi | |
29071 | ||
29072 | ||
29073 | as_nl=' | |
29074 | ' | |
29075 | export as_nl | |
29076 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
29077 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
29078 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
29079 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
29080 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
29081 | # but without wasting forks for bash or zsh. | |
29082 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
29083 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
29084 | as_echo='print -r --' | |
29085 | as_echo_n='print -rn --' | |
29086 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
29087 | as_echo='printf %s\n' | |
29088 | as_echo_n='printf %s' | |
29089 | else | |
29090 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
29091 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
29092 | as_echo_n='/usr/ucb/echo -n' | |
29093 | else | |
29094 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
29095 | as_echo_n_body='eval | |
29096 | arg=$1; | |
29097 | case $arg in #( | |
29098 | *"$as_nl"*) | |
29099 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
29100 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
29101 | esac; | |
29102 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
29103 | ' | |
29104 | export as_echo_n_body | |
29105 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
29106 | fi | |
29107 | export as_echo_body | |
29108 | as_echo='sh -c $as_echo_body as_echo' | |
29109 | fi | |
29110 | ||
29111 | # The user is always right. | |
29112 | if test "${PATH_SEPARATOR+set}" != set; then | |
29113 | PATH_SEPARATOR=: | |
29114 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
29115 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
29116 | PATH_SEPARATOR=';' | |
29117 | } | |
29118 | fi | |
29119 | ||
29120 | ||
29121 | # IFS | |
29122 | # We need space, tab and new line, in precisely that order. Quoting is | |
29123 | # there to prevent editors from complaining about space-tab. | |
29124 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
29125 | # splitting by setting IFS to empty value.) | |
29126 | IFS=" "" $as_nl" | |
29127 | ||
29128 | # Find who we are. Look in the path if we contain no directory separator. | |
29129 | case $0 in #(( | |
29130 | *[\\/]* ) as_myself=$0 ;; | |
29131 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
29132 | for as_dir in $PATH | |
29133 | do | |
29134 | IFS=$as_save_IFS | |
29135 | test -z "$as_dir" && as_dir=. | |
29136 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
29137 | done | |
29138 | IFS=$as_save_IFS | |
29139 | ||
29140 | ;; | |
29141 | esac | |
29142 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
29143 | # in which case we are not to be found in the path. | |
29144 | if test "x$as_myself" = x; then | |
29145 | as_myself=$0 | |
29146 | fi | |
29147 | if test ! -f "$as_myself"; then | |
29148 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
29149 | exit 1 | |
29150 | fi | |
29151 | ||
29152 | # Unset variables that we do not need and which cause bugs (e.g. in | |
29153 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
29154 | # suppresses any "Segmentation fault" message there. '((' could | |
29155 | # trigger a bug in pdksh 5.2.14. | |
29156 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
29157 | do eval test x\${$as_var+set} = xset \ | |
29158 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
29159 | done | |
29160 | PS1='$ ' | |
29161 | PS2='> ' | |
29162 | PS4='+ ' | |
29163 | ||
29164 | # NLS nuisances. | |
29165 | LC_ALL=C | |
29166 | export LC_ALL | |
29167 | LANGUAGE=C | |
29168 | export LANGUAGE | |
29169 | ||
29170 | # CDPATH. | |
29171 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
29172 | ||
29173 | ||
a9bec17c GM |
29174 | # as_fn_error ERROR [LINENO LOG_FD] |
29175 | # --------------------------------- | |
067d23c9 KY |
29176 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
29177 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
a9bec17c | 29178 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
29179 | as_fn_error () |
29180 | { | |
a9bec17c GM |
29181 | as_status=$?; test $as_status -eq 0 && as_status=1 |
29182 | if test "$3"; then | |
29183 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
29184 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 29185 | fi |
a9bec17c | 29186 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
29187 | as_fn_exit $as_status |
29188 | } # as_fn_error | |
29189 | ||
29190 | ||
29191 | # as_fn_set_status STATUS | |
29192 | # ----------------------- | |
29193 | # Set $? to STATUS, without forking. | |
29194 | as_fn_set_status () | |
29195 | { | |
29196 | return $1 | |
29197 | } # as_fn_set_status | |
29198 | ||
29199 | # as_fn_exit STATUS | |
29200 | # ----------------- | |
29201 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
29202 | as_fn_exit () | |
29203 | { | |
29204 | set +e | |
29205 | as_fn_set_status $1 | |
29206 | exit $1 | |
29207 | } # as_fn_exit | |
29208 | ||
29209 | # as_fn_unset VAR | |
29210 | # --------------- | |
29211 | # Portably unset VAR. | |
29212 | as_fn_unset () | |
29213 | { | |
29214 | { eval $1=; unset $1;} | |
29215 | } | |
29216 | as_unset=as_fn_unset | |
29217 | # as_fn_append VAR VALUE | |
29218 | # ---------------------- | |
29219 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
29220 | # advantage of any shell optimizations that allow amortized linear growth over | |
29221 | # repeated appends, instead of the typical quadratic growth present in naive | |
29222 | # implementations. | |
29223 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
29224 | eval 'as_fn_append () | |
29225 | { | |
29226 | eval $1+=\$2 | |
29227 | }' | |
29228 | else | |
29229 | as_fn_append () | |
29230 | { | |
29231 | eval $1=\$$1\$2 | |
29232 | } | |
29233 | fi # as_fn_append | |
29234 | ||
29235 | # as_fn_arith ARG... | |
29236 | # ------------------ | |
29237 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
29238 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
29239 | # must be portable across $(()) and expr. | |
29240 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
29241 | eval 'as_fn_arith () | |
29242 | { | |
29243 | as_val=$(( $* )) | |
29244 | }' | |
29245 | else | |
29246 | as_fn_arith () | |
29247 | { | |
29248 | as_val=`expr "$@" || test $? -eq 1` | |
29249 | } | |
29250 | fi # as_fn_arith | |
29251 | ||
29252 | ||
29253 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
29254 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
29255 | as_expr=expr | |
29256 | else | |
29257 | as_expr=false | |
29258 | fi | |
29259 | ||
29260 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
29261 | as_basename=basename | |
29262 | else | |
29263 | as_basename=false | |
29264 | fi | |
29265 | ||
29266 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
29267 | as_dirname=dirname | |
29268 | else | |
29269 | as_dirname=false | |
29270 | fi | |
29271 | ||
29272 | as_me=`$as_basename -- "$0" || | |
29273 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
29274 | X"$0" : 'X\(//\)$' \| \ | |
29275 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
29276 | $as_echo X/"$0" | | |
29277 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
29278 | s//\1/ | |
29279 | q | |
29280 | } | |
29281 | /^X\/\(\/\/\)$/{ | |
29282 | s//\1/ | |
29283 | q | |
29284 | } | |
29285 | /^X\/\(\/\).*/{ | |
29286 | s//\1/ | |
29287 | q | |
29288 | } | |
29289 | s/.*/./; q'` | |
29290 | ||
29291 | # Avoid depending upon Character Ranges. | |
29292 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
29293 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
29294 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
29295 | as_cr_digits='0123456789' | |
29296 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
29297 | ||
29298 | ECHO_C= ECHO_N= ECHO_T= | |
29299 | case `echo -n x` in #((((( | |
29300 | -n*) | |
29301 | case `echo 'xy\c'` in | |
29302 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
29303 | xy) ECHO_C='\c';; | |
29304 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
29305 | ECHO_T=' ';; | |
29306 | esac;; | |
29307 | *) | |
29308 | ECHO_N='-n';; | |
29309 | esac | |
29310 | ||
29311 | rm -f conf$$ conf$$.exe conf$$.file | |
29312 | if test -d conf$$.dir; then | |
29313 | rm -f conf$$.dir/conf$$.file | |
29314 | else | |
29315 | rm -f conf$$.dir | |
29316 | mkdir conf$$.dir 2>/dev/null | |
29317 | fi | |
29318 | if (echo >conf$$.file) 2>/dev/null; then | |
29319 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
29320 | as_ln_s='ln -s' | |
29321 | # ... but there are two gotchas: | |
29322 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
29323 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
29324 | # In both cases, we have to default to `cp -p'. | |
29325 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
29326 | as_ln_s='cp -p' | |
29327 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
29328 | as_ln_s=ln | |
29329 | else | |
29330 | as_ln_s='cp -p' | |
29331 | fi | |
29332 | else | |
29333 | as_ln_s='cp -p' | |
29334 | fi | |
29335 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
29336 | rmdir conf$$.dir 2>/dev/null | |
29337 | ||
29338 | ||
29339 | # as_fn_mkdir_p | |
29340 | # ------------- | |
29341 | # Create "$as_dir" as a directory, including parents if necessary. | |
29342 | as_fn_mkdir_p () | |
29343 | { | |
29344 | ||
29345 | case $as_dir in #( | |
29346 | -*) as_dir=./$as_dir;; | |
29347 | esac | |
29348 | test -d "$as_dir" || eval $as_mkdir_p || { | |
29349 | as_dirs= | |
29350 | while :; do | |
29351 | case $as_dir in #( | |
29352 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
29353 | *) as_qdir=$as_dir;; | |
29354 | esac | |
29355 | as_dirs="'$as_qdir' $as_dirs" | |
29356 | as_dir=`$as_dirname -- "$as_dir" || | |
29357 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
29358 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
29359 | X"$as_dir" : 'X\(//\)$' \| \ | |
29360 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
29361 | $as_echo X"$as_dir" | | |
29362 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
29363 | s//\1/ | |
29364 | q | |
29365 | } | |
29366 | /^X\(\/\/\)[^/].*/{ | |
29367 | s//\1/ | |
29368 | q | |
29369 | } | |
29370 | /^X\(\/\/\)$/{ | |
29371 | s//\1/ | |
29372 | q | |
29373 | } | |
29374 | /^X\(\/\).*/{ | |
29375 | s//\1/ | |
29376 | q | |
29377 | } | |
29378 | s/.*/./; q'` | |
29379 | test -d "$as_dir" && break | |
29380 | done | |
29381 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
a9bec17c | 29382 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
29383 | |
29384 | ||
29385 | } # as_fn_mkdir_p | |
29386 | if mkdir -p . 2>/dev/null; then | |
29387 | as_mkdir_p='mkdir -p "$as_dir"' | |
29388 | else | |
29389 | test -d ./-p && rmdir ./-p | |
29390 | as_mkdir_p=false | |
29391 | fi | |
29392 | ||
29393 | if test -x / >/dev/null 2>&1; then | |
29394 | as_test_x='test -x' | |
29395 | else | |
29396 | if ls -dL / >/dev/null 2>&1; then | |
29397 | as_ls_L_option=L | |
29398 | else | |
29399 | as_ls_L_option= | |
29400 | fi | |
29401 | as_test_x=' | |
29402 | eval sh -c '\'' | |
29403 | if test -d "$1"; then | |
29404 | test -d "$1/."; | |
29405 | else | |
29406 | case $1 in #( | |
29407 | -*)set "./$1";; | |
29408 | esac; | |
29409 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
29410 | ???[sx]*):;;*)false;;esac;fi | |
29411 | '\'' sh | |
29412 | ' | |
29413 | fi | |
29414 | as_executable_p=$as_test_x | |
29415 | ||
29416 | # Sed expression to map a string onto a valid CPP name. | |
29417 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
29418 | ||
29419 | # Sed expression to map a string onto a valid variable name. | |
29420 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
29421 | ||
29422 | ||
29423 | exec 6>&1 | |
29424 | ## ----------------------------------- ## | |
29425 | ## Main body of $CONFIG_STATUS script. ## | |
29426 | ## ----------------------------------- ## | |
29427 | _ASEOF | |
29428 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
29429 | ||
29430 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29431 | # Save the log message, to keep $0 and so on meaningful, and to | |
29432 | # report actual input values of CONFIG_FILES etc. instead of their | |
29433 | # values after options handling. | |
29434 | ac_log=" | |
c574bc34 | 29435 | This file was extended by emacs $as_me 24.3.50, which was |
a9bec17c | 29436 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
29437 | |
29438 | CONFIG_FILES = $CONFIG_FILES | |
29439 | CONFIG_HEADERS = $CONFIG_HEADERS | |
29440 | CONFIG_LINKS = $CONFIG_LINKS | |
29441 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
29442 | $ $0 $@ | |
29443 | ||
29444 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
29445 | " | |
29446 | ||
29447 | _ACEOF | |
29448 | ||
29449 | case $ac_config_files in *" | |
29450 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
29451 | esac | |
29452 | ||
29453 | case $ac_config_headers in *" | |
29454 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
29455 | esac | |
29456 | ||
29457 | ||
29458 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29459 | # Files that config.status was made for. | |
29460 | config_files="$ac_config_files" | |
29461 | config_headers="$ac_config_headers" | |
29462 | config_commands="$ac_config_commands" | |
29463 | ||
29464 | _ACEOF | |
29465 | ||
29466 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29467 | ac_cs_usage="\ | |
29468 | \`$as_me' instantiates files and other configuration actions | |
29469 | from templates according to the current configuration. Unless the files | |
29470 | and actions are specified as TAGs, all are instantiated by default. | |
29471 | ||
29472 | Usage: $0 [OPTION]... [TAG]... | |
29473 | ||
29474 | -h, --help print this help, then exit | |
29475 | -V, --version print version number and configuration settings, then exit | |
29476 | --config print configuration, then exit | |
29477 | -q, --quiet, --silent | |
29478 | do not print progress messages | |
29479 | -d, --debug don't remove temporary files | |
29480 | --recheck update $as_me by reconfiguring in the same conditions | |
29481 | --file=FILE[:TEMPLATE] | |
29482 | instantiate the configuration file FILE | |
29483 | --header=FILE[:TEMPLATE] | |
29484 | instantiate the configuration header FILE | |
29485 | ||
29486 | Configuration files: | |
29487 | $config_files | |
29488 | ||
29489 | Configuration headers: | |
29490 | $config_headers | |
29491 | ||
29492 | Configuration commands: | |
29493 | $config_commands | |
29494 | ||
29495 | Report bugs to the package provider." | |
29496 | ||
29497 | _ACEOF | |
29498 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29499 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
29500 | ac_cs_version="\\ | |
c574bc34 | 29501 | emacs config.status 24.3.50 |
a9bec17c | 29502 | configured by $0, generated by GNU Autoconf 2.65, |
067d23c9 KY |
29503 | with options \\"\$ac_cs_config\\" |
29504 | ||
a9bec17c | 29505 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
29506 | This config.status script is free software; the Free Software Foundation |
29507 | gives unlimited permission to copy, distribute and modify it." | |
29508 | ||
29509 | ac_pwd='$ac_pwd' | |
29510 | srcdir='$srcdir' | |
29511 | INSTALL='$INSTALL' | |
743c80a7 PE |
29512 | MKDIR_P='$MKDIR_P' |
29513 | AWK='$AWK' | |
067d23c9 KY |
29514 | test -n "\$AWK" || AWK=awk |
29515 | _ACEOF | |
29516 | ||
29517 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29518 | # The default lists apply if the user does not specify any file. | |
29519 | ac_need_defaults=: | |
29520 | while test $# != 0 | |
29521 | do | |
29522 | case $1 in | |
a9bec17c | 29523 | --*=*) |
067d23c9 KY |
29524 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
29525 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
29526 | ac_shift=: | |
29527 | ;; | |
29528 | *) | |
29529 | ac_option=$1 | |
29530 | ac_optarg=$2 | |
29531 | ac_shift=shift | |
29532 | ;; | |
29533 | esac | |
29534 | ||
29535 | case $ac_option in | |
29536 | # Handling of the options. | |
29537 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
29538 | ac_cs_recheck=: ;; | |
29539 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
29540 | $as_echo "$ac_cs_version"; exit ;; | |
29541 | --config | --confi | --conf | --con | --co | --c ) | |
29542 | $as_echo "$ac_cs_config"; exit ;; | |
29543 | --debug | --debu | --deb | --de | --d | -d ) | |
29544 | debug=: ;; | |
29545 | --file | --fil | --fi | --f ) | |
29546 | $ac_shift | |
29547 | case $ac_optarg in | |
29548 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
29549 | esac | |
29550 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
29551 | ac_need_defaults=false;; | |
29552 | --header | --heade | --head | --hea ) | |
29553 | $ac_shift | |
29554 | case $ac_optarg in | |
29555 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
29556 | esac | |
29557 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
29558 | ac_need_defaults=false;; | |
29559 | --he | --h) | |
29560 | # Conflict between --help and --header | |
a9bec17c | 29561 | as_fn_error "ambiguous option: \`$1' |
067d23c9 KY |
29562 | Try \`$0 --help' for more information.";; |
29563 | --help | --hel | -h ) | |
29564 | $as_echo "$ac_cs_usage"; exit ;; | |
29565 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
29566 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
29567 | ac_cs_silent=: ;; | |
29568 | ||
29569 | # This is an error. | |
a9bec17c | 29570 | -*) as_fn_error "unrecognized option: \`$1' |
067d23c9 KY |
29571 | Try \`$0 --help' for more information." ;; |
29572 | ||
29573 | *) as_fn_append ac_config_targets " $1" | |
29574 | ac_need_defaults=false ;; | |
29575 | ||
29576 | esac | |
29577 | shift | |
29578 | done | |
29579 | ||
29580 | ac_configure_extra_args= | |
29581 | ||
29582 | if $ac_cs_silent; then | |
29583 | exec 6>/dev/null | |
29584 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
29585 | fi | |
29586 | ||
29587 | _ACEOF | |
29588 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29589 | if \$ac_cs_recheck; then | |
29590 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
29591 | shift | |
29592 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
29593 | CONFIG_SHELL='$SHELL' | |
29594 | export CONFIG_SHELL | |
29595 | exec "\$@" | |
29596 | fi | |
29597 | ||
29598 | _ACEOF | |
29599 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29600 | exec 5>>config.log | |
29601 | { | |
29602 | echo | |
29603 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
29604 | ## Running $as_me. ## | |
29605 | _ASBOX | |
29606 | $as_echo "$ac_log" | |
29607 | } >&5 | |
29608 | ||
29609 | _ACEOF | |
29610 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29611 | # | |
29612 | # INIT-COMMANDS | |
29613 | # | |
743c80a7 | 29614 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
7c61eaab | 29615 | GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys" |
067d23c9 KY |
29616 | |
29617 | _ACEOF | |
29618 | ||
29619 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29620 | ||
29621 | # Handling of arguments. | |
29622 | for ac_config_target in $ac_config_targets | |
29623 | do | |
29624 | case $ac_config_target in | |
29625 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 29626 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
bb7dce39 GM |
29627 | "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in" ;; |
29628 | "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;; | |
29629 | "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;; | |
29630 | "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" ;; | |
067d23c9 | 29631 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 29632 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
56ade35c GM |
29633 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
29634 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
29635 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
29636 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
29637 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
29638 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
29639 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
29640 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
29641 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
29642 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
bb7dce39 | 29643 | "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;; |
7c61eaab | 29644 | "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;; |
56ade35c | 29645 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; |
40b65096 | 29646 | "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; |
9411886d PE |
29647 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
29648 | "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; | |
29649 | "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; | |
067d23c9 | 29650 | |
a9bec17c | 29651 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
29652 | esac |
29653 | done | |
29654 | ||
29655 | ||
29656 | # If the user did not use the arguments to specify the items to instantiate, | |
29657 | # then the envvar interface is used. Set only those that are not. | |
29658 | # We use the long form for the default assignment because of an extremely | |
29659 | # bizarre bug on SunOS 4.1.3. | |
29660 | if $ac_need_defaults; then | |
29661 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
29662 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
29663 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
29664 | fi | |
29665 | ||
29666 | # Have a temporary directory for convenience. Make it in the build tree | |
29667 | # simply because there is no reason against having it here, and in addition, | |
29668 | # creating and moving files from /tmp can sometimes cause problems. | |
29669 | # Hook for its removal unless debugging. | |
29670 | # Note that there is a small window in which the directory will not be cleaned: | |
29671 | # after its creation but before its name has been assigned to `$tmp'. | |
29672 | $debug || | |
29673 | { | |
a9bec17c | 29674 | tmp= |
067d23c9 | 29675 | trap 'exit_status=$? |
a9bec17c | 29676 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
29677 | ' 0 |
29678 | trap 'as_fn_exit 1' 1 2 13 15 | |
29679 | } | |
29680 | # Create a (secure) tmp directory for tmp files. | |
29681 | ||
29682 | { | |
29683 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
a9bec17c | 29684 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
29685 | } || |
29686 | { | |
29687 | tmp=./conf$$-$RANDOM | |
29688 | (umask 077 && mkdir "$tmp") | |
a9bec17c | 29689 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
29690 | |
29691 | # Set up the scripts for CONFIG_FILES section. | |
29692 | # No need to generate them if there are no CONFIG_FILES. | |
29693 | # This happens for instance with `./config.status config.h'. | |
29694 | if test -n "$CONFIG_FILES"; then | |
29695 | ||
29696 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
29697 | ac_cs_awk_getline=: | |
29698 | ac_cs_awk_pipe_init= | |
29699 | ac_cs_awk_read_file=' | |
29700 | while ((getline aline < (F[key])) > 0) | |
29701 | print(aline) | |
29702 | close(F[key])' | |
29703 | ac_cs_awk_pipe_fini= | |
29704 | else | |
29705 | ac_cs_awk_getline=false | |
29706 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
29707 | ac_cs_awk_read_file=' | |
29708 | print "|#_!!_#|" | |
29709 | print "cat " F[key] " &&" | |
29710 | '$ac_cs_awk_pipe_init | |
29711 | # The final `:' finishes the AND list. | |
29712 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
29713 | fi | |
29714 | ac_cr=`echo X | tr X '\015'` | |
29715 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
29716 | # But we know of no other shell where ac_cr would be empty at this | |
29717 | # point, so we can use a bashism as a fallback. | |
29718 | if test "x$ac_cr" = x; then | |
29719 | eval ac_cr=\$\'\\r\' | |
29720 | fi | |
29721 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
29722 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
a9bec17c | 29723 | ac_cs_awk_cr='\r' |
067d23c9 KY |
29724 | else |
29725 | ac_cs_awk_cr=$ac_cr | |
29726 | fi | |
29727 | ||
a9bec17c | 29728 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
29729 | _ACEOF |
29730 | ||
29731 | # Create commands to substitute file output variables. | |
29732 | { | |
29733 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
a9bec17c | 29734 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
29735 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
29736 | echo "_ACAWK" && | |
29737 | echo "_ACEOF" | |
29738 | } >conf$$files.sh && | |
29739 | . ./conf$$files.sh || | |
a9bec17c | 29740 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
29741 | rm -f conf$$files.sh |
29742 | ||
29743 | { | |
29744 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
29745 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
29746 | echo "_ACEOF" | |
29747 | } >conf$$subs.sh || | |
a9bec17c GM |
29748 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
29749 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
067d23c9 KY |
29750 | ac_delim='%!_!# ' |
29751 | for ac_last_try in false false false false false :; do | |
29752 | . ./conf$$subs.sh || | |
a9bec17c | 29753 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
29754 | |
29755 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
29756 | if test $ac_delim_n = $ac_delim_num; then | |
29757 | break | |
29758 | elif $ac_last_try; then | |
a9bec17c | 29759 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
29760 | else |
29761 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
29762 | fi | |
29763 | done | |
29764 | rm -f conf$$subs.sh | |
29765 | ||
29766 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
a9bec17c | 29767 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
29768 | _ACEOF |
29769 | sed -n ' | |
29770 | h | |
29771 | s/^/S["/; s/!.*/"]=/ | |
29772 | p | |
29773 | g | |
29774 | s/^[^!]*!// | |
29775 | :repl | |
29776 | t repl | |
29777 | s/'"$ac_delim"'$// | |
29778 | t delim | |
29779 | :nl | |
29780 | h | |
29781 | s/\(.\{148\}\)..*/\1/ | |
29782 | t more1 | |
29783 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
29784 | p | |
29785 | n | |
29786 | b repl | |
29787 | :more1 | |
29788 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
29789 | p | |
29790 | g | |
29791 | s/.\{148\}// | |
29792 | t nl | |
29793 | :delim | |
29794 | h | |
29795 | s/\(.\{148\}\)..*/\1/ | |
29796 | t more2 | |
29797 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
29798 | p | |
29799 | b | |
29800 | :more2 | |
29801 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
29802 | p | |
29803 | g | |
29804 | s/.\{148\}// | |
29805 | t delim | |
29806 | ' <conf$$subs.awk | sed ' | |
29807 | /^[^""]/{ | |
29808 | N | |
29809 | s/\n// | |
29810 | } | |
29811 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
29812 | rm -f conf$$subs.awk | |
29813 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29814 | _ACAWK | |
a9bec17c | 29815 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
29816 | for (key in S) S_is_set[key] = 1 |
29817 | FS = "\a" | |
29818 | \$ac_cs_awk_pipe_init | |
29819 | } | |
29820 | { | |
29821 | line = $ 0 | |
29822 | nfields = split(line, field, "@") | |
29823 | substed = 0 | |
29824 | len = length(field[1]) | |
29825 | for (i = 2; i < nfields; i++) { | |
29826 | key = field[i] | |
29827 | keylen = length(key) | |
29828 | if (S_is_set[key]) { | |
29829 | value = S[key] | |
29830 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
29831 | len += length(value) + length(field[++i]) | |
29832 | substed = 1 | |
29833 | } else | |
29834 | len += 1 + keylen | |
29835 | } | |
29836 | if (nfields == 3 && !substed) { | |
29837 | key = field[2] | |
29838 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
29839 | \$ac_cs_awk_read_file | |
29840 | next | |
29841 | } | |
29842 | } | |
29843 | print line | |
29844 | } | |
29845 | \$ac_cs_awk_pipe_fini | |
29846 | _ACAWK | |
29847 | _ACEOF | |
29848 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29849 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
29850 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
29851 | else | |
29852 | cat | |
a9bec17c GM |
29853 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
29854 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
29855 | _ACEOF |
29856 | ||
a9bec17c GM |
29857 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
29858 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
29859 | # trailing colons and then remove the whole line if VPATH becomes empty |
29860 | # (actually we leave an empty line to preserve line numbers). | |
29861 | if test "x$srcdir" = x.; then | |
a9bec17c GM |
29862 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
29863 | s/:*\$(srcdir):*/:/ | |
29864 | s/:*\${srcdir}:*/:/ | |
29865 | s/:*@srcdir@:*/:/ | |
29866 | s/^\([^=]*=[ ]*\):*/\1/ | |
067d23c9 KY |
29867 | s/:*$// |
29868 | s/^[^=]*=[ ]*$// | |
29869 | }' | |
29870 | fi | |
29871 | ||
29872 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
29873 | fi # test -n "$CONFIG_FILES" | |
29874 | ||
29875 | # Set up the scripts for CONFIG_HEADERS section. | |
29876 | # No need to generate them if there are no CONFIG_HEADERS. | |
29877 | # This happens for instance with `./config.status Makefile'. | |
29878 | if test -n "$CONFIG_HEADERS"; then | |
a9bec17c | 29879 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
29880 | BEGIN { |
29881 | _ACEOF | |
29882 | ||
29883 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
29884 | # here-document in config.status, that substitutes the proper values into | |
29885 | # config.h.in to produce config.h. | |
29886 | ||
29887 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
29888 | # handling of long lines. | |
29889 | ac_delim='%!_!# ' | |
29890 | for ac_last_try in false false :; do | |
a9bec17c GM |
29891 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
29892 | if test -z "$ac_t"; then | |
067d23c9 KY |
29893 | break |
29894 | elif $ac_last_try; then | |
a9bec17c | 29895 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
29896 | else |
29897 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
29898 | fi | |
29899 | done | |
29900 | ||
29901 | # For the awk script, D is an array of macro values keyed by name, | |
29902 | # likewise P contains macro parameters if any. Preserve backslash | |
29903 | # newline sequences. | |
29904 | ||
29905 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
29906 | sed -n ' | |
29907 | s/.\{148\}/&'"$ac_delim"'/g | |
29908 | t rset | |
29909 | :rset | |
29910 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
29911 | t def | |
29912 | d | |
29913 | :def | |
29914 | s/\\$// | |
29915 | t bsnl | |
29916 | s/["\\]/\\&/g | |
29917 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
29918 | D["\1"]=" \3"/p | |
29919 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
29920 | d | |
29921 | :bsnl | |
29922 | s/["\\]/\\&/g | |
29923 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
29924 | D["\1"]=" \3\\\\\\n"\\/p | |
29925 | t cont | |
29926 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
29927 | t cont | |
29928 | d | |
29929 | :cont | |
29930 | n | |
29931 | s/.\{148\}/&'"$ac_delim"'/g | |
29932 | t clear | |
29933 | :clear | |
29934 | s/\\$// | |
29935 | t bsnlc | |
29936 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
29937 | d | |
29938 | :bsnlc | |
29939 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
29940 | b cont | |
29941 | ' <confdefs.h | sed ' | |
29942 | s/'"$ac_delim"'/"\\\ | |
29943 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
29944 | ||
29945 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
29946 | for (key in D) D_is_set[key] = 1 | |
29947 | FS = "\a" | |
29948 | } | |
29949 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
29950 | line = \$ 0 | |
29951 | split(line, arg, " ") | |
29952 | if (arg[1] == "#") { | |
29953 | defundef = arg[2] | |
29954 | mac1 = arg[3] | |
29955 | } else { | |
29956 | defundef = substr(arg[1], 2) | |
29957 | mac1 = arg[2] | |
29958 | } | |
29959 | split(mac1, mac2, "(") #) | |
29960 | macro = mac2[1] | |
29961 | prefix = substr(line, 1, index(line, defundef) - 1) | |
29962 | if (D_is_set[macro]) { | |
29963 | # Preserve the white space surrounding the "#". | |
29964 | print prefix "define", macro P[macro] D[macro] | |
29965 | next | |
29966 | } else { | |
29967 | # Replace #undef with comments. This is necessary, for example, | |
29968 | # in the case of _POSIX_SOURCE, which is predefined and required | |
29969 | # on some systems where configure will not decide to define it. | |
29970 | if (defundef == "undef") { | |
29971 | print "/*", prefix defundef, macro, "*/" | |
29972 | next | |
29973 | } | |
29974 | } | |
29975 | } | |
29976 | { print } | |
29977 | _ACAWK | |
29978 | _ACEOF | |
29979 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
a9bec17c | 29980 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
29981 | fi # test -n "$CONFIG_HEADERS" |
29982 | ||
29983 | ||
29984 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
29985 | shift | |
29986 | for ac_tag | |
29987 | do | |
29988 | case $ac_tag in | |
29989 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
29990 | esac | |
29991 | case $ac_mode$ac_tag in | |
29992 | :[FHL]*:*);; | |
a9bec17c | 29993 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
29994 | :[FH]-) ac_tag=-:-;; |
29995 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
29996 | esac | |
29997 | ac_save_IFS=$IFS | |
29998 | IFS=: | |
29999 | set x $ac_tag | |
30000 | IFS=$ac_save_IFS | |
30001 | shift | |
30002 | ac_file=$1 | |
30003 | shift | |
30004 | ||
30005 | case $ac_mode in | |
30006 | :L) ac_source=$1;; | |
30007 | :[FH]) | |
30008 | ac_file_inputs= | |
30009 | for ac_f | |
30010 | do | |
30011 | case $ac_f in | |
a9bec17c | 30012 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
30013 | *) # Look for the file first in the build tree, then in the source tree |
30014 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
30015 | # because $ac_f cannot contain `:'. | |
30016 | test -f "$ac_f" || | |
30017 | case $ac_f in | |
30018 | [\\/$]*) false;; | |
30019 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
30020 | esac || | |
a9bec17c | 30021 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
30022 | esac |
30023 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
30024 | as_fn_append ac_file_inputs " '$ac_f'" | |
30025 | done | |
30026 | ||
30027 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
30028 | # use $as_me), people would be surprised to read: | |
30029 | # /* config.h. Generated by config.status. */ | |
30030 | configure_input='Generated from '` | |
30031 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
30032 | `' by configure.' | |
30033 | if test x"$ac_file" != x-; then | |
30034 | configure_input="$ac_file. $configure_input" | |
30035 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
30036 | $as_echo "$as_me: creating $ac_file" >&6;} | |
30037 | fi | |
30038 | # Neutralize special characters interpreted by sed in replacement strings. | |
30039 | case $configure_input in #( | |
30040 | *\&* | *\|* | *\\* ) | |
30041 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
30042 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
30043 | *) ac_sed_conf_input=$configure_input;; | |
30044 | esac | |
30045 | ||
30046 | case $ac_tag in | |
a9bec17c GM |
30047 | *:-:* | *:-) cat >"$tmp/stdin" \ |
30048 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
30049 | esac |
30050 | ;; | |
30051 | esac | |
30052 | ||
30053 | ac_dir=`$as_dirname -- "$ac_file" || | |
30054 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
30055 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
30056 | X"$ac_file" : 'X\(//\)$' \| \ | |
30057 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
30058 | $as_echo X"$ac_file" | | |
30059 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
30060 | s//\1/ | |
30061 | q | |
30062 | } | |
30063 | /^X\(\/\/\)[^/].*/{ | |
30064 | s//\1/ | |
30065 | q | |
30066 | } | |
30067 | /^X\(\/\/\)$/{ | |
30068 | s//\1/ | |
30069 | q | |
30070 | } | |
30071 | /^X\(\/\).*/{ | |
30072 | s//\1/ | |
30073 | q | |
30074 | } | |
30075 | s/.*/./; q'` | |
30076 | as_dir="$ac_dir"; as_fn_mkdir_p | |
30077 | ac_builddir=. | |
30078 | ||
30079 | case "$ac_dir" in | |
30080 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
30081 | *) | |
30082 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
30083 | # A ".." for each directory in $ac_dir_suffix. | |
30084 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
30085 | case $ac_top_builddir_sub in | |
30086 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
30087 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
30088 | esac ;; | |
30089 | esac | |
30090 | ac_abs_top_builddir=$ac_pwd | |
30091 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
30092 | # for backward compatibility: | |
30093 | ac_top_builddir=$ac_top_build_prefix | |
30094 | ||
30095 | case $srcdir in | |
30096 | .) # We are building in place. | |
30097 | ac_srcdir=. | |
30098 | ac_top_srcdir=$ac_top_builddir_sub | |
30099 | ac_abs_top_srcdir=$ac_pwd ;; | |
30100 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
30101 | ac_srcdir=$srcdir$ac_dir_suffix; | |
30102 | ac_top_srcdir=$srcdir | |
30103 | ac_abs_top_srcdir=$srcdir ;; | |
30104 | *) # Relative name. | |
30105 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
30106 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
30107 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
30108 | esac | |
30109 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
30110 | ||
30111 | ||
30112 | case $ac_mode in | |
30113 | :F) | |
30114 | # | |
30115 | # CONFIG_FILE | |
30116 | # | |
30117 | ||
30118 | case $INSTALL in | |
30119 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
30120 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
30121 | esac | |
743c80a7 PE |
30122 | ac_MKDIR_P=$MKDIR_P |
30123 | case $MKDIR_P in | |
30124 | [\\/$]* | ?:[\\/]* ) ;; | |
30125 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
30126 | esac | |
067d23c9 KY |
30127 | _ACEOF |
30128 | ||
30129 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
30130 | # If the template does not know about datarootdir, expand it. | |
30131 | # FIXME: This hack should be removed a few years after 2.60. | |
30132 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
30133 | ac_sed_dataroot=' | |
30134 | /datarootdir/ { | |
30135 | p | |
30136 | q | |
30137 | } | |
30138 | /@datadir@/p | |
30139 | /@docdir@/p | |
30140 | /@infodir@/p | |
30141 | /@localedir@/p | |
30142 | /@mandir@/p' | |
30143 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
30144 | *datarootdir*) ac_datarootdir_seen=yes;; | |
30145 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
30146 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
30147 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
30148 | _ACEOF | |
30149 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
30150 | ac_datarootdir_hack=' | |
30151 | s&@datadir@&$datadir&g | |
30152 | s&@docdir@&$docdir&g | |
30153 | s&@infodir@&$infodir&g | |
30154 | s&@localedir@&$localedir&g | |
30155 | s&@mandir@&$mandir&g | |
30156 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
30157 | esac | |
30158 | _ACEOF | |
30159 | ||
30160 | # Neutralize VPATH when `$srcdir' = `.'. | |
30161 | # Shell code in configure.ac might set extrasub. | |
30162 | # FIXME: do we really want to maintain this feature? | |
30163 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
30164 | ac_sed_extra="$ac_vpsub | |
30165 | $extrasub | |
30166 | _ACEOF | |
30167 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
30168 | :t | |
30169 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
30170 | s|@configure_input@|$ac_sed_conf_input|;t t | |
30171 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
30172 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
30173 | s&@srcdir@&$ac_srcdir&;t t | |
30174 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
30175 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
30176 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
30177 | s&@builddir@&$ac_builddir&;t t | |
30178 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
30179 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
30180 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 30181 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
30182 | $ac_datarootdir_hack |
30183 | " | |
30184 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
30185 | if $ac_cs_awk_getline; then | |
a9bec17c | 30186 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 30187 | else |
a9bec17c GM |
30188 | $AWK -f "$tmp/subs.awk" | $SHELL |
30189 | fi >$tmp/out \ | |
30190 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
30191 | |
30192 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
a9bec17c GM |
30193 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
30194 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 30195 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 30196 | which seems to be undefined. Please make sure it is defined." >&5 |
067d23c9 | 30197 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 30198 | which seems to be undefined. Please make sure it is defined." >&2;} |
067d23c9 | 30199 | |
a9bec17c | 30200 | rm -f "$tmp/stdin" |
067d23c9 | 30201 | case $ac_file in |
a9bec17c GM |
30202 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
30203 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 30204 | esac \ |
a9bec17c | 30205 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
30206 | ;; |
30207 | :H) | |
30208 | # | |
30209 | # CONFIG_HEADER | |
30210 | # | |
30211 | if test x"$ac_file" != x-; then | |
30212 | { | |
30213 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
30214 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
30215 | } >"$tmp/config.h" \ | |
30216 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
30217 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
30218 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
30219 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
30220 | else | |
30221 | rm -f "$ac_file" | |
a9bec17c GM |
30222 | mv "$tmp/config.h" "$ac_file" \ |
30223 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
30224 | fi |
30225 | else | |
30226 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
30227 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
30228 | || as_fn_error "could not create -" "$LINENO" 5 | |
067d23c9 | 30229 | fi |
743c80a7 PE |
30230 | # Compute "$ac_file"'s index in $config_headers. |
30231 | _am_arg="$ac_file" | |
30232 | _am_stamp_count=1 | |
30233 | for _am_header in $config_headers :; do | |
30234 | case $_am_header in | |
30235 | $_am_arg | $_am_arg:* ) | |
30236 | break ;; | |
30237 | * ) | |
30238 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
30239 | esac | |
30240 | done | |
30241 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
30242 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
30243 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
30244 | X"$_am_arg" : 'X\(//\)$' \| \ | |
30245 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
30246 | $as_echo X"$_am_arg" | | |
30247 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
30248 | s//\1/ | |
30249 | q | |
30250 | } | |
30251 | /^X\(\/\/\)[^/].*/{ | |
30252 | s//\1/ | |
30253 | q | |
30254 | } | |
30255 | /^X\(\/\/\)$/{ | |
30256 | s//\1/ | |
30257 | q | |
30258 | } | |
30259 | /^X\(\/\).*/{ | |
30260 | s//\1/ | |
30261 | q | |
30262 | } | |
30263 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
30264 | ;; |
30265 | ||
30266 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
30267 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
30268 | ;; | |
30269 | esac | |
30270 | ||
30271 | ||
30272 | case $ac_file$ac_mode in | |
743c80a7 PE |
30273 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
30274 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
30275 | # are listed without --file. Let's play safe and only enable the eval | |
30276 | # if we detect the quoting. | |
30277 | case $CONFIG_FILES in | |
30278 | *\'*) eval set x "$CONFIG_FILES" ;; | |
30279 | *) set x $CONFIG_FILES ;; | |
30280 | esac | |
30281 | shift | |
30282 | for mf | |
30283 | do | |
30284 | # Strip MF so we end up with the name of the file. | |
30285 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
30286 | # Check whether this is an Automake generated Makefile or not. | |
30287 | # We used to match only the files named `Makefile.in', but | |
30288 | # some people rename them; so instead we look at the file content. | |
30289 | # Grep'ing the first line is not enough: some people post-process | |
30290 | # each Makefile.in and add a new line on top of each file to say so. | |
30291 | # Grep'ing the whole file is not good either: AIX grep has a line | |
30292 | # limit of 2048, but all sed's we know have understand at least 4000. | |
30293 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
30294 | dirpart=`$as_dirname -- "$mf" || | |
30295 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
30296 | X"$mf" : 'X\(//\)[^/]' \| \ | |
30297 | X"$mf" : 'X\(//\)$' \| \ | |
30298 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
30299 | $as_echo X"$mf" | | |
30300 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
30301 | s//\1/ | |
30302 | q | |
30303 | } | |
30304 | /^X\(\/\/\)[^/].*/{ | |
30305 | s//\1/ | |
30306 | q | |
30307 | } | |
30308 | /^X\(\/\/\)$/{ | |
30309 | s//\1/ | |
30310 | q | |
30311 | } | |
30312 | /^X\(\/\).*/{ | |
30313 | s//\1/ | |
30314 | q | |
30315 | } | |
30316 | s/.*/./; q'` | |
30317 | else | |
30318 | continue | |
30319 | fi | |
30320 | # Extract the definition of DEPDIR, am__include, and am__quote | |
30321 | # from the Makefile without running `make'. | |
30322 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
30323 | test -z "$DEPDIR" && continue | |
30324 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
30325 | test -z "am__include" && continue | |
30326 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
30327 | # When using ansi2knr, U may be empty or an underscore; expand it | |
30328 | U=`sed -n 's/^U = //p' < "$mf"` | |
30329 | # Find all dependency output files, they are included files with | |
30330 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
30331 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
30332 | # expansion. | |
30333 | for file in `sed -n " | |
30334 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
30335 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
30336 | # Make sure the directory exists. | |
30337 | test -f "$dirpart/$file" && continue | |
30338 | fdir=`$as_dirname -- "$file" || | |
30339 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
30340 | X"$file" : 'X\(//\)[^/]' \| \ | |
30341 | X"$file" : 'X\(//\)$' \| \ | |
30342 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
30343 | $as_echo X"$file" | | |
30344 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
30345 | s//\1/ | |
30346 | q | |
30347 | } | |
30348 | /^X\(\/\/\)[^/].*/{ | |
30349 | s//\1/ | |
30350 | q | |
30351 | } | |
30352 | /^X\(\/\/\)$/{ | |
30353 | s//\1/ | |
30354 | q | |
30355 | } | |
30356 | /^X\(\/\).*/{ | |
30357 | s//\1/ | |
30358 | q | |
30359 | } | |
30360 | s/.*/./; q'` | |
30361 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
30362 | # echo "creating $dirpart/$file" | |
30363 | echo '# dummy' > "$dirpart/$file" | |
30364 | done | |
30365 | done | |
30366 | } | |
30367 | ;; | |
9411886d | 30368 | "mkdirs":C) |
067d23c9 KY |
30369 | for dir in etc lisp ; do |
30370 | test -d ${dir} || mkdir ${dir} | |
30371 | done | |
9411886d PE |
30372 | ;; |
30373 | "epaths":C) | |
067d23c9 | 30374 | echo creating src/epaths.h |
7c61eaab GM |
30375 | if test "${opsys}" = "mingw32"; then |
30376 | ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32 | |
30377 | else | |
30378 | ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force | |
30379 | fi | |
9411886d PE |
30380 | ;; |
30381 | "gdbinit":C) | |
b5591ebb | 30382 | if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then |
067d23c9 | 30383 | echo creating src/.gdbinit |
b5591ebb | 30384 | echo "source $srcdir/src/.gdbinit" > src/.gdbinit |
067d23c9 | 30385 | fi |
067d23c9 KY |
30386 | ;; |
30387 | ||
30388 | esac | |
30389 | done # for ac_tag | |
30390 | ||
30391 | ||
30392 | as_fn_exit 0 | |
30393 | _ACEOF | |
30394 | ac_clean_files=$ac_clean_files_save | |
30395 | ||
30396 | test $ac_write_fail = 0 || | |
a9bec17c | 30397 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
30398 | |
30399 | ||
30400 | # configure is writing to config.log, and then calls config.status. | |
30401 | # config.status does its own redirection, appending to config.log. | |
30402 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
30403 | # by configure, so config.status won't be able to write to it; its | |
30404 | # output is simply discarded. So we exec the FD to /dev/null, | |
30405 | # effectively closing config.log, so it can be properly (re)opened and | |
30406 | # appended to by config.status. When coming back to configure, we | |
30407 | # need to make the FD available again. | |
30408 | if test "$no_create" != yes; then | |
30409 | ac_cs_success=: | |
30410 | ac_config_status_args= | |
30411 | test "$silent" = yes && | |
30412 | ac_config_status_args="$ac_config_status_args --quiet" | |
30413 | exec 5>/dev/null | |
30414 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
30415 | exec 5>>config.log | |
30416 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
30417 | # would make configure fail if this is the last instruction. | |
a9bec17c | 30418 | $ac_cs_success || as_fn_exit $? |
067d23c9 KY |
30419 | fi |
30420 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
30421 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
30422 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
30423 | fi | |
30424 |