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 |
067d23c9 | 608 | LD_SWITCH_SYSTEM_TEMACS |
743c80a7 PE |
609 | LIBGNU_LTLIBDEPS |
610 | LIBGNU_LIBDEPS | |
611 | gltests_WITNESS | |
710f5812 GM |
612 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE |
613 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE | |
6d153f56 GM |
614 | gl_GNULIB_ENABLED_verify_FALSE |
615 | gl_GNULIB_ENABLED_verify_TRUE | |
616 | gl_GNULIB_ENABLED_strtoull_FALSE | |
617 | gl_GNULIB_ENABLED_strtoull_TRUE | |
3e0be4ab GM |
618 | gl_GNULIB_ENABLED_strtoll_FALSE |
619 | gl_GNULIB_ENABLED_strtoll_TRUE | |
6d153f56 GM |
620 | gl_GNULIB_ENABLED_stat_FALSE |
621 | gl_GNULIB_ENABLED_stat_TRUE | |
710f5812 GM |
622 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE |
623 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE | |
a0a61e58 GM |
624 | gl_GNULIB_ENABLED_pathmax_FALSE |
625 | gl_GNULIB_ENABLED_pathmax_TRUE | |
d7ad186c GM |
626 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE |
627 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE | |
710f5812 GM |
628 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE |
629 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE | |
6d153f56 GM |
630 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE |
631 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE | |
710f5812 GM |
632 | gl_GNULIB_ENABLED_getgroups_FALSE |
633 | gl_GNULIB_ENABLED_getgroups_TRUE | |
634 | gl_GNULIB_ENABLED_euidaccess_FALSE | |
635 | gl_GNULIB_ENABLED_euidaccess_TRUE | |
6d153f56 GM |
636 | gl_GNULIB_ENABLED_dosname_FALSE |
637 | gl_GNULIB_ENABLED_dosname_TRUE | |
d7ad186c GM |
638 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE |
639 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE | |
6d153f56 GM |
640 | LTLIBINTL |
641 | LIBINTL | |
710f5812 | 642 | LIB_EACCESS |
f199cab1 | 643 | WINDOWS_64_BIT_OFF_T |
e275c824 PE |
644 | HAVE_UNISTD_H |
645 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H | |
646 | NEXT_UNISTD_H | |
f077f61d | 647 | LIB_TIMER_TIME |
1fd182f0 PE |
648 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
649 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
650 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
651 | NEXT_AS_FIRST_DIRECTIVE_TIME_H | |
652 | NEXT_TIME_H | |
0eb775a3 | 653 | WINDOWS_64_BIT_ST_SIZE |
5fa4ac76 PE |
654 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
655 | NEXT_SYS_STAT_H | |
283c7aed GM |
656 | NEXT_AS_FIRST_DIRECTIVE_STRING_H |
657 | NEXT_STRING_H | |
1f5d53eb PE |
658 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
659 | NEXT_STDLIB_H | |
6ad6792b GM |
660 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H |
661 | NEXT_STDIO_H | |
662 | REPLACE_VSPRINTF | |
663 | REPLACE_VSNPRINTF | |
664 | REPLACE_VPRINTF | |
665 | REPLACE_VFPRINTF | |
666 | REPLACE_VDPRINTF | |
667 | REPLACE_VASPRINTF | |
668 | REPLACE_TMPFILE | |
669 | REPLACE_STDIO_WRITE_FUNCS | |
ca36e0ff | 670 | REPLACE_STDIO_READ_FUNCS |
6ad6792b GM |
671 | REPLACE_SPRINTF |
672 | REPLACE_SNPRINTF | |
673 | REPLACE_RENAMEAT | |
674 | REPLACE_RENAME | |
675 | REPLACE_REMOVE | |
676 | REPLACE_PRINTF | |
677 | REPLACE_POPEN | |
678 | REPLACE_PERROR | |
679 | REPLACE_OBSTACK_PRINTF | |
680 | REPLACE_GETLINE | |
681 | REPLACE_GETDELIM | |
682 | REPLACE_FTELLO | |
683 | REPLACE_FTELL | |
684 | REPLACE_FSEEKO | |
685 | REPLACE_FSEEK | |
686 | REPLACE_FREOPEN | |
687 | REPLACE_FPURGE | |
688 | REPLACE_FPRINTF | |
689 | REPLACE_FOPEN | |
690 | REPLACE_FFLUSH | |
2b1928b8 | 691 | REPLACE_FDOPEN |
6ad6792b GM |
692 | REPLACE_FCLOSE |
693 | REPLACE_DPRINTF | |
694 | HAVE_VDPRINTF | |
695 | HAVE_VASPRINTF | |
696 | HAVE_RENAMEAT | |
2b1928b8 GM |
697 | HAVE_POPEN |
698 | HAVE_PCLOSE | |
6ad6792b GM |
699 | HAVE_FTELLO |
700 | HAVE_FSEEKO | |
701 | HAVE_DPRINTF | |
702 | HAVE_DECL_VSNPRINTF | |
703 | HAVE_DECL_SNPRINTF | |
704 | HAVE_DECL_OBSTACK_PRINTF | |
705 | HAVE_DECL_GETLINE | |
706 | HAVE_DECL_GETDELIM | |
707 | HAVE_DECL_FTELLO | |
708 | HAVE_DECL_FSEEKO | |
709 | HAVE_DECL_FPURGE | |
710 | GNULIB_VSPRINTF_POSIX | |
711 | GNULIB_VSNPRINTF | |
712 | GNULIB_VPRINTF_POSIX | |
713 | GNULIB_VPRINTF | |
714 | GNULIB_VFPRINTF_POSIX | |
715 | GNULIB_VFPRINTF | |
716 | GNULIB_VDPRINTF | |
ca36e0ff GM |
717 | GNULIB_VSCANF |
718 | GNULIB_VFSCANF | |
6ad6792b GM |
719 | GNULIB_VASPRINTF |
720 | GNULIB_TMPFILE | |
721 | GNULIB_STDIO_H_SIGPIPE | |
ca36e0ff | 722 | GNULIB_STDIO_H_NONBLOCKING |
6ad6792b GM |
723 | GNULIB_SPRINTF_POSIX |
724 | GNULIB_SNPRINTF | |
ca36e0ff | 725 | GNULIB_SCANF |
6ad6792b GM |
726 | GNULIB_RENAMEAT |
727 | GNULIB_RENAME | |
728 | GNULIB_REMOVE | |
729 | GNULIB_PUTS | |
730 | GNULIB_PUTCHAR | |
731 | GNULIB_PUTC | |
732 | GNULIB_PRINTF_POSIX | |
733 | GNULIB_PRINTF | |
734 | GNULIB_POPEN | |
735 | GNULIB_PERROR | |
2b1928b8 | 736 | GNULIB_PCLOSE |
6ad6792b GM |
737 | GNULIB_OBSTACK_PRINTF_POSIX |
738 | GNULIB_OBSTACK_PRINTF | |
739 | GNULIB_GETLINE | |
740 | GNULIB_GETDELIM | |
ca36e0ff GM |
741 | GNULIB_GETCHAR |
742 | GNULIB_GETC | |
6ad6792b GM |
743 | GNULIB_FWRITE |
744 | GNULIB_FTELLO | |
745 | GNULIB_FTELL | |
746 | GNULIB_FSEEKO | |
747 | GNULIB_FSEEK | |
ca36e0ff | 748 | GNULIB_FSCANF |
6ad6792b | 749 | GNULIB_FREOPEN |
ca36e0ff | 750 | GNULIB_FREAD |
6ad6792b GM |
751 | GNULIB_FPUTS |
752 | GNULIB_FPUTC | |
753 | GNULIB_FPURGE | |
754 | GNULIB_FPRINTF_POSIX | |
755 | GNULIB_FPRINTF | |
756 | GNULIB_FOPEN | |
ca36e0ff GM |
757 | GNULIB_FGETS |
758 | GNULIB_FGETC | |
6ad6792b | 759 | GNULIB_FFLUSH |
2b1928b8 | 760 | GNULIB_FDOPEN |
6ad6792b GM |
761 | GNULIB_FCLOSE |
762 | GNULIB_DPRINTF | |
1fd182f0 PE |
763 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
764 | NEXT_STDDEF_H | |
6c051bab GM |
765 | GL_GENERATE_STDDEF_H_FALSE |
766 | GL_GENERATE_STDDEF_H_TRUE | |
1fd182f0 PE |
767 | STDDEF_H |
768 | HAVE_WCHAR_T | |
769 | REPLACE_NULL | |
16c3e636 | 770 | HAVE__BOOL |
6c051bab GM |
771 | GL_GENERATE_STDBOOL_H_FALSE |
772 | GL_GENERATE_STDBOOL_H_TRUE | |
16c3e636 | 773 | STDBOOL_H |
6d153f56 GM |
774 | GL_GENERATE_STDARG_H_FALSE |
775 | GL_GENERATE_STDARG_H_TRUE | |
776 | STDARG_H | |
777 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H | |
778 | NEXT_STDARG_H | |
0eb775a3 GM |
779 | GL_GENERATE_STDALIGN_H_FALSE |
780 | GL_GENERATE_STDALIGN_H_TRUE | |
781 | STDALIGN_H | |
3e0be4ab GM |
782 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H |
783 | NEXT_SIGNAL_H | |
0eb775a3 | 784 | LIB_PTHREAD_SIGMASK |
2b1928b8 | 785 | REPLACE_RAISE |
3e0be4ab GM |
786 | REPLACE_PTHREAD_SIGMASK |
787 | HAVE_SIGHANDLER_T | |
788 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T | |
789 | HAVE_STRUCT_SIGACTION_SA_SIGACTION | |
790 | HAVE_SIGACTION | |
791 | HAVE_SIGINFO_T | |
792 | HAVE_SIGSET_T | |
2b1928b8 | 793 | HAVE_RAISE |
3e0be4ab GM |
794 | HAVE_PTHREAD_SIGMASK |
795 | HAVE_POSIX_SIGNALBLOCKING | |
796 | GNULIB_SIGACTION | |
797 | GNULIB_SIGPROCMASK | |
798 | GNULIB_SIGNAL_H_SIGPIPE | |
2b1928b8 | 799 | GNULIB_RAISE |
3e0be4ab | 800 | GNULIB_PTHREAD_SIGMASK |
f199cab1 GM |
801 | HAVE_SYS_SELECT_H |
802 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H | |
803 | NEXT_SYS_SELECT_H | |
804 | REPLACE_SELECT | |
805 | REPLACE_PSELECT | |
806 | HAVE_PSELECT | |
807 | GNULIB_SELECT | |
808 | GNULIB_PSELECT | |
1fd182f0 PE |
809 | REPLACE_TIMEGM |
810 | REPLACE_NANOSLEEP | |
811 | REPLACE_MKTIME | |
812 | REPLACE_LOCALTIME_R | |
813 | HAVE_TIMEGM | |
814 | HAVE_STRPTIME | |
815 | HAVE_NANOSLEEP | |
816 | HAVE_DECL_LOCALTIME_R | |
817 | GNULIB_TIME_R | |
818 | GNULIB_TIMEGM | |
819 | GNULIB_STRPTIME | |
820 | GNULIB_NANOSLEEP | |
821 | GNULIB_MKTIME | |
283c7aed GM |
822 | UNDEFINE_STRTOK_R |
823 | REPLACE_STRTOK_R | |
824 | REPLACE_STRSIGNAL | |
825 | REPLACE_STRNLEN | |
826 | REPLACE_STRNDUP | |
827 | REPLACE_STRNCAT | |
828 | REPLACE_STRERROR_R | |
829 | REPLACE_STRERROR | |
830 | REPLACE_STRCHRNUL | |
831 | REPLACE_STRCASESTR | |
832 | REPLACE_STRSTR | |
833 | REPLACE_STRDUP | |
834 | REPLACE_STPNCPY | |
835 | REPLACE_MEMMEM | |
836 | REPLACE_MEMCHR | |
837 | HAVE_STRVERSCMP | |
838 | HAVE_DECL_STRSIGNAL | |
839 | HAVE_DECL_STRERROR_R | |
840 | HAVE_DECL_STRTOK_R | |
841 | HAVE_STRCASESTR | |
842 | HAVE_STRSEP | |
843 | HAVE_STRPBRK | |
844 | HAVE_DECL_STRNLEN | |
845 | HAVE_DECL_STRNDUP | |
846 | HAVE_DECL_STRDUP | |
847 | HAVE_STRCHRNUL | |
848 | HAVE_STPNCPY | |
849 | HAVE_STPCPY | |
850 | HAVE_RAWMEMCHR | |
851 | HAVE_DECL_MEMRCHR | |
852 | HAVE_MEMPCPY | |
853 | HAVE_DECL_MEMMEM | |
854 | HAVE_MEMCHR | |
855 | HAVE_FFSLL | |
856 | HAVE_FFSL | |
857 | HAVE_MBSLEN | |
858 | GNULIB_STRVERSCMP | |
859 | GNULIB_STRSIGNAL | |
860 | GNULIB_STRERROR_R | |
861 | GNULIB_STRERROR | |
862 | GNULIB_MBSTOK_R | |
863 | GNULIB_MBSSEP | |
864 | GNULIB_MBSSPN | |
865 | GNULIB_MBSPBRK | |
866 | GNULIB_MBSCSPN | |
867 | GNULIB_MBSCASESTR | |
868 | GNULIB_MBSPCASECMP | |
869 | GNULIB_MBSNCASECMP | |
870 | GNULIB_MBSCASECMP | |
871 | GNULIB_MBSSTR | |
872 | GNULIB_MBSRCHR | |
873 | GNULIB_MBSCHR | |
874 | GNULIB_MBSNLEN | |
875 | GNULIB_MBSLEN | |
876 | GNULIB_STRTOK_R | |
877 | GNULIB_STRCASESTR | |
878 | GNULIB_STRSTR | |
879 | GNULIB_STRSEP | |
880 | GNULIB_STRPBRK | |
881 | GNULIB_STRNLEN | |
882 | GNULIB_STRNDUP | |
883 | GNULIB_STRNCAT | |
884 | GNULIB_STRDUP | |
885 | GNULIB_STRCHRNUL | |
886 | GNULIB_STPNCPY | |
887 | GNULIB_STPCPY | |
888 | GNULIB_RAWMEMCHR | |
889 | GNULIB_MEMRCHR | |
890 | GNULIB_MEMPCPY | |
891 | GNULIB_MEMMEM | |
892 | GNULIB_MEMCHR | |
893 | GNULIB_FFSLL | |
894 | GNULIB_FFSL | |
4fda9c95 GM |
895 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H |
896 | NEXT_INTTYPES_H | |
897 | UINT64_MAX_EQ_ULONG_MAX | |
898 | UINT32_MAX_LT_UINTMAX_MAX | |
899 | PRIPTR_PREFIX | |
900 | PRI_MACROS_BROKEN | |
901 | INT64_MAX_EQ_LONG_MAX | |
902 | INT32_MAX_LT_INTMAX_MAX | |
0eb775a3 | 903 | REPLACE_STRTOIMAX |
4fda9c95 GM |
904 | HAVE_DECL_STRTOUMAX |
905 | HAVE_DECL_STRTOIMAX | |
906 | HAVE_DECL_IMAXDIV | |
907 | HAVE_DECL_IMAXABS | |
908 | GNULIB_STRTOUMAX | |
909 | GNULIB_STRTOIMAX | |
910 | GNULIB_IMAXDIV | |
911 | GNULIB_IMAXABS | |
912 | GL_GENERATE_STDINT_H_FALSE | |
913 | GL_GENERATE_STDINT_H_TRUE | |
914 | STDINT_H | |
915 | WINT_T_SUFFIX | |
916 | WCHAR_T_SUFFIX | |
917 | SIG_ATOMIC_T_SUFFIX | |
918 | SIZE_T_SUFFIX | |
919 | PTRDIFF_T_SUFFIX | |
920 | HAVE_SIGNED_WINT_T | |
921 | HAVE_SIGNED_WCHAR_T | |
922 | HAVE_SIGNED_SIG_ATOMIC_T | |
923 | BITSIZEOF_WINT_T | |
924 | BITSIZEOF_WCHAR_T | |
925 | BITSIZEOF_SIG_ATOMIC_T | |
926 | BITSIZEOF_SIZE_T | |
927 | BITSIZEOF_PTRDIFF_T | |
928 | APPLE_UNIVERSAL_BUILD | |
929 | HAVE_SYS_BITYPES_H | |
930 | HAVE_SYS_INTTYPES_H | |
931 | HAVE_STDINT_H | |
932 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
933 | NEXT_STDINT_H | |
934 | HAVE_SYS_TYPES_H | |
935 | HAVE_INTTYPES_H | |
936 | HAVE_WCHAR_H | |
937 | HAVE_UNSIGNED_LONG_LONG_INT | |
938 | HAVE_LONG_LONG_INT | |
f199cab1 GM |
939 | HAVE_WINSOCK2_H |
940 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H | |
941 | NEXT_SYS_TIME_H | |
942 | REPLACE_STRUCT_TIMEVAL | |
943 | REPLACE_GETTIMEOFDAY | |
944 | HAVE_SYS_TIME_H | |
945 | HAVE_STRUCT_TIMEVAL | |
946 | HAVE_GETTIMEOFDAY | |
947 | GNULIB_GETTIMEOFDAY | |
0eb775a3 | 948 | GNULIB_GL_UNISTD_H_GETOPT |
e275c824 PE |
949 | GETOPT_H |
950 | HAVE_GETOPT_H | |
951 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H | |
952 | NEXT_GETOPT_H | |
7d2a1c5e GM |
953 | GETLOADAVG_LIBS |
954 | REPLACE_WCTOMB | |
955 | REPLACE_UNSETENV | |
956 | REPLACE_STRTOD | |
957 | REPLACE_SETENV | |
958 | REPLACE_REALPATH | |
959 | REPLACE_REALLOC | |
0eb775a3 | 960 | REPLACE_RANDOM_R |
7d2a1c5e | 961 | REPLACE_PUTENV |
0eb775a3 | 962 | REPLACE_PTSNAME_R |
b6c9d18d | 963 | REPLACE_PTSNAME |
7d2a1c5e GM |
964 | REPLACE_MKSTEMP |
965 | REPLACE_MBTOWC | |
966 | REPLACE_MALLOC | |
967 | REPLACE_CANONICALIZE_FILE_NAME | |
968 | REPLACE_CALLOC | |
969 | HAVE_DECL_UNSETENV | |
970 | HAVE_UNLOCKPT | |
971 | HAVE_SYS_LOADAVG_H | |
972 | HAVE_STRUCT_RANDOM_DATA | |
973 | HAVE_STRTOULL | |
974 | HAVE_STRTOLL | |
975 | HAVE_STRTOD | |
976 | HAVE_DECL_SETENV | |
977 | HAVE_SETENV | |
2cdd55fc | 978 | HAVE_SECURE_GETENV |
7d2a1c5e GM |
979 | HAVE_RPMATCH |
980 | HAVE_REALPATH | |
981 | HAVE_RANDOM_R | |
982 | HAVE_RANDOM_H | |
0eb775a3 GM |
983 | HAVE_RANDOM |
984 | HAVE_PTSNAME_R | |
7d2a1c5e | 985 | HAVE_PTSNAME |
0eb775a3 | 986 | HAVE_POSIX_OPENPT |
7d2a1c5e GM |
987 | HAVE_MKSTEMPS |
988 | HAVE_MKSTEMP | |
989 | HAVE_MKOSTEMPS | |
990 | HAVE_MKOSTEMP | |
991 | HAVE_MKDTEMP | |
992 | HAVE_GRANTPT | |
993 | HAVE_GETSUBOPT | |
994 | HAVE_DECL_GETLOADAVG | |
995 | HAVE_CANONICALIZE_FILE_NAME | |
996 | HAVE_ATOLL | |
997 | HAVE__EXIT | |
998 | GNULIB_WCTOMB | |
999 | GNULIB_UNSETENV | |
1000 | GNULIB_UNLOCKPT | |
1001 | GNULIB_SYSTEM_POSIX | |
1002 | GNULIB_STRTOULL | |
1003 | GNULIB_STRTOLL | |
1004 | GNULIB_STRTOD | |
1005 | GNULIB_SETENV | |
2cdd55fc | 1006 | GNULIB_SECURE_GETENV |
7d2a1c5e GM |
1007 | GNULIB_RPMATCH |
1008 | GNULIB_REALPATH | |
1009 | GNULIB_REALLOC_POSIX | |
1010 | GNULIB_RANDOM_R | |
0eb775a3 | 1011 | GNULIB_RANDOM |
7d2a1c5e | 1012 | GNULIB_PUTENV |
0eb775a3 | 1013 | GNULIB_PTSNAME_R |
7d2a1c5e | 1014 | GNULIB_PTSNAME |
0eb775a3 | 1015 | GNULIB_POSIX_OPENPT |
7d2a1c5e GM |
1016 | GNULIB_MKSTEMPS |
1017 | GNULIB_MKSTEMP | |
1018 | GNULIB_MKOSTEMPS | |
1019 | GNULIB_MKOSTEMP | |
1020 | GNULIB_MKDTEMP | |
1021 | GNULIB_MBTOWC | |
1022 | GNULIB_MALLOC_POSIX | |
1023 | GNULIB_GRANTPT | |
1024 | GNULIB_GETSUBOPT | |
1025 | GNULIB_GETLOADAVG | |
1026 | GNULIB_CANONICALIZE_FILE_NAME | |
1027 | GNULIB_CALLOC_POSIX | |
1028 | GNULIB_ATOLL | |
1029 | GNULIB__EXIT | |
d7ad186c GM |
1030 | REPLACE_UTIMENSAT |
1031 | REPLACE_STAT | |
1032 | REPLACE_MKNOD | |
1033 | REPLACE_MKFIFO | |
1034 | REPLACE_MKDIR | |
1035 | REPLACE_LSTAT | |
1036 | REPLACE_FUTIMENS | |
1037 | REPLACE_FSTATAT | |
1038 | REPLACE_FSTAT | |
1039 | HAVE_UTIMENSAT | |
1040 | HAVE_MKNODAT | |
1041 | HAVE_MKNOD | |
1042 | HAVE_MKFIFOAT | |
1043 | HAVE_MKFIFO | |
1044 | HAVE_MKDIRAT | |
1045 | HAVE_LSTAT | |
1046 | HAVE_LCHMOD | |
1047 | HAVE_FUTIMENS | |
1048 | HAVE_FSTATAT | |
1049 | HAVE_FCHMODAT | |
1050 | GNULIB_UTIMENSAT | |
1051 | GNULIB_STAT | |
1052 | GNULIB_MKNODAT | |
1053 | GNULIB_MKNOD | |
1054 | GNULIB_MKFIFOAT | |
1055 | GNULIB_MKFIFO | |
1056 | GNULIB_MKDIRAT | |
1057 | GNULIB_LSTAT | |
1058 | GNULIB_LCHMOD | |
1059 | GNULIB_FUTIMENS | |
1060 | GNULIB_FSTATAT | |
1061 | GNULIB_FSTAT | |
1062 | GNULIB_FCHMODAT | |
2407788f | 1063 | LIB_FDATASYNC |
710f5812 GM |
1064 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H |
1065 | NEXT_FCNTL_H | |
710f5812 GM |
1066 | REPLACE_OPENAT |
1067 | REPLACE_OPEN | |
1068 | REPLACE_FCNTL | |
1069 | HAVE_OPENAT | |
1070 | HAVE_FCNTL | |
1071 | GNULIB_OPENAT | |
1072 | GNULIB_OPEN | |
1073 | GNULIB_NONBLOCKING | |
1074 | GNULIB_FCNTL | |
8966cbff GM |
1075 | GL_GENERATE_EXECINFO_H_FALSE |
1076 | GL_GENERATE_EXECINFO_H_TRUE | |
1077 | LIB_EXECINFO | |
1078 | EXECINFO_H | |
d7ad186c GM |
1079 | HAVE_DIRENT_H |
1080 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H | |
1081 | NEXT_DIRENT_H | |
1082 | PRAGMA_COLUMNS | |
1083 | PRAGMA_SYSTEM_HEADER | |
1084 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
1085 | INCLUDE_NEXT | |
1086 | REPLACE_FDOPENDIR | |
1087 | REPLACE_DIRFD | |
1088 | REPLACE_CLOSEDIR | |
1089 | REPLACE_OPENDIR | |
1090 | HAVE_ALPHASORT | |
1091 | HAVE_SCANDIR | |
1092 | HAVE_FDOPENDIR | |
1093 | HAVE_DECL_FDOPENDIR | |
1094 | HAVE_DECL_DIRFD | |
1095 | HAVE_CLOSEDIR | |
1096 | HAVE_REWINDDIR | |
1097 | HAVE_READDIR | |
1098 | HAVE_OPENDIR | |
1099 | GNULIB_ALPHASORT | |
1100 | GNULIB_SCANDIR | |
1101 | GNULIB_FDOPENDIR | |
1102 | GNULIB_DIRFD | |
1103 | GNULIB_CLOSEDIR | |
1104 | GNULIB_REWINDDIR | |
1105 | GNULIB_READDIR | |
1106 | GNULIB_OPENDIR | |
e275c824 PE |
1107 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS |
1108 | UNISTD_H_HAVE_WINSOCK2_H | |
1109 | REPLACE_WRITE | |
1110 | REPLACE_USLEEP | |
1111 | REPLACE_UNLINKAT | |
1112 | REPLACE_UNLINK | |
1113 | REPLACE_TTYNAME_R | |
1114 | REPLACE_SYMLINK | |
1115 | REPLACE_SLEEP | |
1116 | REPLACE_RMDIR | |
1117 | REPLACE_READLINK | |
ca36e0ff | 1118 | REPLACE_READ |
e275c824 PE |
1119 | REPLACE_PWRITE |
1120 | REPLACE_PREAD | |
1121 | REPLACE_LSEEK | |
1122 | REPLACE_LINKAT | |
1123 | REPLACE_LINK | |
1124 | REPLACE_LCHOWN | |
0eb775a3 | 1125 | REPLACE_ISATTY |
e275c824 PE |
1126 | REPLACE_GETPAGESIZE |
1127 | REPLACE_GETGROUPS | |
1128 | REPLACE_GETLOGIN_R | |
1129 | REPLACE_GETDOMAINNAME | |
1130 | REPLACE_GETCWD | |
0eb775a3 | 1131 | REPLACE_FTRUNCATE |
e275c824 PE |
1132 | REPLACE_FCHOWNAT |
1133 | REPLACE_DUP2 | |
1134 | REPLACE_DUP | |
1135 | REPLACE_CLOSE | |
1136 | REPLACE_CHOWN | |
1137 | HAVE_SYS_PARAM_H | |
1138 | HAVE_OS_H | |
1139 | HAVE_DECL_TTYNAME_R | |
0eb775a3 | 1140 | HAVE_DECL_SETHOSTNAME |
e275c824 PE |
1141 | HAVE_DECL_GETUSERSHELL |
1142 | HAVE_DECL_GETPAGESIZE | |
1143 | HAVE_DECL_GETLOGIN_R | |
1144 | HAVE_DECL_GETDOMAINNAME | |
2b1928b8 | 1145 | HAVE_DECL_FDATASYNC |
e275c824 PE |
1146 | HAVE_DECL_FCHDIR |
1147 | HAVE_DECL_ENVIRON | |
1148 | HAVE_USLEEP | |
1149 | HAVE_UNLINKAT | |
1150 | HAVE_SYMLINKAT | |
1151 | HAVE_SYMLINK | |
1152 | HAVE_SLEEP | |
0eb775a3 | 1153 | HAVE_SETHOSTNAME |
e275c824 PE |
1154 | HAVE_READLINKAT |
1155 | HAVE_READLINK | |
1156 | HAVE_PWRITE | |
1157 | HAVE_PREAD | |
1158 | HAVE_PIPE2 | |
1159 | HAVE_PIPE | |
1160 | HAVE_LINKAT | |
1161 | HAVE_LINK | |
1162 | HAVE_LCHOWN | |
da6c8463 | 1163 | HAVE_GROUP_MEMBER |
e275c824 PE |
1164 | HAVE_GETPAGESIZE |
1165 | HAVE_GETLOGIN | |
1166 | HAVE_GETHOSTNAME | |
1167 | HAVE_GETGROUPS | |
1168 | HAVE_GETDTABLESIZE | |
1169 | HAVE_FTRUNCATE | |
1170 | HAVE_FSYNC | |
2b1928b8 | 1171 | HAVE_FDATASYNC |
e275c824 PE |
1172 | HAVE_FCHOWNAT |
1173 | HAVE_FCHDIR | |
1174 | HAVE_FACCESSAT | |
1175 | HAVE_EUIDACCESS | |
1176 | HAVE_DUP3 | |
1177 | HAVE_DUP2 | |
1178 | HAVE_CHOWN | |
1179 | GNULIB_WRITE | |
1180 | GNULIB_USLEEP | |
1181 | GNULIB_UNLINKAT | |
1182 | GNULIB_UNLINK | |
1183 | GNULIB_UNISTD_H_SIGPIPE | |
ca36e0ff | 1184 | GNULIB_UNISTD_H_NONBLOCKING |
e275c824 PE |
1185 | GNULIB_TTYNAME_R |
1186 | GNULIB_SYMLINKAT | |
1187 | GNULIB_SYMLINK | |
1188 | GNULIB_SLEEP | |
0eb775a3 | 1189 | GNULIB_SETHOSTNAME |
e275c824 PE |
1190 | GNULIB_RMDIR |
1191 | GNULIB_READLINKAT | |
1192 | GNULIB_READLINK | |
ca36e0ff | 1193 | GNULIB_READ |
e275c824 PE |
1194 | GNULIB_PWRITE |
1195 | GNULIB_PREAD | |
1196 | GNULIB_PIPE2 | |
1197 | GNULIB_PIPE | |
1198 | GNULIB_LSEEK | |
1199 | GNULIB_LINKAT | |
1200 | GNULIB_LINK | |
1201 | GNULIB_LCHOWN | |
0eb775a3 | 1202 | GNULIB_ISATTY |
da6c8463 | 1203 | GNULIB_GROUP_MEMBER |
e275c824 PE |
1204 | GNULIB_GETUSERSHELL |
1205 | GNULIB_GETPAGESIZE | |
1206 | GNULIB_GETLOGIN_R | |
1207 | GNULIB_GETLOGIN | |
1208 | GNULIB_GETHOSTNAME | |
1209 | GNULIB_GETGROUPS | |
1210 | GNULIB_GETDTABLESIZE | |
1211 | GNULIB_GETDOMAINNAME | |
1212 | GNULIB_GETCWD | |
1213 | GNULIB_FTRUNCATE | |
1214 | GNULIB_FSYNC | |
2b1928b8 | 1215 | GNULIB_FDATASYNC |
e275c824 PE |
1216 | GNULIB_FCHOWNAT |
1217 | GNULIB_FCHDIR | |
1218 | GNULIB_FACCESSAT | |
1219 | GNULIB_EUIDACCESS | |
1220 | GNULIB_ENVIRON | |
1221 | GNULIB_DUP3 | |
1222 | GNULIB_DUP2 | |
2b1928b8 | 1223 | GNULIB_DUP |
e275c824 PE |
1224 | GNULIB_CLOSE |
1225 | GNULIB_CHOWN | |
2b1928b8 | 1226 | GNULIB_CHDIR |
f199cab1 | 1227 | LIB_CLOCK_GETTIME |
4fc2b746 GM |
1228 | GL_GENERATE_ALLOCA_H_FALSE |
1229 | GL_GENERATE_ALLOCA_H_TRUE | |
1230 | ALLOCA_H | |
1231 | ALLOCA | |
743c80a7 PE |
1232 | GL_COND_LIBTOOL_FALSE |
1233 | GL_COND_LIBTOOL_TRUE | |
5476a9a4 GM |
1234 | POST_ALLOC_OBJ |
1235 | PRE_ALLOC_OBJ | |
1236 | CYGWIN_OBJ | |
1237 | RALLOC_OBJ | |
1238 | OLDXMENU_DEPS | |
1239 | LIBX_OTHER | |
1240 | LIBXMENU | |
1241 | OLDXMENU | |
1242 | OLDXMENU_TARGET | |
1243 | LIBXT_OTHER | |
1244 | TOOLKIT_LIBW | |
1245 | WIDGET_OBJ | |
1246 | XOBJ | |
1247 | XMENU_OBJ | |
1248 | FONT_OBJ | |
1249 | OTHER_FILES | |
1250 | GNU_OBJC_CFLAGS | |
1251 | ns_appsrc | |
1252 | ns_appresdir | |
1253 | ns_appbindir | |
1254 | ns_appdir | |
5476a9a4 GM |
1255 | X_TOOLKIT_TYPE |
1256 | GNUSTEP_CFLAGS | |
1257 | C_SWITCH_X_SITE | |
1258 | LD_SWITCH_X_SITE | |
1259 | gameuser | |
1260 | gamedir | |
1261 | bitmapdir | |
1262 | archlibdir | |
1263 | etcdir | |
1264 | x_default_search_path | |
1265 | lisppath | |
1266 | locallisppath | |
1267 | standardlisppath | |
1268 | leimdir | |
1269 | lispdir | |
1270 | srcdir | |
1271 | canonical | |
1272 | configuration | |
1273 | version | |
bb7dce39 | 1274 | copyright |
5476a9a4 GM |
1275 | KRB4LIB |
1276 | DESLIB | |
1277 | KRB5LIB | |
1278 | CRYPTOLIB | |
1279 | COM_ERRLIB | |
1280 | LIBRESOLV | |
1281 | LIBHESIOD | |
1282 | TERMCAP_OBJ | |
1283 | LIBS_TERMCAP | |
1284 | BLESSMAIL_TARGET | |
1285 | LIBS_MAIL | |
1286 | liblockfile | |
1287 | LIBXML2_LIBS | |
1288 | LIBXML2_CFLAGS | |
1289 | LIBXSM | |
1290 | LIBGPM | |
1291 | LIBGIF | |
1292 | LIBTIFF | |
1293 | LIBPNG | |
1294 | LIBJPEG | |
1295 | LIBXPM | |
1296 | M17N_FLT_LIBS | |
1297 | M17N_FLT_CFLAGS | |
1298 | LIBOTF_LIBS | |
1299 | LIBOTF_CFLAGS | |
1300 | FREETYPE_LIBS | |
1301 | FREETYPE_CFLAGS | |
1302 | XFT_LIBS | |
1303 | XFT_CFLAGS | |
1304 | FONTCONFIG_LIBS | |
1305 | FONTCONFIG_CFLAGS | |
1306 | LIBXMU | |
1307 | LIBXTR6 | |
4cc63c81 | 1308 | LIBACL_LIBS |
5476a9a4 GM |
1309 | LIBGNUTLS_LIBS |
1310 | LIBGNUTLS_CFLAGS | |
1311 | LIBSELINUX_LIBS | |
1312 | SETTINGS_LIBS | |
1313 | SETTINGS_CFLAGS | |
dcde497f GM |
1314 | GOBJECT_LIBS |
1315 | GOBJECT_CFLAGS | |
5476a9a4 GM |
1316 | GCONF_LIBS |
1317 | GCONF_CFLAGS | |
1318 | GSETTINGS_LIBS | |
1319 | GSETTINGS_CFLAGS | |
1320 | DBUS_OBJ | |
1321 | DBUS_LIBS | |
1322 | DBUS_CFLAGS | |
1323 | GTK_OBJ | |
1324 | GTK_LIBS | |
1325 | GTK_CFLAGS | |
1326 | IMAGEMAGICK_LIBS | |
1327 | IMAGEMAGICK_CFLAGS | |
1328 | RSVG_LIBS | |
1329 | RSVG_CFLAGS | |
1330 | LIB_PTHREAD | |
1331 | VMLIMIT_OBJ | |
1332 | GMALLOC_OBJ | |
1333 | HAVE_XSERVER | |
b5eb356a GM |
1334 | W32_RES_LINK |
1335 | W32_RES | |
5c0255d9 GM |
1336 | W32_LIBS |
1337 | W32_OBJ | |
b5eb356a | 1338 | WINDRES |
5476a9a4 GM |
1339 | NS_OBJC_OBJ |
1340 | NS_OBJ | |
1341 | ns_self_contained | |
1342 | INSTALL_ARCH_INDEP_EXTRA | |
4efe5ef9 | 1343 | LIBS_GNUSTEP |
5476a9a4 GM |
1344 | LD_SWITCH_X_SITE_RPATH |
1345 | XMKMF | |
1346 | DEPFLAGS | |
1347 | MKDEPDIR | |
1348 | CFLAGS_SOUND | |
1349 | ALSA_LIBS | |
1350 | ALSA_CFLAGS | |
1351 | LIBSOUND | |
1352 | PKG_CONFIG | |
067d23c9 | 1353 | LIB_MATH |
067d23c9 KY |
1354 | LIBS_SYSTEM |
1355 | C_SWITCH_SYSTEM | |
1356 | UNEXEC_OBJ | |
1357 | C_SWITCH_MACHINE | |
1358 | LD_SWITCH_SYSTEM | |
1359 | CANNOT_DUMP | |
141d074d GM |
1360 | INFO_OPTS |
1361 | INFO_EXT | |
96f129d5 | 1362 | HAVE_MAKEINFO |
9c29597b | 1363 | PAXCTL |
067d23c9 KY |
1364 | GZIP_PROG |
1365 | INSTALL_INFO | |
4c5f4270 | 1366 | LN_S_FILEONLY |
a6b92a4a | 1367 | GNULIB_WARN_CFLAGS |
0eb775a3 | 1368 | WARN_CFLAGS |
a6b92a4a | 1369 | WERROR_CFLAGS |
369e19fc PE |
1370 | RANLIB |
1371 | ARFLAGS | |
1372 | AR | |
067d23c9 KY |
1373 | EGREP |
1374 | GREP | |
1375 | CPP | |
743c80a7 PE |
1376 | am__fastdepCC_FALSE |
1377 | am__fastdepCC_TRUE | |
1378 | CCDEPMODE | |
1379 | AMDEPBACKSLASH | |
1380 | AMDEP_FALSE | |
1381 | AMDEP_TRUE | |
1382 | am__quote | |
1383 | am__include | |
1384 | DEPDIR | |
067d23c9 KY |
1385 | OBJEXT |
1386 | EXEEXT | |
1387 | ac_ct_CC | |
1388 | CPPFLAGS | |
1389 | LDFLAGS | |
1390 | CFLAGS | |
1391 | CC | |
1392 | host_os | |
1393 | host_vendor | |
1394 | host_cpu | |
1395 | host | |
1396 | build_os | |
1397 | build_vendor | |
1398 | build_cpu | |
1399 | build | |
1400 | PROFILING_CFLAGS | |
067d23c9 | 1401 | GZIP_INFO |
c3a461a5 | 1402 | cache_file |
743c80a7 PE |
1403 | am__untar |
1404 | am__tar | |
1405 | AMTAR | |
1406 | am__leading_dot | |
1407 | SET_MAKE | |
1408 | AWK | |
1409 | mkdir_p | |
1410 | MKDIR_P | |
1411 | INSTALL_STRIP_PROGRAM | |
1412 | STRIP | |
1413 | install_sh | |
1414 | MAKEINFO | |
1415 | AUTOHEADER | |
1416 | AUTOMAKE | |
1417 | AUTOCONF | |
1418 | ACLOCAL | |
1419 | VERSION | |
1420 | PACKAGE | |
1421 | CYGPATH_W | |
1422 | am__isrc | |
1423 | INSTALL_DATA | |
1424 | INSTALL_SCRIPT | |
1425 | INSTALL_PROGRAM | |
067d23c9 KY |
1426 | target_alias |
1427 | host_alias | |
1428 | build_alias | |
1429 | LIBS | |
1430 | ECHO_T | |
1431 | ECHO_N | |
1432 | ECHO_C | |
1433 | DEFS | |
1434 | mandir | |
1435 | localedir | |
1436 | libdir | |
1437 | psdir | |
1438 | pdfdir | |
1439 | dvidir | |
1440 | htmldir | |
1441 | infodir | |
1442 | docdir | |
1443 | oldincludedir | |
1444 | includedir | |
1445 | localstatedir | |
1446 | sharedstatedir | |
1447 | sysconfdir | |
1448 | datadir | |
1449 | datarootdir | |
1450 | libexecdir | |
1451 | sbindir | |
1452 | bindir | |
1453 | program_transform_name | |
1454 | prefix | |
1455 | exec_prefix | |
1456 | PACKAGE_URL | |
1457 | PACKAGE_BUGREPORT | |
1458 | PACKAGE_STRING | |
1459 | PACKAGE_VERSION | |
1460 | PACKAGE_TARNAME | |
1461 | PACKAGE_NAME | |
1462 | PATH_SEPARATOR | |
1463 | SHELL' | |
1464 | ac_subst_files='deps_frag | |
bb7dce39 | 1465 | lisp_frag' |
067d23c9 KY |
1466 | ac_user_opts=' |
1467 | enable_option_checking | |
ee77919d | 1468 | with_all |
067d23c9 KY |
1469 | with_pop |
1470 | with_kerberos | |
1471 | with_kerberos5 | |
1472 | with_hesiod | |
1473 | with_mmdf | |
1474 | with_mail_unlink | |
1475 | with_mailhost | |
1476 | with_sound | |
067d23c9 | 1477 | with_x_toolkit |
0442dc7f | 1478 | with_wide_int |
067d23c9 KY |
1479 | with_xpm |
1480 | with_jpeg | |
1481 | with_tiff | |
1482 | with_gif | |
1483 | with_png | |
1484 | with_rsvg | |
1485 | with_xml2 | |
1486 | with_imagemagick | |
1487 | with_xft | |
1488 | with_libotf | |
1489 | with_m17n_flt | |
1490 | with_toolkit_scroll_bars | |
1491 | with_xaw3d | |
1492 | with_xim | |
1493 | with_ns | |
5c0255d9 | 1494 | with_w32 |
067d23c9 KY |
1495 | with_gpm |
1496 | with_dbus | |
1497 | with_gconf | |
f527bd02 | 1498 | with_gsettings |
067d23c9 | 1499 | with_selinux |
4cc63c81 | 1500 | with_acl |
067d23c9 | 1501 | with_gnutls |
b5eb356a | 1502 | with_inotify |
067d23c9 KY |
1503 | with_makeinfo |
1504 | with_compress_info | |
1505 | with_pkg_config_prog | |
4fc5868a | 1506 | with_gameuser |
067d23c9 KY |
1507 | with_gnustep_conf |
1508 | enable_ns_self_contained | |
067d23c9 KY |
1509 | enable_locallisppath |
1510 | enable_checking | |
afd07e01 | 1511 | enable_check_lisp_object_type |
067d23c9 KY |
1512 | enable_profiling |
1513 | enable_autodepend | |
4efe5ef9 | 1514 | enable_gtk_deprecation_warnings |
743c80a7 | 1515 | enable_dependency_tracking |
067d23c9 | 1516 | enable_largefile |
a6b92a4a | 1517 | enable_gcc_warnings |
e4d35030 | 1518 | enable_link_time_optimization |
067d23c9 KY |
1519 | with_x |
1520 | ' | |
1521 | ac_precious_vars='build_alias | |
1522 | host_alias | |
1523 | target_alias | |
1524 | CC | |
1525 | CFLAGS | |
1526 | LDFLAGS | |
1527 | LIBS | |
1528 | CPPFLAGS | |
1529 | CPP | |
1530 | XMKMF' | |
1531 | ||
1532 | ||
1533 | # Initialize some variables set by options. | |
1534 | ac_init_help= | |
1535 | ac_init_version=false | |
1536 | ac_unrecognized_opts= | |
1537 | ac_unrecognized_sep= | |
1538 | # The variables have the same names as the options, with | |
1539 | # dashes changed to underlines. | |
1540 | cache_file=/dev/null | |
1541 | exec_prefix=NONE | |
1542 | no_create= | |
1543 | no_recursion= | |
1544 | prefix=NONE | |
1545 | program_prefix=NONE | |
1546 | program_suffix=NONE | |
1547 | program_transform_name=s,x,x, | |
1548 | silent= | |
1549 | site= | |
1550 | srcdir= | |
1551 | verbose= | |
1552 | x_includes=NONE | |
1553 | x_libraries=NONE | |
1554 | ||
1555 | # Installation directory options. | |
1556 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1557 | # and all the variables that are supposed to be based on exec_prefix | |
1558 | # by default will actually change. | |
1559 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
1560 | # (The list follows the same order as the GNU Coding Standards.) | |
1561 | bindir='${exec_prefix}/bin' | |
1562 | sbindir='${exec_prefix}/sbin' | |
1563 | libexecdir='${exec_prefix}/libexec' | |
1564 | datarootdir='${prefix}/share' | |
1565 | datadir='${datarootdir}' | |
1566 | sysconfdir='${prefix}/etc' | |
1567 | sharedstatedir='${prefix}/com' | |
1568 | localstatedir='${prefix}/var' | |
1569 | includedir='${prefix}/include' | |
1570 | oldincludedir='/usr/include' | |
1571 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
1572 | infodir='${datarootdir}/info' | |
1573 | htmldir='${docdir}' | |
1574 | dvidir='${docdir}' | |
1575 | pdfdir='${docdir}' | |
1576 | psdir='${docdir}' | |
1577 | libdir='${exec_prefix}/lib' | |
1578 | localedir='${datarootdir}/locale' | |
1579 | mandir='${datarootdir}/man' | |
1580 | ||
1581 | ac_prev= | |
1582 | ac_dashdash= | |
1583 | for ac_option | |
1584 | do | |
1585 | # If the previous option needs an argument, assign it. | |
1586 | if test -n "$ac_prev"; then | |
1587 | eval $ac_prev=\$ac_option | |
1588 | ac_prev= | |
1589 | continue | |
1590 | fi | |
1591 | ||
1592 | case $ac_option in | |
a9bec17c GM |
1593 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1594 | *) ac_optarg=yes ;; | |
067d23c9 KY |
1595 | esac |
1596 | ||
1597 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1598 | ||
1599 | case $ac_dashdash$ac_option in | |
1600 | --) | |
1601 | ac_dashdash=yes ;; | |
1602 | ||
1603 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1604 | ac_prev=bindir ;; | |
1605 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
1606 | bindir=$ac_optarg ;; | |
1607 | ||
1608 | -build | --build | --buil | --bui | --bu) | |
1609 | ac_prev=build_alias ;; | |
1610 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
1611 | build_alias=$ac_optarg ;; | |
1612 | ||
1613 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1614 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1615 | ac_prev=cache_file ;; | |
1616 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1617 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1618 | cache_file=$ac_optarg ;; | |
1619 | ||
1620 | --config-cache | -C) | |
1621 | cache_file=config.cache ;; | |
1622 | ||
1623 | -datadir | --datadir | --datadi | --datad) | |
1624 | ac_prev=datadir ;; | |
1625 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
1626 | datadir=$ac_optarg ;; | |
1627 | ||
1628 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
1629 | | --dataroo | --dataro | --datar) | |
1630 | ac_prev=datarootdir ;; | |
1631 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1632 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1633 | datarootdir=$ac_optarg ;; | |
1634 | ||
1635 | -disable-* | --disable-*) | |
1636 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
1637 | # Reject names that are not valid shell variable names. | |
1638 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1639 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1640 | ac_useropt_orig=$ac_useropt |
1641 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1642 | case $ac_user_opts in | |
1643 | *" | |
1644 | "enable_$ac_useropt" | |
1645 | "*) ;; | |
1646 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1647 | ac_unrecognized_sep=', ';; | |
1648 | esac | |
1649 | eval enable_$ac_useropt=no ;; | |
1650 | ||
1651 | -docdir | --docdir | --docdi | --doc | --do) | |
1652 | ac_prev=docdir ;; | |
1653 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1654 | docdir=$ac_optarg ;; | |
1655 | ||
1656 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1657 | ac_prev=dvidir ;; | |
1658 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1659 | dvidir=$ac_optarg ;; | |
1660 | ||
1661 | -enable-* | --enable-*) | |
1662 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
1663 | # Reject names that are not valid shell variable names. | |
1664 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1665 | as_fn_error "invalid feature name: $ac_useropt" |
067d23c9 KY |
1666 | ac_useropt_orig=$ac_useropt |
1667 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1668 | case $ac_user_opts in | |
1669 | *" | |
1670 | "enable_$ac_useropt" | |
1671 | "*) ;; | |
1672 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1673 | ac_unrecognized_sep=', ';; | |
1674 | esac | |
1675 | eval enable_$ac_useropt=\$ac_optarg ;; | |
1676 | ||
1677 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1678 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1679 | | --exec | --exe | --ex) | |
1680 | ac_prev=exec_prefix ;; | |
1681 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1682 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1683 | | --exec=* | --exe=* | --ex=*) | |
1684 | exec_prefix=$ac_optarg ;; | |
1685 | ||
1686 | -gas | --gas | --ga | --g) | |
1687 | # Obsolete; use --with-gas. | |
1688 | with_gas=yes ;; | |
1689 | ||
1690 | -help | --help | --hel | --he | -h) | |
1691 | ac_init_help=long ;; | |
1692 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1693 | ac_init_help=recursive ;; | |
1694 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1695 | ac_init_help=short ;; | |
1696 | ||
1697 | -host | --host | --hos | --ho) | |
1698 | ac_prev=host_alias ;; | |
1699 | -host=* | --host=* | --hos=* | --ho=*) | |
1700 | host_alias=$ac_optarg ;; | |
1701 | ||
1702 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
1703 | ac_prev=htmldir ;; | |
1704 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1705 | | --ht=*) | |
1706 | htmldir=$ac_optarg ;; | |
1707 | ||
1708 | -includedir | --includedir | --includedi | --included | --include \ | |
1709 | | --includ | --inclu | --incl | --inc) | |
1710 | ac_prev=includedir ;; | |
1711 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1712 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
1713 | includedir=$ac_optarg ;; | |
1714 | ||
1715 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1716 | ac_prev=infodir ;; | |
1717 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
1718 | infodir=$ac_optarg ;; | |
1719 | ||
1720 | -libdir | --libdir | --libdi | --libd) | |
1721 | ac_prev=libdir ;; | |
1722 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
1723 | libdir=$ac_optarg ;; | |
1724 | ||
1725 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1726 | | --libexe | --libex | --libe) | |
1727 | ac_prev=libexecdir ;; | |
1728 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1729 | | --libexe=* | --libex=* | --libe=*) | |
1730 | libexecdir=$ac_optarg ;; | |
1731 | ||
1732 | -localedir | --localedir | --localedi | --localed | --locale) | |
1733 | ac_prev=localedir ;; | |
1734 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1735 | localedir=$ac_optarg ;; | |
1736 | ||
1737 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1738 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1739 | ac_prev=localstatedir ;; | |
1740 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1741 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1742 | localstatedir=$ac_optarg ;; | |
1743 | ||
1744 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1745 | ac_prev=mandir ;; | |
1746 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1747 | mandir=$ac_optarg ;; | |
1748 | ||
1749 | -nfp | --nfp | --nf) | |
1750 | # Obsolete; use --without-fp. | |
1751 | with_fp=no ;; | |
1752 | ||
1753 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1754 | | --no-cr | --no-c | -n) | |
1755 | no_create=yes ;; | |
1756 | ||
1757 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1758 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1759 | no_recursion=yes ;; | |
1760 | ||
1761 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1762 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1763 | | --oldin | --oldi | --old | --ol | --o) | |
1764 | ac_prev=oldincludedir ;; | |
1765 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1766 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1767 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1768 | oldincludedir=$ac_optarg ;; | |
1769 | ||
1770 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1771 | ac_prev=prefix ;; | |
1772 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1773 | prefix=$ac_optarg ;; | |
1774 | ||
1775 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1776 | | --program-pre | --program-pr | --program-p) | |
1777 | ac_prev=program_prefix ;; | |
1778 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1779 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1780 | program_prefix=$ac_optarg ;; | |
1781 | ||
1782 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1783 | | --program-suf | --program-su | --program-s) | |
1784 | ac_prev=program_suffix ;; | |
1785 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1786 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1787 | program_suffix=$ac_optarg ;; | |
1788 | ||
1789 | -program-transform-name | --program-transform-name \ | |
1790 | | --program-transform-nam | --program-transform-na \ | |
1791 | | --program-transform-n | --program-transform- \ | |
1792 | | --program-transform | --program-transfor \ | |
1793 | | --program-transfo | --program-transf \ | |
1794 | | --program-trans | --program-tran \ | |
1795 | | --progr-tra | --program-tr | --program-t) | |
1796 | ac_prev=program_transform_name ;; | |
1797 | -program-transform-name=* | --program-transform-name=* \ | |
1798 | | --program-transform-nam=* | --program-transform-na=* \ | |
1799 | | --program-transform-n=* | --program-transform-=* \ | |
1800 | | --program-transform=* | --program-transfor=* \ | |
1801 | | --program-transfo=* | --program-transf=* \ | |
1802 | | --program-trans=* | --program-tran=* \ | |
1803 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1804 | program_transform_name=$ac_optarg ;; | |
1805 | ||
1806 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1807 | ac_prev=pdfdir ;; | |
1808 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1809 | pdfdir=$ac_optarg ;; | |
1810 | ||
1811 | -psdir | --psdir | --psdi | --psd | --ps) | |
1812 | ac_prev=psdir ;; | |
1813 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1814 | psdir=$ac_optarg ;; | |
1815 | ||
1816 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1817 | | -silent | --silent | --silen | --sile | --sil) | |
1818 | silent=yes ;; | |
1819 | ||
1820 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1821 | ac_prev=sbindir ;; | |
1822 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1823 | | --sbi=* | --sb=*) | |
1824 | sbindir=$ac_optarg ;; | |
1825 | ||
1826 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1827 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1828 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1829 | | --sha | --sh) | |
1830 | ac_prev=sharedstatedir ;; | |
1831 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1832 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1833 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1834 | | --sha=* | --sh=*) | |
1835 | sharedstatedir=$ac_optarg ;; | |
1836 | ||
1837 | -site | --site | --sit) | |
1838 | ac_prev=site ;; | |
1839 | -site=* | --site=* | --sit=*) | |
1840 | site=$ac_optarg ;; | |
1841 | ||
1842 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1843 | ac_prev=srcdir ;; | |
1844 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1845 | srcdir=$ac_optarg ;; | |
1846 | ||
1847 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1848 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1849 | ac_prev=sysconfdir ;; | |
1850 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1851 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1852 | sysconfdir=$ac_optarg ;; | |
1853 | ||
1854 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1855 | ac_prev=target_alias ;; | |
1856 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1857 | target_alias=$ac_optarg ;; | |
1858 | ||
1859 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1860 | verbose=yes ;; | |
1861 | ||
1862 | -version | --version | --versio | --versi | --vers | -V) | |
1863 | ac_init_version=: ;; | |
1864 | ||
1865 | -with-* | --with-*) | |
1866 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1867 | # Reject names that are not valid shell variable names. | |
1868 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1869 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1870 | ac_useropt_orig=$ac_useropt |
1871 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1872 | case $ac_user_opts in | |
1873 | *" | |
1874 | "with_$ac_useropt" | |
1875 | "*) ;; | |
1876 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1877 | ac_unrecognized_sep=', ';; | |
1878 | esac | |
1879 | eval with_$ac_useropt=\$ac_optarg ;; | |
1880 | ||
1881 | -without-* | --without-*) | |
1882 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1883 | # Reject names that are not valid shell variable names. | |
1884 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
a9bec17c | 1885 | as_fn_error "invalid package name: $ac_useropt" |
067d23c9 KY |
1886 | ac_useropt_orig=$ac_useropt |
1887 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1888 | case $ac_user_opts in | |
1889 | *" | |
1890 | "with_$ac_useropt" | |
1891 | "*) ;; | |
1892 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1893 | ac_unrecognized_sep=', ';; | |
1894 | esac | |
1895 | eval with_$ac_useropt=no ;; | |
1896 | ||
1897 | --x) | |
1898 | # Obsolete; use --with-x. | |
1899 | with_x=yes ;; | |
1900 | ||
1901 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1902 | | --x-incl | --x-inc | --x-in | --x-i) | |
1903 | ac_prev=x_includes ;; | |
1904 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1905 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1906 | x_includes=$ac_optarg ;; | |
1907 | ||
1908 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1909 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1910 | ac_prev=x_libraries ;; | |
1911 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1912 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1913 | x_libraries=$ac_optarg ;; | |
1914 | ||
a9bec17c GM |
1915 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1916 | Try \`$0 --help' for more information." | |
067d23c9 KY |
1917 | ;; |
1918 | ||
1919 | *=*) | |
1920 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1921 | # Reject names that are not valid shell variable names. | |
1922 | case $ac_envvar in #( | |
1923 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
a9bec17c | 1924 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; |
067d23c9 KY |
1925 | esac |
1926 | eval $ac_envvar=\$ac_optarg | |
1927 | export $ac_envvar ;; | |
1928 | ||
1929 | *) | |
1930 | # FIXME: should be removed in autoconf 3.0. | |
1931 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1932 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1933 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
a9bec17c | 1934 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
067d23c9 KY |
1935 | ;; |
1936 | ||
1937 | esac | |
1938 | done | |
1939 | ||
1940 | if test -n "$ac_prev"; then | |
1941 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
a9bec17c | 1942 | as_fn_error "missing argument to $ac_option" |
067d23c9 KY |
1943 | fi |
1944 | ||
1945 | if test -n "$ac_unrecognized_opts"; then | |
1946 | case $enable_option_checking in | |
1947 | no) ;; | |
a9bec17c | 1948 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; |
067d23c9 KY |
1949 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
1950 | esac | |
1951 | fi | |
1952 | ||
1953 | # Check all directory arguments for consistency. | |
1954 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1955 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1956 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1957 | libdir localedir mandir | |
1958 | do | |
1959 | eval ac_val=\$$ac_var | |
1960 | # Remove trailing slashes. | |
1961 | case $ac_val in | |
1962 | */ ) | |
1963 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1964 | eval $ac_var=\$ac_val;; | |
1965 | esac | |
1966 | # Be sure to have absolute directory names. | |
1967 | case $ac_val in | |
1968 | [\\/$]* | ?:[\\/]* ) continue;; | |
1969 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1970 | esac | |
a9bec17c | 1971 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
067d23c9 KY |
1972 | done |
1973 | ||
1974 | # There might be people who depend on the old broken behavior: `$host' | |
1975 | # used to hold the argument of --host etc. | |
1976 | # FIXME: To remove some day. | |
1977 | build=$build_alias | |
1978 | host=$host_alias | |
1979 | target=$target_alias | |
1980 | ||
1981 | # FIXME: To remove some day. | |
1982 | if test "x$host_alias" != x; then | |
1983 | if test "x$build_alias" = x; then | |
1984 | cross_compiling=maybe | |
a9bec17c GM |
1985 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
1986 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
067d23c9 KY |
1987 | elif test "x$build_alias" != "x$host_alias"; then |
1988 | cross_compiling=yes | |
1989 | fi | |
1990 | fi | |
1991 | ||
1992 | ac_tool_prefix= | |
1993 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1994 | ||
1995 | test "$silent" = yes && exec 6>/dev/null | |
1996 | ||
1997 | ||
1998 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1999 | ac_ls_di=`ls -di .` && | |
2000 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
a9bec17c | 2001 | as_fn_error "working directory cannot be determined" |
067d23c9 | 2002 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
a9bec17c | 2003 | as_fn_error "pwd does not report name of working directory" |
067d23c9 KY |
2004 | |
2005 | ||
2006 | # Find the source files, if location was not specified. | |
2007 | if test -z "$srcdir"; then | |
2008 | ac_srcdir_defaulted=yes | |
2009 | # Try the directory containing this script, then the parent directory. | |
2010 | ac_confdir=`$as_dirname -- "$as_myself" || | |
2011 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
2012 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
2013 | X"$as_myself" : 'X\(//\)$' \| \ | |
2014 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
2015 | $as_echo X"$as_myself" | | |
2016 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
2017 | s//\1/ | |
2018 | q | |
2019 | } | |
2020 | /^X\(\/\/\)[^/].*/{ | |
2021 | s//\1/ | |
2022 | q | |
2023 | } | |
2024 | /^X\(\/\/\)$/{ | |
2025 | s//\1/ | |
2026 | q | |
2027 | } | |
2028 | /^X\(\/\).*/{ | |
2029 | s//\1/ | |
2030 | q | |
2031 | } | |
2032 | s/.*/./; q'` | |
2033 | srcdir=$ac_confdir | |
2034 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2035 | srcdir=.. | |
2036 | fi | |
2037 | else | |
2038 | ac_srcdir_defaulted=no | |
2039 | fi | |
2040 | if test ! -r "$srcdir/$ac_unique_file"; then | |
2041 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
a9bec17c | 2042 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" |
067d23c9 KY |
2043 | fi |
2044 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
2045 | ac_abs_confdir=`( | |
a9bec17c | 2046 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" |
067d23c9 KY |
2047 | pwd)` |
2048 | # When building in place, set srcdir=. | |
2049 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
2050 | srcdir=. | |
2051 | fi | |
2052 | # Remove unnecessary trailing slashes from srcdir. | |
2053 | # Double slashes in file names in object file debugging info | |
2054 | # mess up M-x gdb in Emacs. | |
2055 | case $srcdir in | |
2056 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
2057 | esac | |
2058 | for ac_var in $ac_precious_vars; do | |
2059 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
2060 | eval ac_env_${ac_var}_value=\$${ac_var} | |
2061 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
2062 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
2063 | done | |
2064 | ||
2065 | # | |
2066 | # Report the --help message. | |
2067 | # | |
2068 | if test "$ac_init_help" = "long"; then | |
2069 | # Omit some internal or obsolete options to make the list less imposing. | |
2070 | # This message is too long to be a string in the A/UX 3.1 sh. | |
2071 | cat <<_ACEOF | |
c574bc34 | 2072 | \`configure' configures emacs 24.3.50 to adapt to many kinds of systems. |
067d23c9 KY |
2073 | |
2074 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
2075 | ||
2076 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
2077 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
2078 | ||
2079 | Defaults for the options are specified in brackets. | |
2080 | ||
2081 | Configuration: | |
2082 | -h, --help display this help and exit | |
2083 | --help=short display options specific to this package | |
2084 | --help=recursive display the short help of all the included packages | |
2085 | -V, --version display version information and exit | |
a9bec17c | 2086 | -q, --quiet, --silent do not print \`checking...' messages |
067d23c9 KY |
2087 | --cache-file=FILE cache test results in FILE [disabled] |
2088 | -C, --config-cache alias for \`--cache-file=config.cache' | |
2089 | -n, --no-create do not create output files | |
2090 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
2091 | ||
2092 | Installation directories: | |
2093 | --prefix=PREFIX install architecture-independent files in PREFIX | |
2094 | [$ac_default_prefix] | |
2095 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
2096 | [PREFIX] | |
2097 | ||
2098 | By default, \`make install' will install all the files in | |
2099 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
2100 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
2101 | for instance \`--prefix=\$HOME'. | |
2102 | ||
2103 | For better control, use the options below. | |
2104 | ||
2105 | Fine tuning of the installation directories: | |
2106 | --bindir=DIR user executables [EPREFIX/bin] | |
2107 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
2108 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
2109 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
2110 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
2111 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
2112 | --libdir=DIR object code libraries [EPREFIX/lib] | |
2113 | --includedir=DIR C header files [PREFIX/include] | |
2114 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
2115 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
2116 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
2117 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
2118 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
2119 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
2120 | --docdir=DIR documentation root [DATAROOTDIR/doc/emacs] | |
2121 | --htmldir=DIR html documentation [DOCDIR] | |
2122 | --dvidir=DIR dvi documentation [DOCDIR] | |
2123 | --pdfdir=DIR pdf documentation [DOCDIR] | |
2124 | --psdir=DIR ps documentation [DOCDIR] | |
2125 | _ACEOF | |
2126 | ||
2127 | cat <<\_ACEOF | |
2128 | ||
2129 | Program names: | |
2130 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
2131 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
2132 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
2133 | ||
2134 | X features: | |
2135 | --x-includes=DIR X include files are in DIR | |
2136 | --x-libraries=DIR X library files are in DIR | |
2137 | ||
2138 | System types: | |
2139 | --build=BUILD configure for building on BUILD [guessed] | |
2140 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
2141 | _ACEOF | |
2142 | fi | |
2143 | ||
2144 | if test -n "$ac_init_help"; then | |
2145 | case $ac_init_help in | |
c574bc34 | 2146 | short | recursive ) echo "Configuration of emacs 24.3.50:";; |
067d23c9 KY |
2147 | esac |
2148 | cat <<\_ACEOF | |
2149 | ||
2150 | Optional Features: | |
2151 | --disable-option-checking ignore unrecognized --enable/--with options | |
2152 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2153 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
2154 | --disable-ns-self-contained | |
2155 | disable self contained build under NeXTstep | |
067d23c9 KY |
2156 | --enable-locallisppath=PATH |
2157 | directories Emacs should search for lisp files | |
2158 | specific to this site | |
2159 | --enable-checking[=LIST] | |
2160 | enable expensive run-time checks. With LIST, enable | |
2161 | only specific categories of checks. Categories are: | |
2162 | all,yes,no. Flags are: stringbytes, stringoverrun, | |
7ee3791f | 2163 | stringfreelist, xmallocoverrun, conslist, glyphs |
afd07e01 GM |
2164 | --enable-check-lisp-object-type |
2165 | enable compile time checks for the Lisp_Object data | |
2166 | type. This is useful for development for catching | |
2167 | certain types of bugs. | |
3dc00ee8 GM |
2168 | --enable-profiling build emacs with low-level, gprof profiling support. |
2169 | Mainly useful for debugging Emacs itself. May not | |
2170 | work on all platforms. Stops profiler.el working. | |
067d23c9 KY |
2171 | --enable-autodepend automatically generate dependencies to .h-files. |
2172 | Requires GNU Make and Gcc. Enabled if GNU Make and | |
2173 | Gcc is found | |
4efe5ef9 GM |
2174 | --enable-gtk-deprecation-warnings |
2175 | Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0 | |
743c80a7 PE |
2176 | --disable-dependency-tracking speeds up one-time build |
2177 | --enable-dependency-tracking do not reject slow dependency extractors | |
067d23c9 | 2178 | --disable-largefile omit support for large files |
ac924f35 GM |
2179 | --enable-gcc-warnings turn on lots of GCC warnings/errors. This is |
2180 | intended for developers, and may generate false | |
2181 | alarms when used with older or non-GNU development | |
2182 | tools. | |
e4d35030 GM |
2183 | --enable-link-time-optimization |
2184 | build emacs with link-time optimization. This is | |
2185 | supported only for GCC since 4.5.0. | |
067d23c9 KY |
2186 | |
2187 | Optional Packages: | |
2188 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
2189 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
ee77919d GM |
2190 | --without-all omit almost all features and build small executable |
2191 | with minimal dependencies | |
067d23c9 KY |
2192 | --without-pop don't support POP mail retrieval with movemail |
2193 | --with-kerberos support Kerberos-authenticated POP | |
2194 | --with-kerberos5 support Kerberos version 5 authenticated POP | |
2195 | --with-hesiod support Hesiod to get the POP server host | |
2196 | --with-mmdf support MMDF mailboxes | |
2197 | --with-mail-unlink unlink, rather than empty, mail spool after reading | |
2198 | --with-mailhost=HOSTNAME | |
2199 | string giving default POP mail host | |
2200 | --without-sound don't compile with sound support | |
4fa92495 GM |
2201 | --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, |
2202 | gtk3, lucid or athena, motif, no) | |
0442dc7f | 2203 | --with-wide-int prefer wide Emacs integers (typically 62-bit) |
067d23c9 KY |
2204 | --without-xpm don't compile with XPM image support |
2205 | --without-jpeg don't compile with JPEG image support | |
2206 | --without-tiff don't compile with TIFF image support | |
2207 | --without-gif don't compile with GIF image support | |
2208 | --without-png don't compile with PNG image support | |
2209 | --without-rsvg don't compile with SVG image support | |
2210 | --without-xml2 don't compile with XML parsing support | |
2211 | --without-imagemagick don't compile with ImageMagick image support | |
2212 | --without-xft don't use XFT for anti aliased fonts | |
2213 | --without-libotf don't use libotf for OpenType font support | |
2214 | --without-m17n-flt don't use m17n-flt for text shaping | |
2215 | --without-toolkit-scroll-bars | |
2216 | don't use Motif or Xaw3d scroll bars | |
2217 | --without-xaw3d don't use Xaw3d | |
2218 | --without-xim don't use X11 XIM | |
7834125e | 2219 | --with-ns use NeXTstep (Cocoa or GNUstep) windowing system |
bf05ed1f | 2220 | --with-w32 use native MS Windows GUI |
067d23c9 KY |
2221 | --without-gpm don't use -lgpm for mouse support on a GNU/Linux |
2222 | console | |
2223 | --without-dbus don't compile with D-Bus support | |
2224 | --without-gconf don't compile with GConf support | |
f527bd02 | 2225 | --without-gsettings don't compile with GSettings support |
067d23c9 | 2226 | --without-selinux don't compile with SELinux support |
4cc63c81 | 2227 | --without-acl don't compile with ACL support |
067d23c9 | 2228 | --without-gnutls don't use -lgnutls for SSL/TLS support |
b5eb356a | 2229 | --without-inotify don't compile with inotify (file-watch) support |
067d23c9 KY |
2230 | --without-makeinfo don't require makeinfo for building manuals |
2231 | --without-compress-info don't compress the installed Info pages | |
b5591ebb GM |
2232 | --with-pkg-config-prog=FILENAME |
2233 | file name of pkg-config for finding GTK and librsvg | |
4fc5868a | 2234 | --with-gameuser=USER user for shared game score files |
b5591ebb GM |
2235 | --with-gnustep-conf=FILENAME |
2236 | name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE, | |
067d23c9 KY |
2237 | or /etc/GNUstep/GNUstep.conf |
2238 | --with-x use the X Window System | |
2239 | ||
2240 | Some influential environment variables: | |
2241 | CC C compiler command | |
2242 | CFLAGS C compiler flags | |
2243 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
2244 | nonstandard directory <lib dir> | |
2245 | LIBS libraries to pass to the linker, e.g. -l<library> | |
2246 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
2247 | you have headers in a nonstandard directory <include dir> | |
2248 | CPP C preprocessor | |
2249 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
2250 | ||
2251 | Use these variables to override the choices made by `configure' or to help | |
2252 | it to find libraries and programs with nonstandard names/locations. | |
2253 | ||
2254 | Report bugs to the package provider. | |
2255 | _ACEOF | |
2256 | ac_status=$? | |
2257 | fi | |
2258 | ||
2259 | if test "$ac_init_help" = "recursive"; then | |
2260 | # If there are subdirs, report their specific --help. | |
2261 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
2262 | test -d "$ac_dir" || | |
2263 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
2264 | continue | |
2265 | ac_builddir=. | |
2266 | ||
2267 | case "$ac_dir" in | |
2268 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2269 | *) | |
2270 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
2271 | # A ".." for each directory in $ac_dir_suffix. | |
2272 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
2273 | case $ac_top_builddir_sub in | |
2274 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
2275 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
2276 | esac ;; | |
2277 | esac | |
2278 | ac_abs_top_builddir=$ac_pwd | |
2279 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
2280 | # for backward compatibility: | |
2281 | ac_top_builddir=$ac_top_build_prefix | |
2282 | ||
2283 | case $srcdir in | |
2284 | .) # We are building in place. | |
2285 | ac_srcdir=. | |
2286 | ac_top_srcdir=$ac_top_builddir_sub | |
2287 | ac_abs_top_srcdir=$ac_pwd ;; | |
2288 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
2289 | ac_srcdir=$srcdir$ac_dir_suffix; | |
2290 | ac_top_srcdir=$srcdir | |
2291 | ac_abs_top_srcdir=$srcdir ;; | |
2292 | *) # Relative name. | |
2293 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
2294 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
2295 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
2296 | esac | |
2297 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
2298 | ||
2299 | cd "$ac_dir" || { ac_status=$?; continue; } | |
2300 | # Check for guested configure. | |
2301 | if test -f "$ac_srcdir/configure.gnu"; then | |
2302 | echo && | |
2303 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
2304 | elif test -f "$ac_srcdir/configure"; then | |
2305 | echo && | |
2306 | $SHELL "$ac_srcdir/configure" --help=recursive | |
2307 | else | |
2308 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
2309 | fi || ac_status=$? | |
2310 | cd "$ac_pwd" || { ac_status=$?; break; } | |
2311 | done | |
2312 | fi | |
2313 | ||
2314 | test -n "$ac_init_help" && exit $ac_status | |
2315 | if $ac_init_version; then | |
2316 | cat <<\_ACEOF | |
c574bc34 | 2317 | emacs configure 24.3.50 |
a9bec17c | 2318 | generated by GNU Autoconf 2.65 |
067d23c9 | 2319 | |
a9bec17c | 2320 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
2321 | This configure script is free software; the Free Software Foundation |
2322 | gives unlimited permission to copy, distribute and modify it. | |
2323 | _ACEOF | |
2324 | exit | |
2325 | fi | |
2326 | ||
2327 | ## ------------------------ ## | |
2328 | ## Autoconf initialization. ## | |
2329 | ## ------------------------ ## | |
2330 | ||
2331 | # ac_fn_c_try_compile LINENO | |
2332 | # -------------------------- | |
2333 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
2334 | ac_fn_c_try_compile () | |
2335 | { | |
2336 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2337 | rm -f conftest.$ac_objext | |
2338 | if { { ac_try="$ac_compile" | |
2339 | case "(($ac_try" in | |
2340 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2341 | *) ac_try_echo=$ac_try;; | |
2342 | esac | |
2343 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2344 | $as_echo "$ac_try_echo"; } >&5 | |
2345 | (eval "$ac_compile") 2>conftest.err | |
2346 | ac_status=$? | |
2347 | if test -s conftest.err; then | |
2348 | grep -v '^ *+' conftest.err >conftest.er1 | |
2349 | cat conftest.er1 >&5 | |
2350 | mv -f conftest.er1 conftest.err | |
2351 | fi | |
2352 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2353 | test $ac_status = 0; } && { | |
2354 | test -z "$ac_c_werror_flag" || | |
2355 | test ! -s conftest.err | |
2356 | } && test -s conftest.$ac_objext; then : | |
2357 | ac_retval=0 | |
2358 | else | |
2359 | $as_echo "$as_me: failed program was:" >&5 | |
2360 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2361 | ||
2362 | ac_retval=1 | |
2363 | fi | |
a9bec17c | 2364 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2365 | as_fn_set_status $ac_retval |
2366 | ||
2367 | } # ac_fn_c_try_compile | |
2368 | ||
067d23c9 KY |
2369 | # ac_fn_c_try_cpp LINENO |
2370 | # ---------------------- | |
2371 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
2372 | ac_fn_c_try_cpp () | |
2373 | { | |
2374 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2375 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
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_cpp conftest.$ac_ext") 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 | |
a9bec17c | 2390 | test $ac_status = 0; } >/dev/null && { |
067d23c9 KY |
2391 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
2392 | test ! -s conftest.err | |
2393 | }; 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_cpp | |
2405 | ||
2406 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
2407 | # ------------------------------------------------------- | |
2408 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
2409 | # the include files in INCLUDES and setting the cache variable VAR | |
2410 | # accordingly. | |
2411 | ac_fn_c_check_header_mongrel () | |
2412 | { | |
2413 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
a9bec17c | 2414 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2416 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2417 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2418 | $as_echo_n "(cached) " >&6 |
2419 | fi | |
2420 | eval ac_res=\$$3 | |
2421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2422 | $as_echo "$ac_res" >&6; } | |
2423 | else | |
2424 | # Is the header compilable? | |
2425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
2426 | $as_echo_n "checking $2 usability... " >&6; } | |
2427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2428 | /* end confdefs.h. */ | |
2429 | $4 | |
2430 | #include <$2> | |
2431 | _ACEOF | |
2432 | if ac_fn_c_try_compile "$LINENO"; then : | |
2433 | ac_header_compiler=yes | |
2434 | else | |
2435 | ac_header_compiler=no | |
2436 | fi | |
2437 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
2439 | $as_echo "$ac_header_compiler" >&6; } | |
2440 | ||
2441 | # Is the header present? | |
2442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
2443 | $as_echo_n "checking $2 presence... " >&6; } | |
2444 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2445 | /* end confdefs.h. */ | |
2446 | #include <$2> | |
2447 | _ACEOF | |
2448 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2449 | ac_header_preproc=yes | |
2450 | else | |
2451 | ac_header_preproc=no | |
2452 | fi | |
a9bec17c | 2453 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
2454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
2455 | $as_echo "$ac_header_preproc" >&6; } | |
2456 | ||
2457 | # So? What about this header? | |
2458 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
2459 | yes:no: ) | |
2460 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
2461 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
2462 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2463 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2464 | ;; | |
2465 | no:yes:* ) | |
2466 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
2467 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
2468 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
2469 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
2470 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
2471 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
2472 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
2473 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
2474 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
2475 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
2476 | ;; | |
2477 | esac | |
2478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2479 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2480 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2481 | $as_echo_n "(cached) " >&6 |
2482 | else | |
2483 | eval "$3=\$ac_header_compiler" | |
2484 | fi | |
2485 | eval ac_res=\$$3 | |
2486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2487 | $as_echo "$ac_res" >&6; } | |
2488 | fi | |
a9bec17c | 2489 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2490 | |
2491 | } # ac_fn_c_check_header_mongrel | |
2492 | ||
2493 | # ac_fn_c_try_run LINENO | |
2494 | # ---------------------- | |
2495 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2496 | # that executables *can* be run. | |
2497 | ac_fn_c_try_run () | |
2498 | { | |
2499 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2500 | if { { ac_try="$ac_link" | |
2501 | case "(($ac_try" in | |
2502 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2503 | *) ac_try_echo=$ac_try;; | |
2504 | esac | |
2505 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2506 | $as_echo "$ac_try_echo"; } >&5 | |
2507 | (eval "$ac_link") 2>&5 | |
2508 | ac_status=$? | |
2509 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2510 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2511 | { { case "(($ac_try" in | |
2512 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2513 | *) ac_try_echo=$ac_try;; | |
2514 | esac | |
2515 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2516 | $as_echo "$ac_try_echo"; } >&5 | |
2517 | (eval "$ac_try") 2>&5 | |
2518 | ac_status=$? | |
2519 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2520 | test $ac_status = 0; }; }; then : | |
2521 | ac_retval=0 | |
2522 | else | |
2523 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2524 | $as_echo "$as_me: failed program was:" >&5 | |
2525 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2526 | ||
2527 | ac_retval=$ac_status | |
2528 | fi | |
2529 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2530 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2531 | as_fn_set_status $ac_retval |
2532 | ||
2533 | } # ac_fn_c_try_run | |
2534 | ||
2535 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
2536 | # ------------------------------------------------------- | |
2537 | # Tests whether HEADER exists and can be compiled using the include files in | |
2538 | # INCLUDES, setting the cache variable VAR accordingly. | |
2539 | ac_fn_c_check_header_compile () | |
2540 | { | |
2541 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2543 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2544 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2545 | $as_echo_n "(cached) " >&6 |
2546 | else | |
2547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2548 | /* end confdefs.h. */ | |
2549 | $4 | |
2550 | #include <$2> | |
2551 | _ACEOF | |
2552 | if ac_fn_c_try_compile "$LINENO"; then : | |
2553 | eval "$3=yes" | |
2554 | else | |
2555 | eval "$3=no" | |
2556 | fi | |
2557 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2558 | fi | |
2559 | eval ac_res=\$$3 | |
2560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2561 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2562 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2563 | |
2564 | } # ac_fn_c_check_header_compile | |
2565 | ||
1fd182f0 PE |
2566 | # ac_fn_c_try_link LINENO |
2567 | # ----------------------- | |
2568 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2569 | ac_fn_c_try_link () | |
2570 | { | |
2571 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2572 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2573 | if { { ac_try="$ac_link" | |
2574 | case "(($ac_try" in | |
2575 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2576 | *) ac_try_echo=$ac_try;; | |
2577 | esac | |
2578 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2579 | $as_echo "$ac_try_echo"; } >&5 | |
2580 | (eval "$ac_link") 2>conftest.err | |
2581 | ac_status=$? | |
2582 | if test -s conftest.err; then | |
2583 | grep -v '^ *+' conftest.err >conftest.er1 | |
2584 | cat conftest.er1 >&5 | |
2585 | mv -f conftest.er1 conftest.err | |
2586 | fi | |
2587 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2588 | test $ac_status = 0; } && { | |
2589 | test -z "$ac_c_werror_flag" || | |
2590 | test ! -s conftest.err | |
2591 | } && test -s conftest$ac_exeext && { | |
2592 | test "$cross_compiling" = yes || | |
2593 | $as_test_x conftest$ac_exeext | |
2594 | }; then : | |
2595 | ac_retval=0 | |
2596 | else | |
2597 | $as_echo "$as_me: failed program was:" >&5 | |
2598 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2599 | ||
2600 | ac_retval=1 | |
2601 | fi | |
2602 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2603 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2604 | # interfere with the next link command; also delete a directory that is | |
2605 | # left behind by Apple's compiler. We do this before executing the actions. | |
2606 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
a9bec17c | 2607 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1fd182f0 PE |
2608 | as_fn_set_status $ac_retval |
2609 | ||
2610 | } # ac_fn_c_try_link | |
2611 | ||
42bbbe8b GM |
2612 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2613 | # ------------------------------------ | |
2614 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2615 | ac_fn_c_check_decl () | |
2616 | { | |
2617 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 | |
2619 | $as_echo_n "checking whether $2 is declared... " >&6; } | |
2620 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2621 | $as_echo_n "(cached) " >&6 | |
2622 | else | |
2623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2624 | /* end confdefs.h. */ | |
2625 | $4 | |
2626 | int | |
2627 | main () | |
2628 | { | |
2629 | #ifndef $2 | |
2630 | (void) $2; | |
2631 | #endif | |
2632 | ||
2633 | ; | |
2634 | return 0; | |
2635 | } | |
2636 | _ACEOF | |
2637 | if ac_fn_c_try_compile "$LINENO"; then : | |
2638 | eval "$3=yes" | |
2639 | else | |
2640 | eval "$3=no" | |
2641 | fi | |
2642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2643 | fi | |
2644 | eval ac_res=\$$3 | |
2645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2646 | $as_echo "$ac_res" >&6; } | |
2647 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2648 | ||
2649 | } # ac_fn_c_check_decl | |
2650 | ||
5476a9a4 GM |
2651 | # ac_fn_c_check_header_preproc LINENO HEADER VAR |
2652 | # ---------------------------------------------- | |
2653 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
2654 | ac_fn_c_check_header_preproc () | |
067d23c9 KY |
2655 | { |
2656 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2658 | $as_echo_n "checking for $2... " >&6; } | |
a9bec17c | 2659 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
067d23c9 KY |
2660 | $as_echo_n "(cached) " >&6 |
2661 | else | |
2662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2663 | /* end confdefs.h. */ | |
5476a9a4 GM |
2664 | #include <$2> |
2665 | _ACEOF | |
2666 | if ac_fn_c_try_cpp "$LINENO"; then : | |
2667 | eval "$3=yes" | |
2668 | else | |
2669 | eval "$3=no" | |
2670 | fi | |
2671 | rm -f conftest.err conftest.$ac_ext | |
2672 | fi | |
2673 | eval ac_res=\$$3 | |
2674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2675 | $as_echo "$ac_res" >&6; } | |
2676 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
067d23c9 | 2677 | |
5476a9a4 | 2678 | } # ac_fn_c_check_header_preproc |
067d23c9 | 2679 | |
5476a9a4 GM |
2680 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2681 | # ---------------------------------------------------- | |
2682 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2683 | # INCLUDES, setting cache variable VAR accordingly. | |
2684 | ac_fn_c_check_member () | |
2685 | { | |
2686 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2688 | $as_echo_n "checking for $2.$3... " >&6; } | |
2689 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2690 | $as_echo_n "(cached) " >&6 | |
2691 | else | |
2692 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2693 | /* end confdefs.h. */ | |
2694 | $5 | |
2695 | int | |
2696 | main () | |
2697 | { | |
2698 | static $2 ac_aggr; | |
2699 | if (ac_aggr.$3) | |
2700 | return 0; | |
2701 | ; | |
2702 | return 0; | |
2703 | } | |
2704 | _ACEOF | |
2705 | if ac_fn_c_try_compile "$LINENO"; then : | |
2706 | eval "$4=yes" | |
2707 | else | |
2708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2709 | /* end confdefs.h. */ | |
2710 | $5 | |
2711 | int | |
2712 | main () | |
2713 | { | |
2714 | static $2 ac_aggr; | |
2715 | if (sizeof ac_aggr.$3) | |
2716 | return 0; | |
2717 | ; | |
2718 | return 0; | |
2719 | } | |
2720 | _ACEOF | |
2721 | if ac_fn_c_try_compile "$LINENO"; then : | |
2722 | eval "$4=yes" | |
2723 | else | |
2724 | eval "$4=no" | |
2725 | fi | |
2726 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2727 | fi | |
2728 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2729 | fi | |
2730 | eval ac_res=\$$4 | |
2731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2732 | $as_echo "$ac_res" >&6; } | |
2733 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2734 | ||
2735 | } # ac_fn_c_check_member | |
2736 | ||
2737 | # ac_fn_c_check_func LINENO FUNC VAR | |
2738 | # ---------------------------------- | |
2739 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2740 | ac_fn_c_check_func () | |
2741 | { | |
2742 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2744 | $as_echo_n "checking for $2... " >&6; } | |
2745 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2746 | $as_echo_n "(cached) " >&6 | |
2747 | else | |
2748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2749 | /* end confdefs.h. */ | |
2750 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2751 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2752 | #define $2 innocuous_$2 | |
2753 | ||
2754 | /* System header to define __stub macros and hopefully few prototypes, | |
2755 | which can conflict with char $2 (); below. | |
2756 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2757 | <limits.h> exists even on freestanding compilers. */ | |
2758 | ||
2759 | #ifdef __STDC__ | |
067d23c9 KY |
2760 | # include <limits.h> |
2761 | #else | |
2762 | # include <assert.h> | |
2763 | #endif | |
2764 | ||
2765 | #undef $2 | |
2766 | ||
2767 | /* Override any GCC internal prototype to avoid an error. | |
2768 | Use char because int might match the return type of a GCC | |
2769 | builtin and then its argument prototype would still apply. */ | |
2770 | #ifdef __cplusplus | |
2771 | extern "C" | |
2772 | #endif | |
2773 | char $2 (); | |
2774 | /* The GNU C library defines this for functions which it implements | |
2775 | to always fail with ENOSYS. Some functions are actually named | |
2776 | something starting with __ and the normal name is an alias. */ | |
2777 | #if defined __stub_$2 || defined __stub___$2 | |
2778 | choke me | |
2779 | #endif | |
2780 | ||
2781 | int | |
2782 | main () | |
2783 | { | |
2784 | return $2 (); | |
2785 | ; | |
2786 | return 0; | |
2787 | } | |
2788 | _ACEOF | |
2789 | if ac_fn_c_try_link "$LINENO"; then : | |
2790 | eval "$3=yes" | |
2791 | else | |
2792 | eval "$3=no" | |
2793 | fi | |
2794 | rm -f core conftest.err conftest.$ac_objext \ | |
2795 | conftest$ac_exeext conftest.$ac_ext | |
2796 | fi | |
2797 | eval ac_res=\$$3 | |
2798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2799 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2800 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
067d23c9 KY |
2801 | |
2802 | } # ac_fn_c_check_func | |
2803 | ||
5476a9a4 GM |
2804 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2805 | # ------------------------------------------- | |
2806 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2807 | # variable VAR accordingly. | |
2808 | ac_fn_c_check_type () | |
3e0be4ab GM |
2809 | { |
2810 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
5476a9a4 GM |
2811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
2812 | $as_echo_n "checking for $2... " >&6; } | |
2813 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
2814 | $as_echo_n "(cached) " >&6 |
2815 | else | |
5476a9a4 | 2816 | eval "$3=no" |
3e0be4ab GM |
2817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2818 | /* end confdefs.h. */ | |
5476a9a4 | 2819 | $4 |
3e0be4ab GM |
2820 | int |
2821 | main () | |
2822 | { | |
5476a9a4 GM |
2823 | if (sizeof ($2)) |
2824 | return 0; | |
3e0be4ab GM |
2825 | ; |
2826 | return 0; | |
2827 | } | |
2828 | _ACEOF | |
2829 | if ac_fn_c_try_compile "$LINENO"; then : | |
2830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2831 | /* end confdefs.h. */ | |
5476a9a4 | 2832 | $4 |
3e0be4ab GM |
2833 | int |
2834 | main () | |
2835 | { | |
5476a9a4 GM |
2836 | if (sizeof (($2))) |
2837 | return 0; | |
3e0be4ab GM |
2838 | ; |
2839 | return 0; | |
2840 | } | |
2841 | _ACEOF | |
2842 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 2843 | |
3e0be4ab | 2844 | else |
5476a9a4 | 2845 | eval "$3=yes" |
3e0be4ab GM |
2846 | fi |
2847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2848 | fi | |
2849 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2850 | fi | |
5476a9a4 | 2851 | eval ac_res=\$$3 |
3e0be4ab GM |
2852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
2853 | $as_echo "$ac_res" >&6; } | |
a9bec17c | 2854 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
3e0be4ab | 2855 | |
5476a9a4 | 2856 | } # ac_fn_c_check_type |
3e0be4ab | 2857 | |
5f90be1b PE |
2858 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2859 | # -------------------------------------------- | |
2860 | # Tries to find the compile-time value of EXPR in a program that includes | |
2861 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2862 | # computed | |
2863 | ac_fn_c_compute_int () | |
2864 | { | |
2865 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2866 | if test "$cross_compiling" = yes; then | |
2867 | # Depending upon the size, compute the lo and hi bounds. | |
2868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2869 | /* end confdefs.h. */ | |
2870 | $4 | |
2871 | int | |
2872 | main () | |
2873 | { | |
2874 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2875 | test_array [0] = 0 | |
2876 | ||
2877 | ; | |
2878 | return 0; | |
2879 | } | |
2880 | _ACEOF | |
2881 | if ac_fn_c_try_compile "$LINENO"; then : | |
2882 | ac_lo=0 ac_mid=0 | |
2883 | while :; do | |
2884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2885 | /* end confdefs.h. */ | |
2886 | $4 | |
2887 | int | |
2888 | main () | |
2889 | { | |
2890 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2891 | test_array [0] = 0 | |
2892 | ||
2893 | ; | |
2894 | return 0; | |
2895 | } | |
2896 | _ACEOF | |
2897 | if ac_fn_c_try_compile "$LINENO"; then : | |
2898 | ac_hi=$ac_mid; break | |
2899 | else | |
2900 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2901 | if test $ac_lo -le $ac_mid; then | |
2902 | ac_lo= ac_hi= | |
2903 | break | |
2904 | fi | |
2905 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2906 | fi | |
2907 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2908 | done | |
2909 | else | |
2910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2911 | /* end confdefs.h. */ | |
2912 | $4 | |
2913 | int | |
2914 | main () | |
2915 | { | |
2916 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2917 | test_array [0] = 0 | |
2918 | ||
2919 | ; | |
2920 | return 0; | |
2921 | } | |
2922 | _ACEOF | |
2923 | if ac_fn_c_try_compile "$LINENO"; then : | |
2924 | ac_hi=-1 ac_mid=-1 | |
2925 | while :; do | |
2926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2927 | /* end confdefs.h. */ | |
2928 | $4 | |
2929 | int | |
2930 | main () | |
2931 | { | |
2932 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2933 | test_array [0] = 0 | |
2934 | ||
2935 | ; | |
2936 | return 0; | |
2937 | } | |
2938 | _ACEOF | |
2939 | if ac_fn_c_try_compile "$LINENO"; then : | |
2940 | ac_lo=$ac_mid; break | |
2941 | else | |
2942 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2943 | if test $ac_mid -le $ac_hi; then | |
2944 | ac_lo= ac_hi= | |
2945 | break | |
2946 | fi | |
2947 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2948 | fi | |
2949 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2950 | done | |
2951 | else | |
2952 | ac_lo= ac_hi= | |
2953 | fi | |
2954 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2955 | fi | |
2956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2957 | # Binary search between lo and hi bounds. | |
2958 | while test "x$ac_lo" != "x$ac_hi"; do | |
2959 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2961 | /* end confdefs.h. */ | |
2962 | $4 | |
2963 | int | |
2964 | main () | |
2965 | { | |
2966 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2967 | test_array [0] = 0 | |
2968 | ||
2969 | ; | |
2970 | return 0; | |
2971 | } | |
2972 | _ACEOF | |
2973 | if ac_fn_c_try_compile "$LINENO"; then : | |
2974 | ac_hi=$ac_mid | |
2975 | else | |
2976 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2977 | fi | |
2978 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2979 | done | |
2980 | case $ac_lo in #(( | |
2981 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2982 | '') ac_retval=1 ;; | |
2983 | esac | |
2984 | else | |
2985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2986 | /* end confdefs.h. */ | |
2987 | $4 | |
2988 | static long int longval () { return $2; } | |
2989 | static unsigned long int ulongval () { return $2; } | |
2990 | #include <stdio.h> | |
2991 | #include <stdlib.h> | |
2992 | int | |
2993 | main () | |
2994 | { | |
2995 | ||
2996 | FILE *f = fopen ("conftest.val", "w"); | |
2997 | if (! f) | |
2998 | return 1; | |
2999 | if (($2) < 0) | |
3000 | { | |
3001 | long int i = longval (); | |
3002 | if (i != ($2)) | |
3003 | return 1; | |
3004 | fprintf (f, "%ld", i); | |
3005 | } | |
3006 | else | |
3007 | { | |
3008 | unsigned long int i = ulongval (); | |
3009 | if (i != ($2)) | |
3010 | return 1; | |
3011 | fprintf (f, "%lu", i); | |
3012 | } | |
3013 | /* Do not output a trailing newline, as this causes \r\n confusion | |
3014 | on some platforms. */ | |
3015 | return ferror (f) || fclose (f) != 0; | |
3016 | ||
3017 | ; | |
3018 | return 0; | |
3019 | } | |
3020 | _ACEOF | |
3021 | if ac_fn_c_try_run "$LINENO"; then : | |
3022 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
3023 | else | |
3024 | ac_retval=1 | |
3025 | fi | |
3026 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
3027 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3028 | rm -f conftest.val | |
3029 | ||
3030 | fi | |
a9bec17c | 3031 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
5f90be1b PE |
3032 | as_fn_set_status $ac_retval |
3033 | ||
3034 | } # ac_fn_c_compute_int | |
067d23c9 KY |
3035 | cat >config.log <<_ACEOF |
3036 | This file contains any messages produced by compilers while | |
3037 | running configure, to aid debugging if configure makes a mistake. | |
3038 | ||
c574bc34 | 3039 | It was created by emacs $as_me 24.3.50, which was |
a9bec17c | 3040 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
3041 | |
3042 | $ $0 $@ | |
3043 | ||
3044 | _ACEOF | |
3045 | exec 5>>config.log | |
3046 | { | |
3047 | cat <<_ASUNAME | |
3048 | ## --------- ## | |
3049 | ## Platform. ## | |
3050 | ## --------- ## | |
3051 | ||
3052 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
3053 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
3054 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
3055 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
3056 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
3057 | ||
3058 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
3059 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
3060 | ||
3061 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
3062 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
3063 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
3064 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
3065 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
3066 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
3067 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
3068 | ||
3069 | _ASUNAME | |
3070 | ||
3071 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3072 | for as_dir in $PATH | |
3073 | do | |
3074 | IFS=$as_save_IFS | |
3075 | test -z "$as_dir" && as_dir=. | |
3076 | $as_echo "PATH: $as_dir" | |
3077 | done | |
3078 | IFS=$as_save_IFS | |
3079 | ||
3080 | } >&5 | |
3081 | ||
3082 | cat >&5 <<_ACEOF | |
3083 | ||
3084 | ||
3085 | ## ----------- ## | |
3086 | ## Core tests. ## | |
3087 | ## ----------- ## | |
3088 | ||
3089 | _ACEOF | |
3090 | ||
3091 | ||
3092 | # Keep a trace of the command line. | |
3093 | # Strip out --no-create and --no-recursion so they do not pile up. | |
3094 | # Strip out --silent because we don't want to record it for future runs. | |
3095 | # Also quote any args containing shell meta-characters. | |
3096 | # Make two passes to allow for proper duplicate-argument suppression. | |
3097 | ac_configure_args= | |
3098 | ac_configure_args0= | |
3099 | ac_configure_args1= | |
3100 | ac_must_keep_next=false | |
3101 | for ac_pass in 1 2 | |
3102 | do | |
3103 | for ac_arg | |
3104 | do | |
3105 | case $ac_arg in | |
3106 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
3107 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
3108 | | -silent | --silent | --silen | --sile | --sil) | |
3109 | continue ;; | |
3110 | *\'*) | |
3111 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3112 | esac | |
3113 | case $ac_pass in | |
3114 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
3115 | 2) | |
3116 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
3117 | if test $ac_must_keep_next = true; then | |
3118 | ac_must_keep_next=false # Got value, back to normal. | |
3119 | else | |
3120 | case $ac_arg in | |
3121 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
3122 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
3123 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
3124 | | -with-* | --with-* | -without-* | --without-* | --x) | |
3125 | case "$ac_configure_args0 " in | |
3126 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
3127 | esac | |
3128 | ;; | |
3129 | -* ) ac_must_keep_next=true ;; | |
3130 | esac | |
3131 | fi | |
3132 | as_fn_append ac_configure_args " '$ac_arg'" | |
3133 | ;; | |
3134 | esac | |
3135 | done | |
3136 | done | |
3137 | { ac_configure_args0=; unset ac_configure_args0;} | |
3138 | { ac_configure_args1=; unset ac_configure_args1;} | |
3139 | ||
3140 | # When interrupted or exit'd, cleanup temporary files, and complete | |
3141 | # config.log. We remove comments because anyway the quotes in there | |
3142 | # would cause problems or look ugly. | |
3143 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
3144 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
3145 | trap 'exit_status=$? | |
3146 | # Save into config.log some information that might help in debugging. | |
3147 | { | |
3148 | echo | |
3149 | ||
a9bec17c GM |
3150 | cat <<\_ASBOX |
3151 | ## ---------------- ## | |
067d23c9 | 3152 | ## Cache variables. ## |
a9bec17c GM |
3153 | ## ---------------- ## |
3154 | _ASBOX | |
067d23c9 KY |
3155 | echo |
3156 | # The following way of writing the cache mishandles newlines in values, | |
3157 | ( | |
3158 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
3159 | eval ac_val=\$$ac_var | |
3160 | case $ac_val in #( | |
3161 | *${as_nl}*) | |
3162 | case $ac_var in #( | |
3163 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
3164 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
3165 | esac | |
3166 | case $ac_var in #( | |
3167 | _ | IFS | as_nl) ;; #( | |
3168 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
3169 | *) { eval $ac_var=; unset $ac_var;} ;; | |
3170 | esac ;; | |
3171 | esac | |
3172 | done | |
3173 | (set) 2>&1 | | |
3174 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
3175 | *${as_nl}ac_space=\ *) | |
3176 | sed -n \ | |
3177 | "s/'\''/'\''\\\\'\'''\''/g; | |
3178 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
3179 | ;; #( | |
3180 | *) | |
3181 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
3182 | ;; | |
3183 | esac | | |
3184 | sort | |
3185 | ) | |
3186 | echo | |
3187 | ||
a9bec17c GM |
3188 | cat <<\_ASBOX |
3189 | ## ----------------- ## | |
067d23c9 | 3190 | ## Output variables. ## |
a9bec17c GM |
3191 | ## ----------------- ## |
3192 | _ASBOX | |
067d23c9 KY |
3193 | echo |
3194 | for ac_var in $ac_subst_vars | |
3195 | do | |
3196 | eval ac_val=\$$ac_var | |
3197 | case $ac_val in | |
3198 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3199 | esac | |
3200 | $as_echo "$ac_var='\''$ac_val'\''" | |
3201 | done | sort | |
3202 | echo | |
3203 | ||
3204 | if test -n "$ac_subst_files"; then | |
a9bec17c GM |
3205 | cat <<\_ASBOX |
3206 | ## ------------------- ## | |
067d23c9 | 3207 | ## File substitutions. ## |
a9bec17c GM |
3208 | ## ------------------- ## |
3209 | _ASBOX | |
067d23c9 KY |
3210 | echo |
3211 | for ac_var in $ac_subst_files | |
3212 | do | |
3213 | eval ac_val=\$$ac_var | |
3214 | case $ac_val in | |
3215 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
3216 | esac | |
3217 | $as_echo "$ac_var='\''$ac_val'\''" | |
3218 | done | sort | |
3219 | echo | |
3220 | fi | |
3221 | ||
3222 | if test -s confdefs.h; then | |
a9bec17c GM |
3223 | cat <<\_ASBOX |
3224 | ## ----------- ## | |
067d23c9 | 3225 | ## confdefs.h. ## |
a9bec17c GM |
3226 | ## ----------- ## |
3227 | _ASBOX | |
067d23c9 KY |
3228 | echo |
3229 | cat confdefs.h | |
3230 | echo | |
3231 | fi | |
3232 | test "$ac_signal" != 0 && | |
3233 | $as_echo "$as_me: caught signal $ac_signal" | |
3234 | $as_echo "$as_me: exit $exit_status" | |
3235 | } >&5 | |
3236 | rm -f core *.core core.conftest.* && | |
3237 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
3238 | exit $exit_status | |
3239 | ' 0 | |
3240 | for ac_signal in 1 2 13 15; do | |
3241 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
3242 | done | |
3243 | ac_signal=0 | |
3244 | ||
3245 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
3246 | rm -f -r conftest* confdefs.h | |
3247 | ||
3248 | $as_echo "/* confdefs.h */" > confdefs.h | |
3249 | ||
3250 | # Predefined preprocessor variables. | |
3251 | ||
3252 | cat >>confdefs.h <<_ACEOF | |
3253 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
3254 | _ACEOF | |
3255 | ||
3256 | cat >>confdefs.h <<_ACEOF | |
3257 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
3258 | _ACEOF | |
3259 | ||
3260 | cat >>confdefs.h <<_ACEOF | |
3261 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
3262 | _ACEOF | |
3263 | ||
3264 | cat >>confdefs.h <<_ACEOF | |
3265 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
3266 | _ACEOF | |
3267 | ||
3268 | cat >>confdefs.h <<_ACEOF | |
3269 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
3270 | _ACEOF | |
3271 | ||
3272 | cat >>confdefs.h <<_ACEOF | |
3273 | #define PACKAGE_URL "$PACKAGE_URL" | |
3274 | _ACEOF | |
3275 | ||
3276 | ||
3277 | # Let the site file select an alternate cache file if it wants to. | |
3278 | # Prefer an explicitly selected file to automatically selected ones. | |
3279 | ac_site_file1=NONE | |
3280 | ac_site_file2=NONE | |
3281 | if test -n "$CONFIG_SITE"; then | |
a9bec17c | 3282 | ac_site_file1=$CONFIG_SITE |
067d23c9 KY |
3283 | elif test "x$prefix" != xNONE; then |
3284 | ac_site_file1=$prefix/share/config.site | |
3285 | ac_site_file2=$prefix/etc/config.site | |
3286 | else | |
3287 | ac_site_file1=$ac_default_prefix/share/config.site | |
3288 | ac_site_file2=$ac_default_prefix/etc/config.site | |
3289 | fi | |
3290 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
3291 | do | |
3292 | test "x$ac_site_file" = xNONE && continue | |
3293 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
3294 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
3295 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
3296 | sed 's/^/| /' "$ac_site_file" >&5 | |
a9bec17c | 3297 | . "$ac_site_file" |
067d23c9 KY |
3298 | fi |
3299 | done | |
3300 | ||
3301 | if test -r "$cache_file"; then | |
3302 | # Some versions of bash will fail to source /dev/null (special files | |
3303 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
3304 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
3305 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
3306 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
3307 | case $cache_file in | |
3308 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
3309 | *) . "./$cache_file";; | |
3310 | esac | |
3311 | fi | |
3312 | else | |
3313 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
3314 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
3315 | >$cache_file | |
3316 | fi | |
3317 | ||
5476a9a4 GM |
3318 | as_fn_append ac_header_list " linux/version.h" |
3319 | as_fn_append ac_header_list " sys/systeminfo.h" | |
5476a9a4 GM |
3320 | as_fn_append ac_header_list " coff.h" |
3321 | as_fn_append ac_header_list " pty.h" | |
5476a9a4 GM |
3322 | as_fn_append ac_header_list " sys/resource.h" |
3323 | as_fn_append ac_header_list " sys/utsname.h" | |
3324 | as_fn_append ac_header_list " pwd.h" | |
3325 | as_fn_append ac_header_list " utmp.h" | |
5476a9a4 GM |
3326 | as_fn_append ac_header_list " util.h" |
3327 | as_fn_append ac_header_list " sys/socket.h" | |
3328 | as_fn_append ac_header_list " stdlib.h" | |
3329 | as_fn_append ac_header_list " unistd.h" | |
7e723570 | 3330 | as_fn_append ac_header_list " sys/param.h" |
5476a9a4 GM |
3331 | as_fn_append ac_header_list " pthread.h" |
3332 | as_fn_append ac_header_list " malloc/malloc.h" | |
3333 | as_fn_append ac_header_list " maillock.h" | |
3334 | as_fn_append ac_header_list " sys/un.h" | |
3335 | as_fn_append ac_func_list " tzset" | |
3336 | as_fn_append ac_func_list " readlinkat" | |
d7ad186c | 3337 | as_fn_append ac_header_list " dirent.h" |
8966cbff | 3338 | as_fn_append ac_header_list " execinfo.h" |
710f5812 | 3339 | as_fn_append ac_func_list " faccessat" |
d7ad186c | 3340 | as_fn_append ac_func_list " fdopendir" |
eda33f78 | 3341 | as_fn_append ac_header_list " stdio_ext.h" |
3bf26e96 | 3342 | as_fn_append ac_func_list " __fpending" |
d7ad186c | 3343 | as_fn_append ac_func_list " fstatat" |
2407788f | 3344 | as_fn_append ac_func_list " fsync" |
f199cab1 GM |
3345 | gl_getopt_required=GNU |
3346 | as_fn_append ac_header_list " getopt.h" | |
3347 | as_fn_append ac_func_list " gettimeofday" | |
3348 | as_fn_append ac_func_list " nanotime" | |
e700232f | 3349 | as_fn_append ac_header_list " sys/time.h" |
f199cab1 GM |
3350 | as_fn_append ac_header_list " wchar.h" |
3351 | as_fn_append ac_header_list " stdint.h" | |
3352 | as_fn_append ac_header_list " inttypes.h" | |
3353 | as_fn_append ac_func_list " lstat" | |
f199cab1 GM |
3354 | as_fn_append ac_header_list " sys/select.h" |
3355 | as_fn_append ac_func_list " pselect" | |
3356 | as_fn_append ac_func_list " pthread_sigmask" | |
3357 | as_fn_append ac_func_list " readlink" | |
f199cab1 GM |
3358 | as_fn_append ac_func_list " strtoimax" |
3359 | as_fn_append ac_func_list " strtoumax" | |
3360 | as_fn_append ac_func_list " symlink" | |
3361 | as_fn_append ac_header_list " sys/stat.h" | |
3362 | as_fn_append ac_func_list " localtime_r" | |
e700232f | 3363 | as_fn_append ac_header_list " utime.h" |
f199cab1 GM |
3364 | as_fn_append ac_func_list " futimes" |
3365 | as_fn_append ac_func_list " futimesat" | |
3366 | as_fn_append ac_func_list " futimens" | |
3367 | as_fn_append ac_func_list " utimensat" | |
3368 | as_fn_append ac_func_list " lutimes" | |
067d23c9 KY |
3369 | # Check that the precious variables saved in the cache have kept the same |
3370 | # value. | |
3371 | ac_cache_corrupted=false | |
3372 | for ac_var in $ac_precious_vars; do | |
3373 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
3374 | eval ac_new_set=\$ac_env_${ac_var}_set | |
3375 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
3376 | eval ac_new_val=\$ac_env_${ac_var}_value | |
3377 | case $ac_old_set,$ac_new_set in | |
3378 | set,) | |
3379 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
3380 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
3381 | ac_cache_corrupted=: ;; | |
3382 | ,set) | |
3383 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
3384 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
3385 | ac_cache_corrupted=: ;; | |
3386 | ,);; | |
3387 | *) | |
3388 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
3389 | # differences in whitespace do not lead to failure. | |
3390 | ac_old_val_w=`echo x $ac_old_val` | |
3391 | ac_new_val_w=`echo x $ac_new_val` | |
3392 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
3393 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
3394 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
3395 | ac_cache_corrupted=: | |
3396 | else | |
3397 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
3398 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
3399 | eval $ac_var=\$ac_old_val | |
3400 | fi | |
3401 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
3402 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
3403 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
3404 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
3405 | fi;; | |
3406 | esac | |
3407 | # Pass precious variables to config.status. | |
3408 | if test "$ac_new_set" = set; then | |
3409 | case $ac_new_val in | |
3410 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
3411 | *) ac_arg=$ac_var=$ac_new_val ;; | |
3412 | esac | |
3413 | case " $ac_configure_args " in | |
3414 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
3415 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
3416 | esac | |
3417 | fi | |
3418 | done | |
3419 | if $ac_cache_corrupted; then | |
3420 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3421 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3422 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
3423 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
a9bec17c | 3424 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
067d23c9 KY |
3425 | fi |
3426 | ## -------------------- ## | |
3427 | ## Main body of script. ## | |
3428 | ## -------------------- ## | |
3429 | ||
3430 | ac_ext=c | |
3431 | ac_cpp='$CPP $CPPFLAGS' | |
3432 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3433 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3434 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3435 | ||
3436 | ||
2f559cd2 | 3437 | |
e25a10b7 | 3438 | emacs_config_options="$@" |
2f559cd2 GM |
3439 | ## Add some environment variables, if they were passed via the environment |
3440 | ## rather than on the command-line. | |
3441 | for var in CFLAGS CPPFLAGS LDFLAGS; do | |
3442 | case "$emacs_config_options" in | |
3443 | *$var=*) continue ;; | |
3444 | esac | |
3445 | eval val="\$${var}" | |
3446 | test x"$val" = x && continue | |
71b84316 | 3447 | emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\"" |
2f559cd2 GM |
3448 | done |
3449 | ||
067d23c9 KY |
3450 | ac_config_headers="$ac_config_headers src/config.h:src/config.in" |
3451 | ||
3452 | ||
743c80a7 | 3453 | ac_aux_dir= |
369e19fc | 3454 | for ac_dir in build-aux "$srcdir"/build-aux; do |
a9bec17c GM |
3455 | for ac_t in install-sh install.sh shtool; do |
3456 | if test -f "$ac_dir/$ac_t"; then | |
3457 | ac_aux_dir=$ac_dir | |
3458 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3459 | break 2 | |
3460 | fi | |
3461 | done | |
743c80a7 PE |
3462 | done |
3463 | if test -z "$ac_aux_dir"; then | |
a9bec17c | 3464 | as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 |
743c80a7 | 3465 | fi |
067d23c9 | 3466 | |
743c80a7 PE |
3467 | # These three variables are undocumented and unsupported, |
3468 | # and are intended to be withdrawn in a future Autoconf release. | |
3469 | # They can cause serious problems if a builder's source tree is in a directory | |
3470 | # whose full name contains unusual characters. | |
3471 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3472 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3473 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
067d23c9 | 3474 | |
067d23c9 | 3475 | |
369e19fc PE |
3476 | am__api_version='1.11' |
3477 | ||
743c80a7 PE |
3478 | # Find a good install program. We prefer a C program (faster), |
3479 | # so one script is as good as another. But avoid the broken or | |
3480 | # incompatible versions: | |
3481 | # SysV /etc/install, /usr/sbin/install | |
3482 | # SunOS /usr/etc/install | |
3483 | # IRIX /sbin/install | |
3484 | # AIX /bin/install | |
3485 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
3486 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3487 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3488 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3489 | # OS/2's system install, which has a completely different semantic | |
3490 | # ./install, which can be erroneously created by make from ./install.sh. | |
3491 | # Reject install programs that cannot install multiple files. | |
3492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
3493 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
3494 | if test -z "$INSTALL"; then | |
a9bec17c | 3495 | if test "${ac_cv_path_install+set}" = set; then : |
743c80a7 PE |
3496 | $as_echo_n "(cached) " >&6 |
3497 | else | |
3498 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3499 | for as_dir in $PATH | |
3500 | do | |
3501 | IFS=$as_save_IFS | |
3502 | test -z "$as_dir" && as_dir=. | |
3503 | # Account for people who put trailing slashes in PATH elements. | |
3504 | case $as_dir/ in #(( | |
3505 | ./ | .// | /[cC]/* | \ | |
3506 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3507 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
3508 | /usr/ucb/* ) ;; | |
3509 | *) | |
3510 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
3511 | # Don't use installbsd from OSF since it installs stuff as root | |
3512 | # by default. | |
3513 | for ac_prog in ginstall scoinst install; do | |
3514 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3515 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
3516 | if test $ac_prog = install && | |
3517 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3518 | # AIX install. It has an incompatible calling convention. | |
3519 | : | |
3520 | elif test $ac_prog = install && | |
3521 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3522 | # program-specific install script used by HP pwplus--don't use. | |
3523 | : | |
3524 | else | |
3525 | rm -rf conftest.one conftest.two conftest.dir | |
3526 | echo one > conftest.one | |
3527 | echo two > conftest.two | |
3528 | mkdir conftest.dir | |
3529 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
3530 | test -s conftest.one && test -s conftest.two && | |
3531 | test -s conftest.dir/conftest.one && | |
3532 | test -s conftest.dir/conftest.two | |
3533 | then | |
3534 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3535 | break 3 | |
3536 | fi | |
3537 | fi | |
3538 | fi | |
3539 | done | |
3540 | done | |
3541 | ;; | |
3542 | esac | |
067d23c9 | 3543 | |
743c80a7 PE |
3544 | done |
3545 | IFS=$as_save_IFS | |
067d23c9 | 3546 | |
743c80a7 | 3547 | rm -rf conftest.one conftest.two conftest.dir |
067d23c9 | 3548 | |
067d23c9 | 3549 | fi |
743c80a7 PE |
3550 | if test "${ac_cv_path_install+set}" = set; then |
3551 | INSTALL=$ac_cv_path_install | |
3552 | else | |
3553 | # As a last resort, use the slow shell script. Don't cache a | |
3554 | # value for INSTALL within a source directory, because that will | |
3555 | # break other packages using the cache if that directory is | |
3556 | # removed, or if the value is a relative name. | |
3557 | INSTALL=$ac_install_sh | |
3558 | fi | |
067d23c9 | 3559 | fi |
743c80a7 PE |
3560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
3561 | $as_echo "$INSTALL" >&6; } | |
067d23c9 | 3562 | |
743c80a7 PE |
3563 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
3564 | # It thinks the first close brace ends the variable substitution. | |
3565 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
067d23c9 | 3566 | |
743c80a7 | 3567 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
067d23c9 | 3568 | |
743c80a7 | 3569 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
067d23c9 | 3570 | |
743c80a7 PE |
3571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
3572 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
3573 | # Just in case | |
3574 | sleep 1 | |
3575 | echo timestamp > conftest.file | |
3576 | # Reject unsafe characters in $srcdir or the absolute working directory | |
3577 | # name. Accept space and tab only in the latter. | |
3578 | am_lf=' | |
3579 | ' | |
3580 | case `pwd` in | |
3581 | *[\\\"\#\$\&\'\`$am_lf]*) | |
a9bec17c | 3582 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; |
743c80a7 PE |
3583 | esac |
3584 | case $srcdir in | |
3585 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
a9bec17c | 3586 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; |
743c80a7 | 3587 | esac |
067d23c9 | 3588 | |
743c80a7 PE |
3589 | # Do `set' in a subshell so we don't clobber the current shell's |
3590 | # arguments. Must try -L first in case configure is actually a | |
3591 | # symlink; some systems play weird games with the mod time of symlinks | |
3592 | # (eg FreeBSD returns the mod time of the symlink's containing | |
3593 | # directory). | |
3594 | if ( | |
3595 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
3596 | if test "$*" = "X"; then | |
3597 | # -L didn't work. | |
3598 | set X `ls -t "$srcdir/configure" conftest.file` | |
3599 | fi | |
3600 | rm -f conftest.file | |
3601 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
3602 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
3603 | ||
3604 | # If neither matched, then we have a broken ls. This can happen | |
3605 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
3606 | # broken ls alias from the environment. This has actually | |
3607 | # happened. Such a system could not be considered "sane". | |
a9bec17c | 3608 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
743c80a7 PE |
3609 | alias in your environment" "$LINENO" 5 |
3610 | fi | |
067d23c9 | 3611 | |
743c80a7 PE |
3612 | test "$2" = conftest.file |
3613 | ) | |
3614 | then | |
3615 | # Ok. | |
3616 | : | |
067d23c9 | 3617 | else |
a9bec17c | 3618 | as_fn_error "newly created file is older than distributed files! |
743c80a7 | 3619 | Check your system clock" "$LINENO" 5 |
067d23c9 | 3620 | fi |
743c80a7 PE |
3621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3622 | $as_echo "yes" >&6; } | |
3623 | test "$program_prefix" != NONE && | |
3624 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
3625 | # Use a double $ so make ignores it. | |
3626 | test "$program_suffix" != NONE && | |
3627 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
3628 | # Double any \ or $. | |
3629 | # By default was `s,x,x', remove it if useless. | |
3630 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
3631 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
067d23c9 | 3632 | |
743c80a7 PE |
3633 | # expand $ac_aux_dir to an absolute path |
3634 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
067d23c9 | 3635 | |
743c80a7 PE |
3636 | if test x"${MISSING+set}" != xset; then |
3637 | case $am_aux_dir in | |
3638 | *\ * | *\ *) | |
3639 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
3640 | *) | |
3641 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
3642 | esac | |
067d23c9 | 3643 | fi |
743c80a7 PE |
3644 | # Use eval to expand $SHELL |
3645 | if eval "$MISSING --run true"; then | |
3646 | am_missing_run="$MISSING --run " | |
067d23c9 | 3647 | else |
743c80a7 PE |
3648 | am_missing_run= |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 | |
3650 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
067d23c9 KY |
3651 | fi |
3652 | ||
743c80a7 PE |
3653 | if test x"${install_sh}" != xset; then |
3654 | case $am_aux_dir in | |
3655 | *\ * | *\ *) | |
3656 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
3657 | *) | |
3658 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
3659 | esac | |
067d23c9 KY |
3660 | fi |
3661 | ||
743c80a7 PE |
3662 | # Installed binaries are usually stripped using `strip' when the user |
3663 | # run `make install-strip'. However `strip' might not be the right | |
3664 | # tool to use in cross-compilation environments, therefore Automake | |
3665 | # will honor the `STRIP' environment variable to overrule this program. | |
3666 | if test "$cross_compiling" != no; then | |
3667 | if test -n "$ac_tool_prefix"; then | |
3668 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
3669 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
3670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3671 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3672 | if test "${ac_cv_prog_STRIP+set}" = set; then : |
743c80a7 | 3673 | $as_echo_n "(cached) " >&6 |
067d23c9 | 3674 | else |
743c80a7 PE |
3675 | if test -n "$STRIP"; then |
3676 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
3677 | else | |
3678 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3679 | for as_dir in $PATH | |
3680 | do | |
3681 | IFS=$as_save_IFS | |
3682 | test -z "$as_dir" && as_dir=. | |
3683 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3684 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3685 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
3686 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3687 | break 2 | |
3688 | fi | |
3689 | done | |
3690 | done | |
3691 | IFS=$as_save_IFS | |
067d23c9 KY |
3692 | |
3693 | fi | |
067d23c9 | 3694 | fi |
743c80a7 PE |
3695 | STRIP=$ac_cv_prog_STRIP |
3696 | if test -n "$STRIP"; then | |
3697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
3698 | $as_echo "$STRIP" >&6; } | |
3699 | else | |
3700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3701 | $as_echo "no" >&6; } | |
067d23c9 KY |
3702 | fi |
3703 | ||
3704 | ||
067d23c9 | 3705 | fi |
743c80a7 PE |
3706 | if test -z "$ac_cv_prog_STRIP"; then |
3707 | ac_ct_STRIP=$STRIP | |
3708 | # Extract the first word of "strip", so it can be a program name with args. | |
3709 | set dummy strip; ac_word=$2 | |
3710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3711 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3712 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : |
743c80a7 PE |
3713 | $as_echo_n "(cached) " >&6 |
3714 | else | |
3715 | if test -n "$ac_ct_STRIP"; then | |
3716 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
3717 | else | |
3718 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3719 | for as_dir in $PATH | |
3720 | do | |
3721 | IFS=$as_save_IFS | |
3722 | test -z "$as_dir" && as_dir=. | |
3723 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3724 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3725 | ac_cv_prog_ac_ct_STRIP="strip" | |
3726 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3727 | break 2 | |
3728 | fi | |
3729 | done | |
3730 | done | |
3731 | IFS=$as_save_IFS | |
3732 | ||
3733 | fi | |
3734 | fi | |
3735 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
3736 | if test -n "$ac_ct_STRIP"; then | |
3737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
3738 | $as_echo "$ac_ct_STRIP" >&6; } | |
3739 | else | |
3740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3741 | $as_echo "no" >&6; } | |
3742 | fi | |
3743 | ||
3744 | if test "x$ac_ct_STRIP" = x; then | |
3745 | STRIP=":" | |
3746 | else | |
3747 | case $cross_compiling:$ac_tool_warned in | |
3748 | yes:) | |
3749 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3750 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3751 | ac_tool_warned=yes ;; | |
3752 | esac | |
3753 | STRIP=$ac_ct_STRIP | |
3754 | fi | |
3755 | else | |
3756 | STRIP="$ac_cv_prog_STRIP" | |
3757 | fi | |
3758 | ||
3759 | fi | |
3760 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
3761 | ||
3762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
3763 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
3764 | if test -z "$MKDIR_P"; then | |
a9bec17c | 3765 | if test "${ac_cv_path_mkdir+set}" = set; then : |
743c80a7 PE |
3766 | $as_echo_n "(cached) " >&6 |
3767 | else | |
3768 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3769 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
3770 | do | |
3771 | IFS=$as_save_IFS | |
3772 | test -z "$as_dir" && as_dir=. | |
3773 | for ac_prog in mkdir gmkdir; do | |
3774 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3775 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
3776 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
3777 | 'mkdir (GNU coreutils) '* | \ | |
3778 | 'mkdir (coreutils) '* | \ | |
3779 | 'mkdir (fileutils) '4.1*) | |
3780 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
3781 | break 3;; | |
3782 | esac | |
3783 | done | |
3784 | done | |
3785 | done | |
3786 | IFS=$as_save_IFS | |
3787 | ||
3788 | fi | |
3789 | ||
3790 | test -d ./--version && rmdir ./--version | |
3791 | if test "${ac_cv_path_mkdir+set}" = set; then | |
3792 | MKDIR_P="$ac_cv_path_mkdir -p" | |
3793 | else | |
3794 | # As a last resort, use the slow shell script. Don't cache a | |
3795 | # value for MKDIR_P within a source directory, because that will | |
3796 | # break other packages using the cache if that directory is | |
3797 | # removed, or if the value is a relative name. | |
3798 | MKDIR_P="$ac_install_sh -d" | |
3799 | fi | |
3800 | fi | |
3801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
3802 | $as_echo "$MKDIR_P" >&6; } | |
3803 | ||
3804 | mkdir_p="$MKDIR_P" | |
3805 | case $mkdir_p in | |
3806 | [\\/$]* | ?:[\\/]*) ;; | |
3807 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
3808 | esac | |
3809 | ||
3810 | for ac_prog in gawk mawk nawk awk | |
3811 | do | |
3812 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3813 | set dummy $ac_prog; ac_word=$2 | |
3814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3815 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 3816 | if test "${ac_cv_prog_AWK+set}" = set; then : |
743c80a7 PE |
3817 | $as_echo_n "(cached) " >&6 |
3818 | else | |
3819 | if test -n "$AWK"; then | |
3820 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3821 | else | |
3822 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3823 | for as_dir in $PATH | |
3824 | do | |
3825 | IFS=$as_save_IFS | |
3826 | test -z "$as_dir" && as_dir=. | |
3827 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3828 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3829 | ac_cv_prog_AWK="$ac_prog" | |
3830 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3831 | break 2 | |
3832 | fi | |
3833 | done | |
3834 | done | |
3835 | IFS=$as_save_IFS | |
3836 | ||
3837 | fi | |
3838 | fi | |
3839 | AWK=$ac_cv_prog_AWK | |
3840 | if test -n "$AWK"; then | |
3841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3842 | $as_echo "$AWK" >&6; } | |
3843 | else | |
3844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3845 | $as_echo "no" >&6; } | |
3846 | fi | |
3847 | ||
3848 | ||
3849 | test -n "$AWK" && break | |
3850 | done | |
3851 | ||
3852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3853 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
3854 | set x ${MAKE-make} | |
3855 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
a9bec17c | 3856 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
3857 | $as_echo_n "(cached) " >&6 |
3858 | else | |
3859 | cat >conftest.make <<\_ACEOF | |
3860 | SHELL = /bin/sh | |
3861 | all: | |
3862 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
3863 | _ACEOF | |
a9bec17c | 3864 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
743c80a7 PE |
3865 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
3866 | *@@@%%%=?*=@@@%%%*) | |
3867 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
3868 | *) | |
3869 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
3870 | esac | |
3871 | rm -f conftest.make | |
3872 | fi | |
3873 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
3874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3875 | $as_echo "yes" >&6; } | |
3876 | SET_MAKE= | |
3877 | else | |
3878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3879 | $as_echo "no" >&6; } | |
3880 | SET_MAKE="MAKE=${MAKE-make}" | |
3881 | fi | |
3882 | ||
3883 | rm -rf .tst 2>/dev/null | |
3884 | mkdir .tst 2>/dev/null | |
3885 | if test -d .tst; then | |
3886 | am__leading_dot=. | |
3887 | else | |
3888 | am__leading_dot=_ | |
3889 | fi | |
3890 | rmdir .tst 2>/dev/null | |
3891 | ||
3892 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3893 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3894 | # is not polluted with repeated "-I." | |
3895 | am__isrc=' -I$(srcdir)' | |
3896 | # test to see if srcdir already configured | |
3897 | if test -f $srcdir/config.status; then | |
a9bec17c | 3898 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 |
743c80a7 PE |
3899 | fi |
3900 | fi | |
3901 | ||
3902 | # test whether we have cygpath | |
3903 | if test -z "$CYGPATH_W"; then | |
3904 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3905 | CYGPATH_W='cygpath -w' | |
3906 | else | |
3907 | CYGPATH_W=echo | |
3908 | fi | |
3909 | fi | |
3910 | ||
3911 | ||
3912 | # Define the identity of the package. | |
3913 | PACKAGE='emacs' | |
c574bc34 | 3914 | VERSION='24.3.50' |
743c80a7 PE |
3915 | |
3916 | ||
3917 | cat >>confdefs.h <<_ACEOF | |
3918 | #define PACKAGE "$PACKAGE" | |
3919 | _ACEOF | |
3920 | ||
3921 | ||
3922 | cat >>confdefs.h <<_ACEOF | |
3923 | #define VERSION "$VERSION" | |
3924 | _ACEOF | |
3925 | ||
3926 | # Some tools Automake needs. | |
3927 | ||
3928 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3929 | ||
3930 | ||
3931 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3932 | ||
3933 | ||
3934 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3935 | ||
3936 | ||
3937 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3938 | ||
3939 | ||
3940 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3941 | ||
3942 | # We need awk for the "check" target. The system "awk" is bad on | |
3943 | # some platforms. | |
3944 | # Always define AMTAR for backward compatibility. | |
3945 | ||
3946 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
3947 | ||
3948 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
3949 | ||
3950 | ||
3951 | ||
3952 | ||
3953 | ||
3954 | ||
3955 | ||
3956 | ||
3957 | lispdir='${datadir}/emacs/${version}/lisp' | |
e1939eb1 | 3958 | leimdir='${datadir}/emacs/${version}/leim' |
397f7161 | 3959 | standardlisppath='${lispdir}:${leimdir}' |
743c80a7 PE |
3960 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ |
3961 | '${datadir}/emacs/site-lisp' | |
397f7161 | 3962 | lisppath='${locallisppath}:${standardlisppath}' |
743c80a7 PE |
3963 | etcdir='${datadir}/emacs/${version}/etc' |
3964 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | |
3965 | docdir='${datadir}/emacs/${version}/etc' | |
3966 | gamedir='${localstatedir}/games/emacs' | |
3967 | ||
ee77919d GM |
3968 | |
3969 | # Check whether --with-all was given. | |
3970 | if test "${with_all+set}" = set; then : | |
3971 | withval=$with_all; with_features=$withval | |
c0528ebe | 3972 | else |
ee77919d | 3973 | with_features=yes |
c0528ebe GM |
3974 | fi |
3975 | ||
3976 | ||
743c80a7 PE |
3977 | |
3978 | ||
3979 | ||
3980 | # Check whether --with-pop was given. | |
3981 | if test "${with_pop+set}" = set; then : | |
3982 | withval=$with_pop; | |
3983 | else | |
ee77919d | 3984 | with_pop=$with_features |
743c80a7 PE |
3985 | fi |
3986 | ||
3987 | if test "$with_pop" = yes; then | |
3988 | $as_echo "#define MAIL_USE_POP 1" >>confdefs.h | |
3989 | ||
3990 | fi | |
3991 | ||
3992 | ||
3993 | # Check whether --with-kerberos was given. | |
3994 | if test "${with_kerberos+set}" = set; then : | |
3995 | withval=$with_kerberos; | |
3996 | else | |
3997 | with_kerberos=no | |
3998 | fi | |
3999 | ||
4000 | if test "$with_kerberos" != no; then | |
4001 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
4002 | ||
4003 | fi | |
4004 | ||
4005 | ||
4006 | # Check whether --with-kerberos5 was given. | |
4007 | if test "${with_kerberos5+set}" = set; then : | |
4008 | withval=$with_kerberos5; | |
4009 | else | |
4010 | with_kerberos5=no | |
4011 | fi | |
4012 | ||
4013 | if test "${with_kerberos5}" != no; then | |
4014 | if test "${with_kerberos}" = no; then | |
4015 | with_kerberos=yes | |
4016 | $as_echo "#define KERBEROS 1" >>confdefs.h | |
4017 | ||
4018 | fi | |
4019 | ||
4020 | $as_echo "#define KERBEROS5 1" >>confdefs.h | |
4021 | ||
4022 | fi | |
4023 | ||
4024 | ||
4025 | # Check whether --with-hesiod was given. | |
4026 | if test "${with_hesiod+set}" = set; then : | |
4027 | withval=$with_hesiod; | |
4028 | else | |
4029 | with_hesiod=no | |
4030 | fi | |
4031 | ||
4032 | if test "$with_hesiod" != no; then | |
4033 | ||
4034 | $as_echo "#define HESIOD 1" >>confdefs.h | |
4035 | ||
4036 | fi | |
4037 | ||
4038 | ||
4039 | # Check whether --with-mmdf was given. | |
4040 | if test "${with_mmdf+set}" = set; then : | |
4041 | withval=$with_mmdf; | |
4042 | else | |
4043 | with_mmdf=no | |
4044 | fi | |
4045 | ||
4046 | if test "$with_mmdf" != no; then | |
4047 | ||
4048 | $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h | |
4049 | ||
4050 | fi | |
4051 | ||
4052 | ||
4053 | # Check whether --with-mail-unlink was given. | |
4054 | if test "${with_mail_unlink+set}" = set; then : | |
4055 | withval=$with_mail_unlink; | |
4056 | else | |
4057 | with_mail_unlink=no | |
4058 | fi | |
4059 | ||
4060 | if test "$with_mail_unlink" != no; then | |
4061 | ||
4062 | $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h | |
4063 | ||
4064 | fi | |
4065 | ||
4066 | ||
4067 | # Check whether --with-mailhost was given. | |
4068 | if test "${with_mailhost+set}" = set; then : | |
4069 | withval=$with_mailhost; | |
4070 | cat >>confdefs.h <<_ACEOF | |
4071 | #define MAILHOST "$withval" | |
4072 | _ACEOF | |
4073 | ||
4074 | fi | |
4075 | ||
4076 | ||
4077 | ||
067d23c9 KY |
4078 | # Check whether --with-sound was given. |
4079 | if test "${with_sound+set}" = set; then : | |
4080 | withval=$with_sound; | |
4081 | else | |
ee77919d | 4082 | with_sound=$with_features |
067d23c9 KY |
4083 | fi |
4084 | ||
4085 | ||
4086 | ||
067d23c9 KY |
4087 | # Check whether --with-x-toolkit was given. |
4088 | if test "${with_x_toolkit+set}" = set; then : | |
4089 | withval=$with_x_toolkit; case "${withval}" in | |
4090 | y | ye | yes ) val=gtk ;; | |
4091 | n | no ) val=no ;; | |
4092 | l | lu | luc | luci | lucid ) val=lucid ;; | |
4093 | a | at | ath | athe | athen | athena ) val=athena ;; | |
4094 | m | mo | mot | moti | motif ) val=motif ;; | |
4095 | g | gt | gtk ) val=gtk ;; | |
4fa92495 | 4096 | gtk2 ) val=gtk2 ;; |
067d23c9 KY |
4097 | gtk3 ) val=gtk3 ;; |
4098 | * ) | |
a9bec17c | 4099 | as_fn_error "\`--with-x-toolkit=$withval' is invalid; |
4fa92495 GM |
4100 | this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk', |
4101 | \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms. | |
4102 | \`athena' and \`lucid' are synonyms." "$LINENO" 5 | |
067d23c9 KY |
4103 | ;; |
4104 | esac | |
4105 | with_x_toolkit=$val | |
4106 | ||
4107 | fi | |
4108 | ||
4109 | ||
4110 | ||
0442dc7f GM |
4111 | # Check whether --with-wide-int was given. |
4112 | if test "${with_wide_int+set}" = set; then : | |
4113 | withval=$with_wide_int; | |
4114 | else | |
4115 | with_wide_int=no | |
4116 | fi | |
4117 | ||
4118 | if test "$with_wide_int" = yes; then | |
4119 | ||
4120 | $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h | |
4121 | ||
4122 | fi | |
4123 | ||
4124 | ||
067d23c9 KY |
4125 | # Check whether --with-xpm was given. |
4126 | if test "${with_xpm+set}" = set; then : | |
4127 | withval=$with_xpm; | |
4128 | else | |
ee77919d | 4129 | with_xpm=$with_features |
067d23c9 KY |
4130 | fi |
4131 | ||
4132 | ||
4133 | # Check whether --with-jpeg was given. | |
4134 | if test "${with_jpeg+set}" = set; then : | |
4135 | withval=$with_jpeg; | |
4136 | else | |
ee77919d | 4137 | with_jpeg=$with_features |
067d23c9 KY |
4138 | fi |
4139 | ||
4140 | ||
4141 | # Check whether --with-tiff was given. | |
4142 | if test "${with_tiff+set}" = set; then : | |
4143 | withval=$with_tiff; | |
4144 | else | |
ee77919d | 4145 | with_tiff=$with_features |
067d23c9 KY |
4146 | fi |
4147 | ||
4148 | ||
4149 | # Check whether --with-gif was given. | |
4150 | if test "${with_gif+set}" = set; then : | |
4151 | withval=$with_gif; | |
4152 | else | |
ee77919d | 4153 | with_gif=$with_features |
067d23c9 KY |
4154 | fi |
4155 | ||
4156 | ||
4157 | # Check whether --with-png was given. | |
4158 | if test "${with_png+set}" = set; then : | |
4159 | withval=$with_png; | |
4160 | else | |
ee77919d | 4161 | with_png=$with_features |
067d23c9 KY |
4162 | fi |
4163 | ||
4164 | ||
4165 | # Check whether --with-rsvg was given. | |
4166 | if test "${with_rsvg+set}" = set; then : | |
4167 | withval=$with_rsvg; | |
4168 | else | |
ee77919d | 4169 | with_rsvg=$with_features |
067d23c9 KY |
4170 | fi |
4171 | ||
4172 | ||
4173 | # Check whether --with-xml2 was given. | |
4174 | if test "${with_xml2+set}" = set; then : | |
4175 | withval=$with_xml2; | |
4176 | else | |
ee77919d | 4177 | with_xml2=$with_features |
067d23c9 KY |
4178 | fi |
4179 | ||
4180 | ||
4181 | # Check whether --with-imagemagick was given. | |
4182 | if test "${with_imagemagick+set}" = set; then : | |
4183 | withval=$with_imagemagick; | |
4184 | else | |
ee77919d | 4185 | with_imagemagick=$with_features |
067d23c9 KY |
4186 | fi |
4187 | ||
4188 | ||
4189 | ||
4190 | # Check whether --with-xft was given. | |
4191 | if test "${with_xft+set}" = set; then : | |
4192 | withval=$with_xft; | |
4193 | else | |
ee77919d | 4194 | with_xft=$with_features |
067d23c9 KY |
4195 | fi |
4196 | ||
4197 | ||
4198 | # Check whether --with-libotf was given. | |
4199 | if test "${with_libotf+set}" = set; then : | |
4200 | withval=$with_libotf; | |
4201 | else | |
ee77919d | 4202 | with_libotf=$with_features |
067d23c9 KY |
4203 | fi |
4204 | ||
4205 | ||
4206 | # Check whether --with-m17n-flt was given. | |
4207 | if test "${with_m17n_flt+set}" = set; then : | |
4208 | withval=$with_m17n_flt; | |
4209 | else | |
ee77919d | 4210 | with_m17n_flt=$with_features |
067d23c9 KY |
4211 | fi |
4212 | ||
4213 | ||
4214 | ||
4215 | # Check whether --with-toolkit-scroll-bars was given. | |
4216 | if test "${with_toolkit_scroll_bars+set}" = set; then : | |
4217 | withval=$with_toolkit_scroll_bars; | |
4218 | else | |
ee77919d | 4219 | with_toolkit_scroll_bars=$with_features |
067d23c9 KY |
4220 | fi |
4221 | ||
4222 | ||
4223 | # Check whether --with-xaw3d was given. | |
4224 | if test "${with_xaw3d+set}" = set; then : | |
4225 | withval=$with_xaw3d; | |
4226 | else | |
ee77919d | 4227 | with_xaw3d=$with_features |
067d23c9 KY |
4228 | fi |
4229 | ||
4230 | ||
4231 | # Check whether --with-xim was given. | |
4232 | if test "${with_xim+set}" = set; then : | |
4233 | withval=$with_xim; | |
4234 | else | |
ee77919d | 4235 | with_xim=$with_features |
067d23c9 KY |
4236 | fi |
4237 | ||
4238 | ||
4239 | # Check whether --with-ns was given. | |
4240 | if test "${with_ns+set}" = set; then : | |
4241 | withval=$with_ns; | |
4242 | else | |
4243 | with_ns=no | |
4244 | fi | |
4245 | ||
4246 | ||
5c0255d9 GM |
4247 | # Check whether --with-w32 was given. |
4248 | if test "${with_w32+set}" = set; then : | |
4249 | withval=$with_w32; | |
4250 | else | |
4251 | with_w32=no | |
4252 | fi | |
4253 | ||
4254 | ||
067d23c9 KY |
4255 | |
4256 | # Check whether --with-gpm was given. | |
4257 | if test "${with_gpm+set}" = set; then : | |
4258 | withval=$with_gpm; | |
4259 | else | |
ee77919d | 4260 | with_gpm=$with_features |
067d23c9 KY |
4261 | fi |
4262 | ||
4263 | ||
4264 | # Check whether --with-dbus was given. | |
4265 | if test "${with_dbus+set}" = set; then : | |
4266 | withval=$with_dbus; | |
4267 | else | |
ee77919d | 4268 | with_dbus=$with_features |
067d23c9 KY |
4269 | fi |
4270 | ||
4271 | ||
4272 | # Check whether --with-gconf was given. | |
4273 | if test "${with_gconf+set}" = set; then : | |
4274 | withval=$with_gconf; | |
4275 | else | |
ee77919d | 4276 | with_gconf=$with_features |
067d23c9 KY |
4277 | fi |
4278 | ||
4279 | ||
f527bd02 GM |
4280 | # Check whether --with-gsettings was given. |
4281 | if test "${with_gsettings+set}" = set; then : | |
4282 | withval=$with_gsettings; | |
4283 | else | |
ee77919d | 4284 | with_gsettings=$with_features |
f527bd02 GM |
4285 | fi |
4286 | ||
4287 | ||
067d23c9 KY |
4288 | # Check whether --with-selinux was given. |
4289 | if test "${with_selinux+set}" = set; then : | |
4290 | withval=$with_selinux; | |
4291 | else | |
ee77919d | 4292 | with_selinux=$with_features |
067d23c9 KY |
4293 | fi |
4294 | ||
4295 | ||
4cc63c81 GM |
4296 | # Check whether --with-acl was given. |
4297 | if test "${with_acl+set}" = set; then : | |
4298 | withval=$with_acl; | |
4299 | else | |
4300 | with_acl=$with_features | |
4301 | fi | |
4302 | ||
4303 | ||
067d23c9 KY |
4304 | # Check whether --with-gnutls was given. |
4305 | if test "${with_gnutls+set}" = set; then : | |
4306 | withval=$with_gnutls; | |
4307 | else | |
ee77919d | 4308 | with_gnutls=$with_features |
067d23c9 KY |
4309 | fi |
4310 | ||
4311 | ||
b5eb356a GM |
4312 | # Check whether --with-inotify was given. |
4313 | if test "${with_inotify+set}" = set; then : | |
4314 | withval=$with_inotify; | |
4315 | else | |
4316 | with_inotify=$with_features | |
4317 | fi | |
4318 | ||
4319 | ||
067d23c9 KY |
4320 | ## For the times when you want to build Emacs but don't have |
4321 | ## a suitable makeinfo, and can live without the manuals. | |
4322 | ||
4323 | # Check whether --with-makeinfo was given. | |
4324 | if test "${with_makeinfo+set}" = set; then : | |
4325 | withval=$with_makeinfo; | |
4326 | else | |
ee77919d | 4327 | with_makeinfo=$with_features |
067d23c9 KY |
4328 | fi |
4329 | ||
4330 | ||
c3a461a5 GM |
4331 | ## Makefile.in needs the cache file name. |
4332 | ||
4333 | ||
067d23c9 KY |
4334 | ## This is an option because I do not know if all info/man support |
4335 | ## compressed files, nor how to test if they do so. | |
4336 | ||
4337 | # Check whether --with-compress-info was given. | |
4338 | if test "${with_compress_info+set}" = set; then : | |
4339 | withval=$with_compress_info; | |
4340 | else | |
ee77919d | 4341 | with_compress_info=$with_features |
067d23c9 KY |
4342 | fi |
4343 | ||
4344 | if test $with_compress_info = yes; then | |
4345 | GZIP_INFO=yes | |
4346 | else | |
4347 | GZIP_INFO= | |
4348 | fi | |
4349 | ||
4350 | ||
4351 | ||
4352 | # Check whether --with-pkg-config-prog was given. | |
4353 | if test "${with_pkg_config_prog+set}" = set; then : | |
4354 | withval=$with_pkg_config_prog; | |
4355 | fi | |
4356 | ||
4357 | if test "X${with_pkg_config_prog}" != X; then | |
4358 | if test "${with_pkg_config_prog}" != yes; then | |
4359 | PKG_CONFIG="${with_pkg_config_prog}" | |
4360 | fi | |
4361 | fi | |
4362 | ||
067d23c9 | 4363 | |
4fc5868a UM |
4364 | # Check whether --with-gameuser was given. |
4365 | if test "${with_gameuser+set}" = set; then : | |
4366 | withval=$with_gameuser; | |
4367 | fi | |
4368 | ||
4369 | test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ | |
4370 | && gameuser="${with_gameuser}" | |
4371 | test "X$gameuser" = X && gameuser=games | |
4372 | ||
4373 | ||
067d23c9 KY |
4374 | # Check whether --with-gnustep-conf was given. |
4375 | if test "${with_gnustep_conf+set}" = set; then : | |
4376 | withval=$with_gnustep_conf; | |
4377 | fi | |
4378 | ||
4379 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | |
4380 | GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" | |
4381 | test "X$GNUSTEP_CONFIG_FILE" = "X" && \ | |
4382 | GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf | |
4383 | ||
4384 | # Check whether --enable-ns-self-contained was given. | |
4385 | if test "${enable_ns_self_contained+set}" = set; then : | |
4386 | enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval | |
4387 | else | |
4388 | EN_NS_SELF_CONTAINED=yes | |
4389 | fi | |
4390 | ||
4391 | ||
067d23c9 KY |
4392 | # Check whether --enable-locallisppath was given. |
4393 | if test "${enable_locallisppath+set}" = set; then : | |
4394 | enableval=$enable_locallisppath; if test "${enableval}" = "no"; then | |
4395 | locallisppath= | |
4396 | elif test "${enableval}" != "yes"; then | |
4397 | locallisppath=${enableval} | |
4398 | fi | |
4399 | fi | |
4400 | ||
4401 | ||
4402 | # Check whether --enable-checking was given. | |
4403 | if test "${enable_checking+set}" = set; then : | |
4404 | enableval=$enable_checking; ac_checking_flags="${enableval}" | |
4405 | fi | |
4406 | ||
4407 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
4408 | for check in $ac_checking_flags | |
4409 | do | |
4410 | case $check in | |
4411 | # these set all the flags to specific states | |
4412 | yes) ac_enable_checking=1 ;; | |
4413 | no) ac_enable_checking= ; | |
4414 | ac_gc_check_stringbytes= ; | |
4415 | ac_gc_check_string_overrun= ; | |
4416 | ac_gc_check_string_free_list= ; | |
4417 | ac_xmalloc_overrun= ; | |
7ee3791f | 4418 | ac_gc_check_cons_list= ; |
e4d35030 | 4419 | ac_glyphs_debug= ;; |
067d23c9 KY |
4420 | all) ac_enable_checking=1 ; |
4421 | ac_gc_check_stringbytes=1 ; | |
4422 | ac_gc_check_string_overrun=1 ; | |
4423 | ac_gc_check_string_free_list=1 ; | |
4424 | ac_xmalloc_overrun=1 ; | |
7ee3791f | 4425 | ac_gc_check_cons_list=1 ; |
e4d35030 | 4426 | ac_glyphs_debug=1 ;; |
067d23c9 KY |
4427 | # these enable particular checks |
4428 | stringbytes) ac_gc_check_stringbytes=1 ;; | |
4429 | stringoverrun) ac_gc_check_string_overrun=1 ;; | |
4430 | stringfreelist) ac_gc_check_string_free_list=1 ;; | |
4431 | xmallocoverrun) ac_xmalloc_overrun=1 ;; | |
4432 | conslist) ac_gc_check_cons_list=1 ;; | |
e4d35030 | 4433 | glyphs) ac_glyphs_debug=1 ;; |
a9bec17c | 4434 | *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; |
067d23c9 KY |
4435 | esac |
4436 | done | |
4437 | IFS="$ac_save_IFS" | |
4438 | ||
4439 | if test x$ac_enable_checking != x ; then | |
4440 | ||
4441 | $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h | |
4442 | ||
4443 | fi | |
4444 | if test x$ac_gc_check_stringbytes != x ; then | |
4445 | ||
4446 | $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h | |
4447 | ||
4448 | fi | |
4fda9c95 | 4449 | if test x$ac_gc_check_string_overrun != x ; then |
067d23c9 KY |
4450 | |
4451 | $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h | |
4452 | ||
4453 | fi | |
4454 | if test x$ac_gc_check_string_free_list != x ; then | |
4455 | ||
4456 | $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h | |
4457 | ||
4458 | fi | |
4459 | if test x$ac_xmalloc_overrun != x ; then | |
4460 | ||
4461 | $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h | |
4462 | ||
4463 | fi | |
4464 | if test x$ac_gc_check_cons_list != x ; then | |
4465 | ||
4466 | $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h | |
4467 | ||
7ee3791f | 4468 | fi |
e4d35030 | 4469 | if test x$ac_glyphs_debug != x ; then |
7ee3791f GM |
4470 | |
4471 | $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h | |
4472 | ||
067d23c9 KY |
4473 | fi |
4474 | ||
afd07e01 GM |
4475 | # Check whether --enable-check-lisp-object-type was given. |
4476 | if test "${enable_check_lisp_object_type+set}" = set; then : | |
4477 | enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then | |
067d23c9 | 4478 | |
afd07e01 | 4479 | $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h |
067d23c9 KY |
4480 | |
4481 | fi | |
4482 | fi | |
4483 | ||
4484 | ||
4485 | ||
4486 | # Check whether --enable-profiling was given. | |
4487 | if test "${enable_profiling+set}" = set; then : | |
4488 | enableval=$enable_profiling; ac_enable_profiling="${enableval}" | |
4489 | fi | |
4490 | ||
4491 | if test x$ac_enable_profiling != x ; then | |
4492 | PROFILING_CFLAGS="-DPROFILING=1 -pg" | |
4493 | else | |
4494 | PROFILING_CFLAGS= | |
4495 | fi | |
4496 | ||
4497 | ||
4498 | # Check whether --enable-autodepend was given. | |
4499 | if test "${enable_autodepend+set}" = set; then : | |
4500 | enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" | |
4501 | else | |
4502 | ac_enable_autodepend=yes | |
4503 | fi | |
4504 | ||
4505 | ||
4efe5ef9 GM |
4506 | # Check whether --enable-gtk-deprecation-warnings was given. |
4507 | if test "${enable_gtk_deprecation_warnings+set}" = set; then : | |
4508 | enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}" | |
4509 | fi | |
4510 | ||
4511 | ||
067d23c9 | 4512 | #### Make srcdir absolute, if it isn't already. It's important to |
b5591ebb | 4513 | #### avoid running the file name through pwd unnecessarily, since pwd can |
067d23c9 KY |
4514 | #### give you automounter prefixes, which can go away. We do all this |
4515 | #### so Emacs can find its files when run uninstalled. | |
4516 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | |
4517 | unset CDPATH | |
4518 | case "${srcdir}" in | |
4519 | /* ) ;; | |
4520 | . ) | |
4521 | ## We may be able to use the $PWD environment variable to make this | |
4522 | ## absolute. But sometimes PWD is inaccurate. | |
b5591ebb | 4523 | ## Note: we used to use $PWD at the end instead of `pwd`, |
067d23c9 KY |
4524 | ## but that tested only for a well-formed and valid PWD, |
4525 | ## it did not object when PWD was well-formed and valid but just wrong. | |
b5591ebb | 4526 | if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ; |
067d23c9 KY |
4527 | then |
4528 | srcdir="$PWD" | |
4529 | else | |
b5591ebb | 4530 | srcdir=`(cd "$srcdir"; pwd)` |
067d23c9 KY |
4531 | fi |
4532 | ;; | |
b5591ebb | 4533 | * ) srcdir=`(cd "$srcdir"; pwd)` ;; |
067d23c9 KY |
4534 | esac |
4535 | ||
067d23c9 KY |
4536 | ### Canonicalize the configuration name. |
4537 | ||
067d23c9 KY |
4538 | # Make sure we can run config.sub. |
4539 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
a9bec17c | 4540 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
067d23c9 KY |
4541 | |
4542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4543 | $as_echo_n "checking build system type... " >&6; } | |
a9bec17c | 4544 | if test "${ac_cv_build+set}" = set; then : |
067d23c9 KY |
4545 | $as_echo_n "(cached) " >&6 |
4546 | else | |
4547 | ac_build_alias=$build_alias | |
4548 | test "x$ac_build_alias" = x && | |
4549 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4550 | test "x$ac_build_alias" = x && | |
a9bec17c | 4551 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 |
067d23c9 | 4552 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
a9bec17c | 4553 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
067d23c9 KY |
4554 | |
4555 | fi | |
4556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4557 | $as_echo "$ac_cv_build" >&6; } | |
4558 | case $ac_cv_build in | |
4559 | *-*-*) ;; | |
a9bec17c | 4560 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; |
067d23c9 KY |
4561 | esac |
4562 | build=$ac_cv_build | |
4563 | ac_save_IFS=$IFS; IFS='-' | |
4564 | set x $ac_cv_build | |
4565 | shift | |
4566 | build_cpu=$1 | |
4567 | build_vendor=$2 | |
4568 | shift; shift | |
4569 | # Remember, the first character of IFS is used to create $*, | |
4570 | # except with old shells: | |
4571 | build_os=$* | |
4572 | IFS=$ac_save_IFS | |
4573 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4574 | ||
4575 | ||
4576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4577 | $as_echo_n "checking host system type... " >&6; } | |
a9bec17c | 4578 | if test "${ac_cv_host+set}" = set; then : |
067d23c9 KY |
4579 | $as_echo_n "(cached) " >&6 |
4580 | else | |
4581 | if test "x$host_alias" = x; then | |
4582 | ac_cv_host=$ac_cv_build | |
4583 | else | |
4584 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
a9bec17c | 4585 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
067d23c9 KY |
4586 | fi |
4587 | ||
4588 | fi | |
4589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4590 | $as_echo "$ac_cv_host" >&6; } | |
4591 | case $ac_cv_host in | |
4592 | *-*-*) ;; | |
a9bec17c | 4593 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; |
067d23c9 KY |
4594 | esac |
4595 | host=$ac_cv_host | |
4596 | ac_save_IFS=$IFS; IFS='-' | |
4597 | set x $ac_cv_host | |
4598 | shift | |
4599 | host_cpu=$1 | |
4600 | host_vendor=$2 | |
4601 | shift; shift | |
4602 | # Remember, the first character of IFS is used to create $*, | |
4603 | # except with old shells: | |
4604 | host_os=$* | |
4605 | IFS=$ac_save_IFS | |
4606 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4607 | ||
4608 | ||
4609 | canonical=$host | |
4610 | configuration=${host_alias-${build_alias-$host}} | |
4611 | ||
4612 | ||
4613 | ||
4614 | ### If you add support for a new configuration, add code to this | |
4615 | ### switch statement to recognize your configuration name and select | |
42bbbe8b | 4616 | ### the appropriate operating system file. |
067d23c9 | 4617 | |
42bbbe8b | 4618 | ### You would hope that you could choose an s/*.h |
067d23c9 | 4619 | ### file based on the operating system portion. However, it turns out |
42bbbe8b | 4620 | ### that each s/*.h file is pretty manufacturer-specific. |
067d23c9 KY |
4621 | ### So we basically have to have a special case for each |
4622 | ### configuration name. | |
4623 | ### | |
4624 | ### As far as handling version numbers on operating systems is | |
4625 | ### concerned, make sure things will fail in a fixable way. If | |
4626 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
4627 | ### prepared to handle anything reasonably. If version numbers | |
4628 | ### matter, be sure /etc/MACHINES says something about it. | |
4629 | ||
42bbbe8b | 4630 | opsys='' unported=no |
067d23c9 KY |
4631 | case "${canonical}" in |
4632 | ||
9b6e5515 GM |
4633 | ## GNU/Linux and similar ports |
4634 | *-*-linux* ) | |
d6a003a8 | 4635 | opsys=gnu-linux |
d6a003a8 AS |
4636 | ;; |
4637 | ||
067d23c9 KY |
4638 | ## FreeBSD ports |
4639 | *-*-freebsd* ) | |
4640 | opsys=freebsd | |
067d23c9 KY |
4641 | ;; |
4642 | ||
87e1a811 GM |
4643 | ## DragonFly ports |
4644 | *-*-dragonfly* ) | |
4645 | opsys=dragonfly | |
4646 | ;; | |
4647 | ||
067d23c9 KY |
4648 | ## FreeBSD kernel + glibc based userland |
4649 | *-*-kfreebsd*gnu* ) | |
4650 | opsys=gnu-kfreebsd | |
067d23c9 KY |
4651 | ;; |
4652 | ||
4653 | ## NetBSD ports | |
4654 | *-*-netbsd* ) | |
4655 | opsys=netbsd | |
067d23c9 KY |
4656 | ;; |
4657 | ||
4658 | ## OpenBSD ports | |
4659 | *-*-openbsd* ) | |
4660 | opsys=openbsd | |
067d23c9 KY |
4661 | ;; |
4662 | ||
067d23c9 KY |
4663 | ## Apple Darwin / Mac OS X |
4664 | *-apple-darwin* ) | |
4665 | case "${canonical}" in | |
42bbbe8b GM |
4666 | i[3456]86-* ) ;; |
4667 | powerpc-* ) ;; | |
4668 | x86_64-* ) ;; | |
067d23c9 KY |
4669 | * ) unported=yes ;; |
4670 | esac | |
4671 | opsys=darwin | |
adf4198e GM |
4672 | ## Use fink packages if available. |
4673 | ## FIXME find a better way to do this: http://debbugs.gnu.org/11507 | |
4674 | ## if test -d /sw/include && test -d /sw/lib; then | |
4675 | ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
4676 | ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
4677 | ## fi | |
067d23c9 KY |
4678 | ;; |
4679 | ||
8c35e3c3 GM |
4680 | ## Cygwin ports |
4681 | *-*-cygwin ) | |
4682 | opsys=cygwin | |
4683 | ;; | |
4684 | ||
067d23c9 KY |
4685 | ## HP 9000 series 700 and 800, running HP/UX |
4686 | hppa*-hp-hpux10.2* ) | |
d6a003a8 | 4687 | opsys=hpux10-20 |
067d23c9 KY |
4688 | ;; |
4689 | hppa*-hp-hpux1[1-9]* ) | |
d6a003a8 | 4690 | opsys=hpux11 |
067d23c9 KY |
4691 | CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" |
4692 | ;; | |
4693 | ||
067d23c9 | 4694 | ## IBM machines |
067d23c9 | 4695 | rs6000-ibm-aix4.[23]* ) |
42bbbe8b | 4696 | opsys=aix4-2 |
067d23c9 KY |
4697 | ;; |
4698 | powerpc-ibm-aix4.[23]* ) | |
42bbbe8b | 4699 | opsys=aix4-2 |
067d23c9 KY |
4700 | ;; |
4701 | rs6000-ibm-aix[56]* ) | |
42bbbe8b | 4702 | opsys=aix4-2 |
067d23c9 KY |
4703 | ;; |
4704 | powerpc-ibm-aix[56]* ) | |
42bbbe8b | 4705 | opsys=aix4-2 |
067d23c9 KY |
4706 | ;; |
4707 | ||
067d23c9 KY |
4708 | ## Silicon Graphics machines |
4709 | ## Iris 4D | |
4710 | mips-sgi-irix6.5 ) | |
fd44db7f | 4711 | opsys=irix6-5 |
067d23c9 KY |
4712 | # Without defining _LANGUAGE_C, things get masked out in the headers |
4713 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
4714 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
067d23c9 KY |
4715 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" |
4716 | ;; | |
4717 | ||
4718 | ## Suns | |
067d23c9 KY |
4719 | *-sun-solaris* \ |
4720 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | |
4721 | | x86_64-*-solaris2* | x86_64-*-sunos5*) | |
4722 | case "${canonical}" in | |
42bbbe8b GM |
4723 | i[3456]86-*-* ) ;; |
4724 | amd64-*-*|x86_64-*-*) ;; | |
4725 | sparc* ) ;; | |
067d23c9 KY |
4726 | * ) unported=yes ;; |
4727 | esac | |
4728 | case "${canonical}" in | |
4729 | *-sunos5.6* | *-solaris2.6* ) | |
4730 | opsys=sol2-6 | |
067d23c9 KY |
4731 | RANLIB="ar -ts" |
4732 | ;; | |
4733 | *-sunos5.[7-9]* | *-solaris2.[7-9]* ) | |
4734 | opsys=sol2-6 | |
4735 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4736 | ;; |
4737 | *-sunos5* | *-solaris* ) | |
4738 | opsys=sol2-10 | |
4739 | emacs_check_sunpro_c=yes | |
067d23c9 KY |
4740 | ;; |
4741 | esac | |
4742 | ## Watch out for a compiler that we know will not work. | |
4743 | case "${canonical}" in | |
4744 | *-solaris* | *-sunos5* ) | |
4745 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
4746 | ## /usr/ucb/cc doesn't work; | |
4747 | ## we should find some other compiler that does work. | |
4748 | unset CC | |
4749 | fi | |
4750 | ;; | |
4751 | *) ;; | |
4752 | esac | |
4753 | ;; | |
4754 | ||
067d23c9 KY |
4755 | ## Intel 386 machines where we don't care about the manufacturer. |
4756 | i[3456]86-*-* ) | |
067d23c9 | 4757 | case "${canonical}" in |
5ec54608 GM |
4758 | *-darwin* ) opsys=darwin ;; |
4759 | *-sysv4.2uw* ) opsys=unixware ;; | |
4760 | *-sysv5uw* ) opsys=unixware ;; | |
4761 | *-sysv5OpenUNIX* ) opsys=unixware ;; | |
067d23c9 KY |
4762 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
4763 | esac | |
4764 | ;; | |
4765 | ||
067d23c9 KY |
4766 | * ) |
4767 | unported=yes | |
4768 | ;; | |
4769 | esac | |
4770 | ||
4771 | ### If the code above didn't choose an operating system, just choose | |
4772 | ### an operating system based on the configuration name. You really | |
4773 | ### only want to use this when you have no idea what the right | |
4774 | ### operating system is; if you know what operating systems a machine | |
4775 | ### runs, it's cleaner to make it explicit in the case statement | |
4776 | ### above. | |
4777 | if test x"${opsys}" = x; then | |
4778 | case "${canonical}" in | |
4779 | *-gnu* ) opsys=gnu ;; | |
4780 | * ) | |
4781 | unported=yes | |
4782 | ;; | |
4783 | esac | |
4784 | fi | |
4785 | ||
4786 | ||
4787 | ||
4788 | if test $unported = yes; then | |
a9bec17c | 4789 | as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. |
067d23c9 KY |
4790 | Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 |
4791 | fi | |
4792 | ||
067d23c9 KY |
4793 | |
4794 | #### Choose a compiler. | |
067d23c9 KY |
4795 | |
4796 | ac_ext=c | |
4797 | ac_cpp='$CPP $CPPFLAGS' | |
4798 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4799 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4800 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4801 | if test -n "$ac_tool_prefix"; then | |
4802 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
4803 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
4804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4805 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4806 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4807 | $as_echo_n "(cached) " >&6 |
4808 | else | |
4809 | if test -n "$CC"; then | |
4810 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4811 | else | |
4812 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4813 | for as_dir in $PATH | |
4814 | do | |
4815 | IFS=$as_save_IFS | |
4816 | test -z "$as_dir" && as_dir=. | |
4817 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4818 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4819 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
4820 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4821 | break 2 | |
4822 | fi | |
4823 | done | |
4824 | done | |
4825 | IFS=$as_save_IFS | |
4826 | ||
4827 | fi | |
4828 | fi | |
4829 | CC=$ac_cv_prog_CC | |
4830 | if test -n "$CC"; then | |
4831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4832 | $as_echo "$CC" >&6; } | |
4833 | else | |
4834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4835 | $as_echo "no" >&6; } | |
4836 | fi | |
4837 | ||
4838 | ||
4839 | fi | |
4840 | if test -z "$ac_cv_prog_CC"; then | |
4841 | ac_ct_CC=$CC | |
4842 | # Extract the first word of "gcc", so it can be a program name with args. | |
4843 | set dummy gcc; ac_word=$2 | |
4844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4845 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4846 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
4847 | $as_echo_n "(cached) " >&6 |
4848 | else | |
4849 | if test -n "$ac_ct_CC"; then | |
4850 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4851 | else | |
4852 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4853 | for as_dir in $PATH | |
4854 | do | |
4855 | IFS=$as_save_IFS | |
4856 | test -z "$as_dir" && as_dir=. | |
4857 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4858 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4859 | ac_cv_prog_ac_ct_CC="gcc" | |
4860 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4861 | break 2 | |
4862 | fi | |
4863 | done | |
4864 | done | |
4865 | IFS=$as_save_IFS | |
4866 | ||
4867 | fi | |
4868 | fi | |
4869 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4870 | if test -n "$ac_ct_CC"; then | |
4871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4872 | $as_echo "$ac_ct_CC" >&6; } | |
4873 | else | |
4874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4875 | $as_echo "no" >&6; } | |
4876 | fi | |
4877 | ||
4878 | if test "x$ac_ct_CC" = x; then | |
4879 | CC="" | |
4880 | else | |
4881 | case $cross_compiling:$ac_tool_warned in | |
4882 | yes:) | |
4883 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4884 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4885 | ac_tool_warned=yes ;; | |
4886 | esac | |
4887 | CC=$ac_ct_CC | |
4888 | fi | |
4889 | else | |
4890 | CC="$ac_cv_prog_CC" | |
4891 | fi | |
4892 | ||
4893 | if test -z "$CC"; then | |
4894 | if test -n "$ac_tool_prefix"; then | |
4895 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4896 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4898 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4899 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4900 | $as_echo_n "(cached) " >&6 |
4901 | else | |
4902 | if test -n "$CC"; then | |
4903 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4904 | else | |
4905 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4906 | for as_dir in $PATH | |
4907 | do | |
4908 | IFS=$as_save_IFS | |
4909 | test -z "$as_dir" && as_dir=. | |
4910 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4911 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4912 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4913 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4914 | break 2 | |
4915 | fi | |
4916 | done | |
4917 | done | |
4918 | IFS=$as_save_IFS | |
4919 | ||
4920 | fi | |
4921 | fi | |
4922 | CC=$ac_cv_prog_CC | |
4923 | if test -n "$CC"; then | |
4924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4925 | $as_echo "$CC" >&6; } | |
4926 | else | |
4927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4928 | $as_echo "no" >&6; } | |
4929 | fi | |
4930 | ||
4931 | ||
4932 | fi | |
4933 | fi | |
4934 | if test -z "$CC"; then | |
4935 | # Extract the first word of "cc", so it can be a program name with args. | |
4936 | set dummy cc; ac_word=$2 | |
4937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4938 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4939 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4940 | $as_echo_n "(cached) " >&6 |
4941 | else | |
4942 | if test -n "$CC"; then | |
4943 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4944 | else | |
4945 | ac_prog_rejected=no | |
4946 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4947 | for as_dir in $PATH | |
4948 | do | |
4949 | IFS=$as_save_IFS | |
4950 | test -z "$as_dir" && as_dir=. | |
4951 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4952 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4953 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4954 | ac_prog_rejected=yes | |
4955 | continue | |
4956 | fi | |
4957 | ac_cv_prog_CC="cc" | |
4958 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4959 | break 2 | |
4960 | fi | |
4961 | done | |
4962 | done | |
4963 | IFS=$as_save_IFS | |
4964 | ||
4965 | if test $ac_prog_rejected = yes; then | |
4966 | # We found a bogon in the path, so make sure we never use it. | |
4967 | set dummy $ac_cv_prog_CC | |
4968 | shift | |
4969 | if test $# != 0; then | |
4970 | # We chose a different compiler from the bogus one. | |
4971 | # However, it has the same basename, so the bogon will be chosen | |
4972 | # first if we set CC to just the basename; use the full file name. | |
4973 | shift | |
4974 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4975 | fi | |
4976 | fi | |
4977 | fi | |
4978 | fi | |
4979 | CC=$ac_cv_prog_CC | |
4980 | if test -n "$CC"; then | |
4981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4982 | $as_echo "$CC" >&6; } | |
4983 | else | |
4984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4985 | $as_echo "no" >&6; } | |
4986 | fi | |
4987 | ||
4988 | ||
4989 | fi | |
4990 | if test -z "$CC"; then | |
4991 | if test -n "$ac_tool_prefix"; then | |
4992 | for ac_prog in cl.exe | |
4993 | do | |
4994 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4995 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4997 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 4998 | if test "${ac_cv_prog_CC+set}" = set; then : |
067d23c9 KY |
4999 | $as_echo_n "(cached) " >&6 |
5000 | else | |
5001 | if test -n "$CC"; then | |
5002 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
5003 | else | |
5004 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5005 | for as_dir in $PATH | |
5006 | do | |
5007 | IFS=$as_save_IFS | |
5008 | test -z "$as_dir" && as_dir=. | |
5009 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5010 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5011 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
5012 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5013 | break 2 | |
5014 | fi | |
5015 | done | |
5016 | done | |
5017 | IFS=$as_save_IFS | |
5018 | ||
5019 | fi | |
5020 | fi | |
5021 | CC=$ac_cv_prog_CC | |
5022 | if test -n "$CC"; then | |
5023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
5024 | $as_echo "$CC" >&6; } | |
5025 | else | |
5026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5027 | $as_echo "no" >&6; } | |
5028 | fi | |
5029 | ||
5030 | ||
5031 | test -n "$CC" && break | |
5032 | done | |
5033 | fi | |
5034 | if test -z "$CC"; then | |
5035 | ac_ct_CC=$CC | |
5036 | for ac_prog in cl.exe | |
5037 | do | |
5038 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5039 | set dummy $ac_prog; ac_word=$2 | |
5040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5041 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 5042 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : |
067d23c9 KY |
5043 | $as_echo_n "(cached) " >&6 |
5044 | else | |
5045 | if test -n "$ac_ct_CC"; then | |
5046 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
5047 | else | |
5048 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5049 | for as_dir in $PATH | |
5050 | do | |
5051 | IFS=$as_save_IFS | |
5052 | test -z "$as_dir" && as_dir=. | |
5053 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5054 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
5055 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
5056 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5057 | break 2 | |
5058 | fi | |
5059 | done | |
5060 | done | |
5061 | IFS=$as_save_IFS | |
5062 | ||
5063 | fi | |
5064 | fi | |
5065 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
5066 | if test -n "$ac_ct_CC"; then | |
5067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
5068 | $as_echo "$ac_ct_CC" >&6; } | |
5069 | else | |
5070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5071 | $as_echo "no" >&6; } | |
5072 | fi | |
5073 | ||
5074 | ||
5075 | test -n "$ac_ct_CC" && break | |
5076 | done | |
5077 | ||
5078 | if test "x$ac_ct_CC" = x; then | |
5079 | CC="" | |
5080 | else | |
5081 | case $cross_compiling:$ac_tool_warned in | |
5082 | yes:) | |
5083 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5084 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5085 | ac_tool_warned=yes ;; | |
5086 | esac | |
5087 | CC=$ac_ct_CC | |
5088 | fi | |
5089 | fi | |
5090 | ||
5091 | fi | |
5092 | ||
5093 | ||
5094 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5095 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5096 | as_fn_error "no acceptable C compiler found in \$PATH |
5097 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5098 | |
5099 | # Provide some information about the compiler. | |
5100 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
5101 | set X $ac_compile | |
5102 | ac_compiler=$2 | |
5103 | for ac_option in --version -v -V -qversion; do | |
5104 | { { ac_try="$ac_compiler $ac_option >&5" | |
5105 | case "(($ac_try" in | |
5106 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5107 | *) ac_try_echo=$ac_try;; | |
5108 | esac | |
5109 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5110 | $as_echo "$ac_try_echo"; } >&5 | |
5111 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
5112 | ac_status=$? | |
5113 | if test -s conftest.err; then | |
5114 | sed '10a\ | |
5115 | ... rest of stderr output deleted ... | |
5116 | 10q' conftest.err >conftest.er1 | |
5117 | cat conftest.er1 >&5 | |
5118 | fi | |
5119 | rm -f conftest.er1 conftest.err | |
5120 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5121 | test $ac_status = 0; } | |
5122 | done | |
5123 | ||
5124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5125 | /* end confdefs.h. */ | |
5126 | ||
5127 | int | |
5128 | main () | |
5129 | { | |
5130 | ||
5131 | ; | |
5132 | return 0; | |
5133 | } | |
5134 | _ACEOF | |
5135 | ac_clean_files_save=$ac_clean_files | |
5136 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
5137 | # Try to create an executable without -o first, disregard a.out. | |
5138 | # It will help us diagnose broken compilers, and finding out an intuition | |
5139 | # of exeext. | |
5140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
5141 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
5142 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
5143 | ||
5144 | # The possible output files: | |
5145 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
5146 | ||
5147 | ac_rmfiles= | |
5148 | for ac_file in $ac_files | |
5149 | do | |
5150 | case $ac_file in | |
5151 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5152 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
5153 | esac | |
5154 | done | |
5155 | rm -f $ac_rmfiles | |
5156 | ||
5157 | if { { ac_try="$ac_link_default" | |
5158 | case "(($ac_try" in | |
5159 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5160 | *) ac_try_echo=$ac_try;; | |
5161 | esac | |
5162 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5163 | $as_echo "$ac_try_echo"; } >&5 | |
5164 | (eval "$ac_link_default") 2>&5 | |
5165 | ac_status=$? | |
5166 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5167 | test $ac_status = 0; }; then : | |
5168 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
5169 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
5170 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
5171 | # so that the user can short-circuit this test for compilers unknown to | |
5172 | # Autoconf. | |
5173 | for ac_file in $ac_files '' | |
5174 | do | |
5175 | test -f "$ac_file" || continue | |
5176 | case $ac_file in | |
5177 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
5178 | ;; | |
5179 | [ab].out ) | |
5180 | # We found the default executable, but exeext='' is most | |
5181 | # certainly right. | |
5182 | break;; | |
5183 | *.* ) | |
5184 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
5185 | then :; else | |
5186 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5187 | fi | |
5188 | # We set ac_cv_exeext here because the later test for it is not | |
5189 | # safe: cross compilers may not add the suffix if given an `-o' | |
5190 | # argument, so we may need to know it at that point already. | |
5191 | # Even if this section looks crufty: it has the advantage of | |
5192 | # actually working. | |
5193 | break;; | |
5194 | * ) | |
5195 | break;; | |
5196 | esac | |
5197 | done | |
5198 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
5199 | ||
5200 | else | |
5201 | ac_file='' | |
5202 | fi | |
5203 | if test -z "$ac_file"; then : | |
5204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5205 | $as_echo "no" >&6; } | |
5206 | $as_echo "$as_me: failed program was:" >&5 | |
5207 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5208 | ||
5209 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5210 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5211 | { as_fn_set_status 77 |
5212 | as_fn_error "C compiler cannot create executables | |
5213 | See \`config.log' for more details." "$LINENO" 5; }; } | |
067d23c9 KY |
5214 | else |
5215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5216 | $as_echo "yes" >&6; } | |
5217 | fi | |
5218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
5219 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
5220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
5221 | $as_echo "$ac_file" >&6; } | |
5222 | ac_exeext=$ac_cv_exeext | |
5223 | ||
5224 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
5225 | ac_clean_files=$ac_clean_files_save | |
5226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
5227 | $as_echo_n "checking for suffix of executables... " >&6; } | |
5228 | if { { ac_try="$ac_link" | |
5229 | case "(($ac_try" in | |
5230 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5231 | *) ac_try_echo=$ac_try;; | |
5232 | esac | |
5233 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5234 | $as_echo "$ac_try_echo"; } >&5 | |
5235 | (eval "$ac_link") 2>&5 | |
5236 | ac_status=$? | |
5237 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5238 | test $ac_status = 0; }; then : | |
5239 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
5240 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
5241 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
5242 | # `rm'. | |
5243 | for ac_file in conftest.exe conftest conftest.*; do | |
5244 | test -f "$ac_file" || continue | |
5245 | case $ac_file in | |
5246 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
5247 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
5248 | break;; | |
5249 | * ) break;; | |
5250 | esac | |
5251 | done | |
5252 | else | |
5253 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5254 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5255 | as_fn_error "cannot compute suffix of executables: cannot compile and link |
5256 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5257 | fi |
5258 | rm -f conftest conftest$ac_cv_exeext | |
5259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
5260 | $as_echo "$ac_cv_exeext" >&6; } | |
5261 | ||
5262 | rm -f conftest.$ac_ext | |
5263 | EXEEXT=$ac_cv_exeext | |
5264 | ac_exeext=$EXEEXT | |
5265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5266 | /* end confdefs.h. */ | |
5267 | #include <stdio.h> | |
5268 | int | |
5269 | main () | |
5270 | { | |
5271 | FILE *f = fopen ("conftest.out", "w"); | |
5272 | return ferror (f) || fclose (f) != 0; | |
5273 | ||
5274 | ; | |
5275 | return 0; | |
5276 | } | |
5277 | _ACEOF | |
5278 | ac_clean_files="$ac_clean_files conftest.out" | |
5279 | # Check that the compiler produces executables we can run. If not, either | |
5280 | # the compiler is broken, or we cross compile. | |
5281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
5282 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
5283 | if test "$cross_compiling" != yes; then | |
5284 | { { ac_try="$ac_link" | |
5285 | case "(($ac_try" in | |
5286 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5287 | *) ac_try_echo=$ac_try;; | |
5288 | esac | |
5289 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5290 | $as_echo "$ac_try_echo"; } >&5 | |
5291 | (eval "$ac_link") 2>&5 | |
5292 | ac_status=$? | |
5293 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5294 | test $ac_status = 0; } | |
5295 | if { ac_try='./conftest$ac_cv_exeext' | |
5296 | { { case "(($ac_try" in | |
5297 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5298 | *) ac_try_echo=$ac_try;; | |
5299 | esac | |
5300 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5301 | $as_echo "$ac_try_echo"; } >&5 | |
5302 | (eval "$ac_try") 2>&5 | |
5303 | ac_status=$? | |
5304 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5305 | test $ac_status = 0; }; }; then | |
5306 | cross_compiling=no | |
5307 | else | |
5308 | if test "$cross_compiling" = maybe; then | |
5309 | cross_compiling=yes | |
5310 | else | |
5311 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5312 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c | 5313 | as_fn_error "cannot run C compiled programs. |
067d23c9 | 5314 | If you meant to cross compile, use \`--host'. |
a9bec17c | 5315 | See \`config.log' for more details." "$LINENO" 5; } |
067d23c9 KY |
5316 | fi |
5317 | fi | |
5318 | fi | |
5319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
5320 | $as_echo "$cross_compiling" >&6; } | |
5321 | ||
5322 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
5323 | ac_clean_files=$ac_clean_files_save | |
5324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
5325 | $as_echo_n "checking for suffix of object files... " >&6; } | |
a9bec17c | 5326 | if test "${ac_cv_objext+set}" = set; then : |
067d23c9 KY |
5327 | $as_echo_n "(cached) " >&6 |
5328 | else | |
5329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5330 | /* end confdefs.h. */ | |
5331 | ||
5332 | int | |
5333 | main () | |
5334 | { | |
5335 | ||
5336 | ; | |
5337 | return 0; | |
5338 | } | |
5339 | _ACEOF | |
5340 | rm -f conftest.o conftest.obj | |
5341 | if { { ac_try="$ac_compile" | |
5342 | case "(($ac_try" in | |
5343 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5344 | *) ac_try_echo=$ac_try;; | |
5345 | esac | |
5346 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5347 | $as_echo "$ac_try_echo"; } >&5 | |
5348 | (eval "$ac_compile") 2>&5 | |
5349 | ac_status=$? | |
5350 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5351 | test $ac_status = 0; }; then : | |
5352 | for ac_file in conftest.o conftest.obj conftest.*; do | |
5353 | test -f "$ac_file" || continue; | |
5354 | case $ac_file in | |
5355 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
5356 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
5357 | break;; | |
5358 | esac | |
5359 | done | |
5360 | else | |
5361 | $as_echo "$as_me: failed program was:" >&5 | |
5362 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5363 | ||
5364 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5365 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
5366 | as_fn_error "cannot compute suffix of object files: cannot compile |
5367 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
5368 | fi |
5369 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
5370 | fi | |
5371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
5372 | $as_echo "$ac_cv_objext" >&6; } | |
5373 | OBJEXT=$ac_cv_objext | |
5374 | ac_objext=$OBJEXT | |
5375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
5376 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
a9bec17c | 5377 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : |
067d23c9 KY |
5378 | $as_echo_n "(cached) " >&6 |
5379 | else | |
5380 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5381 | /* end confdefs.h. */ | |
5382 | ||
5383 | int | |
5384 | main () | |
5385 | { | |
5386 | #ifndef __GNUC__ | |
5387 | choke me | |
5388 | #endif | |
5389 | ||
5390 | ; | |
5391 | return 0; | |
5392 | } | |
5393 | _ACEOF | |
5394 | if ac_fn_c_try_compile "$LINENO"; then : | |
5395 | ac_compiler_gnu=yes | |
5396 | else | |
5397 | ac_compiler_gnu=no | |
5398 | fi | |
5399 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5400 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
5401 | ||
5402 | fi | |
5403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
5404 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
5405 | if test $ac_compiler_gnu = yes; then | |
5406 | GCC=yes | |
5407 | else | |
5408 | GCC= | |
5409 | fi | |
5410 | ac_test_CFLAGS=${CFLAGS+set} | |
5411 | ac_save_CFLAGS=$CFLAGS | |
5412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
5413 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
a9bec17c | 5414 | if test "${ac_cv_prog_cc_g+set}" = set; then : |
067d23c9 KY |
5415 | $as_echo_n "(cached) " >&6 |
5416 | else | |
5417 | ac_save_c_werror_flag=$ac_c_werror_flag | |
5418 | ac_c_werror_flag=yes | |
5419 | ac_cv_prog_cc_g=no | |
5420 | CFLAGS="-g" | |
5421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5422 | /* end confdefs.h. */ | |
5423 | ||
5424 | int | |
5425 | main () | |
5426 | { | |
5427 | ||
5428 | ; | |
5429 | return 0; | |
5430 | } | |
5431 | _ACEOF | |
5432 | if ac_fn_c_try_compile "$LINENO"; then : | |
5433 | ac_cv_prog_cc_g=yes | |
5434 | else | |
5435 | CFLAGS="" | |
5436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5437 | /* end confdefs.h. */ | |
5438 | ||
5439 | int | |
5440 | main () | |
5441 | { | |
5442 | ||
5443 | ; | |
5444 | return 0; | |
5445 | } | |
5446 | _ACEOF | |
5447 | if ac_fn_c_try_compile "$LINENO"; then : | |
5448 | ||
5449 | else | |
5450 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5451 | CFLAGS="-g" | |
5452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5453 | /* end confdefs.h. */ | |
5454 | ||
5455 | int | |
5456 | main () | |
5457 | { | |
5458 | ||
5459 | ; | |
5460 | return 0; | |
5461 | } | |
5462 | _ACEOF | |
5463 | if ac_fn_c_try_compile "$LINENO"; then : | |
5464 | ac_cv_prog_cc_g=yes | |
5465 | fi | |
5466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5467 | fi | |
5468 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5469 | fi | |
5470 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5471 | ac_c_werror_flag=$ac_save_c_werror_flag | |
5472 | fi | |
5473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
5474 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
5475 | if test "$ac_test_CFLAGS" = set; then | |
5476 | CFLAGS=$ac_save_CFLAGS | |
5477 | elif test $ac_cv_prog_cc_g = yes; then | |
5478 | if test "$GCC" = yes; then | |
5479 | CFLAGS="-g -O2" | |
5480 | else | |
5481 | CFLAGS="-g" | |
5482 | fi | |
5483 | else | |
5484 | if test "$GCC" = yes; then | |
5485 | CFLAGS="-O2" | |
5486 | else | |
5487 | CFLAGS= | |
5488 | fi | |
5489 | fi | |
5490 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
5491 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 5492 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
067d23c9 KY |
5493 | $as_echo_n "(cached) " >&6 |
5494 | else | |
5495 | ac_cv_prog_cc_c89=no | |
5496 | ac_save_CC=$CC | |
5497 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5498 | /* end confdefs.h. */ | |
5499 | #include <stdarg.h> | |
5500 | #include <stdio.h> | |
5501 | #include <sys/types.h> | |
5502 | #include <sys/stat.h> | |
5503 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5504 | struct buf { int x; }; | |
5505 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5506 | static char *e (p, i) | |
5507 | char **p; | |
5508 | int i; | |
5509 | { | |
5510 | return p[i]; | |
5511 | } | |
5512 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5513 | { | |
5514 | char *s; | |
5515 | va_list v; | |
5516 | va_start (v,p); | |
5517 | s = g (p, va_arg (v,int)); | |
5518 | va_end (v); | |
5519 | return s; | |
5520 | } | |
5521 | ||
5522 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
5523 | function prototypes and stuff, but not '\xHH' hex character constants. | |
5524 | These don't provoke an error unfortunately, instead are silently treated | |
5525 | as 'x'. The following induces an error, until -std is added to get | |
5526 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
5527 | array size at least. It's necessary to write '\x00'==0 to get something | |
5528 | that's true only with -std. */ | |
5529 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
5530 | ||
5531 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
5532 | inside strings and character constants. */ | |
5533 | #define FOO(x) 'x' | |
5534 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
5535 | ||
5536 | int test (int i, double x); | |
5537 | struct s1 {int (*f) (int a);}; | |
5538 | struct s2 {int (*f) (double a);}; | |
5539 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5540 | int argc; | |
5541 | char **argv; | |
5542 | int | |
5543 | main () | |
5544 | { | |
5545 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5546 | ; | |
5547 | return 0; | |
5548 | } | |
5549 | _ACEOF | |
5550 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
5551 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5552 | do | |
5553 | CC="$ac_save_CC $ac_arg" | |
5554 | if ac_fn_c_try_compile "$LINENO"; then : | |
5555 | ac_cv_prog_cc_c89=$ac_arg | |
5556 | fi | |
5557 | rm -f core conftest.err conftest.$ac_objext | |
5558 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
5559 | done | |
743c80a7 PE |
5560 | rm -f conftest.$ac_ext |
5561 | CC=$ac_save_CC | |
5562 | ||
5563 | fi | |
5564 | # AC_CACHE_VAL | |
5565 | case "x$ac_cv_prog_cc_c89" in | |
5566 | x) | |
5567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5568 | $as_echo "none needed" >&6; } ;; | |
5569 | xno) | |
5570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5571 | $as_echo "unsupported" >&6; } ;; | |
5572 | *) | |
5573 | CC="$CC $ac_cv_prog_cc_c89" | |
5574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
5575 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
5576 | esac | |
5577 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
5578 | ||
5579 | fi | |
5580 | ||
5581 | ac_ext=c | |
5582 | ac_cpp='$CPP $CPPFLAGS' | |
5583 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5584 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5585 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5586 | DEPDIR="${am__leading_dot}deps" | |
5587 | ||
5588 | ac_config_commands="$ac_config_commands depfiles" | |
5589 | ||
5590 | ||
5591 | am_make=${MAKE-make} | |
5592 | cat > confinc << 'END' | |
5593 | am__doit: | |
5594 | @echo this is the am__doit target | |
5595 | .PHONY: am__doit | |
5596 | END | |
5597 | # If we don't find an include directive, just comment out the code. | |
5598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
5599 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
5600 | am__include="#" | |
5601 | am__quote= | |
5602 | _am_result=none | |
5603 | # First try GNU make style include. | |
5604 | echo "include confinc" > confmf | |
5605 | # Ignore all kinds of additional output from `make'. | |
5606 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5607 | *the\ am__doit\ target*) | |
5608 | am__include=include | |
5609 | am__quote= | |
5610 | _am_result=GNU | |
5611 | ;; | |
5612 | esac | |
5613 | # Now try BSD make style include. | |
5614 | if test "$am__include" = "#"; then | |
5615 | echo '.include "confinc"' > confmf | |
5616 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
5617 | *the\ am__doit\ target*) | |
5618 | am__include=.include | |
5619 | am__quote="\"" | |
5620 | _am_result=BSD | |
5621 | ;; | |
5622 | esac | |
5623 | fi | |
5624 | ||
5625 | ||
5626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
5627 | $as_echo "$_am_result" >&6; } | |
5628 | rm -f confinc confmf | |
5629 | ||
5630 | # Check whether --enable-dependency-tracking was given. | |
5631 | if test "${enable_dependency_tracking+set}" = set; then : | |
5632 | enableval=$enable_dependency_tracking; | |
5633 | fi | |
5634 | ||
5635 | if test "x$enable_dependency_tracking" != xno; then | |
5636 | am_depcomp="$ac_aux_dir/depcomp" | |
5637 | AMDEPBACKSLASH='\' | |
5638 | fi | |
5639 | if test "x$enable_dependency_tracking" != xno; then | |
5640 | AMDEP_TRUE= | |
5641 | AMDEP_FALSE='#' | |
5642 | else | |
5643 | AMDEP_TRUE='#' | |
5644 | AMDEP_FALSE= | |
5645 | fi | |
5646 | ||
5647 | ||
5648 | ||
5649 | depcc="$CC" am_compiler_list= | |
5650 | ||
5651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
5652 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
a9bec17c | 5653 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : |
743c80a7 PE |
5654 | $as_echo_n "(cached) " >&6 |
5655 | else | |
5656 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
5657 | # We make a subdir and do the tests there. Otherwise we can end up | |
5658 | # making bogus files that we don't know about and never remove. For | |
5659 | # instance it was reported that on HP-UX the gcc test will end up | |
5660 | # making a dummy file named `D' -- because `-MD' means `put the output | |
5661 | # in D'. | |
5662 | mkdir conftest.dir | |
5663 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
5664 | # using a relative directory. | |
5665 | cp "$am_depcomp" conftest.dir | |
5666 | cd conftest.dir | |
5667 | # We will build objects and dependencies in a subdirectory because | |
5668 | # it helps to detect inapplicable dependency modes. For instance | |
5669 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
5670 | # side effect of compilation, but ICC will put the dependencies in | |
5671 | # the current directory while Tru64 will put them in the object | |
5672 | # directory. | |
5673 | mkdir sub | |
5674 | ||
5675 | am_cv_CC_dependencies_compiler_type=none | |
5676 | if test "$am_compiler_list" = ""; then | |
5677 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
5678 | fi | |
5679 | am__universal=false | |
5680 | case " $depcc " in #( | |
5681 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
5682 | esac | |
5683 | ||
5684 | for depmode in $am_compiler_list; do | |
5685 | # Setup a source with many dependencies, because some compilers | |
5686 | # like to wrap large dependency lists on column 80 (with \), and | |
5687 | # we should not choose a depcomp mode which is confused by this. | |
5688 | # | |
5689 | # We need to recreate these files for each test, as the compiler may | |
5690 | # overwrite some of them when testing with obscure command lines. | |
5691 | # This happens at least with the AIX C compiler. | |
5692 | : > sub/conftest.c | |
5693 | for i in 1 2 3 4 5 6; do | |
5694 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
5695 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
5696 | # Solaris 8's {/usr,}/bin/sh. | |
5697 | touch sub/conftst$i.h | |
5698 | done | |
5699 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5700 | ||
5701 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
5702 | # mode. It turns out that the SunPro C++ compiler does not properly | |
5703 | # handle `-M -o', and we need to detect this. Also, some Intel | |
5704 | # versions had trouble with output in subdirs | |
5705 | am__obj=sub/conftest.${OBJEXT-o} | |
5706 | am__minus_obj="-o $am__obj" | |
5707 | case $depmode in | |
5708 | gcc) | |
5709 | # This depmode causes a compiler race in universal mode. | |
5710 | test "$am__universal" = false || continue | |
5711 | ;; | |
5712 | nosideeffect) | |
5713 | # after this tag, mechanisms are not by side-effect, so they'll | |
5714 | # only be used when explicitly requested | |
5715 | if test "x$enable_dependency_tracking" = xyes; then | |
5716 | continue | |
5717 | else | |
5718 | break | |
5719 | fi | |
5720 | ;; | |
5721 | msvisualcpp | msvcmsys) | |
5722 | # This compiler won't grok `-c -o', but also, the minuso test has | |
5723 | # not run yet. These depmodes are late enough in the game, and | |
5724 | # so weak that their functioning should not be impacted. | |
5725 | am__obj=conftest.${OBJEXT-o} | |
5726 | am__minus_obj= | |
5727 | ;; | |
5728 | none) break ;; | |
5729 | esac | |
5730 | if depmode=$depmode \ | |
5731 | source=sub/conftest.c object=$am__obj \ | |
5732 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
5733 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
5734 | >/dev/null 2>conftest.err && | |
5735 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
5736 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
5737 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
5738 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
5739 | # icc doesn't choke on unknown options, it will just issue warnings | |
5740 | # or remarks (even with -Werror). So we grep stderr for any message | |
5741 | # that says an option was ignored or not supported. | |
5742 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
5743 | # icc: Command line warning: ignoring option '-M'; no argument required | |
5744 | # The diagnosis changed in icc 8.0: | |
5745 | # icc: Command line remark: option '-MP' not supported | |
5746 | if (grep 'ignoring option' conftest.err || | |
5747 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
5748 | am_cv_CC_dependencies_compiler_type=$depmode | |
5749 | break | |
5750 | fi | |
5751 | fi | |
5752 | done | |
5753 | ||
5754 | cd .. | |
5755 | rm -rf conftest.dir | |
5756 | else | |
5757 | am_cv_CC_dependencies_compiler_type=none | |
5758 | fi | |
5759 | ||
5760 | fi | |
5761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
5762 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
5763 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5764 | ||
5765 | if | |
5766 | test "x$enable_dependency_tracking" != xno \ | |
5767 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
5768 | am__fastdepCC_TRUE= | |
5769 | am__fastdepCC_FALSE='#' | |
5770 | else | |
5771 | am__fastdepCC_TRUE='#' | |
5772 | am__fastdepCC_FALSE= | |
5773 | fi | |
5774 | ||
5775 | ||
5776 | if test "x$CC" != xcc; then | |
5777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
5778 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
5779 | else | |
5780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
5781 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
5782 | fi | |
5783 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
5784 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
a9bec17c | 5785 | if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : |
743c80a7 PE |
5786 | $as_echo_n "(cached) " >&6 |
5787 | else | |
5788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5789 | /* end confdefs.h. */ | |
5790 | ||
5791 | int | |
5792 | main () | |
5793 | { | |
5794 | ||
5795 | ; | |
5796 | return 0; | |
5797 | } | |
5798 | _ACEOF | |
5799 | # Make sure it works both with $CC and with simple cc. | |
5800 | # We do the test twice because some compilers refuse to overwrite an | |
5801 | # existing .o file with -o, though they will create one. | |
5802 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5803 | rm -f conftest2.* | |
5804 | if { { case "(($ac_try" in | |
5805 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5806 | *) ac_try_echo=$ac_try;; | |
5807 | esac | |
5808 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5809 | $as_echo "$ac_try_echo"; } >&5 | |
5810 | (eval "$ac_try") 2>&5 | |
5811 | ac_status=$? | |
5812 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5813 | test $ac_status = 0; } && | |
5814 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5815 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5816 | *) ac_try_echo=$ac_try;; | |
5817 | esac | |
5818 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5819 | $as_echo "$ac_try_echo"; } >&5 | |
5820 | (eval "$ac_try") 2>&5 | |
5821 | ac_status=$? | |
5822 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5823 | test $ac_status = 0; }; | |
5824 | then | |
5825 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
5826 | if test "x$CC" != xcc; then | |
5827 | # Test first that cc exists at all. | |
5828 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
5829 | { { case "(($ac_try" in | |
5830 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5831 | *) ac_try_echo=$ac_try;; | |
5832 | esac | |
5833 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5834 | $as_echo "$ac_try_echo"; } >&5 | |
5835 | (eval "$ac_try") 2>&5 | |
5836 | ac_status=$? | |
5837 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5838 | test $ac_status = 0; }; }; then | |
5839 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
5840 | rm -f conftest2.* | |
5841 | if { { case "(($ac_try" in | |
5842 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5843 | *) ac_try_echo=$ac_try;; | |
5844 | esac | |
5845 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5846 | $as_echo "$ac_try_echo"; } >&5 | |
5847 | (eval "$ac_try") 2>&5 | |
5848 | ac_status=$? | |
5849 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5850 | test $ac_status = 0; } && | |
5851 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
5852 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
5853 | *) ac_try_echo=$ac_try;; | |
5854 | esac | |
5855 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
5856 | $as_echo "$ac_try_echo"; } >&5 | |
5857 | (eval "$ac_try") 2>&5 | |
5858 | ac_status=$? | |
5859 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5860 | test $ac_status = 0; }; | |
5861 | then | |
5862 | # cc works too. | |
5863 | : | |
5864 | else | |
5865 | # cc exists but doesn't like -o. | |
5866 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5867 | fi | |
5868 | fi | |
5869 | fi | |
5870 | else | |
5871 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
5872 | fi | |
5873 | rm -f core conftest* | |
5874 | ||
5875 | fi | |
5876 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then | |
5877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5878 | $as_echo "yes" >&6; } | |
5879 | else | |
5880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5881 | $as_echo "no" >&6; } | |
5882 | ||
5883 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5884 | ||
5885 | fi | |
5886 | ||
5887 | # FIXME: we rely on the cache variable name because | |
5888 | # there is no other way. | |
5889 | set dummy $CC | |
5890 | am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
5891 | eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o | |
5892 | if test "$am_t" != yes; then | |
5893 | # Losing compiler, so override with the script. | |
5894 | # FIXME: It is wrong to rewrite CC. | |
5895 | # But if we don't then we get into trouble of one sort or another. | |
5896 | # A longer-term fix would be to have automake use am__CC in this case, | |
5897 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
5898 | CC="$am_aux_dir/compile $CC" | |
5899 | fi | |
5900 | ||
5901 | ||
5902 | ||
5ec54608 GM |
5903 | if test x$GCC = xyes; then |
5904 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
5905 | else | |
5906 | test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
5907 | fi | |
5908 | ||
34fd7a48 GM |
5909 | # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, |
5910 | # as we don't use them. | |
710f5812 | 5911 | |
f077f61d GM |
5912 | # Avoid gnulib's threadlib module, as we do threads our own way. |
5913 | ||
5914 | ||
5ec54608 | 5915 | # Initialize gnulib right after choosing the compiler. |
743c80a7 | 5916 | |
067d23c9 KY |
5917 | ac_ext=c |
5918 | ac_cpp='$CPP $CPPFLAGS' | |
5919 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5920 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5921 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5923 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5924 | # On Suns, sometimes $CPP names a directory. | |
5925 | if test -n "$CPP" && test -d "$CPP"; then | |
5926 | CPP= | |
5927 | fi | |
5928 | if test -z "$CPP"; then | |
a9bec17c | 5929 | if test "${ac_cv_prog_CPP+set}" = set; then : |
067d23c9 KY |
5930 | $as_echo_n "(cached) " >&6 |
5931 | else | |
5932 | # Double quotes because CPP needs to be expanded | |
5933 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5934 | do | |
5935 | ac_preproc_ok=false | |
5936 | for ac_c_preproc_warn_flag in '' yes | |
5937 | do | |
5938 | # Use a header file that comes with gcc, so configuring glibc | |
5939 | # with a fresh cross-compiler works. | |
5940 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5941 | # <limits.h> exists even on freestanding compilers. | |
5942 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5943 | # not just through cpp. "Syntax error" is here to catch this case. | |
5944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5945 | /* end confdefs.h. */ | |
5946 | #ifdef __STDC__ | |
5947 | # include <limits.h> | |
5948 | #else | |
5949 | # include <assert.h> | |
5950 | #endif | |
5951 | Syntax error | |
5952 | _ACEOF | |
5953 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5954 | ||
5955 | else | |
5956 | # Broken: fails on valid input. | |
5957 | continue | |
5958 | fi | |
a9bec17c | 5959 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5960 | |
5961 | # OK, works on sane cases. Now check whether nonexistent headers | |
5962 | # can be detected and how. | |
5963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5964 | /* end confdefs.h. */ | |
5965 | #include <ac_nonexistent.h> | |
5966 | _ACEOF | |
5967 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5968 | # Broken: success on invalid input. | |
5969 | continue | |
5970 | else | |
5971 | # Passes both tests. | |
5972 | ac_preproc_ok=: | |
5973 | break | |
5974 | fi | |
a9bec17c | 5975 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5976 | |
5977 | done | |
5978 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
a9bec17c | 5979 | rm -f conftest.err conftest.$ac_ext |
067d23c9 KY |
5980 | if $ac_preproc_ok; then : |
5981 | break | |
5982 | fi | |
5983 | ||
5984 | done | |
5985 | ac_cv_prog_CPP=$CPP | |
5986 | ||
5987 | fi | |
5988 | CPP=$ac_cv_prog_CPP | |
5989 | else | |
5990 | ac_cv_prog_CPP=$CPP | |
5991 | fi | |
5992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5993 | $as_echo "$CPP" >&6; } | |
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 | ||
6041 | else | |
6042 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6043 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
a9bec17c GM |
6044 | as_fn_error "C preprocessor \"$CPP\" fails sanity check |
6045 | See \`config.log' for more details." "$LINENO" 5; } | |
067d23c9 KY |
6046 | fi |
6047 | ||
6048 | ac_ext=c | |
6049 | ac_cpp='$CPP $CPPFLAGS' | |
6050 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6051 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6052 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6053 | ||
6054 | ||
6055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
6056 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
a9bec17c | 6057 | if test "${ac_cv_path_GREP+set}" = set; then : |
067d23c9 KY |
6058 | $as_echo_n "(cached) " >&6 |
6059 | else | |
6060 | if test -z "$GREP"; then | |
6061 | ac_path_GREP_found=false | |
6062 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6063 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6064 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6065 | do | |
6066 | IFS=$as_save_IFS | |
6067 | test -z "$as_dir" && as_dir=. | |
6068 | for ac_prog in grep ggrep; do | |
6069 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6070 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
6071 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
6072 | # Check for GNU ac_path_GREP and select it if it is found. | |
6073 | # Check for GNU $ac_path_GREP | |
6074 | case `"$ac_path_GREP" --version 2>&1` in | |
6075 | *GNU*) | |
6076 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
6077 | *) | |
6078 | ac_count=0 | |
6079 | $as_echo_n 0123456789 >"conftest.in" | |
6080 | while : | |
6081 | do | |
6082 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6083 | mv "conftest.tmp" "conftest.in" | |
6084 | cp "conftest.in" "conftest.nl" | |
6085 | $as_echo 'GREP' >> "conftest.nl" | |
6086 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6087 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6088 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6089 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
6090 | # Best one so far, save it but keep looking for a better one | |
6091 | ac_cv_path_GREP="$ac_path_GREP" | |
6092 | ac_path_GREP_max=$ac_count | |
6093 | fi | |
6094 | # 10*(2^10) chars as input seems more than enough | |
6095 | test $ac_count -gt 10 && break | |
6096 | done | |
6097 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6098 | esac | |
6099 | ||
6100 | $ac_path_GREP_found && break 3 | |
6101 | done | |
6102 | done | |
6103 | done | |
6104 | IFS=$as_save_IFS | |
6105 | if test -z "$ac_cv_path_GREP"; then | |
a9bec17c | 6106 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6107 | fi |
6108 | else | |
6109 | ac_cv_path_GREP=$GREP | |
6110 | fi | |
6111 | ||
6112 | fi | |
6113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
6114 | $as_echo "$ac_cv_path_GREP" >&6; } | |
6115 | GREP="$ac_cv_path_GREP" | |
6116 | ||
6117 | ||
6118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
6119 | $as_echo_n "checking for egrep... " >&6; } | |
a9bec17c | 6120 | if test "${ac_cv_path_EGREP+set}" = set; then : |
067d23c9 KY |
6121 | $as_echo_n "(cached) " >&6 |
6122 | else | |
6123 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
6124 | then ac_cv_path_EGREP="$GREP -E" | |
6125 | else | |
6126 | if test -z "$EGREP"; then | |
6127 | ac_path_EGREP_found=false | |
6128 | # Loop through the user's path and test for each of PROGNAME-LIST | |
6129 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6130 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
6131 | do | |
6132 | IFS=$as_save_IFS | |
6133 | test -z "$as_dir" && as_dir=. | |
6134 | for ac_prog in egrep; do | |
6135 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6136 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
6137 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
6138 | # Check for GNU ac_path_EGREP and select it if it is found. | |
6139 | # Check for GNU $ac_path_EGREP | |
6140 | case `"$ac_path_EGREP" --version 2>&1` in | |
6141 | *GNU*) | |
6142 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
6143 | *) | |
6144 | ac_count=0 | |
6145 | $as_echo_n 0123456789 >"conftest.in" | |
6146 | while : | |
6147 | do | |
6148 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
6149 | mv "conftest.tmp" "conftest.in" | |
6150 | cp "conftest.in" "conftest.nl" | |
6151 | $as_echo 'EGREP' >> "conftest.nl" | |
6152 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
6153 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
6154 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
6155 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
6156 | # Best one so far, save it but keep looking for a better one | |
6157 | ac_cv_path_EGREP="$ac_path_EGREP" | |
6158 | ac_path_EGREP_max=$ac_count | |
6159 | fi | |
6160 | # 10*(2^10) chars as input seems more than enough | |
6161 | test $ac_count -gt 10 && break | |
6162 | done | |
6163 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
6164 | esac | |
6165 | ||
6166 | $ac_path_EGREP_found && break 3 | |
6167 | done | |
6168 | done | |
6169 | done | |
6170 | IFS=$as_save_IFS | |
6171 | if test -z "$ac_cv_path_EGREP"; then | |
a9bec17c | 6172 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
067d23c9 KY |
6173 | fi |
6174 | else | |
6175 | ac_cv_path_EGREP=$EGREP | |
6176 | fi | |
6177 | ||
6178 | fi | |
6179 | fi | |
6180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
6181 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
6182 | EGREP="$ac_cv_path_EGREP" | |
6183 | ||
6184 | ||
369e19fc PE |
6185 | |
6186 | ||
6187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 | |
6188 | $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } | |
a9bec17c | 6189 | if test "${gl_cv_c_amsterdam_compiler+set}" = set; then : |
369e19fc PE |
6190 | $as_echo_n "(cached) " >&6 |
6191 | else | |
6192 | ||
6193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6194 | /* end confdefs.h. */ | |
6195 | ||
6196 | #ifdef __ACK__ | |
6197 | Amsterdam | |
6198 | #endif | |
6199 | ||
6200 | _ACEOF | |
6201 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6202 | $EGREP "Amsterdam" >/dev/null 2>&1; then : | |
6203 | gl_cv_c_amsterdam_compiler=yes | |
6204 | else | |
6205 | gl_cv_c_amsterdam_compiler=no | |
6206 | fi | |
6207 | rm -f conftest* | |
6208 | ||
6209 | ||
6210 | fi | |
6211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 | |
6212 | $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } | |
6213 | if test -z "$AR"; then | |
6214 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6215 | AR='cc -c.a' | |
6216 | if test -z "$ARFLAGS"; then | |
6217 | ARFLAGS='-o' | |
6218 | fi | |
6219 | else | |
6220 | if test -n "$ac_tool_prefix"; then | |
6221 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
6222 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
6223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6224 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6225 | if test "${ac_cv_prog_AR+set}" = set; then : |
369e19fc PE |
6226 | $as_echo_n "(cached) " >&6 |
6227 | else | |
6228 | if test -n "$AR"; then | |
6229 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
6230 | else | |
6231 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6232 | for as_dir in $PATH | |
6233 | do | |
6234 | IFS=$as_save_IFS | |
6235 | test -z "$as_dir" && as_dir=. | |
6236 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6237 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6238 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
6239 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6240 | break 2 | |
6241 | fi | |
6242 | done | |
6243 | done | |
6244 | IFS=$as_save_IFS | |
6245 | ||
6246 | fi | |
6247 | fi | |
6248 | AR=$ac_cv_prog_AR | |
6249 | if test -n "$AR"; then | |
6250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
6251 | $as_echo "$AR" >&6; } | |
6252 | else | |
6253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6254 | $as_echo "no" >&6; } | |
6255 | fi | |
6256 | ||
6257 | ||
6258 | fi | |
6259 | if test -z "$ac_cv_prog_AR"; then | |
6260 | ac_ct_AR=$AR | |
6261 | # Extract the first word of "ar", so it can be a program name with args. | |
6262 | set dummy ar; ac_word=$2 | |
6263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6264 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6265 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : |
369e19fc PE |
6266 | $as_echo_n "(cached) " >&6 |
6267 | else | |
6268 | if test -n "$ac_ct_AR"; then | |
6269 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
6270 | else | |
6271 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6272 | for as_dir in $PATH | |
6273 | do | |
6274 | IFS=$as_save_IFS | |
6275 | test -z "$as_dir" && as_dir=. | |
6276 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6277 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6278 | ac_cv_prog_ac_ct_AR="ar" | |
6279 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6280 | break 2 | |
6281 | fi | |
6282 | done | |
6283 | done | |
6284 | IFS=$as_save_IFS | |
6285 | ||
6286 | fi | |
6287 | fi | |
6288 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
6289 | if test -n "$ac_ct_AR"; then | |
6290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
6291 | $as_echo "$ac_ct_AR" >&6; } | |
6292 | else | |
6293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6294 | $as_echo "no" >&6; } | |
6295 | fi | |
6296 | ||
6297 | if test "x$ac_ct_AR" = x; then | |
6298 | AR="ar" | |
6299 | else | |
6300 | case $cross_compiling:$ac_tool_warned in | |
6301 | yes:) | |
6302 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6303 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6304 | ac_tool_warned=yes ;; | |
6305 | esac | |
6306 | AR=$ac_ct_AR | |
6307 | fi | |
6308 | else | |
6309 | AR="$ac_cv_prog_AR" | |
6310 | fi | |
6311 | ||
6312 | if test -z "$ARFLAGS"; then | |
6313 | ARFLAGS='cru' | |
6314 | fi | |
6315 | fi | |
6316 | else | |
6317 | if test -z "$ARFLAGS"; then | |
6318 | ARFLAGS='cru' | |
6319 | fi | |
6320 | fi | |
6321 | ||
6322 | ||
6323 | if test -z "$RANLIB"; then | |
6324 | if test $gl_cv_c_amsterdam_compiler = yes; then | |
6325 | RANLIB=':' | |
6326 | else | |
6327 | if test -n "$ac_tool_prefix"; then | |
6328 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
6329 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
6330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6331 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6332 | if test "${ac_cv_prog_RANLIB+set}" = set; then : |
369e19fc PE |
6333 | $as_echo_n "(cached) " >&6 |
6334 | else | |
6335 | if test -n "$RANLIB"; then | |
6336 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
6337 | else | |
6338 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6339 | for as_dir in $PATH | |
6340 | do | |
6341 | IFS=$as_save_IFS | |
6342 | test -z "$as_dir" && as_dir=. | |
6343 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6344 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6345 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
6346 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6347 | break 2 | |
6348 | fi | |
6349 | done | |
6350 | done | |
6351 | IFS=$as_save_IFS | |
6352 | ||
6353 | fi | |
6354 | fi | |
6355 | RANLIB=$ac_cv_prog_RANLIB | |
6356 | if test -n "$RANLIB"; then | |
6357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
6358 | $as_echo "$RANLIB" >&6; } | |
6359 | else | |
6360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6361 | $as_echo "no" >&6; } | |
6362 | fi | |
6363 | ||
6364 | ||
6365 | fi | |
6366 | if test -z "$ac_cv_prog_RANLIB"; then | |
6367 | ac_ct_RANLIB=$RANLIB | |
6368 | # Extract the first word of "ranlib", so it can be a program name with args. | |
6369 | set dummy ranlib; ac_word=$2 | |
6370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6371 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 6372 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : |
369e19fc PE |
6373 | $as_echo_n "(cached) " >&6 |
6374 | else | |
6375 | if test -n "$ac_ct_RANLIB"; then | |
6376 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
6377 | else | |
6378 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6379 | for as_dir in $PATH | |
6380 | do | |
6381 | IFS=$as_save_IFS | |
6382 | test -z "$as_dir" && as_dir=. | |
6383 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6384 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
6385 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
6386 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6387 | break 2 | |
6388 | fi | |
6389 | done | |
6390 | done | |
6391 | IFS=$as_save_IFS | |
6392 | ||
6393 | fi | |
6394 | fi | |
6395 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
6396 | if test -n "$ac_ct_RANLIB"; then | |
6397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
6398 | $as_echo "$ac_ct_RANLIB" >&6; } | |
6399 | else | |
6400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6401 | $as_echo "no" >&6; } | |
6402 | fi | |
6403 | ||
6404 | if test "x$ac_ct_RANLIB" = x; then | |
6405 | RANLIB=":" | |
6406 | else | |
6407 | case $cross_compiling:$ac_tool_warned in | |
6408 | yes:) | |
6409 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6410 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6411 | ac_tool_warned=yes ;; | |
6412 | esac | |
6413 | RANLIB=$ac_ct_RANLIB | |
6414 | fi | |
6415 | else | |
6416 | RANLIB="$ac_cv_prog_RANLIB" | |
6417 | fi | |
6418 | ||
6419 | fi | |
6420 | fi | |
6421 | ||
6422 | ||
067d23c9 KY |
6423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
6424 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
a9bec17c | 6425 | if test "${ac_cv_header_stdc+set}" = set; then : |
067d23c9 KY |
6426 | $as_echo_n "(cached) " >&6 |
6427 | else | |
6428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6429 | /* end confdefs.h. */ | |
6430 | #include <stdlib.h> | |
6431 | #include <stdarg.h> | |
6432 | #include <string.h> | |
6433 | #include <float.h> | |
6434 | ||
6435 | int | |
6436 | main () | |
6437 | { | |
6438 | ||
6439 | ; | |
6440 | return 0; | |
6441 | } | |
6442 | _ACEOF | |
6443 | if ac_fn_c_try_compile "$LINENO"; then : | |
6444 | ac_cv_header_stdc=yes | |
6445 | else | |
6446 | ac_cv_header_stdc=no | |
6447 | fi | |
6448 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6449 | ||
6450 | if test $ac_cv_header_stdc = yes; then | |
6451 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6453 | /* end confdefs.h. */ | |
6454 | #include <string.h> | |
6455 | ||
6456 | _ACEOF | |
6457 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6458 | $EGREP "memchr" >/dev/null 2>&1; then : | |
6459 | ||
6460 | else | |
6461 | ac_cv_header_stdc=no | |
6462 | fi | |
6463 | rm -f conftest* | |
6464 | ||
6465 | fi | |
6466 | ||
6467 | if test $ac_cv_header_stdc = yes; then | |
6468 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6470 | /* end confdefs.h. */ | |
6471 | #include <stdlib.h> | |
6472 | ||
6473 | _ACEOF | |
6474 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6475 | $EGREP "free" >/dev/null 2>&1; then : | |
6476 | ||
6477 | else | |
6478 | ac_cv_header_stdc=no | |
6479 | fi | |
6480 | rm -f conftest* | |
6481 | ||
6482 | fi | |
6483 | ||
6484 | if test $ac_cv_header_stdc = yes; then | |
6485 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6486 | if test "$cross_compiling" = yes; then : | |
6487 | : | |
6488 | else | |
6489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6490 | /* end confdefs.h. */ | |
6491 | #include <ctype.h> | |
6492 | #include <stdlib.h> | |
6493 | #if ((' ' & 0x0FF) == 0x020) | |
6494 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
6495 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6496 | #else | |
6497 | # define ISLOWER(c) \ | |
6498 | (('a' <= (c) && (c) <= 'i') \ | |
6499 | || ('j' <= (c) && (c) <= 'r') \ | |
6500 | || ('s' <= (c) && (c) <= 'z')) | |
6501 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6502 | #endif | |
6503 | ||
6504 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6505 | int | |
6506 | main () | |
6507 | { | |
6508 | int i; | |
6509 | for (i = 0; i < 256; i++) | |
6510 | if (XOR (islower (i), ISLOWER (i)) | |
6511 | || toupper (i) != TOUPPER (i)) | |
6512 | return 2; | |
6513 | return 0; | |
6514 | } | |
6515 | _ACEOF | |
6516 | if ac_fn_c_try_run "$LINENO"; then : | |
6517 | ||
6518 | else | |
6519 | ac_cv_header_stdc=no | |
6520 | fi | |
6521 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6522 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6523 | fi | |
6524 | ||
6525 | fi | |
6526 | fi | |
6527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
6528 | $as_echo "$ac_cv_header_stdc" >&6; } | |
6529 | if test $ac_cv_header_stdc = yes; then | |
6530 | ||
6531 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
6532 | ||
6533 | fi | |
6534 | ||
6535 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
6536 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
6537 | inttypes.h stdint.h unistd.h | |
6538 | do : | |
6539 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6540 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
6541 | " | |
a9bec17c GM |
6542 | eval as_val=\$$as_ac_Header |
6543 | if test "x$as_val" = x""yes; then : | |
067d23c9 KY |
6544 | cat >>confdefs.h <<_ACEOF |
6545 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6546 | _ACEOF | |
6547 | ||
6548 | fi | |
6549 | ||
6550 | done | |
6551 | ||
6552 | ||
6553 | ||
6554 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
a9bec17c | 6555 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : |
067d23c9 KY |
6556 | MINIX=yes |
6557 | else | |
6558 | MINIX= | |
6559 | fi | |
6560 | ||
6561 | ||
6562 | if test "$MINIX" = yes; then | |
6563 | ||
6564 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
6565 | ||
6566 | ||
6567 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
6568 | ||
6569 | ||
6570 | $as_echo "#define _MINIX 1" >>confdefs.h | |
6571 | ||
1fd182f0 | 6572 | |
2cdd55fc | 6573 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
1fd182f0 | 6574 | |
2cdd55fc | 6575 | fi |
1fd182f0 | 6576 | |
067d23c9 KY |
6577 | |
6578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
6579 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
a9bec17c | 6580 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : |
067d23c9 KY |
6581 | $as_echo_n "(cached) " >&6 |
6582 | else | |
6583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6584 | /* end confdefs.h. */ | |
369e19fc PE |
6585 | |
6586 | # define __EXTENSIONS__ 1 | |
6587 | $ac_includes_default | |
6588 | int | |
6589 | main () | |
6590 | { | |
6591 | ||
6592 | ; | |
6593 | return 0; | |
6594 | } | |
6595 | _ACEOF | |
6596 | if ac_fn_c_try_compile "$LINENO"; then : | |
6597 | ac_cv_safe_to_define___extensions__=yes | |
6598 | else | |
6599 | ac_cv_safe_to_define___extensions__=no | |
6600 | fi | |
6601 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6602 | fi | |
6603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
6604 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
6605 | test $ac_cv_safe_to_define___extensions__ = yes && | |
6606 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
6607 | ||
6608 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
6609 | ||
6610 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
6611 | ||
6612 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
6613 | ||
6614 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
6615 | ||
6616 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
6617 | ||
2cdd55fc GM |
6618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 |
6619 | $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } | |
6620 | if test "${ac_cv_should_define__xopen_source+set}" = set; then : | |
6621 | $as_echo_n "(cached) " >&6 | |
6622 | else | |
6623 | ac_cv_should_define__xopen_source=no | |
6624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6625 | /* end confdefs.h. */ | |
6626 | ||
6627 | #include <wchar.h> | |
6628 | mbstate_t x; | |
6629 | int | |
6630 | main () | |
6631 | { | |
6632 | ||
6633 | ; | |
6634 | return 0; | |
6635 | } | |
6636 | _ACEOF | |
6637 | if ac_fn_c_try_compile "$LINENO"; then : | |
6638 | ||
6639 | else | |
6640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6641 | /* end confdefs.h. */ | |
6642 | ||
6643 | #define _XOPEN_SOURCE 500 | |
6644 | #include <wchar.h> | |
6645 | mbstate_t x; | |
6646 | int | |
6647 | main () | |
6648 | { | |
6649 | ||
6650 | ; | |
6651 | return 0; | |
6652 | } | |
6653 | _ACEOF | |
6654 | if ac_fn_c_try_compile "$LINENO"; then : | |
6655 | ac_cv_should_define__xopen_source=yes | |
6656 | fi | |
6657 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6658 | fi | |
6659 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6660 | fi | |
6661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 | |
6662 | $as_echo "$ac_cv_should_define__xopen_source" >&6; } | |
6663 | test $ac_cv_should_define__xopen_source = yes && | |
6664 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
6665 | ||
369e19fc PE |
6666 | |
6667 | ||
6668 | ||
6669 | ||
6670 | ||
6671 | ||
6672 | ||
6673 | # Check whether --enable-largefile was given. | |
6674 | if test "${enable_largefile+set}" = set; then : | |
6675 | enableval=$enable_largefile; | |
6676 | fi | |
6677 | ||
6678 | if test "$enable_largefile" != no; then | |
6679 | ||
6680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
6681 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
a9bec17c | 6682 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : |
369e19fc PE |
6683 | $as_echo_n "(cached) " >&6 |
6684 | else | |
6685 | ac_cv_sys_largefile_CC=no | |
6686 | if test "$GCC" != yes; then | |
6687 | ac_save_CC=$CC | |
6688 | while :; do | |
6689 | # IRIX 6.2 and later do not support large files by default, | |
6690 | # so use the C compiler's -n32 option if that helps. | |
6691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6692 | /* end confdefs.h. */ | |
6693 | #include <sys/types.h> | |
6694 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6695 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6696 | since some C++ compilers masquerading as C compilers | |
6697 | incorrectly reject 9223372036854775807. */ | |
6698 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6699 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6700 | && LARGE_OFF_T % 2147483647 == 1) | |
6701 | ? 1 : -1]; | |
6702 | int | |
6703 | main () | |
6704 | { | |
6705 | ||
6706 | ; | |
6707 | return 0; | |
6708 | } | |
6709 | _ACEOF | |
6710 | if ac_fn_c_try_compile "$LINENO"; then : | |
6711 | break | |
6712 | fi | |
6713 | rm -f core conftest.err conftest.$ac_objext | |
6714 | CC="$CC -n32" | |
6715 | if ac_fn_c_try_compile "$LINENO"; then : | |
6716 | ac_cv_sys_largefile_CC=' -n32'; break | |
6717 | fi | |
6718 | rm -f core conftest.err conftest.$ac_objext | |
6719 | break | |
6720 | done | |
6721 | CC=$ac_save_CC | |
6722 | rm -f conftest.$ac_ext | |
6723 | fi | |
6724 | fi | |
6725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
6726 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
6727 | if test "$ac_cv_sys_largefile_CC" != no; then | |
6728 | CC=$CC$ac_cv_sys_largefile_CC | |
6729 | fi | |
6730 | ||
6731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
6732 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
a9bec17c | 6733 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : |
369e19fc PE |
6734 | $as_echo_n "(cached) " >&6 |
6735 | else | |
6736 | while :; do | |
6737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6738 | /* end confdefs.h. */ | |
6739 | #include <sys/types.h> | |
6740 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6741 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6742 | since some C++ compilers masquerading as C compilers | |
6743 | incorrectly reject 9223372036854775807. */ | |
6744 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6745 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6746 | && LARGE_OFF_T % 2147483647 == 1) | |
6747 | ? 1 : -1]; | |
6748 | int | |
6749 | main () | |
6750 | { | |
6751 | ||
6752 | ; | |
6753 | return 0; | |
6754 | } | |
6755 | _ACEOF | |
6756 | if ac_fn_c_try_compile "$LINENO"; then : | |
6757 | ac_cv_sys_file_offset_bits=no; break | |
6758 | fi | |
6759 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6761 | /* end confdefs.h. */ | |
6762 | #define _FILE_OFFSET_BITS 64 | |
6763 | #include <sys/types.h> | |
6764 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6765 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6766 | since some C++ compilers masquerading as C compilers | |
6767 | incorrectly reject 9223372036854775807. */ | |
6768 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6769 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6770 | && LARGE_OFF_T % 2147483647 == 1) | |
6771 | ? 1 : -1]; | |
6772 | int | |
6773 | main () | |
6774 | { | |
6775 | ||
6776 | ; | |
6777 | return 0; | |
6778 | } | |
6779 | _ACEOF | |
6780 | if ac_fn_c_try_compile "$LINENO"; then : | |
6781 | ac_cv_sys_file_offset_bits=64; break | |
6782 | fi | |
6783 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6784 | ac_cv_sys_file_offset_bits=unknown | |
6785 | break | |
6786 | done | |
6787 | fi | |
6788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
6789 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
6790 | case $ac_cv_sys_file_offset_bits in #( | |
6791 | no | unknown) ;; | |
6792 | *) | |
6793 | cat >>confdefs.h <<_ACEOF | |
6794 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
6795 | _ACEOF | |
6796 | ;; | |
6797 | esac | |
6798 | rm -rf conftest* | |
6799 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
6800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
6801 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
a9bec17c | 6802 | if test "${ac_cv_sys_large_files+set}" = set; then : |
369e19fc PE |
6803 | $as_echo_n "(cached) " >&6 |
6804 | else | |
6805 | while :; do | |
6806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6807 | /* end confdefs.h. */ | |
6808 | #include <sys/types.h> | |
6809 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6810 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6811 | since some C++ compilers masquerading as C compilers | |
6812 | incorrectly reject 9223372036854775807. */ | |
6813 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6814 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6815 | && LARGE_OFF_T % 2147483647 == 1) | |
6816 | ? 1 : -1]; | |
6817 | int | |
6818 | main () | |
6819 | { | |
6820 | ||
6821 | ; | |
6822 | return 0; | |
6823 | } | |
6824 | _ACEOF | |
6825 | if ac_fn_c_try_compile "$LINENO"; then : | |
6826 | ac_cv_sys_large_files=no; break | |
6827 | fi | |
6828 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6830 | /* end confdefs.h. */ | |
6831 | #define _LARGE_FILES 1 | |
6832 | #include <sys/types.h> | |
6833 | /* Check that off_t can represent 2**63 - 1 correctly. | |
6834 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
6835 | since some C++ compilers masquerading as C compilers | |
6836 | incorrectly reject 9223372036854775807. */ | |
6837 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
6838 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
6839 | && LARGE_OFF_T % 2147483647 == 1) | |
6840 | ? 1 : -1]; | |
067d23c9 KY |
6841 | int |
6842 | main () | |
6843 | { | |
6844 | ||
6845 | ; | |
6846 | return 0; | |
6847 | } | |
6848 | _ACEOF | |
6849 | if ac_fn_c_try_compile "$LINENO"; then : | |
369e19fc | 6850 | ac_cv_sys_large_files=1; break |
067d23c9 KY |
6851 | fi |
6852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
369e19fc PE |
6853 | ac_cv_sys_large_files=unknown |
6854 | break | |
6855 | done | |
067d23c9 | 6856 | fi |
369e19fc PE |
6857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
6858 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
6859 | case $ac_cv_sys_large_files in #( | |
6860 | no | unknown) ;; | |
6861 | *) | |
6862 | cat >>confdefs.h <<_ACEOF | |
6863 | #define _LARGE_FILES $ac_cv_sys_large_files | |
6864 | _ACEOF | |
6865 | ;; | |
6866 | esac | |
6867 | rm -rf conftest* | |
6868 | fi | |
1fd182f0 PE |
6869 | |
6870 | ||
858c7150 GM |
6871 | $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h |
6872 | ||
369e19fc | 6873 | fi |
1fd182f0 | 6874 | |
6d153f56 GM |
6875 | case $ac_cv_prog_cc_stdc in #( |
6876 | no) : | |
6877 | ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( | |
6878 | *) : | |
6879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
6880 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
a9bec17c | 6881 | if test "${ac_cv_prog_cc_c99+set}" = set; then : |
6d153f56 GM |
6882 | $as_echo_n "(cached) " >&6 |
6883 | else | |
6884 | ac_cv_prog_cc_c99=no | |
6885 | ac_save_CC=$CC | |
6886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6887 | /* end confdefs.h. */ | |
6888 | #include <stdarg.h> | |
6889 | #include <stdbool.h> | |
6890 | #include <stdlib.h> | |
6891 | #include <wchar.h> | |
6892 | #include <stdio.h> | |
6893 | ||
6894 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
6895 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
6896 | #define showlist(...) puts (#__VA_ARGS__) | |
6897 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
6898 | static void | |
6899 | test_varargs_macros (void) | |
6900 | { | |
6901 | int x = 1234; | |
6902 | int y = 5678; | |
6903 | debug ("Flag"); | |
6904 | debug ("X = %d\n", x); | |
6905 | showlist (The first, second, and third items.); | |
6906 | report (x>y, "x is %d but y is %d", x, y); | |
6907 | } | |
6908 | ||
6909 | // Check long long types. | |
6910 | #define BIG64 18446744073709551615ull | |
6911 | #define BIG32 4294967295ul | |
6912 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
6913 | #if !BIG_OK | |
6914 | your preprocessor is broken; | |
6915 | #endif | |
6916 | #if BIG_OK | |
6917 | #else | |
6918 | your preprocessor is broken; | |
6919 | #endif | |
6920 | static long long int bignum = -9223372036854775807LL; | |
6921 | static unsigned long long int ubignum = BIG64; | |
6922 | ||
6923 | struct incomplete_array | |
6924 | { | |
6925 | int datasize; | |
6926 | double data[]; | |
6927 | }; | |
6928 | ||
6929 | struct named_init { | |
6930 | int number; | |
6931 | const wchar_t *name; | |
6932 | double average; | |
6933 | }; | |
6934 | ||
6935 | typedef const char *ccp; | |
6936 | ||
6937 | static inline int | |
6938 | test_restrict (ccp restrict text) | |
6939 | { | |
6940 | // See if C++-style comments work. | |
6941 | // Iterate through items via the restricted pointer. | |
6942 | // Also check for declarations in for loops. | |
6943 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
6944 | continue; | |
6945 | return 0; | |
6946 | } | |
6947 | ||
6948 | // Check varargs and va_copy. | |
6949 | static void | |
6950 | test_varargs (const char *format, ...) | |
6951 | { | |
6952 | va_list args; | |
6953 | va_start (args, format); | |
6954 | va_list args_copy; | |
6955 | va_copy (args_copy, args); | |
6956 | ||
6957 | const char *str; | |
6958 | int number; | |
6959 | float fnumber; | |
6960 | ||
6961 | while (*format) | |
6962 | { | |
6963 | switch (*format++) | |
6964 | { | |
6965 | case 's': // string | |
6966 | str = va_arg (args_copy, const char *); | |
6967 | break; | |
6968 | case 'd': // int | |
6969 | number = va_arg (args_copy, int); | |
6970 | break; | |
6971 | case 'f': // float | |
6972 | fnumber = va_arg (args_copy, double); | |
6973 | break; | |
6974 | default: | |
6975 | break; | |
6976 | } | |
6977 | } | |
6978 | va_end (args_copy); | |
6979 | va_end (args); | |
6980 | } | |
6981 | ||
6982 | int | |
6983 | main () | |
6984 | { | |
6985 | ||
6986 | // Check bool. | |
6987 | _Bool success = false; | |
6988 | ||
6989 | // Check restrict. | |
6990 | if (test_restrict ("String literal") == 0) | |
6991 | success = true; | |
6992 | char *restrict newvar = "Another string"; | |
6993 | ||
6994 | // Check varargs. | |
6995 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
6996 | test_varargs_macros (); | |
6997 | ||
6998 | // Check flexible array members. | |
6999 | struct incomplete_array *ia = | |
7000 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
7001 | ia->datasize = 10; | |
7002 | for (int i = 0; i < ia->datasize; ++i) | |
7003 | ia->data[i] = i * 1.234; | |
7004 | ||
7005 | // Check named initializers. | |
7006 | struct named_init ni = { | |
7007 | .number = 34, | |
7008 | .name = L"Test wide string", | |
7009 | .average = 543.34343, | |
7010 | }; | |
7011 | ||
7012 | ni.number = 58; | |
7013 | ||
7014 | int dynamic_array[ni.number]; | |
7015 | dynamic_array[ni.number - 1] = 543; | |
7016 | ||
7017 | // work around unused variable warnings | |
7018 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
7019 | || dynamic_array[ni.number - 1] != 543); | |
7020 | ||
7021 | ; | |
7022 | return 0; | |
7023 | } | |
7024 | _ACEOF | |
7025 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 | |
7026 | do | |
7027 | CC="$ac_save_CC $ac_arg" | |
7028 | if ac_fn_c_try_compile "$LINENO"; then : | |
7029 | ac_cv_prog_cc_c99=$ac_arg | |
7030 | fi | |
7031 | rm -f core conftest.err conftest.$ac_objext | |
7032 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
7033 | done | |
7034 | rm -f conftest.$ac_ext | |
7035 | CC=$ac_save_CC | |
7036 | ||
7037 | fi | |
7038 | # AC_CACHE_VAL | |
7039 | case "x$ac_cv_prog_cc_c99" in | |
7040 | x) | |
7041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7042 | $as_echo "none needed" >&6; } ;; | |
7043 | xno) | |
7044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7045 | $as_echo "unsupported" >&6; } ;; | |
7046 | *) | |
7047 | CC="$CC $ac_cv_prog_cc_c99" | |
7048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
7049 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
7050 | esac | |
7051 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
7052 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
7053 | else | |
7054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
7055 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
a9bec17c | 7056 | if test "${ac_cv_prog_cc_c89+set}" = set; then : |
6d153f56 GM |
7057 | $as_echo_n "(cached) " >&6 |
7058 | else | |
7059 | ac_cv_prog_cc_c89=no | |
7060 | ac_save_CC=$CC | |
7061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7062 | /* end confdefs.h. */ | |
7063 | #include <stdarg.h> | |
7064 | #include <stdio.h> | |
7065 | #include <sys/types.h> | |
7066 | #include <sys/stat.h> | |
7067 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
7068 | struct buf { int x; }; | |
7069 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
7070 | static char *e (p, i) | |
7071 | char **p; | |
7072 | int i; | |
7073 | { | |
7074 | return p[i]; | |
7075 | } | |
7076 | static char *f (char * (*g) (char **, int), char **p, ...) | |
7077 | { | |
7078 | char *s; | |
7079 | va_list v; | |
7080 | va_start (v,p); | |
7081 | s = g (p, va_arg (v,int)); | |
7082 | va_end (v); | |
7083 | return s; | |
7084 | } | |
7085 | ||
7086 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
7087 | function prototypes and stuff, but not '\xHH' hex character constants. | |
7088 | These don't provoke an error unfortunately, instead are silently treated | |
7089 | as 'x'. The following induces an error, until -std is added to get | |
7090 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
7091 | array size at least. It's necessary to write '\x00'==0 to get something | |
7092 | that's true only with -std. */ | |
7093 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
7094 | ||
7095 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
7096 | inside strings and character constants. */ | |
7097 | #define FOO(x) 'x' | |
7098 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
7099 | ||
7100 | int test (int i, double x); | |
7101 | struct s1 {int (*f) (int a);}; | |
7102 | struct s2 {int (*f) (double a);}; | |
7103 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
7104 | int argc; | |
7105 | char **argv; | |
7106 | int | |
7107 | main () | |
7108 | { | |
7109 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
7110 | ; | |
7111 | return 0; | |
7112 | } | |
7113 | _ACEOF | |
7114 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
7115 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
7116 | do | |
7117 | CC="$ac_save_CC $ac_arg" | |
7118 | if ac_fn_c_try_compile "$LINENO"; then : | |
7119 | ac_cv_prog_cc_c89=$ac_arg | |
7120 | fi | |
7121 | rm -f core conftest.err conftest.$ac_objext | |
7122 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
7123 | done | |
7124 | rm -f conftest.$ac_ext | |
7125 | CC=$ac_save_CC | |
7126 | ||
7127 | fi | |
7128 | # AC_CACHE_VAL | |
7129 | case "x$ac_cv_prog_cc_c89" in | |
7130 | x) | |
7131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7132 | $as_echo "none needed" >&6; } ;; | |
7133 | xno) | |
7134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7135 | $as_echo "unsupported" >&6; } ;; | |
7136 | *) | |
7137 | CC="$CC $ac_cv_prog_cc_c89" | |
7138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
7139 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
7140 | esac | |
7141 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
7142 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
7143 | else | |
7144 | ac_cv_prog_cc_stdc=no | |
7145 | fi | |
7146 | ||
7147 | fi | |
7148 | ;; | |
7149 | esac | |
7150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 | |
7151 | $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } | |
a9bec17c | 7152 | if test "${ac_cv_prog_cc_stdc+set}" = set; then : |
6d153f56 GM |
7153 | $as_echo_n "(cached) " >&6 |
7154 | fi | |
7155 | ||
7156 | case $ac_cv_prog_cc_stdc in #( | |
7157 | no) : | |
7158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
7159 | $as_echo "unsupported" >&6; } ;; #( | |
7160 | '') : | |
7161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
7162 | $as_echo "none needed" >&6; } ;; #( | |
7163 | *) : | |
7164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 | |
7165 | $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; | |
7166 | esac | |
7167 | ||
1fd182f0 PE |
7168 | |
7169 | ||
4fc2b746 | 7170 | # Code from module alloca-opt: |
8d8af66d | 7171 | # Code from module allocator: |
d7ad186c | 7172 | # Code from module at-internal: |
938a4ef9 GM |
7173 | # Code from module c-ctype: |
7174 | # Code from module c-strcase: | |
6c051bab | 7175 | # Code from module careadlinkat: |
f199cab1 | 7176 | # Code from module clock-time: |
3bf26e96 | 7177 | # Code from module close-stream: |
942f733f | 7178 | # Code from module crypto/md5: |
40e27e7f | 7179 | # Code from module crypto/sha1: |
d87ffdb7 GM |
7180 | # Code from module crypto/sha256: |
7181 | # Code from module crypto/sha512: | |
d7ad186c | 7182 | # Code from module dirent: |
36f13e16 | 7183 | # Code from module dosname: |
f737437b | 7184 | # Code from module dtoastr: |
f199cab1 | 7185 | # Code from module dtotimespec: |
7d2a1c5e | 7186 | # Code from module dup2: |
93131e11 | 7187 | # Code from module environ: |
710f5812 | 7188 | # Code from module euidaccess: |
8966cbff | 7189 | # Code from module execinfo: |
1fd182f0 PE |
7190 | # Code from module extensions: |
7191 | ||
7cd2ed2c | 7192 | # Code from module extern-inline: |
710f5812 GM |
7193 | # Code from module faccessat: |
7194 | # Code from module fcntl-h: | |
2407788f | 7195 | # Code from module fdatasync: |
d7ad186c | 7196 | # Code from module fdopendir: |
5fa4ac76 | 7197 | # Code from module filemode: |
3bf26e96 | 7198 | # Code from module fpending: |
d7ad186c | 7199 | # Code from module fstatat: |
2407788f | 7200 | # Code from module fsync: |
710f5812 | 7201 | # Code from module getgroups: |
1f5d53eb | 7202 | # Code from module getloadavg: |
e275c824 PE |
7203 | # Code from module getopt-gnu: |
7204 | # Code from module getopt-posix: | |
7205 | # Code from module gettext-h: | |
f199cab1 GM |
7206 | # Code from module gettime: |
7207 | # Code from module gettimeofday: | |
710f5812 | 7208 | # Code from module group-member: |
67342916 | 7209 | # Code from module ignore-value: |
1fd182f0 PE |
7210 | # Code from module include_next: |
7211 | # Code from module intprops: | |
4fda9c95 | 7212 | # Code from module inttypes-incomplete: |
369e19fc PE |
7213 | # Code from module largefile: |
7214 | ||
ae0d7250 | 7215 | # Code from module lstat: |
ac1ca7e9 | 7216 | # Code from module manywarnings: |
283c7aed | 7217 | # Code from module memrchr: |
1fd182f0 PE |
7218 | # Code from module mktime: |
7219 | # Code from module multiarch: | |
369e19fc | 7220 | # Code from module nocrash: |
d7ad186c | 7221 | # Code from module openat-h: |
a0a61e58 | 7222 | # Code from module pathmax: |
f199cab1 | 7223 | # Code from module pselect: |
3e0be4ab | 7224 | # Code from module pthread_sigmask: |
b5591ebb | 7225 | # Code from module putenv: |
ae0d7250 | 7226 | # Code from module readlink: |
d7ad186c | 7227 | # Code from module readlinkat: |
710f5812 | 7228 | # Code from module root-uid: |
e4184a20 | 7229 | # Code from module sig2str: |
2b1928b8 | 7230 | # Code from module signal-h: |
369e19fc PE |
7231 | # Code from module snippet/_Noreturn: |
7232 | # Code from module snippet/arg-nonnull: | |
7233 | # Code from module snippet/c++defs: | |
7234 | # Code from module snippet/warn-on-use: | |
6ad6792b | 7235 | # Code from module socklen: |
6c051bab | 7236 | # Code from module ssize_t: |
ae0d7250 | 7237 | # Code from module stat: |
f199cab1 | 7238 | # Code from module stat-time: |
0eb775a3 | 7239 | # Code from module stdalign: |
6d153f56 GM |
7240 | # Code from module stdarg: |
7241 | ||
8c069cc7 GM |
7242 | |
7243 | ||
16c3e636 | 7244 | # Code from module stdbool: |
1fd182f0 | 7245 | # Code from module stddef: |
5f90be1b | 7246 | # Code from module stdint: |
6ad6792b | 7247 | # Code from module stdio: |
1f5d53eb | 7248 | # Code from module stdlib: |
16c3e636 | 7249 | # Code from module strftime: |
283c7aed | 7250 | # Code from module string: |
3e0be4ab GM |
7251 | # Code from module strtoimax: |
7252 | # Code from module strtoll: | |
4fda9c95 GM |
7253 | # Code from module strtoull: |
7254 | # Code from module strtoumax: | |
ae0d7250 | 7255 | # Code from module symlink: |
f199cab1 | 7256 | # Code from module sys_select: |
5fa4ac76 | 7257 | # Code from module sys_stat: |
f199cab1 | 7258 | # Code from module sys_time: |
1fd182f0 PE |
7259 | # Code from module time: |
7260 | # Code from module time_r: | |
f077f61d | 7261 | # Code from module timer-time: |
f199cab1 GM |
7262 | # Code from module timespec: |
7263 | # Code from module timespec-add: | |
7264 | # Code from module timespec-sub: | |
d87ffdb7 | 7265 | # Code from module u64: |
e275c824 | 7266 | # Code from module unistd: |
b5591ebb | 7267 | # Code from module unsetenv: |
f199cab1 | 7268 | # Code from module utimens: |
4fda9c95 | 7269 | # Code from module verify: |
ac1ca7e9 | 7270 | # Code from module warnings: |
710f5812 | 7271 | # Code from module xalloc-oversized: |
1fd182f0 PE |
7272 | |
7273 | ||
6bd1cda5 GM |
7274 | # It's helpful to have C macros available to GDB, so prefer -g3 to -g |
7275 | # if -g3 works and the user does not specify CFLAGS. | |
7276 | # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. | |
7277 | if test "$ac_test_CFLAGS" != set; then | |
7278 | case $CFLAGS in | |
7279 | '-g') | |
7280 | emacs_g3_CFLAGS='-g3';; | |
7281 | '-g -O2') | |
7282 | emacs_g3_CFLAGS='-g3 -O2';; | |
7283 | *) | |
7284 | emacs_g3_CFLAGS='';; | |
7285 | esac | |
7286 | if test -n "$emacs_g3_CFLAGS"; then | |
7287 | emacs_save_CFLAGS=$CFLAGS | |
7288 | CFLAGS=$emacs_g3_CFLAGS | |
7289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5 | |
7290 | $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; } | |
7291 | if test "${emacs_cv_prog_cc_g3+set}" = set; then : | |
7292 | $as_echo_n "(cached) " >&6 | |
7293 | else | |
7294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7295 | /* end confdefs.h. */ | |
7296 | ||
7297 | int | |
7298 | main () | |
7299 | { | |
7300 | ||
7301 | ; | |
7302 | return 0; | |
7303 | } | |
7304 | _ACEOF | |
7305 | if ac_fn_c_try_link "$LINENO"; then : | |
7306 | emacs_cv_prog_cc_g3=yes | |
7307 | else | |
7308 | emacs_cv_prog_cc_g3=no | |
7309 | fi | |
7310 | rm -f core conftest.err conftest.$ac_objext \ | |
7311 | conftest$ac_exeext conftest.$ac_ext | |
7312 | fi | |
7313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 | |
7314 | $as_echo "$emacs_cv_prog_cc_g3" >&6; } | |
7315 | if test $emacs_cv_prog_cc_g3 = yes; then | |
7316 | CFLAGS=$emacs_g3_CFLAGS | |
7317 | else | |
7318 | CFLAGS=$emacs_save_CFLAGS | |
7319 | fi | |
7320 | fi | |
7321 | fi | |
7322 | ||
a6b92a4a GM |
7323 | # Check whether --enable-gcc-warnings was given. |
7324 | if test "${enable_gcc_warnings+set}" = set; then : | |
7325 | enableval=$enable_gcc_warnings; case $enableval in | |
7326 | yes|no) ;; | |
7327 | *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;; | |
7328 | esac | |
7329 | gl_gcc_warnings=$enableval | |
7330 | else | |
7331 | gl_gcc_warnings=no | |
7332 | ||
7333 | fi | |
7334 | ||
7335 | ||
e4d35030 GM |
7336 | # Check whether --enable-link-time-optimization was given. |
7337 | if test "${enable_link_time_optimization+set}" = set; then : | |
7338 | enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then | |
7339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5 | |
7340 | $as_echo_n "checking whether link-time optimization is supported... " >&6; } | |
7341 | ac_lto_supported=no | |
7342 | if test x$GCC = xyes; then | |
7343 | CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null` | |
7344 | if test x$CPUS != x; then | |
7345 | LTO="-flto=$CPUS" | |
7346 | else | |
7347 | LTO="-flto" | |
7348 | fi | |
7349 | old_CFLAGS=$CFLAGS | |
7350 | CFLAGS="$CFLAGS $LTO" | |
7351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7352 | /* end confdefs.h. */ | |
7353 | ||
7354 | int | |
7355 | main () | |
7356 | { | |
7357 | ||
7358 | ; | |
7359 | return 0; | |
7360 | } | |
7361 | _ACEOF | |
7362 | if ac_fn_c_try_compile "$LINENO"; then : | |
7363 | ac_lto_supported=yes | |
7364 | else | |
7365 | ac_lto_supported=no | |
7366 | fi | |
7367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7368 | CFLAGS="$old_CFLAGS" | |
7369 | fi | |
7370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5 | |
7371 | $as_echo "$ac_lto_supported" >&6; } | |
7372 | if test "$ac_lto_supported" = "yes"; then | |
7373 | CFLAGS="$CFLAGS $LTO" | |
7374 | fi | |
7375 | fi | |
7376 | fi | |
7377 | ||
7378 | ||
a6b92a4a GM |
7379 | # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) |
7380 | # ------------------------------------------------ | |
7381 | # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. | |
7382 | # Otherwise, run RUN-IF-NOT-FOUND. | |
7383 | ||
7384 | ||
7385 | # When compiling with GCC, prefer -isystem to -I when including system | |
7386 | # include files, to avoid generating useless diagnostics for the files. | |
7387 | if test "$gl_gcc_warnings" != yes; then | |
7388 | isystem='-I' | |
7389 | else | |
7390 | isystem='-isystem ' | |
7391 | ||
7392 | # This, $nw, is the list of warnings we disable. | |
7393 | nw= | |
7394 | ||
7395 | case $with_x_toolkit in | |
7396 | lucid | athena | motif) | |
7397 | # Old toolkits mishandle 'const'. | |
7398 | nw="$nw -Wwrite-strings" | |
7399 | ;; | |
7400 | *) | |
7401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 | |
7402 | $as_echo_n "checking whether C compiler handles -Werror... " >&6; } | |
7403 | if test "${gl_cv_warn_c__Werror+set}" = set; then : | |
7404 | $as_echo_n "(cached) " >&6 | |
7405 | else | |
7406 | ||
7407 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7408 | as_fn_append CFLAGS " -Werror" |
a6b92a4a | 7409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
7410 | /* end confdefs.h. */ |
7411 | ||
7412 | int | |
7413 | main () | |
7414 | { | |
7415 | ||
7416 | ; | |
7417 | return 0; | |
7418 | } | |
7419 | _ACEOF | |
7420 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7421 | gl_cv_warn_c__Werror=yes |
067d23c9 | 7422 | else |
a6b92a4a | 7423 | gl_cv_warn_c__Werror=no |
067d23c9 KY |
7424 | fi |
7425 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7426 | CFLAGS="$gl_save_compiler_FLAGS" |
7427 | ||
7428 | fi | |
7429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5 | |
7430 | $as_echo "$gl_cv_warn_c__Werror" >&6; } | |
7431 | if test "x$gl_cv_warn_c__Werror" = x""yes; then : | |
7432 | as_fn_append WERROR_CFLAGS " -Werror" | |
7433 | fi | |
7434 | ||
0eb775a3 | 7435 | |
a6b92a4a GM |
7436 | ;; |
7437 | esac | |
7438 | ||
7439 | ||
7440 | nw="$nw -Waggregate-return" # anachronistic | |
ca0294bb | 7441 | nw="$nw -Wlong-long" # C90 is anachronistic |
a6b92a4a GM |
7442 | nw="$nw -Wc++-compat" # We don't care about C++ compilers |
7443 | nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib | |
7444 | nw="$nw -Wtraditional" # Warns on #elif which we use often | |
7445 | nw="$nw -Wcast-qual" # Too many warnings for now | |
7446 | nw="$nw -Wconversion" # Too many warnings for now | |
7447 | nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings | |
7448 | nw="$nw -Wsign-conversion" # Too many warnings for now | |
7449 | nw="$nw -Woverlength-strings" # Not a problem these days | |
7450 | nw="$nw -Wtraditional-conversion" # Too many warnings for now | |
fd9d2a9d | 7451 | nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored |
a6b92a4a | 7452 | nw="$nw -Wpadded" # Our structs are not padded |
fd9d2a9d | 7453 | nw="$nw -Wredundant-decls" # we regularly (re)declare functions |
a6b92a4a | 7454 | nw="$nw -Wlogical-op" # any use of fwrite provokes this |
fd9d2a9d | 7455 | nw="$nw -Wformat-nonliteral" # we do this a lot |
a6b92a4a GM |
7456 | nw="$nw -Wvla" # warnings in gettext.h |
7457 | nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ | |
7458 | nw="$nw -Wswitch-enum" # Too many warnings for now | |
7459 | nw="$nw -Wswitch-default" # Too many warnings for now | |
fd9d2a9d GM |
7460 | nw="$nw -Wfloat-equal" # warns about high-quality code |
7461 | nw="$nw -Winline" # OK to ignore 'inline' | |
6ec9a5a7 | 7462 | nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. |
da8ed5ba GM |
7463 | nw="$nw -Wstrict-overflow" # OK to optimize assuming that |
7464 | # signed overflow has undefined behavior | |
fd9d2a9d GM |
7465 | nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning |
7466 | nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations | |
a6b92a4a GM |
7467 | |
7468 | # Emacs doesn't care about shadowing; see | |
7469 | # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | |
7470 | nw="$nw -Wshadow" | |
7471 | ||
ad33cb00 GM |
7472 | # Emacs's use of alloca inhibits protecting the stack. |
7473 | nw="$nw -Wstack-protector" | |
7474 | ||
da8ed5ba | 7475 | # The following line should be removable at some point. |
a6b92a4a GM |
7476 | nw="$nw -Wsuggest-attribute=pure" |
7477 | ||
7478 | ||
7479 | ||
7480 | if test -n "$GCC"; then | |
7481 | ||
7482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 | |
7483 | $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } | |
7484 | if test "${gl_cv_cc_nomfi_supported+set}" = set; then : | |
7485 | $as_echo_n "(cached) " >&6 | |
7486 | else | |
7487 | ||
7488 | gl_save_CFLAGS="$CFLAGS" | |
7489 | CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" | |
7490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
7491 | /* end confdefs.h. */ |
7492 | ||
7493 | int | |
7494 | main () | |
7495 | { | |
7496 | ||
7497 | ; | |
7498 | return 0; | |
7499 | } | |
7500 | _ACEOF | |
7501 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 7502 | gl_cv_cc_nomfi_supported=yes |
067d23c9 | 7503 | else |
a6b92a4a | 7504 | gl_cv_cc_nomfi_supported=no |
067d23c9 KY |
7505 | fi |
7506 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
7507 | CFLAGS="$gl_save_CFLAGS" |
7508 | fi | |
7509 | ||
7510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 | |
7511 | $as_echo "$gl_cv_cc_nomfi_supported" >&6; } | |
7512 | ||
7513 | if test "$gl_cv_cc_nomfi_supported" = yes; then | |
7514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 | |
7515 | $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } | |
7516 | if test "${gl_cv_cc_nomfi_needed+set}" = set; then : | |
7517 | $as_echo_n "(cached) " >&6 | |
7518 | else | |
7519 | ||
7520 | gl_save_CFLAGS="$CFLAGS" | |
7521 | CFLAGS="$CFLAGS -W -Werror" | |
7522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7523 | /* end confdefs.h. */ | |
7524 | void f (void) | |
7525 | { | |
7526 | typedef struct { int a; int b; } s_t; | |
7527 | s_t s1 = { 0, }; | |
7528 | } | |
7529 | ||
7530 | int | |
7531 | main () | |
7532 | { | |
7533 | ||
7534 | ; | |
7535 | return 0; | |
7536 | } | |
7537 | _ACEOF | |
7538 | if ac_fn_c_try_compile "$LINENO"; then : | |
7539 | gl_cv_cc_nomfi_needed=no | |
7540 | else | |
7541 | gl_cv_cc_nomfi_needed=yes | |
7542 | fi | |
7543 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7544 | CFLAGS="$gl_save_CFLAGS" | |
7545 | ||
7546 | fi | |
7547 | ||
7548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 | |
7549 | $as_echo "$gl_cv_cc_nomfi_needed" >&6; } | |
7550 | fi | |
b6c9d18d GM |
7551 | |
7552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5 | |
7553 | $as_echo_n "checking whether -Wuninitialized is supported... " >&6; } | |
7554 | if test "${gl_cv_cc_uninitialized_supported+set}" = set; then : | |
7555 | $as_echo_n "(cached) " >&6 | |
7556 | else | |
7557 | ||
7558 | gl_save_CFLAGS="$CFLAGS" | |
7559 | CFLAGS="$CFLAGS -Werror -Wuninitialized" | |
7560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7561 | /* end confdefs.h. */ | |
7562 | ||
7563 | int | |
7564 | main () | |
7565 | { | |
7566 | ||
7567 | ; | |
7568 | return 0; | |
7569 | } | |
7570 | _ACEOF | |
7571 | if ac_fn_c_try_compile "$LINENO"; then : | |
7572 | gl_cv_cc_uninitialized_supported=yes | |
7573 | else | |
7574 | gl_cv_cc_uninitialized_supported=no | |
7575 | fi | |
7576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7577 | CFLAGS="$gl_save_CFLAGS" | |
7578 | fi | |
7579 | ||
7580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5 | |
7581 | $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } | |
7582 | ||
a6b92a4a GM |
7583 | fi |
7584 | ||
b6c9d18d | 7585 | # List all gcc warning categories. |
a6b92a4a GM |
7586 | gl_manywarn_set= |
7587 | for gl_manywarn_item in \ | |
a6b92a4a | 7588 | -W \ |
dcde497f GM |
7589 | -Wabi \ |
7590 | -Waddress \ | |
7591 | -Wall \ | |
7592 | -Warray-bounds \ | |
7593 | -Wattributes \ | |
a6b92a4a | 7594 | -Wbad-function-cast \ |
a6b92a4a | 7595 | -Wbuiltin-macro-redefined \ |
dcde497f GM |
7596 | -Wcast-align \ |
7597 | -Wchar-subscripts \ | |
7598 | -Wclobbered \ | |
7599 | -Wcomment \ | |
7600 | -Wcomments \ | |
a6b92a4a | 7601 | -Wcoverage-mismatch \ |
a6b92a4a GM |
7602 | -Wcpp \ |
7603 | -Wdeprecated \ | |
7604 | -Wdeprecated-declarations \ | |
dcde497f | 7605 | -Wdisabled-optimization \ |
a6b92a4a GM |
7606 | -Wdiv-by-zero \ |
7607 | -Wdouble-promotion \ | |
dcde497f | 7608 | -Wempty-body \ |
a6b92a4a | 7609 | -Wendif-labels \ |
dcde497f | 7610 | -Wenum-compare \ |
a6b92a4a GM |
7611 | -Wextra \ |
7612 | -Wformat-contains-nul \ | |
7613 | -Wformat-extra-args \ | |
dcde497f GM |
7614 | -Wformat-nonliteral \ |
7615 | -Wformat-security \ | |
7616 | -Wformat-y2k \ | |
a6b92a4a GM |
7617 | -Wformat-zero-length \ |
7618 | -Wformat=2 \ | |
dcde497f GM |
7619 | -Wfree-nonheap-object \ |
7620 | -Wignored-qualifiers \ | |
7621 | -Wimplicit \ | |
7622 | -Wimplicit-function-declaration \ | |
7623 | -Wimplicit-int \ | |
7624 | -Winit-self \ | |
7625 | -Winline \ | |
7626 | -Wint-to-pointer-cast \ | |
7627 | -Winvalid-memory-model \ | |
7628 | -Winvalid-pch \ | |
7629 | -Wjump-misses-init \ | |
7630 | -Wlogical-op \ | |
7631 | -Wmain \ | |
7632 | -Wmaybe-uninitialized \ | |
7633 | -Wmissing-braces \ | |
7634 | -Wmissing-declarations \ | |
7635 | -Wmissing-field-initializers \ | |
7636 | -Wmissing-format-attribute \ | |
7637 | -Wmissing-include-dirs \ | |
7638 | -Wmissing-noreturn \ | |
7639 | -Wmissing-parameter-type \ | |
7640 | -Wmissing-prototypes \ | |
7641 | -Wmudflap \ | |
a6b92a4a | 7642 | -Wmultichar \ |
dcde497f GM |
7643 | -Wnarrowing \ |
7644 | -Wnested-externs \ | |
7645 | -Wnonnull \ | |
a6b92a4a | 7646 | -Wnormalized=nfc \ |
dcde497f GM |
7647 | -Wold-style-declaration \ |
7648 | -Wold-style-definition \ | |
a6b92a4a | 7649 | -Woverflow \ |
dcde497f GM |
7650 | -Woverlength-strings \ |
7651 | -Woverride-init \ | |
7652 | -Wpacked \ | |
7653 | -Wpacked-bitfield-compat \ | |
7654 | -Wparentheses \ | |
7655 | -Wpointer-arith \ | |
7656 | -Wpointer-sign \ | |
a6b92a4a GM |
7657 | -Wpointer-to-int-cast \ |
7658 | -Wpragmas \ | |
dcde497f GM |
7659 | -Wreturn-type \ |
7660 | -Wsequence-point \ | |
7661 | -Wshadow \ | |
7662 | -Wsizeof-pointer-memaccess \ | |
7663 | -Wstack-protector \ | |
7664 | -Wstrict-aliasing \ | |
7665 | -Wstrict-overflow \ | |
7666 | -Wstrict-prototypes \ | |
a6b92a4a | 7667 | -Wsuggest-attribute=const \ |
dcde497f | 7668 | -Wsuggest-attribute=format \ |
a6b92a4a GM |
7669 | -Wsuggest-attribute=noreturn \ |
7670 | -Wsuggest-attribute=pure \ | |
dcde497f GM |
7671 | -Wswitch \ |
7672 | -Wswitch-default \ | |
7673 | -Wsync-nand \ | |
7674 | -Wsystem-headers \ | |
a6b92a4a | 7675 | -Wtrampolines \ |
dcde497f GM |
7676 | -Wtrigraphs \ |
7677 | -Wtype-limits \ | |
7678 | -Wuninitialized \ | |
7679 | -Wunknown-pragmas \ | |
7680 | -Wunreachable-code \ | |
7681 | -Wunsafe-loop-optimizations \ | |
7682 | -Wunused \ | |
7683 | -Wunused-but-set-parameter \ | |
7684 | -Wunused-but-set-variable \ | |
7685 | -Wunused-function \ | |
7686 | -Wunused-label \ | |
7687 | -Wunused-local-typedefs \ | |
7688 | -Wunused-macros \ | |
7689 | -Wunused-parameter \ | |
7690 | -Wunused-result \ | |
7691 | -Wunused-value \ | |
7692 | -Wunused-variable \ | |
7693 | -Wvarargs \ | |
7694 | -Wvariadic-macros \ | |
7695 | -Wvector-operation-performance \ | |
7696 | -Wvla \ | |
7697 | -Wvolatile-register-var \ | |
7698 | -Wwrite-strings \ | |
7699 | \ | |
a6b92a4a GM |
7700 | ; do |
7701 | gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" | |
7702 | done | |
7703 | ||
b6c9d18d | 7704 | # Disable specific options as needed. |
a6b92a4a GM |
7705 | if test "$gl_cv_cc_nomfi_needed" = yes; then |
7706 | gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" | |
7707 | fi | |
7708 | ||
b6c9d18d GM |
7709 | if test "$gl_cv_cc_uninitialized_supported" = no; then |
7710 | gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized" | |
7711 | fi | |
7712 | ||
a6b92a4a GM |
7713 | ws=$gl_manywarn_set |
7714 | ||
7715 | ||
7716 | gl_warn_set= | |
7717 | set x $ws; shift | |
7718 | for gl_warn_item | |
7719 | do | |
7720 | case " $nw " in | |
7721 | *" $gl_warn_item "*) | |
7722 | ;; | |
7723 | *) | |
7724 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
7725 | ;; | |
7726 | esac | |
7727 | done | |
7728 | ws=$gl_warn_set | |
7729 | ||
7730 | for w in $ws; do | |
7731 | as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh` | |
7732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5 | |
7733 | $as_echo_n "checking whether C compiler handles $w... " >&6; } | |
7734 | if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7735 | $as_echo_n "(cached) " >&6 | |
7736 | else | |
7737 | ||
7738 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7739 | as_fn_append CFLAGS " $w" |
a6b92a4a GM |
7740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7741 | /* end confdefs.h. */ | |
7742 | ||
7743 | int | |
7744 | main () | |
7745 | { | |
7746 | ||
7747 | ; | |
7748 | return 0; | |
7749 | } | |
7750 | _ACEOF | |
7751 | if ac_fn_c_try_compile "$LINENO"; then : | |
7752 | eval "$as_gl_Warn=yes" | |
7753 | else | |
7754 | eval "$as_gl_Warn=no" | |
7755 | fi | |
7756 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7757 | CFLAGS="$gl_save_compiler_FLAGS" | |
7758 | ||
7759 | fi | |
7760 | eval ac_res=\$$as_gl_Warn | |
7761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7762 | $as_echo "$ac_res" >&6; } | |
7763 | eval as_val=\$$as_gl_Warn | |
7764 | if test "x$as_val" = x""yes; then : | |
7765 | as_fn_append WARN_CFLAGS " $w" | |
7766 | fi | |
7767 | ||
0eb775a3 | 7768 | |
a6b92a4a GM |
7769 | done |
7770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 | |
7771 | $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } | |
7772 | if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then : | |
7773 | $as_echo_n "(cached) " >&6 | |
7774 | else | |
7775 | ||
7776 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7777 | as_fn_append CFLAGS " -Wno-missing-field-initializers" |
a6b92a4a GM |
7778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7779 | /* end confdefs.h. */ | |
7780 | ||
7781 | int | |
7782 | main () | |
7783 | { | |
7784 | ||
7785 | ; | |
7786 | return 0; | |
7787 | } | |
7788 | _ACEOF | |
7789 | if ac_fn_c_try_compile "$LINENO"; then : | |
7790 | gl_cv_warn_c__Wno_missing_field_initializers=yes | |
7791 | else | |
7792 | gl_cv_warn_c__Wno_missing_field_initializers=no | |
7793 | fi | |
7794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7795 | CFLAGS="$gl_save_compiler_FLAGS" | |
7796 | ||
7797 | fi | |
7798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5 | |
7799 | $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; } | |
7800 | if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then : | |
7801 | as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" | |
7802 | fi | |
0eb775a3 | 7803 | |
a6b92a4a GM |
7804 | # We need this one |
7805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 | |
7806 | $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; } | |
7807 | if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then : | |
7808 | $as_echo_n "(cached) " >&6 | |
7809 | else | |
7810 | ||
7811 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7812 | as_fn_append CFLAGS " -Wno-sign-compare" |
a6b92a4a GM |
7813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7814 | /* end confdefs.h. */ | |
7815 | ||
7816 | int | |
7817 | main () | |
7818 | { | |
7819 | ||
7820 | ; | |
7821 | return 0; | |
7822 | } | |
7823 | _ACEOF | |
7824 | if ac_fn_c_try_compile "$LINENO"; then : | |
7825 | gl_cv_warn_c__Wno_sign_compare=yes | |
7826 | else | |
7827 | gl_cv_warn_c__Wno_sign_compare=no | |
7828 | fi | |
7829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7830 | CFLAGS="$gl_save_compiler_FLAGS" | |
7831 | ||
7832 | fi | |
7833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5 | |
7834 | $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; } | |
7835 | if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then : | |
7836 | as_fn_append WARN_CFLAGS " -Wno-sign-compare" | |
7837 | fi | |
0eb775a3 | 7838 | |
a6b92a4a GM |
7839 | # Too many warnings for now |
7840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5 | |
7841 | $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; } | |
7842 | if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then : | |
7843 | $as_echo_n "(cached) " >&6 | |
7844 | else | |
7845 | ||
7846 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7847 | as_fn_append CFLAGS " -Wno-type-limits" |
a6b92a4a GM |
7848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7849 | /* end confdefs.h. */ | |
7850 | ||
7851 | int | |
7852 | main () | |
7853 | { | |
7854 | ||
7855 | ; | |
7856 | return 0; | |
7857 | } | |
7858 | _ACEOF | |
7859 | if ac_fn_c_try_compile "$LINENO"; then : | |
7860 | gl_cv_warn_c__Wno_type_limits=yes | |
7861 | else | |
7862 | gl_cv_warn_c__Wno_type_limits=no | |
7863 | fi | |
7864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7865 | CFLAGS="$gl_save_compiler_FLAGS" | |
7866 | ||
7867 | fi | |
7868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5 | |
7869 | $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; } | |
7870 | if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then : | |
7871 | as_fn_append WARN_CFLAGS " -Wno-type-limits" | |
7872 | fi | |
0eb775a3 | 7873 | |
a6b92a4a GM |
7874 | # Too many warnings for now |
7875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5 | |
7876 | $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; } | |
7877 | if test "${gl_cv_warn_c__Wno_switch+set}" = set; then : | |
7878 | $as_echo_n "(cached) " >&6 | |
7879 | else | |
7880 | ||
7881 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7882 | as_fn_append CFLAGS " -Wno-switch" |
a6b92a4a GM |
7883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7884 | /* end confdefs.h. */ | |
7885 | ||
7886 | int | |
7887 | main () | |
7888 | { | |
7889 | ||
7890 | ; | |
7891 | return 0; | |
7892 | } | |
7893 | _ACEOF | |
7894 | if ac_fn_c_try_compile "$LINENO"; then : | |
7895 | gl_cv_warn_c__Wno_switch=yes | |
7896 | else | |
7897 | gl_cv_warn_c__Wno_switch=no | |
7898 | fi | |
7899 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7900 | CFLAGS="$gl_save_compiler_FLAGS" | |
7901 | ||
7902 | fi | |
7903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5 | |
7904 | $as_echo "$gl_cv_warn_c__Wno_switch" >&6; } | |
7905 | if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then : | |
7906 | as_fn_append WARN_CFLAGS " -Wno-switch" | |
7907 | fi | |
0eb775a3 | 7908 | |
a6b92a4a GM |
7909 | # Too many warnings for now |
7910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 | |
7911 | $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; } | |
7912 | if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then : | |
7913 | $as_echo_n "(cached) " >&6 | |
7914 | else | |
7915 | ||
7916 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7917 | as_fn_append CFLAGS " -Wno-unused-parameter" |
a6b92a4a GM |
7918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7919 | /* end confdefs.h. */ | |
7920 | ||
7921 | int | |
7922 | main () | |
7923 | { | |
7924 | ||
7925 | ; | |
7926 | return 0; | |
7927 | } | |
7928 | _ACEOF | |
7929 | if ac_fn_c_try_compile "$LINENO"; then : | |
7930 | gl_cv_warn_c__Wno_unused_parameter=yes | |
7931 | else | |
7932 | gl_cv_warn_c__Wno_unused_parameter=no | |
7933 | fi | |
7934 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7935 | CFLAGS="$gl_save_compiler_FLAGS" | |
7936 | ||
7937 | fi | |
7938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5 | |
7939 | $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; } | |
7940 | if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then : | |
7941 | as_fn_append WARN_CFLAGS " -Wno-unused-parameter" | |
7942 | fi | |
0eb775a3 | 7943 | |
a6b92a4a GM |
7944 | # Too many warnings for now |
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 | |
7946 | $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } | |
7947 | if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then : | |
7948 | $as_echo_n "(cached) " >&6 | |
7949 | else | |
7950 | ||
7951 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7952 | as_fn_append CFLAGS " -Wno-format-nonliteral" |
a6b92a4a GM |
7953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7954 | /* end confdefs.h. */ | |
7955 | ||
7956 | int | |
7957 | main () | |
7958 | { | |
7959 | ||
7960 | ; | |
7961 | return 0; | |
7962 | } | |
7963 | _ACEOF | |
7964 | if ac_fn_c_try_compile "$LINENO"; then : | |
7965 | gl_cv_warn_c__Wno_format_nonliteral=yes | |
7966 | else | |
7967 | gl_cv_warn_c__Wno_format_nonliteral=no | |
7968 | fi | |
7969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7970 | CFLAGS="$gl_save_compiler_FLAGS" | |
7971 | ||
7972 | fi | |
7973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5 | |
7974 | $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; } | |
7975 | if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then : | |
7976 | as_fn_append WARN_CFLAGS " -Wno-format-nonliteral" | |
7977 | fi | |
7978 | ||
7979 | ||
0eb775a3 | 7980 | |
a6b92a4a GM |
7981 | # In spite of excluding -Wlogical-op above, it is enabled, as of |
7982 | # gcc 4.5.0 20090517. | |
7983 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 | |
7984 | $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; } | |
7985 | if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then : | |
7986 | $as_echo_n "(cached) " >&6 | |
7987 | else | |
7988 | ||
7989 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 7990 | as_fn_append CFLAGS " -Wno-logical-op" |
a6b92a4a GM |
7991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7992 | /* end confdefs.h. */ | |
7993 | ||
7994 | int | |
7995 | main () | |
7996 | { | |
7997 | ||
7998 | ; | |
7999 | return 0; | |
8000 | } | |
8001 | _ACEOF | |
8002 | if ac_fn_c_try_compile "$LINENO"; then : | |
8003 | gl_cv_warn_c__Wno_logical_op=yes | |
8004 | else | |
8005 | gl_cv_warn_c__Wno_logical_op=no | |
8006 | fi | |
8007 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8008 | CFLAGS="$gl_save_compiler_FLAGS" | |
8009 | ||
8010 | fi | |
8011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5 | |
8012 | $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; } | |
8013 | if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then : | |
8014 | as_fn_append WARN_CFLAGS " -Wno-logical-op" | |
8015 | fi | |
8016 | ||
8017 | ||
0eb775a3 | 8018 | |
a6b92a4a GM |
8019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 |
8020 | $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } | |
8021 | if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then : | |
8022 | $as_echo_n "(cached) " >&6 | |
8023 | else | |
8024 | ||
8025 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 8026 | as_fn_append CFLAGS " -fdiagnostics-show-option" |
a6b92a4a | 8027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
8028 | /* end confdefs.h. */ |
8029 | ||
8030 | int | |
8031 | main () | |
8032 | { | |
8033 | ||
8034 | ; | |
8035 | return 0; | |
8036 | } | |
8037 | _ACEOF | |
8038 | if ac_fn_c_try_compile "$LINENO"; then : | |
a6b92a4a | 8039 | gl_cv_warn_c__fdiagnostics_show_option=yes |
067d23c9 | 8040 | else |
a6b92a4a | 8041 | gl_cv_warn_c__fdiagnostics_show_option=no |
067d23c9 KY |
8042 | fi |
8043 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
a6b92a4a GM |
8044 | CFLAGS="$gl_save_compiler_FLAGS" |
8045 | ||
8046 | fi | |
8047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5 | |
8048 | $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; } | |
8049 | if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then : | |
8050 | as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" | |
067d23c9 | 8051 | fi |
067d23c9 | 8052 | |
0eb775a3 | 8053 | |
a6b92a4a GM |
8054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 |
8055 | $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } | |
8056 | if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then : | |
8057 | $as_echo_n "(cached) " >&6 | |
8058 | else | |
8059 | ||
8060 | gl_save_compiler_FLAGS="$CFLAGS" | |
0eb775a3 | 8061 | as_fn_append CFLAGS " -funit-at-a-time" |
a6b92a4a GM |
8062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8063 | /* end confdefs.h. */ | |
8064 | ||
8065 | int | |
8066 | main () | |
8067 | { | |
8068 | ||
8069 | ; | |
8070 | return 0; | |
8071 | } | |
8072 | _ACEOF | |
8073 | if ac_fn_c_try_compile "$LINENO"; then : | |
8074 | gl_cv_warn_c__funit_at_a_time=yes | |
8075 | else | |
8076 | gl_cv_warn_c__funit_at_a_time=no | |
8077 | fi | |
8078 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8079 | CFLAGS="$gl_save_compiler_FLAGS" | |
8080 | ||
8081 | fi | |
8082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5 | |
8083 | $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; } | |
8084 | if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then : | |
8085 | as_fn_append WARN_CFLAGS " -funit-at-a-time" | |
8086 | fi | |
8087 | ||
8088 | ||
8089 | ||
0eb775a3 | 8090 | |
a6b92a4a GM |
8091 | $as_echo "#define lint 1" >>confdefs.h |
8092 | ||
8093 | ||
a6b92a4a GM |
8094 | |
8095 | $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h | |
8096 | ||
8097 | ||
8098 | # We use a slightly smaller set of warning options for lib/. | |
8099 | # Remove the following and save the result in GNULIB_WARN_CFLAGS. | |
8100 | nw= | |
8101 | nw="$nw -Wunused-macros" | |
8102 | ||
8103 | ||
8104 | gl_warn_set= | |
8105 | set x $WARN_CFLAGS; shift | |
8106 | for gl_warn_item | |
8107 | do | |
8108 | case " $nw " in | |
8109 | *" $gl_warn_item "*) | |
8110 | ;; | |
8111 | *) | |
8112 | gl_warn_set="$gl_warn_set $gl_warn_item" | |
8113 | ;; | |
8114 | esac | |
8115 | done | |
8116 | GNULIB_WARN_CFLAGS=$gl_warn_set | |
8117 | ||
8118 | ||
8119 | fi | |
067d23c9 KY |
8120 | |
8121 | ||
8122 | ||
4c5f4270 GM |
8123 | |
8124 | ||
8125 | ||
8126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5 | |
8127 | $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; } | |
8128 | rm -f conf$$ conf$$.file | |
8129 | ||
8130 | LN_S_FILEONLY='cp -p' | |
8131 | ||
8132 | if (echo >conf$$.file) 2>/dev/null; then | |
8133 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
8134 | LN_S_FILEONLY='ln -s' | |
8135 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
8136 | LN_S_FILEONLY=ln | |
8137 | fi | |
8138 | fi | |
8139 | ||
8140 | rm -f conf$$ conf$$.file | |
8141 | ||
8142 | if test "$LN_S_FILEONLY" = "ln -s"; then | |
8143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
0e733db9 GM |
8144 | $as_echo "yes" >&6; } |
8145 | else | |
4c5f4270 GM |
8146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5 |
8147 | $as_echo "no, using $LN_S_FILEONLY" >&6; } | |
0e733db9 GM |
8148 | fi |
8149 | ||
067d23c9 | 8150 | |
4c5f4270 GM |
8151 | |
8152 | ||
067d23c9 KY |
8153 | # Extract the first word of "install-info", so it can be a program name with args. |
8154 | set dummy install-info; ac_word=$2 | |
8155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8156 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8157 | if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : |
067d23c9 KY |
8158 | $as_echo_n "(cached) " >&6 |
8159 | else | |
8160 | case $INSTALL_INFO in | |
8161 | [\\/]* | ?:[\\/]*) | |
8162 | ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. | |
8163 | ;; | |
8164 | *) | |
8165 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e700232f | 8166 | for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin |
067d23c9 KY |
8167 | do |
8168 | IFS=$as_save_IFS | |
8169 | test -z "$as_dir" && as_dir=. | |
8170 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8171 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8172 | ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" | |
8173 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8174 | break 2 | |
8175 | fi | |
8176 | done | |
8177 | done | |
8178 | IFS=$as_save_IFS | |
8179 | ||
8180 | test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" | |
8181 | ;; | |
8182 | esac | |
8183 | fi | |
8184 | INSTALL_INFO=$ac_cv_path_INSTALL_INFO | |
8185 | if test -n "$INSTALL_INFO"; then | |
8186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 | |
8187 | $as_echo "$INSTALL_INFO" >&6; } | |
8188 | else | |
8189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8190 | $as_echo "no" >&6; } | |
8191 | fi | |
8192 | ||
8193 | ||
8194 | # Extract the first word of "gzip", so it can be a program name with args. | |
8195 | set dummy gzip; ac_word=$2 | |
8196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8197 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8198 | if test "${ac_cv_path_GZIP_PROG+set}" = set; then : |
067d23c9 KY |
8199 | $as_echo_n "(cached) " >&6 |
8200 | else | |
8201 | case $GZIP_PROG in | |
8202 | [\\/]* | ?:[\\/]*) | |
8203 | ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path. | |
8204 | ;; | |
8205 | *) | |
8206 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8207 | for as_dir in $PATH | |
8208 | do | |
8209 | IFS=$as_save_IFS | |
8210 | test -z "$as_dir" && as_dir=. | |
8211 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8212 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8213 | ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext" | |
8214 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8215 | break 2 | |
8216 | fi | |
8217 | done | |
8218 | done | |
8219 | IFS=$as_save_IFS | |
8220 | ||
8221 | ;; | |
8222 | esac | |
8223 | fi | |
8224 | GZIP_PROG=$ac_cv_path_GZIP_PROG | |
8225 | if test -n "$GZIP_PROG"; then | |
8226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5 | |
8227 | $as_echo "$GZIP_PROG" >&6; } | |
8228 | else | |
8229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8230 | $as_echo "no" >&6; } | |
8231 | fi | |
8232 | ||
8233 | ||
7ee3791f GM |
8234 | |
8235 | if test $opsys = gnu-linux; then | |
8236 | # Extract the first word of "paxctl", so it can be a program name with args. | |
9c29597b GM |
8237 | set dummy paxctl; ac_word=$2 |
8238 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8239 | $as_echo_n "checking for $ac_word... " >&6; } | |
8240 | if test "${ac_cv_path_PAXCTL+set}" = set; then : | |
8241 | $as_echo_n "(cached) " >&6 | |
8242 | else | |
8243 | case $PAXCTL in | |
8244 | [\\/]* | ?:[\\/]*) | |
8245 | ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path. | |
8246 | ;; | |
8247 | *) | |
8248 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8249 | for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin | |
8250 | do | |
8251 | IFS=$as_save_IFS | |
8252 | test -z "$as_dir" && as_dir=. | |
8253 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8254 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8255 | ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext" | |
8256 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8257 | break 2 | |
8258 | fi | |
8259 | done | |
8260 | done | |
8261 | IFS=$as_save_IFS | |
8262 | ||
8263 | ;; | |
8264 | esac | |
8265 | fi | |
8266 | PAXCTL=$ac_cv_path_PAXCTL | |
8267 | if test -n "$PAXCTL"; then | |
8268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5 | |
8269 | $as_echo "$PAXCTL" >&6; } | |
8270 | else | |
8271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8272 | $as_echo "no" >&6; } | |
8273 | fi | |
8274 | ||
8275 | ||
685e57ea GM |
8276 | if test "X$PAXCTL" != X; then |
8277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5 | |
8278 | $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; } | |
8279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8280 | /* end confdefs.h. */ | |
8281 | ||
8282 | int | |
8283 | main () | |
8284 | { | |
8285 | ||
8286 | ; | |
8287 | return 0; | |
8288 | } | |
8289 | _ACEOF | |
8290 | if ac_fn_c_try_link "$LINENO"; then : | |
8291 | if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8292 | $as_echo "yes" >&6; } | |
8293 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8294 | $as_echo "no" >&6; }; PAXCTL=""; fi | |
8295 | fi | |
8296 | rm -f core conftest.err conftest.$ac_objext \ | |
8297 | conftest$ac_exeext conftest.$ac_ext | |
8298 | fi | |
7ee3791f | 8299 | fi |
067d23c9 | 8300 | |
9e40dda4 | 8301 | ## Need makeinfo >= 4.7 (?) to build the manuals. |
067d23c9 KY |
8302 | # Extract the first word of "makeinfo", so it can be a program name with args. |
8303 | set dummy makeinfo; ac_word=$2 | |
8304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8305 | $as_echo_n "checking for $ac_word... " >&6; } | |
a9bec17c | 8306 | if test "${ac_cv_path_MAKEINFO+set}" = set; then : |
067d23c9 KY |
8307 | $as_echo_n "(cached) " >&6 |
8308 | else | |
8309 | case $MAKEINFO in | |
8310 | [\\/]* | ?:[\\/]*) | |
8311 | ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. | |
8312 | ;; | |
8313 | *) | |
8314 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8315 | for as_dir in $PATH | |
8316 | do | |
8317 | IFS=$as_save_IFS | |
8318 | test -z "$as_dir" && as_dir=. | |
8319 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8320 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8321 | ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" | |
8322 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8323 | break 2 | |
8324 | fi | |
8325 | done | |
8326 | done | |
8327 | IFS=$as_save_IFS | |
8328 | ||
8329 | test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no" | |
8330 | ;; | |
8331 | esac | |
8332 | fi | |
8333 | MAKEINFO=$ac_cv_path_MAKEINFO | |
8334 | if test -n "$MAKEINFO"; then | |
8335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 | |
8336 | $as_echo "$MAKEINFO" >&6; } | |
8337 | else | |
8338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8339 | $as_echo "no" >&6; } | |
8340 | fi | |
8341 | ||
8342 | ||
b5591ebb GM |
8343 | if test "$MAKEINFO" != "no"; then |
8344 | case ` | |
8345 | $MAKEINFO --version 2> /dev/null | | |
8346 | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)' | |
8347 | ` in | |
8348 | '') MAKEINFO=no;; | |
8349 | esac | |
067d23c9 KY |
8350 | fi |
8351 | ||
8352 | ## Makeinfo is unusual. For a released Emacs, the manuals are | |
8353 | ## pre-built, and not deleted by the normal clean rules. makeinfo is | |
8354 | ## therefore in the category of "special tools" not normally required, which | |
8355 | ## configure does not have to check for (eg autoconf itself). | |
8356 | ## In a Bazaar checkout on the other hand, the manuals are not included. | |
8357 | ## So makeinfo is a requirement to build from Bazaar, and configure | |
8358 | ## should test for it as it does for any other build requirement. | |
8359 | ## We use the presence of $srcdir/info/emacs to distinguish a release, | |
8360 | ## with pre-built manuals, from a Bazaar checkout. | |
96f129d5 GM |
8361 | HAVE_MAKEINFO=yes |
8362 | ||
067d23c9 | 8363 | if test "$MAKEINFO" = "no"; then |
96f129d5 | 8364 | MAKEINFO=makeinfo |
067d23c9 | 8365 | if test "x${with_makeinfo}" = "xno"; then |
96f129d5 | 8366 | HAVE_MAKEINFO=no |
b5591ebb | 8367 | elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then |
9e40dda4 | 8368 | as_fn_error "You do not seem to have makeinfo >= 4.7, and your |
067d23c9 KY |
8369 | source tree does not seem to have pre-built manuals in the \`info' directory. |
8370 | Either install a suitable version of makeinfo, or re-run configure | |
8371 | with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 | |
8372 | fi | |
8373 | fi | |
8374 | ||
8375 | ||
141d074d GM |
8376 | INFO_EXT=.info |
8377 | INFO_OPTS=--no-split | |
8378 | ||
8379 | ||
8380 | ||
96f129d5 | 8381 | |
067d23c9 KY |
8382 | if test x$GCC = xyes; then |
8383 | test "x$GCC_LINK_TEST_OPTIONS" != x && \ | |
8384 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
8385 | else | |
8386 | test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ | |
8387 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
8388 | fi | |
8389 | ||
8390 | ||
8391 | late_LDFLAGS=$LDFLAGS | |
8392 | if test x$GCC = xyes; then | |
8393 | LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
8394 | else | |
8395 | LDFLAGS="$LDFLAGS -znocombreloc" | |
8396 | fi | |
8397 | ||
8398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5 | |
8399 | $as_echo_n "checking for -znocombreloc... " >&6; } | |
8400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8401 | /* end confdefs.h. */ | |
8402 | ||
8403 | int | |
8404 | main () | |
8405 | { | |
8406 | ||
8407 | ; | |
8408 | return 0; | |
8409 | } | |
8410 | _ACEOF | |
8411 | if ac_fn_c_try_link "$LINENO"; then : | |
8412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8413 | $as_echo "yes" >&6; } | |
8414 | else | |
8415 | LDFLAGS=$late_LDFLAGS | |
8416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8417 | $as_echo "no" >&6; } | |
8418 | fi | |
8419 | rm -f core conftest.err conftest.$ac_objext \ | |
8420 | conftest$ac_exeext conftest.$ac_ext | |
8421 | ||
8422 | ||
125c3718 | 8423 | test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no |
067d23c9 | 8424 | case "$opsys" in |
125c3718 PE |
8425 | your-opsys-here) CANNOT_DUMP=yes ;; |
8426 | esac | |
8427 | ||
8428 | test "$CANNOT_DUMP" = "yes" && \ | |
067d23c9 KY |
8429 | |
8430 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
8431 | ||
125c3718 | 8432 | |
067d23c9 KY |
8433 | |
8434 | ||
8435 | ||
8436 | UNEXEC_OBJ=unexelf.o | |
8437 | case "$opsys" in | |
8438 | # MSDOS uses unexcoff.o | |
8439 | # MSWindows uses unexw32.o | |
8440 | aix4-2) | |
8441 | UNEXEC_OBJ=unexaix.o | |
8442 | ;; | |
8443 | cygwin) | |
8444 | UNEXEC_OBJ=unexcw.o | |
8445 | ;; | |
8446 | darwin) | |
8447 | UNEXEC_OBJ=unexmacosx.o | |
8448 | ;; | |
8449 | hpux10-20 | hpux11) | |
8450 | UNEXEC_OBJ=unexhp9k800.o | |
8451 | ;; | |
8452 | sol2-10) | |
8453 | # Use the Solaris dldump() function, called from unexsol.c, to dump | |
8454 | # emacs, instead of the generic ELF dump code found in unexelf.c. | |
8455 | # The resulting binary has a complete symbol table, and is better | |
8456 | # for debugging and other observability tools (debuggers, pstack, etc). | |
8457 | # | |
8458 | # If you encounter a problem using dldump(), please consider sending | |
8459 | # a message to the OpenSolaris tools-linking mailing list: | |
8460 | # http://mail.opensolaris.org/mailman/listinfo/tools-linking | |
8461 | # | |
8462 | # It is likely that dldump() works with older Solaris too, but this has | |
8463 | # not been tested, so for now this change is for Solaris 10 or newer. | |
8464 | UNEXEC_OBJ=unexsol.o | |
8465 | ;; | |
8466 | esac | |
8467 | ||
8468 | LD_SWITCH_SYSTEM= | |
8469 | case "$opsys" in | |
87e1a811 | 8470 | freebsd|dragonfly) |
067d23c9 KY |
8471 | ## Let `ld' find image libs and similar things in /usr/local/lib. |
8472 | ## The system compiler, GCC, has apparently been modified to not | |
8473 | ## look there, contrary to what a stock GCC would do. | |
a7479549 GM |
8474 | ### It's not our place to do this. See bug#10313#17. |
8475 | ### LD_SWITCH_SYSTEM=-L/usr/local/lib | |
8476 | : | |
067d23c9 KY |
8477 | ;; |
8478 | ||
8479 | gnu-linux) | |
8480 | ## cpp test was "ifdef __mips__", but presumably this is equivalent... | |
d6a003a8 | 8481 | case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac |
067d23c9 KY |
8482 | ;; |
8483 | ||
8484 | netbsd) | |
a7479549 GM |
8485 | ### It's not our place to do this. See bug#10313#17. |
8486 | ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" | |
8487 | : | |
067d23c9 KY |
8488 | ;; |
8489 | ||
8490 | openbsd) | |
8491 | ## Han Boetes <han@mijncomputer.nl> says this is necessary, | |
8492 | ## otherwise Emacs dumps core on elf systems. | |
8493 | LD_SWITCH_SYSTEM="-Z" | |
8494 | ;; | |
8495 | esac | |
8496 | ||
8497 | ||
8498 | ac_link="$ac_link $LD_SWITCH_SYSTEM" | |
8499 | ||
ae629dae | 8500 | ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH, |
067d23c9 KY |
8501 | ## which has not been defined yet. When this was handled with cpp, |
8502 | ## it was expanded to null when configure sourced the s/*.h file. | |
8503 | ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. | |
8504 | ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS | |
8505 | ## (or somesuch), but because it is supposed to go at the _front_ | |
8506 | ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. | |
8507 | ## Compare with the gnu-linux case below, which added to the end | |
8508 | ## of LD_SWITCH_SYSTEM, and so can instead go at the front of | |
8509 | ## LD_SWITCH_SYSTEM_TEMACS. | |
8510 | case "$opsys" in | |
8511 | netbsd|openbsd) | |
ae629dae | 8512 | LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;; |
067d23c9 KY |
8513 | esac |
8514 | ||
8515 | ||
8516 | C_SWITCH_MACHINE= | |
42bbbe8b GM |
8517 | case $canonical in |
8518 | alpha*) | |
067d23c9 | 8519 | ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" |
a9bec17c | 8520 | if test "x$ac_cv_have_decl___ELF__" = x""yes; then : |
067d23c9 KY |
8521 | |
8522 | fi | |
8523 | ||
8524 | if test "$ac_cv_have_decl___ELF__" = "yes"; then | |
8525 | ## With ELF, make sure that all common symbols get allocated to in the | |
8526 | ## data section. Otherwise, the dump of temacs may miss variables in | |
8527 | ## the shared library that have been initialized. For example, with | |
8528 | ## GNU libc, __malloc_initialized would normally be resolved to the | |
8529 | ## shared library's .bss section, which is fatal. | |
8530 | if test "x$GCC" = "xyes"; then | |
8531 | C_SWITCH_MACHINE="-fno-common" | |
8532 | else | |
a9bec17c | 8533 | as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 |
067d23c9 KY |
8534 | fi |
8535 | else | |
8536 | UNEXEC_OBJ=unexalpha.o | |
8537 | fi | |
42bbbe8b GM |
8538 | ;; |
8539 | esac | |
067d23c9 KY |
8540 | |
8541 | ||
8542 | ||
8543 | ||
8544 | C_SWITCH_SYSTEM= | |
8545 | ## Some programs in src produce warnings saying certain subprograms | |
8546 | ## are too complex and need a MAXMEM value greater than 2000 for | |
8547 | ## additional optimization. --nils@exp-math.uni-essen.de | |
8548 | test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ | |
8549 | C_SWITCH_SYSTEM="-ma -qmaxmem=4000" | |
8550 | ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. | |
8551 | ## It is redundant in glibc2, since we define _GNU_SOURCE. | |
8552 | ||
8553 | ||
8554 | ||
8555 | LIBS_SYSTEM= | |
8556 | case "$opsys" in | |
8557 | ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. | |
8558 | aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; | |
8559 | ||
87e1a811 | 8560 | freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;; |
067d23c9 KY |
8561 | |
8562 | hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; | |
8563 | ||
1f5d53eb | 8564 | sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;; |
067d23c9 KY |
8565 | |
8566 | ## Motif needs -lgen. | |
8567 | unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; | |
8568 | esac | |
8569 | ||
8570 | ||
8571 | ||
8572 | ### Make sure subsequent tests use flags consistent with the build flags. | |
8573 | ||
8574 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
8575 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
8576 | else | |
8577 | CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" | |
8578 | fi | |
8579 | ||
4fda9c95 GM |
8580 | # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. |
8581 | ||
3e0be4ab GM |
8582 | # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. |
8583 | ||
4fda9c95 | 8584 | |
067d23c9 | 8585 | |
067d23c9 | 8586 | LIB_MATH=-lm |
4717915f | 8587 | SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'` |
067d23c9 KY |
8588 | |
8589 | case $opsys in | |
8590 | cygwin ) | |
8591 | LIB_MATH= | |
067d23c9 KY |
8592 | ;; |
8593 | darwin ) | |
8594 | ## Adding -lm confuses the dynamic linker, so omit it. | |
8595 | LIB_MATH= | |
067d23c9 | 8596 | ;; |
87e1a811 | 8597 | freebsd | dragonfly ) |
15f79fcd | 8598 | SYSTEM_TYPE=berkeley-unix |
067d23c9 KY |
8599 | ;; |
8600 | gnu-linux | gnu-kfreebsd ) | |
067d23c9 KY |
8601 | ;; |
8602 | hpux10-20 | hpux11 ) | |
067d23c9 | 8603 | ;; |
bb72ce91 | 8604 | netbsd | openbsd ) |
15f79fcd | 8605 | SYSTEM_TYPE=berkeley-unix |
067d23c9 | 8606 | ;; |
15f79fcd GM |
8607 | |
8608 | sol2* | unixware ) | |
8609 | SYSTEM_TYPE=usg-unix-v | |
8610 | ;; | |
8611 | ||
067d23c9 KY |
8612 | esac |
8613 | ||
8614 | ||
8615 | ||
15f79fcd GM |
8616 | cat >>confdefs.h <<_ACEOF |
8617 | #define SYSTEM_TYPE "$SYSTEM_TYPE" | |
8618 | _ACEOF | |
8619 | ||
8620 | ||
130f1dac | 8621 | |
5476a9a4 GM |
8622 | pre_PKG_CONFIG_CFLAGS=$CFLAGS |
8623 | pre_PKG_CONFIG_LIBS=$LIBS | |
067d23c9 | 8624 | |
5476a9a4 GM |
8625 | # Extract the first word of "pkg-config", so it can be a program name with args. |
8626 | set dummy pkg-config; ac_word=$2 | |
8627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8628 | $as_echo_n "checking for $ac_word... " >&6; } | |
8629 | if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : | |
8630 | $as_echo_n "(cached) " >&6 | |
8631 | else | |
8632 | case $PKG_CONFIG in | |
8633 | [\\/]* | ?:[\\/]*) | |
8634 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
8635 | ;; | |
8636 | *) | |
8637 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8638 | for as_dir in $PATH | |
8639 | do | |
8640 | IFS=$as_save_IFS | |
8641 | test -z "$as_dir" && as_dir=. | |
8642 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8643 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8644 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
8645 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8646 | break 2 | |
8647 | fi | |
8648 | done | |
8649 | done | |
8650 | IFS=$as_save_IFS | |
8651 | ||
8652 | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" | |
8653 | ;; | |
8654 | esac | |
8655 | fi | |
8656 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
8657 | if test -n "$PKG_CONFIG"; then | |
8658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
8659 | $as_echo "$PKG_CONFIG" >&6; } | |
8660 | else | |
8661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8662 | $as_echo "no" >&6; } | |
8663 | fi | |
f199cab1 GM |
8664 | |
8665 | ||
f199cab1 | 8666 | |
5476a9a4 GM |
8667 | |
8668 | ||
8669 | ||
8670 | if test "${with_sound}" != "no"; then | |
8671 | # Sound support for GNU/Linux and the free BSDs. | |
8672 | for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h | |
8673 | do : | |
8674 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8675 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8676 | eval as_val=\$$as_ac_Header | |
8677 | if test "x$as_val" = x""yes; then : | |
8678 | cat >>confdefs.h <<_ACEOF | |
8679 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8680 | _ACEOF | |
8681 | have_sound_header=yes | |
8682 | fi | |
8683 | ||
8684 | done | |
8685 | ||
8686 | # Emulation library used on NetBSD. | |
8687 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 | |
8688 | $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } | |
8689 | if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : | |
067d23c9 KY |
8690 | $as_echo_n "(cached) " >&6 |
8691 | else | |
5476a9a4 GM |
8692 | ac_check_lib_save_LIBS=$LIBS |
8693 | LIBS="-lossaudio $LIBS" | |
8694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 8695 | /* end confdefs.h. */ |
5476a9a4 GM |
8696 | |
8697 | /* Override any GCC internal prototype to avoid an error. | |
8698 | Use char because int might match the return type of a GCC | |
8699 | builtin and then its argument prototype would still apply. */ | |
8700 | #ifdef __cplusplus | |
8701 | extern "C" | |
8702 | #endif | |
8703 | char _oss_ioctl (); | |
067d23c9 KY |
8704 | int |
8705 | main () | |
8706 | { | |
5476a9a4 | 8707 | return _oss_ioctl (); |
067d23c9 KY |
8708 | ; |
8709 | return 0; | |
8710 | } | |
8711 | _ACEOF | |
8712 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 8713 | ac_cv_lib_ossaudio__oss_ioctl=yes |
067d23c9 | 8714 | else |
5476a9a4 | 8715 | ac_cv_lib_ossaudio__oss_ioctl=no |
067d23c9 KY |
8716 | fi |
8717 | rm -f core conftest.err conftest.$ac_objext \ | |
8718 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
8719 | LIBS=$ac_check_lib_save_LIBS |
8720 | fi | |
8721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 | |
8722 | $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } | |
8723 | if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : | |
8724 | LIBSOUND=-lossaudio | |
8725 | else | |
8726 | LIBSOUND= | |
067d23c9 KY |
8727 | fi |
8728 | ||
8729 | ||
8730 | ||
5476a9a4 GM |
8731 | ALSA_REQUIRED=1.0.0 |
8732 | ALSA_MODULES="alsa >= $ALSA_REQUIRED" | |
8733 | ||
8734 | succeeded=no | |
8735 | ||
8736 | if test "$PKG_CONFIG" = "no" ; then | |
8737 | HAVE_ALSA=no | |
8738 | else | |
8739 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 8740 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
8741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 |
8742 | $as_echo_n "checking for $ALSA_MODULES... " >&6; } | |
8743 | ||
b5591ebb GM |
8744 | if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 && |
8745 | ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` && | |
8746 | ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then | |
5476a9a4 GM |
8747 | edit_cflags=" |
8748 | s,///*,/,g | |
8749 | s/^/ / | |
8750 | s/ -I/ $isystem/g | |
8751 | s/^ // | |
8752 | " | |
8753 | ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` | |
8754 | ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` | |
8755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 | |
8756 | $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } | |
8757 | succeeded=yes | |
8758 | else | |
8759 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8760 | $as_echo "no" >&6; } | |
8761 | ALSA_CFLAGS="" | |
8762 | ALSA_LIBS="" | |
8763 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
8764 | ## do set a variable so people can do so. Do it in a subshell |
8765 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 8766 | ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1` |
5476a9a4 GM |
8767 | |
8768 | fi | |
8769 | ||
8770 | ||
8771 | ||
8772 | else | |
8773 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
8774 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
8775 | fi | |
8776 | fi | |
8777 | ||
8778 | if test $succeeded = yes; then | |
8779 | HAVE_ALSA=yes | |
8780 | else | |
8781 | HAVE_ALSA=no | |
8782 | fi | |
f199cab1 | 8783 | |
5476a9a4 GM |
8784 | if test $HAVE_ALSA = yes; then |
8785 | SAVE_CFLAGS="$CFLAGS" | |
8786 | SAVE_LIBS="$LIBS" | |
8787 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | |
8788 | LIBS="$ALSA_LIBS $LIBS" | |
8789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8790 | /* end confdefs.h. */ | |
8791 | #include <asoundlib.h> | |
067d23c9 KY |
8792 | int |
8793 | main () | |
8794 | { | |
5476a9a4 | 8795 | snd_lib_error_set_handler (0); |
067d23c9 KY |
8796 | ; |
8797 | return 0; | |
8798 | } | |
8799 | _ACEOF | |
5476a9a4 GM |
8800 | if ac_fn_c_try_compile "$LINENO"; then : |
8801 | emacs_alsa_normal=yes | |
067d23c9 | 8802 | else |
5476a9a4 | 8803 | emacs_alsa_normal=no |
067d23c9 | 8804 | fi |
5476a9a4 GM |
8805 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8806 | if test "$emacs_alsa_normal" != yes; then | |
8807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8808 | /* end confdefs.h. */ | |
8809 | #include <alsa/asoundlib.h> | |
8810 | int | |
8811 | main () | |
8812 | { | |
8813 | snd_lib_error_set_handler (0); | |
8814 | ; | |
8815 | return 0; | |
8816 | } | |
8817 | _ACEOF | |
8818 | if ac_fn_c_try_compile "$LINENO"; then : | |
8819 | emacs_alsa_subdir=yes | |
8820 | else | |
8821 | emacs_alsa_subdir=no | |
f199cab1 | 8822 | fi |
5476a9a4 GM |
8823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8824 | if test "$emacs_alsa_subdir" != yes; then | |
8825 | as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 | |
8826 | fi | |
8827 | ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" | |
8828 | fi | |
067d23c9 | 8829 | |
5476a9a4 GM |
8830 | CFLAGS="$SAVE_CFLAGS" |
8831 | LIBS="$SAVE_LIBS" | |
8832 | LIBSOUND="$LIBSOUND $ALSA_LIBS" | |
8833 | CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | |
067d23c9 | 8834 | |
5476a9a4 | 8835 | $as_echo "#define HAVE_ALSA 1" >>confdefs.h |
067d23c9 | 8836 | |
5476a9a4 | 8837 | fi |
067d23c9 | 8838 | |
5476a9a4 GM |
8839 | if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then |
8840 | case "$opsys" in | |
8841 | gnu-linux|freebsd|netbsd) | |
067d23c9 | 8842 | |
5476a9a4 | 8843 | $as_echo "#define HAVE_SOUND 1" >>confdefs.h |
067d23c9 | 8844 | |
5476a9a4 GM |
8845 | ;; |
8846 | esac | |
8847 | fi | |
067d23c9 KY |
8848 | |
8849 | ||
5476a9a4 | 8850 | fi |
067d23c9 | 8851 | |
e700232f GM |
8852 | |
8853 | ||
8854 | ||
5476a9a4 GM |
8855 | for ac_header in $ac_header_list |
8856 | do : | |
8857 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8858 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
8859 | " | |
8860 | eval as_val=\$$as_ac_Header | |
8861 | if test "x$as_val" = x""yes; then : | |
8862 | cat >>confdefs.h <<_ACEOF | |
8863 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
067d23c9 KY |
8864 | _ACEOF |
8865 | ||
f199cab1 | 8866 | fi |
e700232f | 8867 | |
5476a9a4 GM |
8868 | done |
8869 | ||
8870 | ||
e700232f GM |
8871 | |
8872 | ||
8873 | ||
f199cab1 | 8874 | |
067d23c9 | 8875 | |
067d23c9 | 8876 | |
067d23c9 | 8877 | |
067d23c9 | 8878 | |
f199cab1 GM |
8879 | |
8880 | ||
8881 | ||
067d23c9 | 8882 | |
067d23c9 | 8883 | |
f199cab1 GM |
8884 | |
8885 | ||
8886 | ||
5476a9a4 GM |
8887 | |
8888 | ||
8889 | ||
8890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 | |
8891 | $as_echo_n "checking if personality LINUX32 can be set... " >&6; } | |
8892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8893 | /* end confdefs.h. */ | |
8894 | #include <sys/personality.h> | |
067d23c9 KY |
8895 | int |
8896 | main () | |
8897 | { | |
5476a9a4 | 8898 | personality (PER_LINUX32) |
067d23c9 KY |
8899 | ; |
8900 | return 0; | |
8901 | } | |
8902 | _ACEOF | |
8903 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 8904 | emacs_cv_personality_linux32=yes |
067d23c9 | 8905 | else |
5476a9a4 | 8906 | emacs_cv_personality_linux32=no |
067d23c9 | 8907 | fi |
f199cab1 | 8908 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
8909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 |
8910 | $as_echo "$emacs_cv_personality_linux32" >&6; } | |
f199cab1 | 8911 | |
5476a9a4 | 8912 | if test $emacs_cv_personality_linux32 = yes; then |
f199cab1 | 8913 | |
5476a9a4 GM |
8914 | $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h |
8915 | ||
8916 | fi | |
8917 | ||
8918 | for ac_header in term.h | |
8919 | do : | |
8920 | ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" | |
8921 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8922 | cat >>confdefs.h <<_ACEOF | |
8923 | #define HAVE_TERM_H 1 | |
067d23c9 | 8924 | _ACEOF |
5476a9a4 GM |
8925 | |
8926 | fi | |
8927 | ||
8928 | done | |
8929 | ||
8930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
8931 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
8932 | if test "${ac_cv_header_time+set}" = set; then : | |
8933 | $as_echo_n "(cached) " >&6 | |
8934 | else | |
8935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 8936 | /* end confdefs.h. */ |
5476a9a4 GM |
8937 | #include <sys/types.h> |
8938 | #include <sys/time.h> | |
8939 | #include <time.h> | |
f199cab1 | 8940 | |
067d23c9 KY |
8941 | int |
8942 | main () | |
8943 | { | |
5476a9a4 GM |
8944 | if ((struct tm *) 0) |
8945 | return 0; | |
067d23c9 KY |
8946 | ; |
8947 | return 0; | |
8948 | } | |
8949 | _ACEOF | |
8950 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 8951 | ac_cv_header_time=yes |
067d23c9 | 8952 | else |
5476a9a4 | 8953 | ac_cv_header_time=no |
067d23c9 KY |
8954 | fi |
8955 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8956 | fi | |
5476a9a4 GM |
8957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
8958 | $as_echo "$ac_cv_header_time" >&6; } | |
8959 | if test $ac_cv_header_time = yes; then | |
f199cab1 | 8960 | |
5476a9a4 GM |
8961 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
8962 | ||
8963 | fi | |
8964 | ||
dc67e786 GM |
8965 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h> |
8966 | ||
8967 | " | |
5476a9a4 GM |
8968 | if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : |
8969 | ac_have_decl=1 | |
8970 | else | |
8971 | ac_have_decl=0 | |
8972 | fi | |
8973 | ||
8974 | cat >>confdefs.h <<_ACEOF | |
8975 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl | |
067d23c9 | 8976 | _ACEOF |
5476a9a4 GM |
8977 | |
8978 | if test $ac_cv_have_decl_sys_siglist != yes; then | |
8979 | # For Tru64, at least: | |
dc67e786 GM |
8980 | ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h> |
8981 | ||
8982 | " | |
5476a9a4 GM |
8983 | if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : |
8984 | ac_have_decl=1 | |
8985 | else | |
8986 | ac_have_decl=0 | |
067d23c9 | 8987 | fi |
5476a9a4 GM |
8988 | |
8989 | cat >>confdefs.h <<_ACEOF | |
8990 | #define HAVE_DECL___SYS_SIGLIST $ac_have_decl | |
8991 | _ACEOF | |
8992 | ||
8993 | if test $ac_cv_have_decl___sys_siglist = yes; then | |
8994 | ||
8995 | $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h | |
8996 | ||
8997 | fi | |
8998 | fi | |
8999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 | |
9000 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
9001 | if test "${ac_cv_header_sys_wait_h+set}" = set; then : | |
9002 | $as_echo_n "(cached) " >&6 | |
067d23c9 KY |
9003 | else |
9004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9005 | /* end confdefs.h. */ | |
5476a9a4 GM |
9006 | #include <sys/types.h> |
9007 | #include <sys/wait.h> | |
9008 | #ifndef WEXITSTATUS | |
9009 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) | |
9010 | #endif | |
9011 | #ifndef WIFEXITED | |
9012 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
9013 | #endif | |
9014 | ||
067d23c9 KY |
9015 | int |
9016 | main () | |
9017 | { | |
5476a9a4 GM |
9018 | int s; |
9019 | wait (&s); | |
9020 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
067d23c9 KY |
9021 | ; |
9022 | return 0; | |
9023 | } | |
9024 | _ACEOF | |
5476a9a4 GM |
9025 | if ac_fn_c_try_compile "$LINENO"; then : |
9026 | ac_cv_header_sys_wait_h=yes | |
067d23c9 | 9027 | else |
5476a9a4 | 9028 | ac_cv_header_sys_wait_h=no |
067d23c9 | 9029 | fi |
5476a9a4 | 9030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 9031 | fi |
5476a9a4 GM |
9032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 |
9033 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
9034 | if test $ac_cv_header_sys_wait_h = yes; then | |
067d23c9 | 9035 | |
5476a9a4 | 9036 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
7417b37c | 9037 | |
5476a9a4 | 9038 | fi |
7417b37c | 9039 | |
7417b37c | 9040 | |
5476a9a4 GM |
9041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
9042 | $as_echo_n "checking for speed_t... " >&6; } | |
9043 | if test "${emacs_cv_speed_t+set}" = set; then : | |
f199cab1 GM |
9044 | $as_echo_n "(cached) " >&6 |
9045 | else | |
f199cab1 GM |
9046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9047 | /* end confdefs.h. */ | |
5476a9a4 GM |
9048 | #include <termios.h> |
9049 | int | |
9050 | main () | |
9051 | { | |
9052 | speed_t x = 1; | |
9053 | ; | |
9054 | return 0; | |
9055 | } | |
7417b37c | 9056 | _ACEOF |
f199cab1 | 9057 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 GM |
9058 | emacs_cv_speed_t=yes |
9059 | else | |
9060 | emacs_cv_speed_t=no | |
7417b37c | 9061 | fi |
f199cab1 | 9062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7417b37c | 9063 | fi |
5476a9a4 GM |
9064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 |
9065 | $as_echo "$emacs_cv_speed_t" >&6; } | |
9066 | if test $emacs_cv_speed_t = yes; then | |
7417b37c | 9067 | |
5476a9a4 | 9068 | $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h |
067d23c9 | 9069 | |
5476a9a4 | 9070 | fi |
067d23c9 | 9071 | |
067d23c9 KY |
9072 | |
9073 | ||
e700232f | 9074 | |
5476a9a4 GM |
9075 | for ac_header in net/if.h |
9076 | do : | |
9077 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | |
9078 | #if HAVE_SYS_SOCKET_H | |
9079 | #include <sys/socket.h> | |
9080 | #endif | |
9081 | " | |
9082 | if test "x$ac_cv_header_net_if_h" = x""yes; then : | |
9083 | cat >>confdefs.h <<_ACEOF | |
9084 | #define HAVE_NET_IF_H 1 | |
067d23c9 | 9085 | _ACEOF |
7cae64b4 | 9086 | |
067d23c9 | 9087 | fi |
067d23c9 | 9088 | |
5476a9a4 | 9089 | done |
4d4b75e8 | 9090 | |
5476a9a4 GM |
9091 | for ac_header in ifaddrs.h |
9092 | do : | |
9093 | ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default | |
9094 | #if HAVE_SYS_SOCKET_H | |
9095 | #include <sys/socket.h> | |
9096 | #endif | |
9097 | " | |
9098 | if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : | |
9099 | cat >>confdefs.h <<_ACEOF | |
9100 | #define HAVE_IFADDRS_H 1 | |
9101 | _ACEOF | |
4d4b75e8 | 9102 | |
5476a9a4 | 9103 | fi |
4d4b75e8 | 9104 | |
5476a9a4 | 9105 | done |
7e723570 | 9106 | |
5476a9a4 | 9107 | for ac_header in net/if_dl.h |
7e723570 | 9108 | do : |
5476a9a4 GM |
9109 | ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default |
9110 | #if HAVE_SYS_SOCKET_H | |
9111 | #include <sys/socket.h> | |
9112 | #endif | |
7e723570 | 9113 | " |
5476a9a4 | 9114 | if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : |
7e723570 | 9115 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 9116 | #define HAVE_NET_IF_DL_H 1 |
7e723570 GM |
9117 | _ACEOF |
9118 | ||
9119 | fi | |
9120 | ||
9121 | done | |
9122 | ||
9123 | ||
5476a9a4 GM |
9124 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default |
9125 | #if HAVE_SYS_SOCKET_H | |
9126 | #include <sys/socket.h> | |
9127 | #endif | |
9128 | #if HAVE_NET_IF_H | |
9129 | #include <net/if.h> | |
9130 | #endif | |
9131 | " | |
9132 | if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : | |
7e723570 | 9133 | |
5476a9a4 GM |
9134 | cat >>confdefs.h <<_ACEOF |
9135 | #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 | |
9136 | _ACEOF | |
7e723570 GM |
9137 | |
9138 | ||
5476a9a4 GM |
9139 | fi |
9140 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default | |
9141 | #if HAVE_SYS_SOCKET_H | |
9142 | #include <sys/socket.h> | |
f199cab1 | 9143 | #endif |
5476a9a4 GM |
9144 | #if HAVE_NET_IF_H |
9145 | #include <net/if.h> | |
f199cab1 | 9146 | #endif |
5476a9a4 GM |
9147 | " |
9148 | if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : | |
9149 | ||
9150 | cat >>confdefs.h <<_ACEOF | |
9151 | #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 | |
9152 | _ACEOF | |
9153 | ||
9154 | ||
9155 | fi | |
9156 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default | |
9157 | #if HAVE_SYS_SOCKET_H | |
9158 | #include <sys/socket.h> | |
f199cab1 | 9159 | #endif |
5476a9a4 GM |
9160 | #if HAVE_NET_IF_H |
9161 | #include <net/if.h> | |
9162 | #endif | |
9163 | " | |
9164 | if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : | |
9165 | ||
9166 | cat >>confdefs.h <<_ACEOF | |
9167 | #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 | |
f199cab1 | 9168 | _ACEOF |
5476a9a4 GM |
9169 | |
9170 | ||
9171 | fi | |
9172 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default | |
9173 | #if HAVE_SYS_SOCKET_H | |
9174 | #include <sys/socket.h> | |
9175 | #endif | |
9176 | #if HAVE_NET_IF_H | |
9177 | #include <net/if.h> | |
9178 | #endif | |
9179 | " | |
9180 | if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : | |
9181 | ||
9182 | cat >>confdefs.h <<_ACEOF | |
9183 | #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 | |
f199cab1 | 9184 | _ACEOF |
5476a9a4 GM |
9185 | |
9186 | ||
067d23c9 | 9187 | fi |
5476a9a4 GM |
9188 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default |
9189 | #if HAVE_SYS_SOCKET_H | |
9190 | #include <sys/socket.h> | |
9191 | #endif | |
9192 | #if HAVE_NET_IF_H | |
9193 | #include <net/if.h> | |
9194 | #endif | |
9195 | " | |
9196 | if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : | |
9197 | ||
9198 | cat >>confdefs.h <<_ACEOF | |
9199 | #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 | |
9200 | _ACEOF | |
9201 | ||
067d23c9 | 9202 | |
f199cab1 | 9203 | fi |
5476a9a4 GM |
9204 | ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default |
9205 | #if HAVE_SYS_SOCKET_H | |
9206 | #include <sys/socket.h> | |
9207 | #endif | |
9208 | #if HAVE_NET_IF_H | |
9209 | #include <net/if.h> | |
9210 | #endif | |
9211 | " | |
9212 | if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : | |
9213 | ||
9214 | cat >>confdefs.h <<_ACEOF | |
9215 | #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 | |
9216 | _ACEOF | |
9217 | ||
067d23c9 KY |
9218 | |
9219 | fi | |
9220 | ||
9221 | ||
067d23c9 | 9222 | |
f199cab1 | 9223 | |
5476a9a4 GM |
9224 | DEPFLAGS= |
9225 | MKDEPDIR=":" | |
9226 | deps_frag=deps.mk | |
9227 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |
9228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 | |
9229 | $as_echo_n "checking whether we are using GNU Make... " >&6; } | |
9230 | HAVE_GNU_MAKE=no | |
9231 | testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` | |
9232 | if test "x$testval" != x; then | |
9233 | HAVE_GNU_MAKE=yes | |
9234 | else | |
9235 | ac_enable_autodepend=no | |
9236 | fi | |
9237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 | |
9238 | $as_echo "$HAVE_GNU_MAKE" >&6; } | |
9239 | if test $HAVE_GNU_MAKE = yes; then | |
9240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 | |
9241 | $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } | |
9242 | SAVE_CFLAGS="$CFLAGS" | |
9243 | CFLAGS="$CFLAGS -MMD -MF deps.d -MP" | |
9244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9245 | /* end confdefs.h. */ | |
f199cab1 | 9246 | |
5476a9a4 GM |
9247 | int |
9248 | main () | |
9249 | { | |
f199cab1 | 9250 | |
5476a9a4 GM |
9251 | ; |
9252 | return 0; | |
9253 | } | |
9254 | _ACEOF | |
9255 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 | 9256 | |
5476a9a4 GM |
9257 | else |
9258 | ac_enable_autodepend=no | |
9259 | fi | |
9260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9261 | CFLAGS="$SAVE_CFLAGS" | |
9262 | test -f deps.d || ac_enable_autodepend=no | |
9263 | rm -rf deps.d | |
9264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 | |
9265 | $as_echo "$ac_enable_autodepend" >&6; } | |
9266 | fi | |
9267 | if test $ac_enable_autodepend = yes; then | |
9268 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' | |
9269 | ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. | |
9270 | MKDEPDIR='${MKDIR_P} ${DEPDIR}' | |
9271 | deps_frag=autodeps.mk | |
9272 | fi | |
9273 | fi | |
9274 | deps_frag=$srcdir/src/$deps_frag | |
f199cab1 GM |
9275 | |
9276 | ||
9277 | ||
9278 | ||
9279 | ||
5476a9a4 | 9280 | lisp_frag=$srcdir/src/lisp.mk |
f199cab1 GM |
9281 | |
9282 | ||
9283 | ||
5476a9a4 GM |
9284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 |
9285 | $as_echo_n "checking for long file names... " >&6; } | |
9286 | if test "${ac_cv_sys_long_file_names+set}" = set; then : | |
9287 | $as_echo_n "(cached) " >&6 | |
9288 | else | |
9289 | ac_cv_sys_long_file_names=yes | |
9290 | # Test for long file names in all the places we know might matter: | |
9291 | # . the current directory, where building will happen | |
9292 | # $prefix/lib where we will be installing things | |
9293 | # $exec_prefix/lib likewise | |
9294 | # $TMPDIR if set, where it might want to write temporary files | |
9295 | # /tmp where it might want to write temporary files | |
9296 | # /var/tmp likewise | |
9297 | # /usr/tmp likewise | |
9298 | for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do | |
9299 | # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib | |
9300 | # in the usual case where exec_prefix is '${prefix}'. | |
9301 | case $ac_dir in #( | |
9302 | . | /* | ?:[\\/]*) ;; #( | |
9303 | *) continue;; | |
9304 | esac | |
9305 | test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. | |
9306 | ac_xdir=$ac_dir/cf$$ | |
9307 | (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue | |
9308 | ac_tf1=$ac_xdir/conftest9012345 | |
9309 | ac_tf2=$ac_xdir/conftest9012346 | |
9310 | touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || | |
9311 | ac_cv_sys_long_file_names=no | |
9312 | rm -f -r "$ac_xdir" 2>/dev/null | |
9313 | test $ac_cv_sys_long_file_names = no && break | |
9314 | done | |
9315 | fi | |
9316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 | |
9317 | $as_echo "$ac_cv_sys_long_file_names" >&6; } | |
9318 | if test $ac_cv_sys_long_file_names = yes; then | |
f199cab1 | 9319 | |
5476a9a4 | 9320 | $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h |
f199cab1 | 9321 | |
5476a9a4 | 9322 | fi |
f199cab1 | 9323 | |
f199cab1 | 9324 | |
5476a9a4 | 9325 | #### Choose a window system. |
f199cab1 | 9326 | |
42dcba54 GM |
9327 | ## We leave window_system equal to none if |
9328 | ## we end up building without one. Any new window system should | |
9329 | ## set window_system to an appropriate value and add objects to | |
9330 | ## window-system-specific substs. | |
9331 | ||
9332 | window_system=none | |
5476a9a4 GM |
9333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
9334 | $as_echo_n "checking for X... " >&6; } | |
f199cab1 | 9335 | |
f199cab1 | 9336 | |
5476a9a4 GM |
9337 | # Check whether --with-x was given. |
9338 | if test "${with_x+set}" = set; then : | |
9339 | withval=$with_x; | |
9340 | fi | |
f199cab1 | 9341 | |
5476a9a4 GM |
9342 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
9343 | if test "x$with_x" = xno; then | |
9344 | # The user explicitly disabled X. | |
9345 | have_x=disabled | |
9346 | else | |
9347 | case $x_includes,$x_libraries in #( | |
9348 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
9349 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
9350 | $as_echo_n "(cached) " >&6 | |
9351 | else | |
9352 | # One or both of the vars are not set, and there is no cached value. | |
9353 | ac_x_includes=no ac_x_libraries=no | |
9354 | rm -f -r conftest.dir | |
9355 | if mkdir conftest.dir; then | |
9356 | cd conftest.dir | |
9357 | cat >Imakefile <<'_ACEOF' | |
9358 | incroot: | |
9359 | @echo incroot='${INCROOT}' | |
9360 | usrlibdir: | |
9361 | @echo usrlibdir='${USRLIBDIR}' | |
9362 | libdir: | |
9363 | @echo libdir='${LIBDIR}' | |
9364 | _ACEOF | |
9365 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
9366 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
9367 | for ac_var in incroot usrlibdir libdir; do | |
9368 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
9369 | done | |
9370 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
9371 | for ac_extension in a so sl dylib la dll; do | |
9372 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
9373 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
9374 | ac_im_usrlibdir=$ac_im_libdir; break | |
9375 | fi | |
9376 | done | |
9377 | # Screen out bogus values from the imake configuration. They are | |
9378 | # bogus both because they are the default anyway, and because | |
9379 | # using them would break gcc on systems where it needs fixed includes. | |
9380 | case $ac_im_incroot in | |
9381 | /usr/include) ac_x_includes= ;; | |
9382 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
9383 | esac | |
9384 | case $ac_im_usrlibdir in | |
9385 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
9386 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
9387 | esac | |
9388 | fi | |
9389 | cd .. | |
9390 | rm -f -r conftest.dir | |
067d23c9 KY |
9391 | fi |
9392 | ||
5476a9a4 GM |
9393 | # Standard set of common directories for X headers. |
9394 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
9395 | ac_x_header_dirs=' | |
9396 | /usr/X11/include | |
9397 | /usr/X11R7/include | |
9398 | /usr/X11R6/include | |
9399 | /usr/X11R5/include | |
9400 | /usr/X11R4/include | |
067d23c9 | 9401 | |
5476a9a4 GM |
9402 | /usr/include/X11 |
9403 | /usr/include/X11R7 | |
9404 | /usr/include/X11R6 | |
9405 | /usr/include/X11R5 | |
9406 | /usr/include/X11R4 | |
067d23c9 | 9407 | |
5476a9a4 GM |
9408 | /usr/local/X11/include |
9409 | /usr/local/X11R7/include | |
9410 | /usr/local/X11R6/include | |
9411 | /usr/local/X11R5/include | |
9412 | /usr/local/X11R4/include | |
067d23c9 | 9413 | |
5476a9a4 GM |
9414 | /usr/local/include/X11 |
9415 | /usr/local/include/X11R7 | |
9416 | /usr/local/include/X11R6 | |
9417 | /usr/local/include/X11R5 | |
9418 | /usr/local/include/X11R4 | |
067d23c9 | 9419 | |
5476a9a4 GM |
9420 | /usr/X386/include |
9421 | /usr/x386/include | |
9422 | /usr/XFree86/include/X11 | |
067d23c9 | 9423 | |
5476a9a4 GM |
9424 | /usr/include |
9425 | /usr/local/include | |
9426 | /usr/unsupported/include | |
9427 | /usr/athena/include | |
9428 | /usr/local/x11r5/include | |
9429 | /usr/lpp/Xamples/include | |
067d23c9 | 9430 | |
5476a9a4 GM |
9431 | /usr/openwin/include |
9432 | /usr/openwin/share/include' | |
067d23c9 | 9433 | |
5476a9a4 GM |
9434 | if test "$ac_x_includes" = no; then |
9435 | # Guess where to find include files, by looking for Xlib.h. | |
9436 | # First, try using that file with no special directory specified. | |
9437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9438 | /* end confdefs.h. */ | |
9439 | #include <X11/Xlib.h> | |
067d23c9 | 9440 | _ACEOF |
5476a9a4 GM |
9441 | if ac_fn_c_try_cpp "$LINENO"; then : |
9442 | # We can compile using X headers with no special include directory. | |
9443 | ac_x_includes= | |
067d23c9 | 9444 | else |
5476a9a4 GM |
9445 | for ac_dir in $ac_x_header_dirs; do |
9446 | if test -r "$ac_dir/X11/Xlib.h"; then | |
9447 | ac_x_includes=$ac_dir | |
9448 | break | |
f199cab1 | 9449 | fi |
f199cab1 | 9450 | done |
5476a9a4 GM |
9451 | fi |
9452 | rm -f conftest.err conftest.$ac_ext | |
9453 | fi # $ac_x_includes = no | |
067d23c9 | 9454 | |
5476a9a4 GM |
9455 | if test "$ac_x_libraries" = no; then |
9456 | # Check for the libraries. | |
9457 | # See if we find them without any special options. | |
9458 | # Don't add to $LIBS permanently. | |
9459 | ac_save_LIBS=$LIBS | |
9460 | LIBS="-lX11 $LIBS" | |
7ee3791f | 9461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 9462 | /* end confdefs.h. */ |
5476a9a4 | 9463 | #include <X11/Xlib.h> |
067d23c9 KY |
9464 | int |
9465 | main () | |
9466 | { | |
5476a9a4 GM |
9467 | XrmInitialize () |
9468 | ; | |
067d23c9 KY |
9469 | return 0; |
9470 | } | |
9471 | _ACEOF | |
5476a9a4 GM |
9472 | if ac_fn_c_try_link "$LINENO"; then : |
9473 | LIBS=$ac_save_LIBS | |
9474 | # We can link X programs with no special library path. | |
9475 | ac_x_libraries= | |
7ee3791f | 9476 | else |
5476a9a4 GM |
9477 | LIBS=$ac_save_LIBS |
9478 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
9479 | do | |
9480 | # Don't even attempt the hair of trying to link an X program! | |
9481 | for ac_extension in a so sl dylib la dll; do | |
9482 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
9483 | ac_x_libraries=$ac_dir | |
9484 | break 2 | |
9485 | fi | |
9486 | done | |
9487 | done | |
7ee3791f | 9488 | fi |
5476a9a4 GM |
9489 | rm -f core conftest.err conftest.$ac_objext \ |
9490 | conftest$ac_exeext conftest.$ac_ext | |
9491 | fi # $ac_x_libraries = no | |
7ee3791f | 9492 | |
5476a9a4 GM |
9493 | case $ac_x_includes,$ac_x_libraries in #( |
9494 | no,* | *,no | *\'*) | |
9495 | # Didn't find X, or a directory has "'" in its name. | |
9496 | ac_cv_have_x="have_x=no";; #( | |
9497 | *) | |
9498 | # Record where we found X for the cache. | |
9499 | ac_cv_have_x="have_x=yes\ | |
9500 | ac_x_includes='$ac_x_includes'\ | |
9501 | ac_x_libraries='$ac_x_libraries'" | |
9502 | esac | |
9503 | fi | |
9504 | ;; #( | |
9505 | *) have_x=yes;; | |
9506 | esac | |
9507 | eval "$ac_cv_have_x" | |
9508 | fi # $with_x != no | |
9509 | ||
9510 | if test "$have_x" != yes; then | |
9511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
9512 | $as_echo "$have_x" >&6; } | |
9513 | no_x=yes | |
9514 | else | |
9515 | # If each of the values was on the command line, it overrides each guess. | |
9516 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
9517 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
9518 | # Update the cache value to reflect the command line values. | |
9519 | ac_cv_have_x="have_x=yes\ | |
9520 | ac_x_includes='$x_includes'\ | |
9521 | ac_x_libraries='$x_libraries'" | |
9522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
9523 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
9524 | fi | |
9525 | ||
42dcba54 | 9526 | if test "$no_x" != yes; then |
5476a9a4 GM |
9527 | window_system=x11 |
9528 | fi | |
9529 | ||
9530 | LD_SWITCH_X_SITE_RPATH= | |
9531 | if test "${x_libraries}" != NONE; then | |
9532 | if test -n "${x_libraries}"; then | |
9533 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` | |
9534 | LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` | |
9535 | fi | |
9536 | x_default_search_path="" | |
9537 | x_search_path=${x_libraries} | |
9538 | if test -z "${x_search_path}"; then | |
9539 | x_search_path=/usr/lib | |
9540 | fi | |
9541 | for x_library in `echo ${x_search_path}: | \ | |
9542 | sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do | |
9543 | x_search_path="\ | |
9544 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
9545 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
9546 | ${x_library}/X11/%T/%N%C%S:\ | |
9547 | ${x_library}/X11/%L/%T/%N%S:\ | |
9548 | ${x_library}/X11/%l/%T/%N%S:\ | |
9549 | ${x_library}/X11/%T/%N%S" | |
9550 | if test x"${x_default_search_path}" = x; then | |
9551 | x_default_search_path=${x_search_path} | |
9552 | else | |
9553 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
9554 | fi | |
9555 | done | |
9556 | fi | |
9557 | ||
9558 | ||
9559 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
9560 | C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` | |
9561 | fi | |
9562 | ||
9563 | if test x"${x_includes}" = x; then | |
9564 | bitmapdir=/usr/include/X11/bitmaps | |
9565 | else | |
9566 | # accumulate include directories that have X11 bitmap subdirectories | |
9567 | bmd_acc="dummyval" | |
9568 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
9569 | if test -d "${bmd}/X11/bitmaps"; then | |
9570 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
9571 | fi | |
9572 | if test -d "${bmd}/bitmaps"; then | |
9573 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" | |
9574 | fi | |
9575 | done | |
9576 | if test ${bmd_acc} != "dummyval"; then | |
9577 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
9578 | fi | |
9579 | fi | |
7ee3791f | 9580 | |
5476a9a4 GM |
9581 | HAVE_NS=no |
9582 | NS_IMPL_COCOA=no | |
9583 | NS_IMPL_GNUSTEP=no | |
9584 | tmp_CPPFLAGS="$CPPFLAGS" | |
9585 | tmp_CFLAGS="$CFLAGS" | |
9586 | CPPFLAGS="$CPPFLAGS -x objective-c" | |
9587 | CFLAGS="$CFLAGS -x objective-c" | |
5476a9a4 | 9588 | GNU_OBJC_CFLAGS= |
4efe5ef9 | 9589 | LIBS_GNUSTEP= |
5476a9a4 GM |
9590 | if test "${with_ns}" != no; then |
9591 | if test "${opsys}" = darwin; then | |
9592 | NS_IMPL_COCOA=yes | |
9593 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9594 | ns_appbindir=${ns_appdir}/Contents/MacOS | |
9595 | ns_appresdir=${ns_appdir}/Contents/Resources | |
bb7dce39 | 9596 | ns_appsrc=Cocoa/Emacs.base |
5476a9a4 GM |
9597 | elif test -f $GNUSTEP_CONFIG_FILE; then |
9598 | NS_IMPL_GNUSTEP=yes | |
9599 | ns_appdir=`pwd`/nextstep/Emacs.app | |
9600 | ns_appbindir=${ns_appdir} | |
9601 | ns_appresdir=${ns_appdir}/Resources | |
bb7dce39 | 9602 | ns_appsrc=GNUstep/Emacs.base |
5476a9a4 GM |
9603 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" |
9604 | GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" | |
9605 | GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" | |
9606 | GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" | |
9607 | test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ | |
9608 | GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | |
9609 | test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | |
9610 | GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | |
9611 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9612 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
9613 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | |
4efe5ef9 | 9614 | LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread" |
5476a9a4 GM |
9615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 |
9616 | $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } | |
9617 | if test "${emacs_cv_objc_exceptions+set}" = set; then : | |
9618 | $as_echo_n "(cached) " >&6 | |
9619 | else | |
9620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9621 | /* end confdefs.h. */ | |
9622 | #include <GNUstepBase/GSConfig.h> | |
39b3d70b GM |
9623 | int |
9624 | main () | |
9625 | { | |
5476a9a4 GM |
9626 | #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 |
9627 | 1; | |
9628 | #else | |
9629 | fail; | |
9630 | #endif | |
9631 | ; | |
39b3d70b GM |
9632 | return 0; |
9633 | } | |
9634 | _ACEOF | |
5476a9a4 GM |
9635 | if ac_fn_c_try_compile "$LINENO"; then : |
9636 | emacs_cv_objc_exceptions=yes | |
39b3d70b | 9637 | else |
5476a9a4 | 9638 | emacs_cv_objc_exceptions=no |
39b3d70b | 9639 | fi |
5476a9a4 | 9640 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
39b3d70b | 9641 | fi |
5476a9a4 GM |
9642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 |
9643 | $as_echo "$emacs_cv_objc_exceptions" >&6; } | |
9644 | if test $emacs_cv_objc_exceptions = yes; then | |
39b3d70b | 9645 | |
5476a9a4 GM |
9646 | $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h |
9647 | ||
9648 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | |
9649 | fi | |
9650 | fi | |
9651 | ||
9652 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | |
9653 | ||
9654 | ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" | |
9655 | if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : | |
9656 | HAVE_NS=yes | |
067d23c9 | 9657 | else |
5476a9a4 GM |
9658 | as_fn_error "\`--with-ns' was specified, but the include |
9659 | files are missing or cannot be compiled." "$LINENO" 5 | |
9660 | fi | |
f199cab1 | 9661 | |
f199cab1 | 9662 | |
dc67e786 GM |
9663 | |
9664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9665 | /* end confdefs.h. */ | |
9666 | #include <AppKit/AppKit.h> | |
9667 | int | |
9668 | main () | |
9669 | { | |
9670 | ||
9671 | #ifdef MAC_OS_X_VERSION_MAX_ALLOWED | |
9672 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 | |
9673 | ; /* OK */ | |
9674 | #else | |
9675 | #error "OSX 10.4 or newer required" | |
9676 | #endif | |
9677 | #endif | |
9678 | ||
9679 | ; | |
9680 | return 0; | |
9681 | } | |
9682 | _ACEOF | |
9683 | if ac_fn_c_try_compile "$LINENO"; then : | |
9684 | ns_osx_have_104=yes | |
9685 | else | |
9686 | ns_osx_have_104=no | |
9687 | fi | |
9688 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 GM |
9689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9690 | /* end confdefs.h. */ | |
9691 | #include <Foundation/NSObjCRuntime.h> | |
067d23c9 KY |
9692 | int |
9693 | main () | |
9694 | { | |
5476a9a4 GM |
9695 | NSInteger i; |
9696 | ; | |
067d23c9 KY |
9697 | return 0; |
9698 | } | |
9699 | _ACEOF | |
5476a9a4 GM |
9700 | if ac_fn_c_try_compile "$LINENO"; then : |
9701 | ns_have_nsinteger=yes | |
067d23c9 | 9702 | else |
5476a9a4 | 9703 | ns_have_nsinteger=no |
067d23c9 | 9704 | fi |
5476a9a4 | 9705 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dc67e786 GM |
9706 | if test $ns_osx_have_104 = no; then |
9707 | as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5; | |
9708 | fi | |
5476a9a4 | 9709 | if test $ns_have_nsinteger = yes; then |
067d23c9 | 9710 | |
5476a9a4 | 9711 | $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h |
067d23c9 | 9712 | |
067d23c9 | 9713 | fi |
5476a9a4 | 9714 | fi |
067d23c9 | 9715 | |
5476a9a4 | 9716 | |
5c0255d9 | 9717 | |
5476a9a4 GM |
9718 | INSTALL_ARCH_INDEP_EXTRA=install-etc |
9719 | ns_self_contained=no | |
5476a9a4 GM |
9720 | NS_OBJ= |
9721 | NS_OBJC_OBJ= | |
9722 | if test "${HAVE_NS}" = yes; then | |
9723 | if test "$with_toolkit_scroll_bars" = "no"; then | |
9724 | as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5 | |
9725 | fi | |
9726 | ||
9727 | window_system=nextstep | |
5476a9a4 GM |
9728 | # set up packaging dirs |
9729 | if test "${EN_NS_SELF_CONTAINED}" = yes; then | |
9730 | ns_self_contained=yes | |
9731 | prefix=${ns_appresdir} | |
9732 | exec_prefix=${ns_appbindir} | |
9733 | libexecdir="\${ns_appbindir}/libexec" | |
9734 | archlibdir="\${ns_appbindir}/libexec" | |
9735 | docdir="\${ns_appresdir}/etc" | |
9736 | etcdir="\${ns_appresdir}/etc" | |
9737 | infodir="\${ns_appresdir}/info" | |
9738 | mandir="\${ns_appresdir}/man" | |
9739 | lispdir="\${ns_appresdir}/lisp" | |
9740 | leimdir="\${ns_appresdir}/leim" | |
9741 | INSTALL_ARCH_INDEP_EXTRA= | |
9742 | fi | |
5476a9a4 GM |
9743 | NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" |
9744 | fi | |
9745 | CFLAGS="$tmp_CFLAGS" | |
9746 | CPPFLAGS="$tmp_CPPFLAGS" | |
9747 | ||
9748 | ||
9749 | ||
9750 | ||
9751 | ||
5c0255d9 GM |
9752 | HAVE_W32=no |
9753 | W32_OBJ= | |
9754 | W32_LIBS= | |
b5eb356a GM |
9755 | W32_RES= |
9756 | W32_RES_LINK= | |
5c0255d9 GM |
9757 | if test "${with_w32}" != no; then |
9758 | if test "${opsys}" != "cygwin"; then | |
9759 | as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5 | |
9760 | fi | |
9761 | ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
9762 | if test "x$ac_cv_header_windows_h" = x""yes; then : | |
9763 | HAVE_W32=yes | |
9764 | else | |
9765 | as_fn_error "\`--with-w32' was specified, but windows.h | |
9766 | cannot be found." "$LINENO" 5 | |
9767 | fi | |
9768 | ||
9769 | ||
9770 | ||
9771 | $as_echo "#define HAVE_NTGUI 1" >>confdefs.h | |
9772 | ||
b5eb356a GM |
9773 | if test -n "$ac_tool_prefix"; then |
9774 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
9775 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
9776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9777 | $as_echo_n "checking for $ac_word... " >&6; } | |
9778 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
9779 | $as_echo_n "(cached) " >&6 | |
9780 | else | |
9781 | if test -n "$WINDRES"; then | |
9782 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
9783 | else | |
9784 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9785 | for as_dir in $PATH | |
9786 | do | |
9787 | IFS=$as_save_IFS | |
9788 | test -z "$as_dir" && as_dir=. | |
9789 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9790 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9791 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
9792 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9793 | break 2 | |
9794 | fi | |
9795 | done | |
9796 | done | |
9797 | IFS=$as_save_IFS | |
9798 | ||
9799 | fi | |
9800 | fi | |
9801 | WINDRES=$ac_cv_prog_WINDRES | |
9802 | if test -n "$WINDRES"; then | |
9803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 | |
9804 | $as_echo "$WINDRES" >&6; } | |
9805 | else | |
9806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9807 | $as_echo "no" >&6; } | |
9808 | fi | |
9809 | ||
9810 | ||
9811 | fi | |
9812 | if test -z "$ac_cv_prog_WINDRES"; then | |
9813 | ac_ct_WINDRES=$WINDRES | |
9814 | # Extract the first word of "windres", so it can be a program name with args. | |
9815 | set dummy windres; ac_word=$2 | |
9816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9817 | $as_echo_n "checking for $ac_word... " >&6; } | |
9818 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
9819 | $as_echo_n "(cached) " >&6 | |
9820 | else | |
9821 | if test -n "$ac_ct_WINDRES"; then | |
9822 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
9823 | else | |
9824 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9825 | for as_dir in $PATH | |
9826 | do | |
9827 | IFS=$as_save_IFS | |
9828 | test -z "$as_dir" && as_dir=. | |
9829 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9830 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9831 | ac_cv_prog_ac_ct_WINDRES="windres" | |
9832 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9833 | break 2 | |
9834 | fi | |
9835 | done | |
9836 | done | |
9837 | IFS=$as_save_IFS | |
9838 | ||
9839 | fi | |
9840 | fi | |
9841 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
9842 | if test -n "$ac_ct_WINDRES"; then | |
9843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 | |
9844 | $as_echo "$ac_ct_WINDRES" >&6; } | |
9845 | else | |
9846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9847 | $as_echo "no" >&6; } | |
9848 | fi | |
9849 | ||
9850 | if test "x$ac_ct_WINDRES" = x; then | |
9851 | WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5" | |
9852 | else | |
9853 | case $cross_compiling:$ac_tool_warned in | |
9854 | yes:) | |
9855 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
9856 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
9857 | ac_tool_warned=yes ;; | |
9858 | esac | |
9859 | WINDRES=$ac_ct_WINDRES | |
9860 | fi | |
9861 | else | |
9862 | WINDRES="$ac_cv_prog_WINDRES" | |
9863 | fi | |
9864 | ||
5c0255d9 GM |
9865 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" |
9866 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" | |
9867 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" | |
9868 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" | |
b5eb356a GM |
9869 | W32_RES="emacs.res" |
9870 | # Tell the linker that emacs.res is an object (which we compile from | |
9871 | # the rc file), not a linker script. | |
d14b1e48 | 9872 | W32_RES_LINK="-Wl,emacs.res" |
5c0255d9 GM |
9873 | fi |
9874 | ||
9875 | ||
9876 | ||
b5eb356a GM |
9877 | |
9878 | ||
5c0255d9 GM |
9879 | if test "${HAVE_W32}" = "yes"; then |
9880 | window_system=w32 | |
9881 | with_xft=no | |
9882 | fi | |
9883 | ||
42dcba54 GM |
9884 | ## $window_system is now set to the window system we will |
9885 | ## ultimately use. | |
9886 | ||
9887 | term_header= | |
9888 | HAVE_X_WINDOWS=no | |
9889 | HAVE_X11=no | |
9890 | USE_X_TOOLKIT=none | |
9891 | ||
5476a9a4 GM |
9892 | case "${window_system}" in |
9893 | x11 ) | |
9894 | HAVE_X_WINDOWS=yes | |
9895 | HAVE_X11=yes | |
42dcba54 | 9896 | term_header=xterm.h |
5476a9a4 GM |
9897 | case "${with_x_toolkit}" in |
9898 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
9899 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
9900 | gtk ) with_gtk=yes | |
42dcba54 | 9901 | term_header=gtkutil.h |
5476a9a4 | 9902 | USE_X_TOOLKIT=none ;; |
4fa92495 GM |
9903 | gtk2 ) with_gtk2=yes |
9904 | term_header=gtkutil.h | |
9905 | USE_X_TOOLKIT=none ;; | |
5476a9a4 | 9906 | gtk3 ) with_gtk3=yes |
42dcba54 | 9907 | term_header=gtkutil.h |
5476a9a4 GM |
9908 | USE_X_TOOLKIT=none ;; |
9909 | no ) USE_X_TOOLKIT=none ;; | |
9910 | * ) USE_X_TOOLKIT=maybe ;; | |
9911 | esac | |
9912 | ;; | |
42dcba54 GM |
9913 | nextstep ) |
9914 | term_header=nsterm.h | |
5476a9a4 | 9915 | ;; |
5c0255d9 GM |
9916 | w32 ) |
9917 | term_header=w32term.h | |
9918 | ;; | |
5476a9a4 GM |
9919 | esac |
9920 | ||
9921 | if test "$window_system" = none && test "X$with_x" != "Xno"; then | |
9922 | # Extract the first word of "X", so it can be a program name with args. | |
9923 | set dummy X; ac_word=$2 | |
9924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
9925 | $as_echo_n "checking for $ac_word... " >&6; } | |
9926 | if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : | |
9927 | $as_echo_n "(cached) " >&6 | |
9928 | else | |
9929 | if test -n "$HAVE_XSERVER"; then | |
9930 | ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. | |
9931 | else | |
9932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9933 | for as_dir in $PATH | |
9934 | do | |
9935 | IFS=$as_save_IFS | |
9936 | test -z "$as_dir" && as_dir=. | |
9937 | for ac_exec_ext in '' $ac_executable_extensions; do | |
9938 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
9939 | ac_cv_prog_HAVE_XSERVER="true" | |
9940 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9941 | break 2 | |
9942 | fi | |
9943 | done | |
9944 | done | |
9945 | IFS=$as_save_IFS | |
9946 | ||
9947 | test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" | |
9948 | fi | |
9949 | fi | |
9950 | HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER | |
9951 | if test -n "$HAVE_XSERVER"; then | |
9952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 | |
9953 | $as_echo "$HAVE_XSERVER" >&6; } | |
9954 | else | |
9955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
9956 | $as_echo "no" >&6; } | |
9957 | fi | |
9958 | ||
9959 | ||
9960 | if test "$HAVE_XSERVER" = true || | |
9961 | test -n "$DISPLAY" || | |
9962 | test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then | |
9963 | as_fn_error "You seem to be running X, but no X development libraries | |
9964 | were found. You should install the relevant development files for X | |
9965 | and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make | |
9966 | sure you have development files for image handling, i.e. | |
9967 | tiff, gif, jpeg, png and xpm. | |
9968 | If you are sure you want Emacs compiled without X window support, pass | |
9969 | --without-x | |
9970 | to configure." "$LINENO" 5 | |
9971 | fi | |
9972 | fi | |
9973 | ||
9974 | ### If we're using X11, we should use the X menu package. | |
9975 | HAVE_MENUS=no | |
9976 | case ${HAVE_X11} in | |
9977 | yes ) HAVE_MENUS=yes ;; | |
9978 | esac | |
9979 | ||
9980 | # Does the opsystem file prohibit the use of the GNU malloc? | |
9981 | # Assume not, until told otherwise. | |
9982 | GNU_MALLOC=yes | |
9983 | ||
9984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5 | |
9985 | $as_echo_n "checking whether malloc is Doug Lea style... " >&6; } | |
9986 | if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then : | |
067d23c9 KY |
9987 | $as_echo_n "(cached) " >&6 |
9988 | else | |
5476a9a4 GM |
9989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9990 | /* end confdefs.h. */ | |
9991 | #include <malloc.h> | |
9992 | static void hook (void) {} | |
9993 | int | |
9994 | main () | |
9995 | { | |
9996 | malloc_set_state (malloc_get_state ()); | |
9997 | __after_morecore_hook = hook; | |
9998 | __malloc_initialize_hook = hook; | |
9999 | ; | |
10000 | return 0; | |
10001 | } | |
10002 | _ACEOF | |
10003 | if ac_fn_c_try_link "$LINENO"; then : | |
10004 | emacs_cv_var_doug_lea_malloc=yes | |
10005 | else | |
10006 | emacs_cv_var_doug_lea_malloc=no | |
10007 | fi | |
10008 | rm -f core conftest.err conftest.$ac_objext \ | |
10009 | conftest$ac_exeext conftest.$ac_ext | |
10010 | fi | |
10011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5 | |
10012 | $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; } | |
10013 | doug_lea_malloc=$emacs_cv_var_doug_lea_malloc | |
10014 | ||
10015 | ||
10016 | system_malloc=no | |
10017 | case "$opsys" in | |
10018 | ## darwin ld insists on the use of malloc routines in the System framework. | |
10019 | darwin|sol2-10) system_malloc=yes ;; | |
10020 | esac | |
10021 | ||
10022 | if test "${system_malloc}" = "yes"; then | |
10023 | ||
10024 | $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
10025 | ||
10026 | GNU_MALLOC=no | |
10027 | GNU_MALLOC_reason=" | |
10028 | (The GNU allocators don't work with this system configuration.)" | |
10029 | GMALLOC_OBJ= | |
10030 | VMLIMIT_OBJ= | |
10031 | else | |
10032 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | |
10033 | VMLIMIT_OBJ=vm-limit.o | |
ce9ae7ca GM |
10034 | |
10035 | for ac_header in sys/vlimit.h | |
10036 | do : | |
10037 | ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default" | |
10038 | if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then : | |
10039 | cat >>confdefs.h <<_ACEOF | |
10040 | #define HAVE_SYS_VLIMIT_H 1 | |
10041 | _ACEOF | |
10042 | ||
10043 | fi | |
10044 | ||
10045 | done | |
10046 | ||
10047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5 | |
10048 | $as_echo_n "checking for data_start... " >&6; } | |
10049 | if test "${emacs_cv_data_start+set}" = set; then : | |
10050 | $as_echo_n "(cached) " >&6 | |
10051 | else | |
10052 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10053 | /* end confdefs.h. */ | |
10054 | extern char data_start[]; char ch; | |
10055 | int | |
10056 | main () | |
10057 | { | |
71e41a46 | 10058 | return data_start < &ch; |
ce9ae7ca GM |
10059 | ; |
10060 | return 0; | |
10061 | } | |
10062 | _ACEOF | |
10063 | if ac_fn_c_try_link "$LINENO"; then : | |
10064 | emacs_cv_data_start=yes | |
10065 | else | |
10066 | emacs_cv_data_start=no | |
10067 | fi | |
10068 | rm -f core conftest.err conftest.$ac_objext \ | |
10069 | conftest$ac_exeext conftest.$ac_ext | |
10070 | fi | |
10071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5 | |
10072 | $as_echo "$emacs_cv_data_start" >&6; } | |
10073 | if test $emacs_cv_data_start = yes; then | |
10074 | ||
10075 | $as_echo "#define HAVE_DATA_START 1" >>confdefs.h | |
10076 | ||
10077 | fi | |
5476a9a4 GM |
10078 | fi |
10079 | ||
10080 | ||
10081 | ||
10082 | if test "$doug_lea_malloc" = "yes" ; then | |
10083 | if test "$GNU_MALLOC" = yes ; then | |
10084 | GNU_MALLOC_reason=" | |
10085 | (Using Doug Lea's new malloc from the GNU C Library.)" | |
10086 | fi | |
10087 | ||
10088 | $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h | |
10089 | ||
10090 | ||
10091 | ## Use mmap directly for allocating larger buffers. | |
10092 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | |
10093 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | |
10094 | ## Does the AC_FUNC_MMAP test below make this check unnecessary? | |
10095 | case "$opsys" in | |
10096 | gnu*) REL_ALLOC=no ;; | |
10097 | esac | |
10098 | fi | |
10099 | ||
10100 | if test x"${REL_ALLOC}" = x; then | |
10101 | REL_ALLOC=${GNU_MALLOC} | |
10102 | fi | |
10103 | ||
10104 | use_mmap_for_buffers=no | |
10105 | case "$opsys" in | |
10106 | cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
10107 | esac | |
10108 | ||
10109 | ||
10110 | ||
10111 | ||
10112 | ||
10113 | ||
10114 | ||
10115 | ||
10116 | for ac_func in getpagesize | |
10117 | do : | |
10118 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10119 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
10120 | cat >>confdefs.h <<_ACEOF | |
10121 | #define HAVE_GETPAGESIZE 1 | |
10122 | _ACEOF | |
10123 | ||
10124 | fi | |
10125 | done | |
10126 | ||
10127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
10128 | $as_echo_n "checking for working mmap... " >&6; } | |
10129 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
10130 | $as_echo_n "(cached) " >&6 | |
10131 | else | |
10132 | if test "$cross_compiling" = yes; then : | |
10133 | ac_cv_func_mmap_fixed_mapped=no | |
10134 | else | |
10135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10136 | /* end confdefs.h. */ | |
10137 | $ac_includes_default | |
10138 | /* malloc might have been renamed as rpl_malloc. */ | |
10139 | #undef malloc | |
10140 | ||
10141 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
10142 | Here is a matrix of mmap possibilities: | |
10143 | mmap private not fixed | |
10144 | mmap private fixed at somewhere currently unmapped | |
10145 | mmap private fixed at somewhere already mapped | |
10146 | mmap shared not fixed | |
10147 | mmap shared fixed at somewhere currently unmapped | |
10148 | mmap shared fixed at somewhere already mapped | |
10149 | For private mappings, we should verify that changes cannot be read() | |
10150 | back from the file, nor mmap's back from the file at a different | |
10151 | address. (There have been systems where private was not correctly | |
10152 | implemented like the infamous i386 svr4.0, and systems where the | |
10153 | VM page cache was not coherent with the file system buffer cache | |
10154 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10155 | For shared mappings, we should conversely verify that changes get | |
10156 | propagated back to all the places they're supposed to be. | |
10157 | ||
10158 | Grep wants private fixed already mapped. | |
10159 | The main things grep needs to know about mmap are: | |
10160 | * does it exist and is it safe to write into the mmap'd area | |
10161 | * how to use it (BSD variants) */ | |
10162 | ||
10163 | #include <fcntl.h> | |
10164 | #include <sys/mman.h> | |
10165 | ||
10166 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
10167 | char *malloc (); | |
10168 | #endif | |
10169 | ||
10170 | /* This mess was copied from the GNU getpagesize.h. */ | |
10171 | #ifndef HAVE_GETPAGESIZE | |
10172 | # ifdef _SC_PAGESIZE | |
10173 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10174 | # else /* no _SC_PAGESIZE */ | |
10175 | # ifdef HAVE_SYS_PARAM_H | |
10176 | # include <sys/param.h> | |
10177 | # ifdef EXEC_PAGESIZE | |
10178 | # define getpagesize() EXEC_PAGESIZE | |
10179 | # else /* no EXEC_PAGESIZE */ | |
10180 | # ifdef NBPG | |
10181 | # define getpagesize() NBPG * CLSIZE | |
10182 | # ifndef CLSIZE | |
10183 | # define CLSIZE 1 | |
10184 | # endif /* no CLSIZE */ | |
10185 | # else /* no NBPG */ | |
10186 | # ifdef NBPC | |
10187 | # define getpagesize() NBPC | |
10188 | # else /* no NBPC */ | |
10189 | # ifdef PAGESIZE | |
10190 | # define getpagesize() PAGESIZE | |
10191 | # endif /* PAGESIZE */ | |
10192 | # endif /* no NBPC */ | |
10193 | # endif /* no NBPG */ | |
10194 | # endif /* no EXEC_PAGESIZE */ | |
10195 | # else /* no HAVE_SYS_PARAM_H */ | |
10196 | # define getpagesize() 8192 /* punt totally */ | |
10197 | # endif /* no HAVE_SYS_PARAM_H */ | |
10198 | # endif /* no _SC_PAGESIZE */ | |
10199 | ||
10200 | #endif /* no HAVE_GETPAGESIZE */ | |
10201 | ||
10202 | int | |
10203 | main () | |
10204 | { | |
10205 | char *data, *data2, *data3; | |
10206 | const char *cdata2; | |
10207 | int i, pagesize; | |
10208 | int fd, fd2; | |
10209 | ||
10210 | pagesize = getpagesize (); | |
10211 | ||
10212 | /* First, make a file with some known garbage in it. */ | |
10213 | data = (char *) malloc (pagesize); | |
10214 | if (!data) | |
10215 | return 1; | |
10216 | for (i = 0; i < pagesize; ++i) | |
10217 | *(data + i) = rand (); | |
10218 | umask (0); | |
10219 | fd = creat ("conftest.mmap", 0600); | |
10220 | if (fd < 0) | |
10221 | return 2; | |
10222 | if (write (fd, data, pagesize) != pagesize) | |
10223 | return 3; | |
10224 | close (fd); | |
10225 | ||
10226 | /* Next, check that the tail of a page is zero-filled. File must have | |
10227 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
10228 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
10229 | if (fd2 < 0) | |
10230 | return 4; | |
10231 | cdata2 = ""; | |
10232 | if (write (fd2, cdata2, 1) != 1) | |
10233 | return 5; | |
10234 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
10235 | if (data2 == MAP_FAILED) | |
10236 | return 6; | |
10237 | for (i = 0; i < pagesize; ++i) | |
10238 | if (*(data2 + i)) | |
10239 | return 7; | |
10240 | close (fd2); | |
10241 | if (munmap (data2, pagesize)) | |
10242 | return 8; | |
10243 | ||
10244 | /* Next, try to mmap the file at a fixed address which already has | |
10245 | something else allocated at it. If we can, also make sure that | |
10246 | we see the same garbage. */ | |
10247 | fd = open ("conftest.mmap", O_RDWR); | |
10248 | if (fd < 0) | |
10249 | return 9; | |
10250 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
10251 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
10252 | return 10; | |
10253 | for (i = 0; i < pagesize; ++i) | |
10254 | if (*(data + i) != *(data2 + i)) | |
10255 | return 11; | |
10256 | ||
10257 | /* Finally, make sure that changes to the mapped area do not | |
10258 | percolate back to the file as seen by read(). (This is a bug on | |
10259 | some variants of i386 svr4.0.) */ | |
10260 | for (i = 0; i < pagesize; ++i) | |
10261 | *(data2 + i) = *(data2 + i) + 1; | |
10262 | data3 = (char *) malloc (pagesize); | |
10263 | if (!data3) | |
10264 | return 12; | |
10265 | if (read (fd, data3, pagesize) != pagesize) | |
10266 | return 13; | |
10267 | for (i = 0; i < pagesize; ++i) | |
10268 | if (*(data + i) != *(data3 + i)) | |
10269 | return 14; | |
10270 | close (fd); | |
10271 | return 0; | |
10272 | } | |
10273 | _ACEOF | |
10274 | if ac_fn_c_try_run "$LINENO"; then : | |
10275 | ac_cv_func_mmap_fixed_mapped=yes | |
10276 | else | |
10277 | ac_cv_func_mmap_fixed_mapped=no | |
10278 | fi | |
10279 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10280 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10281 | fi | |
10282 | ||
10283 | fi | |
10284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
10285 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
10286 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
10287 | ||
10288 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
10289 | ||
10290 | fi | |
10291 | rm -f conftest.mmap conftest.txt | |
10292 | ||
10293 | if test $use_mmap_for_buffers = yes; then | |
f199cab1 | 10294 | |
5476a9a4 GM |
10295 | $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h |
10296 | ||
10297 | REL_ALLOC=no | |
10298 | fi | |
10299 | ||
10300 | LIBS="$LIBS_SYSTEM $LIBS" | |
10301 | ||
10302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
10303 | $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
10304 | if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : | |
10305 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 10306 | else |
5476a9a4 GM |
10307 | ac_check_lib_save_LIBS=$LIBS |
10308 | LIBS="-ldnet $LIBS" | |
10309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 10310 | /* end confdefs.h. */ |
067d23c9 | 10311 | |
5476a9a4 GM |
10312 | /* Override any GCC internal prototype to avoid an error. |
10313 | Use char because int might match the return type of a GCC | |
10314 | builtin and then its argument prototype would still apply. */ | |
10315 | #ifdef __cplusplus | |
10316 | extern "C" | |
10317 | #endif | |
10318 | char dnet_ntoa (); | |
10319 | int | |
10320 | main () | |
f199cab1 | 10321 | { |
5476a9a4 GM |
10322 | return dnet_ntoa (); |
10323 | ; | |
10324 | return 0; | |
f199cab1 | 10325 | } |
5476a9a4 GM |
10326 | _ACEOF |
10327 | if ac_fn_c_try_link "$LINENO"; then : | |
10328 | ac_cv_lib_dnet_dnet_ntoa=yes | |
10329 | else | |
10330 | ac_cv_lib_dnet_dnet_ntoa=no | |
10331 | fi | |
10332 | rm -f core conftest.err conftest.$ac_objext \ | |
10333 | conftest$ac_exeext conftest.$ac_ext | |
10334 | LIBS=$ac_check_lib_save_LIBS | |
10335 | fi | |
10336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
10337 | $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
10338 | if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : | |
10339 | cat >>confdefs.h <<_ACEOF | |
10340 | #define HAVE_LIBDNET 1 | |
10341 | _ACEOF | |
10342 | ||
10343 | LIBS="-ldnet $LIBS" | |
10344 | ||
10345 | fi | |
10346 | ||
10347 | ||
10348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 | |
10349 | $as_echo_n "checking for main in -lXbsd... " >&6; } | |
10350 | if test "${ac_cv_lib_Xbsd_main+set}" = set; then : | |
10351 | $as_echo_n "(cached) " >&6 | |
10352 | else | |
10353 | ac_check_lib_save_LIBS=$LIBS | |
10354 | LIBS="-lXbsd $LIBS" | |
10355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10356 | /* end confdefs.h. */ | |
10357 | ||
10358 | ||
10359 | int | |
10360 | main () | |
f199cab1 | 10361 | { |
5476a9a4 GM |
10362 | return main (); |
10363 | ; | |
10364 | return 0; | |
f199cab1 | 10365 | } |
5476a9a4 GM |
10366 | _ACEOF |
10367 | if ac_fn_c_try_link "$LINENO"; then : | |
10368 | ac_cv_lib_Xbsd_main=yes | |
10369 | else | |
10370 | ac_cv_lib_Xbsd_main=no | |
10371 | fi | |
10372 | rm -f core conftest.err conftest.$ac_objext \ | |
10373 | conftest$ac_exeext conftest.$ac_ext | |
10374 | LIBS=$ac_check_lib_save_LIBS | |
10375 | fi | |
10376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 | |
10377 | $as_echo "$ac_cv_lib_Xbsd_main" >&6; } | |
10378 | if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : | |
10379 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" | |
10380 | fi | |
10381 | ||
10382 | ||
10383 | LIB_PTHREAD= | |
10384 | ||
10385 | ||
10386 | ||
10387 | if test "$ac_cv_header_pthread_h"; then | |
10388 | if test "$GMALLOC_OBJ" = gmalloc.o; then | |
10389 | emacs_pthread_function=pthread_atfork | |
10390 | else | |
10391 | emacs_pthread_function=pthread_self | |
10392 | fi | |
10393 | as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` | |
10394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 | |
10395 | $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } | |
10396 | if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : | |
10397 | $as_echo_n "(cached) " >&6 | |
10398 | else | |
10399 | ac_check_lib_save_LIBS=$LIBS | |
10400 | LIBS="-lpthread $LIBS" | |
10401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10402 | /* end confdefs.h. */ | |
10403 | ||
10404 | /* Override any GCC internal prototype to avoid an error. | |
10405 | Use char because int might match the return type of a GCC | |
10406 | builtin and then its argument prototype would still apply. */ | |
10407 | #ifdef __cplusplus | |
10408 | extern "C" | |
10409 | #endif | |
10410 | char $emacs_pthread_function (); | |
10411 | int | |
10412 | main () | |
f199cab1 | 10413 | { |
5476a9a4 GM |
10414 | return $emacs_pthread_function (); |
10415 | ; | |
10416 | return 0; | |
f199cab1 | 10417 | } |
5476a9a4 GM |
10418 | _ACEOF |
10419 | if ac_fn_c_try_link "$LINENO"; then : | |
10420 | eval "$as_ac_Lib=yes" | |
10421 | else | |
10422 | eval "$as_ac_Lib=no" | |
10423 | fi | |
10424 | rm -f core conftest.err conftest.$ac_objext \ | |
10425 | conftest$ac_exeext conftest.$ac_ext | |
10426 | LIBS=$ac_check_lib_save_LIBS | |
10427 | fi | |
10428 | eval ac_res=\$$as_ac_Lib | |
10429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
10430 | $as_echo "$ac_res" >&6; } | |
10431 | eval as_val=\$$as_ac_Lib | |
10432 | if test "x$as_val" = x""yes; then : | |
10433 | HAVE_PTHREAD=yes | |
10434 | fi | |
10435 | ||
10436 | fi | |
10437 | if test "$HAVE_PTHREAD" = yes; then | |
10438 | case "${canonical}" in | |
10439 | *-hpux*) ;; | |
10440 | *) LIB_PTHREAD="-lpthread" | |
10441 | LIBS="$LIB_PTHREAD $LIBS" ;; | |
10442 | esac | |
10443 | ||
10444 | $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h | |
10445 | ||
10446 | fi | |
10447 | ||
10448 | ||
10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 | |
10450 | $as_echo_n "checking for cma_open in -lpthreads... " >&6; } | |
10451 | if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : | |
10452 | $as_echo_n "(cached) " >&6 | |
10453 | else | |
10454 | ac_check_lib_save_LIBS=$LIBS | |
10455 | LIBS="-lpthreads $LIBS" | |
10456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10457 | /* end confdefs.h. */ | |
10458 | ||
10459 | /* Override any GCC internal prototype to avoid an error. | |
10460 | Use char because int might match the return type of a GCC | |
10461 | builtin and then its argument prototype would still apply. */ | |
10462 | #ifdef __cplusplus | |
10463 | extern "C" | |
f199cab1 | 10464 | #endif |
5476a9a4 GM |
10465 | char cma_open (); |
10466 | int | |
10467 | main () | |
10468 | { | |
10469 | return cma_open (); | |
10470 | ; | |
10471 | return 0; | |
f199cab1 | 10472 | } |
5476a9a4 GM |
10473 | _ACEOF |
10474 | if ac_fn_c_try_link "$LINENO"; then : | |
10475 | ac_cv_lib_pthreads_cma_open=yes | |
10476 | else | |
10477 | ac_cv_lib_pthreads_cma_open=no | |
10478 | fi | |
10479 | rm -f core conftest.err conftest.$ac_objext \ | |
10480 | conftest$ac_exeext conftest.$ac_ext | |
10481 | LIBS=$ac_check_lib_save_LIBS | |
10482 | fi | |
10483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 | |
10484 | $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } | |
10485 | if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : | |
10486 | cat >>confdefs.h <<_ACEOF | |
10487 | #define HAVE_LIBPTHREADS 1 | |
10488 | _ACEOF | |
10489 | ||
10490 | LIBS="-lpthreads $LIBS" | |
10491 | ||
10492 | fi | |
10493 | ||
10494 | ||
10495 | ## Note: when using cpp in s/aix4.2.h, this definition depended on | |
10496 | ## HAVE_LIBPTHREADS. That was not defined earlier in configure when | |
10497 | ## the system file was sourced. Hence the value of LIBS_SYSTEM | |
10498 | ## added to LIBS in configure would never contain the pthreads part, | |
10499 | ## but the value used in Makefiles might. FIXME? | |
10500 | ## | |
10501 | ## -lpthreads seems to be necessary for Xlib in X11R6, and should | |
10502 | ## be harmless on older versions of X where it happens to exist. | |
10503 | test "$opsys" = "aix4-2" && \ | |
10504 | test $ac_cv_lib_pthreads_cma_open = yes && \ | |
10505 | LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" | |
10506 | ||
10507 | ||
10508 | case ${host_os} in | |
10509 | aix*) | |
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 | |
10511 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
10512 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
10513 | $as_echo_n "(cached) " >&6 | |
10514 | else | |
10515 | ||
10516 | case $GCC in | |
10517 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
10518 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
10519 | esac | |
067d23c9 | 10520 | |
5476a9a4 GM |
10521 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
10522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10523 | /* end confdefs.h. */ | |
067d23c9 KY |
10524 | |
10525 | int | |
10526 | main () | |
10527 | { | |
5476a9a4 GM |
10528 | int i; |
10529 | ; | |
10530 | return 0; | |
10531 | } | |
10532 | _ACEOF | |
10533 | if ac_fn_c_try_link "$LINENO"; then : | |
067d23c9 | 10534 | |
5476a9a4 GM |
10535 | else |
10536 | gdb_cv_bigtoc= | |
10537 | fi | |
10538 | rm -f core conftest.err conftest.$ac_objext \ | |
10539 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 10540 | |
5476a9a4 GM |
10541 | fi |
10542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 | |
10543 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
10544 | ;; | |
10545 | esac | |
067d23c9 | 10546 | |
5476a9a4 GM |
10547 | # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
10548 | # used for the tests that follow. We set them back to REAL_CFLAGS and | |
10549 | # REAL_CPPFLAGS later on. | |
067d23c9 | 10550 | |
5476a9a4 GM |
10551 | REAL_CFLAGS="$CFLAGS" |
10552 | REAL_CPPFLAGS="$CPPFLAGS" | |
10553 | ||
10554 | if test "${HAVE_X11}" = "yes"; then | |
10555 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
10556 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
10557 | LIBS="-lX11 $LIBS" | |
10558 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
10559 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | |
10560 | ||
10561 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
10562 | # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, | |
10563 | # but it's more convenient here to set LD_RUN_PATH since this | |
10564 | # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. | |
10565 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
10566 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
10567 | export LD_RUN_PATH | |
10568 | fi | |
10569 | ||
10570 | if test "${opsys}" = "gnu-linux"; then | |
10571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 | |
10572 | $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } | |
10573 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10574 | /* end confdefs.h. */ | |
067d23c9 | 10575 | |
5476a9a4 GM |
10576 | int |
10577 | main () | |
10578 | { | |
10579 | XOpenDisplay ("foo"); | |
f199cab1 | 10580 | ; |
067d23c9 KY |
10581 | return 0; |
10582 | } | |
10583 | _ACEOF | |
5476a9a4 GM |
10584 | if ac_fn_c_try_link "$LINENO"; then : |
10585 | xgnu_linux_first_failure=no | |
067d23c9 | 10586 | else |
5476a9a4 | 10587 | xgnu_linux_first_failure=yes |
067d23c9 | 10588 | fi |
5476a9a4 GM |
10589 | rm -f core conftest.err conftest.$ac_objext \ |
10590 | conftest$ac_exeext conftest.$ac_ext | |
10591 | if test "${xgnu_linux_first_failure}" = "yes"; then | |
10592 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
10593 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
10594 | OLD_CPPFLAGS="$CPPFLAGS" | |
10595 | OLD_LIBS="$LIBS" | |
10596 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
10597 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
10598 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
10599 | LIBS="$LIBS -b i486-linuxaout" | |
10600 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10601 | /* end confdefs.h. */ | |
067d23c9 | 10602 | |
5476a9a4 GM |
10603 | int |
10604 | main () | |
10605 | { | |
10606 | XOpenDisplay ("foo"); | |
10607 | ; | |
10608 | return 0; | |
10609 | } | |
10610 | _ACEOF | |
10611 | if ac_fn_c_try_link "$LINENO"; then : | |
10612 | xgnu_linux_second_failure=no | |
10613 | else | |
10614 | xgnu_linux_second_failure=yes | |
067d23c9 | 10615 | fi |
5476a9a4 GM |
10616 | rm -f core conftest.err conftest.$ac_objext \ |
10617 | conftest$ac_exeext conftest.$ac_ext | |
10618 | if test "${xgnu_linux_second_failure}" = "yes"; then | |
10619 | # If we get the same failure with -b, there is no use adding -b. | |
10620 | # So take it out. This plays safe. | |
10621 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
10622 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
10623 | CPPFLAGS="$OLD_CPPFLAGS" | |
10624 | LIBS="$OLD_LIBS" | |
10625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10626 | $as_echo "no" >&6; } | |
10627 | else | |
10628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
10629 | $as_echo "yes" >&6; } | |
10630 | fi | |
0eb4e0df | 10631 | else |
5476a9a4 GM |
10632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10633 | $as_echo "no" >&6; } | |
10634 | fi | |
10635 | fi | |
0eb4e0df | 10636 | |
5476a9a4 GM |
10637 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
10638 | # header files included from there. | |
10639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 | |
10640 | $as_echo_n "checking for Xkb... " >&6; } | |
0eb4e0df GM |
10641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10642 | /* end confdefs.h. */ | |
5476a9a4 GM |
10643 | #include <X11/Xlib.h> |
10644 | #include <X11/XKBlib.h> | |
0eb4e0df GM |
10645 | int |
10646 | main () | |
10647 | { | |
5476a9a4 | 10648 | XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); |
0eb4e0df GM |
10649 | ; |
10650 | return 0; | |
10651 | } | |
10652 | _ACEOF | |
5476a9a4 GM |
10653 | if ac_fn_c_try_link "$LINENO"; then : |
10654 | emacs_xkb=yes | |
0eb4e0df | 10655 | else |
5476a9a4 | 10656 | emacs_xkb=no |
0eb4e0df | 10657 | fi |
5476a9a4 GM |
10658 | rm -f core conftest.err conftest.$ac_objext \ |
10659 | conftest$ac_exeext conftest.$ac_ext | |
10660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 | |
10661 | $as_echo "$emacs_xkb" >&6; } | |
10662 | if test $emacs_xkb = yes; then | |
1abfdc54 | 10663 | |
f46ba47d GM |
10664 | $as_echo "#define HAVE_XKB 1" >>confdefs.h |
10665 | ||
e1fefc61 | 10666 | fi |
1abfdc54 | 10667 | |
5476a9a4 GM |
10668 | for ac_func in XrmSetDatabase XScreenResourceString \ |
10669 | XScreenNumberOfScreen | |
10670 | do : | |
10671 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10672 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10673 | eval as_val=\$$as_ac_var | |
10674 | if test "x$as_val" = x""yes; then : | |
10675 | cat >>confdefs.h <<_ACEOF | |
10676 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
f199cab1 | 10677 | _ACEOF |
1abfdc54 | 10678 | |
5476a9a4 GM |
10679 | fi |
10680 | done | |
1abfdc54 | 10681 | |
5476a9a4 | 10682 | fi |
1abfdc54 | 10683 | |
5476a9a4 GM |
10684 | if test "${window_system}" = "x11"; then |
10685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 | |
10686 | $as_echo_n "checking X11 version 6... " >&6; } | |
10687 | if test "${emacs_cv_x11_version_6+set}" = set; then : | |
067d23c9 KY |
10688 | $as_echo_n "(cached) " >&6 |
10689 | else | |
5476a9a4 | 10690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 10691 | /* end confdefs.h. */ |
5476a9a4 | 10692 | #include <X11/Xlib.h> |
067d23c9 KY |
10693 | int |
10694 | main () | |
10695 | { | |
5476a9a4 GM |
10696 | #if XlibSpecificationRelease < 6 |
10697 | fail; | |
10698 | #endif | |
10699 | ||
067d23c9 KY |
10700 | ; |
10701 | return 0; | |
10702 | } | |
10703 | _ACEOF | |
5476a9a4 GM |
10704 | if ac_fn_c_try_link "$LINENO"; then : |
10705 | emacs_cv_x11_version_6=yes | |
10706 | else | |
10707 | emacs_cv_x11_version_6=no | |
10708 | fi | |
10709 | rm -f core conftest.err conftest.$ac_objext \ | |
10710 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 10711 | fi |
f199cab1 | 10712 | |
5476a9a4 GM |
10713 | if test $emacs_cv_x11_version_6 = yes; then |
10714 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
10715 | $as_echo "6 or newer" >&6; } | |
f199cab1 | 10716 | |
5476a9a4 | 10717 | $as_echo "#define HAVE_X11R6 1" >>confdefs.h |
f199cab1 GM |
10718 | |
10719 | ||
5476a9a4 | 10720 | $as_echo "#define HAVE_X_I18N 1" >>confdefs.h |
f199cab1 | 10721 | |
5476a9a4 GM |
10722 | ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style |
10723 | ## XIM support. | |
10724 | case "$opsys" in | |
10725 | sol2-*) : ;; | |
10726 | *) | |
10727 | $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
f199cab1 | 10728 | |
5476a9a4 GM |
10729 | ;; |
10730 | esac | |
10731 | else | |
10732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
10733 | $as_echo "before 6" >&6; } | |
10734 | fi | |
10735 | fi | |
f199cab1 | 10736 | |
067d23c9 | 10737 | |
5476a9a4 GM |
10738 | ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. |
10739 | HAVE_RSVG=no | |
10740 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then | |
10741 | if test "${with_rsvg}" != "no"; then | |
10742 | RSVG_REQUIRED=2.11.0 | |
10743 | RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" | |
067d23c9 | 10744 | |
f199cab1 | 10745 | |
5476a9a4 | 10746 | succeeded=no |
067d23c9 | 10747 | |
5476a9a4 GM |
10748 | if test "$PKG_CONFIG" = "no" ; then |
10749 | : | |
10750 | else | |
10751 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 10752 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
10753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 |
10754 | $as_echo_n "checking for $RSVG_MODULE... " >&6; } | |
f199cab1 | 10755 | |
b5591ebb GM |
10756 | if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 && |
10757 | RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` && | |
10758 | RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then | |
5476a9a4 GM |
10759 | edit_cflags=" |
10760 | s,///*,/,g | |
10761 | s/^/ / | |
10762 | s/ -I/ $isystem/g | |
10763 | s/^ // | |
10764 | " | |
10765 | RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` | |
10766 | RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` | |
10767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 | |
10768 | $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } | |
10769 | succeeded=yes | |
10770 | else | |
10771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10772 | $as_echo "no" >&6; } | |
10773 | RSVG_CFLAGS="" | |
10774 | RSVG_LIBS="" | |
10775 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
10776 | ## do set a variable so people can do so. Do it in a subshell |
10777 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 10778 | RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1` |
f199cab1 | 10779 | |
5476a9a4 | 10780 | fi |
067d23c9 | 10781 | |
067d23c9 | 10782 | |
067d23c9 | 10783 | |
f199cab1 | 10784 | else |
5476a9a4 GM |
10785 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
10786 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 10787 | fi |
5476a9a4 GM |
10788 | fi |
10789 | ||
10790 | if test $succeeded = yes; then | |
10791 | HAVE_RSVG=yes | |
10792 | else | |
10793 | : | |
10794 | fi | |
067d23c9 | 10795 | |
067d23c9 | 10796 | |
067d23c9 | 10797 | |
f199cab1 | 10798 | |
5476a9a4 | 10799 | if test $HAVE_RSVG = yes; then |
f199cab1 | 10800 | |
5476a9a4 GM |
10801 | $as_echo "#define HAVE_RSVG 1" >>confdefs.h |
10802 | ||
10803 | CFLAGS="$CFLAGS $RSVG_CFLAGS" | |
10804 | LIBS="$RSVG_LIBS $LIBS" | |
10805 | fi | |
f199cab1 | 10806 | fi |
5476a9a4 | 10807 | fi |
f199cab1 | 10808 | |
5476a9a4 GM |
10809 | HAVE_IMAGEMAGICK=no |
10810 | if test "${HAVE_X11}" = "yes"; then | |
10811 | if test "${with_imagemagick}" != "no"; then | |
10812 | ## 6.2.8 is the earliest version known to work, but earlier versions | |
10813 | ## might work - let us know if you find one. | |
10814 | ## 6.0.7 does not work. See bug#7955. | |
0cb77136 GM |
10815 | ## 6.8.2 makes Emacs crash; see Bug#13867. |
10816 | IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2" | |
f199cab1 | 10817 | |
5476a9a4 | 10818 | succeeded=no |
f199cab1 | 10819 | |
5476a9a4 GM |
10820 | if test "$PKG_CONFIG" = "no" ; then |
10821 | : | |
10822 | else | |
10823 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 10824 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
10825 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 |
10826 | $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } | |
f199cab1 | 10827 | |
b5591ebb GM |
10828 | if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 && |
10829 | IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` && | |
10830 | IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then | |
5476a9a4 GM |
10831 | edit_cflags=" |
10832 | s,///*,/,g | |
10833 | s/^/ / | |
10834 | s/ -I/ $isystem/g | |
10835 | s/^ // | |
10836 | " | |
10837 | IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` | |
10838 | IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` | |
10839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 | |
10840 | $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } | |
10841 | succeeded=yes | |
10842 | else | |
10843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10844 | $as_echo "no" >&6; } | |
10845 | IMAGEMAGICK_CFLAGS="" | |
10846 | IMAGEMAGICK_LIBS="" | |
10847 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
10848 | ## do set a variable so people can do so. Do it in a subshell |
10849 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 10850 | IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1` |
f199cab1 | 10851 | |
5476a9a4 | 10852 | fi |
f199cab1 | 10853 | |
f199cab1 | 10854 | |
f199cab1 | 10855 | |
5476a9a4 GM |
10856 | else |
10857 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10858 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
10859 | fi | |
f199cab1 | 10860 | fi |
5476a9a4 GM |
10861 | |
10862 | if test $succeeded = yes; then | |
10863 | HAVE_IMAGEMAGICK=yes | |
f199cab1 | 10864 | else |
5476a9a4 | 10865 | : |
067d23c9 KY |
10866 | fi |
10867 | ||
f199cab1 | 10868 | |
067d23c9 | 10869 | |
f199cab1 | 10870 | |
5476a9a4 | 10871 | if test $HAVE_IMAGEMAGICK = yes; then |
067d23c9 | 10872 | |
5476a9a4 | 10873 | $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h |
f199cab1 | 10874 | |
5476a9a4 GM |
10875 | CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" |
10876 | LIBS="$IMAGEMAGICK_LIBS $LIBS" | |
10877 | for ac_func in MagickExportImagePixels MagickMergeImageLayers | |
10878 | do : | |
10879 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10880 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10881 | eval as_val=\$$as_ac_var | |
10882 | if test "x$as_val" = x""yes; then : | |
10883 | cat >>confdefs.h <<_ACEOF | |
10884 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
067d23c9 | 10885 | _ACEOF |
f199cab1 GM |
10886 | |
10887 | fi | |
5476a9a4 GM |
10888 | done |
10889 | ||
067d23c9 KY |
10890 | fi |
10891 | fi | |
5476a9a4 | 10892 | fi |
067d23c9 | 10893 | |
f199cab1 | 10894 | |
5476a9a4 GM |
10895 | HAVE_GTK=no |
10896 | GTK_OBJ= | |
4fa92495 GM |
10897 | check_gtk2=no |
10898 | gtk3_pkg_errors= | |
10899 | if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | |
5476a9a4 GM |
10900 | GLIB_REQUIRED=2.28 |
10901 | GTK_REQUIRED=3.0 | |
10902 | GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 GM |
10903 | |
10904 | ||
5476a9a4 | 10905 | succeeded=no |
f199cab1 | 10906 | |
5476a9a4 GM |
10907 | if test "$PKG_CONFIG" = "no" ; then |
10908 | pkg_check_gtk=no | |
10909 | else | |
10910 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 10911 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
10912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 |
10913 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
f199cab1 | 10914 | |
b5591ebb GM |
10915 | if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 && |
10916 | GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` && | |
10917 | GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then | |
5476a9a4 GM |
10918 | edit_cflags=" |
10919 | s,///*,/,g | |
10920 | s/^/ / | |
10921 | s/ -I/ $isystem/g | |
10922 | s/^ // | |
10923 | " | |
10924 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
10925 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
10926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
10927 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
10928 | succeeded=yes | |
10929 | else | |
10930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10931 | $as_echo "no" >&6; } | |
10932 | GTK_CFLAGS="" | |
10933 | GTK_LIBS="" | |
10934 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
10935 | ## do set a variable so people can do so. Do it in a subshell |
10936 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 10937 | GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1` |
f199cab1 | 10938 | |
5476a9a4 | 10939 | fi |
f199cab1 | 10940 | |
f199cab1 | 10941 | |
f199cab1 | 10942 | |
5476a9a4 GM |
10943 | else |
10944 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
10945 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
f199cab1 | 10946 | fi |
5476a9a4 | 10947 | fi |
067d23c9 | 10948 | |
5476a9a4 GM |
10949 | if test $succeeded = yes; then |
10950 | pkg_check_gtk=yes | |
10951 | else | |
10952 | pkg_check_gtk=no | |
10953 | fi | |
067d23c9 | 10954 | |
4fa92495 | 10955 | if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then |
5476a9a4 | 10956 | as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 |
067d23c9 | 10957 | fi |
4fa92495 | 10958 | if test "$pkg_check_gtk" = "yes"; then |
067d23c9 | 10959 | |
5476a9a4 | 10960 | $as_echo "#define HAVE_GTK3 1" >>confdefs.h |
067d23c9 | 10961 | |
4fa92495 GM |
10962 | GTK_OBJ=emacsgtkfixed.o |
10963 | term_header=gtkutil.h | |
a732eace | 10964 | USE_GTK_TOOLKIT="GTK3" |
4efe5ef9 GM |
10965 | if test "x$ac_enable_gtk_deprecation_warnings" = x; then |
10966 | GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" | |
10967 | fi | |
4fa92495 GM |
10968 | else |
10969 | check_gtk2=yes | |
10970 | gtk3_pkg_errors="$GTK_PKG_ERRORS " | |
10971 | fi | |
5476a9a4 | 10972 | fi |
067d23c9 | 10973 | |
4fa92495 | 10974 | if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then |
5476a9a4 GM |
10975 | GLIB_REQUIRED=2.10 |
10976 | GTK_REQUIRED=2.10 | |
10977 | GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
f199cab1 | 10978 | |
5476a9a4 GM |
10979 | |
10980 | succeeded=no | |
10981 | ||
10982 | if test "$PKG_CONFIG" = "no" ; then | |
10983 | pkg_check_gtk=no | |
10984 | else | |
10985 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 10986 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
10987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 |
10988 | $as_echo_n "checking for $GTK_MODULES... " >&6; } | |
10989 | ||
b5591ebb GM |
10990 | if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 && |
10991 | GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` && | |
10992 | GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then | |
5476a9a4 GM |
10993 | edit_cflags=" |
10994 | s,///*,/,g | |
10995 | s/^/ / | |
10996 | s/ -I/ $isystem/g | |
10997 | s/^ // | |
10998 | " | |
10999 | GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` | |
11000 | GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` | |
11001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 | |
11002 | $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } | |
11003 | succeeded=yes | |
11004 | else | |
11005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11006 | $as_echo "no" >&6; } | |
11007 | GTK_CFLAGS="" | |
11008 | GTK_LIBS="" | |
11009 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11010 | ## do set a variable so people can do so. Do it in a subshell |
11011 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11012 | GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1` |
5476a9a4 GM |
11013 | |
11014 | fi | |
11015 | ||
11016 | ||
11017 | ||
11018 | else | |
11019 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11020 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11021 | fi | |
11022 | fi | |
11023 | ||
11024 | if test $succeeded = yes; then | |
11025 | pkg_check_gtk=yes | |
11026 | else | |
11027 | pkg_check_gtk=no | |
11028 | fi | |
11029 | ||
e2d8f316 GM |
11030 | if test "$pkg_check_gtk" = "no" && |
11031 | { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } | |
11032 | then | |
11033 | as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 | |
5476a9a4 | 11034 | fi |
a732eace | 11035 | test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2" |
067d23c9 | 11036 | fi |
067d23c9 | 11037 | |
5476a9a4 GM |
11038 | if test x"$pkg_check_gtk" = xyes; then |
11039 | ||
11040 | ||
11041 | ||
11042 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | |
11043 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
11044 | LIBS="$GTK_LIBS $LIBS" | |
11045 | GTK_COMPILES=no | |
11046 | for ac_func in gtk_main | |
11047 | do : | |
11048 | ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" | |
11049 | if test "x$ac_cv_func_gtk_main" = x""yes; then : | |
11050 | cat >>confdefs.h <<_ACEOF | |
11051 | #define HAVE_GTK_MAIN 1 | |
11052 | _ACEOF | |
11053 | GTK_COMPILES=yes | |
f199cab1 | 11054 | fi |
5476a9a4 | 11055 | done |
067d23c9 | 11056 | |
5476a9a4 GM |
11057 | if test "${GTK_COMPILES}" != "yes"; then |
11058 | if test "$USE_X_TOOLKIT" != "maybe"; then | |
11059 | as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; | |
11060 | fi | |
11061 | else | |
11062 | HAVE_GTK=yes | |
11063 | ||
11064 | $as_echo "#define USE_GTK 1" >>confdefs.h | |
067d23c9 | 11065 | |
5476a9a4 GM |
11066 | GTK_OBJ="gtkutil.o $GTK_OBJ" |
11067 | USE_X_TOOLKIT=none | |
b5591ebb | 11068 | if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then |
5476a9a4 GM |
11069 | : |
11070 | else | |
11071 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with | |
11072 | closing open displays. This is no problem if you just use | |
11073 | one display, but if you use more than one and close one of them | |
11074 | Emacs may crash." >&5 | |
11075 | $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with | |
11076 | closing open displays. This is no problem if you just use | |
11077 | one display, but if you use more than one and close one of them | |
11078 | Emacs may crash." >&2;} | |
11079 | sleep 3 | |
11080 | fi | |
067d23c9 KY |
11081 | fi |
11082 | ||
5476a9a4 | 11083 | fi |
067d23c9 KY |
11084 | |
11085 | ||
11086 | ||
5476a9a4 | 11087 | if test "${HAVE_GTK}" = "yes"; then |
067d23c9 | 11088 | |
5476a9a4 GM |
11089 | if test "$with_toolkit_scroll_bars" != no; then |
11090 | with_toolkit_scroll_bars=yes | |
11091 | fi | |
067d23c9 | 11092 | |
5476a9a4 GM |
11093 | HAVE_GTK_FILE_SELECTION=no |
11094 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default | |
11095 | #include <gtk/gtk.h> | |
11096 | " | |
11097 | if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : | |
11098 | HAVE_GTK_FILE_SELECTION=yes | |
11099 | else | |
11100 | HAVE_GTK_FILE_SELECTION=no | |
11101 | fi | |
067d23c9 | 11102 | |
5476a9a4 GM |
11103 | if test "$HAVE_GTK_FILE_SELECTION" = yes; then |
11104 | for ac_func in gtk_file_selection_new | |
11105 | do : | |
11106 | ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" | |
11107 | if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : | |
11108 | cat >>confdefs.h <<_ACEOF | |
11109 | #define HAVE_GTK_FILE_SELECTION_NEW 1 | |
f199cab1 | 11110 | _ACEOF |
067d23c9 | 11111 | |
f199cab1 | 11112 | fi |
5476a9a4 GM |
11113 | done |
11114 | ||
f199cab1 | 11115 | fi |
067d23c9 | 11116 | |
4efe5ef9 GM |
11117 | HAVE_GTK_HANDLE_BOX=no |
11118 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default | |
11119 | #include <gtk/gtk.h> | |
11120 | " | |
11121 | if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then : | |
11122 | HAVE_GTK_HANDLE_BOX=yes | |
11123 | else | |
11124 | HAVE_GTK_HANDLE_BOX=no | |
11125 | fi | |
11126 | ||
11127 | if test "$HAVE_GTK_HANDLE_BOX" = yes; then | |
11128 | for ac_func in gtk_handle_box_new | |
11129 | do : | |
11130 | ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new" | |
11131 | if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then : | |
11132 | cat >>confdefs.h <<_ACEOF | |
11133 | #define HAVE_GTK_HANDLE_BOX_NEW 1 | |
11134 | _ACEOF | |
11135 | ||
11136 | fi | |
11137 | done | |
11138 | ||
11139 | fi | |
11140 | ||
11141 | HAVE_GTK_TEAROFF_MENU_ITEM=no | |
11142 | ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default | |
11143 | #include <gtk/gtk.h> | |
11144 | " | |
11145 | if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then : | |
11146 | HAVE_GTK_TEAROFF_MENU_ITEM=yes | |
11147 | else | |
11148 | HAVE_GTK_TEAROFF_MENU_ITEM=no | |
11149 | fi | |
11150 | ||
11151 | if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then | |
11152 | for ac_func in gtk_tearoff_menu_item_new | |
11153 | do : | |
11154 | ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new" | |
11155 | if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then : | |
11156 | cat >>confdefs.h <<_ACEOF | |
11157 | #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1 | |
11158 | _ACEOF | |
11159 | ||
11160 | fi | |
11161 | done | |
11162 | ||
11163 | fi | |
067d23c9 | 11164 | |
5476a9a4 GM |
11165 | for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ |
11166 | gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
11167 | gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
11168 | gtk_orientable_set_orientation \ | |
11169 | gtk_window_set_has_resize_grip | |
11170 | do : | |
11171 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11172 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11173 | eval as_val=\$$as_ac_var | |
11174 | if test "x$as_val" = x""yes; then : | |
11175 | cat >>confdefs.h <<_ACEOF | |
11176 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11177 | _ACEOF | |
067d23c9 | 11178 | |
5476a9a4 GM |
11179 | fi |
11180 | done | |
067d23c9 | 11181 | |
42dcba54 GM |
11182 | |
11183 | term_header=gtkutil.h | |
5476a9a4 | 11184 | fi |
067d23c9 | 11185 | |
5476a9a4 GM |
11186 | HAVE_DBUS=no |
11187 | DBUS_OBJ= | |
11188 | if test "${with_dbus}" = "yes"; then | |
067d23c9 | 11189 | |
5476a9a4 | 11190 | succeeded=no |
067d23c9 | 11191 | |
5476a9a4 GM |
11192 | if test "$PKG_CONFIG" = "no" ; then |
11193 | HAVE_DBUS=no | |
f199cab1 | 11194 | else |
5476a9a4 | 11195 | PKG_CONFIG_MIN_VERSION=0.9.0 |
b5591ebb | 11196 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 |
11198 | $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } | |
067d23c9 | 11199 | |
b5591ebb GM |
11200 | if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 && |
11201 | DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` && | |
11202 | DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then | |
5476a9a4 GM |
11203 | edit_cflags=" |
11204 | s,///*,/,g | |
11205 | s/^/ / | |
11206 | s/ -I/ $isystem/g | |
11207 | s/^ // | |
11208 | " | |
11209 | DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` | |
11210 | DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` | |
11211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 | |
11212 | $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } | |
11213 | succeeded=yes | |
11214 | else | |
11215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11216 | $as_echo "no" >&6; } | |
11217 | DBUS_CFLAGS="" | |
11218 | DBUS_LIBS="" | |
11219 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11220 | ## do set a variable so people can do so. Do it in a subshell |
11221 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11222 | DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1` |
067d23c9 | 11223 | |
5476a9a4 | 11224 | fi |
067d23c9 | 11225 | |
15f79fcd | 11226 | |
067d23c9 | 11227 | |
5476a9a4 GM |
11228 | else |
11229 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11230 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11231 | fi | |
067d23c9 | 11232 | fi |
067d23c9 | 11233 | |
5476a9a4 GM |
11234 | if test $succeeded = yes; then |
11235 | HAVE_DBUS=yes | |
f199cab1 | 11236 | else |
5476a9a4 | 11237 | HAVE_DBUS=no |
f199cab1 | 11238 | fi |
067d23c9 | 11239 | |
5476a9a4 GM |
11240 | if test "$HAVE_DBUS" = yes; then |
11241 | LIBS="$LIBS $DBUS_LIBS" | |
067d23c9 | 11242 | |
5476a9a4 | 11243 | $as_echo "#define HAVE_DBUS 1" >>confdefs.h |
067d23c9 | 11244 | |
5476a9a4 GM |
11245 | for ac_func in dbus_watch_get_unix_fd \ |
11246 | dbus_type_is_valid \ | |
11247 | dbus_validate_bus_name \ | |
11248 | dbus_validate_path \ | |
11249 | dbus_validate_interface \ | |
11250 | dbus_validate_member | |
11251 | do : | |
11252 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11253 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11254 | eval as_val=\$$as_ac_var | |
11255 | if test "x$as_val" = x""yes; then : | |
11256 | cat >>confdefs.h <<_ACEOF | |
11257 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11258 | _ACEOF | |
067d23c9 | 11259 | |
5476a9a4 GM |
11260 | fi |
11261 | done | |
067d23c9 | 11262 | |
5476a9a4 GM |
11263 | DBUS_OBJ=dbusbind.o |
11264 | fi | |
11265 | fi | |
067d23c9 KY |
11266 | |
11267 | ||
5476a9a4 GM |
11268 | HAVE_GSETTINGS=no |
11269 | if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then | |
067d23c9 | 11270 | |
5476a9a4 | 11271 | succeeded=no |
067d23c9 | 11272 | |
5476a9a4 GM |
11273 | if test "$PKG_CONFIG" = "no" ; then |
11274 | HAVE_GSETTINGS=no | |
11275 | else | |
11276 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11277 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 |
11279 | $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } | |
0afb4571 | 11280 | |
b5591ebb GM |
11281 | if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 && |
11282 | GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` && | |
11283 | GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then | |
5476a9a4 GM |
11284 | edit_cflags=" |
11285 | s,///*,/,g | |
11286 | s/^/ / | |
11287 | s/ -I/ $isystem/g | |
11288 | s/^ // | |
11289 | " | |
11290 | GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` | |
11291 | GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` | |
11292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 | |
11293 | $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } | |
11294 | succeeded=yes | |
11295 | else | |
11296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11297 | $as_echo "no" >&6; } | |
11298 | GSETTINGS_CFLAGS="" | |
11299 | GSETTINGS_LIBS="" | |
11300 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11301 | ## do set a variable so people can do so. Do it in a subshell |
11302 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11303 | GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1` |
0afb4571 | 11304 | |
5476a9a4 | 11305 | fi |
067d23c9 KY |
11306 | |
11307 | ||
11308 | ||
11309 | else | |
5476a9a4 GM |
11310 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
11311 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
067d23c9 | 11312 | fi |
5476a9a4 | 11313 | fi |
067d23c9 | 11314 | |
5476a9a4 GM |
11315 | if test $succeeded = yes; then |
11316 | HAVE_GSETTINGS=yes | |
11317 | else | |
11318 | HAVE_GSETTINGS=no | |
11319 | fi | |
f199cab1 | 11320 | |
5476a9a4 | 11321 | if test "$HAVE_GSETTINGS" = "yes"; then |
f199cab1 | 11322 | |
5476a9a4 | 11323 | $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h |
f199cab1 | 11324 | |
5476a9a4 GM |
11325 | SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" |
11326 | SETTINGS_LIBS="$GSETTINGS_LIBS" | |
11327 | fi | |
11328 | fi | |
067d23c9 | 11329 | |
5476a9a4 GM |
11330 | HAVE_GCONF=no |
11331 | if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then | |
067d23c9 | 11332 | |
5476a9a4 | 11333 | succeeded=no |
067d23c9 | 11334 | |
5476a9a4 GM |
11335 | if test "$PKG_CONFIG" = "no" ; then |
11336 | HAVE_GCONF=no | |
11337 | else | |
11338 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11339 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 |
11341 | $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } | |
067d23c9 | 11342 | |
b5591ebb GM |
11343 | if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 && |
11344 | GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` && | |
11345 | GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then | |
5476a9a4 GM |
11346 | edit_cflags=" |
11347 | s,///*,/,g | |
11348 | s/^/ / | |
11349 | s/ -I/ $isystem/g | |
11350 | s/^ // | |
11351 | " | |
11352 | GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` | |
11353 | GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` | |
11354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 | |
11355 | $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } | |
11356 | succeeded=yes | |
11357 | else | |
11358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11359 | $as_echo "no" >&6; } | |
11360 | GCONF_CFLAGS="" | |
11361 | GCONF_LIBS="" | |
11362 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11363 | ## do set a variable so people can do so. Do it in a subshell |
11364 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11365 | GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1` |
067d23c9 | 11366 | |
5476a9a4 | 11367 | fi |
f199cab1 | 11368 | |
f199cab1 GM |
11369 | |
11370 | ||
5476a9a4 GM |
11371 | else |
11372 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11373 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11374 | fi | |
11375 | fi | |
f199cab1 | 11376 | |
5476a9a4 GM |
11377 | if test $succeeded = yes; then |
11378 | HAVE_GCONF=yes | |
11379 | else | |
11380 | HAVE_GCONF=no | |
11381 | fi | |
f199cab1 | 11382 | |
5476a9a4 | 11383 | if test "$HAVE_GCONF" = yes; then |
f199cab1 | 11384 | |
5476a9a4 | 11385 | $as_echo "#define HAVE_GCONF 1" >>confdefs.h |
f199cab1 | 11386 | |
5476a9a4 GM |
11387 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" |
11388 | SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" | |
11389 | fi | |
11390 | fi | |
f199cab1 | 11391 | |
5476a9a4 | 11392 | if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then |
dcde497f GM |
11393 | |
11394 | succeeded=no | |
11395 | ||
11396 | if test "$PKG_CONFIG" = "no" ; then | |
11397 | HAVE_GOBJECT=no | |
11398 | else | |
11399 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11400 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
dcde497f GM |
11401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5 |
11402 | $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; } | |
11403 | ||
b5591ebb GM |
11404 | if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 && |
11405 | GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` && | |
11406 | GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then | |
dcde497f GM |
11407 | edit_cflags=" |
11408 | s,///*,/,g | |
11409 | s/^/ / | |
11410 | s/ -I/ $isystem/g | |
11411 | s/^ // | |
11412 | " | |
11413 | GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"` | |
11414 | GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'` | |
11415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5 | |
11416 | $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; } | |
11417 | succeeded=yes | |
11418 | else | |
11419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11420 | $as_echo "no" >&6; } | |
11421 | GOBJECT_CFLAGS="" | |
11422 | GOBJECT_LIBS="" | |
11423 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11424 | ## do set a variable so people can do so. Do it in a subshell |
11425 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11426 | GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1` |
dcde497f GM |
11427 | |
11428 | fi | |
11429 | ||
11430 | ||
11431 | ||
11432 | else | |
11433 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11434 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11435 | fi | |
11436 | fi | |
11437 | ||
11438 | if test $succeeded = yes; then | |
11439 | HAVE_GOBJECT=yes | |
11440 | else | |
11441 | HAVE_GOBJECT=no | |
11442 | fi | |
11443 | ||
11444 | if test "$HAVE_GOBJECT" = "yes"; then | |
11445 | SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" | |
11446 | SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" | |
11447 | fi | |
5476a9a4 GM |
11448 | SAVE_CFLAGS="$CFLAGS" |
11449 | SAVE_LIBS="$LIBS" | |
11450 | CFLAGS="$SETTINGS_CFLAGS $CFLAGS" | |
11451 | LIBS="$SETTINGS_LIBS $LIBS" | |
11452 | for ac_func in g_type_init | |
11453 | do : | |
11454 | ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" | |
11455 | if test "x$ac_cv_func_g_type_init" = x""yes; then : | |
11456 | cat >>confdefs.h <<_ACEOF | |
11457 | #define HAVE_G_TYPE_INIT 1 | |
067d23c9 | 11458 | _ACEOF |
067d23c9 | 11459 | |
5476a9a4 GM |
11460 | fi |
11461 | done | |
067d23c9 | 11462 | |
5476a9a4 GM |
11463 | CFLAGS="$SAVE_CFLAGS" |
11464 | LIBS="$SAVE_LIBS" | |
11465 | fi | |
067d23c9 | 11466 | |
067d23c9 | 11467 | |
f199cab1 | 11468 | |
067d23c9 | 11469 | |
5476a9a4 GM |
11470 | HAVE_LIBSELINUX=no |
11471 | LIBSELINUX_LIBS= | |
11472 | if test "${with_selinux}" = "yes"; then | |
11473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 | |
11474 | $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } | |
11475 | if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : | |
11476 | $as_echo_n "(cached) " >&6 | |
11477 | else | |
11478 | ac_check_lib_save_LIBS=$LIBS | |
11479 | LIBS="-lselinux $LIBS" | |
11480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11481 | /* end confdefs.h. */ | |
067d23c9 | 11482 | |
5476a9a4 GM |
11483 | /* Override any GCC internal prototype to avoid an error. |
11484 | Use char because int might match the return type of a GCC | |
11485 | builtin and then its argument prototype would still apply. */ | |
11486 | #ifdef __cplusplus | |
11487 | extern "C" | |
f199cab1 | 11488 | #endif |
5476a9a4 | 11489 | char lgetfilecon (); |
f199cab1 GM |
11490 | int |
11491 | main () | |
11492 | { | |
5476a9a4 | 11493 | return lgetfilecon (); |
f199cab1 GM |
11494 | ; |
11495 | return 0; | |
11496 | } | |
11497 | _ACEOF | |
5476a9a4 GM |
11498 | if ac_fn_c_try_link "$LINENO"; then : |
11499 | ac_cv_lib_selinux_lgetfilecon=yes | |
11500 | else | |
11501 | ac_cv_lib_selinux_lgetfilecon=no | |
f199cab1 | 11502 | fi |
5476a9a4 GM |
11503 | rm -f core conftest.err conftest.$ac_objext \ |
11504 | conftest$ac_exeext conftest.$ac_ext | |
11505 | LIBS=$ac_check_lib_save_LIBS | |
11506 | fi | |
11507 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 | |
11508 | $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } | |
11509 | if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : | |
11510 | HAVE_LIBSELINUX=yes | |
11511 | else | |
11512 | HAVE_LIBSELINUX=no | |
067d23c9 KY |
11513 | fi |
11514 | ||
5476a9a4 | 11515 | if test "$HAVE_LIBSELINUX" = yes; then |
067d23c9 | 11516 | |
5476a9a4 | 11517 | $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h |
067d23c9 | 11518 | |
5476a9a4 GM |
11519 | LIBSELINUX_LIBS=-lselinux |
11520 | fi | |
f199cab1 | 11521 | fi |
067d23c9 | 11522 | |
067d23c9 | 11523 | |
5476a9a4 GM |
11524 | HAVE_GNUTLS=no |
11525 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no | |
11526 | if test "${with_gnutls}" = "yes" ; then | |
067d23c9 | 11527 | |
5476a9a4 | 11528 | succeeded=no |
067d23c9 | 11529 | |
5476a9a4 GM |
11530 | if test "$PKG_CONFIG" = "no" ; then |
11531 | HAVE_GNUTLS=no | |
11532 | else | |
11533 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 11534 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
11535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5 |
11536 | $as_echo_n "checking for gnutls >= 2.6.6... " >&6; } | |
067d23c9 | 11537 | |
b5591ebb GM |
11538 | if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 && |
11539 | LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` && | |
11540 | LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then | |
5476a9a4 GM |
11541 | edit_cflags=" |
11542 | s,///*,/,g | |
11543 | s/^/ / | |
11544 | s/ -I/ $isystem/g | |
11545 | s/^ // | |
11546 | " | |
11547 | LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` | |
11548 | LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` | |
11549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 | |
11550 | $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } | |
11551 | succeeded=yes | |
11552 | else | |
11553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11554 | $as_echo "no" >&6; } | |
11555 | LIBGNUTLS_CFLAGS="" | |
11556 | LIBGNUTLS_LIBS="" | |
11557 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
11558 | ## do set a variable so people can do so. Do it in a subshell |
11559 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 11560 | LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1` |
067d23c9 | 11561 | |
5476a9a4 | 11562 | fi |
067d23c9 | 11563 | |
067d23c9 | 11564 | |
067d23c9 | 11565 | |
5476a9a4 GM |
11566 | else |
11567 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
11568 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
11569 | fi | |
11570 | fi | |
067d23c9 | 11571 | |
5476a9a4 GM |
11572 | if test $succeeded = yes; then |
11573 | HAVE_GNUTLS=yes | |
11574 | else | |
11575 | HAVE_GNUTLS=no | |
11576 | fi | |
067d23c9 | 11577 | |
5476a9a4 | 11578 | if test "${HAVE_GNUTLS}" = "yes"; then |
067d23c9 | 11579 | |
5476a9a4 | 11580 | $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h |
067d23c9 | 11581 | |
5476a9a4 | 11582 | fi |
f199cab1 | 11583 | |
5476a9a4 GM |
11584 | CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
11585 | LIBS="$LIBGNUTLS_LIBS $LIBS" | |
11586 | for ac_func in gnutls_certificate_set_verify_function | |
11587 | do : | |
11588 | ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" | |
11589 | if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : | |
11590 | cat >>confdefs.h <<_ACEOF | |
11591 | #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 | |
f199cab1 | 11592 | _ACEOF |
5476a9a4 GM |
11593 | HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes |
11594 | fi | |
11595 | done | |
067d23c9 KY |
11596 | |
11597 | ||
5476a9a4 GM |
11598 | if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then |
11599 | ||
11600 | $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h | |
f527bd02 | 11601 | |
f199cab1 | 11602 | fi |
5476a9a4 | 11603 | fi |
f527bd02 | 11604 | |
f527bd02 | 11605 | |
5476a9a4 GM |
11606 | |
11607 | ||
b5eb356a GM |
11608 | if test "${with_inotify}" = "yes"; then |
11609 | for ac_header in sys/inotify.h | |
11610 | do : | |
11611 | ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" | |
11612 | if test "x$ac_cv_header_sys_inotify_h" = x""yes; then : | |
11613 | cat >>confdefs.h <<_ACEOF | |
11614 | #define HAVE_SYS_INOTIFY_H 1 | |
11615 | _ACEOF | |
11616 | ||
11617 | fi | |
11618 | ||
11619 | done | |
11620 | ||
11621 | if test "$ac_cv_header_sys_inotify_h" = yes ; then | |
11622 | ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1" | |
11623 | if test "x$ac_cv_func_inotify_init1" = x""yes; then : | |
11624 | ||
11625 | fi | |
11626 | ||
11627 | fi | |
11628 | fi | |
11629 | if test "$ac_cv_func_inotify_init1" = yes; then | |
11630 | ||
11631 | $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h | |
11632 | ||
11633 | fi | |
11634 | ||
4cc63c81 GM |
11635 | HAVE_POSIX_ACL=no |
11636 | LIBACL_LIBS= | |
11637 | if test "${with_acl}" = "yes"; then | |
11638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_set_file in -lacl" >&5 | |
11639 | $as_echo_n "checking for acl_set_file in -lacl... " >&6; } | |
11640 | if test "${ac_cv_lib_acl_acl_set_file+set}" = set; then : | |
11641 | $as_echo_n "(cached) " >&6 | |
11642 | else | |
11643 | ac_check_lib_save_LIBS=$LIBS | |
11644 | LIBS="-lacl $LIBS" | |
11645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11646 | /* end confdefs.h. */ | |
11647 | ||
11648 | /* Override any GCC internal prototype to avoid an error. | |
11649 | Use char because int might match the return type of a GCC | |
11650 | builtin and then its argument prototype would still apply. */ | |
11651 | #ifdef __cplusplus | |
11652 | extern "C" | |
11653 | #endif | |
11654 | char acl_set_file (); | |
11655 | int | |
11656 | main () | |
11657 | { | |
11658 | return acl_set_file (); | |
11659 | ; | |
11660 | return 0; | |
11661 | } | |
11662 | _ACEOF | |
11663 | if ac_fn_c_try_link "$LINENO"; then : | |
11664 | ac_cv_lib_acl_acl_set_file=yes | |
11665 | else | |
11666 | ac_cv_lib_acl_acl_set_file=no | |
11667 | fi | |
11668 | rm -f core conftest.err conftest.$ac_objext \ | |
11669 | conftest$ac_exeext conftest.$ac_ext | |
11670 | LIBS=$ac_check_lib_save_LIBS | |
11671 | fi | |
11672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_set_file" >&5 | |
11673 | $as_echo "$ac_cv_lib_acl_acl_set_file" >&6; } | |
11674 | if test "x$ac_cv_lib_acl_acl_set_file" = x""yes; then : | |
11675 | HAVE_POSIX_ACL=yes | |
11676 | else | |
11677 | HAVE_POSIX_ACL=no | |
11678 | fi | |
11679 | ||
11680 | if test "$HAVE_POSIX_ACL" = yes; then | |
11681 | ||
11682 | $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h | |
11683 | ||
11684 | LIBACL_LIBS=-lacl | |
11685 | else | |
11686 | ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file" | |
11687 | if test "x$ac_cv_func_acl_set_file" = x""yes; then : | |
11688 | HAVE_POSIX_ACL=yes | |
11689 | else | |
11690 | HAVE_POSIX_ACL=no | |
11691 | fi | |
11692 | ||
11693 | if test "$HAVE_POSIX_ACL" = yes; then | |
11694 | ||
11695 | $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h | |
11696 | ||
11697 | fi | |
11698 | fi | |
11699 | fi | |
11700 | ||
11701 | ||
5476a9a4 GM |
11702 | HAVE_XAW3D=no |
11703 | LUCID_LIBW= | |
11704 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11705 | if test "$with_xaw3d" != no; then | |
5476a9a4 | 11706 | if test "${emacs_cv_xaw3d+set}" = set; then : |
f199cab1 GM |
11707 | $as_echo_n "(cached) " >&6 |
11708 | else | |
5476a9a4 GM |
11709 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11710 | /* end confdefs.h. */ | |
f527bd02 | 11711 | |
5476a9a4 GM |
11712 | #include <X11/Intrinsic.h> |
11713 | #include <X11/Xaw3d/Simple.h> | |
11714 | int | |
11715 | main () | |
11716 | { | |
11717 | ||
11718 | ; | |
11719 | return 0; | |
11720 | } | |
11721 | _ACEOF | |
11722 | if ac_fn_c_try_link "$LINENO"; then : | |
11723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 | |
11724 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | |
11725 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : | |
11726 | $as_echo_n "(cached) " >&6 | |
11727 | else | |
11728 | ac_check_lib_save_LIBS=$LIBS | |
11729 | LIBS="-lXaw3d $LIBS" | |
11730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11731 | /* end confdefs.h. */ | |
f527bd02 | 11732 | |
5476a9a4 GM |
11733 | /* Override any GCC internal prototype to avoid an error. |
11734 | Use char because int might match the return type of a GCC | |
11735 | builtin and then its argument prototype would still apply. */ | |
11736 | #ifdef __cplusplus | |
11737 | extern "C" | |
11738 | #endif | |
11739 | char XawScrollbarSetThumb (); | |
11740 | int | |
11741 | main () | |
11742 | { | |
11743 | return XawScrollbarSetThumb (); | |
11744 | ; | |
11745 | return 0; | |
11746 | } | |
11747 | _ACEOF | |
11748 | if ac_fn_c_try_link "$LINENO"; then : | |
11749 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes | |
f199cab1 | 11750 | else |
5476a9a4 | 11751 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no |
f199cab1 | 11752 | fi |
5476a9a4 GM |
11753 | rm -f core conftest.err conftest.$ac_objext \ |
11754 | conftest$ac_exeext conftest.$ac_ext | |
11755 | LIBS=$ac_check_lib_save_LIBS | |
11756 | fi | |
11757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 | |
11758 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | |
11759 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : | |
11760 | emacs_cv_xaw3d=yes | |
11761 | else | |
11762 | emacs_cv_xaw3d=no | |
f199cab1 | 11763 | fi |
f527bd02 | 11764 | |
5476a9a4 GM |
11765 | else |
11766 | emacs_cv_xaw3d=no | |
11767 | fi | |
11768 | rm -f core conftest.err conftest.$ac_objext \ | |
11769 | conftest$ac_exeext conftest.$ac_ext | |
11770 | fi | |
f527bd02 | 11771 | |
5476a9a4 GM |
11772 | else |
11773 | emacs_cv_xaw3d=no | |
11774 | fi | |
11775 | if test $emacs_cv_xaw3d = yes; then | |
4fa92495 GM |
11776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 |
11777 | $as_echo_n "checking for xaw3d... " >&6; } | |
5476a9a4 GM |
11778 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 |
11779 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11780 | USE_X_TOOLKIT=LUCID | |
11781 | HAVE_XAW3D=yes | |
11782 | LUCID_LIBW=-lXaw3d | |
f527bd02 | 11783 | |
5476a9a4 | 11784 | $as_echo "#define HAVE_XAW3D 1" >>confdefs.h |
f527bd02 | 11785 | |
5476a9a4 | 11786 | else |
4fa92495 GM |
11787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 |
11788 | $as_echo_n "checking for xaw3d... " >&6; } | |
5476a9a4 GM |
11789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11790 | $as_echo "no" >&6; } | |
11791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 | |
11792 | $as_echo_n "checking for libXaw... " >&6; } | |
11793 | if test "${emacs_cv_xaw+set}" = set; then : | |
f199cab1 GM |
11794 | $as_echo_n "(cached) " >&6 |
11795 | else | |
11796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11797 | /* end confdefs.h. */ | |
067d23c9 | 11798 | |
5476a9a4 GM |
11799 | #include <X11/Intrinsic.h> |
11800 | #include <X11/Xaw/Simple.h> | |
f199cab1 GM |
11801 | int |
11802 | main () | |
11803 | { | |
067d23c9 | 11804 | |
f199cab1 GM |
11805 | ; |
11806 | return 0; | |
11807 | } | |
11808 | _ACEOF | |
5476a9a4 GM |
11809 | if ac_fn_c_try_link "$LINENO"; then : |
11810 | emacs_cv_xaw=yes | |
f199cab1 | 11811 | else |
5476a9a4 | 11812 | emacs_cv_xaw=no |
f199cab1 | 11813 | fi |
5476a9a4 GM |
11814 | rm -f core conftest.err conftest.$ac_objext \ |
11815 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 11816 | fi |
067d23c9 | 11817 | |
5476a9a4 GM |
11818 | if test $emacs_cv_xaw = yes; then |
11819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 | |
11820 | $as_echo "yes; using Lucid toolkit" >&6; } | |
11821 | USE_X_TOOLKIT=LUCID | |
11822 | LUCID_LIBW=-lXaw | |
11823 | elif test x"${USE_X_TOOLKIT}" = xLUCID; then | |
11824 | as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 | |
f199cab1 | 11825 | else |
5476a9a4 GM |
11826 | as_fn_error "No X toolkit could be found. |
11827 | If you are sure you want Emacs compiled without an X toolkit, pass | |
11828 | --with-x-toolkit=no | |
11829 | to configure. Otherwise, install the development libraries for the toolkit | |
11830 | that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 | |
f199cab1 | 11831 | fi |
5476a9a4 GM |
11832 | fi |
11833 | fi | |
067d23c9 | 11834 | |
5476a9a4 | 11835 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
067d23c9 | 11836 | |
5476a9a4 GM |
11837 | LIBXTR6= |
11838 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 | |
11840 | $as_echo_n "checking X11 toolkit version... " >&6; } | |
11841 | if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : | |
f199cab1 GM |
11842 | $as_echo_n "(cached) " >&6 |
11843 | else | |
5476a9a4 | 11844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 11845 | /* end confdefs.h. */ |
5476a9a4 | 11846 | #include <X11/Intrinsic.h> |
f199cab1 GM |
11847 | int |
11848 | main () | |
11849 | { | |
5476a9a4 GM |
11850 | #if XtSpecificationRelease < 6 |
11851 | fail; | |
11852 | #endif | |
f527bd02 | 11853 | |
f199cab1 GM |
11854 | ; |
11855 | return 0; | |
11856 | } | |
067d23c9 | 11857 | _ACEOF |
5476a9a4 GM |
11858 | if ac_fn_c_try_link "$LINENO"; then : |
11859 | emacs_cv_x11_toolkit_version_6=yes | |
11860 | else | |
11861 | emacs_cv_x11_toolkit_version_6=no | |
067d23c9 | 11862 | fi |
5476a9a4 GM |
11863 | rm -f core conftest.err conftest.$ac_objext \ |
11864 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 KY |
11865 | fi |
11866 | ||
5476a9a4 GM |
11867 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
11868 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
11869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | |
11870 | $as_echo "6 or newer" >&6; } | |
f527bd02 | 11871 | |
5476a9a4 | 11872 | $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h |
f527bd02 | 11873 | |
5476a9a4 GM |
11874 | LIBXTR6="-lSM -lICE" |
11875 | case "$opsys" in | |
11876 | ## Use libw.a along with X11R6 Xt. | |
11877 | unixware) LIBXTR6="$LIBXTR6 -lw" ;; | |
11878 | esac | |
11879 | else | |
11880 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | |
11881 | $as_echo "before 6" >&6; } | |
f199cab1 | 11882 | fi |
f527bd02 | 11883 | |
5476a9a4 GM |
11884 | OLDLIBS="$LIBS" |
11885 | if test x$HAVE_X11XTR6 = xyes; then | |
11886 | LIBS="-lXt -lSM -lICE $LIBS" | |
11887 | else | |
11888 | LIBS="-lXt $LIBS" | |
11889 | fi | |
11890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 | |
11891 | $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } | |
11892 | if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : | |
11893 | $as_echo_n "(cached) " >&6 | |
11894 | else | |
11895 | ac_check_lib_save_LIBS=$LIBS | |
11896 | LIBS="-lXmu $LIBS" | |
11897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11898 | /* end confdefs.h. */ | |
f199cab1 | 11899 | |
5476a9a4 GM |
11900 | /* Override any GCC internal prototype to avoid an error. |
11901 | Use char because int might match the return type of a GCC | |
11902 | builtin and then its argument prototype would still apply. */ | |
11903 | #ifdef __cplusplus | |
11904 | extern "C" | |
11905 | #endif | |
11906 | char XmuConvertStandardSelection (); | |
067d23c9 KY |
11907 | int |
11908 | main () | |
11909 | { | |
5476a9a4 | 11910 | return XmuConvertStandardSelection (); |
067d23c9 KY |
11911 | ; |
11912 | return 0; | |
11913 | } | |
11914 | _ACEOF | |
5476a9a4 GM |
11915 | if ac_fn_c_try_link "$LINENO"; then : |
11916 | ac_cv_lib_Xmu_XmuConvertStandardSelection=yes | |
11917 | else | |
11918 | ac_cv_lib_Xmu_XmuConvertStandardSelection=no | |
067d23c9 | 11919 | fi |
5476a9a4 GM |
11920 | rm -f core conftest.err conftest.$ac_objext \ |
11921 | conftest$ac_exeext conftest.$ac_ext | |
11922 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 11923 | fi |
5476a9a4 GM |
11924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 |
11925 | $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } | |
11926 | if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : | |
11927 | cat >>confdefs.h <<_ACEOF | |
11928 | #define HAVE_LIBXMU 1 | |
f199cab1 GM |
11929 | _ACEOF |
11930 | ||
5476a9a4 | 11931 | LIBS="-lXmu $LIBS" |
f199cab1 | 11932 | |
067d23c9 KY |
11933 | fi |
11934 | ||
5476a9a4 GM |
11935 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
11936 | fi | |
067d23c9 | 11937 | |
067d23c9 | 11938 | |
5476a9a4 GM |
11939 | LIBXMU=-lXmu |
11940 | case $opsys in | |
11941 | ## These systems don't supply Xmu. | |
11942 | hpux* | aix4-2 ) | |
11943 | test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= | |
11944 | ;; | |
11945 | esac | |
067d23c9 KY |
11946 | |
11947 | ||
5476a9a4 GM |
11948 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. |
11949 | if test "${HAVE_X11}" = "yes"; then | |
11950 | if test "${USE_X_TOOLKIT}" != "none"; then | |
11951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 | |
11952 | $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } | |
11953 | if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : | |
f199cab1 GM |
11954 | $as_echo_n "(cached) " >&6 |
11955 | else | |
5476a9a4 GM |
11956 | ac_check_lib_save_LIBS=$LIBS |
11957 | LIBS="-lXext $LIBS" | |
11958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 11959 | /* end confdefs.h. */ |
f199cab1 | 11960 | |
5476a9a4 GM |
11961 | /* Override any GCC internal prototype to avoid an error. |
11962 | Use char because int might match the return type of a GCC | |
11963 | builtin and then its argument prototype would still apply. */ | |
11964 | #ifdef __cplusplus | |
11965 | extern "C" | |
11966 | #endif | |
11967 | char XShapeQueryExtension (); | |
11968 | int | |
11969 | main () | |
11970 | { | |
11971 | return XShapeQueryExtension (); | |
11972 | ; | |
11973 | return 0; | |
11974 | } | |
e7d4e61f | 11975 | _ACEOF |
5476a9a4 GM |
11976 | if ac_fn_c_try_link "$LINENO"; then : |
11977 | ac_cv_lib_Xext_XShapeQueryExtension=yes | |
11978 | else | |
11979 | ac_cv_lib_Xext_XShapeQueryExtension=no | |
067d23c9 | 11980 | fi |
5476a9a4 GM |
11981 | rm -f core conftest.err conftest.$ac_objext \ |
11982 | conftest$ac_exeext conftest.$ac_ext | |
11983 | LIBS=$ac_check_lib_save_LIBS | |
11984 | fi | |
11985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 | |
11986 | $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } | |
11987 | if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : | |
11988 | cat >>confdefs.h <<_ACEOF | |
11989 | #define HAVE_LIBXEXT 1 | |
11990 | _ACEOF | |
f199cab1 | 11991 | |
5476a9a4 | 11992 | LIBS="-lXext $LIBS" |
f199cab1 | 11993 | |
5476a9a4 | 11994 | fi |
f199cab1 | 11995 | |
5476a9a4 GM |
11996 | fi |
11997 | fi | |
f199cab1 | 11998 | |
5476a9a4 GM |
11999 | LIBXP= |
12000 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
8ad96b1d GM |
12001 | # OpenMotif may be installed in such a way on some GNU/Linux systems. |
12002 | if test -d /usr/include/openmotif; then | |
12003 | CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS" | |
12004 | emacs_cv_openmotif=yes | |
12005 | case "$canonical" in | |
12006 | x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) | |
12007 | test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS" | |
12008 | ;; | |
12009 | *) | |
12010 | test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS" | |
12011 | esac | |
12012 | else | |
12013 | emacs_cv_openmotif=no | |
12014 | fi | |
12015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5 | |
12016 | $as_echo_n "checking for (Open)Motif version 2.1... " >&6; } | |
5476a9a4 | 12017 | if test "${emacs_cv_motif_version_2_1+set}" = set; then : |
ae1362a3 AS |
12018 | $as_echo_n "(cached) " >&6 |
12019 | else | |
f199cab1 GM |
12020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12021 | /* end confdefs.h. */ | |
5476a9a4 GM |
12022 | #include <Xm/Xm.h> |
12023 | int | |
12024 | main () | |
12025 | { | |
12026 | #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | |
12027 | int x = 5; | |
12028 | #else | |
12029 | Motif version prior to 2.1. | |
12030 | #endif | |
12031 | ; | |
12032 | return 0; | |
12033 | } | |
12034 | _ACEOF | |
12035 | if ac_fn_c_try_compile "$LINENO"; then : | |
12036 | emacs_cv_motif_version_2_1=yes | |
12037 | else | |
12038 | emacs_cv_motif_version_2_1=no | |
12039 | fi | |
12040 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12041 | fi | |
12042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 | |
12043 | $as_echo "$emacs_cv_motif_version_2_1" >&6; } | |
12044 | if test $emacs_cv_motif_version_2_1 = yes; then | |
12045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 | |
12046 | $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } | |
12047 | if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : | |
12048 | $as_echo_n "(cached) " >&6 | |
12049 | else | |
12050 | ac_check_lib_save_LIBS=$LIBS | |
12051 | LIBS="-lXp $LIBS" | |
12052 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12053 | /* end confdefs.h. */ | |
f199cab1 | 12054 | |
5476a9a4 GM |
12055 | /* Override any GCC internal prototype to avoid an error. |
12056 | Use char because int might match the return type of a GCC | |
12057 | builtin and then its argument prototype would still apply. */ | |
12058 | #ifdef __cplusplus | |
12059 | extern "C" | |
12060 | #endif | |
12061 | char XpCreateContext (); | |
ae1362a3 AS |
12062 | int |
12063 | main () | |
12064 | { | |
5476a9a4 | 12065 | return XpCreateContext (); |
ae1362a3 AS |
12066 | ; |
12067 | return 0; | |
12068 | } | |
12069 | _ACEOF | |
5476a9a4 GM |
12070 | if ac_fn_c_try_link "$LINENO"; then : |
12071 | ac_cv_lib_Xp_XpCreateContext=yes | |
067d23c9 | 12072 | else |
5476a9a4 | 12073 | ac_cv_lib_Xp_XpCreateContext=no |
067d23c9 | 12074 | fi |
5476a9a4 GM |
12075 | rm -f core conftest.err conftest.$ac_objext \ |
12076 | conftest$ac_exeext conftest.$ac_ext | |
12077 | LIBS=$ac_check_lib_save_LIBS | |
12078 | fi | |
12079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 | |
12080 | $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } | |
12081 | if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : | |
12082 | LIBXP=-lXp | |
067d23c9 | 12083 | fi |
f199cab1 | 12084 | |
8ad96b1d GM |
12085 | if test x$emacs_cv_openmotif = xyes; then |
12086 | REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS" | |
12087 | fi | |
5476a9a4 GM |
12088 | else |
12089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 | |
12090 | $as_echo_n "checking for LessTif where some systems put it... " >&6; } | |
12091 | if test "${emacs_cv_lesstif+set}" = set; then : | |
067d23c9 | 12092 | $as_echo_n "(cached) " >&6 |
f199cab1 | 12093 | else |
5476a9a4 GM |
12094 | # We put this in CFLAGS temporarily to precede other -I options |
12095 | # that might be in CFLAGS temporarily. | |
12096 | # We put this in CPPFLAGS where it precedes the other -I options. | |
12097 | OLD_CPPFLAGS=$CPPFLAGS | |
12098 | OLD_CFLAGS=$CFLAGS | |
12099 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
12100 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
12101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12102 | /* end confdefs.h. */ |
5476a9a4 | 12103 | #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h> |
067d23c9 KY |
12104 | int |
12105 | main () | |
12106 | { | |
5476a9a4 | 12107 | int x = 5; |
067d23c9 KY |
12108 | ; |
12109 | return 0; | |
12110 | } | |
12111 | _ACEOF | |
5476a9a4 GM |
12112 | if ac_fn_c_try_compile "$LINENO"; then : |
12113 | emacs_cv_lesstif=yes | |
067d23c9 | 12114 | else |
5476a9a4 | 12115 | emacs_cv_lesstif=no |
067d23c9 | 12116 | fi |
5476a9a4 | 12117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 12118 | fi |
5476a9a4 GM |
12119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 |
12120 | $as_echo "$emacs_cv_lesstif" >&6; } | |
12121 | if test $emacs_cv_lesstif = yes; then | |
12122 | # Make sure this -I option remains in CPPFLAGS after it is set | |
12123 | # back to REAL_CPPFLAGS. | |
12124 | # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
12125 | # have those other -I options anyway. Ultimately, having this | |
12126 | # directory ultimately in CPPFLAGS will be enough. | |
12127 | REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
12128 | LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
12129 | else | |
12130 | CFLAGS=$OLD_CFLAGS | |
12131 | CPPFLAGS=$OLD_CPPFLAGS | |
12132 | fi | |
12133 | fi | |
12134 | ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default" | |
12135 | if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then : | |
067d23c9 | 12136 | |
5476a9a4 GM |
12137 | else |
12138 | as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5 | |
067d23c9 | 12139 | fi |
f199cab1 GM |
12140 | |
12141 | ||
5476a9a4 | 12142 | fi |
f199cab1 GM |
12143 | |
12144 | ||
5476a9a4 GM |
12145 | USE_TOOLKIT_SCROLL_BARS=no |
12146 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
12147 | if test "${USE_X_TOOLKIT}" != "none"; then | |
12148 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
12149 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12150 | |
5476a9a4 GM |
12151 | HAVE_XAW3D=no |
12152 | USE_TOOLKIT_SCROLL_BARS=yes | |
12153 | elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then | |
12154 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12155 | |
5476a9a4 GM |
12156 | USE_TOOLKIT_SCROLL_BARS=yes |
12157 | fi | |
12158 | elif test "${HAVE_GTK}" = "yes"; then | |
12159 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12160 | |
5476a9a4 GM |
12161 | USE_TOOLKIT_SCROLL_BARS=yes |
12162 | elif test "${HAVE_NS}" = "yes"; then | |
12163 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
f199cab1 | 12164 | |
5c0255d9 GM |
12165 | USE_TOOLKIT_SCROLL_BARS=yes |
12166 | elif test "${HAVE_W32}" = "yes"; then | |
12167 | $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h | |
12168 | ||
5476a9a4 GM |
12169 | USE_TOOLKIT_SCROLL_BARS=yes |
12170 | fi | |
12171 | fi | |
f199cab1 | 12172 | |
5476a9a4 | 12173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 12174 | /* end confdefs.h. */ |
5476a9a4 GM |
12175 | |
12176 | #include <X11/Xlib.h> | |
12177 | #include <X11/Xresource.h> | |
067d23c9 KY |
12178 | int |
12179 | main () | |
12180 | { | |
5476a9a4 | 12181 | XIMProc callback; |
067d23c9 KY |
12182 | ; |
12183 | return 0; | |
12184 | } | |
12185 | _ACEOF | |
f199cab1 | 12186 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 GM |
12187 | HAVE_XIM=yes |
12188 | ||
12189 | $as_echo "#define HAVE_XIM 1" >>confdefs.h | |
12190 | ||
067d23c9 | 12191 | else |
5476a9a4 | 12192 | HAVE_XIM=no |
067d23c9 | 12193 | fi |
f199cab1 | 12194 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 12195 | |
f199cab1 | 12196 | |
5476a9a4 GM |
12197 | if test "${with_xim}" != "no"; then |
12198 | ||
12199 | $as_echo "#define USE_XIM 1" >>confdefs.h | |
12200 | ||
12201 | fi | |
12202 | ||
12203 | ||
12204 | if test "${HAVE_XIM}" != "no"; then | |
12205 | late_CFLAGS=$CFLAGS | |
12206 | if test "$GCC" = yes; then | |
12207 | CFLAGS="$CFLAGS --pedantic-errors" | |
12208 | fi | |
12209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12210 | /* end confdefs.h. */ | |
f199cab1 | 12211 | |
5476a9a4 GM |
12212 | #include <X11/Xlib.h> |
12213 | #include <X11/Xresource.h> | |
12214 | int | |
12215 | main () | |
12216 | { | |
12217 | Display *display; | |
12218 | XrmDatabase db; | |
12219 | char *res_name; | |
12220 | char *res_class; | |
12221 | XIMProc callback; | |
12222 | XPointer *client_data; | |
12223 | #ifndef __GNUC__ | |
12224 | /* If we're not using GCC, it's probably not XFree86, and this is | |
12225 | probably right, but we can't use something like --pedantic-errors. */ | |
12226 | extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
12227 | char*, XIMProc, XPointer*); | |
12228 | #endif | |
12229 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
12230 | client_data); | |
067d23c9 KY |
12231 | ; |
12232 | return 0; | |
12233 | } | |
12234 | _ACEOF | |
5476a9a4 GM |
12235 | if ac_fn_c_try_compile "$LINENO"; then : |
12236 | emacs_cv_arg6_star=yes | |
067d23c9 | 12237 | fi |
f199cab1 | 12238 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
12239 | if test "$emacs_cv_arg6_star" = yes; then |
12240 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h | |
12241 | ||
12242 | else | |
12243 | $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h | |
067d23c9 | 12244 | |
5476a9a4 GM |
12245 | fi |
12246 | CFLAGS=$late_CFLAGS | |
067d23c9 KY |
12247 | fi |
12248 | ||
5476a9a4 GM |
12249 | ### Start of font-backend (under any platform) section. |
12250 | # (nothing here yet -- this is a placeholder) | |
12251 | ### End of font-backend (under any platform) section. | |
067d23c9 | 12252 | |
5476a9a4 GM |
12253 | ### Start of font-backend (under X11) section. |
12254 | if test "${HAVE_X11}" = "yes"; then | |
067d23c9 | 12255 | |
5476a9a4 | 12256 | succeeded=no |
067d23c9 | 12257 | |
5476a9a4 GM |
12258 | if test "$PKG_CONFIG" = "no" ; then |
12259 | HAVE_FC=no | |
12260 | else | |
12261 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12262 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 |
12264 | $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } | |
f199cab1 | 12265 | |
b5591ebb GM |
12266 | if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 && |
12267 | FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` && | |
12268 | FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then | |
5476a9a4 GM |
12269 | edit_cflags=" |
12270 | s,///*,/,g | |
12271 | s/^/ / | |
12272 | s/ -I/ $isystem/g | |
12273 | s/^ // | |
12274 | " | |
12275 | FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` | |
12276 | FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` | |
12277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 | |
12278 | $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } | |
12279 | succeeded=yes | |
12280 | else | |
12281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12282 | $as_echo "no" >&6; } | |
12283 | FONTCONFIG_CFLAGS="" | |
12284 | FONTCONFIG_LIBS="" | |
12285 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12286 | ## do set a variable so people can do so. Do it in a subshell |
12287 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12288 | FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1` |
f199cab1 | 12289 | |
5476a9a4 | 12290 | fi |
f199cab1 GM |
12291 | |
12292 | ||
12293 | ||
f199cab1 | 12294 | else |
5476a9a4 GM |
12295 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
12296 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12297 | fi | |
12298 | fi | |
f199cab1 | 12299 | |
5476a9a4 GM |
12300 | if test $succeeded = yes; then |
12301 | HAVE_FC=yes | |
12302 | else | |
12303 | HAVE_FC=no | |
12304 | fi | |
f199cab1 | 12305 | |
067d23c9 | 12306 | |
5476a9a4 GM |
12307 | ## Use -lXft if available, unless `--with-xft=no'. |
12308 | HAVE_XFT=maybe | |
12309 | if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then | |
12310 | with_xft="no"; | |
12311 | fi | |
12312 | if test "x${with_xft}" != "xno"; then | |
f199cab1 | 12313 | |
f199cab1 | 12314 | |
5476a9a4 | 12315 | succeeded=no |
f199cab1 | 12316 | |
5476a9a4 GM |
12317 | if test "$PKG_CONFIG" = "no" ; then |
12318 | HAVE_XFT=no | |
12319 | else | |
12320 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12321 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 |
12323 | $as_echo_n "checking for xft >= 0.13.0... " >&6; } | |
f199cab1 | 12324 | |
b5591ebb GM |
12325 | if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 && |
12326 | XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` && | |
12327 | XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then | |
5476a9a4 GM |
12328 | edit_cflags=" |
12329 | s,///*,/,g | |
12330 | s/^/ / | |
12331 | s/ -I/ $isystem/g | |
12332 | s/^ // | |
12333 | " | |
12334 | XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` | |
12335 | XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` | |
12336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 | |
12337 | $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } | |
12338 | succeeded=yes | |
12339 | else | |
12340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12341 | $as_echo "no" >&6; } | |
12342 | XFT_CFLAGS="" | |
12343 | XFT_LIBS="" | |
12344 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12345 | ## do set a variable so people can do so. Do it in a subshell |
12346 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12347 | XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1` |
f199cab1 | 12348 | |
5476a9a4 | 12349 | fi |
f199cab1 GM |
12350 | |
12351 | ||
12352 | ||
5476a9a4 GM |
12353 | else |
12354 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12355 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12356 | fi | |
12357 | fi | |
f199cab1 | 12358 | |
5476a9a4 GM |
12359 | if test $succeeded = yes; then |
12360 | : | |
f199cab1 | 12361 | else |
5476a9a4 | 12362 | HAVE_XFT=no |
f199cab1 GM |
12363 | fi |
12364 | ||
5476a9a4 GM |
12365 | ## Because xftfont.c uses XRenderQueryExtension, we also |
12366 | ## need to link to -lXrender. | |
12367 | HAVE_XRENDER=no | |
12368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 | |
12369 | $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } | |
12370 | if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : | |
12371 | $as_echo_n "(cached) " >&6 | |
12372 | else | |
12373 | ac_check_lib_save_LIBS=$LIBS | |
12374 | LIBS="-lXrender $LIBS" | |
12375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12376 | /* end confdefs.h. */ | |
f199cab1 | 12377 | |
5476a9a4 GM |
12378 | /* Override any GCC internal prototype to avoid an error. |
12379 | Use char because int might match the return type of a GCC | |
12380 | builtin and then its argument prototype would still apply. */ | |
12381 | #ifdef __cplusplus | |
12382 | extern "C" | |
12383 | #endif | |
12384 | char XRenderQueryExtension (); | |
12385 | int | |
12386 | main () | |
12387 | { | |
12388 | return XRenderQueryExtension (); | |
12389 | ; | |
12390 | return 0; | |
12391 | } | |
12392 | _ACEOF | |
12393 | if ac_fn_c_try_link "$LINENO"; then : | |
12394 | ac_cv_lib_Xrender_XRenderQueryExtension=yes | |
12395 | else | |
12396 | ac_cv_lib_Xrender_XRenderQueryExtension=no | |
12397 | fi | |
12398 | rm -f core conftest.err conftest.$ac_objext \ | |
12399 | conftest$ac_exeext conftest.$ac_ext | |
12400 | LIBS=$ac_check_lib_save_LIBS | |
12401 | fi | |
12402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 | |
12403 | $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } | |
12404 | if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : | |
12405 | HAVE_XRENDER=yes | |
12406 | fi | |
f199cab1 | 12407 | |
5476a9a4 GM |
12408 | if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then |
12409 | OLD_CPPFLAGS="$CPPFLAGS" | |
12410 | OLD_CFLAGS="$CFLAGS" | |
12411 | OLD_LIBS="$LIBS" | |
12412 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | |
12413 | CFLAGS="$CFLAGS $XFT_CFLAGS" | |
12414 | XFT_LIBS="-lXrender $XFT_LIBS" | |
12415 | LIBS="$XFT_LIBS $LIBS" | |
12416 | ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" | |
12417 | if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : | |
12418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 | |
12419 | $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } | |
12420 | if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : | |
12421 | $as_echo_n "(cached) " >&6 | |
12422 | else | |
12423 | ac_check_lib_save_LIBS=$LIBS | |
12424 | LIBS="-lXft $XFT_LIBS $LIBS" | |
12425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12426 | /* end confdefs.h. */ | |
f199cab1 | 12427 | |
5476a9a4 GM |
12428 | /* Override any GCC internal prototype to avoid an error. |
12429 | Use char because int might match the return type of a GCC | |
12430 | builtin and then its argument prototype would still apply. */ | |
12431 | #ifdef __cplusplus | |
12432 | extern "C" | |
12433 | #endif | |
12434 | char XftFontOpen (); | |
12435 | int | |
12436 | main () | |
12437 | { | |
12438 | return XftFontOpen (); | |
12439 | ; | |
12440 | return 0; | |
12441 | } | |
067d23c9 | 12442 | _ACEOF |
5476a9a4 GM |
12443 | if ac_fn_c_try_link "$LINENO"; then : |
12444 | ac_cv_lib_Xft_XftFontOpen=yes | |
12445 | else | |
12446 | ac_cv_lib_Xft_XftFontOpen=no | |
12447 | fi | |
12448 | rm -f core conftest.err conftest.$ac_objext \ | |
12449 | conftest$ac_exeext conftest.$ac_ext | |
12450 | LIBS=$ac_check_lib_save_LIBS | |
12451 | fi | |
12452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 | |
12453 | $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } | |
12454 | if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : | |
12455 | HAVE_XFT=yes | |
f199cab1 GM |
12456 | fi |
12457 | ||
5476a9a4 | 12458 | fi |
f199cab1 GM |
12459 | |
12460 | ||
f199cab1 | 12461 | |
5476a9a4 | 12462 | if test "${HAVE_XFT}" = "yes"; then |
f199cab1 | 12463 | |
5476a9a4 | 12464 | $as_echo "#define HAVE_XFT 1" >>confdefs.h |
f199cab1 | 12465 | |
067d23c9 | 12466 | |
5476a9a4 GM |
12467 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" |
12468 | else | |
12469 | CPPFLAGS="$OLD_CPPFLAGS" | |
12470 | CFLAGS="$OLD_CFLAGS" | |
12471 | LIBS="$OLD_LIBS" | |
12472 | fi # "${HAVE_XFT}" = "yes" | |
12473 | fi # "$HAVE_XFT" != no | |
12474 | fi # "x${with_xft}" != "xno" | |
f199cab1 | 12475 | |
5476a9a4 GM |
12476 | ## We used to allow building with FreeType and without Xft. |
12477 | ## However, the ftx font backend driver is not in good shape. | |
12478 | if test "$HAVE_XFT" != "yes"; then | |
12479 | HAVE_XFT=no | |
12480 | HAVE_FREETYPE=no | |
12481 | else | |
f199cab1 | 12482 | |
5476a9a4 | 12483 | succeeded=no |
f199cab1 | 12484 | |
5476a9a4 GM |
12485 | if test "$PKG_CONFIG" = "no" ; then |
12486 | HAVE_FREETYPE=no | |
12487 | else | |
12488 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12489 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12490 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 |
12491 | $as_echo_n "checking for freetype2... " >&6; } | |
f199cab1 | 12492 | |
b5591ebb GM |
12493 | if "$PKG_CONFIG" --exists "freetype2" 2>&5 && |
12494 | FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` && | |
12495 | FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then | |
5476a9a4 GM |
12496 | edit_cflags=" |
12497 | s,///*,/,g | |
12498 | s/^/ / | |
12499 | s/ -I/ $isystem/g | |
12500 | s/^ // | |
12501 | " | |
12502 | FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` | |
12503 | FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` | |
12504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 | |
12505 | $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } | |
12506 | succeeded=yes | |
12507 | else | |
12508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12509 | $as_echo "no" >&6; } | |
12510 | FREETYPE_CFLAGS="" | |
12511 | FREETYPE_LIBS="" | |
12512 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12513 | ## do set a variable so people can do so. Do it in a subshell |
12514 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12515 | FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1` |
f199cab1 | 12516 | |
5476a9a4 | 12517 | fi |
f199cab1 | 12518 | |
f199cab1 | 12519 | |
067d23c9 | 12520 | |
5476a9a4 GM |
12521 | else |
12522 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12523 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12524 | fi | |
067d23c9 | 12525 | fi |
f199cab1 | 12526 | |
5476a9a4 GM |
12527 | if test $succeeded = yes; then |
12528 | HAVE_FREETYPE=yes | |
12529 | else | |
12530 | HAVE_FREETYPE=no | |
12531 | fi | |
f199cab1 | 12532 | |
f199cab1 | 12533 | |
5476a9a4 GM |
12534 | test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 |
12535 | fi | |
f199cab1 | 12536 | |
5476a9a4 GM |
12537 | HAVE_LIBOTF=no |
12538 | if test "${HAVE_FREETYPE}" = "yes"; then | |
f199cab1 | 12539 | |
5476a9a4 | 12540 | $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h |
f199cab1 | 12541 | |
5476a9a4 | 12542 | if test "${with_libotf}" != "no"; then |
f199cab1 | 12543 | |
5476a9a4 | 12544 | succeeded=no |
f199cab1 | 12545 | |
5476a9a4 GM |
12546 | if test "$PKG_CONFIG" = "no" ; then |
12547 | HAVE_LIBOTF=no | |
12548 | else | |
12549 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12550 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 |
12552 | $as_echo_n "checking for libotf... " >&6; } | |
f199cab1 | 12553 | |
b5591ebb GM |
12554 | if "$PKG_CONFIG" --exists "libotf" 2>&5 && |
12555 | LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` && | |
12556 | LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then | |
5476a9a4 GM |
12557 | edit_cflags=" |
12558 | s,///*,/,g | |
12559 | s/^/ / | |
12560 | s/ -I/ $isystem/g | |
12561 | s/^ // | |
12562 | " | |
12563 | LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` | |
12564 | LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` | |
12565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 | |
12566 | $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } | |
12567 | succeeded=yes | |
12568 | else | |
12569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12570 | $as_echo "no" >&6; } | |
12571 | LIBOTF_CFLAGS="" | |
12572 | LIBOTF_LIBS="" | |
12573 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12574 | ## do set a variable so people can do so. Do it in a subshell |
12575 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12576 | LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1` |
067d23c9 | 12577 | |
5476a9a4 | 12578 | fi |
f199cab1 GM |
12579 | |
12580 | ||
067d23c9 | 12581 | |
5476a9a4 GM |
12582 | else |
12583 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12584 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12585 | fi | |
12586 | fi | |
f199cab1 | 12587 | |
5476a9a4 GM |
12588 | if test $succeeded = yes; then |
12589 | HAVE_LIBOTF=yes | |
12590 | else | |
12591 | HAVE_LIBOTF=no | |
12592 | fi | |
f199cab1 | 12593 | |
5476a9a4 | 12594 | if test "$HAVE_LIBOTF" = "yes"; then |
f199cab1 | 12595 | |
5476a9a4 | 12596 | $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h |
f199cab1 | 12597 | |
5476a9a4 GM |
12598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 |
12599 | $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } | |
12600 | if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : | |
067d23c9 KY |
12601 | $as_echo_n "(cached) " >&6 |
12602 | else | |
5476a9a4 GM |
12603 | ac_check_lib_save_LIBS=$LIBS |
12604 | LIBS="-lotf $LIBS" | |
12605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12606 | /* end confdefs.h. */ |
5476a9a4 GM |
12607 | |
12608 | /* Override any GCC internal prototype to avoid an error. | |
12609 | Use char because int might match the return type of a GCC | |
12610 | builtin and then its argument prototype would still apply. */ | |
12611 | #ifdef __cplusplus | |
12612 | extern "C" | |
12613 | #endif | |
12614 | char OTF_get_variation_glyphs (); | |
067d23c9 KY |
12615 | int |
12616 | main () | |
12617 | { | |
5476a9a4 | 12618 | return OTF_get_variation_glyphs (); |
067d23c9 KY |
12619 | ; |
12620 | return 0; | |
12621 | } | |
12622 | _ACEOF | |
5476a9a4 GM |
12623 | if ac_fn_c_try_link "$LINENO"; then : |
12624 | ac_cv_lib_otf_OTF_get_variation_glyphs=yes | |
067d23c9 | 12625 | else |
5476a9a4 | 12626 | ac_cv_lib_otf_OTF_get_variation_glyphs=no |
067d23c9 | 12627 | fi |
5476a9a4 GM |
12628 | rm -f core conftest.err conftest.$ac_objext \ |
12629 | conftest$ac_exeext conftest.$ac_ext | |
12630 | LIBS=$ac_check_lib_save_LIBS | |
12631 | fi | |
12632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 | |
12633 | $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } | |
12634 | if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : | |
12635 | HAVE_OTF_GET_VARIATION_GLYPHS=yes | |
12636 | else | |
12637 | HAVE_OTF_GET_VARIATION_GLYPHS=no | |
067d23c9 | 12638 | fi |
067d23c9 | 12639 | |
5476a9a4 GM |
12640 | if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then |
12641 | ||
12642 | $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h | |
12643 | ||
12644 | fi | |
12645 | fi | |
12646 | fi | |
12647 | fi | |
12648 | ||
12649 | HAVE_M17N_FLT=no | |
12650 | if test "${HAVE_LIBOTF}" = yes; then | |
12651 | if test "${with_m17n_flt}" != "no"; then | |
12652 | ||
12653 | succeeded=no | |
12654 | ||
12655 | if test "$PKG_CONFIG" = "no" ; then | |
12656 | HAVE_M17N_FLT=no | |
12657 | else | |
12658 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 12659 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
12660 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 |
12661 | $as_echo_n "checking for m17n-flt... " >&6; } | |
12662 | ||
b5591ebb GM |
12663 | if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 && |
12664 | M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` && | |
12665 | M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then | |
5476a9a4 GM |
12666 | edit_cflags=" |
12667 | s,///*,/,g | |
12668 | s/^/ / | |
12669 | s/ -I/ $isystem/g | |
12670 | s/^ // | |
12671 | " | |
12672 | M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` | |
12673 | M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` | |
12674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 | |
12675 | $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } | |
12676 | succeeded=yes | |
12677 | else | |
12678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12679 | $as_echo "no" >&6; } | |
12680 | M17N_FLT_CFLAGS="" | |
12681 | M17N_FLT_LIBS="" | |
12682 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
12683 | ## do set a variable so people can do so. Do it in a subshell |
12684 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 12685 | M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1` |
5476a9a4 GM |
12686 | |
12687 | fi | |
12688 | ||
12689 | ||
067d23c9 | 12690 | |
5476a9a4 GM |
12691 | else |
12692 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
12693 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
12694 | fi | |
f199cab1 | 12695 | fi |
067d23c9 | 12696 | |
5476a9a4 GM |
12697 | if test $succeeded = yes; then |
12698 | HAVE_M17N_FLT=yes | |
12699 | else | |
12700 | HAVE_M17N_FLT=no | |
12701 | fi | |
12702 | ||
12703 | if test "$HAVE_M17N_FLT" = "yes"; then | |
12704 | ||
12705 | $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h | |
12706 | ||
12707 | fi | |
12708 | fi | |
12709 | fi | |
12710 | else | |
12711 | HAVE_XFT=no | |
12712 | HAVE_FREETYPE=no | |
12713 | HAVE_LIBOTF=no | |
12714 | HAVE_M17N_FLT=no | |
12715 | fi | |
12716 | ||
12717 | ### End of font-backend (under X11) section. | |
12718 | ||
12719 | ||
067d23c9 | 12720 | |
067d23c9 | 12721 | |
5476a9a4 GM |
12722 | |
12723 | ||
12724 | ||
12725 | ||
12726 | ||
12727 | ||
12728 | ### Use -lXpm if available, unless `--with-xpm=no'. | |
12729 | HAVE_XPM=no | |
12730 | LIBXPM= | |
5c0255d9 GM |
12731 | |
12732 | if test "${HAVE_W32}" = "yes"; then | |
12733 | if test "${with_xpm}" != "no"; then | |
12734 | SAVE_CPPFLAGS="$CPPFLAGS" | |
12735 | SAVE_LDFLAGS="$LDFLAGS" | |
12736 | CPPFLAGS="$CPPFLAGS -I/usr/include/noX" | |
12737 | LDFLAGS="$LDFLAGS -L/usr/lib/noX" | |
12738 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
12739 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
12740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5 | |
12741 | $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; } | |
12742 | if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then : | |
12743 | $as_echo_n "(cached) " >&6 | |
12744 | else | |
12745 | ac_check_lib_save_LIBS=$LIBS | |
12746 | LIBS="-lXpm $LIBS" | |
12747 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12748 | /* end confdefs.h. */ | |
12749 | ||
12750 | /* Override any GCC internal prototype to avoid an error. | |
12751 | Use char because int might match the return type of a GCC | |
12752 | builtin and then its argument prototype would still apply. */ | |
12753 | #ifdef __cplusplus | |
12754 | extern "C" | |
12755 | #endif | |
12756 | char XpmReadFileToImage (); | |
12757 | int | |
12758 | main () | |
12759 | { | |
12760 | return XpmReadFileToImage (); | |
12761 | ; | |
12762 | return 0; | |
12763 | } | |
12764 | _ACEOF | |
12765 | if ac_fn_c_try_link "$LINENO"; then : | |
12766 | ac_cv_lib_Xpm_XpmReadFileToImage=yes | |
12767 | else | |
12768 | ac_cv_lib_Xpm_XpmReadFileToImage=no | |
12769 | fi | |
12770 | rm -f core conftest.err conftest.$ac_objext \ | |
12771 | conftest$ac_exeext conftest.$ac_ext | |
12772 | LIBS=$ac_check_lib_save_LIBS | |
12773 | fi | |
12774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5 | |
12775 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; } | |
12776 | if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then : | |
12777 | HAVE_XPM=yes | |
12778 | fi | |
12779 | ||
12780 | fi | |
12781 | ||
12782 | ||
12783 | if test "${HAVE_XPM}" = "yes"; then | |
12784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
12785 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
12786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12787 | /* end confdefs.h. */ | |
12788 | #include "X11/xpm.h" | |
12789 | #ifndef XpmReturnAllocPixels | |
12790 | no_return_alloc_pixels | |
12791 | #endif | |
12792 | ||
12793 | _ACEOF | |
12794 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12795 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
12796 | HAVE_XPM=no | |
12797 | else | |
12798 | HAVE_XPM=yes | |
12799 | fi | |
12800 | rm -f conftest* | |
12801 | ||
12802 | ||
12803 | if test "${HAVE_XPM}" = "yes"; then | |
12804 | REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX" | |
12805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12806 | $as_echo "yes" >&6; } | |
12807 | else | |
12808 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12809 | $as_echo "no" >&6; } | |
12810 | CPPFLAGS="$SAVE_CPPFLAGS" | |
12811 | LDFLAGS="$SAVE_LDFLAGS" | |
12812 | fi | |
12813 | fi | |
12814 | fi | |
12815 | ||
12816 | if test "${HAVE_XPM}" = "yes"; then | |
12817 | ||
12818 | $as_echo "#define HAVE_XPM 1" >>confdefs.h | |
12819 | ||
12820 | LIBXPM=-lXpm | |
12821 | fi | |
12822 | fi | |
12823 | ||
5476a9a4 GM |
12824 | if test "${HAVE_X11}" = "yes"; then |
12825 | if test "${with_xpm}" != "no"; then | |
12826 | ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" | |
12827 | if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : | |
12828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 | |
12829 | $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } | |
12830 | if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : | |
f199cab1 GM |
12831 | $as_echo_n "(cached) " >&6 |
12832 | else | |
5476a9a4 GM |
12833 | ac_check_lib_save_LIBS=$LIBS |
12834 | LIBS="-lXpm -lX11 $LIBS" | |
12835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
12836 | /* end confdefs.h. */ |
12837 | ||
5476a9a4 GM |
12838 | /* Override any GCC internal prototype to avoid an error. |
12839 | Use char because int might match the return type of a GCC | |
12840 | builtin and then its argument prototype would still apply. */ | |
12841 | #ifdef __cplusplus | |
12842 | extern "C" | |
12843 | #endif | |
12844 | char XpmReadFileToPixmap (); | |
067d23c9 KY |
12845 | int |
12846 | main () | |
12847 | { | |
5476a9a4 | 12848 | return XpmReadFileToPixmap (); |
067d23c9 KY |
12849 | ; |
12850 | return 0; | |
12851 | } | |
12852 | _ACEOF | |
5476a9a4 GM |
12853 | if ac_fn_c_try_link "$LINENO"; then : |
12854 | ac_cv_lib_Xpm_XpmReadFileToPixmap=yes | |
067d23c9 | 12855 | else |
5476a9a4 | 12856 | ac_cv_lib_Xpm_XpmReadFileToPixmap=no |
067d23c9 | 12857 | fi |
5476a9a4 GM |
12858 | rm -f core conftest.err conftest.$ac_objext \ |
12859 | conftest$ac_exeext conftest.$ac_ext | |
12860 | LIBS=$ac_check_lib_save_LIBS | |
12861 | fi | |
12862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 | |
12863 | $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } | |
12864 | if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : | |
12865 | HAVE_XPM=yes | |
f199cab1 | 12866 | fi |
067d23c9 KY |
12867 | |
12868 | fi | |
12869 | ||
12870 | ||
5476a9a4 GM |
12871 | if test "${HAVE_XPM}" = "yes"; then |
12872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 | |
12873 | $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } | |
12874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12875 | /* end confdefs.h. */ | |
12876 | #include "X11/xpm.h" | |
12877 | #ifndef XpmReturnAllocPixels | |
12878 | no_return_alloc_pixels | |
12879 | #endif | |
067d23c9 | 12880 | |
067d23c9 | 12881 | _ACEOF |
5476a9a4 GM |
12882 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12883 | $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : | |
12884 | HAVE_XPM=no | |
12885 | else | |
12886 | HAVE_XPM=yes | |
12887 | fi | |
12888 | rm -f conftest* | |
067d23c9 | 12889 | |
067d23c9 | 12890 | |
5476a9a4 GM |
12891 | if test "${HAVE_XPM}" = "yes"; then |
12892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12893 | $as_echo "yes" >&6; } | |
12894 | else | |
12895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12896 | $as_echo "no" >&6; } | |
12897 | fi | |
12898 | fi | |
12899 | fi | |
067d23c9 | 12900 | |
5476a9a4 | 12901 | if test "${HAVE_XPM}" = "yes"; then |
067d23c9 | 12902 | |
5476a9a4 | 12903 | $as_echo "#define HAVE_XPM 1" >>confdefs.h |
067d23c9 | 12904 | |
5476a9a4 GM |
12905 | LIBXPM=-lXpm |
12906 | fi | |
067d23c9 KY |
12907 | fi |
12908 | ||
f199cab1 | 12909 | |
5c0255d9 | 12910 | |
5476a9a4 GM |
12911 | ### Use -ljpeg if available, unless `--with-jpeg=no'. |
12912 | HAVE_JPEG=no | |
12913 | LIBJPEG= | |
5c0255d9 | 12914 | if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then |
5476a9a4 GM |
12915 | if test "${with_jpeg}" != "no"; then |
12916 | ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" | |
12917 | if test "x$ac_cv_header_jerror_h" = x""yes; then : | |
12918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 | |
12919 | $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } | |
12920 | if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : | |
067d23c9 KY |
12921 | $as_echo_n "(cached) " >&6 |
12922 | else | |
5476a9a4 GM |
12923 | ac_check_lib_save_LIBS=$LIBS |
12924 | LIBS="-ljpeg $LIBS" | |
12925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 12926 | /* end confdefs.h. */ |
f199cab1 | 12927 | |
5476a9a4 GM |
12928 | /* Override any GCC internal prototype to avoid an error. |
12929 | Use char because int might match the return type of a GCC | |
12930 | builtin and then its argument prototype would still apply. */ | |
12931 | #ifdef __cplusplus | |
12932 | extern "C" | |
12933 | #endif | |
12934 | char jpeg_destroy_compress (); | |
067d23c9 KY |
12935 | int |
12936 | main () | |
12937 | { | |
5476a9a4 | 12938 | return jpeg_destroy_compress (); |
067d23c9 KY |
12939 | ; |
12940 | return 0; | |
12941 | } | |
12942 | _ACEOF | |
12943 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 12944 | ac_cv_lib_jpeg_jpeg_destroy_compress=yes |
067d23c9 | 12945 | else |
5476a9a4 | 12946 | ac_cv_lib_jpeg_jpeg_destroy_compress=no |
067d23c9 KY |
12947 | fi |
12948 | rm -f core conftest.err conftest.$ac_objext \ | |
12949 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
12950 | LIBS=$ac_check_lib_save_LIBS |
12951 | fi | |
12952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 | |
12953 | $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } | |
12954 | if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : | |
12955 | HAVE_JPEG=yes | |
12956 | fi | |
12957 | ||
067d23c9 | 12958 | fi |
f199cab1 | 12959 | |
f199cab1 GM |
12960 | |
12961 | fi | |
067d23c9 | 12962 | |
5476a9a4 GM |
12963 | if test "${HAVE_JPEG}" = "yes"; then |
12964 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 12965 | |
5476a9a4 GM |
12966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12967 | /* end confdefs.h. */ | |
12968 | #include <jpeglib.h> | |
12969 | version=JPEG_LIB_VERSION | |
f199cab1 | 12970 | |
5476a9a4 GM |
12971 | _ACEOF |
12972 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12973 | $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : | |
12974 | $as_echo "#define HAVE_JPEG 1" >>confdefs.h | |
f199cab1 | 12975 | |
5476a9a4 GM |
12976 | else |
12977 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 | |
12978 | $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} | |
12979 | HAVE_JPEG=no | |
067d23c9 | 12980 | fi |
5476a9a4 | 12981 | rm -f conftest* |
067d23c9 | 12982 | |
5476a9a4 GM |
12983 | fi |
12984 | if test "${HAVE_JPEG}" = "yes"; then | |
12985 | LIBJPEG=-ljpeg | |
12986 | fi | |
12987 | fi | |
067d23c9 KY |
12988 | |
12989 | ||
5476a9a4 GM |
12990 | ### Use -lpng if available, unless `--with-png=no'. |
12991 | HAVE_PNG=no | |
12992 | LIBPNG= | |
5c0255d9 | 12993 | if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then |
5476a9a4 GM |
12994 | if test "${with_png}" != "no"; then |
12995 | # Debian unstable as of July 2003 has multiple libpngs, and puts png.h | |
12996 | # in /usr/include/libpng. | |
12997 | for ac_header in png.h libpng/png.h | |
12998 | do : | |
12999 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13000 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13001 | eval as_val=\$$as_ac_Header | |
13002 | if test "x$as_val" = x""yes; then : | |
13003 | cat >>confdefs.h <<_ACEOF | |
13004 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13005 | _ACEOF | |
13006 | break | |
13007 | fi | |
067d23c9 | 13008 | |
5476a9a4 | 13009 | done |
067d23c9 | 13010 | |
5476a9a4 GM |
13011 | if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then |
13012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 | |
13013 | $as_echo_n "checking for png_get_channels in -lpng... " >&6; } | |
13014 | if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : | |
13015 | $as_echo_n "(cached) " >&6 | |
13016 | else | |
13017 | ac_check_lib_save_LIBS=$LIBS | |
13018 | LIBS="-lpng -lz -lm $LIBS" | |
13019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13020 | /* end confdefs.h. */ | |
067d23c9 | 13021 | |
5476a9a4 GM |
13022 | /* Override any GCC internal prototype to avoid an error. |
13023 | Use char because int might match the return type of a GCC | |
13024 | builtin and then its argument prototype would still apply. */ | |
13025 | #ifdef __cplusplus | |
13026 | extern "C" | |
13027 | #endif | |
13028 | char png_get_channels (); | |
13029 | int | |
13030 | main () | |
13031 | { | |
13032 | return png_get_channels (); | |
13033 | ; | |
13034 | return 0; | |
13035 | } | |
13036 | _ACEOF | |
13037 | if ac_fn_c_try_link "$LINENO"; then : | |
13038 | ac_cv_lib_png_png_get_channels=yes | |
f199cab1 | 13039 | else |
5476a9a4 GM |
13040 | ac_cv_lib_png_png_get_channels=no |
13041 | fi | |
13042 | rm -f core conftest.err conftest.$ac_objext \ | |
13043 | conftest$ac_exeext conftest.$ac_ext | |
13044 | LIBS=$ac_check_lib_save_LIBS | |
13045 | fi | |
13046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 | |
13047 | $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } | |
13048 | if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : | |
13049 | HAVE_PNG=yes | |
f199cab1 | 13050 | fi |
067d23c9 | 13051 | |
5476a9a4 GM |
13052 | fi |
13053 | fi | |
7834125e | 13054 | |
5476a9a4 GM |
13055 | if test "${HAVE_PNG}" = "yes"; then |
13056 | ||
13057 | $as_echo "#define HAVE_PNG 1" >>confdefs.h | |
13058 | ||
13059 | LIBPNG="-lpng -lz -lm" | |
13060 | ||
13061 | ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H | |
13062 | # include <libpng/png.h> | |
13063 | #else | |
13064 | # include <png.h> | |
13065 | #endif | |
13066 | ||
13067 | " | |
13068 | if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : | |
13069 | ||
13070 | else | |
7834125e | 13071 | |
5476a9a4 | 13072 | $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h |
7834125e | 13073 | |
f199cab1 | 13074 | fi |
7834125e | 13075 | |
5476a9a4 GM |
13076 | fi |
13077 | fi | |
7834125e GM |
13078 | |
13079 | ||
5476a9a4 GM |
13080 | ### Use -ltiff if available, unless `--with-tiff=no'. |
13081 | HAVE_TIFF=no | |
13082 | LIBTIFF= | |
5c0255d9 | 13083 | if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then |
5476a9a4 GM |
13084 | if test "${with_tiff}" != "no"; then |
13085 | ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" | |
13086 | if test "x$ac_cv_header_tiffio_h" = x""yes; then : | |
13087 | tifflibs="-lz -lm" | |
13088 | # At least one tiff package requires the jpeg library. | |
13089 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
13090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 | |
13091 | $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } | |
13092 | if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : | |
f199cab1 GM |
13093 | $as_echo_n "(cached) " >&6 |
13094 | else | |
5476a9a4 GM |
13095 | ac_check_lib_save_LIBS=$LIBS |
13096 | LIBS="-ltiff $tifflibs $LIBS" | |
13097 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13098 | /* end confdefs.h. */ |
067d23c9 | 13099 | |
5476a9a4 GM |
13100 | /* Override any GCC internal prototype to avoid an error. |
13101 | Use char because int might match the return type of a GCC | |
13102 | builtin and then its argument prototype would still apply. */ | |
13103 | #ifdef __cplusplus | |
13104 | extern "C" | |
f199cab1 | 13105 | #endif |
5476a9a4 GM |
13106 | char TIFFGetVersion (); |
13107 | int | |
13108 | main () | |
13109 | { | |
13110 | return TIFFGetVersion (); | |
13111 | ; | |
13112 | return 0; | |
13113 | } | |
f199cab1 | 13114 | _ACEOF |
5476a9a4 GM |
13115 | if ac_fn_c_try_link "$LINENO"; then : |
13116 | ac_cv_lib_tiff_TIFFGetVersion=yes | |
f199cab1 | 13117 | else |
5476a9a4 | 13118 | ac_cv_lib_tiff_TIFFGetVersion=no |
f199cab1 | 13119 | fi |
5476a9a4 GM |
13120 | rm -f core conftest.err conftest.$ac_objext \ |
13121 | conftest$ac_exeext conftest.$ac_ext | |
13122 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 13123 | fi |
5476a9a4 GM |
13124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 |
13125 | $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } | |
13126 | if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : | |
13127 | HAVE_TIFF=yes | |
f199cab1 | 13128 | fi |
067d23c9 | 13129 | |
5476a9a4 | 13130 | fi |
067d23c9 | 13131 | |
067d23c9 | 13132 | |
5476a9a4 | 13133 | fi |
f199cab1 | 13134 | |
5476a9a4 | 13135 | if test "${HAVE_TIFF}" = "yes"; then |
067d23c9 | 13136 | |
5476a9a4 | 13137 | $as_echo "#define HAVE_TIFF 1" >>confdefs.h |
067d23c9 | 13138 | |
5476a9a4 GM |
13139 | LIBTIFF=-ltiff |
13140 | fi | |
f199cab1 | 13141 | fi |
067d23c9 | 13142 | |
067d23c9 | 13143 | |
5476a9a4 GM |
13144 | ### Use -lgif or -lungif if available, unless `--with-gif=no'. |
13145 | HAVE_GIF=no | |
13146 | LIBGIF= | |
5c0255d9 GM |
13147 | if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \ |
13148 | || test "${HAVE_W32}" = "yes"; then | |
5476a9a4 GM |
13149 | ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" |
13150 | if test "x$ac_cv_header_gif_lib_h" = x""yes; then : | |
13151 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. | |
13152 | # Earlier versions can crash Emacs. | |
13153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 | |
13154 | $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } | |
13155 | if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
13156 | $as_echo_n "(cached) " >&6 |
13157 | else | |
5476a9a4 GM |
13158 | ac_check_lib_save_LIBS=$LIBS |
13159 | LIBS="-lgif $LIBS" | |
13160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13161 | /* end confdefs.h. */ |
067d23c9 | 13162 | |
5476a9a4 GM |
13163 | /* Override any GCC internal prototype to avoid an error. |
13164 | Use char because int might match the return type of a GCC | |
13165 | builtin and then its argument prototype would still apply. */ | |
13166 | #ifdef __cplusplus | |
13167 | extern "C" | |
13168 | #endif | |
13169 | char EGifPutExtensionLast (); | |
f199cab1 GM |
13170 | int |
13171 | main () | |
13172 | { | |
5476a9a4 | 13173 | return EGifPutExtensionLast (); |
f199cab1 GM |
13174 | ; |
13175 | return 0; | |
13176 | } | |
13177 | _ACEOF | |
5476a9a4 GM |
13178 | if ac_fn_c_try_link "$LINENO"; then : |
13179 | ac_cv_lib_gif_EGifPutExtensionLast=yes | |
f199cab1 | 13180 | else |
5476a9a4 | 13181 | ac_cv_lib_gif_EGifPutExtensionLast=no |
f199cab1 | 13182 | fi |
5476a9a4 GM |
13183 | rm -f core conftest.err conftest.$ac_objext \ |
13184 | conftest$ac_exeext conftest.$ac_ext | |
13185 | LIBS=$ac_check_lib_save_LIBS | |
13186 | fi | |
13187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 | |
13188 | $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } | |
13189 | if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : | |
13190 | HAVE_GIF=yes | |
13191 | else | |
13192 | HAVE_GIF=maybe | |
f199cab1 | 13193 | fi |
067d23c9 | 13194 | |
5476a9a4 GM |
13195 | fi |
13196 | ||
13197 | ||
13198 | ||
13199 | if test "$HAVE_GIF" = yes; then | |
13200 | LIBGIF=-lgif | |
13201 | elif test "$HAVE_GIF" = maybe; then | |
13202 | # If gif_lib.h but no libgif, try libungif. | |
13203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 | |
13204 | $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } | |
13205 | if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : | |
f199cab1 GM |
13206 | $as_echo_n "(cached) " >&6 |
13207 | else | |
5476a9a4 GM |
13208 | ac_check_lib_save_LIBS=$LIBS |
13209 | LIBS="-lungif $LIBS" | |
13210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 13211 | /* end confdefs.h. */ |
f199cab1 | 13212 | |
5476a9a4 GM |
13213 | /* Override any GCC internal prototype to avoid an error. |
13214 | Use char because int might match the return type of a GCC | |
13215 | builtin and then its argument prototype would still apply. */ | |
13216 | #ifdef __cplusplus | |
13217 | extern "C" | |
13218 | #endif | |
13219 | char EGifPutExtensionLast (); | |
f199cab1 GM |
13220 | int |
13221 | main () | |
13222 | { | |
5476a9a4 | 13223 | return EGifPutExtensionLast (); |
f199cab1 GM |
13224 | ; |
13225 | return 0; | |
13226 | } | |
13227 | _ACEOF | |
5476a9a4 GM |
13228 | if ac_fn_c_try_link "$LINENO"; then : |
13229 | ac_cv_lib_ungif_EGifPutExtensionLast=yes | |
f199cab1 | 13230 | else |
5476a9a4 | 13231 | ac_cv_lib_ungif_EGifPutExtensionLast=no |
f199cab1 | 13232 | fi |
5476a9a4 GM |
13233 | rm -f core conftest.err conftest.$ac_objext \ |
13234 | conftest$ac_exeext conftest.$ac_ext | |
13235 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 13236 | fi |
5476a9a4 GM |
13237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 |
13238 | $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } | |
13239 | if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : | |
13240 | HAVE_GIF=yes | |
13241 | else | |
13242 | HAVE_GIF=no | |
13243 | fi | |
13244 | ||
13245 | test "$HAVE_GIF" = yes && LIBGIF=-lungif | |
13246 | fi | |
13247 | ||
13248 | if test "${HAVE_GIF}" = "yes"; then | |
13249 | ||
13250 | $as_echo "#define HAVE_GIF 1" >>confdefs.h | |
13251 | ||
13252 | fi | |
13253 | fi | |
13254 | ||
13255 | ||
13256 | if test "${HAVE_X11}" = "yes"; then | |
13257 | MISSING="" | |
13258 | WITH_NO="" | |
13259 | test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && | |
13260 | MISSING="libXpm" && WITH_NO="--with-xpm=no" | |
13261 | test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && | |
13262 | MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" | |
13263 | test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && | |
13264 | MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" | |
13265 | test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && | |
13266 | MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" | |
13267 | test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && | |
13268 | MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" | |
13269 | ||
13270 | if test "X${MISSING}" != X; then | |
13271 | as_fn_error "The following required libraries were not found: | |
13272 | $MISSING | |
13273 | Maybe some development libraries/packages are missing? | |
13274 | If you don't want to link with them give | |
13275 | $WITH_NO | |
13276 | as options to configure" "$LINENO" 5 | |
13277 | fi | |
13278 | fi | |
13279 | ||
13280 | ### Use -lgpm if available, unless `--with-gpm=no'. | |
13281 | HAVE_GPM=no | |
13282 | LIBGPM= | |
13283 | if test "${with_gpm}" != "no"; then | |
13284 | ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" | |
13285 | if test "x$ac_cv_header_gpm_h" = x""yes; then : | |
13286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 | |
13287 | $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } | |
13288 | if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : | |
067d23c9 KY |
13289 | $as_echo_n "(cached) " >&6 |
13290 | else | |
5476a9a4 GM |
13291 | ac_check_lib_save_LIBS=$LIBS |
13292 | LIBS="-lgpm $LIBS" | |
13293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13294 | /* end confdefs.h. */ |
13295 | ||
5476a9a4 GM |
13296 | /* Override any GCC internal prototype to avoid an error. |
13297 | Use char because int might match the return type of a GCC | |
13298 | builtin and then its argument prototype would still apply. */ | |
13299 | #ifdef __cplusplus | |
13300 | extern "C" | |
13301 | #endif | |
13302 | char Gpm_Open (); | |
067d23c9 KY |
13303 | int |
13304 | main () | |
13305 | { | |
5476a9a4 | 13306 | return Gpm_Open (); |
067d23c9 KY |
13307 | ; |
13308 | return 0; | |
13309 | } | |
13310 | _ACEOF | |
5476a9a4 GM |
13311 | if ac_fn_c_try_link "$LINENO"; then : |
13312 | ac_cv_lib_gpm_Gpm_Open=yes | |
067d23c9 | 13313 | else |
5476a9a4 | 13314 | ac_cv_lib_gpm_Gpm_Open=no |
067d23c9 | 13315 | fi |
5476a9a4 GM |
13316 | rm -f core conftest.err conftest.$ac_objext \ |
13317 | conftest$ac_exeext conftest.$ac_ext | |
13318 | LIBS=$ac_check_lib_save_LIBS | |
13319 | fi | |
13320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 | |
13321 | $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } | |
13322 | if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : | |
13323 | HAVE_GPM=yes | |
067d23c9 | 13324 | fi |
f199cab1 | 13325 | |
5476a9a4 | 13326 | fi |
f199cab1 | 13327 | |
f199cab1 | 13328 | |
f199cab1 | 13329 | |
5476a9a4 | 13330 | if test "${HAVE_GPM}" = "yes"; then |
f199cab1 | 13331 | |
5476a9a4 | 13332 | $as_echo "#define HAVE_GPM 1" >>confdefs.h |
f199cab1 | 13333 | |
5476a9a4 GM |
13334 | LIBGPM=-lgpm |
13335 | fi | |
067d23c9 | 13336 | fi |
067d23c9 KY |
13337 | |
13338 | ||
13339 | ||
13340 | ||
13341 | ||
13342 | ||
5476a9a4 GM |
13343 | GNUSTEP_CFLAGS= |
13344 | ### Use NeXTstep API to implement GUI. | |
13345 | if test "${HAVE_NS}" = "yes"; then | |
067d23c9 | 13346 | |
5476a9a4 | 13347 | $as_echo "#define HAVE_NS 1" >>confdefs.h |
067d23c9 | 13348 | |
5476a9a4 | 13349 | if test "${NS_IMPL_COCOA}" = "yes"; then |
067d23c9 | 13350 | |
5476a9a4 | 13351 | $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h |
f199cab1 | 13352 | |
5476a9a4 GM |
13353 | fi |
13354 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | |
f199cab1 | 13355 | |
5476a9a4 | 13356 | $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h |
f199cab1 | 13357 | |
5476a9a4 GM |
13358 | # See also .m.o rule in Makefile.in */ |
13359 | # FIXME: are all these flags really needed? Document here why. */ | |
13360 | GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
13361 | ## Extra CFLAGS applied to src/*.m files. | |
13362 | 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" | |
13363 | fi | |
13364 | # We also have mouse menus. | |
13365 | HAVE_MENUS=yes | |
13366 | OTHER_FILES=ns-app | |
13367 | fi | |
f199cab1 | 13368 | |
5c0255d9 GM |
13369 | if test "${HAVE_W32}" = "yes"; then |
13370 | HAVE_MENUS=yes | |
13371 | fi | |
f199cab1 | 13372 | |
5476a9a4 GM |
13373 | ### Use session management (-lSM -lICE) if available |
13374 | HAVE_X_SM=no | |
13375 | LIBXSM= | |
13376 | if test "${HAVE_X11}" = "yes"; then | |
13377 | ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" | |
13378 | if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : | |
13379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 | |
13380 | $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } | |
13381 | if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : | |
067d23c9 KY |
13382 | $as_echo_n "(cached) " >&6 |
13383 | else | |
5476a9a4 GM |
13384 | ac_check_lib_save_LIBS=$LIBS |
13385 | LIBS="-lSM -lICE $LIBS" | |
13386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13387 | /* end confdefs.h. */ |
13388 | ||
5476a9a4 GM |
13389 | /* Override any GCC internal prototype to avoid an error. |
13390 | Use char because int might match the return type of a GCC | |
13391 | builtin and then its argument prototype would still apply. */ | |
13392 | #ifdef __cplusplus | |
13393 | extern "C" | |
13394 | #endif | |
13395 | char SmcOpenConnection (); | |
f199cab1 GM |
13396 | int |
13397 | main () | |
13398 | { | |
5476a9a4 GM |
13399 | return SmcOpenConnection (); |
13400 | ; | |
13401 | return 0; | |
f199cab1 | 13402 | } |
067d23c9 | 13403 | _ACEOF |
5476a9a4 GM |
13404 | if ac_fn_c_try_link "$LINENO"; then : |
13405 | ac_cv_lib_SM_SmcOpenConnection=yes | |
067d23c9 | 13406 | else |
5476a9a4 | 13407 | ac_cv_lib_SM_SmcOpenConnection=no |
f199cab1 | 13408 | fi |
5476a9a4 GM |
13409 | rm -f core conftest.err conftest.$ac_objext \ |
13410 | conftest$ac_exeext conftest.$ac_ext | |
13411 | LIBS=$ac_check_lib_save_LIBS | |
13412 | fi | |
13413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 | |
13414 | $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } | |
13415 | if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : | |
13416 | HAVE_X_SM=yes | |
067d23c9 | 13417 | fi |
067d23c9 | 13418 | |
f199cab1 | 13419 | fi |
f199cab1 | 13420 | |
f199cab1 | 13421 | |
067d23c9 | 13422 | |
5476a9a4 GM |
13423 | if test "${HAVE_X_SM}" = "yes"; then |
13424 | ||
13425 | $as_echo "#define HAVE_X_SM 1" >>confdefs.h | |
13426 | ||
13427 | LIBXSM="-lSM -lICE" | |
13428 | case "$LIBS" in | |
13429 | *-lSM*) ;; | |
13430 | *) LIBS="$LIBXSM $LIBS" ;; | |
13431 | esac | |
067d23c9 | 13432 | fi |
5476a9a4 | 13433 | fi |
067d23c9 | 13434 | |
067d23c9 | 13435 | |
5476a9a4 GM |
13436 | ### Use libxml (-lxml2) if available |
13437 | HAVE_LIBXML2=no | |
13438 | if test "${with_xml2}" != "no"; then | |
13439 | ### I'm not sure what the version number should be, so I just guessed. | |
067d23c9 | 13440 | |
5476a9a4 | 13441 | succeeded=no |
067d23c9 | 13442 | |
5476a9a4 GM |
13443 | if test "$PKG_CONFIG" = "no" ; then |
13444 | HAVE_LIBXML2=no | |
13445 | else | |
13446 | PKG_CONFIG_MIN_VERSION=0.9.0 | |
b5591ebb | 13447 | if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
5476a9a4 GM |
13448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 |
13449 | $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } | |
067d23c9 | 13450 | |
b5591ebb GM |
13451 | if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 && |
13452 | LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` && | |
13453 | LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then | |
5476a9a4 GM |
13454 | edit_cflags=" |
13455 | s,///*,/,g | |
13456 | s/^/ / | |
13457 | s/ -I/ $isystem/g | |
13458 | s/^ // | |
13459 | " | |
13460 | LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` | |
13461 | LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` | |
13462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 | |
13463 | $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } | |
13464 | succeeded=yes | |
13465 | else | |
13466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13467 | $as_echo "no" >&6; } | |
13468 | LIBXML2_CFLAGS="" | |
13469 | LIBXML2_LIBS="" | |
13470 | ## If we have a custom action on failure, don't print errors, but | |
e2d8f316 GM |
13471 | ## do set a variable so people can do so. Do it in a subshell |
13472 | ## to capture any diagnostics in invoking pkg-config. | |
b5591ebb | 13473 | LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1` |
5476a9a4 GM |
13474 | |
13475 | fi | |
13476 | ||
13477 | ||
13478 | ||
13479 | else | |
13480 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." | |
13481 | echo "*** See http://www.freedesktop.org/software/pkgconfig" | |
13482 | fi | |
13483 | fi | |
13484 | ||
13485 | if test $succeeded = yes; then | |
13486 | HAVE_LIBXML2=yes | |
13487 | else | |
13488 | HAVE_LIBXML2=no | |
13489 | fi | |
13490 | ||
13491 | if test "${HAVE_LIBXML2}" = "yes"; then | |
13492 | LIBS="$LIBXML2_LIBS $LIBS" | |
13493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 | |
13494 | $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } | |
13495 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : | |
067d23c9 KY |
13496 | $as_echo_n "(cached) " >&6 |
13497 | else | |
5476a9a4 GM |
13498 | ac_check_lib_save_LIBS=$LIBS |
13499 | LIBS="-lxml2 $LIBS" | |
13500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13501 | /* end confdefs.h. */ |
13502 | ||
5476a9a4 GM |
13503 | /* Override any GCC internal prototype to avoid an error. |
13504 | Use char because int might match the return type of a GCC | |
13505 | builtin and then its argument prototype would still apply. */ | |
13506 | #ifdef __cplusplus | |
13507 | extern "C" | |
13508 | #endif | |
13509 | char htmlReadMemory (); | |
067d23c9 KY |
13510 | int |
13511 | main () | |
13512 | { | |
5476a9a4 | 13513 | return htmlReadMemory (); |
067d23c9 KY |
13514 | ; |
13515 | return 0; | |
13516 | } | |
13517 | _ACEOF | |
5476a9a4 GM |
13518 | if ac_fn_c_try_link "$LINENO"; then : |
13519 | ac_cv_lib_xml2_htmlReadMemory=yes | |
067d23c9 | 13520 | else |
5476a9a4 | 13521 | ac_cv_lib_xml2_htmlReadMemory=no |
067d23c9 | 13522 | fi |
5476a9a4 GM |
13523 | rm -f core conftest.err conftest.$ac_objext \ |
13524 | conftest$ac_exeext conftest.$ac_ext | |
13525 | LIBS=$ac_check_lib_save_LIBS | |
13526 | fi | |
13527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | |
13528 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | |
13529 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : | |
13530 | HAVE_LIBXML2=yes | |
13531 | else | |
13532 | HAVE_LIBXML2=no | |
067d23c9 KY |
13533 | fi |
13534 | ||
5476a9a4 | 13535 | if test "${HAVE_LIBXML2}" = "yes"; then |
067d23c9 | 13536 | |
5476a9a4 | 13537 | $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h |
067d23c9 | 13538 | |
5476a9a4 GM |
13539 | else |
13540 | LIBXML2_LIBS="" | |
13541 | LIBXML2_CFLAGS="" | |
13542 | fi | |
067d23c9 | 13543 | fi |
5476a9a4 | 13544 | fi |
067d23c9 | 13545 | |
067d23c9 | 13546 | |
067d23c9 | 13547 | |
5476a9a4 GM |
13548 | # If netdb.h doesn't declare h_errno, we must declare it by hand. |
13549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 | |
13550 | $as_echo_n "checking whether netdb declares h_errno... " >&6; } | |
13551 | if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : | |
13552 | $as_echo_n "(cached) " >&6 | |
067d23c9 | 13553 | else |
5476a9a4 GM |
13554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13555 | /* end confdefs.h. */ | |
13556 | #include <netdb.h> | |
13557 | int | |
13558 | main () | |
13559 | { | |
13560 | return h_errno; | |
13561 | ; | |
13562 | return 0; | |
13563 | } | |
13564 | _ACEOF | |
13565 | if ac_fn_c_try_link "$LINENO"; then : | |
13566 | emacs_cv_netdb_declares_h_errno=yes | |
13567 | else | |
13568 | emacs_cv_netdb_declares_h_errno=no | |
067d23c9 | 13569 | fi |
5476a9a4 GM |
13570 | rm -f core conftest.err conftest.$ac_objext \ |
13571 | conftest$ac_exeext conftest.$ac_ext | |
13572 | fi | |
13573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 | |
13574 | $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } | |
13575 | if test $emacs_cv_netdb_declares_h_errno = yes; then | |
067d23c9 | 13576 | |
5476a9a4 | 13577 | $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h |
f199cab1 | 13578 | |
5476a9a4 | 13579 | fi |
f199cab1 | 13580 | |
2c98a625 GM |
13581 | # sqrt and other floating-point functions such as fmod and frexp |
13582 | # are found in -lm on most systems. | |
5476a9a4 GM |
13583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 |
13584 | $as_echo_n "checking for sqrt in -lm... " >&6; } | |
13585 | if test "${ac_cv_lib_m_sqrt+set}" = set; then : | |
13586 | $as_echo_n "(cached) " >&6 | |
13587 | else | |
13588 | ac_check_lib_save_LIBS=$LIBS | |
13589 | LIBS="-lm $LIBS" | |
13590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13591 | /* end confdefs.h. */ | |
f199cab1 | 13592 | |
5476a9a4 GM |
13593 | /* Override any GCC internal prototype to avoid an error. |
13594 | Use char because int might match the return type of a GCC | |
13595 | builtin and then its argument prototype would still apply. */ | |
13596 | #ifdef __cplusplus | |
13597 | extern "C" | |
13598 | #endif | |
13599 | char sqrt (); | |
13600 | int | |
13601 | main () | |
13602 | { | |
13603 | return sqrt (); | |
13604 | ; | |
13605 | return 0; | |
13606 | } | |
13607 | _ACEOF | |
13608 | if ac_fn_c_try_link "$LINENO"; then : | |
13609 | ac_cv_lib_m_sqrt=yes | |
13610 | else | |
13611 | ac_cv_lib_m_sqrt=no | |
13612 | fi | |
13613 | rm -f core conftest.err conftest.$ac_objext \ | |
13614 | conftest$ac_exeext conftest.$ac_ext | |
13615 | LIBS=$ac_check_lib_save_LIBS | |
13616 | fi | |
13617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 | |
13618 | $as_echo "$ac_cv_lib_m_sqrt" >&6; } | |
13619 | if test "x$ac_cv_lib_m_sqrt" = x""yes; then : | |
13620 | cat >>confdefs.h <<_ACEOF | |
13621 | #define HAVE_LIBM 1 | |
13622 | _ACEOF | |
f199cab1 | 13623 | |
5476a9a4 | 13624 | LIBS="-lm $LIBS" |
f199cab1 | 13625 | |
5476a9a4 | 13626 | fi |
f199cab1 | 13627 | |
f199cab1 | 13628 | |
5476a9a4 GM |
13629 | # Check for mail-locking functions in a "mail" library. Probably this should |
13630 | # have the same check as for liblockfile below. | |
13631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 | |
13632 | $as_echo_n "checking for maillock in -lmail... " >&6; } | |
13633 | if test "${ac_cv_lib_mail_maillock+set}" = set; then : | |
067d23c9 KY |
13634 | $as_echo_n "(cached) " >&6 |
13635 | else | |
5476a9a4 GM |
13636 | ac_check_lib_save_LIBS=$LIBS |
13637 | LIBS="-lmail $LIBS" | |
13638 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13639 | /* end confdefs.h. */ |
13640 | ||
5476a9a4 GM |
13641 | /* Override any GCC internal prototype to avoid an error. |
13642 | Use char because int might match the return type of a GCC | |
13643 | builtin and then its argument prototype would still apply. */ | |
13644 | #ifdef __cplusplus | |
13645 | extern "C" | |
067d23c9 | 13646 | #endif |
5476a9a4 GM |
13647 | char maillock (); |
13648 | int | |
13649 | main () | |
13650 | { | |
13651 | return maillock (); | |
13652 | ; | |
13653 | return 0; | |
13654 | } | |
067d23c9 | 13655 | _ACEOF |
5476a9a4 GM |
13656 | if ac_fn_c_try_link "$LINENO"; then : |
13657 | ac_cv_lib_mail_maillock=yes | |
067d23c9 | 13658 | else |
5476a9a4 | 13659 | ac_cv_lib_mail_maillock=no |
067d23c9 | 13660 | fi |
5476a9a4 GM |
13661 | rm -f core conftest.err conftest.$ac_objext \ |
13662 | conftest$ac_exeext conftest.$ac_ext | |
13663 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 13664 | fi |
5476a9a4 GM |
13665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 |
13666 | $as_echo "$ac_cv_lib_mail_maillock" >&6; } | |
13667 | if test "x$ac_cv_lib_mail_maillock" = x""yes; then : | |
13668 | have_mail=yes | |
f199cab1 | 13669 | else |
5476a9a4 | 13670 | have_mail=no |
067d23c9 KY |
13671 | fi |
13672 | ||
5476a9a4 GM |
13673 | if test $have_mail = yes; then |
13674 | LIBS_MAIL=-lmail | |
13675 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 13676 | |
5476a9a4 | 13677 | $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h |
067d23c9 | 13678 | |
5476a9a4 GM |
13679 | else |
13680 | LIBS_MAIL= | |
13681 | fi | |
13682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 | |
13683 | $as_echo_n "checking for maillock in -llockfile... " >&6; } | |
13684 | if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : | |
067d23c9 KY |
13685 | $as_echo_n "(cached) " >&6 |
13686 | else | |
5476a9a4 GM |
13687 | ac_check_lib_save_LIBS=$LIBS |
13688 | LIBS="-llockfile $LIBS" | |
067d23c9 KY |
13689 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13690 | /* end confdefs.h. */ | |
13691 | ||
13692 | /* Override any GCC internal prototype to avoid an error. | |
13693 | Use char because int might match the return type of a GCC | |
13694 | builtin and then its argument prototype would still apply. */ | |
13695 | #ifdef __cplusplus | |
13696 | extern "C" | |
13697 | #endif | |
5476a9a4 | 13698 | char maillock (); |
067d23c9 KY |
13699 | int |
13700 | main () | |
13701 | { | |
5476a9a4 | 13702 | return maillock (); |
067d23c9 KY |
13703 | ; |
13704 | return 0; | |
13705 | } | |
13706 | _ACEOF | |
5476a9a4 GM |
13707 | if ac_fn_c_try_link "$LINENO"; then : |
13708 | ac_cv_lib_lockfile_maillock=yes | |
13709 | else | |
13710 | ac_cv_lib_lockfile_maillock=no | |
067d23c9 KY |
13711 | fi |
13712 | rm -f core conftest.err conftest.$ac_objext \ | |
5476a9a4 GM |
13713 | conftest$ac_exeext conftest.$ac_ext |
13714 | LIBS=$ac_check_lib_save_LIBS | |
067d23c9 | 13715 | fi |
5476a9a4 GM |
13716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 |
13717 | $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } | |
13718 | if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : | |
13719 | have_lockfile=yes | |
067d23c9 | 13720 | else |
5476a9a4 | 13721 | have_lockfile=no |
f199cab1 GM |
13722 | fi |
13723 | ||
5476a9a4 GM |
13724 | if test $have_lockfile = yes; then |
13725 | LIBS_MAIL=-llockfile | |
13726 | LIBS="$LIBS_MAIL $LIBS" | |
067d23c9 | 13727 | |
5476a9a4 | 13728 | $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h |
067d23c9 | 13729 | |
5476a9a4 GM |
13730 | else |
13731 | # If we have the shared liblockfile, assume we must use it for mail | |
13732 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
13733 | # (no liblockfile.a installed), ensure that we don't need to. | |
13734 | # Extract the first word of "liblockfile.so", so it can be a program name with args. | |
13735 | set dummy liblockfile.so; ac_word=$2 | |
13736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13737 | $as_echo_n "checking for $ac_word... " >&6; } | |
13738 | if test "${ac_cv_prog_liblockfile+set}" = set; then : | |
13739 | $as_echo_n "(cached) " >&6 | |
13740 | else | |
13741 | if test -n "$liblockfile"; then | |
13742 | ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. | |
13743 | else | |
13744 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13745 | as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" | |
13746 | for as_dir in $as_dummy | |
13747 | do | |
13748 | IFS=$as_save_IFS | |
13749 | test -z "$as_dir" && as_dir=. | |
13750 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13751 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
13752 | ac_cv_prog_liblockfile="yes" | |
13753 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13754 | break 2 | |
13755 | fi | |
13756 | done | |
13757 | done | |
13758 | IFS=$as_save_IFS | |
067d23c9 | 13759 | |
5476a9a4 GM |
13760 | test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" |
13761 | fi | |
13762 | fi | |
13763 | liblockfile=$ac_cv_prog_liblockfile | |
13764 | if test -n "$liblockfile"; then | |
13765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 | |
13766 | $as_echo "$liblockfile" >&6; } | |
13767 | else | |
13768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13769 | $as_echo "no" >&6; } | |
13770 | fi | |
067d23c9 | 13771 | |
067d23c9 | 13772 | |
5476a9a4 GM |
13773 | if test $ac_cv_prog_liblockfile = yes; then |
13774 | as_fn_error "Shared liblockfile found but can't link against it. | |
13775 | This probably means that movemail could lose mail. | |
13776 | There may be a \`development' package to install containing liblockfile." "$LINENO" 5 | |
13777 | fi | |
13778 | fi | |
067d23c9 | 13779 | |
067d23c9 | 13780 | |
067d23c9 | 13781 | |
067d23c9 KY |
13782 | |
13783 | ||
5476a9a4 GM |
13784 | ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to |
13785 | ## interlock access to the mail spool. The alternative is a lock file named | |
13786 | ## /usr/spool/mail/$USER.lock. | |
13787 | mail_lock=no | |
13788 | case "$opsys" in | |
13789 | aix4-2) mail_lock="lockf" ;; | |
067d23c9 | 13790 | |
87e1a811 | 13791 | gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; |
067d23c9 | 13792 | |
5476a9a4 GM |
13793 | ## On GNU/Linux systems, both methods are used by various mail programs. |
13794 | ## I assume most people are using newer mailers that have heard of flock. | |
13795 | ## Change this if you need to. | |
13796 | ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, | |
13797 | ## configure gets the right answers, and that means *NOT* using flock. | |
13798 | ## Using flock is guaranteed to be the wrong thing. See Debian Policy | |
13799 | ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
13800 | ## Debian maintainer hasn't provided a clean fix for Emacs. | |
13801 | ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
13802 | ## HAVE_MAILLOCK_H are defined, so the following appears to be the | |
13803 | ## correct logic. -- fx | |
13804 | ## We must check for HAVE_LIBLOCKFILE too, as movemail does. | |
13805 | ## liblockfile is a Free Software replacement for libmail, used on | |
13806 | ## Debian systems and elsewhere. -rfr. | |
13807 | gnu-*) | |
13808 | mail_lock="flock" | |
13809 | if test $have_mail = yes || test $have_lockfile = yes; then | |
13810 | test $ac_cv_header_maillock_h = yes && mail_lock=no | |
13811 | fi | |
13812 | ;; | |
13813 | esac | |
f199cab1 | 13814 | |
5476a9a4 GM |
13815 | BLESSMAIL_TARGET= |
13816 | case "$mail_lock" in | |
13817 | flock) | |
13818 | $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h | |
13819 | ;; | |
f199cab1 | 13820 | |
5476a9a4 GM |
13821 | lockf) |
13822 | $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h | |
13823 | ;; | |
f199cab1 | 13824 | |
5476a9a4 GM |
13825 | *) BLESSMAIL_TARGET="need-blessmail" ;; |
13826 | esac | |
f199cab1 GM |
13827 | |
13828 | ||
13829 | ||
5476a9a4 | 13830 | for ac_func in gethostname \ |
e7d0e5ee | 13831 | getrusage get_current_dir_name \ |
eda33f78 | 13832 | lrand48 \ |
a455a5ce | 13833 | select getpagesize setlocale \ |
aa8715fb | 13834 | utimes getrlimit setrlimit shutdown getaddrinfo \ |
eda33f78 | 13835 | strsignal setitimer \ |
5476a9a4 | 13836 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ |
2407788f | 13837 | gai_strerror mkstemp getline getdelim sync \ |
5476a9a4 GM |
13838 | difftime posix_memalign \ |
13839 | getpwent endpwent getgrent endgrent \ | |
13840 | touchlock \ | |
13841 | cfmakeraw cfsetspeed copysign __executable_start | |
13842 | do : | |
13843 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13844 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13845 | eval as_val=\$$as_ac_var | |
13846 | if test "x$as_val" = x""yes; then : | |
13847 | cat >>confdefs.h <<_ACEOF | |
13848 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13849 | _ACEOF | |
f199cab1 | 13850 | |
5476a9a4 GM |
13851 | fi |
13852 | done | |
f199cab1 GM |
13853 | |
13854 | ||
5476a9a4 GM |
13855 | ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines |
13856 | ## has a broken `rint' in some library versions including math library | |
13857 | ## version number A.09.05. | |
13858 | ## You can fix the math library by installing patch number PHSS_4630. | |
13859 | ## But we can fix it more reliably for Emacs by just not using rint. | |
8ad96b1d | 13860 | ## We also skip HAVE_RANDOM - see comments in src/conf_post.h. |
5476a9a4 GM |
13861 | case $opsys in |
13862 | hpux*) : ;; | |
13863 | *) for ac_func in random rint | |
13864 | do : | |
13865 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13866 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13867 | eval as_val=\$$as_ac_var | |
13868 | if test "x$as_val" = x""yes; then : | |
13869 | cat >>confdefs.h <<_ACEOF | |
13870 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13871 | _ACEOF | |
f199cab1 | 13872 | |
5476a9a4 GM |
13873 | fi |
13874 | done | |
13875 | ;; | |
13876 | esac | |
f199cab1 | 13877 | |
5476a9a4 GM |
13878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 |
13879 | $as_echo_n "checking for __builtin_unwind_init... " >&6; } | |
13880 | if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : | |
067d23c9 | 13881 | $as_echo_n "(cached) " >&6 |
f199cab1 GM |
13882 | else |
13883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
13884 | /* end confdefs.h. */ |
13885 | ||
067d23c9 KY |
13886 | int |
13887 | main () | |
13888 | { | |
5476a9a4 | 13889 | __builtin_unwind_init (); |
067d23c9 KY |
13890 | ; |
13891 | return 0; | |
13892 | } | |
13893 | _ACEOF | |
5476a9a4 GM |
13894 | if ac_fn_c_try_link "$LINENO"; then : |
13895 | emacs_cv_func___builtin_unwind_init=yes | |
067d23c9 | 13896 | else |
5476a9a4 | 13897 | emacs_cv_func___builtin_unwind_init=no |
067d23c9 | 13898 | fi |
5476a9a4 GM |
13899 | rm -f core conftest.err conftest.$ac_objext \ |
13900 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 13901 | fi |
5476a9a4 GM |
13902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 |
13903 | $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } | |
13904 | if test $emacs_cv_func___builtin_unwind_init = yes; then | |
067d23c9 | 13905 | |
5476a9a4 | 13906 | $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h |
f199cab1 | 13907 | |
067d23c9 | 13908 | fi |
067d23c9 | 13909 | |
f199cab1 GM |
13910 | |
13911 | ||
13912 | ||
13913 | ||
5476a9a4 GM |
13914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
13915 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
13916 | if test "${ac_cv_sys_largefile_source+set}" = set; then : | |
13917 | $as_echo_n "(cached) " >&6 | |
13918 | else | |
13919 | while :; do | |
13920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13921 | /* end confdefs.h. */ | |
13922 | #include <sys/types.h> /* for off_t */ | |
13923 | #include <stdio.h> | |
13924 | int | |
13925 | main () | |
13926 | { | |
13927 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13928 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13929 | ; | |
13930 | return 0; | |
13931 | } | |
13932 | _ACEOF | |
13933 | if ac_fn_c_try_link "$LINENO"; then : | |
13934 | ac_cv_sys_largefile_source=no; break | |
067d23c9 | 13935 | fi |
5476a9a4 GM |
13936 | rm -f core conftest.err conftest.$ac_objext \ |
13937 | conftest$ac_exeext conftest.$ac_ext | |
13938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13939 | /* end confdefs.h. */ | |
13940 | #define _LARGEFILE_SOURCE 1 | |
13941 | #include <sys/types.h> /* for off_t */ | |
13942 | #include <stdio.h> | |
13943 | int | |
13944 | main () | |
13945 | { | |
13946 | int (*fp) (FILE *, off_t, int) = fseeko; | |
13947 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
13948 | ; | |
13949 | return 0; | |
13950 | } | |
13951 | _ACEOF | |
13952 | if ac_fn_c_try_link "$LINENO"; then : | |
13953 | ac_cv_sys_largefile_source=1; break | |
13954 | fi | |
13955 | rm -f core conftest.err conftest.$ac_objext \ | |
13956 | conftest$ac_exeext conftest.$ac_ext | |
13957 | ac_cv_sys_largefile_source=unknown | |
13958 | break | |
13959 | done | |
13960 | fi | |
13961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
13962 | $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
13963 | case $ac_cv_sys_largefile_source in #( | |
13964 | no | unknown) ;; | |
13965 | *) | |
13966 | cat >>confdefs.h <<_ACEOF | |
13967 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
13968 | _ACEOF | |
13969 | ;; | |
13970 | esac | |
13971 | rm -rf conftest* | |
067d23c9 | 13972 | |
5476a9a4 GM |
13973 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
13974 | # in glibc 2.1.3, but that breaks too many other things. | |
13975 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
13976 | if test $ac_cv_sys_largefile_source != unknown; then | |
067d23c9 | 13977 | |
5476a9a4 | 13978 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h |
067d23c9 | 13979 | |
5476a9a4 | 13980 | fi |
067d23c9 KY |
13981 | |
13982 | ||
5476a9a4 GM |
13983 | # UNIX98 PTYs. |
13984 | for ac_func in grantpt | |
13985 | do : | |
13986 | ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" | |
13987 | if test "x$ac_cv_func_grantpt" = x""yes; then : | |
13988 | cat >>confdefs.h <<_ACEOF | |
13989 | #define HAVE_GRANTPT 1 | |
13990 | _ACEOF | |
f199cab1 | 13991 | |
5476a9a4 GM |
13992 | fi |
13993 | done | |
f199cab1 | 13994 | |
f199cab1 | 13995 | |
5476a9a4 | 13996 | # PTY-related GNU extensions. |
1146da8d | 13997 | for ac_func in getpt posix_openpt |
5476a9a4 | 13998 | do : |
1146da8d GM |
13999 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
14000 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14001 | eval as_val=\$$as_ac_var | |
14002 | if test "x$as_val" = x""yes; then : | |
5476a9a4 | 14003 | cat >>confdefs.h <<_ACEOF |
1146da8d | 14004 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
5476a9a4 | 14005 | _ACEOF |
f199cab1 | 14006 | |
5476a9a4 GM |
14007 | fi |
14008 | done | |
f199cab1 | 14009 | |
f199cab1 | 14010 | |
5476a9a4 GM |
14011 | # Check this now, so that we will NOT find the above functions in ncurses. |
14012 | # That is because we have not set up to link ncurses in lib-src. | |
14013 | # It's better to believe a function is not available | |
14014 | # than to expect to find it in ncurses. | |
14015 | # Also we need tputs and friends to be able to build at all. | |
14016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 | |
14017 | $as_echo_n "checking for library containing tputs... " >&6; } | |
14018 | # Run a test program that contains a call to tputs, a call that is | |
14019 | # never executed. This tests whether a pre-'main' dynamic linker | |
14020 | # works with the library. It's too much trouble to actually call | |
14021 | # tputs in the test program, due to portability hassles. When | |
14022 | # cross-compiling, assume the test program will run if it links. | |
f199cab1 | 14023 | |
5476a9a4 GM |
14024 | # Maybe curses should be tried earlier? |
14025 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 | |
14026 | for tputs_library in '' tinfo ncurses terminfo termcap curses; do | |
14027 | OLIBS=$LIBS | |
14028 | if test -z "$tputs_library"; then | |
14029 | LIBS_TERMCAP= | |
14030 | msg='none required' | |
14031 | else | |
14032 | LIBS_TERMCAP=-l$tputs_library | |
14033 | msg=$LIBS_TERMCAP | |
14034 | LIBS="$LIBS_TERMCAP $LIBS" | |
14035 | fi | |
14036 | if test "$cross_compiling" = yes; then : | |
14037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 KY |
14038 | /* end confdefs.h. */ |
14039 | ||
5476a9a4 GM |
14040 | extern void tputs (const char *, int, int (*)(int)); |
14041 | int main (int argc, char **argv) | |
14042 | { | |
14043 | if (argc == 10000) | |
14044 | tputs (argv[0], 0, 0); | |
14045 | return 0; | |
14046 | } | |
14047 | ||
067d23c9 KY |
14048 | _ACEOF |
14049 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14050 | |
067d23c9 | 14051 | else |
5476a9a4 | 14052 | msg=no |
067d23c9 KY |
14053 | fi |
14054 | rm -f core conftest.err conftest.$ac_objext \ | |
14055 | conftest$ac_exeext conftest.$ac_ext | |
067d23c9 | 14056 | else |
5476a9a4 | 14057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 KY |
14058 | /* end confdefs.h. */ |
14059 | ||
5476a9a4 GM |
14060 | extern void tputs (const char *, int, int (*)(int)); |
14061 | int main (int argc, char **argv) | |
14062 | { | |
14063 | if (argc == 10000) | |
14064 | tputs (argv[0], 0, 0); | |
14065 | return 0; | |
14066 | } | |
14067 | ||
067d23c9 | 14068 | _ACEOF |
5476a9a4 GM |
14069 | if ac_fn_c_try_run "$LINENO"; then : |
14070 | ||
067d23c9 | 14071 | else |
5476a9a4 | 14072 | msg=no |
067d23c9 | 14073 | fi |
5476a9a4 GM |
14074 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14075 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 | 14076 | fi |
5476a9a4 GM |
14077 | |
14078 | LIBS=$OLIBS | |
14079 | if test "X$msg" != Xno; then | |
14080 | break | |
14081 | fi | |
14082 | done | |
14083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 | |
14084 | $as_echo "$msg" >&6; } | |
14085 | if test "X$msg" = Xno; then | |
14086 | as_fn_error "The required function \`tputs' was not found in any library. | |
14087 | The following libraries were tried (in order): | |
14088 | libtinfo, libncurses, libterminfo, libtermcap, libcurses | |
14089 | Please try installing whichever of these libraries is most appropriate | |
14090 | for your system, together with its header files. | |
14091 | For example, a libncurses-dev(el) or similar package." "$LINENO" 5 | |
067d23c9 KY |
14092 | fi |
14093 | ||
5476a9a4 GM |
14094 | ## Use termcap instead of terminfo? |
14095 | ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. | |
14096 | TERMINFO=yes | |
14097 | ## FIXME? In the cases below where we unconditionally set | |
14098 | ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, | |
14099 | ## if that was found above to have tputs. | |
14100 | ## Should we use the gnu* logic everywhere? | |
14101 | case "$opsys" in | |
14102 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | |
14103 | ## The ncurses library has been moved out of the System framework in | |
14104 | ## Mac OS X 10.2. So if configure detects it, set the command-line | |
14105 | ## option to use it. | |
14106 | darwin) LIBS_TERMCAP="-lncurses" ;; | |
14107 | ||
14108 | gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; | |
14109 | ||
14110 | freebsd) | |
14111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 | |
14112 | $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } | |
14113 | if test "${emacs_cv_freebsd_terminfo+set}" = set; then : | |
067d23c9 KY |
14114 | $as_echo_n "(cached) " >&6 |
14115 | else | |
5476a9a4 | 14116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 14117 | /* end confdefs.h. */ |
5476a9a4 | 14118 | #include <osreldate.h> |
067d23c9 KY |
14119 | int |
14120 | main () | |
14121 | { | |
5476a9a4 GM |
14122 | #if __FreeBSD_version < 400000 |
14123 | fail; | |
14124 | #endif | |
14125 | ||
067d23c9 KY |
14126 | ; |
14127 | return 0; | |
14128 | } | |
14129 | _ACEOF | |
14130 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14131 | emacs_cv_freebsd_terminfo=yes |
067d23c9 | 14132 | else |
5476a9a4 | 14133 | emacs_cv_freebsd_terminfo=no |
067d23c9 KY |
14134 | fi |
14135 | rm -f core conftest.err conftest.$ac_objext \ | |
14136 | conftest$ac_exeext conftest.$ac_ext | |
14137 | fi | |
5476a9a4 GM |
14138 | |
14139 | ||
14140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 | |
14141 | $as_echo "$emacs_cv_freebsd_terminfo" >&6; } | |
14142 | ||
14143 | if test $emacs_cv_freebsd_terminfo = yes; then | |
14144 | LIBS_TERMCAP="-lncurses" | |
14145 | else | |
14146 | TERMINFO=no | |
14147 | LIBS_TERMCAP="-ltermcap" | |
14148 | fi | |
14149 | ;; | |
14150 | ||
14151 | netbsd) | |
14152 | if test "x$LIBS_TERMCAP" != "x-lterminfo"; then | |
14153 | TERMINFO=no | |
14154 | LIBS_TERMCAP="-ltermcap" | |
14155 | fi | |
14156 | ;; | |
14157 | ||
87e1a811 | 14158 | openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;; |
5476a9a4 GM |
14159 | |
14160 | ## hpux: Make sure we get select from libc rather than from libcurses | |
14161 | ## because libcurses on HPUX 10.10 has a broken version of select. | |
14162 | ## We used to use -lc -lcurses, but this may be cleaner. | |
14163 | ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly | |
14164 | # set that way, now it uses the default). Isn't this a contradiction? | |
14165 | hpux*) LIBS_TERMCAP="-ltermcap" ;; | |
14166 | ||
14167 | esac | |
14168 | ||
14169 | TERMCAP_OBJ=tparam.o | |
14170 | if test $TERMINFO = yes; then | |
14171 | ||
14172 | $as_echo "#define TERMINFO 1" >>confdefs.h | |
14173 | ||
14174 | TERMCAP_OBJ=terminfo.o | |
067d23c9 KY |
14175 | fi |
14176 | ||
f199cab1 | 14177 | |
067d23c9 | 14178 | |
5476a9a4 GM |
14179 | |
14180 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | |
14181 | # On Darwin, res_init appears not to be useful: see bug#562 and | |
14182 | # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html | |
14183 | resolv=no | |
14184 | ||
14185 | if test $opsys != darwin; then | |
14186 | ||
14187 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14188 | /* end confdefs.h. */ | |
14189 | #include <netinet/in.h> | |
14190 | #include <arpa/nameser.h> | |
14191 | #include <resolv.h> | |
067d23c9 KY |
14192 | int |
14193 | main () | |
14194 | { | |
5476a9a4 | 14195 | return res_init(); |
067d23c9 KY |
14196 | ; |
14197 | return 0; | |
14198 | } | |
14199 | _ACEOF | |
14200 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14201 | have_res_init=yes |
067d23c9 | 14202 | else |
5476a9a4 | 14203 | have_res_init=no |
067d23c9 KY |
14204 | fi |
14205 | rm -f core conftest.err conftest.$ac_objext \ | |
14206 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
14207 | if test "$have_res_init" = no; then |
14208 | OLIBS="$LIBS" | |
14209 | LIBS="$LIBS -lresolv" | |
14210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 | |
14211 | $as_echo_n "checking for res_init with -lresolv... " >&6; } | |
14212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14213 | /* end confdefs.h. */ |
5476a9a4 GM |
14214 | #include <netinet/in.h> |
14215 | #include <arpa/nameser.h> | |
14216 | #include <resolv.h> | |
067d23c9 KY |
14217 | int |
14218 | main () | |
14219 | { | |
5476a9a4 | 14220 | return res_init(); |
067d23c9 KY |
14221 | ; |
14222 | return 0; | |
14223 | } | |
14224 | _ACEOF | |
14225 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14226 | have_res_init=yes |
067d23c9 | 14227 | else |
5476a9a4 | 14228 | have_res_init=no |
067d23c9 KY |
14229 | fi |
14230 | rm -f core conftest.err conftest.$ac_objext \ | |
14231 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
14232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 |
14233 | $as_echo "$have_res_init" >&6; } | |
14234 | if test "$have_res_init" = yes ; then | |
14235 | resolv=yes | |
14236 | fi | |
14237 | LIBS="$OLIBS" | |
14238 | fi | |
067d23c9 | 14239 | |
5476a9a4 GM |
14240 | if test "$have_res_init" = yes; then |
14241 | ||
14242 | $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h | |
067d23c9 | 14243 | |
5476a9a4 | 14244 | fi |
067d23c9 | 14245 | fi |
5476a9a4 GM |
14246 | # Do we need the Hesiod library to provide the support routines? |
14247 | LIBHESIOD= | |
14248 | if test "$with_hesiod" != no ; then | |
14249 | # Don't set $LIBS here -- see comments above. FIXME which comments? | |
14250 | ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" | |
14251 | if test "x$ac_cv_func_res_send" = x""yes; then : | |
f199cab1 | 14252 | |
5476a9a4 GM |
14253 | else |
14254 | ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" | |
14255 | if test "x$ac_cv_func___res_send" = x""yes; then : | |
f199cab1 | 14256 | |
5476a9a4 GM |
14257 | else |
14258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 | |
14259 | $as_echo_n "checking for res_send in -lresolv... " >&6; } | |
14260 | if test "${ac_cv_lib_resolv_res_send+set}" = set; then : | |
067d23c9 KY |
14261 | $as_echo_n "(cached) " >&6 |
14262 | else | |
14263 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 14264 | LIBS="-lresolv $LIBS" |
067d23c9 KY |
14265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14266 | /* end confdefs.h. */ | |
14267 | ||
14268 | /* Override any GCC internal prototype to avoid an error. | |
14269 | Use char because int might match the return type of a GCC | |
14270 | builtin and then its argument prototype would still apply. */ | |
14271 | #ifdef __cplusplus | |
14272 | extern "C" | |
14273 | #endif | |
5476a9a4 | 14274 | char res_send (); |
067d23c9 KY |
14275 | int |
14276 | main () | |
14277 | { | |
5476a9a4 | 14278 | return res_send (); |
067d23c9 KY |
14279 | ; |
14280 | return 0; | |
14281 | } | |
14282 | _ACEOF | |
14283 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14284 | ac_cv_lib_resolv_res_send=yes |
067d23c9 | 14285 | else |
5476a9a4 | 14286 | ac_cv_lib_resolv_res_send=no |
067d23c9 KY |
14287 | fi |
14288 | rm -f core conftest.err conftest.$ac_objext \ | |
f199cab1 GM |
14289 | conftest$ac_exeext conftest.$ac_ext |
14290 | LIBS=$ac_check_lib_save_LIBS | |
14291 | fi | |
5476a9a4 GM |
14292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 |
14293 | $as_echo "$ac_cv_lib_resolv_res_send" >&6; } | |
14294 | if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : | |
14295 | resolv=yes | |
14296 | else | |
14297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 | |
14298 | $as_echo_n "checking for __res_send in -lresolv... " >&6; } | |
14299 | if test "${ac_cv_lib_resolv___res_send+set}" = set; then : | |
f199cab1 GM |
14300 | $as_echo_n "(cached) " >&6 |
14301 | else | |
14302 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 14303 | LIBS="-lresolv $LIBS" |
f199cab1 GM |
14304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14305 | /* end confdefs.h. */ | |
4717915f | 14306 | |
f199cab1 GM |
14307 | /* Override any GCC internal prototype to avoid an error. |
14308 | Use char because int might match the return type of a GCC | |
14309 | builtin and then its argument prototype would still apply. */ | |
14310 | #ifdef __cplusplus | |
14311 | extern "C" | |
14312 | #endif | |
5476a9a4 | 14313 | char __res_send (); |
f199cab1 GM |
14314 | int |
14315 | main () | |
14316 | { | |
5476a9a4 | 14317 | return __res_send (); |
f199cab1 GM |
14318 | ; |
14319 | return 0; | |
14320 | } | |
14321 | _ACEOF | |
14322 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 14323 | ac_cv_lib_resolv___res_send=yes |
f199cab1 | 14324 | else |
5476a9a4 | 14325 | ac_cv_lib_resolv___res_send=no |
f199cab1 GM |
14326 | fi |
14327 | rm -f core conftest.err conftest.$ac_objext \ | |
14328 | conftest$ac_exeext conftest.$ac_ext | |
14329 | LIBS=$ac_check_lib_save_LIBS | |
14330 | fi | |
5476a9a4 GM |
14331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 |
14332 | $as_echo "$ac_cv_lib_resolv___res_send" >&6; } | |
14333 | if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : | |
14334 | resolv=yes | |
067d23c9 | 14335 | fi |
f199cab1 | 14336 | |
5476a9a4 | 14337 | fi |
1f5d53eb | 14338 | |
5476a9a4 | 14339 | fi |
067d23c9 | 14340 | |
067d23c9 KY |
14341 | fi |
14342 | ||
5476a9a4 GM |
14343 | if test "$resolv" = yes ; then |
14344 | RESOLVLIB=-lresolv | |
14345 | else | |
14346 | RESOLVLIB= | |
14347 | fi | |
14348 | ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" | |
14349 | if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : | |
14350 | ||
14351 | else | |
14352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 | |
14353 | $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } | |
14354 | if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : | |
14355 | $as_echo_n "(cached) " >&6 | |
14356 | else | |
14357 | ac_check_lib_save_LIBS=$LIBS | |
14358 | LIBS="-lhesiod $RESOLVLIB $LIBS" | |
14359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 14360 | /* end confdefs.h. */ |
5476a9a4 GM |
14361 | |
14362 | /* Override any GCC internal prototype to avoid an error. | |
14363 | Use char because int might match the return type of a GCC | |
14364 | builtin and then its argument prototype would still apply. */ | |
14365 | #ifdef __cplusplus | |
14366 | extern "C" | |
14367 | #endif | |
14368 | char hes_getmailhost (); | |
067d23c9 KY |
14369 | int |
14370 | main () | |
14371 | { | |
5476a9a4 | 14372 | return hes_getmailhost (); |
067d23c9 KY |
14373 | ; |
14374 | return 0; | |
14375 | } | |
14376 | _ACEOF | |
f199cab1 | 14377 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 GM |
14378 | ac_cv_lib_hesiod_hes_getmailhost=yes |
14379 | else | |
14380 | ac_cv_lib_hesiod_hes_getmailhost=no | |
067d23c9 | 14381 | fi |
f199cab1 GM |
14382 | rm -f core conftest.err conftest.$ac_objext \ |
14383 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 14384 | LIBS=$ac_check_lib_save_LIBS |
067d23c9 | 14385 | fi |
5476a9a4 GM |
14386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 |
14387 | $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } | |
14388 | if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : | |
14389 | hesiod=yes | |
14390 | else | |
14391 | : | |
067d23c9 KY |
14392 | fi |
14393 | ||
c5a68906 | 14394 | fi |
f199cab1 GM |
14395 | |
14396 | ||
5476a9a4 | 14397 | if test x"$hesiod" = xyes; then |
f199cab1 | 14398 | |
5476a9a4 | 14399 | $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h |
f199cab1 | 14400 | |
5476a9a4 | 14401 | LIBHESIOD=-lhesiod |
c5a68906 | 14402 | fi |
5476a9a4 | 14403 | fi |
4fc2b746 | 14404 | |
4fc2b746 | 14405 | |
5476a9a4 GM |
14406 | # Do we need libresolv (due to res_init or Hesiod)? |
14407 | if test "$resolv" = yes && test $opsys != darwin; then | |
4fc2b746 | 14408 | |
5476a9a4 | 14409 | $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h |
4fc2b746 | 14410 | |
5476a9a4 GM |
14411 | LIBRESOLV=-lresolv |
14412 | else | |
14413 | LIBRESOLV= | |
14414 | fi | |
4fc2b746 | 14415 | |
4fc2b746 | 14416 | |
5476a9a4 GM |
14417 | # These tell us which Kerberos-related libraries to use. |
14418 | COM_ERRLIB= | |
14419 | CRYPTOLIB= | |
14420 | KRB5LIB= | |
14421 | DESLIB= | |
14422 | KRB4LIB= | |
4fc2b746 | 14423 | |
5476a9a4 GM |
14424 | if test "${with_kerberos}" != no; then |
14425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 | |
14426 | $as_echo_n "checking for com_err in -lcom_err... " >&6; } | |
14427 | if test "${ac_cv_lib_com_err_com_err+set}" = set; then : | |
14428 | $as_echo_n "(cached) " >&6 | |
14429 | else | |
14430 | ac_check_lib_save_LIBS=$LIBS | |
14431 | LIBS="-lcom_err $LIBS" | |
14432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14433 | /* end confdefs.h. */ | |
4fc2b746 | 14434 | |
5476a9a4 GM |
14435 | /* Override any GCC internal prototype to avoid an error. |
14436 | Use char because int might match the return type of a GCC | |
14437 | builtin and then its argument prototype would still apply. */ | |
14438 | #ifdef __cplusplus | |
14439 | extern "C" | |
14440 | #endif | |
14441 | char com_err (); | |
14442 | int | |
14443 | main () | |
14444 | { | |
14445 | return com_err (); | |
14446 | ; | |
14447 | return 0; | |
14448 | } | |
14449 | _ACEOF | |
14450 | if ac_fn_c_try_link "$LINENO"; then : | |
14451 | ac_cv_lib_com_err_com_err=yes | |
14452 | else | |
14453 | ac_cv_lib_com_err_com_err=no | |
14454 | fi | |
14455 | rm -f core conftest.err conftest.$ac_objext \ | |
14456 | conftest$ac_exeext conftest.$ac_ext | |
14457 | LIBS=$ac_check_lib_save_LIBS | |
14458 | fi | |
14459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 | |
14460 | $as_echo "$ac_cv_lib_com_err_com_err" >&6; } | |
14461 | if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : | |
14462 | have_com_err=yes | |
14463 | else | |
14464 | have_com_err=no | |
14465 | fi | |
f199cab1 | 14466 | |
5476a9a4 GM |
14467 | if test $have_com_err = yes; then |
14468 | COM_ERRLIB=-lcom_err | |
14469 | LIBS="$COM_ERRLIB $LIBS" | |
f199cab1 | 14470 | |
5476a9a4 | 14471 | $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h |
f199cab1 | 14472 | |
5476a9a4 GM |
14473 | fi |
14474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 | |
14475 | $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } | |
14476 | if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : | |
14477 | $as_echo_n "(cached) " >&6 | |
14478 | else | |
14479 | ac_check_lib_save_LIBS=$LIBS | |
14480 | LIBS="-lcrypto $LIBS" | |
14481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14482 | /* end confdefs.h. */ | |
f199cab1 | 14483 | |
5476a9a4 GM |
14484 | /* Override any GCC internal prototype to avoid an error. |
14485 | Use char because int might match the return type of a GCC | |
14486 | builtin and then its argument prototype would still apply. */ | |
14487 | #ifdef __cplusplus | |
14488 | extern "C" | |
14489 | #endif | |
14490 | char mit_des_cbc_encrypt (); | |
14491 | int | |
14492 | main () | |
14493 | { | |
14494 | return mit_des_cbc_encrypt (); | |
14495 | ; | |
14496 | return 0; | |
14497 | } | |
14498 | _ACEOF | |
14499 | if ac_fn_c_try_link "$LINENO"; then : | |
14500 | ac_cv_lib_crypto_mit_des_cbc_encrypt=yes | |
14501 | else | |
14502 | ac_cv_lib_crypto_mit_des_cbc_encrypt=no | |
14503 | fi | |
14504 | rm -f core conftest.err conftest.$ac_objext \ | |
14505 | conftest$ac_exeext conftest.$ac_ext | |
14506 | LIBS=$ac_check_lib_save_LIBS | |
14507 | fi | |
14508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 | |
14509 | $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } | |
14510 | if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14511 | have_crypto=yes | |
14512 | else | |
14513 | have_crypto=no | |
14514 | fi | |
f199cab1 | 14515 | |
5476a9a4 GM |
14516 | if test $have_crypto = yes; then |
14517 | CRYPTOLIB=-lcrypto | |
14518 | LIBS="$CRYPTOLIB $LIBS" | |
f199cab1 | 14519 | |
5476a9a4 | 14520 | $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h |
f199cab1 | 14521 | |
5476a9a4 GM |
14522 | fi |
14523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 | |
14524 | $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } | |
14525 | if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : | |
14526 | $as_echo_n "(cached) " >&6 | |
14527 | else | |
14528 | ac_check_lib_save_LIBS=$LIBS | |
14529 | LIBS="-lk5crypto $LIBS" | |
14530 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14531 | /* end confdefs.h. */ | |
f199cab1 | 14532 | |
5476a9a4 GM |
14533 | /* Override any GCC internal prototype to avoid an error. |
14534 | Use char because int might match the return type of a GCC | |
14535 | builtin and then its argument prototype would still apply. */ | |
14536 | #ifdef __cplusplus | |
14537 | extern "C" | |
14538 | #endif | |
14539 | char mit_des_cbc_encrypt (); | |
14540 | int | |
14541 | main () | |
14542 | { | |
14543 | return mit_des_cbc_encrypt (); | |
14544 | ; | |
14545 | return 0; | |
14546 | } | |
14547 | _ACEOF | |
14548 | if ac_fn_c_try_link "$LINENO"; then : | |
14549 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes | |
14550 | else | |
14551 | ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no | |
14552 | fi | |
14553 | rm -f core conftest.err conftest.$ac_objext \ | |
14554 | conftest$ac_exeext conftest.$ac_ext | |
14555 | LIBS=$ac_check_lib_save_LIBS | |
14556 | fi | |
14557 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 | |
14558 | $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } | |
14559 | if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : | |
14560 | have_k5crypto=yes | |
14561 | else | |
14562 | have_k5crypto=no | |
4fc2b746 | 14563 | fi |
4fc2b746 | 14564 | |
5476a9a4 GM |
14565 | if test $have_k5crypto = yes; then |
14566 | CRYPTOLIB=-lk5crypto | |
14567 | LIBS="$CRYPTOLIB $LIBS" | |
4fc2b746 | 14568 | |
5476a9a4 | 14569 | $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h |
4fc2b746 | 14570 | |
5476a9a4 GM |
14571 | fi |
14572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 | |
14573 | $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } | |
14574 | if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : | |
14575 | $as_echo_n "(cached) " >&6 | |
14576 | else | |
14577 | ac_check_lib_save_LIBS=$LIBS | |
14578 | LIBS="-lkrb5 $LIBS" | |
14579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14580 | /* end confdefs.h. */ | |
4fc2b746 | 14581 | |
5476a9a4 GM |
14582 | /* Override any GCC internal prototype to avoid an error. |
14583 | Use char because int might match the return type of a GCC | |
14584 | builtin and then its argument prototype would still apply. */ | |
14585 | #ifdef __cplusplus | |
14586 | extern "C" | |
14587 | #endif | |
14588 | char krb5_init_context (); | |
14589 | int | |
14590 | main () | |
14591 | { | |
14592 | return krb5_init_context (); | |
14593 | ; | |
14594 | return 0; | |
14595 | } | |
14596 | _ACEOF | |
14597 | if ac_fn_c_try_link "$LINENO"; then : | |
14598 | ac_cv_lib_krb5_krb5_init_context=yes | |
14599 | else | |
14600 | ac_cv_lib_krb5_krb5_init_context=no | |
14601 | fi | |
14602 | rm -f core conftest.err conftest.$ac_objext \ | |
14603 | conftest$ac_exeext conftest.$ac_ext | |
14604 | LIBS=$ac_check_lib_save_LIBS | |
14605 | fi | |
14606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 | |
14607 | $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } | |
14608 | if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : | |
14609 | have_krb5=yes | |
14610 | else | |
14611 | have_krb5=no | |
14612 | fi | |
f199cab1 | 14613 | |
5476a9a4 GM |
14614 | if test $have_krb5=yes; then |
14615 | KRB5LIB=-lkrb5 | |
14616 | LIBS="$KRB5LIB $LIBS" | |
f199cab1 | 14617 | |
5476a9a4 | 14618 | $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h |
f199cab1 | 14619 | |
5476a9a4 GM |
14620 | fi |
14621 | if test "${with_kerberos5}" = no; then | |
14622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 | |
14623 | $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } | |
14624 | if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : | |
f199cab1 GM |
14625 | $as_echo_n "(cached) " >&6 |
14626 | else | |
5476a9a4 GM |
14627 | ac_check_lib_save_LIBS=$LIBS |
14628 | LIBS="-ldes425 $LIBS" | |
14629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 14630 | /* end confdefs.h. */ |
f199cab1 | 14631 | |
5476a9a4 GM |
14632 | /* Override any GCC internal prototype to avoid an error. |
14633 | Use char because int might match the return type of a GCC | |
14634 | builtin and then its argument prototype would still apply. */ | |
14635 | #ifdef __cplusplus | |
14636 | extern "C" | |
14637 | #endif | |
14638 | char des_cbc_encrypt (); | |
3e0be4ab GM |
14639 | int |
14640 | main () | |
14641 | { | |
5476a9a4 | 14642 | return des_cbc_encrypt (); |
3e0be4ab GM |
14643 | ; |
14644 | return 0; | |
14645 | } | |
14646 | _ACEOF | |
5476a9a4 GM |
14647 | if ac_fn_c_try_link "$LINENO"; then : |
14648 | ac_cv_lib_des425_des_cbc_encrypt=yes | |
3e0be4ab | 14649 | else |
5476a9a4 | 14650 | ac_cv_lib_des425_des_cbc_encrypt=no |
3e0be4ab | 14651 | fi |
5476a9a4 GM |
14652 | rm -f core conftest.err conftest.$ac_objext \ |
14653 | conftest$ac_exeext conftest.$ac_ext | |
14654 | LIBS=$ac_check_lib_save_LIBS | |
4fc2b746 | 14655 | fi |
5476a9a4 GM |
14656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 |
14657 | $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } | |
14658 | if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : | |
14659 | have_des425=yes | |
14660 | else | |
14661 | have_des425=no | |
f199cab1 | 14662 | fi |
6c051bab | 14663 | |
5476a9a4 GM |
14664 | if test $have_des425 = yes; then |
14665 | DESLIB=-ldes425 | |
14666 | LIBS="$DESLIB $LIBS" | |
6c051bab | 14667 | |
5476a9a4 | 14668 | $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h |
f199cab1 | 14669 | |
5476a9a4 GM |
14670 | else |
14671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 | |
14672 | $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } | |
14673 | if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : | |
14674 | $as_echo_n "(cached) " >&6 | |
14675 | else | |
14676 | ac_check_lib_save_LIBS=$LIBS | |
14677 | LIBS="-ldes $LIBS" | |
14678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14679 | /* end confdefs.h. */ | |
f199cab1 | 14680 | |
5476a9a4 GM |
14681 | /* Override any GCC internal prototype to avoid an error. |
14682 | Use char because int might match the return type of a GCC | |
14683 | builtin and then its argument prototype would still apply. */ | |
14684 | #ifdef __cplusplus | |
14685 | extern "C" | |
14686 | #endif | |
14687 | char des_cbc_encrypt (); | |
14688 | int | |
14689 | main () | |
14690 | { | |
14691 | return des_cbc_encrypt (); | |
14692 | ; | |
14693 | return 0; | |
14694 | } | |
14695 | _ACEOF | |
14696 | if ac_fn_c_try_link "$LINENO"; then : | |
14697 | ac_cv_lib_des_des_cbc_encrypt=yes | |
14698 | else | |
14699 | ac_cv_lib_des_des_cbc_encrypt=no | |
14700 | fi | |
14701 | rm -f core conftest.err conftest.$ac_objext \ | |
14702 | conftest$ac_exeext conftest.$ac_ext | |
14703 | LIBS=$ac_check_lib_save_LIBS | |
14704 | fi | |
14705 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 | |
14706 | $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } | |
14707 | if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : | |
14708 | have_des=yes | |
14709 | else | |
14710 | have_des=no | |
14711 | fi | |
f199cab1 | 14712 | |
5476a9a4 GM |
14713 | if test $have_des = yes; then |
14714 | DESLIB=-ldes | |
14715 | LIBS="$DESLIB $LIBS" | |
f199cab1 | 14716 | |
5476a9a4 | 14717 | $as_echo "#define HAVE_LIBDES 1" >>confdefs.h |
f199cab1 | 14718 | |
5476a9a4 GM |
14719 | fi |
14720 | fi | |
14721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 | |
14722 | $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } | |
14723 | if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : | |
942f733f PE |
14724 | $as_echo_n "(cached) " >&6 |
14725 | else | |
5476a9a4 GM |
14726 | ac_check_lib_save_LIBS=$LIBS |
14727 | LIBS="-lkrb4 $LIBS" | |
14728 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14729 | /* end confdefs.h. */ |
942f733f | 14730 | |
5476a9a4 GM |
14731 | /* Override any GCC internal prototype to avoid an error. |
14732 | Use char because int might match the return type of a GCC | |
14733 | builtin and then its argument prototype would still apply. */ | |
14734 | #ifdef __cplusplus | |
14735 | extern "C" | |
14736 | #endif | |
14737 | char krb_get_cred (); | |
942f733f PE |
14738 | int |
14739 | main () | |
14740 | { | |
5476a9a4 | 14741 | return krb_get_cred (); |
942f733f PE |
14742 | ; |
14743 | return 0; | |
14744 | } | |
14745 | _ACEOF | |
5476a9a4 GM |
14746 | if ac_fn_c_try_link "$LINENO"; then : |
14747 | ac_cv_lib_krb4_krb_get_cred=yes | |
14748 | else | |
14749 | ac_cv_lib_krb4_krb_get_cred=no | |
14750 | fi | |
14751 | rm -f core conftest.err conftest.$ac_objext \ | |
14752 | conftest$ac_exeext conftest.$ac_ext | |
14753 | LIBS=$ac_check_lib_save_LIBS | |
14754 | fi | |
14755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 | |
14756 | $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } | |
14757 | if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : | |
14758 | have_krb4=yes | |
14759 | else | |
14760 | have_krb4=no | |
14761 | fi | |
14762 | ||
14763 | if test $have_krb4 = yes; then | |
14764 | KRB4LIB=-lkrb4 | |
14765 | LIBS="$KRB4LIB $LIBS" | |
14766 | ||
14767 | $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h | |
14768 | ||
14769 | else | |
14770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 | |
14771 | $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } | |
14772 | if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : | |
14773 | $as_echo_n "(cached) " >&6 | |
3e0be4ab | 14774 | else |
5476a9a4 GM |
14775 | ac_check_lib_save_LIBS=$LIBS |
14776 | LIBS="-lkrb $LIBS" | |
14777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
942f733f | 14778 | /* end confdefs.h. */ |
942f733f | 14779 | |
5476a9a4 GM |
14780 | /* Override any GCC internal prototype to avoid an error. |
14781 | Use char because int might match the return type of a GCC | |
14782 | builtin and then its argument prototype would still apply. */ | |
14783 | #ifdef __cplusplus | |
14784 | extern "C" | |
14785 | #endif | |
14786 | char krb_get_cred (); | |
942f733f PE |
14787 | int |
14788 | main () | |
14789 | { | |
5476a9a4 | 14790 | return krb_get_cred (); |
942f733f PE |
14791 | ; |
14792 | return 0; | |
14793 | } | |
14794 | _ACEOF | |
5476a9a4 GM |
14795 | if ac_fn_c_try_link "$LINENO"; then : |
14796 | ac_cv_lib_krb_krb_get_cred=yes | |
942f733f | 14797 | else |
5476a9a4 | 14798 | ac_cv_lib_krb_krb_get_cred=no |
942f733f | 14799 | fi |
5476a9a4 GM |
14800 | rm -f core conftest.err conftest.$ac_objext \ |
14801 | conftest$ac_exeext conftest.$ac_ext | |
14802 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 14803 | fi |
5476a9a4 GM |
14804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 |
14805 | $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } | |
14806 | if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : | |
14807 | have_krb=yes | |
14808 | else | |
14809 | have_krb=no | |
942f733f | 14810 | fi |
f199cab1 | 14811 | |
5476a9a4 GM |
14812 | if test $have_krb = yes; then |
14813 | KRB4LIB=-lkrb | |
14814 | LIBS="$KRB4LIB $LIBS" | |
14815 | ||
14816 | $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h | |
14817 | ||
14818 | fi | |
14819 | fi | |
f199cab1 GM |
14820 | fi |
14821 | ||
5476a9a4 GM |
14822 | if test "${with_kerberos5}" != no; then |
14823 | for ac_header in krb5.h | |
14824 | do : | |
14825 | ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" | |
14826 | if test "x$ac_cv_header_krb5_h" = x""yes; then : | |
14827 | cat >>confdefs.h <<_ACEOF | |
14828 | #define HAVE_KRB5_H 1 | |
14829 | _ACEOF | |
14830 | ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h> | |
14831 | " | |
14832 | if test "x$ac_cv_member_krb5_error_text" = x""yes; then : | |
14833 | ||
f199cab1 | 14834 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 14835 | #define HAVE_KRB5_ERROR_TEXT 1 |
f199cab1 GM |
14836 | _ACEOF |
14837 | ||
14838 | ||
5476a9a4 GM |
14839 | fi |
14840 | ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h> | |
14841 | " | |
14842 | if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : | |
f199cab1 | 14843 | |
5476a9a4 GM |
14844 | cat >>confdefs.h <<_ACEOF |
14845 | #define HAVE_KRB5_ERROR_E_TEXT 1 | |
14846 | _ACEOF | |
f199cab1 GM |
14847 | |
14848 | ||
5476a9a4 | 14849 | fi |
f199cab1 | 14850 | |
5476a9a4 | 14851 | fi |
f199cab1 | 14852 | |
5476a9a4 | 14853 | done |
f199cab1 | 14854 | |
5476a9a4 GM |
14855 | else |
14856 | for ac_header in des.h | |
14857 | do : | |
14858 | ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" | |
14859 | if test "x$ac_cv_header_des_h" = x""yes; then : | |
14860 | cat >>confdefs.h <<_ACEOF | |
14861 | #define HAVE_DES_H 1 | |
14862 | _ACEOF | |
f199cab1 | 14863 | |
5476a9a4 GM |
14864 | else |
14865 | for ac_header in kerberosIV/des.h | |
14866 | do : | |
14867 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" | |
14868 | if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : | |
14869 | cat >>confdefs.h <<_ACEOF | |
14870 | #define HAVE_KERBEROSIV_DES_H 1 | |
14871 | _ACEOF | |
f199cab1 | 14872 | |
5476a9a4 GM |
14873 | else |
14874 | for ac_header in kerberos/des.h | |
14875 | do : | |
14876 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" | |
14877 | if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : | |
14878 | cat >>confdefs.h <<_ACEOF | |
14879 | #define HAVE_KERBEROS_DES_H 1 | |
14880 | _ACEOF | |
f199cab1 | 14881 | |
5476a9a4 | 14882 | fi |
f199cab1 | 14883 | |
5476a9a4 GM |
14884 | done |
14885 | ||
14886 | fi | |
14887 | ||
14888 | done | |
14889 | ||
14890 | fi | |
14891 | ||
14892 | done | |
14893 | ||
14894 | for ac_header in krb.h | |
f199cab1 | 14895 | do : |
5476a9a4 GM |
14896 | ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" |
14897 | if test "x$ac_cv_header_krb_h" = x""yes; then : | |
f199cab1 | 14898 | cat >>confdefs.h <<_ACEOF |
5476a9a4 GM |
14899 | #define HAVE_KRB_H 1 |
14900 | _ACEOF | |
14901 | ||
14902 | else | |
14903 | for ac_header in kerberosIV/krb.h | |
14904 | do : | |
14905 | ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" | |
14906 | if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : | |
14907 | cat >>confdefs.h <<_ACEOF | |
14908 | #define HAVE_KERBEROSIV_KRB_H 1 | |
14909 | _ACEOF | |
14910 | ||
14911 | else | |
14912 | for ac_header in kerberos/krb.h | |
14913 | do : | |
14914 | ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" | |
14915 | if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : | |
14916 | cat >>confdefs.h <<_ACEOF | |
14917 | #define HAVE_KERBEROS_KRB_H 1 | |
f199cab1 | 14918 | _ACEOF |
942f733f | 14919 | |
3e0be4ab | 14920 | fi |
942f733f | 14921 | |
f199cab1 GM |
14922 | done |
14923 | ||
5476a9a4 GM |
14924 | fi |
14925 | ||
14926 | done | |
14927 | ||
14928 | fi | |
14929 | ||
14930 | done | |
14931 | ||
14932 | fi | |
14933 | for ac_header in com_err.h | |
f199cab1 | 14934 | do : |
5476a9a4 GM |
14935 | ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" |
14936 | if test "x$ac_cv_header_com_err_h" = x""yes; then : | |
f199cab1 | 14937 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 14938 | #define HAVE_COM_ERR_H 1 |
f199cab1 GM |
14939 | _ACEOF |
14940 | ||
3e0be4ab | 14941 | fi |
f199cab1 | 14942 | |
5476a9a4 | 14943 | done |
3e0be4ab GM |
14944 | |
14945 | fi | |
14946 | ||
f199cab1 GM |
14947 | |
14948 | ||
14949 | ||
14950 | ||
f199cab1 GM |
14951 | |
14952 | ||
14953 | ||
14954 | ||
14955 | ||
5476a9a4 GM |
14956 | for ac_func in $ac_func_list |
14957 | do : | |
14958 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14959 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14960 | eval as_val=\$$as_ac_var | |
14961 | if test "x$as_val" = x""yes; then : | |
14962 | cat >>confdefs.h <<_ACEOF | |
14963 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14964 | _ACEOF | |
14965 | ||
14966 | fi | |
14967 | done | |
14968 | ||
f199cab1 GM |
14969 | |
14970 | ||
14971 | ||
5476a9a4 GM |
14972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 |
14973 | $as_echo_n "checking whether localtime caches TZ... " >&6; } | |
14974 | if test "${emacs_cv_localtime_cache+set}" = set; then : | |
14975 | $as_echo_n "(cached) " >&6 | |
14976 | else | |
14977 | if test x$ac_cv_func_tzset = xyes; then | |
14978 | if test "$cross_compiling" = yes; then : | |
14979 | # If we have tzset, assume the worst when cross-compiling. | |
14980 | emacs_cv_localtime_cache=yes | |
14981 | else | |
14982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14983 | /* end confdefs.h. */ | |
14984 | #include <time.h> | |
14985 | char TZ_GMT0[] = "TZ=GMT0"; | |
14986 | char TZ_PST8[] = "TZ=PST8"; | |
14987 | main() | |
14988 | { | |
14989 | time_t now = time ((time_t *) 0); | |
14990 | int hour_GMT0, hour_unset; | |
14991 | if (putenv (TZ_GMT0) != 0) | |
14992 | exit (1); | |
14993 | hour_GMT0 = localtime (&now)->tm_hour; | |
14994 | unsetenv("TZ"); | |
14995 | hour_unset = localtime (&now)->tm_hour; | |
14996 | if (putenv (TZ_PST8) != 0) | |
14997 | exit (1); | |
14998 | if (localtime (&now)->tm_hour == hour_GMT0) | |
14999 | exit (1); | |
15000 | unsetenv("TZ"); | |
15001 | if (localtime (&now)->tm_hour != hour_unset) | |
15002 | exit (1); | |
15003 | exit (0); | |
15004 | } | |
15005 | _ACEOF | |
15006 | if ac_fn_c_try_run "$LINENO"; then : | |
15007 | emacs_cv_localtime_cache=no | |
15008 | else | |
15009 | emacs_cv_localtime_cache=yes | |
15010 | fi | |
15011 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15012 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15013 | fi | |
f199cab1 | 15014 | |
5476a9a4 GM |
15015 | else |
15016 | # If we lack tzset, report that localtime does not cache TZ, | |
15017 | # since we can't invalidate the cache if we don't have tzset. | |
15018 | emacs_cv_localtime_cache=no | |
15019 | fi | |
15020 | fi | |
15021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 | |
15022 | $as_echo "$emacs_cv_localtime_cache" >&6; } | |
15023 | if test $emacs_cv_localtime_cache = yes; then | |
f199cab1 | 15024 | |
5476a9a4 | 15025 | $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h |
f199cab1 | 15026 | |
5476a9a4 | 15027 | fi |
f199cab1 | 15028 | |
5476a9a4 GM |
15029 | ok_so_far=yes |
15030 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" | |
15031 | if test "x$ac_cv_func_socket" = x""yes; then : | |
3e0be4ab | 15032 | |
5476a9a4 GM |
15033 | else |
15034 | ok_so_far=no | |
15035 | fi | |
f199cab1 | 15036 | |
5476a9a4 GM |
15037 | if test $ok_so_far = yes; then |
15038 | ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
15039 | if test "x$ac_cv_header_netinet_in_h" = x""yes; then : | |
f199cab1 | 15040 | |
5476a9a4 GM |
15041 | else |
15042 | ok_so_far=no | |
15043 | fi | |
f199cab1 GM |
15044 | |
15045 | ||
5476a9a4 GM |
15046 | fi |
15047 | if test $ok_so_far = yes; then | |
15048 | ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
15049 | if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : | |
f199cab1 | 15050 | |
5476a9a4 GM |
15051 | else |
15052 | ok_so_far=no | |
15053 | fi | |
f199cab1 GM |
15054 | |
15055 | ||
5476a9a4 GM |
15056 | fi |
15057 | if test $ok_so_far = yes; then | |
f199cab1 | 15058 | |
5476a9a4 | 15059 | $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h |
f199cab1 | 15060 | |
5476a9a4 | 15061 | fi |
f199cab1 | 15062 | |
5476a9a4 | 15063 | if test -f /usr/lpp/X11/bin/smt.exp; then |
942f733f | 15064 | |
5476a9a4 | 15065 | $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h |
942f733f | 15066 | |
942f733f | 15067 | fi |
3e0be4ab | 15068 | |
5476a9a4 GM |
15069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 |
15070 | $as_echo_n "checking whether system supports dynamic ptys... " >&6; } | |
15071 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
15072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
15073 | $as_echo "yes" >&6; } | |
15074 | ||
15075 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h | |
3e0be4ab | 15076 | |
5476a9a4 GM |
15077 | else |
15078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
15079 | $as_echo "no" >&6; } | |
15080 | fi | |
3e0be4ab | 15081 | |
bb7dce39 GM |
15082 | case $canonical in |
15083 | *-solaris2.4 | *-solaris2.4.*) | |
15084 | : ${ac_cv_func_vfork_works=no};; | |
15085 | esac | |
15086 | ||
5476a9a4 GM |
15087 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
15088 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
3e0be4ab | 15089 | |
5476a9a4 | 15090 | else |
3e0be4ab | 15091 | |
5476a9a4 GM |
15092 | cat >>confdefs.h <<_ACEOF |
15093 | #define pid_t int | |
15094 | _ACEOF | |
f199cab1 | 15095 | |
5476a9a4 | 15096 | fi |
f199cab1 | 15097 | |
5476a9a4 GM |
15098 | for ac_header in vfork.h |
15099 | do : | |
15100 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
15101 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
15102 | cat >>confdefs.h <<_ACEOF | |
15103 | #define HAVE_VFORK_H 1 | |
15104 | _ACEOF | |
f199cab1 | 15105 | |
5476a9a4 | 15106 | fi |
f199cab1 | 15107 | |
5476a9a4 | 15108 | done |
f199cab1 | 15109 | |
5476a9a4 GM |
15110 | for ac_func in fork vfork |
15111 | do : | |
15112 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
15113 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
15114 | eval as_val=\$$as_ac_var | |
15115 | if test "x$as_val" = x""yes; then : | |
15116 | cat >>confdefs.h <<_ACEOF | |
15117 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15118 | _ACEOF | |
f199cab1 | 15119 | |
5476a9a4 GM |
15120 | fi |
15121 | done | |
f199cab1 | 15122 | |
5476a9a4 GM |
15123 | if test "x$ac_cv_func_fork" = xyes; then |
15124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
15125 | $as_echo_n "checking for working fork... " >&6; } | |
15126 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
15127 | $as_echo_n "(cached) " >&6 | |
15128 | else | |
15129 | if test "$cross_compiling" = yes; then : | |
15130 | ac_cv_func_fork_works=cross | |
15131 | else | |
15132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15133 | /* end confdefs.h. */ | |
15134 | $ac_includes_default | |
15135 | int | |
15136 | main () | |
15137 | { | |
f199cab1 | 15138 | |
5476a9a4 GM |
15139 | /* By Ruediger Kuhlmann. */ |
15140 | return fork () < 0; | |
f199cab1 | 15141 | |
5476a9a4 GM |
15142 | ; |
15143 | return 0; | |
15144 | } | |
15145 | _ACEOF | |
15146 | if ac_fn_c_try_run "$LINENO"; then : | |
15147 | ac_cv_func_fork_works=yes | |
15148 | else | |
15149 | ac_cv_func_fork_works=no | |
15150 | fi | |
15151 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15152 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15153 | fi | |
f199cab1 | 15154 | |
5476a9a4 GM |
15155 | fi |
15156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
15157 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
f199cab1 | 15158 | |
5476a9a4 GM |
15159 | else |
15160 | ac_cv_func_fork_works=$ac_cv_func_fork | |
15161 | fi | |
15162 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15163 | case $host in | |
15164 | *-*-amigaos* | *-*-msdosdjgpp*) | |
15165 | # Override, as these systems have only a dummy fork() stub | |
15166 | ac_cv_func_fork_works=no | |
15167 | ;; | |
15168 | *) | |
15169 | ac_cv_func_fork_works=yes | |
15170 | ;; | |
15171 | esac | |
15172 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
15173 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
15174 | fi | |
15175 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15176 | if test "x$ac_cv_func_vfork" = xyes; then | |
15177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
15178 | $as_echo_n "checking for working vfork... " >&6; } | |
15179 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
f199cab1 GM |
15180 | $as_echo_n "(cached) " >&6 |
15181 | else | |
15182 | if test "$cross_compiling" = yes; then : | |
5476a9a4 | 15183 | ac_cv_func_vfork_works=cross |
f199cab1 GM |
15184 | else |
15185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15186 | /* end confdefs.h. */ | |
5476a9a4 GM |
15187 | /* Thanks to Paul Eggert for this test. */ |
15188 | $ac_includes_default | |
15189 | #include <sys/wait.h> | |
15190 | #ifdef HAVE_VFORK_H | |
15191 | # include <vfork.h> | |
f199cab1 | 15192 | #endif |
5476a9a4 GM |
15193 | /* On some sparc systems, changes by the child to local and incoming |
15194 | argument registers are propagated back to the parent. The compiler | |
15195 | is told about this with #include <vfork.h>, but some compilers | |
15196 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
15197 | static variable whose address is put into a register that is | |
15198 | clobbered by the vfork. */ | |
15199 | static void | |
15200 | #ifdef __cplusplus | |
15201 | sparc_address_test (int arg) | |
15202 | # else | |
15203 | sparc_address_test (arg) int arg; | |
f199cab1 | 15204 | #endif |
5476a9a4 GM |
15205 | { |
15206 | static pid_t child; | |
15207 | if (!child) { | |
15208 | child = vfork (); | |
15209 | if (child < 0) { | |
15210 | perror ("vfork"); | |
15211 | _exit(2); | |
15212 | } | |
15213 | if (!child) { | |
15214 | arg = getpid(); | |
15215 | write(-1, "", 0); | |
15216 | _exit (arg); | |
15217 | } | |
15218 | } | |
15219 | } | |
f199cab1 | 15220 | |
5476a9a4 GM |
15221 | int |
15222 | main () | |
15223 | { | |
15224 | pid_t parent = getpid (); | |
15225 | pid_t child; | |
f199cab1 | 15226 | |
5476a9a4 | 15227 | sparc_address_test (0); |
f199cab1 | 15228 | |
5476a9a4 | 15229 | child = vfork (); |
3e0be4ab | 15230 | |
5476a9a4 GM |
15231 | if (child == 0) { |
15232 | /* Here is another test for sparc vfork register problems. This | |
15233 | test uses lots of local variables, at least as many local | |
15234 | variables as main has allocated so far including compiler | |
15235 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
15236 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
15237 | reuse the register of parent for one of the local variables, | |
15238 | since it will think that parent can't possibly be used any more | |
15239 | in this routine. Assigning to the local variable will thus | |
15240 | munge parent in the parent process. */ | |
15241 | pid_t | |
15242 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
15243 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
15244 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
15245 | use the same hardware register for all 8 local variables. */ | |
15246 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
15247 | || p != p5 || p != p6 || p != p7) | |
15248 | _exit(1); | |
3e0be4ab | 15249 | |
5476a9a4 GM |
15250 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
15251 | from child file descriptors. If the child closes a descriptor | |
15252 | before it execs or exits, this munges the parent's descriptor | |
15253 | as well. Test for this by closing stdout in the child. */ | |
15254 | _exit(close(fileno(stdout)) != 0); | |
15255 | } else { | |
15256 | int status; | |
15257 | struct stat st; | |
3e0be4ab | 15258 | |
5476a9a4 GM |
15259 | while (wait(&status) != child) |
15260 | ; | |
15261 | return ( | |
15262 | /* Was there some problem with vforking? */ | |
15263 | child < 0 | |
3e0be4ab | 15264 | |
5476a9a4 GM |
15265 | /* Did the child fail? (This shouldn't happen.) */ |
15266 | || status | |
15267 | ||
15268 | /* Did the vfork/compiler bug occur? */ | |
15269 | || parent != getpid() | |
15270 | ||
15271 | /* Did the file descriptor bug occur? */ | |
15272 | || fstat(fileno(stdout), &st) != 0 | |
15273 | ); | |
15274 | } | |
f199cab1 | 15275 | } |
5476a9a4 GM |
15276 | _ACEOF |
15277 | if ac_fn_c_try_run "$LINENO"; then : | |
15278 | ac_cv_func_vfork_works=yes | |
15279 | else | |
15280 | ac_cv_func_vfork_works=no | |
15281 | fi | |
15282 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15283 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15284 | fi | |
15285 | ||
15286 | fi | |
15287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
15288 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
15289 | ||
15290 | fi; | |
15291 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15292 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15293 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
15294 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
15295 | fi | |
15296 | ||
15297 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
3e0be4ab | 15298 | |
5476a9a4 | 15299 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
3e0be4ab | 15300 | |
5476a9a4 | 15301 | else |
3e0be4ab | 15302 | |
5476a9a4 | 15303 | $as_echo "#define vfork fork" >>confdefs.h |
942f733f | 15304 | |
5476a9a4 GM |
15305 | fi |
15306 | if test "x$ac_cv_func_fork_works" = xyes; then | |
942f733f | 15307 | |
5476a9a4 | 15308 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
942f733f | 15309 | |
5476a9a4 | 15310 | fi |
f199cab1 | 15311 | |
f199cab1 | 15312 | |
5476a9a4 GM |
15313 | for ac_func in snprintf |
15314 | do : | |
15315 | ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" | |
15316 | if test "x$ac_cv_func_snprintf" = x""yes; then : | |
15317 | cat >>confdefs.h <<_ACEOF | |
15318 | #define HAVE_SNPRINTF 1 | |
15319 | _ACEOF | |
15320 | ||
15321 | fi | |
15322 | done | |
15323 | ||
942f733f | 15324 | |
5476a9a4 GM |
15325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
15326 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
15327 | if test "${emacs_cv_langinfo_codeset+set}" = set; then : | |
15328 | $as_echo_n "(cached) " >&6 | |
15329 | else | |
15330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15331 | /* end confdefs.h. */ | |
15332 | #include <langinfo.h> | |
3e0be4ab GM |
15333 | int |
15334 | main () | |
15335 | { | |
5476a9a4 GM |
15336 | char* cs = nl_langinfo(CODESET); |
15337 | ; | |
15338 | return 0; | |
15339 | } | |
15340 | _ACEOF | |
15341 | if ac_fn_c_try_link "$LINENO"; then : | |
15342 | emacs_cv_langinfo_codeset=yes | |
15343 | else | |
15344 | emacs_cv_langinfo_codeset=no | |
15345 | fi | |
15346 | rm -f core conftest.err conftest.$ac_objext \ | |
15347 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 15348 | |
5476a9a4 GM |
15349 | fi |
15350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 | |
15351 | $as_echo "$emacs_cv_langinfo_codeset" >&6; } | |
15352 | if test $emacs_cv_langinfo_codeset = yes; then | |
f199cab1 | 15353 | |
5476a9a4 | 15354 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
f199cab1 | 15355 | |
5476a9a4 | 15356 | fi |
f199cab1 | 15357 | |
5476a9a4 GM |
15358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 |
15359 | $as_echo_n "checking for mbstate_t... " >&6; } | |
15360 | if test "${ac_cv_type_mbstate_t+set}" = set; then : | |
15361 | $as_echo_n "(cached) " >&6 | |
15362 | else | |
15363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15364 | /* end confdefs.h. */ | |
15365 | $ac_includes_default | |
15366 | # include <wchar.h> | |
15367 | int | |
15368 | main () | |
15369 | { | |
15370 | mbstate_t x; return sizeof x; | |
15371 | ; | |
15372 | return 0; | |
3e0be4ab | 15373 | } |
942f733f | 15374 | _ACEOF |
5476a9a4 GM |
15375 | if ac_fn_c_try_compile "$LINENO"; then : |
15376 | ac_cv_type_mbstate_t=yes | |
3e0be4ab | 15377 | else |
5476a9a4 | 15378 | ac_cv_type_mbstate_t=no |
942f733f | 15379 | fi |
5476a9a4 | 15380 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 15381 | fi |
5476a9a4 GM |
15382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 |
15383 | $as_echo "$ac_cv_type_mbstate_t" >&6; } | |
15384 | if test $ac_cv_type_mbstate_t = yes; then | |
f199cab1 | 15385 | |
5476a9a4 | 15386 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h |
f199cab1 | 15387 | |
5476a9a4 | 15388 | else |
f199cab1 | 15389 | |
5476a9a4 | 15390 | $as_echo "#define mbstate_t int" >>confdefs.h |
f199cab1 | 15391 | |
5476a9a4 GM |
15392 | fi |
15393 | ||
15394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 | |
15395 | $as_echo_n "checking for C restricted array declarations... " >&6; } | |
15396 | if test "${emacs_cv_c_restrict_arr+set}" = set; then : | |
15397 | $as_echo_n "(cached) " >&6 | |
15398 | else | |
15399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15400 | /* end confdefs.h. */ | |
15401 | void fred (int x[__restrict]); | |
15402 | int | |
15403 | main () | |
15404 | { | |
15405 | ||
15406 | ; | |
15407 | return 0; | |
15408 | } | |
15409 | _ACEOF | |
15410 | if ac_fn_c_try_compile "$LINENO"; then : | |
15411 | emacs_cv_c_restrict_arr=yes | |
15412 | else | |
15413 | emacs_cv_c_restrict_arr=no | |
15414 | fi | |
15415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15416 | fi | |
15417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 | |
15418 | $as_echo "$emacs_cv_c_restrict_arr" >&6; } | |
15419 | if test "$emacs_cv_c_restrict_arr" = yes; then | |
f199cab1 | 15420 | |
5476a9a4 | 15421 | $as_echo "#define __restrict_arr __restrict" >>confdefs.h |
f199cab1 | 15422 | |
5476a9a4 | 15423 | fi |
f199cab1 GM |
15424 | |
15425 | ||
15426 | ||
8ad96b1d GM |
15427 | $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h |
15428 | ||
15429 | ||
15430 | ||
5476a9a4 | 15431 | $as_echo "#define CLASH_DETECTION 1" >>confdefs.h |
f199cab1 GM |
15432 | |
15433 | ||
5476a9a4 | 15434 | ## Note: PTYs are broken on darwin <6. Use at your own risk. |
f199cab1 | 15435 | |
5476a9a4 | 15436 | $as_echo "#define HAVE_PTYS 1" >>confdefs.h |
f199cab1 GM |
15437 | |
15438 | ||
15439 | ||
5476a9a4 | 15440 | $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h |
f199cab1 | 15441 | |
942f733f | 15442 | |
942f733f | 15443 | |
6b10626d GM |
15444 | |
15445 | ||
8ad96b1d GM |
15446 | $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h |
15447 | ||
15448 | ||
15449 | ||
15450 | $as_echo "#define SEPCHAR ':'" >>confdefs.h | |
15451 | ||
15452 | ||
15453 | ||
15454 | $as_echo "#define subprocesses 1" >>confdefs.h | |
15455 | ||
15456 | ||
15457 | ||
15458 | $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h | |
15459 | ||
15460 | ||
15461 | ||
942f733f | 15462 | |
9ff736dc GM |
15463 | $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h |
15464 | ||
15465 | ||
15466 | ||
f199cab1 | 15467 | |
6b10626d GM |
15468 | |
15469 | $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h | |
15470 | ||
15471 | ||
15472 | ||
15473 | $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h | |
15474 | ||
15475 | ||
15476 | ||
15477 | $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h | |
15478 | ||
15479 | ||
15480 | ||
15481 | ||
15482 | ||
5476a9a4 GM |
15483 | case $opsys in |
15484 | aix4-2) | |
15485 | if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then | |
15486 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 15487 | |
5476a9a4 GM |
15488 | fi |
15489 | ;; | |
f199cab1 | 15490 | |
5476a9a4 GM |
15491 | hpux*) |
15492 | $as_echo "#define NO_EDITRES 1" >>confdefs.h | |
f199cab1 | 15493 | |
5476a9a4 GM |
15494 | ;; |
15495 | esac | |
f199cab1 GM |
15496 | |
15497 | ||
5476a9a4 | 15498 | case $opsys in |
5476a9a4 | 15499 | irix6-5 | sol2* | unixware ) |
f199cab1 | 15500 | |
5476a9a4 | 15501 | $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h |
f199cab1 | 15502 | |
5476a9a4 GM |
15503 | ;; |
15504 | esac | |
f199cab1 | 15505 | |
4fa92495 | 15506 | emacs_broken_SIGIO=no |
f199cab1 | 15507 | |
5476a9a4 GM |
15508 | case $opsys in |
15509 | hpux* | irix6-5 | openbsd | sol2* | unixware ) | |
4fa92495 | 15510 | emacs_broken_SIGIO=yes |
5476a9a4 | 15511 | ;; |
f199cab1 | 15512 | |
5476a9a4 | 15513 | aix4-2) |
f199cab1 | 15514 | |
5476a9a4 | 15515 | $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h |
067d23c9 | 15516 | |
5476a9a4 | 15517 | ;; |
067d23c9 | 15518 | |
5476a9a4 | 15519 | freebsd) |
f199cab1 | 15520 | |
5476a9a4 | 15521 | $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h |
f199cab1 | 15522 | |
5476a9a4 | 15523 | ;; |
5476a9a4 | 15524 | esac |
f199cab1 | 15525 | |
5476a9a4 GM |
15526 | case $opsys in |
15527 | gnu-* | sol2-10 ) | |
f199cab1 | 15528 | |
5476a9a4 | 15529 | $as_echo "#define HAVE_PROCFS 1" >>confdefs.h |
f199cab1 | 15530 | |
5476a9a4 GM |
15531 | ;; |
15532 | esac | |
f199cab1 | 15533 | |
5476a9a4 | 15534 | case $opsys in |
87e1a811 | 15535 | darwin | dragonfly | freebsd | netbsd | openbsd ) |
f199cab1 | 15536 | |
5476a9a4 | 15537 | $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h |
f199cab1 | 15538 | |
5476a9a4 GM |
15539 | ;; |
15540 | esac | |
f199cab1 | 15541 | |
5476a9a4 GM |
15542 | case $opsys in |
15543 | netbsd | openbsd) sound_device="/dev/audio" ;; | |
15544 | *) sound_device="/dev/dsp" ;; | |
15545 | esac | |
f199cab1 | 15546 | |
f199cab1 | 15547 | |
5476a9a4 GM |
15548 | cat >>confdefs.h <<_ACEOF |
15549 | #define DEFAULT_SOUND_DEVICE "$sound_device" | |
15550 | _ACEOF | |
f199cab1 GM |
15551 | |
15552 | ||
15553 | ||
5476a9a4 GM |
15554 | case $opsys in |
15555 | darwin | gnu-linux | gnu-kfreebsd ) | |
f199cab1 | 15556 | |
5476a9a4 | 15557 | $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h |
f199cab1 | 15558 | |
5476a9a4 GM |
15559 | ;; |
15560 | esac | |
f199cab1 | 15561 | |
f199cab1 | 15562 | |
5476a9a4 GM |
15563 | case $opsys in |
15564 | cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) | |
f199cab1 | 15565 | |
5476a9a4 | 15566 | $as_echo "#define NARROWPROTO 1" >>confdefs.h |
067d23c9 | 15567 | |
5476a9a4 GM |
15568 | ;; |
15569 | esac | |
f199cab1 GM |
15570 | |
15571 | ||
067d23c9 | 15572 | |
1f5d53eb PE |
15573 | |
15574 | ||
f199cab1 | 15575 | |
f199cab1 | 15576 | |
7d2a1c5e | 15577 | |
5476a9a4 GM |
15578 | case $opsys in |
15579 | aix4-2 ) | |
a09508f2 | 15580 | $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h |
f199cab1 | 15581 | |
a09508f2 | 15582 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h |
f199cab1 | 15583 | |
a09508f2 | 15584 | $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h |
7d2a1c5e | 15585 | |
5476a9a4 | 15586 | ;; |
7d2a1c5e | 15587 | |
5476a9a4 | 15588 | cygwin ) |
a09508f2 | 15589 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 15590 | |
843f2634 | 15591 | $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 | 15592 | |
a09508f2 | 15593 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
7d2a1c5e | 15594 | |
a09508f2 | 15595 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15596 | |
5476a9a4 | 15597 | ;; |
f199cab1 | 15598 | |
1146da8d | 15599 | darwin ) |
a09508f2 | 15600 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
7d2a1c5e | 15601 | |
5476a9a4 | 15602 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
7d2a1c5e | 15603 | |
a09508f2 | 15604 | $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 | 15605 | |
a09508f2 | 15606 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15607 | |
a09508f2 | 15608 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15609 | |
5476a9a4 | 15610 | ;; |
f199cab1 | 15611 | |
1146da8d | 15612 | gnu | openbsd ) |
5476a9a4 | 15613 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h |
f199cab1 | 15614 | |
5476a9a4 | 15615 | ;; |
f199cab1 | 15616 | |
87e1a811 | 15617 | gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd ) |
5476a9a4 | 15618 | if test "x$ac_cv_func_grantpt" = xyes; then |
f199cab1 | 15619 | |
5476a9a4 | 15620 | $as_echo "#define UNIX98_PTYS 1" >>confdefs.h |
f199cab1 | 15621 | |
a09508f2 | 15622 | $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h |
f199cab1 | 15623 | |
843f2634 | 15624 | $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) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h |
f199cab1 | 15625 | |
1146da8d GM |
15626 | if test "x$ac_cv_func_posix_openpt" = xyes; then |
15627 | $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h | |
15628 | ||
15629 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h | |
15630 | ||
15631 | elif test "x$ac_cv_func_getpt" = xyes; then | |
5476a9a4 | 15632 | $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h |
f199cab1 | 15633 | |
a09508f2 | 15634 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15635 | |
5476a9a4 | 15636 | else |
a09508f2 | 15637 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
f199cab1 | 15638 | |
5476a9a4 GM |
15639 | fi |
15640 | else | |
15641 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 15642 | |
5476a9a4 GM |
15643 | fi |
15644 | ;; | |
f199cab1 | 15645 | |
5476a9a4 GM |
15646 | hpux*) |
15647 | $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h | |
f199cab1 | 15648 | |
a09508f2 | 15649 | $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 15650 | |
a09508f2 | 15651 | $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h |
f199cab1 | 15652 | |
5476a9a4 | 15653 | ;; |
f199cab1 | 15654 | |
5476a9a4 GM |
15655 | irix6-5 ) |
15656 | $as_echo "#define PTY_ITERATION /**/" >>confdefs.h | |
f199cab1 | 15657 | |
5476a9a4 | 15658 | $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h |
f199cab1 | 15659 | |
e4184a20 | 15660 | $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 | 15661 | |
a09508f2 | 15662 | $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15663 | |
a09508f2 | 15664 | $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h |
f199cab1 | 15665 | |
5476a9a4 | 15666 | ;; |
f199cab1 | 15667 | |
5476a9a4 | 15668 | sol2* ) |
e4184a20 | 15669 | $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, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h |
f199cab1 | 15670 | |
5476a9a4 | 15671 | ;; |
f199cab1 | 15672 | |
5476a9a4 | 15673 | unixware ) |
e4184a20 | 15674 | $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, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h |
5476a9a4 GM |
15675 | |
15676 | ;; | |
15677 | esac | |
15678 | ||
15679 | ||
15680 | case $opsys in | |
15681 | sol2* | unixware ) | |
15682 | $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h | |
15683 | ||
a09508f2 | 15684 | $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h |
5476a9a4 GM |
15685 | |
15686 | ||
15687 | $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 | |
15688 | ||
15689 | ;; | |
15690 | esac | |
15691 | ||
15692 | ||
15693 | ||
15694 | ||
15695 | case $opsys in | |
87e1a811 | 15696 | aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin ) |
5476a9a4 GM |
15697 | $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h |
15698 | ||
15699 | ;; | |
15700 | ||
15701 | gnu-linux | gnu-kfreebsd ) | |
15702 | ||
15703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5 | |
15704 | $as_echo_n "checking for signals via characters... " >&6; } | |
15705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1f5d53eb | 15706 | /* end confdefs.h. */ |
5476a9a4 GM |
15707 | |
15708 | #include <linux/version.h> | |
15709 | #if LINUX_VERSION_CODE < 0x20400 | |
15710 | # error "Linux version too old" | |
15711 | #endif | |
15712 | ||
3e0be4ab GM |
15713 | int |
15714 | main () | |
15715 | { | |
f199cab1 | 15716 | |
3e0be4ab GM |
15717 | ; |
15718 | return 0; | |
15719 | } | |
067d23c9 | 15720 | _ACEOF |
5476a9a4 GM |
15721 | if ac_fn_c_try_cpp "$LINENO"; then : |
15722 | emacs_signals_via_chars=yes | |
1f5d53eb | 15723 | else |
5476a9a4 | 15724 | emacs_signals_via_chars=no |
067d23c9 | 15725 | fi |
5476a9a4 | 15726 | rm -f conftest.err conftest.$ac_ext |
067d23c9 | 15727 | |
5476a9a4 GM |
15728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5 |
15729 | $as_echo "$emacs_signals_via_chars" >&6; } | |
15730 | test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h | |
15731 | ||
15732 | ;; | |
15733 | esac | |
15734 | ||
15735 | ||
15736 | ||
15737 | ||
5476a9a4 | 15738 | case $opsys in |
0f63df79 | 15739 | aix*) |
ce9ae7ca | 15740 | $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h |
0f63df79 GM |
15741 | |
15742 | ;; | |
5476a9a4 | 15743 | hpux*) |
ce9ae7ca | 15744 | $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h |
067d23c9 | 15745 | |
5476a9a4 GM |
15746 | ;; |
15747 | irix6-5) | |
5476a9a4 | 15748 | $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h |
067d23c9 | 15749 | |
5476a9a4 GM |
15750 | ;; |
15751 | esac | |
067d23c9 | 15752 | |
1f5d53eb | 15753 | |
1f5d53eb | 15754 | |
067d23c9 | 15755 | |
5476a9a4 GM |
15756 | case $opsys in |
15757 | darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h | |
15758 | ;; | |
f199cab1 | 15759 | |
87e1a811 | 15760 | gnu | dragonfly | freebsd | netbsd | openbsd ) |
f199cab1 | 15761 | |
5476a9a4 | 15762 | $as_echo "#define TABDLY OXTABS" >>confdefs.h |
f199cab1 | 15763 | |
5476a9a4 | 15764 | $as_echo "#define TAB3 OXTABS" >>confdefs.h |
f199cab1 | 15765 | |
5476a9a4 | 15766 | ;; |
f199cab1 | 15767 | |
5476a9a4 | 15768 | gnu-linux | gnu-kfreebsd ) |
5476a9a4 GM |
15769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15770 | /* end confdefs.h. */ | |
3e0be4ab | 15771 | |
5476a9a4 GM |
15772 | #ifndef __ia64__ |
15773 | # error "not ia64" | |
15774 | #endif | |
067d23c9 | 15775 | |
5476a9a4 GM |
15776 | int |
15777 | main () | |
15778 | { | |
3e0be4ab | 15779 | |
5476a9a4 GM |
15780 | ; |
15781 | return 0; | |
15782 | } | |
15783 | _ACEOF | |
15784 | if ac_fn_c_try_cpp "$LINENO"; then : | |
f199cab1 | 15785 | |
5476a9a4 | 15786 | $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 | 15787 | |
3e0be4ab | 15788 | fi |
5476a9a4 GM |
15789 | rm -f conftest.err conftest.$ac_ext |
15790 | ;; | |
067d23c9 | 15791 | |
5476a9a4 | 15792 | hpux*) |
3e0be4ab | 15793 | |
5476a9a4 | 15794 | $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h |
3e0be4ab | 15795 | |
5476a9a4 | 15796 | ;; |
5476a9a4 | 15797 | esac |
3e0be4ab GM |
15798 | |
15799 | ||
f199cab1 | 15800 | |
e700232f GM |
15801 | |
15802 | ||
5476a9a4 | 15803 | case $opsys in |
5476a9a4 GM |
15804 | gnu-linux | gnu-kfreebsd ) |
15805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 15806 | /* end confdefs.h. */ |
f199cab1 | 15807 | |
5476a9a4 GM |
15808 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
15809 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | |
15810 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | |
15811 | || defined __ia64__ || defined __sh__ | |
15812 | /* ok */ | |
15813 | #else | |
15814 | # error "setjmp not known to work on this arch" | |
15815 | #endif | |
15816 | ||
f199cab1 GM |
15817 | int |
15818 | main () | |
1fd182f0 | 15819 | { |
5476a9a4 | 15820 | |
f199cab1 GM |
15821 | ; |
15822 | return 0; | |
1fd182f0 PE |
15823 | } |
15824 | _ACEOF | |
5476a9a4 GM |
15825 | if ac_fn_c_try_cpp "$LINENO"; then : |
15826 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
f199cab1 | 15827 | |
1f5d53eb | 15828 | fi |
5476a9a4 GM |
15829 | rm -f conftest.err conftest.$ac_ext |
15830 | ;; | |
15831 | esac | |
1fd182f0 | 15832 | |
f199cab1 | 15833 | |
5476a9a4 GM |
15834 | if test x$GCC = xyes; then |
15835 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h | |
15836 | ||
1fd182f0 | 15837 | else |
5476a9a4 | 15838 | case $opsys in |
87e1a811 | 15839 | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) |
5476a9a4 | 15840 | $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h |
1fd182f0 | 15841 | |
5476a9a4 GM |
15842 | ;; |
15843 | esac | |
15844 | fi | |
6ec9a5a7 GM |
15845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5 |
15846 | $as_echo_n "checking for _setjmp... " >&6; } | |
15847 | if test "${emacs_cv_func__setjmp+set}" = set; then : | |
15848 | $as_echo_n "(cached) " >&6 | |
15849 | else | |
15850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15851 | /* end confdefs.h. */ | |
15852 | #include <setjmp.h> | |
1fd182f0 | 15853 | |
6ec9a5a7 GM |
15854 | int |
15855 | main () | |
15856 | { | |
15857 | jmp_buf j; | |
15858 | if (! _setjmp (j)) | |
15859 | _longjmp (j, 1); | |
15860 | ; | |
15861 | return 0; | |
15862 | } | |
15863 | _ACEOF | |
15864 | if ac_fn_c_try_link "$LINENO"; then : | |
15865 | emacs_cv_func__setjmp=yes | |
15866 | else | |
15867 | emacs_cv_func__setjmp=no | |
15868 | fi | |
15869 | rm -f core conftest.err conftest.$ac_objext \ | |
15870 | conftest$ac_exeext conftest.$ac_ext | |
15871 | fi | |
15872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 | |
15873 | $as_echo "$emacs_cv_func__setjmp" >&6; } | |
e2d8f316 | 15874 | if test $emacs_cv_func__setjmp = yes; then |
906debc3 | 15875 | |
e2d8f316 | 15876 | $as_echo "#define HAVE__SETJMP 1" >>confdefs.h |
906debc3 | 15877 | |
e2d8f316 GM |
15878 | else |
15879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 | |
15880 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
15881 | if test "${emacs_cv_func_sigsetjmp+set}" = set; then : | |
15882 | $as_echo_n "(cached) " >&6 | |
15883 | else | |
15884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15885 | /* end confdefs.h. */ | |
15886 | #include <setjmp.h> | |
15887 | ||
15888 | int | |
15889 | main () | |
15890 | { | |
15891 | sigjmp_buf j; | |
15892 | if (! sigsetjmp (j, 1)) | |
15893 | siglongjmp (j, 1); | |
15894 | ; | |
15895 | return 0; | |
15896 | } | |
15897 | _ACEOF | |
15898 | if ac_fn_c_try_link "$LINENO"; then : | |
15899 | emacs_cv_func_sigsetjmp=yes | |
15900 | else | |
15901 | emacs_cv_func_sigsetjmp=no | |
15902 | fi | |
15903 | rm -f core conftest.err conftest.$ac_objext \ | |
15904 | conftest$ac_exeext conftest.$ac_ext | |
15905 | fi | |
15906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5 | |
15907 | $as_echo "$emacs_cv_func_sigsetjmp" >&6; } | |
15908 | if test $emacs_cv_func_sigsetjmp = yes; then | |
906debc3 | 15909 | |
e2d8f316 | 15910 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
906debc3 | 15911 | |
e2d8f316 | 15912 | fi |
6ec9a5a7 GM |
15913 | fi |
15914 | ||
15915 | case $opsys in | |
15916 | sol2* | unixware ) | |
906debc3 GM |
15917 | |
15918 | $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h | |
15919 | ||
15920 | ;; | |
15921 | esac | |
15922 | ||
906debc3 | 15923 | |
5476a9a4 GM |
15924 | case $opsys in |
15925 | hpux* | sol2* ) | |
1f5d53eb | 15926 | |
5476a9a4 | 15927 | $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h |
1f5d53eb | 15928 | |
5476a9a4 GM |
15929 | ;; |
15930 | esac | |
1f5d53eb | 15931 | |
1f5d53eb | 15932 | |
4fda9c95 | 15933 | |
3e0be4ab | 15934 | |
4fda9c95 | 15935 | |
4fda9c95 | 15936 | |
f199cab1 | 15937 | |
906debc3 | 15938 | |
5476a9a4 GM |
15939 | case $opsys in |
15940 | aix4-2) | |
15941 | $as_echo "#define USG /**/" >>confdefs.h | |
15942 | ||
15943 | $as_echo "#define USG5 /**/" >>confdefs.h | |
15944 | ||
15945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15946 | /* end confdefs.h. */ | |
15947 | ||
15948 | #ifndef _AIX | |
15949 | # error "_AIX not defined" | |
15950 | #endif | |
f199cab1 | 15951 | |
4fda9c95 GM |
15952 | int |
15953 | main () | |
15954 | { | |
3e0be4ab | 15955 | |
4fda9c95 GM |
15956 | ; |
15957 | return 0; | |
15958 | } | |
15959 | _ACEOF | |
5476a9a4 | 15960 | if ac_fn_c_try_cpp "$LINENO"; then : |
4fda9c95 | 15961 | |
3e0be4ab | 15962 | else |
4fda9c95 | 15963 | |
5476a9a4 | 15964 | $as_echo "#define _AIX /**/" >>confdefs.h |
3e0be4ab | 15965 | |
5476a9a4 GM |
15966 | fi |
15967 | rm -f conftest.err conftest.$ac_ext | |
15968 | ;; | |
4fda9c95 | 15969 | |
5476a9a4 | 15970 | cygwin) |
3e0be4ab | 15971 | |
5476a9a4 | 15972 | $as_echo "#define CYGWIN 1" >>confdefs.h |
f199cab1 | 15973 | |
5476a9a4 | 15974 | ;; |
f199cab1 | 15975 | |
5476a9a4 | 15976 | darwin) |
f199cab1 | 15977 | |
5476a9a4 | 15978 | $as_echo "#define DARWIN_OS /**/" >>confdefs.h |
f199cab1 | 15979 | |
5476a9a4 | 15980 | ;; |
4fda9c95 | 15981 | |
5476a9a4 GM |
15982 | gnu-linux | gnu-kfreebsd ) |
15983 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 15984 | |
f199cab1 | 15985 | |
5476a9a4 | 15986 | $as_echo "#define GNU_LINUX /**/" >>confdefs.h |
4fda9c95 | 15987 | |
5476a9a4 | 15988 | ;; |
4fda9c95 | 15989 | |
5476a9a4 GM |
15990 | hpux*) |
15991 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 15992 | |
5476a9a4 | 15993 | $as_echo "#define USG5 /**/" >>confdefs.h |
697210c4 | 15994 | |
4717915f | 15995 | |
5476a9a4 | 15996 | $as_echo "#define HPUX /**/" >>confdefs.h |
697210c4 | 15997 | |
5476a9a4 | 15998 | ;; |
697210c4 | 15999 | |
5476a9a4 GM |
16000 | irix6-5) |
16001 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 16002 | |
5476a9a4 | 16003 | $as_echo "#define USG5 /**/" >>confdefs.h |
f199cab1 | 16004 | |
906debc3 GM |
16005 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16006 | ||
f199cab1 | 16007 | |
5476a9a4 | 16008 | $as_echo "#define IRIX6_5 /**/" >>confdefs.h |
f199cab1 | 16009 | |
5476a9a4 | 16010 | ;; |
f199cab1 | 16011 | |
5476a9a4 GM |
16012 | sol2*) |
16013 | $as_echo "#define USG /**/" >>confdefs.h | |
4fda9c95 | 16014 | |
5476a9a4 | 16015 | $as_echo "#define USG5 /**/" >>confdefs.h |
4fda9c95 | 16016 | |
906debc3 GM |
16017 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16018 | ||
4fda9c95 | 16019 | |
5476a9a4 | 16020 | $as_echo "#define SOLARIS2 /**/" >>confdefs.h |
f199cab1 | 16021 | |
5476a9a4 | 16022 | ;; |
f199cab1 | 16023 | |
5476a9a4 GM |
16024 | unixware) |
16025 | $as_echo "#define USG /**/" >>confdefs.h | |
f199cab1 | 16026 | |
5476a9a4 | 16027 | $as_echo "#define USG5 /**/" >>confdefs.h |
f199cab1 | 16028 | |
906debc3 GM |
16029 | $as_echo "#define USG5_4 /**/" >>confdefs.h |
16030 | ||
5476a9a4 GM |
16031 | ;; |
16032 | esac | |
f199cab1 | 16033 | |
4fa92495 GM |
16034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5 |
16035 | $as_echo_n "checking for usable FIONREAD... " >&6; } | |
16036 | if test "${emacs_cv_usable_FIONREAD+set}" = set; then : | |
16037 | $as_echo_n "(cached) " >&6 | |
16038 | else | |
16039 | case $opsys in | |
16040 | aix4-2) | |
16041 | emacs_cv_usable_FIONREAD=no | |
16042 | ;; | |
16043 | ||
16044 | *) | |
16045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16046 | /* end confdefs.h. */ | |
16047 | #include <sys/types.h> | |
16048 | #include <sys/ioctl.h> | |
16049 | #ifdef USG5_4 | |
16050 | # include <sys/filio.h> | |
16051 | #endif | |
16052 | ||
16053 | int | |
16054 | main () | |
16055 | { | |
16056 | int foo = ioctl (0, FIONREAD, &foo); | |
16057 | ; | |
16058 | return 0; | |
16059 | } | |
16060 | _ACEOF | |
16061 | if ac_fn_c_try_compile "$LINENO"; then : | |
16062 | emacs_cv_usable_FIONREAD=yes | |
16063 | else | |
16064 | emacs_cv_usable_FIONREAD=no | |
16065 | fi | |
16066 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16067 | ;; | |
16068 | esac | |
16069 | fi | |
16070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5 | |
16071 | $as_echo "$emacs_cv_usable_FIONREAD" >&6; } | |
16072 | if test $emacs_cv_usable_FIONREAD = yes; then | |
16073 | ||
16074 | $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h | |
16075 | ||
16076 | ||
16077 | if test $emacs_broken_SIGIO = no; then | |
16078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5 | |
16079 | $as_echo_n "checking for usable SIGIO... " >&6; } | |
16080 | if test "${emacs_cv_usable_SIGIO+set}" = set; then : | |
16081 | $as_echo_n "(cached) " >&6 | |
16082 | else | |
16083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16084 | /* end confdefs.h. */ | |
16085 | #include <fcntl.h> | |
16086 | #include <signal.h> | |
16087 | ||
16088 | int | |
16089 | main () | |
16090 | { | |
16091 | int foo = SIGIO | F_SETFL | FASYNC; | |
16092 | ; | |
16093 | return 0; | |
16094 | } | |
16095 | _ACEOF | |
16096 | if ac_fn_c_try_compile "$LINENO"; then : | |
16097 | emacs_cv_usable_SIGIO=yes | |
16098 | else | |
16099 | emacs_cv_usable_SIGIO=no | |
16100 | fi | |
16101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16102 | fi | |
16103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5 | |
16104 | $as_echo "$emacs_cv_usable_SIGIO" >&6; } | |
16105 | if test $emacs_cv_usable_SIGIO = yes; then | |
16106 | ||
16107 | $as_echo "#define USABLE_SIGIO 1" >>confdefs.h | |
16108 | ||
16109 | fi | |
16110 | fi | |
16111 | fi | |
16112 | ||
4fda9c95 | 16113 | |
5476a9a4 GM |
16114 | case $opsys in |
16115 | cygwin) | |
4fda9c95 | 16116 | |
5476a9a4 | 16117 | $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h |
4fda9c95 | 16118 | |
5476a9a4 | 16119 | ;; |
4fda9c95 | 16120 | |
5476a9a4 | 16121 | hpux11) |
f199cab1 | 16122 | |
5476a9a4 | 16123 | $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h |
f199cab1 | 16124 | |
5476a9a4 | 16125 | ;; |
f199cab1 | 16126 | |
5476a9a4 | 16127 | irix6-5) |
f199cab1 | 16128 | |
5476a9a4 | 16129 | $as_echo "#define PREFER_VSUSP 1" >>confdefs.h |
f199cab1 | 16130 | |
5476a9a4 | 16131 | ;; |
f199cab1 | 16132 | |
5476a9a4 | 16133 | sol2-10) |
f199cab1 | 16134 | |
5476a9a4 | 16135 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h |
f199cab1 | 16136 | |
5476a9a4 GM |
16137 | ;; |
16138 | esac | |
f199cab1 | 16139 | |
5476a9a4 GM |
16140 | # Set up the CFLAGS for real compilation, so we can substitute it. |
16141 | CFLAGS="$REAL_CFLAGS" | |
16142 | CPPFLAGS="$REAL_CPPFLAGS" | |
f199cab1 | 16143 | |
5476a9a4 GM |
16144 | ## Hack to detect a buggy GCC version. |
16145 | if test "x$GCC" = xyes \ | |
16146 | && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ | |
16147 | && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ | |
16148 | && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then | |
16149 | as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 | |
16150 | fi | |
f199cab1 | 16151 | |
5476a9a4 | 16152 | version=$PACKAGE_VERSION |
f199cab1 | 16153 | |
0778f6f0 | 16154 | copyright="Copyright (C) 2013 Free Software Foundation, Inc." |
bb7dce39 GM |
16155 | |
16156 | cat >>confdefs.h <<_ACEOF | |
16157 | #define COPYRIGHT "$copyright" | |
16158 | _ACEOF | |
16159 | ||
16160 | ||
16161 | ||
5476a9a4 GM |
16162 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
16163 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
4fda9c95 | 16164 | |
f199cab1 | 16165 | |
5476a9a4 | 16166 | ## Unused? |
4fda9c95 GM |
16167 | |
16168 | ||
16169 | ||
16170 | ||
4717915f | 16171 | |
4717915f | 16172 | |
4717915f | 16173 | |
4717915f | 16174 | |
4717915f | 16175 | |
4717915f | 16176 | |
4717915f | 16177 | |
4717915f | 16178 | |
4717915f | 16179 | |
4717915f | 16180 | |
4717915f | 16181 | |
4717915f GM |
16182 | |
16183 | ||
4717915f GM |
16184 | |
16185 | ||
4717915f | 16186 | |
4717915f | 16187 | |
4717915f | 16188 | |
5476a9a4 GM |
16189 | ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. |
16190 | ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the | |
16191 | ## end of LIBX_BASE, but nothing ever set it. | |
4717915f | 16192 | |
4717915f | 16193 | |
4fda9c95 | 16194 | |
4fda9c95 | 16195 | |
5476a9a4 GM |
16196 | ## Used in lwlib/Makefile.in. |
16197 | ||
4fda9c95 | 16198 | |
4fda9c95 | 16199 | |
4fda9c95 GM |
16200 | |
16201 | ||
16202 | ||
16203 | ||
4fda9c95 | 16204 | |
42dcba54 GM |
16205 | if test -n "${term_header}"; then |
16206 | ||
16207 | cat >>confdefs.h <<_ACEOF | |
16208 | #define TERM_HEADER "${term_header}" | |
16209 | _ACEOF | |
16210 | ||
16211 | fi | |
16212 | ||
4fda9c95 | 16213 | |
5476a9a4 GM |
16214 | cat >>confdefs.h <<_ACEOF |
16215 | #define EMACS_CONFIGURATION "${canonical}" | |
16216 | _ACEOF | |
4fda9c95 | 16217 | |
1e8a045a | 16218 | emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"` |
4fda9c95 | 16219 | |
5476a9a4 | 16220 | cat >>confdefs.h <<_ACEOF |
e25a10b7 | 16221 | #define EMACS_CONFIG_OPTIONS "${emacs_config_options}" |
5476a9a4 GM |
16222 | _ACEOF |
16223 | ||
5476a9a4 | 16224 | |
4fda9c95 | 16225 | |
5476a9a4 GM |
16226 | XMENU_OBJ= |
16227 | XOBJ= | |
16228 | FONT_OBJ= | |
16229 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
16230 | ||
16231 | $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h | |
4fda9c95 | 16232 | |
5476a9a4 | 16233 | XMENU_OBJ=xmenu.o |
42dcba54 | 16234 | XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o" |
5476a9a4 GM |
16235 | FONT_OBJ=xfont.o |
16236 | if test "$HAVE_XFT" = "yes"; then | |
16237 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | |
16238 | elif test "$HAVE_FREETYPE" = "yes"; then | |
16239 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | |
16240 | fi | |
4fda9c95 | 16241 | |
f199cab1 | 16242 | fi |
4fda9c95 | 16243 | |
4fda9c95 | 16244 | |
4fda9c95 | 16245 | |
4fda9c95 | 16246 | |
5476a9a4 GM |
16247 | WIDGET_OBJ= |
16248 | MOTIF_LIBW= | |
16249 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
16250 | WIDGET_OBJ=widget.o | |
16251 | ||
16252 | $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h | |
16253 | ||
16254 | if test "${USE_X_TOOLKIT}" = "LUCID"; then | |
16255 | ||
16256 | $as_echo "#define USE_LUCID 1" >>confdefs.h | |
e1939eb1 | 16257 | |
5476a9a4 | 16258 | elif test "${USE_X_TOOLKIT}" = "MOTIF"; then |
4fda9c95 | 16259 | |
5476a9a4 | 16260 | $as_echo "#define USE_MOTIF 1" >>confdefs.h |
3e0be4ab | 16261 | |
5476a9a4 GM |
16262 | MOTIF_LIBW=-lXm |
16263 | case "$opsys" in | |
16264 | gnu-linux) | |
16265 | ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed. | |
16266 | MOTIF_LIBW="$MOTIF_LIBW -lXpm" | |
16267 | ;; | |
3e0be4ab | 16268 | |
5476a9a4 GM |
16269 | unixware) |
16270 | ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov> | |
16271 | ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. | |
16272 | MOTIF_LIBW="MOTIF_LIBW -lXimp" | |
16273 | ;; | |
3e0be4ab | 16274 | |
5476a9a4 GM |
16275 | aix4-2) |
16276 | ## olson@mcs.anl.gov says -li18n is needed by -lXm. | |
16277 | MOTIF_LIBW="$MOTIF_LIBW -li18n" | |
16278 | ;; | |
16279 | esac | |
16280 | MOTIF_LIBW="$MOTIF_LIBW $LIBXP" | |
16281 | fi | |
16282 | fi | |
4fda9c95 | 16283 | |
3e0be4ab | 16284 | |
5476a9a4 GM |
16285 | TOOLKIT_LIBW= |
16286 | case "$USE_X_TOOLKIT" in | |
16287 | MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; | |
16288 | LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; | |
16289 | none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; | |
16290 | esac | |
4fda9c95 GM |
16291 | |
16292 | ||
5476a9a4 GM |
16293 | if test "$USE_X_TOOLKIT" = "none"; then |
16294 | LIBXT_OTHER="\$(LIBXSM)" | |
16295 | OLDXMENU_TARGET="really-oldXMenu" | |
16296 | else | |
16297 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | |
16298 | OLDXMENU_TARGET="really-lwlib" | |
16299 | fi | |
4fda9c95 GM |
16300 | |
16301 | ||
5476a9a4 GM |
16302 | ## The X Menu stuff is present in the X10 distribution, but missing |
16303 | ## from X11. If we have X10, just use the installed library; | |
16304 | ## otherwise, use our own copy. | |
16305 | if test "${HAVE_X11}" = "yes" ; then | |
4fda9c95 | 16306 | |
5476a9a4 | 16307 | $as_echo "#define HAVE_X11 1" >>confdefs.h |
4fda9c95 | 16308 | |
4fda9c95 | 16309 | |
5476a9a4 GM |
16310 | if test "$USE_X_TOOLKIT" = "none"; then |
16311 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | |
16312 | else | |
16313 | OLDXMENU="\${lwlibdir}/liblw.a" | |
16314 | fi | |
16315 | LIBXMENU="\$(OLDXMENU)" | |
16316 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | |
16317 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | |
f199cab1 | 16318 | else |
5476a9a4 GM |
16319 | ## For a syntactically valid Makefile; not actually used for anything. |
16320 | ## See comments in src/Makefile.in. | |
16321 | OLDXMENU=nothing | |
16322 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | |
16323 | if test "${HAVE_X_WINDOWS}" = "yes"; then | |
16324 | LIBXMENU="-lXMenu" | |
16325 | else | |
16326 | LIBXMENU= | |
16327 | fi | |
16328 | LIBX_OTHER= | |
16329 | OLDXMENU_DEPS= | |
16330 | fi | |
4fda9c95 | 16331 | |
5476a9a4 GM |
16332 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
16333 | OLDXMENU_TARGET= | |
16334 | OLDXMENU=nothing | |
16335 | LIBXMENU= | |
16336 | OLDXMENU_DEPS= | |
16337 | fi | |
4fda9c95 | 16338 | |
4fda9c95 GM |
16339 | |
16340 | ||
3e0be4ab | 16341 | |
4fda9c95 | 16342 | |
3e0be4ab | 16343 | |
3e0be4ab | 16344 | |
5476a9a4 | 16345 | if test "${HAVE_MENUS}" = "yes" ; then |
3e0be4ab | 16346 | |
5476a9a4 | 16347 | $as_echo "#define HAVE_MENUS 1" >>confdefs.h |
4fda9c95 | 16348 | |
5476a9a4 | 16349 | fi |
4fda9c95 | 16350 | |
5476a9a4 | 16351 | if test "${GNU_MALLOC}" = "yes" ; then |
4fda9c95 | 16352 | |
5476a9a4 | 16353 | $as_echo "#define GNU_MALLOC 1" >>confdefs.h |
4fda9c95 | 16354 | |
5476a9a4 | 16355 | fi |
3e0be4ab | 16356 | |
5476a9a4 GM |
16357 | RALLOC_OBJ= |
16358 | if test "${REL_ALLOC}" = "yes" ; then | |
16359 | ||
16360 | $as_echo "#define REL_ALLOC 1" >>confdefs.h | |
4fda9c95 GM |
16361 | |
16362 | ||
5476a9a4 GM |
16363 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o |
16364 | fi | |
4fda9c95 | 16365 | |
4fda9c95 | 16366 | |
5476a9a4 | 16367 | if test "$opsys" = "cygwin"; then |
5c0255d9 | 16368 | CYGWIN_OBJ="sheap.o cygw32.o" |
5476a9a4 GM |
16369 | ## Cygwin differs because of its unexec(). |
16370 | PRE_ALLOC_OBJ= | |
16371 | POST_ALLOC_OBJ=lastfile.o | |
16372 | else | |
16373 | CYGWIN_OBJ= | |
16374 | PRE_ALLOC_OBJ=lastfile.o | |
16375 | POST_ALLOC_OBJ= | |
16376 | fi | |
4fda9c95 | 16377 | |
3e0be4ab | 16378 | |
3e0be4ab | 16379 | |
3e0be4ab | 16380 | |
5476a9a4 GM |
16381 | # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. |
16382 | # it temporarily reverts them to their pre-pkg-config values, | |
16383 | # because gnulib needs to work with both src (which uses the | |
16384 | # pkg-config stuff) and lib-src (which does not). For example, gnulib | |
16385 | # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, | |
16386 | # and it therefore needs to run in an environment where LIBS does not | |
16387 | # already contain -lrt merely because 'pkg-config --libs' printed '-lrt' | |
16388 | # for some package unrelated to lib-src. | |
16389 | SAVE_CFLAGS=$CFLAGS | |
16390 | SAVE_LIBS=$LIBS | |
16391 | CFLAGS=$pre_PKG_CONFIG_CFLAGS | |
16392 | LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" | |
3e0be4ab | 16393 | |
3e0be4ab GM |
16394 | |
16395 | ||
4fda9c95 | 16396 | |
4fda9c95 | 16397 | |
3e0be4ab | 16398 | |
3e0be4ab GM |
16399 | |
16400 | ||
4fda9c95 | 16401 | |
3e0be4ab GM |
16402 | |
16403 | ||
5476a9a4 GM |
16404 | LIBC_FATAL_STDERR_=1 |
16405 | export LIBC_FATAL_STDERR_ | |
3e0be4ab | 16406 | |
5476a9a4 GM |
16407 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
16408 | # for constant arguments. Useless! | |
16409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
16410 | $as_echo_n "checking for working alloca.h... " >&6; } | |
16411 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
16412 | $as_echo_n "(cached) " >&6 | |
16413 | else | |
16414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16415 | /* end confdefs.h. */ | |
16416 | #include <alloca.h> | |
16417 | int | |
16418 | main () | |
16419 | { | |
16420 | char *p = (char *) alloca (2 * sizeof (int)); | |
16421 | if (p) return 0; | |
16422 | ; | |
16423 | return 0; | |
16424 | } | |
16425 | _ACEOF | |
16426 | if ac_fn_c_try_link "$LINENO"; then : | |
16427 | ac_cv_working_alloca_h=yes | |
16428 | else | |
16429 | ac_cv_working_alloca_h=no | |
16430 | fi | |
16431 | rm -f core conftest.err conftest.$ac_objext \ | |
16432 | conftest$ac_exeext conftest.$ac_ext | |
16433 | fi | |
16434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
16435 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
16436 | if test $ac_cv_working_alloca_h = yes; then | |
3e0be4ab | 16437 | |
5476a9a4 | 16438 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
3e0be4ab | 16439 | |
5476a9a4 | 16440 | fi |
3e0be4ab | 16441 | |
5476a9a4 GM |
16442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
16443 | $as_echo_n "checking for alloca... " >&6; } | |
16444 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
f199cab1 GM |
16445 | $as_echo_n "(cached) " >&6 |
16446 | else | |
5476a9a4 | 16447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 16448 | /* end confdefs.h. */ |
5476a9a4 GM |
16449 | #ifdef __GNUC__ |
16450 | # define alloca __builtin_alloca | |
16451 | #else | |
16452 | # ifdef _MSC_VER | |
16453 | # include <malloc.h> | |
16454 | # define alloca _alloca | |
16455 | # else | |
16456 | # ifdef HAVE_ALLOCA_H | |
16457 | # include <alloca.h> | |
16458 | # else | |
16459 | # ifdef _AIX | |
16460 | #pragma alloca | |
16461 | # else | |
16462 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
16463 | char *alloca (); | |
16464 | # endif | |
16465 | # endif | |
16466 | # endif | |
16467 | # endif | |
16468 | #endif | |
16469 | ||
16470 | int | |
16471 | main () | |
16472 | { | |
16473 | char *p = (char *) alloca (1); | |
16474 | if (p) return 0; | |
16475 | ; | |
16476 | return 0; | |
16477 | } | |
16478 | _ACEOF | |
16479 | if ac_fn_c_try_link "$LINENO"; then : | |
16480 | ac_cv_func_alloca_works=yes | |
16481 | else | |
16482 | ac_cv_func_alloca_works=no | |
16483 | fi | |
16484 | rm -f core conftest.err conftest.$ac_objext \ | |
16485 | conftest$ac_exeext conftest.$ac_ext | |
16486 | fi | |
16487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
16488 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
16489 | ||
16490 | if test $ac_cv_func_alloca_works = yes; then | |
16491 | ||
16492 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
16493 | ||
16494 | else | |
16495 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
16496 | # that cause trouble. Some versions do not even contain alloca or | |
16497 | # contain a buggy version. If you still want to use their alloca, | |
16498 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3e0be4ab | 16499 | |
4fda9c95 | 16500 | |
4fda9c95 | 16501 | |
4fda9c95 GM |
16502 | |
16503 | ||
5476a9a4 | 16504 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
4fda9c95 | 16505 | |
5476a9a4 | 16506 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
4fda9c95 | 16507 | |
4fda9c95 | 16508 | |
5476a9a4 GM |
16509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5 |
16510 | $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; } | |
16511 | if test "${ac_cv_os_cray+set}" = set; then : | |
16512 | $as_echo_n "(cached) " >&6 | |
16513 | else | |
16514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16515 | /* end confdefs.h. */ | |
16516 | #if defined CRAY && ! defined CRAY2 | |
16517 | webecray | |
16518 | #else | |
16519 | wenotbecray | |
16520 | #endif | |
4fda9c95 | 16521 | |
5476a9a4 GM |
16522 | _ACEOF |
16523 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
16524 | $EGREP "webecray" >/dev/null 2>&1; then : | |
16525 | ac_cv_os_cray=yes | |
16526 | else | |
16527 | ac_cv_os_cray=no | |
16528 | fi | |
16529 | rm -f conftest* | |
4fda9c95 | 16530 | |
5476a9a4 GM |
16531 | fi |
16532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
16533 | $as_echo "$ac_cv_os_cray" >&6; } | |
16534 | if test $ac_cv_os_cray = yes; then | |
16535 | for ac_func in _getb67 GETB67 getb67; do | |
16536 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
16537 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
16538 | eval as_val=\$$as_ac_var | |
16539 | if test "x$as_val" = x""yes; then : | |
4fda9c95 | 16540 | |
5476a9a4 GM |
16541 | cat >>confdefs.h <<_ACEOF |
16542 | #define CRAY_STACKSEG_END $ac_func | |
16543 | _ACEOF | |
4fda9c95 | 16544 | |
5476a9a4 GM |
16545 | break |
16546 | fi | |
4fda9c95 | 16547 | |
5476a9a4 GM |
16548 | done |
16549 | fi | |
4fda9c95 | 16550 | |
5476a9a4 GM |
16551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
16552 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
16553 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
16554 | $as_echo_n "(cached) " >&6 | |
16555 | else | |
16556 | if test "$cross_compiling" = yes; then : | |
16557 | ac_cv_c_stack_direction=0 | |
16558 | else | |
16559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16560 | /* end confdefs.h. */ | |
16561 | $ac_includes_default | |
16562 | int | |
16563 | find_stack_direction (int *addr, int depth) | |
16564 | { | |
16565 | int dir, dummy = 0; | |
16566 | if (! addr) | |
16567 | addr = &dummy; | |
16568 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
16569 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
16570 | return dir + dummy; | |
16571 | } | |
4fda9c95 | 16572 | |
5476a9a4 GM |
16573 | int |
16574 | main (int argc, char **argv) | |
16575 | { | |
16576 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
16577 | } | |
16578 | _ACEOF | |
16579 | if ac_fn_c_try_run "$LINENO"; then : | |
16580 | ac_cv_c_stack_direction=1 | |
16581 | else | |
16582 | ac_cv_c_stack_direction=-1 | |
16583 | fi | |
16584 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16585 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16586 | fi | |
4fda9c95 | 16587 | |
5476a9a4 GM |
16588 | fi |
16589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
16590 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
16591 | cat >>confdefs.h <<_ACEOF | |
16592 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
16593 | _ACEOF | |
3e0be4ab GM |
16594 | |
16595 | ||
5476a9a4 | 16596 | fi |
3e0be4ab GM |
16597 | |
16598 | ||
16599 | ||
16600 | ||
5476a9a4 GM |
16601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
16602 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
16603 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
16604 | $as_echo_n "(cached) " >&6 | |
16605 | else | |
16606 | ac_cv_c_bigendian=unknown | |
16607 | # See if we're dealing with a universal compiler. | |
16608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16609 | /* end confdefs.h. */ | |
16610 | #ifndef __APPLE_CC__ | |
16611 | not a universal capable compiler | |
16612 | #endif | |
16613 | typedef int dummy; | |
16614 | ||
16615 | _ACEOF | |
16616 | if ac_fn_c_try_compile "$LINENO"; then : | |
3e0be4ab | 16617 | |
5476a9a4 GM |
16618 | # Check for potential -arch flags. It is not universal unless |
16619 | # there are at least two -arch flags with different values. | |
16620 | ac_arch= | |
16621 | ac_prev= | |
16622 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
16623 | if test -n "$ac_prev"; then | |
16624 | case $ac_word in | |
16625 | i?86 | x86_64 | ppc | ppc64) | |
16626 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
16627 | ac_arch=$ac_word | |
16628 | else | |
16629 | ac_cv_c_bigendian=universal | |
16630 | break | |
16631 | fi | |
16632 | ;; | |
16633 | esac | |
16634 | ac_prev= | |
16635 | elif test "x$ac_word" = "x-arch"; then | |
16636 | ac_prev=arch | |
16637 | fi | |
16638 | done | |
16639 | fi | |
16640 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16641 | if test $ac_cv_c_bigendian = unknown; then | |
16642 | # See if sys/param.h defines the BYTE_ORDER macro. | |
16643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16644 | /* end confdefs.h. */ | |
16645 | #include <sys/types.h> | |
16646 | #include <sys/param.h> | |
3e0be4ab | 16647 | |
5476a9a4 GM |
16648 | int |
16649 | main () | |
16650 | { | |
16651 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
16652 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
16653 | && LITTLE_ENDIAN) | |
16654 | bogus endian macros | |
16655 | #endif | |
3e0be4ab | 16656 | |
5476a9a4 GM |
16657 | ; |
16658 | return 0; | |
16659 | } | |
16660 | _ACEOF | |
16661 | if ac_fn_c_try_compile "$LINENO"; then : | |
16662 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
16663 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16664 | /* end confdefs.h. */ | |
16665 | #include <sys/types.h> | |
16666 | #include <sys/param.h> | |
369e19fc | 16667 | |
5476a9a4 GM |
16668 | int |
16669 | main () | |
16670 | { | |
16671 | #if BYTE_ORDER != BIG_ENDIAN | |
16672 | not big endian | |
16673 | #endif | |
3e0be4ab | 16674 | |
5476a9a4 GM |
16675 | ; |
16676 | return 0; | |
16677 | } | |
16678 | _ACEOF | |
16679 | if ac_fn_c_try_compile "$LINENO"; then : | |
16680 | ac_cv_c_bigendian=yes | |
16681 | else | |
16682 | ac_cv_c_bigendian=no | |
16683 | fi | |
16684 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16685 | fi | |
16686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16687 | fi | |
16688 | if test $ac_cv_c_bigendian = unknown; then | |
16689 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
16690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16691 | /* end confdefs.h. */ | |
16692 | #include <limits.h> | |
4fda9c95 | 16693 | |
5476a9a4 GM |
16694 | int |
16695 | main () | |
16696 | { | |
16697 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
16698 | bogus endian macros | |
16699 | #endif | |
4fda9c95 | 16700 | |
5476a9a4 GM |
16701 | ; |
16702 | return 0; | |
16703 | } | |
16704 | _ACEOF | |
16705 | if ac_fn_c_try_compile "$LINENO"; then : | |
16706 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
16707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16708 | /* end confdefs.h. */ | |
16709 | #include <limits.h> | |
4fda9c95 | 16710 | |
5476a9a4 GM |
16711 | int |
16712 | main () | |
16713 | { | |
16714 | #ifndef _BIG_ENDIAN | |
16715 | not big endian | |
16716 | #endif | |
f199cab1 | 16717 | |
5476a9a4 GM |
16718 | ; |
16719 | return 0; | |
16720 | } | |
16721 | _ACEOF | |
16722 | if ac_fn_c_try_compile "$LINENO"; then : | |
16723 | ac_cv_c_bigendian=yes | |
f199cab1 | 16724 | else |
5476a9a4 GM |
16725 | ac_cv_c_bigendian=no |
16726 | fi | |
16727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16728 | fi | |
16729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16730 | fi | |
16731 | if test $ac_cv_c_bigendian = unknown; then | |
16732 | # Compile a test program. | |
16733 | if test "$cross_compiling" = yes; then : | |
16734 | # Try to guess by grepping values from an object file. | |
16735 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16736 | /* end confdefs.h. */ | |
16737 | short int ascii_mm[] = | |
16738 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
16739 | short int ascii_ii[] = | |
16740 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
16741 | int use_ascii (int i) { | |
16742 | return ascii_mm[i] + ascii_ii[i]; | |
16743 | } | |
16744 | short int ebcdic_ii[] = | |
16745 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
16746 | short int ebcdic_mm[] = | |
16747 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
16748 | int use_ebcdic (int i) { | |
16749 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
16750 | } | |
16751 | extern int foo; | |
f199cab1 | 16752 | |
5476a9a4 GM |
16753 | int |
16754 | main () | |
16755 | { | |
16756 | return use_ascii (foo) == use_ebcdic (foo); | |
16757 | ; | |
16758 | return 0; | |
16759 | } | |
16760 | _ACEOF | |
16761 | if ac_fn_c_try_compile "$LINENO"; then : | |
16762 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
16763 | ac_cv_c_bigendian=yes | |
16764 | fi | |
16765 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
16766 | if test "$ac_cv_c_bigendian" = unknown; then | |
16767 | ac_cv_c_bigendian=no | |
16768 | else | |
16769 | # finding both strings is unlikely to happen, but who knows? | |
16770 | ac_cv_c_bigendian=unknown | |
16771 | fi | |
16772 | fi | |
16773 | fi | |
16774 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4fda9c95 | 16775 | else |
3e0be4ab | 16776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4fda9c95 | 16777 | /* end confdefs.h. */ |
5476a9a4 GM |
16778 | $ac_includes_default |
16779 | int | |
16780 | main () | |
4fda9c95 | 16781 | { |
5476a9a4 GM |
16782 | |
16783 | /* Are we little or big endian? From Harbison&Steele. */ | |
16784 | union | |
16785 | { | |
16786 | long int l; | |
16787 | char c[sizeof (long int)]; | |
16788 | } u; | |
16789 | u.l = 1; | |
16790 | return u.c[sizeof (long int) - 1] == 1; | |
16791 | ||
16792 | ; | |
4fda9c95 GM |
16793 | return 0; |
16794 | } | |
16795 | _ACEOF | |
f199cab1 | 16796 | if ac_fn_c_try_run "$LINENO"; then : |
5476a9a4 | 16797 | ac_cv_c_bigendian=no |
3e0be4ab | 16798 | else |
5476a9a4 | 16799 | ac_cv_c_bigendian=yes |
4fda9c95 | 16800 | fi |
f199cab1 GM |
16801 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16802 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4fda9c95 | 16803 | fi |
4fda9c95 | 16804 | |
5476a9a4 | 16805 | fi |
f199cab1 | 16806 | fi |
5476a9a4 GM |
16807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
16808 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
16809 | case $ac_cv_c_bigendian in #( | |
16810 | yes) | |
16811 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
16812 | ;; #( | |
16813 | no) | |
16814 | ;; #( | |
16815 | universal) | |
3e0be4ab | 16816 | |
5476a9a4 | 16817 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
3e0be4ab | 16818 | |
5476a9a4 GM |
16819 | ;; #( |
16820 | *) | |
16821 | as_fn_error "unknown endianness | |
16822 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
16823 | esac | |
4fda9c95 | 16824 | |
4fda9c95 | 16825 | |
da6c8463 | 16826 | |
5476a9a4 GM |
16827 | GNULIB_CHDIR=0; |
16828 | GNULIB_CHOWN=0; | |
16829 | GNULIB_CLOSE=0; | |
16830 | GNULIB_DUP=0; | |
16831 | GNULIB_DUP2=0; | |
16832 | GNULIB_DUP3=0; | |
16833 | GNULIB_ENVIRON=0; | |
16834 | GNULIB_EUIDACCESS=0; | |
16835 | GNULIB_FACCESSAT=0; | |
16836 | GNULIB_FCHDIR=0; | |
16837 | GNULIB_FCHOWNAT=0; | |
16838 | GNULIB_FDATASYNC=0; | |
16839 | GNULIB_FSYNC=0; | |
16840 | GNULIB_FTRUNCATE=0; | |
16841 | GNULIB_GETCWD=0; | |
16842 | GNULIB_GETDOMAINNAME=0; | |
16843 | GNULIB_GETDTABLESIZE=0; | |
16844 | GNULIB_GETGROUPS=0; | |
16845 | GNULIB_GETHOSTNAME=0; | |
16846 | GNULIB_GETLOGIN=0; | |
16847 | GNULIB_GETLOGIN_R=0; | |
16848 | GNULIB_GETPAGESIZE=0; | |
16849 | GNULIB_GETUSERSHELL=0; | |
16850 | GNULIB_GROUP_MEMBER=0; | |
16851 | GNULIB_ISATTY=0; | |
16852 | GNULIB_LCHOWN=0; | |
16853 | GNULIB_LINK=0; | |
16854 | GNULIB_LINKAT=0; | |
16855 | GNULIB_LSEEK=0; | |
16856 | GNULIB_PIPE=0; | |
16857 | GNULIB_PIPE2=0; | |
16858 | GNULIB_PREAD=0; | |
16859 | GNULIB_PWRITE=0; | |
16860 | GNULIB_READ=0; | |
16861 | GNULIB_READLINK=0; | |
16862 | GNULIB_READLINKAT=0; | |
16863 | GNULIB_RMDIR=0; | |
16864 | GNULIB_SETHOSTNAME=0; | |
16865 | GNULIB_SLEEP=0; | |
16866 | GNULIB_SYMLINK=0; | |
16867 | GNULIB_SYMLINKAT=0; | |
16868 | GNULIB_TTYNAME_R=0; | |
16869 | GNULIB_UNISTD_H_NONBLOCKING=0; | |
16870 | GNULIB_UNISTD_H_SIGPIPE=0; | |
16871 | GNULIB_UNLINK=0; | |
16872 | GNULIB_UNLINKAT=0; | |
16873 | GNULIB_USLEEP=0; | |
16874 | GNULIB_WRITE=0; | |
16875 | HAVE_CHOWN=1; | |
16876 | HAVE_DUP2=1; | |
16877 | HAVE_DUP3=1; | |
16878 | HAVE_EUIDACCESS=1; | |
16879 | HAVE_FACCESSAT=1; | |
16880 | HAVE_FCHDIR=1; | |
16881 | HAVE_FCHOWNAT=1; | |
16882 | HAVE_FDATASYNC=1; | |
16883 | HAVE_FSYNC=1; | |
16884 | HAVE_FTRUNCATE=1; | |
16885 | HAVE_GETDTABLESIZE=1; | |
16886 | HAVE_GETGROUPS=1; | |
16887 | HAVE_GETHOSTNAME=1; | |
16888 | HAVE_GETLOGIN=1; | |
16889 | HAVE_GETPAGESIZE=1; | |
16890 | HAVE_GROUP_MEMBER=1; | |
16891 | HAVE_LCHOWN=1; | |
16892 | HAVE_LINK=1; | |
16893 | HAVE_LINKAT=1; | |
16894 | HAVE_PIPE=1; | |
16895 | HAVE_PIPE2=1; | |
16896 | HAVE_PREAD=1; | |
16897 | HAVE_PWRITE=1; | |
16898 | HAVE_READLINK=1; | |
16899 | HAVE_READLINKAT=1; | |
16900 | HAVE_SETHOSTNAME=1; | |
16901 | HAVE_SLEEP=1; | |
16902 | HAVE_SYMLINK=1; | |
16903 | HAVE_SYMLINKAT=1; | |
16904 | HAVE_UNLINKAT=1; | |
16905 | HAVE_USLEEP=1; | |
16906 | HAVE_DECL_ENVIRON=1; | |
16907 | HAVE_DECL_FCHDIR=1; | |
16908 | HAVE_DECL_FDATASYNC=1; | |
16909 | HAVE_DECL_GETDOMAINNAME=1; | |
16910 | HAVE_DECL_GETLOGIN_R=1; | |
16911 | HAVE_DECL_GETPAGESIZE=1; | |
16912 | HAVE_DECL_GETUSERSHELL=1; | |
16913 | HAVE_DECL_SETHOSTNAME=1; | |
16914 | HAVE_DECL_TTYNAME_R=1; | |
16915 | HAVE_OS_H=0; | |
16916 | HAVE_SYS_PARAM_H=0; | |
16917 | REPLACE_CHOWN=0; | |
16918 | REPLACE_CLOSE=0; | |
16919 | REPLACE_DUP=0; | |
16920 | REPLACE_DUP2=0; | |
16921 | REPLACE_FCHOWNAT=0; | |
16922 | REPLACE_FTRUNCATE=0; | |
16923 | REPLACE_GETCWD=0; | |
16924 | REPLACE_GETDOMAINNAME=0; | |
16925 | REPLACE_GETLOGIN_R=0; | |
16926 | REPLACE_GETGROUPS=0; | |
16927 | REPLACE_GETPAGESIZE=0; | |
16928 | REPLACE_ISATTY=0; | |
16929 | REPLACE_LCHOWN=0; | |
16930 | REPLACE_LINK=0; | |
16931 | REPLACE_LINKAT=0; | |
16932 | REPLACE_LSEEK=0; | |
16933 | REPLACE_PREAD=0; | |
16934 | REPLACE_PWRITE=0; | |
16935 | REPLACE_READ=0; | |
16936 | REPLACE_READLINK=0; | |
16937 | REPLACE_RMDIR=0; | |
16938 | REPLACE_SLEEP=0; | |
16939 | REPLACE_SYMLINK=0; | |
16940 | REPLACE_TTYNAME_R=0; | |
16941 | REPLACE_UNLINK=0; | |
16942 | REPLACE_UNLINKAT=0; | |
16943 | REPLACE_USLEEP=0; | |
16944 | REPLACE_WRITE=0; | |
16945 | UNISTD_H_HAVE_WINSOCK2_H=0; | |
16946 | UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; | |
f199cab1 GM |
16947 | |
16948 | ||
93131e11 | 16949 | |
d7ad186c GM |
16950 | GNULIB_OPENDIR=0; |
16951 | GNULIB_READDIR=0; | |
16952 | GNULIB_REWINDDIR=0; | |
16953 | GNULIB_CLOSEDIR=0; | |
16954 | GNULIB_DIRFD=0; | |
16955 | GNULIB_FDOPENDIR=0; | |
16956 | GNULIB_SCANDIR=0; | |
16957 | GNULIB_ALPHASORT=0; | |
16958 | HAVE_OPENDIR=1; | |
16959 | HAVE_READDIR=1; | |
16960 | HAVE_REWINDDIR=1; | |
16961 | HAVE_CLOSEDIR=1; | |
16962 | HAVE_DECL_DIRFD=1; | |
16963 | HAVE_DECL_FDOPENDIR=1; | |
16964 | HAVE_FDOPENDIR=1; | |
16965 | HAVE_SCANDIR=1; | |
16966 | HAVE_ALPHASORT=1; | |
16967 | REPLACE_OPENDIR=0; | |
16968 | REPLACE_CLOSEDIR=0; | |
16969 | REPLACE_DIRFD=0; | |
16970 | REPLACE_FDOPENDIR=0; | |
710f5812 GM |
16971 | |
16972 | ||
16973 | ||
16974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
16975 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
16976 | if test "${gl_cv_have_include_next+set}" = set; then : | |
16977 | $as_echo_n "(cached) " >&6 | |
16978 | else | |
16979 | rm -rf conftestd1a conftestd1b conftestd2 | |
16980 | mkdir conftestd1a conftestd1b conftestd2 | |
16981 | cat <<EOF > conftestd1a/conftest.h | |
16982 | #define DEFINED_IN_CONFTESTD1 | |
16983 | #include_next <conftest.h> | |
16984 | #ifdef DEFINED_IN_CONFTESTD2 | |
16985 | int foo; | |
16986 | #else | |
16987 | #error "include_next doesn't work" | |
16988 | #endif | |
16989 | EOF | |
16990 | cat <<EOF > conftestd1b/conftest.h | |
16991 | #define DEFINED_IN_CONFTESTD1 | |
16992 | #include <stdio.h> | |
16993 | #include_next <conftest.h> | |
16994 | #ifdef DEFINED_IN_CONFTESTD2 | |
16995 | int foo; | |
16996 | #else | |
16997 | #error "include_next doesn't work" | |
16998 | #endif | |
16999 | EOF | |
17000 | cat <<EOF > conftestd2/conftest.h | |
17001 | #ifndef DEFINED_IN_CONFTESTD1 | |
17002 | #error "include_next test doesn't work" | |
17003 | #endif | |
17004 | #define DEFINED_IN_CONFTESTD2 | |
17005 | EOF | |
17006 | gl_save_CPPFLAGS="$CPPFLAGS" | |
17007 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
17008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17009 | /* end confdefs.h. */ | |
17010 | #include <conftest.h> | |
17011 | _ACEOF | |
17012 | if ac_fn_c_try_compile "$LINENO"; then : | |
17013 | gl_cv_have_include_next=yes | |
17014 | else | |
17015 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
17016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17017 | /* end confdefs.h. */ | |
17018 | #include <conftest.h> | |
17019 | _ACEOF | |
17020 | if ac_fn_c_try_compile "$LINENO"; then : | |
17021 | gl_cv_have_include_next=buggy | |
17022 | else | |
17023 | gl_cv_have_include_next=no | |
17024 | fi | |
17025 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17026 | ||
17027 | fi | |
17028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17029 | CPPFLAGS="$gl_save_CPPFLAGS" | |
17030 | rm -rf conftestd1a conftestd1b conftestd2 | |
17031 | ||
17032 | fi | |
17033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
17034 | $as_echo "$gl_cv_have_include_next" >&6; } | |
17035 | PRAGMA_SYSTEM_HEADER= | |
17036 | if test $gl_cv_have_include_next = yes; then | |
17037 | INCLUDE_NEXT=include_next | |
17038 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
17039 | if test -n "$GCC"; then | |
17040 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
17041 | fi | |
17042 | else | |
17043 | if test $gl_cv_have_include_next = buggy; then | |
17044 | INCLUDE_NEXT=include | |
17045 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
17046 | else | |
17047 | INCLUDE_NEXT=include | |
17048 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
17049 | fi | |
17050 | fi | |
17051 | ||
17052 | ||
17053 | ||
17054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 | |
17055 | $as_echo_n "checking whether system header files limit the line length... " >&6; } | |
17056 | if test "${gl_cv_pragma_columns+set}" = set; then : | |
17057 | $as_echo_n "(cached) " >&6 | |
17058 | else | |
17059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17060 | /* end confdefs.h. */ | |
17061 | ||
17062 | #ifdef __TANDEM | |
17063 | choke me | |
17064 | #endif | |
17065 | ||
17066 | _ACEOF | |
17067 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
17068 | $EGREP "choke me" >/dev/null 2>&1; then : | |
17069 | gl_cv_pragma_columns=yes | |
17070 | else | |
17071 | gl_cv_pragma_columns=no | |
17072 | fi | |
17073 | rm -f conftest* | |
17074 | ||
17075 | ||
17076 | fi | |
17077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 | |
17078 | $as_echo "$gl_cv_pragma_columns" >&6; } | |
17079 | if test $gl_cv_pragma_columns = yes; then | |
17080 | PRAGMA_COLUMNS="#pragma COLUMNS 10000" | |
17081 | else | |
17082 | PRAGMA_COLUMNS= | |
17083 | fi | |
17084 | ||
17085 | ||
710f5812 | 17086 | |
710f5812 | 17087 | |
710f5812 | 17088 | |
d7ad186c GM |
17089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 |
17090 | $as_echo_n "checking whether strtold conforms to C99... " >&6; } | |
17091 | if test "${gl_cv_func_c99_strtold+set}" = set; then : | |
f199cab1 | 17092 | $as_echo_n "(cached) " >&6 |
ae0d7250 | 17093 | else |
f199cab1 | 17094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 17095 | /* end confdefs.h. */ |
d7ad186c GM |
17096 | /* On HP-UX before 11.23, strtold returns a struct instead of |
17097 | long double. Reject implementations like that, by requiring | |
17098 | compatibility with the C99 prototype. */ | |
17099 | #include <stdlib.h> | |
17100 | static long double (*p) (char const *, char **) = strtold; | |
17101 | static long double | |
17102 | test (char const *nptr, char **endptr) | |
17103 | { | |
17104 | long double r; | |
17105 | r = strtold (nptr, endptr); | |
17106 | return r; | |
17107 | } | |
3e0be4ab GM |
17108 | int |
17109 | main () | |
17110 | { | |
d7ad186c | 17111 | return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; |
3e0be4ab GM |
17112 | ; |
17113 | return 0; | |
17114 | } | |
6ad6792b | 17115 | _ACEOF |
d7ad186c GM |
17116 | if ac_fn_c_try_link "$LINENO"; then : |
17117 | gl_cv_func_c99_strtold=yes | |
f199cab1 | 17118 | else |
d7ad186c | 17119 | gl_cv_func_c99_strtold=no |
f199cab1 | 17120 | fi |
d7ad186c GM |
17121 | rm -f core conftest.err conftest.$ac_objext \ |
17122 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 17123 | fi |
d7ad186c GM |
17124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 |
17125 | $as_echo "$gl_cv_func_c99_strtold" >&6; } | |
17126 | if test $gl_cv_func_c99_strtold = yes; then | |
f199cab1 | 17127 | |
d7ad186c | 17128 | $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h |
f199cab1 | 17129 | |
5476a9a4 | 17130 | fi |
f199cab1 | 17131 | |
f199cab1 | 17132 | |
f199cab1 GM |
17133 | |
17134 | ||
4fda9c95 | 17135 | |
3bf26e96 GM |
17136 | |
17137 | ||
eda33f78 | 17138 | |
d7ad186c GM |
17139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 |
17140 | $as_echo_n "checking if environ is properly declared... " >&6; } | |
17141 | if test "${gt_cv_var_environ_declaration+set}" = set; then : | |
17142 | $as_echo_n "(cached) " >&6 | |
17143 | else | |
eda33f78 | 17144 | |
d7ad186c GM |
17145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17146 | /* end confdefs.h. */ | |
17147 | #if HAVE_UNISTD_H | |
17148 | #include <unistd.h> | |
17149 | #endif | |
17150 | /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ | |
17151 | #include <stdlib.h> | |
17152 | ||
17153 | extern struct { int foo; } environ; | |
17154 | int | |
17155 | main () | |
17156 | { | |
17157 | environ.foo = 1; | |
17158 | ; | |
17159 | return 0; | |
17160 | } | |
17161 | _ACEOF | |
17162 | if ac_fn_c_try_compile "$LINENO"; then : | |
17163 | gt_cv_var_environ_declaration=no | |
17164 | else | |
17165 | gt_cv_var_environ_declaration=yes | |
17166 | fi | |
17167 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17168 | fi | |
17169 | ||
17170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 | |
17171 | $as_echo "$gt_cv_var_environ_declaration" >&6; } | |
17172 | if test $gt_cv_var_environ_declaration = yes; then | |
17173 | ||
17174 | $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h | |
17175 | ||
17176 | fi | |
17177 | ||
17178 | ||
17179 | if test $gt_cv_var_environ_declaration != yes; then | |
17180 | HAVE_DECL_ENVIRON=0 | |
17181 | fi | |
17182 | ||
17183 | ||
17184 | ||
17185 | ||
17186 | ||
17187 | ||
17188 | ||
17189 | ||
17190 | ||
17191 | GNULIB_FCNTL=0; | |
17192 | GNULIB_NONBLOCKING=0; | |
17193 | GNULIB_OPEN=0; | |
17194 | GNULIB_OPENAT=0; | |
17195 | HAVE_FCNTL=1; | |
17196 | HAVE_OPENAT=1; | |
17197 | REPLACE_FCNTL=0; | |
17198 | REPLACE_OPEN=0; | |
17199 | REPLACE_OPENAT=0; | |
17200 | ||
17201 | ||
17202 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" | |
17203 | if test "x$ac_cv_type_mode_t" = x""yes; then : | |
17204 | ||
17205 | else | |
17206 | ||
17207 | cat >>confdefs.h <<_ACEOF | |
17208 | #define mode_t int | |
17209 | _ACEOF | |
17210 | ||
17211 | fi | |
17212 | ||
2407788f GM |
17213 | ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default" |
17214 | if test "x$ac_cv_have_decl_fdatasync" = x""yes; then : | |
17215 | ac_have_decl=1 | |
17216 | else | |
17217 | ac_have_decl=0 | |
17218 | fi | |
17219 | ||
17220 | cat >>confdefs.h <<_ACEOF | |
17221 | #define HAVE_DECL_FDATASYNC $ac_have_decl | |
17222 | _ACEOF | |
17223 | ||
d7ad186c GM |
17224 | |
17225 | ||
17226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 | |
17227 | $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } | |
17228 | if test "${ac_cv_struct_st_dm_mode+set}" = set; then : | |
17229 | $as_echo_n "(cached) " >&6 | |
17230 | else | |
17231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17232 | /* end confdefs.h. */ | |
17233 | ||
17234 | #include <sys/types.h> | |
17235 | #include <sys/stat.h> | |
17236 | int | |
17237 | main () | |
17238 | { | |
17239 | struct stat s; s.st_dm_mode; | |
17240 | ; | |
17241 | return 0; | |
17242 | } | |
17243 | _ACEOF | |
17244 | if ac_fn_c_try_compile "$LINENO"; then : | |
17245 | ac_cv_struct_st_dm_mode=yes | |
17246 | else | |
17247 | ac_cv_struct_st_dm_mode=no | |
17248 | fi | |
17249 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17250 | fi | |
17251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 | |
17252 | $as_echo "$ac_cv_struct_st_dm_mode" >&6; } | |
17253 | ||
17254 | if test $ac_cv_struct_st_dm_mode = yes; then | |
17255 | ||
17256 | $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h | |
17257 | ||
17258 | fi | |
17259 | ||
17260 | ||
17261 | ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" | |
17262 | if test "x$ac_cv_have_decl_strmode" = x""yes; then : | |
17263 | ac_have_decl=1 | |
17264 | else | |
17265 | ac_have_decl=0 | |
17266 | fi | |
17267 | ||
17268 | cat >>confdefs.h <<_ACEOF | |
17269 | #define HAVE_DECL_STRMODE $ac_have_decl | |
17270 | _ACEOF | |
17271 | ||
17272 | ||
17273 | ||
17274 | ||
17275 | ||
17276 | ||
17277 | GNULIB_FCHMODAT=0; | |
17278 | GNULIB_FSTAT=0; | |
17279 | GNULIB_FSTATAT=0; | |
17280 | GNULIB_FUTIMENS=0; | |
17281 | GNULIB_LCHMOD=0; | |
17282 | GNULIB_LSTAT=0; | |
17283 | GNULIB_MKDIRAT=0; | |
17284 | GNULIB_MKFIFO=0; | |
17285 | GNULIB_MKFIFOAT=0; | |
17286 | GNULIB_MKNOD=0; | |
17287 | GNULIB_MKNODAT=0; | |
17288 | GNULIB_STAT=0; | |
17289 | GNULIB_UTIMENSAT=0; | |
17290 | HAVE_FCHMODAT=1; | |
17291 | HAVE_FSTATAT=1; | |
17292 | HAVE_FUTIMENS=1; | |
17293 | HAVE_LCHMOD=1; | |
17294 | HAVE_LSTAT=1; | |
17295 | HAVE_MKDIRAT=1; | |
17296 | HAVE_MKFIFO=1; | |
17297 | HAVE_MKFIFOAT=1; | |
17298 | HAVE_MKNOD=1; | |
17299 | HAVE_MKNODAT=1; | |
17300 | HAVE_UTIMENSAT=1; | |
17301 | REPLACE_FSTAT=0; | |
17302 | REPLACE_FSTATAT=0; | |
17303 | REPLACE_FUTIMENS=0; | |
17304 | REPLACE_LSTAT=0; | |
17305 | REPLACE_MKDIR=0; | |
17306 | REPLACE_MKFIFO=0; | |
17307 | REPLACE_MKNOD=0; | |
17308 | REPLACE_STAT=0; | |
17309 | REPLACE_UTIMENSAT=0; | |
17310 | ||
17311 | ||
17312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | |
17313 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
17314 | if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : | |
17315 | $as_echo_n "(cached) " >&6 | |
17316 | else | |
17317 | rm -f conftest.sym conftest.file | |
17318 | echo >conftest.file | |
17319 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
17320 | if test "$cross_compiling" = yes; then : | |
17321 | case "$host_os" in | |
17322 | # Guess yes on glibc systems. | |
17323 | *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; | |
17324 | # If we don't know, assume the worst. | |
17325 | *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; | |
17326 | esac | |
17327 | ||
17328 | else | |
17329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17330 | /* end confdefs.h. */ | |
17331 | $ac_includes_default | |
17332 | int | |
17333 | main () | |
17334 | { | |
17335 | struct stat sbuf; | |
17336 | /* Linux will dereference the symlink and fail, as required by | |
17337 | POSIX. That is better in the sense that it means we will not | |
17338 | have to compile and use the lstat wrapper. */ | |
17339 | return lstat ("conftest.sym/", &sbuf) == 0; | |
17340 | ||
17341 | ; | |
17342 | return 0; | |
17343 | } | |
17344 | _ACEOF | |
17345 | if ac_fn_c_try_run "$LINENO"; then : | |
17346 | gl_cv_func_lstat_dereferences_slashed_symlink=yes | |
17347 | else | |
17348 | gl_cv_func_lstat_dereferences_slashed_symlink=no | |
17349 | fi | |
17350 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17351 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17352 | fi | |
17353 | ||
17354 | else | |
17355 | # If the 'ln -s' command failed, then we probably don't even | |
17356 | # have an lstat function. | |
17357 | gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" | |
17358 | fi | |
17359 | rm -f conftest.sym conftest.file | |
17360 | ||
17361 | fi | |
17362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 | |
17363 | $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
17364 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
17365 | *yes) | |
17366 | ||
17367 | cat >>confdefs.h <<_ACEOF | |
17368 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
17369 | _ACEOF | |
17370 | ||
17371 | ;; | |
17372 | esac | |
17373 | ||
17374 | ||
17375 | ||
17376 | ||
2407788f GM |
17377 | |
17378 | ||
d7ad186c GM |
17379 | GNULIB__EXIT=0; |
17380 | GNULIB_ATOLL=0; | |
17381 | GNULIB_CALLOC_POSIX=0; | |
17382 | GNULIB_CANONICALIZE_FILE_NAME=0; | |
17383 | GNULIB_GETLOADAVG=0; | |
17384 | GNULIB_GETSUBOPT=0; | |
17385 | GNULIB_GRANTPT=0; | |
5476a9a4 GM |
17386 | GNULIB_MALLOC_POSIX=0; |
17387 | GNULIB_MBTOWC=0; | |
17388 | GNULIB_MKDTEMP=0; | |
17389 | GNULIB_MKOSTEMP=0; | |
17390 | GNULIB_MKOSTEMPS=0; | |
17391 | GNULIB_MKSTEMP=0; | |
17392 | GNULIB_MKSTEMPS=0; | |
17393 | GNULIB_POSIX_OPENPT=0; | |
17394 | GNULIB_PTSNAME=0; | |
17395 | GNULIB_PTSNAME_R=0; | |
17396 | GNULIB_PUTENV=0; | |
17397 | GNULIB_RANDOM=0; | |
17398 | GNULIB_RANDOM_R=0; | |
17399 | GNULIB_REALLOC_POSIX=0; | |
17400 | GNULIB_REALPATH=0; | |
17401 | GNULIB_RPMATCH=0; | |
2cdd55fc | 17402 | GNULIB_SECURE_GETENV=0; |
5476a9a4 GM |
17403 | GNULIB_SETENV=0; |
17404 | GNULIB_STRTOD=0; | |
17405 | GNULIB_STRTOLL=0; | |
17406 | GNULIB_STRTOULL=0; | |
17407 | GNULIB_SYSTEM_POSIX=0; | |
17408 | GNULIB_UNLOCKPT=0; | |
17409 | GNULIB_UNSETENV=0; | |
17410 | GNULIB_WCTOMB=0; | |
17411 | HAVE__EXIT=1; | |
17412 | HAVE_ATOLL=1; | |
17413 | HAVE_CANONICALIZE_FILE_NAME=1; | |
17414 | HAVE_DECL_GETLOADAVG=1; | |
17415 | HAVE_GETSUBOPT=1; | |
17416 | HAVE_GRANTPT=1; | |
17417 | HAVE_MKDTEMP=1; | |
17418 | HAVE_MKOSTEMP=1; | |
17419 | HAVE_MKOSTEMPS=1; | |
17420 | HAVE_MKSTEMP=1; | |
17421 | HAVE_MKSTEMPS=1; | |
17422 | HAVE_POSIX_OPENPT=1; | |
17423 | HAVE_PTSNAME=1; | |
17424 | HAVE_PTSNAME_R=1; | |
17425 | HAVE_RANDOM=1; | |
17426 | HAVE_RANDOM_H=1; | |
17427 | HAVE_RANDOM_R=1; | |
17428 | HAVE_REALPATH=1; | |
17429 | HAVE_RPMATCH=1; | |
2cdd55fc | 17430 | HAVE_SECURE_GETENV=1; |
5476a9a4 GM |
17431 | HAVE_SETENV=1; |
17432 | HAVE_DECL_SETENV=1; | |
17433 | HAVE_STRTOD=1; | |
17434 | HAVE_STRTOLL=1; | |
17435 | HAVE_STRTOULL=1; | |
17436 | HAVE_STRUCT_RANDOM_DATA=1; | |
17437 | HAVE_SYS_LOADAVG_H=0; | |
17438 | HAVE_UNLOCKPT=1; | |
17439 | HAVE_DECL_UNSETENV=1; | |
17440 | REPLACE_CALLOC=0; | |
17441 | REPLACE_CANONICALIZE_FILE_NAME=0; | |
17442 | REPLACE_MALLOC=0; | |
17443 | REPLACE_MBTOWC=0; | |
17444 | REPLACE_MKSTEMP=0; | |
b6c9d18d | 17445 | REPLACE_PTSNAME=0; |
5476a9a4 GM |
17446 | REPLACE_PTSNAME_R=0; |
17447 | REPLACE_PUTENV=0; | |
17448 | REPLACE_RANDOM_R=0; | |
17449 | REPLACE_REALLOC=0; | |
17450 | REPLACE_REALPATH=0; | |
17451 | REPLACE_SETENV=0; | |
17452 | REPLACE_STRTOD=0; | |
17453 | REPLACE_UNSETENV=0; | |
17454 | REPLACE_WCTOMB=0; | |
f199cab1 GM |
17455 | |
17456 | ||
17457 | ||
f199cab1 GM |
17458 | |
17459 | ||
17460 | ||
17461 | ||
17462 | ||
17463 | ||
17464 | ||
17465 | ||
17466 | ||
17467 | ||
5f90be1b | 17468 | |
f199cab1 GM |
17469 | |
17470 | ||
17471 | if test $gl_cv_have_include_next = yes; then | |
5476a9a4 | 17472 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 17473 | else |
5476a9a4 GM |
17474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 |
17475 | $as_echo_n "checking absolute name of <getopt.h>... " >&6; } | |
17476 | if test "${gl_cv_next_getopt_h+set}" = set; then : | |
5f90be1b | 17477 | $as_echo_n "(cached) " >&6 |
5f90be1b | 17478 | else |
f199cab1 | 17479 | |
5476a9a4 | 17480 | if test $ac_cv_header_getopt_h = yes; then |
f199cab1 GM |
17481 | |
17482 | ||
17483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 17484 | /* end confdefs.h. */ |
5476a9a4 | 17485 | #include <getopt.h> |
4fda9c95 | 17486 | |
5f90be1b | 17487 | _ACEOF |
f199cab1 GM |
17488 | case "$host_os" in |
17489 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
17490 | *) gl_absname_cpp="$ac_cpp" ;; | |
17491 | esac | |
5f90be1b | 17492 | |
f199cab1 GM |
17493 | case "$host_os" in |
17494 | mingw*) | |
17495 | gl_dirsep_regex='[/\\]' | |
17496 | ;; | |
17497 | *) | |
17498 | gl_dirsep_regex='\/' | |
17499 | ;; | |
17500 | esac | |
17501 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
5f90be1b | 17502 | |
5476a9a4 | 17503 | gl_header_literal_regex=`echo 'getopt.h' \ |
f199cab1 GM |
17504 | | sed -e "$gl_make_literal_regex_sed"` |
17505 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
17506 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
17507 | s|^/[^/]|//&| | |
17508 | p | |
17509 | q | |
17510 | }' | |
5476a9a4 | 17511 | gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
f199cab1 GM |
17512 | sed -n "$gl_absolute_header_sed"`'"' |
17513 | else | |
5476a9a4 | 17514 | gl_cv_next_getopt_h='<'getopt.h'>' |
f199cab1 | 17515 | fi |
5f90be1b PE |
17516 | |
17517 | ||
3e0be4ab | 17518 | fi |
5476a9a4 GM |
17519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 |
17520 | $as_echo "$gl_cv_next_getopt_h" >&6; } | |
f199cab1 | 17521 | fi |
5476a9a4 | 17522 | NEXT_GETOPT_H=$gl_cv_next_getopt_h |
3e0be4ab | 17523 | |
f199cab1 GM |
17524 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
17525 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5476a9a4 | 17526 | gl_next_as_first_directive='<'getopt.h'>' |
f199cab1 GM |
17527 | else |
17528 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5476a9a4 | 17529 | gl_next_as_first_directive=$gl_cv_next_getopt_h |
f199cab1 | 17530 | fi |
5476a9a4 | 17531 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive |
f199cab1 GM |
17532 | |
17533 | ||
f199cab1 | 17534 | |
f199cab1 | 17535 | |
5476a9a4 GM |
17536 | if test $ac_cv_header_getopt_h = yes; then |
17537 | HAVE_GETOPT_H=1 | |
17538 | else | |
17539 | HAVE_GETOPT_H=0 | |
f199cab1 GM |
17540 | fi |
17541 | ||
f199cab1 | 17542 | |
5476a9a4 | 17543 | gl_replace_getopt= |
f199cab1 | 17544 | |
5476a9a4 GM |
17545 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
17546 | for ac_header in getopt.h | |
17547 | do : | |
17548 | ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" | |
17549 | if test "x$ac_cv_header_getopt_h" = x""yes; then : | |
17550 | cat >>confdefs.h <<_ACEOF | |
17551 | #define HAVE_GETOPT_H 1 | |
17552 | _ACEOF | |
f199cab1 | 17553 | |
5476a9a4 GM |
17554 | else |
17555 | gl_replace_getopt=yes | |
3e0be4ab | 17556 | fi |
3e0be4ab | 17557 | |
5476a9a4 | 17558 | done |
3e0be4ab | 17559 | |
5476a9a4 | 17560 | fi |
3e0be4ab | 17561 | |
5476a9a4 GM |
17562 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
17563 | for ac_func in getopt_long_only | |
17564 | do : | |
17565 | ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" | |
17566 | if test "x$ac_cv_func_getopt_long_only" = x""yes; then : | |
17567 | cat >>confdefs.h <<_ACEOF | |
17568 | #define HAVE_GETOPT_LONG_ONLY 1 | |
17569 | _ACEOF | |
3e0be4ab | 17570 | |
3e0be4ab | 17571 | else |
5476a9a4 | 17572 | gl_replace_getopt=yes |
3e0be4ab | 17573 | fi |
5476a9a4 | 17574 | done |
3e0be4ab | 17575 | |
f199cab1 | 17576 | fi |
3e0be4ab | 17577 | |
5476a9a4 GM |
17578 | if test -z "$gl_replace_getopt"; then |
17579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 | |
17580 | $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } | |
17581 | if test "${gl_cv_func_getopt_posix+set}" = set; then : | |
3e0be4ab | 17582 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
17583 | else |
17584 | ||
17585 | if test $cross_compiling = no; then | |
17586 | if test "$cross_compiling" = yes; then : | |
17587 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17588 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17589 | as_fn_error "cannot run test program while cross compiling | |
17590 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 17591 | else |
f199cab1 | 17592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 17593 | /* end confdefs.h. */ |
5476a9a4 GM |
17594 | |
17595 | #include <unistd.h> | |
17596 | #include <stdlib.h> | |
17597 | #include <string.h> | |
17598 | ||
f199cab1 GM |
17599 | int |
17600 | main () | |
17601 | { | |
5476a9a4 GM |
17602 | static char program[] = "program"; |
17603 | static char a[] = "-a"; | |
17604 | static char foo[] = "foo"; | |
17605 | static char bar[] = "bar"; | |
17606 | char *argv[] = { program, a, foo, bar, NULL }; | |
17607 | int c; | |
17608 | ||
17609 | c = getopt (4, argv, "ab"); | |
17610 | if (!(c == 'a')) | |
17611 | return 1; | |
17612 | c = getopt (4, argv, "ab"); | |
17613 | if (!(c == -1)) | |
17614 | return 2; | |
17615 | if (!(optind == 2)) | |
17616 | return 3; | |
f199cab1 GM |
17617 | return 0; |
17618 | } | |
17619 | ||
3e0be4ab | 17620 | _ACEOF |
5476a9a4 GM |
17621 | if ac_fn_c_try_run "$LINENO"; then : |
17622 | gl_cv_func_getopt_posix=maybe | |
3e0be4ab | 17623 | else |
5476a9a4 | 17624 | gl_cv_func_getopt_posix=no |
3e0be4ab | 17625 | fi |
5476a9a4 GM |
17626 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
17627 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
17628 | fi |
17629 | ||
5476a9a4 GM |
17630 | if test $gl_cv_func_getopt_posix = maybe; then |
17631 | if test "$cross_compiling" = yes; then : | |
17632 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17633 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17634 | as_fn_error "cannot run test program while cross compiling | |
17635 | See \`config.log' for more details." "$LINENO" 5; } | |
3e0be4ab | 17636 | else |
5476a9a4 GM |
17637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
17638 | /* end confdefs.h. */ | |
3e0be4ab | 17639 | |
5476a9a4 GM |
17640 | #include <unistd.h> |
17641 | #include <stdlib.h> | |
17642 | #include <string.h> | |
3e0be4ab | 17643 | |
5476a9a4 GM |
17644 | int |
17645 | main () | |
17646 | { | |
17647 | static char program[] = "program"; | |
17648 | static char donald[] = "donald"; | |
17649 | static char p[] = "-p"; | |
17650 | static char billy[] = "billy"; | |
17651 | static char duck[] = "duck"; | |
17652 | static char a[] = "-a"; | |
17653 | static char bar[] = "bar"; | |
17654 | char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; | |
17655 | int c; | |
3e0be4ab | 17656 | |
5476a9a4 GM |
17657 | c = getopt (7, argv, "+abp:q:"); |
17658 | if (!(c == -1)) | |
17659 | return 4; | |
17660 | if (!(strcmp (argv[0], "program") == 0)) | |
17661 | return 5; | |
17662 | if (!(strcmp (argv[1], "donald") == 0)) | |
17663 | return 6; | |
17664 | if (!(strcmp (argv[2], "-p") == 0)) | |
17665 | return 7; | |
17666 | if (!(strcmp (argv[3], "billy") == 0)) | |
17667 | return 8; | |
17668 | if (!(strcmp (argv[4], "duck") == 0)) | |
17669 | return 9; | |
17670 | if (!(strcmp (argv[5], "-a") == 0)) | |
17671 | return 10; | |
17672 | if (!(strcmp (argv[6], "bar") == 0)) | |
17673 | return 11; | |
17674 | if (!(optind == 1)) | |
17675 | return 12; | |
17676 | return 0; | |
17677 | } | |
3e0be4ab GM |
17678 | |
17679 | _ACEOF | |
5476a9a4 GM |
17680 | if ac_fn_c_try_run "$LINENO"; then : |
17681 | gl_cv_func_getopt_posix=maybe | |
17682 | else | |
17683 | gl_cv_func_getopt_posix=no | |
17684 | fi | |
17685 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17686 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17687 | fi | |
b0415a03 | 17688 | |
5476a9a4 GM |
17689 | fi |
17690 | if test $gl_cv_func_getopt_posix = maybe; then | |
17691 | if test "$cross_compiling" = yes; then : | |
17692 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
17693 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
17694 | as_fn_error "cannot run test program while cross compiling | |
17695 | See \`config.log' for more details." "$LINENO" 5; } | |
17696 | else | |
17697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17698 | /* end confdefs.h. */ | |
b0415a03 | 17699 | |
5476a9a4 GM |
17700 | #include <unistd.h> |
17701 | #include <stdlib.h> | |
17702 | #include <string.h> | |
3e0be4ab | 17703 | |
5476a9a4 GM |
17704 | int |
17705 | main () | |
17706 | { | |
17707 | static char program[] = "program"; | |
17708 | static char ab[] = "-ab"; | |
17709 | char *argv[3] = { program, ab, NULL }; | |
17710 | if (getopt (2, argv, "ab:") != 'a') | |
17711 | return 13; | |
17712 | if (getopt (2, argv, "ab:") != '?') | |
17713 | return 14; | |
17714 | if (optopt != 'b') | |
17715 | return 15; | |
17716 | if (optind != 2) | |
17717 | return 16; | |
17718 | return 0; | |
17719 | } | |
3e0be4ab | 17720 | |
5476a9a4 GM |
17721 | _ACEOF |
17722 | if ac_fn_c_try_run "$LINENO"; then : | |
17723 | gl_cv_func_getopt_posix=yes | |
17724 | else | |
17725 | gl_cv_func_getopt_posix=no | |
17726 | fi | |
17727 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17728 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3e0be4ab | 17729 | fi |
3e0be4ab | 17730 | |
5476a9a4 GM |
17731 | fi |
17732 | else | |
17733 | case "$host_os" in | |
17734 | darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; | |
17735 | *) gl_cv_func_getopt_posix="guessing yes";; | |
17736 | esac | |
17737 | fi | |
3e0be4ab | 17738 | |
5476a9a4 GM |
17739 | fi |
17740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 | |
17741 | $as_echo "$gl_cv_func_getopt_posix" >&6; } | |
17742 | case "$gl_cv_func_getopt_posix" in | |
17743 | *no) gl_replace_getopt=yes ;; | |
17744 | esac | |
3e0be4ab GM |
17745 | fi |
17746 | ||
5476a9a4 GM |
17747 | if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then |
17748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 | |
17749 | $as_echo_n "checking for working GNU getopt function... " >&6; } | |
17750 | if test "${gl_cv_func_getopt_gnu+set}" = set; then : | |
17751 | $as_echo_n "(cached) " >&6 | |
17752 | else | |
17753 | # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the | |
17754 | # optstring is necessary for programs like m4 that have POSIX-mandated | |
17755 | # semantics for supporting options interspersed with files. | |
17756 | # Also, since getopt_long is a GNU extension, we require optind=0. | |
17757 | # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; | |
17758 | # so take care to revert to the correct (non-)export state. | |
17759 | gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' | |
17760 | case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in | |
17761 | xx) gl_had_POSIXLY_CORRECT=exported ;; | |
17762 | x) gl_had_POSIXLY_CORRECT=yes ;; | |
17763 | *) gl_had_POSIXLY_CORRECT= ;; | |
17764 | esac | |
17765 | POSIXLY_CORRECT=1 | |
17766 | export POSIXLY_CORRECT | |
17767 | if test "$cross_compiling" = yes; then : | |
17768 | gl_cv_func_getopt_gnu="guessing no" | |
3e0be4ab | 17769 | |
5476a9a4 GM |
17770 | else |
17771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17772 | /* end confdefs.h. */ | |
17773 | #include <getopt.h> | |
17774 | #include <stddef.h> | |
17775 | #include <string.h> | |
3e0be4ab | 17776 | |
5476a9a4 GM |
17777 | #include <stdlib.h> |
17778 | #if defined __MACH__ && defined __APPLE__ | |
17779 | /* Avoid a crash on Mac OS X. */ | |
17780 | #include <mach/mach.h> | |
17781 | #include <mach/mach_error.h> | |
17782 | #include <mach/thread_status.h> | |
17783 | #include <mach/exception.h> | |
17784 | #include <mach/task.h> | |
17785 | #include <pthread.h> | |
17786 | /* The exception port on which our thread listens. */ | |
17787 | static mach_port_t our_exception_port; | |
17788 | /* The main function of the thread listening for exceptions of type | |
17789 | EXC_BAD_ACCESS. */ | |
17790 | static void * | |
17791 | mach_exception_thread (void *arg) | |
17792 | { | |
17793 | /* Buffer for a message to be received. */ | |
17794 | struct { | |
17795 | mach_msg_header_t head; | |
17796 | mach_msg_body_t msgh_body; | |
17797 | char data[1024]; | |
17798 | } msg; | |
17799 | mach_msg_return_t retval; | |
17800 | /* Wait for a message on the exception port. */ | |
17801 | retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), | |
17802 | our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | |
17803 | if (retval != MACH_MSG_SUCCESS) | |
17804 | abort (); | |
17805 | exit (1); | |
17806 | } | |
17807 | static void | |
17808 | nocrash_init (void) | |
17809 | { | |
17810 | mach_port_t self = mach_task_self (); | |
17811 | /* Allocate a port on which the thread shall listen for exceptions. */ | |
17812 | if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) | |
17813 | == KERN_SUCCESS) { | |
17814 | /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ | |
17815 | if (mach_port_insert_right (self, our_exception_port, our_exception_port, | |
17816 | MACH_MSG_TYPE_MAKE_SEND) | |
17817 | == KERN_SUCCESS) { | |
17818 | /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting | |
17819 | for us. */ | |
17820 | exception_mask_t mask = EXC_MASK_BAD_ACCESS; | |
17821 | /* Create the thread listening on the exception port. */ | |
17822 | pthread_attr_t attr; | |
17823 | pthread_t thread; | |
17824 | if (pthread_attr_init (&attr) == 0 | |
17825 | && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 | |
17826 | && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { | |
17827 | pthread_attr_destroy (&attr); | |
17828 | /* Replace the exception port info for these exceptions with our own. | |
17829 | Note that we replace the exception port for the entire task, not only | |
17830 | for a particular thread. This has the effect that when our exception | |
17831 | port gets the message, the thread specific exception port has already | |
17832 | been asked, and we don't need to bother about it. | |
17833 | See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ | |
17834 | task_set_exception_ports (self, mask, our_exception_port, | |
17835 | EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); | |
17836 | } | |
17837 | } | |
17838 | } | |
17839 | } | |
17840 | #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | |
17841 | /* Avoid a crash on native Windows. */ | |
17842 | #define WIN32_LEAN_AND_MEAN | |
17843 | #include <windows.h> | |
17844 | #include <winerror.h> | |
17845 | static LONG WINAPI | |
17846 | exception_filter (EXCEPTION_POINTERS *ExceptionInfo) | |
17847 | { | |
17848 | switch (ExceptionInfo->ExceptionRecord->ExceptionCode) | |
17849 | { | |
17850 | case EXCEPTION_ACCESS_VIOLATION: | |
17851 | case EXCEPTION_IN_PAGE_ERROR: | |
17852 | case EXCEPTION_STACK_OVERFLOW: | |
17853 | case EXCEPTION_GUARD_PAGE: | |
17854 | case EXCEPTION_PRIV_INSTRUCTION: | |
17855 | case EXCEPTION_ILLEGAL_INSTRUCTION: | |
17856 | case EXCEPTION_DATATYPE_MISALIGNMENT: | |
17857 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: | |
17858 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: | |
17859 | exit (1); | |
17860 | } | |
17861 | return EXCEPTION_CONTINUE_SEARCH; | |
17862 | } | |
17863 | static void | |
17864 | nocrash_init (void) | |
17865 | { | |
17866 | SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); | |
17867 | } | |
17868 | #else | |
17869 | /* Avoid a crash on POSIX systems. */ | |
17870 | #include <signal.h> | |
17871 | /* A POSIX signal handler. */ | |
17872 | static void | |
17873 | exception_handler (int sig) | |
17874 | { | |
17875 | exit (1); | |
17876 | } | |
17877 | static void | |
17878 | nocrash_init (void) | |
17879 | { | |
17880 | #ifdef SIGSEGV | |
17881 | signal (SIGSEGV, exception_handler); | |
17882 | #endif | |
17883 | #ifdef SIGBUS | |
17884 | signal (SIGBUS, exception_handler); | |
17885 | #endif | |
17886 | } | |
17887 | #endif | |
3e0be4ab | 17888 | |
3e0be4ab | 17889 | |
5476a9a4 GM |
17890 | int |
17891 | main () | |
17892 | { | |
3e0be4ab | 17893 | |
5476a9a4 | 17894 | int result = 0; |
3e0be4ab | 17895 | |
5476a9a4 | 17896 | nocrash_init(); |
3e0be4ab | 17897 | |
5476a9a4 GM |
17898 | /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, |
17899 | and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, | |
17900 | OSF/1 5.1, Solaris 10. */ | |
17901 | { | |
17902 | static char conftest[] = "conftest"; | |
17903 | static char plus[] = "-+"; | |
17904 | char *argv[3] = { conftest, plus, NULL }; | |
17905 | opterr = 0; | |
17906 | if (getopt (2, argv, "+a") != '?') | |
17907 | result |= 1; | |
17908 | } | |
17909 | /* This code succeeds on glibc 2.8, mingw, | |
17910 | and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, | |
17911 | IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ | |
17912 | { | |
17913 | static char program[] = "program"; | |
17914 | static char p[] = "-p"; | |
17915 | static char foo[] = "foo"; | |
17916 | static char bar[] = "bar"; | |
17917 | char *argv[] = { program, p, foo, bar, NULL }; | |
3e0be4ab | 17918 | |
5476a9a4 GM |
17919 | optind = 1; |
17920 | if (getopt (4, argv, "p::") != 'p') | |
17921 | result |= 2; | |
17922 | else if (optarg != NULL) | |
17923 | result |= 4; | |
17924 | else if (getopt (4, argv, "p::") != -1) | |
17925 | result |= 6; | |
17926 | else if (optind != 2) | |
17927 | result |= 8; | |
17928 | } | |
17929 | /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ | |
17930 | { | |
17931 | static char program[] = "program"; | |
17932 | static char foo[] = "foo"; | |
17933 | static char p[] = "-p"; | |
17934 | char *argv[] = { program, foo, p, NULL }; | |
17935 | optind = 0; | |
17936 | if (getopt (3, argv, "-p") != 1) | |
17937 | result |= 16; | |
17938 | else if (getopt (3, argv, "-p") != 'p') | |
17939 | result |= 16; | |
17940 | } | |
17941 | /* This code fails on glibc 2.11. */ | |
17942 | { | |
17943 | static char program[] = "program"; | |
17944 | static char b[] = "-b"; | |
17945 | static char a[] = "-a"; | |
17946 | char *argv[] = { program, b, a, NULL }; | |
17947 | optind = opterr = 0; | |
17948 | if (getopt (3, argv, "+:a:b") != 'b') | |
17949 | result |= 32; | |
17950 | else if (getopt (3, argv, "+:a:b") != ':') | |
17951 | result |= 32; | |
17952 | } | |
17953 | /* This code dumps core on glibc 2.14. */ | |
17954 | { | |
17955 | static char program[] = "program"; | |
17956 | static char w[] = "-W"; | |
17957 | static char dummy[] = "dummy"; | |
17958 | char *argv[] = { program, w, dummy, NULL }; | |
17959 | optind = opterr = 1; | |
17960 | if (getopt (3, argv, "W;") != 'W') | |
17961 | result |= 64; | |
17962 | } | |
17963 | return result; | |
3e0be4ab | 17964 | |
5476a9a4 GM |
17965 | ; |
17966 | return 0; | |
17967 | } | |
17968 | _ACEOF | |
17969 | if ac_fn_c_try_run "$LINENO"; then : | |
17970 | gl_cv_func_getopt_gnu=yes | |
17971 | else | |
17972 | gl_cv_func_getopt_gnu=no | |
17973 | fi | |
17974 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
17975 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
17976 | fi | |
3e0be4ab | 17977 | |
5476a9a4 GM |
17978 | case $gl_had_POSIXLY_CORRECT in |
17979 | exported) ;; | |
17980 | yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; | |
17981 | *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; | |
17982 | esac | |
3e0be4ab | 17983 | |
5476a9a4 GM |
17984 | fi |
17985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 | |
17986 | $as_echo "$gl_cv_func_getopt_gnu" >&6; } | |
17987 | if test "$gl_cv_func_getopt_gnu" != yes; then | |
17988 | gl_replace_getopt=yes | |
17989 | else | |
17990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 | |
17991 | $as_echo_n "checking for working GNU getopt_long function... " >&6; } | |
17992 | if test "${gl_cv_func_getopt_long_gnu+set}" = set; then : | |
f199cab1 GM |
17993 | $as_echo_n "(cached) " >&6 |
17994 | else | |
5476a9a4 GM |
17995 | if test "$cross_compiling" = yes; then : |
17996 | case "$host_os" in | |
17997 | openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; | |
17998 | *) gl_cv_func_getopt_long_gnu="guessing yes";; | |
17999 | esac | |
3e0be4ab GM |
18000 | |
18001 | else | |
18002 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18003 | /* end confdefs.h. */ | |
5476a9a4 GM |
18004 | #include <getopt.h> |
18005 | #include <stddef.h> | |
18006 | #include <string.h> | |
f199cab1 GM |
18007 | |
18008 | int | |
18009 | main () | |
369e19fc | 18010 | { |
5476a9a4 GM |
18011 | static const struct option long_options[] = |
18012 | { | |
18013 | { "xtremely-",no_argument, NULL, 1003 }, | |
18014 | { "xtra", no_argument, NULL, 1001 }, | |
18015 | { "xtreme", no_argument, NULL, 1002 }, | |
18016 | { "xtremely", no_argument, NULL, 1003 }, | |
18017 | { NULL, 0, NULL, 0 } | |
18018 | }; | |
18019 | /* This code fails on OpenBSD 5.0. */ | |
18020 | { | |
18021 | static char program[] = "program"; | |
18022 | static char xtremel[] = "--xtremel"; | |
18023 | char *argv[] = { program, xtremel, NULL }; | |
18024 | int option_index; | |
18025 | optind = 1; opterr = 0; | |
18026 | if (getopt_long (2, argv, "", long_options, &option_index) != 1003) | |
18027 | return 1; | |
18028 | } | |
18029 | return 0; | |
f199cab1 GM |
18030 | |
18031 | ; | |
18032 | return 0; | |
369e19fc | 18033 | } |
f199cab1 GM |
18034 | _ACEOF |
18035 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 18036 | gl_cv_func_getopt_long_gnu=yes |
f199cab1 | 18037 | else |
5476a9a4 | 18038 | gl_cv_func_getopt_long_gnu=no |
f199cab1 GM |
18039 | fi |
18040 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18041 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18042 | fi | |
18043 | ||
5476a9a4 | 18044 | |
f199cab1 | 18045 | fi |
5476a9a4 GM |
18046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 |
18047 | $as_echo "$gl_cv_func_getopt_long_gnu" >&6; } | |
18048 | case "$gl_cv_func_getopt_long_gnu" in | |
18049 | *yes) ;; | |
18050 | *) gl_replace_getopt=yes ;; | |
18051 | esac | |
18052 | fi | |
18053 | fi | |
f199cab1 | 18054 | |
f199cab1 | 18055 | |
f199cab1 | 18056 | |
369e19fc PE |
18057 | |
18058 | ||
5476a9a4 GM |
18059 | |
18060 | REPLACE_GETOPT=0 | |
18061 | if test -n "$gl_replace_getopt"; then | |
18062 | REPLACE_GETOPT=1 | |
f199cab1 | 18063 | fi |
3e0be4ab | 18064 | |
5476a9a4 | 18065 | if test $REPLACE_GETOPT = 1; then |
369e19fc | 18066 | |
5476a9a4 | 18067 | GETOPT_H=getopt.h |
369e19fc | 18068 | |
5476a9a4 | 18069 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h |
6ad6792b GM |
18070 | |
18071 | ||
f199cab1 | 18072 | |
5476a9a4 | 18073 | fi |
f199cab1 | 18074 | |
5476a9a4 GM |
18075 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" |
18076 | if test "x$ac_cv_have_decl_getenv" = x""yes; then : | |
18077 | ac_have_decl=1 | |
3e0be4ab | 18078 | else |
5476a9a4 | 18079 | ac_have_decl=0 |
3e0be4ab | 18080 | fi |
e275c824 | 18081 | |
5476a9a4 GM |
18082 | cat >>confdefs.h <<_ACEOF |
18083 | #define HAVE_DECL_GETENV $ac_have_decl | |
18084 | _ACEOF | |
18085 | ||
a6342fc8 | 18086 | : |
f199cab1 | 18087 | |
5476a9a4 GM |
18088 | |
18089 | ||
18090 | ||
18091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
18092 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
18093 | if test "${ac_cv_c_restrict+set}" = set; then : | |
18094 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 18095 | else |
5476a9a4 GM |
18096 | ac_cv_c_restrict=no |
18097 | # The order here caters to the fact that C++ does not require restrict. | |
18098 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
18099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 18100 | /* end confdefs.h. */ |
5476a9a4 GM |
18101 | typedef int * int_ptr; |
18102 | int foo (int_ptr $ac_kw ip) { | |
18103 | return ip[0]; | |
18104 | } | |
f199cab1 GM |
18105 | int |
18106 | main () | |
18107 | { | |
5476a9a4 GM |
18108 | int s[1]; |
18109 | int * $ac_kw t = s; | |
18110 | t[0] = 0; | |
18111 | return foo(t) | |
f199cab1 GM |
18112 | ; |
18113 | return 0; | |
18114 | } | |
18115 | _ACEOF | |
5476a9a4 GM |
18116 | if ac_fn_c_try_compile "$LINENO"; then : |
18117 | ac_cv_c_restrict=$ac_kw | |
f199cab1 | 18118 | fi |
5476a9a4 GM |
18119 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18120 | test "$ac_cv_c_restrict" != no && break | |
18121 | done | |
f199cab1 | 18122 | |
f199cab1 | 18123 | fi |
5476a9a4 GM |
18124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
18125 | $as_echo "$ac_cv_c_restrict" >&6; } | |
f199cab1 | 18126 | |
5476a9a4 GM |
18127 | case $ac_cv_c_restrict in |
18128 | restrict) ;; | |
18129 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
18130 | ;; | |
18131 | *) cat >>confdefs.h <<_ACEOF | |
18132 | #define restrict $ac_cv_c_restrict | |
18133 | _ACEOF | |
18134 | ;; | |
18135 | esac | |
f199cab1 | 18136 | |
f199cab1 | 18137 | |
5476a9a4 GM |
18138 | GNULIB_GETTIMEOFDAY=0; |
18139 | HAVE_GETTIMEOFDAY=1; | |
18140 | HAVE_STRUCT_TIMEVAL=1; | |
18141 | HAVE_SYS_TIME_H=1; | |
18142 | REPLACE_GETTIMEOFDAY=0; | |
18143 | REPLACE_STRUCT_TIMEVAL=0; | |
e275c824 | 18144 | |
e275c824 | 18145 | |
e275c824 | 18146 | |
e275c824 | 18147 | |
4fda9c95 | 18148 | |
5fa4ac76 | 18149 | |
5fa4ac76 | 18150 | |
5fa4ac76 | 18151 | |
f199cab1 GM |
18152 | |
18153 | ||
18154 | ||
5fa4ac76 | 18155 | |
5fa4ac76 | 18156 | |
5fa4ac76 | 18157 | |
5fa4ac76 | 18158 | |
5fa4ac76 | 18159 | |
5476a9a4 GM |
18160 | if test $gl_cv_have_include_next = yes; then |
18161 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
18162 | else | |
18163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 | |
18164 | $as_echo_n "checking absolute name of <sys/time.h>... " >&6; } | |
18165 | if test "${gl_cv_next_sys_time_h+set}" = set; then : | |
18166 | $as_echo_n "(cached) " >&6 | |
18167 | else | |
5fa4ac76 | 18168 | |
5476a9a4 | 18169 | if test $ac_cv_header_sys_time_h = yes; then |
5fa4ac76 PE |
18170 | |
18171 | ||
5476a9a4 GM |
18172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18173 | /* end confdefs.h. */ | |
18174 | #include <sys/time.h> | |
5fa4ac76 | 18175 | |
5476a9a4 GM |
18176 | _ACEOF |
18177 | case "$host_os" in | |
18178 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18179 | *) gl_absname_cpp="$ac_cpp" ;; | |
18180 | esac | |
1f5d53eb | 18181 | |
5476a9a4 GM |
18182 | case "$host_os" in |
18183 | mingw*) | |
18184 | gl_dirsep_regex='[/\\]' | |
18185 | ;; | |
18186 | *) | |
18187 | gl_dirsep_regex='\/' | |
18188 | ;; | |
18189 | esac | |
18190 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1f5d53eb | 18191 | |
5476a9a4 GM |
18192 | gl_header_literal_regex=`echo 'sys/time.h' \ |
18193 | | sed -e "$gl_make_literal_regex_sed"` | |
18194 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18195 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18196 | s|^/[^/]|//&| | |
18197 | p | |
18198 | q | |
18199 | }' | |
18200 | gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18201 | sed -n "$gl_absolute_header_sed"`'"' | |
18202 | else | |
18203 | gl_cv_next_sys_time_h='<'sys/time.h'>' | |
18204 | fi | |
1f5d53eb | 18205 | |
1f5d53eb | 18206 | |
5476a9a4 GM |
18207 | fi |
18208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 | |
18209 | $as_echo "$gl_cv_next_sys_time_h" >&6; } | |
18210 | fi | |
18211 | NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h | |
3e0be4ab | 18212 | |
5476a9a4 GM |
18213 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18214 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18215 | gl_next_as_first_directive='<'sys/time.h'>' | |
18216 | else | |
18217 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18218 | gl_next_as_first_directive=$gl_cv_next_sys_time_h | |
18219 | fi | |
18220 | NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive | |
3e0be4ab | 18221 | |
e275c824 | 18222 | |
3e0be4ab | 18223 | |
f199cab1 GM |
18224 | |
18225 | ||
5476a9a4 GM |
18226 | if test $ac_cv_header_sys_time_h != yes; then |
18227 | HAVE_SYS_TIME_H=0 | |
18228 | fi | |
f199cab1 GM |
18229 | |
18230 | ||
18231 | ||
18232 | ||
18233 | ||
5476a9a4 GM |
18234 | if test $ac_cv_header_sys_socket_h != yes; then |
18235 | for ac_header in winsock2.h | |
18236 | do : | |
18237 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
18238 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
18239 | cat >>confdefs.h <<_ACEOF | |
18240 | #define HAVE_WINSOCK2_H 1 | |
18241 | _ACEOF | |
f199cab1 | 18242 | |
5476a9a4 | 18243 | fi |
3e0be4ab | 18244 | |
5476a9a4 | 18245 | done |
3e0be4ab | 18246 | |
5476a9a4 GM |
18247 | fi |
18248 | if test "$ac_cv_header_winsock2_h" = yes; then | |
18249 | HAVE_WINSOCK2_H=1 | |
18250 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
18251 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
18252 | else | |
18253 | HAVE_WINSOCK2_H=0 | |
18254 | fi | |
18255 | ||
18256 | ||
18257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 | |
18258 | $as_echo_n "checking for struct timeval... " >&6; } | |
18259 | if test "${gl_cv_sys_struct_timeval+set}" = set; then : | |
18260 | $as_echo_n "(cached) " >&6 | |
18261 | else | |
18262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18263 | /* end confdefs.h. */ | |
18264 | #if HAVE_SYS_TIME_H | |
18265 | #include <sys/time.h> | |
18266 | #endif | |
18267 | #include <time.h> | |
18268 | #if HAVE_WINSOCK2_H | |
18269 | # include <winsock2.h> | |
18270 | #endif | |
f199cab1 | 18271 | |
5476a9a4 GM |
18272 | int |
18273 | main () | |
18274 | { | |
18275 | static struct timeval x; x.tv_sec = x.tv_usec; | |
18276 | ; | |
18277 | return 0; | |
18278 | } | |
18279 | _ACEOF | |
18280 | if ac_fn_c_try_compile "$LINENO"; then : | |
18281 | gl_cv_sys_struct_timeval=yes | |
18282 | else | |
18283 | gl_cv_sys_struct_timeval=no | |
f199cab1 | 18284 | fi |
5476a9a4 | 18285 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 18286 | |
5476a9a4 GM |
18287 | fi |
18288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 | |
18289 | $as_echo "$gl_cv_sys_struct_timeval" >&6; } | |
18290 | if test $gl_cv_sys_struct_timeval != yes; then | |
18291 | HAVE_STRUCT_TIMEVAL=0 | |
18292 | else | |
18293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 | |
18294 | $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } | |
18295 | if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then : | |
18296 | $as_echo_n "(cached) " >&6 | |
18297 | else | |
18298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18299 | /* end confdefs.h. */ | |
18300 | #if HAVE_SYS_TIME_H | |
18301 | #include <sys/time.h> | |
18302 | #endif | |
18303 | #include <time.h> | |
18304 | #if HAVE_WINSOCK2_H | |
18305 | # include <winsock2.h> | |
18306 | #endif | |
f199cab1 | 18307 | |
5476a9a4 GM |
18308 | int |
18309 | main () | |
18310 | { | |
18311 | static struct timeval x; | |
18312 | typedef int verify_tv_sec_type[ | |
18313 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | |
18314 | ]; | |
f199cab1 | 18315 | |
5476a9a4 GM |
18316 | ; |
18317 | return 0; | |
18318 | } | |
18319 | _ACEOF | |
18320 | if ac_fn_c_try_compile "$LINENO"; then : | |
18321 | gl_cv_sys_struct_timeval_tv_sec=yes | |
18322 | else | |
18323 | gl_cv_sys_struct_timeval_tv_sec=no | |
18324 | fi | |
18325 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
f199cab1 | 18326 | |
5476a9a4 GM |
18327 | fi |
18328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 | |
18329 | $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } | |
18330 | if test $gl_cv_sys_struct_timeval_tv_sec != yes; then | |
18331 | REPLACE_STRUCT_TIMEVAL=1 | |
18332 | fi | |
18333 | fi | |
f199cab1 | 18334 | |
f199cab1 GM |
18335 | |
18336 | ||
18337 | ||
18338 | ||
18339 | ||
f199cab1 | 18340 | |
5476a9a4 GM |
18341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 |
18342 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
18343 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
18344 | $as_echo_n "(cached) " >&6 | |
18345 | else | |
18346 | ac_cv_type_unsigned_long_long_int=yes | |
18347 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
18348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18349 | /* end confdefs.h. */ | |
f199cab1 | 18350 | |
5476a9a4 GM |
18351 | /* For now, do not test the preprocessor; as of 2007 there are too many |
18352 | implementations with broken preprocessors. Perhaps this can | |
18353 | be revisited in 2012. In the meantime, code should not expect | |
18354 | #if to work with literals wider than 32 bits. */ | |
18355 | /* Test literals. */ | |
18356 | long long int ll = 9223372036854775807ll; | |
18357 | long long int nll = -9223372036854775807LL; | |
18358 | unsigned long long int ull = 18446744073709551615ULL; | |
18359 | /* Test constant expressions. */ | |
18360 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
18361 | ? 1 : -1)]; | |
18362 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
18363 | ? 1 : -1)]; | |
18364 | int i = 63; | |
18365 | int | |
18366 | main () | |
18367 | { | |
18368 | /* Test availability of runtime routines for shift and division. */ | |
18369 | long long int llmax = 9223372036854775807ll; | |
18370 | unsigned long long int ullmax = 18446744073709551615ull; | |
18371 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
18372 | | (llmax / ll) | (llmax % ll) | |
18373 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
18374 | | (ullmax / ull) | (ullmax % ull)); | |
18375 | ; | |
18376 | return 0; | |
18377 | } | |
f199cab1 | 18378 | |
e275c824 | 18379 | _ACEOF |
5476a9a4 | 18380 | if ac_fn_c_try_link "$LINENO"; then : |
3e0be4ab | 18381 | |
5476a9a4 GM |
18382 | else |
18383 | ac_cv_type_unsigned_long_long_int=no | |
e275c824 | 18384 | fi |
5476a9a4 GM |
18385 | rm -f core conftest.err conftest.$ac_objext \ |
18386 | conftest$ac_exeext conftest.$ac_ext | |
18387 | fi | |
18388 | fi | |
18389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
18390 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
18391 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
e275c824 | 18392 | |
5476a9a4 | 18393 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 18394 | |
5476a9a4 | 18395 | fi |
e275c824 PE |
18396 | |
18397 | ||
f199cab1 | 18398 | |
5476a9a4 GM |
18399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
18400 | $as_echo_n "checking for long long int... " >&6; } | |
18401 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
18402 | $as_echo_n "(cached) " >&6 | |
18403 | else | |
18404 | ac_cv_type_long_long_int=yes | |
18405 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then | |
18406 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
18407 | if test $ac_cv_type_long_long_int = yes; then | |
18408 | if test "$cross_compiling" = yes; then : | |
f199cab1 | 18409 | : |
5476a9a4 GM |
18410 | else |
18411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18412 | /* end confdefs.h. */ | |
18413 | #include <limits.h> | |
18414 | #ifndef LLONG_MAX | |
18415 | # define HALF \ | |
18416 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
18417 | # define LLONG_MAX (HALF - 1 + HALF) | |
18418 | #endif | |
18419 | int | |
18420 | main () | |
18421 | { | |
18422 | long long int n = 1; | |
18423 | int i; | |
18424 | for (i = 0; ; i++) | |
18425 | { | |
18426 | long long int m = n << i; | |
18427 | if (m >> i != n) | |
18428 | return 1; | |
18429 | if (LLONG_MAX / 2 < m) | |
18430 | break; | |
18431 | } | |
18432 | return 0; | |
18433 | ; | |
18434 | return 0; | |
18435 | } | |
18436 | _ACEOF | |
18437 | if ac_fn_c_try_run "$LINENO"; then : | |
18438 | ||
18439 | else | |
18440 | ac_cv_type_long_long_int=no | |
18441 | fi | |
18442 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
18443 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
18444 | fi | |
e275c824 | 18445 | |
5476a9a4 GM |
18446 | fi |
18447 | fi | |
1f5d53eb | 18448 | fi |
5476a9a4 GM |
18449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 |
18450 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
18451 | if test $ac_cv_type_long_long_int = yes; then | |
e275c824 | 18452 | |
5476a9a4 | 18453 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h |
e275c824 | 18454 | |
5476a9a4 | 18455 | fi |
e275c824 PE |
18456 | |
18457 | ||
e275c824 PE |
18458 | |
18459 | ||
18460 | ||
18461 | ||
5476a9a4 GM |
18462 | gl_cv_c_multiarch=no |
18463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18464 | /* end confdefs.h. */ | |
18465 | #ifndef __APPLE_CC__ | |
18466 | not a universal capable compiler | |
18467 | #endif | |
18468 | typedef int dummy; | |
e275c824 | 18469 | |
5476a9a4 GM |
18470 | _ACEOF |
18471 | if ac_fn_c_try_compile "$LINENO"; then : | |
e275c824 | 18472 | |
5476a9a4 GM |
18473 | arch= |
18474 | prev= | |
18475 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
18476 | if test -n "$prev"; then | |
18477 | case $word in | |
18478 | i?86 | x86_64 | ppc | ppc64) | |
18479 | if test -z "$arch" || test "$arch" = "$word"; then | |
18480 | arch="$word" | |
18481 | else | |
18482 | gl_cv_c_multiarch=yes | |
18483 | fi | |
18484 | ;; | |
18485 | esac | |
18486 | prev= | |
18487 | else | |
18488 | if test "x$word" = "x-arch"; then | |
18489 | prev=arch | |
18490 | fi | |
18491 | fi | |
18492 | done | |
f199cab1 | 18493 | |
f199cab1 | 18494 | fi |
5476a9a4 GM |
18495 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
18496 | if test $gl_cv_c_multiarch = yes; then | |
18497 | APPLE_UNIVERSAL_BUILD=1 | |
18498 | else | |
18499 | APPLE_UNIVERSAL_BUILD=0 | |
18500 | fi | |
e275c824 PE |
18501 | |
18502 | ||
67342916 | 18503 | |
67342916 | 18504 | |
67342916 | 18505 | |
5476a9a4 GM |
18506 | if test $ac_cv_type_long_long_int = yes; then |
18507 | HAVE_LONG_LONG_INT=1 | |
18508 | else | |
18509 | HAVE_LONG_LONG_INT=0 | |
18510 | fi | |
e275c824 | 18511 | |
e275c824 | 18512 | |
5476a9a4 GM |
18513 | if test $ac_cv_type_unsigned_long_long_int = yes; then |
18514 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
18515 | else | |
18516 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
18517 | fi | |
e275c824 PE |
18518 | |
18519 | ||
18520 | ||
5476a9a4 GM |
18521 | if test $ac_cv_header_wchar_h = yes; then |
18522 | HAVE_WCHAR_H=1 | |
18523 | else | |
18524 | HAVE_WCHAR_H=0 | |
18525 | fi | |
e275c824 | 18526 | |
e275c824 | 18527 | |
5476a9a4 GM |
18528 | if test $ac_cv_header_inttypes_h = yes; then |
18529 | HAVE_INTTYPES_H=1 | |
18530 | else | |
18531 | HAVE_INTTYPES_H=0 | |
18532 | fi | |
6c051bab | 18533 | |
942f733f | 18534 | |
5476a9a4 GM |
18535 | if test $ac_cv_header_sys_types_h = yes; then |
18536 | HAVE_SYS_TYPES_H=1 | |
18537 | else | |
18538 | HAVE_SYS_TYPES_H=0 | |
18539 | fi | |
4fc2b746 | 18540 | |
4fc2b746 | 18541 | |
f199cab1 GM |
18542 | |
18543 | ||
18544 | ||
18545 | ||
18546 | ||
18547 | ||
18548 | ||
18549 | ||
18550 | ||
5476a9a4 GM |
18551 | if test $gl_cv_have_include_next = yes; then |
18552 | gl_cv_next_stdint_h='<'stdint.h'>' | |
18553 | else | |
18554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
18555 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
18556 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
18557 | $as_echo_n "(cached) " >&6 | |
18558 | else | |
f199cab1 | 18559 | |
5476a9a4 | 18560 | if test $ac_cv_header_stdint_h = yes; then |
f199cab1 GM |
18561 | |
18562 | ||
5476a9a4 GM |
18563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
18564 | /* end confdefs.h. */ | |
18565 | #include <stdint.h> | |
f199cab1 | 18566 | |
5476a9a4 GM |
18567 | _ACEOF |
18568 | case "$host_os" in | |
18569 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
18570 | *) gl_absname_cpp="$ac_cpp" ;; | |
18571 | esac | |
f199cab1 | 18572 | |
5476a9a4 GM |
18573 | case "$host_os" in |
18574 | mingw*) | |
18575 | gl_dirsep_regex='[/\\]' | |
18576 | ;; | |
18577 | *) | |
18578 | gl_dirsep_regex='\/' | |
18579 | ;; | |
18580 | esac | |
18581 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
4fc2b746 | 18582 | |
5476a9a4 GM |
18583 | gl_header_literal_regex=`echo 'stdint.h' \ |
18584 | | sed -e "$gl_make_literal_regex_sed"` | |
18585 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
18586 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
18587 | s|^/[^/]|//&| | |
18588 | p | |
18589 | q | |
18590 | }' | |
18591 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
18592 | sed -n "$gl_absolute_header_sed"`'"' | |
18593 | else | |
18594 | gl_cv_next_stdint_h='<'stdint.h'>' | |
18595 | fi | |
4fc2b746 | 18596 | |
4fc2b746 | 18597 | |
5476a9a4 GM |
18598 | fi |
18599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
18600 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
18601 | fi | |
18602 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
b0415a03 | 18603 | |
5476a9a4 GM |
18604 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
18605 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
18606 | gl_next_as_first_directive='<'stdint.h'>' | |
18607 | else | |
18608 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
18609 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
18610 | fi | |
18611 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
b0415a03 | 18612 | |
4fc2b746 | 18613 | |
f199cab1 | 18614 | |
f199cab1 | 18615 | |
5476a9a4 GM |
18616 | if test $ac_cv_header_stdint_h = yes; then |
18617 | HAVE_STDINT_H=1 | |
18618 | else | |
18619 | HAVE_STDINT_H=0 | |
18620 | fi | |
f199cab1 GM |
18621 | |
18622 | ||
5476a9a4 GM |
18623 | if test $ac_cv_header_stdint_h = yes; then |
18624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
18625 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
18626 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
f199cab1 GM |
18627 | $as_echo_n "(cached) " >&6 |
18628 | else | |
5476a9a4 GM |
18629 | gl_cv_header_working_stdint_h=no |
18630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18631 | /* end confdefs.h. */ | |
4fc2b746 GM |
18632 | |
18633 | ||
5476a9a4 GM |
18634 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
18635 | #include <stdint.h> | |
18636 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
18637 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
18638 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
18639 | #endif | |
4fc2b746 | 18640 | |
942f733f | 18641 | |
5476a9a4 GM |
18642 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
18643 | included before <wchar.h>. */ | |
18644 | #include <stddef.h> | |
18645 | #include <signal.h> | |
18646 | #if HAVE_WCHAR_H | |
18647 | # include <stdio.h> | |
18648 | # include <time.h> | |
18649 | # include <wchar.h> | |
18650 | #endif | |
e275c824 | 18651 | |
f199cab1 | 18652 | |
5476a9a4 GM |
18653 | #ifdef INT8_MAX |
18654 | int8_t a1 = INT8_MAX; | |
18655 | int8_t a1min = INT8_MIN; | |
18656 | #endif | |
18657 | #ifdef INT16_MAX | |
18658 | int16_t a2 = INT16_MAX; | |
18659 | int16_t a2min = INT16_MIN; | |
18660 | #endif | |
18661 | #ifdef INT32_MAX | |
18662 | int32_t a3 = INT32_MAX; | |
18663 | int32_t a3min = INT32_MIN; | |
18664 | #endif | |
18665 | #ifdef INT64_MAX | |
18666 | int64_t a4 = INT64_MAX; | |
18667 | int64_t a4min = INT64_MIN; | |
18668 | #endif | |
18669 | #ifdef UINT8_MAX | |
18670 | uint8_t b1 = UINT8_MAX; | |
18671 | #else | |
18672 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
18673 | #endif | |
18674 | #ifdef UINT16_MAX | |
18675 | uint16_t b2 = UINT16_MAX; | |
18676 | #endif | |
18677 | #ifdef UINT32_MAX | |
18678 | uint32_t b3 = UINT32_MAX; | |
18679 | #endif | |
18680 | #ifdef UINT64_MAX | |
18681 | uint64_t b4 = UINT64_MAX; | |
18682 | #endif | |
18683 | int_least8_t c1 = INT8_C (0x7f); | |
18684 | int_least8_t c1max = INT_LEAST8_MAX; | |
18685 | int_least8_t c1min = INT_LEAST8_MIN; | |
18686 | int_least16_t c2 = INT16_C (0x7fff); | |
18687 | int_least16_t c2max = INT_LEAST16_MAX; | |
18688 | int_least16_t c2min = INT_LEAST16_MIN; | |
18689 | int_least32_t c3 = INT32_C (0x7fffffff); | |
18690 | int_least32_t c3max = INT_LEAST32_MAX; | |
18691 | int_least32_t c3min = INT_LEAST32_MIN; | |
18692 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
18693 | int_least64_t c4max = INT_LEAST64_MAX; | |
18694 | int_least64_t c4min = INT_LEAST64_MIN; | |
18695 | uint_least8_t d1 = UINT8_C (0xff); | |
18696 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
18697 | uint_least16_t d2 = UINT16_C (0xffff); | |
18698 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
18699 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
18700 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
18701 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
18702 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
18703 | int_fast8_t e1 = INT_FAST8_MAX; | |
18704 | int_fast8_t e1min = INT_FAST8_MIN; | |
18705 | int_fast16_t e2 = INT_FAST16_MAX; | |
18706 | int_fast16_t e2min = INT_FAST16_MIN; | |
18707 | int_fast32_t e3 = INT_FAST32_MAX; | |
18708 | int_fast32_t e3min = INT_FAST32_MIN; | |
18709 | int_fast64_t e4 = INT_FAST64_MAX; | |
18710 | int_fast64_t e4min = INT_FAST64_MIN; | |
18711 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
18712 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
18713 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
18714 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
18715 | #ifdef INTPTR_MAX | |
18716 | intptr_t g = INTPTR_MAX; | |
18717 | intptr_t gmin = INTPTR_MIN; | |
18718 | #endif | |
18719 | #ifdef UINTPTR_MAX | |
18720 | uintptr_t h = UINTPTR_MAX; | |
18721 | #endif | |
18722 | intmax_t i = INTMAX_MAX; | |
18723 | uintmax_t j = UINTMAX_MAX; | |
5fa4ac76 | 18724 | |
5476a9a4 GM |
18725 | #include <limits.h> /* for CHAR_BIT */ |
18726 | #define TYPE_MINIMUM(t) \ | |
18727 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | |
18728 | #define TYPE_MAXIMUM(t) \ | |
18729 | ((t) ((t) 0 < (t) -1 \ | |
18730 | ? (t) -1 \ | |
18731 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | |
18732 | struct s { | |
18733 | int check_PTRDIFF: | |
18734 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
18735 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
18736 | ? 1 : -1; | |
18737 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
18738 | int check_SIG_ATOMIC: | |
18739 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
18740 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
18741 | ? 1 : -1; | |
18742 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
18743 | int check_WCHAR: | |
18744 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
18745 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
18746 | ? 1 : -1; | |
18747 | /* Detect bug in mingw. */ | |
18748 | int check_WINT: | |
18749 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
18750 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
18751 | ? 1 : -1; | |
5fa4ac76 | 18752 | |
5476a9a4 GM |
18753 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
18754 | int check_UINT8_C: | |
18755 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
18756 | int check_UINT16_C: | |
18757 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
18758 | ||
18759 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
18760 | #ifdef UINT8_MAX | |
18761 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
3e0be4ab | 18762 | #endif |
5476a9a4 GM |
18763 | #ifdef UINT16_MAX |
18764 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
18765 | #endif | |
18766 | #ifdef UINT32_MAX | |
18767 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
18768 | #endif | |
18769 | #ifdef UINT64_MAX | |
18770 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
18771 | #endif | |
18772 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
18773 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
18774 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
18775 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
18776 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
18777 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
18778 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
18779 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
18780 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
18781 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
18782 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
18783 | }; | |
18784 | ||
f199cab1 GM |
18785 | int |
18786 | main () | |
18787 | { | |
5476a9a4 | 18788 | |
f199cab1 GM |
18789 | ; |
18790 | return 0; | |
18791 | } | |
18792 | _ACEOF | |
5476a9a4 GM |
18793 | if ac_fn_c_try_compile "$LINENO"; then : |
18794 | if test "$cross_compiling" = yes; then : | |
18795 | gl_cv_header_working_stdint_h=yes | |
40e27e7f | 18796 | |
5476a9a4 GM |
18797 | else |
18798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18799 | /* end confdefs.h. */ | |
40e27e7f | 18800 | |
f199cab1 | 18801 | |
5476a9a4 GM |
18802 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
18803 | #include <stdint.h> | |
f199cab1 GM |
18804 | |
18805 | ||
5476a9a4 GM |
18806 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
18807 | included before <wchar.h>. */ | |
18808 | #include <stddef.h> | |
18809 | #include <signal.h> | |
18810 | #if HAVE_WCHAR_H | |
18811 | # include <stdio.h> | |
18812 | # include <time.h> | |
18813 | # include <wchar.h> | |
18814 | #endif | |
f199cab1 | 18815 | |
d87ffdb7 | 18816 | |
5476a9a4 GM |
18817 | #include <stdio.h> |
18818 | #include <string.h> | |
18819 | #define MVAL(macro) MVAL1(macro) | |
18820 | #define MVAL1(expression) #expression | |
18821 | static const char *macro_values[] = | |
18822 | { | |
18823 | #ifdef INT8_MAX | |
18824 | MVAL (INT8_MAX), | |
18825 | #endif | |
18826 | #ifdef INT16_MAX | |
18827 | MVAL (INT16_MAX), | |
18828 | #endif | |
18829 | #ifdef INT32_MAX | |
18830 | MVAL (INT32_MAX), | |
18831 | #endif | |
18832 | #ifdef INT64_MAX | |
18833 | MVAL (INT64_MAX), | |
18834 | #endif | |
18835 | #ifdef UINT8_MAX | |
18836 | MVAL (UINT8_MAX), | |
18837 | #endif | |
18838 | #ifdef UINT16_MAX | |
18839 | MVAL (UINT16_MAX), | |
18840 | #endif | |
18841 | #ifdef UINT32_MAX | |
18842 | MVAL (UINT32_MAX), | |
18843 | #endif | |
18844 | #ifdef UINT64_MAX | |
18845 | MVAL (UINT64_MAX), | |
18846 | #endif | |
18847 | NULL | |
18848 | }; | |
f199cab1 | 18849 | |
3e0be4ab GM |
18850 | int |
18851 | main () | |
18852 | { | |
5476a9a4 GM |
18853 | |
18854 | const char **mv; | |
18855 | for (mv = macro_values; *mv != NULL; mv++) | |
18856 | { | |
18857 | const char *value = *mv; | |
18858 | /* Test whether it looks like a cast expression. */ | |
18859 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
18860 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
18861 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
18862 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
18863 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
18864 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
18865 | return mv - macro_values + 1; | |
18866 | } | |
3e0be4ab | 18867 | return 0; |
5476a9a4 | 18868 | |
f199cab1 GM |
18869 | ; |
18870 | return 0; | |
18871 | } | |
18872 | _ACEOF | |
5476a9a4 GM |
18873 | if ac_fn_c_try_run "$LINENO"; then : |
18874 | gl_cv_header_working_stdint_h=yes | |
f199cab1 | 18875 | fi |
5476a9a4 GM |
18876 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
18877 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
18878 | fi |
18879 | ||
d87ffdb7 | 18880 | |
5476a9a4 GM |
18881 | fi |
18882 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
d87ffdb7 | 18883 | |
5476a9a4 GM |
18884 | fi |
18885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
18886 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
18887 | fi | |
18888 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
18889 | STDINT_H= | |
18890 | else | |
18891 | for ac_header in sys/inttypes.h sys/bitypes.h | |
18892 | do : | |
18893 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
18894 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
18895 | eval as_val=\$$as_ac_Header | |
18896 | if test "x$as_val" = x""yes; then : | |
18897 | cat >>confdefs.h <<_ACEOF | |
18898 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
18899 | _ACEOF | |
d87ffdb7 | 18900 | |
5476a9a4 | 18901 | fi |
d87ffdb7 | 18902 | |
5476a9a4 | 18903 | done |
7d2a1c5e | 18904 | |
5476a9a4 GM |
18905 | if test $ac_cv_header_sys_inttypes_h = yes; then |
18906 | HAVE_SYS_INTTYPES_H=1 | |
18907 | else | |
18908 | HAVE_SYS_INTTYPES_H=0 | |
18909 | fi | |
7d2a1c5e | 18910 | |
5476a9a4 GM |
18911 | if test $ac_cv_header_sys_bitypes_h = yes; then |
18912 | HAVE_SYS_BITYPES_H=1 | |
18913 | else | |
18914 | HAVE_SYS_BITYPES_H=0 | |
18915 | fi | |
7d2a1c5e | 18916 | |
f199cab1 GM |
18917 | |
18918 | ||
18919 | ||
5476a9a4 | 18920 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
f199cab1 GM |
18921 | |
18922 | ||
5476a9a4 GM |
18923 | for gltype in ptrdiff_t size_t ; do |
18924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
18925 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
18926 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
18927 | $as_echo_n "(cached) " >&6 | |
18928 | else | |
18929 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
18930 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
18931 | included before <wchar.h>. */ | |
18932 | #include <stddef.h> | |
18933 | #include <signal.h> | |
18934 | #if HAVE_WCHAR_H | |
18935 | # include <stdio.h> | |
18936 | # include <time.h> | |
18937 | # include <wchar.h> | |
18938 | #endif | |
f199cab1 | 18939 | |
5476a9a4 | 18940 | #include <limits.h>"; then : |
f199cab1 | 18941 | |
5476a9a4 GM |
18942 | else |
18943 | result=unknown | |
18944 | fi | |
f199cab1 | 18945 | |
5476a9a4 | 18946 | eval gl_cv_bitsizeof_${gltype}=\$result |
f199cab1 | 18947 | |
5476a9a4 GM |
18948 | fi |
18949 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
18950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18951 | $as_echo "$ac_res" >&6; } | |
18952 | eval result=\$gl_cv_bitsizeof_${gltype} | |
18953 | if test $result = unknown; then | |
18954 | result=0 | |
18955 | fi | |
18956 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
18957 | cat >>confdefs.h <<_ACEOF | |
18958 | #define BITSIZEOF_${GLTYPE} $result | |
18959 | _ACEOF | |
f199cab1 | 18960 | |
5476a9a4 GM |
18961 | eval BITSIZEOF_${GLTYPE}=\$result |
18962 | done | |
f199cab1 GM |
18963 | |
18964 | ||
5476a9a4 | 18965 | fi |
f199cab1 GM |
18966 | |
18967 | ||
5476a9a4 GM |
18968 | for gltype in sig_atomic_t wchar_t wint_t ; do |
18969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
18970 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
18971 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
18972 | $as_echo_n "(cached) " >&6 | |
18973 | else | |
18974 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
18975 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
18976 | included before <wchar.h>. */ | |
18977 | #include <stddef.h> | |
18978 | #include <signal.h> | |
18979 | #if HAVE_WCHAR_H | |
18980 | # include <stdio.h> | |
18981 | # include <time.h> | |
18982 | # include <wchar.h> | |
18983 | #endif | |
f199cab1 | 18984 | |
5476a9a4 | 18985 | #include <limits.h>"; then : |
f199cab1 | 18986 | |
f199cab1 | 18987 | else |
5476a9a4 | 18988 | result=unknown |
7d2a1c5e | 18989 | fi |
7d2a1c5e | 18990 | |
5476a9a4 | 18991 | eval gl_cv_bitsizeof_${gltype}=\$result |
7d2a1c5e | 18992 | |
3e0be4ab | 18993 | fi |
5476a9a4 GM |
18994 | eval ac_res=\$gl_cv_bitsizeof_${gltype} |
18995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
18996 | $as_echo "$ac_res" >&6; } | |
18997 | eval result=\$gl_cv_bitsizeof_${gltype} | |
18998 | if test $result = unknown; then | |
18999 | result=0 | |
19000 | fi | |
19001 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
19002 | cat >>confdefs.h <<_ACEOF | |
19003 | #define BITSIZEOF_${GLTYPE} $result | |
3e0be4ab | 19004 | _ACEOF |
7d2a1c5e | 19005 | |
5476a9a4 GM |
19006 | eval BITSIZEOF_${GLTYPE}=\$result |
19007 | done | |
7d2a1c5e GM |
19008 | |
19009 | ||
5476a9a4 GM |
19010 | |
19011 | ||
19012 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
19013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
19014 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
19015 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
3e0be4ab GM |
19016 | $as_echo_n "(cached) " >&6 |
19017 | else | |
f199cab1 GM |
19018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19019 | /* end confdefs.h. */ | |
f199cab1 | 19020 | |
5476a9a4 GM |
19021 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
19022 | included before <wchar.h>. */ | |
19023 | #include <stddef.h> | |
19024 | #include <signal.h> | |
19025 | #if HAVE_WCHAR_H | |
19026 | # include <stdio.h> | |
19027 | # include <time.h> | |
19028 | # include <wchar.h> | |
19029 | #endif | |
19030 | ||
19031 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
f199cab1 GM |
19032 | int |
19033 | main () | |
19034 | { | |
5476a9a4 | 19035 | |
f199cab1 GM |
19036 | ; |
19037 | return 0; | |
19038 | } | |
19039 | _ACEOF | |
19040 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 19041 | result=yes |
f199cab1 | 19042 | else |
5476a9a4 | 19043 | result=no |
f199cab1 GM |
19044 | fi |
19045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 | 19046 | eval gl_cv_type_${gltype}_signed=\$result |
7d2a1c5e | 19047 | |
3e0be4ab | 19048 | fi |
5476a9a4 GM |
19049 | eval ac_res=\$gl_cv_type_${gltype}_signed |
19050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
19051 | $as_echo "$ac_res" >&6; } | |
19052 | eval result=\$gl_cv_type_${gltype}_signed | |
19053 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
19054 | if test "$result" = yes; then | |
19055 | cat >>confdefs.h <<_ACEOF | |
19056 | #define HAVE_SIGNED_${GLTYPE} 1 | |
f199cab1 | 19057 | _ACEOF |
d87ffdb7 | 19058 | |
5476a9a4 GM |
19059 | eval HAVE_SIGNED_${GLTYPE}=1 |
19060 | else | |
19061 | eval HAVE_SIGNED_${GLTYPE}=0 | |
19062 | fi | |
19063 | done | |
f199cab1 | 19064 | |
e275c824 | 19065 | |
5476a9a4 GM |
19066 | gl_cv_type_ptrdiff_t_signed=yes |
19067 | gl_cv_type_size_t_signed=no | |
19068 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
e275c824 | 19069 | |
e275c824 | 19070 | |
5476a9a4 GM |
19071 | for gltype in ptrdiff_t size_t ; do |
19072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
19073 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
19074 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
16c3e636 PE |
19075 | $as_echo_n "(cached) " >&6 |
19076 | else | |
5476a9a4 GM |
19077 | eval gl_cv_type_${gltype}_suffix=no |
19078 | eval result=\$gl_cv_type_${gltype}_signed | |
19079 | if test "$result" = yes; then | |
19080 | glsufu= | |
19081 | else | |
19082 | glsufu=u | |
19083 | fi | |
19084 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
19085 | case $glsuf in | |
19086 | '') gltype1='int';; | |
19087 | l) gltype1='long int';; | |
19088 | ll) gltype1='long long int';; | |
19089 | i64) gltype1='__int64';; | |
19090 | u) gltype1='unsigned int';; | |
19091 | ul) gltype1='unsigned long int';; | |
19092 | ull) gltype1='unsigned long long int';; | |
19093 | ui64)gltype1='unsigned __int64';; | |
19094 | esac | |
19095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 19096 | /* end confdefs.h. */ |
16c3e636 | 19097 | |
5476a9a4 GM |
19098 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
19099 | included before <wchar.h>. */ | |
19100 | #include <stddef.h> | |
19101 | #include <signal.h> | |
19102 | #if HAVE_WCHAR_H | |
19103 | # include <stdio.h> | |
19104 | # include <time.h> | |
19105 | # include <wchar.h> | |
19106 | #endif | |
1f5d53eb | 19107 | |
5476a9a4 GM |
19108 | extern $gltype foo; |
19109 | extern $gltype1 foo; | |
f199cab1 GM |
19110 | int |
19111 | main () | |
19112 | { | |
5476a9a4 | 19113 | |
f199cab1 GM |
19114 | ; |
19115 | return 0; | |
19116 | } | |
19117 | _ACEOF | |
19118 | if ac_fn_c_try_compile "$LINENO"; then : | |
5476a9a4 | 19119 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
f199cab1 GM |
19120 | fi |
19121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476a9a4 GM |
19122 | eval result=\$gl_cv_type_${gltype}_suffix |
19123 | test "$result" != no && break | |
19124 | done | |
f199cab1 | 19125 | fi |
5476a9a4 GM |
19126 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
19127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
19128 | $as_echo "$ac_res" >&6; } | |
19129 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
19130 | eval result=\$gl_cv_type_${gltype}_suffix | |
19131 | test "$result" = no && result= | |
19132 | eval ${GLTYPE}_SUFFIX=\$result | |
19133 | cat >>confdefs.h <<_ACEOF | |
19134 | #define ${GLTYPE}_SUFFIX $result | |
19135 | _ACEOF | |
16c3e636 | 19136 | |
5476a9a4 | 19137 | done |
16c3e636 | 19138 | |
3e0be4ab | 19139 | |
5476a9a4 GM |
19140 | fi |
19141 | ||
19142 | ||
19143 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
19144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
19145 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
19146 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1fd182f0 PE |
19147 | $as_echo_n "(cached) " >&6 |
19148 | else | |
5476a9a4 GM |
19149 | eval gl_cv_type_${gltype}_suffix=no |
19150 | eval result=\$gl_cv_type_${gltype}_signed | |
19151 | if test "$result" = yes; then | |
19152 | glsufu= | |
19153 | else | |
19154 | glsufu=u | |
19155 | fi | |
19156 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
19157 | case $glsuf in | |
19158 | '') gltype1='int';; | |
19159 | l) gltype1='long int';; | |
19160 | ll) gltype1='long long int';; | |
19161 | i64) gltype1='__int64';; | |
19162 | u) gltype1='unsigned int';; | |
19163 | ul) gltype1='unsigned long int';; | |
19164 | ull) gltype1='unsigned long long int';; | |
19165 | ui64)gltype1='unsigned __int64';; | |
19166 | esac | |
19167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1fd182f0 | 19168 | /* end confdefs.h. */ |
5476a9a4 GM |
19169 | |
19170 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
19171 | included before <wchar.h>. */ | |
19172 | #include <stddef.h> | |
19173 | #include <signal.h> | |
19174 | #if HAVE_WCHAR_H | |
19175 | # include <stdio.h> | |
19176 | # include <time.h> | |
19177 | # include <wchar.h> | |
19178 | #endif | |
19179 | ||
19180 | extern $gltype foo; | |
19181 | extern $gltype1 foo; | |
1fd182f0 PE |
19182 | int |
19183 | main () | |
19184 | { | |
5476a9a4 | 19185 | |
1fd182f0 PE |
19186 | ; |
19187 | return 0; | |
19188 | } | |
19189 | _ACEOF | |
3e0be4ab | 19190 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 19191 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
1f5d53eb | 19192 | fi |
3e0be4ab | 19193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
19194 | eval result=\$gl_cv_type_${gltype}_suffix |
19195 | test "$result" != no && break | |
19196 | done | |
f199cab1 | 19197 | fi |
5476a9a4 GM |
19198 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
19199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
19200 | $as_echo "$ac_res" >&6; } | |
19201 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
19202 | eval result=\$gl_cv_type_${gltype}_suffix | |
19203 | test "$result" = no && result= | |
19204 | eval ${GLTYPE}_SUFFIX=\$result | |
19205 | cat >>confdefs.h <<_ACEOF | |
19206 | #define ${GLTYPE}_SUFFIX $result | |
f199cab1 GM |
19207 | _ACEOF |
19208 | ||
5476a9a4 | 19209 | done |
f199cab1 | 19210 | |
f199cab1 | 19211 | |
f199cab1 | 19212 | |
5476a9a4 GM |
19213 | if test $BITSIZEOF_WINT_T -lt 32; then |
19214 | BITSIZEOF_WINT_T=32 | |
19215 | fi | |
f199cab1 | 19216 | |
5476a9a4 GM |
19217 | STDINT_H=stdint.h |
19218 | fi | |
f199cab1 | 19219 | |
5476a9a4 GM |
19220 | if test -n "$STDINT_H"; then |
19221 | GL_GENERATE_STDINT_H_TRUE= | |
19222 | GL_GENERATE_STDINT_H_FALSE='#' | |
19223 | else | |
19224 | GL_GENERATE_STDINT_H_TRUE='#' | |
19225 | GL_GENERATE_STDINT_H_FALSE= | |
f199cab1 GM |
19226 | fi |
19227 | ||
f199cab1 | 19228 | |
f199cab1 | 19229 | |
3e0be4ab | 19230 | |
f199cab1 | 19231 | |
5476a9a4 GM |
19232 | GNULIB_IMAXABS=0; |
19233 | GNULIB_IMAXDIV=0; | |
19234 | GNULIB_STRTOIMAX=0; | |
19235 | GNULIB_STRTOUMAX=0; | |
19236 | HAVE_DECL_IMAXABS=1; | |
19237 | HAVE_DECL_IMAXDIV=1; | |
19238 | HAVE_DECL_STRTOIMAX=1; | |
19239 | HAVE_DECL_STRTOUMAX=1; | |
19240 | REPLACE_STRTOIMAX=0; | |
19241 | INT32_MAX_LT_INTMAX_MAX=1; | |
19242 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; | |
19243 | PRI_MACROS_BROKEN=0; | |
19244 | PRIPTR_PREFIX=__PRIPTR_PREFIX; | |
19245 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
19246 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | |
1fd182f0 | 19247 | |
1fd182f0 | 19248 | |
1f5d53eb | 19249 | |
3e0be4ab GM |
19250 | |
19251 | ||
1fd182f0 | 19252 | |
3e0be4ab | 19253 | |
3e0be4ab | 19254 | |
f199cab1 | 19255 | |
1fd182f0 | 19256 | |
1f5d53eb | 19257 | |
1f5d53eb | 19258 | |
1f5d53eb | 19259 | |
3e0be4ab | 19260 | |
3e0be4ab | 19261 | |
5476a9a4 GM |
19262 | if test $gl_cv_have_include_next = yes; then |
19263 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
19264 | else | |
19265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | |
19266 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
19267 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
19268 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 19269 | else |
2b1928b8 | 19270 | |
5476a9a4 | 19271 | if test $ac_cv_header_inttypes_h = yes; then |
3e0be4ab GM |
19272 | |
19273 | ||
5476a9a4 | 19274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 19275 | /* end confdefs.h. */ |
5476a9a4 | 19276 | #include <inttypes.h> |
3e0be4ab | 19277 | |
f199cab1 | 19278 | _ACEOF |
5476a9a4 GM |
19279 | case "$host_os" in |
19280 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19281 | *) gl_absname_cpp="$ac_cpp" ;; | |
19282 | esac | |
1fd182f0 | 19283 | |
5476a9a4 GM |
19284 | case "$host_os" in |
19285 | mingw*) | |
19286 | gl_dirsep_regex='[/\\]' | |
19287 | ;; | |
19288 | *) | |
19289 | gl_dirsep_regex='\/' | |
19290 | ;; | |
19291 | esac | |
19292 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
1fd182f0 | 19293 | |
5476a9a4 GM |
19294 | gl_header_literal_regex=`echo 'inttypes.h' \ |
19295 | | sed -e "$gl_make_literal_regex_sed"` | |
19296 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19297 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19298 | s|^/[^/]|//&| | |
19299 | p | |
19300 | q | |
19301 | }' | |
19302 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19303 | sed -n "$gl_absolute_header_sed"`'"' | |
19304 | else | |
19305 | gl_cv_next_inttypes_h='<'inttypes.h'>' | |
19306 | fi | |
1fd182f0 PE |
19307 | |
19308 | ||
5476a9a4 GM |
19309 | fi |
19310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | |
19311 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
19312 | fi | |
19313 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | |
1fd182f0 | 19314 | |
5476a9a4 GM |
19315 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19316 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19317 | gl_next_as_first_directive='<'inttypes.h'>' | |
19318 | else | |
19319 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19320 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | |
19321 | fi | |
19322 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | |
34119902 GM |
19323 | |
19324 | ||
3e0be4ab | 19325 | |
34119902 | 19326 | |
3e0be4ab | 19327 | |
34119902 | 19328 | |
b0415a03 | 19329 | |
b0415a03 | 19330 | |
3e0be4ab | 19331 | |
34119902 | 19332 | |
34119902 | 19333 | |
5476a9a4 GM |
19334 | case "$host_os" in |
19335 | mingw*) | |
19336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 | |
19337 | $as_echo_n "checking for 64-bit off_t... " >&6; } | |
19338 | if test "${gl_cv_type_off_t_64+set}" = set; then : | |
f199cab1 GM |
19339 | $as_echo_n "(cached) " >&6 |
19340 | else | |
5476a9a4 GM |
19341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19342 | /* end confdefs.h. */ | |
19343 | #include <sys/types.h> | |
19344 | int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; | |
19345 | ||
19346 | int | |
19347 | main () | |
19348 | { | |
19349 | ||
19350 | ; | |
19351 | return 0; | |
19352 | } | |
f199cab1 | 19353 | _ACEOF |
5476a9a4 GM |
19354 | if ac_fn_c_try_compile "$LINENO"; then : |
19355 | gl_cv_type_off_t_64=yes | |
19356 | else | |
19357 | gl_cv_type_off_t_64=no | |
f199cab1 | 19358 | fi |
5476a9a4 | 19359 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
34119902 | 19360 | |
5476a9a4 GM |
19361 | fi |
19362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 | |
19363 | $as_echo "$gl_cv_type_off_t_64" >&6; } | |
19364 | if test $gl_cv_type_off_t_64 = no; then | |
19365 | WINDOWS_64_BIT_OFF_T=1 | |
19366 | else | |
19367 | WINDOWS_64_BIT_OFF_T=0 | |
19368 | fi | |
19369 | WINDOWS_64_BIT_ST_SIZE=1 | |
19370 | ;; | |
19371 | *) | |
19372 | WINDOWS_64_BIT_OFF_T=0 | |
19373 | WINDOWS_64_BIT_ST_SIZE=0 | |
19374 | ;; | |
19375 | esac | |
34119902 GM |
19376 | |
19377 | ||
34119902 GM |
19378 | |
19379 | ||
283c7aed GM |
19380 | GNULIB_FFSL=0; |
19381 | GNULIB_FFSLL=0; | |
19382 | GNULIB_MEMCHR=0; | |
19383 | GNULIB_MEMMEM=0; | |
19384 | GNULIB_MEMPCPY=0; | |
19385 | GNULIB_MEMRCHR=0; | |
19386 | GNULIB_RAWMEMCHR=0; | |
19387 | GNULIB_STPCPY=0; | |
19388 | GNULIB_STPNCPY=0; | |
19389 | GNULIB_STRCHRNUL=0; | |
19390 | GNULIB_STRDUP=0; | |
19391 | GNULIB_STRNCAT=0; | |
19392 | GNULIB_STRNDUP=0; | |
19393 | GNULIB_STRNLEN=0; | |
19394 | GNULIB_STRPBRK=0; | |
19395 | GNULIB_STRSEP=0; | |
19396 | GNULIB_STRSTR=0; | |
19397 | GNULIB_STRCASESTR=0; | |
19398 | GNULIB_STRTOK_R=0; | |
19399 | GNULIB_MBSLEN=0; | |
19400 | GNULIB_MBSNLEN=0; | |
19401 | GNULIB_MBSCHR=0; | |
19402 | GNULIB_MBSRCHR=0; | |
19403 | GNULIB_MBSSTR=0; | |
19404 | GNULIB_MBSCASECMP=0; | |
19405 | GNULIB_MBSNCASECMP=0; | |
19406 | GNULIB_MBSPCASECMP=0; | |
19407 | GNULIB_MBSCASESTR=0; | |
19408 | GNULIB_MBSCSPN=0; | |
19409 | GNULIB_MBSPBRK=0; | |
19410 | GNULIB_MBSSPN=0; | |
19411 | GNULIB_MBSSEP=0; | |
19412 | GNULIB_MBSTOK_R=0; | |
19413 | GNULIB_STRERROR=0; | |
19414 | GNULIB_STRERROR_R=0; | |
19415 | GNULIB_STRSIGNAL=0; | |
19416 | GNULIB_STRVERSCMP=0; | |
19417 | HAVE_MBSLEN=0; | |
19418 | HAVE_FFSL=1; | |
19419 | HAVE_FFSLL=1; | |
19420 | HAVE_MEMCHR=1; | |
19421 | HAVE_DECL_MEMMEM=1; | |
19422 | HAVE_MEMPCPY=1; | |
19423 | HAVE_DECL_MEMRCHR=1; | |
19424 | HAVE_RAWMEMCHR=1; | |
19425 | HAVE_STPCPY=1; | |
19426 | HAVE_STPNCPY=1; | |
19427 | HAVE_STRCHRNUL=1; | |
19428 | HAVE_DECL_STRDUP=1; | |
19429 | HAVE_DECL_STRNDUP=1; | |
19430 | HAVE_DECL_STRNLEN=1; | |
19431 | HAVE_STRPBRK=1; | |
19432 | HAVE_STRSEP=1; | |
19433 | HAVE_STRCASESTR=1; | |
19434 | HAVE_DECL_STRTOK_R=1; | |
19435 | HAVE_DECL_STRERROR_R=1; | |
19436 | HAVE_DECL_STRSIGNAL=1; | |
19437 | HAVE_STRVERSCMP=1; | |
19438 | REPLACE_MEMCHR=0; | |
19439 | REPLACE_MEMMEM=0; | |
19440 | REPLACE_STPNCPY=0; | |
19441 | REPLACE_STRDUP=0; | |
19442 | REPLACE_STRSTR=0; | |
19443 | REPLACE_STRCASESTR=0; | |
19444 | REPLACE_STRCHRNUL=0; | |
19445 | REPLACE_STRERROR=0; | |
19446 | REPLACE_STRERROR_R=0; | |
19447 | REPLACE_STRNCAT=0; | |
19448 | REPLACE_STRNDUP=0; | |
19449 | REPLACE_STRNLEN=0; | |
19450 | REPLACE_STRSIGNAL=0; | |
19451 | REPLACE_STRTOK_R=0; | |
19452 | UNDEFINE_STRTOK_R=0; | |
19453 | ||
19454 | ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" | |
19455 | if test "x$ac_cv_have_decl_memrchr" = x""yes; then : | |
19456 | ac_have_decl=1 | |
19457 | else | |
19458 | ac_have_decl=0 | |
19459 | fi | |
19460 | ||
19461 | cat >>confdefs.h <<_ACEOF | |
19462 | #define HAVE_DECL_MEMRCHR $ac_have_decl | |
19463 | _ACEOF | |
19464 | ||
19465 | ||
5476a9a4 GM |
19466 | GNULIB_MKTIME=0; |
19467 | GNULIB_NANOSLEEP=0; | |
19468 | GNULIB_STRPTIME=0; | |
19469 | GNULIB_TIMEGM=0; | |
19470 | GNULIB_TIME_R=0; | |
19471 | HAVE_DECL_LOCALTIME_R=1; | |
19472 | HAVE_NANOSLEEP=1; | |
19473 | HAVE_STRPTIME=1; | |
19474 | HAVE_TIMEGM=1; | |
19475 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | |
19476 | REPLACE_MKTIME=GNULIB_PORTCHECK; | |
19477 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | |
19478 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | |
34119902 | 19479 | |
2393bc74 GM |
19480 | ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" |
19481 | if test "x$ac_cv_have_decl_alarm" = x""yes; then : | |
19482 | ac_have_decl=1 | |
19483 | else | |
19484 | ac_have_decl=0 | |
19485 | fi | |
3e0be4ab | 19486 | |
2393bc74 GM |
19487 | cat >>confdefs.h <<_ACEOF |
19488 | #define HAVE_DECL_ALARM $ac_have_decl | |
19489 | _ACEOF | |
3e0be4ab GM |
19490 | |
19491 | ||
5476a9a4 GM |
19492 | GNULIB_PSELECT=0; |
19493 | GNULIB_SELECT=0; | |
19494 | HAVE_PSELECT=1; | |
19495 | REPLACE_PSELECT=0; | |
19496 | REPLACE_SELECT=0; | |
19497 | ||
19498 | ||
3e0be4ab | 19499 | |
5476a9a4 GM |
19500 | |
19501 | ||
19502 | ||
19503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 | |
19504 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
19505 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
f199cab1 | 19506 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 19507 | else |
5476a9a4 GM |
19508 | |
19509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 19510 | /* end confdefs.h. */ |
5476a9a4 | 19511 | #include <sys/select.h> |
3e0be4ab GM |
19512 | int |
19513 | main () | |
19514 | { | |
5476a9a4 | 19515 | struct timeval b; |
3e0be4ab GM |
19516 | ; |
19517 | return 0; | |
19518 | } | |
34119902 | 19519 | _ACEOF |
f199cab1 | 19520 | if ac_fn_c_try_compile "$LINENO"; then : |
5476a9a4 | 19521 | gl_cv_header_sys_select_h_selfcontained=yes |
3e0be4ab | 19522 | else |
5476a9a4 | 19523 | gl_cv_header_sys_select_h_selfcontained=no |
3e0be4ab | 19524 | fi |
f199cab1 | 19525 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5476a9a4 GM |
19526 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then |
19527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19528 | /* end confdefs.h. */ | |
19529 | #include <sys/select.h> | |
19530 | int | |
19531 | main () | |
19532 | { | |
19533 | int memset; int bzero; | |
19534 | ; | |
19535 | return 0; | |
19536 | } | |
3e0be4ab | 19537 | |
5476a9a4 GM |
19538 | _ACEOF |
19539 | if ac_fn_c_try_compile "$LINENO"; then : | |
f199cab1 GM |
19540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
19541 | /* end confdefs.h. */ | |
5476a9a4 | 19542 | #include <sys/select.h> |
f199cab1 GM |
19543 | int |
19544 | main () | |
19545 | { | |
5476a9a4 GM |
19546 | |
19547 | #undef memset | |
19548 | #define memset nonexistent_memset | |
19549 | extern | |
19550 | #ifdef __cplusplus | |
19551 | "C" | |
19552 | #endif | |
19553 | void *memset (void *, int, unsigned long); | |
19554 | #undef bzero | |
19555 | #define bzero nonexistent_bzero | |
19556 | extern | |
19557 | #ifdef __cplusplus | |
19558 | "C" | |
19559 | #endif | |
19560 | void bzero (void *, unsigned long); | |
19561 | fd_set fds; | |
19562 | FD_ZERO (&fds); | |
19563 | ||
f199cab1 GM |
19564 | ; |
19565 | return 0; | |
19566 | } | |
5476a9a4 | 19567 | |
f199cab1 | 19568 | _ACEOF |
5476a9a4 GM |
19569 | if ac_fn_c_try_link "$LINENO"; then : |
19570 | ||
f199cab1 | 19571 | else |
5476a9a4 | 19572 | gl_cv_header_sys_select_h_selfcontained=no |
f199cab1 | 19573 | fi |
5476a9a4 GM |
19574 | rm -f core conftest.err conftest.$ac_objext \ |
19575 | conftest$ac_exeext conftest.$ac_ext | |
1fd182f0 | 19576 | |
f199cab1 | 19577 | fi |
5476a9a4 GM |
19578 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
19579 | fi | |
1fd182f0 | 19580 | |
f199cab1 | 19581 | fi |
5476a9a4 GM |
19582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 |
19583 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
1fd182f0 PE |
19584 | |
19585 | ||
b06b1098 | 19586 | |
0eb775a3 GM |
19587 | |
19588 | ||
b06b1098 | 19589 | |
1fd182f0 | 19590 | |
1fd182f0 | 19591 | |
5476a9a4 GM |
19592 | |
19593 | if test $gl_cv_have_include_next = yes; then | |
19594 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
19595 | else | |
19596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
19597 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
19598 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
f199cab1 | 19599 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 19600 | else |
1fd182f0 | 19601 | |
5476a9a4 GM |
19602 | if test $ac_cv_header_sys_select_h = yes; then |
19603 | ||
19604 | ||
19605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19606 | /* end confdefs.h. */ | |
19607 | #include <sys/select.h> | |
19608 | ||
19609 | _ACEOF | |
19610 | case "$host_os" in | |
19611 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
19612 | *) gl_absname_cpp="$ac_cpp" ;; | |
19613 | esac | |
19614 | ||
19615 | case "$host_os" in | |
19616 | mingw*) | |
19617 | gl_dirsep_regex='[/\\]' | |
19618 | ;; | |
19619 | *) | |
19620 | gl_dirsep_regex='\/' | |
19621 | ;; | |
19622 | esac | |
19623 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
19624 | ||
19625 | gl_header_literal_regex=`echo 'sys/select.h' \ | |
19626 | | sed -e "$gl_make_literal_regex_sed"` | |
19627 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
19628 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
19629 | s|^/[^/]|//&| | |
19630 | p | |
19631 | q | |
19632 | }' | |
19633 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
19634 | sed -n "$gl_absolute_header_sed"`'"' | |
19635 | else | |
19636 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
19637 | fi | |
1fd182f0 | 19638 | |
3e0be4ab | 19639 | |
1f5d53eb | 19640 | fi |
5476a9a4 GM |
19641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 |
19642 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
19643 | fi | |
19644 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
1fd182f0 | 19645 | |
5476a9a4 GM |
19646 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
19647 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
19648 | gl_next_as_first_directive='<'sys/select.h'>' | |
19649 | else | |
19650 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
19651 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
19652 | fi | |
19653 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
1fd182f0 PE |
19654 | |
19655 | ||
5476a9a4 GM |
19656 | |
19657 | ||
19658 | if test $ac_cv_header_sys_select_h = yes; then | |
19659 | HAVE_SYS_SELECT_H=1 | |
19660 | else | |
19661 | HAVE_SYS_SELECT_H=0 | |
19662 | fi | |
19663 | ||
19664 | ||
19665 | ||
19666 | ||
19667 | ||
19668 | if test $ac_cv_header_sys_socket_h != yes; then | |
19669 | for ac_header in winsock2.h | |
19670 | do : | |
19671 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
19672 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
19673 | cat >>confdefs.h <<_ACEOF | |
19674 | #define HAVE_WINSOCK2_H 1 | |
f199cab1 | 19675 | _ACEOF |
5476a9a4 | 19676 | |
f199cab1 | 19677 | fi |
3e0be4ab | 19678 | |
5476a9a4 | 19679 | done |
3e0be4ab | 19680 | |
5476a9a4 GM |
19681 | fi |
19682 | if test "$ac_cv_header_winsock2_h" = yes; then | |
19683 | HAVE_WINSOCK2_H=1 | |
19684 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
19685 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
19686 | else | |
19687 | HAVE_WINSOCK2_H=0 | |
19688 | fi | |
f199cab1 | 19689 | |
f199cab1 | 19690 | |
f199cab1 | 19691 | |
f199cab1 | 19692 | |
3e0be4ab | 19693 | |
3e0be4ab | 19694 | |
3e0be4ab | 19695 | |
3e0be4ab | 19696 | |
5476a9a4 GM |
19697 | GNULIB_PTHREAD_SIGMASK=0; |
19698 | GNULIB_RAISE=0; | |
19699 | GNULIB_SIGNAL_H_SIGPIPE=0; | |
19700 | GNULIB_SIGPROCMASK=0; | |
19701 | GNULIB_SIGACTION=0; | |
19702 | HAVE_POSIX_SIGNALBLOCKING=1; | |
19703 | HAVE_PTHREAD_SIGMASK=1; | |
19704 | HAVE_RAISE=1; | |
19705 | HAVE_SIGSET_T=1; | |
19706 | HAVE_SIGINFO_T=1; | |
19707 | HAVE_SIGACTION=1; | |
19708 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; | |
19709 | ||
19710 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; | |
f199cab1 | 19711 | |
5476a9a4 GM |
19712 | HAVE_SIGHANDLER_T=1; |
19713 | REPLACE_PTHREAD_SIGMASK=0; | |
19714 | REPLACE_RAISE=0; | |
1f5d53eb | 19715 | |
1fd182f0 | 19716 | |
b06b1098 | 19717 | |
1fd182f0 | 19718 | |
3e0be4ab GM |
19719 | |
19720 | ||
f077f61d | 19721 | |
5476a9a4 GM |
19722 | ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " |
19723 | #include <signal.h> | |
19724 | /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ | |
19725 | #include <sys/types.h> | |
19726 | ||
19727 | " | |
19728 | if test "x$ac_cv_type_sigset_t" = x""yes; then : | |
19729 | ||
19730 | cat >>confdefs.h <<_ACEOF | |
19731 | #define HAVE_SIGSET_T 1 | |
f199cab1 | 19732 | _ACEOF |
3e0be4ab | 19733 | |
5476a9a4 GM |
19734 | gl_cv_type_sigset_t=yes |
19735 | else | |
19736 | gl_cv_type_sigset_t=no | |
f199cab1 | 19737 | fi |
3e0be4ab | 19738 | |
5476a9a4 GM |
19739 | if test $gl_cv_type_sigset_t != yes; then |
19740 | HAVE_SIGSET_T=0 | |
19741 | fi | |
3e0be4ab | 19742 | |
1f5d53eb | 19743 | |
3e0be4ab | 19744 | |
5476a9a4 GM |
19745 | if test $ac_cv_header_sys_socket_h = no; then |
19746 | for ac_header in ws2tcpip.h | |
19747 | do : | |
19748 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
19749 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | |
19750 | cat >>confdefs.h <<_ACEOF | |
19751 | #define HAVE_WS2TCPIP_H 1 | |
19752 | _ACEOF | |
3e0be4ab | 19753 | |
5476a9a4 | 19754 | fi |
3e0be4ab | 19755 | |
5476a9a4 GM |
19756 | done |
19757 | ||
19758 | fi | |
19759 | ||
19760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | |
19761 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
19762 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | |
19763 | $as_echo_n "(cached) " >&6 | |
19764 | else | |
19765 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19766 | /* end confdefs.h. */ | |
1f5d53eb | 19767 | |
5476a9a4 GM |
19768 | #include <stdbool.h> |
19769 | #ifndef bool | |
19770 | "error: bool is not defined" | |
19771 | #endif | |
19772 | #ifndef false | |
19773 | "error: false is not defined" | |
19774 | #endif | |
19775 | #if false | |
19776 | "error: false is not 0" | |
19777 | #endif | |
19778 | #ifndef true | |
19779 | "error: true is not defined" | |
19780 | #endif | |
19781 | #if true != 1 | |
19782 | "error: true is not 1" | |
19783 | #endif | |
19784 | #ifndef __bool_true_false_are_defined | |
19785 | "error: __bool_true_false_are_defined is not defined" | |
19786 | #endif | |
19787 | ||
19788 | struct s { _Bool s: 1; _Bool t; } s; | |
19789 | ||
19790 | char a[true == 1 ? 1 : -1]; | |
19791 | char b[false == 0 ? 1 : -1]; | |
19792 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
19793 | char d[(bool) 0.5 == true ? 1 : -1]; | |
19794 | /* See body of main program for 'e'. */ | |
19795 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
19796 | char g[true]; | |
19797 | char h[sizeof (_Bool)]; | |
19798 | char i[sizeof s.t]; | |
19799 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
19800 | /* The following fails for | |
19801 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
19802 | _Bool n[m]; | |
19803 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
19804 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
19805 | /* Catch a bug in an HP-UX C compiler. See | |
19806 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
19807 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
19808 | */ | |
19809 | _Bool q = true; | |
19810 | _Bool *pq = &q; | |
1ebc9c87 GM |
19811 | |
19812 | int | |
19813 | main () | |
19814 | { | |
f199cab1 | 19815 | |
5476a9a4 GM |
19816 | bool e = &s; |
19817 | *pq |= q; | |
19818 | *pq |= ! q; | |
19819 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
19820 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
19821 | + !m + !n + !o + !p + !q + !pq); | |
f199cab1 | 19822 | |
5476a9a4 | 19823 | ; |
1ebc9c87 GM |
19824 | return 0; |
19825 | } | |
19826 | _ACEOF | |
5476a9a4 GM |
19827 | if ac_fn_c_try_compile "$LINENO"; then : |
19828 | ac_cv_header_stdbool_h=yes | |
1ebc9c87 | 19829 | else |
5476a9a4 | 19830 | ac_cv_header_stdbool_h=no |
1ebc9c87 | 19831 | fi |
5476a9a4 | 19832 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 19833 | fi |
5476a9a4 GM |
19834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 |
19835 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
19836 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
19837 | if test "x$ac_cv_type__Bool" = x""yes; then : | |
1ebc9c87 | 19838 | |
5476a9a4 GM |
19839 | cat >>confdefs.h <<_ACEOF |
19840 | #define HAVE__BOOL 1 | |
19841 | _ACEOF | |
1ebc9c87 | 19842 | |
1ebc9c87 GM |
19843 | |
19844 | fi | |
19845 | ||
1ebc9c87 | 19846 | |
1ebc9c87 | 19847 | |
5476a9a4 GM |
19848 | REPLACE_NULL=0; |
19849 | HAVE_WCHAR_T=1; | |
19850 | ||
19851 | ||
19852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
19853 | $as_echo_n "checking for wchar_t... " >&6; } | |
19854 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
19855 | $as_echo_n "(cached) " >&6 | |
19856 | else | |
19857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19858 | /* end confdefs.h. */ | |
19859 | #include <stddef.h> | |
19860 | wchar_t foo = (wchar_t)'\0'; | |
19861 | int | |
19862 | main () | |
19863 | { | |
19864 | ||
19865 | ; | |
19866 | return 0; | |
19867 | } | |
19868 | _ACEOF | |
19869 | if ac_fn_c_try_compile "$LINENO"; then : | |
19870 | gt_cv_c_wchar_t=yes | |
19871 | else | |
19872 | gt_cv_c_wchar_t=no | |
19873 | fi | |
19874 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1ebc9c87 | 19875 | fi |
5476a9a4 GM |
19876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 |
19877 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
19878 | if test $gt_cv_c_wchar_t = yes; then | |
1ebc9c87 | 19879 | |
5476a9a4 GM |
19880 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
19881 | ||
19882 | fi | |
19883 | ||
19884 | ||
19885 | GNULIB_DPRINTF=0; | |
19886 | GNULIB_FCLOSE=0; | |
19887 | GNULIB_FDOPEN=0; | |
19888 | GNULIB_FFLUSH=0; | |
19889 | GNULIB_FGETC=0; | |
19890 | GNULIB_FGETS=0; | |
19891 | GNULIB_FOPEN=0; | |
19892 | GNULIB_FPRINTF=0; | |
19893 | GNULIB_FPRINTF_POSIX=0; | |
19894 | GNULIB_FPURGE=0; | |
19895 | GNULIB_FPUTC=0; | |
19896 | GNULIB_FPUTS=0; | |
19897 | GNULIB_FREAD=0; | |
19898 | GNULIB_FREOPEN=0; | |
19899 | GNULIB_FSCANF=0; | |
19900 | GNULIB_FSEEK=0; | |
19901 | GNULIB_FSEEKO=0; | |
19902 | GNULIB_FTELL=0; | |
19903 | GNULIB_FTELLO=0; | |
19904 | GNULIB_FWRITE=0; | |
19905 | GNULIB_GETC=0; | |
19906 | GNULIB_GETCHAR=0; | |
19907 | GNULIB_GETDELIM=0; | |
19908 | GNULIB_GETLINE=0; | |
19909 | GNULIB_OBSTACK_PRINTF=0; | |
19910 | GNULIB_OBSTACK_PRINTF_POSIX=0; | |
19911 | GNULIB_PCLOSE=0; | |
19912 | GNULIB_PERROR=0; | |
19913 | GNULIB_POPEN=0; | |
19914 | GNULIB_PRINTF=0; | |
19915 | GNULIB_PRINTF_POSIX=0; | |
19916 | GNULIB_PUTC=0; | |
19917 | GNULIB_PUTCHAR=0; | |
19918 | GNULIB_PUTS=0; | |
19919 | GNULIB_REMOVE=0; | |
19920 | GNULIB_RENAME=0; | |
19921 | GNULIB_RENAMEAT=0; | |
19922 | GNULIB_SCANF=0; | |
19923 | GNULIB_SNPRINTF=0; | |
19924 | GNULIB_SPRINTF_POSIX=0; | |
19925 | GNULIB_STDIO_H_NONBLOCKING=0; | |
19926 | GNULIB_STDIO_H_SIGPIPE=0; | |
19927 | GNULIB_TMPFILE=0; | |
19928 | GNULIB_VASPRINTF=0; | |
19929 | GNULIB_VFSCANF=0; | |
19930 | GNULIB_VSCANF=0; | |
19931 | GNULIB_VDPRINTF=0; | |
19932 | GNULIB_VFPRINTF=0; | |
19933 | GNULIB_VFPRINTF_POSIX=0; | |
19934 | GNULIB_VPRINTF=0; | |
19935 | GNULIB_VPRINTF_POSIX=0; | |
19936 | GNULIB_VSNPRINTF=0; | |
19937 | GNULIB_VSPRINTF_POSIX=0; | |
19938 | HAVE_DECL_FPURGE=1; | |
19939 | HAVE_DECL_FSEEKO=1; | |
19940 | HAVE_DECL_FTELLO=1; | |
19941 | HAVE_DECL_GETDELIM=1; | |
19942 | HAVE_DECL_GETLINE=1; | |
19943 | HAVE_DECL_OBSTACK_PRINTF=1; | |
19944 | HAVE_DECL_SNPRINTF=1; | |
19945 | HAVE_DECL_VSNPRINTF=1; | |
19946 | HAVE_DPRINTF=1; | |
19947 | HAVE_FSEEKO=1; | |
19948 | HAVE_FTELLO=1; | |
19949 | HAVE_PCLOSE=1; | |
19950 | HAVE_POPEN=1; | |
19951 | HAVE_RENAMEAT=1; | |
19952 | HAVE_VASPRINTF=1; | |
19953 | HAVE_VDPRINTF=1; | |
19954 | REPLACE_DPRINTF=0; | |
19955 | REPLACE_FCLOSE=0; | |
19956 | REPLACE_FDOPEN=0; | |
19957 | REPLACE_FFLUSH=0; | |
19958 | REPLACE_FOPEN=0; | |
19959 | REPLACE_FPRINTF=0; | |
19960 | REPLACE_FPURGE=0; | |
19961 | REPLACE_FREOPEN=0; | |
19962 | REPLACE_FSEEK=0; | |
19963 | REPLACE_FSEEKO=0; | |
19964 | REPLACE_FTELL=0; | |
19965 | REPLACE_FTELLO=0; | |
19966 | REPLACE_GETDELIM=0; | |
19967 | REPLACE_GETLINE=0; | |
19968 | REPLACE_OBSTACK_PRINTF=0; | |
19969 | REPLACE_PERROR=0; | |
19970 | REPLACE_POPEN=0; | |
19971 | REPLACE_PRINTF=0; | |
19972 | REPLACE_REMOVE=0; | |
19973 | REPLACE_RENAME=0; | |
19974 | REPLACE_RENAMEAT=0; | |
19975 | REPLACE_SNPRINTF=0; | |
19976 | REPLACE_SPRINTF=0; | |
19977 | REPLACE_STDIO_READ_FUNCS=0; | |
19978 | REPLACE_STDIO_WRITE_FUNCS=0; | |
19979 | REPLACE_TMPFILE=0; | |
19980 | REPLACE_VASPRINTF=0; | |
19981 | REPLACE_VDPRINTF=0; | |
19982 | REPLACE_VFPRINTF=0; | |
19983 | REPLACE_VPRINTF=0; | |
19984 | REPLACE_VSNPRINTF=0; | |
19985 | REPLACE_VSPRINTF=0; | |
1ebc9c87 | 19986 | |
5476a9a4 GM |
19987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
19988 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
19989 | if test "${ac_cv_struct_tm+set}" = set; then : | |
1ebc9c87 GM |
19990 | $as_echo_n "(cached) " >&6 |
19991 | else | |
5476a9a4 | 19992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1ebc9c87 | 19993 | /* end confdefs.h. */ |
5476a9a4 GM |
19994 | #include <sys/types.h> |
19995 | #include <time.h> | |
1ebc9c87 GM |
19996 | |
19997 | int | |
19998 | main () | |
19999 | { | |
5476a9a4 GM |
20000 | struct tm tm; |
20001 | int *p = &tm.tm_sec; | |
20002 | return !p; | |
1ebc9c87 GM |
20003 | ; |
20004 | return 0; | |
20005 | } | |
20006 | _ACEOF | |
5476a9a4 GM |
20007 | if ac_fn_c_try_compile "$LINENO"; then : |
20008 | ac_cv_struct_tm=time.h | |
1ebc9c87 | 20009 | else |
5476a9a4 | 20010 | ac_cv_struct_tm=sys/time.h |
1ebc9c87 | 20011 | fi |
5476a9a4 | 20012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1ebc9c87 | 20013 | fi |
5476a9a4 GM |
20014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
20015 | $as_echo "$ac_cv_struct_tm" >&6; } | |
20016 | if test $ac_cv_struct_tm = sys/time.h; then | |
1ebc9c87 | 20017 | |
5476a9a4 | 20018 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
1ebc9c87 | 20019 | |
1ebc9c87 GM |
20020 | fi |
20021 | ||
5476a9a4 GM |
20022 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
20023 | #include <$ac_cv_struct_tm> | |
1fd182f0 | 20024 | |
5476a9a4 GM |
20025 | " |
20026 | if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : | |
1fd182f0 | 20027 | |
5476a9a4 GM |
20028 | cat >>confdefs.h <<_ACEOF |
20029 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
f199cab1 | 20030 | _ACEOF |
5476a9a4 GM |
20031 | |
20032 | ||
1f5d53eb | 20033 | fi |
1fd182f0 | 20034 | |
5476a9a4 | 20035 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
1f5d53eb | 20036 | |
5476a9a4 | 20037 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
1fd182f0 | 20038 | |
5476a9a4 GM |
20039 | else |
20040 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
20041 | " | |
20042 | if test "x$ac_cv_have_decl_tzname" = x""yes; then : | |
20043 | ac_have_decl=1 | |
20044 | else | |
20045 | ac_have_decl=0 | |
20046 | fi | |
1fd182f0 | 20047 | |
5476a9a4 GM |
20048 | cat >>confdefs.h <<_ACEOF |
20049 | #define HAVE_DECL_TZNAME $ac_have_decl | |
20050 | _ACEOF | |
f199cab1 | 20051 | |
5476a9a4 GM |
20052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
20053 | $as_echo_n "checking for tzname... " >&6; } | |
20054 | if test "${ac_cv_var_tzname+set}" = set; then : | |
f199cab1 | 20055 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 20056 | else |
5476a9a4 | 20057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 20058 | /* end confdefs.h. */ |
5476a9a4 GM |
20059 | #include <time.h> |
20060 | #if !HAVE_DECL_TZNAME | |
20061 | extern char *tzname[]; | |
f199cab1 | 20062 | #endif |
5476a9a4 | 20063 | |
f199cab1 GM |
20064 | int |
20065 | main () | |
20066 | { | |
5476a9a4 | 20067 | return tzname[0][0]; |
f199cab1 GM |
20068 | ; |
20069 | return 0; | |
20070 | } | |
3e0be4ab | 20071 | _ACEOF |
f199cab1 | 20072 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 20073 | ac_cv_var_tzname=yes |
3e0be4ab | 20074 | else |
5476a9a4 | 20075 | ac_cv_var_tzname=no |
f199cab1 GM |
20076 | fi |
20077 | rm -f core conftest.err conftest.$ac_objext \ | |
20078 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 20079 | fi |
5476a9a4 GM |
20080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
20081 | $as_echo "$ac_cv_var_tzname" >&6; } | |
20082 | if test $ac_cv_var_tzname = yes; then | |
20083 | ||
20084 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h | |
f199cab1 | 20085 | |
5476a9a4 | 20086 | fi |
3e0be4ab | 20087 | fi |
cc322c06 | 20088 | |
5476a9a4 GM |
20089 | |
20090 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | |
20091 | " | |
20092 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | |
20093 | ||
20094 | $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h | |
cc322c06 | 20095 | |
f199cab1 | 20096 | fi |
cc322c06 | 20097 | |
1f5d53eb | 20098 | |
e275c824 | 20099 | |
5476a9a4 | 20100 | |
283c7aed GM |
20101 | |
20102 | ||
20103 | ||
20104 | ||
20105 | ||
20106 | ||
20107 | ||
20108 | ||
20109 | ||
20110 | if test $gl_cv_have_include_next = yes; then | |
20111 | gl_cv_next_string_h='<'string.h'>' | |
20112 | else | |
20113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
20114 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
20115 | if test "${gl_cv_next_string_h+set}" = set; then : | |
20116 | $as_echo_n "(cached) " >&6 | |
20117 | else | |
20118 | ||
20119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20120 | /* end confdefs.h. */ | |
20121 | #include <string.h> | |
20122 | ||
20123 | _ACEOF | |
20124 | case "$host_os" in | |
20125 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20126 | *) gl_absname_cpp="$ac_cpp" ;; | |
20127 | esac | |
20128 | ||
20129 | case "$host_os" in | |
20130 | mingw*) | |
20131 | gl_dirsep_regex='[/\\]' | |
20132 | ;; | |
20133 | *) | |
20134 | gl_dirsep_regex='\/' | |
20135 | ;; | |
20136 | esac | |
20137 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
20138 | ||
20139 | gl_header_literal_regex=`echo 'string.h' \ | |
20140 | | sed -e "$gl_make_literal_regex_sed"` | |
20141 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
20142 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
20143 | s|^/[^/]|//&| | |
20144 | p | |
20145 | q | |
20146 | }' | |
20147 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20148 | sed -n "$gl_absolute_header_sed"`'"' | |
20149 | ||
20150 | ||
20151 | fi | |
20152 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 | |
20153 | $as_echo "$gl_cv_next_string_h" >&6; } | |
20154 | fi | |
20155 | NEXT_STRING_H=$gl_cv_next_string_h | |
20156 | ||
20157 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
20158 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20159 | gl_next_as_first_directive='<'string.h'>' | |
20160 | else | |
20161 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20162 | gl_next_as_first_directive=$gl_cv_next_string_h | |
20163 | fi | |
20164 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
20165 | ||
20166 | ||
20167 | ||
20168 | ||
20169 | ||
20170 | ||
20171 | ||
20172 | ||
20173 | ||
5476a9a4 GM |
20174 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" |
20175 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
20176 | ac_have_decl=1 | |
3e0be4ab | 20177 | else |
5476a9a4 | 20178 | ac_have_decl=0 |
3e0be4ab | 20179 | fi |
5476a9a4 GM |
20180 | |
20181 | cat >>confdefs.h <<_ACEOF | |
20182 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
f199cab1 | 20183 | _ACEOF |
e275c824 PE |
20184 | |
20185 | ||
5476a9a4 GM |
20186 | |
20187 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" | |
20188 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
20189 | ac_have_decl=1 | |
20190 | else | |
20191 | ac_have_decl=0 | |
3e0be4ab | 20192 | fi |
e275c824 | 20193 | |
5476a9a4 GM |
20194 | cat >>confdefs.h <<_ACEOF |
20195 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
20196 | _ACEOF | |
e275c824 PE |
20197 | |
20198 | ||
2b1928b8 | 20199 | |
5476a9a4 GM |
20200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
20201 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
20202 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
f199cab1 | 20203 | $as_echo_n "(cached) " >&6 |
2b1928b8 | 20204 | else |
5476a9a4 GM |
20205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20206 | /* end confdefs.h. */ | |
20207 | #include <sys/types.h> | |
20208 | #include <sys/stat.h> | |
2b1928b8 | 20209 | |
5476a9a4 GM |
20210 | #if defined S_ISBLK && defined S_IFDIR |
20211 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
20212 | #endif | |
2b1928b8 | 20213 | |
5476a9a4 GM |
20214 | #if defined S_ISBLK && defined S_IFCHR |
20215 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
20216 | #endif | |
0eb775a3 | 20217 | |
5476a9a4 GM |
20218 | #if defined S_ISLNK && defined S_IFREG |
20219 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
20220 | #endif | |
20221 | ||
20222 | #if defined S_ISSOCK && defined S_IFREG | |
20223 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
20224 | #endif | |
0eb775a3 | 20225 | |
5476a9a4 GM |
20226 | _ACEOF |
20227 | if ac_fn_c_try_compile "$LINENO"; then : | |
20228 | ac_cv_header_stat_broken=no | |
f199cab1 | 20229 | else |
5476a9a4 | 20230 | ac_cv_header_stat_broken=yes |
f199cab1 | 20231 | fi |
5476a9a4 | 20232 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 20233 | fi |
5476a9a4 GM |
20234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
20235 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
20236 | if test $ac_cv_header_stat_broken = yes; then | |
0eb775a3 | 20237 | |
5476a9a4 | 20238 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
0eb775a3 | 20239 | |
5476a9a4 | 20240 | fi |
0eb775a3 GM |
20241 | |
20242 | ||
20243 | ||
5476a9a4 GM |
20244 | |
20245 | ||
20246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 | |
20247 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
20248 | if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : | |
20249 | $as_echo_n "(cached) " >&6 | |
20250 | else | |
20251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 20252 | /* end confdefs.h. */ |
5476a9a4 | 20253 | #include <time.h> |
52724a05 | 20254 | |
3e0be4ab GM |
20255 | int |
20256 | main () | |
20257 | { | |
5476a9a4 | 20258 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
20259 | ; |
20260 | return 0; | |
20261 | } | |
20262 | _ACEOF | |
5476a9a4 GM |
20263 | if ac_fn_c_try_compile "$LINENO"; then : |
20264 | gl_cv_sys_struct_timespec_in_time_h=yes | |
3e0be4ab | 20265 | else |
5476a9a4 | 20266 | gl_cv_sys_struct_timespec_in_time_h=no |
3e0be4ab | 20267 | fi |
5476a9a4 GM |
20268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
20269 | fi | |
20270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 | |
20271 | $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } | |
52724a05 | 20272 | |
5476a9a4 GM |
20273 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 |
20274 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
20275 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
20276 | if test $gl_cv_sys_struct_timespec_in_time_h = yes; then | |
20277 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
20278 | else | |
20279 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
20280 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
20281 | if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : | |
20282 | $as_echo_n "(cached) " >&6 | |
20283 | else | |
3e0be4ab GM |
20284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20285 | /* end confdefs.h. */ | |
5476a9a4 GM |
20286 | #include <sys/time.h> |
20287 | ||
3e0be4ab GM |
20288 | int |
20289 | main () | |
20290 | { | |
5476a9a4 | 20291 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
20292 | ; |
20293 | return 0; | |
20294 | } | |
20295 | _ACEOF | |
5476a9a4 GM |
20296 | if ac_fn_c_try_compile "$LINENO"; then : |
20297 | gl_cv_sys_struct_timespec_in_sys_time_h=yes | |
3e0be4ab | 20298 | else |
5476a9a4 | 20299 | gl_cv_sys_struct_timespec_in_sys_time_h=no |
3e0be4ab | 20300 | fi |
5476a9a4 | 20301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 20302 | fi |
5476a9a4 GM |
20303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 |
20304 | $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
20305 | if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
20306 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
20307 | else | |
20308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
20309 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
20310 | if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : | |
3e0be4ab GM |
20311 | $as_echo_n "(cached) " >&6 |
20312 | else | |
20313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20314 | /* end confdefs.h. */ | |
5476a9a4 GM |
20315 | #include <pthread.h> |
20316 | ||
3e0be4ab GM |
20317 | int |
20318 | main () | |
20319 | { | |
5476a9a4 | 20320 | static struct timespec x; x.tv_sec = x.tv_nsec; |
3e0be4ab GM |
20321 | ; |
20322 | return 0; | |
20323 | } | |
20324 | _ACEOF | |
5476a9a4 GM |
20325 | if ac_fn_c_try_compile "$LINENO"; then : |
20326 | gl_cv_sys_struct_timespec_in_pthread_h=yes | |
3e0be4ab | 20327 | else |
5476a9a4 | 20328 | gl_cv_sys_struct_timespec_in_pthread_h=no |
3e0be4ab | 20329 | fi |
5476a9a4 | 20330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3e0be4ab | 20331 | fi |
5476a9a4 GM |
20332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 |
20333 | $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
20334 | if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then | |
20335 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
20336 | fi | |
20337 | fi | |
f199cab1 | 20338 | fi |
e275c824 PE |
20339 | |
20340 | ||
b0415a03 | 20341 | |
b0415a03 | 20342 | |
e275c824 | 20343 | |
e275c824 PE |
20344 | |
20345 | ||
f199cab1 | 20346 | |
e275c824 PE |
20347 | |
20348 | ||
20349 | ||
20350 | ||
20351 | ||
20352 | ||
20353 | ||
5476a9a4 GM |
20354 | if test $gl_cv_have_include_next = yes; then |
20355 | gl_cv_next_time_h='<'time.h'>' | |
20356 | else | |
20357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 | |
20358 | $as_echo_n "checking absolute name of <time.h>... " >&6; } | |
20359 | if test "${gl_cv_next_time_h+set}" = set; then : | |
20360 | $as_echo_n "(cached) " >&6 | |
20361 | else | |
e275c824 | 20362 | |
5476a9a4 GM |
20363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20364 | /* end confdefs.h. */ | |
20365 | #include <time.h> | |
e275c824 | 20366 | |
5476a9a4 GM |
20367 | _ACEOF |
20368 | case "$host_os" in | |
20369 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20370 | *) gl_absname_cpp="$ac_cpp" ;; | |
20371 | esac | |
e275c824 | 20372 | |
5476a9a4 GM |
20373 | case "$host_os" in |
20374 | mingw*) | |
20375 | gl_dirsep_regex='[/\\]' | |
20376 | ;; | |
20377 | *) | |
20378 | gl_dirsep_regex='\/' | |
20379 | ;; | |
20380 | esac | |
20381 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
e275c824 | 20382 | |
5476a9a4 GM |
20383 | gl_header_literal_regex=`echo 'time.h' \ |
20384 | | sed -e "$gl_make_literal_regex_sed"` | |
20385 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
20386 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
20387 | s|^/[^/]|//&| | |
20388 | p | |
20389 | q | |
20390 | }' | |
20391 | gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20392 | sed -n "$gl_absolute_header_sed"`'"' | |
e275c824 PE |
20393 | |
20394 | ||
5476a9a4 GM |
20395 | fi |
20396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 | |
20397 | $as_echo "$gl_cv_next_time_h" >&6; } | |
20398 | fi | |
20399 | NEXT_TIME_H=$gl_cv_next_time_h | |
67342916 | 20400 | |
5476a9a4 GM |
20401 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20402 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20403 | gl_next_as_first_directive='<'time.h'>' | |
f199cab1 | 20404 | else |
5476a9a4 GM |
20405 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' |
20406 | gl_next_as_first_directive=$gl_cv_next_time_h | |
f199cab1 | 20407 | fi |
5476a9a4 | 20408 | NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive |
4fda9c95 GM |
20409 | |
20410 | ||
52724a05 GM |
20411 | |
20412 | ||
20413 | ||
20414 | ||
20415 | ||
20416 | ||
20417 | ||
ae0d7250 PE |
20418 | |
20419 | ||
20420 | ||
cc322c06 | 20421 | |
f199cab1 | 20422 | |
b5591ebb GM |
20423 | ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" |
20424 | if test "x$ac_cv_have_decl_unsetenv" = x""yes; then : | |
20425 | ac_have_decl=1 | |
20426 | else | |
20427 | ac_have_decl=0 | |
20428 | fi | |
20429 | ||
20430 | cat >>confdefs.h <<_ACEOF | |
20431 | #define HAVE_DECL_UNSETENV $ac_have_decl | |
20432 | _ACEOF | |
20433 | ||
cc322c06 | 20434 | |
5476a9a4 GM |
20435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5 |
20436 | $as_echo_n "checking whether the utimes function works... " >&6; } | |
20437 | if test "${gl_cv_func_working_utimes+set}" = set; then : | |
20438 | $as_echo_n "(cached) " >&6 | |
20439 | else | |
1fd182f0 | 20440 | |
5476a9a4 GM |
20441 | if test "$cross_compiling" = yes; then : |
20442 | gl_cv_func_working_utimes=no | |
20443 | else | |
20444 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20445 | /* end confdefs.h. */ | |
20446 | ||
20447 | #include <sys/types.h> | |
20448 | #include <sys/stat.h> | |
20449 | #include <fcntl.h> | |
20450 | #include <sys/time.h> | |
20451 | #include <time.h> | |
20452 | #include <unistd.h> | |
20453 | #include <stdlib.h> | |
20454 | #include <stdio.h> | |
20455 | #include <utime.h> | |
1fd182f0 | 20456 | |
5476a9a4 GM |
20457 | static int |
20458 | inorder (time_t a, time_t b, time_t c) | |
20459 | { | |
20460 | return a <= b && b <= c; | |
20461 | } | |
1fd182f0 | 20462 | |
5476a9a4 GM |
20463 | int |
20464 | main () | |
20465 | { | |
20466 | int result = 0; | |
20467 | char const *file = "conftest.utimes"; | |
20468 | static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; | |
1fd182f0 | 20469 | |
5476a9a4 GM |
20470 | /* Test whether utimes() essentially works. */ |
20471 | { | |
20472 | struct stat sbuf; | |
20473 | FILE *f = fopen (file, "w"); | |
20474 | if (f == NULL) | |
20475 | result |= 1; | |
20476 | else if (fclose (f) != 0) | |
20477 | result |= 1; | |
20478 | else if (utimes (file, timeval) != 0) | |
20479 | result |= 2; | |
20480 | else if (lstat (file, &sbuf) != 0) | |
20481 | result |= 1; | |
20482 | else if (!(sbuf.st_atime == timeval[0].tv_sec | |
20483 | && sbuf.st_mtime == timeval[1].tv_sec)) | |
20484 | result |= 4; | |
20485 | if (unlink (file) != 0) | |
20486 | result |= 1; | |
20487 | } | |
1fd182f0 | 20488 | |
5476a9a4 GM |
20489 | /* Test whether utimes() with a NULL argument sets the file's timestamp |
20490 | to the current time. Use 'fstat' as well as 'time' to | |
20491 | determine the "current" time, to accommodate NFS file systems | |
20492 | if there is a time skew between the host and the NFS server. */ | |
20493 | { | |
20494 | int fd = open (file, O_WRONLY|O_CREAT, 0644); | |
20495 | if (fd < 0) | |
20496 | result |= 1; | |
20497 | else | |
20498 | { | |
20499 | time_t t0, t2; | |
20500 | struct stat st0, st1, st2; | |
20501 | if (time (&t0) == (time_t) -1) | |
20502 | result |= 1; | |
20503 | else if (fstat (fd, &st0) != 0) | |
20504 | result |= 1; | |
20505 | else if (utimes (file, timeval) != 0) | |
20506 | result |= 2; | |
20507 | else if (utimes (file, NULL) != 0) | |
20508 | result |= 8; | |
20509 | else if (fstat (fd, &st1) != 0) | |
20510 | result |= 1; | |
20511 | else if (write (fd, "\n", 1) != 1) | |
20512 | result |= 1; | |
20513 | else if (fstat (fd, &st2) != 0) | |
20514 | result |= 1; | |
20515 | else if (time (&t2) == (time_t) -1) | |
20516 | result |= 1; | |
20517 | else | |
20518 | { | |
20519 | int m_ok_POSIX = inorder (t0, st1.st_mtime, t2); | |
20520 | int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime); | |
20521 | if (! (st1.st_atime == st1.st_mtime)) | |
20522 | result |= 16; | |
20523 | if (! (m_ok_POSIX || m_ok_NFS)) | |
20524 | result |= 32; | |
20525 | } | |
20526 | if (close (fd) != 0) | |
20527 | result |= 1; | |
20528 | } | |
20529 | if (unlink (file) != 0) | |
20530 | result |= 1; | |
20531 | } | |
52724a05 | 20532 | |
5476a9a4 GM |
20533 | /* Test whether utimes() with a NULL argument works on read-only files. */ |
20534 | { | |
20535 | int fd = open (file, O_WRONLY|O_CREAT, 0444); | |
20536 | if (fd < 0) | |
20537 | result |= 1; | |
20538 | else if (close (fd) != 0) | |
20539 | result |= 1; | |
20540 | else if (utimes (file, NULL) != 0) | |
20541 | result |= 64; | |
20542 | if (unlink (file) != 0) | |
20543 | result |= 1; | |
20544 | } | |
1fd182f0 | 20545 | |
5476a9a4 GM |
20546 | return result; |
20547 | } | |
1fd182f0 | 20548 | |
5476a9a4 GM |
20549 | _ACEOF |
20550 | if ac_fn_c_try_run "$LINENO"; then : | |
20551 | gl_cv_func_working_utimes=yes | |
20552 | else | |
20553 | gl_cv_func_working_utimes=no | |
20554 | fi | |
20555 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20556 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 20557 | fi |
1fd182f0 | 20558 | |
5476a9a4 GM |
20559 | fi |
20560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5 | |
20561 | $as_echo "$gl_cv_func_working_utimes" >&6; } | |
1fd182f0 | 20562 | |
5476a9a4 | 20563 | if test $gl_cv_func_working_utimes = yes; then |
1fd182f0 | 20564 | |
5476a9a4 | 20565 | $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h |
1fd182f0 | 20566 | |
5476a9a4 | 20567 | fi |
1fd182f0 | 20568 | |
1fd182f0 | 20569 | |
1fd182f0 | 20570 | |
1fd182f0 | 20571 | |
1fd182f0 | 20572 | |
5476a9a4 GM |
20573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 |
20574 | $as_echo_n "checking for struct utimbuf... " >&6; } | |
20575 | if test "${gl_cv_sys_struct_utimbuf+set}" = set; then : | |
20576 | $as_echo_n "(cached) " >&6 | |
20577 | else | |
20578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20579 | /* end confdefs.h. */ | |
20580 | #if HAVE_SYS_TIME_H | |
20581 | #include <sys/time.h> | |
20582 | #endif | |
20583 | #include <time.h> | |
20584 | #ifdef HAVE_UTIME_H | |
20585 | #include <utime.h> | |
20586 | #endif | |
1fd182f0 | 20587 | |
5476a9a4 GM |
20588 | int |
20589 | main () | |
20590 | { | |
20591 | static struct utimbuf x; x.actime = x.modtime; | |
20592 | ; | |
20593 | return 0; | |
20594 | } | |
20595 | _ACEOF | |
20596 | if ac_fn_c_try_compile "$LINENO"; then : | |
20597 | gl_cv_sys_struct_utimbuf=yes | |
20598 | else | |
20599 | gl_cv_sys_struct_utimbuf=no | |
f199cab1 | 20600 | fi |
5476a9a4 | 20601 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 20602 | fi |
5476a9a4 GM |
20603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5 |
20604 | $as_echo "$gl_cv_sys_struct_utimbuf" >&6; } | |
1fd182f0 | 20605 | |
5476a9a4 | 20606 | if test $gl_cv_sys_struct_utimbuf = yes; then |
1fd182f0 | 20607 | |
5476a9a4 | 20608 | $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h |
1fd182f0 | 20609 | |
5476a9a4 | 20610 | fi |
1fd182f0 | 20611 | |
1fd182f0 | 20612 | |
1fd182f0 | 20613 | |
1fd182f0 | 20614 | |
1fd182f0 | 20615 | |
1fd182f0 | 20616 | |
1fd182f0 | 20617 | |
3e0be4ab | 20618 | |
f199cab1 | 20619 | |
f199cab1 | 20620 | |
067d23c9 | 20621 | |
710f5812 GM |
20622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 |
20623 | $as_echo_n "checking type of array argument to getgroups... " >&6; } | |
20624 | if test "${ac_cv_type_getgroups+set}" = set; then : | |
20625 | $as_echo_n "(cached) " >&6 | |
20626 | else | |
20627 | if test "$cross_compiling" = yes; then : | |
20628 | ac_cv_type_getgroups=cross | |
20629 | else | |
20630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20631 | /* end confdefs.h. */ | |
20632 | /* Thanks to Mike Rendell for this test. */ | |
20633 | $ac_includes_default | |
20634 | #define NGID 256 | |
20635 | #undef MAX | |
20636 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
20637 | ||
20638 | int | |
20639 | main () | |
20640 | { | |
20641 | gid_t gidset[NGID]; | |
20642 | int i, n; | |
20643 | union { gid_t gval; long int lval; } val; | |
20644 | ||
20645 | val.lval = -1; | |
20646 | for (i = 0; i < NGID; i++) | |
20647 | gidset[i] = val.gval; | |
20648 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
20649 | gidset); | |
20650 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
20651 | happens when gid_t is short int but getgroups modifies an array | |
20652 | of ints. */ | |
20653 | return n > 0 && gidset[n] != val.gval; | |
20654 | } | |
20655 | _ACEOF | |
20656 | if ac_fn_c_try_run "$LINENO"; then : | |
20657 | ac_cv_type_getgroups=gid_t | |
20658 | else | |
20659 | ac_cv_type_getgroups=int | |
20660 | fi | |
20661 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
20662 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
20663 | fi | |
20664 | ||
20665 | if test $ac_cv_type_getgroups = cross; then | |
20666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20667 | /* end confdefs.h. */ | |
20668 | #include <unistd.h> | |
20669 | ||
20670 | _ACEOF | |
20671 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
20672 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : | |
20673 | ac_cv_type_getgroups=gid_t | |
20674 | else | |
20675 | ac_cv_type_getgroups=int | |
20676 | fi | |
20677 | rm -f conftest* | |
20678 | ||
20679 | fi | |
20680 | fi | |
20681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 | |
20682 | $as_echo "$ac_cv_type_getgroups" >&6; } | |
20683 | ||
20684 | cat >>confdefs.h <<_ACEOF | |
20685 | #define GETGROUPS_T $ac_cv_type_getgroups | |
20686 | _ACEOF | |
20687 | ||
20688 | ||
20689 | ||
067d23c9 | 20690 | |
5476a9a4 GM |
20691 | if false; then |
20692 | GL_COND_LIBTOOL_TRUE= | |
20693 | GL_COND_LIBTOOL_FALSE='#' | |
20694 | else | |
20695 | GL_COND_LIBTOOL_TRUE='#' | |
20696 | GL_COND_LIBTOOL_FALSE= | |
1fd182f0 | 20697 | fi |
067d23c9 | 20698 | |
5476a9a4 GM |
20699 | gl_cond_libtool=false |
20700 | gl_libdeps= | |
20701 | gl_ltlibdeps= | |
20702 | gl_m4_base='m4' | |
067d23c9 | 20703 | |
f199cab1 | 20704 | |
f199cab1 | 20705 | |
f199cab1 | 20706 | |
067d23c9 | 20707 | |
f199cab1 | 20708 | |
f199cab1 | 20709 | |
f199cab1 | 20710 | |
067d23c9 | 20711 | |
5476a9a4 | 20712 | gl_source_base='lib' |
cc322c06 GM |
20713 | |
20714 | ||
5476a9a4 GM |
20715 | if test $ac_cv_func_alloca_works = no; then |
20716 | : | |
f199cab1 | 20717 | fi |
cc322c06 | 20718 | |
5476a9a4 GM |
20719 | # Define an additional variable used in the Makefile substitution. |
20720 | if test $ac_cv_working_alloca_h = yes; then | |
20721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 | |
20722 | $as_echo_n "checking for alloca as a compiler built-in... " >&6; } | |
20723 | if test "${gl_cv_rpl_alloca+set}" = set; then : | |
20724 | $as_echo_n "(cached) " >&6 | |
20725 | else | |
cc322c06 | 20726 | |
5476a9a4 GM |
20727 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20728 | /* end confdefs.h. */ | |
067d23c9 | 20729 | |
5476a9a4 GM |
20730 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
20731 | Need own alloca | |
20732 | #endif | |
067d23c9 | 20733 | |
f199cab1 | 20734 | _ACEOF |
5476a9a4 GM |
20735 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
20736 | $EGREP "Need own alloca" >/dev/null 2>&1; then : | |
20737 | gl_cv_rpl_alloca=yes | |
20738 | else | |
20739 | gl_cv_rpl_alloca=no | |
369e19fc | 20740 | fi |
5476a9a4 | 20741 | rm -f conftest* |
067d23c9 | 20742 | |
ae0d7250 | 20743 | |
5476a9a4 GM |
20744 | fi |
20745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 | |
20746 | $as_echo "$gl_cv_rpl_alloca" >&6; } | |
20747 | if test $gl_cv_rpl_alloca = yes; then | |
52724a05 | 20748 | |
5476a9a4 | 20749 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
ae0d7250 | 20750 | |
5476a9a4 GM |
20751 | ALLOCA_H=alloca.h |
20752 | else | |
20753 | ALLOCA_H= | |
20754 | fi | |
f199cab1 | 20755 | else |
5476a9a4 GM |
20756 | ALLOCA_H=alloca.h |
20757 | fi | |
ae0d7250 | 20758 | |
5476a9a4 GM |
20759 | if test -n "$ALLOCA_H"; then |
20760 | GL_GENERATE_ALLOCA_H_TRUE= | |
20761 | GL_GENERATE_ALLOCA_H_FALSE='#' | |
20762 | else | |
20763 | GL_GENERATE_ALLOCA_H_TRUE='#' | |
20764 | GL_GENERATE_ALLOCA_H_FALSE= | |
20765 | fi | |
f199cab1 | 20766 | |
ae0d7250 PE |
20767 | |
20768 | ||
20769 | ||
20770 | ||
20771 | ||
5476a9a4 GM |
20772 | # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. |
20773 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. | |
ae0d7250 | 20774 | |
5476a9a4 GM |
20775 | # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* |
20776 | # programs in the package would end up linked with that potentially-shared | |
20777 | # library, inducing unnecessary run-time overhead. | |
20778 | LIB_CLOCK_GETTIME= | |
ae0d7250 | 20779 | |
5476a9a4 GM |
20780 | gl_saved_libs=$LIBS |
20781 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 | |
20782 | $as_echo_n "checking for library containing clock_gettime... " >&6; } | |
20783 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
20784 | $as_echo_n "(cached) " >&6 | |
20785 | else | |
20786 | ac_func_search_save_LIBS=$LIBS | |
20787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20788 | /* end confdefs.h. */ | |
20789 | ||
20790 | /* Override any GCC internal prototype to avoid an error. | |
20791 | Use char because int might match the return type of a GCC | |
20792 | builtin and then its argument prototype would still apply. */ | |
20793 | #ifdef __cplusplus | |
20794 | extern "C" | |
20795 | #endif | |
20796 | char clock_gettime (); | |
20797 | int | |
20798 | main () | |
20799 | { | |
20800 | return clock_gettime (); | |
20801 | ; | |
20802 | return 0; | |
20803 | } | |
20804 | _ACEOF | |
20805 | for ac_lib in '' rt posix4; do | |
20806 | if test -z "$ac_lib"; then | |
20807 | ac_res="none required" | |
20808 | else | |
20809 | ac_res=-l$ac_lib | |
20810 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
20811 | fi | |
20812 | if ac_fn_c_try_link "$LINENO"; then : | |
20813 | ac_cv_search_clock_gettime=$ac_res | |
f199cab1 | 20814 | fi |
5476a9a4 GM |
20815 | rm -f core conftest.err conftest.$ac_objext \ |
20816 | conftest$ac_exeext | |
20817 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
20818 | break | |
20819 | fi | |
20820 | done | |
20821 | if test "${ac_cv_search_clock_gettime+set}" = set; then : | |
ae0d7250 | 20822 | |
5476a9a4 GM |
20823 | else |
20824 | ac_cv_search_clock_gettime=no | |
20825 | fi | |
20826 | rm conftest.$ac_ext | |
20827 | LIBS=$ac_func_search_save_LIBS | |
20828 | fi | |
20829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 | |
20830 | $as_echo "$ac_cv_search_clock_gettime" >&6; } | |
20831 | ac_res=$ac_cv_search_clock_gettime | |
20832 | if test "$ac_res" != no; then : | |
20833 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
20834 | test "$ac_cv_search_clock_gettime" = "none required" || | |
20835 | LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime | |
20836 | fi | |
ae0d7250 | 20837 | |
5476a9a4 GM |
20838 | for ac_func in clock_gettime clock_settime |
20839 | do : | |
20840 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
20841 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
20842 | eval as_val=\$$as_ac_var | |
20843 | if test "x$as_val" = x""yes; then : | |
20844 | cat >>confdefs.h <<_ACEOF | |
20845 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
20846 | _ACEOF | |
ae0d7250 | 20847 | |
d7ad186c GM |
20848 | fi |
20849 | done | |
20850 | ||
20851 | LIBS=$gl_saved_libs | |
20852 | ||
20853 | ||
20854 | : | |
20855 | ||
20856 | ||
20857 | ||
20858 | cat >>confdefs.h <<_ACEOF | |
20859 | #define GNULIB_CLOSE_STREAM 1 | |
20860 | _ACEOF | |
20861 | ||
20862 | ||
20863 | ||
20864 | ||
20865 | : | |
20866 | ||
20867 | ||
20868 | ||
20869 | : | |
20870 | ||
20871 | ||
20872 | ||
20873 | ||
20874 | ||
20875 | ||
20876 | ||
20877 | ||
20878 | ||
20879 | ||
20880 | ||
20881 | ||
20882 | ||
20883 | ||
20884 | ||
20885 | ||
20886 | ||
ae0d7250 | 20887 | |
3e0be4ab | 20888 | |
d7ad186c GM |
20889 | if test $gl_cv_have_include_next = yes; then |
20890 | gl_cv_next_dirent_h='<'dirent.h'>' | |
20891 | else | |
20892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 | |
20893 | $as_echo_n "checking absolute name of <dirent.h>... " >&6; } | |
20894 | if test "${gl_cv_next_dirent_h+set}" = set; then : | |
20895 | $as_echo_n "(cached) " >&6 | |
20896 | else | |
3e0be4ab | 20897 | |
d7ad186c | 20898 | if test $ac_cv_header_dirent_h = yes; then |
3bf26e96 GM |
20899 | |
20900 | ||
d7ad186c GM |
20901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
20902 | /* end confdefs.h. */ | |
20903 | #include <dirent.h> | |
3bf26e96 | 20904 | |
3bf26e96 | 20905 | _ACEOF |
d7ad186c GM |
20906 | case "$host_os" in |
20907 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
20908 | *) gl_absname_cpp="$ac_cpp" ;; | |
20909 | esac | |
3bf26e96 | 20910 | |
d7ad186c GM |
20911 | case "$host_os" in |
20912 | mingw*) | |
20913 | gl_dirsep_regex='[/\\]' | |
20914 | ;; | |
20915 | *) | |
20916 | gl_dirsep_regex='\/' | |
20917 | ;; | |
20918 | esac | |
20919 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
3bf26e96 | 20920 | |
d7ad186c GM |
20921 | gl_header_literal_regex=`echo 'dirent.h' \ |
20922 | | sed -e "$gl_make_literal_regex_sed"` | |
20923 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
20924 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
20925 | s|^/[^/]|//&| | |
20926 | p | |
20927 | q | |
20928 | }' | |
20929 | gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
20930 | sed -n "$gl_absolute_header_sed"`'"' | |
20931 | else | |
20932 | gl_cv_next_dirent_h='<'dirent.h'>' | |
20933 | fi | |
3bf26e96 | 20934 | |
3e0be4ab | 20935 | |
d7ad186c GM |
20936 | fi |
20937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 | |
20938 | $as_echo "$gl_cv_next_dirent_h" >&6; } | |
20939 | fi | |
20940 | NEXT_DIRENT_H=$gl_cv_next_dirent_h | |
f199cab1 | 20941 | |
d7ad186c GM |
20942 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
20943 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
20944 | gl_next_as_first_directive='<'dirent.h'>' | |
20945 | else | |
20946 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
20947 | gl_next_as_first_directive=$gl_cv_next_dirent_h | |
20948 | fi | |
20949 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive | |
f199cab1 | 20950 | |
3e0be4ab | 20951 | |
f199cab1 | 20952 | |
f199cab1 | 20953 | |
d7ad186c GM |
20954 | if test $ac_cv_header_dirent_h = yes; then |
20955 | HAVE_DIRENT_H=1 | |
20956 | else | |
20957 | HAVE_DIRENT_H=0 | |
20958 | fi | |
3e0be4ab | 20959 | |
f199cab1 GM |
20960 | |
20961 | ||
20962 | ||
5476a9a4 GM |
20963 | |
20964 | ||
20965 | ||
20966 | ||
20967 | ||
20968 | ||
5476a9a4 GM |
20969 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
20970 | ||
20971 | ||
20972 | if test $HAVE_DUP2 = 1; then | |
20973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 | |
20974 | $as_echo_n "checking whether dup2 works... " >&6; } | |
20975 | if test "${gl_cv_func_dup2_works+set}" = set; then : | |
3e0be4ab GM |
20976 | $as_echo_n "(cached) " >&6 |
20977 | else | |
5476a9a4 GM |
20978 | if test "$cross_compiling" = yes; then : |
20979 | case "$host_os" in | |
20980 | mingw*) # on this platform, dup2 always returns 0 for success | |
20981 | gl_cv_func_dup2_works="guessing no" ;; | |
20982 | cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 | |
20983 | gl_cv_func_dup2_works="guessing no" ;; | |
20984 | linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a | |
20985 | # closed fd may yield -EBADF instead of -1 / errno=EBADF. | |
20986 | gl_cv_func_dup2_works="guessing no" ;; | |
20987 | freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. | |
20988 | gl_cv_func_dup2_works="guessing no" ;; | |
20989 | haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. | |
20990 | gl_cv_func_dup2_works="guessing no" ;; | |
20991 | *) gl_cv_func_dup2_works="guessing yes" ;; | |
20992 | esac | |
20993 | else | |
20994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 20995 | /* end confdefs.h. */ |
ae0d7250 | 20996 | |
5476a9a4 GM |
20997 | #include <unistd.h> |
20998 | #include <fcntl.h> | |
20999 | #include <errno.h> | |
3e0be4ab GM |
21000 | int |
21001 | main () | |
21002 | { | |
5476a9a4 GM |
21003 | int result = 0; |
21004 | #ifdef FD_CLOEXEC | |
21005 | if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) | |
21006 | result |= 1; | |
21007 | #endif | |
21008 | if (dup2 (1, 1) == 0) | |
21009 | result |= 2; | |
21010 | #ifdef FD_CLOEXEC | |
21011 | if (fcntl (1, F_GETFD) != FD_CLOEXEC) | |
21012 | result |= 4; | |
21013 | #endif | |
21014 | close (0); | |
21015 | if (dup2 (0, 0) != -1) | |
21016 | result |= 8; | |
21017 | /* Many gnulib modules require POSIX conformance of EBADF. */ | |
21018 | if (dup2 (2, 1000000) == -1 && errno != EBADF) | |
21019 | result |= 16; | |
0d1f53ad GM |
21020 | /* Flush out a cygwin core dump. */ |
21021 | if (dup2 (2, -1) != -1 || errno != EBADF) | |
21022 | result |= 32; | |
5476a9a4 GM |
21023 | return result; |
21024 | ||
ae0d7250 PE |
21025 | ; |
21026 | return 0; | |
21027 | } | |
5476a9a4 | 21028 | |
ae0d7250 | 21029 | _ACEOF |
5476a9a4 GM |
21030 | if ac_fn_c_try_run "$LINENO"; then : |
21031 | gl_cv_func_dup2_works=yes | |
ae0d7250 | 21032 | else |
5476a9a4 | 21033 | gl_cv_func_dup2_works=no |
ae0d7250 | 21034 | fi |
5476a9a4 GM |
21035 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
21036 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ae0d7250 | 21037 | fi |
5476a9a4 GM |
21038 | |
21039 | ||
3e0be4ab | 21040 | fi |
5476a9a4 GM |
21041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 |
21042 | $as_echo "$gl_cv_func_dup2_works" >&6; } | |
21043 | case "$gl_cv_func_dup2_works" in | |
21044 | *yes) ;; | |
21045 | *) | |
21046 | REPLACE_DUP2=1 | |
21047 | ;; | |
21048 | esac | |
21049 | fi | |
3e0be4ab | 21050 | |
3e0be4ab | 21051 | |
a6342fc8 | 21052 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then |
f199cab1 | 21053 | |
f199cab1 GM |
21054 | |
21055 | ||
f199cab1 | 21056 | |
f199cab1 | 21057 | |
f199cab1 | 21058 | |
f199cab1 | 21059 | |
f199cab1 | 21060 | |
5476a9a4 | 21061 | gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" |
f199cab1 GM |
21062 | |
21063 | ||
a6342fc8 | 21064 | fi |
f199cab1 | 21065 | |
f199cab1 | 21066 | |
f199cab1 | 21067 | |
f199cab1 | 21068 | |
f199cab1 | 21069 | |
5476a9a4 | 21070 | GNULIB_DUP2=1 |
f199cab1 GM |
21071 | |
21072 | ||
f199cab1 | 21073 | |
f199cab1 | 21074 | |
3e0be4ab | 21075 | |
3e0be4ab | 21076 | |
f199cab1 GM |
21077 | |
21078 | ||
ae0d7250 | 21079 | |
ae0d7250 | 21080 | |
5476a9a4 | 21081 | |
93131e11 GM |
21082 | GNULIB_ENVIRON=1 |
21083 | ||
21084 | ||
21085 | ||
21086 | ||
21087 | ||
21088 | ||
21089 | ||
21090 | ||
8966cbff GM |
21091 | LIB_EXECINFO='' |
21092 | EXECINFO_H='execinfo.h' | |
21093 | ||
21094 | if test $ac_cv_header_execinfo_h = yes; then | |
21095 | gl_saved_libs=$LIBS | |
21096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5 | |
21097 | $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; } | |
21098 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
21099 | $as_echo_n "(cached) " >&6 | |
21100 | else | |
21101 | ac_func_search_save_LIBS=$LIBS | |
21102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21103 | /* end confdefs.h. */ | |
21104 | ||
21105 | /* Override any GCC internal prototype to avoid an error. | |
21106 | Use char because int might match the return type of a GCC | |
21107 | builtin and then its argument prototype would still apply. */ | |
21108 | #ifdef __cplusplus | |
21109 | extern "C" | |
21110 | #endif | |
21111 | char backtrace_symbols_fd (); | |
21112 | int | |
21113 | main () | |
21114 | { | |
21115 | return backtrace_symbols_fd (); | |
21116 | ; | |
21117 | return 0; | |
21118 | } | |
21119 | _ACEOF | |
21120 | for ac_lib in '' execinfo; do | |
21121 | if test -z "$ac_lib"; then | |
21122 | ac_res="none required" | |
21123 | else | |
21124 | ac_res=-l$ac_lib | |
21125 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
21126 | fi | |
21127 | if ac_fn_c_try_link "$LINENO"; then : | |
21128 | ac_cv_search_backtrace_symbols_fd=$ac_res | |
21129 | fi | |
21130 | rm -f core conftest.err conftest.$ac_objext \ | |
21131 | conftest$ac_exeext | |
21132 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
21133 | break | |
21134 | fi | |
21135 | done | |
21136 | if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then : | |
21137 | ||
21138 | else | |
21139 | ac_cv_search_backtrace_symbols_fd=no | |
21140 | fi | |
21141 | rm conftest.$ac_ext | |
21142 | LIBS=$ac_func_search_save_LIBS | |
21143 | fi | |
21144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5 | |
21145 | $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; } | |
21146 | ac_res=$ac_cv_search_backtrace_symbols_fd | |
21147 | if test "$ac_res" != no; then : | |
21148 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
21149 | test "$ac_cv_search_backtrace_symbols_fd" = "none required" || | |
21150 | LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd | |
21151 | fi | |
21152 | ||
21153 | LIBS=$gl_saved_libs | |
21154 | test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H='' | |
21155 | fi | |
21156 | ||
21157 | if test -n "$EXECINFO_H"; then | |
21158 | ||
21159 | ||
21160 | ||
21161 | ||
21162 | ||
21163 | ||
21164 | ||
21165 | ||
21166 | gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext" | |
21167 | ||
21168 | fi | |
21169 | ||
21170 | ||
21171 | ||
21172 | if test -n "$EXECINFO_H"; then | |
21173 | GL_GENERATE_EXECINFO_H_TRUE= | |
21174 | GL_GENERATE_EXECINFO_H_FALSE='#' | |
21175 | else | |
21176 | GL_GENERATE_EXECINFO_H_TRUE='#' | |
21177 | GL_GENERATE_EXECINFO_H_FALSE= | |
21178 | fi | |
21179 | ||
21180 | ||
21181 | ||
21182 | ||
21183 | ||
93131e11 GM |
21184 | |
21185 | ||
21186 | ||
7cd2ed2c | 21187 | |
710f5812 GM |
21188 | if test $ac_cv_func_faccessat = no; then |
21189 | HAVE_FACCESSAT=0 | |
21190 | fi | |
21191 | ||
21192 | if test $HAVE_FACCESSAT = 0; then | |
21193 | ||
21194 | ||
21195 | ||
21196 | ||
21197 | ||
21198 | ||
21199 | ||
21200 | ||
21201 | gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext" | |
21202 | ||
21203 | ||
21204 | for ac_func in access | |
21205 | do : | |
21206 | ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" | |
21207 | if test "x$ac_cv_func_access" = x""yes; then : | |
21208 | cat >>confdefs.h <<_ACEOF | |
21209 | #define HAVE_ACCESS 1 | |
21210 | _ACEOF | |
21211 | ||
21212 | fi | |
21213 | done | |
21214 | ||
21215 | ||
21216 | fi | |
21217 | ||
21218 | ||
21219 | cat >>confdefs.h <<_ACEOF | |
21220 | #define GNULIB_FACCESSAT 1 | |
21221 | _ACEOF | |
21222 | ||
21223 | ||
21224 | ||
21225 | ||
21226 | ||
21227 | ||
21228 | ||
21229 | GNULIB_FACCESSAT=1 | |
21230 | ||
21231 | ||
21232 | ||
21233 | ||
21234 | ||
21235 | ||
21236 | ||
21237 | ||
21238 | ||
21239 | ||
21240 | ||
21241 | ||
21242 | ||
21243 | ||
21244 | ||
21245 | ||
21246 | if test $gl_cv_have_include_next = yes; then | |
21247 | gl_cv_next_fcntl_h='<'fcntl.h'>' | |
21248 | else | |
21249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 | |
21250 | $as_echo_n "checking absolute name of <fcntl.h>... " >&6; } | |
21251 | if test "${gl_cv_next_fcntl_h+set}" = set; then : | |
21252 | $as_echo_n "(cached) " >&6 | |
21253 | else | |
21254 | ||
21255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21256 | /* end confdefs.h. */ | |
21257 | #include <fcntl.h> | |
21258 | ||
21259 | _ACEOF | |
21260 | case "$host_os" in | |
21261 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
21262 | *) gl_absname_cpp="$ac_cpp" ;; | |
21263 | esac | |
21264 | ||
21265 | case "$host_os" in | |
21266 | mingw*) | |
21267 | gl_dirsep_regex='[/\\]' | |
21268 | ;; | |
21269 | *) | |
21270 | gl_dirsep_regex='\/' | |
21271 | ;; | |
21272 | esac | |
21273 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
21274 | ||
21275 | gl_header_literal_regex=`echo 'fcntl.h' \ | |
21276 | | sed -e "$gl_make_literal_regex_sed"` | |
21277 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
21278 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
21279 | s|^/[^/]|//&| | |
21280 | p | |
21281 | q | |
21282 | }' | |
21283 | gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
21284 | sed -n "$gl_absolute_header_sed"`'"' | |
21285 | ||
21286 | ||
21287 | fi | |
21288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 | |
21289 | $as_echo "$gl_cv_next_fcntl_h" >&6; } | |
21290 | fi | |
21291 | NEXT_FCNTL_H=$gl_cv_next_fcntl_h | |
21292 | ||
21293 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
21294 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
21295 | gl_next_as_first_directive='<'fcntl.h'>' | |
21296 | else | |
21297 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
21298 | gl_next_as_first_directive=$gl_cv_next_fcntl_h | |
21299 | fi | |
21300 | NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive | |
21301 | ||
21302 | ||
21303 | ||
21304 | ||
21305 | ||
21306 | ||
21307 | ||
21308 | ||
21309 | ||
21310 | ||
21311 | ||
21312 | ||
21313 | ||
21314 | ||
21315 | ||
2407788f GM |
21316 | LIB_FDATASYNC= |
21317 | ||
21318 | ||
21319 | if test $ac_cv_have_decl_fdatasync = no; then | |
21320 | HAVE_DECL_FDATASYNC=0 | |
21321 | for ac_func in fdatasync | |
21322 | do : | |
21323 | ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" | |
21324 | if test "x$ac_cv_func_fdatasync" = x""yes; then : | |
21325 | cat >>confdefs.h <<_ACEOF | |
21326 | #define HAVE_FDATASYNC 1 | |
21327 | _ACEOF | |
21328 | ||
21329 | fi | |
21330 | done | |
21331 | ||
21332 | if test $ac_cv_func_fdatasync = no; then | |
21333 | HAVE_FDATASYNC=0 | |
21334 | fi | |
21335 | else | |
21336 | gl_saved_libs=$LIBS | |
21337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 | |
21338 | $as_echo_n "checking for library containing fdatasync... " >&6; } | |
21339 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
21340 | $as_echo_n "(cached) " >&6 | |
21341 | else | |
21342 | ac_func_search_save_LIBS=$LIBS | |
21343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21344 | /* end confdefs.h. */ | |
21345 | ||
21346 | /* Override any GCC internal prototype to avoid an error. | |
21347 | Use char because int might match the return type of a GCC | |
21348 | builtin and then its argument prototype would still apply. */ | |
21349 | #ifdef __cplusplus | |
21350 | extern "C" | |
21351 | #endif | |
21352 | char fdatasync (); | |
21353 | int | |
21354 | main () | |
21355 | { | |
21356 | return fdatasync (); | |
21357 | ; | |
21358 | return 0; | |
21359 | } | |
21360 | _ACEOF | |
21361 | for ac_lib in '' rt posix4; do | |
21362 | if test -z "$ac_lib"; then | |
21363 | ac_res="none required" | |
21364 | else | |
21365 | ac_res=-l$ac_lib | |
21366 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
21367 | fi | |
21368 | if ac_fn_c_try_link "$LINENO"; then : | |
21369 | ac_cv_search_fdatasync=$ac_res | |
21370 | fi | |
21371 | rm -f core conftest.err conftest.$ac_objext \ | |
21372 | conftest$ac_exeext | |
21373 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
21374 | break | |
21375 | fi | |
21376 | done | |
21377 | if test "${ac_cv_search_fdatasync+set}" = set; then : | |
21378 | ||
21379 | else | |
21380 | ac_cv_search_fdatasync=no | |
21381 | fi | |
21382 | rm conftest.$ac_ext | |
21383 | LIBS=$ac_func_search_save_LIBS | |
21384 | fi | |
21385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 | |
21386 | $as_echo "$ac_cv_search_fdatasync" >&6; } | |
21387 | ac_res=$ac_cv_search_fdatasync | |
21388 | if test "$ac_res" != no; then : | |
21389 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
21390 | test "$ac_cv_search_fdatasync" = "none required" || | |
21391 | LIB_FDATASYNC=$ac_cv_search_fdatasync | |
21392 | fi | |
21393 | ||
21394 | LIBS=$gl_saved_libs | |
21395 | fi | |
21396 | ||
21397 | if test $HAVE_FDATASYNC = 0; then | |
21398 | ||
21399 | ||
21400 | ||
21401 | ||
21402 | ||
21403 | ||
21404 | ||
21405 | ||
21406 | gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext" | |
21407 | ||
21408 | fi | |
21409 | ||
21410 | ||
21411 | ||
21412 | ||
21413 | ||
21414 | GNULIB_FDATASYNC=1 | |
21415 | ||
21416 | ||
21417 | ||
21418 | ||
21419 | ||
21420 | ||
21421 | ||
21422 | ||
21423 | ||
710f5812 | 21424 | |
d7ad186c GM |
21425 | ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " |
21426 | #include <dirent.h> | |
21427 | ||
21428 | " | |
21429 | if test "x$ac_cv_have_decl_fdopendir" = x""yes; then : | |
21430 | ac_have_decl=1 | |
21431 | else | |
21432 | ac_have_decl=0 | |
21433 | fi | |
21434 | ||
21435 | cat >>confdefs.h <<_ACEOF | |
21436 | #define HAVE_DECL_FDOPENDIR $ac_have_decl | |
21437 | _ACEOF | |
21438 | if test $ac_have_decl = 1; then : | |
21439 | ||
21440 | else | |
21441 | HAVE_DECL_FDOPENDIR=0 | |
21442 | fi | |
21443 | ||
21444 | ||
21445 | if test $ac_cv_func_fdopendir = no; then | |
21446 | HAVE_FDOPENDIR=0 | |
21447 | else | |
21448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 | |
21449 | $as_echo_n "checking whether fdopendir works... " >&6; } | |
21450 | if test "${gl_cv_func_fdopendir_works+set}" = set; then : | |
21451 | $as_echo_n "(cached) " >&6 | |
21452 | else | |
21453 | if test "$cross_compiling" = yes; then : | |
21454 | case "$host_os" in | |
21455 | # Guess yes on glibc systems. | |
21456 | *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; | |
21457 | # If we don't know, assume the worst. | |
21458 | *) gl_cv_func_fdopendir_works="guessing no" ;; | |
21459 | esac | |
21460 | ||
21461 | else | |
21462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21463 | /* end confdefs.h. */ | |
21464 | ||
21465 | #include <dirent.h> | |
21466 | #include <fcntl.h> | |
21467 | #include <unistd.h> | |
21468 | #if !HAVE_DECL_FDOPENDIR | |
21469 | extern | |
21470 | # ifdef __cplusplus | |
21471 | "C" | |
21472 | # endif | |
21473 | DIR *fdopendir (int); | |
21474 | #endif | |
21475 | ||
21476 | int | |
21477 | main () | |
21478 | { | |
21479 | int result = 0; | |
21480 | int fd = open ("conftest.c", O_RDONLY); | |
21481 | if (fd < 0) result |= 1; | |
21482 | if (fdopendir (fd)) result |= 2; | |
21483 | if (close (fd)) result |= 4; | |
21484 | return result; | |
21485 | ; | |
21486 | return 0; | |
21487 | } | |
21488 | _ACEOF | |
21489 | if ac_fn_c_try_run "$LINENO"; then : | |
21490 | gl_cv_func_fdopendir_works=yes | |
21491 | else | |
21492 | gl_cv_func_fdopendir_works=no | |
21493 | fi | |
21494 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21495 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21496 | fi | |
21497 | ||
21498 | fi | |
21499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 | |
21500 | $as_echo "$gl_cv_func_fdopendir_works" >&6; } | |
21501 | case "$gl_cv_func_fdopendir_works" in | |
21502 | *yes) ;; | |
21503 | *) | |
21504 | REPLACE_FDOPENDIR=1 | |
21505 | ;; | |
21506 | esac | |
21507 | fi | |
21508 | ||
21509 | if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then | |
21510 | ||
21511 | ||
21512 | ||
21513 | ||
21514 | ||
21515 | ||
21516 | ||
21517 | ||
21518 | gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" | |
21519 | ||
21520 | fi | |
21521 | ||
21522 | ||
21523 | ||
21524 | ||
21525 | ||
21526 | GNULIB_FDOPENDIR=1 | |
21527 | ||
21528 | ||
21529 | ||
21530 | ||
21531 | ||
21532 | ||
21533 | ||
21534 | cat >>confdefs.h <<_ACEOF | |
21535 | #define GNULIB_FDOPENDIR 1 | |
21536 | _ACEOF | |
21537 | ||
21538 | ||
21539 | ||
21540 | ||
21541 | ||
21542 | ||
21543 | ||
710f5812 | 21544 | |
3bf26e96 GM |
21545 | |
21546 | fp_headers=' | |
21547 | # include <stdio.h> | |
21548 | # if HAVE_STDIO_EXT_H | |
21549 | # include <stdio_ext.h> | |
21550 | # endif | |
21551 | ' | |
21552 | ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers | |
21553 | " | |
21554 | if test "x$ac_cv_have_decl___fpending" = x""yes; then : | |
21555 | ac_have_decl=1 | |
21556 | else | |
21557 | ac_have_decl=0 | |
21558 | fi | |
21559 | ||
21560 | cat >>confdefs.h <<_ACEOF | |
21561 | #define HAVE_DECL___FPENDING $ac_have_decl | |
21562 | _ACEOF | |
21563 | ||
21564 | ||
21565 | if test $ac_cv_func___fpending = no; then | |
21566 | ||
21567 | ||
21568 | ||
21569 | ||
21570 | ||
21571 | ||
21572 | ||
21573 | ||
21574 | gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" | |
21575 | ||
21576 | ||
21577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 | |
21578 | $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } | |
21579 | if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then : | |
21580 | $as_echo_n "(cached) " >&6 | |
21581 | else | |
21582 | ||
21583 | for ac_expr in \ | |
21584 | \ | |
21585 | '# glibc2' \ | |
21586 | 'fp->_IO_write_ptr - fp->_IO_write_base' \ | |
21587 | \ | |
21588 | '# traditional Unix' \ | |
21589 | 'fp->_ptr - fp->_base' \ | |
21590 | \ | |
21591 | '# BSD' \ | |
21592 | 'fp->_p - fp->_bf._base' \ | |
21593 | \ | |
21594 | '# SCO, Unixware' \ | |
21595 | '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ | |
21596 | \ | |
21597 | '# QNX' \ | |
21598 | '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ | |
21599 | \ | |
21600 | '# old glibc?' \ | |
21601 | 'fp->__bufp - fp->__buffer' \ | |
21602 | \ | |
21603 | '# old glibc iostream?' \ | |
21604 | 'fp->_pptr - fp->_pbase' \ | |
21605 | \ | |
21606 | '# emx+gcc' \ | |
21607 | 'fp->_ptr - fp->_buffer' \ | |
21608 | \ | |
21609 | '# Minix' \ | |
21610 | 'fp->_ptr - fp->_buf' \ | |
21611 | \ | |
21612 | '# Plan9' \ | |
21613 | 'fp->wp - fp->buf' \ | |
21614 | \ | |
21615 | '# VMS' \ | |
21616 | '(*fp)->_ptr - (*fp)->_base' \ | |
21617 | \ | |
21618 | '# e.g., DGUX R4.11; the info is not available' \ | |
21619 | 1 \ | |
21620 | ; do | |
21621 | ||
21622 | # Skip each embedded comment. | |
21623 | case "$ac_expr" in '#'*) continue;; esac | |
21624 | ||
21625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21626 | /* end confdefs.h. */ | |
21627 | #include <stdio.h> | |
21628 | int | |
21629 | main () | |
21630 | { | |
21631 | FILE *fp = stdin; (void) ($ac_expr); | |
21632 | ; | |
21633 | return 0; | |
21634 | } | |
21635 | _ACEOF | |
21636 | if ac_fn_c_try_compile "$LINENO"; then : | |
21637 | fp_done=yes | |
21638 | ||
21639 | fi | |
21640 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
21641 | test "$fp_done" = yes && break | |
21642 | done | |
21643 | ||
21644 | ac_cv_sys_pending_output_n_bytes=$ac_expr | |
21645 | ||
21646 | ||
21647 | fi | |
21648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 | |
21649 | $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } | |
21650 | ||
21651 | cat >>confdefs.h <<_ACEOF | |
21652 | #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes | |
21653 | _ACEOF | |
21654 | ||
21655 | ||
21656 | fi | |
21657 | ||
21658 | ||
d7ad186c GM |
21659 | |
21660 | ||
21661 | ||
21662 | ||
21663 | if test $ac_cv_func_fstatat = no; then | |
21664 | HAVE_FSTATAT=0 | |
21665 | else | |
21666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 | |
21667 | $as_echo_n "checking whether fstatat (..., 0) works... " >&6; } | |
21668 | if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then : | |
21669 | $as_echo_n "(cached) " >&6 | |
21670 | else | |
21671 | if test "$cross_compiling" = yes; then : | |
21672 | case "$host_os" in | |
21673 | aix*) gl_cv_func_fstatat_zero_flag="guessing no";; | |
21674 | *) gl_cv_func_fstatat_zero_flag="guessing yes";; | |
21675 | esac | |
21676 | ||
21677 | else | |
21678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
21679 | /* end confdefs.h. */ | |
21680 | ||
21681 | #include <fcntl.h> | |
21682 | #include <sys/stat.h> | |
21683 | int | |
21684 | main (void) | |
21685 | { | |
21686 | struct stat a; | |
21687 | return fstatat (AT_FDCWD, ".", &a, 0) != 0; | |
21688 | } | |
21689 | ||
21690 | _ACEOF | |
21691 | if ac_fn_c_try_run "$LINENO"; then : | |
21692 | gl_cv_func_fstatat_zero_flag=yes | |
21693 | else | |
21694 | gl_cv_func_fstatat_zero_flag=no | |
21695 | fi | |
21696 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
21697 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
21698 | fi | |
21699 | ||
21700 | ||
21701 | fi | |
21702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 | |
21703 | $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } | |
21704 | ||
21705 | case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in | |
21706 | *yes+*yes) ;; | |
21707 | *) REPLACE_FSTATAT=1 | |
21708 | case $gl_cv_func_fstatat_zero_flag in | |
21709 | *yes) | |
21710 | ||
21711 | $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h | |
21712 | ||
21713 | ;; | |
21714 | esac | |
21715 | ;; | |
21716 | esac | |
21717 | fi | |
21718 | ||
21719 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
21720 | ||
21721 | ||
21722 | ||
21723 | ||
21724 | ||
21725 | ||
21726 | ||
21727 | ||
21728 | gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" | |
21729 | ||
21730 | fi | |
21731 | ||
21732 | ||
21733 | ||
21734 | ||
21735 | ||
21736 | GNULIB_FSTATAT=1 | |
21737 | ||
21738 | ||
21739 | ||
21740 | ||
21741 | ||
21742 | ||
21743 | ||
2407788f GM |
21744 | |
21745 | if test $ac_cv_func_fsync = no; then | |
21746 | HAVE_FSYNC=0 | |
21747 | fi | |
21748 | ||
21749 | if test $HAVE_FSYNC = 0; then | |
21750 | ||
21751 | ||
21752 | ||
21753 | ||
21754 | ||
21755 | ||
21756 | ||
21757 | ||
21758 | gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext" | |
21759 | ||
21760 | : | |
21761 | fi | |
21762 | ||
21763 | ||
21764 | ||
21765 | ||
21766 | ||
21767 | GNULIB_FSYNC=1 | |
21768 | ||
21769 | ||
21770 | ||
21771 | ||
21772 | ||
21773 | ||
21774 | ||
5476a9a4 GM |
21775 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
21776 | ||
21777 | ||
21778 | gl_save_LIBS=$LIBS | |
21779 | ||
21780 | # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, | |
21781 | # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. | |
21782 | HAVE_GETLOADAVG=1 | |
21783 | ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" | |
21784 | if test "x$ac_cv_func_getloadavg" = x""yes; then : | |
21785 | ||
21786 | else | |
21787 | gl_func_getloadavg_done=no | |
21788 | ||
21789 | # Some systems with -lutil have (and need) -lkvm as well, some do not. | |
21790 | # On Solaris, -lkvm requires nlist from -lelf, so check that first | |
21791 | # to get the right answer into the cache. | |
21792 | # For kstat on solaris, we need to test for libelf and libkvm to force the | |
21793 | # definition of SVR4 below. | |
21794 | if test $gl_func_getloadavg_done = no; then | |
21795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 | |
21796 | $as_echo_n "checking for elf_begin in -lelf... " >&6; } | |
21797 | if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : | |
6ad6792b GM |
21798 | $as_echo_n "(cached) " >&6 |
21799 | else | |
3e0be4ab | 21800 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 21801 | LIBS="-lelf $LIBS" |
3e0be4ab | 21802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6ad6792b | 21803 | /* end confdefs.h. */ |
6ad6792b | 21804 | |
3e0be4ab GM |
21805 | /* Override any GCC internal prototype to avoid an error. |
21806 | Use char because int might match the return type of a GCC | |
21807 | builtin and then its argument prototype would still apply. */ | |
21808 | #ifdef __cplusplus | |
21809 | extern "C" | |
21810 | #endif | |
5476a9a4 | 21811 | char elf_begin (); |
6ad6792b GM |
21812 | int |
21813 | main () | |
21814 | { | |
5476a9a4 | 21815 | return elf_begin (); |
6ad6792b GM |
21816 | ; |
21817 | return 0; | |
21818 | } | |
21819 | _ACEOF | |
3e0be4ab | 21820 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21821 | ac_cv_lib_elf_elf_begin=yes |
3e0be4ab | 21822 | else |
5476a9a4 | 21823 | ac_cv_lib_elf_elf_begin=no |
6ad6792b | 21824 | fi |
3e0be4ab GM |
21825 | rm -f core conftest.err conftest.$ac_objext \ |
21826 | conftest$ac_exeext conftest.$ac_ext | |
21827 | LIBS=$ac_check_lib_save_LIBS | |
6ad6792b | 21828 | fi |
5476a9a4 GM |
21829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 |
21830 | $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } | |
21831 | if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : | |
21832 | LIBS="-lelf $LIBS" | |
6ad6792b GM |
21833 | fi |
21834 | ||
5476a9a4 GM |
21835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 |
21836 | $as_echo_n "checking for kvm_open in -lkvm... " >&6; } | |
21837 | if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : | |
6c051bab GM |
21838 | $as_echo_n "(cached) " >&6 |
21839 | else | |
5476a9a4 GM |
21840 | ac_check_lib_save_LIBS=$LIBS |
21841 | LIBS="-lkvm $LIBS" | |
21842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6c051bab | 21843 | /* end confdefs.h. */ |
3e0be4ab | 21844 | |
5476a9a4 GM |
21845 | /* Override any GCC internal prototype to avoid an error. |
21846 | Use char because int might match the return type of a GCC | |
21847 | builtin and then its argument prototype would still apply. */ | |
21848 | #ifdef __cplusplus | |
21849 | extern "C" | |
21850 | #endif | |
21851 | char kvm_open (); | |
6c051bab GM |
21852 | int |
21853 | main () | |
21854 | { | |
5476a9a4 | 21855 | return kvm_open (); |
6c051bab GM |
21856 | ; |
21857 | return 0; | |
21858 | } | |
21859 | _ACEOF | |
3e0be4ab | 21860 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21861 | ac_cv_lib_kvm_kvm_open=yes |
6c051bab | 21862 | else |
5476a9a4 | 21863 | ac_cv_lib_kvm_kvm_open=no |
6c051bab | 21864 | fi |
3e0be4ab GM |
21865 | rm -f core conftest.err conftest.$ac_objext \ |
21866 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 | 21867 | LIBS=$ac_check_lib_save_LIBS |
6c051bab | 21868 | fi |
5476a9a4 GM |
21869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 |
21870 | $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } | |
21871 | if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : | |
21872 | LIBS="-lkvm $LIBS" | |
3e0be4ab | 21873 | fi |
6c051bab | 21874 | |
5476a9a4 GM |
21875 | # Check for the 4.4BSD definition of getloadavg. |
21876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 | |
21877 | $as_echo_n "checking for getloadavg in -lutil... " >&6; } | |
21878 | if test "${ac_cv_lib_util_getloadavg+set}" = set; then : | |
ae0d7250 PE |
21879 | $as_echo_n "(cached) " >&6 |
21880 | else | |
5476a9a4 GM |
21881 | ac_check_lib_save_LIBS=$LIBS |
21882 | LIBS="-lutil $LIBS" | |
21883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6d153f56 | 21884 | /* end confdefs.h. */ |
5476a9a4 GM |
21885 | |
21886 | /* Override any GCC internal prototype to avoid an error. | |
21887 | Use char because int might match the return type of a GCC | |
21888 | builtin and then its argument prototype would still apply. */ | |
21889 | #ifdef __cplusplus | |
21890 | extern "C" | |
21891 | #endif | |
21892 | char getloadavg (); | |
ae0d7250 PE |
21893 | int |
21894 | main () | |
21895 | { | |
5476a9a4 | 21896 | return getloadavg (); |
ae0d7250 PE |
21897 | ; |
21898 | return 0; | |
21899 | } | |
21900 | _ACEOF | |
3e0be4ab | 21901 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21902 | ac_cv_lib_util_getloadavg=yes |
ae0d7250 | 21903 | else |
5476a9a4 | 21904 | ac_cv_lib_util_getloadavg=no |
ae0d7250 | 21905 | fi |
3e0be4ab GM |
21906 | rm -f core conftest.err conftest.$ac_objext \ |
21907 | conftest$ac_exeext conftest.$ac_ext | |
5476a9a4 GM |
21908 | LIBS=$ac_check_lib_save_LIBS |
21909 | fi | |
21910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 | |
21911 | $as_echo "$ac_cv_lib_util_getloadavg" >&6; } | |
21912 | if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : | |
21913 | LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes | |
3e0be4ab | 21914 | fi |
6d153f56 | 21915 | |
5476a9a4 | 21916 | fi |
6d153f56 | 21917 | |
5476a9a4 GM |
21918 | if test $gl_func_getloadavg_done = no; then |
21919 | # There is a commonly available library for RS/6000 AIX. | |
21920 | # Since it is not a standard part of AIX, it might be installed locally. | |
21921 | gl_getloadavg_LIBS=$LIBS | |
21922 | LIBS="-L/usr/local/lib $LIBS" | |
21923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 | |
21924 | $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } | |
21925 | if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : | |
f199cab1 | 21926 | $as_echo_n "(cached) " >&6 |
3e0be4ab | 21927 | else |
f199cab1 | 21928 | ac_check_lib_save_LIBS=$LIBS |
5476a9a4 | 21929 | LIBS="-lgetloadavg $LIBS" |
f199cab1 GM |
21930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21931 | /* end confdefs.h. */ | |
3e0be4ab | 21932 | |
f199cab1 GM |
21933 | /* Override any GCC internal prototype to avoid an error. |
21934 | Use char because int might match the return type of a GCC | |
21935 | builtin and then its argument prototype would still apply. */ | |
21936 | #ifdef __cplusplus | |
21937 | extern "C" | |
21938 | #endif | |
5476a9a4 | 21939 | char getloadavg (); |
f199cab1 GM |
21940 | int |
21941 | main () | |
21942 | { | |
5476a9a4 | 21943 | return getloadavg (); |
f199cab1 GM |
21944 | ; |
21945 | return 0; | |
21946 | } | |
ae0d7250 | 21947 | _ACEOF |
f199cab1 | 21948 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21949 | ac_cv_lib_getloadavg_getloadavg=yes |
f199cab1 | 21950 | else |
5476a9a4 | 21951 | ac_cv_lib_getloadavg_getloadavg=no |
ae0d7250 | 21952 | fi |
f199cab1 GM |
21953 | rm -f core conftest.err conftest.$ac_objext \ |
21954 | conftest$ac_exeext conftest.$ac_ext | |
21955 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 21956 | fi |
5476a9a4 GM |
21957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 |
21958 | $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } | |
21959 | if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : | |
21960 | LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes | |
21961 | else | |
21962 | LIBS=$gl_getloadavg_LIBS | |
6d153f56 | 21963 | fi |
ae0d7250 | 21964 | |
5476a9a4 | 21965 | fi |
16c3e636 | 21966 | |
5476a9a4 GM |
21967 | # Set up the replacement function if necessary. |
21968 | if test $gl_func_getloadavg_done = no; then | |
21969 | HAVE_GETLOADAVG=0 | |
16c3e636 | 21970 | |
5476a9a4 GM |
21971 | # Solaris has libkstat which does not require root. |
21972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 | |
21973 | $as_echo_n "checking for kstat_open in -lkstat... " >&6; } | |
21974 | if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : | |
f199cab1 GM |
21975 | $as_echo_n "(cached) " >&6 |
21976 | else | |
21977 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 21978 | LIBS="-lkstat $LIBS" |
f199cab1 GM |
21979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
21980 | /* end confdefs.h. */ | |
5f90be1b | 21981 | |
f199cab1 GM |
21982 | /* Override any GCC internal prototype to avoid an error. |
21983 | Use char because int might match the return type of a GCC | |
21984 | builtin and then its argument prototype would still apply. */ | |
21985 | #ifdef __cplusplus | |
21986 | extern "C" | |
21987 | #endif | |
5476a9a4 | 21988 | char kstat_open (); |
f199cab1 GM |
21989 | int |
21990 | main () | |
21991 | { | |
5476a9a4 | 21992 | return kstat_open (); |
f199cab1 GM |
21993 | ; |
21994 | return 0; | |
21995 | } | |
3e0be4ab | 21996 | _ACEOF |
f199cab1 | 21997 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 21998 | ac_cv_lib_kstat_kstat_open=yes |
f199cab1 | 21999 | else |
5476a9a4 | 22000 | ac_cv_lib_kstat_kstat_open=no |
5f90be1b | 22001 | fi |
f199cab1 GM |
22002 | rm -f core conftest.err conftest.$ac_objext \ |
22003 | conftest$ac_exeext conftest.$ac_ext | |
22004 | LIBS=$ac_check_lib_save_LIBS | |
3e0be4ab | 22005 | fi |
5476a9a4 GM |
22006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 |
22007 | $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } | |
22008 | if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : | |
3e0be4ab | 22009 | cat >>confdefs.h <<_ACEOF |
5476a9a4 | 22010 | #define HAVE_LIBKSTAT 1 |
3e0be4ab | 22011 | _ACEOF |
5f90be1b | 22012 | |
5476a9a4 | 22013 | LIBS="-lkstat $LIBS" |
5f90be1b | 22014 | |
f199cab1 | 22015 | fi |
5f90be1b | 22016 | |
5476a9a4 | 22017 | test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes |
da6c8463 | 22018 | |
5476a9a4 GM |
22019 | # AIX has libperfstat which does not require root |
22020 | if test $gl_func_getloadavg_done = no; then | |
22021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 | |
22022 | $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } | |
22023 | if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : | |
f199cab1 GM |
22024 | $as_echo_n "(cached) " >&6 |
22025 | else | |
5476a9a4 GM |
22026 | ac_check_lib_save_LIBS=$LIBS |
22027 | LIBS="-lperfstat $LIBS" | |
22028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5f90be1b | 22029 | /* end confdefs.h. */ |
5476a9a4 GM |
22030 | |
22031 | /* Override any GCC internal prototype to avoid an error. | |
22032 | Use char because int might match the return type of a GCC | |
22033 | builtin and then its argument prototype would still apply. */ | |
22034 | #ifdef __cplusplus | |
22035 | extern "C" | |
22036 | #endif | |
22037 | char perfstat_cpu_total (); | |
5f90be1b PE |
22038 | int |
22039 | main () | |
22040 | { | |
5476a9a4 | 22041 | return perfstat_cpu_total (); |
5f90be1b PE |
22042 | ; |
22043 | return 0; | |
22044 | } | |
22045 | _ACEOF | |
5476a9a4 GM |
22046 | if ac_fn_c_try_link "$LINENO"; then : |
22047 | ac_cv_lib_perfstat_perfstat_cpu_total=yes | |
f199cab1 | 22048 | else |
5476a9a4 | 22049 | ac_cv_lib_perfstat_perfstat_cpu_total=no |
f199cab1 | 22050 | fi |
5476a9a4 GM |
22051 | rm -f core conftest.err conftest.$ac_objext \ |
22052 | conftest$ac_exeext conftest.$ac_ext | |
22053 | LIBS=$ac_check_lib_save_LIBS | |
f199cab1 | 22054 | fi |
5476a9a4 GM |
22055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 |
22056 | $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } | |
22057 | if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : | |
22058 | cat >>confdefs.h <<_ACEOF | |
22059 | #define HAVE_LIBPERFSTAT 1 | |
22060 | _ACEOF | |
22061 | ||
22062 | LIBS="-lperfstat $LIBS" | |
22063 | ||
22064 | fi | |
22065 | ||
22066 | test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes | |
22067 | fi | |
22068 | ||
22069 | if test $gl_func_getloadavg_done = no; then | |
22070 | ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" | |
22071 | if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : | |
22072 | gl_func_getloadavg_done=yes | |
22073 | ||
22074 | $as_echo "#define DGUX 1" >>confdefs.h | |
22075 | ||
22076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 | |
22077 | $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } | |
22078 | if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : | |
f199cab1 GM |
22079 | $as_echo_n "(cached) " >&6 |
22080 | else | |
22081 | ac_check_lib_save_LIBS=$LIBS | |
5476a9a4 | 22082 | LIBS="-ldgc $LIBS" |
f199cab1 GM |
22083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22084 | /* end confdefs.h. */ | |
3e0be4ab | 22085 | |
f199cab1 GM |
22086 | /* Override any GCC internal prototype to avoid an error. |
22087 | Use char because int might match the return type of a GCC | |
22088 | builtin and then its argument prototype would still apply. */ | |
22089 | #ifdef __cplusplus | |
22090 | extern "C" | |
22091 | #endif | |
5476a9a4 | 22092 | char dg_sys_info (); |
f199cab1 GM |
22093 | int |
22094 | main () | |
22095 | { | |
5476a9a4 | 22096 | return dg_sys_info (); |
f199cab1 GM |
22097 | ; |
22098 | return 0; | |
22099 | } | |
22100 | _ACEOF | |
22101 | if ac_fn_c_try_link "$LINENO"; then : | |
5476a9a4 | 22102 | ac_cv_lib_dgc_dg_sys_info=yes |
f199cab1 | 22103 | else |
5476a9a4 | 22104 | ac_cv_lib_dgc_dg_sys_info=no |
5f90be1b | 22105 | fi |
3e0be4ab GM |
22106 | rm -f core conftest.err conftest.$ac_objext \ |
22107 | conftest$ac_exeext conftest.$ac_ext | |
f199cab1 | 22108 | LIBS=$ac_check_lib_save_LIBS |
5f90be1b | 22109 | fi |
5476a9a4 GM |
22110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 |
22111 | $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } | |
22112 | if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : | |
22113 | cat >>confdefs.h <<_ACEOF | |
22114 | #define HAVE_LIBDGC 1 | |
22115 | _ACEOF | |
22116 | ||
22117 | LIBS="-ldgc $LIBS" | |
22118 | ||
da6c8463 GM |
22119 | fi |
22120 | ||
5476a9a4 GM |
22121 | fi |
22122 | ||
22123 | ||
22124 | fi | |
22125 | fi | |
22126 | fi | |
22127 | ||
22128 | ||
22129 | if test "x$gl_save_LIBS" = x; then | |
22130 | GETLOADAVG_LIBS=$LIBS | |
f199cab1 | 22131 | else |
5476a9a4 GM |
22132 | GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` |
22133 | fi | |
22134 | LIBS=$gl_save_LIBS | |
22135 | ||
22136 | ||
22137 | # Test whether the system declares getloadavg. Solaris has the function | |
22138 | # but declares it in <sys/loadavg.h>, not <stdlib.h>. | |
22139 | for ac_header in sys/loadavg.h | |
22140 | do : | |
22141 | ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" | |
22142 | if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : | |
22143 | cat >>confdefs.h <<_ACEOF | |
22144 | #define HAVE_SYS_LOADAVG_H 1 | |
f199cab1 | 22145 | _ACEOF |
5476a9a4 | 22146 | |
f199cab1 | 22147 | fi |
5476a9a4 GM |
22148 | |
22149 | done | |
22150 | ||
22151 | if test $ac_cv_header_sys_loadavg_h = yes; then | |
22152 | HAVE_SYS_LOADAVG_H=1 | |
22153 | else | |
22154 | HAVE_SYS_LOADAVG_H=0 | |
f199cab1 | 22155 | fi |
5476a9a4 GM |
22156 | ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H |
22157 | # include <sys/loadavg.h> | |
22158 | #endif | |
22159 | #include <stdlib.h> | |
22160 | " | |
22161 | if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : | |
5f90be1b | 22162 | |
f199cab1 | 22163 | else |
5476a9a4 | 22164 | HAVE_DECL_GETLOADAVG=0 |
f199cab1 | 22165 | fi |
5f90be1b | 22166 | |
5f90be1b | 22167 | |
a6342fc8 | 22168 | if test $HAVE_GETLOADAVG = 0; then |
5476a9a4 GM |
22169 | |
22170 | ||
22171 | ||
22172 | ||
22173 | ||
22174 | ||
22175 | ||
22176 | ||
22177 | gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" | |
22178 | ||
22179 | ||
22180 | # Figure out what our getloadavg.c needs. | |
22181 | ||
22182 | ||
22183 | ||
22184 | # On HPUX9, an unprivileged user can get load averages this way. | |
22185 | if test $gl_func_getloadavg_done = no; then | |
22186 | for ac_func in pstat_getdynamic | |
22187 | do : | |
22188 | ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" | |
22189 | if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : | |
22190 | cat >>confdefs.h <<_ACEOF | |
22191 | #define HAVE_PSTAT_GETDYNAMIC 1 | |
22192 | _ACEOF | |
22193 | gl_func_getloadavg_done=yes | |
3e0be4ab | 22194 | fi |
5476a9a4 | 22195 | done |
6ad6792b | 22196 | |
5476a9a4 | 22197 | fi |
6ad6792b | 22198 | |
5476a9a4 GM |
22199 | # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it |
22200 | # uses stabs), but it is still SVR4. We cannot check for <elf.h> because | |
22201 | # Irix 4.0.5F has the header but not the library. | |
22202 | if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ | |
22203 | && test "$ac_cv_lib_kvm_kvm_open" = yes; then | |
22204 | gl_func_getloadavg_done=yes | |
6ad6792b | 22205 | |
5476a9a4 | 22206 | $as_echo "#define SVR4 1" >>confdefs.h |
6ad6792b | 22207 | |
5476a9a4 GM |
22208 | fi |
22209 | ||
22210 | if test $gl_func_getloadavg_done = no; then | |
22211 | ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" | |
22212 | if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : | |
22213 | gl_func_getloadavg_done=yes | |
22214 | ||
22215 | $as_echo "#define UMAX 1" >>confdefs.h | |
22216 | ||
22217 | ||
22218 | $as_echo "#define UMAX4_3 1" >>confdefs.h | |
22219 | ||
22220 | fi | |
22221 | ||
22222 | ||
22223 | fi | |
22224 | ||
22225 | if test $gl_func_getloadavg_done = no; then | |
22226 | ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" | |
22227 | if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : | |
22228 | gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h | |
22229 | ||
22230 | fi | |
22231 | ||
22232 | ||
22233 | fi | |
22234 | ||
22235 | if test $gl_func_getloadavg_done = no; then | |
22236 | for ac_header in mach/mach.h | |
22237 | do : | |
22238 | ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" | |
22239 | if test "x$ac_cv_header_mach_mach_h" = x""yes; then : | |
22240 | cat >>confdefs.h <<_ACEOF | |
22241 | #define HAVE_MACH_MACH_H 1 | |
22242 | _ACEOF | |
22243 | ||
22244 | fi | |
22245 | ||
22246 | done | |
22247 | ||
22248 | fi | |
22249 | ||
22250 | for ac_header in nlist.h | |
22251 | do : | |
22252 | ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" | |
22253 | if test "x$ac_cv_header_nlist_h" = x""yes; then : | |
22254 | cat >>confdefs.h <<_ACEOF | |
22255 | #define HAVE_NLIST_H 1 | |
22256 | _ACEOF | |
22257 | ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h> | |
22258 | " | |
22259 | if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : | |
22260 | ||
22261 | cat >>confdefs.h <<_ACEOF | |
22262 | #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 | |
22263 | _ACEOF | |
6ad6792b | 22264 | |
0eb775a3 | 22265 | |
f199cab1 | 22266 | fi |
3e0be4ab | 22267 | |
5476a9a4 | 22268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 22269 | /* end confdefs.h. */ |
5476a9a4 | 22270 | #include <nlist.h> |
f199cab1 GM |
22271 | int |
22272 | main () | |
22273 | { | |
5476a9a4 GM |
22274 | struct nlist x; |
22275 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | |
22276 | x.n_un.n_name = ""; | |
22277 | #else | |
22278 | x.n_name = ""; | |
22279 | #endif | |
f199cab1 GM |
22280 | ; |
22281 | return 0; | |
22282 | } | |
22283 | _ACEOF | |
5476a9a4 | 22284 | if ac_fn_c_try_link "$LINENO"; then : |
6ad6792b | 22285 | |
5476a9a4 | 22286 | $as_echo "#define N_NAME_POINTER 1" >>confdefs.h |
6ad6792b GM |
22287 | |
22288 | fi | |
5476a9a4 GM |
22289 | rm -f core conftest.err conftest.$ac_objext \ |
22290 | conftest$ac_exeext conftest.$ac_ext | |
6ad6792b | 22291 | |
5476a9a4 | 22292 | fi |
6ad6792b | 22293 | |
5476a9a4 | 22294 | done |
6ad6792b | 22295 | |
a6342fc8 | 22296 | fi |
ca36e0ff | 22297 | |
ca36e0ff GM |
22298 | |
22299 | ||
1f5d53eb PE |
22300 | |
22301 | ||
5476a9a4 | 22302 | GNULIB_GETLOADAVG=1 |
1f5d53eb PE |
22303 | |
22304 | ||
22305 | ||
22306 | ||
22307 | ||
22308 | ||
22309 | ||
1f5d53eb | 22310 | |
1f5d53eb | 22311 | |
3e0be4ab | 22312 | |
a6342fc8 | 22313 | if test $REPLACE_GETOPT = 1; then |
3e0be4ab | 22314 | |
1f5d53eb PE |
22315 | |
22316 | ||
1f5d53eb | 22317 | |
1f5d53eb PE |
22318 | |
22319 | ||
22320 | ||
22321 | ||
5476a9a4 | 22322 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" |
0eb775a3 GM |
22323 | |
22324 | ||
1f5d53eb PE |
22325 | |
22326 | ||
16c3e636 | 22327 | |
5476a9a4 GM |
22328 | |
22329 | ||
22330 | ||
22331 | ||
22332 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
22333 | ||
22334 | ||
22335 | ||
22336 | ||
a6342fc8 GM |
22337 | GNULIB_GL_UNISTD_H_GETOPT=1 |
22338 | fi | |
16c3e636 PE |
22339 | |
22340 | ||
22341 | ||
4fda9c95 GM |
22342 | |
22343 | ||
22344 | ||
22345 | ||
5476a9a4 GM |
22346 | REPLACE_GETOPT=0 |
22347 | if test -n "$gl_replace_getopt"; then | |
22348 | REPLACE_GETOPT=1 | |
22349 | fi | |
22350 | ||
22351 | if test $REPLACE_GETOPT = 1; then | |
22352 | ||
22353 | GETOPT_H=getopt.h | |
22354 | ||
22355 | $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h | |
22356 | ||
22357 | ||
22358 | ||
22359 | fi | |
22360 | ||
a6342fc8 | 22361 | if test $REPLACE_GETOPT = 1; then |
5476a9a4 GM |
22362 | |
22363 | ||
22364 | ||
22365 | ||
22366 | ||
22367 | ||
22368 | ||
22369 | ||
22370 | gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" | |
22371 | ||
22372 | ||
22373 | ||
22374 | ||
22375 | ||
22376 | ||
22377 | ||
22378 | ||
22379 | ||
22380 | gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" | |
4fda9c95 GM |
22381 | |
22382 | ||
22383 | ||
22384 | ||
a6342fc8 GM |
22385 | GNULIB_GL_UNISTD_H_GETOPT=1 |
22386 | fi | |
4fda9c95 GM |
22387 | |
22388 | ||
22389 | ||
22390 | ||
4fda9c95 | 22391 | |
4fda9c95 | 22392 | |
4fda9c95 | 22393 | |
5476a9a4 GM |
22394 | |
22395 | ||
22396 | ||
22397 | ||
22398 | ||
22399 | gl_gettimeofday_timezone=void | |
22400 | if test $ac_cv_func_gettimeofday != yes; then | |
22401 | HAVE_GETTIMEOFDAY=0 | |
f199cab1 | 22402 | else |
4fda9c95 GM |
22403 | |
22404 | ||
3e0be4ab | 22405 | |
5476a9a4 GM |
22406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 |
22407 | $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } | |
22408 | if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : | |
22409 | $as_echo_n "(cached) " >&6 | |
22410 | else | |
22411 | if test "$cross_compiling" = yes; then : | |
22412 | # When cross-compiling: | |
22413 | case "$host_os" in | |
22414 | # Guess all is fine on glibc systems. | |
22415 | *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; | |
22416 | # If we don't know, assume the worst. | |
22417 | *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; | |
22418 | esac | |
4fda9c95 | 22419 | |
5476a9a4 GM |
22420 | else |
22421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22422 | /* end confdefs.h. */ | |
22423 | #include <string.h> | |
22424 | #include <sys/time.h> | |
22425 | #include <time.h> | |
22426 | #include <stdlib.h> | |
4fda9c95 | 22427 | |
5476a9a4 GM |
22428 | int |
22429 | main () | |
22430 | { | |
4fda9c95 | 22431 | |
5476a9a4 GM |
22432 | time_t t = 0; |
22433 | struct tm *lt; | |
22434 | struct tm saved_lt; | |
22435 | struct timeval tv; | |
22436 | lt = localtime (&t); | |
22437 | saved_lt = *lt; | |
22438 | gettimeofday (&tv, NULL); | |
22439 | return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; | |
cc322c06 | 22440 | |
5476a9a4 GM |
22441 | ; |
22442 | return 0; | |
22443 | } | |
22444 | _ACEOF | |
22445 | if ac_fn_c_try_run "$LINENO"; then : | |
22446 | gl_cv_func_gettimeofday_clobber=no | |
22447 | else | |
22448 | gl_cv_func_gettimeofday_clobber=yes | |
22449 | fi | |
22450 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
22451 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
22452 | fi | |
cc322c06 | 22453 | |
5476a9a4 GM |
22454 | fi |
22455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 | |
22456 | $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } | |
cc322c06 | 22457 | |
5476a9a4 GM |
22458 | case "$gl_cv_func_gettimeofday_clobber" in |
22459 | *yes) | |
22460 | REPLACE_GETTIMEOFDAY=1 | |
cc322c06 | 22461 | |
4fda9c95 | 22462 | |
5476a9a4 | 22463 | $as_echo "#define gmtime rpl_gmtime" >>confdefs.h |
4fda9c95 | 22464 | |
ae0d7250 | 22465 | |
5476a9a4 | 22466 | $as_echo "#define localtime rpl_localtime" >>confdefs.h |
ae0d7250 PE |
22467 | |
22468 | ||
ae0d7250 | 22469 | |
5476a9a4 GM |
22470 | $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h |
22471 | ||
22472 | ;; | |
22473 | esac | |
22474 | ||
22475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 | |
22476 | $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } | |
22477 | if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : | |
f199cab1 GM |
22478 | $as_echo_n "(cached) " >&6 |
22479 | else | |
5476a9a4 GM |
22480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
22481 | /* end confdefs.h. */ | |
22482 | #include <sys/time.h> | |
22483 | struct timeval c; | |
22484 | int gettimeofday (struct timeval *restrict, void *restrict); | |
22485 | ||
22486 | int | |
22487 | main () | |
22488 | { | |
22489 | /* glibc uses struct timezone * rather than the POSIX void * | |
22490 | if _GNU_SOURCE is defined. However, since the only portable | |
22491 | use of gettimeofday uses NULL as the second parameter, and | |
22492 | since the glibc definition is actually more typesafe, it is | |
22493 | not worth wrapping this to get a compliant signature. */ | |
22494 | int (*f) (struct timeval *restrict, void *restrict) | |
22495 | = gettimeofday; | |
22496 | int x = f (&c, 0); | |
22497 | return !(x | c.tv_sec | c.tv_usec); | |
22498 | ||
22499 | ; | |
22500 | return 0; | |
22501 | } | |
22502 | _ACEOF | |
22503 | if ac_fn_c_try_compile "$LINENO"; then : | |
22504 | gl_cv_func_gettimeofday_posix_signature=yes | |
22505 | else | |
22506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 22507 | /* end confdefs.h. */ |
5476a9a4 GM |
22508 | #include <sys/time.h> |
22509 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | |
ae0d7250 | 22510 | |
f199cab1 GM |
22511 | int |
22512 | main () | |
22513 | { | |
5476a9a4 | 22514 | |
f199cab1 GM |
22515 | ; |
22516 | return 0; | |
ae0d7250 PE |
22517 | } |
22518 | _ACEOF | |
5476a9a4 GM |
22519 | if ac_fn_c_try_compile "$LINENO"; then : |
22520 | gl_cv_func_gettimeofday_posix_signature=almost | |
ae0d7250 | 22521 | else |
5476a9a4 | 22522 | gl_cv_func_gettimeofday_posix_signature=no |
ae0d7250 | 22523 | fi |
5476a9a4 | 22524 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ae0d7250 | 22525 | fi |
5476a9a4 | 22526 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
52724a05 | 22527 | fi |
5476a9a4 GM |
22528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 |
22529 | $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } | |
22530 | if test $gl_cv_func_gettimeofday_posix_signature = almost; then | |
22531 | gl_gettimeofday_timezone='struct timezone' | |
22532 | elif test $gl_cv_func_gettimeofday_posix_signature != yes; then | |
22533 | REPLACE_GETTIMEOFDAY=1 | |
22534 | fi | |
22535 | if test $REPLACE_STRUCT_TIMEVAL = 1; then | |
22536 | REPLACE_GETTIMEOFDAY=1 | |
22537 | fi | |
3e0be4ab | 22538 | |
5476a9a4 | 22539 | fi |
ae0d7250 | 22540 | |
5476a9a4 GM |
22541 | cat >>confdefs.h <<_ACEOF |
22542 | #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone | |
22543 | _ACEOF | |
f199cab1 | 22544 | |
ae0d7250 | 22545 | |
a6342fc8 | 22546 | if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then |
ae0d7250 | 22547 | |
cc322c06 GM |
22548 | |
22549 | ||
cc322c06 GM |
22550 | |
22551 | ||
ae0d7250 PE |
22552 | |
22553 | ||
22554 | ||
5476a9a4 | 22555 | gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" |
5fa4ac76 PE |
22556 | |
22557 | ||
5476a9a4 GM |
22558 | for ac_header in sys/timeb.h |
22559 | do : | |
22560 | ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" | |
22561 | if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : | |
22562 | cat >>confdefs.h <<_ACEOF | |
22563 | #define HAVE_SYS_TIMEB_H 1 | |
22564 | _ACEOF | |
5fa4ac76 | 22565 | |
3e0be4ab | 22566 | fi |
5fa4ac76 | 22567 | |
5476a9a4 | 22568 | done |
f199cab1 | 22569 | |
5476a9a4 GM |
22570 | for ac_func in _ftime |
22571 | do : | |
22572 | ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" | |
22573 | if test "x$ac_cv_func__ftime" = x""yes; then : | |
22574 | cat >>confdefs.h <<_ACEOF | |
22575 | #define HAVE__FTIME 1 | |
22576 | _ACEOF | |
5fa4ac76 | 22577 | |
5476a9a4 GM |
22578 | fi |
22579 | done | |
5fa4ac76 PE |
22580 | |
22581 | ||
a6342fc8 | 22582 | fi |
5fa4ac76 PE |
22583 | |
22584 | ||
22585 | ||
22586 | ||
22587 | ||
5476a9a4 | 22588 | GNULIB_GETTIMEOFDAY=1 |
5fa4ac76 PE |
22589 | |
22590 | ||
22591 | ||
22592 | ||
0eb775a3 GM |
22593 | |
22594 | ||
369e19fc PE |
22595 | |
22596 | ||
369e19fc PE |
22597 | |
22598 | ||
5476a9a4 GM |
22599 | if test $ac_cv_func_lstat = yes; then |
22600 | ||
22601 | case "$gl_cv_func_lstat_dereferences_slashed_symlink" in | |
22602 | *no) | |
22603 | REPLACE_LSTAT=1 | |
22604 | ;; | |
22605 | esac | |
22606 | else | |
22607 | HAVE_LSTAT=0 | |
f199cab1 | 22608 | fi |
369e19fc | 22609 | |
a6342fc8 | 22610 | if test $REPLACE_LSTAT = 1; then |
369e19fc | 22611 | |
5fa4ac76 | 22612 | |
369e19fc | 22613 | |
369e19fc | 22614 | |
369e19fc | 22615 | |
369e19fc | 22616 | |
369e19fc | 22617 | |
369e19fc | 22618 | |
5476a9a4 | 22619 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" |
f199cab1 | 22620 | |
45d4966b | 22621 | : |
a6342fc8 | 22622 | fi |
369e19fc | 22623 | |
369e19fc | 22624 | |
369e19fc | 22625 | |
5fa4ac76 PE |
22626 | |
22627 | ||
5476a9a4 | 22628 | GNULIB_LSTAT=1 |
5fa4ac76 | 22629 | |
5fa4ac76 | 22630 | |
27505cf5 | 22631 | |
27505cf5 | 22632 | |
27505cf5 | 22633 | |
27505cf5 | 22634 | |
27505cf5 | 22635 | |
27505cf5 | 22636 | |
5fa4ac76 PE |
22637 | |
22638 | ||
283c7aed GM |
22639 | if test $ac_cv_have_decl_memrchr = no; then |
22640 | HAVE_DECL_MEMRCHR=0 | |
22641 | fi | |
22642 | ||
22643 | for ac_func in memrchr | |
22644 | do : | |
22645 | ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" | |
22646 | if test "x$ac_cv_func_memrchr" = x""yes; then : | |
22647 | cat >>confdefs.h <<_ACEOF | |
22648 | #define HAVE_MEMRCHR 1 | |
22649 | _ACEOF | |
22650 | ||
22651 | fi | |
22652 | done | |
22653 | ||
22654 | ||
22655 | if test $ac_cv_func_memrchr = no; then | |
22656 | ||
22657 | ||
22658 | ||
22659 | ||
22660 | ||
22661 | ||
22662 | ||
22663 | ||
22664 | gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" | |
22665 | ||
22666 | : | |
22667 | fi | |
22668 | ||
22669 | ||
22670 | ||
22671 | ||
22672 | ||
22673 | GNULIB_MEMRCHR=1 | |
22674 | ||
22675 | ||
22676 | ||
22677 | ||
22678 | ||
22679 | ||
22680 | ||
22681 | ||
22682 | ||
22683 | ||
5476a9a4 GM |
22684 | |
22685 | if test $APPLE_UNIVERSAL_BUILD = 1; then | |
22686 | # A universal build on Apple Mac OS X platforms. | |
22687 | # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. | |
22688 | # But we need a configuration result that is valid in both modes. | |
22689 | gl_cv_func_working_mktime=no | |
22690 | fi | |
22691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
22692 | $as_echo_n "checking for working mktime... " >&6; } | |
22693 | if test "${gl_cv_func_working_mktime+set}" = set; then : | |
f199cab1 GM |
22694 | $as_echo_n "(cached) " >&6 |
22695 | else | |
5476a9a4 GM |
22696 | if test "$cross_compiling" = yes; then : |
22697 | gl_cv_func_working_mktime=no | |
22698 | else | |
22699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 22700 | /* end confdefs.h. */ |
5476a9a4 GM |
22701 | /* Test program from Paul Eggert and Tony Leneis. */ |
22702 | #include <limits.h> | |
22703 | #include <stdlib.h> | |
22704 | #include <time.h> | |
5fa4ac76 | 22705 | |
5476a9a4 GM |
22706 | #ifdef HAVE_UNISTD_H |
22707 | # include <unistd.h> | |
f199cab1 | 22708 | #endif |
5476a9a4 | 22709 | |
2393bc74 GM |
22710 | #if HAVE_DECL_ALARM |
22711 | # include <signal.h> | |
5476a9a4 GM |
22712 | #endif |
22713 | ||
22714 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
22715 | #undef putenv | |
22716 | ||
22717 | static time_t time_t_max; | |
22718 | static time_t time_t_min; | |
22719 | ||
22720 | /* Values we'll use to set the TZ environment variable. */ | |
22721 | static char *tz_strings[] = { | |
22722 | (char *) 0, "TZ=GMT0", "TZ=JST-9", | |
22723 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
22724 | }; | |
22725 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
22726 | ||
22727 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
22728 | Based on a problem report from Andreas Jaeger. */ | |
22729 | static int | |
22730 | spring_forward_gap () | |
f199cab1 | 22731 | { |
5476a9a4 GM |
22732 | /* glibc (up to about 1998-10-07) failed this test. */ |
22733 | struct tm tm; | |
22734 | ||
22735 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
22736 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
22737 | on systems that don't support the Olson extension, or don't have the | |
22738 | full zoneinfo tables installed. */ | |
22739 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
22740 | ||
22741 | tm.tm_year = 98; | |
22742 | tm.tm_mon = 3; | |
22743 | tm.tm_mday = 5; | |
22744 | tm.tm_hour = 2; | |
22745 | tm.tm_min = 0; | |
22746 | tm.tm_sec = 0; | |
22747 | tm.tm_isdst = -1; | |
22748 | return mktime (&tm) != (time_t) -1; | |
f199cab1 | 22749 | } |
5fa4ac76 | 22750 | |
5476a9a4 GM |
22751 | static int |
22752 | mktime_test1 (time_t now) | |
22753 | { | |
22754 | struct tm *lt; | |
22755 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
22756 | } | |
5fa4ac76 | 22757 | |
5476a9a4 GM |
22758 | static int |
22759 | mktime_test (time_t now) | |
22760 | { | |
22761 | return (mktime_test1 (now) | |
22762 | && mktime_test1 ((time_t) (time_t_max - now)) | |
22763 | && mktime_test1 ((time_t) (time_t_min + now))); | |
22764 | } | |
067d23c9 | 22765 | |
5476a9a4 GM |
22766 | static int |
22767 | irix_6_4_bug () | |
22768 | { | |
22769 | /* Based on code from Ariel Faigon. */ | |
22770 | struct tm tm; | |
22771 | tm.tm_year = 96; | |
22772 | tm.tm_mon = 3; | |
22773 | tm.tm_mday = 0; | |
22774 | tm.tm_hour = 0; | |
22775 | tm.tm_min = 0; | |
22776 | tm.tm_sec = 0; | |
22777 | tm.tm_isdst = -1; | |
22778 | mktime (&tm); | |
22779 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
22780 | } | |
22781 | ||
22782 | static int | |
22783 | bigtime_test (int j) | |
22784 | { | |
22785 | struct tm tm; | |
22786 | time_t now; | |
22787 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
22788 | now = mktime (&tm); | |
22789 | if (now != (time_t) -1) | |
22790 | { | |
22791 | struct tm *lt = localtime (&now); | |
22792 | if (! (lt | |
22793 | && lt->tm_year == tm.tm_year | |
22794 | && lt->tm_mon == tm.tm_mon | |
22795 | && lt->tm_mday == tm.tm_mday | |
22796 | && lt->tm_hour == tm.tm_hour | |
22797 | && lt->tm_min == tm.tm_min | |
22798 | && lt->tm_sec == tm.tm_sec | |
22799 | && lt->tm_yday == tm.tm_yday | |
22800 | && lt->tm_wday == tm.tm_wday | |
22801 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
22802 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
22803 | return 0; | |
22804 | } | |
22805 | return 1; | |
22806 | } | |
369e19fc | 22807 | |
5476a9a4 GM |
22808 | static int |
22809 | year_2050_test () | |
22810 | { | |
22811 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
22812 | ignoring leap seconds. */ | |
22813 | unsigned long int answer = 2527315200UL; | |
369e19fc | 22814 | |
5476a9a4 GM |
22815 | struct tm tm; |
22816 | time_t t; | |
22817 | tm.tm_year = 2050 - 1900; | |
22818 | tm.tm_mon = 2 - 1; | |
22819 | tm.tm_mday = 1; | |
22820 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
22821 | tm.tm_isdst = -1; | |
369e19fc | 22822 | |
5476a9a4 GM |
22823 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" |
22824 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
22825 | on systems that don't support the Olson extension, or don't have the | |
22826 | full zoneinfo tables installed. */ | |
22827 | putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); | |
067d23c9 | 22828 | |
5476a9a4 | 22829 | t = mktime (&tm); |
067d23c9 | 22830 | |
5476a9a4 GM |
22831 | /* Check that the result is either a failure, or close enough |
22832 | to the correct answer that we can assume the discrepancy is | |
22833 | due to leap seconds. */ | |
22834 | return (t == (time_t) -1 | |
22835 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
22836 | } | |
067d23c9 | 22837 | |
f199cab1 GM |
22838 | int |
22839 | main () | |
22840 | { | |
5476a9a4 GM |
22841 | int result = 0; |
22842 | time_t t, delta; | |
22843 | int i, j; | |
22844 | int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; | |
22845 | int time_t_signed = ! ((time_t) 0 < (time_t) -1); | |
067d23c9 | 22846 | |
2393bc74 | 22847 | #if HAVE_DECL_ALARM |
5476a9a4 GM |
22848 | /* This test makes some buggy mktime implementations loop. |
22849 | Give up after 60 seconds; a mktime slower than that | |
22850 | isn't worth using anyway. */ | |
2393bc74 | 22851 | signal (SIGALRM, SIG_DFL); |
5476a9a4 | 22852 | alarm (60); |
2393bc74 | 22853 | #endif |
067d23c9 | 22854 | |
5476a9a4 GM |
22855 | time_t_max = (! time_t_signed |
22856 | ? (time_t) -1 | |
22857 | : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) | |
22858 | * 2 + 1)); | |
22859 | time_t_min = (! time_t_signed | |
22860 | ? (time_t) 0 | |
22861 | : time_t_signed_magnitude | |
22862 | ? ~ (time_t) 0 | |
22863 | : ~ time_t_max); | |
3e0be4ab | 22864 | |
5476a9a4 GM |
22865 | delta = time_t_max / 997; /* a suitable prime number */ |
22866 | for (i = 0; i < N_STRINGS; i++) | |
22867 | { | |
22868 | if (tz_strings[i]) | |
22869 | putenv (tz_strings[i]); | |
3e0be4ab | 22870 | |
5476a9a4 GM |
22871 | for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) |
22872 | if (! mktime_test (t)) | |
22873 | result |= 1; | |
22874 | if ((result & 2) == 0 | |
22875 | && ! (mktime_test ((time_t) 1) | |
22876 | && mktime_test ((time_t) (60 * 60)) | |
22877 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
22878 | result |= 2; | |
f199cab1 | 22879 | |
5476a9a4 GM |
22880 | for (j = 1; (result & 4) == 0; j <<= 1) |
22881 | { | |
22882 | if (! bigtime_test (j)) | |
22883 | result |= 4; | |
22884 | if (INT_MAX / 2 < j) | |
22885 | break; | |
22886 | } | |
22887 | if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) | |
22888 | result |= 8; | |
22889 | } | |
22890 | if (! irix_6_4_bug ()) | |
22891 | result |= 16; | |
22892 | if (! spring_forward_gap ()) | |
22893 | result |= 32; | |
22894 | if (! year_2050_test ()) | |
22895 | result |= 64; | |
22896 | return result; | |
067d23c9 KY |
22897 | } |
22898 | _ACEOF | |
5476a9a4 GM |
22899 | if ac_fn_c_try_run "$LINENO"; then : |
22900 | gl_cv_func_working_mktime=yes | |
067d23c9 | 22901 | else |
5476a9a4 | 22902 | gl_cv_func_working_mktime=no |
3e0be4ab | 22903 | fi |
5476a9a4 GM |
22904 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
22905 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 GM |
22906 | fi |
22907 | ||
f199cab1 | 22908 | |
5476a9a4 GM |
22909 | fi |
22910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 | |
22911 | $as_echo "$gl_cv_func_working_mktime" >&6; } | |
f199cab1 | 22912 | |
5476a9a4 GM |
22913 | if test $gl_cv_func_working_mktime = no; then |
22914 | REPLACE_MKTIME=1 | |
22915 | else | |
22916 | REPLACE_MKTIME=0 | |
f199cab1 | 22917 | fi |
f199cab1 | 22918 | |
a6342fc8 | 22919 | if test $REPLACE_MKTIME = 1; then |
f199cab1 | 22920 | |
f199cab1 | 22921 | |
0eb775a3 | 22922 | |
067d23c9 | 22923 | |
a451f14b | 22924 | |
a451f14b | 22925 | |
743c80a7 PE |
22926 | |
22927 | ||
5476a9a4 GM |
22928 | gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" |
22929 | ||
a6342fc8 GM |
22930 | : |
22931 | fi | |
a451f14b PE |
22932 | |
22933 | ||
22934 | ||
e275c824 PE |
22935 | |
22936 | ||
5476a9a4 | 22937 | GNULIB_MKTIME=1 |
e275c824 PE |
22938 | |
22939 | ||
22940 | ||
22941 | ||
22942 | ||
22943 | ||
22944 | ||
22945 | ||
d87ffdb7 | 22946 | |
5476a9a4 GM |
22947 | |
22948 | ||
22949 | if test $ac_cv_func_pselect = yes; then | |
22950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5 | |
22951 | $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; } | |
22952 | if test "${gl_cv_sig_pselect+set}" = set; then : | |
e275c824 PE |
22953 | $as_echo_n "(cached) " >&6 |
22954 | else | |
5476a9a4 | 22955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e275c824 | 22956 | /* end confdefs.h. */ |
5476a9a4 | 22957 | #include <sys/select.h> |
e275c824 | 22958 | |
f199cab1 GM |
22959 | int |
22960 | main () | |
22961 | { | |
5476a9a4 GM |
22962 | int (*p) (int, fd_set *, fd_set *, fd_set *restrict, |
22963 | struct timespec const *restrict, | |
22964 | sigset_t const *restrict) = pselect; | |
22965 | return !p; | |
f199cab1 GM |
22966 | ; |
22967 | return 0; | |
22968 | } | |
e275c824 | 22969 | _ACEOF |
f199cab1 | 22970 | if ac_fn_c_try_link "$LINENO"; then : |
5476a9a4 | 22971 | gl_cv_sig_pselect=yes |
3e0be4ab | 22972 | else |
5476a9a4 | 22973 | gl_cv_sig_pselect=no |
f199cab1 GM |
22974 | fi |
22975 | rm -f core conftest.err conftest.$ac_objext \ | |
22976 | conftest$ac_exeext conftest.$ac_ext | |
3e0be4ab | 22977 | fi |
5476a9a4 GM |
22978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5 |
22979 | $as_echo "$gl_cv_sig_pselect" >&6; } | |
b6c9d18d GM |
22980 | |
22981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5 | |
22982 | $as_echo_n "checking whether pselect detects invalid fds... " >&6; } | |
22983 | if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then : | |
22984 | $as_echo_n "(cached) " >&6 | |
22985 | else | |
22986 | ||
22987 | if test "$cross_compiling" = yes; then : | |
22988 | ||
22989 | case "$host_os" in | |
22990 | # Guess yes on glibc systems. | |
22991 | *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; | |
22992 | # If we don't know, assume the worst. | |
22993 | *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; | |
22994 | esac | |
22995 | ||
22996 | else | |
22997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
22998 | /* end confdefs.h. */ | |
22999 | ||
23000 | #include <sys/types.h> | |
23001 | #include <sys/time.h> | |
23002 | #if HAVE_SYS_SELECT_H | |
23003 | # include <sys/select.h> | |
23004 | #endif | |
23005 | #include <unistd.h> | |
23006 | #include <errno.h> | |
23007 | ||
23008 | int | |
23009 | main () | |
23010 | { | |
23011 | ||
23012 | fd_set set; | |
23013 | dup2(0, 16); | |
23014 | FD_ZERO(&set); | |
23015 | FD_SET(16, &set); | |
23016 | close(16); | |
23017 | struct timespec timeout; | |
23018 | timeout.tv_sec = 0; | |
23019 | timeout.tv_nsec = 5000; | |
23020 | return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF; | |
23021 | ||
23022 | ; | |
23023 | return 0; | |
23024 | } | |
23025 | _ACEOF | |
23026 | if ac_fn_c_try_run "$LINENO"; then : | |
23027 | gl_cv_func_pselect_detects_ebadf=yes | |
23028 | else | |
23029 | gl_cv_func_pselect_detects_ebadf=no | |
23030 | fi | |
23031 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23032 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23033 | fi | |
23034 | ||
23035 | ||
23036 | fi | |
23037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5 | |
23038 | $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; } | |
23039 | case $gl_cv_func_pselect_detects_ebadf in | |
23040 | *yes) ;; | |
23041 | *) REPLACE_PSELECT=1 ;; | |
23042 | esac | |
5476a9a4 | 23043 | fi |
3e0be4ab | 23044 | |
5476a9a4 GM |
23045 | if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then |
23046 | REPLACE_PSELECT=1 | |
23047 | fi | |
3e0be4ab | 23048 | |
a6342fc8 | 23049 | if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then |
3e0be4ab GM |
23050 | |
23051 | ||
3e0be4ab | 23052 | |
3e0be4ab | 23053 | |
3e0be4ab | 23054 | |
3e0be4ab | 23055 | |
3e0be4ab | 23056 | |
3e0be4ab | 23057 | |
5476a9a4 | 23058 | gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext" |
3e0be4ab | 23059 | |
a6342fc8 | 23060 | fi |
3e0be4ab GM |
23061 | |
23062 | ||
f199cab1 | 23063 | |
f199cab1 | 23064 | |
f199cab1 | 23065 | |
5476a9a4 | 23066 | GNULIB_PSELECT=1 |
f199cab1 | 23067 | |
6d153f56 | 23068 | |
f199cab1 | 23069 | |
3e0be4ab | 23070 | |
3e0be4ab GM |
23071 | |
23072 | ||
f199cab1 | 23073 | |
0eb775a3 GM |
23074 | |
23075 | ||
5476a9a4 | 23076 | LIB_PTHREAD_SIGMASK= |
0eb775a3 | 23077 | |
f199cab1 | 23078 | |
f077f61d GM |
23079 | |
23080 | ||
23081 | if test "$gl_threads_api" = posix; then | |
23082 | if test $ac_cv_func_pthread_sigmask = yes; then | |
23083 | : | |
23084 | else | |
23085 | if test -n "$LIBMULTITHREAD"; then | |
23086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5 | |
23087 | $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; } | |
23088 | if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then : | |
23089 | $as_echo_n "(cached) " >&6 | |
23090 | else | |
23091 | gl_save_LIBS="$LIBS" | |
23092 | LIBS="$LIBS $LIBMULTITHREAD" | |
23093 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23094 | /* end confdefs.h. */ | |
23095 | #include <pthread.h> | |
23096 | #include <signal.h> | |
23097 | ||
23098 | int | |
23099 | main () | |
23100 | { | |
23101 | return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0); | |
23102 | ; | |
23103 | return 0; | |
23104 | } | |
23105 | ||
23106 | _ACEOF | |
23107 | if ac_fn_c_try_link "$LINENO"; then : | |
23108 | gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes | |
23109 | else | |
23110 | gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no | |
23111 | fi | |
23112 | rm -f core conftest.err conftest.$ac_objext \ | |
23113 | conftest$ac_exeext conftest.$ac_ext | |
23114 | LIBS="$gl_save_LIBS" | |
23115 | ||
23116 | fi | |
23117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5 | |
23118 | $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; } | |
23119 | if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then | |
23120 | LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" | |
23121 | else | |
23122 | HAVE_PTHREAD_SIGMASK=0 | |
23123 | fi | |
23124 | else | |
23125 | HAVE_PTHREAD_SIGMASK=0 | |
23126 | fi | |
23127 | fi | |
5476a9a4 | 23128 | else |
f077f61d GM |
23129 | if test $ac_cv_func_pthread_sigmask = yes; then |
23130 | REPLACE_PTHREAD_SIGMASK=1 | |
23131 | else | |
23132 | HAVE_PTHREAD_SIGMASK=0 | |
23133 | fi | |
5476a9a4 | 23134 | fi |
6d153f56 | 23135 | |
52724a05 | 23136 | |
6d153f56 GM |
23137 | |
23138 | ||
5476a9a4 GM |
23139 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
23140 | ||
23141 | ||
23142 | if test -z "$LIB_PTHREAD_SIGMASK"; then | |
23143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5 | |
23144 | $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; } | |
23145 | if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then : | |
f199cab1 GM |
23146 | $as_echo_n "(cached) " >&6 |
23147 | else | |
5476a9a4 GM |
23148 | |
23149 | if test "$cross_compiling" = yes; then : | |
23150 | ||
23151 | case "$host_os" in | |
23152 | freebsd* | hpux* | solaris | solaris2.[2-9]*) | |
23153 | gl_cv_func_pthread_sigmask_in_libc_works="guessing no";; | |
23154 | *) | |
23155 | gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";; | |
23156 | esac | |
23157 | ||
23158 | else | |
23159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 23160 | /* end confdefs.h. */ |
6d153f56 | 23161 | |
5476a9a4 GM |
23162 | #include <pthread.h> |
23163 | #include <signal.h> | |
23164 | #include <stddef.h> | |
23165 | int main () | |
f199cab1 | 23166 | { |
5476a9a4 GM |
23167 | sigset_t set; |
23168 | sigemptyset (&set); | |
23169 | return pthread_sigmask (1729, &set, NULL) != 0; | |
f199cab1 GM |
23170 | } |
23171 | _ACEOF | |
5476a9a4 GM |
23172 | if ac_fn_c_try_run "$LINENO"; then : |
23173 | gl_cv_func_pthread_sigmask_in_libc_works=no | |
f199cab1 | 23174 | else |
5476a9a4 | 23175 | gl_cv_func_pthread_sigmask_in_libc_works=yes |
f199cab1 | 23176 | fi |
5476a9a4 GM |
23177 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23178 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 23179 | fi |
5476a9a4 GM |
23180 | |
23181 | ||
f199cab1 | 23182 | fi |
5476a9a4 GM |
23183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5 |
23184 | $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; } | |
23185 | case "$gl_cv_func_pthread_sigmask_in_libc_works" in | |
23186 | *no) | |
23187 | REPLACE_PTHREAD_SIGMASK=1 | |
cc322c06 | 23188 | |
5476a9a4 | 23189 | $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h |
cc322c06 | 23190 | |
5476a9a4 GM |
23191 | ;; |
23192 | esac | |
23193 | fi | |
3e0be4ab | 23194 | |
5476a9a4 GM |
23195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5 |
23196 | $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; } | |
23197 | if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then : | |
3e0be4ab GM |
23198 | $as_echo_n "(cached) " >&6 |
23199 | else | |
5476a9a4 GM |
23200 | |
23201 | gl_save_LIBS="$LIBS" | |
23202 | LIBS="$LIBS $LIB_PTHREAD_SIGMASK" | |
23203 | if test "$cross_compiling" = yes; then : | |
23204 | case "$host_os" in | |
23205 | cygwin*) | |
23206 | gl_cv_func_pthread_sigmask_return_works="guessing no";; | |
23207 | *) | |
23208 | gl_cv_func_pthread_sigmask_return_works="guessing yes";; | |
23209 | esac | |
23210 | ||
23211 | else | |
23212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3e0be4ab | 23213 | /* end confdefs.h. */ |
f199cab1 | 23214 | |
5476a9a4 GM |
23215 | #include <pthread.h> |
23216 | #include <signal.h> | |
23217 | #include <stddef.h> | |
23218 | int main () | |
3e0be4ab | 23219 | { |
5476a9a4 GM |
23220 | sigset_t set; |
23221 | sigemptyset (&set); | |
23222 | if (pthread_sigmask (1729, &set, NULL) == -1) | |
23223 | return 1; | |
3e0be4ab GM |
23224 | return 0; |
23225 | } | |
6d153f56 | 23226 | _ACEOF |
5476a9a4 GM |
23227 | if ac_fn_c_try_run "$LINENO"; then : |
23228 | gl_cv_func_pthread_sigmask_return_works=yes | |
3e0be4ab | 23229 | else |
5476a9a4 | 23230 | gl_cv_func_pthread_sigmask_return_works=no |
6d153f56 | 23231 | fi |
5476a9a4 GM |
23232 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23233 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 23234 | fi |
5476a9a4 GM |
23235 | |
23236 | LIBS="$gl_save_LIBS" | |
23237 | ||
52724a05 | 23238 | fi |
5476a9a4 GM |
23239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5 |
23240 | $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; } | |
23241 | case "$gl_cv_func_pthread_sigmask_return_works" in | |
23242 | *no) | |
23243 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 23244 | |
5476a9a4 | 23245 | $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h |
6d153f56 | 23246 | |
5476a9a4 GM |
23247 | ;; |
23248 | esac | |
cc322c06 | 23249 | |
5476a9a4 GM |
23250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5 |
23251 | $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; } | |
23252 | if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then : | |
f199cab1 GM |
23253 | $as_echo_n "(cached) " >&6 |
23254 | else | |
5476a9a4 GM |
23255 | |
23256 | case "$host_os" in | |
23257 | irix*) | |
23258 | gl_cv_func_pthread_sigmask_unblock_works="guessing no";; | |
23259 | *) | |
23260 | gl_cv_func_pthread_sigmask_unblock_works="guessing yes";; | |
23261 | esac | |
23262 | gl_save_LIBS="$LIBS" | |
23263 | LIBS="$LIBS $LIBMULTITHREAD" | |
23264 | if test "$cross_compiling" = yes; then : | |
23265 | : | |
f199cab1 | 23266 | else |
5476a9a4 GM |
23267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23268 | /* end confdefs.h. */ | |
6d153f56 | 23269 | |
5476a9a4 GM |
23270 | #include <pthread.h> |
23271 | #include <signal.h> | |
23272 | #include <stdio.h> | |
23273 | #include <stdlib.h> | |
23274 | #include <unistd.h> | |
23275 | static volatile int sigint_occurred; | |
23276 | static void | |
23277 | sigint_handler (int sig) | |
23278 | { | |
23279 | sigint_occurred++; | |
23280 | } | |
23281 | int main () | |
23282 | { | |
23283 | sigset_t set; | |
23284 | int pid = getpid (); | |
23285 | char command[80]; | |
23286 | signal (SIGINT, sigint_handler); | |
23287 | sigemptyset (&set); | |
23288 | sigaddset (&set, SIGINT); | |
23289 | if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0)) | |
23290 | return 1; | |
23291 | sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid); | |
23292 | if (!(system (command) == 0)) | |
23293 | return 2; | |
23294 | sleep (2); | |
23295 | if (!(sigint_occurred == 0)) | |
23296 | return 3; | |
23297 | if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0)) | |
23298 | return 4; | |
23299 | if (!(sigint_occurred == 1)) /* This fails on IRIX. */ | |
23300 | return 5; | |
23301 | return 0; | |
23302 | } | |
23303 | _ACEOF | |
23304 | if ac_fn_c_try_run "$LINENO"; then : | |
23305 | : | |
23306 | else | |
23307 | gl_cv_func_pthread_sigmask_unblock_works=no | |
f199cab1 | 23308 | fi |
5476a9a4 GM |
23309 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23310 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 23311 | fi |
5476a9a4 GM |
23312 | |
23313 | LIBS="$gl_save_LIBS" | |
23314 | ||
f199cab1 | 23315 | fi |
5476a9a4 GM |
23316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5 |
23317 | $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; } | |
23318 | case "$gl_cv_func_pthread_sigmask_unblock_works" in | |
23319 | *no) | |
23320 | REPLACE_PTHREAD_SIGMASK=1 | |
6d153f56 | 23321 | |
5476a9a4 | 23322 | $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h |
6d153f56 | 23323 | |
5476a9a4 GM |
23324 | ;; |
23325 | esac | |
6d153f56 | 23326 | fi |
6d153f56 | 23327 | |
a6342fc8 | 23328 | if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then |
a451f14b | 23329 | |
a451f14b | 23330 | |
743c80a7 PE |
23331 | |
23332 | ||
23333 | ||
23334 | ||
23335 | ||
f199cab1 | 23336 | |
5476a9a4 | 23337 | gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" |
743c80a7 PE |
23338 | |
23339 | ||
5476a9a4 | 23340 | if test $HAVE_PTHREAD_SIGMASK = 1; then |
743c80a7 | 23341 | |
5476a9a4 | 23342 | $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h |
743c80a7 | 23343 | |
5476a9a4 | 23344 | fi |
743c80a7 | 23345 | |
a6342fc8 | 23346 | fi |
938a4ef9 | 23347 | |
938a4ef9 | 23348 | |
938a4ef9 | 23349 | |
938a4ef9 | 23350 | |
938a4ef9 | 23351 | |
5476a9a4 | 23352 | GNULIB_PTHREAD_SIGMASK=1 |
a451f14b | 23353 | |
a451f14b | 23354 | |
743c80a7 PE |
23355 | |
23356 | ||
23357 | ||
23358 | ||
23359 | ||
b5591ebb GM |
23360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 |
23361 | $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; } | |
23362 | if test "${gl_cv_func_svid_putenv+set}" = set; then : | |
23363 | $as_echo_n "(cached) " >&6 | |
23364 | else | |
23365 | if test "$cross_compiling" = yes; then : | |
23366 | case "$host_os" in | |
23367 | # Guess yes on glibc systems. | |
23368 | *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; | |
23369 | # If we don't know, assume the worst. | |
23370 | *) gl_cv_func_svid_putenv="guessing no" ;; | |
23371 | esac | |
23372 | ||
23373 | else | |
23374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
23375 | /* end confdefs.h. */ | |
23376 | $ac_includes_default | |
23377 | int | |
23378 | main () | |
23379 | { | |
23380 | ||
23381 | /* Put it in env. */ | |
23382 | if (putenv ("CONFTEST_putenv=val")) | |
23383 | return 1; | |
23384 | ||
23385 | /* Try to remove it. */ | |
23386 | if (putenv ("CONFTEST_putenv")) | |
23387 | return 2; | |
23388 | ||
23389 | /* Make sure it was deleted. */ | |
23390 | if (getenv ("CONFTEST_putenv") != 0) | |
23391 | return 3; | |
23392 | ||
23393 | return 0; | |
23394 | ||
23395 | ; | |
23396 | return 0; | |
23397 | } | |
23398 | _ACEOF | |
23399 | if ac_fn_c_try_run "$LINENO"; then : | |
23400 | gl_cv_func_svid_putenv=yes | |
23401 | else | |
23402 | gl_cv_func_svid_putenv=no | |
23403 | fi | |
23404 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
23405 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
23406 | fi | |
23407 | ||
23408 | ||
23409 | fi | |
23410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 | |
23411 | $as_echo "$gl_cv_func_svid_putenv" >&6; } | |
23412 | case "$gl_cv_func_svid_putenv" in | |
23413 | *yes) ;; | |
23414 | *) | |
23415 | REPLACE_PUTENV=1 | |
23416 | ;; | |
23417 | esac | |
23418 | ||
23419 | if test $REPLACE_PUTENV = 1; then | |
23420 | ||
23421 | ||
23422 | ||
23423 | ||
23424 | ||
23425 | ||
23426 | ||
23427 | ||
23428 | gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext" | |
23429 | ||
c175d440 | 23430 | |
2393bc74 GM |
23431 | ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" |
23432 | if test "x$ac_cv_have_decl__putenv" = x""yes; then : | |
23433 | ac_have_decl=1 | |
23434 | else | |
23435 | ac_have_decl=0 | |
c175d440 | 23436 | fi |
2393bc74 GM |
23437 | |
23438 | cat >>confdefs.h <<_ACEOF | |
23439 | #define HAVE_DECL__PUTENV $ac_have_decl | |
23440 | _ACEOF | |
c175d440 GM |
23441 | |
23442 | ||
b5591ebb GM |
23443 | fi |
23444 | ||
23445 | ||
23446 | ||
23447 | ||
23448 | ||
23449 | GNULIB_PUTENV=1 | |
23450 | ||
23451 | ||
23452 | ||
23453 | ||
23454 | ||
23455 | ||
23456 | ||
743c80a7 | 23457 | |
5476a9a4 GM |
23458 | if test $ac_cv_func_readlink = no; then |
23459 | HAVE_READLINK=0 | |
23460 | else | |
23461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | |
23462 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | |
23463 | if test "${gl_cv_decl_readlink_works+set}" = set; then : | |
3e0be4ab GM |
23464 | $as_echo_n "(cached) " >&6 |
23465 | else | |
f199cab1 | 23466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3e0be4ab | 23467 | /* end confdefs.h. */ |
5476a9a4 GM |
23468 | #include <unistd.h> |
23469 | /* Cause compilation failure if original declaration has wrong type. */ | |
23470 | ssize_t readlink (const char *, char *, size_t); | |
f199cab1 GM |
23471 | int |
23472 | main () | |
23473 | { | |
5476a9a4 | 23474 | |
f199cab1 GM |
23475 | ; |
23476 | return 0; | |
23477 | } | |
3e0be4ab | 23478 | _ACEOF |
5476a9a4 GM |
23479 | if ac_fn_c_try_compile "$LINENO"; then : |
23480 | gl_cv_decl_readlink_works=yes | |
23481 | else | |
23482 | gl_cv_decl_readlink_works=no | |
3e0be4ab | 23483 | fi |
5476a9a4 GM |
23484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
23485 | fi | |
23486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | |
23487 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | |
23488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | |
23489 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | |
23490 | if test "${gl_cv_func_readlink_works+set}" = set; then : | |
23491 | $as_echo_n "(cached) " >&6 | |
23492 | else | |
23493 | # We have readlink, so assume ln -s works. | |
23494 | ln -s conftest.no-such conftest.link | |
23495 | ln -s conftest.link conftest.lnk2 | |
23496 | if test "$cross_compiling" = yes; then : | |
23497 | case "$host_os" in | |
23498 | # Guess yes on glibc systems. | |
23499 | *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; | |
23500 | # If we don't know, assume the worst. | |
23501 | *) gl_cv_func_readlink_works="guessing no" ;; | |
23502 | esac | |
23503 | ||
23504 | else | |
f199cab1 | 23505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
067d23c9 | 23506 | /* end confdefs.h. */ |
5476a9a4 GM |
23507 | #include <unistd.h> |
23508 | ||
f199cab1 GM |
23509 | int |
23510 | main () | |
23511 | { | |
5476a9a4 GM |
23512 | char buf[20]; |
23513 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | |
f199cab1 GM |
23514 | ; |
23515 | return 0; | |
23516 | } | |
067d23c9 | 23517 | _ACEOF |
5476a9a4 GM |
23518 | if ac_fn_c_try_run "$LINENO"; then : |
23519 | gl_cv_func_readlink_works=yes | |
23520 | else | |
23521 | gl_cv_func_readlink_works=no | |
067d23c9 | 23522 | fi |
5476a9a4 GM |
23523 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
23524 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 23525 | fi |
067d23c9 | 23526 | |
5476a9a4 | 23527 | rm -f conftest.link conftest.lnk2 |
f199cab1 | 23528 | fi |
5476a9a4 GM |
23529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 |
23530 | $as_echo "$gl_cv_func_readlink_works" >&6; } | |
23531 | case "$gl_cv_func_readlink_works" in | |
23532 | *yes) | |
23533 | if test "$gl_cv_decl_readlink_works" != yes; then | |
23534 | REPLACE_READLINK=1 | |
23535 | fi | |
23536 | ;; | |
23537 | *) | |
067d23c9 | 23538 | |
5476a9a4 | 23539 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h |
067d23c9 | 23540 | |
5476a9a4 GM |
23541 | REPLACE_READLINK=1 |
23542 | ;; | |
23543 | esac | |
23544 | fi | |
3e0be4ab | 23545 | |
a6342fc8 | 23546 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
3e0be4ab GM |
23547 | |
23548 | ||
23549 | ||
23550 | ||
3e0be4ab GM |
23551 | |
23552 | ||
5476a9a4 GM |
23553 | |
23554 | ||
23555 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | |
23556 | ||
23557 | ||
23558 | : | |
3e0be4ab | 23559 | |
a6342fc8 | 23560 | fi |
3e0be4ab | 23561 | |
067d23c9 | 23562 | |
067d23c9 | 23563 | |
067d23c9 | 23564 | |
067d23c9 | 23565 | |
5476a9a4 | 23566 | GNULIB_READLINK=1 |
067d23c9 | 23567 | |
067d23c9 | 23568 | |
067d23c9 | 23569 | |
067d23c9 KY |
23570 | |
23571 | ||
067d23c9 | 23572 | |
d7ad186c GM |
23573 | |
23574 | ||
23575 | ||
23576 | if test $ac_cv_func_readlinkat = no; then | |
23577 | HAVE_READLINKAT=0 | |
23578 | fi | |
23579 | ||
23580 | if test $HAVE_READLINKAT = 0; then | |
23581 | ||
23582 | ||
23583 | ||
23584 | ||
23585 | ||
23586 | ||
23587 | ||
23588 | ||
23589 | gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" | |
23590 | ||
23591 | fi | |
23592 | ||
23593 | ||
23594 | ||
23595 | ||
23596 | ||
23597 | GNULIB_READLINKAT=1 | |
23598 | ||
23599 | ||
23600 | ||
23601 | ||
23602 | ||
23603 | ||
e4184a20 GM |
23604 | for ac_func in sig2str |
23605 | do : | |
23606 | ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str" | |
23607 | if test "x$ac_cv_func_sig2str" = x""yes; then : | |
23608 | cat >>confdefs.h <<_ACEOF | |
23609 | #define HAVE_SIG2STR 1 | |
23610 | _ACEOF | |
23611 | ||
23612 | fi | |
23613 | done | |
23614 | ||
23615 | ||
23616 | if test $ac_cv_func_sig2str = no; then | |
23617 | ||
23618 | ||
23619 | ||
23620 | ||
23621 | ||
23622 | ||
23623 | ||
23624 | ||
23625 | gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext" | |
23626 | ||
23627 | ||
23628 | : | |
23629 | ||
23630 | fi | |
23631 | ||
369e19fc | 23632 | |
067d23c9 | 23633 | |
5476a9a4 GM |
23634 | |
23635 | ||
23636 | ||
23637 | ||
23638 | ||
23639 | ||
23640 | ||
23641 | ||
23642 | if test $gl_cv_have_include_next = yes; then | |
23643 | gl_cv_next_signal_h='<'signal.h'>' | |
23644 | else | |
23645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 | |
23646 | $as_echo_n "checking absolute name of <signal.h>... " >&6; } | |
23647 | if test "${gl_cv_next_signal_h+set}" = set; then : | |
0eb775a3 | 23648 | $as_echo_n "(cached) " >&6 |
0eb775a3 | 23649 | else |
5476a9a4 GM |
23650 | |
23651 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0eb775a3 | 23652 | /* end confdefs.h. */ |
5476a9a4 | 23653 | #include <signal.h> |
f199cab1 | 23654 | |
0eb775a3 | 23655 | _ACEOF |
5476a9a4 GM |
23656 | case "$host_os" in |
23657 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
23658 | *) gl_absname_cpp="$ac_cpp" ;; | |
23659 | esac | |
0eb775a3 | 23660 | |
5476a9a4 GM |
23661 | case "$host_os" in |
23662 | mingw*) | |
23663 | gl_dirsep_regex='[/\\]' | |
23664 | ;; | |
23665 | *) | |
23666 | gl_dirsep_regex='\/' | |
23667 | ;; | |
23668 | esac | |
23669 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
0eb775a3 | 23670 | |
5476a9a4 GM |
23671 | gl_header_literal_regex=`echo 'signal.h' \ |
23672 | | sed -e "$gl_make_literal_regex_sed"` | |
23673 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
23674 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
23675 | s|^/[^/]|//&| | |
23676 | p | |
23677 | q | |
23678 | }' | |
23679 | gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
23680 | sed -n "$gl_absolute_header_sed"`'"' | |
0eb775a3 | 23681 | |
f199cab1 | 23682 | |
5476a9a4 GM |
23683 | fi |
23684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 | |
23685 | $as_echo "$gl_cv_next_signal_h" >&6; } | |
23686 | fi | |
23687 | NEXT_SIGNAL_H=$gl_cv_next_signal_h | |
067d23c9 | 23688 | |
5476a9a4 GM |
23689 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
23690 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
23691 | gl_next_as_first_directive='<'signal.h'>' | |
23692 | else | |
23693 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
23694 | gl_next_as_first_directive=$gl_cv_next_signal_h | |
23695 | fi | |
23696 | NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive | |
067d23c9 | 23697 | |
067d23c9 KY |
23698 | |
23699 | ||
067d23c9 | 23700 | |
067d23c9 | 23701 | |
5476a9a4 GM |
23702 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
23703 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. | |
23704 | ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " | |
23705 | #include <signal.h> | |
23706 | ||
23707 | " | |
23708 | if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : | |
23709 | ||
23710 | else | |
23711 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 | |
f199cab1 | 23712 | fi |
067d23c9 | 23713 | |
067d23c9 | 23714 | |
067d23c9 | 23715 | |
067d23c9 | 23716 | |
938a4ef9 | 23717 | |
938a4ef9 | 23718 | |
5476a9a4 GM |
23719 | |
23720 | ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " | |
23721 | #include <signal.h> | |
23722 | ||
23723 | " | |
23724 | if test "x$ac_cv_type_sighandler_t" = x""yes; then : | |
23725 | ||
23726 | else | |
23727 | HAVE_SIGHANDLER_T=0 | |
23728 | fi | |
23729 | ||
23730 | ||
23731 | ||
23732 | ||
a6342fc8 | 23733 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
5476a9a4 GM |
23734 | /* <sys/types.h> is not needed according to POSIX, but the |
23735 | <sys/socket.h> in i386-unknown-freebsd4.10 and | |
23736 | powerpc-apple-darwin5.5 required it. */ | |
23737 | #include <sys/types.h> | |
23738 | #if HAVE_SYS_SOCKET_H | |
23739 | # include <sys/socket.h> | |
23740 | #elif HAVE_WS2TCPIP_H | |
23741 | # include <ws2tcpip.h> | |
23742 | #endif | |
23743 | ||
23744 | " | |
23745 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
23746 | ||
067d23c9 | 23747 | else |
5476a9a4 GM |
23748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 |
23749 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | |
23750 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | |
23751 | $as_echo_n "(cached) " >&6 | |
23752 | else | |
23753 | # Systems have either "struct sockaddr *" or | |
23754 | # "void *" as the second argument to getpeername | |
23755 | gl_cv_socklen_t_equiv= | |
23756 | for arg2 in "struct sockaddr" void; do | |
23757 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | |
23758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 23759 | /* end confdefs.h. */ |
5476a9a4 GM |
23760 | #include <sys/types.h> |
23761 | #include <sys/socket.h> | |
23762 | ||
23763 | int getpeername (int, $arg2 *, $t *); | |
f199cab1 GM |
23764 | int |
23765 | main () | |
23766 | { | |
5476a9a4 GM |
23767 | $t len; |
23768 | getpeername (0, 0, &len); | |
f199cab1 GM |
23769 | ; |
23770 | return 0; | |
23771 | } | |
3e0be4ab | 23772 | _ACEOF |
5476a9a4 GM |
23773 | if ac_fn_c_try_compile "$LINENO"; then : |
23774 | gl_cv_socklen_t_equiv="$t" | |
067d23c9 | 23775 | fi |
5476a9a4 GM |
23776 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
23777 | test "$gl_cv_socklen_t_equiv" != "" && break | |
23778 | done | |
23779 | test "$gl_cv_socklen_t_equiv" != "" && break | |
23780 | done | |
067d23c9 | 23781 | |
5476a9a4 | 23782 | fi |
067d23c9 | 23783 | |
5476a9a4 GM |
23784 | if test "$gl_cv_socklen_t_equiv" = ""; then |
23785 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | |
23786 | fi | |
23787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | |
23788 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | |
23789 | ||
23790 | cat >>confdefs.h <<_ACEOF | |
23791 | #define socklen_t $gl_cv_socklen_t_equiv | |
23792 | _ACEOF | |
067d23c9 | 23793 | |
f199cab1 | 23794 | fi |
3e0be4ab | 23795 | |
3e0be4ab | 23796 | |
5476a9a4 GM |
23797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 |
23798 | $as_echo_n "checking for ssize_t... " >&6; } | |
23799 | if test "${gt_cv_ssize_t+set}" = set; then : | |
f199cab1 GM |
23800 | $as_echo_n "(cached) " >&6 |
23801 | else | |
5476a9a4 | 23802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 23803 | /* end confdefs.h. */ |
5476a9a4 | 23804 | #include <sys/types.h> |
f199cab1 GM |
23805 | int |
23806 | main () | |
23807 | { | |
5476a9a4 GM |
23808 | int x = sizeof (ssize_t *) + sizeof (ssize_t); |
23809 | return !x; | |
f199cab1 GM |
23810 | ; |
23811 | return 0; | |
23812 | } | |
23813 | _ACEOF | |
5476a9a4 GM |
23814 | if ac_fn_c_try_compile "$LINENO"; then : |
23815 | gt_cv_ssize_t=yes | |
067d23c9 | 23816 | else |
5476a9a4 | 23817 | gt_cv_ssize_t=no |
f199cab1 | 23818 | fi |
5476a9a4 | 23819 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 23820 | fi |
5476a9a4 GM |
23821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 |
23822 | $as_echo "$gt_cv_ssize_t" >&6; } | |
23823 | if test $gt_cv_ssize_t = no; then | |
23824 | ||
23825 | $as_echo "#define ssize_t int" >>confdefs.h | |
23826 | ||
23827 | fi | |
23828 | ||
23829 | ||
23830 | ||
23831 | ||
23832 | ||
5476a9a4 GM |
23833 | 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> |
23834 | #include <sys/stat.h> | |
23835 | " | |
23836 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then : | |
23837 | ||
23838 | cat >>confdefs.h <<_ACEOF | |
23839 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 | |
23840 | _ACEOF | |
23841 | ||
23842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
23843 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
23844 | if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then : | |
f199cab1 GM |
23845 | $as_echo_n "(cached) " >&6 |
23846 | else | |
5476a9a4 | 23847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 23848 | /* end confdefs.h. */ |
3e0be4ab | 23849 | |
5476a9a4 GM |
23850 | #include <sys/types.h> |
23851 | #include <sys/stat.h> | |
23852 | #if HAVE_SYS_TIME_H | |
23853 | # include <sys/time.h> | |
23854 | #endif | |
23855 | #include <time.h> | |
23856 | struct timespec ts; | |
23857 | struct stat st; | |
23858 | ||
f199cab1 GM |
23859 | int |
23860 | main () | |
23861 | { | |
5476a9a4 GM |
23862 | |
23863 | st.st_atim = ts; | |
23864 | ||
f199cab1 GM |
23865 | ; |
23866 | return 0; | |
23867 | } | |
3e0be4ab | 23868 | _ACEOF |
5476a9a4 GM |
23869 | if ac_fn_c_try_compile "$LINENO"; then : |
23870 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
f199cab1 | 23871 | else |
5476a9a4 | 23872 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
f199cab1 | 23873 | fi |
5476a9a4 | 23874 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 23875 | fi |
5476a9a4 GM |
23876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
23877 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
23878 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
067d23c9 | 23879 | |
5476a9a4 | 23880 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
067d23c9 | 23881 | |
5476a9a4 GM |
23882 | fi |
23883 | else | |
23884 | 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> | |
23885 | #include <sys/stat.h> | |
23886 | " | |
23887 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then : | |
067d23c9 | 23888 | |
5476a9a4 GM |
23889 | cat >>confdefs.h <<_ACEOF |
23890 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 | |
23891 | _ACEOF | |
3e0be4ab | 23892 | |
0eb775a3 | 23893 | |
3e0be4ab | 23894 | else |
5476a9a4 GM |
23895 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> |
23896 | #include <sys/stat.h> | |
23897 | " | |
23898 | if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then : | |
23899 | ||
23900 | cat >>confdefs.h <<_ACEOF | |
23901 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
067d23c9 | 23902 | _ACEOF |
5476a9a4 GM |
23903 | |
23904 | ||
067d23c9 | 23905 | else |
5476a9a4 GM |
23906 | 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> |
23907 | #include <sys/stat.h> | |
23908 | " | |
23909 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then : | |
23910 | ||
23911 | cat >>confdefs.h <<_ACEOF | |
23912 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
23913 | _ACEOF | |
23914 | ||
23915 | ||
3e0be4ab | 23916 | fi |
5476a9a4 | 23917 | |
067d23c9 | 23918 | fi |
5476a9a4 | 23919 | |
067d23c9 | 23920 | fi |
067d23c9 KY |
23921 | |
23922 | fi | |
23923 | ||
067d23c9 | 23924 | |
067d23c9 | 23925 | |
067d23c9 | 23926 | |
067d23c9 | 23927 | |
5476a9a4 GM |
23928 | 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> |
23929 | #include <sys/stat.h> | |
23930 | " | |
23931 | if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then : | |
23932 | ||
23933 | cat >>confdefs.h <<_ACEOF | |
23934 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 | |
23935 | _ACEOF | |
067d23c9 KY |
23936 | |
23937 | ||
f199cab1 | 23938 | else |
5476a9a4 GM |
23939 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> |
23940 | #include <sys/stat.h> | |
23941 | " | |
23942 | if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then : | |
067d23c9 | 23943 | |
5476a9a4 GM |
23944 | cat >>confdefs.h <<_ACEOF |
23945 | #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 | |
23946 | _ACEOF | |
067d23c9 | 23947 | |
3e0be4ab | 23948 | |
067d23c9 | 23949 | else |
5476a9a4 GM |
23950 | 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> |
23951 | #include <sys/stat.h> | |
23952 | " | |
23953 | if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then : | |
067d23c9 | 23954 | |
5476a9a4 GM |
23955 | cat >>confdefs.h <<_ACEOF |
23956 | #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 | |
067d23c9 | 23957 | _ACEOF |
5476a9a4 GM |
23958 | |
23959 | ||
f199cab1 | 23960 | fi |
5476a9a4 | 23961 | |
f199cab1 | 23962 | fi |
5476a9a4 | 23963 | |
067d23c9 | 23964 | fi |
0eb775a3 | 23965 | |
0eb775a3 | 23966 | |
0eb775a3 | 23967 | |
5476a9a4 GM |
23968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 |
23969 | $as_echo_n "checking for working stdalign.h... " >&6; } | |
23970 | if test "${gl_cv_header_working_stdalign_h+set}" = set; then : | |
f199cab1 | 23971 | $as_echo_n "(cached) " >&6 |
067d23c9 | 23972 | else |
5476a9a4 | 23973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 23974 | /* end confdefs.h. */ |
5476a9a4 GM |
23975 | #include <stdalign.h> |
23976 | #include <stddef.h> | |
23977 | ||
23978 | /* Test that alignof yields a result consistent with offsetof. | |
23979 | This catches GCC bug 52023 | |
23980 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ | |
23981 | #ifdef __cplusplus | |
23982 | template <class t> struct alignof_helper { char a; t b; }; | |
23983 | # define ao(type) offsetof (alignof_helper<type>, b) | |
23984 | #else | |
23985 | # define ao(type) offsetof (struct { char a; type b; }, b) | |
23986 | #endif | |
23987 | char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; | |
23988 | char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; | |
23989 | char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; | |
23990 | ||
23991 | /* Test _Alignas only on platforms where gnulib can help. */ | |
23992 | #if \ | |
23993 | (__GNUC__ || __IBMC__ || __IBMCPP__ \ | |
23994 | || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) | |
6ea3f01e GM |
23995 | struct alignas_test { char c; char alignas (8) alignas_8; }; |
23996 | char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 | |
23997 | ? 1 : -1]; | |
5476a9a4 | 23998 | #endif |
067d23c9 | 23999 | |
f199cab1 GM |
24000 | int |
24001 | main () | |
24002 | { | |
5476a9a4 | 24003 | |
f199cab1 GM |
24004 | ; |
24005 | return 0; | |
24006 | } | |
24007 | _ACEOF | |
5476a9a4 GM |
24008 | if ac_fn_c_try_compile "$LINENO"; then : |
24009 | gl_cv_header_working_stdalign_h=yes | |
f199cab1 | 24010 | else |
5476a9a4 | 24011 | gl_cv_header_working_stdalign_h=no |
f199cab1 | 24012 | fi |
5476a9a4 | 24013 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
067d23c9 | 24014 | fi |
5476a9a4 GM |
24015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 |
24016 | $as_echo "$gl_cv_header_working_stdalign_h" >&6; } | |
067d23c9 | 24017 | |
5476a9a4 GM |
24018 | if test $gl_cv_header_working_stdalign_h = yes; then |
24019 | STDALIGN_H='' | |
24020 | else | |
24021 | STDALIGN_H='stdalign.h' | |
f199cab1 | 24022 | fi |
0eb775a3 | 24023 | |
5476a9a4 GM |
24024 | |
24025 | if test -n "$STDALIGN_H"; then | |
24026 | GL_GENERATE_STDALIGN_H_TRUE= | |
24027 | GL_GENERATE_STDALIGN_H_FALSE='#' | |
f199cab1 | 24028 | else |
5476a9a4 GM |
24029 | GL_GENERATE_STDALIGN_H_TRUE='#' |
24030 | GL_GENERATE_STDALIGN_H_FALSE= | |
0eb775a3 | 24031 | fi |
0eb775a3 GM |
24032 | |
24033 | ||
24034 | ||
5476a9a4 GM |
24035 | STDARG_H='' |
24036 | NEXT_STDARG_H='<stdarg.h>' | |
24037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 | |
24038 | $as_echo_n "checking for va_copy... " >&6; } | |
24039 | if test "${gl_cv_func_va_copy+set}" = set; then : | |
f199cab1 | 24040 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
24041 | else |
24042 | ||
24043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24044 | /* end confdefs.h. */ | |
24045 | #include <stdarg.h> | |
f199cab1 GM |
24046 | int |
24047 | main () | |
24048 | { | |
5476a9a4 GM |
24049 | |
24050 | #ifndef va_copy | |
24051 | void (*func) (va_list, va_list) = va_copy; | |
24052 | #endif | |
24053 | ||
f199cab1 GM |
24054 | ; |
24055 | return 0; | |
24056 | } | |
24057 | _ACEOF | |
5476a9a4 GM |
24058 | if ac_fn_c_try_compile "$LINENO"; then : |
24059 | gl_cv_func_va_copy=yes | |
f199cab1 | 24060 | else |
5476a9a4 | 24061 | gl_cv_func_va_copy=no |
f199cab1 | 24062 | fi |
5476a9a4 | 24063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 24064 | fi |
5476a9a4 GM |
24065 | |
24066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 | |
24067 | $as_echo "$gl_cv_func_va_copy" >&6; } | |
24068 | if test $gl_cv_func_va_copy = no; then | |
24069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24070 | /* end confdefs.h. */ | |
24071 | #if defined _AIX && !defined __GNUC__ | |
24072 | AIX vaccine | |
24073 | #endif | |
24074 | ||
24075 | _ACEOF | |
24076 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
24077 | $EGREP "vaccine" >/dev/null 2>&1; then : | |
24078 | gl_aixcc=yes | |
f199cab1 | 24079 | else |
5476a9a4 | 24080 | gl_aixcc=no |
f199cab1 | 24081 | fi |
5476a9a4 | 24082 | rm -f conftest* |
0eb775a3 | 24083 | |
5476a9a4 GM |
24084 | if test $gl_aixcc = yes; then |
24085 | STDARG_H=stdarg.h | |
0eb775a3 GM |
24086 | |
24087 | ||
5476a9a4 GM |
24088 | |
24089 | ||
24090 | ||
24091 | ||
24092 | ||
24093 | ||
24094 | if test $gl_cv_have_include_next = yes; then | |
24095 | gl_cv_next_stdarg_h='<'stdarg.h'>' | |
24096 | else | |
24097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5 | |
24098 | $as_echo_n "checking absolute name of <stdarg.h>... " >&6; } | |
24099 | if test "${gl_cv_next_stdarg_h+set}" = set; then : | |
f199cab1 GM |
24100 | $as_echo_n "(cached) " >&6 |
24101 | else | |
5476a9a4 GM |
24102 | |
24103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 24104 | /* end confdefs.h. */ |
5476a9a4 | 24105 | #include <stdarg.h> |
0eb775a3 | 24106 | |
f199cab1 | 24107 | _ACEOF |
5476a9a4 GM |
24108 | case "$host_os" in |
24109 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
24110 | *) gl_absname_cpp="$ac_cpp" ;; | |
24111 | esac | |
24112 | ||
24113 | case "$host_os" in | |
24114 | mingw*) | |
24115 | gl_dirsep_regex='[/\\]' | |
24116 | ;; | |
24117 | *) | |
24118 | gl_dirsep_regex='\/' | |
24119 | ;; | |
24120 | esac | |
24121 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
24122 | ||
24123 | gl_header_literal_regex=`echo 'stdarg.h' \ | |
24124 | | sed -e "$gl_make_literal_regex_sed"` | |
24125 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
24126 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
24127 | s|^/[^/]|//&| | |
24128 | p | |
24129 | q | |
24130 | }' | |
24131 | gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
24132 | sed -n "$gl_absolute_header_sed"`'"' | |
24133 | ||
24134 | ||
f199cab1 | 24135 | fi |
5476a9a4 GM |
24136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 |
24137 | $as_echo "$gl_cv_next_stdarg_h" >&6; } | |
24138 | fi | |
24139 | NEXT_STDARG_H=$gl_cv_next_stdarg_h | |
24140 | ||
24141 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
24142 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
24143 | gl_next_as_first_directive='<'stdarg.h'>' | |
24144 | else | |
24145 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
24146 | gl_next_as_first_directive=$gl_cv_next_stdarg_h | |
24147 | fi | |
24148 | NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive | |
0eb775a3 GM |
24149 | |
24150 | ||
24151 | ||
5476a9a4 GM |
24152 | |
24153 | if test "$gl_cv_next_stdarg_h" = '""'; then | |
24154 | gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' | |
24155 | NEXT_STDARG_H="$gl_cv_next_stdarg_h" | |
24156 | fi | |
f199cab1 | 24157 | else |
5476a9a4 GM |
24158 | |
24159 | saved_as_echo_n="$as_echo_n" | |
24160 | as_echo_n=':' | |
24161 | if test "${gl_cv_func___va_copy+set}" = set; then : | |
f199cab1 GM |
24162 | $as_echo_n "(cached) " >&6 |
24163 | else | |
0eb775a3 | 24164 | |
5476a9a4 GM |
24165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24166 | /* end confdefs.h. */ | |
24167 | #include <stdarg.h> | |
f199cab1 GM |
24168 | int |
24169 | main () | |
24170 | { | |
5476a9a4 GM |
24171 | |
24172 | #ifndef __va_copy | |
24173 | error, bail out | |
24174 | #endif | |
24175 | ||
f199cab1 GM |
24176 | ; |
24177 | return 0; | |
24178 | } | |
24179 | _ACEOF | |
5476a9a4 GM |
24180 | if ac_fn_c_try_compile "$LINENO"; then : |
24181 | gl_cv_func___va_copy=yes | |
f199cab1 | 24182 | else |
5476a9a4 | 24183 | gl_cv_func___va_copy=no |
f199cab1 | 24184 | fi |
5476a9a4 | 24185 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 24186 | fi |
0eb775a3 | 24187 | |
5476a9a4 GM |
24188 | as_echo_n="$saved_as_echo_n" |
24189 | ||
24190 | if test $gl_cv_func___va_copy = yes; then | |
24191 | ||
24192 | $as_echo "#define va_copy __va_copy" >>confdefs.h | |
24193 | ||
24194 | else | |
0eb775a3 | 24195 | |
5476a9a4 GM |
24196 | |
24197 | $as_echo "#define va_copy gl_va_copy" >>confdefs.h | |
0eb775a3 | 24198 | |
f199cab1 GM |
24199 | fi |
24200 | fi | |
5476a9a4 GM |
24201 | fi |
24202 | ||
24203 | if test -n "$STDARG_H"; then | |
24204 | GL_GENERATE_STDARG_H_TRUE= | |
24205 | GL_GENERATE_STDARG_H_FALSE='#' | |
24206 | else | |
24207 | GL_GENERATE_STDARG_H_TRUE='#' | |
24208 | GL_GENERATE_STDARG_H_FALSE= | |
24209 | fi | |
24210 | ||
24211 | ||
24212 | ||
24213 | ||
24214 | ||
24215 | ||
24216 | # Define two additional variables used in the Makefile substitution. | |
24217 | ||
24218 | if test "$ac_cv_header_stdbool_h" = yes; then | |
24219 | STDBOOL_H='' | |
24220 | else | |
24221 | STDBOOL_H='stdbool.h' | |
24222 | fi | |
24223 | ||
24224 | if test -n "$STDBOOL_H"; then | |
24225 | GL_GENERATE_STDBOOL_H_TRUE= | |
24226 | GL_GENERATE_STDBOOL_H_FALSE='#' | |
24227 | else | |
24228 | GL_GENERATE_STDBOOL_H_TRUE='#' | |
24229 | GL_GENERATE_STDBOOL_H_FALSE= | |
24230 | fi | |
24231 | ||
24232 | ||
24233 | if test "$ac_cv_type__Bool" = yes; then | |
24234 | HAVE__BOOL=1 | |
24235 | else | |
24236 | HAVE__BOOL=0 | |
24237 | fi | |
24238 | ||
24239 | ||
24240 | ||
24241 | ||
24242 | ||
24243 | STDDEF_H= | |
24244 | if test $gt_cv_c_wchar_t = no; then | |
24245 | HAVE_WCHAR_T=0 | |
24246 | STDDEF_H=stddef.h | |
24247 | fi | |
24248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
24249 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
24250 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
f199cab1 GM |
24251 | $as_echo_n "(cached) " >&6 |
24252 | else | |
5476a9a4 | 24253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
f199cab1 | 24254 | /* end confdefs.h. */ |
5476a9a4 GM |
24255 | #include <stddef.h> |
24256 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
3e0be4ab | 24257 | |
f199cab1 GM |
24258 | int |
24259 | main () | |
24260 | { | |
5476a9a4 | 24261 | |
f199cab1 GM |
24262 | ; |
24263 | return 0; | |
24264 | } | |
24265 | _ACEOF | |
5476a9a4 GM |
24266 | if ac_fn_c_try_compile "$LINENO"; then : |
24267 | gl_cv_decl_null_works=yes | |
f199cab1 | 24268 | else |
5476a9a4 | 24269 | gl_cv_decl_null_works=no |
f199cab1 | 24270 | fi |
5476a9a4 | 24271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f199cab1 | 24272 | fi |
5476a9a4 GM |
24273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 |
24274 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
24275 | if test $gl_cv_decl_null_works = no; then | |
24276 | REPLACE_NULL=1 | |
24277 | STDDEF_H=stddef.h | |
24278 | fi | |
24279 | ||
24280 | if test -n "$STDDEF_H"; then | |
24281 | GL_GENERATE_STDDEF_H_TRUE= | |
24282 | GL_GENERATE_STDDEF_H_FALSE='#' | |
f199cab1 | 24283 | else |
5476a9a4 GM |
24284 | GL_GENERATE_STDDEF_H_TRUE='#' |
24285 | GL_GENERATE_STDDEF_H_FALSE= | |
f199cab1 | 24286 | fi |
3e0be4ab | 24287 | |
5476a9a4 | 24288 | if test -n "$STDDEF_H"; then |
3e0be4ab GM |
24289 | |
24290 | ||
5476a9a4 GM |
24291 | |
24292 | ||
24293 | ||
24294 | ||
24295 | ||
24296 | ||
24297 | if test $gl_cv_have_include_next = yes; then | |
24298 | gl_cv_next_stddef_h='<'stddef.h'>' | |
24299 | else | |
24300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
24301 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
24302 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
067d23c9 KY |
24303 | $as_echo_n "(cached) " >&6 |
24304 | else | |
5476a9a4 GM |
24305 | |
24306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
067d23c9 | 24307 | /* end confdefs.h. */ |
5476a9a4 | 24308 | #include <stddef.h> |
f199cab1 | 24309 | |
067d23c9 | 24310 | _ACEOF |
5476a9a4 GM |
24311 | case "$host_os" in |
24312 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
24313 | *) gl_absname_cpp="$ac_cpp" ;; | |
24314 | esac | |
24315 | ||
24316 | case "$host_os" in | |
24317 | mingw*) | |
24318 | gl_dirsep_regex='[/\\]' | |
24319 | ;; | |
24320 | *) | |
24321 | gl_dirsep_regex='\/' | |
24322 | ;; | |
24323 | esac | |
24324 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
24325 | ||
24326 | gl_header_literal_regex=`echo 'stddef.h' \ | |
24327 | | sed -e "$gl_make_literal_regex_sed"` | |
24328 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
24329 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
24330 | s|^/[^/]|//&| | |
24331 | p | |
24332 | q | |
24333 | }' | |
24334 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
24335 | sed -n "$gl_absolute_header_sed"`'"' | |
24336 | ||
24337 | ||
f199cab1 | 24338 | fi |
5476a9a4 GM |
24339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 |
24340 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
24341 | fi | |
24342 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
24343 | ||
24344 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
24345 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
24346 | gl_next_as_first_directive='<'stddef.h'>' | |
24347 | else | |
24348 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
24349 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
24350 | fi | |
24351 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
24352 | ||
f199cab1 | 24353 | |
f199cab1 | 24354 | |
f199cab1 | 24355 | |
067d23c9 | 24356 | fi |
067d23c9 | 24357 | |
f199cab1 | 24358 | |
067d23c9 | 24359 | |
067d23c9 | 24360 | |
067d23c9 | 24361 | |
067d23c9 KY |
24362 | |
24363 | ||
067d23c9 | 24364 | |
067d23c9 KY |
24365 | |
24366 | ||
067d23c9 | 24367 | |
3e0be4ab | 24368 | |
5476a9a4 GM |
24369 | if test $gl_cv_have_include_next = yes; then |
24370 | gl_cv_next_stdio_h='<'stdio.h'>' | |
24371 | else | |
24372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | |
24373 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | |
24374 | if test "${gl_cv_next_stdio_h+set}" = set; then : | |
24375 | $as_echo_n "(cached) " >&6 | |
f199cab1 | 24376 | else |
5476a9a4 GM |
24377 | |
24378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24379 | /* end confdefs.h. */ | |
24380 | #include <stdio.h> | |
24381 | ||
f199cab1 | 24382 | _ACEOF |
5476a9a4 GM |
24383 | case "$host_os" in |
24384 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
24385 | *) gl_absname_cpp="$ac_cpp" ;; | |
24386 | esac | |
067d23c9 | 24387 | |
5476a9a4 GM |
24388 | case "$host_os" in |
24389 | mingw*) | |
24390 | gl_dirsep_regex='[/\\]' | |
24391 | ;; | |
24392 | *) | |
24393 | gl_dirsep_regex='\/' | |
24394 | ;; | |
24395 | esac | |
24396 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
24397 | ||
24398 | gl_header_literal_regex=`echo 'stdio.h' \ | |
24399 | | sed -e "$gl_make_literal_regex_sed"` | |
24400 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
24401 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
24402 | s|^/[^/]|//&| | |
24403 | p | |
24404 | q | |
24405 | }' | |
24406 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
24407 | sed -n "$gl_absolute_header_sed"`'"' | |
067d23c9 | 24408 | |
067d23c9 | 24409 | |
f199cab1 | 24410 | fi |
5476a9a4 GM |
24411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 |
24412 | $as_echo "$gl_cv_next_stdio_h" >&6; } | |
24413 | fi | |
24414 | NEXT_STDIO_H=$gl_cv_next_stdio_h | |
067d23c9 | 24415 | |
5476a9a4 GM |
24416 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
24417 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
24418 | gl_next_as_first_directive='<'stdio.h'>' | |
24419 | else | |
24420 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
24421 | gl_next_as_first_directive=$gl_cv_next_stdio_h | |
24422 | fi | |
24423 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | |
24424 | ||
24425 | ||
24426 | ||
24427 | ||
24428 | ||
24429 | GNULIB_FSCANF=1 | |
24430 | ||
24431 | ||
24432 | cat >>confdefs.h <<_ACEOF | |
24433 | #define GNULIB_FSCANF 1 | |
24434 | _ACEOF | |
067d23c9 | 24435 | |
067d23c9 | 24436 | |
5476a9a4 | 24437 | GNULIB_SCANF=1 |
f199cab1 | 24438 | |
f199cab1 | 24439 | |
5476a9a4 GM |
24440 | cat >>confdefs.h <<_ACEOF |
24441 | #define GNULIB_SCANF 1 | |
f199cab1 GM |
24442 | _ACEOF |
24443 | ||
067d23c9 | 24444 | |
5476a9a4 GM |
24445 | GNULIB_FGETC=1 |
24446 | GNULIB_GETC=1 | |
24447 | GNULIB_GETCHAR=1 | |
24448 | GNULIB_FGETS=1 | |
24449 | GNULIB_FREAD=1 | |
067d23c9 | 24450 | |
067d23c9 | 24451 | |
5476a9a4 GM |
24452 | GNULIB_FPRINTF=1 |
24453 | GNULIB_PRINTF=1 | |
24454 | GNULIB_VFPRINTF=1 | |
24455 | GNULIB_VPRINTF=1 | |
24456 | GNULIB_FPUTC=1 | |
24457 | GNULIB_PUTC=1 | |
24458 | GNULIB_PUTCHAR=1 | |
24459 | GNULIB_FPUTS=1 | |
24460 | GNULIB_PUTS=1 | |
24461 | GNULIB_FWRITE=1 | |
067d23c9 | 24462 | |
067d23c9 | 24463 | |
067d23c9 | 24464 | |
067d23c9 | 24465 | |
067d23c9 | 24466 | |
067d23c9 | 24467 | |
067d23c9 | 24468 | |
067d23c9 | 24469 | |
3e0be4ab GM |
24470 | |
24471 | ||
24472 | ||
24473 | ||
24474 | ||
24475 | ||
3e0be4ab | 24476 | |
5476a9a4 GM |
24477 | if test $gl_cv_have_include_next = yes; then |
24478 | gl_cv_next_stdlib_h='<'stdlib.h'>' | |
24479 | else | |
24480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 | |
24481 | $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } | |
24482 | if test "${gl_cv_next_stdlib_h+set}" = set; then : | |
067d23c9 KY |
24483 | $as_echo_n "(cached) " >&6 |
24484 | else | |
5476a9a4 GM |
24485 | |
24486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f199cab1 | 24487 | /* end confdefs.h. */ |
5476a9a4 GM |
24488 | #include <stdlib.h> |
24489 | ||
f199cab1 | 24490 | _ACEOF |
5476a9a4 GM |
24491 | case "$host_os" in |
24492 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
24493 | *) gl_absname_cpp="$ac_cpp" ;; | |
24494 | esac | |
067d23c9 | 24495 | |
5476a9a4 GM |
24496 | case "$host_os" in |
24497 | mingw*) | |
24498 | gl_dirsep_regex='[/\\]' | |
24499 | ;; | |
24500 | *) | |
24501 | gl_dirsep_regex='\/' | |
24502 | ;; | |
24503 | esac | |
24504 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
24505 | ||
24506 | gl_header_literal_regex=`echo 'stdlib.h' \ | |
24507 | | sed -e "$gl_make_literal_regex_sed"` | |
24508 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
24509 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
24510 | s|^/[^/]|//&| | |
24511 | p | |
24512 | q | |
24513 | }' | |
24514 | gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
24515 | sed -n "$gl_absolute_header_sed"`'"' | |
3e0be4ab | 24516 | |
067d23c9 | 24517 | |
f199cab1 | 24518 | fi |
5476a9a4 GM |
24519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 |
24520 | $as_echo "$gl_cv_next_stdlib_h" >&6; } | |
24521 | fi | |
24522 | NEXT_STDLIB_H=$gl_cv_next_stdlib_h | |
b0415a03 | 24523 | |
5476a9a4 GM |
24524 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
24525 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
24526 | gl_next_as_first_directive='<'stdlib.h'>' | |
24527 | else | |
24528 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
24529 | gl_next_as_first_directive=$gl_cv_next_stdlib_h | |
24530 | fi | |
24531 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive | |
b0415a03 | 24532 | |
067d23c9 | 24533 | |
067d23c9 | 24534 | |
067d23c9 | 24535 | |
067d23c9 | 24536 | |
067d23c9 | 24537 | |
067d23c9 | 24538 | |
067d23c9 | 24539 | |
067d23c9 | 24540 | |
5476a9a4 | 24541 | # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. |
067d23c9 | 24542 | |
067d23c9 | 24543 | |
067d23c9 | 24544 | |
b0415a03 GM |
24545 | |
24546 | ||
ac1ca7e9 | 24547 | |
0eb775a3 | 24548 | |
5476a9a4 | 24549 | $as_echo "#define my_strftime nstrftime" >>confdefs.h |
067d23c9 | 24550 | |
067d23c9 | 24551 | |
a0a61e58 GM |
24552 | |
24553 | ||
24554 | ||
3e0be4ab | 24555 | |
5476a9a4 GM |
24556 | |
24557 | ||
283c7aed GM |
24558 | |
24559 | ||
24560 | ||
5476a9a4 GM |
24561 | if test "$ac_cv_have_decl_strtoimax" != yes; then |
24562 | HAVE_DECL_STRTOIMAX=0 | |
24563 | fi | |
24564 | ||
24565 | if test $ac_cv_func_strtoimax = yes; then | |
24566 | HAVE_STRTOIMAX=1 | |
24567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5 | |
24568 | $as_echo_n "checking whether strtoimax works... " >&6; } | |
24569 | if test "${gl_cv_func_strtoimax+set}" = set; then : | |
f199cab1 GM |
24570 | $as_echo_n "(cached) " >&6 |
24571 | else | |
24572 | if test "$cross_compiling" = yes; then : | |
5476a9a4 GM |
24573 | case "$host_os" in |
24574 | # Guess no on AIX 5. | |
24575 | aix5*) gl_cv_func_strtoimax="guessing no" ;; | |
24576 | # Guess yes otherwise. | |
24577 | *) gl_cv_func_strtoimax="guessing yes" ;; | |
24578 | esac | |
24579 | ||
f199cab1 GM |
24580 | else |
24581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24582 | /* end confdefs.h. */ | |
3e0be4ab | 24583 | |
5476a9a4 GM |
24584 | #include <errno.h> |
24585 | #include <string.h> | |
24586 | #include <inttypes.h> | |
24587 | int main () | |
24588 | { | |
24589 | if (sizeof (intmax_t) > sizeof (int)) | |
24590 | { | |
24591 | const char *s = "4294967295"; | |
24592 | char *p; | |
24593 | intmax_t res; | |
24594 | errno = 0; | |
24595 | res = strtoimax (s, &p, 10); | |
24596 | if (p != s + strlen (s)) | |
24597 | return 1; | |
24598 | if (errno != 0) | |
24599 | return 2; | |
24600 | if (res != (intmax_t) 65535 * (intmax_t) 65537) | |
24601 | return 3; | |
24602 | } | |
24603 | else | |
24604 | { | |
24605 | const char *s = "2147483647"; | |
24606 | char *p; | |
24607 | intmax_t res; | |
24608 | errno = 0; | |
24609 | res = strtoimax (s, &p, 10); | |
24610 | if (p != s + strlen (s)) | |
24611 | return 1; | |
24612 | if (errno != 0) | |
24613 | return 2; | |
24614 | if (res != 2147483647) | |
24615 | return 3; | |
24616 | } | |
f199cab1 GM |
24617 | return 0; |
24618 | } | |
5476a9a4 | 24619 | |
f199cab1 GM |
24620 | _ACEOF |
24621 | if ac_fn_c_try_run "$LINENO"; then : | |
5476a9a4 | 24622 | gl_cv_func_strtoimax=yes |
f199cab1 | 24623 | else |
5476a9a4 | 24624 | gl_cv_func_strtoimax=no |
f199cab1 GM |
24625 | fi |
24626 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
24627 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
067d23c9 KY |
24628 | fi |
24629 | ||
3e0be4ab | 24630 | |
f199cab1 | 24631 | fi |
5476a9a4 GM |
24632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5 |
24633 | $as_echo "$gl_cv_func_strtoimax" >&6; } | |
24634 | case "$gl_cv_func_strtoimax" in | |
24635 | *no) REPLACE_STRTOIMAX=1 ;; | |
24636 | esac | |
24637 | else | |
24638 | HAVE_STRTOIMAX=0 | |
24639 | fi | |
067d23c9 | 24640 | |
a6342fc8 | 24641 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then |
067d23c9 | 24642 | |
067d23c9 | 24643 | |
067d23c9 | 24644 | |
067d23c9 | 24645 | |
067d23c9 | 24646 | |
3e0be4ab | 24647 | |
2b1928b8 GM |
24648 | |
24649 | ||
5476a9a4 GM |
24650 | gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" |
24651 | ||
24652 | ||
24653 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
24654 | if test "x$ac_cv_have_decl_strtoll" = x""yes; then : | |
24655 | ac_have_decl=1 | |
f199cab1 | 24656 | else |
5476a9a4 | 24657 | ac_have_decl=0 |
f199cab1 | 24658 | fi |
2b1928b8 | 24659 | |
5476a9a4 GM |
24660 | cat >>confdefs.h <<_ACEOF |
24661 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
24662 | _ACEOF | |
24663 | ||
24664 | ||
067d23c9 | 24665 | |
a6342fc8 | 24666 | fi |
067d23c9 | 24667 | |
3e0be4ab GM |
24668 | |
24669 | ||
24670 | ||
3e0be4ab | 24671 | |
5476a9a4 | 24672 | GNULIB_STRTOIMAX=1 |
3e0be4ab GM |
24673 | |
24674 | ||
24675 | ||
24676 | ||
3e0be4ab GM |
24677 | |
24678 | ||
24679 | ||
f199cab1 | 24680 | |
f199cab1 | 24681 | |
5476a9a4 GM |
24682 | if test "$ac_cv_have_decl_strtoumax" != yes; then |
24683 | HAVE_DECL_STRTOUMAX=0 | |
24684 | fi | |
067d23c9 | 24685 | |
a6342fc8 | 24686 | if test $ac_cv_func_strtoumax = no; then |
0eb775a3 | 24687 | |
5476a9a4 GM |
24688 | |
24689 | ||
24690 | ||
24691 | ||
24692 | ||
24693 | ||
24694 | ||
24695 | gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" | |
24696 | ||
24697 | ||
24698 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
24699 | if test "x$ac_cv_have_decl_strtoull" = x""yes; then : | |
24700 | ac_have_decl=1 | |
067d23c9 | 24701 | else |
5476a9a4 | 24702 | ac_have_decl=0 |
067d23c9 | 24703 | fi |
5476a9a4 GM |
24704 | |
24705 | cat >>confdefs.h <<_ACEOF | |
24706 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
24707 | _ACEOF | |
24708 | ||
24709 | ||
24710 | ||
a6342fc8 | 24711 | fi |
067d23c9 | 24712 | |
067d23c9 | 24713 | |
067d23c9 | 24714 | |
067d23c9 | 24715 | |
067d23c9 | 24716 | |
5476a9a4 GM |
24717 | GNULIB_STRTOUMAX=1 |
24718 | ||
24719 | ||
24720 | ||
24721 | ||
24722 | ||
24723 | ||
24724 | ||
24725 | if test $ac_cv_func_symlink = no; then | |
24726 | HAVE_SYMLINK=0 | |
24727 | else | |
24728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | |
24729 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | |
24730 | if test "${gl_cv_func_symlink_works+set}" = set; then : | |
f199cab1 | 24731 | $as_echo_n "(cached) " >&6 |
5476a9a4 GM |
24732 | else |
24733 | if test "$cross_compiling" = yes; then : | |
24734 | case "$host_os" in | |
24735 | # Guess yes on glibc systems. | |
24736 | *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; | |
24737 | # If we don't know, assume the worst. | |
24738 | *) gl_cv_func_symlink_works="guessing no" ;; | |
24739 | esac | |
24740 | ||
f199cab1 GM |
24741 | else |
24742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24743 | /* end confdefs.h. */ | |
5476a9a4 GM |
24744 | #include <unistd.h> |
24745 | ||
f199cab1 GM |
24746 | int |
24747 | main () | |
24748 | { | |
5476a9a4 GM |
24749 | int result = 0; |
24750 | if (!symlink ("a", "conftest.link/")) | |
24751 | result |= 1; | |
24752 | if (symlink ("conftest.f", "conftest.lnk2")) | |
24753 | result |= 2; | |
24754 | else if (!symlink ("a", "conftest.lnk2/")) | |
24755 | result |= 4; | |
24756 | return result; | |
067d23c9 | 24757 | |
f199cab1 GM |
24758 | ; |
24759 | return 0; | |
24760 | } | |
24761 | _ACEOF | |
5476a9a4 GM |
24762 | if ac_fn_c_try_run "$LINENO"; then : |
24763 | gl_cv_func_symlink_works=yes | |
f199cab1 | 24764 | else |
5476a9a4 | 24765 | gl_cv_func_symlink_works=no |
f199cab1 | 24766 | fi |
5476a9a4 GM |
24767 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
24768 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f199cab1 | 24769 | fi |
067d23c9 | 24770 | |
5476a9a4 | 24771 | rm -f conftest.f conftest.link conftest.lnk2 |
f199cab1 | 24772 | fi |
5476a9a4 GM |
24773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 |
24774 | $as_echo "$gl_cv_func_symlink_works" >&6; } | |
24775 | case "$gl_cv_func_symlink_works" in | |
24776 | *yes) ;; | |
24777 | *) | |
24778 | REPLACE_SYMLINK=1 | |
24779 | ;; | |
24780 | esac | |
24781 | fi | |
067d23c9 | 24782 | |
a6342fc8 | 24783 | if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then |
067d23c9 | 24784 | |
7e723570 | 24785 | |
7e723570 GM |
24786 | |
24787 | ||
dd0d840e | 24788 | |
dd0d840e GM |
24789 | |
24790 | ||
24791 | ||
5476a9a4 | 24792 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" |
dd0d840e | 24793 | |
a6342fc8 | 24794 | fi |
dd0d840e GM |
24795 | |
24796 | ||
d3127c14 GM |
24797 | |
24798 | ||
d3127c14 | 24799 | |
5476a9a4 | 24800 | GNULIB_SYMLINK=1 |
d3127c14 | 24801 | |
d3127c14 | 24802 | |
d3127c14 GM |
24803 | |
24804 | ||
067d23c9 | 24805 | |
067d23c9 | 24806 | |
d3127c14 | 24807 | |
d3127c14 | 24808 | |
5476a9a4 GM |
24809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5 |
24810 | $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; } | |
24811 | if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then : | |
24812 | $as_echo_n "(cached) " >&6 | |
24813 | else | |
d3127c14 | 24814 | |
5476a9a4 GM |
24815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24816 | /* end confdefs.h. */ | |
24817 | #include <sys/select.h> | |
24818 | int | |
24819 | main () | |
24820 | { | |
24821 | struct timeval b; | |
24822 | ; | |
24823 | return 0; | |
24824 | } | |
24825 | _ACEOF | |
24826 | if ac_fn_c_try_compile "$LINENO"; then : | |
24827 | gl_cv_header_sys_select_h_selfcontained=yes | |
24828 | else | |
24829 | gl_cv_header_sys_select_h_selfcontained=no | |
24830 | fi | |
24831 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
24832 | if test $gl_cv_header_sys_select_h_selfcontained = yes; then | |
24833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24834 | /* end confdefs.h. */ | |
24835 | #include <sys/select.h> | |
24836 | int | |
24837 | main () | |
24838 | { | |
24839 | int memset; int bzero; | |
24840 | ; | |
24841 | return 0; | |
24842 | } | |
3e0be4ab | 24843 | |
5476a9a4 GM |
24844 | _ACEOF |
24845 | if ac_fn_c_try_compile "$LINENO"; then : | |
24846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24847 | /* end confdefs.h. */ | |
24848 | #include <sys/select.h> | |
24849 | int | |
24850 | main () | |
24851 | { | |
dd0d840e | 24852 | |
5476a9a4 GM |
24853 | #undef memset |
24854 | #define memset nonexistent_memset | |
24855 | extern | |
24856 | #ifdef __cplusplus | |
24857 | "C" | |
24858 | #endif | |
24859 | void *memset (void *, int, unsigned long); | |
24860 | #undef bzero | |
24861 | #define bzero nonexistent_bzero | |
24862 | extern | |
24863 | #ifdef __cplusplus | |
24864 | "C" | |
24865 | #endif | |
24866 | void bzero (void *, unsigned long); | |
24867 | fd_set fds; | |
24868 | FD_ZERO (&fds); | |
3e0be4ab | 24869 | |
5476a9a4 GM |
24870 | ; |
24871 | return 0; | |
24872 | } | |
067d23c9 | 24873 | |
5476a9a4 GM |
24874 | _ACEOF |
24875 | if ac_fn_c_try_link "$LINENO"; then : | |
dd0d840e | 24876 | |
5476a9a4 GM |
24877 | else |
24878 | gl_cv_header_sys_select_h_selfcontained=no | |
24879 | fi | |
24880 | rm -f core conftest.err conftest.$ac_objext \ | |
24881 | conftest$ac_exeext conftest.$ac_ext | |
dd0d840e | 24882 | |
5476a9a4 GM |
24883 | fi |
24884 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
24885 | fi | |
dd0d840e | 24886 | |
5476a9a4 GM |
24887 | fi |
24888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 | |
24889 | $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } | |
dd0d840e | 24890 | |
dd0d840e GM |
24891 | |
24892 | ||
dd0d840e GM |
24893 | |
24894 | ||
dd0d840e GM |
24895 | |
24896 | ||
24897 | ||
dd0d840e | 24898 | |
5476a9a4 GM |
24899 | if test $gl_cv_have_include_next = yes; then |
24900 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
24901 | else | |
24902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5 | |
24903 | $as_echo_n "checking absolute name of <sys/select.h>... " >&6; } | |
24904 | if test "${gl_cv_next_sys_select_h+set}" = set; then : | |
24905 | $as_echo_n "(cached) " >&6 | |
24906 | else | |
dd0d840e | 24907 | |
5476a9a4 | 24908 | if test $ac_cv_header_sys_select_h = yes; then |
dd0d840e | 24909 | |
dd0d840e | 24910 | |
5476a9a4 GM |
24911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24912 | /* end confdefs.h. */ | |
24913 | #include <sys/select.h> | |
dd0d840e | 24914 | |
5476a9a4 GM |
24915 | _ACEOF |
24916 | case "$host_os" in | |
24917 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
24918 | *) gl_absname_cpp="$ac_cpp" ;; | |
24919 | esac | |
dd0d840e | 24920 | |
5476a9a4 GM |
24921 | case "$host_os" in |
24922 | mingw*) | |
24923 | gl_dirsep_regex='[/\\]' | |
24924 | ;; | |
24925 | *) | |
24926 | gl_dirsep_regex='\/' | |
24927 | ;; | |
24928 | esac | |
24929 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 24930 | |
5476a9a4 GM |
24931 | gl_header_literal_regex=`echo 'sys/select.h' \ |
24932 | | sed -e "$gl_make_literal_regex_sed"` | |
24933 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
24934 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
24935 | s|^/[^/]|//&| | |
24936 | p | |
24937 | q | |
24938 | }' | |
24939 | gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
24940 | sed -n "$gl_absolute_header_sed"`'"' | |
24941 | else | |
24942 | gl_cv_next_sys_select_h='<'sys/select.h'>' | |
24943 | fi | |
067d23c9 | 24944 | |
067d23c9 | 24945 | |
5476a9a4 GM |
24946 | fi |
24947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 | |
24948 | $as_echo "$gl_cv_next_sys_select_h" >&6; } | |
24949 | fi | |
24950 | NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h | |
24951 | ||
24952 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
24953 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
24954 | gl_next_as_first_directive='<'sys/select.h'>' | |
24955 | else | |
24956 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
24957 | gl_next_as_first_directive=$gl_cv_next_sys_select_h | |
24958 | fi | |
24959 | NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive | |
24960 | ||
24961 | ||
24962 | ||
24963 | ||
24964 | if test $ac_cv_header_sys_select_h = yes; then | |
24965 | HAVE_SYS_SELECT_H=1 | |
24966 | else | |
24967 | HAVE_SYS_SELECT_H=0 | |
24968 | fi | |
067d23c9 KY |
24969 | |
24970 | ||
7e723570 | 24971 | |
7e723570 | 24972 | |
7e723570 | 24973 | |
5476a9a4 GM |
24974 | if test $ac_cv_header_sys_socket_h != yes; then |
24975 | for ac_header in winsock2.h | |
24976 | do : | |
24977 | ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" | |
24978 | if test "x$ac_cv_header_winsock2_h" = x""yes; then : | |
24979 | cat >>confdefs.h <<_ACEOF | |
24980 | #define HAVE_WINSOCK2_H 1 | |
24981 | _ACEOF | |
7e723570 | 24982 | |
5476a9a4 | 24983 | fi |
7e723570 | 24984 | |
5476a9a4 | 24985 | done |
7e723570 | 24986 | |
5476a9a4 GM |
24987 | fi |
24988 | if test "$ac_cv_header_winsock2_h" = yes; then | |
24989 | HAVE_WINSOCK2_H=1 | |
24990 | UNISTD_H_HAVE_WINSOCK2_H=1 | |
24991 | SYS_IOCTL_H_HAVE_WINSOCK2_H=1 | |
24992 | else | |
24993 | HAVE_WINSOCK2_H=0 | |
24994 | fi | |
7e723570 GM |
24995 | |
24996 | ||
dd0d840e | 24997 | |
dd0d840e | 24998 | |
dd0d840e GM |
24999 | |
25000 | ||
dd0d840e | 25001 | |
dd0d840e | 25002 | |
dd0d840e GM |
25003 | |
25004 | ||
25005 | ||
25006 | ||
25007 | ||
25008 | ||
25009 | ||
25010 | ||
dd0d840e | 25011 | |
dd0d840e | 25012 | |
dd0d840e | 25013 | |
dd0d840e | 25014 | |
5476a9a4 GM |
25015 | if test $gl_cv_have_include_next = yes; then |
25016 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
25017 | else | |
25018 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 | |
25019 | $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } | |
25020 | if test "${gl_cv_next_sys_stat_h+set}" = set; then : | |
25021 | $as_echo_n "(cached) " >&6 | |
25022 | else | |
dd0d840e | 25023 | |
5476a9a4 | 25024 | if test $ac_cv_header_sys_stat_h = yes; then |
dd0d840e | 25025 | |
dd0d840e | 25026 | |
5476a9a4 GM |
25027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
25028 | /* end confdefs.h. */ | |
25029 | #include <sys/stat.h> | |
dd0d840e | 25030 | |
5476a9a4 GM |
25031 | _ACEOF |
25032 | case "$host_os" in | |
25033 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25034 | *) gl_absname_cpp="$ac_cpp" ;; | |
25035 | esac | |
dd0d840e | 25036 | |
5476a9a4 GM |
25037 | case "$host_os" in |
25038 | mingw*) | |
25039 | gl_dirsep_regex='[/\\]' | |
25040 | ;; | |
25041 | *) | |
25042 | gl_dirsep_regex='\/' | |
25043 | ;; | |
25044 | esac | |
25045 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
dd0d840e | 25046 | |
5476a9a4 GM |
25047 | gl_header_literal_regex=`echo 'sys/stat.h' \ |
25048 | | sed -e "$gl_make_literal_regex_sed"` | |
25049 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25050 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25051 | s|^/[^/]|//&| | |
25052 | p | |
25053 | q | |
25054 | }' | |
25055 | gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
25056 | sed -n "$gl_absolute_header_sed"`'"' | |
25057 | else | |
25058 | gl_cv_next_sys_stat_h='<'sys/stat.h'>' | |
25059 | fi | |
dd0d840e | 25060 | |
dd0d840e | 25061 | |
5476a9a4 GM |
25062 | fi |
25063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 | |
25064 | $as_echo "$gl_cv_next_sys_stat_h" >&6; } | |
25065 | fi | |
25066 | NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h | |
dd0d840e | 25067 | |
5476a9a4 GM |
25068 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
25069 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
25070 | gl_next_as_first_directive='<'sys/stat.h'>' | |
25071 | else | |
25072 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
25073 | gl_next_as_first_directive=$gl_cv_next_sys_stat_h | |
25074 | fi | |
25075 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive | |
dd0d840e | 25076 | |
dd0d840e | 25077 | |
d3127c14 | 25078 | |
d3127c14 | 25079 | |
dd0d840e | 25080 | |
dd0d840e | 25081 | |
dd0d840e | 25082 | |
dd0d840e | 25083 | |
dd0d840e | 25084 | |
dd0d840e | 25085 | |
dd0d840e | 25086 | |
5476a9a4 | 25087 | if test $WINDOWS_64_BIT_ST_SIZE = 1; then |
dd0d840e | 25088 | |
5476a9a4 | 25089 | $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h |
dd0d840e | 25090 | |
5476a9a4 | 25091 | fi |
dd0d840e | 25092 | |
5476a9a4 GM |
25093 | ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> |
25094 | #include <sys/stat.h> | |
25095 | " | |
25096 | if test "x$ac_cv_type_nlink_t" = x""yes; then : | |
dd0d840e | 25097 | |
5476a9a4 | 25098 | else |
dd0d840e | 25099 | |
5476a9a4 | 25100 | $as_echo "#define nlink_t int" >>confdefs.h |
dd0d840e | 25101 | |
5476a9a4 | 25102 | fi |
dd0d840e | 25103 | |
dd0d840e | 25104 | |
dd0d840e | 25105 | |
dd0d840e | 25106 | |
dd0d840e | 25107 | |
dd0d840e | 25108 | |
dd0d840e | 25109 | |
c9ca3f76 | 25110 | |
dd0d840e | 25111 | |
dd0d840e | 25112 | |
dd0d840e | 25113 | |
c9ca3f76 | 25114 | |
dd0d840e | 25115 | |
dd0d840e GM |
25116 | |
25117 | ||
7e723570 GM |
25118 | |
25119 | ||
7e723570 | 25120 | |
5476a9a4 GM |
25121 | ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h> |
25122 | " | |
25123 | if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : | |
25124 | ac_have_decl=1 | |
25125 | else | |
25126 | ac_have_decl=0 | |
25127 | fi | |
7e723570 | 25128 | |
5476a9a4 GM |
25129 | cat >>confdefs.h <<_ACEOF |
25130 | #define HAVE_DECL_LOCALTIME_R $ac_have_decl | |
25131 | _ACEOF | |
7e723570 | 25132 | |
5476a9a4 GM |
25133 | if test $ac_cv_have_decl_localtime_r = no; then |
25134 | HAVE_DECL_LOCALTIME_R=0 | |
25135 | fi | |
7e723570 | 25136 | |
7e723570 | 25137 | |
5476a9a4 GM |
25138 | if test $ac_cv_func_localtime_r = yes; then |
25139 | HAVE_LOCALTIME_R=1 | |
25140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 | |
25141 | $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } | |
25142 | if test "${gl_cv_time_r_posix+set}" = set; then : | |
25143 | $as_echo_n "(cached) " >&6 | |
25144 | else | |
25145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25146 | /* end confdefs.h. */ | |
25147 | #include <time.h> | |
7e723570 GM |
25148 | int |
25149 | main () | |
25150 | { | |
5476a9a4 GM |
25151 | /* We don't need to append 'restrict's to the argument types, |
25152 | even though the POSIX signature has the 'restrict's, | |
25153 | since C99 says they can't affect type compatibility. */ | |
25154 | struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; | |
25155 | if (ptr) return 0; | |
25156 | /* Check the return type is a pointer. | |
25157 | On HP-UX 10 it is 'int'. */ | |
25158 | *localtime_r (0, 0); | |
7e723570 GM |
25159 | ; |
25160 | return 0; | |
25161 | } | |
5476a9a4 | 25162 | |
7e723570 | 25163 | _ACEOF |
5476a9a4 GM |
25164 | if ac_fn_c_try_compile "$LINENO"; then : |
25165 | gl_cv_time_r_posix=yes | |
7e723570 | 25166 | else |
5476a9a4 | 25167 | gl_cv_time_r_posix=no |
7e723570 | 25168 | fi |
5476a9a4 | 25169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
02bd7257 | 25170 | |
5476a9a4 GM |
25171 | fi |
25172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 | |
25173 | $as_echo "$gl_cv_time_r_posix" >&6; } | |
25174 | if test $gl_cv_time_r_posix = yes; then | |
25175 | REPLACE_LOCALTIME_R=0 | |
25176 | else | |
25177 | REPLACE_LOCALTIME_R=1 | |
25178 | fi | |
25179 | else | |
25180 | HAVE_LOCALTIME_R=0 | |
25181 | fi | |
02bd7257 | 25182 | |
a6342fc8 | 25183 | if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then |
02bd7257 GM |
25184 | |
25185 | ||
02bd7257 | 25186 | |
02bd7257 | 25187 | |
02bd7257 | 25188 | |
02bd7257 | 25189 | |
7e723570 | 25190 | |
7e723570 | 25191 | |
5476a9a4 GM |
25192 | gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" |
25193 | ||
25194 | ||
25195 | : | |
7e723570 | 25196 | |
a6342fc8 | 25197 | fi |
7e723570 | 25198 | |
7e723570 | 25199 | |
7e723570 | 25200 | |
7e723570 | 25201 | |
7e723570 | 25202 | |
5476a9a4 | 25203 | GNULIB_TIME_R=1 |
7e723570 | 25204 | |
7e723570 | 25205 | |
7e723570 | 25206 | |
7e723570 | 25207 | |
7e723570 | 25208 | |
f077f61d GM |
25209 | |
25210 | ||
25211 | ||
25212 | ||
25213 | ||
25214 | LIB_TIMER_TIME= | |
25215 | ||
25216 | gl_saved_libs=$LIBS | |
25217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5 | |
25218 | $as_echo_n "checking for library containing timer_settime... " >&6; } | |
25219 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
25220 | $as_echo_n "(cached) " >&6 | |
25221 | else | |
25222 | ac_func_search_save_LIBS=$LIBS | |
25223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25224 | /* end confdefs.h. */ | |
25225 | ||
25226 | /* Override any GCC internal prototype to avoid an error. | |
25227 | Use char because int might match the return type of a GCC | |
25228 | builtin and then its argument prototype would still apply. */ | |
25229 | #ifdef __cplusplus | |
25230 | extern "C" | |
25231 | #endif | |
25232 | char timer_settime (); | |
25233 | int | |
25234 | main () | |
25235 | { | |
25236 | return timer_settime (); | |
25237 | ; | |
25238 | return 0; | |
25239 | } | |
25240 | _ACEOF | |
25241 | for ac_lib in '' rt posix4; do | |
25242 | if test -z "$ac_lib"; then | |
25243 | ac_res="none required" | |
25244 | else | |
25245 | ac_res=-l$ac_lib | |
25246 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
25247 | fi | |
25248 | if ac_fn_c_try_link "$LINENO"; then : | |
25249 | ac_cv_search_timer_settime=$ac_res | |
25250 | fi | |
25251 | rm -f core conftest.err conftest.$ac_objext \ | |
25252 | conftest$ac_exeext | |
25253 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
25254 | break | |
25255 | fi | |
25256 | done | |
25257 | if test "${ac_cv_search_timer_settime+set}" = set; then : | |
25258 | ||
25259 | else | |
25260 | ac_cv_search_timer_settime=no | |
25261 | fi | |
25262 | rm conftest.$ac_ext | |
25263 | LIBS=$ac_func_search_save_LIBS | |
25264 | fi | |
25265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5 | |
25266 | $as_echo "$ac_cv_search_timer_settime" >&6; } | |
25267 | ac_res=$ac_cv_search_timer_settime | |
25268 | if test "$ac_res" != no; then : | |
25269 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
25270 | test "$ac_cv_search_timer_settime" = "none required" || | |
25271 | LIB_TIMER_TIME=$ac_cv_search_timer_settime | |
25272 | fi | |
25273 | ||
25274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25275 | /* end confdefs.h. */ | |
25276 | ||
25277 | #include <features.h> | |
25278 | #ifdef __GNU_LIBRARY__ | |
25279 | #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \ | |
25280 | && !defined __UCLIBC__ | |
25281 | Thread emulation available | |
25282 | #endif | |
25283 | #endif | |
25284 | ||
25285 | _ACEOF | |
25286 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
25287 | $EGREP "Thread" >/dev/null 2>&1; then : | |
25288 | LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD" | |
25289 | fi | |
25290 | rm -f conftest* | |
25291 | ||
25292 | for ac_func in timer_settime | |
25293 | do : | |
25294 | ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime" | |
25295 | if test "x$ac_cv_func_timer_settime" = x""yes; then : | |
25296 | cat >>confdefs.h <<_ACEOF | |
25297 | #define HAVE_TIMER_SETTIME 1 | |
25298 | _ACEOF | |
25299 | ||
25300 | fi | |
25301 | done | |
25302 | ||
25303 | LIBS=$gl_saved_libs | |
25304 | ||
a6342fc8 | 25305 | : |
7e723570 | 25306 | |
02bd7257 | 25307 | |
02bd7257 | 25308 | |
02bd7257 | 25309 | |
02bd7257 | 25310 | |
02bd7257 | 25311 | |
02bd7257 | 25312 | |
02bd7257 | 25313 | |
dd0d840e GM |
25314 | |
25315 | ||
25316 | ||
dd0d840e | 25317 | |
5476a9a4 GM |
25318 | if test $gl_cv_have_include_next = yes; then |
25319 | gl_cv_next_unistd_h='<'unistd.h'>' | |
25320 | else | |
25321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 | |
25322 | $as_echo_n "checking absolute name of <unistd.h>... " >&6; } | |
25323 | if test "${gl_cv_next_unistd_h+set}" = set; then : | |
25324 | $as_echo_n "(cached) " >&6 | |
25325 | else | |
dd0d840e | 25326 | |
5476a9a4 | 25327 | if test $ac_cv_header_unistd_h = yes; then |
dd0d840e | 25328 | |
dd0d840e | 25329 | |
5476a9a4 | 25330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3127c14 | 25331 | /* end confdefs.h. */ |
5476a9a4 | 25332 | #include <unistd.h> |
d3127c14 | 25333 | |
5476a9a4 GM |
25334 | _ACEOF |
25335 | case "$host_os" in | |
25336 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
25337 | *) gl_absname_cpp="$ac_cpp" ;; | |
25338 | esac | |
d3127c14 | 25339 | |
5476a9a4 GM |
25340 | case "$host_os" in |
25341 | mingw*) | |
25342 | gl_dirsep_regex='[/\\]' | |
25343 | ;; | |
25344 | *) | |
25345 | gl_dirsep_regex='\/' | |
25346 | ;; | |
25347 | esac | |
25348 | gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' | |
25349 | ||
25350 | gl_header_literal_regex=`echo 'unistd.h' \ | |
25351 | | sed -e "$gl_make_literal_regex_sed"` | |
25352 | gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ | |
25353 | s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ | |
25354 | s|^/[^/]|//&| | |
25355 | p | |
25356 | q | |
25357 | }' | |
25358 | gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
25359 | sed -n "$gl_absolute_header_sed"`'"' | |
25360 | else | |
25361 | gl_cv_next_unistd_h='<'unistd.h'>' | |
25362 | fi | |
d3127c14 | 25363 | |
d3127c14 | 25364 | |
c9ca3f76 | 25365 | fi |
5476a9a4 GM |
25366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 |
25367 | $as_echo "$gl_cv_next_unistd_h" >&6; } | |
25368 | fi | |
25369 | NEXT_UNISTD_H=$gl_cv_next_unistd_h | |
c9ca3f76 | 25370 | |
5476a9a4 GM |
25371 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
25372 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
25373 | gl_next_as_first_directive='<'unistd.h'>' | |
25374 | else | |
25375 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
25376 | gl_next_as_first_directive=$gl_cv_next_unistd_h | |
25377 | fi | |
25378 | NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive | |
c9ca3f76 | 25379 | |
c9ca3f76 | 25380 | |
c9ca3f76 | 25381 | |
c9ca3f76 | 25382 | |
5476a9a4 GM |
25383 | if test $ac_cv_header_unistd_h = yes; then |
25384 | HAVE_UNISTD_H=1 | |
25385 | else | |
25386 | HAVE_UNISTD_H=0 | |
25387 | fi | |
c9ca3f76 | 25388 | |
d3127c14 | 25389 | |
dd0d840e | 25390 | |
dd0d840e | 25391 | |
d3127c14 | 25392 | |
d3127c14 | 25393 | |
dd0d840e GM |
25394 | |
25395 | ||
c9ca3f76 GM |
25396 | |
25397 | ||
25398 | ||
b5591ebb GM |
25399 | if test $ac_cv_have_decl_unsetenv = no; then |
25400 | HAVE_DECL_UNSETENV=0 | |
25401 | fi | |
25402 | for ac_func in unsetenv | |
25403 | do : | |
25404 | ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" | |
25405 | if test "x$ac_cv_func_unsetenv" = x""yes; then : | |
25406 | cat >>confdefs.h <<_ACEOF | |
25407 | #define HAVE_UNSETENV 1 | |
25408 | _ACEOF | |
25409 | ||
25410 | fi | |
25411 | done | |
25412 | ||
25413 | if test $ac_cv_func_unsetenv = no; then | |
25414 | HAVE_UNSETENV=0 | |
25415 | else | |
25416 | HAVE_UNSETENV=1 | |
25417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 | |
25418 | $as_echo_n "checking for unsetenv() return type... " >&6; } | |
25419 | if test "${gt_cv_func_unsetenv_ret+set}" = set; then : | |
25420 | $as_echo_n "(cached) " >&6 | |
25421 | else | |
25422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25423 | /* end confdefs.h. */ | |
25424 | ||
25425 | #undef _BSD | |
25426 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | |
25427 | #include <stdlib.h> | |
25428 | extern | |
25429 | #ifdef __cplusplus | |
25430 | "C" | |
25431 | #endif | |
25432 | int unsetenv (const char *name); | |
25433 | ||
25434 | int | |
25435 | main () | |
25436 | { | |
25437 | ||
25438 | ; | |
25439 | return 0; | |
25440 | } | |
25441 | _ACEOF | |
25442 | if ac_fn_c_try_compile "$LINENO"; then : | |
25443 | gt_cv_func_unsetenv_ret='int' | |
25444 | else | |
25445 | gt_cv_func_unsetenv_ret='void' | |
25446 | fi | |
25447 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
25448 | fi | |
25449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 | |
25450 | $as_echo "$gt_cv_func_unsetenv_ret" >&6; } | |
25451 | if test $gt_cv_func_unsetenv_ret = 'void'; then | |
25452 | ||
25453 | $as_echo "#define VOID_UNSETENV 1" >>confdefs.h | |
25454 | ||
25455 | REPLACE_UNSETENV=1 | |
25456 | fi | |
25457 | ||
25458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 | |
25459 | $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } | |
25460 | if test "${gl_cv_func_unsetenv_works+set}" = set; then : | |
25461 | $as_echo_n "(cached) " >&6 | |
25462 | else | |
25463 | if test "$cross_compiling" = yes; then : | |
25464 | case "$host_os" in | |
25465 | # Guess yes on glibc systems. | |
25466 | *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; | |
25467 | # If we don't know, assume the worst. | |
25468 | *) gl_cv_func_unsetenv_works="guessing no" ;; | |
25469 | esac | |
25470 | ||
25471 | else | |
25472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25473 | /* end confdefs.h. */ | |
25474 | ||
25475 | #include <stdlib.h> | |
25476 | #include <errno.h> | |
25477 | extern char **environ; | |
25478 | ||
25479 | int | |
25480 | main () | |
25481 | { | |
25482 | ||
25483 | char entry1[] = "a=1"; | |
25484 | char entry2[] = "b=2"; | |
25485 | char *env[] = { entry1, entry2, NULL }; | |
25486 | if (putenv ((char *) "a=1")) return 1; | |
25487 | if (putenv (entry2)) return 2; | |
25488 | entry2[0] = 'a'; | |
25489 | unsetenv ("a"); | |
25490 | if (getenv ("a")) return 3; | |
25491 | if (!unsetenv ("") || errno != EINVAL) return 4; | |
25492 | entry2[0] = 'b'; | |
25493 | environ = env; | |
25494 | if (!getenv ("a")) return 5; | |
25495 | entry2[0] = 'a'; | |
25496 | unsetenv ("a"); | |
25497 | if (getenv ("a")) return 6; | |
25498 | ||
25499 | ; | |
25500 | return 0; | |
25501 | } | |
25502 | _ACEOF | |
25503 | if ac_fn_c_try_run "$LINENO"; then : | |
25504 | gl_cv_func_unsetenv_works=yes | |
25505 | else | |
25506 | gl_cv_func_unsetenv_works=no | |
25507 | fi | |
25508 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25509 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25510 | fi | |
25511 | ||
25512 | fi | |
25513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 | |
25514 | $as_echo "$gl_cv_func_unsetenv_works" >&6; } | |
25515 | case "$gl_cv_func_unsetenv_works" in | |
25516 | *yes) ;; | |
25517 | *) | |
25518 | REPLACE_UNSETENV=1 | |
25519 | ;; | |
25520 | esac | |
25521 | fi | |
25522 | ||
25523 | if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then | |
25524 | ||
25525 | ||
25526 | ||
25527 | ||
25528 | ||
25529 | ||
25530 | ||
25531 | ||
25532 | gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" | |
25533 | ||
25534 | ||
25535 | ||
25536 | ||
25537 | ||
25538 | fi | |
25539 | ||
25540 | ||
25541 | ||
25542 | ||
25543 | ||
25544 | GNULIB_UNSETENV=1 | |
25545 | ||
25546 | ||
25547 | ||
25548 | ||
25549 | ||
25550 | ||
25551 | ||
25552 | ||
c9ca3f76 GM |
25553 | |
25554 | ||
c9ca3f76 | 25555 | |
5476a9a4 GM |
25556 | if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then |
25557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5 | |
25558 | $as_echo_n "checking whether futimesat handles NULL file... " >&6; } | |
25559 | if test "${gl_cv_func_futimesat_works+set}" = set; then : | |
25560 | $as_echo_n "(cached) " >&6 | |
25561 | else | |
25562 | touch conftest.file | |
25563 | if test "$cross_compiling" = yes; then : | |
25564 | case "$host_os" in | |
25565 | # Guess yes on glibc systems. | |
25566 | *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; | |
25567 | # If we don't know, assume the worst. | |
25568 | *) gl_cv_func_futimesat_works="guessing no" ;; | |
25569 | esac | |
c9ca3f76 | 25570 | |
5476a9a4 GM |
25571 | else |
25572 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
c9ca3f76 GM |
25573 | /* end confdefs.h. */ |
25574 | ||
5476a9a4 GM |
25575 | #include <stddef.h> |
25576 | #include <sys/times.h> | |
25577 | #include <fcntl.h> | |
c9ca3f76 GM |
25578 | |
25579 | int | |
25580 | main () | |
25581 | { | |
5476a9a4 GM |
25582 | int fd = open ("conftest.file", O_RDWR); |
25583 | if (fd < 0) return 1; | |
25584 | if (futimesat (fd, NULL, NULL)) return 2; | |
c9ca3f76 GM |
25585 | |
25586 | ; | |
25587 | return 0; | |
25588 | } | |
25589 | _ACEOF | |
5476a9a4 GM |
25590 | if ac_fn_c_try_run "$LINENO"; then : |
25591 | gl_cv_func_futimesat_works=yes | |
c9ca3f76 | 25592 | else |
5476a9a4 | 25593 | gl_cv_func_futimesat_works=no |
c9ca3f76 | 25594 | fi |
5476a9a4 GM |
25595 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
25596 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c9ca3f76 GM |
25597 | fi |
25598 | ||
5476a9a4 GM |
25599 | rm -f conftest.file |
25600 | fi | |
25601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5 | |
25602 | $as_echo "$gl_cv_func_futimesat_works" >&6; } | |
25603 | case "$gl_cv_func_futimesat_works" in | |
25604 | *yes) ;; | |
25605 | *) | |
7e723570 | 25606 | |
5476a9a4 | 25607 | $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h |
067d23c9 | 25608 | |
5476a9a4 GM |
25609 | ;; |
25610 | esac | |
25611 | fi | |
dd0d840e | 25612 | |
d7ad186c | 25613 | gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false |
5476a9a4 | 25614 | gl_gnulib_enabled_dosname=false |
710f5812 GM |
25615 | gl_gnulib_enabled_euidaccess=false |
25616 | gl_gnulib_enabled_getgroups=false | |
5476a9a4 | 25617 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false |
710f5812 | 25618 | gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false |
d7ad186c | 25619 | gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false |
5476a9a4 | 25620 | gl_gnulib_enabled_pathmax=false |
710f5812 | 25621 | gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false |
5476a9a4 GM |
25622 | gl_gnulib_enabled_stat=false |
25623 | gl_gnulib_enabled_strtoll=false | |
25624 | gl_gnulib_enabled_strtoull=false | |
25625 | gl_gnulib_enabled_verify=false | |
710f5812 | 25626 | gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false |
d7ad186c GM |
25627 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b () |
25628 | { | |
25629 | if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then | |
25630 | ||
25631 | ||
25632 | ||
25633 | ||
25634 | ||
25635 | ||
25636 | ||
25637 | ||
25638 | gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" | |
25639 | ||
25640 | gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true | |
25641 | fi | |
25642 | } | |
5476a9a4 GM |
25643 | func_gl_gnulib_m4code_dosname () |
25644 | { | |
25645 | if ! $gl_gnulib_enabled_dosname; then | |
25646 | gl_gnulib_enabled_dosname=true | |
25647 | fi | |
25648 | } | |
710f5812 | 25649 | func_gl_gnulib_m4code_euidaccess () |
5476a9a4 | 25650 | { |
710f5812 | 25651 | if ! $gl_gnulib_enabled_euidaccess; then |
dd0d840e | 25652 | |
d3127c14 GM |
25653 | |
25654 | ||
25655 | ||
25656 | ||
710f5812 GM |
25657 | for ac_func in euidaccess |
25658 | do : | |
25659 | ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess" | |
25660 | if test "x$ac_cv_func_euidaccess" = x""yes; then : | |
25661 | cat >>confdefs.h <<_ACEOF | |
25662 | #define HAVE_EUIDACCESS 1 | |
25663 | _ACEOF | |
d3127c14 | 25664 | |
710f5812 GM |
25665 | fi |
25666 | done | |
d3127c14 | 25667 | |
710f5812 GM |
25668 | if test $ac_cv_func_euidaccess = no; then |
25669 | HAVE_EUIDACCESS=0 | |
25670 | fi | |
d3127c14 | 25671 | |
710f5812 GM |
25672 | if test $HAVE_EUIDACCESS = 0; then |
25673 | ||
25674 | ||
25675 | ||
25676 | ||
25677 | ||
25678 | ||
25679 | ||
25680 | ||
25681 | gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext" | |
25682 | ||
25683 | ||
25684 | ||
25685 | for ac_header in libgen.h | |
25686 | do : | |
25687 | ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default" | |
25688 | if test "x$ac_cv_header_libgen_h" = x""yes; then : | |
25689 | cat >>confdefs.h <<_ACEOF | |
25690 | #define HAVE_LIBGEN_H 1 | |
25691 | _ACEOF | |
25692 | ||
25693 | fi | |
25694 | ||
25695 | done | |
25696 | ||
25697 | ||
25698 | ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" | |
25699 | if test "x$ac_cv_func_getgroups" = x""yes; then : | |
25700 | ||
25701 | fi | |
25702 | ||
25703 | ||
25704 | # If we don't yet have getgroups, see if it's in -lbsd. | |
25705 | # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. | |
25706 | ac_save_LIBS=$LIBS | |
25707 | if test $ac_cv_func_getgroups = no; then | |
25708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 | |
25709 | $as_echo_n "checking for getgroups in -lbsd... " >&6; } | |
25710 | if test "${ac_cv_lib_bsd_getgroups+set}" = set; then : | |
5476a9a4 GM |
25711 | $as_echo_n "(cached) " >&6 |
25712 | else | |
710f5812 GM |
25713 | ac_check_lib_save_LIBS=$LIBS |
25714 | LIBS="-lbsd $LIBS" | |
25715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 25716 | /* end confdefs.h. */ |
d3127c14 | 25717 | |
710f5812 GM |
25718 | /* Override any GCC internal prototype to avoid an error. |
25719 | Use char because int might match the return type of a GCC | |
25720 | builtin and then its argument prototype would still apply. */ | |
25721 | #ifdef __cplusplus | |
25722 | extern "C" | |
25723 | #endif | |
25724 | char getgroups (); | |
d3127c14 GM |
25725 | int |
25726 | main () | |
25727 | { | |
710f5812 | 25728 | return getgroups (); |
d3127c14 GM |
25729 | ; |
25730 | return 0; | |
25731 | } | |
25732 | _ACEOF | |
710f5812 GM |
25733 | if ac_fn_c_try_link "$LINENO"; then : |
25734 | ac_cv_lib_bsd_getgroups=yes | |
d3127c14 | 25735 | else |
710f5812 | 25736 | ac_cv_lib_bsd_getgroups=no |
5476a9a4 | 25737 | fi |
710f5812 GM |
25738 | rm -f core conftest.err conftest.$ac_objext \ |
25739 | conftest$ac_exeext conftest.$ac_ext | |
25740 | LIBS=$ac_check_lib_save_LIBS | |
d3127c14 | 25741 | fi |
710f5812 GM |
25742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 |
25743 | $as_echo "$ac_cv_lib_bsd_getgroups" >&6; } | |
25744 | if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then : | |
25745 | GETGROUPS_LIB=-lbsd | |
5476a9a4 | 25746 | fi |
710f5812 GM |
25747 | |
25748 | fi | |
25749 | ||
25750 | # Run the program to test the functionality of the system-supplied | |
25751 | # getgroups function only if there is such a function. | |
25752 | if test $ac_cv_func_getgroups = yes; then | |
25753 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 | |
25754 | $as_echo_n "checking for working getgroups... " >&6; } | |
25755 | if test "${ac_cv_func_getgroups_works+set}" = set; then : | |
5476a9a4 GM |
25756 | $as_echo_n "(cached) " >&6 |
25757 | else | |
710f5812 GM |
25758 | if test "$cross_compiling" = yes; then : |
25759 | case "$host_os" in # (( | |
5476a9a4 | 25760 | # Guess yes on glibc systems. |
710f5812 | 25761 | *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; |
5476a9a4 | 25762 | # If we don't know, assume the worst. |
710f5812 | 25763 | *) ac_cv_func_getgroups_works="guessing no" ;; |
5476a9a4 | 25764 | esac |
d3127c14 | 25765 | |
5476a9a4 GM |
25766 | else |
25767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d3127c14 | 25768 | /* end confdefs.h. */ |
710f5812 | 25769 | $ac_includes_default |
d3127c14 GM |
25770 | int |
25771 | main () | |
25772 | { | |
710f5812 GM |
25773 | /* On Ultrix 4.3, getgroups (0, 0) always fails. */ |
25774 | return getgroups (0, 0) == -1; | |
25775 | ; | |
25776 | return 0; | |
25777 | } | |
25778 | ||
25779 | _ACEOF | |
25780 | if ac_fn_c_try_run "$LINENO"; then : | |
25781 | ac_cv_func_getgroups_works=yes | |
25782 | else | |
25783 | ac_cv_func_getgroups_works=no | |
25784 | fi | |
25785 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
25786 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
25787 | fi | |
25788 | ||
25789 | ||
25790 | fi | |
25791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 | |
25792 | $as_echo "$ac_cv_func_getgroups_works" >&6; } | |
25793 | else | |
25794 | ac_cv_func_getgroups_works=no | |
25795 | fi | |
25796 | case "$ac_cv_func_getgroups_works" in | |
25797 | *yes) | |
25798 | ||
25799 | $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h | |
25800 | ||
25801 | ;; | |
25802 | esac | |
25803 | LIBS=$ac_save_LIBS | |
25804 | ||
25805 | ||
25806 | # Solaris 9 and 10 need -lgen to get the eaccess function. | |
25807 | # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* | |
25808 | # programs in the package would end up linked with that potentially-shared | |
25809 | # library, inducing unnecessary run-time overhead. | |
25810 | LIB_EACCESS= | |
25811 | ||
25812 | gl_saved_libs=$LIBS | |
25813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5 | |
25814 | $as_echo_n "checking for library containing eaccess... " >&6; } | |
25815 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
25816 | $as_echo_n "(cached) " >&6 | |
25817 | else | |
25818 | ac_func_search_save_LIBS=$LIBS | |
25819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25820 | /* end confdefs.h. */ | |
25821 | ||
25822 | /* Override any GCC internal prototype to avoid an error. | |
25823 | Use char because int might match the return type of a GCC | |
25824 | builtin and then its argument prototype would still apply. */ | |
25825 | #ifdef __cplusplus | |
25826 | extern "C" | |
25827 | #endif | |
25828 | char eaccess (); | |
25829 | int | |
25830 | main () | |
25831 | { | |
25832 | return eaccess (); | |
25833 | ; | |
25834 | return 0; | |
25835 | } | |
25836 | _ACEOF | |
25837 | for ac_lib in '' gen; do | |
25838 | if test -z "$ac_lib"; then | |
25839 | ac_res="none required" | |
25840 | else | |
25841 | ac_res=-l$ac_lib | |
25842 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
25843 | fi | |
25844 | if ac_fn_c_try_link "$LINENO"; then : | |
25845 | ac_cv_search_eaccess=$ac_res | |
25846 | fi | |
25847 | rm -f core conftest.err conftest.$ac_objext \ | |
25848 | conftest$ac_exeext | |
25849 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
25850 | break | |
25851 | fi | |
25852 | done | |
25853 | if test "${ac_cv_search_eaccess+set}" = set; then : | |
25854 | ||
25855 | else | |
25856 | ac_cv_search_eaccess=no | |
25857 | fi | |
25858 | rm conftest.$ac_ext | |
25859 | LIBS=$ac_func_search_save_LIBS | |
25860 | fi | |
25861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5 | |
25862 | $as_echo "$ac_cv_search_eaccess" >&6; } | |
25863 | ac_res=$ac_cv_search_eaccess | |
25864 | if test "$ac_res" != no; then : | |
25865 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
25866 | test "$ac_cv_search_eaccess" = "none required" || | |
25867 | LIB_EACCESS=$ac_cv_search_eaccess | |
25868 | fi | |
25869 | ||
25870 | for ac_func in eaccess | |
25871 | do : | |
25872 | ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" | |
25873 | if test "x$ac_cv_func_eaccess" = x""yes; then : | |
25874 | cat >>confdefs.h <<_ACEOF | |
25875 | #define HAVE_EACCESS 1 | |
25876 | _ACEOF | |
25877 | ||
25878 | fi | |
25879 | done | |
25880 | ||
25881 | LIBS=$gl_saved_libs | |
25882 | ||
25883 | fi | |
25884 | ||
25885 | ||
25886 | ||
25887 | ||
25888 | ||
25889 | GNULIB_EUIDACCESS=1 | |
25890 | ||
25891 | ||
25892 | ||
25893 | ||
25894 | ||
25895 | gl_gnulib_enabled_euidaccess=true | |
25896 | if test $HAVE_EUIDACCESS = 0; then | |
25897 | func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 | |
25898 | fi | |
25899 | func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c | |
25900 | if test $HAVE_EUIDACCESS = 0; then | |
25901 | func_gl_gnulib_m4code_stat | |
25902 | fi | |
25903 | fi | |
25904 | } | |
25905 | func_gl_gnulib_m4code_getgroups () | |
25906 | { | |
25907 | if ! $gl_gnulib_enabled_getgroups; then | |
25908 | ||
25909 | ||
25910 | ||
25911 | ||
25912 | ||
25913 | ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" | |
25914 | if test "x$ac_cv_func_getgroups" = x""yes; then : | |
25915 | ||
25916 | fi | |
25917 | ||
25918 | ||
25919 | # If we don't yet have getgroups, see if it's in -lbsd. | |
25920 | # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. | |
25921 | ac_save_LIBS=$LIBS | |
25922 | if test $ac_cv_func_getgroups = no; then | |
25923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 | |
25924 | $as_echo_n "checking for getgroups in -lbsd... " >&6; } | |
25925 | if test "${ac_cv_lib_bsd_getgroups+set}" = set; then : | |
25926 | $as_echo_n "(cached) " >&6 | |
25927 | else | |
25928 | ac_check_lib_save_LIBS=$LIBS | |
25929 | LIBS="-lbsd $LIBS" | |
25930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25931 | /* end confdefs.h. */ | |
25932 | ||
25933 | /* Override any GCC internal prototype to avoid an error. | |
25934 | Use char because int might match the return type of a GCC | |
25935 | builtin and then its argument prototype would still apply. */ | |
25936 | #ifdef __cplusplus | |
25937 | extern "C" | |
25938 | #endif | |
25939 | char getgroups (); | |
25940 | int | |
25941 | main () | |
25942 | { | |
25943 | return getgroups (); | |
25944 | ; | |
25945 | return 0; | |
25946 | } | |
25947 | _ACEOF | |
25948 | if ac_fn_c_try_link "$LINENO"; then : | |
25949 | ac_cv_lib_bsd_getgroups=yes | |
25950 | else | |
25951 | ac_cv_lib_bsd_getgroups=no | |
25952 | fi | |
25953 | rm -f core conftest.err conftest.$ac_objext \ | |
25954 | conftest$ac_exeext conftest.$ac_ext | |
25955 | LIBS=$ac_check_lib_save_LIBS | |
25956 | fi | |
25957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 | |
25958 | $as_echo "$ac_cv_lib_bsd_getgroups" >&6; } | |
25959 | if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then : | |
25960 | GETGROUPS_LIB=-lbsd | |
25961 | fi | |
25962 | ||
25963 | fi | |
25964 | ||
25965 | # Run the program to test the functionality of the system-supplied | |
25966 | # getgroups function only if there is such a function. | |
25967 | if test $ac_cv_func_getgroups = yes; then | |
25968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 | |
25969 | $as_echo_n "checking for working getgroups... " >&6; } | |
25970 | if test "${ac_cv_func_getgroups_works+set}" = set; then : | |
25971 | $as_echo_n "(cached) " >&6 | |
25972 | else | |
25973 | if test "$cross_compiling" = yes; then : | |
25974 | case "$host_os" in # (( | |
25975 | # Guess yes on glibc systems. | |
25976 | *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; | |
25977 | # If we don't know, assume the worst. | |
25978 | *) ac_cv_func_getgroups_works="guessing no" ;; | |
25979 | esac | |
25980 | ||
25981 | else | |
25982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
25983 | /* end confdefs.h. */ | |
25984 | $ac_includes_default | |
25985 | int | |
25986 | main () | |
25987 | { | |
25988 | /* On Ultrix 4.3, getgroups (0, 0) always fails. */ | |
25989 | return getgroups (0, 0) == -1; | |
25990 | ; | |
25991 | return 0; | |
25992 | } | |
25993 | ||
25994 | _ACEOF | |
25995 | if ac_fn_c_try_run "$LINENO"; then : | |
25996 | ac_cv_func_getgroups_works=yes | |
25997 | else | |
25998 | ac_cv_func_getgroups_works=no | |
25999 | fi | |
26000 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26001 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26002 | fi | |
26003 | ||
26004 | ||
26005 | fi | |
26006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 | |
26007 | $as_echo "$ac_cv_func_getgroups_works" >&6; } | |
26008 | else | |
26009 | ac_cv_func_getgroups_works=no | |
26010 | fi | |
26011 | case "$ac_cv_func_getgroups_works" in | |
26012 | *yes) | |
26013 | ||
26014 | $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h | |
26015 | ||
26016 | ;; | |
26017 | esac | |
26018 | LIBS=$ac_save_LIBS | |
26019 | ||
26020 | if test $ac_cv_func_getgroups != yes; then | |
26021 | HAVE_GETGROUPS=0 | |
26022 | else | |
26023 | if test "$ac_cv_type_getgroups" != gid_t \ | |
26024 | || { case "$ac_cv_func_getgroups_works" in | |
26025 | *yes) false;; | |
26026 | *) true;; | |
26027 | esac | |
26028 | }; then | |
26029 | REPLACE_GETGROUPS=1 | |
26030 | ||
26031 | $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h | |
26032 | ||
26033 | else | |
26034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 | |
26035 | $as_echo_n "checking whether getgroups handles negative values... " >&6; } | |
26036 | if test "${gl_cv_func_getgroups_works+set}" = set; then : | |
26037 | $as_echo_n "(cached) " >&6 | |
26038 | else | |
26039 | if test "$cross_compiling" = yes; then : | |
26040 | case "$host_os" in | |
26041 | # Guess yes on glibc systems. | |
26042 | *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;; | |
26043 | # If we don't know, assume the worst. | |
26044 | *) gl_cv_func_getgroups_works="guessing no" ;; | |
26045 | esac | |
26046 | ||
26047 | else | |
26048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26049 | /* end confdefs.h. */ | |
26050 | $ac_includes_default | |
26051 | int | |
26052 | main () | |
26053 | { | |
26054 | int size = getgroups (0, 0); | |
26055 | gid_t *list = malloc (size * sizeof *list); | |
26056 | return getgroups (-1, list) != -1; | |
26057 | ; | |
26058 | return 0; | |
26059 | } | |
26060 | _ACEOF | |
26061 | if ac_fn_c_try_run "$LINENO"; then : | |
26062 | gl_cv_func_getgroups_works=yes | |
26063 | else | |
26064 | gl_cv_func_getgroups_works=no | |
26065 | fi | |
26066 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26067 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26068 | fi | |
26069 | ||
26070 | fi | |
26071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5 | |
26072 | $as_echo "$gl_cv_func_getgroups_works" >&6; } | |
26073 | case "$gl_cv_func_getgroups_works" in | |
26074 | *yes) ;; | |
26075 | *) REPLACE_GETGROUPS=1 ;; | |
26076 | esac | |
26077 | fi | |
26078 | fi | |
26079 | test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" | |
26080 | ||
26081 | if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then | |
26082 | ||
26083 | ||
26084 | ||
26085 | ||
26086 | ||
26087 | ||
26088 | ||
26089 | ||
26090 | gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" | |
26091 | ||
26092 | fi | |
26093 | ||
26094 | ||
26095 | ||
26096 | ||
26097 | ||
26098 | GNULIB_GETGROUPS=1 | |
26099 | ||
26100 | ||
26101 | ||
26102 | ||
26103 | ||
26104 | gl_gnulib_enabled_getgroups=true | |
26105 | fi | |
26106 | } | |
26107 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () | |
26108 | { | |
26109 | if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then | |
26110 | ||
26111 | ||
26112 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true | |
26113 | fi | |
26114 | } | |
26115 | func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 () | |
26116 | { | |
26117 | if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then | |
26118 | ||
26119 | ||
26120 | ||
26121 | ||
26122 | ||
26123 | ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member" | |
26124 | if test "x$ac_cv_func_group_member" = x""yes; then : | |
26125 | ||
26126 | else | |
26127 | ||
26128 | HAVE_GROUP_MEMBER=0 | |
26129 | ||
26130 | fi | |
26131 | ||
26132 | ||
26133 | if test $HAVE_GROUP_MEMBER = 0; then | |
26134 | ||
26135 | ||
26136 | ||
26137 | ||
26138 | ||
26139 | ||
26140 | ||
26141 | ||
26142 | gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext" | |
26143 | ||
26144 | ||
26145 | ||
26146 | ||
26147 | fi | |
26148 | ||
26149 | ||
26150 | ||
26151 | ||
26152 | ||
26153 | GNULIB_GROUP_MEMBER=1 | |
26154 | ||
26155 | ||
26156 | ||
26157 | ||
26158 | ||
26159 | gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true | |
26160 | if test $HAVE_GROUP_MEMBER = 0; then | |
26161 | func_gl_gnulib_m4code_getgroups | |
26162 | fi | |
26163 | if test $HAVE_GROUP_MEMBER = 0; then | |
26164 | func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec | |
26165 | fi | |
26166 | fi | |
26167 | } | |
d7ad186c GM |
26168 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 () |
26169 | { | |
26170 | if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then | |
26171 | gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true | |
26172 | fi | |
26173 | } | |
710f5812 GM |
26174 | func_gl_gnulib_m4code_pathmax () |
26175 | { | |
26176 | if ! $gl_gnulib_enabled_pathmax; then | |
26177 | ||
26178 | ||
26179 | ||
26180 | gl_gnulib_enabled_pathmax=true | |
26181 | fi | |
26182 | } | |
26183 | func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c () | |
26184 | { | |
26185 | if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then | |
26186 | gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true | |
26187 | fi | |
26188 | } | |
26189 | func_gl_gnulib_m4code_stat () | |
26190 | { | |
26191 | if ! $gl_gnulib_enabled_stat; then | |
26192 | ||
26193 | ||
26194 | ||
26195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 | |
26196 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | |
26197 | if test "${gl_cv_func_stat_dir_slash+set}" = set; then : | |
26198 | $as_echo_n "(cached) " >&6 | |
26199 | else | |
26200 | if test "$cross_compiling" = yes; then : | |
26201 | case $host_os in | |
26202 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | |
26203 | *) gl_cv_func_stat_dir_slash="guessing yes";; | |
26204 | esac | |
26205 | else | |
26206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26207 | /* end confdefs.h. */ | |
26208 | #include <sys/stat.h> | |
26209 | ||
26210 | int | |
26211 | main () | |
26212 | { | |
26213 | struct stat st; return stat (".", &st) != stat ("./", &st); | |
26214 | ; | |
26215 | return 0; | |
26216 | } | |
26217 | _ACEOF | |
26218 | if ac_fn_c_try_run "$LINENO"; then : | |
26219 | gl_cv_func_stat_dir_slash=yes | |
26220 | else | |
26221 | gl_cv_func_stat_dir_slash=no | |
26222 | fi | |
26223 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26224 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
26225 | fi | |
26226 | ||
26227 | fi | |
26228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 | |
26229 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | |
26230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | |
26231 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | |
26232 | if test "${gl_cv_func_stat_file_slash+set}" = set; then : | |
26233 | $as_echo_n "(cached) " >&6 | |
26234 | else | |
26235 | touch conftest.tmp | |
26236 | # Assume that if we have lstat, we can also check symlinks. | |
26237 | if test $ac_cv_func_lstat = yes; then | |
26238 | ln -s conftest.tmp conftest.lnk | |
26239 | fi | |
26240 | if test "$cross_compiling" = yes; then : | |
26241 | case "$host_os" in | |
26242 | # Guess yes on glibc systems. | |
26243 | *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; | |
26244 | # If we don't know, assume the worst. | |
26245 | *) gl_cv_func_stat_file_slash="guessing no" ;; | |
26246 | esac | |
26247 | ||
26248 | else | |
26249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
26250 | /* end confdefs.h. */ | |
26251 | #include <sys/stat.h> | |
26252 | ||
26253 | int | |
26254 | main () | |
26255 | { | |
26256 | int result = 0; | |
26257 | struct stat st; | |
26258 | if (!stat ("conftest.tmp/", &st)) | |
26259 | result |= 1; | |
26260 | #if HAVE_LSTAT | |
26261 | if (!stat ("conftest.lnk/", &st)) | |
5476a9a4 GM |
26262 | result |= 2; |
26263 | #endif | |
26264 | return result; | |
d3127c14 GM |
26265 | |
26266 | ; | |
26267 | return 0; | |
26268 | } | |
26269 | _ACEOF | |
5476a9a4 GM |
26270 | if ac_fn_c_try_run "$LINENO"; then : |
26271 | gl_cv_func_stat_file_slash=yes | |
d3127c14 | 26272 | else |
5476a9a4 GM |
26273 | gl_cv_func_stat_file_slash=no |
26274 | fi | |
26275 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
26276 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
d3127c14 | 26277 | fi |
d3127c14 | 26278 | |
5476a9a4 GM |
26279 | rm -f conftest.tmp conftest.lnk |
26280 | fi | |
26281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | |
26282 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | |
26283 | case $gl_cv_func_stat_dir_slash in | |
26284 | *no) REPLACE_STAT=1 | |
d3127c14 | 26285 | |
5476a9a4 GM |
26286 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h |
26287 | ;; | |
26288 | esac | |
26289 | case $gl_cv_func_stat_file_slash in | |
26290 | *no) REPLACE_STAT=1 | |
d3127c14 | 26291 | |
5476a9a4 GM |
26292 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h |
26293 | ;; | |
26294 | esac | |
d3127c14 | 26295 | |
a6342fc8 | 26296 | if test $REPLACE_STAT = 1; then |
d3127c14 | 26297 | |
dd0d840e | 26298 | |
dd0d840e | 26299 | |
dd0d840e | 26300 | |
dd0d840e | 26301 | |
dd0d840e | 26302 | |
067d23c9 KY |
26303 | |
26304 | ||
5476a9a4 | 26305 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" |
067d23c9 | 26306 | |
45d4966b | 26307 | : |
a6342fc8 | 26308 | fi |
067d23c9 | 26309 | |
dd0d840e GM |
26310 | |
26311 | ||
dd0d840e | 26312 | |
dd0d840e | 26313 | |
5476a9a4 | 26314 | GNULIB_STAT=1 |
dd0d840e | 26315 | |
067d23c9 KY |
26316 | |
26317 | ||
26318 | ||
26319 | ||
5476a9a4 GM |
26320 | gl_gnulib_enabled_stat=true |
26321 | if test $REPLACE_STAT = 1; then | |
26322 | func_gl_gnulib_m4code_dosname | |
26323 | fi | |
26324 | if test $REPLACE_STAT = 1; then | |
26325 | func_gl_gnulib_m4code_pathmax | |
26326 | fi | |
26327 | if test $REPLACE_STAT = 1; then | |
26328 | func_gl_gnulib_m4code_verify | |
26329 | fi | |
26330 | fi | |
26331 | } | |
26332 | func_gl_gnulib_m4code_strtoll () | |
26333 | { | |
26334 | if ! $gl_gnulib_enabled_strtoll; then | |
067d23c9 KY |
26335 | |
26336 | ||
26337 | ||
5476a9a4 GM |
26338 | if test "$ac_cv_type_long_long_int" = yes; then |
26339 | for ac_func in strtoll | |
26340 | do : | |
26341 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
26342 | if test "x$ac_cv_func_strtoll" = x""yes; then : | |
26343 | cat >>confdefs.h <<_ACEOF | |
26344 | #define HAVE_STRTOLL 1 | |
26345 | _ACEOF | |
067d23c9 | 26346 | |
5476a9a4 GM |
26347 | fi |
26348 | done | |
067d23c9 | 26349 | |
5476a9a4 GM |
26350 | if test $ac_cv_func_strtoll = no; then |
26351 | HAVE_STRTOLL=0 | |
26352 | fi | |
26353 | fi | |
067d23c9 | 26354 | |
a6342fc8 | 26355 | if test $HAVE_STRTOLL = 0; then |
067d23c9 KY |
26356 | |
26357 | ||
26358 | ||
067d23c9 KY |
26359 | |
26360 | ||
26361 | ||
26362 | ||
26363 | ||
5476a9a4 | 26364 | gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" |
067d23c9 KY |
26365 | |
26366 | ||
5476a9a4 | 26367 | : |
067d23c9 | 26368 | |
a6342fc8 | 26369 | fi |
067d23c9 KY |
26370 | |
26371 | ||
26372 | ||
067d23c9 | 26373 | |
067d23c9 | 26374 | |
5476a9a4 | 26375 | GNULIB_STRTOLL=1 |
067d23c9 | 26376 | |
397f7161 | 26377 | |
067d23c9 KY |
26378 | |
26379 | ||
067d23c9 | 26380 | |
5476a9a4 GM |
26381 | gl_gnulib_enabled_strtoll=true |
26382 | fi | |
26383 | } | |
26384 | func_gl_gnulib_m4code_strtoull () | |
26385 | { | |
26386 | if ! $gl_gnulib_enabled_strtoull; then | |
067d23c9 | 26387 | |
067d23c9 | 26388 | |
067d23c9 | 26389 | |
5476a9a4 GM |
26390 | if test "$ac_cv_type_unsigned_long_long_int" = yes; then |
26391 | for ac_func in strtoull | |
26392 | do : | |
26393 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
26394 | if test "x$ac_cv_func_strtoull" = x""yes; then : | |
26395 | cat >>confdefs.h <<_ACEOF | |
26396 | #define HAVE_STRTOULL 1 | |
26397 | _ACEOF | |
067d23c9 | 26398 | |
f199cab1 | 26399 | fi |
5476a9a4 | 26400 | done |
067d23c9 | 26401 | |
5476a9a4 GM |
26402 | if test $ac_cv_func_strtoull = no; then |
26403 | HAVE_STRTOULL=0 | |
26404 | fi | |
26405 | fi | |
067d23c9 | 26406 | |
a6342fc8 | 26407 | if test $HAVE_STRTOULL = 0; then |
067d23c9 KY |
26408 | |
26409 | ||
067d23c9 | 26410 | |
067d23c9 | 26411 | |
067d23c9 | 26412 | |
067d23c9 | 26413 | |
067d23c9 | 26414 | |
067d23c9 | 26415 | |
5476a9a4 | 26416 | gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" |
067d23c9 | 26417 | |
067d23c9 | 26418 | |
5476a9a4 | 26419 | : |
067d23c9 | 26420 | |
a6342fc8 | 26421 | fi |
067d23c9 KY |
26422 | |
26423 | ||
3e0be4ab | 26424 | |
3e0be4ab | 26425 | |
067d23c9 | 26426 | |
5476a9a4 | 26427 | GNULIB_STRTOULL=1 |
067d23c9 | 26428 | |
a0a61e58 | 26429 | |
067d23c9 | 26430 | |
067d23c9 KY |
26431 | |
26432 | ||
5476a9a4 GM |
26433 | gl_gnulib_enabled_strtoull=true |
26434 | fi | |
26435 | } | |
26436 | func_gl_gnulib_m4code_verify () | |
26437 | { | |
26438 | if ! $gl_gnulib_enabled_verify; then | |
26439 | gl_gnulib_enabled_verify=true | |
26440 | fi | |
26441 | } | |
710f5812 GM |
26442 | func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec () |
26443 | { | |
26444 | if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then | |
26445 | gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true | |
26446 | fi | |
26447 | } | |
d7ad186c GM |
26448 | if test $HAVE_FACCESSAT = 0; then |
26449 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
26450 | fi | |
710f5812 GM |
26451 | if test $HAVE_FACCESSAT = 0; then |
26452 | func_gl_gnulib_m4code_dosname | |
26453 | fi | |
26454 | if test $HAVE_FACCESSAT = 0; then | |
26455 | func_gl_gnulib_m4code_euidaccess | |
26456 | fi | |
d7ad186c GM |
26457 | if test $HAVE_FACCESSAT = 0; then |
26458 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
26459 | fi | |
26460 | if test $HAVE_FDOPENDIR = 0; then | |
26461 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
26462 | fi | |
26463 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
26464 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
26465 | fi | |
26466 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
26467 | func_gl_gnulib_m4code_dosname | |
26468 | fi | |
26469 | if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then | |
26470 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
26471 | fi | |
5476a9a4 GM |
26472 | if test $REPLACE_GETOPT = 1; then |
26473 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | |
26474 | fi | |
26475 | if test $REPLACE_LSTAT = 1; then | |
26476 | func_gl_gnulib_m4code_dosname | |
26477 | fi | |
26478 | if test $REPLACE_LSTAT = 1; then | |
26479 | func_gl_gnulib_m4code_stat | |
26480 | fi | |
26481 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | |
26482 | func_gl_gnulib_m4code_stat | |
26483 | fi | |
d7ad186c GM |
26484 | if test $HAVE_READLINKAT = 0; then |
26485 | func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b | |
26486 | fi | |
26487 | if test $HAVE_READLINKAT = 0; then | |
26488 | func_gl_gnulib_m4code_dosname | |
26489 | fi | |
26490 | if test $HAVE_READLINKAT = 0; then | |
26491 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | |
26492 | fi | |
5476a9a4 GM |
26493 | if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then |
26494 | func_gl_gnulib_m4code_strtoll | |
26495 | fi | |
26496 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then | |
26497 | func_gl_gnulib_m4code_verify | |
26498 | fi | |
26499 | if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then | |
26500 | func_gl_gnulib_m4code_strtoull | |
26501 | fi | |
26502 | if test $ac_cv_func_strtoumax = no; then | |
26503 | func_gl_gnulib_m4code_verify | |
26504 | fi | |
067d23c9 | 26505 | |
d7ad186c GM |
26506 | if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then |
26507 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE= | |
26508 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#' | |
26509 | else | |
26510 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#' | |
26511 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE= | |
26512 | fi | |
26513 | ||
5476a9a4 GM |
26514 | if $gl_gnulib_enabled_dosname; then |
26515 | gl_GNULIB_ENABLED_dosname_TRUE= | |
26516 | gl_GNULIB_ENABLED_dosname_FALSE='#' | |
26517 | else | |
26518 | gl_GNULIB_ENABLED_dosname_TRUE='#' | |
26519 | gl_GNULIB_ENABLED_dosname_FALSE= | |
26520 | fi | |
067d23c9 | 26521 | |
710f5812 GM |
26522 | if $gl_gnulib_enabled_euidaccess; then |
26523 | gl_GNULIB_ENABLED_euidaccess_TRUE= | |
26524 | gl_GNULIB_ENABLED_euidaccess_FALSE='#' | |
26525 | else | |
26526 | gl_GNULIB_ENABLED_euidaccess_TRUE='#' | |
26527 | gl_GNULIB_ENABLED_euidaccess_FALSE= | |
26528 | fi | |
26529 | ||
26530 | if $gl_gnulib_enabled_getgroups; then | |
26531 | gl_GNULIB_ENABLED_getgroups_TRUE= | |
26532 | gl_GNULIB_ENABLED_getgroups_FALSE='#' | |
26533 | else | |
26534 | gl_GNULIB_ENABLED_getgroups_TRUE='#' | |
26535 | gl_GNULIB_ENABLED_getgroups_FALSE= | |
26536 | fi | |
26537 | ||
5476a9a4 GM |
26538 | if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then |
26539 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= | |
26540 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' | |
26541 | else | |
26542 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' | |
26543 | gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= | |
26544 | fi | |
067d23c9 | 26545 | |
710f5812 GM |
26546 | if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then |
26547 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE= | |
26548 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#' | |
26549 | else | |
26550 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#' | |
26551 | gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE= | |
26552 | fi | |
26553 | ||
d7ad186c GM |
26554 | if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then |
26555 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE= | |
26556 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#' | |
26557 | else | |
26558 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#' | |
26559 | gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE= | |
26560 | fi | |
26561 | ||
5476a9a4 GM |
26562 | if $gl_gnulib_enabled_pathmax; then |
26563 | gl_GNULIB_ENABLED_pathmax_TRUE= | |
26564 | gl_GNULIB_ENABLED_pathmax_FALSE='#' | |
26565 | else | |
26566 | gl_GNULIB_ENABLED_pathmax_TRUE='#' | |
26567 | gl_GNULIB_ENABLED_pathmax_FALSE= | |
26568 | fi | |
067d23c9 | 26569 | |
710f5812 GM |
26570 | if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then |
26571 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE= | |
26572 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#' | |
26573 | else | |
26574 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#' | |
26575 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE= | |
26576 | fi | |
26577 | ||
5476a9a4 GM |
26578 | if $gl_gnulib_enabled_stat; then |
26579 | gl_GNULIB_ENABLED_stat_TRUE= | |
26580 | gl_GNULIB_ENABLED_stat_FALSE='#' | |
26581 | else | |
26582 | gl_GNULIB_ENABLED_stat_TRUE='#' | |
26583 | gl_GNULIB_ENABLED_stat_FALSE= | |
26584 | fi | |
067d23c9 | 26585 | |
5476a9a4 GM |
26586 | if $gl_gnulib_enabled_strtoll; then |
26587 | gl_GNULIB_ENABLED_strtoll_TRUE= | |
26588 | gl_GNULIB_ENABLED_strtoll_FALSE='#' | |
26589 | else | |
26590 | gl_GNULIB_ENABLED_strtoll_TRUE='#' | |
26591 | gl_GNULIB_ENABLED_strtoll_FALSE= | |
26592 | fi | |
067d23c9 | 26593 | |
5476a9a4 GM |
26594 | if $gl_gnulib_enabled_strtoull; then |
26595 | gl_GNULIB_ENABLED_strtoull_TRUE= | |
26596 | gl_GNULIB_ENABLED_strtoull_FALSE='#' | |
26597 | else | |
26598 | gl_GNULIB_ENABLED_strtoull_TRUE='#' | |
26599 | gl_GNULIB_ENABLED_strtoull_FALSE= | |
f199cab1 | 26600 | fi |
067d23c9 | 26601 | |
5476a9a4 GM |
26602 | if $gl_gnulib_enabled_verify; then |
26603 | gl_GNULIB_ENABLED_verify_TRUE= | |
26604 | gl_GNULIB_ENABLED_verify_FALSE='#' | |
26605 | else | |
26606 | gl_GNULIB_ENABLED_verify_TRUE='#' | |
26607 | gl_GNULIB_ENABLED_verify_FALSE= | |
26608 | fi | |
067d23c9 | 26609 | |
710f5812 GM |
26610 | if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then |
26611 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE= | |
26612 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#' | |
26613 | else | |
26614 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#' | |
26615 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE= | |
26616 | fi | |
26617 | ||
5476a9a4 | 26618 | # End of code from modules |
067d23c9 | 26619 | |
067d23c9 | 26620 | |
067d23c9 | 26621 | |
067d23c9 | 26622 | |
f199cab1 | 26623 | |
f199cab1 GM |
26624 | |
26625 | ||
067d23c9 | 26626 | |
5476a9a4 GM |
26627 | |
26628 | gltests_libdeps= | |
26629 | gltests_ltlibdeps= | |
067d23c9 | 26630 | |
067d23c9 | 26631 | |
067d23c9 KY |
26632 | |
26633 | ||
067d23c9 KY |
26634 | |
26635 | ||
3e0be4ab | 26636 | |
3e0be4ab | 26637 | |
3e0be4ab | 26638 | |
5476a9a4 GM |
26639 | gl_source_base='tests' |
26640 | 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 | 26641 | |
5476a9a4 | 26642 | gl_module_indicator_condition=$gltests_WITNESS |
3e0be4ab GM |
26643 | |
26644 | ||
26645 | ||
26646 | ||
26647 | ||
067d23c9 KY |
26648 | |
26649 | ||
26650 | ||
3e0be4ab | 26651 | |
3e0be4ab | 26652 | |
5476a9a4 GM |
26653 | LIBGNU_LIBDEPS="$gl_libdeps" |
26654 | ||
26655 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
26656 | ||
067d23c9 | 26657 | |
5476a9a4 GM |
26658 | CFLAGS=$SAVE_CFLAGS |
26659 | LIBS=$SAVE_LIBS | |
067d23c9 KY |
26660 | |
26661 | case "$opsys" in | |
26662 | aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; | |
26663 | ||
26664 | darwin) | |
26665 | ## The -headerpad option tells ld (see man page) to leave room at the | |
26666 | ## end of the header for adding load commands. Needed for dumping. | |
26667 | ## 0x690 is the total size of 30 segment load commands (at 56 | |
26668 | ## each); under Cocoa 31 commands are required. | |
26669 | if test "$HAVE_NS" = "yes"; then | |
26670 | libs_nsgui="-framework AppKit" | |
26671 | headerpad_extra=6C8 | |
26672 | else | |
26673 | libs_nsgui= | |
26674 | headerpad_extra=690 | |
26675 | fi | |
85cf5029 | 26676 | LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" |
067d23c9 KY |
26677 | |
26678 | ## This is here because src/Makefile.in did some extra fiddling around | |
2407788f GM |
26679 | ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in |
26680 | ## LD_SWITCH_SYSTEM_TEMACS instead, | |
067d23c9 KY |
26681 | test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ |
26682 | LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" | |
26683 | ;; | |
26684 | ||
ae629dae GM |
26685 | ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to |
26686 | ## find X at run-time. | |
26687 | ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the | |
26688 | ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH | |
067d23c9 KY |
26689 | ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM |
26690 | ## had different values in configure (in ac_link) and src/Makefile.in. | |
26691 | ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. | |
ae629dae | 26692 | gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; |
067d23c9 KY |
26693 | |
26694 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | |
26695 | esac | |
26696 | ||
26256684 GM |
26697 | if test x$ac_enable_profiling != x ; then |
26698 | case $opsys in | |
26699 | *freebsd | gnu-linux) ;; | |
26700 | *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;; | |
26701 | esac | |
26702 | fi | |
26703 | ||
067d23c9 KY |
26704 | |
26705 | ||
42dcba54 GM |
26706 | ## Common for all window systems |
26707 | if test "$window_system" != "none"; then | |
067d23c9 KY |
26708 | |
26709 | $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h | |
26710 | ||
42dcba54 | 26711 | WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o" |
067d23c9 KY |
26712 | fi |
26713 | ||
26714 | ||
26715 | ||
26716 | ||
42dcba54 | 26717 | |
067d23c9 KY |
26718 | #### Report on what we decided to do. |
26719 | #### Report GTK as a toolkit, even if it doesn't use Xt. | |
26720 | #### It makes printing result more understandable as using GTK sets | |
26721 | #### toolkit_scroll_bars to yes by default. | |
26722 | if test "${HAVE_GTK}" = "yes"; then | |
a732eace | 26723 | USE_X_TOOLKIT="$USE_GTK_TOOLKIT" |
067d23c9 KY |
26724 | fi |
26725 | ||
26726 | echo " | |
26727 | Configured for \`${canonical}'. | |
26728 | ||
26729 | Where should the build process find the source code? ${srcdir} | |
067d23c9 KY |
26730 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
26731 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
26732 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | |
26733 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers | |
26734 | What window system should Emacs use? ${window_system} | |
26735 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" | |
26736 | ||
26737 | if test -n "${x_includes}"; then | |
26738 | echo " Where do we find X Windows header files? ${x_includes}" | |
26739 | else | |
26740 | echo " Where do we find X Windows header files? Standard dirs" | |
26741 | fi | |
26742 | if test -n "${x_libraries}"; then | |
26743 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
26744 | else | |
26745 | echo " Where do we find X Windows libraries? Standard dirs" | |
26746 | fi | |
26747 | ||
26748 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" | |
26749 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
26750 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
26751 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | |
26752 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | |
26753 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
26754 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | |
26755 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | |
26756 | ||
26757 | echo " Does Emacs use -lgpm? ${HAVE_GPM}" | |
26758 | echo " Does Emacs use -ldbus? ${HAVE_DBUS}" | |
26759 | echo " Does Emacs use -lgconf? ${HAVE_GCONF}" | |
f527bd02 | 26760 | echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" |
067d23c9 | 26761 | echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" |
27f5a136 | 26762 | echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" |
067d23c9 KY |
26763 | echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |
26764 | ||
26765 | echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" | |
26766 | echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" | |
26767 | echo " Does Emacs use -lotf? ${HAVE_LIBOTF}" | |
26768 | echo " Does Emacs use -lxft? ${HAVE_XFT}" | |
26769 | ||
26770 | echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | |
26771 | echo | |
26772 | ||
eb39a72d GM |
26773 | if test -n "${EMACSDATA}"; then |
26774 | echo " Environment variable EMACSDATA set to: $EMACSDATA" | |
26775 | fi | |
26776 | if test -n "${EMACSDOC}"; then | |
26777 | echo " Environment variable EMACSDOC set to: $EMACSDOC" | |
26778 | fi | |
26779 | ||
067d23c9 KY |
26780 | echo |
26781 | ||
26782 | if test "$HAVE_NS" = "yes"; then | |
26783 | echo | |
3d0788a9 | 26784 | echo "You must run \"${MAKE-make} install\" in order to test the built application. |
067d23c9 KY |
26785 | The installed application will go to nextstep/Emacs.app and can be |
26786 | run or moved from there." | |
26787 | if test "$EN_NS_SELF_CONTAINED" = "yes"; then | |
26788 | echo "The application will be fully self-contained." | |
26789 | else | |
26790 | echo "The lisp resources for the application will be installed under ${prefix}. | |
3d0788a9 | 26791 | You may need to run \"${MAKE-make} install\" with sudo. The application will fail |
067d23c9 KY |
26792 | to run if these resources are not installed." |
26793 | fi | |
26794 | echo | |
26795 | fi | |
26796 | ||
031fabfc GM |
26797 | if test "${opsys}" = "cygwin"; then |
26798 | case `uname -r` in | |
26799 | 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5 | |
26800 | $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;} | |
26801 | echo | |
26802 | ;; | |
26803 | esac | |
26804 | fi | |
067d23c9 KY |
26805 | |
26806 | # Remove any trailing slashes in these variables. | |
26807 | test "${prefix}" != NONE && | |
26808 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
26809 | test "${exec_prefix}" != NONE && | |
26810 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
26811 | ||
bb7dce39 GM |
26812 | if test "$HAVE_NS" = "yes"; then |
26813 | if test "$NS_IMPL_GNUSTEP" = yes; then | |
26814 | 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" | |
26815 | ||
26816 | else | |
26817 | 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" | |
26818 | ||
26819 | fi | |
26820 | fi | |
26821 | ||
26822 | 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" | |
56ade35c | 26823 | |
bb7dce39 | 26824 | 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" |
56ade35c | 26825 | |
a877df06 | 26826 | |
73b78882 | 26827 | opt_makefile=test/automated/Makefile |
a877df06 | 26828 | |
b5591ebb | 26829 | if test -f "$srcdir/$opt_makefile.in"; then |
73b78882 | 26830 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
56ade35c | 26831 | ac_config_files="$ac_config_files test/automated/Makefile" |
a877df06 | 26832 | |
56ade35c | 26833 | fi |
73b78882 | 26834 | |
40b65096 GM |
26835 | |
26836 | opt_makefile=admin/unidata/Makefile | |
26837 | ||
b5591ebb | 26838 | if test -f "$srcdir/$opt_makefile.in"; then |
40b65096 GM |
26839 | SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" |
26840 | ac_config_files="$ac_config_files admin/unidata/Makefile" | |
26841 | ||
26842 | fi | |
26843 | ||
26844 | ||
56ade35c | 26845 | SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` |
73b78882 | 26846 | |
067d23c9 | 26847 | |
9411886d PE |
26848 | |
26849 | ac_config_commands="$ac_config_commands mkdirs" | |
26850 | ||
26851 | ||
26852 | ac_config_commands="$ac_config_commands epaths" | |
26853 | ||
26854 | ||
26855 | ac_config_commands="$ac_config_commands gdbinit" | |
26856 | ||
067d23c9 KY |
26857 | |
26858 | cat >confcache <<\_ACEOF | |
26859 | # This file is a shell script that caches the results of configure | |
26860 | # tests run on this system so they can be shared between configure | |
26861 | # scripts and configure runs, see configure's option --config-cache. | |
26862 | # It is not useful on other systems. If it contains results you don't | |
26863 | # want to keep, you may remove or edit it. | |
26864 | # | |
26865 | # config.status only pays attention to the cache file if you give it | |
26866 | # the --recheck option to rerun configure. | |
26867 | # | |
26868 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
26869 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
26870 | # following values. | |
26871 | ||
26872 | _ACEOF | |
26873 | ||
26874 | # The following way of writing the cache mishandles newlines in values, | |
26875 | # but we know of no workaround that is simple, portable, and efficient. | |
26876 | # So, we kill variables containing newlines. | |
26877 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
26878 | # and sets the high bit in the cache file unless we assign to the vars. | |
26879 | ( | |
26880 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
26881 | eval ac_val=\$$ac_var | |
26882 | case $ac_val in #( | |
26883 | *${as_nl}*) | |
26884 | case $ac_var in #( | |
26885 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
26886 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
26887 | esac | |
26888 | case $ac_var in #( | |
26889 | _ | IFS | as_nl) ;; #( | |
26890 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
26891 | *) { eval $ac_var=; unset $ac_var;} ;; | |
26892 | esac ;; | |
26893 | esac | |
26894 | done | |
26895 | ||
26896 | (set) 2>&1 | | |
26897 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
26898 | *${as_nl}ac_space=\ *) | |
26899 | # `set' does not quote correctly, so add quotes: double-quote | |
26900 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
26901 | sed -n \ | |
26902 | "s/'/'\\\\''/g; | |
26903 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
26904 | ;; #( | |
26905 | *) | |
26906 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
26907 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
26908 | ;; | |
26909 | esac | | |
26910 | sort | |
26911 | ) | | |
26912 | sed ' | |
26913 | /^ac_cv_env_/b end | |
26914 | t clear | |
26915 | :clear | |
26916 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
26917 | t end | |
26918 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
26919 | :end' >>confcache | |
26920 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
26921 | if test -w "$cache_file"; then | |
a9bec17c | 26922 | test "x$cache_file" != "x/dev/null" && |
067d23c9 KY |
26923 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
26924 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
a9bec17c | 26925 | cat confcache >$cache_file |
067d23c9 KY |
26926 | else |
26927 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
26928 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
26929 | fi | |
26930 | fi | |
26931 | rm -f confcache | |
26932 | ||
26933 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
26934 | # Let make expand exec_prefix. | |
26935 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
26936 | ||
26937 | DEFS=-DHAVE_CONFIG_H | |
26938 | ||
26939 | ac_libobjs= | |
26940 | ac_ltlibobjs= | |
26941 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
26942 | # 1. Remove the extension, and $U if already installed. | |
26943 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
26944 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
26945 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
26946 | # will be set to the directory where LIBOBJS objects are built. | |
26947 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
26948 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
26949 | done | |
26950 | LIBOBJS=$ac_libobjs | |
26951 | ||
26952 | LTLIBOBJS=$ac_ltlibobjs | |
26953 | ||
26954 | ||
743c80a7 PE |
26955 | if test -n "$EXEEXT"; then |
26956 | am__EXEEXT_TRUE= | |
26957 | am__EXEEXT_FALSE='#' | |
26958 | else | |
26959 | am__EXEEXT_TRUE='#' | |
26960 | am__EXEEXT_FALSE= | |
26961 | fi | |
26962 | ||
26963 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
a9bec17c | 26964 | as_fn_error "conditional \"AMDEP\" was never defined. |
743c80a7 PE |
26965 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26966 | fi | |
26967 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
a9bec17c | 26968 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
743c80a7 PE |
26969 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26970 | fi | |
743c80a7 | 26971 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
a9bec17c | 26972 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
743c80a7 PE |
26973 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26974 | fi | |
4fc2b746 | 26975 | if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then |
a9bec17c | 26976 | as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. |
4fc2b746 GM |
26977 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26978 | fi | |
743c80a7 | 26979 | |
8966cbff GM |
26980 | if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then |
26981 | as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined. | |
26982 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
26983 | fi | |
4fda9c95 | 26984 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then |
a9bec17c | 26985 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. |
4fda9c95 GM |
26986 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26987 | fi | |
0eb775a3 GM |
26988 | if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then |
26989 | as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. | |
26990 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
26991 | fi | |
6d153f56 | 26992 | if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then |
a9bec17c | 26993 | as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. |
6d153f56 GM |
26994 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26995 | fi | |
6c051bab | 26996 | if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then |
a9bec17c | 26997 | as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. |
6c051bab GM |
26998 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
26999 | fi | |
27000 | if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then | |
a9bec17c | 27001 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
6c051bab GM |
27002 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27003 | fi | |
d7ad186c GM |
27004 | if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then |
27005 | as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined. | |
27006 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27007 | fi | |
6d153f56 | 27008 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
a9bec17c | 27009 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. |
6d153f56 GM |
27010 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27011 | fi | |
710f5812 GM |
27012 | if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then |
27013 | as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined. | |
27014 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27015 | fi | |
27016 | if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then | |
27017 | as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined. | |
27018 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27019 | fi | |
6d153f56 | 27020 | if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then |
a9bec17c | 27021 | as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. |
6d153f56 GM |
27022 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27023 | fi | |
710f5812 GM |
27024 | if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then |
27025 | as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined. | |
27026 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27027 | fi | |
d7ad186c GM |
27028 | if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then |
27029 | as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined. | |
27030 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27031 | fi | |
a0a61e58 GM |
27032 | if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then |
27033 | as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined. | |
27034 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27035 | fi | |
710f5812 GM |
27036 | if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then |
27037 | as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined. | |
27038 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
27039 | fi | |
6d153f56 | 27040 | if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then |
a9bec17c | 27041 | as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. |
6d153f56 GM |
27042 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27043 | fi | |
3e0be4ab | 27044 | if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then |
a9bec17c | 27045 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. |
3e0be4ab GM |
27046 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27047 | fi | |
6d153f56 | 27048 | if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then |
a9bec17c | 27049 | as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. |
6d153f56 GM |
27050 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
27051 | fi | |
27052 | if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then | |
a9bec17c | 27053 | as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. |
6d153f56 | 27054 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
710f5812 GM |
27055 | fi |
27056 | if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then | |
27057 | as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined. | |
27058 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
6c051bab | 27059 | fi |
942f733f | 27060 | |
743c80a7 PE |
27061 | gl_libobjs= |
27062 | gl_ltlibobjs= | |
27063 | if test -n "$gl_LIBOBJS"; then | |
27064 | # Remove the extension. | |
27065 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
27066 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
27067 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
27068 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
27069 | done | |
27070 | fi | |
27071 | gl_LIBOBJS=$gl_libobjs | |
27072 | ||
27073 | gl_LTLIBOBJS=$gl_ltlibobjs | |
27074 | ||
27075 | ||
27076 | ||
27077 | gltests_libobjs= | |
27078 | gltests_ltlibobjs= | |
27079 | if test -n "$gltests_LIBOBJS"; then | |
27080 | # Remove the extension. | |
27081 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
27082 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do | |
27083 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
27084 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
27085 | done | |
27086 | fi | |
27087 | gltests_LIBOBJS=$gltests_libobjs | |
27088 | ||
27089 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
27090 | ||
067d23c9 KY |
27091 | |
27092 | ||
a9bec17c | 27093 | : ${CONFIG_STATUS=./config.status} |
067d23c9 KY |
27094 | ac_write_fail=0 |
27095 | ac_clean_files_save=$ac_clean_files | |
27096 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
27097 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
27098 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
27099 | as_write_fail=0 | |
27100 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
27101 | #! $SHELL | |
27102 | # Generated by $as_me. | |
27103 | # Run this file to recreate the current configuration. | |
27104 | # Compiler output produced by configure, useful for debugging | |
27105 | # configure, is in config.log if it exists. | |
27106 | ||
27107 | debug=false | |
27108 | ac_cs_recheck=false | |
27109 | ac_cs_silent=false | |
27110 | ||
27111 | SHELL=\${CONFIG_SHELL-$SHELL} | |
27112 | export SHELL | |
27113 | _ASEOF | |
27114 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
27115 | ## -------------------- ## | |
27116 | ## M4sh Initialization. ## | |
27117 | ## -------------------- ## | |
27118 | ||
27119 | # Be more Bourne compatible | |
27120 | DUALCASE=1; export DUALCASE # for MKS sh | |
27121 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
27122 | emulate sh | |
27123 | NULLCMD=: | |
27124 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
27125 | # is contrary to our usage. Disable this feature. | |
27126 | alias -g '${1+"$@"}'='"$@"' | |
27127 | setopt NO_GLOB_SUBST | |
27128 | else | |
27129 | case `(set -o) 2>/dev/null` in #( | |
27130 | *posix*) : | |
27131 | set -o posix ;; #( | |
27132 | *) : | |
27133 | ;; | |
27134 | esac | |
27135 | fi | |
27136 | ||
27137 | ||
27138 | as_nl=' | |
27139 | ' | |
27140 | export as_nl | |
27141 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
27142 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
27143 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
27144 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
27145 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
27146 | # but without wasting forks for bash or zsh. | |
27147 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
27148 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
27149 | as_echo='print -r --' | |
27150 | as_echo_n='print -rn --' | |
27151 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
27152 | as_echo='printf %s\n' | |
27153 | as_echo_n='printf %s' | |
27154 | else | |
27155 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
27156 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
27157 | as_echo_n='/usr/ucb/echo -n' | |
27158 | else | |
27159 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
27160 | as_echo_n_body='eval | |
27161 | arg=$1; | |
27162 | case $arg in #( | |
27163 | *"$as_nl"*) | |
27164 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
27165 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
27166 | esac; | |
27167 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
27168 | ' | |
27169 | export as_echo_n_body | |
27170 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
27171 | fi | |
27172 | export as_echo_body | |
27173 | as_echo='sh -c $as_echo_body as_echo' | |
27174 | fi | |
27175 | ||
27176 | # The user is always right. | |
27177 | if test "${PATH_SEPARATOR+set}" != set; then | |
27178 | PATH_SEPARATOR=: | |
27179 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
27180 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
27181 | PATH_SEPARATOR=';' | |
27182 | } | |
27183 | fi | |
27184 | ||
27185 | ||
27186 | # IFS | |
27187 | # We need space, tab and new line, in precisely that order. Quoting is | |
27188 | # there to prevent editors from complaining about space-tab. | |
27189 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
27190 | # splitting by setting IFS to empty value.) | |
27191 | IFS=" "" $as_nl" | |
27192 | ||
27193 | # Find who we are. Look in the path if we contain no directory separator. | |
27194 | case $0 in #(( | |
27195 | *[\\/]* ) as_myself=$0 ;; | |
27196 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
27197 | for as_dir in $PATH | |
27198 | do | |
27199 | IFS=$as_save_IFS | |
27200 | test -z "$as_dir" && as_dir=. | |
27201 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
27202 | done | |
27203 | IFS=$as_save_IFS | |
27204 | ||
27205 | ;; | |
27206 | esac | |
27207 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
27208 | # in which case we are not to be found in the path. | |
27209 | if test "x$as_myself" = x; then | |
27210 | as_myself=$0 | |
27211 | fi | |
27212 | if test ! -f "$as_myself"; then | |
27213 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
27214 | exit 1 | |
27215 | fi | |
27216 | ||
27217 | # Unset variables that we do not need and which cause bugs (e.g. in | |
27218 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
27219 | # suppresses any "Segmentation fault" message there. '((' could | |
27220 | # trigger a bug in pdksh 5.2.14. | |
27221 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
27222 | do eval test x\${$as_var+set} = xset \ | |
27223 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
27224 | done | |
27225 | PS1='$ ' | |
27226 | PS2='> ' | |
27227 | PS4='+ ' | |
27228 | ||
27229 | # NLS nuisances. | |
27230 | LC_ALL=C | |
27231 | export LC_ALL | |
27232 | LANGUAGE=C | |
27233 | export LANGUAGE | |
27234 | ||
27235 | # CDPATH. | |
27236 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
27237 | ||
27238 | ||
a9bec17c GM |
27239 | # as_fn_error ERROR [LINENO LOG_FD] |
27240 | # --------------------------------- | |
067d23c9 KY |
27241 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
27242 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
a9bec17c | 27243 | # script with status $?, using 1 if that was 0. |
067d23c9 KY |
27244 | as_fn_error () |
27245 | { | |
a9bec17c GM |
27246 | as_status=$?; test $as_status -eq 0 && as_status=1 |
27247 | if test "$3"; then | |
27248 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
27249 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
067d23c9 | 27250 | fi |
a9bec17c | 27251 | $as_echo "$as_me: error: $1" >&2 |
067d23c9 KY |
27252 | as_fn_exit $as_status |
27253 | } # as_fn_error | |
27254 | ||
27255 | ||
27256 | # as_fn_set_status STATUS | |
27257 | # ----------------------- | |
27258 | # Set $? to STATUS, without forking. | |
27259 | as_fn_set_status () | |
27260 | { | |
27261 | return $1 | |
27262 | } # as_fn_set_status | |
27263 | ||
27264 | # as_fn_exit STATUS | |
27265 | # ----------------- | |
27266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
27267 | as_fn_exit () | |
27268 | { | |
27269 | set +e | |
27270 | as_fn_set_status $1 | |
27271 | exit $1 | |
27272 | } # as_fn_exit | |
27273 | ||
27274 | # as_fn_unset VAR | |
27275 | # --------------- | |
27276 | # Portably unset VAR. | |
27277 | as_fn_unset () | |
27278 | { | |
27279 | { eval $1=; unset $1;} | |
27280 | } | |
27281 | as_unset=as_fn_unset | |
27282 | # as_fn_append VAR VALUE | |
27283 | # ---------------------- | |
27284 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
27285 | # advantage of any shell optimizations that allow amortized linear growth over | |
27286 | # repeated appends, instead of the typical quadratic growth present in naive | |
27287 | # implementations. | |
27288 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
27289 | eval 'as_fn_append () | |
27290 | { | |
27291 | eval $1+=\$2 | |
27292 | }' | |
27293 | else | |
27294 | as_fn_append () | |
27295 | { | |
27296 | eval $1=\$$1\$2 | |
27297 | } | |
27298 | fi # as_fn_append | |
27299 | ||
27300 | # as_fn_arith ARG... | |
27301 | # ------------------ | |
27302 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
27303 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
27304 | # must be portable across $(()) and expr. | |
27305 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
27306 | eval 'as_fn_arith () | |
27307 | { | |
27308 | as_val=$(( $* )) | |
27309 | }' | |
27310 | else | |
27311 | as_fn_arith () | |
27312 | { | |
27313 | as_val=`expr "$@" || test $? -eq 1` | |
27314 | } | |
27315 | fi # as_fn_arith | |
27316 | ||
27317 | ||
27318 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
27319 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
27320 | as_expr=expr | |
27321 | else | |
27322 | as_expr=false | |
27323 | fi | |
27324 | ||
27325 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
27326 | as_basename=basename | |
27327 | else | |
27328 | as_basename=false | |
27329 | fi | |
27330 | ||
27331 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
27332 | as_dirname=dirname | |
27333 | else | |
27334 | as_dirname=false | |
27335 | fi | |
27336 | ||
27337 | as_me=`$as_basename -- "$0" || | |
27338 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
27339 | X"$0" : 'X\(//\)$' \| \ | |
27340 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
27341 | $as_echo X/"$0" | | |
27342 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
27343 | s//\1/ | |
27344 | q | |
27345 | } | |
27346 | /^X\/\(\/\/\)$/{ | |
27347 | s//\1/ | |
27348 | q | |
27349 | } | |
27350 | /^X\/\(\/\).*/{ | |
27351 | s//\1/ | |
27352 | q | |
27353 | } | |
27354 | s/.*/./; q'` | |
27355 | ||
27356 | # Avoid depending upon Character Ranges. | |
27357 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
27358 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
27359 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
27360 | as_cr_digits='0123456789' | |
27361 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
27362 | ||
27363 | ECHO_C= ECHO_N= ECHO_T= | |
27364 | case `echo -n x` in #((((( | |
27365 | -n*) | |
27366 | case `echo 'xy\c'` in | |
27367 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
27368 | xy) ECHO_C='\c';; | |
27369 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
27370 | ECHO_T=' ';; | |
27371 | esac;; | |
27372 | *) | |
27373 | ECHO_N='-n';; | |
27374 | esac | |
27375 | ||
27376 | rm -f conf$$ conf$$.exe conf$$.file | |
27377 | if test -d conf$$.dir; then | |
27378 | rm -f conf$$.dir/conf$$.file | |
27379 | else | |
27380 | rm -f conf$$.dir | |
27381 | mkdir conf$$.dir 2>/dev/null | |
27382 | fi | |
27383 | if (echo >conf$$.file) 2>/dev/null; then | |
27384 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
27385 | as_ln_s='ln -s' | |
27386 | # ... but there are two gotchas: | |
27387 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
27388 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
27389 | # In both cases, we have to default to `cp -p'. | |
27390 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
27391 | as_ln_s='cp -p' | |
27392 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
27393 | as_ln_s=ln | |
27394 | else | |
27395 | as_ln_s='cp -p' | |
27396 | fi | |
27397 | else | |
27398 | as_ln_s='cp -p' | |
27399 | fi | |
27400 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
27401 | rmdir conf$$.dir 2>/dev/null | |
27402 | ||
27403 | ||
27404 | # as_fn_mkdir_p | |
27405 | # ------------- | |
27406 | # Create "$as_dir" as a directory, including parents if necessary. | |
27407 | as_fn_mkdir_p () | |
27408 | { | |
27409 | ||
27410 | case $as_dir in #( | |
27411 | -*) as_dir=./$as_dir;; | |
27412 | esac | |
27413 | test -d "$as_dir" || eval $as_mkdir_p || { | |
27414 | as_dirs= | |
27415 | while :; do | |
27416 | case $as_dir in #( | |
27417 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
27418 | *) as_qdir=$as_dir;; | |
27419 | esac | |
27420 | as_dirs="'$as_qdir' $as_dirs" | |
27421 | as_dir=`$as_dirname -- "$as_dir" || | |
27422 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
27423 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
27424 | X"$as_dir" : 'X\(//\)$' \| \ | |
27425 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
27426 | $as_echo X"$as_dir" | | |
27427 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
27428 | s//\1/ | |
27429 | q | |
27430 | } | |
27431 | /^X\(\/\/\)[^/].*/{ | |
27432 | s//\1/ | |
27433 | q | |
27434 | } | |
27435 | /^X\(\/\/\)$/{ | |
27436 | s//\1/ | |
27437 | q | |
27438 | } | |
27439 | /^X\(\/\).*/{ | |
27440 | s//\1/ | |
27441 | q | |
27442 | } | |
27443 | s/.*/./; q'` | |
27444 | test -d "$as_dir" && break | |
27445 | done | |
27446 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
a9bec17c | 27447 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" |
067d23c9 KY |
27448 | |
27449 | ||
27450 | } # as_fn_mkdir_p | |
27451 | if mkdir -p . 2>/dev/null; then | |
27452 | as_mkdir_p='mkdir -p "$as_dir"' | |
27453 | else | |
27454 | test -d ./-p && rmdir ./-p | |
27455 | as_mkdir_p=false | |
27456 | fi | |
27457 | ||
27458 | if test -x / >/dev/null 2>&1; then | |
27459 | as_test_x='test -x' | |
27460 | else | |
27461 | if ls -dL / >/dev/null 2>&1; then | |
27462 | as_ls_L_option=L | |
27463 | else | |
27464 | as_ls_L_option= | |
27465 | fi | |
27466 | as_test_x=' | |
27467 | eval sh -c '\'' | |
27468 | if test -d "$1"; then | |
27469 | test -d "$1/."; | |
27470 | else | |
27471 | case $1 in #( | |
27472 | -*)set "./$1";; | |
27473 | esac; | |
27474 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
27475 | ???[sx]*):;;*)false;;esac;fi | |
27476 | '\'' sh | |
27477 | ' | |
27478 | fi | |
27479 | as_executable_p=$as_test_x | |
27480 | ||
27481 | # Sed expression to map a string onto a valid CPP name. | |
27482 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
27483 | ||
27484 | # Sed expression to map a string onto a valid variable name. | |
27485 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
27486 | ||
27487 | ||
27488 | exec 6>&1 | |
27489 | ## ----------------------------------- ## | |
27490 | ## Main body of $CONFIG_STATUS script. ## | |
27491 | ## ----------------------------------- ## | |
27492 | _ASEOF | |
27493 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
27494 | ||
27495 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27496 | # Save the log message, to keep $0 and so on meaningful, and to | |
27497 | # report actual input values of CONFIG_FILES etc. instead of their | |
27498 | # values after options handling. | |
27499 | ac_log=" | |
c574bc34 | 27500 | This file was extended by emacs $as_me 24.3.50, which was |
a9bec17c | 27501 | generated by GNU Autoconf 2.65. Invocation command line was |
067d23c9 KY |
27502 | |
27503 | CONFIG_FILES = $CONFIG_FILES | |
27504 | CONFIG_HEADERS = $CONFIG_HEADERS | |
27505 | CONFIG_LINKS = $CONFIG_LINKS | |
27506 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
27507 | $ $0 $@ | |
27508 | ||
27509 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
27510 | " | |
27511 | ||
27512 | _ACEOF | |
27513 | ||
27514 | case $ac_config_files in *" | |
27515 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
27516 | esac | |
27517 | ||
27518 | case $ac_config_headers in *" | |
27519 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
27520 | esac | |
27521 | ||
27522 | ||
27523 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27524 | # Files that config.status was made for. | |
27525 | config_files="$ac_config_files" | |
27526 | config_headers="$ac_config_headers" | |
27527 | config_commands="$ac_config_commands" | |
27528 | ||
27529 | _ACEOF | |
27530 | ||
27531 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27532 | ac_cs_usage="\ | |
27533 | \`$as_me' instantiates files and other configuration actions | |
27534 | from templates according to the current configuration. Unless the files | |
27535 | and actions are specified as TAGs, all are instantiated by default. | |
27536 | ||
27537 | Usage: $0 [OPTION]... [TAG]... | |
27538 | ||
27539 | -h, --help print this help, then exit | |
27540 | -V, --version print version number and configuration settings, then exit | |
27541 | --config print configuration, then exit | |
27542 | -q, --quiet, --silent | |
27543 | do not print progress messages | |
27544 | -d, --debug don't remove temporary files | |
27545 | --recheck update $as_me by reconfiguring in the same conditions | |
27546 | --file=FILE[:TEMPLATE] | |
27547 | instantiate the configuration file FILE | |
27548 | --header=FILE[:TEMPLATE] | |
27549 | instantiate the configuration header FILE | |
27550 | ||
27551 | Configuration files: | |
27552 | $config_files | |
27553 | ||
27554 | Configuration headers: | |
27555 | $config_headers | |
27556 | ||
27557 | Configuration commands: | |
27558 | $config_commands | |
27559 | ||
27560 | Report bugs to the package provider." | |
27561 | ||
27562 | _ACEOF | |
27563 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27564 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
27565 | ac_cs_version="\\ | |
c574bc34 | 27566 | emacs config.status 24.3.50 |
a9bec17c | 27567 | configured by $0, generated by GNU Autoconf 2.65, |
067d23c9 KY |
27568 | with options \\"\$ac_cs_config\\" |
27569 | ||
a9bec17c | 27570 | Copyright (C) 2009 Free Software Foundation, Inc. |
067d23c9 KY |
27571 | This config.status script is free software; the Free Software Foundation |
27572 | gives unlimited permission to copy, distribute and modify it." | |
27573 | ||
27574 | ac_pwd='$ac_pwd' | |
27575 | srcdir='$srcdir' | |
27576 | INSTALL='$INSTALL' | |
743c80a7 PE |
27577 | MKDIR_P='$MKDIR_P' |
27578 | AWK='$AWK' | |
067d23c9 KY |
27579 | test -n "\$AWK" || AWK=awk |
27580 | _ACEOF | |
27581 | ||
27582 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27583 | # The default lists apply if the user does not specify any file. | |
27584 | ac_need_defaults=: | |
27585 | while test $# != 0 | |
27586 | do | |
27587 | case $1 in | |
a9bec17c | 27588 | --*=*) |
067d23c9 KY |
27589 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
27590 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
27591 | ac_shift=: | |
27592 | ;; | |
27593 | *) | |
27594 | ac_option=$1 | |
27595 | ac_optarg=$2 | |
27596 | ac_shift=shift | |
27597 | ;; | |
27598 | esac | |
27599 | ||
27600 | case $ac_option in | |
27601 | # Handling of the options. | |
27602 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
27603 | ac_cs_recheck=: ;; | |
27604 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
27605 | $as_echo "$ac_cs_version"; exit ;; | |
27606 | --config | --confi | --conf | --con | --co | --c ) | |
27607 | $as_echo "$ac_cs_config"; exit ;; | |
27608 | --debug | --debu | --deb | --de | --d | -d ) | |
27609 | debug=: ;; | |
27610 | --file | --fil | --fi | --f ) | |
27611 | $ac_shift | |
27612 | case $ac_optarg in | |
27613 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
27614 | esac | |
27615 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
27616 | ac_need_defaults=false;; | |
27617 | --header | --heade | --head | --hea ) | |
27618 | $ac_shift | |
27619 | case $ac_optarg in | |
27620 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
27621 | esac | |
27622 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
27623 | ac_need_defaults=false;; | |
27624 | --he | --h) | |
27625 | # Conflict between --help and --header | |
a9bec17c | 27626 | as_fn_error "ambiguous option: \`$1' |
067d23c9 KY |
27627 | Try \`$0 --help' for more information.";; |
27628 | --help | --hel | -h ) | |
27629 | $as_echo "$ac_cs_usage"; exit ;; | |
27630 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
27631 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
27632 | ac_cs_silent=: ;; | |
27633 | ||
27634 | # This is an error. | |
a9bec17c | 27635 | -*) as_fn_error "unrecognized option: \`$1' |
067d23c9 KY |
27636 | Try \`$0 --help' for more information." ;; |
27637 | ||
27638 | *) as_fn_append ac_config_targets " $1" | |
27639 | ac_need_defaults=false ;; | |
27640 | ||
27641 | esac | |
27642 | shift | |
27643 | done | |
27644 | ||
27645 | ac_configure_extra_args= | |
27646 | ||
27647 | if $ac_cs_silent; then | |
27648 | exec 6>/dev/null | |
27649 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
27650 | fi | |
27651 | ||
27652 | _ACEOF | |
27653 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27654 | if \$ac_cs_recheck; then | |
27655 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
27656 | shift | |
27657 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
27658 | CONFIG_SHELL='$SHELL' | |
27659 | export CONFIG_SHELL | |
27660 | exec "\$@" | |
27661 | fi | |
27662 | ||
27663 | _ACEOF | |
27664 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27665 | exec 5>>config.log | |
27666 | { | |
27667 | echo | |
27668 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
27669 | ## Running $as_me. ## | |
27670 | _ASBOX | |
27671 | $as_echo "$ac_log" | |
27672 | } >&5 | |
27673 | ||
27674 | _ACEOF | |
27675 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27676 | # | |
27677 | # INIT-COMMANDS | |
27678 | # | |
743c80a7 | 27679 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
5ec54608 | 27680 | GCC="$GCC" CPPFLAGS="$CPPFLAGS" |
067d23c9 KY |
27681 | |
27682 | _ACEOF | |
27683 | ||
27684 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27685 | ||
27686 | # Handling of arguments. | |
27687 | for ac_config_target in $ac_config_targets | |
27688 | do | |
27689 | case $ac_config_target in | |
27690 | "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; | |
743c80a7 | 27691 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
bb7dce39 GM |
27692 | "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" ;; |
27693 | "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;; | |
27694 | "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;; | |
27695 | "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 | 27696 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
743c80a7 | 27697 | "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; |
56ade35c GM |
27698 | "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; |
27699 | "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;; | |
27700 | "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;; | |
27701 | "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; | |
27702 | "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; | |
27703 | "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; | |
27704 | "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; | |
27705 | "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; | |
27706 | "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; | |
27707 | "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; | |
bb7dce39 | 27708 | "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;; |
56ade35c | 27709 | "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; |
40b65096 | 27710 | "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; |
9411886d PE |
27711 | "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; |
27712 | "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; | |
27713 | "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; | |
067d23c9 | 27714 | |
a9bec17c | 27715 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
067d23c9 KY |
27716 | esac |
27717 | done | |
27718 | ||
27719 | ||
27720 | # If the user did not use the arguments to specify the items to instantiate, | |
27721 | # then the envvar interface is used. Set only those that are not. | |
27722 | # We use the long form for the default assignment because of an extremely | |
27723 | # bizarre bug on SunOS 4.1.3. | |
27724 | if $ac_need_defaults; then | |
27725 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
27726 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
27727 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
27728 | fi | |
27729 | ||
27730 | # Have a temporary directory for convenience. Make it in the build tree | |
27731 | # simply because there is no reason against having it here, and in addition, | |
27732 | # creating and moving files from /tmp can sometimes cause problems. | |
27733 | # Hook for its removal unless debugging. | |
27734 | # Note that there is a small window in which the directory will not be cleaned: | |
27735 | # after its creation but before its name has been assigned to `$tmp'. | |
27736 | $debug || | |
27737 | { | |
a9bec17c | 27738 | tmp= |
067d23c9 | 27739 | trap 'exit_status=$? |
a9bec17c | 27740 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status |
067d23c9 KY |
27741 | ' 0 |
27742 | trap 'as_fn_exit 1' 1 2 13 15 | |
27743 | } | |
27744 | # Create a (secure) tmp directory for tmp files. | |
27745 | ||
27746 | { | |
27747 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
a9bec17c | 27748 | test -n "$tmp" && test -d "$tmp" |
067d23c9 KY |
27749 | } || |
27750 | { | |
27751 | tmp=./conf$$-$RANDOM | |
27752 | (umask 077 && mkdir "$tmp") | |
a9bec17c | 27753 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 |
067d23c9 KY |
27754 | |
27755 | # Set up the scripts for CONFIG_FILES section. | |
27756 | # No need to generate them if there are no CONFIG_FILES. | |
27757 | # This happens for instance with `./config.status config.h'. | |
27758 | if test -n "$CONFIG_FILES"; then | |
27759 | ||
27760 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
27761 | ac_cs_awk_getline=: | |
27762 | ac_cs_awk_pipe_init= | |
27763 | ac_cs_awk_read_file=' | |
27764 | while ((getline aline < (F[key])) > 0) | |
27765 | print(aline) | |
27766 | close(F[key])' | |
27767 | ac_cs_awk_pipe_fini= | |
27768 | else | |
27769 | ac_cs_awk_getline=false | |
27770 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
27771 | ac_cs_awk_read_file=' | |
27772 | print "|#_!!_#|" | |
27773 | print "cat " F[key] " &&" | |
27774 | '$ac_cs_awk_pipe_init | |
27775 | # The final `:' finishes the AND list. | |
27776 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
27777 | fi | |
27778 | ac_cr=`echo X | tr X '\015'` | |
27779 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
27780 | # But we know of no other shell where ac_cr would be empty at this | |
27781 | # point, so we can use a bashism as a fallback. | |
27782 | if test "x$ac_cr" = x; then | |
27783 | eval ac_cr=\$\'\\r\' | |
27784 | fi | |
27785 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
27786 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
a9bec17c | 27787 | ac_cs_awk_cr='\r' |
067d23c9 KY |
27788 | else |
27789 | ac_cs_awk_cr=$ac_cr | |
27790 | fi | |
27791 | ||
a9bec17c | 27792 | echo 'BEGIN {' >"$tmp/subs1.awk" && |
067d23c9 KY |
27793 | _ACEOF |
27794 | ||
27795 | # Create commands to substitute file output variables. | |
27796 | { | |
27797 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
a9bec17c | 27798 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && |
067d23c9 KY |
27799 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
27800 | echo "_ACAWK" && | |
27801 | echo "_ACEOF" | |
27802 | } >conf$$files.sh && | |
27803 | . ./conf$$files.sh || | |
a9bec17c | 27804 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
27805 | rm -f conf$$files.sh |
27806 | ||
27807 | { | |
27808 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
27809 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
27810 | echo "_ACEOF" | |
27811 | } >conf$$subs.sh || | |
a9bec17c GM |
27812 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
27813 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
067d23c9 KY |
27814 | ac_delim='%!_!# ' |
27815 | for ac_last_try in false false false false false :; do | |
27816 | . ./conf$$subs.sh || | |
a9bec17c | 27817 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
27818 | |
27819 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
27820 | if test $ac_delim_n = $ac_delim_num; then | |
27821 | break | |
27822 | elif $ac_last_try; then | |
a9bec17c | 27823 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
27824 | else |
27825 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
27826 | fi | |
27827 | done | |
27828 | rm -f conf$$subs.sh | |
27829 | ||
27830 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
a9bec17c | 27831 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && |
067d23c9 KY |
27832 | _ACEOF |
27833 | sed -n ' | |
27834 | h | |
27835 | s/^/S["/; s/!.*/"]=/ | |
27836 | p | |
27837 | g | |
27838 | s/^[^!]*!// | |
27839 | :repl | |
27840 | t repl | |
27841 | s/'"$ac_delim"'$// | |
27842 | t delim | |
27843 | :nl | |
27844 | h | |
27845 | s/\(.\{148\}\)..*/\1/ | |
27846 | t more1 | |
27847 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
27848 | p | |
27849 | n | |
27850 | b repl | |
27851 | :more1 | |
27852 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
27853 | p | |
27854 | g | |
27855 | s/.\{148\}// | |
27856 | t nl | |
27857 | :delim | |
27858 | h | |
27859 | s/\(.\{148\}\)..*/\1/ | |
27860 | t more2 | |
27861 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
27862 | p | |
27863 | b | |
27864 | :more2 | |
27865 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
27866 | p | |
27867 | g | |
27868 | s/.\{148\}// | |
27869 | t delim | |
27870 | ' <conf$$subs.awk | sed ' | |
27871 | /^[^""]/{ | |
27872 | N | |
27873 | s/\n// | |
27874 | } | |
27875 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
27876 | rm -f conf$$subs.awk | |
27877 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
27878 | _ACAWK | |
a9bec17c | 27879 | cat >>"\$tmp/subs1.awk" <<_ACAWK && |
067d23c9 KY |
27880 | for (key in S) S_is_set[key] = 1 |
27881 | FS = "\a" | |
27882 | \$ac_cs_awk_pipe_init | |
27883 | } | |
27884 | { | |
27885 | line = $ 0 | |
27886 | nfields = split(line, field, "@") | |
27887 | substed = 0 | |
27888 | len = length(field[1]) | |
27889 | for (i = 2; i < nfields; i++) { | |
27890 | key = field[i] | |
27891 | keylen = length(key) | |
27892 | if (S_is_set[key]) { | |
27893 | value = S[key] | |
27894 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
27895 | len += length(value) + length(field[++i]) | |
27896 | substed = 1 | |
27897 | } else | |
27898 | len += 1 + keylen | |
27899 | } | |
27900 | if (nfields == 3 && !substed) { | |
27901 | key = field[2] | |
27902 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
27903 | \$ac_cs_awk_read_file | |
27904 | next | |
27905 | } | |
27906 | } | |
27907 | print line | |
27908 | } | |
27909 | \$ac_cs_awk_pipe_fini | |
27910 | _ACAWK | |
27911 | _ACEOF | |
27912 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27913 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
27914 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
27915 | else | |
27916 | cat | |
a9bec17c GM |
27917 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ |
27918 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
067d23c9 KY |
27919 | _ACEOF |
27920 | ||
a9bec17c GM |
27921 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
27922 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
067d23c9 KY |
27923 | # trailing colons and then remove the whole line if VPATH becomes empty |
27924 | # (actually we leave an empty line to preserve line numbers). | |
27925 | if test "x$srcdir" = x.; then | |
a9bec17c GM |
27926 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
27927 | s/:*\$(srcdir):*/:/ | |
27928 | s/:*\${srcdir}:*/:/ | |
27929 | s/:*@srcdir@:*/:/ | |
27930 | s/^\([^=]*=[ ]*\):*/\1/ | |
067d23c9 KY |
27931 | s/:*$// |
27932 | s/^[^=]*=[ ]*$// | |
27933 | }' | |
27934 | fi | |
27935 | ||
27936 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
27937 | fi # test -n "$CONFIG_FILES" | |
27938 | ||
27939 | # Set up the scripts for CONFIG_HEADERS section. | |
27940 | # No need to generate them if there are no CONFIG_HEADERS. | |
27941 | # This happens for instance with `./config.status Makefile'. | |
27942 | if test -n "$CONFIG_HEADERS"; then | |
a9bec17c | 27943 | cat >"$tmp/defines.awk" <<\_ACAWK || |
067d23c9 KY |
27944 | BEGIN { |
27945 | _ACEOF | |
27946 | ||
27947 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
27948 | # here-document in config.status, that substitutes the proper values into | |
27949 | # config.h.in to produce config.h. | |
27950 | ||
27951 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
27952 | # handling of long lines. | |
27953 | ac_delim='%!_!# ' | |
27954 | for ac_last_try in false false :; do | |
a9bec17c GM |
27955 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` |
27956 | if test -z "$ac_t"; then | |
067d23c9 KY |
27957 | break |
27958 | elif $ac_last_try; then | |
a9bec17c | 27959 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 |
067d23c9 KY |
27960 | else |
27961 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
27962 | fi | |
27963 | done | |
27964 | ||
27965 | # For the awk script, D is an array of macro values keyed by name, | |
27966 | # likewise P contains macro parameters if any. Preserve backslash | |
27967 | # newline sequences. | |
27968 | ||
27969 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
27970 | sed -n ' | |
27971 | s/.\{148\}/&'"$ac_delim"'/g | |
27972 | t rset | |
27973 | :rset | |
27974 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
27975 | t def | |
27976 | d | |
27977 | :def | |
27978 | s/\\$// | |
27979 | t bsnl | |
27980 | s/["\\]/\\&/g | |
27981 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
27982 | D["\1"]=" \3"/p | |
27983 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
27984 | d | |
27985 | :bsnl | |
27986 | s/["\\]/\\&/g | |
27987 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
27988 | D["\1"]=" \3\\\\\\n"\\/p | |
27989 | t cont | |
27990 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
27991 | t cont | |
27992 | d | |
27993 | :cont | |
27994 | n | |
27995 | s/.\{148\}/&'"$ac_delim"'/g | |
27996 | t clear | |
27997 | :clear | |
27998 | s/\\$// | |
27999 | t bsnlc | |
28000 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
28001 | d | |
28002 | :bsnlc | |
28003 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
28004 | b cont | |
28005 | ' <confdefs.h | sed ' | |
28006 | s/'"$ac_delim"'/"\\\ | |
28007 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
28008 | ||
28009 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
28010 | for (key in D) D_is_set[key] = 1 | |
28011 | FS = "\a" | |
28012 | } | |
28013 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
28014 | line = \$ 0 | |
28015 | split(line, arg, " ") | |
28016 | if (arg[1] == "#") { | |
28017 | defundef = arg[2] | |
28018 | mac1 = arg[3] | |
28019 | } else { | |
28020 | defundef = substr(arg[1], 2) | |
28021 | mac1 = arg[2] | |
28022 | } | |
28023 | split(mac1, mac2, "(") #) | |
28024 | macro = mac2[1] | |
28025 | prefix = substr(line, 1, index(line, defundef) - 1) | |
28026 | if (D_is_set[macro]) { | |
28027 | # Preserve the white space surrounding the "#". | |
28028 | print prefix "define", macro P[macro] D[macro] | |
28029 | next | |
28030 | } else { | |
28031 | # Replace #undef with comments. This is necessary, for example, | |
28032 | # in the case of _POSIX_SOURCE, which is predefined and required | |
28033 | # on some systems where configure will not decide to define it. | |
28034 | if (defundef == "undef") { | |
28035 | print "/*", prefix defundef, macro, "*/" | |
28036 | next | |
28037 | } | |
28038 | } | |
28039 | } | |
28040 | { print } | |
28041 | _ACAWK | |
28042 | _ACEOF | |
28043 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
a9bec17c | 28044 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 |
067d23c9 KY |
28045 | fi # test -n "$CONFIG_HEADERS" |
28046 | ||
28047 | ||
28048 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
28049 | shift | |
28050 | for ac_tag | |
28051 | do | |
28052 | case $ac_tag in | |
28053 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
28054 | esac | |
28055 | case $ac_mode$ac_tag in | |
28056 | :[FHL]*:*);; | |
a9bec17c | 28057 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; |
067d23c9 KY |
28058 | :[FH]-) ac_tag=-:-;; |
28059 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
28060 | esac | |
28061 | ac_save_IFS=$IFS | |
28062 | IFS=: | |
28063 | set x $ac_tag | |
28064 | IFS=$ac_save_IFS | |
28065 | shift | |
28066 | ac_file=$1 | |
28067 | shift | |
28068 | ||
28069 | case $ac_mode in | |
28070 | :L) ac_source=$1;; | |
28071 | :[FH]) | |
28072 | ac_file_inputs= | |
28073 | for ac_f | |
28074 | do | |
28075 | case $ac_f in | |
a9bec17c | 28076 | -) ac_f="$tmp/stdin";; |
067d23c9 KY |
28077 | *) # Look for the file first in the build tree, then in the source tree |
28078 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
28079 | # because $ac_f cannot contain `:'. | |
28080 | test -f "$ac_f" || | |
28081 | case $ac_f in | |
28082 | [\\/$]*) false;; | |
28083 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
28084 | esac || | |
a9bec17c | 28085 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
067d23c9 KY |
28086 | esac |
28087 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
28088 | as_fn_append ac_file_inputs " '$ac_f'" | |
28089 | done | |
28090 | ||
28091 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
28092 | # use $as_me), people would be surprised to read: | |
28093 | # /* config.h. Generated by config.status. */ | |
28094 | configure_input='Generated from '` | |
28095 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
28096 | `' by configure.' | |
28097 | if test x"$ac_file" != x-; then | |
28098 | configure_input="$ac_file. $configure_input" | |
28099 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
28100 | $as_echo "$as_me: creating $ac_file" >&6;} | |
28101 | fi | |
28102 | # Neutralize special characters interpreted by sed in replacement strings. | |
28103 | case $configure_input in #( | |
28104 | *\&* | *\|* | *\\* ) | |
28105 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
28106 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
28107 | *) ac_sed_conf_input=$configure_input;; | |
28108 | esac | |
28109 | ||
28110 | case $ac_tag in | |
a9bec17c GM |
28111 | *:-:* | *:-) cat >"$tmp/stdin" \ |
28112 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
067d23c9 KY |
28113 | esac |
28114 | ;; | |
28115 | esac | |
28116 | ||
28117 | ac_dir=`$as_dirname -- "$ac_file" || | |
28118 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
28119 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
28120 | X"$ac_file" : 'X\(//\)$' \| \ | |
28121 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
28122 | $as_echo X"$ac_file" | | |
28123 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
28124 | s//\1/ | |
28125 | q | |
28126 | } | |
28127 | /^X\(\/\/\)[^/].*/{ | |
28128 | s//\1/ | |
28129 | q | |
28130 | } | |
28131 | /^X\(\/\/\)$/{ | |
28132 | s//\1/ | |
28133 | q | |
28134 | } | |
28135 | /^X\(\/\).*/{ | |
28136 | s//\1/ | |
28137 | q | |
28138 | } | |
28139 | s/.*/./; q'` | |
28140 | as_dir="$ac_dir"; as_fn_mkdir_p | |
28141 | ac_builddir=. | |
28142 | ||
28143 | case "$ac_dir" in | |
28144 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
28145 | *) | |
28146 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
28147 | # A ".." for each directory in $ac_dir_suffix. | |
28148 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
28149 | case $ac_top_builddir_sub in | |
28150 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
28151 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
28152 | esac ;; | |
28153 | esac | |
28154 | ac_abs_top_builddir=$ac_pwd | |
28155 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
28156 | # for backward compatibility: | |
28157 | ac_top_builddir=$ac_top_build_prefix | |
28158 | ||
28159 | case $srcdir in | |
28160 | .) # We are building in place. | |
28161 | ac_srcdir=. | |
28162 | ac_top_srcdir=$ac_top_builddir_sub | |
28163 | ac_abs_top_srcdir=$ac_pwd ;; | |
28164 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
28165 | ac_srcdir=$srcdir$ac_dir_suffix; | |
28166 | ac_top_srcdir=$srcdir | |
28167 | ac_abs_top_srcdir=$srcdir ;; | |
28168 | *) # Relative name. | |
28169 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
28170 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
28171 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
28172 | esac | |
28173 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
28174 | ||
28175 | ||
28176 | case $ac_mode in | |
28177 | :F) | |
28178 | # | |
28179 | # CONFIG_FILE | |
28180 | # | |
28181 | ||
28182 | case $INSTALL in | |
28183 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
28184 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
28185 | esac | |
743c80a7 PE |
28186 | ac_MKDIR_P=$MKDIR_P |
28187 | case $MKDIR_P in | |
28188 | [\\/$]* | ?:[\\/]* ) ;; | |
28189 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
28190 | esac | |
067d23c9 KY |
28191 | _ACEOF |
28192 | ||
28193 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
28194 | # If the template does not know about datarootdir, expand it. | |
28195 | # FIXME: This hack should be removed a few years after 2.60. | |
28196 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
28197 | ac_sed_dataroot=' | |
28198 | /datarootdir/ { | |
28199 | p | |
28200 | q | |
28201 | } | |
28202 | /@datadir@/p | |
28203 | /@docdir@/p | |
28204 | /@infodir@/p | |
28205 | /@localedir@/p | |
28206 | /@mandir@/p' | |
28207 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
28208 | *datarootdir*) ac_datarootdir_seen=yes;; | |
28209 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
28210 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
28211 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
28212 | _ACEOF | |
28213 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
28214 | ac_datarootdir_hack=' | |
28215 | s&@datadir@&$datadir&g | |
28216 | s&@docdir@&$docdir&g | |
28217 | s&@infodir@&$infodir&g | |
28218 | s&@localedir@&$localedir&g | |
28219 | s&@mandir@&$mandir&g | |
28220 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
28221 | esac | |
28222 | _ACEOF | |
28223 | ||
28224 | # Neutralize VPATH when `$srcdir' = `.'. | |
28225 | # Shell code in configure.ac might set extrasub. | |
28226 | # FIXME: do we really want to maintain this feature? | |
28227 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
28228 | ac_sed_extra="$ac_vpsub | |
28229 | $extrasub | |
28230 | _ACEOF | |
28231 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
28232 | :t | |
28233 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
28234 | s|@configure_input@|$ac_sed_conf_input|;t t | |
28235 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
28236 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
28237 | s&@srcdir@&$ac_srcdir&;t t | |
28238 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
28239 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
28240 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
28241 | s&@builddir@&$ac_builddir&;t t | |
28242 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
28243 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
28244 | s&@INSTALL@&$ac_INSTALL&;t t | |
743c80a7 | 28245 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
067d23c9 KY |
28246 | $ac_datarootdir_hack |
28247 | " | |
28248 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
28249 | if $ac_cs_awk_getline; then | |
a9bec17c | 28250 | $AWK -f "$tmp/subs.awk" |
067d23c9 | 28251 | else |
a9bec17c GM |
28252 | $AWK -f "$tmp/subs.awk" | $SHELL |
28253 | fi >$tmp/out \ | |
28254 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
28255 | |
28256 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
a9bec17c GM |
28257 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && |
28258 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
067d23c9 | 28259 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 28260 | which seems to be undefined. Please make sure it is defined." >&5 |
067d23c9 | 28261 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
a9bec17c | 28262 | which seems to be undefined. Please make sure it is defined." >&2;} |
067d23c9 | 28263 | |
a9bec17c | 28264 | rm -f "$tmp/stdin" |
067d23c9 | 28265 | case $ac_file in |
a9bec17c GM |
28266 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
28267 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
067d23c9 | 28268 | esac \ |
a9bec17c | 28269 | || as_fn_error "could not create $ac_file" "$LINENO" 5 |
067d23c9 KY |
28270 | ;; |
28271 | :H) | |
28272 | # | |
28273 | # CONFIG_HEADER | |
28274 | # | |
28275 | if test x"$ac_file" != x-; then | |
28276 | { | |
28277 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
28278 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" |
28279 | } >"$tmp/config.h" \ | |
28280 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
28281 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
067d23c9 KY |
28282 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
28283 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
28284 | else | |
28285 | rm -f "$ac_file" | |
a9bec17c GM |
28286 | mv "$tmp/config.h" "$ac_file" \ |
28287 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
067d23c9 KY |
28288 | fi |
28289 | else | |
28290 | $as_echo "/* $configure_input */" \ | |
a9bec17c GM |
28291 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ |
28292 | || as_fn_error "could not create -" "$LINENO" 5 | |
067d23c9 | 28293 | fi |
743c80a7 PE |
28294 | # Compute "$ac_file"'s index in $config_headers. |
28295 | _am_arg="$ac_file" | |
28296 | _am_stamp_count=1 | |
28297 | for _am_header in $config_headers :; do | |
28298 | case $_am_header in | |
28299 | $_am_arg | $_am_arg:* ) | |
28300 | break ;; | |
28301 | * ) | |
28302 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
28303 | esac | |
28304 | done | |
28305 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
28306 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
28307 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
28308 | X"$_am_arg" : 'X\(//\)$' \| \ | |
28309 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
28310 | $as_echo X"$_am_arg" | | |
28311 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
28312 | s//\1/ | |
28313 | q | |
28314 | } | |
28315 | /^X\(\/\/\)[^/].*/{ | |
28316 | s//\1/ | |
28317 | q | |
28318 | } | |
28319 | /^X\(\/\/\)$/{ | |
28320 | s//\1/ | |
28321 | q | |
28322 | } | |
28323 | /^X\(\/\).*/{ | |
28324 | s//\1/ | |
28325 | q | |
28326 | } | |
28327 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
067d23c9 KY |
28328 | ;; |
28329 | ||
28330 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
28331 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
28332 | ;; | |
28333 | esac | |
28334 | ||
28335 | ||
28336 | case $ac_file$ac_mode in | |
743c80a7 PE |
28337 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { |
28338 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
28339 | # are listed without --file. Let's play safe and only enable the eval | |
28340 | # if we detect the quoting. | |
28341 | case $CONFIG_FILES in | |
28342 | *\'*) eval set x "$CONFIG_FILES" ;; | |
28343 | *) set x $CONFIG_FILES ;; | |
28344 | esac | |
28345 | shift | |
28346 | for mf | |
28347 | do | |
28348 | # Strip MF so we end up with the name of the file. | |
28349 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
28350 | # Check whether this is an Automake generated Makefile or not. | |
28351 | # We used to match only the files named `Makefile.in', but | |
28352 | # some people rename them; so instead we look at the file content. | |
28353 | # Grep'ing the first line is not enough: some people post-process | |
28354 | # each Makefile.in and add a new line on top of each file to say so. | |
28355 | # Grep'ing the whole file is not good either: AIX grep has a line | |
28356 | # limit of 2048, but all sed's we know have understand at least 4000. | |
28357 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
28358 | dirpart=`$as_dirname -- "$mf" || | |
28359 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
28360 | X"$mf" : 'X\(//\)[^/]' \| \ | |
28361 | X"$mf" : 'X\(//\)$' \| \ | |
28362 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || | |
28363 | $as_echo X"$mf" | | |
28364 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
28365 | s//\1/ | |
28366 | q | |
28367 | } | |
28368 | /^X\(\/\/\)[^/].*/{ | |
28369 | s//\1/ | |
28370 | q | |
28371 | } | |
28372 | /^X\(\/\/\)$/{ | |
28373 | s//\1/ | |
28374 | q | |
28375 | } | |
28376 | /^X\(\/\).*/{ | |
28377 | s//\1/ | |
28378 | q | |
28379 | } | |
28380 | s/.*/./; q'` | |
28381 | else | |
28382 | continue | |
28383 | fi | |
28384 | # Extract the definition of DEPDIR, am__include, and am__quote | |
28385 | # from the Makefile without running `make'. | |
28386 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
28387 | test -z "$DEPDIR" && continue | |
28388 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
28389 | test -z "am__include" && continue | |
28390 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
28391 | # When using ansi2knr, U may be empty or an underscore; expand it | |
28392 | U=`sed -n 's/^U = //p' < "$mf"` | |
28393 | # Find all dependency output files, they are included files with | |
28394 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
28395 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
28396 | # expansion. | |
28397 | for file in `sed -n " | |
28398 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
28399 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
28400 | # Make sure the directory exists. | |
28401 | test -f "$dirpart/$file" && continue | |
28402 | fdir=`$as_dirname -- "$file" || | |
28403 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
28404 | X"$file" : 'X\(//\)[^/]' \| \ | |
28405 | X"$file" : 'X\(//\)$' \| \ | |
28406 | X"$file" : 'X\(/\)' \| . 2>/dev/null || | |
28407 | $as_echo X"$file" | | |
28408 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
28409 | s//\1/ | |
28410 | q | |
28411 | } | |
28412 | /^X\(\/\/\)[^/].*/{ | |
28413 | s//\1/ | |
28414 | q | |
28415 | } | |
28416 | /^X\(\/\/\)$/{ | |
28417 | s//\1/ | |
28418 | q | |
28419 | } | |
28420 | /^X\(\/\).*/{ | |
28421 | s//\1/ | |
28422 | q | |
28423 | } | |
28424 | s/.*/./; q'` | |
28425 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
28426 | # echo "creating $dirpart/$file" | |
28427 | echo '# dummy' > "$dirpart/$file" | |
28428 | done | |
28429 | done | |
28430 | } | |
28431 | ;; | |
9411886d | 28432 | "mkdirs":C) |
067d23c9 KY |
28433 | for dir in etc lisp ; do |
28434 | test -d ${dir} || mkdir ${dir} | |
28435 | done | |
9411886d PE |
28436 | ;; |
28437 | "epaths":C) | |
067d23c9 | 28438 | echo creating src/epaths.h |
906debc3 | 28439 | ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force |
9411886d PE |
28440 | ;; |
28441 | "gdbinit":C) | |
b5591ebb | 28442 | if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then |
067d23c9 | 28443 | echo creating src/.gdbinit |
b5591ebb | 28444 | echo "source $srcdir/src/.gdbinit" > src/.gdbinit |
067d23c9 | 28445 | fi |
067d23c9 KY |
28446 | ;; |
28447 | ||
28448 | esac | |
28449 | done # for ac_tag | |
28450 | ||
28451 | ||
28452 | as_fn_exit 0 | |
28453 | _ACEOF | |
28454 | ac_clean_files=$ac_clean_files_save | |
28455 | ||
28456 | test $ac_write_fail = 0 || | |
a9bec17c | 28457 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
067d23c9 KY |
28458 | |
28459 | ||
28460 | # configure is writing to config.log, and then calls config.status. | |
28461 | # config.status does its own redirection, appending to config.log. | |
28462 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
28463 | # by configure, so config.status won't be able to write to it; its | |
28464 | # output is simply discarded. So we exec the FD to /dev/null, | |
28465 | # effectively closing config.log, so it can be properly (re)opened and | |
28466 | # appended to by config.status. When coming back to configure, we | |
28467 | # need to make the FD available again. | |
28468 | if test "$no_create" != yes; then | |
28469 | ac_cs_success=: | |
28470 | ac_config_status_args= | |
28471 | test "$silent" = yes && | |
28472 | ac_config_status_args="$ac_config_status_args --quiet" | |
28473 | exec 5>/dev/null | |
28474 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
28475 | exec 5>>config.log | |
28476 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
28477 | # would make configure fail if this is the last instruction. | |
a9bec17c | 28478 | $ac_cs_success || as_fn_exit $? |
067d23c9 KY |
28479 | fi |
28480 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
28481 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
28482 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
28483 | fi | |
28484 |