Support building Emacs on MS-Windows using the Posix configury.
[bpt/emacs.git] / autogen / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.65 for emacs 24.3.50.
4 #
5 #
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8 # Inc.
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
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
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"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
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
359 # as_fn_error ERROR [LINENO LOG_FD]
360 # ---------------------------------
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
363 # script with status $?, using 1 if that was 0.
364 as_fn_error ()
365 {
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
370 fi
371 $as_echo "$as_me: error: $1" >&2
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.
533 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
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'
552 PACKAGE_VERSION='24.3.50'
553 PACKAGE_STRING='emacs 24.3.50'
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
594 ac_header_list=
595 ac_func_list=
596 gl_getopt_required=POSIX
597 gl_getopt_required=POSIX
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
605 LIBOBJS
606 SUBDIR_MAKEFILES_IN
607 WINDOW_SYSTEM_OBJ
608 LD_SWITCH_SYSTEM_TEMACS
609 LIBGNU_LTLIBDEPS
610 LIBGNU_LIBDEPS
611 gltests_WITNESS
612 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
613 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
614 gl_GNULIB_ENABLED_verify_FALSE
615 gl_GNULIB_ENABLED_verify_TRUE
616 gl_GNULIB_ENABLED_strtoull_FALSE
617 gl_GNULIB_ENABLED_strtoull_TRUE
618 gl_GNULIB_ENABLED_strtoll_FALSE
619 gl_GNULIB_ENABLED_strtoll_TRUE
620 gl_GNULIB_ENABLED_stat_FALSE
621 gl_GNULIB_ENABLED_stat_TRUE
622 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
623 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
624 gl_GNULIB_ENABLED_pathmax_FALSE
625 gl_GNULIB_ENABLED_pathmax_TRUE
626 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
627 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
628 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
629 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
630 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
631 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
632 gl_GNULIB_ENABLED_getgroups_FALSE
633 gl_GNULIB_ENABLED_getgroups_TRUE
634 gl_GNULIB_ENABLED_euidaccess_FALSE
635 gl_GNULIB_ENABLED_euidaccess_TRUE
636 gl_GNULIB_ENABLED_dosname_FALSE
637 gl_GNULIB_ENABLED_dosname_TRUE
638 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
639 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
640 LTLIBINTL
641 LIBINTL
642 LIB_EACCESS
643 WINDOWS_64_BIT_OFF_T
644 HAVE_UNISTD_H
645 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
646 NEXT_UNISTD_H
647 LIB_TIMER_TIME
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
653 WINDOWS_64_BIT_ST_SIZE
654 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
655 NEXT_SYS_STAT_H
656 NEXT_AS_FIRST_DIRECTIVE_STRING_H
657 NEXT_STRING_H
658 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
659 NEXT_STDLIB_H
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
670 REPLACE_STDIO_READ_FUNCS
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
691 REPLACE_FDOPEN
692 REPLACE_FCLOSE
693 REPLACE_DPRINTF
694 HAVE_VDPRINTF
695 HAVE_VASPRINTF
696 HAVE_RENAMEAT
697 HAVE_POPEN
698 HAVE_PCLOSE
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
717 GNULIB_VSCANF
718 GNULIB_VFSCANF
719 GNULIB_VASPRINTF
720 GNULIB_TMPFILE
721 GNULIB_STDIO_H_SIGPIPE
722 GNULIB_STDIO_H_NONBLOCKING
723 GNULIB_SPRINTF_POSIX
724 GNULIB_SNPRINTF
725 GNULIB_SCANF
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
736 GNULIB_PCLOSE
737 GNULIB_OBSTACK_PRINTF_POSIX
738 GNULIB_OBSTACK_PRINTF
739 GNULIB_GETLINE
740 GNULIB_GETDELIM
741 GNULIB_GETCHAR
742 GNULIB_GETC
743 GNULIB_FWRITE
744 GNULIB_FTELLO
745 GNULIB_FTELL
746 GNULIB_FSEEKO
747 GNULIB_FSEEK
748 GNULIB_FSCANF
749 GNULIB_FREOPEN
750 GNULIB_FREAD
751 GNULIB_FPUTS
752 GNULIB_FPUTC
753 GNULIB_FPURGE
754 GNULIB_FPRINTF_POSIX
755 GNULIB_FPRINTF
756 GNULIB_FOPEN
757 GNULIB_FGETS
758 GNULIB_FGETC
759 GNULIB_FFLUSH
760 GNULIB_FDOPEN
761 GNULIB_FCLOSE
762 GNULIB_DPRINTF
763 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
764 NEXT_STDDEF_H
765 GL_GENERATE_STDDEF_H_FALSE
766 GL_GENERATE_STDDEF_H_TRUE
767 STDDEF_H
768 HAVE_WCHAR_T
769 REPLACE_NULL
770 HAVE__BOOL
771 GL_GENERATE_STDBOOL_H_FALSE
772 GL_GENERATE_STDBOOL_H_TRUE
773 STDBOOL_H
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
779 GL_GENERATE_STDALIGN_H_FALSE
780 GL_GENERATE_STDALIGN_H_TRUE
781 STDALIGN_H
782 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
783 NEXT_SIGNAL_H
784 USE_ACL
785 LIB_ACL
786 LIB_PTHREAD_SIGMASK
787 REPLACE_RAISE
788 REPLACE_PTHREAD_SIGMASK
789 HAVE_SIGHANDLER_T
790 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
791 HAVE_STRUCT_SIGACTION_SA_SIGACTION
792 HAVE_SIGACTION
793 HAVE_SIGINFO_T
794 HAVE_SIGSET_T
795 HAVE_RAISE
796 HAVE_PTHREAD_SIGMASK
797 HAVE_POSIX_SIGNALBLOCKING
798 GNULIB_SIGACTION
799 GNULIB_SIGPROCMASK
800 GNULIB_SIGNAL_H_SIGPIPE
801 GNULIB_RAISE
802 GNULIB_PTHREAD_SIGMASK
803 HAVE_SYS_SELECT_H
804 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
805 NEXT_SYS_SELECT_H
806 REPLACE_SELECT
807 REPLACE_PSELECT
808 HAVE_PSELECT
809 GNULIB_SELECT
810 GNULIB_PSELECT
811 REPLACE_TIMEGM
812 REPLACE_NANOSLEEP
813 REPLACE_MKTIME
814 REPLACE_LOCALTIME_R
815 HAVE_TIMEGM
816 HAVE_STRPTIME
817 HAVE_NANOSLEEP
818 HAVE_DECL_LOCALTIME_R
819 GNULIB_TIME_R
820 GNULIB_TIMEGM
821 GNULIB_STRPTIME
822 GNULIB_NANOSLEEP
823 GNULIB_MKTIME
824 UNDEFINE_STRTOK_R
825 REPLACE_STRTOK_R
826 REPLACE_STRSIGNAL
827 REPLACE_STRNLEN
828 REPLACE_STRNDUP
829 REPLACE_STRNCAT
830 REPLACE_STRERROR_R
831 REPLACE_STRERROR
832 REPLACE_STRCHRNUL
833 REPLACE_STRCASESTR
834 REPLACE_STRSTR
835 REPLACE_STRDUP
836 REPLACE_STPNCPY
837 REPLACE_MEMMEM
838 REPLACE_MEMCHR
839 HAVE_STRVERSCMP
840 HAVE_DECL_STRSIGNAL
841 HAVE_DECL_STRERROR_R
842 HAVE_DECL_STRTOK_R
843 HAVE_STRCASESTR
844 HAVE_STRSEP
845 HAVE_STRPBRK
846 HAVE_DECL_STRNLEN
847 HAVE_DECL_STRNDUP
848 HAVE_DECL_STRDUP
849 HAVE_STRCHRNUL
850 HAVE_STPNCPY
851 HAVE_STPCPY
852 HAVE_RAWMEMCHR
853 HAVE_DECL_MEMRCHR
854 HAVE_MEMPCPY
855 HAVE_DECL_MEMMEM
856 HAVE_MEMCHR
857 HAVE_FFSLL
858 HAVE_FFSL
859 HAVE_MBSLEN
860 GNULIB_STRVERSCMP
861 GNULIB_STRSIGNAL
862 GNULIB_STRERROR_R
863 GNULIB_STRERROR
864 GNULIB_MBSTOK_R
865 GNULIB_MBSSEP
866 GNULIB_MBSSPN
867 GNULIB_MBSPBRK
868 GNULIB_MBSCSPN
869 GNULIB_MBSCASESTR
870 GNULIB_MBSPCASECMP
871 GNULIB_MBSNCASECMP
872 GNULIB_MBSCASECMP
873 GNULIB_MBSSTR
874 GNULIB_MBSRCHR
875 GNULIB_MBSCHR
876 GNULIB_MBSNLEN
877 GNULIB_MBSLEN
878 GNULIB_STRTOK_R
879 GNULIB_STRCASESTR
880 GNULIB_STRSTR
881 GNULIB_STRSEP
882 GNULIB_STRPBRK
883 GNULIB_STRNLEN
884 GNULIB_STRNDUP
885 GNULIB_STRNCAT
886 GNULIB_STRDUP
887 GNULIB_STRCHRNUL
888 GNULIB_STPNCPY
889 GNULIB_STPCPY
890 GNULIB_RAWMEMCHR
891 GNULIB_MEMRCHR
892 GNULIB_MEMPCPY
893 GNULIB_MEMMEM
894 GNULIB_MEMCHR
895 GNULIB_FFSLL
896 GNULIB_FFSL
897 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
898 NEXT_INTTYPES_H
899 UINT64_MAX_EQ_ULONG_MAX
900 UINT32_MAX_LT_UINTMAX_MAX
901 PRIPTR_PREFIX
902 PRI_MACROS_BROKEN
903 INT64_MAX_EQ_LONG_MAX
904 INT32_MAX_LT_INTMAX_MAX
905 REPLACE_STRTOIMAX
906 HAVE_DECL_STRTOUMAX
907 HAVE_DECL_STRTOIMAX
908 HAVE_DECL_IMAXDIV
909 HAVE_DECL_IMAXABS
910 GNULIB_STRTOUMAX
911 GNULIB_STRTOIMAX
912 GNULIB_IMAXDIV
913 GNULIB_IMAXABS
914 GL_GENERATE_STDINT_H_FALSE
915 GL_GENERATE_STDINT_H_TRUE
916 STDINT_H
917 WINT_T_SUFFIX
918 WCHAR_T_SUFFIX
919 SIG_ATOMIC_T_SUFFIX
920 SIZE_T_SUFFIX
921 PTRDIFF_T_SUFFIX
922 HAVE_SIGNED_WINT_T
923 HAVE_SIGNED_WCHAR_T
924 HAVE_SIGNED_SIG_ATOMIC_T
925 BITSIZEOF_WINT_T
926 BITSIZEOF_WCHAR_T
927 BITSIZEOF_SIG_ATOMIC_T
928 BITSIZEOF_SIZE_T
929 BITSIZEOF_PTRDIFF_T
930 APPLE_UNIVERSAL_BUILD
931 HAVE_SYS_BITYPES_H
932 HAVE_SYS_INTTYPES_H
933 HAVE_STDINT_H
934 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
935 NEXT_STDINT_H
936 HAVE_SYS_TYPES_H
937 HAVE_INTTYPES_H
938 HAVE_WCHAR_H
939 HAVE_UNSIGNED_LONG_LONG_INT
940 HAVE_LONG_LONG_INT
941 HAVE_WINSOCK2_H
942 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
943 NEXT_SYS_TIME_H
944 REPLACE_STRUCT_TIMEVAL
945 REPLACE_GETTIMEOFDAY
946 HAVE_SYS_TIME_H
947 HAVE_STRUCT_TIMEVAL
948 HAVE_GETTIMEOFDAY
949 GNULIB_GETTIMEOFDAY
950 GNULIB_GL_UNISTD_H_GETOPT
951 GETOPT_H
952 HAVE_GETOPT_H
953 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
954 NEXT_GETOPT_H
955 GETLOADAVG_LIBS
956 REPLACE_WCTOMB
957 REPLACE_UNSETENV
958 REPLACE_STRTOD
959 REPLACE_SETENV
960 REPLACE_REALPATH
961 REPLACE_REALLOC
962 REPLACE_RANDOM_R
963 REPLACE_PUTENV
964 REPLACE_PTSNAME_R
965 REPLACE_PTSNAME
966 REPLACE_MKSTEMP
967 REPLACE_MBTOWC
968 REPLACE_MALLOC
969 REPLACE_CANONICALIZE_FILE_NAME
970 REPLACE_CALLOC
971 HAVE_DECL_UNSETENV
972 HAVE_UNLOCKPT
973 HAVE_SYS_LOADAVG_H
974 HAVE_STRUCT_RANDOM_DATA
975 HAVE_STRTOULL
976 HAVE_STRTOLL
977 HAVE_STRTOD
978 HAVE_DECL_SETENV
979 HAVE_SETENV
980 HAVE_SECURE_GETENV
981 HAVE_RPMATCH
982 HAVE_REALPATH
983 HAVE_RANDOM_R
984 HAVE_RANDOM_H
985 HAVE_RANDOM
986 HAVE_PTSNAME_R
987 HAVE_PTSNAME
988 HAVE_POSIX_OPENPT
989 HAVE_MKSTEMPS
990 HAVE_MKSTEMP
991 HAVE_MKOSTEMPS
992 HAVE_MKOSTEMP
993 HAVE_MKDTEMP
994 HAVE_GRANTPT
995 HAVE_GETSUBOPT
996 HAVE_DECL_GETLOADAVG
997 HAVE_CANONICALIZE_FILE_NAME
998 HAVE_ATOLL
999 HAVE__EXIT
1000 GNULIB_WCTOMB
1001 GNULIB_UNSETENV
1002 GNULIB_UNLOCKPT
1003 GNULIB_SYSTEM_POSIX
1004 GNULIB_STRTOULL
1005 GNULIB_STRTOLL
1006 GNULIB_STRTOD
1007 GNULIB_SETENV
1008 GNULIB_SECURE_GETENV
1009 GNULIB_RPMATCH
1010 GNULIB_REALPATH
1011 GNULIB_REALLOC_POSIX
1012 GNULIB_RANDOM_R
1013 GNULIB_RANDOM
1014 GNULIB_PUTENV
1015 GNULIB_PTSNAME_R
1016 GNULIB_PTSNAME
1017 GNULIB_POSIX_OPENPT
1018 GNULIB_MKSTEMPS
1019 GNULIB_MKSTEMP
1020 GNULIB_MKOSTEMPS
1021 GNULIB_MKOSTEMP
1022 GNULIB_MKDTEMP
1023 GNULIB_MBTOWC
1024 GNULIB_MALLOC_POSIX
1025 GNULIB_GRANTPT
1026 GNULIB_GETSUBOPT
1027 GNULIB_GETLOADAVG
1028 GNULIB_CANONICALIZE_FILE_NAME
1029 GNULIB_CALLOC_POSIX
1030 GNULIB_ATOLL
1031 GNULIB__EXIT
1032 REPLACE_UTIMENSAT
1033 REPLACE_STAT
1034 REPLACE_MKNOD
1035 REPLACE_MKFIFO
1036 REPLACE_MKDIR
1037 REPLACE_LSTAT
1038 REPLACE_FUTIMENS
1039 REPLACE_FSTATAT
1040 REPLACE_FSTAT
1041 HAVE_UTIMENSAT
1042 HAVE_MKNODAT
1043 HAVE_MKNOD
1044 HAVE_MKFIFOAT
1045 HAVE_MKFIFO
1046 HAVE_MKDIRAT
1047 HAVE_LSTAT
1048 HAVE_LCHMOD
1049 HAVE_FUTIMENS
1050 HAVE_FSTATAT
1051 HAVE_FCHMODAT
1052 GNULIB_UTIMENSAT
1053 GNULIB_STAT
1054 GNULIB_MKNODAT
1055 GNULIB_MKNOD
1056 GNULIB_MKFIFOAT
1057 GNULIB_MKFIFO
1058 GNULIB_MKDIRAT
1059 GNULIB_LSTAT
1060 GNULIB_LCHMOD
1061 GNULIB_FUTIMENS
1062 GNULIB_FSTATAT
1063 GNULIB_FSTAT
1064 GNULIB_FCHMODAT
1065 LIB_FDATASYNC
1066 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1067 NEXT_FCNTL_H
1068 REPLACE_OPENAT
1069 REPLACE_OPEN
1070 REPLACE_FCNTL
1071 HAVE_OPENAT
1072 HAVE_FCNTL
1073 GNULIB_OPENAT
1074 GNULIB_OPEN
1075 GNULIB_NONBLOCKING
1076 GNULIB_FCNTL
1077 GL_GENERATE_EXECINFO_H_FALSE
1078 GL_GENERATE_EXECINFO_H_TRUE
1079 LIB_EXECINFO
1080 EXECINFO_H
1081 EOVERFLOW_VALUE
1082 EOVERFLOW_HIDDEN
1083 ENOLINK_VALUE
1084 ENOLINK_HIDDEN
1085 EMULTIHOP_VALUE
1086 EMULTIHOP_HIDDEN
1087 GL_GENERATE_ERRNO_H_FALSE
1088 GL_GENERATE_ERRNO_H_TRUE
1089 ERRNO_H
1090 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1091 NEXT_ERRNO_H
1092 HAVE_DIRENT_H
1093 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1094 NEXT_DIRENT_H
1095 PRAGMA_COLUMNS
1096 PRAGMA_SYSTEM_HEADER
1097 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1098 INCLUDE_NEXT
1099 REPLACE_FDOPENDIR
1100 REPLACE_DIRFD
1101 REPLACE_CLOSEDIR
1102 REPLACE_OPENDIR
1103 HAVE_ALPHASORT
1104 HAVE_SCANDIR
1105 HAVE_FDOPENDIR
1106 HAVE_DECL_FDOPENDIR
1107 HAVE_DECL_DIRFD
1108 HAVE_CLOSEDIR
1109 HAVE_REWINDDIR
1110 HAVE_READDIR
1111 HAVE_OPENDIR
1112 GNULIB_ALPHASORT
1113 GNULIB_SCANDIR
1114 GNULIB_FDOPENDIR
1115 GNULIB_DIRFD
1116 GNULIB_CLOSEDIR
1117 GNULIB_REWINDDIR
1118 GNULIB_READDIR
1119 GNULIB_OPENDIR
1120 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1121 UNISTD_H_HAVE_WINSOCK2_H
1122 REPLACE_WRITE
1123 REPLACE_USLEEP
1124 REPLACE_UNLINKAT
1125 REPLACE_UNLINK
1126 REPLACE_TTYNAME_R
1127 REPLACE_SYMLINK
1128 REPLACE_SLEEP
1129 REPLACE_RMDIR
1130 REPLACE_READLINK
1131 REPLACE_READ
1132 REPLACE_PWRITE
1133 REPLACE_PREAD
1134 REPLACE_LSEEK
1135 REPLACE_LINKAT
1136 REPLACE_LINK
1137 REPLACE_LCHOWN
1138 REPLACE_ISATTY
1139 REPLACE_GETPAGESIZE
1140 REPLACE_GETGROUPS
1141 REPLACE_GETLOGIN_R
1142 REPLACE_GETDOMAINNAME
1143 REPLACE_GETCWD
1144 REPLACE_FTRUNCATE
1145 REPLACE_FCHOWNAT
1146 REPLACE_DUP2
1147 REPLACE_DUP
1148 REPLACE_CLOSE
1149 REPLACE_CHOWN
1150 HAVE_SYS_PARAM_H
1151 HAVE_OS_H
1152 HAVE_DECL_TTYNAME_R
1153 HAVE_DECL_SETHOSTNAME
1154 HAVE_DECL_GETUSERSHELL
1155 HAVE_DECL_GETPAGESIZE
1156 HAVE_DECL_GETLOGIN_R
1157 HAVE_DECL_GETDOMAINNAME
1158 HAVE_DECL_FDATASYNC
1159 HAVE_DECL_FCHDIR
1160 HAVE_DECL_ENVIRON
1161 HAVE_USLEEP
1162 HAVE_UNLINKAT
1163 HAVE_SYMLINKAT
1164 HAVE_SYMLINK
1165 HAVE_SLEEP
1166 HAVE_SETHOSTNAME
1167 HAVE_READLINKAT
1168 HAVE_READLINK
1169 HAVE_PWRITE
1170 HAVE_PREAD
1171 HAVE_PIPE2
1172 HAVE_PIPE
1173 HAVE_LINKAT
1174 HAVE_LINK
1175 HAVE_LCHOWN
1176 HAVE_GROUP_MEMBER
1177 HAVE_GETPAGESIZE
1178 HAVE_GETLOGIN
1179 HAVE_GETHOSTNAME
1180 HAVE_GETGROUPS
1181 HAVE_GETDTABLESIZE
1182 HAVE_FTRUNCATE
1183 HAVE_FSYNC
1184 HAVE_FDATASYNC
1185 HAVE_FCHOWNAT
1186 HAVE_FCHDIR
1187 HAVE_FACCESSAT
1188 HAVE_EUIDACCESS
1189 HAVE_DUP3
1190 HAVE_DUP2
1191 HAVE_CHOWN
1192 GNULIB_WRITE
1193 GNULIB_USLEEP
1194 GNULIB_UNLINKAT
1195 GNULIB_UNLINK
1196 GNULIB_UNISTD_H_SIGPIPE
1197 GNULIB_UNISTD_H_NONBLOCKING
1198 GNULIB_TTYNAME_R
1199 GNULIB_SYMLINKAT
1200 GNULIB_SYMLINK
1201 GNULIB_SLEEP
1202 GNULIB_SETHOSTNAME
1203 GNULIB_RMDIR
1204 GNULIB_READLINKAT
1205 GNULIB_READLINK
1206 GNULIB_READ
1207 GNULIB_PWRITE
1208 GNULIB_PREAD
1209 GNULIB_PIPE2
1210 GNULIB_PIPE
1211 GNULIB_LSEEK
1212 GNULIB_LINKAT
1213 GNULIB_LINK
1214 GNULIB_LCHOWN
1215 GNULIB_ISATTY
1216 GNULIB_GROUP_MEMBER
1217 GNULIB_GETUSERSHELL
1218 GNULIB_GETPAGESIZE
1219 GNULIB_GETLOGIN_R
1220 GNULIB_GETLOGIN
1221 GNULIB_GETHOSTNAME
1222 GNULIB_GETGROUPS
1223 GNULIB_GETDTABLESIZE
1224 GNULIB_GETDOMAINNAME
1225 GNULIB_GETCWD
1226 GNULIB_FTRUNCATE
1227 GNULIB_FSYNC
1228 GNULIB_FDATASYNC
1229 GNULIB_FCHOWNAT
1230 GNULIB_FCHDIR
1231 GNULIB_FACCESSAT
1232 GNULIB_EUIDACCESS
1233 GNULIB_ENVIRON
1234 GNULIB_DUP3
1235 GNULIB_DUP2
1236 GNULIB_DUP
1237 GNULIB_CLOSE
1238 GNULIB_CHOWN
1239 GNULIB_CHDIR
1240 LIB_CLOCK_GETTIME
1241 GL_GENERATE_ALLOCA_H_FALSE
1242 GL_GENERATE_ALLOCA_H_TRUE
1243 ALLOCA_H
1244 ALLOCA
1245 GL_COND_LIBTOOL_FALSE
1246 GL_COND_LIBTOOL_TRUE
1247 POST_ALLOC_OBJ
1248 PRE_ALLOC_OBJ
1249 CYGWIN_OBJ
1250 RALLOC_OBJ
1251 OLDXMENU_DEPS
1252 LIBX_OTHER
1253 LIBXMENU
1254 OLDXMENU
1255 OLDXMENU_TARGET
1256 LIBXT_OTHER
1257 TOOLKIT_LIBW
1258 WIDGET_OBJ
1259 XOBJ
1260 XMENU_OBJ
1261 FONT_OBJ
1262 OTHER_FILES
1263 GNU_OBJC_CFLAGS
1264 ns_appsrc
1265 ns_appresdir
1266 ns_appbindir
1267 ns_appdir
1268 X_TOOLKIT_TYPE
1269 GNUSTEP_CFLAGS
1270 C_SWITCH_X_SITE
1271 LD_SWITCH_X_SITE
1272 gameuser
1273 gamedir
1274 bitmapdir
1275 archlibdir
1276 etcdir
1277 x_default_search_path
1278 lisppath
1279 locallisppath
1280 standardlisppath
1281 leimdir
1282 lispdir
1283 srcdir
1284 canonical
1285 configuration
1286 version
1287 copyright
1288 KRB4LIB
1289 DESLIB
1290 KRB5LIB
1291 CRYPTOLIB
1292 COM_ERRLIB
1293 LIBRESOLV
1294 LIBHESIOD
1295 TERMCAP_OBJ
1296 LIBS_TERMCAP
1297 BLESSMAIL_TARGET
1298 LIBS_MAIL
1299 liblockfile
1300 LIBXML2_LIBS
1301 LIBXML2_CFLAGS
1302 XINERAMA_LIBS
1303 XINERAMA_CFLAGS
1304 XRANDR_LIBS
1305 XRANDR_CFLAGS
1306 LIBXSM
1307 LIBGPM
1308 LIBGIF
1309 LIBTIFF
1310 LIBPNG
1311 LIBJPEG
1312 LIBXPM
1313 M17N_FLT_LIBS
1314 M17N_FLT_CFLAGS
1315 LIBOTF_LIBS
1316 LIBOTF_CFLAGS
1317 FREETYPE_LIBS
1318 FREETYPE_CFLAGS
1319 XFT_LIBS
1320 XFT_CFLAGS
1321 FONTCONFIG_LIBS
1322 FONTCONFIG_CFLAGS
1323 LIBXMU
1324 LIBXTR6
1325 LIBGNUTLS_LIBS
1326 LIBGNUTLS_CFLAGS
1327 LIBSELINUX_LIBS
1328 SETTINGS_LIBS
1329 SETTINGS_CFLAGS
1330 GOBJECT_LIBS
1331 GOBJECT_CFLAGS
1332 GCONF_LIBS
1333 GCONF_CFLAGS
1334 GSETTINGS_LIBS
1335 GSETTINGS_CFLAGS
1336 DBUS_OBJ
1337 DBUS_LIBS
1338 DBUS_CFLAGS
1339 GTK_OBJ
1340 GTK_LIBS
1341 GTK_CFLAGS
1342 IMAGEMAGICK_LIBS
1343 IMAGEMAGICK_CFLAGS
1344 RSVG_LIBS
1345 RSVG_CFLAGS
1346 LIB_PTHREAD
1347 VMLIMIT_OBJ
1348 GMALLOC_OBJ
1349 HAVE_XSERVER
1350 W32_RES_LINK
1351 W32_RES
1352 W32_LIBS
1353 W32_OBJ
1354 WINDRES
1355 NS_OBJC_OBJ
1356 NS_OBJ
1357 ns_self_contained
1358 INSTALL_ARCH_INDEP_EXTRA
1359 LIBS_GNUSTEP
1360 LD_SWITCH_X_SITE_RPATH
1361 XMKMF
1362 DEPFLAGS
1363 MKDEPDIR
1364 CFLAGS_SOUND
1365 ALSA_LIBS
1366 ALSA_CFLAGS
1367 LIBSOUND
1368 PKG_CONFIG
1369 LIB_MATH
1370 LIBS_SYSTEM
1371 C_SWITCH_SYSTEM
1372 UNEXEC_OBJ
1373 C_SWITCH_MACHINE
1374 LD_SWITCH_SYSTEM
1375 CANNOT_DUMP
1376 INFO_OPTS
1377 INFO_EXT
1378 HAVE_MAKEINFO
1379 PAXCTL
1380 GZIP_PROG
1381 INSTALL_INFO
1382 LN_S_FILEONLY
1383 GNULIB_WARN_CFLAGS
1384 WARN_CFLAGS
1385 WERROR_CFLAGS
1386 RANLIB
1387 ARFLAGS
1388 AR
1389 EGREP
1390 GREP
1391 CPP
1392 am__fastdepCC_FALSE
1393 am__fastdepCC_TRUE
1394 CCDEPMODE
1395 AMDEPBACKSLASH
1396 AMDEP_FALSE
1397 AMDEP_TRUE
1398 am__quote
1399 am__include
1400 DEPDIR
1401 OBJEXT
1402 EXEEXT
1403 ac_ct_CC
1404 CPPFLAGS
1405 LDFLAGS
1406 CFLAGS
1407 CC
1408 host_os
1409 host_vendor
1410 host_cpu
1411 host
1412 build_os
1413 build_vendor
1414 build_cpu
1415 build
1416 PROFILING_CFLAGS
1417 GZIP_INFO
1418 cache_file
1419 am__untar
1420 am__tar
1421 AMTAR
1422 am__leading_dot
1423 SET_MAKE
1424 AWK
1425 mkdir_p
1426 MKDIR_P
1427 INSTALL_STRIP_PROGRAM
1428 STRIP
1429 install_sh
1430 MAKEINFO
1431 AUTOHEADER
1432 AUTOMAKE
1433 AUTOCONF
1434 ACLOCAL
1435 VERSION
1436 PACKAGE
1437 CYGPATH_W
1438 am__isrc
1439 INSTALL_DATA
1440 INSTALL_SCRIPT
1441 INSTALL_PROGRAM
1442 target_alias
1443 host_alias
1444 build_alias
1445 LIBS
1446 ECHO_T
1447 ECHO_N
1448 ECHO_C
1449 DEFS
1450 mandir
1451 localedir
1452 libdir
1453 psdir
1454 pdfdir
1455 dvidir
1456 htmldir
1457 infodir
1458 docdir
1459 oldincludedir
1460 includedir
1461 localstatedir
1462 sharedstatedir
1463 sysconfdir
1464 datadir
1465 datarootdir
1466 libexecdir
1467 sbindir
1468 bindir
1469 program_transform_name
1470 prefix
1471 exec_prefix
1472 PACKAGE_URL
1473 PACKAGE_BUGREPORT
1474 PACKAGE_STRING
1475 PACKAGE_VERSION
1476 PACKAGE_TARNAME
1477 PACKAGE_NAME
1478 PATH_SEPARATOR
1479 SHELL'
1480 ac_subst_files='deps_frag
1481 lisp_frag'
1482 ac_user_opts='
1483 enable_option_checking
1484 with_all
1485 with_pop
1486 with_kerberos
1487 with_kerberos5
1488 with_hesiod
1489 with_mmdf
1490 with_mail_unlink
1491 with_mailhost
1492 with_sound
1493 with_x_toolkit
1494 with_wide_int
1495 with_xpm
1496 with_jpeg
1497 with_tiff
1498 with_gif
1499 with_png
1500 with_rsvg
1501 with_xml2
1502 with_imagemagick
1503 with_xft
1504 with_libotf
1505 with_m17n_flt
1506 with_toolkit_scroll_bars
1507 with_xaw3d
1508 with_xim
1509 with_ns
1510 with_w32
1511 with_gpm
1512 with_dbus
1513 with_gconf
1514 with_gsettings
1515 with_selinux
1516 with_gnutls
1517 with_inotify
1518 with_makeinfo
1519 with_compress_info
1520 with_pkg_config_prog
1521 with_gameuser
1522 with_gnustep_conf
1523 enable_ns_self_contained
1524 enable_locallisppath
1525 enable_checking
1526 enable_check_lisp_object_type
1527 enable_profiling
1528 enable_autodepend
1529 enable_gtk_deprecation_warnings
1530 enable_dependency_tracking
1531 enable_largefile
1532 enable_gcc_warnings
1533 enable_link_time_optimization
1534 with_x
1535 enable_acl
1536 '
1537 ac_precious_vars='build_alias
1538 host_alias
1539 target_alias
1540 CC
1541 CFLAGS
1542 LDFLAGS
1543 LIBS
1544 CPPFLAGS
1545 CPP
1546 XMKMF'
1547
1548
1549 # Initialize some variables set by options.
1550 ac_init_help=
1551 ac_init_version=false
1552 ac_unrecognized_opts=
1553 ac_unrecognized_sep=
1554 # The variables have the same names as the options, with
1555 # dashes changed to underlines.
1556 cache_file=/dev/null
1557 exec_prefix=NONE
1558 no_create=
1559 no_recursion=
1560 prefix=NONE
1561 program_prefix=NONE
1562 program_suffix=NONE
1563 program_transform_name=s,x,x,
1564 silent=
1565 site=
1566 srcdir=
1567 verbose=
1568 x_includes=NONE
1569 x_libraries=NONE
1570
1571 # Installation directory options.
1572 # These are left unexpanded so users can "make install exec_prefix=/foo"
1573 # and all the variables that are supposed to be based on exec_prefix
1574 # by default will actually change.
1575 # Use braces instead of parens because sh, perl, etc. also accept them.
1576 # (The list follows the same order as the GNU Coding Standards.)
1577 bindir='${exec_prefix}/bin'
1578 sbindir='${exec_prefix}/sbin'
1579 libexecdir='${exec_prefix}/libexec'
1580 datarootdir='${prefix}/share'
1581 datadir='${datarootdir}'
1582 sysconfdir='${prefix}/etc'
1583 sharedstatedir='${prefix}/com'
1584 localstatedir='${prefix}/var'
1585 includedir='${prefix}/include'
1586 oldincludedir='/usr/include'
1587 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1588 infodir='${datarootdir}/info'
1589 htmldir='${docdir}'
1590 dvidir='${docdir}'
1591 pdfdir='${docdir}'
1592 psdir='${docdir}'
1593 libdir='${exec_prefix}/lib'
1594 localedir='${datarootdir}/locale'
1595 mandir='${datarootdir}/man'
1596
1597 ac_prev=
1598 ac_dashdash=
1599 for ac_option
1600 do
1601 # If the previous option needs an argument, assign it.
1602 if test -n "$ac_prev"; then
1603 eval $ac_prev=\$ac_option
1604 ac_prev=
1605 continue
1606 fi
1607
1608 case $ac_option in
1609 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1610 *) ac_optarg=yes ;;
1611 esac
1612
1613 # Accept the important Cygnus configure options, so we can diagnose typos.
1614
1615 case $ac_dashdash$ac_option in
1616 --)
1617 ac_dashdash=yes ;;
1618
1619 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1620 ac_prev=bindir ;;
1621 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1622 bindir=$ac_optarg ;;
1623
1624 -build | --build | --buil | --bui | --bu)
1625 ac_prev=build_alias ;;
1626 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1627 build_alias=$ac_optarg ;;
1628
1629 -cache-file | --cache-file | --cache-fil | --cache-fi \
1630 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1631 ac_prev=cache_file ;;
1632 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1633 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1634 cache_file=$ac_optarg ;;
1635
1636 --config-cache | -C)
1637 cache_file=config.cache ;;
1638
1639 -datadir | --datadir | --datadi | --datad)
1640 ac_prev=datadir ;;
1641 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1642 datadir=$ac_optarg ;;
1643
1644 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1645 | --dataroo | --dataro | --datar)
1646 ac_prev=datarootdir ;;
1647 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1648 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1649 datarootdir=$ac_optarg ;;
1650
1651 -disable-* | --disable-*)
1652 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1653 # Reject names that are not valid shell variable names.
1654 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1655 as_fn_error "invalid feature name: $ac_useropt"
1656 ac_useropt_orig=$ac_useropt
1657 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1658 case $ac_user_opts in
1659 *"
1660 "enable_$ac_useropt"
1661 "*) ;;
1662 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1663 ac_unrecognized_sep=', ';;
1664 esac
1665 eval enable_$ac_useropt=no ;;
1666
1667 -docdir | --docdir | --docdi | --doc | --do)
1668 ac_prev=docdir ;;
1669 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1670 docdir=$ac_optarg ;;
1671
1672 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1673 ac_prev=dvidir ;;
1674 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1675 dvidir=$ac_optarg ;;
1676
1677 -enable-* | --enable-*)
1678 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1679 # Reject names that are not valid shell variable names.
1680 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1681 as_fn_error "invalid feature name: $ac_useropt"
1682 ac_useropt_orig=$ac_useropt
1683 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1684 case $ac_user_opts in
1685 *"
1686 "enable_$ac_useropt"
1687 "*) ;;
1688 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1689 ac_unrecognized_sep=', ';;
1690 esac
1691 eval enable_$ac_useropt=\$ac_optarg ;;
1692
1693 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1694 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1695 | --exec | --exe | --ex)
1696 ac_prev=exec_prefix ;;
1697 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1698 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1699 | --exec=* | --exe=* | --ex=*)
1700 exec_prefix=$ac_optarg ;;
1701
1702 -gas | --gas | --ga | --g)
1703 # Obsolete; use --with-gas.
1704 with_gas=yes ;;
1705
1706 -help | --help | --hel | --he | -h)
1707 ac_init_help=long ;;
1708 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1709 ac_init_help=recursive ;;
1710 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1711 ac_init_help=short ;;
1712
1713 -host | --host | --hos | --ho)
1714 ac_prev=host_alias ;;
1715 -host=* | --host=* | --hos=* | --ho=*)
1716 host_alias=$ac_optarg ;;
1717
1718 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1719 ac_prev=htmldir ;;
1720 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1721 | --ht=*)
1722 htmldir=$ac_optarg ;;
1723
1724 -includedir | --includedir | --includedi | --included | --include \
1725 | --includ | --inclu | --incl | --inc)
1726 ac_prev=includedir ;;
1727 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1728 | --includ=* | --inclu=* | --incl=* | --inc=*)
1729 includedir=$ac_optarg ;;
1730
1731 -infodir | --infodir | --infodi | --infod | --info | --inf)
1732 ac_prev=infodir ;;
1733 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1734 infodir=$ac_optarg ;;
1735
1736 -libdir | --libdir | --libdi | --libd)
1737 ac_prev=libdir ;;
1738 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1739 libdir=$ac_optarg ;;
1740
1741 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1742 | --libexe | --libex | --libe)
1743 ac_prev=libexecdir ;;
1744 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1745 | --libexe=* | --libex=* | --libe=*)
1746 libexecdir=$ac_optarg ;;
1747
1748 -localedir | --localedir | --localedi | --localed | --locale)
1749 ac_prev=localedir ;;
1750 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1751 localedir=$ac_optarg ;;
1752
1753 -localstatedir | --localstatedir | --localstatedi | --localstated \
1754 | --localstate | --localstat | --localsta | --localst | --locals)
1755 ac_prev=localstatedir ;;
1756 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1757 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1758 localstatedir=$ac_optarg ;;
1759
1760 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1761 ac_prev=mandir ;;
1762 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1763 mandir=$ac_optarg ;;
1764
1765 -nfp | --nfp | --nf)
1766 # Obsolete; use --without-fp.
1767 with_fp=no ;;
1768
1769 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1770 | --no-cr | --no-c | -n)
1771 no_create=yes ;;
1772
1773 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1774 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1775 no_recursion=yes ;;
1776
1777 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1778 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1779 | --oldin | --oldi | --old | --ol | --o)
1780 ac_prev=oldincludedir ;;
1781 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1782 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1783 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1784 oldincludedir=$ac_optarg ;;
1785
1786 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1787 ac_prev=prefix ;;
1788 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1789 prefix=$ac_optarg ;;
1790
1791 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1792 | --program-pre | --program-pr | --program-p)
1793 ac_prev=program_prefix ;;
1794 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1795 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1796 program_prefix=$ac_optarg ;;
1797
1798 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1799 | --program-suf | --program-su | --program-s)
1800 ac_prev=program_suffix ;;
1801 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1802 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1803 program_suffix=$ac_optarg ;;
1804
1805 -program-transform-name | --program-transform-name \
1806 | --program-transform-nam | --program-transform-na \
1807 | --program-transform-n | --program-transform- \
1808 | --program-transform | --program-transfor \
1809 | --program-transfo | --program-transf \
1810 | --program-trans | --program-tran \
1811 | --progr-tra | --program-tr | --program-t)
1812 ac_prev=program_transform_name ;;
1813 -program-transform-name=* | --program-transform-name=* \
1814 | --program-transform-nam=* | --program-transform-na=* \
1815 | --program-transform-n=* | --program-transform-=* \
1816 | --program-transform=* | --program-transfor=* \
1817 | --program-transfo=* | --program-transf=* \
1818 | --program-trans=* | --program-tran=* \
1819 | --progr-tra=* | --program-tr=* | --program-t=*)
1820 program_transform_name=$ac_optarg ;;
1821
1822 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1823 ac_prev=pdfdir ;;
1824 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1825 pdfdir=$ac_optarg ;;
1826
1827 -psdir | --psdir | --psdi | --psd | --ps)
1828 ac_prev=psdir ;;
1829 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1830 psdir=$ac_optarg ;;
1831
1832 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1833 | -silent | --silent | --silen | --sile | --sil)
1834 silent=yes ;;
1835
1836 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1837 ac_prev=sbindir ;;
1838 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1839 | --sbi=* | --sb=*)
1840 sbindir=$ac_optarg ;;
1841
1842 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1843 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1844 | --sharedst | --shareds | --shared | --share | --shar \
1845 | --sha | --sh)
1846 ac_prev=sharedstatedir ;;
1847 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1848 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1849 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1850 | --sha=* | --sh=*)
1851 sharedstatedir=$ac_optarg ;;
1852
1853 -site | --site | --sit)
1854 ac_prev=site ;;
1855 -site=* | --site=* | --sit=*)
1856 site=$ac_optarg ;;
1857
1858 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1859 ac_prev=srcdir ;;
1860 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1861 srcdir=$ac_optarg ;;
1862
1863 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1864 | --syscon | --sysco | --sysc | --sys | --sy)
1865 ac_prev=sysconfdir ;;
1866 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1867 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1868 sysconfdir=$ac_optarg ;;
1869
1870 -target | --target | --targe | --targ | --tar | --ta | --t)
1871 ac_prev=target_alias ;;
1872 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1873 target_alias=$ac_optarg ;;
1874
1875 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1876 verbose=yes ;;
1877
1878 -version | --version | --versio | --versi | --vers | -V)
1879 ac_init_version=: ;;
1880
1881 -with-* | --with-*)
1882 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1883 # Reject names that are not valid shell variable names.
1884 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1885 as_fn_error "invalid package name: $ac_useropt"
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--with-$ac_useropt_orig"
1893 ac_unrecognized_sep=', ';;
1894 esac
1895 eval with_$ac_useropt=\$ac_optarg ;;
1896
1897 -without-* | --without-*)
1898 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1899 # Reject names that are not valid shell variable names.
1900 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1901 as_fn_error "invalid package name: $ac_useropt"
1902 ac_useropt_orig=$ac_useropt
1903 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1904 case $ac_user_opts in
1905 *"
1906 "with_$ac_useropt"
1907 "*) ;;
1908 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1909 ac_unrecognized_sep=', ';;
1910 esac
1911 eval with_$ac_useropt=no ;;
1912
1913 --x)
1914 # Obsolete; use --with-x.
1915 with_x=yes ;;
1916
1917 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1918 | --x-incl | --x-inc | --x-in | --x-i)
1919 ac_prev=x_includes ;;
1920 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1921 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1922 x_includes=$ac_optarg ;;
1923
1924 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1925 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1926 ac_prev=x_libraries ;;
1927 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1928 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1929 x_libraries=$ac_optarg ;;
1930
1931 -*) as_fn_error "unrecognized option: \`$ac_option'
1932 Try \`$0 --help' for more information."
1933 ;;
1934
1935 *=*)
1936 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1937 # Reject names that are not valid shell variable names.
1938 case $ac_envvar in #(
1939 '' | [0-9]* | *[!_$as_cr_alnum]* )
1940 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1941 esac
1942 eval $ac_envvar=\$ac_optarg
1943 export $ac_envvar ;;
1944
1945 *)
1946 # FIXME: should be removed in autoconf 3.0.
1947 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1948 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1949 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1950 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1951 ;;
1952
1953 esac
1954 done
1955
1956 if test -n "$ac_prev"; then
1957 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1958 as_fn_error "missing argument to $ac_option"
1959 fi
1960
1961 if test -n "$ac_unrecognized_opts"; then
1962 case $enable_option_checking in
1963 no) ;;
1964 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1965 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1966 esac
1967 fi
1968
1969 # Check all directory arguments for consistency.
1970 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1971 datadir sysconfdir sharedstatedir localstatedir includedir \
1972 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1973 libdir localedir mandir
1974 do
1975 eval ac_val=\$$ac_var
1976 # Remove trailing slashes.
1977 case $ac_val in
1978 */ )
1979 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1980 eval $ac_var=\$ac_val;;
1981 esac
1982 # Be sure to have absolute directory names.
1983 case $ac_val in
1984 [\\/$]* | ?:[\\/]* ) continue;;
1985 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1986 esac
1987 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1988 done
1989
1990 # There might be people who depend on the old broken behavior: `$host'
1991 # used to hold the argument of --host etc.
1992 # FIXME: To remove some day.
1993 build=$build_alias
1994 host=$host_alias
1995 target=$target_alias
1996
1997 # FIXME: To remove some day.
1998 if test "x$host_alias" != x; then
1999 if test "x$build_alias" = x; then
2000 cross_compiling=maybe
2001 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2002 If a cross compiler is detected then cross compile mode will be used." >&2
2003 elif test "x$build_alias" != "x$host_alias"; then
2004 cross_compiling=yes
2005 fi
2006 fi
2007
2008 ac_tool_prefix=
2009 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2010
2011 test "$silent" = yes && exec 6>/dev/null
2012
2013
2014 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2015 ac_ls_di=`ls -di .` &&
2016 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2017 as_fn_error "working directory cannot be determined"
2018 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2019 as_fn_error "pwd does not report name of working directory"
2020
2021
2022 # Find the source files, if location was not specified.
2023 if test -z "$srcdir"; then
2024 ac_srcdir_defaulted=yes
2025 # Try the directory containing this script, then the parent directory.
2026 ac_confdir=`$as_dirname -- "$as_myself" ||
2027 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2028 X"$as_myself" : 'X\(//\)[^/]' \| \
2029 X"$as_myself" : 'X\(//\)$' \| \
2030 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2031 $as_echo X"$as_myself" |
2032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2033 s//\1/
2034 q
2035 }
2036 /^X\(\/\/\)[^/].*/{
2037 s//\1/
2038 q
2039 }
2040 /^X\(\/\/\)$/{
2041 s//\1/
2042 q
2043 }
2044 /^X\(\/\).*/{
2045 s//\1/
2046 q
2047 }
2048 s/.*/./; q'`
2049 srcdir=$ac_confdir
2050 if test ! -r "$srcdir/$ac_unique_file"; then
2051 srcdir=..
2052 fi
2053 else
2054 ac_srcdir_defaulted=no
2055 fi
2056 if test ! -r "$srcdir/$ac_unique_file"; then
2057 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2058 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2059 fi
2060 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2061 ac_abs_confdir=`(
2062 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2063 pwd)`
2064 # When building in place, set srcdir=.
2065 if test "$ac_abs_confdir" = "$ac_pwd"; then
2066 srcdir=.
2067 fi
2068 # Remove unnecessary trailing slashes from srcdir.
2069 # Double slashes in file names in object file debugging info
2070 # mess up M-x gdb in Emacs.
2071 case $srcdir in
2072 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2073 esac
2074 for ac_var in $ac_precious_vars; do
2075 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2076 eval ac_env_${ac_var}_value=\$${ac_var}
2077 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2078 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2079 done
2080
2081 #
2082 # Report the --help message.
2083 #
2084 if test "$ac_init_help" = "long"; then
2085 # Omit some internal or obsolete options to make the list less imposing.
2086 # This message is too long to be a string in the A/UX 3.1 sh.
2087 cat <<_ACEOF
2088 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2089
2090 Usage: $0 [OPTION]... [VAR=VALUE]...
2091
2092 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2093 VAR=VALUE. See below for descriptions of some of the useful variables.
2094
2095 Defaults for the options are specified in brackets.
2096
2097 Configuration:
2098 -h, --help display this help and exit
2099 --help=short display options specific to this package
2100 --help=recursive display the short help of all the included packages
2101 -V, --version display version information and exit
2102 -q, --quiet, --silent do not print \`checking...' messages
2103 --cache-file=FILE cache test results in FILE [disabled]
2104 -C, --config-cache alias for \`--cache-file=config.cache'
2105 -n, --no-create do not create output files
2106 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2107
2108 Installation directories:
2109 --prefix=PREFIX install architecture-independent files in PREFIX
2110 [$ac_default_prefix]
2111 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2112 [PREFIX]
2113
2114 By default, \`make install' will install all the files in
2115 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2116 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2117 for instance \`--prefix=\$HOME'.
2118
2119 For better control, use the options below.
2120
2121 Fine tuning of the installation directories:
2122 --bindir=DIR user executables [EPREFIX/bin]
2123 --sbindir=DIR system admin executables [EPREFIX/sbin]
2124 --libexecdir=DIR program executables [EPREFIX/libexec]
2125 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2126 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2127 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2128 --libdir=DIR object code libraries [EPREFIX/lib]
2129 --includedir=DIR C header files [PREFIX/include]
2130 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2131 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2132 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2133 --infodir=DIR info documentation [DATAROOTDIR/info]
2134 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2135 --mandir=DIR man documentation [DATAROOTDIR/man]
2136 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2137 --htmldir=DIR html documentation [DOCDIR]
2138 --dvidir=DIR dvi documentation [DOCDIR]
2139 --pdfdir=DIR pdf documentation [DOCDIR]
2140 --psdir=DIR ps documentation [DOCDIR]
2141 _ACEOF
2142
2143 cat <<\_ACEOF
2144
2145 Program names:
2146 --program-prefix=PREFIX prepend PREFIX to installed program names
2147 --program-suffix=SUFFIX append SUFFIX to installed program names
2148 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2149
2150 X features:
2151 --x-includes=DIR X include files are in DIR
2152 --x-libraries=DIR X library files are in DIR
2153
2154 System types:
2155 --build=BUILD configure for building on BUILD [guessed]
2156 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2157 _ACEOF
2158 fi
2159
2160 if test -n "$ac_init_help"; then
2161 case $ac_init_help in
2162 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2163 esac
2164 cat <<\_ACEOF
2165
2166 Optional Features:
2167 --disable-option-checking ignore unrecognized --enable/--with options
2168 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2169 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2170 --disable-ns-self-contained
2171 disable self contained build under NeXTstep
2172 --enable-locallisppath=PATH
2173 directories Emacs should search for lisp files
2174 specific to this site
2175 --enable-checking[=LIST]
2176 enable expensive run-time checks. With LIST, enable
2177 only specific categories of checks. Categories are:
2178 all,yes,no. Flags are: stringbytes, stringoverrun,
2179 stringfreelist, xmallocoverrun, conslist, glyphs
2180 --enable-check-lisp-object-type
2181 enable compile time checks for the Lisp_Object data
2182 type. This is useful for development for catching
2183 certain types of bugs.
2184 --enable-profiling build emacs with low-level, gprof profiling support.
2185 Mainly useful for debugging Emacs itself. May not
2186 work on all platforms. Stops profiler.el working.
2187 --enable-autodepend automatically generate dependencies to .h-files.
2188 Requires GNU Make and Gcc. Enabled if GNU Make and
2189 Gcc is found
2190 --enable-gtk-deprecation-warnings
2191 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2192 --disable-dependency-tracking speeds up one-time build
2193 --enable-dependency-tracking do not reject slow dependency extractors
2194 --disable-largefile omit support for large files
2195 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2196 intended for developers, and may generate false
2197 alarms when used with older or non-GNU development
2198 tools.
2199 --enable-link-time-optimization
2200 build emacs with link-time optimization. This is
2201 supported only for GCC since 4.5.0.
2202 --disable-acl do not support ACLs
2203
2204 Optional Packages:
2205 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2206 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2207 --without-all omit almost all features and build small executable
2208 with minimal dependencies
2209 --without-pop don't support POP mail retrieval with movemail
2210 --with-kerberos support Kerberos-authenticated POP
2211 --with-kerberos5 support Kerberos version 5 authenticated POP
2212 --with-hesiod support Hesiod to get the POP server host
2213 --with-mmdf support MMDF mailboxes
2214 --with-mail-unlink unlink, rather than empty, mail spool after reading
2215 --with-mailhost=HOSTNAME
2216 string giving default POP mail host
2217 --without-sound don't compile with sound support
2218 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2219 gtk3, lucid or athena, motif, no)
2220 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2221 --without-xpm don't compile with XPM image support
2222 --without-jpeg don't compile with JPEG image support
2223 --without-tiff don't compile with TIFF image support
2224 --without-gif don't compile with GIF image support
2225 --without-png don't compile with PNG image support
2226 --without-rsvg don't compile with SVG image support
2227 --without-xml2 don't compile with XML parsing support
2228 --without-imagemagick don't compile with ImageMagick image support
2229 --without-xft don't use XFT for anti aliased fonts
2230 --without-libotf don't use libotf for OpenType font support
2231 --without-m17n-flt don't use m17n-flt for text shaping
2232 --without-toolkit-scroll-bars
2233 don't use Motif or Xaw3d scroll bars
2234 --without-xaw3d don't use Xaw3d
2235 --without-xim don't use X11 XIM
2236 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2237 --with-w32 use native MS Windows GUI
2238 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2239 console
2240 --without-dbus don't compile with D-Bus support
2241 --without-gconf don't compile with GConf support
2242 --without-gsettings don't compile with GSettings support
2243 --without-selinux don't compile with SELinux support
2244 --without-gnutls don't use -lgnutls for SSL/TLS support
2245 --without-inotify don't compile with inotify (file-watch) support
2246 --without-makeinfo don't require makeinfo for building manuals
2247 --without-compress-info don't compress the installed Info pages
2248 --with-pkg-config-prog=FILENAME
2249 file name of pkg-config for finding GTK and librsvg
2250 --with-gameuser=USER user for shared game score files
2251 --with-gnustep-conf=FILENAME
2252 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2253 or /etc/GNUstep/GNUstep.conf
2254 --with-x use the X Window System
2255
2256 Some influential environment variables:
2257 CC C compiler command
2258 CFLAGS C compiler flags
2259 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2260 nonstandard directory <lib dir>
2261 LIBS libraries to pass to the linker, e.g. -l<library>
2262 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2263 you have headers in a nonstandard directory <include dir>
2264 CPP C preprocessor
2265 XMKMF Path to xmkmf, Makefile generator for X Window System
2266
2267 Use these variables to override the choices made by `configure' or to help
2268 it to find libraries and programs with nonstandard names/locations.
2269
2270 Report bugs to the package provider.
2271 _ACEOF
2272 ac_status=$?
2273 fi
2274
2275 if test "$ac_init_help" = "recursive"; then
2276 # If there are subdirs, report their specific --help.
2277 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2278 test -d "$ac_dir" ||
2279 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2280 continue
2281 ac_builddir=.
2282
2283 case "$ac_dir" in
2284 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2285 *)
2286 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2287 # A ".." for each directory in $ac_dir_suffix.
2288 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2289 case $ac_top_builddir_sub in
2290 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2291 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2292 esac ;;
2293 esac
2294 ac_abs_top_builddir=$ac_pwd
2295 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2296 # for backward compatibility:
2297 ac_top_builddir=$ac_top_build_prefix
2298
2299 case $srcdir in
2300 .) # We are building in place.
2301 ac_srcdir=.
2302 ac_top_srcdir=$ac_top_builddir_sub
2303 ac_abs_top_srcdir=$ac_pwd ;;
2304 [\\/]* | ?:[\\/]* ) # Absolute name.
2305 ac_srcdir=$srcdir$ac_dir_suffix;
2306 ac_top_srcdir=$srcdir
2307 ac_abs_top_srcdir=$srcdir ;;
2308 *) # Relative name.
2309 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2310 ac_top_srcdir=$ac_top_build_prefix$srcdir
2311 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2312 esac
2313 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2314
2315 cd "$ac_dir" || { ac_status=$?; continue; }
2316 # Check for guested configure.
2317 if test -f "$ac_srcdir/configure.gnu"; then
2318 echo &&
2319 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2320 elif test -f "$ac_srcdir/configure"; then
2321 echo &&
2322 $SHELL "$ac_srcdir/configure" --help=recursive
2323 else
2324 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2325 fi || ac_status=$?
2326 cd "$ac_pwd" || { ac_status=$?; break; }
2327 done
2328 fi
2329
2330 test -n "$ac_init_help" && exit $ac_status
2331 if $ac_init_version; then
2332 cat <<\_ACEOF
2333 emacs configure 24.3.50
2334 generated by GNU Autoconf 2.65
2335
2336 Copyright (C) 2009 Free Software Foundation, Inc.
2337 This configure script is free software; the Free Software Foundation
2338 gives unlimited permission to copy, distribute and modify it.
2339 _ACEOF
2340 exit
2341 fi
2342
2343 ## ------------------------ ##
2344 ## Autoconf initialization. ##
2345 ## ------------------------ ##
2346
2347 # ac_fn_c_try_compile LINENO
2348 # --------------------------
2349 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2350 ac_fn_c_try_compile ()
2351 {
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 rm -f conftest.$ac_objext
2354 if { { ac_try="$ac_compile"
2355 case "(($ac_try" in
2356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357 *) ac_try_echo=$ac_try;;
2358 esac
2359 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360 $as_echo "$ac_try_echo"; } >&5
2361 (eval "$ac_compile") 2>conftest.err
2362 ac_status=$?
2363 if test -s conftest.err; then
2364 grep -v '^ *+' conftest.err >conftest.er1
2365 cat conftest.er1 >&5
2366 mv -f conftest.er1 conftest.err
2367 fi
2368 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369 test $ac_status = 0; } && {
2370 test -z "$ac_c_werror_flag" ||
2371 test ! -s conftest.err
2372 } && test -s conftest.$ac_objext; then :
2373 ac_retval=0
2374 else
2375 $as_echo "$as_me: failed program was:" >&5
2376 sed 's/^/| /' conftest.$ac_ext >&5
2377
2378 ac_retval=1
2379 fi
2380 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2381 as_fn_set_status $ac_retval
2382
2383 } # ac_fn_c_try_compile
2384
2385 # ac_fn_c_try_cpp LINENO
2386 # ----------------------
2387 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388 ac_fn_c_try_cpp ()
2389 {
2390 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391 if { { ac_try="$ac_cpp conftest.$ac_ext"
2392 case "(($ac_try" in
2393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394 *) ac_try_echo=$ac_try;;
2395 esac
2396 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397 $as_echo "$ac_try_echo"; } >&5
2398 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399 ac_status=$?
2400 if test -s conftest.err; then
2401 grep -v '^ *+' conftest.err >conftest.er1
2402 cat conftest.er1 >&5
2403 mv -f conftest.er1 conftest.err
2404 fi
2405 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406 test $ac_status = 0; } >/dev/null && {
2407 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2408 test ! -s conftest.err
2409 }; then :
2410 ac_retval=0
2411 else
2412 $as_echo "$as_me: failed program was:" >&5
2413 sed 's/^/| /' conftest.$ac_ext >&5
2414
2415 ac_retval=1
2416 fi
2417 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2418 as_fn_set_status $ac_retval
2419
2420 } # ac_fn_c_try_cpp
2421
2422 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2423 # -------------------------------------------------------
2424 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2425 # the include files in INCLUDES and setting the cache variable VAR
2426 # accordingly.
2427 ac_fn_c_check_header_mongrel ()
2428 {
2429 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2432 $as_echo_n "checking for $2... " >&6; }
2433 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2434 $as_echo_n "(cached) " >&6
2435 fi
2436 eval ac_res=\$$3
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438 $as_echo "$ac_res" >&6; }
2439 else
2440 # Is the header compilable?
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2442 $as_echo_n "checking $2 usability... " >&6; }
2443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444 /* end confdefs.h. */
2445 $4
2446 #include <$2>
2447 _ACEOF
2448 if ac_fn_c_try_compile "$LINENO"; then :
2449 ac_header_compiler=yes
2450 else
2451 ac_header_compiler=no
2452 fi
2453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2455 $as_echo "$ac_header_compiler" >&6; }
2456
2457 # Is the header present?
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2459 $as_echo_n "checking $2 presence... " >&6; }
2460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461 /* end confdefs.h. */
2462 #include <$2>
2463 _ACEOF
2464 if ac_fn_c_try_cpp "$LINENO"; then :
2465 ac_header_preproc=yes
2466 else
2467 ac_header_preproc=no
2468 fi
2469 rm -f conftest.err conftest.$ac_ext
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2471 $as_echo "$ac_header_preproc" >&6; }
2472
2473 # So? What about this header?
2474 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2475 yes:no: )
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2477 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480 ;;
2481 no:yes:* )
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2483 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2485 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2487 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2489 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2492 ;;
2493 esac
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495 $as_echo_n "checking for $2... " >&6; }
2496 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2497 $as_echo_n "(cached) " >&6
2498 else
2499 eval "$3=\$ac_header_compiler"
2500 fi
2501 eval ac_res=\$$3
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2503 $as_echo "$ac_res" >&6; }
2504 fi
2505 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2506
2507 } # ac_fn_c_check_header_mongrel
2508
2509 # ac_fn_c_try_run LINENO
2510 # ----------------------
2511 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2512 # that executables *can* be run.
2513 ac_fn_c_try_run ()
2514 {
2515 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2516 if { { ac_try="$ac_link"
2517 case "(($ac_try" in
2518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2519 *) ac_try_echo=$ac_try;;
2520 esac
2521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2522 $as_echo "$ac_try_echo"; } >&5
2523 (eval "$ac_link") 2>&5
2524 ac_status=$?
2525 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2526 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2527 { { case "(($ac_try" in
2528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2529 *) ac_try_echo=$ac_try;;
2530 esac
2531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2532 $as_echo "$ac_try_echo"; } >&5
2533 (eval "$ac_try") 2>&5
2534 ac_status=$?
2535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536 test $ac_status = 0; }; }; then :
2537 ac_retval=0
2538 else
2539 $as_echo "$as_me: program exited with status $ac_status" >&5
2540 $as_echo "$as_me: failed program was:" >&5
2541 sed 's/^/| /' conftest.$ac_ext >&5
2542
2543 ac_retval=$ac_status
2544 fi
2545 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2546 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2547 as_fn_set_status $ac_retval
2548
2549 } # ac_fn_c_try_run
2550
2551 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2552 # -------------------------------------------------------
2553 # Tests whether HEADER exists and can be compiled using the include files in
2554 # INCLUDES, setting the cache variable VAR accordingly.
2555 ac_fn_c_check_header_compile ()
2556 {
2557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559 $as_echo_n "checking for $2... " >&6; }
2560 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2561 $as_echo_n "(cached) " >&6
2562 else
2563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564 /* end confdefs.h. */
2565 $4
2566 #include <$2>
2567 _ACEOF
2568 if ac_fn_c_try_compile "$LINENO"; then :
2569 eval "$3=yes"
2570 else
2571 eval "$3=no"
2572 fi
2573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2574 fi
2575 eval ac_res=\$$3
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577 $as_echo "$ac_res" >&6; }
2578 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2579
2580 } # ac_fn_c_check_header_compile
2581
2582 # ac_fn_c_try_link LINENO
2583 # -----------------------
2584 # Try to link conftest.$ac_ext, and return whether this succeeded.
2585 ac_fn_c_try_link ()
2586 {
2587 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588 rm -f conftest.$ac_objext conftest$ac_exeext
2589 if { { ac_try="$ac_link"
2590 case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593 esac
2594 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2595 $as_echo "$ac_try_echo"; } >&5
2596 (eval "$ac_link") 2>conftest.err
2597 ac_status=$?
2598 if test -s conftest.err; then
2599 grep -v '^ *+' conftest.err >conftest.er1
2600 cat conftest.er1 >&5
2601 mv -f conftest.er1 conftest.err
2602 fi
2603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2604 test $ac_status = 0; } && {
2605 test -z "$ac_c_werror_flag" ||
2606 test ! -s conftest.err
2607 } && test -s conftest$ac_exeext && {
2608 test "$cross_compiling" = yes ||
2609 $as_test_x conftest$ac_exeext
2610 }; then :
2611 ac_retval=0
2612 else
2613 $as_echo "$as_me: failed program was:" >&5
2614 sed 's/^/| /' conftest.$ac_ext >&5
2615
2616 ac_retval=1
2617 fi
2618 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2619 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2620 # interfere with the next link command; also delete a directory that is
2621 # left behind by Apple's compiler. We do this before executing the actions.
2622 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2623 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2624 as_fn_set_status $ac_retval
2625
2626 } # ac_fn_c_try_link
2627
2628 # ac_fn_c_check_decl LINENO SYMBOL VAR
2629 # ------------------------------------
2630 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2631 ac_fn_c_check_decl ()
2632 {
2633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2635 $as_echo_n "checking whether $2 is declared... " >&6; }
2636 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2637 $as_echo_n "(cached) " >&6
2638 else
2639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640 /* end confdefs.h. */
2641 $4
2642 int
2643 main ()
2644 {
2645 #ifndef $2
2646 (void) $2;
2647 #endif
2648
2649 ;
2650 return 0;
2651 }
2652 _ACEOF
2653 if ac_fn_c_try_compile "$LINENO"; then :
2654 eval "$3=yes"
2655 else
2656 eval "$3=no"
2657 fi
2658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659 fi
2660 eval ac_res=\$$3
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2662 $as_echo "$ac_res" >&6; }
2663 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2664
2665 } # ac_fn_c_check_decl
2666
2667 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2668 # ----------------------------------------------
2669 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2670 ac_fn_c_check_header_preproc ()
2671 {
2672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2674 $as_echo_n "checking for $2... " >&6; }
2675 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2676 $as_echo_n "(cached) " >&6
2677 else
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679 /* end confdefs.h. */
2680 #include <$2>
2681 _ACEOF
2682 if ac_fn_c_try_cpp "$LINENO"; then :
2683 eval "$3=yes"
2684 else
2685 eval "$3=no"
2686 fi
2687 rm -f conftest.err conftest.$ac_ext
2688 fi
2689 eval ac_res=\$$3
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691 $as_echo "$ac_res" >&6; }
2692 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2693
2694 } # ac_fn_c_check_header_preproc
2695
2696 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2697 # ----------------------------------------------------
2698 # Tries to find if the field MEMBER exists in type AGGR, after including
2699 # INCLUDES, setting cache variable VAR accordingly.
2700 ac_fn_c_check_member ()
2701 {
2702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2704 $as_echo_n "checking for $2.$3... " >&6; }
2705 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2706 $as_echo_n "(cached) " >&6
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 (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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2725 /* end confdefs.h. */
2726 $5
2727 int
2728 main ()
2729 {
2730 static $2 ac_aggr;
2731 if (sizeof ac_aggr.$3)
2732 return 0;
2733 ;
2734 return 0;
2735 }
2736 _ACEOF
2737 if ac_fn_c_try_compile "$LINENO"; then :
2738 eval "$4=yes"
2739 else
2740 eval "$4=no"
2741 fi
2742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743 fi
2744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745 fi
2746 eval ac_res=\$$4
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748 $as_echo "$ac_res" >&6; }
2749 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2750
2751 } # ac_fn_c_check_member
2752
2753 # ac_fn_c_check_func LINENO FUNC VAR
2754 # ----------------------------------
2755 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2756 ac_fn_c_check_func ()
2757 {
2758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2760 $as_echo_n "checking for $2... " >&6; }
2761 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2762 $as_echo_n "(cached) " >&6
2763 else
2764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765 /* end confdefs.h. */
2766 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2768 #define $2 innocuous_$2
2769
2770 /* System header to define __stub macros and hopefully few prototypes,
2771 which can conflict with char $2 (); below.
2772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2773 <limits.h> exists even on freestanding compilers. */
2774
2775 #ifdef __STDC__
2776 # include <limits.h>
2777 #else
2778 # include <assert.h>
2779 #endif
2780
2781 #undef $2
2782
2783 /* Override any GCC internal prototype to avoid an error.
2784 Use char because int might match the return type of a GCC
2785 builtin and then its argument prototype would still apply. */
2786 #ifdef __cplusplus
2787 extern "C"
2788 #endif
2789 char $2 ();
2790 /* The GNU C library defines this for functions which it implements
2791 to always fail with ENOSYS. Some functions are actually named
2792 something starting with __ and the normal name is an alias. */
2793 #if defined __stub_$2 || defined __stub___$2
2794 choke me
2795 #endif
2796
2797 int
2798 main ()
2799 {
2800 return $2 ();
2801 ;
2802 return 0;
2803 }
2804 _ACEOF
2805 if ac_fn_c_try_link "$LINENO"; then :
2806 eval "$3=yes"
2807 else
2808 eval "$3=no"
2809 fi
2810 rm -f core conftest.err conftest.$ac_objext \
2811 conftest$ac_exeext conftest.$ac_ext
2812 fi
2813 eval ac_res=\$$3
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2815 $as_echo "$ac_res" >&6; }
2816 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2817
2818 } # ac_fn_c_check_func
2819
2820 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2821 # -------------------------------------------
2822 # Tests whether TYPE exists after having included INCLUDES, setting cache
2823 # variable VAR accordingly.
2824 ac_fn_c_check_type ()
2825 {
2826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2828 $as_echo_n "checking for $2... " >&6; }
2829 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2830 $as_echo_n "(cached) " >&6
2831 else
2832 eval "$3=no"
2833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834 /* end confdefs.h. */
2835 $4
2836 int
2837 main ()
2838 {
2839 if (sizeof ($2))
2840 return 0;
2841 ;
2842 return 0;
2843 }
2844 _ACEOF
2845 if ac_fn_c_try_compile "$LINENO"; then :
2846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847 /* end confdefs.h. */
2848 $4
2849 int
2850 main ()
2851 {
2852 if (sizeof (($2)))
2853 return 0;
2854 ;
2855 return 0;
2856 }
2857 _ACEOF
2858 if ac_fn_c_try_compile "$LINENO"; then :
2859
2860 else
2861 eval "$3=yes"
2862 fi
2863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864 fi
2865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866 fi
2867 eval ac_res=\$$3
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869 $as_echo "$ac_res" >&6; }
2870 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2871
2872 } # ac_fn_c_check_type
2873
2874 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2875 # --------------------------------------------
2876 # Tries to find the compile-time value of EXPR in a program that includes
2877 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2878 # computed
2879 ac_fn_c_compute_int ()
2880 {
2881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882 if test "$cross_compiling" = yes; then
2883 # Depending upon the size, compute the lo and hi bounds.
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) >= 0)];
2891 test_array [0] = 0
2892
2893 ;
2894 return 0;
2895 }
2896 _ACEOF
2897 if ac_fn_c_try_compile "$LINENO"; then :
2898 ac_lo=0 ac_mid=0
2899 while :; do
2900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2901 /* end confdefs.h. */
2902 $4
2903 int
2904 main ()
2905 {
2906 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2907 test_array [0] = 0
2908
2909 ;
2910 return 0;
2911 }
2912 _ACEOF
2913 if ac_fn_c_try_compile "$LINENO"; then :
2914 ac_hi=$ac_mid; break
2915 else
2916 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2917 if test $ac_lo -le $ac_mid; then
2918 ac_lo= ac_hi=
2919 break
2920 fi
2921 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2922 fi
2923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2924 done
2925 else
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) < 0)];
2933 test_array [0] = 0
2934
2935 ;
2936 return 0;
2937 }
2938 _ACEOF
2939 if ac_fn_c_try_compile "$LINENO"; then :
2940 ac_hi=-1 ac_mid=-1
2941 while :; do
2942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943 /* end confdefs.h. */
2944 $4
2945 int
2946 main ()
2947 {
2948 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2949 test_array [0] = 0
2950
2951 ;
2952 return 0;
2953 }
2954 _ACEOF
2955 if ac_fn_c_try_compile "$LINENO"; then :
2956 ac_lo=$ac_mid; break
2957 else
2958 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2959 if test $ac_mid -le $ac_hi; then
2960 ac_lo= ac_hi=
2961 break
2962 fi
2963 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2964 fi
2965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2966 done
2967 else
2968 ac_lo= ac_hi=
2969 fi
2970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2971 fi
2972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2973 # Binary search between lo and hi bounds.
2974 while test "x$ac_lo" != "x$ac_hi"; do
2975 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2977 /* end confdefs.h. */
2978 $4
2979 int
2980 main ()
2981 {
2982 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2983 test_array [0] = 0
2984
2985 ;
2986 return 0;
2987 }
2988 _ACEOF
2989 if ac_fn_c_try_compile "$LINENO"; then :
2990 ac_hi=$ac_mid
2991 else
2992 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2993 fi
2994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2995 done
2996 case $ac_lo in #((
2997 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2998 '') ac_retval=1 ;;
2999 esac
3000 else
3001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002 /* end confdefs.h. */
3003 $4
3004 static long int longval () { return $2; }
3005 static unsigned long int ulongval () { return $2; }
3006 #include <stdio.h>
3007 #include <stdlib.h>
3008 int
3009 main ()
3010 {
3011
3012 FILE *f = fopen ("conftest.val", "w");
3013 if (! f)
3014 return 1;
3015 if (($2) < 0)
3016 {
3017 long int i = longval ();
3018 if (i != ($2))
3019 return 1;
3020 fprintf (f, "%ld", i);
3021 }
3022 else
3023 {
3024 unsigned long int i = ulongval ();
3025 if (i != ($2))
3026 return 1;
3027 fprintf (f, "%lu", i);
3028 }
3029 /* Do not output a trailing newline, as this causes \r\n confusion
3030 on some platforms. */
3031 return ferror (f) || fclose (f) != 0;
3032
3033 ;
3034 return 0;
3035 }
3036 _ACEOF
3037 if ac_fn_c_try_run "$LINENO"; then :
3038 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3039 else
3040 ac_retval=1
3041 fi
3042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3043 conftest.$ac_objext conftest.beam conftest.$ac_ext
3044 rm -f conftest.val
3045
3046 fi
3047 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3048 as_fn_set_status $ac_retval
3049
3050 } # ac_fn_c_compute_int
3051 cat >config.log <<_ACEOF
3052 This file contains any messages produced by compilers while
3053 running configure, to aid debugging if configure makes a mistake.
3054
3055 It was created by emacs $as_me 24.3.50, which was
3056 generated by GNU Autoconf 2.65. Invocation command line was
3057
3058 $ $0 $@
3059
3060 _ACEOF
3061 exec 5>>config.log
3062 {
3063 cat <<_ASUNAME
3064 ## --------- ##
3065 ## Platform. ##
3066 ## --------- ##
3067
3068 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3069 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3070 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3071 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3072 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3073
3074 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3075 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3076
3077 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3078 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3079 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3080 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3081 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3082 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3083 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3084
3085 _ASUNAME
3086
3087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088 for as_dir in $PATH
3089 do
3090 IFS=$as_save_IFS
3091 test -z "$as_dir" && as_dir=.
3092 $as_echo "PATH: $as_dir"
3093 done
3094 IFS=$as_save_IFS
3095
3096 } >&5
3097
3098 cat >&5 <<_ACEOF
3099
3100
3101 ## ----------- ##
3102 ## Core tests. ##
3103 ## ----------- ##
3104
3105 _ACEOF
3106
3107
3108 # Keep a trace of the command line.
3109 # Strip out --no-create and --no-recursion so they do not pile up.
3110 # Strip out --silent because we don't want to record it for future runs.
3111 # Also quote any args containing shell meta-characters.
3112 # Make two passes to allow for proper duplicate-argument suppression.
3113 ac_configure_args=
3114 ac_configure_args0=
3115 ac_configure_args1=
3116 ac_must_keep_next=false
3117 for ac_pass in 1 2
3118 do
3119 for ac_arg
3120 do
3121 case $ac_arg in
3122 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3124 | -silent | --silent | --silen | --sile | --sil)
3125 continue ;;
3126 *\'*)
3127 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3128 esac
3129 case $ac_pass in
3130 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3131 2)
3132 as_fn_append ac_configure_args1 " '$ac_arg'"
3133 if test $ac_must_keep_next = true; then
3134 ac_must_keep_next=false # Got value, back to normal.
3135 else
3136 case $ac_arg in
3137 *=* | --config-cache | -C | -disable-* | --disable-* \
3138 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3139 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3140 | -with-* | --with-* | -without-* | --without-* | --x)
3141 case "$ac_configure_args0 " in
3142 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3143 esac
3144 ;;
3145 -* ) ac_must_keep_next=true ;;
3146 esac
3147 fi
3148 as_fn_append ac_configure_args " '$ac_arg'"
3149 ;;
3150 esac
3151 done
3152 done
3153 { ac_configure_args0=; unset ac_configure_args0;}
3154 { ac_configure_args1=; unset ac_configure_args1;}
3155
3156 # When interrupted or exit'd, cleanup temporary files, and complete
3157 # config.log. We remove comments because anyway the quotes in there
3158 # would cause problems or look ugly.
3159 # WARNING: Use '\'' to represent an apostrophe within the trap.
3160 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3161 trap 'exit_status=$?
3162 # Save into config.log some information that might help in debugging.
3163 {
3164 echo
3165
3166 cat <<\_ASBOX
3167 ## ---------------- ##
3168 ## Cache variables. ##
3169 ## ---------------- ##
3170 _ASBOX
3171 echo
3172 # The following way of writing the cache mishandles newlines in values,
3173 (
3174 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3175 eval ac_val=\$$ac_var
3176 case $ac_val in #(
3177 *${as_nl}*)
3178 case $ac_var in #(
3179 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3180 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3181 esac
3182 case $ac_var in #(
3183 _ | IFS | as_nl) ;; #(
3184 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3185 *) { eval $ac_var=; unset $ac_var;} ;;
3186 esac ;;
3187 esac
3188 done
3189 (set) 2>&1 |
3190 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3191 *${as_nl}ac_space=\ *)
3192 sed -n \
3193 "s/'\''/'\''\\\\'\'''\''/g;
3194 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3195 ;; #(
3196 *)
3197 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3198 ;;
3199 esac |
3200 sort
3201 )
3202 echo
3203
3204 cat <<\_ASBOX
3205 ## ----------------- ##
3206 ## Output variables. ##
3207 ## ----------------- ##
3208 _ASBOX
3209 echo
3210 for ac_var in $ac_subst_vars
3211 do
3212 eval ac_val=\$$ac_var
3213 case $ac_val in
3214 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3215 esac
3216 $as_echo "$ac_var='\''$ac_val'\''"
3217 done | sort
3218 echo
3219
3220 if test -n "$ac_subst_files"; then
3221 cat <<\_ASBOX
3222 ## ------------------- ##
3223 ## File substitutions. ##
3224 ## ------------------- ##
3225 _ASBOX
3226 echo
3227 for ac_var in $ac_subst_files
3228 do
3229 eval ac_val=\$$ac_var
3230 case $ac_val in
3231 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3232 esac
3233 $as_echo "$ac_var='\''$ac_val'\''"
3234 done | sort
3235 echo
3236 fi
3237
3238 if test -s confdefs.h; then
3239 cat <<\_ASBOX
3240 ## ----------- ##
3241 ## confdefs.h. ##
3242 ## ----------- ##
3243 _ASBOX
3244 echo
3245 cat confdefs.h
3246 echo
3247 fi
3248 test "$ac_signal" != 0 &&
3249 $as_echo "$as_me: caught signal $ac_signal"
3250 $as_echo "$as_me: exit $exit_status"
3251 } >&5
3252 rm -f core *.core core.conftest.* &&
3253 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3254 exit $exit_status
3255 ' 0
3256 for ac_signal in 1 2 13 15; do
3257 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3258 done
3259 ac_signal=0
3260
3261 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3262 rm -f -r conftest* confdefs.h
3263
3264 $as_echo "/* confdefs.h */" > confdefs.h
3265
3266 # Predefined preprocessor variables.
3267
3268 cat >>confdefs.h <<_ACEOF
3269 #define PACKAGE_NAME "$PACKAGE_NAME"
3270 _ACEOF
3271
3272 cat >>confdefs.h <<_ACEOF
3273 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3274 _ACEOF
3275
3276 cat >>confdefs.h <<_ACEOF
3277 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3278 _ACEOF
3279
3280 cat >>confdefs.h <<_ACEOF
3281 #define PACKAGE_STRING "$PACKAGE_STRING"
3282 _ACEOF
3283
3284 cat >>confdefs.h <<_ACEOF
3285 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3286 _ACEOF
3287
3288 cat >>confdefs.h <<_ACEOF
3289 #define PACKAGE_URL "$PACKAGE_URL"
3290 _ACEOF
3291
3292
3293 # Let the site file select an alternate cache file if it wants to.
3294 # Prefer an explicitly selected file to automatically selected ones.
3295 ac_site_file1=NONE
3296 ac_site_file2=NONE
3297 if test -n "$CONFIG_SITE"; then
3298 ac_site_file1=$CONFIG_SITE
3299 elif test "x$prefix" != xNONE; then
3300 ac_site_file1=$prefix/share/config.site
3301 ac_site_file2=$prefix/etc/config.site
3302 else
3303 ac_site_file1=$ac_default_prefix/share/config.site
3304 ac_site_file2=$ac_default_prefix/etc/config.site
3305 fi
3306 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3307 do
3308 test "x$ac_site_file" = xNONE && continue
3309 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3311 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3312 sed 's/^/| /' "$ac_site_file" >&5
3313 . "$ac_site_file"
3314 fi
3315 done
3316
3317 if test -r "$cache_file"; then
3318 # Some versions of bash will fail to source /dev/null (special files
3319 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3320 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3322 $as_echo "$as_me: loading cache $cache_file" >&6;}
3323 case $cache_file in
3324 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3325 *) . "./$cache_file";;
3326 esac
3327 fi
3328 else
3329 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3330 $as_echo "$as_me: creating cache $cache_file" >&6;}
3331 >$cache_file
3332 fi
3333
3334 as_fn_append ac_header_list " linux/version.h"
3335 as_fn_append ac_header_list " sys/systeminfo.h"
3336 as_fn_append ac_header_list " coff.h"
3337 as_fn_append ac_header_list " pty.h"
3338 as_fn_append ac_header_list " sys/resource.h"
3339 as_fn_append ac_header_list " sys/utsname.h"
3340 as_fn_append ac_header_list " pwd.h"
3341 as_fn_append ac_header_list " utmp.h"
3342 as_fn_append ac_header_list " util.h"
3343 as_fn_append ac_header_list " sys/socket.h"
3344 as_fn_append ac_header_list " stdlib.h"
3345 as_fn_append ac_header_list " unistd.h"
3346 as_fn_append ac_header_list " sys/param.h"
3347 as_fn_append ac_header_list " pthread.h"
3348 as_fn_append ac_header_list " malloc/malloc.h"
3349 as_fn_append ac_header_list " maillock.h"
3350 as_fn_append ac_header_list " sys/un.h"
3351 as_fn_append ac_func_list " tzset"
3352 as_fn_append ac_func_list " readlinkat"
3353 as_fn_append ac_header_list " dirent.h"
3354 as_fn_append ac_header_list " execinfo.h"
3355 as_fn_append ac_func_list " faccessat"
3356 as_fn_append ac_func_list " fdopendir"
3357 as_fn_append ac_header_list " stdio_ext.h"
3358 as_fn_append ac_func_list " __fpending"
3359 as_fn_append ac_func_list " fstatat"
3360 as_fn_append ac_func_list " fsync"
3361 gl_getopt_required=GNU
3362 as_fn_append ac_header_list " getopt.h"
3363 as_fn_append ac_func_list " gettimeofday"
3364 as_fn_append ac_func_list " nanotime"
3365 as_fn_append ac_header_list " sys/time.h"
3366 as_fn_append ac_header_list " wchar.h"
3367 as_fn_append ac_header_list " stdint.h"
3368 as_fn_append ac_header_list " inttypes.h"
3369 as_fn_append ac_func_list " lstat"
3370 as_fn_append ac_header_list " sys/select.h"
3371 as_fn_append ac_func_list " pselect"
3372 as_fn_append ac_func_list " pthread_sigmask"
3373 as_fn_append ac_func_list " readlink"
3374 as_fn_append ac_func_list " strtoimax"
3375 as_fn_append ac_func_list " strtoumax"
3376 as_fn_append ac_func_list " symlink"
3377 as_fn_append ac_header_list " sys/stat.h"
3378 as_fn_append ac_func_list " localtime_r"
3379 as_fn_append ac_header_list " utime.h"
3380 as_fn_append ac_func_list " futimes"
3381 as_fn_append ac_func_list " futimesat"
3382 as_fn_append ac_func_list " futimens"
3383 as_fn_append ac_func_list " utimensat"
3384 as_fn_append ac_func_list " lutimes"
3385 # Check that the precious variables saved in the cache have kept the same
3386 # value.
3387 ac_cache_corrupted=false
3388 for ac_var in $ac_precious_vars; do
3389 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3390 eval ac_new_set=\$ac_env_${ac_var}_set
3391 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3392 eval ac_new_val=\$ac_env_${ac_var}_value
3393 case $ac_old_set,$ac_new_set in
3394 set,)
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3396 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3397 ac_cache_corrupted=: ;;
3398 ,set)
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3400 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3401 ac_cache_corrupted=: ;;
3402 ,);;
3403 *)
3404 if test "x$ac_old_val" != "x$ac_new_val"; then
3405 # differences in whitespace do not lead to failure.
3406 ac_old_val_w=`echo x $ac_old_val`
3407 ac_new_val_w=`echo x $ac_new_val`
3408 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3410 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3411 ac_cache_corrupted=:
3412 else
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3414 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3415 eval $ac_var=\$ac_old_val
3416 fi
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3418 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3420 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3421 fi;;
3422 esac
3423 # Pass precious variables to config.status.
3424 if test "$ac_new_set" = set; then
3425 case $ac_new_val in
3426 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3427 *) ac_arg=$ac_var=$ac_new_val ;;
3428 esac
3429 case " $ac_configure_args " in
3430 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3431 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3432 esac
3433 fi
3434 done
3435 if $ac_cache_corrupted; then
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3437 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3439 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3440 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3441 fi
3442 ## -------------------- ##
3443 ## Main body of script. ##
3444 ## -------------------- ##
3445
3446 ac_ext=c
3447 ac_cpp='$CPP $CPPFLAGS'
3448 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3449 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3450 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3451
3452
3453
3454 emacs_config_options="$@"
3455 ## Add some environment variables, if they were passed via the environment
3456 ## rather than on the command-line.
3457 for var in CFLAGS CPPFLAGS LDFLAGS; do
3458 case "$emacs_config_options" in
3459 *$var=*) continue ;;
3460 esac
3461 eval val="\$${var}"
3462 test x"$val" = x && continue
3463 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
3464 done
3465
3466 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3467
3468
3469 ac_aux_dir=
3470 for ac_dir in build-aux "$srcdir"/build-aux; do
3471 for ac_t in install-sh install.sh shtool; do
3472 if test -f "$ac_dir/$ac_t"; then
3473 ac_aux_dir=$ac_dir
3474 ac_install_sh="$ac_aux_dir/$ac_t -c"
3475 break 2
3476 fi
3477 done
3478 done
3479 if test -z "$ac_aux_dir"; then
3480 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3481 fi
3482
3483 # These three variables are undocumented and unsupported,
3484 # and are intended to be withdrawn in a future Autoconf release.
3485 # They can cause serious problems if a builder's source tree is in a directory
3486 # whose full name contains unusual characters.
3487 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3488 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3489 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3490
3491
3492 am__api_version='1.11'
3493
3494 # Find a good install program. We prefer a C program (faster),
3495 # so one script is as good as another. But avoid the broken or
3496 # incompatible versions:
3497 # SysV /etc/install, /usr/sbin/install
3498 # SunOS /usr/etc/install
3499 # IRIX /sbin/install
3500 # AIX /bin/install
3501 # AmigaOS /C/install, which installs bootblocks on floppy discs
3502 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3503 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3504 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3505 # OS/2's system install, which has a completely different semantic
3506 # ./install, which can be erroneously created by make from ./install.sh.
3507 # Reject install programs that cannot install multiple files.
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3509 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3510 if test -z "$INSTALL"; then
3511 if test "${ac_cv_path_install+set}" = set; then :
3512 $as_echo_n "(cached) " >&6
3513 else
3514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515 for as_dir in $PATH
3516 do
3517 IFS=$as_save_IFS
3518 test -z "$as_dir" && as_dir=.
3519 # Account for people who put trailing slashes in PATH elements.
3520 case $as_dir/ in #((
3521 ./ | .// | /[cC]/* | \
3522 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3523 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3524 /usr/ucb/* ) ;;
3525 *)
3526 # OSF1 and SCO ODT 3.0 have their own names for install.
3527 # Don't use installbsd from OSF since it installs stuff as root
3528 # by default.
3529 for ac_prog in ginstall scoinst install; do
3530 for ac_exec_ext in '' $ac_executable_extensions; do
3531 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3532 if test $ac_prog = install &&
3533 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3534 # AIX install. It has an incompatible calling convention.
3535 :
3536 elif test $ac_prog = install &&
3537 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3538 # program-specific install script used by HP pwplus--don't use.
3539 :
3540 else
3541 rm -rf conftest.one conftest.two conftest.dir
3542 echo one > conftest.one
3543 echo two > conftest.two
3544 mkdir conftest.dir
3545 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3546 test -s conftest.one && test -s conftest.two &&
3547 test -s conftest.dir/conftest.one &&
3548 test -s conftest.dir/conftest.two
3549 then
3550 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3551 break 3
3552 fi
3553 fi
3554 fi
3555 done
3556 done
3557 ;;
3558 esac
3559
3560 done
3561 IFS=$as_save_IFS
3562
3563 rm -rf conftest.one conftest.two conftest.dir
3564
3565 fi
3566 if test "${ac_cv_path_install+set}" = set; then
3567 INSTALL=$ac_cv_path_install
3568 else
3569 # As a last resort, use the slow shell script. Don't cache a
3570 # value for INSTALL within a source directory, because that will
3571 # break other packages using the cache if that directory is
3572 # removed, or if the value is a relative name.
3573 INSTALL=$ac_install_sh
3574 fi
3575 fi
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3577 $as_echo "$INSTALL" >&6; }
3578
3579 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3580 # It thinks the first close brace ends the variable substitution.
3581 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3582
3583 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3584
3585 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3586
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3588 $as_echo_n "checking whether build environment is sane... " >&6; }
3589 # Just in case
3590 sleep 1
3591 echo timestamp > conftest.file
3592 # Reject unsafe characters in $srcdir or the absolute working directory
3593 # name. Accept space and tab only in the latter.
3594 am_lf='
3595 '
3596 case `pwd` in
3597 *[\\\"\#\$\&\'\`$am_lf]*)
3598 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3599 esac
3600 case $srcdir in
3601 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3602 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3603 esac
3604
3605 # Do `set' in a subshell so we don't clobber the current shell's
3606 # arguments. Must try -L first in case configure is actually a
3607 # symlink; some systems play weird games with the mod time of symlinks
3608 # (eg FreeBSD returns the mod time of the symlink's containing
3609 # directory).
3610 if (
3611 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3612 if test "$*" = "X"; then
3613 # -L didn't work.
3614 set X `ls -t "$srcdir/configure" conftest.file`
3615 fi
3616 rm -f conftest.file
3617 if test "$*" != "X $srcdir/configure conftest.file" \
3618 && test "$*" != "X conftest.file $srcdir/configure"; then
3619
3620 # If neither matched, then we have a broken ls. This can happen
3621 # if, for instance, CONFIG_SHELL is bash and it inherits a
3622 # broken ls alias from the environment. This has actually
3623 # happened. Such a system could not be considered "sane".
3624 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3625 alias in your environment" "$LINENO" 5
3626 fi
3627
3628 test "$2" = conftest.file
3629 )
3630 then
3631 # Ok.
3632 :
3633 else
3634 as_fn_error "newly created file is older than distributed files!
3635 Check your system clock" "$LINENO" 5
3636 fi
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3638 $as_echo "yes" >&6; }
3639 test "$program_prefix" != NONE &&
3640 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3641 # Use a double $ so make ignores it.
3642 test "$program_suffix" != NONE &&
3643 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3644 # Double any \ or $.
3645 # By default was `s,x,x', remove it if useless.
3646 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3647 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3648
3649 # expand $ac_aux_dir to an absolute path
3650 am_aux_dir=`cd $ac_aux_dir && pwd`
3651
3652 if test x"${MISSING+set}" != xset; then
3653 case $am_aux_dir in
3654 *\ * | *\ *)
3655 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3656 *)
3657 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3658 esac
3659 fi
3660 # Use eval to expand $SHELL
3661 if eval "$MISSING --run true"; then
3662 am_missing_run="$MISSING --run "
3663 else
3664 am_missing_run=
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3666 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3667 fi
3668
3669 if test x"${install_sh}" != xset; then
3670 case $am_aux_dir in
3671 *\ * | *\ *)
3672 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3673 *)
3674 install_sh="\${SHELL} $am_aux_dir/install-sh"
3675 esac
3676 fi
3677
3678 # Installed binaries are usually stripped using `strip' when the user
3679 # run `make install-strip'. However `strip' might not be the right
3680 # tool to use in cross-compilation environments, therefore Automake
3681 # will honor the `STRIP' environment variable to overrule this program.
3682 if test "$cross_compiling" != no; then
3683 if test -n "$ac_tool_prefix"; then
3684 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3685 set dummy ${ac_tool_prefix}strip; ac_word=$2
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3687 $as_echo_n "checking for $ac_word... " >&6; }
3688 if test "${ac_cv_prog_STRIP+set}" = set; then :
3689 $as_echo_n "(cached) " >&6
3690 else
3691 if test -n "$STRIP"; then
3692 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3693 else
3694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695 for as_dir in $PATH
3696 do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
3699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3701 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3703 break 2
3704 fi
3705 done
3706 done
3707 IFS=$as_save_IFS
3708
3709 fi
3710 fi
3711 STRIP=$ac_cv_prog_STRIP
3712 if test -n "$STRIP"; then
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3714 $as_echo "$STRIP" >&6; }
3715 else
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717 $as_echo "no" >&6; }
3718 fi
3719
3720
3721 fi
3722 if test -z "$ac_cv_prog_STRIP"; then
3723 ac_ct_STRIP=$STRIP
3724 # Extract the first word of "strip", so it can be a program name with args.
3725 set dummy strip; ac_word=$2
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727 $as_echo_n "checking for $ac_word... " >&6; }
3728 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3729 $as_echo_n "(cached) " >&6
3730 else
3731 if test -n "$ac_ct_STRIP"; then
3732 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3733 else
3734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735 for as_dir in $PATH
3736 do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
3739 for ac_exec_ext in '' $ac_executable_extensions; do
3740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3741 ac_cv_prog_ac_ct_STRIP="strip"
3742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3743 break 2
3744 fi
3745 done
3746 done
3747 IFS=$as_save_IFS
3748
3749 fi
3750 fi
3751 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3752 if test -n "$ac_ct_STRIP"; then
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3754 $as_echo "$ac_ct_STRIP" >&6; }
3755 else
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757 $as_echo "no" >&6; }
3758 fi
3759
3760 if test "x$ac_ct_STRIP" = x; then
3761 STRIP=":"
3762 else
3763 case $cross_compiling:$ac_tool_warned in
3764 yes:)
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3766 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3767 ac_tool_warned=yes ;;
3768 esac
3769 STRIP=$ac_ct_STRIP
3770 fi
3771 else
3772 STRIP="$ac_cv_prog_STRIP"
3773 fi
3774
3775 fi
3776 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3777
3778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3779 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3780 if test -z "$MKDIR_P"; then
3781 if test "${ac_cv_path_mkdir+set}" = set; then :
3782 $as_echo_n "(cached) " >&6
3783 else
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3786 do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_prog in mkdir gmkdir; do
3790 for ac_exec_ext in '' $ac_executable_extensions; do
3791 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3792 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3793 'mkdir (GNU coreutils) '* | \
3794 'mkdir (coreutils) '* | \
3795 'mkdir (fileutils) '4.1*)
3796 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3797 break 3;;
3798 esac
3799 done
3800 done
3801 done
3802 IFS=$as_save_IFS
3803
3804 fi
3805
3806 test -d ./--version && rmdir ./--version
3807 if test "${ac_cv_path_mkdir+set}" = set; then
3808 MKDIR_P="$ac_cv_path_mkdir -p"
3809 else
3810 # As a last resort, use the slow shell script. Don't cache a
3811 # value for MKDIR_P within a source directory, because that will
3812 # break other packages using the cache if that directory is
3813 # removed, or if the value is a relative name.
3814 MKDIR_P="$ac_install_sh -d"
3815 fi
3816 fi
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3818 $as_echo "$MKDIR_P" >&6; }
3819
3820 mkdir_p="$MKDIR_P"
3821 case $mkdir_p in
3822 [\\/$]* | ?:[\\/]*) ;;
3823 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3824 esac
3825
3826 for ac_prog in gawk mawk nawk awk
3827 do
3828 # Extract the first word of "$ac_prog", so it can be a program name with args.
3829 set dummy $ac_prog; ac_word=$2
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831 $as_echo_n "checking for $ac_word... " >&6; }
3832 if test "${ac_cv_prog_AWK+set}" = set; then :
3833 $as_echo_n "(cached) " >&6
3834 else
3835 if test -n "$AWK"; then
3836 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3837 else
3838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839 for as_dir in $PATH
3840 do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
3843 for ac_exec_ext in '' $ac_executable_extensions; do
3844 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3845 ac_cv_prog_AWK="$ac_prog"
3846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3847 break 2
3848 fi
3849 done
3850 done
3851 IFS=$as_save_IFS
3852
3853 fi
3854 fi
3855 AWK=$ac_cv_prog_AWK
3856 if test -n "$AWK"; then
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3858 $as_echo "$AWK" >&6; }
3859 else
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861 $as_echo "no" >&6; }
3862 fi
3863
3864
3865 test -n "$AWK" && break
3866 done
3867
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3869 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3870 set x ${MAKE-make}
3871 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3872 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3873 $as_echo_n "(cached) " >&6
3874 else
3875 cat >conftest.make <<\_ACEOF
3876 SHELL = /bin/sh
3877 all:
3878 @echo '@@@%%%=$(MAKE)=@@@%%%'
3879 _ACEOF
3880 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3881 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3882 *@@@%%%=?*=@@@%%%*)
3883 eval ac_cv_prog_make_${ac_make}_set=yes;;
3884 *)
3885 eval ac_cv_prog_make_${ac_make}_set=no;;
3886 esac
3887 rm -f conftest.make
3888 fi
3889 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3891 $as_echo "yes" >&6; }
3892 SET_MAKE=
3893 else
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895 $as_echo "no" >&6; }
3896 SET_MAKE="MAKE=${MAKE-make}"
3897 fi
3898
3899 rm -rf .tst 2>/dev/null
3900 mkdir .tst 2>/dev/null
3901 if test -d .tst; then
3902 am__leading_dot=.
3903 else
3904 am__leading_dot=_
3905 fi
3906 rmdir .tst 2>/dev/null
3907
3908 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3909 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3910 # is not polluted with repeated "-I."
3911 am__isrc=' -I$(srcdir)'
3912 # test to see if srcdir already configured
3913 if test -f $srcdir/config.status; then
3914 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3915 fi
3916 fi
3917
3918 # test whether we have cygpath
3919 if test -z "$CYGPATH_W"; then
3920 if (cygpath --version) >/dev/null 2>/dev/null; then
3921 CYGPATH_W='cygpath -w'
3922 else
3923 CYGPATH_W=echo
3924 fi
3925 fi
3926
3927
3928 # Define the identity of the package.
3929 PACKAGE='emacs'
3930 VERSION='24.3.50'
3931
3932
3933 cat >>confdefs.h <<_ACEOF
3934 #define PACKAGE "$PACKAGE"
3935 _ACEOF
3936
3937
3938 cat >>confdefs.h <<_ACEOF
3939 #define VERSION "$VERSION"
3940 _ACEOF
3941
3942 # Some tools Automake needs.
3943
3944 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3945
3946
3947 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3948
3949
3950 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3951
3952
3953 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3954
3955
3956 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3957
3958 # We need awk for the "check" target. The system "awk" is bad on
3959 # some platforms.
3960 # Always define AMTAR for backward compatibility.
3961
3962 AMTAR=${AMTAR-"${am_missing_run}tar"}
3963
3964 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3965
3966
3967
3968
3969
3970
3971
3972
3973 lispdir='${datadir}/emacs/${version}/lisp'
3974 leimdir='${datadir}/emacs/${version}/leim'
3975 standardlisppath='${lispdir}:${leimdir}'
3976 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3977 '${datadir}/emacs/site-lisp'
3978 lisppath='${locallisppath}:${standardlisppath}'
3979 etcdir='${datadir}/emacs/${version}/etc'
3980 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3981 docdir='${datadir}/emacs/${version}/etc'
3982 gamedir='${localstatedir}/games/emacs'
3983
3984
3985 # Check whether --with-all was given.
3986 if test "${with_all+set}" = set; then :
3987 withval=$with_all; with_features=$withval
3988 else
3989 with_features=yes
3990 fi
3991
3992
3993
3994
3995
3996 # Check whether --with-pop was given.
3997 if test "${with_pop+set}" = set; then :
3998 withval=$with_pop;
3999 else
4000 with_pop=$with_features
4001 fi
4002
4003 if test "$with_pop" = yes; then
4004 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4005
4006 fi
4007
4008
4009 # Check whether --with-kerberos was given.
4010 if test "${with_kerberos+set}" = set; then :
4011 withval=$with_kerberos;
4012 else
4013 with_kerberos=no
4014 fi
4015
4016 if test "$with_kerberos" != no; then
4017 $as_echo "#define KERBEROS 1" >>confdefs.h
4018
4019 fi
4020
4021
4022 # Check whether --with-kerberos5 was given.
4023 if test "${with_kerberos5+set}" = set; then :
4024 withval=$with_kerberos5;
4025 else
4026 with_kerberos5=no
4027 fi
4028
4029 if test "${with_kerberos5}" != no; then
4030 if test "${with_kerberos}" = no; then
4031 with_kerberos=yes
4032 $as_echo "#define KERBEROS 1" >>confdefs.h
4033
4034 fi
4035
4036 $as_echo "#define KERBEROS5 1" >>confdefs.h
4037
4038 fi
4039
4040
4041 # Check whether --with-hesiod was given.
4042 if test "${with_hesiod+set}" = set; then :
4043 withval=$with_hesiod;
4044 else
4045 with_hesiod=no
4046 fi
4047
4048 if test "$with_hesiod" != no; then
4049
4050 $as_echo "#define HESIOD 1" >>confdefs.h
4051
4052 fi
4053
4054
4055 # Check whether --with-mmdf was given.
4056 if test "${with_mmdf+set}" = set; then :
4057 withval=$with_mmdf;
4058 else
4059 with_mmdf=no
4060 fi
4061
4062 if test "$with_mmdf" != no; then
4063
4064 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4065
4066 fi
4067
4068
4069 # Check whether --with-mail-unlink was given.
4070 if test "${with_mail_unlink+set}" = set; then :
4071 withval=$with_mail_unlink;
4072 else
4073 with_mail_unlink=no
4074 fi
4075
4076 if test "$with_mail_unlink" != no; then
4077
4078 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4079
4080 fi
4081
4082
4083 # Check whether --with-mailhost was given.
4084 if test "${with_mailhost+set}" = set; then :
4085 withval=$with_mailhost;
4086 cat >>confdefs.h <<_ACEOF
4087 #define MAILHOST "$withval"
4088 _ACEOF
4089
4090 fi
4091
4092
4093
4094 # Check whether --with-sound was given.
4095 if test "${with_sound+set}" = set; then :
4096 withval=$with_sound;
4097 else
4098 with_sound=$with_features
4099 fi
4100
4101
4102
4103 # Check whether --with-x-toolkit was given.
4104 if test "${with_x_toolkit+set}" = set; then :
4105 withval=$with_x_toolkit; case "${withval}" in
4106 y | ye | yes ) val=gtk ;;
4107 n | no ) val=no ;;
4108 l | lu | luc | luci | lucid ) val=lucid ;;
4109 a | at | ath | athe | athen | athena ) val=athena ;;
4110 m | mo | mot | moti | motif ) val=motif ;;
4111 g | gt | gtk ) val=gtk ;;
4112 gtk2 ) val=gtk2 ;;
4113 gtk3 ) val=gtk3 ;;
4114 * )
4115 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4116 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4117 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4118 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4119 ;;
4120 esac
4121 with_x_toolkit=$val
4122
4123 fi
4124
4125
4126
4127 # Check whether --with-wide-int was given.
4128 if test "${with_wide_int+set}" = set; then :
4129 withval=$with_wide_int;
4130 else
4131 with_wide_int=no
4132 fi
4133
4134 if test "$with_wide_int" = yes; then
4135
4136 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4137
4138 fi
4139
4140
4141 # Check whether --with-xpm was given.
4142 if test "${with_xpm+set}" = set; then :
4143 withval=$with_xpm;
4144 else
4145 with_xpm=$with_features
4146 fi
4147
4148
4149 # Check whether --with-jpeg was given.
4150 if test "${with_jpeg+set}" = set; then :
4151 withval=$with_jpeg;
4152 else
4153 with_jpeg=$with_features
4154 fi
4155
4156
4157 # Check whether --with-tiff was given.
4158 if test "${with_tiff+set}" = set; then :
4159 withval=$with_tiff;
4160 else
4161 with_tiff=$with_features
4162 fi
4163
4164
4165 # Check whether --with-gif was given.
4166 if test "${with_gif+set}" = set; then :
4167 withval=$with_gif;
4168 else
4169 with_gif=$with_features
4170 fi
4171
4172
4173 # Check whether --with-png was given.
4174 if test "${with_png+set}" = set; then :
4175 withval=$with_png;
4176 else
4177 with_png=$with_features
4178 fi
4179
4180
4181 # Check whether --with-rsvg was given.
4182 if test "${with_rsvg+set}" = set; then :
4183 withval=$with_rsvg;
4184 else
4185 with_rsvg=$with_features
4186 fi
4187
4188
4189 # Check whether --with-xml2 was given.
4190 if test "${with_xml2+set}" = set; then :
4191 withval=$with_xml2;
4192 else
4193 with_xml2=$with_features
4194 fi
4195
4196
4197 # Check whether --with-imagemagick was given.
4198 if test "${with_imagemagick+set}" = set; then :
4199 withval=$with_imagemagick;
4200 else
4201 with_imagemagick=$with_features
4202 fi
4203
4204
4205
4206 # Check whether --with-xft was given.
4207 if test "${with_xft+set}" = set; then :
4208 withval=$with_xft;
4209 else
4210 with_xft=$with_features
4211 fi
4212
4213
4214 # Check whether --with-libotf was given.
4215 if test "${with_libotf+set}" = set; then :
4216 withval=$with_libotf;
4217 else
4218 with_libotf=$with_features
4219 fi
4220
4221
4222 # Check whether --with-m17n-flt was given.
4223 if test "${with_m17n_flt+set}" = set; then :
4224 withval=$with_m17n_flt;
4225 else
4226 with_m17n_flt=$with_features
4227 fi
4228
4229
4230
4231 # Check whether --with-toolkit-scroll-bars was given.
4232 if test "${with_toolkit_scroll_bars+set}" = set; then :
4233 withval=$with_toolkit_scroll_bars;
4234 else
4235 with_toolkit_scroll_bars=$with_features
4236 fi
4237
4238
4239 # Check whether --with-xaw3d was given.
4240 if test "${with_xaw3d+set}" = set; then :
4241 withval=$with_xaw3d;
4242 else
4243 with_xaw3d=$with_features
4244 fi
4245
4246
4247 # Check whether --with-xim was given.
4248 if test "${with_xim+set}" = set; then :
4249 withval=$with_xim;
4250 else
4251 with_xim=$with_features
4252 fi
4253
4254
4255 # Check whether --with-ns was given.
4256 if test "${with_ns+set}" = set; then :
4257 withval=$with_ns;
4258 else
4259 with_ns=no
4260 fi
4261
4262
4263 # Check whether --with-w32 was given.
4264 if test "${with_w32+set}" = set; then :
4265 withval=$with_w32;
4266 else
4267 with_w32=no
4268 fi
4269
4270
4271
4272 # Check whether --with-gpm was given.
4273 if test "${with_gpm+set}" = set; then :
4274 withval=$with_gpm;
4275 else
4276 with_gpm=$with_features
4277 fi
4278
4279
4280 # Check whether --with-dbus was given.
4281 if test "${with_dbus+set}" = set; then :
4282 withval=$with_dbus;
4283 else
4284 with_dbus=$with_features
4285 fi
4286
4287
4288 # Check whether --with-gconf was given.
4289 if test "${with_gconf+set}" = set; then :
4290 withval=$with_gconf;
4291 else
4292 with_gconf=$with_features
4293 fi
4294
4295
4296 # Check whether --with-gsettings was given.
4297 if test "${with_gsettings+set}" = set; then :
4298 withval=$with_gsettings;
4299 else
4300 with_gsettings=$with_features
4301 fi
4302
4303
4304 # Check whether --with-selinux was given.
4305 if test "${with_selinux+set}" = set; then :
4306 withval=$with_selinux;
4307 else
4308 with_selinux=$with_features
4309 fi
4310
4311
4312 # Check whether --with-gnutls was given.
4313 if test "${with_gnutls+set}" = set; then :
4314 withval=$with_gnutls;
4315 else
4316 with_gnutls=$with_features
4317 fi
4318
4319
4320 # Check whether --with-inotify was given.
4321 if test "${with_inotify+set}" = set; then :
4322 withval=$with_inotify;
4323 else
4324 with_inotify=$with_features
4325 fi
4326
4327
4328 ## For the times when you want to build Emacs but don't have
4329 ## a suitable makeinfo, and can live without the manuals.
4330
4331 # Check whether --with-makeinfo was given.
4332 if test "${with_makeinfo+set}" = set; then :
4333 withval=$with_makeinfo;
4334 else
4335 with_makeinfo=$with_features
4336 fi
4337
4338
4339 ## Makefile.in needs the cache file name.
4340
4341
4342 ## This is an option because I do not know if all info/man support
4343 ## compressed files, nor how to test if they do so.
4344
4345 # Check whether --with-compress-info was given.
4346 if test "${with_compress_info+set}" = set; then :
4347 withval=$with_compress_info;
4348 else
4349 with_compress_info=$with_features
4350 fi
4351
4352 if test $with_compress_info = yes; then
4353 GZIP_INFO=yes
4354 else
4355 GZIP_INFO=
4356 fi
4357
4358
4359
4360 # Check whether --with-pkg-config-prog was given.
4361 if test "${with_pkg_config_prog+set}" = set; then :
4362 withval=$with_pkg_config_prog;
4363 fi
4364
4365 if test "X${with_pkg_config_prog}" != X; then
4366 if test "${with_pkg_config_prog}" != yes; then
4367 PKG_CONFIG="${with_pkg_config_prog}"
4368 fi
4369 fi
4370
4371
4372 # Check whether --with-gameuser was given.
4373 if test "${with_gameuser+set}" = set; then :
4374 withval=$with_gameuser;
4375 fi
4376
4377 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4378 && gameuser="${with_gameuser}"
4379 test "X$gameuser" = X && gameuser=games
4380
4381
4382 # Check whether --with-gnustep-conf was given.
4383 if test "${with_gnustep_conf+set}" = set; then :
4384 withval=$with_gnustep_conf;
4385 fi
4386
4387 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4388 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4389 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4390 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4391
4392 # Check whether --enable-ns-self-contained was given.
4393 if test "${enable_ns_self_contained+set}" = set; then :
4394 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4395 else
4396 EN_NS_SELF_CONTAINED=yes
4397 fi
4398
4399
4400 # Check whether --enable-locallisppath was given.
4401 if test "${enable_locallisppath+set}" = set; then :
4402 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4403 locallisppath=
4404 elif test "${enableval}" != "yes"; then
4405 locallisppath=${enableval}
4406 fi
4407 fi
4408
4409
4410 # Check whether --enable-checking was given.
4411 if test "${enable_checking+set}" = set; then :
4412 enableval=$enable_checking; ac_checking_flags="${enableval}"
4413 fi
4414
4415 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4416 for check in $ac_checking_flags
4417 do
4418 case $check in
4419 # these set all the flags to specific states
4420 yes) ac_enable_checking=1 ;;
4421 no) ac_enable_checking= ;
4422 ac_gc_check_stringbytes= ;
4423 ac_gc_check_string_overrun= ;
4424 ac_gc_check_string_free_list= ;
4425 ac_xmalloc_overrun= ;
4426 ac_gc_check_cons_list= ;
4427 ac_glyphs_debug= ;;
4428 all) ac_enable_checking=1 ;
4429 ac_gc_check_stringbytes=1 ;
4430 ac_gc_check_string_overrun=1 ;
4431 ac_gc_check_string_free_list=1 ;
4432 ac_xmalloc_overrun=1 ;
4433 ac_gc_check_cons_list=1 ;
4434 ac_glyphs_debug=1 ;;
4435 # these enable particular checks
4436 stringbytes) ac_gc_check_stringbytes=1 ;;
4437 stringoverrun) ac_gc_check_string_overrun=1 ;;
4438 stringfreelist) ac_gc_check_string_free_list=1 ;;
4439 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4440 conslist) ac_gc_check_cons_list=1 ;;
4441 glyphs) ac_glyphs_debug=1 ;;
4442 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4443 esac
4444 done
4445 IFS="$ac_save_IFS"
4446
4447 if test x$ac_enable_checking != x ; then
4448
4449 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4450
4451 fi
4452 if test x$ac_gc_check_stringbytes != x ; then
4453
4454 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4455
4456 fi
4457 if test x$ac_gc_check_string_overrun != x ; then
4458
4459 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4460
4461 fi
4462 if test x$ac_gc_check_string_free_list != x ; then
4463
4464 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4465
4466 fi
4467 if test x$ac_xmalloc_overrun != x ; then
4468
4469 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4470
4471 fi
4472 if test x$ac_gc_check_cons_list != x ; then
4473
4474 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4475
4476 fi
4477 if test x$ac_glyphs_debug != x ; then
4478
4479 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4480
4481 fi
4482
4483 # Check whether --enable-check-lisp-object-type was given.
4484 if test "${enable_check_lisp_object_type+set}" = set; then :
4485 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4486
4487 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4488
4489 fi
4490 fi
4491
4492
4493
4494 # Check whether --enable-profiling was given.
4495 if test "${enable_profiling+set}" = set; then :
4496 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4497 fi
4498
4499 if test x$ac_enable_profiling != x ; then
4500 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4501 else
4502 PROFILING_CFLAGS=
4503 fi
4504
4505
4506 # Check whether --enable-autodepend was given.
4507 if test "${enable_autodepend+set}" = set; then :
4508 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4509 else
4510 ac_enable_autodepend=yes
4511 fi
4512
4513
4514 # Check whether --enable-gtk-deprecation-warnings was given.
4515 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4516 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4517 fi
4518
4519
4520 #### Make srcdir absolute, if it isn't already. It's important to
4521 #### avoid running the file name through pwd unnecessarily, since pwd can
4522 #### give you automounter prefixes, which can go away. We do all this
4523 #### so Emacs can find its files when run uninstalled.
4524 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4525 unset CDPATH
4526 case "${srcdir}" in
4527 /* ) ;;
4528 . )
4529 ## We may be able to use the $PWD environment variable to make this
4530 ## absolute. But sometimes PWD is inaccurate.
4531 ## Note: we used to use $PWD at the end instead of `pwd`,
4532 ## but that tested only for a well-formed and valid PWD,
4533 ## it did not object when PWD was well-formed and valid but just wrong.
4534 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4535 then
4536 srcdir="$PWD"
4537 else
4538 srcdir=`(cd "$srcdir"; pwd)`
4539 fi
4540 ;;
4541 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4542 esac
4543
4544 ### Canonicalize the configuration name.
4545
4546 # Make sure we can run config.sub.
4547 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4548 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4549
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4551 $as_echo_n "checking build system type... " >&6; }
4552 if test "${ac_cv_build+set}" = set; then :
4553 $as_echo_n "(cached) " >&6
4554 else
4555 ac_build_alias=$build_alias
4556 test "x$ac_build_alias" = x &&
4557 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4558 test "x$ac_build_alias" = x &&
4559 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4560 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4561 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4562
4563 fi
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4565 $as_echo "$ac_cv_build" >&6; }
4566 case $ac_cv_build in
4567 *-*-*) ;;
4568 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4569 esac
4570 build=$ac_cv_build
4571 ac_save_IFS=$IFS; IFS='-'
4572 set x $ac_cv_build
4573 shift
4574 build_cpu=$1
4575 build_vendor=$2
4576 shift; shift
4577 # Remember, the first character of IFS is used to create $*,
4578 # except with old shells:
4579 build_os=$*
4580 IFS=$ac_save_IFS
4581 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4582
4583
4584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4585 $as_echo_n "checking host system type... " >&6; }
4586 if test "${ac_cv_host+set}" = set; then :
4587 $as_echo_n "(cached) " >&6
4588 else
4589 if test "x$host_alias" = x; then
4590 ac_cv_host=$ac_cv_build
4591 else
4592 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4593 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4594 fi
4595
4596 fi
4597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4598 $as_echo "$ac_cv_host" >&6; }
4599 case $ac_cv_host in
4600 *-*-*) ;;
4601 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4602 esac
4603 host=$ac_cv_host
4604 ac_save_IFS=$IFS; IFS='-'
4605 set x $ac_cv_host
4606 shift
4607 host_cpu=$1
4608 host_vendor=$2
4609 shift; shift
4610 # Remember, the first character of IFS is used to create $*,
4611 # except with old shells:
4612 host_os=$*
4613 IFS=$ac_save_IFS
4614 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4615
4616
4617 canonical=$host
4618 configuration=${host_alias-${build_alias-$host}}
4619
4620
4621
4622 ### If you add support for a new configuration, add code to this
4623 ### switch statement to recognize your configuration name and select
4624 ### the appropriate operating system file.
4625
4626 ### You would hope that you could choose an s/*.h
4627 ### file based on the operating system portion. However, it turns out
4628 ### that each s/*.h file is pretty manufacturer-specific.
4629 ### So we basically have to have a special case for each
4630 ### configuration name.
4631 ###
4632 ### As far as handling version numbers on operating systems is
4633 ### concerned, make sure things will fail in a fixable way. If
4634 ### /etc/MACHINES doesn't say anything about version numbers, be
4635 ### prepared to handle anything reasonably. If version numbers
4636 ### matter, be sure /etc/MACHINES says something about it.
4637
4638 opsys='' unported=no
4639 case "${canonical}" in
4640
4641 ## GNU/Linux and similar ports
4642 *-*-linux* )
4643 opsys=gnu-linux
4644 ;;
4645
4646 ## FreeBSD ports
4647 *-*-freebsd* )
4648 opsys=freebsd
4649 ;;
4650
4651 ## DragonFly ports
4652 *-*-dragonfly* )
4653 opsys=dragonfly
4654 ;;
4655
4656 ## FreeBSD kernel + glibc based userland
4657 *-*-kfreebsd*gnu* )
4658 opsys=gnu-kfreebsd
4659 ;;
4660
4661 ## NetBSD ports
4662 *-*-netbsd* )
4663 opsys=netbsd
4664 ;;
4665
4666 ## OpenBSD ports
4667 *-*-openbsd* )
4668 opsys=openbsd
4669 ;;
4670
4671 ## Apple Darwin / Mac OS X
4672 *-apple-darwin* )
4673 case "${canonical}" in
4674 i[3456]86-* ) ;;
4675 powerpc-* ) ;;
4676 x86_64-* ) ;;
4677 * ) unported=yes ;;
4678 esac
4679 opsys=darwin
4680 ## Use fink packages if available.
4681 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4682 ## if test -d /sw/include && test -d /sw/lib; then
4683 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4684 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4685 ## fi
4686 ;;
4687
4688 ## Cygwin ports
4689 *-*-cygwin )
4690 opsys=cygwin
4691 ;;
4692
4693 ## HP 9000 series 700 and 800, running HP/UX
4694 hppa*-hp-hpux10.2* )
4695 opsys=hpux10-20
4696 ;;
4697 hppa*-hp-hpux1[1-9]* )
4698 opsys=hpux11
4699 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4700 ;;
4701
4702 ## IBM machines
4703 rs6000-ibm-aix4.[23]* )
4704 opsys=aix4-2
4705 ;;
4706 powerpc-ibm-aix4.[23]* )
4707 opsys=aix4-2
4708 ;;
4709 rs6000-ibm-aix[56]* )
4710 opsys=aix4-2
4711 ;;
4712 powerpc-ibm-aix[56]* )
4713 opsys=aix4-2
4714 ;;
4715
4716 ## Silicon Graphics machines
4717 ## Iris 4D
4718 mips-sgi-irix6.5 )
4719 opsys=irix6-5
4720 # Without defining _LANGUAGE_C, things get masked out in the headers
4721 # so that, for instance, grepping for `free' in stdlib.h fails and
4722 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4723 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4724 ;;
4725
4726 ## Suns
4727 *-sun-solaris* \
4728 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4729 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4730 case "${canonical}" in
4731 i[3456]86-*-* ) ;;
4732 amd64-*-*|x86_64-*-*) ;;
4733 sparc* ) ;;
4734 * ) unported=yes ;;
4735 esac
4736 case "${canonical}" in
4737 *-sunos5.6* | *-solaris2.6* )
4738 opsys=sol2-6
4739 RANLIB="ar -ts"
4740 ;;
4741 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4742 opsys=sol2-6
4743 emacs_check_sunpro_c=yes
4744 ;;
4745 *-sunos5* | *-solaris* )
4746 opsys=sol2-10
4747 emacs_check_sunpro_c=yes
4748 ;;
4749 esac
4750 ## Watch out for a compiler that we know will not work.
4751 case "${canonical}" in
4752 *-solaris* | *-sunos5* )
4753 if [ "x$CC" = x/usr/ucb/cc ]; then
4754 ## /usr/ucb/cc doesn't work;
4755 ## we should find some other compiler that does work.
4756 unset CC
4757 fi
4758 ;;
4759 *) ;;
4760 esac
4761 ;;
4762
4763 ## Intel 386 machines where we don't care about the manufacturer.
4764 i[3456]86-*-* )
4765 case "${canonical}" in
4766 *-darwin* ) opsys=darwin ;;
4767 *-sysv4.2uw* ) opsys=unixware ;;
4768 *-sysv5uw* ) opsys=unixware ;;
4769 *-sysv5OpenUNIX* ) opsys=unixware ;;
4770 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4771 esac
4772 ;;
4773
4774 * )
4775 unported=yes
4776 ;;
4777 esac
4778
4779 ### If the code above didn't choose an operating system, just choose
4780 ### an operating system based on the configuration name. You really
4781 ### only want to use this when you have no idea what the right
4782 ### operating system is; if you know what operating systems a machine
4783 ### runs, it's cleaner to make it explicit in the case statement
4784 ### above.
4785 if test x"${opsys}" = x; then
4786 case "${canonical}" in
4787 *-gnu* ) opsys=gnu ;;
4788 * )
4789 unported=yes
4790 ;;
4791 esac
4792 fi
4793
4794
4795
4796 if test $unported = yes; then
4797 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4798 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4799 fi
4800
4801
4802 #### Choose a compiler.
4803
4804 ac_ext=c
4805 ac_cpp='$CPP $CPPFLAGS'
4806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4809 if test -n "$ac_tool_prefix"; then
4810 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4811 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813 $as_echo_n "checking for $ac_word... " >&6; }
4814 if test "${ac_cv_prog_CC+set}" = set; then :
4815 $as_echo_n "(cached) " >&6
4816 else
4817 if test -n "$CC"; then
4818 ac_cv_prog_CC="$CC" # Let the user override the test.
4819 else
4820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4821 for as_dir in $PATH
4822 do
4823 IFS=$as_save_IFS
4824 test -z "$as_dir" && as_dir=.
4825 for ac_exec_ext in '' $ac_executable_extensions; do
4826 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4827 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4829 break 2
4830 fi
4831 done
4832 done
4833 IFS=$as_save_IFS
4834
4835 fi
4836 fi
4837 CC=$ac_cv_prog_CC
4838 if test -n "$CC"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4840 $as_echo "$CC" >&6; }
4841 else
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843 $as_echo "no" >&6; }
4844 fi
4845
4846
4847 fi
4848 if test -z "$ac_cv_prog_CC"; then
4849 ac_ct_CC=$CC
4850 # Extract the first word of "gcc", so it can be a program name with args.
4851 set dummy gcc; ac_word=$2
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853 $as_echo_n "checking for $ac_word... " >&6; }
4854 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4855 $as_echo_n "(cached) " >&6
4856 else
4857 if test -n "$ac_ct_CC"; then
4858 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4859 else
4860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861 for as_dir in $PATH
4862 do
4863 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=.
4865 for ac_exec_ext in '' $ac_executable_extensions; do
4866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4867 ac_cv_prog_ac_ct_CC="gcc"
4868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869 break 2
4870 fi
4871 done
4872 done
4873 IFS=$as_save_IFS
4874
4875 fi
4876 fi
4877 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4878 if test -n "$ac_ct_CC"; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4880 $as_echo "$ac_ct_CC" >&6; }
4881 else
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883 $as_echo "no" >&6; }
4884 fi
4885
4886 if test "x$ac_ct_CC" = x; then
4887 CC=""
4888 else
4889 case $cross_compiling:$ac_tool_warned in
4890 yes:)
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4893 ac_tool_warned=yes ;;
4894 esac
4895 CC=$ac_ct_CC
4896 fi
4897 else
4898 CC="$ac_cv_prog_CC"
4899 fi
4900
4901 if test -z "$CC"; then
4902 if test -n "$ac_tool_prefix"; then
4903 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4904 set dummy ${ac_tool_prefix}cc; ac_word=$2
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906 $as_echo_n "checking for $ac_word... " >&6; }
4907 if test "${ac_cv_prog_CC+set}" = set; then :
4908 $as_echo_n "(cached) " >&6
4909 else
4910 if test -n "$CC"; then
4911 ac_cv_prog_CC="$CC" # Let the user override the test.
4912 else
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914 for as_dir in $PATH
4915 do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
4919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4920 ac_cv_prog_CC="${ac_tool_prefix}cc"
4921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924 done
4925 done
4926 IFS=$as_save_IFS
4927
4928 fi
4929 fi
4930 CC=$ac_cv_prog_CC
4931 if test -n "$CC"; then
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4933 $as_echo "$CC" >&6; }
4934 else
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936 $as_echo "no" >&6; }
4937 fi
4938
4939
4940 fi
4941 fi
4942 if test -z "$CC"; then
4943 # Extract the first word of "cc", so it can be a program name with args.
4944 set dummy cc; ac_word=$2
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4946 $as_echo_n "checking for $ac_word... " >&6; }
4947 if test "${ac_cv_prog_CC+set}" = set; then :
4948 $as_echo_n "(cached) " >&6
4949 else
4950 if test -n "$CC"; then
4951 ac_cv_prog_CC="$CC" # Let the user override the test.
4952 else
4953 ac_prog_rejected=no
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955 for as_dir in $PATH
4956 do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4962 ac_prog_rejected=yes
4963 continue
4964 fi
4965 ac_cv_prog_CC="cc"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969 done
4970 done
4971 IFS=$as_save_IFS
4972
4973 if test $ac_prog_rejected = yes; then
4974 # We found a bogon in the path, so make sure we never use it.
4975 set dummy $ac_cv_prog_CC
4976 shift
4977 if test $# != 0; then
4978 # We chose a different compiler from the bogus one.
4979 # However, it has the same basename, so the bogon will be chosen
4980 # first if we set CC to just the basename; use the full file name.
4981 shift
4982 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4983 fi
4984 fi
4985 fi
4986 fi
4987 CC=$ac_cv_prog_CC
4988 if test -n "$CC"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4990 $as_echo "$CC" >&6; }
4991 else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993 $as_echo "no" >&6; }
4994 fi
4995
4996
4997 fi
4998 if test -z "$CC"; then
4999 if test -n "$ac_tool_prefix"; then
5000 for ac_prog in cl.exe
5001 do
5002 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5003 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005 $as_echo_n "checking for $ac_word... " >&6; }
5006 if test "${ac_cv_prog_CC+set}" = set; then :
5007 $as_echo_n "(cached) " >&6
5008 else
5009 if test -n "$CC"; then
5010 ac_cv_prog_CC="$CC" # Let the user override the test.
5011 else
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023 done
5024 done
5025 IFS=$as_save_IFS
5026
5027 fi
5028 fi
5029 CC=$ac_cv_prog_CC
5030 if test -n "$CC"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5032 $as_echo "$CC" >&6; }
5033 else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037
5038
5039 test -n "$CC" && break
5040 done
5041 fi
5042 if test -z "$CC"; then
5043 ac_ct_CC=$CC
5044 for ac_prog in cl.exe
5045 do
5046 # Extract the first word of "$ac_prog", so it can be a program name with args.
5047 set dummy $ac_prog; ac_word=$2
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049 $as_echo_n "checking for $ac_word... " >&6; }
5050 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5051 $as_echo_n "(cached) " >&6
5052 else
5053 if test -n "$ac_ct_CC"; then
5054 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5055 else
5056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057 for as_dir in $PATH
5058 do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5063 ac_cv_prog_ac_ct_CC="$ac_prog"
5064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5066 fi
5067 done
5068 done
5069 IFS=$as_save_IFS
5070
5071 fi
5072 fi
5073 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5074 if test -n "$ac_ct_CC"; then
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5076 $as_echo "$ac_ct_CC" >&6; }
5077 else
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079 $as_echo "no" >&6; }
5080 fi
5081
5082
5083 test -n "$ac_ct_CC" && break
5084 done
5085
5086 if test "x$ac_ct_CC" = x; then
5087 CC=""
5088 else
5089 case $cross_compiling:$ac_tool_warned in
5090 yes:)
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5092 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5093 ac_tool_warned=yes ;;
5094 esac
5095 CC=$ac_ct_CC
5096 fi
5097 fi
5098
5099 fi
5100
5101
5102 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5104 as_fn_error "no acceptable C compiler found in \$PATH
5105 See \`config.log' for more details." "$LINENO" 5; }
5106
5107 # Provide some information about the compiler.
5108 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5109 set X $ac_compile
5110 ac_compiler=$2
5111 for ac_option in --version -v -V -qversion; do
5112 { { ac_try="$ac_compiler $ac_option >&5"
5113 case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116 esac
5117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5118 $as_echo "$ac_try_echo"; } >&5
5119 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5120 ac_status=$?
5121 if test -s conftest.err; then
5122 sed '10a\
5123 ... rest of stderr output deleted ...
5124 10q' conftest.err >conftest.er1
5125 cat conftest.er1 >&5
5126 fi
5127 rm -f conftest.er1 conftest.err
5128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5129 test $ac_status = 0; }
5130 done
5131
5132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133 /* end confdefs.h. */
5134
5135 int
5136 main ()
5137 {
5138
5139 ;
5140 return 0;
5141 }
5142 _ACEOF
5143 ac_clean_files_save=$ac_clean_files
5144 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5145 # Try to create an executable without -o first, disregard a.out.
5146 # It will help us diagnose broken compilers, and finding out an intuition
5147 # of exeext.
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5149 $as_echo_n "checking whether the C compiler works... " >&6; }
5150 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5151
5152 # The possible output files:
5153 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5154
5155 ac_rmfiles=
5156 for ac_file in $ac_files
5157 do
5158 case $ac_file in
5159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5160 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5161 esac
5162 done
5163 rm -f $ac_rmfiles
5164
5165 if { { ac_try="$ac_link_default"
5166 case "(($ac_try" in
5167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168 *) ac_try_echo=$ac_try;;
5169 esac
5170 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5171 $as_echo "$ac_try_echo"; } >&5
5172 (eval "$ac_link_default") 2>&5
5173 ac_status=$?
5174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5175 test $ac_status = 0; }; then :
5176 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5177 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5178 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5179 # so that the user can short-circuit this test for compilers unknown to
5180 # Autoconf.
5181 for ac_file in $ac_files ''
5182 do
5183 test -f "$ac_file" || continue
5184 case $ac_file in
5185 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5186 ;;
5187 [ab].out )
5188 # We found the default executable, but exeext='' is most
5189 # certainly right.
5190 break;;
5191 *.* )
5192 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5193 then :; else
5194 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5195 fi
5196 # We set ac_cv_exeext here because the later test for it is not
5197 # safe: cross compilers may not add the suffix if given an `-o'
5198 # argument, so we may need to know it at that point already.
5199 # Even if this section looks crufty: it has the advantage of
5200 # actually working.
5201 break;;
5202 * )
5203 break;;
5204 esac
5205 done
5206 test "$ac_cv_exeext" = no && ac_cv_exeext=
5207
5208 else
5209 ac_file=''
5210 fi
5211 if test -z "$ac_file"; then :
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213 $as_echo "no" >&6; }
5214 $as_echo "$as_me: failed program was:" >&5
5215 sed 's/^/| /' conftest.$ac_ext >&5
5216
5217 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5218 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5219 { as_fn_set_status 77
5220 as_fn_error "C compiler cannot create executables
5221 See \`config.log' for more details." "$LINENO" 5; }; }
5222 else
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5224 $as_echo "yes" >&6; }
5225 fi
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5227 $as_echo_n "checking for C compiler default output file name... " >&6; }
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5229 $as_echo "$ac_file" >&6; }
5230 ac_exeext=$ac_cv_exeext
5231
5232 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5233 ac_clean_files=$ac_clean_files_save
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5235 $as_echo_n "checking for suffix of executables... " >&6; }
5236 if { { ac_try="$ac_link"
5237 case "(($ac_try" in
5238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5239 *) ac_try_echo=$ac_try;;
5240 esac
5241 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5242 $as_echo "$ac_try_echo"; } >&5
5243 (eval "$ac_link") 2>&5
5244 ac_status=$?
5245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5246 test $ac_status = 0; }; then :
5247 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5248 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5249 # work properly (i.e., refer to `conftest.exe'), while it won't with
5250 # `rm'.
5251 for ac_file in conftest.exe conftest conftest.*; do
5252 test -f "$ac_file" || continue
5253 case $ac_file in
5254 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5255 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5256 break;;
5257 * ) break;;
5258 esac
5259 done
5260 else
5261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5262 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5263 as_fn_error "cannot compute suffix of executables: cannot compile and link
5264 See \`config.log' for more details." "$LINENO" 5; }
5265 fi
5266 rm -f conftest conftest$ac_cv_exeext
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5268 $as_echo "$ac_cv_exeext" >&6; }
5269
5270 rm -f conftest.$ac_ext
5271 EXEEXT=$ac_cv_exeext
5272 ac_exeext=$EXEEXT
5273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5274 /* end confdefs.h. */
5275 #include <stdio.h>
5276 int
5277 main ()
5278 {
5279 FILE *f = fopen ("conftest.out", "w");
5280 return ferror (f) || fclose (f) != 0;
5281
5282 ;
5283 return 0;
5284 }
5285 _ACEOF
5286 ac_clean_files="$ac_clean_files conftest.out"
5287 # Check that the compiler produces executables we can run. If not, either
5288 # the compiler is broken, or we cross compile.
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5290 $as_echo_n "checking whether we are cross compiling... " >&6; }
5291 if test "$cross_compiling" != yes; then
5292 { { ac_try="$ac_link"
5293 case "(($ac_try" in
5294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5295 *) ac_try_echo=$ac_try;;
5296 esac
5297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5298 $as_echo "$ac_try_echo"; } >&5
5299 (eval "$ac_link") 2>&5
5300 ac_status=$?
5301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5302 test $ac_status = 0; }
5303 if { ac_try='./conftest$ac_cv_exeext'
5304 { { case "(($ac_try" in
5305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5306 *) ac_try_echo=$ac_try;;
5307 esac
5308 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5309 $as_echo "$ac_try_echo"; } >&5
5310 (eval "$ac_try") 2>&5
5311 ac_status=$?
5312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5313 test $ac_status = 0; }; }; then
5314 cross_compiling=no
5315 else
5316 if test "$cross_compiling" = maybe; then
5317 cross_compiling=yes
5318 else
5319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5321 as_fn_error "cannot run C compiled programs.
5322 If you meant to cross compile, use \`--host'.
5323 See \`config.log' for more details." "$LINENO" 5; }
5324 fi
5325 fi
5326 fi
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5328 $as_echo "$cross_compiling" >&6; }
5329
5330 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5331 ac_clean_files=$ac_clean_files_save
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5333 $as_echo_n "checking for suffix of object files... " >&6; }
5334 if test "${ac_cv_objext+set}" = set; then :
5335 $as_echo_n "(cached) " >&6
5336 else
5337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338 /* end confdefs.h. */
5339
5340 int
5341 main ()
5342 {
5343
5344 ;
5345 return 0;
5346 }
5347 _ACEOF
5348 rm -f conftest.o conftest.obj
5349 if { { ac_try="$ac_compile"
5350 case "(($ac_try" in
5351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5352 *) ac_try_echo=$ac_try;;
5353 esac
5354 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5355 $as_echo "$ac_try_echo"; } >&5
5356 (eval "$ac_compile") 2>&5
5357 ac_status=$?
5358 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5359 test $ac_status = 0; }; then :
5360 for ac_file in conftest.o conftest.obj conftest.*; do
5361 test -f "$ac_file" || continue;
5362 case $ac_file in
5363 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5364 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5365 break;;
5366 esac
5367 done
5368 else
5369 $as_echo "$as_me: failed program was:" >&5
5370 sed 's/^/| /' conftest.$ac_ext >&5
5371
5372 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5373 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5374 as_fn_error "cannot compute suffix of object files: cannot compile
5375 See \`config.log' for more details." "$LINENO" 5; }
5376 fi
5377 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5378 fi
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5380 $as_echo "$ac_cv_objext" >&6; }
5381 OBJEXT=$ac_cv_objext
5382 ac_objext=$OBJEXT
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5384 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5385 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5386 $as_echo_n "(cached) " >&6
5387 else
5388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5389 /* end confdefs.h. */
5390
5391 int
5392 main ()
5393 {
5394 #ifndef __GNUC__
5395 choke me
5396 #endif
5397
5398 ;
5399 return 0;
5400 }
5401 _ACEOF
5402 if ac_fn_c_try_compile "$LINENO"; then :
5403 ac_compiler_gnu=yes
5404 else
5405 ac_compiler_gnu=no
5406 fi
5407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5408 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5409
5410 fi
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5412 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5413 if test $ac_compiler_gnu = yes; then
5414 GCC=yes
5415 else
5416 GCC=
5417 fi
5418 ac_test_CFLAGS=${CFLAGS+set}
5419 ac_save_CFLAGS=$CFLAGS
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5421 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5422 if test "${ac_cv_prog_cc_g+set}" = set; then :
5423 $as_echo_n "(cached) " >&6
5424 else
5425 ac_save_c_werror_flag=$ac_c_werror_flag
5426 ac_c_werror_flag=yes
5427 ac_cv_prog_cc_g=no
5428 CFLAGS="-g"
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430 /* end confdefs.h. */
5431
5432 int
5433 main ()
5434 {
5435
5436 ;
5437 return 0;
5438 }
5439 _ACEOF
5440 if ac_fn_c_try_compile "$LINENO"; then :
5441 ac_cv_prog_cc_g=yes
5442 else
5443 CFLAGS=""
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5446
5447 int
5448 main ()
5449 {
5450
5451 ;
5452 return 0;
5453 }
5454 _ACEOF
5455 if ac_fn_c_try_compile "$LINENO"; then :
5456
5457 else
5458 ac_c_werror_flag=$ac_save_c_werror_flag
5459 CFLAGS="-g"
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461 /* end confdefs.h. */
5462
5463 int
5464 main ()
5465 {
5466
5467 ;
5468 return 0;
5469 }
5470 _ACEOF
5471 if ac_fn_c_try_compile "$LINENO"; then :
5472 ac_cv_prog_cc_g=yes
5473 fi
5474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475 fi
5476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5477 fi
5478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5479 ac_c_werror_flag=$ac_save_c_werror_flag
5480 fi
5481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5482 $as_echo "$ac_cv_prog_cc_g" >&6; }
5483 if test "$ac_test_CFLAGS" = set; then
5484 CFLAGS=$ac_save_CFLAGS
5485 elif test $ac_cv_prog_cc_g = yes; then
5486 if test "$GCC" = yes; then
5487 CFLAGS="-g -O2"
5488 else
5489 CFLAGS="-g"
5490 fi
5491 else
5492 if test "$GCC" = yes; then
5493 CFLAGS="-O2"
5494 else
5495 CFLAGS=
5496 fi
5497 fi
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5499 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5500 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5501 $as_echo_n "(cached) " >&6
5502 else
5503 ac_cv_prog_cc_c89=no
5504 ac_save_CC=$CC
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506 /* end confdefs.h. */
5507 #include <stdarg.h>
5508 #include <stdio.h>
5509 #include <sys/types.h>
5510 #include <sys/stat.h>
5511 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5512 struct buf { int x; };
5513 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5514 static char *e (p, i)
5515 char **p;
5516 int i;
5517 {
5518 return p[i];
5519 }
5520 static char *f (char * (*g) (char **, int), char **p, ...)
5521 {
5522 char *s;
5523 va_list v;
5524 va_start (v,p);
5525 s = g (p, va_arg (v,int));
5526 va_end (v);
5527 return s;
5528 }
5529
5530 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5531 function prototypes and stuff, but not '\xHH' hex character constants.
5532 These don't provoke an error unfortunately, instead are silently treated
5533 as 'x'. The following induces an error, until -std is added to get
5534 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5535 array size at least. It's necessary to write '\x00'==0 to get something
5536 that's true only with -std. */
5537 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5538
5539 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5540 inside strings and character constants. */
5541 #define FOO(x) 'x'
5542 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5543
5544 int test (int i, double x);
5545 struct s1 {int (*f) (int a);};
5546 struct s2 {int (*f) (double a);};
5547 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5548 int argc;
5549 char **argv;
5550 int
5551 main ()
5552 {
5553 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5554 ;
5555 return 0;
5556 }
5557 _ACEOF
5558 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5559 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5560 do
5561 CC="$ac_save_CC $ac_arg"
5562 if ac_fn_c_try_compile "$LINENO"; then :
5563 ac_cv_prog_cc_c89=$ac_arg
5564 fi
5565 rm -f core conftest.err conftest.$ac_objext
5566 test "x$ac_cv_prog_cc_c89" != "xno" && break
5567 done
5568 rm -f conftest.$ac_ext
5569 CC=$ac_save_CC
5570
5571 fi
5572 # AC_CACHE_VAL
5573 case "x$ac_cv_prog_cc_c89" in
5574 x)
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5576 $as_echo "none needed" >&6; } ;;
5577 xno)
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5579 $as_echo "unsupported" >&6; } ;;
5580 *)
5581 CC="$CC $ac_cv_prog_cc_c89"
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5583 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5584 esac
5585 if test "x$ac_cv_prog_cc_c89" != xno; then :
5586
5587 fi
5588
5589 ac_ext=c
5590 ac_cpp='$CPP $CPPFLAGS'
5591 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5592 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5593 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5594 DEPDIR="${am__leading_dot}deps"
5595
5596 ac_config_commands="$ac_config_commands depfiles"
5597
5598
5599 am_make=${MAKE-make}
5600 cat > confinc << 'END'
5601 am__doit:
5602 @echo this is the am__doit target
5603 .PHONY: am__doit
5604 END
5605 # If we don't find an include directive, just comment out the code.
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5607 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5608 am__include="#"
5609 am__quote=
5610 _am_result=none
5611 # First try GNU make style include.
5612 echo "include confinc" > confmf
5613 # Ignore all kinds of additional output from `make'.
5614 case `$am_make -s -f confmf 2> /dev/null` in #(
5615 *the\ am__doit\ target*)
5616 am__include=include
5617 am__quote=
5618 _am_result=GNU
5619 ;;
5620 esac
5621 # Now try BSD make style include.
5622 if test "$am__include" = "#"; then
5623 echo '.include "confinc"' > confmf
5624 case `$am_make -s -f confmf 2> /dev/null` in #(
5625 *the\ am__doit\ target*)
5626 am__include=.include
5627 am__quote="\""
5628 _am_result=BSD
5629 ;;
5630 esac
5631 fi
5632
5633
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5635 $as_echo "$_am_result" >&6; }
5636 rm -f confinc confmf
5637
5638 # Check whether --enable-dependency-tracking was given.
5639 if test "${enable_dependency_tracking+set}" = set; then :
5640 enableval=$enable_dependency_tracking;
5641 fi
5642
5643 if test "x$enable_dependency_tracking" != xno; then
5644 am_depcomp="$ac_aux_dir/depcomp"
5645 AMDEPBACKSLASH='\'
5646 fi
5647 if test "x$enable_dependency_tracking" != xno; then
5648 AMDEP_TRUE=
5649 AMDEP_FALSE='#'
5650 else
5651 AMDEP_TRUE='#'
5652 AMDEP_FALSE=
5653 fi
5654
5655
5656
5657 depcc="$CC" am_compiler_list=
5658
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5660 $as_echo_n "checking dependency style of $depcc... " >&6; }
5661 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5662 $as_echo_n "(cached) " >&6
5663 else
5664 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5665 # We make a subdir and do the tests there. Otherwise we can end up
5666 # making bogus files that we don't know about and never remove. For
5667 # instance it was reported that on HP-UX the gcc test will end up
5668 # making a dummy file named `D' -- because `-MD' means `put the output
5669 # in D'.
5670 mkdir conftest.dir
5671 # Copy depcomp to subdir because otherwise we won't find it if we're
5672 # using a relative directory.
5673 cp "$am_depcomp" conftest.dir
5674 cd conftest.dir
5675 # We will build objects and dependencies in a subdirectory because
5676 # it helps to detect inapplicable dependency modes. For instance
5677 # both Tru64's cc and ICC support -MD to output dependencies as a
5678 # side effect of compilation, but ICC will put the dependencies in
5679 # the current directory while Tru64 will put them in the object
5680 # directory.
5681 mkdir sub
5682
5683 am_cv_CC_dependencies_compiler_type=none
5684 if test "$am_compiler_list" = ""; then
5685 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5686 fi
5687 am__universal=false
5688 case " $depcc " in #(
5689 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5690 esac
5691
5692 for depmode in $am_compiler_list; do
5693 # Setup a source with many dependencies, because some compilers
5694 # like to wrap large dependency lists on column 80 (with \), and
5695 # we should not choose a depcomp mode which is confused by this.
5696 #
5697 # We need to recreate these files for each test, as the compiler may
5698 # overwrite some of them when testing with obscure command lines.
5699 # This happens at least with the AIX C compiler.
5700 : > sub/conftest.c
5701 for i in 1 2 3 4 5 6; do
5702 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5703 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5704 # Solaris 8's {/usr,}/bin/sh.
5705 touch sub/conftst$i.h
5706 done
5707 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5708
5709 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5710 # mode. It turns out that the SunPro C++ compiler does not properly
5711 # handle `-M -o', and we need to detect this. Also, some Intel
5712 # versions had trouble with output in subdirs
5713 am__obj=sub/conftest.${OBJEXT-o}
5714 am__minus_obj="-o $am__obj"
5715 case $depmode in
5716 gcc)
5717 # This depmode causes a compiler race in universal mode.
5718 test "$am__universal" = false || continue
5719 ;;
5720 nosideeffect)
5721 # after this tag, mechanisms are not by side-effect, so they'll
5722 # only be used when explicitly requested
5723 if test "x$enable_dependency_tracking" = xyes; then
5724 continue
5725 else
5726 break
5727 fi
5728 ;;
5729 msvisualcpp | msvcmsys)
5730 # This compiler won't grok `-c -o', but also, the minuso test has
5731 # not run yet. These depmodes are late enough in the game, and
5732 # so weak that their functioning should not be impacted.
5733 am__obj=conftest.${OBJEXT-o}
5734 am__minus_obj=
5735 ;;
5736 none) break ;;
5737 esac
5738 if depmode=$depmode \
5739 source=sub/conftest.c object=$am__obj \
5740 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5741 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5742 >/dev/null 2>conftest.err &&
5743 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5744 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5745 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5746 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5747 # icc doesn't choke on unknown options, it will just issue warnings
5748 # or remarks (even with -Werror). So we grep stderr for any message
5749 # that says an option was ignored or not supported.
5750 # When given -MP, icc 7.0 and 7.1 complain thusly:
5751 # icc: Command line warning: ignoring option '-M'; no argument required
5752 # The diagnosis changed in icc 8.0:
5753 # icc: Command line remark: option '-MP' not supported
5754 if (grep 'ignoring option' conftest.err ||
5755 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5756 am_cv_CC_dependencies_compiler_type=$depmode
5757 break
5758 fi
5759 fi
5760 done
5761
5762 cd ..
5763 rm -rf conftest.dir
5764 else
5765 am_cv_CC_dependencies_compiler_type=none
5766 fi
5767
5768 fi
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5770 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5771 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5772
5773 if
5774 test "x$enable_dependency_tracking" != xno \
5775 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5776 am__fastdepCC_TRUE=
5777 am__fastdepCC_FALSE='#'
5778 else
5779 am__fastdepCC_TRUE='#'
5780 am__fastdepCC_FALSE=
5781 fi
5782
5783
5784 if test "x$CC" != xcc; then
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5786 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5787 else
5788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5789 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5790 fi
5791 set dummy $CC; ac_cc=`$as_echo "$2" |
5792 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5793 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5794 $as_echo_n "(cached) " >&6
5795 else
5796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5797 /* end confdefs.h. */
5798
5799 int
5800 main ()
5801 {
5802
5803 ;
5804 return 0;
5805 }
5806 _ACEOF
5807 # Make sure it works both with $CC and with simple cc.
5808 # We do the test twice because some compilers refuse to overwrite an
5809 # existing .o file with -o, though they will create one.
5810 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5811 rm -f conftest2.*
5812 if { { case "(($ac_try" in
5813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5814 *) ac_try_echo=$ac_try;;
5815 esac
5816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5817 $as_echo "$ac_try_echo"; } >&5
5818 (eval "$ac_try") 2>&5
5819 ac_status=$?
5820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5821 test $ac_status = 0; } &&
5822 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5824 *) ac_try_echo=$ac_try;;
5825 esac
5826 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5827 $as_echo "$ac_try_echo"; } >&5
5828 (eval "$ac_try") 2>&5
5829 ac_status=$?
5830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5831 test $ac_status = 0; };
5832 then
5833 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5834 if test "x$CC" != xcc; then
5835 # Test first that cc exists at all.
5836 if { ac_try='cc -c conftest.$ac_ext >&5'
5837 { { case "(($ac_try" in
5838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5839 *) ac_try_echo=$ac_try;;
5840 esac
5841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5842 $as_echo "$ac_try_echo"; } >&5
5843 (eval "$ac_try") 2>&5
5844 ac_status=$?
5845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5846 test $ac_status = 0; }; }; then
5847 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5848 rm -f conftest2.*
5849 if { { case "(($ac_try" in
5850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5851 *) ac_try_echo=$ac_try;;
5852 esac
5853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5854 $as_echo "$ac_try_echo"; } >&5
5855 (eval "$ac_try") 2>&5
5856 ac_status=$?
5857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5858 test $ac_status = 0; } &&
5859 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5861 *) ac_try_echo=$ac_try;;
5862 esac
5863 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5864 $as_echo "$ac_try_echo"; } >&5
5865 (eval "$ac_try") 2>&5
5866 ac_status=$?
5867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5868 test $ac_status = 0; };
5869 then
5870 # cc works too.
5871 :
5872 else
5873 # cc exists but doesn't like -o.
5874 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5875 fi
5876 fi
5877 fi
5878 else
5879 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5880 fi
5881 rm -f core conftest*
5882
5883 fi
5884 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5886 $as_echo "yes" >&6; }
5887 else
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889 $as_echo "no" >&6; }
5890
5891 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5892
5893 fi
5894
5895 # FIXME: we rely on the cache variable name because
5896 # there is no other way.
5897 set dummy $CC
5898 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5899 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5900 if test "$am_t" != yes; then
5901 # Losing compiler, so override with the script.
5902 # FIXME: It is wrong to rewrite CC.
5903 # But if we don't then we get into trouble of one sort or another.
5904 # A longer-term fix would be to have automake use am__CC in this case,
5905 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5906 CC="$am_aux_dir/compile $CC"
5907 fi
5908
5909
5910
5911 if test x$GCC = xyes; then
5912 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5913 else
5914 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5915 fi
5916
5917 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5918 # as we don't use them.
5919
5920 # Avoid gnulib's threadlib module, as we do threads our own way.
5921
5922
5923 # Initialize gnulib right after choosing the compiler.
5924
5925 ac_ext=c
5926 ac_cpp='$CPP $CPPFLAGS'
5927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5931 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5932 # On Suns, sometimes $CPP names a directory.
5933 if test -n "$CPP" && test -d "$CPP"; then
5934 CPP=
5935 fi
5936 if test -z "$CPP"; then
5937 if test "${ac_cv_prog_CPP+set}" = set; then :
5938 $as_echo_n "(cached) " >&6
5939 else
5940 # Double quotes because CPP needs to be expanded
5941 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5942 do
5943 ac_preproc_ok=false
5944 for ac_c_preproc_warn_flag in '' yes
5945 do
5946 # Use a header file that comes with gcc, so configuring glibc
5947 # with a fresh cross-compiler works.
5948 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5949 # <limits.h> exists even on freestanding compilers.
5950 # On the NeXT, cc -E runs the code through the compiler's parser,
5951 # not just through cpp. "Syntax error" is here to catch this case.
5952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953 /* end confdefs.h. */
5954 #ifdef __STDC__
5955 # include <limits.h>
5956 #else
5957 # include <assert.h>
5958 #endif
5959 Syntax error
5960 _ACEOF
5961 if ac_fn_c_try_cpp "$LINENO"; then :
5962
5963 else
5964 # Broken: fails on valid input.
5965 continue
5966 fi
5967 rm -f conftest.err conftest.$ac_ext
5968
5969 # OK, works on sane cases. Now check whether nonexistent headers
5970 # can be detected and how.
5971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5972 /* end confdefs.h. */
5973 #include <ac_nonexistent.h>
5974 _ACEOF
5975 if ac_fn_c_try_cpp "$LINENO"; then :
5976 # Broken: success on invalid input.
5977 continue
5978 else
5979 # Passes both tests.
5980 ac_preproc_ok=:
5981 break
5982 fi
5983 rm -f conftest.err conftest.$ac_ext
5984
5985 done
5986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5987 rm -f conftest.err conftest.$ac_ext
5988 if $ac_preproc_ok; then :
5989 break
5990 fi
5991
5992 done
5993 ac_cv_prog_CPP=$CPP
5994
5995 fi
5996 CPP=$ac_cv_prog_CPP
5997 else
5998 ac_cv_prog_CPP=$CPP
5999 fi
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6001 $as_echo "$CPP" >&6; }
6002 ac_preproc_ok=false
6003 for ac_c_preproc_warn_flag in '' yes
6004 do
6005 # Use a header file that comes with gcc, so configuring glibc
6006 # with a fresh cross-compiler works.
6007 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6008 # <limits.h> exists even on freestanding compilers.
6009 # On the NeXT, cc -E runs the code through the compiler's parser,
6010 # not just through cpp. "Syntax error" is here to catch this case.
6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6012 /* end confdefs.h. */
6013 #ifdef __STDC__
6014 # include <limits.h>
6015 #else
6016 # include <assert.h>
6017 #endif
6018 Syntax error
6019 _ACEOF
6020 if ac_fn_c_try_cpp "$LINENO"; then :
6021
6022 else
6023 # Broken: fails on valid input.
6024 continue
6025 fi
6026 rm -f conftest.err conftest.$ac_ext
6027
6028 # OK, works on sane cases. Now check whether nonexistent headers
6029 # can be detected and how.
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031 /* end confdefs.h. */
6032 #include <ac_nonexistent.h>
6033 _ACEOF
6034 if ac_fn_c_try_cpp "$LINENO"; then :
6035 # Broken: success on invalid input.
6036 continue
6037 else
6038 # Passes both tests.
6039 ac_preproc_ok=:
6040 break
6041 fi
6042 rm -f conftest.err conftest.$ac_ext
6043
6044 done
6045 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6046 rm -f conftest.err conftest.$ac_ext
6047 if $ac_preproc_ok; then :
6048
6049 else
6050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6051 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6052 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6053 See \`config.log' for more details." "$LINENO" 5; }
6054 fi
6055
6056 ac_ext=c
6057 ac_cpp='$CPP $CPPFLAGS'
6058 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6059 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6060 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6061
6062
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6064 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6065 if test "${ac_cv_path_GREP+set}" = set; then :
6066 $as_echo_n "(cached) " >&6
6067 else
6068 if test -z "$GREP"; then
6069 ac_path_GREP_found=false
6070 # Loop through the user's path and test for each of PROGNAME-LIST
6071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6073 do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_prog in grep ggrep; do
6077 for ac_exec_ext in '' $ac_executable_extensions; do
6078 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6079 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6080 # Check for GNU ac_path_GREP and select it if it is found.
6081 # Check for GNU $ac_path_GREP
6082 case `"$ac_path_GREP" --version 2>&1` in
6083 *GNU*)
6084 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6085 *)
6086 ac_count=0
6087 $as_echo_n 0123456789 >"conftest.in"
6088 while :
6089 do
6090 cat "conftest.in" "conftest.in" >"conftest.tmp"
6091 mv "conftest.tmp" "conftest.in"
6092 cp "conftest.in" "conftest.nl"
6093 $as_echo 'GREP' >> "conftest.nl"
6094 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6095 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6096 as_fn_arith $ac_count + 1 && ac_count=$as_val
6097 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6098 # Best one so far, save it but keep looking for a better one
6099 ac_cv_path_GREP="$ac_path_GREP"
6100 ac_path_GREP_max=$ac_count
6101 fi
6102 # 10*(2^10) chars as input seems more than enough
6103 test $ac_count -gt 10 && break
6104 done
6105 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6106 esac
6107
6108 $ac_path_GREP_found && break 3
6109 done
6110 done
6111 done
6112 IFS=$as_save_IFS
6113 if test -z "$ac_cv_path_GREP"; then
6114 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6115 fi
6116 else
6117 ac_cv_path_GREP=$GREP
6118 fi
6119
6120 fi
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6122 $as_echo "$ac_cv_path_GREP" >&6; }
6123 GREP="$ac_cv_path_GREP"
6124
6125
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6127 $as_echo_n "checking for egrep... " >&6; }
6128 if test "${ac_cv_path_EGREP+set}" = set; then :
6129 $as_echo_n "(cached) " >&6
6130 else
6131 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6132 then ac_cv_path_EGREP="$GREP -E"
6133 else
6134 if test -z "$EGREP"; then
6135 ac_path_EGREP_found=false
6136 # Loop through the user's path and test for each of PROGNAME-LIST
6137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6139 do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
6142 for ac_prog in egrep; do
6143 for ac_exec_ext in '' $ac_executable_extensions; do
6144 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6145 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6146 # Check for GNU ac_path_EGREP and select it if it is found.
6147 # Check for GNU $ac_path_EGREP
6148 case `"$ac_path_EGREP" --version 2>&1` in
6149 *GNU*)
6150 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6151 *)
6152 ac_count=0
6153 $as_echo_n 0123456789 >"conftest.in"
6154 while :
6155 do
6156 cat "conftest.in" "conftest.in" >"conftest.tmp"
6157 mv "conftest.tmp" "conftest.in"
6158 cp "conftest.in" "conftest.nl"
6159 $as_echo 'EGREP' >> "conftest.nl"
6160 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6161 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6162 as_fn_arith $ac_count + 1 && ac_count=$as_val
6163 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6164 # Best one so far, save it but keep looking for a better one
6165 ac_cv_path_EGREP="$ac_path_EGREP"
6166 ac_path_EGREP_max=$ac_count
6167 fi
6168 # 10*(2^10) chars as input seems more than enough
6169 test $ac_count -gt 10 && break
6170 done
6171 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6172 esac
6173
6174 $ac_path_EGREP_found && break 3
6175 done
6176 done
6177 done
6178 IFS=$as_save_IFS
6179 if test -z "$ac_cv_path_EGREP"; then
6180 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6181 fi
6182 else
6183 ac_cv_path_EGREP=$EGREP
6184 fi
6185
6186 fi
6187 fi
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6189 $as_echo "$ac_cv_path_EGREP" >&6; }
6190 EGREP="$ac_cv_path_EGREP"
6191
6192
6193
6194
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6196 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6197 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6198 $as_echo_n "(cached) " >&6
6199 else
6200
6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202 /* end confdefs.h. */
6203
6204 #ifdef __ACK__
6205 Amsterdam
6206 #endif
6207
6208 _ACEOF
6209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6210 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6211 gl_cv_c_amsterdam_compiler=yes
6212 else
6213 gl_cv_c_amsterdam_compiler=no
6214 fi
6215 rm -f conftest*
6216
6217
6218 fi
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6220 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6221 if test -z "$AR"; then
6222 if test $gl_cv_c_amsterdam_compiler = yes; then
6223 AR='cc -c.a'
6224 if test -z "$ARFLAGS"; then
6225 ARFLAGS='-o'
6226 fi
6227 else
6228 if test -n "$ac_tool_prefix"; then
6229 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6230 set dummy ${ac_tool_prefix}ar; ac_word=$2
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6232 $as_echo_n "checking for $ac_word... " >&6; }
6233 if test "${ac_cv_prog_AR+set}" = set; then :
6234 $as_echo_n "(cached) " >&6
6235 else
6236 if test -n "$AR"; then
6237 ac_cv_prog_AR="$AR" # Let the user override the test.
6238 else
6239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH
6241 do
6242 IFS=$as_save_IFS
6243 test -z "$as_dir" && as_dir=.
6244 for ac_exec_ext in '' $ac_executable_extensions; do
6245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6246 ac_cv_prog_AR="${ac_tool_prefix}ar"
6247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248 break 2
6249 fi
6250 done
6251 done
6252 IFS=$as_save_IFS
6253
6254 fi
6255 fi
6256 AR=$ac_cv_prog_AR
6257 if test -n "$AR"; then
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6259 $as_echo "$AR" >&6; }
6260 else
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6262 $as_echo "no" >&6; }
6263 fi
6264
6265
6266 fi
6267 if test -z "$ac_cv_prog_AR"; then
6268 ac_ct_AR=$AR
6269 # Extract the first word of "ar", so it can be a program name with args.
6270 set dummy ar; ac_word=$2
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272 $as_echo_n "checking for $ac_word... " >&6; }
6273 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6274 $as_echo_n "(cached) " >&6
6275 else
6276 if test -n "$ac_ct_AR"; then
6277 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6278 else
6279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280 for as_dir in $PATH
6281 do
6282 IFS=$as_save_IFS
6283 test -z "$as_dir" && as_dir=.
6284 for ac_exec_ext in '' $ac_executable_extensions; do
6285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6286 ac_cv_prog_ac_ct_AR="ar"
6287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288 break 2
6289 fi
6290 done
6291 done
6292 IFS=$as_save_IFS
6293
6294 fi
6295 fi
6296 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6297 if test -n "$ac_ct_AR"; then
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6299 $as_echo "$ac_ct_AR" >&6; }
6300 else
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 $as_echo "no" >&6; }
6303 fi
6304
6305 if test "x$ac_ct_AR" = x; then
6306 AR="ar"
6307 else
6308 case $cross_compiling:$ac_tool_warned in
6309 yes:)
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6312 ac_tool_warned=yes ;;
6313 esac
6314 AR=$ac_ct_AR
6315 fi
6316 else
6317 AR="$ac_cv_prog_AR"
6318 fi
6319
6320 if test -z "$ARFLAGS"; then
6321 ARFLAGS='cru'
6322 fi
6323 fi
6324 else
6325 if test -z "$ARFLAGS"; then
6326 ARFLAGS='cru'
6327 fi
6328 fi
6329
6330
6331 if test -z "$RANLIB"; then
6332 if test $gl_cv_c_amsterdam_compiler = yes; then
6333 RANLIB=':'
6334 else
6335 if test -n "$ac_tool_prefix"; then
6336 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6337 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339 $as_echo_n "checking for $ac_word... " >&6; }
6340 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6341 $as_echo_n "(cached) " >&6
6342 else
6343 if test -n "$RANLIB"; then
6344 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6345 else
6346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347 for as_dir in $PATH
6348 do
6349 IFS=$as_save_IFS
6350 test -z "$as_dir" && as_dir=.
6351 for ac_exec_ext in '' $ac_executable_extensions; do
6352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355 break 2
6356 fi
6357 done
6358 done
6359 IFS=$as_save_IFS
6360
6361 fi
6362 fi
6363 RANLIB=$ac_cv_prog_RANLIB
6364 if test -n "$RANLIB"; then
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6366 $as_echo "$RANLIB" >&6; }
6367 else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369 $as_echo "no" >&6; }
6370 fi
6371
6372
6373 fi
6374 if test -z "$ac_cv_prog_RANLIB"; then
6375 ac_ct_RANLIB=$RANLIB
6376 # Extract the first word of "ranlib", so it can be a program name with args.
6377 set dummy ranlib; ac_word=$2
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379 $as_echo_n "checking for $ac_word... " >&6; }
6380 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6381 $as_echo_n "(cached) " >&6
6382 else
6383 if test -n "$ac_ct_RANLIB"; then
6384 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6385 else
6386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387 for as_dir in $PATH
6388 do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_exec_ext in '' $ac_executable_extensions; do
6392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6393 ac_cv_prog_ac_ct_RANLIB="ranlib"
6394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395 break 2
6396 fi
6397 done
6398 done
6399 IFS=$as_save_IFS
6400
6401 fi
6402 fi
6403 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6404 if test -n "$ac_ct_RANLIB"; then
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6406 $as_echo "$ac_ct_RANLIB" >&6; }
6407 else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409 $as_echo "no" >&6; }
6410 fi
6411
6412 if test "x$ac_ct_RANLIB" = x; then
6413 RANLIB=":"
6414 else
6415 case $cross_compiling:$ac_tool_warned in
6416 yes:)
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6418 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6419 ac_tool_warned=yes ;;
6420 esac
6421 RANLIB=$ac_ct_RANLIB
6422 fi
6423 else
6424 RANLIB="$ac_cv_prog_RANLIB"
6425 fi
6426
6427 fi
6428 fi
6429
6430
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6432 $as_echo_n "checking for ANSI C header files... " >&6; }
6433 if test "${ac_cv_header_stdc+set}" = set; then :
6434 $as_echo_n "(cached) " >&6
6435 else
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437 /* end confdefs.h. */
6438 #include <stdlib.h>
6439 #include <stdarg.h>
6440 #include <string.h>
6441 #include <float.h>
6442
6443 int
6444 main ()
6445 {
6446
6447 ;
6448 return 0;
6449 }
6450 _ACEOF
6451 if ac_fn_c_try_compile "$LINENO"; then :
6452 ac_cv_header_stdc=yes
6453 else
6454 ac_cv_header_stdc=no
6455 fi
6456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6457
6458 if test $ac_cv_header_stdc = yes; then
6459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6461 /* end confdefs.h. */
6462 #include <string.h>
6463
6464 _ACEOF
6465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6466 $EGREP "memchr" >/dev/null 2>&1; then :
6467
6468 else
6469 ac_cv_header_stdc=no
6470 fi
6471 rm -f conftest*
6472
6473 fi
6474
6475 if test $ac_cv_header_stdc = yes; then
6476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478 /* end confdefs.h. */
6479 #include <stdlib.h>
6480
6481 _ACEOF
6482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6483 $EGREP "free" >/dev/null 2>&1; then :
6484
6485 else
6486 ac_cv_header_stdc=no
6487 fi
6488 rm -f conftest*
6489
6490 fi
6491
6492 if test $ac_cv_header_stdc = yes; then
6493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6494 if test "$cross_compiling" = yes; then :
6495 :
6496 else
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498 /* end confdefs.h. */
6499 #include <ctype.h>
6500 #include <stdlib.h>
6501 #if ((' ' & 0x0FF) == 0x020)
6502 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6503 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6504 #else
6505 # define ISLOWER(c) \
6506 (('a' <= (c) && (c) <= 'i') \
6507 || ('j' <= (c) && (c) <= 'r') \
6508 || ('s' <= (c) && (c) <= 'z'))
6509 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6510 #endif
6511
6512 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6513 int
6514 main ()
6515 {
6516 int i;
6517 for (i = 0; i < 256; i++)
6518 if (XOR (islower (i), ISLOWER (i))
6519 || toupper (i) != TOUPPER (i))
6520 return 2;
6521 return 0;
6522 }
6523 _ACEOF
6524 if ac_fn_c_try_run "$LINENO"; then :
6525
6526 else
6527 ac_cv_header_stdc=no
6528 fi
6529 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6530 conftest.$ac_objext conftest.beam conftest.$ac_ext
6531 fi
6532
6533 fi
6534 fi
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6536 $as_echo "$ac_cv_header_stdc" >&6; }
6537 if test $ac_cv_header_stdc = yes; then
6538
6539 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6540
6541 fi
6542
6543 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6544 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6545 inttypes.h stdint.h unistd.h
6546 do :
6547 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6548 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6549 "
6550 eval as_val=\$$as_ac_Header
6551 if test "x$as_val" = x""yes; then :
6552 cat >>confdefs.h <<_ACEOF
6553 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6554 _ACEOF
6555
6556 fi
6557
6558 done
6559
6560
6561
6562 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6563 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6564 MINIX=yes
6565 else
6566 MINIX=
6567 fi
6568
6569
6570 if test "$MINIX" = yes; then
6571
6572 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6573
6574
6575 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6576
6577
6578 $as_echo "#define _MINIX 1" >>confdefs.h
6579
6580
6581 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6582
6583 fi
6584
6585
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6587 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6588 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6589 $as_echo_n "(cached) " >&6
6590 else
6591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6592 /* end confdefs.h. */
6593
6594 # define __EXTENSIONS__ 1
6595 $ac_includes_default
6596 int
6597 main ()
6598 {
6599
6600 ;
6601 return 0;
6602 }
6603 _ACEOF
6604 if ac_fn_c_try_compile "$LINENO"; then :
6605 ac_cv_safe_to_define___extensions__=yes
6606 else
6607 ac_cv_safe_to_define___extensions__=no
6608 fi
6609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6610 fi
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6612 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6613 test $ac_cv_safe_to_define___extensions__ = yes &&
6614 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6615
6616 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6617
6618 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6619
6620 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6621
6622 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6623
6624 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6625
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6627 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6628 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6629 $as_echo_n "(cached) " >&6
6630 else
6631 ac_cv_should_define__xopen_source=no
6632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6633 /* end confdefs.h. */
6634
6635 #include <wchar.h>
6636 mbstate_t x;
6637 int
6638 main ()
6639 {
6640
6641 ;
6642 return 0;
6643 }
6644 _ACEOF
6645 if ac_fn_c_try_compile "$LINENO"; then :
6646
6647 else
6648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6649 /* end confdefs.h. */
6650
6651 #define _XOPEN_SOURCE 500
6652 #include <wchar.h>
6653 mbstate_t x;
6654 int
6655 main ()
6656 {
6657
6658 ;
6659 return 0;
6660 }
6661 _ACEOF
6662 if ac_fn_c_try_compile "$LINENO"; then :
6663 ac_cv_should_define__xopen_source=yes
6664 fi
6665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6666 fi
6667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6668 fi
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6670 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6671 test $ac_cv_should_define__xopen_source = yes &&
6672 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6673
6674
6675
6676
6677
6678
6679
6680
6681 # Check whether --enable-largefile was given.
6682 if test "${enable_largefile+set}" = set; then :
6683 enableval=$enable_largefile;
6684 fi
6685
6686 if test "$enable_largefile" != no; then
6687
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6689 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6690 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6691 $as_echo_n "(cached) " >&6
6692 else
6693 ac_cv_sys_largefile_CC=no
6694 if test "$GCC" != yes; then
6695 ac_save_CC=$CC
6696 while :; do
6697 # IRIX 6.2 and later do not support large files by default,
6698 # so use the C compiler's -n32 option if that helps.
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700 /* end confdefs.h. */
6701 #include <sys/types.h>
6702 /* Check that off_t can represent 2**63 - 1 correctly.
6703 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6704 since some C++ compilers masquerading as C compilers
6705 incorrectly reject 9223372036854775807. */
6706 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6707 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6708 && LARGE_OFF_T % 2147483647 == 1)
6709 ? 1 : -1];
6710 int
6711 main ()
6712 {
6713
6714 ;
6715 return 0;
6716 }
6717 _ACEOF
6718 if ac_fn_c_try_compile "$LINENO"; then :
6719 break
6720 fi
6721 rm -f core conftest.err conftest.$ac_objext
6722 CC="$CC -n32"
6723 if ac_fn_c_try_compile "$LINENO"; then :
6724 ac_cv_sys_largefile_CC=' -n32'; break
6725 fi
6726 rm -f core conftest.err conftest.$ac_objext
6727 break
6728 done
6729 CC=$ac_save_CC
6730 rm -f conftest.$ac_ext
6731 fi
6732 fi
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6734 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6735 if test "$ac_cv_sys_largefile_CC" != no; then
6736 CC=$CC$ac_cv_sys_largefile_CC
6737 fi
6738
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6740 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6741 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6742 $as_echo_n "(cached) " >&6
6743 else
6744 while :; do
6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6746 /* end confdefs.h. */
6747 #include <sys/types.h>
6748 /* Check that off_t can represent 2**63 - 1 correctly.
6749 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6750 since some C++ compilers masquerading as C compilers
6751 incorrectly reject 9223372036854775807. */
6752 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6753 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6754 && LARGE_OFF_T % 2147483647 == 1)
6755 ? 1 : -1];
6756 int
6757 main ()
6758 {
6759
6760 ;
6761 return 0;
6762 }
6763 _ACEOF
6764 if ac_fn_c_try_compile "$LINENO"; then :
6765 ac_cv_sys_file_offset_bits=no; break
6766 fi
6767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769 /* end confdefs.h. */
6770 #define _FILE_OFFSET_BITS 64
6771 #include <sys/types.h>
6772 /* Check that off_t can represent 2**63 - 1 correctly.
6773 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6774 since some C++ compilers masquerading as C compilers
6775 incorrectly reject 9223372036854775807. */
6776 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6777 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6778 && LARGE_OFF_T % 2147483647 == 1)
6779 ? 1 : -1];
6780 int
6781 main ()
6782 {
6783
6784 ;
6785 return 0;
6786 }
6787 _ACEOF
6788 if ac_fn_c_try_compile "$LINENO"; then :
6789 ac_cv_sys_file_offset_bits=64; break
6790 fi
6791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6792 ac_cv_sys_file_offset_bits=unknown
6793 break
6794 done
6795 fi
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6797 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6798 case $ac_cv_sys_file_offset_bits in #(
6799 no | unknown) ;;
6800 *)
6801 cat >>confdefs.h <<_ACEOF
6802 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6803 _ACEOF
6804 ;;
6805 esac
6806 rm -rf conftest*
6807 if test $ac_cv_sys_file_offset_bits = unknown; then
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6809 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6810 if test "${ac_cv_sys_large_files+set}" = set; then :
6811 $as_echo_n "(cached) " >&6
6812 else
6813 while :; do
6814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815 /* end confdefs.h. */
6816 #include <sys/types.h>
6817 /* Check that off_t can represent 2**63 - 1 correctly.
6818 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6819 since some C++ compilers masquerading as C compilers
6820 incorrectly reject 9223372036854775807. */
6821 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6822 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6823 && LARGE_OFF_T % 2147483647 == 1)
6824 ? 1 : -1];
6825 int
6826 main ()
6827 {
6828
6829 ;
6830 return 0;
6831 }
6832 _ACEOF
6833 if ac_fn_c_try_compile "$LINENO"; then :
6834 ac_cv_sys_large_files=no; break
6835 fi
6836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h. */
6839 #define _LARGE_FILES 1
6840 #include <sys/types.h>
6841 /* Check that off_t can represent 2**63 - 1 correctly.
6842 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6843 since some C++ compilers masquerading as C compilers
6844 incorrectly reject 9223372036854775807. */
6845 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6846 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6847 && LARGE_OFF_T % 2147483647 == 1)
6848 ? 1 : -1];
6849 int
6850 main ()
6851 {
6852
6853 ;
6854 return 0;
6855 }
6856 _ACEOF
6857 if ac_fn_c_try_compile "$LINENO"; then :
6858 ac_cv_sys_large_files=1; break
6859 fi
6860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6861 ac_cv_sys_large_files=unknown
6862 break
6863 done
6864 fi
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6866 $as_echo "$ac_cv_sys_large_files" >&6; }
6867 case $ac_cv_sys_large_files in #(
6868 no | unknown) ;;
6869 *)
6870 cat >>confdefs.h <<_ACEOF
6871 #define _LARGE_FILES $ac_cv_sys_large_files
6872 _ACEOF
6873 ;;
6874 esac
6875 rm -rf conftest*
6876 fi
6877
6878
6879 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6880
6881 fi
6882
6883 case $ac_cv_prog_cc_stdc in #(
6884 no) :
6885 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6886 *) :
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6888 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6889 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6890 $as_echo_n "(cached) " >&6
6891 else
6892 ac_cv_prog_cc_c99=no
6893 ac_save_CC=$CC
6894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6895 /* end confdefs.h. */
6896 #include <stdarg.h>
6897 #include <stdbool.h>
6898 #include <stdlib.h>
6899 #include <wchar.h>
6900 #include <stdio.h>
6901
6902 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6903 #define debug(...) fprintf (stderr, __VA_ARGS__)
6904 #define showlist(...) puts (#__VA_ARGS__)
6905 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6906 static void
6907 test_varargs_macros (void)
6908 {
6909 int x = 1234;
6910 int y = 5678;
6911 debug ("Flag");
6912 debug ("X = %d\n", x);
6913 showlist (The first, second, and third items.);
6914 report (x>y, "x is %d but y is %d", x, y);
6915 }
6916
6917 // Check long long types.
6918 #define BIG64 18446744073709551615ull
6919 #define BIG32 4294967295ul
6920 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6921 #if !BIG_OK
6922 your preprocessor is broken;
6923 #endif
6924 #if BIG_OK
6925 #else
6926 your preprocessor is broken;
6927 #endif
6928 static long long int bignum = -9223372036854775807LL;
6929 static unsigned long long int ubignum = BIG64;
6930
6931 struct incomplete_array
6932 {
6933 int datasize;
6934 double data[];
6935 };
6936
6937 struct named_init {
6938 int number;
6939 const wchar_t *name;
6940 double average;
6941 };
6942
6943 typedef const char *ccp;
6944
6945 static inline int
6946 test_restrict (ccp restrict text)
6947 {
6948 // See if C++-style comments work.
6949 // Iterate through items via the restricted pointer.
6950 // Also check for declarations in for loops.
6951 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6952 continue;
6953 return 0;
6954 }
6955
6956 // Check varargs and va_copy.
6957 static void
6958 test_varargs (const char *format, ...)
6959 {
6960 va_list args;
6961 va_start (args, format);
6962 va_list args_copy;
6963 va_copy (args_copy, args);
6964
6965 const char *str;
6966 int number;
6967 float fnumber;
6968
6969 while (*format)
6970 {
6971 switch (*format++)
6972 {
6973 case 's': // string
6974 str = va_arg (args_copy, const char *);
6975 break;
6976 case 'd': // int
6977 number = va_arg (args_copy, int);
6978 break;
6979 case 'f': // float
6980 fnumber = va_arg (args_copy, double);
6981 break;
6982 default:
6983 break;
6984 }
6985 }
6986 va_end (args_copy);
6987 va_end (args);
6988 }
6989
6990 int
6991 main ()
6992 {
6993
6994 // Check bool.
6995 _Bool success = false;
6996
6997 // Check restrict.
6998 if (test_restrict ("String literal") == 0)
6999 success = true;
7000 char *restrict newvar = "Another string";
7001
7002 // Check varargs.
7003 test_varargs ("s, d' f .", "string", 65, 34.234);
7004 test_varargs_macros ();
7005
7006 // Check flexible array members.
7007 struct incomplete_array *ia =
7008 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7009 ia->datasize = 10;
7010 for (int i = 0; i < ia->datasize; ++i)
7011 ia->data[i] = i * 1.234;
7012
7013 // Check named initializers.
7014 struct named_init ni = {
7015 .number = 34,
7016 .name = L"Test wide string",
7017 .average = 543.34343,
7018 };
7019
7020 ni.number = 58;
7021
7022 int dynamic_array[ni.number];
7023 dynamic_array[ni.number - 1] = 543;
7024
7025 // work around unused variable warnings
7026 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7027 || dynamic_array[ni.number - 1] != 543);
7028
7029 ;
7030 return 0;
7031 }
7032 _ACEOF
7033 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7034 do
7035 CC="$ac_save_CC $ac_arg"
7036 if ac_fn_c_try_compile "$LINENO"; then :
7037 ac_cv_prog_cc_c99=$ac_arg
7038 fi
7039 rm -f core conftest.err conftest.$ac_objext
7040 test "x$ac_cv_prog_cc_c99" != "xno" && break
7041 done
7042 rm -f conftest.$ac_ext
7043 CC=$ac_save_CC
7044
7045 fi
7046 # AC_CACHE_VAL
7047 case "x$ac_cv_prog_cc_c99" in
7048 x)
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7050 $as_echo "none needed" >&6; } ;;
7051 xno)
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7053 $as_echo "unsupported" >&6; } ;;
7054 *)
7055 CC="$CC $ac_cv_prog_cc_c99"
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7057 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7058 esac
7059 if test "x$ac_cv_prog_cc_c99" != xno; then :
7060 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7061 else
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7063 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7064 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7065 $as_echo_n "(cached) " >&6
7066 else
7067 ac_cv_prog_cc_c89=no
7068 ac_save_CC=$CC
7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070 /* end confdefs.h. */
7071 #include <stdarg.h>
7072 #include <stdio.h>
7073 #include <sys/types.h>
7074 #include <sys/stat.h>
7075 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7076 struct buf { int x; };
7077 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7078 static char *e (p, i)
7079 char **p;
7080 int i;
7081 {
7082 return p[i];
7083 }
7084 static char *f (char * (*g) (char **, int), char **p, ...)
7085 {
7086 char *s;
7087 va_list v;
7088 va_start (v,p);
7089 s = g (p, va_arg (v,int));
7090 va_end (v);
7091 return s;
7092 }
7093
7094 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7095 function prototypes and stuff, but not '\xHH' hex character constants.
7096 These don't provoke an error unfortunately, instead are silently treated
7097 as 'x'. The following induces an error, until -std is added to get
7098 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7099 array size at least. It's necessary to write '\x00'==0 to get something
7100 that's true only with -std. */
7101 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7102
7103 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7104 inside strings and character constants. */
7105 #define FOO(x) 'x'
7106 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7107
7108 int test (int i, double x);
7109 struct s1 {int (*f) (int a);};
7110 struct s2 {int (*f) (double a);};
7111 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7112 int argc;
7113 char **argv;
7114 int
7115 main ()
7116 {
7117 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7118 ;
7119 return 0;
7120 }
7121 _ACEOF
7122 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7123 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7124 do
7125 CC="$ac_save_CC $ac_arg"
7126 if ac_fn_c_try_compile "$LINENO"; then :
7127 ac_cv_prog_cc_c89=$ac_arg
7128 fi
7129 rm -f core conftest.err conftest.$ac_objext
7130 test "x$ac_cv_prog_cc_c89" != "xno" && break
7131 done
7132 rm -f conftest.$ac_ext
7133 CC=$ac_save_CC
7134
7135 fi
7136 # AC_CACHE_VAL
7137 case "x$ac_cv_prog_cc_c89" in
7138 x)
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7140 $as_echo "none needed" >&6; } ;;
7141 xno)
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7143 $as_echo "unsupported" >&6; } ;;
7144 *)
7145 CC="$CC $ac_cv_prog_cc_c89"
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7147 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7148 esac
7149 if test "x$ac_cv_prog_cc_c89" != xno; then :
7150 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7151 else
7152 ac_cv_prog_cc_stdc=no
7153 fi
7154
7155 fi
7156 ;;
7157 esac
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7159 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7160 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7161 $as_echo_n "(cached) " >&6
7162 fi
7163
7164 case $ac_cv_prog_cc_stdc in #(
7165 no) :
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7167 $as_echo "unsupported" >&6; } ;; #(
7168 '') :
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7170 $as_echo "none needed" >&6; } ;; #(
7171 *) :
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7173 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7174 esac
7175
7176
7177
7178 # Code from module alloca-opt:
7179 # Code from module allocator:
7180 # Code from module at-internal:
7181 # Code from module c-ctype:
7182 # Code from module c-strcase:
7183 # Code from module careadlinkat:
7184 # Code from module clock-time:
7185 # Code from module close-stream:
7186 # Code from module crypto/md5:
7187 # Code from module crypto/sha1:
7188 # Code from module crypto/sha256:
7189 # Code from module crypto/sha512:
7190 # Code from module dirent:
7191 # Code from module dosname:
7192 # Code from module dtoastr:
7193 # Code from module dtotimespec:
7194 # Code from module dup2:
7195 # Code from module environ:
7196 # Code from module errno:
7197 # Code from module euidaccess:
7198 # Code from module execinfo:
7199 # Code from module extensions:
7200
7201 # Code from module extern-inline:
7202 # Code from module faccessat:
7203 # Code from module fcntl-h:
7204 # Code from module fdatasync:
7205 # Code from module fdopendir:
7206 # Code from module filemode:
7207 # Code from module fpending:
7208 # Code from module fstatat:
7209 # Code from module fsync:
7210 # Code from module getgroups:
7211 # Code from module getloadavg:
7212 # Code from module getopt-gnu:
7213 # Code from module getopt-posix:
7214 # Code from module gettext-h:
7215 # Code from module gettime:
7216 # Code from module gettimeofday:
7217 # Code from module group-member:
7218 # Code from module ignore-value:
7219 # Code from module include_next:
7220 # Code from module intprops:
7221 # Code from module inttypes-incomplete:
7222 # Code from module largefile:
7223
7224 # Code from module lstat:
7225 # Code from module manywarnings:
7226 # Code from module memrchr:
7227 # Code from module mktime:
7228 # Code from module multiarch:
7229 # Code from module nocrash:
7230 # Code from module openat-h:
7231 # Code from module pathmax:
7232 # Code from module pselect:
7233 # Code from module pthread_sigmask:
7234 # Code from module putenv:
7235 # Code from module qacl:
7236 # Code from module readlink:
7237 # Code from module readlinkat:
7238 # Code from module root-uid:
7239 # Code from module sig2str:
7240 # Code from module signal-h:
7241 # Code from module snippet/_Noreturn:
7242 # Code from module snippet/arg-nonnull:
7243 # Code from module snippet/c++defs:
7244 # Code from module snippet/warn-on-use:
7245 # Code from module socklen:
7246 # Code from module ssize_t:
7247 # Code from module stat:
7248 # Code from module stat-time:
7249 # Code from module stdalign:
7250 # Code from module stdarg:
7251
7252
7253
7254 # Code from module stdbool:
7255 # Code from module stddef:
7256 # Code from module stdint:
7257 # Code from module stdio:
7258 # Code from module stdlib:
7259 # Code from module strftime:
7260 # Code from module string:
7261 # Code from module strtoimax:
7262 # Code from module strtoll:
7263 # Code from module strtoull:
7264 # Code from module strtoumax:
7265 # Code from module symlink:
7266 # Code from module sys_select:
7267 # Code from module sys_stat:
7268 # Code from module sys_time:
7269 # Code from module time:
7270 # Code from module time_r:
7271 # Code from module timer-time:
7272 # Code from module timespec:
7273 # Code from module timespec-add:
7274 # Code from module timespec-sub:
7275 # Code from module u64:
7276 # Code from module unistd:
7277 # Code from module unsetenv:
7278 # Code from module utimens:
7279 # Code from module verify:
7280 # Code from module warnings:
7281 # Code from module xalloc-oversized:
7282
7283
7284 if test "$ac_test_CFLAGS" != set; then
7285 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7286 # if -g3 works and the user does not specify CFLAGS.
7287 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7288 case $CFLAGS in
7289 '-g')
7290 emacs_g3_CFLAGS='-g3';;
7291 '-g -O2')
7292 emacs_g3_CFLAGS='-g3 -O2';;
7293 *)
7294 emacs_g3_CFLAGS='';;
7295 esac
7296 if test -n "$emacs_g3_CFLAGS"; then
7297 emacs_save_CFLAGS=$CFLAGS
7298 CFLAGS=$emacs_g3_CFLAGS
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7300 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7301 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7302 $as_echo_n "(cached) " >&6
7303 else
7304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305 /* end confdefs.h. */
7306
7307 int
7308 main ()
7309 {
7310
7311 ;
7312 return 0;
7313 }
7314 _ACEOF
7315 if ac_fn_c_try_link "$LINENO"; then :
7316 emacs_cv_prog_cc_g3=yes
7317 else
7318 emacs_cv_prog_cc_g3=no
7319 fi
7320 rm -f core conftest.err conftest.$ac_objext \
7321 conftest$ac_exeext conftest.$ac_ext
7322 fi
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7324 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7325 if test $emacs_cv_prog_cc_g3 != yes; then
7326 CFLAGS=$emacs_save_CFLAGS
7327 fi
7328 fi
7329
7330 case $CFLAGS in
7331 *-O*) ;;
7332 *)
7333 # No optimization flag was inferred for this non-GCC compiler.
7334 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7335 emacs_save_CFLAGS=$CFLAGS
7336 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7337 CFLAGS=${CFLAGS}-O
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7339 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7340 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7341 $as_echo_n "(cached) " >&6
7342 else
7343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7344 /* end confdefs.h. */
7345
7346 int
7347 main ()
7348 {
7349
7350 ;
7351 return 0;
7352 }
7353 _ACEOF
7354 if ac_fn_c_try_link "$LINENO"; then :
7355 emacs_cv_prog_cc_o=yes
7356 else
7357 emacs_cv_prog_cc_o=no
7358 fi
7359 rm -f core conftest.err conftest.$ac_objext \
7360 conftest$ac_exeext conftest.$ac_ext
7361 fi
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7363 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7364 if test $emacs_cv_prog_cc_o != yes; then
7365 CFLAGS=$emacs_save_CFLAGS
7366 fi ;;
7367 esac
7368 fi
7369
7370 # Check whether --enable-gcc-warnings was given.
7371 if test "${enable_gcc_warnings+set}" = set; then :
7372 enableval=$enable_gcc_warnings; case $enableval in
7373 yes|no) ;;
7374 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7375 esac
7376 gl_gcc_warnings=$enableval
7377 else
7378 gl_gcc_warnings=no
7379
7380 fi
7381
7382
7383 # Check whether --enable-link-time-optimization was given.
7384 if test "${enable_link_time_optimization+set}" = set; then :
7385 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7387 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7388 ac_lto_supported=no
7389 if test x$GCC = xyes; then
7390 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7391 if test x$CPUS != x; then
7392 LTO="-flto=$CPUS"
7393 else
7394 LTO="-flto"
7395 fi
7396 old_CFLAGS=$CFLAGS
7397 CFLAGS="$CFLAGS $LTO"
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399 /* end confdefs.h. */
7400
7401 int
7402 main ()
7403 {
7404
7405 ;
7406 return 0;
7407 }
7408 _ACEOF
7409 if ac_fn_c_try_compile "$LINENO"; then :
7410 ac_lto_supported=yes
7411 else
7412 ac_lto_supported=no
7413 fi
7414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7415 CFLAGS="$old_CFLAGS"
7416 fi
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7418 $as_echo "$ac_lto_supported" >&6; }
7419 if test "$ac_lto_supported" = "yes"; then
7420 CFLAGS="$CFLAGS $LTO"
7421 fi
7422 fi
7423 fi
7424
7425
7426 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7427 # ------------------------------------------------
7428 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7429 # Otherwise, run RUN-IF-NOT-FOUND.
7430
7431
7432 # When compiling with GCC, prefer -isystem to -I when including system
7433 # include files, to avoid generating useless diagnostics for the files.
7434 if test "$gl_gcc_warnings" != yes; then
7435 isystem='-I'
7436 else
7437 isystem='-isystem '
7438
7439 # This, $nw, is the list of warnings we disable.
7440 nw=
7441
7442 case $with_x_toolkit in
7443 lucid | athena | motif)
7444 # Old toolkits mishandle 'const'.
7445 nw="$nw -Wwrite-strings"
7446 ;;
7447 *)
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7449 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7450 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7451 $as_echo_n "(cached) " >&6
7452 else
7453
7454 gl_save_compiler_FLAGS="$CFLAGS"
7455 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7457 /* end confdefs.h. */
7458
7459 int
7460 main ()
7461 {
7462
7463 ;
7464 return 0;
7465 }
7466 _ACEOF
7467 if ac_fn_c_try_compile "$LINENO"; then :
7468 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7469 else
7470 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7471 fi
7472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7473 CFLAGS="$gl_save_compiler_FLAGS"
7474
7475 fi
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7477 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7478 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7479 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7480 else
7481 gl_unknown_warnings_are_errors=
7482 fi
7483
7484
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7486 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7487 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7488 $as_echo_n "(cached) " >&6
7489 else
7490
7491 gl_save_compiler_FLAGS="$CFLAGS"
7492 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494 /* end confdefs.h. */
7495
7496 int
7497 main ()
7498 {
7499
7500 ;
7501 return 0;
7502 }
7503 _ACEOF
7504 if ac_fn_c_try_compile "$LINENO"; then :
7505 gl_cv_warn_c__Werror=yes
7506 else
7507 gl_cv_warn_c__Werror=no
7508 fi
7509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7510 CFLAGS="$gl_save_compiler_FLAGS"
7511
7512 fi
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7514 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7515 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7516 as_fn_append WERROR_CFLAGS " -Werror"
7517 fi
7518
7519
7520 ;;
7521 esac
7522
7523
7524 nw="$nw -Waggregate-return" # anachronistic
7525 nw="$nw -Wlong-long" # C90 is anachronistic
7526 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7527 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7528 nw="$nw -Wtraditional" # Warns on #elif which we use often
7529 nw="$nw -Wcast-qual" # Too many warnings for now
7530 nw="$nw -Wconversion" # Too many warnings for now
7531 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7532 nw="$nw -Wsign-conversion" # Too many warnings for now
7533 nw="$nw -Woverlength-strings" # Not a problem these days
7534 nw="$nw -Wtraditional-conversion" # Too many warnings for now
7535 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
7536 nw="$nw -Wpadded" # Our structs are not padded
7537 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
7538 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7539 nw="$nw -Wformat-nonliteral" # we do this a lot
7540 nw="$nw -Wvla" # warnings in gettext.h
7541 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7542 nw="$nw -Wswitch-enum" # Too many warnings for now
7543 nw="$nw -Wswitch-default" # Too many warnings for now
7544 nw="$nw -Wfloat-equal" # warns about high-quality code
7545 nw="$nw -Winline" # OK to ignore 'inline'
7546 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7547 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7548 # signed overflow has undefined behavior
7549 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7550 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7551
7552 # Emacs doesn't care about shadowing; see
7553 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7554 nw="$nw -Wshadow"
7555
7556 # Emacs's use of alloca inhibits protecting the stack.
7557 nw="$nw -Wstack-protector"
7558
7559 # The following line should be removable at some point.
7560 nw="$nw -Wsuggest-attribute=pure"
7561
7562
7563
7564 if test -n "$GCC"; then
7565
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7567 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7568 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7569 $as_echo_n "(cached) " >&6
7570 else
7571
7572 gl_save_CFLAGS="$CFLAGS"
7573 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7575 /* end confdefs.h. */
7576
7577 int
7578 main ()
7579 {
7580
7581 ;
7582 return 0;
7583 }
7584 _ACEOF
7585 if ac_fn_c_try_compile "$LINENO"; then :
7586 gl_cv_cc_nomfi_supported=yes
7587 else
7588 gl_cv_cc_nomfi_supported=no
7589 fi
7590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7591 CFLAGS="$gl_save_CFLAGS"
7592 fi
7593
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7595 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7596
7597 if test "$gl_cv_cc_nomfi_supported" = yes; then
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7599 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7600 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7601 $as_echo_n "(cached) " >&6
7602 else
7603
7604 gl_save_CFLAGS="$CFLAGS"
7605 CFLAGS="$CFLAGS -W -Werror"
7606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7607 /* end confdefs.h. */
7608 void f (void)
7609 {
7610 typedef struct { int a; int b; } s_t;
7611 s_t s1 = { 0, };
7612 }
7613
7614 int
7615 main ()
7616 {
7617
7618 ;
7619 return 0;
7620 }
7621 _ACEOF
7622 if ac_fn_c_try_compile "$LINENO"; then :
7623 gl_cv_cc_nomfi_needed=no
7624 else
7625 gl_cv_cc_nomfi_needed=yes
7626 fi
7627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7628 CFLAGS="$gl_save_CFLAGS"
7629
7630 fi
7631
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7633 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7634 fi
7635
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7637 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7638 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7639 $as_echo_n "(cached) " >&6
7640 else
7641
7642 gl_save_CFLAGS="$CFLAGS"
7643 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645 /* end confdefs.h. */
7646
7647 int
7648 main ()
7649 {
7650
7651 ;
7652 return 0;
7653 }
7654 _ACEOF
7655 if ac_fn_c_try_compile "$LINENO"; then :
7656 gl_cv_cc_uninitialized_supported=yes
7657 else
7658 gl_cv_cc_uninitialized_supported=no
7659 fi
7660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7661 CFLAGS="$gl_save_CFLAGS"
7662 fi
7663
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7665 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7666
7667 fi
7668
7669 # List all gcc warning categories.
7670 gl_manywarn_set=
7671 for gl_manywarn_item in \
7672 -W \
7673 -Wabi \
7674 -Waddress \
7675 -Waggressive-loop-optimizations \
7676 -Wall \
7677 -Warray-bounds \
7678 -Wattributes \
7679 -Wbad-function-cast \
7680 -Wbuiltin-macro-redefined \
7681 -Wcast-align \
7682 -Wchar-subscripts \
7683 -Wclobbered \
7684 -Wcomment \
7685 -Wcomments \
7686 -Wcoverage-mismatch \
7687 -Wcpp \
7688 -Wdeprecated \
7689 -Wdeprecated-declarations \
7690 -Wdisabled-optimization \
7691 -Wdiv-by-zero \
7692 -Wdouble-promotion \
7693 -Wempty-body \
7694 -Wendif-labels \
7695 -Wenum-compare \
7696 -Wextra \
7697 -Wformat-contains-nul \
7698 -Wformat-extra-args \
7699 -Wformat-nonliteral \
7700 -Wformat-security \
7701 -Wformat-y2k \
7702 -Wformat-zero-length \
7703 -Wfree-nonheap-object \
7704 -Wignored-qualifiers \
7705 -Wimplicit \
7706 -Wimplicit-function-declaration \
7707 -Wimplicit-int \
7708 -Winit-self \
7709 -Winline \
7710 -Wint-to-pointer-cast \
7711 -Winvalid-memory-model \
7712 -Winvalid-pch \
7713 -Wjump-misses-init \
7714 -Wlogical-op \
7715 -Wmain \
7716 -Wmaybe-uninitialized \
7717 -Wmissing-braces \
7718 -Wmissing-declarations \
7719 -Wmissing-field-initializers \
7720 -Wmissing-include-dirs \
7721 -Wmissing-parameter-type \
7722 -Wmissing-prototypes \
7723 -Wmudflap \
7724 -Wmultichar \
7725 -Wnarrowing \
7726 -Wnested-externs \
7727 -Wnonnull \
7728 -Wnormalized=nfc \
7729 -Wold-style-declaration \
7730 -Wold-style-definition \
7731 -Woverflow \
7732 -Woverlength-strings \
7733 -Woverride-init \
7734 -Wpacked \
7735 -Wpacked-bitfield-compat \
7736 -Wparentheses \
7737 -Wpointer-arith \
7738 -Wpointer-sign \
7739 -Wpointer-to-int-cast \
7740 -Wpragmas \
7741 -Wreturn-local-addr \
7742 -Wreturn-type \
7743 -Wsequence-point \
7744 -Wshadow \
7745 -Wsizeof-pointer-memaccess \
7746 -Wstack-protector \
7747 -Wstrict-aliasing \
7748 -Wstrict-overflow \
7749 -Wstrict-prototypes \
7750 -Wsuggest-attribute=const \
7751 -Wsuggest-attribute=format \
7752 -Wsuggest-attribute=noreturn \
7753 -Wsuggest-attribute=pure \
7754 -Wswitch \
7755 -Wswitch-default \
7756 -Wsync-nand \
7757 -Wsystem-headers \
7758 -Wtrampolines \
7759 -Wtrigraphs \
7760 -Wtype-limits \
7761 -Wuninitialized \
7762 -Wunknown-pragmas \
7763 -Wunsafe-loop-optimizations \
7764 -Wunused \
7765 -Wunused-but-set-parameter \
7766 -Wunused-but-set-variable \
7767 -Wunused-function \
7768 -Wunused-label \
7769 -Wunused-local-typedefs \
7770 -Wunused-macros \
7771 -Wunused-parameter \
7772 -Wunused-result \
7773 -Wunused-value \
7774 -Wunused-variable \
7775 -Wvarargs \
7776 -Wvariadic-macros \
7777 -Wvector-operation-performance \
7778 -Wvla \
7779 -Wvolatile-register-var \
7780 -Wwrite-strings \
7781 \
7782 ; do
7783 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7784 done
7785
7786 # Disable specific options as needed.
7787 if test "$gl_cv_cc_nomfi_needed" = yes; then
7788 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7789 fi
7790
7791 if test "$gl_cv_cc_uninitialized_supported" = no; then
7792 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7793 fi
7794
7795 ws=$gl_manywarn_set
7796
7797
7798 gl_warn_set=
7799 set x $ws; shift
7800 for gl_warn_item
7801 do
7802 case " $nw " in
7803 *" $gl_warn_item "*)
7804 ;;
7805 *)
7806 gl_warn_set="$gl_warn_set $gl_warn_item"
7807 ;;
7808 esac
7809 done
7810 ws=$gl_warn_set
7811
7812 for w in $ws; do
7813
7814 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7816 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7817 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7818 $as_echo_n "(cached) " >&6
7819 else
7820
7821 gl_save_compiler_FLAGS="$CFLAGS"
7822 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
7823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7824 /* end confdefs.h. */
7825
7826 int
7827 main ()
7828 {
7829
7830 ;
7831 return 0;
7832 }
7833 _ACEOF
7834 if ac_fn_c_try_compile "$LINENO"; then :
7835 eval "$as_gl_Warn=yes"
7836 else
7837 eval "$as_gl_Warn=no"
7838 fi
7839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7840 CFLAGS="$gl_save_compiler_FLAGS"
7841
7842 fi
7843 eval ac_res=\$$as_gl_Warn
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7845 $as_echo "$ac_res" >&6; }
7846 eval as_val=\$$as_gl_Warn
7847 if test "x$as_val" = x""yes; then :
7848 as_fn_append WARN_CFLAGS " $w"
7849 fi
7850
7851
7852 done
7853
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7855 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7856 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7857 $as_echo_n "(cached) " >&6
7858 else
7859
7860 gl_save_compiler_FLAGS="$CFLAGS"
7861 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
7862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7863 /* end confdefs.h. */
7864
7865 int
7866 main ()
7867 {
7868
7869 ;
7870 return 0;
7871 }
7872 _ACEOF
7873 if ac_fn_c_try_compile "$LINENO"; then :
7874 gl_cv_warn_c__Wno_missing_field_initializers=yes
7875 else
7876 gl_cv_warn_c__Wno_missing_field_initializers=no
7877 fi
7878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7879 CFLAGS="$gl_save_compiler_FLAGS"
7880
7881 fi
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7883 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7884 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7885 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7886 fi
7887
7888 # We need this one
7889
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7891 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7892 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7893 $as_echo_n "(cached) " >&6
7894 else
7895
7896 gl_save_compiler_FLAGS="$CFLAGS"
7897 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
7898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7899 /* end confdefs.h. */
7900
7901 int
7902 main ()
7903 {
7904
7905 ;
7906 return 0;
7907 }
7908 _ACEOF
7909 if ac_fn_c_try_compile "$LINENO"; then :
7910 gl_cv_warn_c__Wno_sign_compare=yes
7911 else
7912 gl_cv_warn_c__Wno_sign_compare=no
7913 fi
7914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7915 CFLAGS="$gl_save_compiler_FLAGS"
7916
7917 fi
7918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7919 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7920 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7921 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7922 fi
7923
7924 # Too many warnings for now
7925
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7927 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7928 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7929 $as_echo_n "(cached) " >&6
7930 else
7931
7932 gl_save_compiler_FLAGS="$CFLAGS"
7933 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
7934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935 /* end confdefs.h. */
7936
7937 int
7938 main ()
7939 {
7940
7941 ;
7942 return 0;
7943 }
7944 _ACEOF
7945 if ac_fn_c_try_compile "$LINENO"; then :
7946 gl_cv_warn_c__Wno_type_limits=yes
7947 else
7948 gl_cv_warn_c__Wno_type_limits=no
7949 fi
7950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951 CFLAGS="$gl_save_compiler_FLAGS"
7952
7953 fi
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7955 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7956 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7957 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7958 fi
7959
7960 # Too many warnings for now
7961
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7963 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7964 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7965 $as_echo_n "(cached) " >&6
7966 else
7967
7968 gl_save_compiler_FLAGS="$CFLAGS"
7969 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
7970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7971 /* end confdefs.h. */
7972
7973 int
7974 main ()
7975 {
7976
7977 ;
7978 return 0;
7979 }
7980 _ACEOF
7981 if ac_fn_c_try_compile "$LINENO"; then :
7982 gl_cv_warn_c__Wno_switch=yes
7983 else
7984 gl_cv_warn_c__Wno_switch=no
7985 fi
7986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7987 CFLAGS="$gl_save_compiler_FLAGS"
7988
7989 fi
7990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7991 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7992 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7993 as_fn_append WARN_CFLAGS " -Wno-switch"
7994 fi
7995
7996 # Too many warnings for now
7997
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7999 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8000 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8001 $as_echo_n "(cached) " >&6
8002 else
8003
8004 gl_save_compiler_FLAGS="$CFLAGS"
8005 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
8006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007 /* end confdefs.h. */
8008
8009 int
8010 main ()
8011 {
8012
8013 ;
8014 return 0;
8015 }
8016 _ACEOF
8017 if ac_fn_c_try_compile "$LINENO"; then :
8018 gl_cv_warn_c__Wno_unused_parameter=yes
8019 else
8020 gl_cv_warn_c__Wno_unused_parameter=no
8021 fi
8022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8023 CFLAGS="$gl_save_compiler_FLAGS"
8024
8025 fi
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8027 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8028 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8029 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8030 fi
8031
8032 # Too many warnings for now
8033
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8035 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8036 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8037 $as_echo_n "(cached) " >&6
8038 else
8039
8040 gl_save_compiler_FLAGS="$CFLAGS"
8041 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
8042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8043 /* end confdefs.h. */
8044
8045 int
8046 main ()
8047 {
8048
8049 ;
8050 return 0;
8051 }
8052 _ACEOF
8053 if ac_fn_c_try_compile "$LINENO"; then :
8054 gl_cv_warn_c__Wno_format_nonliteral=yes
8055 else
8056 gl_cv_warn_c__Wno_format_nonliteral=no
8057 fi
8058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8059 CFLAGS="$gl_save_compiler_FLAGS"
8060
8061 fi
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8063 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8064 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8065 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8066 fi
8067
8068
8069
8070 # In spite of excluding -Wlogical-op above, it is enabled, as of
8071 # gcc 4.5.0 20090517.
8072
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8074 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8075 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8076 $as_echo_n "(cached) " >&6
8077 else
8078
8079 gl_save_compiler_FLAGS="$CFLAGS"
8080 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
8081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8082 /* end confdefs.h. */
8083
8084 int
8085 main ()
8086 {
8087
8088 ;
8089 return 0;
8090 }
8091 _ACEOF
8092 if ac_fn_c_try_compile "$LINENO"; then :
8093 gl_cv_warn_c__Wno_logical_op=yes
8094 else
8095 gl_cv_warn_c__Wno_logical_op=no
8096 fi
8097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8098 CFLAGS="$gl_save_compiler_FLAGS"
8099
8100 fi
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8102 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8103 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8104 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8105 fi
8106
8107
8108
8109
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8111 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8112 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8113 $as_echo_n "(cached) " >&6
8114 else
8115
8116 gl_save_compiler_FLAGS="$CFLAGS"
8117 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
8118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8119 /* end confdefs.h. */
8120
8121 int
8122 main ()
8123 {
8124
8125 ;
8126 return 0;
8127 }
8128 _ACEOF
8129 if ac_fn_c_try_compile "$LINENO"; then :
8130 gl_cv_warn_c__fdiagnostics_show_option=yes
8131 else
8132 gl_cv_warn_c__fdiagnostics_show_option=no
8133 fi
8134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8135 CFLAGS="$gl_save_compiler_FLAGS"
8136
8137 fi
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8139 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8140 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8141 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
8142 fi
8143
8144
8145
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8147 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8148 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8149 $as_echo_n "(cached) " >&6
8150 else
8151
8152 gl_save_compiler_FLAGS="$CFLAGS"
8153 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
8154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8155 /* end confdefs.h. */
8156
8157 int
8158 main ()
8159 {
8160
8161 ;
8162 return 0;
8163 }
8164 _ACEOF
8165 if ac_fn_c_try_compile "$LINENO"; then :
8166 gl_cv_warn_c__funit_at_a_time=yes
8167 else
8168 gl_cv_warn_c__funit_at_a_time=no
8169 fi
8170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8171 CFLAGS="$gl_save_compiler_FLAGS"
8172
8173 fi
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8175 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8176 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8177 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8178 fi
8179
8180
8181
8182
8183 $as_echo "#define lint 1" >>confdefs.h
8184
8185
8186
8187 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8188
8189
8190 # We use a slightly smaller set of warning options for lib/.
8191 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8192 nw=
8193 nw="$nw -Wunused-macros"
8194
8195
8196 gl_warn_set=
8197 set x $WARN_CFLAGS; shift
8198 for gl_warn_item
8199 do
8200 case " $nw " in
8201 *" $gl_warn_item "*)
8202 ;;
8203 *)
8204 gl_warn_set="$gl_warn_set $gl_warn_item"
8205 ;;
8206 esac
8207 done
8208 GNULIB_WARN_CFLAGS=$gl_warn_set
8209
8210
8211 fi
8212
8213
8214
8215
8216
8217
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8219 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8220 rm -f conf$$ conf$$.file
8221
8222 LN_S_FILEONLY='cp -p'
8223
8224 if (echo >conf$$.file) 2>/dev/null; then
8225 if ln -s conf$$.file conf$$ 2>/dev/null; then
8226 LN_S_FILEONLY='ln -s'
8227 elif ln conf$$.file conf$$ 2>/dev/null; then
8228 LN_S_FILEONLY=ln
8229 fi
8230 fi
8231
8232 rm -f conf$$ conf$$.file
8233
8234 if test "$LN_S_FILEONLY" = "ln -s"; then
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8236 $as_echo "yes" >&6; }
8237 else
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8239 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8240 fi
8241
8242
8243
8244
8245 # Extract the first word of "install-info", so it can be a program name with args.
8246 set dummy install-info; ac_word=$2
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248 $as_echo_n "checking for $ac_word... " >&6; }
8249 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8250 $as_echo_n "(cached) " >&6
8251 else
8252 case $INSTALL_INFO in
8253 [\\/]* | ?:[\\/]*)
8254 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8255 ;;
8256 *)
8257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8259 do
8260 IFS=$as_save_IFS
8261 test -z "$as_dir" && as_dir=.
8262 for ac_exec_ext in '' $ac_executable_extensions; do
8263 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8264 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8265 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8266 break 2
8267 fi
8268 done
8269 done
8270 IFS=$as_save_IFS
8271
8272 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8273 ;;
8274 esac
8275 fi
8276 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8277 if test -n "$INSTALL_INFO"; then
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8279 $as_echo "$INSTALL_INFO" >&6; }
8280 else
8281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282 $as_echo "no" >&6; }
8283 fi
8284
8285
8286 # Extract the first word of "gzip", so it can be a program name with args.
8287 set dummy gzip; ac_word=$2
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289 $as_echo_n "checking for $ac_word... " >&6; }
8290 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8291 $as_echo_n "(cached) " >&6
8292 else
8293 case $GZIP_PROG in
8294 [\\/]* | ?:[\\/]*)
8295 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8296 ;;
8297 *)
8298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299 for as_dir in $PATH
8300 do
8301 IFS=$as_save_IFS
8302 test -z "$as_dir" && as_dir=.
8303 for ac_exec_ext in '' $ac_executable_extensions; do
8304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8305 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307 break 2
8308 fi
8309 done
8310 done
8311 IFS=$as_save_IFS
8312
8313 ;;
8314 esac
8315 fi
8316 GZIP_PROG=$ac_cv_path_GZIP_PROG
8317 if test -n "$GZIP_PROG"; then
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8319 $as_echo "$GZIP_PROG" >&6; }
8320 else
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322 $as_echo "no" >&6; }
8323 fi
8324
8325
8326
8327 if test $opsys = gnu-linux; then
8328 # Extract the first word of "paxctl", so it can be a program name with args.
8329 set dummy paxctl; ac_word=$2
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331 $as_echo_n "checking for $ac_word... " >&6; }
8332 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8333 $as_echo_n "(cached) " >&6
8334 else
8335 case $PAXCTL in
8336 [\\/]* | ?:[\\/]*)
8337 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8338 ;;
8339 *)
8340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8341 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8342 do
8343 IFS=$as_save_IFS
8344 test -z "$as_dir" && as_dir=.
8345 for ac_exec_ext in '' $ac_executable_extensions; do
8346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8347 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8348 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8349 break 2
8350 fi
8351 done
8352 done
8353 IFS=$as_save_IFS
8354
8355 ;;
8356 esac
8357 fi
8358 PAXCTL=$ac_cv_path_PAXCTL
8359 if test -n "$PAXCTL"; then
8360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8361 $as_echo "$PAXCTL" >&6; }
8362 else
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364 $as_echo "no" >&6; }
8365 fi
8366
8367
8368 if test "X$PAXCTL" != X; then
8369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8370 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8372 /* end confdefs.h. */
8373
8374 int
8375 main ()
8376 {
8377
8378 ;
8379 return 0;
8380 }
8381 _ACEOF
8382 if ac_fn_c_try_link "$LINENO"; then :
8383 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8384 $as_echo "yes" >&6; }
8385 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386 $as_echo "no" >&6; }; PAXCTL=""; fi
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext \
8389 conftest$ac_exeext conftest.$ac_ext
8390 fi
8391 fi
8392
8393 ## Need makeinfo >= 4.7 (?) to build the manuals.
8394 # Extract the first word of "makeinfo", so it can be a program name with args.
8395 set dummy makeinfo; ac_word=$2
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8397 $as_echo_n "checking for $ac_word... " >&6; }
8398 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8399 $as_echo_n "(cached) " >&6
8400 else
8401 case $MAKEINFO in
8402 [\\/]* | ?:[\\/]*)
8403 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8404 ;;
8405 *)
8406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8407 for as_dir in $PATH
8408 do
8409 IFS=$as_save_IFS
8410 test -z "$as_dir" && as_dir=.
8411 for ac_exec_ext in '' $ac_executable_extensions; do
8412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8413 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8415 break 2
8416 fi
8417 done
8418 done
8419 IFS=$as_save_IFS
8420
8421 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8422 ;;
8423 esac
8424 fi
8425 MAKEINFO=$ac_cv_path_MAKEINFO
8426 if test -n "$MAKEINFO"; then
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8428 $as_echo "$MAKEINFO" >&6; }
8429 else
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8431 $as_echo "no" >&6; }
8432 fi
8433
8434
8435 if test "$MAKEINFO" != "no"; then
8436 case `
8437 $MAKEINFO --version 2> /dev/null |
8438 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8439 ` in
8440 '') MAKEINFO=no;;
8441 esac
8442 fi
8443
8444 ## Makeinfo is unusual. For a released Emacs, the manuals are
8445 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8446 ## therefore in the category of "special tools" not normally required, which
8447 ## configure does not have to check for (eg autoconf itself).
8448 ## In a Bazaar checkout on the other hand, the manuals are not included.
8449 ## So makeinfo is a requirement to build from Bazaar, and configure
8450 ## should test for it as it does for any other build requirement.
8451 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8452 ## with pre-built manuals, from a Bazaar checkout.
8453 HAVE_MAKEINFO=yes
8454
8455 if test "$MAKEINFO" = "no"; then
8456 MAKEINFO=makeinfo
8457 if test "x${with_makeinfo}" = "xno"; then
8458 HAVE_MAKEINFO=no
8459 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8460 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8461 source tree does not seem to have pre-built manuals in the \`info' directory.
8462 Either install a suitable version of makeinfo, or re-run configure
8463 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8464 fi
8465 fi
8466
8467
8468 INFO_EXT=.info
8469 INFO_OPTS=--no-split
8470
8471
8472
8473
8474 if test x$GCC = xyes; then
8475 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8476 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8477 else
8478 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8479 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8480 fi
8481
8482
8483 late_LDFLAGS=$LDFLAGS
8484 if test x$GCC = xyes; then
8485 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8486 else
8487 LDFLAGS="$LDFLAGS -znocombreloc"
8488 fi
8489
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8491 $as_echo_n "checking for -znocombreloc... " >&6; }
8492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8493 /* end confdefs.h. */
8494
8495 int
8496 main ()
8497 {
8498
8499 ;
8500 return 0;
8501 }
8502 _ACEOF
8503 if ac_fn_c_try_link "$LINENO"; then :
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8505 $as_echo "yes" >&6; }
8506 else
8507 LDFLAGS=$late_LDFLAGS
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509 $as_echo "no" >&6; }
8510 fi
8511 rm -f core conftest.err conftest.$ac_objext \
8512 conftest$ac_exeext conftest.$ac_ext
8513
8514
8515 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8516 case "$opsys" in
8517 your-opsys-here) CANNOT_DUMP=yes ;;
8518 esac
8519
8520 test "$CANNOT_DUMP" = "yes" && \
8521
8522 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8523
8524
8525
8526
8527
8528 UNEXEC_OBJ=unexelf.o
8529 case "$opsys" in
8530 # MSDOS uses unexcoff.o
8531 # MSWindows uses unexw32.o
8532 aix4-2)
8533 UNEXEC_OBJ=unexaix.o
8534 ;;
8535 cygwin)
8536 UNEXEC_OBJ=unexcw.o
8537 ;;
8538 darwin)
8539 UNEXEC_OBJ=unexmacosx.o
8540 ;;
8541 hpux10-20 | hpux11)
8542 UNEXEC_OBJ=unexhp9k800.o
8543 ;;
8544 sol2-10)
8545 # Use the Solaris dldump() function, called from unexsol.c, to dump
8546 # emacs, instead of the generic ELF dump code found in unexelf.c.
8547 # The resulting binary has a complete symbol table, and is better
8548 # for debugging and other observability tools (debuggers, pstack, etc).
8549 #
8550 # If you encounter a problem using dldump(), please consider sending
8551 # a message to the OpenSolaris tools-linking mailing list:
8552 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8553 #
8554 # It is likely that dldump() works with older Solaris too, but this has
8555 # not been tested, so for now this change is for Solaris 10 or newer.
8556 UNEXEC_OBJ=unexsol.o
8557 ;;
8558 esac
8559
8560 LD_SWITCH_SYSTEM=
8561 case "$opsys" in
8562 freebsd|dragonfly)
8563 ## Let `ld' find image libs and similar things in /usr/local/lib.
8564 ## The system compiler, GCC, has apparently been modified to not
8565 ## look there, contrary to what a stock GCC would do.
8566 ### It's not our place to do this. See bug#10313#17.
8567 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8568 :
8569 ;;
8570
8571 gnu-linux)
8572 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8573 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8574 ;;
8575
8576 netbsd)
8577 ### It's not our place to do this. See bug#10313#17.
8578 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8579 :
8580 ;;
8581
8582 openbsd)
8583 ## Han Boetes <han@boetes.org> says this is necessary,
8584 ## otherwise Emacs dumps core on elf systems.
8585 LD_SWITCH_SYSTEM="-Z"
8586 ;;
8587 esac
8588
8589
8590 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8591
8592 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8593 ## which has not been defined yet. When this was handled with cpp,
8594 ## it was expanded to null when configure sourced the s/*.h file.
8595 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8596 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8597 ## (or somesuch), but because it is supposed to go at the _front_
8598 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8599 ## Compare with the gnu-linux case below, which added to the end
8600 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8601 ## LD_SWITCH_SYSTEM_TEMACS.
8602 case "$opsys" in
8603 netbsd|openbsd)
8604 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8605 esac
8606
8607
8608 C_SWITCH_MACHINE=
8609 case $canonical in
8610 alpha*)
8611 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8612 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8613
8614 fi
8615
8616 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8617 ## With ELF, make sure that all common symbols get allocated to in the
8618 ## data section. Otherwise, the dump of temacs may miss variables in
8619 ## the shared library that have been initialized. For example, with
8620 ## GNU libc, __malloc_initialized would normally be resolved to the
8621 ## shared library's .bss section, which is fatal.
8622 if test "x$GCC" = "xyes"; then
8623 C_SWITCH_MACHINE="-fno-common"
8624 else
8625 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8626 fi
8627 else
8628 UNEXEC_OBJ=unexalpha.o
8629 fi
8630 ;;
8631 esac
8632
8633
8634
8635
8636 C_SWITCH_SYSTEM=
8637 ## Some programs in src produce warnings saying certain subprograms
8638 ## are too complex and need a MAXMEM value greater than 2000 for
8639 ## additional optimization. --nils@exp-math.uni-essen.de
8640 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8641 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8642 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8643 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8644
8645
8646
8647 LIBS_SYSTEM=
8648 case "$opsys" in
8649 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8650 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8651
8652 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
8653
8654 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8655
8656 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8657
8658 ## Motif needs -lgen.
8659 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8660 esac
8661
8662
8663
8664 ### Make sure subsequent tests use flags consistent with the build flags.
8665
8666 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8667 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8668 else
8669 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8670 fi
8671
8672 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8673
8674 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8675
8676
8677
8678 LIB_MATH=-lm
8679 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8680
8681 case $opsys in
8682 cygwin )
8683 LIB_MATH=
8684 ;;
8685 darwin )
8686 ## Adding -lm confuses the dynamic linker, so omit it.
8687 LIB_MATH=
8688 ;;
8689 freebsd | dragonfly )
8690 SYSTEM_TYPE=berkeley-unix
8691 ;;
8692 gnu-linux | gnu-kfreebsd )
8693 ;;
8694 hpux10-20 | hpux11 )
8695 ;;
8696 netbsd | openbsd )
8697 SYSTEM_TYPE=berkeley-unix
8698 ;;
8699
8700 sol2* | unixware )
8701 SYSTEM_TYPE=usg-unix-v
8702 ;;
8703
8704 esac
8705
8706
8707
8708 cat >>confdefs.h <<_ACEOF
8709 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8710 _ACEOF
8711
8712
8713
8714 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8715 pre_PKG_CONFIG_LIBS=$LIBS
8716
8717 # Extract the first word of "pkg-config", so it can be a program name with args.
8718 set dummy pkg-config; ac_word=$2
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8720 $as_echo_n "checking for $ac_word... " >&6; }
8721 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8722 $as_echo_n "(cached) " >&6
8723 else
8724 case $PKG_CONFIG in
8725 [\\/]* | ?:[\\/]*)
8726 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8727 ;;
8728 *)
8729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8730 for as_dir in $PATH
8731 do
8732 IFS=$as_save_IFS
8733 test -z "$as_dir" && as_dir=.
8734 for ac_exec_ext in '' $ac_executable_extensions; do
8735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8736 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8738 break 2
8739 fi
8740 done
8741 done
8742 IFS=$as_save_IFS
8743
8744 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8745 ;;
8746 esac
8747 fi
8748 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8749 if test -n "$PKG_CONFIG"; then
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8751 $as_echo "$PKG_CONFIG" >&6; }
8752 else
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8754 $as_echo "no" >&6; }
8755 fi
8756
8757
8758
8759
8760
8761
8762 if test "${with_sound}" != "no"; then
8763 # Sound support for GNU/Linux and the free BSDs.
8764 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8765 do :
8766 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8767 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8768 eval as_val=\$$as_ac_Header
8769 if test "x$as_val" = x""yes; then :
8770 cat >>confdefs.h <<_ACEOF
8771 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8772 _ACEOF
8773 have_sound_header=yes
8774 fi
8775
8776 done
8777
8778 # Emulation library used on NetBSD.
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8780 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8781 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8782 $as_echo_n "(cached) " >&6
8783 else
8784 ac_check_lib_save_LIBS=$LIBS
8785 LIBS="-lossaudio $LIBS"
8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787 /* end confdefs.h. */
8788
8789 /* Override any GCC internal prototype to avoid an error.
8790 Use char because int might match the return type of a GCC
8791 builtin and then its argument prototype would still apply. */
8792 #ifdef __cplusplus
8793 extern "C"
8794 #endif
8795 char _oss_ioctl ();
8796 int
8797 main ()
8798 {
8799 return _oss_ioctl ();
8800 ;
8801 return 0;
8802 }
8803 _ACEOF
8804 if ac_fn_c_try_link "$LINENO"; then :
8805 ac_cv_lib_ossaudio__oss_ioctl=yes
8806 else
8807 ac_cv_lib_ossaudio__oss_ioctl=no
8808 fi
8809 rm -f core conftest.err conftest.$ac_objext \
8810 conftest$ac_exeext conftest.$ac_ext
8811 LIBS=$ac_check_lib_save_LIBS
8812 fi
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8814 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8815 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8816 LIBSOUND=-lossaudio
8817 else
8818 LIBSOUND=
8819 fi
8820
8821
8822
8823 ALSA_REQUIRED=1.0.0
8824 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8825
8826 succeeded=no
8827
8828 if test "$PKG_CONFIG" = "no" ; then
8829 HAVE_ALSA=no
8830 else
8831 PKG_CONFIG_MIN_VERSION=0.9.0
8832 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8834 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
8835
8836 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8837 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8838 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
8839 edit_cflags="
8840 s,///*,/,g
8841 s/^/ /
8842 s/ -I/ $isystem/g
8843 s/^ //
8844 "
8845 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8846 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8848 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8849 succeeded=yes
8850 else
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852 $as_echo "no" >&6; }
8853 ALSA_CFLAGS=""
8854 ALSA_LIBS=""
8855 ## If we have a custom action on failure, don't print errors, but
8856 ## do set a variable so people can do so. Do it in a subshell
8857 ## to capture any diagnostics in invoking pkg-config.
8858 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
8859
8860 fi
8861
8862
8863
8864 else
8865 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8866 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8867 fi
8868 fi
8869
8870 if test $succeeded = yes; then
8871 HAVE_ALSA=yes
8872 else
8873 HAVE_ALSA=no
8874 fi
8875
8876 if test $HAVE_ALSA = yes; then
8877 SAVE_CFLAGS="$CFLAGS"
8878 SAVE_LIBS="$LIBS"
8879 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8880 LIBS="$ALSA_LIBS $LIBS"
8881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8882 /* end confdefs.h. */
8883 #include <asoundlib.h>
8884 int
8885 main ()
8886 {
8887 snd_lib_error_set_handler (0);
8888 ;
8889 return 0;
8890 }
8891 _ACEOF
8892 if ac_fn_c_try_compile "$LINENO"; then :
8893 emacs_alsa_normal=yes
8894 else
8895 emacs_alsa_normal=no
8896 fi
8897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8898 if test "$emacs_alsa_normal" != yes; then
8899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8900 /* end confdefs.h. */
8901 #include <alsa/asoundlib.h>
8902 int
8903 main ()
8904 {
8905 snd_lib_error_set_handler (0);
8906 ;
8907 return 0;
8908 }
8909 _ACEOF
8910 if ac_fn_c_try_compile "$LINENO"; then :
8911 emacs_alsa_subdir=yes
8912 else
8913 emacs_alsa_subdir=no
8914 fi
8915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8916 if test "$emacs_alsa_subdir" != yes; then
8917 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8918 fi
8919 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8920 fi
8921
8922 CFLAGS="$SAVE_CFLAGS"
8923 LIBS="$SAVE_LIBS"
8924 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8925 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8926
8927 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
8928
8929 fi
8930
8931 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8932 case "$opsys" in
8933 gnu-linux|freebsd|netbsd)
8934
8935 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
8936
8937 ;;
8938 esac
8939 fi
8940
8941
8942 fi
8943
8944
8945
8946
8947 for ac_header in $ac_header_list
8948 do :
8949 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8950 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8951 "
8952 eval as_val=\$$as_ac_Header
8953 if test "x$as_val" = x""yes; then :
8954 cat >>confdefs.h <<_ACEOF
8955 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8956 _ACEOF
8957
8958 fi
8959
8960 done
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8983 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8985 /* end confdefs.h. */
8986 #include <sys/personality.h>
8987 int
8988 main ()
8989 {
8990 personality (PER_LINUX32)
8991 ;
8992 return 0;
8993 }
8994 _ACEOF
8995 if ac_fn_c_try_compile "$LINENO"; then :
8996 emacs_cv_personality_linux32=yes
8997 else
8998 emacs_cv_personality_linux32=no
8999 fi
9000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9002 $as_echo "$emacs_cv_personality_linux32" >&6; }
9003
9004 if test $emacs_cv_personality_linux32 = yes; then
9005
9006 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9007
9008 fi
9009
9010 for ac_header in term.h
9011 do :
9012 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9013 if test "x$ac_cv_header_term_h" = x""yes; then :
9014 cat >>confdefs.h <<_ACEOF
9015 #define HAVE_TERM_H 1
9016 _ACEOF
9017
9018 fi
9019
9020 done
9021
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9023 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9024 if test "${ac_cv_header_time+set}" = set; then :
9025 $as_echo_n "(cached) " >&6
9026 else
9027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9028 /* end confdefs.h. */
9029 #include <sys/types.h>
9030 #include <sys/time.h>
9031 #include <time.h>
9032
9033 int
9034 main ()
9035 {
9036 if ((struct tm *) 0)
9037 return 0;
9038 ;
9039 return 0;
9040 }
9041 _ACEOF
9042 if ac_fn_c_try_compile "$LINENO"; then :
9043 ac_cv_header_time=yes
9044 else
9045 ac_cv_header_time=no
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9048 fi
9049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9050 $as_echo "$ac_cv_header_time" >&6; }
9051 if test $ac_cv_header_time = yes; then
9052
9053 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9054
9055 fi
9056
9057 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9058
9059 "
9060 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9061 ac_have_decl=1
9062 else
9063 ac_have_decl=0
9064 fi
9065
9066 cat >>confdefs.h <<_ACEOF
9067 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9068 _ACEOF
9069
9070 if test $ac_cv_have_decl_sys_siglist != yes; then
9071 # For Tru64, at least:
9072 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9073
9074 "
9075 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9076 ac_have_decl=1
9077 else
9078 ac_have_decl=0
9079 fi
9080
9081 cat >>confdefs.h <<_ACEOF
9082 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9083 _ACEOF
9084
9085 if test $ac_cv_have_decl___sys_siglist = yes; then
9086
9087 $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
9088
9089 fi
9090 fi
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9092 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9093 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9094 $as_echo_n "(cached) " >&6
9095 else
9096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9097 /* end confdefs.h. */
9098 #include <sys/types.h>
9099 #include <sys/wait.h>
9100 #ifndef WEXITSTATUS
9101 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9102 #endif
9103 #ifndef WIFEXITED
9104 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9105 #endif
9106
9107 int
9108 main ()
9109 {
9110 int s;
9111 wait (&s);
9112 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9113 ;
9114 return 0;
9115 }
9116 _ACEOF
9117 if ac_fn_c_try_compile "$LINENO"; then :
9118 ac_cv_header_sys_wait_h=yes
9119 else
9120 ac_cv_header_sys_wait_h=no
9121 fi
9122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123 fi
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9125 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9126 if test $ac_cv_header_sys_wait_h = yes; then
9127
9128 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9129
9130 fi
9131
9132
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9134 $as_echo_n "checking for speed_t... " >&6; }
9135 if test "${emacs_cv_speed_t+set}" = set; then :
9136 $as_echo_n "(cached) " >&6
9137 else
9138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9139 /* end confdefs.h. */
9140 #include <termios.h>
9141 int
9142 main ()
9143 {
9144 speed_t x = 1;
9145 ;
9146 return 0;
9147 }
9148 _ACEOF
9149 if ac_fn_c_try_compile "$LINENO"; then :
9150 emacs_cv_speed_t=yes
9151 else
9152 emacs_cv_speed_t=no
9153 fi
9154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9155 fi
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9157 $as_echo "$emacs_cv_speed_t" >&6; }
9158 if test $emacs_cv_speed_t = yes; then
9159
9160 $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
9161
9162 fi
9163
9164
9165
9166
9167 for ac_header in net/if.h
9168 do :
9169 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9170 #if HAVE_SYS_SOCKET_H
9171 #include <sys/socket.h>
9172 #endif
9173 "
9174 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9175 cat >>confdefs.h <<_ACEOF
9176 #define HAVE_NET_IF_H 1
9177 _ACEOF
9178
9179 fi
9180
9181 done
9182
9183 for ac_header in ifaddrs.h
9184 do :
9185 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9186 #if HAVE_SYS_SOCKET_H
9187 #include <sys/socket.h>
9188 #endif
9189 "
9190 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9191 cat >>confdefs.h <<_ACEOF
9192 #define HAVE_IFADDRS_H 1
9193 _ACEOF
9194
9195 fi
9196
9197 done
9198
9199 for ac_header in net/if_dl.h
9200 do :
9201 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9202 #if HAVE_SYS_SOCKET_H
9203 #include <sys/socket.h>
9204 #endif
9205 "
9206 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9207 cat >>confdefs.h <<_ACEOF
9208 #define HAVE_NET_IF_DL_H 1
9209 _ACEOF
9210
9211 fi
9212
9213 done
9214
9215
9216 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9217 #if HAVE_SYS_SOCKET_H
9218 #include <sys/socket.h>
9219 #endif
9220 #if HAVE_NET_IF_H
9221 #include <net/if.h>
9222 #endif
9223 "
9224 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9225
9226 cat >>confdefs.h <<_ACEOF
9227 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9228 _ACEOF
9229
9230
9231 fi
9232 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9233 #if HAVE_SYS_SOCKET_H
9234 #include <sys/socket.h>
9235 #endif
9236 #if HAVE_NET_IF_H
9237 #include <net/if.h>
9238 #endif
9239 "
9240 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9241
9242 cat >>confdefs.h <<_ACEOF
9243 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9244 _ACEOF
9245
9246
9247 fi
9248 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9249 #if HAVE_SYS_SOCKET_H
9250 #include <sys/socket.h>
9251 #endif
9252 #if HAVE_NET_IF_H
9253 #include <net/if.h>
9254 #endif
9255 "
9256 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9257
9258 cat >>confdefs.h <<_ACEOF
9259 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9260 _ACEOF
9261
9262
9263 fi
9264 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9265 #if HAVE_SYS_SOCKET_H
9266 #include <sys/socket.h>
9267 #endif
9268 #if HAVE_NET_IF_H
9269 #include <net/if.h>
9270 #endif
9271 "
9272 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9273
9274 cat >>confdefs.h <<_ACEOF
9275 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9276 _ACEOF
9277
9278
9279 fi
9280 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9281 #if HAVE_SYS_SOCKET_H
9282 #include <sys/socket.h>
9283 #endif
9284 #if HAVE_NET_IF_H
9285 #include <net/if.h>
9286 #endif
9287 "
9288 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9289
9290 cat >>confdefs.h <<_ACEOF
9291 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9292 _ACEOF
9293
9294
9295 fi
9296 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9297 #if HAVE_SYS_SOCKET_H
9298 #include <sys/socket.h>
9299 #endif
9300 #if HAVE_NET_IF_H
9301 #include <net/if.h>
9302 #endif
9303 "
9304 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9305
9306 cat >>confdefs.h <<_ACEOF
9307 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9308 _ACEOF
9309
9310
9311 fi
9312
9313
9314
9315
9316 DEPFLAGS=
9317 MKDEPDIR=":"
9318 deps_frag=deps.mk
9319 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9321 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9322 HAVE_GNU_MAKE=no
9323 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9324 if test "x$testval" != x; then
9325 HAVE_GNU_MAKE=yes
9326 else
9327 ac_enable_autodepend=no
9328 fi
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9330 $as_echo "$HAVE_GNU_MAKE" >&6; }
9331 if test $HAVE_GNU_MAKE = yes; then
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9333 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9334 SAVE_CFLAGS="$CFLAGS"
9335 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9337 /* end confdefs.h. */
9338
9339 int
9340 main ()
9341 {
9342
9343 ;
9344 return 0;
9345 }
9346 _ACEOF
9347 if ac_fn_c_try_compile "$LINENO"; then :
9348
9349 else
9350 ac_enable_autodepend=no
9351 fi
9352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9353 CFLAGS="$SAVE_CFLAGS"
9354 test -f deps.d || ac_enable_autodepend=no
9355 rm -rf deps.d
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9357 $as_echo "$ac_enable_autodepend" >&6; }
9358 fi
9359 if test $ac_enable_autodepend = yes; then
9360 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9361 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9362 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9363 deps_frag=autodeps.mk
9364 fi
9365 fi
9366 deps_frag=$srcdir/src/$deps_frag
9367
9368
9369
9370
9371
9372 lisp_frag=$srcdir/src/lisp.mk
9373
9374
9375
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9377 $as_echo_n "checking for long file names... " >&6; }
9378 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9379 $as_echo_n "(cached) " >&6
9380 else
9381 ac_cv_sys_long_file_names=yes
9382 # Test for long file names in all the places we know might matter:
9383 # . the current directory, where building will happen
9384 # $prefix/lib where we will be installing things
9385 # $exec_prefix/lib likewise
9386 # $TMPDIR if set, where it might want to write temporary files
9387 # /tmp where it might want to write temporary files
9388 # /var/tmp likewise
9389 # /usr/tmp likewise
9390 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9391 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9392 # in the usual case where exec_prefix is '${prefix}'.
9393 case $ac_dir in #(
9394 . | /* | ?:[\\/]*) ;; #(
9395 *) continue;;
9396 esac
9397 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9398 ac_xdir=$ac_dir/cf$$
9399 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9400 ac_tf1=$ac_xdir/conftest9012345
9401 ac_tf2=$ac_xdir/conftest9012346
9402 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9403 ac_cv_sys_long_file_names=no
9404 rm -f -r "$ac_xdir" 2>/dev/null
9405 test $ac_cv_sys_long_file_names = no && break
9406 done
9407 fi
9408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9409 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9410 if test $ac_cv_sys_long_file_names = yes; then
9411
9412 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9413
9414 fi
9415
9416
9417 #### Choose a window system.
9418
9419 ## We leave window_system equal to none if
9420 ## we end up building without one. Any new window system should
9421 ## set window_system to an appropriate value and add objects to
9422 ## window-system-specific substs.
9423
9424 window_system=none
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9426 $as_echo_n "checking for X... " >&6; }
9427
9428
9429 # Check whether --with-x was given.
9430 if test "${with_x+set}" = set; then :
9431 withval=$with_x;
9432 fi
9433
9434 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9435 if test "x$with_x" = xno; then
9436 # The user explicitly disabled X.
9437 have_x=disabled
9438 else
9439 case $x_includes,$x_libraries in #(
9440 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9441 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9442 $as_echo_n "(cached) " >&6
9443 else
9444 # One or both of the vars are not set, and there is no cached value.
9445 ac_x_includes=no ac_x_libraries=no
9446 rm -f -r conftest.dir
9447 if mkdir conftest.dir; then
9448 cd conftest.dir
9449 cat >Imakefile <<'_ACEOF'
9450 incroot:
9451 @echo incroot='${INCROOT}'
9452 usrlibdir:
9453 @echo usrlibdir='${USRLIBDIR}'
9454 libdir:
9455 @echo libdir='${LIBDIR}'
9456 _ACEOF
9457 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9458 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9459 for ac_var in incroot usrlibdir libdir; do
9460 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9461 done
9462 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9463 for ac_extension in a so sl dylib la dll; do
9464 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9465 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9466 ac_im_usrlibdir=$ac_im_libdir; break
9467 fi
9468 done
9469 # Screen out bogus values from the imake configuration. They are
9470 # bogus both because they are the default anyway, and because
9471 # using them would break gcc on systems where it needs fixed includes.
9472 case $ac_im_incroot in
9473 /usr/include) ac_x_includes= ;;
9474 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9475 esac
9476 case $ac_im_usrlibdir in
9477 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9478 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9479 esac
9480 fi
9481 cd ..
9482 rm -f -r conftest.dir
9483 fi
9484
9485 # Standard set of common directories for X headers.
9486 # Check X11 before X11Rn because it is often a symlink to the current release.
9487 ac_x_header_dirs='
9488 /usr/X11/include
9489 /usr/X11R7/include
9490 /usr/X11R6/include
9491 /usr/X11R5/include
9492 /usr/X11R4/include
9493
9494 /usr/include/X11
9495 /usr/include/X11R7
9496 /usr/include/X11R6
9497 /usr/include/X11R5
9498 /usr/include/X11R4
9499
9500 /usr/local/X11/include
9501 /usr/local/X11R7/include
9502 /usr/local/X11R6/include
9503 /usr/local/X11R5/include
9504 /usr/local/X11R4/include
9505
9506 /usr/local/include/X11
9507 /usr/local/include/X11R7
9508 /usr/local/include/X11R6
9509 /usr/local/include/X11R5
9510 /usr/local/include/X11R4
9511
9512 /usr/X386/include
9513 /usr/x386/include
9514 /usr/XFree86/include/X11
9515
9516 /usr/include
9517 /usr/local/include
9518 /usr/unsupported/include
9519 /usr/athena/include
9520 /usr/local/x11r5/include
9521 /usr/lpp/Xamples/include
9522
9523 /usr/openwin/include
9524 /usr/openwin/share/include'
9525
9526 if test "$ac_x_includes" = no; then
9527 # Guess where to find include files, by looking for Xlib.h.
9528 # First, try using that file with no special directory specified.
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530 /* end confdefs.h. */
9531 #include <X11/Xlib.h>
9532 _ACEOF
9533 if ac_fn_c_try_cpp "$LINENO"; then :
9534 # We can compile using X headers with no special include directory.
9535 ac_x_includes=
9536 else
9537 for ac_dir in $ac_x_header_dirs; do
9538 if test -r "$ac_dir/X11/Xlib.h"; then
9539 ac_x_includes=$ac_dir
9540 break
9541 fi
9542 done
9543 fi
9544 rm -f conftest.err conftest.$ac_ext
9545 fi # $ac_x_includes = no
9546
9547 if test "$ac_x_libraries" = no; then
9548 # Check for the libraries.
9549 # See if we find them without any special options.
9550 # Don't add to $LIBS permanently.
9551 ac_save_LIBS=$LIBS
9552 LIBS="-lX11 $LIBS"
9553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9554 /* end confdefs.h. */
9555 #include <X11/Xlib.h>
9556 int
9557 main ()
9558 {
9559 XrmInitialize ()
9560 ;
9561 return 0;
9562 }
9563 _ACEOF
9564 if ac_fn_c_try_link "$LINENO"; then :
9565 LIBS=$ac_save_LIBS
9566 # We can link X programs with no special library path.
9567 ac_x_libraries=
9568 else
9569 LIBS=$ac_save_LIBS
9570 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9571 do
9572 # Don't even attempt the hair of trying to link an X program!
9573 for ac_extension in a so sl dylib la dll; do
9574 if test -r "$ac_dir/libX11.$ac_extension"; then
9575 ac_x_libraries=$ac_dir
9576 break 2
9577 fi
9578 done
9579 done
9580 fi
9581 rm -f core conftest.err conftest.$ac_objext \
9582 conftest$ac_exeext conftest.$ac_ext
9583 fi # $ac_x_libraries = no
9584
9585 case $ac_x_includes,$ac_x_libraries in #(
9586 no,* | *,no | *\'*)
9587 # Didn't find X, or a directory has "'" in its name.
9588 ac_cv_have_x="have_x=no";; #(
9589 *)
9590 # Record where we found X for the cache.
9591 ac_cv_have_x="have_x=yes\
9592 ac_x_includes='$ac_x_includes'\
9593 ac_x_libraries='$ac_x_libraries'"
9594 esac
9595 fi
9596 ;; #(
9597 *) have_x=yes;;
9598 esac
9599 eval "$ac_cv_have_x"
9600 fi # $with_x != no
9601
9602 if test "$have_x" != yes; then
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9604 $as_echo "$have_x" >&6; }
9605 no_x=yes
9606 else
9607 # If each of the values was on the command line, it overrides each guess.
9608 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9609 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9610 # Update the cache value to reflect the command line values.
9611 ac_cv_have_x="have_x=yes\
9612 ac_x_includes='$x_includes'\
9613 ac_x_libraries='$x_libraries'"
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9615 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9616 fi
9617
9618 if test "$no_x" != yes; then
9619 window_system=x11
9620 fi
9621
9622 LD_SWITCH_X_SITE_RPATH=
9623 if test "${x_libraries}" != NONE; then
9624 if test -n "${x_libraries}"; then
9625 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9626 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9627 fi
9628 x_default_search_path=""
9629 x_search_path=${x_libraries}
9630 if test -z "${x_search_path}"; then
9631 x_search_path=/usr/lib
9632 fi
9633 for x_library in `echo ${x_search_path}: | \
9634 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9635 x_search_path="\
9636 ${x_library}/X11/%L/%T/%N%C%S:\
9637 ${x_library}/X11/%l/%T/%N%C%S:\
9638 ${x_library}/X11/%T/%N%C%S:\
9639 ${x_library}/X11/%L/%T/%N%S:\
9640 ${x_library}/X11/%l/%T/%N%S:\
9641 ${x_library}/X11/%T/%N%S"
9642 if test x"${x_default_search_path}" = x; then
9643 x_default_search_path=${x_search_path}
9644 else
9645 x_default_search_path="${x_search_path}:${x_default_search_path}"
9646 fi
9647 done
9648 fi
9649
9650
9651 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9652 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9653 fi
9654
9655 if test x"${x_includes}" = x; then
9656 bitmapdir=/usr/include/X11/bitmaps
9657 else
9658 # accumulate include directories that have X11 bitmap subdirectories
9659 bmd_acc="dummyval"
9660 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9661 if test -d "${bmd}/X11/bitmaps"; then
9662 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9663 fi
9664 if test -d "${bmd}/bitmaps"; then
9665 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9666 fi
9667 done
9668 if test ${bmd_acc} != "dummyval"; then
9669 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9670 fi
9671 fi
9672
9673 HAVE_NS=no
9674 NS_IMPL_COCOA=no
9675 NS_IMPL_GNUSTEP=no
9676 tmp_CPPFLAGS="$CPPFLAGS"
9677 tmp_CFLAGS="$CFLAGS"
9678 CPPFLAGS="$CPPFLAGS -x objective-c"
9679 CFLAGS="$CFLAGS -x objective-c"
9680 GNU_OBJC_CFLAGS=
9681 LIBS_GNUSTEP=
9682 if test "${with_ns}" != no; then
9683 if test "${opsys}" = darwin; then
9684 NS_IMPL_COCOA=yes
9685 ns_appdir=`pwd`/nextstep/Emacs.app
9686 ns_appbindir=${ns_appdir}/Contents/MacOS
9687 ns_appresdir=${ns_appdir}/Contents/Resources
9688 ns_appsrc=Cocoa/Emacs.base
9689 elif test -f $GNUSTEP_CONFIG_FILE; then
9690 NS_IMPL_GNUSTEP=yes
9691 ns_appdir=`pwd`/nextstep/Emacs.app
9692 ns_appbindir=${ns_appdir}
9693 ns_appresdir=${ns_appdir}/Resources
9694 ns_appsrc=GNUstep/Emacs.base
9695 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9696 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9697 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9698 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9699 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9700 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9701 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9702 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9703 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9704 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9705 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9706 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9708 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9709 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9710 $as_echo_n "(cached) " >&6
9711 else
9712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713 /* end confdefs.h. */
9714 #include <GNUstepBase/GSConfig.h>
9715 int
9716 main ()
9717 {
9718 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9719 1;
9720 #else
9721 fail;
9722 #endif
9723 ;
9724 return 0;
9725 }
9726 _ACEOF
9727 if ac_fn_c_try_compile "$LINENO"; then :
9728 emacs_cv_objc_exceptions=yes
9729 else
9730 emacs_cv_objc_exceptions=no
9731 fi
9732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9733 fi
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9735 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9736 if test $emacs_cv_objc_exceptions = yes; then
9737
9738 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9739
9740 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9741 fi
9742 fi
9743
9744 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9745
9746 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9747 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9748 HAVE_NS=yes
9749 else
9750 as_fn_error "\`--with-ns' was specified, but the include
9751 files are missing or cannot be compiled." "$LINENO" 5
9752 fi
9753
9754
9755
9756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9757 /* end confdefs.h. */
9758 #include <AppKit/AppKit.h>
9759 int
9760 main ()
9761 {
9762
9763 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9764 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9765 ; /* OK */
9766 #else
9767 #error "OSX 10.4 or newer required"
9768 #endif
9769 #endif
9770
9771 ;
9772 return 0;
9773 }
9774 _ACEOF
9775 if ac_fn_c_try_compile "$LINENO"; then :
9776 ns_osx_have_104=yes
9777 else
9778 ns_osx_have_104=no
9779 fi
9780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9782 /* end confdefs.h. */
9783 #include <Foundation/NSObjCRuntime.h>
9784 int
9785 main ()
9786 {
9787 NSInteger i;
9788 ;
9789 return 0;
9790 }
9791 _ACEOF
9792 if ac_fn_c_try_compile "$LINENO"; then :
9793 ns_have_nsinteger=yes
9794 else
9795 ns_have_nsinteger=no
9796 fi
9797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9798 if test $ns_osx_have_104 = no; then
9799 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9800 fi
9801 if test $ns_have_nsinteger = yes; then
9802
9803 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
9804
9805 fi
9806 fi
9807
9808
9809
9810 INSTALL_ARCH_INDEP_EXTRA=install-etc
9811 ns_self_contained=no
9812 NS_OBJ=
9813 NS_OBJC_OBJ=
9814 if test "${HAVE_NS}" = yes; then
9815 if test "$with_toolkit_scroll_bars" = "no"; then
9816 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9817 fi
9818
9819 window_system=nextstep
9820 # set up packaging dirs
9821 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9822 ns_self_contained=yes
9823 prefix=${ns_appresdir}
9824 exec_prefix=${ns_appbindir}
9825 libexecdir="\${ns_appbindir}/libexec"
9826 archlibdir="\${ns_appbindir}/libexec"
9827 docdir="\${ns_appresdir}/etc"
9828 etcdir="\${ns_appresdir}/etc"
9829 infodir="\${ns_appresdir}/info"
9830 mandir="\${ns_appresdir}/man"
9831 lispdir="\${ns_appresdir}/lisp"
9832 leimdir="\${ns_appresdir}/leim"
9833 INSTALL_ARCH_INDEP_EXTRA=
9834 fi
9835 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9836 fi
9837 CFLAGS="$tmp_CFLAGS"
9838 CPPFLAGS="$tmp_CPPFLAGS"
9839
9840
9841
9842
9843
9844 HAVE_W32=no
9845 W32_OBJ=
9846 W32_LIBS=
9847 W32_RES=
9848 W32_RES_LINK=
9849 if test "${with_w32}" != no; then
9850 if test "${opsys}" != "cygwin"; then
9851 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9852 fi
9853 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9854 if test "x$ac_cv_header_windows_h" = x""yes; then :
9855 HAVE_W32=yes
9856 else
9857 as_fn_error "\`--with-w32' was specified, but windows.h
9858 cannot be found." "$LINENO" 5
9859 fi
9860
9861
9862
9863 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9864
9865 if test -n "$ac_tool_prefix"; then
9866 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9867 set dummy ${ac_tool_prefix}windres; ac_word=$2
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9869 $as_echo_n "checking for $ac_word... " >&6; }
9870 if test "${ac_cv_prog_WINDRES+set}" = set; then :
9871 $as_echo_n "(cached) " >&6
9872 else
9873 if test -n "$WINDRES"; then
9874 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9875 else
9876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9877 for as_dir in $PATH
9878 do
9879 IFS=$as_save_IFS
9880 test -z "$as_dir" && as_dir=.
9881 for ac_exec_ext in '' $ac_executable_extensions; do
9882 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9883 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9885 break 2
9886 fi
9887 done
9888 done
9889 IFS=$as_save_IFS
9890
9891 fi
9892 fi
9893 WINDRES=$ac_cv_prog_WINDRES
9894 if test -n "$WINDRES"; then
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9896 $as_echo "$WINDRES" >&6; }
9897 else
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899 $as_echo "no" >&6; }
9900 fi
9901
9902
9903 fi
9904 if test -z "$ac_cv_prog_WINDRES"; then
9905 ac_ct_WINDRES=$WINDRES
9906 # Extract the first word of "windres", so it can be a program name with args.
9907 set dummy windres; ac_word=$2
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909 $as_echo_n "checking for $ac_word... " >&6; }
9910 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9911 $as_echo_n "(cached) " >&6
9912 else
9913 if test -n "$ac_ct_WINDRES"; then
9914 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9915 else
9916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9917 for as_dir in $PATH
9918 do
9919 IFS=$as_save_IFS
9920 test -z "$as_dir" && as_dir=.
9921 for ac_exec_ext in '' $ac_executable_extensions; do
9922 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9923 ac_cv_prog_ac_ct_WINDRES="windres"
9924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9925 break 2
9926 fi
9927 done
9928 done
9929 IFS=$as_save_IFS
9930
9931 fi
9932 fi
9933 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9934 if test -n "$ac_ct_WINDRES"; then
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9936 $as_echo "$ac_ct_WINDRES" >&6; }
9937 else
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939 $as_echo "no" >&6; }
9940 fi
9941
9942 if test "x$ac_ct_WINDRES" = x; then
9943 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9944 else
9945 case $cross_compiling:$ac_tool_warned in
9946 yes:)
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9949 ac_tool_warned=yes ;;
9950 esac
9951 WINDRES=$ac_ct_WINDRES
9952 fi
9953 else
9954 WINDRES="$ac_cv_prog_WINDRES"
9955 fi
9956
9957 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9958 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9959 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9960 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
9961 W32_RES="emacs.res"
9962 # Tell the linker that emacs.res is an object (which we compile from
9963 # the rc file), not a linker script.
9964 W32_RES_LINK="-Wl,emacs.res"
9965 fi
9966
9967
9968
9969
9970
9971 if test "${HAVE_W32}" = "yes"; then
9972 window_system=w32
9973 with_xft=no
9974 fi
9975
9976 ## $window_system is now set to the window system we will
9977 ## ultimately use.
9978
9979 term_header=
9980 HAVE_X_WINDOWS=no
9981 HAVE_X11=no
9982 USE_X_TOOLKIT=none
9983
9984 case "${window_system}" in
9985 x11 )
9986 HAVE_X_WINDOWS=yes
9987 HAVE_X11=yes
9988 term_header=xterm.h
9989 case "${with_x_toolkit}" in
9990 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9991 motif ) USE_X_TOOLKIT=MOTIF ;;
9992 gtk ) with_gtk=yes
9993 term_header=gtkutil.h
9994 USE_X_TOOLKIT=none ;;
9995 gtk2 ) with_gtk2=yes
9996 term_header=gtkutil.h
9997 USE_X_TOOLKIT=none ;;
9998 gtk3 ) with_gtk3=yes
9999 term_header=gtkutil.h
10000 USE_X_TOOLKIT=none ;;
10001 no ) USE_X_TOOLKIT=none ;;
10002 * ) USE_X_TOOLKIT=maybe ;;
10003 esac
10004 ;;
10005 nextstep )
10006 term_header=nsterm.h
10007 ;;
10008 w32 )
10009 term_header=w32term.h
10010 ;;
10011 esac
10012
10013 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10014 # Extract the first word of "X", so it can be a program name with args.
10015 set dummy X; ac_word=$2
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10017 $as_echo_n "checking for $ac_word... " >&6; }
10018 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10019 $as_echo_n "(cached) " >&6
10020 else
10021 if test -n "$HAVE_XSERVER"; then
10022 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10023 else
10024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10025 for as_dir in $PATH
10026 do
10027 IFS=$as_save_IFS
10028 test -z "$as_dir" && as_dir=.
10029 for ac_exec_ext in '' $ac_executable_extensions; do
10030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10031 ac_cv_prog_HAVE_XSERVER="true"
10032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10033 break 2
10034 fi
10035 done
10036 done
10037 IFS=$as_save_IFS
10038
10039 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10040 fi
10041 fi
10042 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10043 if test -n "$HAVE_XSERVER"; then
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10045 $as_echo "$HAVE_XSERVER" >&6; }
10046 else
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048 $as_echo "no" >&6; }
10049 fi
10050
10051
10052 if test "$HAVE_XSERVER" = true ||
10053 test -n "$DISPLAY" ||
10054 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10055 as_fn_error "You seem to be running X, but no X development libraries
10056 were found. You should install the relevant development files for X
10057 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10058 sure you have development files for image handling, i.e.
10059 tiff, gif, jpeg, png and xpm.
10060 If you are sure you want Emacs compiled without X window support, pass
10061 --without-x
10062 to configure." "$LINENO" 5
10063 fi
10064 fi
10065
10066 ### If we're using X11, we should use the X menu package.
10067 HAVE_MENUS=no
10068 case ${HAVE_X11} in
10069 yes ) HAVE_MENUS=yes ;;
10070 esac
10071
10072 # Does the opsystem file prohibit the use of the GNU malloc?
10073 # Assume not, until told otherwise.
10074 GNU_MALLOC=yes
10075
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10077 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10078 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10079 $as_echo_n "(cached) " >&6
10080 else
10081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082 /* end confdefs.h. */
10083 #include <malloc.h>
10084 static void hook (void) {}
10085 int
10086 main ()
10087 {
10088 malloc_set_state (malloc_get_state ());
10089 __after_morecore_hook = hook;
10090 __malloc_initialize_hook = hook;
10091 ;
10092 return 0;
10093 }
10094 _ACEOF
10095 if ac_fn_c_try_link "$LINENO"; then :
10096 emacs_cv_var_doug_lea_malloc=yes
10097 else
10098 emacs_cv_var_doug_lea_malloc=no
10099 fi
10100 rm -f core conftest.err conftest.$ac_objext \
10101 conftest$ac_exeext conftest.$ac_ext
10102 fi
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10104 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10105 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10106
10107
10108 system_malloc=no
10109 case "$opsys" in
10110 ## darwin ld insists on the use of malloc routines in the System framework.
10111 darwin|sol2-10) system_malloc=yes ;;
10112 esac
10113
10114 if test "${system_malloc}" = "yes"; then
10115
10116 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10117
10118 GNU_MALLOC=no
10119 GNU_MALLOC_reason="
10120 (The GNU allocators don't work with this system configuration.)"
10121 GMALLOC_OBJ=
10122 VMLIMIT_OBJ=
10123 else
10124 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10125 VMLIMIT_OBJ=vm-limit.o
10126
10127 for ac_header in sys/vlimit.h
10128 do :
10129 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10130 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10131 cat >>confdefs.h <<_ACEOF
10132 #define HAVE_SYS_VLIMIT_H 1
10133 _ACEOF
10134
10135 fi
10136
10137 done
10138
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10140 $as_echo_n "checking for data_start... " >&6; }
10141 if test "${emacs_cv_data_start+set}" = set; then :
10142 $as_echo_n "(cached) " >&6
10143 else
10144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10145 /* end confdefs.h. */
10146 extern char data_start[]; char ch;
10147 int
10148 main ()
10149 {
10150 return data_start < &ch;
10151 ;
10152 return 0;
10153 }
10154 _ACEOF
10155 if ac_fn_c_try_link "$LINENO"; then :
10156 emacs_cv_data_start=yes
10157 else
10158 emacs_cv_data_start=no
10159 fi
10160 rm -f core conftest.err conftest.$ac_objext \
10161 conftest$ac_exeext conftest.$ac_ext
10162 fi
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10164 $as_echo "$emacs_cv_data_start" >&6; }
10165 if test $emacs_cv_data_start = yes; then
10166
10167 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10168
10169 fi
10170 fi
10171
10172
10173
10174 if test "$doug_lea_malloc" = "yes" ; then
10175 if test "$GNU_MALLOC" = yes ; then
10176 GNU_MALLOC_reason="
10177 (Using Doug Lea's new malloc from the GNU C Library.)"
10178 fi
10179
10180 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10181
10182
10183 ## Use mmap directly for allocating larger buffers.
10184 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10185 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10186 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10187 case "$opsys" in
10188 gnu*) REL_ALLOC=no ;;
10189 esac
10190 fi
10191
10192 if test x"${REL_ALLOC}" = x; then
10193 REL_ALLOC=${GNU_MALLOC}
10194 fi
10195
10196 use_mmap_for_buffers=no
10197 case "$opsys" in
10198 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10199 esac
10200
10201
10202
10203
10204
10205
10206
10207
10208 for ac_func in getpagesize
10209 do :
10210 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10211 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10212 cat >>confdefs.h <<_ACEOF
10213 #define HAVE_GETPAGESIZE 1
10214 _ACEOF
10215
10216 fi
10217 done
10218
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10220 $as_echo_n "checking for working mmap... " >&6; }
10221 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10222 $as_echo_n "(cached) " >&6
10223 else
10224 if test "$cross_compiling" = yes; then :
10225 ac_cv_func_mmap_fixed_mapped=no
10226 else
10227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10228 /* end confdefs.h. */
10229 $ac_includes_default
10230 /* malloc might have been renamed as rpl_malloc. */
10231 #undef malloc
10232
10233 /* Thanks to Mike Haertel and Jim Avera for this test.
10234 Here is a matrix of mmap possibilities:
10235 mmap private not fixed
10236 mmap private fixed at somewhere currently unmapped
10237 mmap private fixed at somewhere already mapped
10238 mmap shared not fixed
10239 mmap shared fixed at somewhere currently unmapped
10240 mmap shared fixed at somewhere already mapped
10241 For private mappings, we should verify that changes cannot be read()
10242 back from the file, nor mmap's back from the file at a different
10243 address. (There have been systems where private was not correctly
10244 implemented like the infamous i386 svr4.0, and systems where the
10245 VM page cache was not coherent with the file system buffer cache
10246 like early versions of FreeBSD and possibly contemporary NetBSD.)
10247 For shared mappings, we should conversely verify that changes get
10248 propagated back to all the places they're supposed to be.
10249
10250 Grep wants private fixed already mapped.
10251 The main things grep needs to know about mmap are:
10252 * does it exist and is it safe to write into the mmap'd area
10253 * how to use it (BSD variants) */
10254
10255 #include <fcntl.h>
10256 #include <sys/mman.h>
10257
10258 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10259 char *malloc ();
10260 #endif
10261
10262 /* This mess was copied from the GNU getpagesize.h. */
10263 #ifndef HAVE_GETPAGESIZE
10264 # ifdef _SC_PAGESIZE
10265 # define getpagesize() sysconf(_SC_PAGESIZE)
10266 # else /* no _SC_PAGESIZE */
10267 # ifdef HAVE_SYS_PARAM_H
10268 # include <sys/param.h>
10269 # ifdef EXEC_PAGESIZE
10270 # define getpagesize() EXEC_PAGESIZE
10271 # else /* no EXEC_PAGESIZE */
10272 # ifdef NBPG
10273 # define getpagesize() NBPG * CLSIZE
10274 # ifndef CLSIZE
10275 # define CLSIZE 1
10276 # endif /* no CLSIZE */
10277 # else /* no NBPG */
10278 # ifdef NBPC
10279 # define getpagesize() NBPC
10280 # else /* no NBPC */
10281 # ifdef PAGESIZE
10282 # define getpagesize() PAGESIZE
10283 # endif /* PAGESIZE */
10284 # endif /* no NBPC */
10285 # endif /* no NBPG */
10286 # endif /* no EXEC_PAGESIZE */
10287 # else /* no HAVE_SYS_PARAM_H */
10288 # define getpagesize() 8192 /* punt totally */
10289 # endif /* no HAVE_SYS_PARAM_H */
10290 # endif /* no _SC_PAGESIZE */
10291
10292 #endif /* no HAVE_GETPAGESIZE */
10293
10294 int
10295 main ()
10296 {
10297 char *data, *data2, *data3;
10298 const char *cdata2;
10299 int i, pagesize;
10300 int fd, fd2;
10301
10302 pagesize = getpagesize ();
10303
10304 /* First, make a file with some known garbage in it. */
10305 data = (char *) malloc (pagesize);
10306 if (!data)
10307 return 1;
10308 for (i = 0; i < pagesize; ++i)
10309 *(data + i) = rand ();
10310 umask (0);
10311 fd = creat ("conftest.mmap", 0600);
10312 if (fd < 0)
10313 return 2;
10314 if (write (fd, data, pagesize) != pagesize)
10315 return 3;
10316 close (fd);
10317
10318 /* Next, check that the tail of a page is zero-filled. File must have
10319 non-zero length, otherwise we risk SIGBUS for entire page. */
10320 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10321 if (fd2 < 0)
10322 return 4;
10323 cdata2 = "";
10324 if (write (fd2, cdata2, 1) != 1)
10325 return 5;
10326 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10327 if (data2 == MAP_FAILED)
10328 return 6;
10329 for (i = 0; i < pagesize; ++i)
10330 if (*(data2 + i))
10331 return 7;
10332 close (fd2);
10333 if (munmap (data2, pagesize))
10334 return 8;
10335
10336 /* Next, try to mmap the file at a fixed address which already has
10337 something else allocated at it. If we can, also make sure that
10338 we see the same garbage. */
10339 fd = open ("conftest.mmap", O_RDWR);
10340 if (fd < 0)
10341 return 9;
10342 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10343 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10344 return 10;
10345 for (i = 0; i < pagesize; ++i)
10346 if (*(data + i) != *(data2 + i))
10347 return 11;
10348
10349 /* Finally, make sure that changes to the mapped area do not
10350 percolate back to the file as seen by read(). (This is a bug on
10351 some variants of i386 svr4.0.) */
10352 for (i = 0; i < pagesize; ++i)
10353 *(data2 + i) = *(data2 + i) + 1;
10354 data3 = (char *) malloc (pagesize);
10355 if (!data3)
10356 return 12;
10357 if (read (fd, data3, pagesize) != pagesize)
10358 return 13;
10359 for (i = 0; i < pagesize; ++i)
10360 if (*(data + i) != *(data3 + i))
10361 return 14;
10362 close (fd);
10363 return 0;
10364 }
10365 _ACEOF
10366 if ac_fn_c_try_run "$LINENO"; then :
10367 ac_cv_func_mmap_fixed_mapped=yes
10368 else
10369 ac_cv_func_mmap_fixed_mapped=no
10370 fi
10371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10372 conftest.$ac_objext conftest.beam conftest.$ac_ext
10373 fi
10374
10375 fi
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10377 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10378 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10379
10380 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10381
10382 fi
10383 rm -f conftest.mmap conftest.txt
10384
10385 if test $use_mmap_for_buffers = yes; then
10386
10387 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10388
10389 REL_ALLOC=no
10390 fi
10391
10392 LIBS="$LIBS_SYSTEM $LIBS"
10393
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10395 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10396 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10397 $as_echo_n "(cached) " >&6
10398 else
10399 ac_check_lib_save_LIBS=$LIBS
10400 LIBS="-ldnet $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 dnet_ntoa ();
10411 int
10412 main ()
10413 {
10414 return dnet_ntoa ();
10415 ;
10416 return 0;
10417 }
10418 _ACEOF
10419 if ac_fn_c_try_link "$LINENO"; then :
10420 ac_cv_lib_dnet_dnet_ntoa=yes
10421 else
10422 ac_cv_lib_dnet_dnet_ntoa=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10429 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10430 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10431 cat >>confdefs.h <<_ACEOF
10432 #define HAVE_LIBDNET 1
10433 _ACEOF
10434
10435 LIBS="-ldnet $LIBS"
10436
10437 fi
10438
10439
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10441 $as_echo_n "checking for main in -lXbsd... " >&6; }
10442 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10443 $as_echo_n "(cached) " >&6
10444 else
10445 ac_check_lib_save_LIBS=$LIBS
10446 LIBS="-lXbsd $LIBS"
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h. */
10449
10450
10451 int
10452 main ()
10453 {
10454 return main ();
10455 ;
10456 return 0;
10457 }
10458 _ACEOF
10459 if ac_fn_c_try_link "$LINENO"; then :
10460 ac_cv_lib_Xbsd_main=yes
10461 else
10462 ac_cv_lib_Xbsd_main=no
10463 fi
10464 rm -f core conftest.err conftest.$ac_objext \
10465 conftest$ac_exeext conftest.$ac_ext
10466 LIBS=$ac_check_lib_save_LIBS
10467 fi
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10469 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10470 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10471 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10472 fi
10473
10474
10475 LIB_PTHREAD=
10476
10477
10478
10479 if test "$ac_cv_header_pthread_h"; then
10480 if test "$GMALLOC_OBJ" = gmalloc.o; then
10481 emacs_pthread_function=pthread_atfork
10482 else
10483 emacs_pthread_function=pthread_self
10484 fi
10485 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10487 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10488 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10489 $as_echo_n "(cached) " >&6
10490 else
10491 ac_check_lib_save_LIBS=$LIBS
10492 LIBS="-lpthread $LIBS"
10493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10494 /* end confdefs.h. */
10495
10496 /* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
10499 #ifdef __cplusplus
10500 extern "C"
10501 #endif
10502 char $emacs_pthread_function ();
10503 int
10504 main ()
10505 {
10506 return $emacs_pthread_function ();
10507 ;
10508 return 0;
10509 }
10510 _ACEOF
10511 if ac_fn_c_try_link "$LINENO"; then :
10512 eval "$as_ac_Lib=yes"
10513 else
10514 eval "$as_ac_Lib=no"
10515 fi
10516 rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
10518 LIBS=$ac_check_lib_save_LIBS
10519 fi
10520 eval ac_res=\$$as_ac_Lib
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10522 $as_echo "$ac_res" >&6; }
10523 eval as_val=\$$as_ac_Lib
10524 if test "x$as_val" = x""yes; then :
10525 HAVE_PTHREAD=yes
10526 fi
10527
10528 fi
10529 if test "$HAVE_PTHREAD" = yes; then
10530 case "${canonical}" in
10531 *-hpux*) ;;
10532 *) LIB_PTHREAD="-lpthread"
10533 LIBS="$LIB_PTHREAD $LIBS" ;;
10534 esac
10535
10536 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10537
10538 fi
10539
10540
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10542 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10543 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10544 $as_echo_n "(cached) " >&6
10545 else
10546 ac_check_lib_save_LIBS=$LIBS
10547 LIBS="-lpthreads $LIBS"
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549 /* end confdefs.h. */
10550
10551 /* Override any GCC internal prototype to avoid an error.
10552 Use char because int might match the return type of a GCC
10553 builtin and then its argument prototype would still apply. */
10554 #ifdef __cplusplus
10555 extern "C"
10556 #endif
10557 char cma_open ();
10558 int
10559 main ()
10560 {
10561 return cma_open ();
10562 ;
10563 return 0;
10564 }
10565 _ACEOF
10566 if ac_fn_c_try_link "$LINENO"; then :
10567 ac_cv_lib_pthreads_cma_open=yes
10568 else
10569 ac_cv_lib_pthreads_cma_open=no
10570 fi
10571 rm -f core conftest.err conftest.$ac_objext \
10572 conftest$ac_exeext conftest.$ac_ext
10573 LIBS=$ac_check_lib_save_LIBS
10574 fi
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10576 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10577 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10578 cat >>confdefs.h <<_ACEOF
10579 #define HAVE_LIBPTHREADS 1
10580 _ACEOF
10581
10582 LIBS="-lpthreads $LIBS"
10583
10584 fi
10585
10586
10587 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10588 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10589 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10590 ## added to LIBS in configure would never contain the pthreads part,
10591 ## but the value used in Makefiles might. FIXME?
10592 ##
10593 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10594 ## be harmless on older versions of X where it happens to exist.
10595 test "$opsys" = "aix4-2" && \
10596 test $ac_cv_lib_pthreads_cma_open = yes && \
10597 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10598
10599
10600 case ${host_os} in
10601 aix*)
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10603 $as_echo_n "checking for -bbigtoc option... " >&6; }
10604 if test "${gdb_cv_bigtoc+set}" = set; then :
10605 $as_echo_n "(cached) " >&6
10606 else
10607
10608 case $GCC in
10609 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10610 *) gdb_cv_bigtoc=-bbigtoc ;;
10611 esac
10612
10613 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h. */
10616
10617 int
10618 main ()
10619 {
10620 int i;
10621 ;
10622 return 0;
10623 }
10624 _ACEOF
10625 if ac_fn_c_try_link "$LINENO"; then :
10626
10627 else
10628 gdb_cv_bigtoc=
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
10632
10633 fi
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10635 $as_echo "$gdb_cv_bigtoc" >&6; }
10636 ;;
10637 esac
10638
10639 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10640 # used for the tests that follow. We set them back to REAL_CFLAGS and
10641 # REAL_CPPFLAGS later on.
10642
10643 REAL_CFLAGS="$CFLAGS"
10644 REAL_CPPFLAGS="$CPPFLAGS"
10645
10646 if test "${HAVE_X11}" = "yes"; then
10647 DEFS="$C_SWITCH_X_SITE $DEFS"
10648 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10649 LIBS="-lX11 $LIBS"
10650 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10651 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10652
10653 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10654 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10655 # but it's more convenient here to set LD_RUN_PATH since this
10656 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10657 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10658 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10659 export LD_RUN_PATH
10660 fi
10661
10662 if test "${opsys}" = "gnu-linux"; then
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10664 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10666 /* end confdefs.h. */
10667
10668 int
10669 main ()
10670 {
10671 XOpenDisplay ("foo");
10672 ;
10673 return 0;
10674 }
10675 _ACEOF
10676 if ac_fn_c_try_link "$LINENO"; then :
10677 xgnu_linux_first_failure=no
10678 else
10679 xgnu_linux_first_failure=yes
10680 fi
10681 rm -f core conftest.err conftest.$ac_objext \
10682 conftest$ac_exeext conftest.$ac_ext
10683 if test "${xgnu_linux_first_failure}" = "yes"; then
10684 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10685 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10686 OLD_CPPFLAGS="$CPPFLAGS"
10687 OLD_LIBS="$LIBS"
10688 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10689 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10690 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10691 LIBS="$LIBS -b i486-linuxaout"
10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10693 /* end confdefs.h. */
10694
10695 int
10696 main ()
10697 {
10698 XOpenDisplay ("foo");
10699 ;
10700 return 0;
10701 }
10702 _ACEOF
10703 if ac_fn_c_try_link "$LINENO"; then :
10704 xgnu_linux_second_failure=no
10705 else
10706 xgnu_linux_second_failure=yes
10707 fi
10708 rm -f core conftest.err conftest.$ac_objext \
10709 conftest$ac_exeext conftest.$ac_ext
10710 if test "${xgnu_linux_second_failure}" = "yes"; then
10711 # If we get the same failure with -b, there is no use adding -b.
10712 # So take it out. This plays safe.
10713 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10714 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10715 CPPFLAGS="$OLD_CPPFLAGS"
10716 LIBS="$OLD_LIBS"
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718 $as_echo "no" >&6; }
10719 else
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10721 $as_echo "yes" >&6; }
10722 fi
10723 else
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10725 $as_echo "no" >&6; }
10726 fi
10727 fi
10728
10729 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10730 # header files included from there.
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10732 $as_echo_n "checking for Xkb... " >&6; }
10733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10734 /* end confdefs.h. */
10735 #include <X11/Xlib.h>
10736 #include <X11/XKBlib.h>
10737 int
10738 main ()
10739 {
10740 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10741 ;
10742 return 0;
10743 }
10744 _ACEOF
10745 if ac_fn_c_try_link "$LINENO"; then :
10746 emacs_xkb=yes
10747 else
10748 emacs_xkb=no
10749 fi
10750 rm -f core conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10753 $as_echo "$emacs_xkb" >&6; }
10754 if test $emacs_xkb = yes; then
10755
10756 $as_echo "#define HAVE_XKB 1" >>confdefs.h
10757
10758 fi
10759
10760 for ac_func in XrmSetDatabase XScreenResourceString \
10761 XScreenNumberOfScreen
10762 do :
10763 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10764 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10765 eval as_val=\$$as_ac_var
10766 if test "x$as_val" = x""yes; then :
10767 cat >>confdefs.h <<_ACEOF
10768 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10769 _ACEOF
10770
10771 fi
10772 done
10773
10774 fi
10775
10776 if test "${window_system}" = "x11"; then
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10778 $as_echo_n "checking X11 version 6... " >&6; }
10779 if test "${emacs_cv_x11_version_6+set}" = set; then :
10780 $as_echo_n "(cached) " >&6
10781 else
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783 /* end confdefs.h. */
10784 #include <X11/Xlib.h>
10785 int
10786 main ()
10787 {
10788 #if XlibSpecificationRelease < 6
10789 fail;
10790 #endif
10791
10792 ;
10793 return 0;
10794 }
10795 _ACEOF
10796 if ac_fn_c_try_link "$LINENO"; then :
10797 emacs_cv_x11_version_6=yes
10798 else
10799 emacs_cv_x11_version_6=no
10800 fi
10801 rm -f core conftest.err conftest.$ac_objext \
10802 conftest$ac_exeext conftest.$ac_ext
10803 fi
10804
10805 if test $emacs_cv_x11_version_6 = yes; then
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10807 $as_echo "6 or newer" >&6; }
10808
10809 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
10810
10811
10812 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10813
10814 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10815 ## XIM support.
10816 case "$opsys" in
10817 sol2-*) : ;;
10818 *)
10819 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10820
10821 ;;
10822 esac
10823 else
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10825 $as_echo "before 6" >&6; }
10826 fi
10827 fi
10828
10829
10830 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10831 HAVE_RSVG=no
10832 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10833 if test "${with_rsvg}" != "no"; then
10834 RSVG_REQUIRED=2.11.0
10835 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10836
10837
10838 succeeded=no
10839
10840 if test "$PKG_CONFIG" = "no" ; then
10841 :
10842 else
10843 PKG_CONFIG_MIN_VERSION=0.9.0
10844 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10846 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
10847
10848 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10849 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10850 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
10851 edit_cflags="
10852 s,///*,/,g
10853 s/^/ /
10854 s/ -I/ $isystem/g
10855 s/^ //
10856 "
10857 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10858 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10860 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10861 succeeded=yes
10862 else
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864 $as_echo "no" >&6; }
10865 RSVG_CFLAGS=""
10866 RSVG_LIBS=""
10867 ## If we have a custom action on failure, don't print errors, but
10868 ## do set a variable so people can do so. Do it in a subshell
10869 ## to capture any diagnostics in invoking pkg-config.
10870 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
10871
10872 fi
10873
10874
10875
10876 else
10877 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10878 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10879 fi
10880 fi
10881
10882 if test $succeeded = yes; then
10883 HAVE_RSVG=yes
10884 else
10885 :
10886 fi
10887
10888
10889
10890
10891 if test $HAVE_RSVG = yes; then
10892
10893 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
10894
10895 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10896 LIBS="$RSVG_LIBS $LIBS"
10897 fi
10898 fi
10899 fi
10900
10901 HAVE_IMAGEMAGICK=no
10902 if test "${HAVE_X11}" = "yes"; then
10903 if test "${with_imagemagick}" != "no"; then
10904 ## 6.2.8 is the earliest version known to work, but earlier versions
10905 ## might work - let us know if you find one.
10906 ## 6.0.7 does not work. See bug#7955.
10907 ## 6.8.2 makes Emacs crash; see Bug#13867.
10908 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
10909
10910 succeeded=no
10911
10912 if test "$PKG_CONFIG" = "no" ; then
10913 :
10914 else
10915 PKG_CONFIG_MIN_VERSION=0.9.0
10916 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10918 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10919
10920 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10921 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10922 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10923 edit_cflags="
10924 s,///*,/,g
10925 s/^/ /
10926 s/ -I/ $isystem/g
10927 s/^ //
10928 "
10929 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10930 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10932 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10933 succeeded=yes
10934 else
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936 $as_echo "no" >&6; }
10937 IMAGEMAGICK_CFLAGS=""
10938 IMAGEMAGICK_LIBS=""
10939 ## If we have a custom action on failure, don't print errors, but
10940 ## do set a variable so people can do so. Do it in a subshell
10941 ## to capture any diagnostics in invoking pkg-config.
10942 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
10943
10944 fi
10945
10946
10947
10948 else
10949 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10950 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10951 fi
10952 fi
10953
10954 if test $succeeded = yes; then
10955 HAVE_IMAGEMAGICK=yes
10956 else
10957 :
10958 fi
10959
10960
10961
10962
10963 if test $HAVE_IMAGEMAGICK = yes; then
10964
10965 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10966
10967 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10968 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10969 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10970 do :
10971 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10972 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10973 eval as_val=\$$as_ac_var
10974 if test "x$as_val" = x""yes; then :
10975 cat >>confdefs.h <<_ACEOF
10976 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10977 _ACEOF
10978
10979 fi
10980 done
10981
10982 fi
10983 fi
10984 fi
10985
10986
10987 HAVE_GTK=no
10988 GTK_OBJ=
10989 check_gtk2=no
10990 gtk3_pkg_errors=
10991 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10992 GLIB_REQUIRED=2.28
10993 GTK_REQUIRED=3.0
10994 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10995
10996
10997 succeeded=no
10998
10999 if test "$PKG_CONFIG" = "no" ; then
11000 pkg_check_gtk=no
11001 else
11002 PKG_CONFIG_MIN_VERSION=0.9.0
11003 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11005 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11006
11007 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11008 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11009 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11010 edit_cflags="
11011 s,///*,/,g
11012 s/^/ /
11013 s/ -I/ $isystem/g
11014 s/^ //
11015 "
11016 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11017 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11019 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11020 succeeded=yes
11021 else
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023 $as_echo "no" >&6; }
11024 GTK_CFLAGS=""
11025 GTK_LIBS=""
11026 ## If we have a custom action on failure, don't print errors, but
11027 ## do set a variable so people can do so. Do it in a subshell
11028 ## to capture any diagnostics in invoking pkg-config.
11029 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11030
11031 fi
11032
11033
11034
11035 else
11036 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11037 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11038 fi
11039 fi
11040
11041 if test $succeeded = yes; then
11042 pkg_check_gtk=yes
11043 else
11044 pkg_check_gtk=no
11045 fi
11046
11047 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11048 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11049 fi
11050 if test "$pkg_check_gtk" = "yes"; then
11051
11052 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11053
11054 GTK_OBJ=emacsgtkfixed.o
11055 term_header=gtkutil.h
11056 USE_GTK_TOOLKIT="GTK3"
11057 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11058 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11059 fi
11060 else
11061 check_gtk2=yes
11062 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11063 fi
11064 fi
11065
11066 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11067 GLIB_REQUIRED=2.10
11068 GTK_REQUIRED=2.10
11069 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11070
11071
11072 succeeded=no
11073
11074 if test "$PKG_CONFIG" = "no" ; then
11075 pkg_check_gtk=no
11076 else
11077 PKG_CONFIG_MIN_VERSION=0.9.0
11078 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11080 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11081
11082 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11083 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11084 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11085 edit_cflags="
11086 s,///*,/,g
11087 s/^/ /
11088 s/ -I/ $isystem/g
11089 s/^ //
11090 "
11091 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11092 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11094 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11095 succeeded=yes
11096 else
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098 $as_echo "no" >&6; }
11099 GTK_CFLAGS=""
11100 GTK_LIBS=""
11101 ## If we have a custom action on failure, don't print errors, but
11102 ## do set a variable so people can do so. Do it in a subshell
11103 ## to capture any diagnostics in invoking pkg-config.
11104 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11105
11106 fi
11107
11108
11109
11110 else
11111 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11112 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11113 fi
11114 fi
11115
11116 if test $succeeded = yes; then
11117 pkg_check_gtk=yes
11118 else
11119 pkg_check_gtk=no
11120 fi
11121
11122 if test "$pkg_check_gtk" = "no" &&
11123 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11124 then
11125 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11126 fi
11127 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11128 fi
11129
11130 if test x"$pkg_check_gtk" = xyes; then
11131
11132
11133
11134 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11135 CFLAGS="$CFLAGS $GTK_CFLAGS"
11136 LIBS="$GTK_LIBS $LIBS"
11137 GTK_COMPILES=no
11138 for ac_func in gtk_main
11139 do :
11140 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11141 if test "x$ac_cv_func_gtk_main" = x""yes; then :
11142 cat >>confdefs.h <<_ACEOF
11143 #define HAVE_GTK_MAIN 1
11144 _ACEOF
11145 GTK_COMPILES=yes
11146 fi
11147 done
11148
11149 if test "${GTK_COMPILES}" != "yes"; then
11150 if test "$USE_X_TOOLKIT" != "maybe"; then
11151 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11152 fi
11153 else
11154 HAVE_GTK=yes
11155
11156 $as_echo "#define USE_GTK 1" >>confdefs.h
11157
11158 GTK_OBJ="gtkutil.o $GTK_OBJ"
11159 USE_X_TOOLKIT=none
11160 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11161 :
11162 else
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11164 closing open displays. This is no problem if you just use
11165 one display, but if you use more than one and close one of them
11166 Emacs may crash." >&5
11167 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11168 closing open displays. This is no problem if you just use
11169 one display, but if you use more than one and close one of them
11170 Emacs may crash." >&2;}
11171 sleep 3
11172 fi
11173 fi
11174
11175 fi
11176
11177
11178
11179 if test "${HAVE_GTK}" = "yes"; then
11180
11181 if test "$with_toolkit_scroll_bars" != no; then
11182 with_toolkit_scroll_bars=yes
11183 fi
11184
11185 HAVE_GTK_FILE_SELECTION=no
11186 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11187 #include <gtk/gtk.h>
11188 "
11189 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11190 HAVE_GTK_FILE_SELECTION=yes
11191 else
11192 HAVE_GTK_FILE_SELECTION=no
11193 fi
11194
11195 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11196 for ac_func in gtk_file_selection_new
11197 do :
11198 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11199 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11200 cat >>confdefs.h <<_ACEOF
11201 #define HAVE_GTK_FILE_SELECTION_NEW 1
11202 _ACEOF
11203
11204 fi
11205 done
11206
11207 fi
11208
11209 HAVE_GTK_HANDLE_BOX=no
11210 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11211 #include <gtk/gtk.h>
11212 "
11213 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11214 HAVE_GTK_HANDLE_BOX=yes
11215 else
11216 HAVE_GTK_HANDLE_BOX=no
11217 fi
11218
11219 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11220 for ac_func in gtk_handle_box_new
11221 do :
11222 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11223 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11224 cat >>confdefs.h <<_ACEOF
11225 #define HAVE_GTK_HANDLE_BOX_NEW 1
11226 _ACEOF
11227
11228 fi
11229 done
11230
11231 fi
11232
11233 HAVE_GTK_TEAROFF_MENU_ITEM=no
11234 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11235 #include <gtk/gtk.h>
11236 "
11237 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11238 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11239 else
11240 HAVE_GTK_TEAROFF_MENU_ITEM=no
11241 fi
11242
11243 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11244 for ac_func in gtk_tearoff_menu_item_new
11245 do :
11246 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11247 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11248 cat >>confdefs.h <<_ACEOF
11249 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11250 _ACEOF
11251
11252 fi
11253 done
11254
11255 fi
11256
11257 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11258 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11259 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11260 gtk_orientable_set_orientation \
11261 gtk_window_set_has_resize_grip
11262 do :
11263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11264 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11265 eval as_val=\$$as_ac_var
11266 if test "x$as_val" = x""yes; then :
11267 cat >>confdefs.h <<_ACEOF
11268 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11269 _ACEOF
11270
11271 fi
11272 done
11273
11274
11275 term_header=gtkutil.h
11276 fi
11277
11278 HAVE_DBUS=no
11279 DBUS_OBJ=
11280 if test "${with_dbus}" = "yes"; then
11281
11282 succeeded=no
11283
11284 if test "$PKG_CONFIG" = "no" ; then
11285 HAVE_DBUS=no
11286 else
11287 PKG_CONFIG_MIN_VERSION=0.9.0
11288 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11290 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11291
11292 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11293 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11294 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11295 edit_cflags="
11296 s,///*,/,g
11297 s/^/ /
11298 s/ -I/ $isystem/g
11299 s/^ //
11300 "
11301 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11302 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11304 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11305 succeeded=yes
11306 else
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308 $as_echo "no" >&6; }
11309 DBUS_CFLAGS=""
11310 DBUS_LIBS=""
11311 ## If we have a custom action on failure, don't print errors, but
11312 ## do set a variable so people can do so. Do it in a subshell
11313 ## to capture any diagnostics in invoking pkg-config.
11314 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11315
11316 fi
11317
11318
11319
11320 else
11321 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11322 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11323 fi
11324 fi
11325
11326 if test $succeeded = yes; then
11327 HAVE_DBUS=yes
11328 else
11329 HAVE_DBUS=no
11330 fi
11331
11332 if test "$HAVE_DBUS" = yes; then
11333 LIBS="$LIBS $DBUS_LIBS"
11334
11335 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11336
11337 for ac_func in dbus_watch_get_unix_fd \
11338 dbus_type_is_valid \
11339 dbus_validate_bus_name \
11340 dbus_validate_path \
11341 dbus_validate_interface \
11342 dbus_validate_member
11343 do :
11344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11345 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11346 eval as_val=\$$as_ac_var
11347 if test "x$as_val" = x""yes; then :
11348 cat >>confdefs.h <<_ACEOF
11349 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11350 _ACEOF
11351
11352 fi
11353 done
11354
11355 DBUS_OBJ=dbusbind.o
11356 fi
11357 fi
11358
11359
11360 HAVE_GSETTINGS=no
11361 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11362
11363 succeeded=no
11364
11365 if test "$PKG_CONFIG" = "no" ; then
11366 HAVE_GSETTINGS=no
11367 else
11368 PKG_CONFIG_MIN_VERSION=0.9.0
11369 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11371 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11372
11373 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11374 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11375 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11376 edit_cflags="
11377 s,///*,/,g
11378 s/^/ /
11379 s/ -I/ $isystem/g
11380 s/^ //
11381 "
11382 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11383 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11385 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11386 succeeded=yes
11387 else
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389 $as_echo "no" >&6; }
11390 GSETTINGS_CFLAGS=""
11391 GSETTINGS_LIBS=""
11392 ## If we have a custom action on failure, don't print errors, but
11393 ## do set a variable so people can do so. Do it in a subshell
11394 ## to capture any diagnostics in invoking pkg-config.
11395 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11396
11397 fi
11398
11399
11400
11401 else
11402 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11403 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11404 fi
11405 fi
11406
11407 if test $succeeded = yes; then
11408 HAVE_GSETTINGS=yes
11409 else
11410 HAVE_GSETTINGS=no
11411 fi
11412
11413 if test "$HAVE_GSETTINGS" = "yes"; then
11414
11415 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11416
11417 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11418 SETTINGS_LIBS="$GSETTINGS_LIBS"
11419 fi
11420 fi
11421
11422 HAVE_GCONF=no
11423 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11424
11425 succeeded=no
11426
11427 if test "$PKG_CONFIG" = "no" ; then
11428 HAVE_GCONF=no
11429 else
11430 PKG_CONFIG_MIN_VERSION=0.9.0
11431 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11433 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11434
11435 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11436 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11437 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11438 edit_cflags="
11439 s,///*,/,g
11440 s/^/ /
11441 s/ -I/ $isystem/g
11442 s/^ //
11443 "
11444 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11445 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11447 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11448 succeeded=yes
11449 else
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451 $as_echo "no" >&6; }
11452 GCONF_CFLAGS=""
11453 GCONF_LIBS=""
11454 ## If we have a custom action on failure, don't print errors, but
11455 ## do set a variable so people can do so. Do it in a subshell
11456 ## to capture any diagnostics in invoking pkg-config.
11457 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11458
11459 fi
11460
11461
11462
11463 else
11464 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11465 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11466 fi
11467 fi
11468
11469 if test $succeeded = yes; then
11470 HAVE_GCONF=yes
11471 else
11472 HAVE_GCONF=no
11473 fi
11474
11475 if test "$HAVE_GCONF" = yes; then
11476
11477 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11478
11479 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11480 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11481 fi
11482 fi
11483
11484 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11485
11486 succeeded=no
11487
11488 if test "$PKG_CONFIG" = "no" ; then
11489 HAVE_GOBJECT=no
11490 else
11491 PKG_CONFIG_MIN_VERSION=0.9.0
11492 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11494 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11495
11496 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11497 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11498 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11499 edit_cflags="
11500 s,///*,/,g
11501 s/^/ /
11502 s/ -I/ $isystem/g
11503 s/^ //
11504 "
11505 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11506 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11508 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11509 succeeded=yes
11510 else
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512 $as_echo "no" >&6; }
11513 GOBJECT_CFLAGS=""
11514 GOBJECT_LIBS=""
11515 ## If we have a custom action on failure, don't print errors, but
11516 ## do set a variable so people can do so. Do it in a subshell
11517 ## to capture any diagnostics in invoking pkg-config.
11518 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11519
11520 fi
11521
11522
11523
11524 else
11525 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11526 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11527 fi
11528 fi
11529
11530 if test $succeeded = yes; then
11531 HAVE_GOBJECT=yes
11532 else
11533 HAVE_GOBJECT=no
11534 fi
11535
11536 if test "$HAVE_GOBJECT" = "yes"; then
11537 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11538 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11539 fi
11540 SAVE_CFLAGS="$CFLAGS"
11541 SAVE_LIBS="$LIBS"
11542 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11543 LIBS="$SETTINGS_LIBS $LIBS"
11544 for ac_func in g_type_init
11545 do :
11546 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11547 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11548 cat >>confdefs.h <<_ACEOF
11549 #define HAVE_G_TYPE_INIT 1
11550 _ACEOF
11551
11552 fi
11553 done
11554
11555 CFLAGS="$SAVE_CFLAGS"
11556 LIBS="$SAVE_LIBS"
11557 fi
11558
11559
11560
11561
11562 HAVE_LIBSELINUX=no
11563 LIBSELINUX_LIBS=
11564 if test "${with_selinux}" = "yes"; then
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11566 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11567 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11568 $as_echo_n "(cached) " >&6
11569 else
11570 ac_check_lib_save_LIBS=$LIBS
11571 LIBS="-lselinux $LIBS"
11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573 /* end confdefs.h. */
11574
11575 /* Override any GCC internal prototype to avoid an error.
11576 Use char because int might match the return type of a GCC
11577 builtin and then its argument prototype would still apply. */
11578 #ifdef __cplusplus
11579 extern "C"
11580 #endif
11581 char lgetfilecon ();
11582 int
11583 main ()
11584 {
11585 return lgetfilecon ();
11586 ;
11587 return 0;
11588 }
11589 _ACEOF
11590 if ac_fn_c_try_link "$LINENO"; then :
11591 ac_cv_lib_selinux_lgetfilecon=yes
11592 else
11593 ac_cv_lib_selinux_lgetfilecon=no
11594 fi
11595 rm -f core conftest.err conftest.$ac_objext \
11596 conftest$ac_exeext conftest.$ac_ext
11597 LIBS=$ac_check_lib_save_LIBS
11598 fi
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11600 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11601 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11602 HAVE_LIBSELINUX=yes
11603 else
11604 HAVE_LIBSELINUX=no
11605 fi
11606
11607 if test "$HAVE_LIBSELINUX" = yes; then
11608
11609 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11610
11611 LIBSELINUX_LIBS=-lselinux
11612 fi
11613 fi
11614
11615
11616 HAVE_GNUTLS=no
11617 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11618 if test "${with_gnutls}" = "yes" ; then
11619
11620 succeeded=no
11621
11622 if test "$PKG_CONFIG" = "no" ; then
11623 HAVE_GNUTLS=no
11624 else
11625 PKG_CONFIG_MIN_VERSION=0.9.0
11626 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11628 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11629
11630 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11631 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11632 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
11633 edit_cflags="
11634 s,///*,/,g
11635 s/^/ /
11636 s/ -I/ $isystem/g
11637 s/^ //
11638 "
11639 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11640 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11642 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11643 succeeded=yes
11644 else
11645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646 $as_echo "no" >&6; }
11647 LIBGNUTLS_CFLAGS=""
11648 LIBGNUTLS_LIBS=""
11649 ## If we have a custom action on failure, don't print errors, but
11650 ## do set a variable so people can do so. Do it in a subshell
11651 ## to capture any diagnostics in invoking pkg-config.
11652 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
11653
11654 fi
11655
11656
11657
11658 else
11659 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11660 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11661 fi
11662 fi
11663
11664 if test $succeeded = yes; then
11665 HAVE_GNUTLS=yes
11666 else
11667 HAVE_GNUTLS=no
11668 fi
11669
11670 if test "${HAVE_GNUTLS}" = "yes"; then
11671
11672 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11673
11674 fi
11675
11676 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11677 LIBS="$LIBGNUTLS_LIBS $LIBS"
11678 for ac_func in gnutls_certificate_set_verify_function
11679 do :
11680 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11681 if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11682 cat >>confdefs.h <<_ACEOF
11683 #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11684 _ACEOF
11685 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11686 fi
11687 done
11688
11689
11690 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11691
11692 $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11693
11694 fi
11695 fi
11696
11697
11698
11699
11700 if test "${with_inotify}" = "yes"; then
11701 for ac_header in sys/inotify.h
11702 do :
11703 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11704 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11705 cat >>confdefs.h <<_ACEOF
11706 #define HAVE_SYS_INOTIFY_H 1
11707 _ACEOF
11708
11709 fi
11710
11711 done
11712
11713 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11714 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11715 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11716
11717 fi
11718
11719 fi
11720 fi
11721 if test "$ac_cv_func_inotify_init1" = yes; then
11722
11723 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11724
11725 fi
11726
11727 HAVE_XAW3D=no
11728 LUCID_LIBW=
11729 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11730 if test "$with_xaw3d" != no; then
11731 if test "${emacs_cv_xaw3d+set}" = set; then :
11732 $as_echo_n "(cached) " >&6
11733 else
11734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11735 /* end confdefs.h. */
11736
11737 #include <X11/Intrinsic.h>
11738 #include <X11/Xaw3d/Simple.h>
11739 int
11740 main ()
11741 {
11742
11743 ;
11744 return 0;
11745 }
11746 _ACEOF
11747 if ac_fn_c_try_link "$LINENO"; then :
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11749 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11750 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11751 $as_echo_n "(cached) " >&6
11752 else
11753 ac_check_lib_save_LIBS=$LIBS
11754 LIBS="-lXaw3d $LIBS"
11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756 /* end confdefs.h. */
11757
11758 /* Override any GCC internal prototype to avoid an error.
11759 Use char because int might match the return type of a GCC
11760 builtin and then its argument prototype would still apply. */
11761 #ifdef __cplusplus
11762 extern "C"
11763 #endif
11764 char XawScrollbarSetThumb ();
11765 int
11766 main ()
11767 {
11768 return XawScrollbarSetThumb ();
11769 ;
11770 return 0;
11771 }
11772 _ACEOF
11773 if ac_fn_c_try_link "$LINENO"; then :
11774 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
11775 else
11776 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
11777 fi
11778 rm -f core conftest.err conftest.$ac_objext \
11779 conftest$ac_exeext conftest.$ac_ext
11780 LIBS=$ac_check_lib_save_LIBS
11781 fi
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11783 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11784 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11785 emacs_cv_xaw3d=yes
11786 else
11787 emacs_cv_xaw3d=no
11788 fi
11789
11790 else
11791 emacs_cv_xaw3d=no
11792 fi
11793 rm -f core conftest.err conftest.$ac_objext \
11794 conftest$ac_exeext conftest.$ac_ext
11795 fi
11796
11797 else
11798 emacs_cv_xaw3d=no
11799 fi
11800 if test $emacs_cv_xaw3d = yes; then
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11802 $as_echo_n "checking for xaw3d... " >&6; }
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11804 $as_echo "yes; using Lucid toolkit" >&6; }
11805 USE_X_TOOLKIT=LUCID
11806 HAVE_XAW3D=yes
11807 LUCID_LIBW=-lXaw3d
11808
11809 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11810
11811 else
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11813 $as_echo_n "checking for xaw3d... " >&6; }
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815 $as_echo "no" >&6; }
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11817 $as_echo_n "checking for libXaw... " >&6; }
11818 if test "${emacs_cv_xaw+set}" = set; then :
11819 $as_echo_n "(cached) " >&6
11820 else
11821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11822 /* end confdefs.h. */
11823
11824 #include <X11/Intrinsic.h>
11825 #include <X11/Xaw/Simple.h>
11826 int
11827 main ()
11828 {
11829
11830 ;
11831 return 0;
11832 }
11833 _ACEOF
11834 if ac_fn_c_try_link "$LINENO"; then :
11835 emacs_cv_xaw=yes
11836 else
11837 emacs_cv_xaw=no
11838 fi
11839 rm -f core conftest.err conftest.$ac_objext \
11840 conftest$ac_exeext conftest.$ac_ext
11841 fi
11842
11843 if test $emacs_cv_xaw = yes; then
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11845 $as_echo "yes; using Lucid toolkit" >&6; }
11846 USE_X_TOOLKIT=LUCID
11847 LUCID_LIBW=-lXaw
11848 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11849 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
11850 else
11851 as_fn_error "No X toolkit could be found.
11852 If you are sure you want Emacs compiled without an X toolkit, pass
11853 --with-x-toolkit=no
11854 to configure. Otherwise, install the development libraries for the toolkit
11855 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
11856 fi
11857 fi
11858 fi
11859
11860 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11861
11862 LIBXTR6=
11863 if test "${USE_X_TOOLKIT}" != "none"; then
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11865 $as_echo_n "checking X11 toolkit version... " >&6; }
11866 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
11867 $as_echo_n "(cached) " >&6
11868 else
11869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11870 /* end confdefs.h. */
11871 #include <X11/Intrinsic.h>
11872 int
11873 main ()
11874 {
11875 #if XtSpecificationRelease < 6
11876 fail;
11877 #endif
11878
11879 ;
11880 return 0;
11881 }
11882 _ACEOF
11883 if ac_fn_c_try_link "$LINENO"; then :
11884 emacs_cv_x11_toolkit_version_6=yes
11885 else
11886 emacs_cv_x11_toolkit_version_6=no
11887 fi
11888 rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
11890 fi
11891
11892 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11893 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11895 $as_echo "6 or newer" >&6; }
11896
11897 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11898
11899 LIBXTR6="-lSM -lICE"
11900 case "$opsys" in
11901 ## Use libw.a along with X11R6 Xt.
11902 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11903 esac
11904 else
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11906 $as_echo "before 6" >&6; }
11907 fi
11908
11909 OLDLIBS="$LIBS"
11910 if test x$HAVE_X11XTR6 = xyes; then
11911 LIBS="-lXt -lSM -lICE $LIBS"
11912 else
11913 LIBS="-lXt $LIBS"
11914 fi
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11916 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11917 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11918 $as_echo_n "(cached) " >&6
11919 else
11920 ac_check_lib_save_LIBS=$LIBS
11921 LIBS="-lXmu $LIBS"
11922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923 /* end confdefs.h. */
11924
11925 /* Override any GCC internal prototype to avoid an error.
11926 Use char because int might match the return type of a GCC
11927 builtin and then its argument prototype would still apply. */
11928 #ifdef __cplusplus
11929 extern "C"
11930 #endif
11931 char XmuConvertStandardSelection ();
11932 int
11933 main ()
11934 {
11935 return XmuConvertStandardSelection ();
11936 ;
11937 return 0;
11938 }
11939 _ACEOF
11940 if ac_fn_c_try_link "$LINENO"; then :
11941 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11942 else
11943 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11944 fi
11945 rm -f core conftest.err conftest.$ac_objext \
11946 conftest$ac_exeext conftest.$ac_ext
11947 LIBS=$ac_check_lib_save_LIBS
11948 fi
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11950 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11951 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11952 cat >>confdefs.h <<_ACEOF
11953 #define HAVE_LIBXMU 1
11954 _ACEOF
11955
11956 LIBS="-lXmu $LIBS"
11957
11958 fi
11959
11960 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11961 fi
11962
11963
11964 LIBXMU=-lXmu
11965 case $opsys in
11966 ## These systems don't supply Xmu.
11967 hpux* | aix4-2 )
11968 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11969 ;;
11970 esac
11971
11972
11973 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11974 if test "${HAVE_X11}" = "yes"; then
11975 if test "${USE_X_TOOLKIT}" != "none"; then
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11977 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11978 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
11979 $as_echo_n "(cached) " >&6
11980 else
11981 ac_check_lib_save_LIBS=$LIBS
11982 LIBS="-lXext $LIBS"
11983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984 /* end confdefs.h. */
11985
11986 /* Override any GCC internal prototype to avoid an error.
11987 Use char because int might match the return type of a GCC
11988 builtin and then its argument prototype would still apply. */
11989 #ifdef __cplusplus
11990 extern "C"
11991 #endif
11992 char XShapeQueryExtension ();
11993 int
11994 main ()
11995 {
11996 return XShapeQueryExtension ();
11997 ;
11998 return 0;
11999 }
12000 _ACEOF
12001 if ac_fn_c_try_link "$LINENO"; then :
12002 ac_cv_lib_Xext_XShapeQueryExtension=yes
12003 else
12004 ac_cv_lib_Xext_XShapeQueryExtension=no
12005 fi
12006 rm -f core conftest.err conftest.$ac_objext \
12007 conftest$ac_exeext conftest.$ac_ext
12008 LIBS=$ac_check_lib_save_LIBS
12009 fi
12010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12011 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12012 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12013 cat >>confdefs.h <<_ACEOF
12014 #define HAVE_LIBXEXT 1
12015 _ACEOF
12016
12017 LIBS="-lXext $LIBS"
12018
12019 fi
12020
12021 fi
12022 fi
12023
12024 LIBXP=
12025 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12026 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12027 if test -d /usr/include/openmotif; then
12028 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12029 emacs_cv_openmotif=yes
12030 case "$canonical" in
12031 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12032 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12033 ;;
12034 *)
12035 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12036 esac
12037 else
12038 emacs_cv_openmotif=no
12039 fi
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12041 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12042 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12043 $as_echo_n "(cached) " >&6
12044 else
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046 /* end confdefs.h. */
12047 #include <Xm/Xm.h>
12048 int
12049 main ()
12050 {
12051 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12052 int x = 5;
12053 #else
12054 Motif version prior to 2.1.
12055 #endif
12056 ;
12057 return 0;
12058 }
12059 _ACEOF
12060 if ac_fn_c_try_compile "$LINENO"; then :
12061 emacs_cv_motif_version_2_1=yes
12062 else
12063 emacs_cv_motif_version_2_1=no
12064 fi
12065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12068 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12069 if test $emacs_cv_motif_version_2_1 = yes; then
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12071 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12072 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12073 $as_echo_n "(cached) " >&6
12074 else
12075 ac_check_lib_save_LIBS=$LIBS
12076 LIBS="-lXp $LIBS"
12077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12078 /* end confdefs.h. */
12079
12080 /* Override any GCC internal prototype to avoid an error.
12081 Use char because int might match the return type of a GCC
12082 builtin and then its argument prototype would still apply. */
12083 #ifdef __cplusplus
12084 extern "C"
12085 #endif
12086 char XpCreateContext ();
12087 int
12088 main ()
12089 {
12090 return XpCreateContext ();
12091 ;
12092 return 0;
12093 }
12094 _ACEOF
12095 if ac_fn_c_try_link "$LINENO"; then :
12096 ac_cv_lib_Xp_XpCreateContext=yes
12097 else
12098 ac_cv_lib_Xp_XpCreateContext=no
12099 fi
12100 rm -f core conftest.err conftest.$ac_objext \
12101 conftest$ac_exeext conftest.$ac_ext
12102 LIBS=$ac_check_lib_save_LIBS
12103 fi
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12105 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12106 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12107 LIBXP=-lXp
12108 fi
12109
12110 if test x$emacs_cv_openmotif = xyes; then
12111 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12112 fi
12113 else
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12115 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12116 if test "${emacs_cv_lesstif+set}" = set; then :
12117 $as_echo_n "(cached) " >&6
12118 else
12119 # We put this in CFLAGS temporarily to precede other -I options
12120 # that might be in CFLAGS temporarily.
12121 # We put this in CPPFLAGS where it precedes the other -I options.
12122 OLD_CPPFLAGS=$CPPFLAGS
12123 OLD_CFLAGS=$CFLAGS
12124 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12125 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127 /* end confdefs.h. */
12128 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12129 int
12130 main ()
12131 {
12132 int x = 5;
12133 ;
12134 return 0;
12135 }
12136 _ACEOF
12137 if ac_fn_c_try_compile "$LINENO"; then :
12138 emacs_cv_lesstif=yes
12139 else
12140 emacs_cv_lesstif=no
12141 fi
12142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12143 fi
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12145 $as_echo "$emacs_cv_lesstif" >&6; }
12146 if test $emacs_cv_lesstif = yes; then
12147 # Make sure this -I option remains in CPPFLAGS after it is set
12148 # back to REAL_CPPFLAGS.
12149 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12150 # have those other -I options anyway. Ultimately, having this
12151 # directory ultimately in CPPFLAGS will be enough.
12152 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12153 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12154 else
12155 CFLAGS=$OLD_CFLAGS
12156 CPPFLAGS=$OLD_CPPFLAGS
12157 fi
12158 fi
12159 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12160 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12161
12162 else
12163 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12164 fi
12165
12166
12167 fi
12168
12169
12170 USE_TOOLKIT_SCROLL_BARS=no
12171 if test "${with_toolkit_scroll_bars}" != "no"; then
12172 if test "${USE_X_TOOLKIT}" != "none"; then
12173 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12174 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12175
12176 HAVE_XAW3D=no
12177 USE_TOOLKIT_SCROLL_BARS=yes
12178 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12179 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12180
12181 USE_TOOLKIT_SCROLL_BARS=yes
12182 fi
12183 elif test "${HAVE_GTK}" = "yes"; then
12184 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12185
12186 USE_TOOLKIT_SCROLL_BARS=yes
12187 elif test "${HAVE_NS}" = "yes"; then
12188 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12189
12190 USE_TOOLKIT_SCROLL_BARS=yes
12191 elif test "${HAVE_W32}" = "yes"; then
12192 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12193
12194 USE_TOOLKIT_SCROLL_BARS=yes
12195 fi
12196 fi
12197
12198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12199 /* end confdefs.h. */
12200
12201 #include <X11/Xlib.h>
12202 #include <X11/Xresource.h>
12203 int
12204 main ()
12205 {
12206 XIMProc callback;
12207 ;
12208 return 0;
12209 }
12210 _ACEOF
12211 if ac_fn_c_try_compile "$LINENO"; then :
12212 HAVE_XIM=yes
12213
12214 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12215
12216 else
12217 HAVE_XIM=no
12218 fi
12219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12220
12221
12222 if test "${with_xim}" != "no"; then
12223
12224 $as_echo "#define USE_XIM 1" >>confdefs.h
12225
12226 fi
12227
12228
12229 if test "${HAVE_XIM}" != "no"; then
12230 late_CFLAGS=$CFLAGS
12231 if test "$GCC" = yes; then
12232 CFLAGS="$CFLAGS --pedantic-errors"
12233 fi
12234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235 /* end confdefs.h. */
12236
12237 #include <X11/Xlib.h>
12238 #include <X11/Xresource.h>
12239 int
12240 main ()
12241 {
12242 Display *display;
12243 XrmDatabase db;
12244 char *res_name;
12245 char *res_class;
12246 XIMProc callback;
12247 XPointer *client_data;
12248 #ifndef __GNUC__
12249 /* If we're not using GCC, it's probably not XFree86, and this is
12250 probably right, but we can't use something like --pedantic-errors. */
12251 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12252 char*, XIMProc, XPointer*);
12253 #endif
12254 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12255 client_data);
12256 ;
12257 return 0;
12258 }
12259 _ACEOF
12260 if ac_fn_c_try_compile "$LINENO"; then :
12261 emacs_cv_arg6_star=yes
12262 fi
12263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12264 if test "$emacs_cv_arg6_star" = yes; then
12265 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12266
12267 else
12268 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12269
12270 fi
12271 CFLAGS=$late_CFLAGS
12272 fi
12273
12274 ### Start of font-backend (under any platform) section.
12275 # (nothing here yet -- this is a placeholder)
12276 ### End of font-backend (under any platform) section.
12277
12278 ### Start of font-backend (under X11) section.
12279 if test "${HAVE_X11}" = "yes"; then
12280
12281 succeeded=no
12282
12283 if test "$PKG_CONFIG" = "no" ; then
12284 HAVE_FC=no
12285 else
12286 PKG_CONFIG_MIN_VERSION=0.9.0
12287 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12289 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12290
12291 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12292 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12293 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12294 edit_cflags="
12295 s,///*,/,g
12296 s/^/ /
12297 s/ -I/ $isystem/g
12298 s/^ //
12299 "
12300 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12301 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12303 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12304 succeeded=yes
12305 else
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12307 $as_echo "no" >&6; }
12308 FONTCONFIG_CFLAGS=""
12309 FONTCONFIG_LIBS=""
12310 ## If we have a custom action on failure, don't print errors, but
12311 ## do set a variable so people can do so. Do it in a subshell
12312 ## to capture any diagnostics in invoking pkg-config.
12313 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12314
12315 fi
12316
12317
12318
12319 else
12320 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12321 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12322 fi
12323 fi
12324
12325 if test $succeeded = yes; then
12326 HAVE_FC=yes
12327 else
12328 HAVE_FC=no
12329 fi
12330
12331
12332 ## Use -lXft if available, unless `--with-xft=no'.
12333 HAVE_XFT=maybe
12334 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12335 with_xft="no";
12336 fi
12337 if test "x${with_xft}" != "xno"; then
12338
12339
12340 succeeded=no
12341
12342 if test "$PKG_CONFIG" = "no" ; then
12343 HAVE_XFT=no
12344 else
12345 PKG_CONFIG_MIN_VERSION=0.9.0
12346 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12348 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12349
12350 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12351 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12352 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12353 edit_cflags="
12354 s,///*,/,g
12355 s/^/ /
12356 s/ -I/ $isystem/g
12357 s/^ //
12358 "
12359 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12360 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12362 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12363 succeeded=yes
12364 else
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366 $as_echo "no" >&6; }
12367 XFT_CFLAGS=""
12368 XFT_LIBS=""
12369 ## If we have a custom action on failure, don't print errors, but
12370 ## do set a variable so people can do so. Do it in a subshell
12371 ## to capture any diagnostics in invoking pkg-config.
12372 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12373
12374 fi
12375
12376
12377
12378 else
12379 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12380 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12381 fi
12382 fi
12383
12384 if test $succeeded = yes; then
12385 :
12386 else
12387 HAVE_XFT=no
12388 fi
12389
12390 ## Because xftfont.c uses XRenderQueryExtension, we also
12391 ## need to link to -lXrender.
12392 HAVE_XRENDER=no
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12394 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12395 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12396 $as_echo_n "(cached) " >&6
12397 else
12398 ac_check_lib_save_LIBS=$LIBS
12399 LIBS="-lXrender $LIBS"
12400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12401 /* end confdefs.h. */
12402
12403 /* Override any GCC internal prototype to avoid an error.
12404 Use char because int might match the return type of a GCC
12405 builtin and then its argument prototype would still apply. */
12406 #ifdef __cplusplus
12407 extern "C"
12408 #endif
12409 char XRenderQueryExtension ();
12410 int
12411 main ()
12412 {
12413 return XRenderQueryExtension ();
12414 ;
12415 return 0;
12416 }
12417 _ACEOF
12418 if ac_fn_c_try_link "$LINENO"; then :
12419 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12420 else
12421 ac_cv_lib_Xrender_XRenderQueryExtension=no
12422 fi
12423 rm -f core conftest.err conftest.$ac_objext \
12424 conftest$ac_exeext conftest.$ac_ext
12425 LIBS=$ac_check_lib_save_LIBS
12426 fi
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12428 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12429 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12430 HAVE_XRENDER=yes
12431 fi
12432
12433 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12434 OLD_CPPFLAGS="$CPPFLAGS"
12435 OLD_CFLAGS="$CFLAGS"
12436 OLD_LIBS="$LIBS"
12437 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12438 CFLAGS="$CFLAGS $XFT_CFLAGS"
12439 XFT_LIBS="-lXrender $XFT_LIBS"
12440 LIBS="$XFT_LIBS $LIBS"
12441 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12442 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12444 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12445 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12446 $as_echo_n "(cached) " >&6
12447 else
12448 ac_check_lib_save_LIBS=$LIBS
12449 LIBS="-lXft $XFT_LIBS $LIBS"
12450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12451 /* end confdefs.h. */
12452
12453 /* Override any GCC internal prototype to avoid an error.
12454 Use char because int might match the return type of a GCC
12455 builtin and then its argument prototype would still apply. */
12456 #ifdef __cplusplus
12457 extern "C"
12458 #endif
12459 char XftFontOpen ();
12460 int
12461 main ()
12462 {
12463 return XftFontOpen ();
12464 ;
12465 return 0;
12466 }
12467 _ACEOF
12468 if ac_fn_c_try_link "$LINENO"; then :
12469 ac_cv_lib_Xft_XftFontOpen=yes
12470 else
12471 ac_cv_lib_Xft_XftFontOpen=no
12472 fi
12473 rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext conftest.$ac_ext
12475 LIBS=$ac_check_lib_save_LIBS
12476 fi
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12478 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12479 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12480 HAVE_XFT=yes
12481 fi
12482
12483 fi
12484
12485
12486
12487 if test "${HAVE_XFT}" = "yes"; then
12488
12489 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12490
12491
12492 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12493 else
12494 CPPFLAGS="$OLD_CPPFLAGS"
12495 CFLAGS="$OLD_CFLAGS"
12496 LIBS="$OLD_LIBS"
12497 fi # "${HAVE_XFT}" = "yes"
12498 fi # "$HAVE_XFT" != no
12499 fi # "x${with_xft}" != "xno"
12500
12501 ## We used to allow building with FreeType and without Xft.
12502 ## However, the ftx font backend driver is not in good shape.
12503 if test "$HAVE_XFT" != "yes"; then
12504 HAVE_XFT=no
12505 HAVE_FREETYPE=no
12506 else
12507
12508 succeeded=no
12509
12510 if test "$PKG_CONFIG" = "no" ; then
12511 HAVE_FREETYPE=no
12512 else
12513 PKG_CONFIG_MIN_VERSION=0.9.0
12514 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12516 $as_echo_n "checking for freetype2... " >&6; }
12517
12518 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12519 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12520 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
12521 edit_cflags="
12522 s,///*,/,g
12523 s/^/ /
12524 s/ -I/ $isystem/g
12525 s/^ //
12526 "
12527 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12528 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12530 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12531 succeeded=yes
12532 else
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12534 $as_echo "no" >&6; }
12535 FREETYPE_CFLAGS=""
12536 FREETYPE_LIBS=""
12537 ## If we have a custom action on failure, don't print errors, but
12538 ## do set a variable so people can do so. Do it in a subshell
12539 ## to capture any diagnostics in invoking pkg-config.
12540 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
12541
12542 fi
12543
12544
12545
12546 else
12547 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12548 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12549 fi
12550 fi
12551
12552 if test $succeeded = yes; then
12553 HAVE_FREETYPE=yes
12554 else
12555 HAVE_FREETYPE=no
12556 fi
12557
12558
12559 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12560 fi
12561
12562 HAVE_LIBOTF=no
12563 if test "${HAVE_FREETYPE}" = "yes"; then
12564
12565 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12566
12567 if test "${with_libotf}" != "no"; then
12568
12569 succeeded=no
12570
12571 if test "$PKG_CONFIG" = "no" ; then
12572 HAVE_LIBOTF=no
12573 else
12574 PKG_CONFIG_MIN_VERSION=0.9.0
12575 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12577 $as_echo_n "checking for libotf... " >&6; }
12578
12579 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12580 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12581 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
12582 edit_cflags="
12583 s,///*,/,g
12584 s/^/ /
12585 s/ -I/ $isystem/g
12586 s/^ //
12587 "
12588 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12589 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12591 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12592 succeeded=yes
12593 else
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12595 $as_echo "no" >&6; }
12596 LIBOTF_CFLAGS=""
12597 LIBOTF_LIBS=""
12598 ## If we have a custom action on failure, don't print errors, but
12599 ## do set a variable so people can do so. Do it in a subshell
12600 ## to capture any diagnostics in invoking pkg-config.
12601 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
12602
12603 fi
12604
12605
12606
12607 else
12608 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12609 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12610 fi
12611 fi
12612
12613 if test $succeeded = yes; then
12614 HAVE_LIBOTF=yes
12615 else
12616 HAVE_LIBOTF=no
12617 fi
12618
12619 if test "$HAVE_LIBOTF" = "yes"; then
12620
12621 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12622
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12624 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12625 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
12626 $as_echo_n "(cached) " >&6
12627 else
12628 ac_check_lib_save_LIBS=$LIBS
12629 LIBS="-lotf $LIBS"
12630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12631 /* end confdefs.h. */
12632
12633 /* Override any GCC internal prototype to avoid an error.
12634 Use char because int might match the return type of a GCC
12635 builtin and then its argument prototype would still apply. */
12636 #ifdef __cplusplus
12637 extern "C"
12638 #endif
12639 char OTF_get_variation_glyphs ();
12640 int
12641 main ()
12642 {
12643 return OTF_get_variation_glyphs ();
12644 ;
12645 return 0;
12646 }
12647 _ACEOF
12648 if ac_fn_c_try_link "$LINENO"; then :
12649 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12650 else
12651 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12652 fi
12653 rm -f core conftest.err conftest.$ac_objext \
12654 conftest$ac_exeext conftest.$ac_ext
12655 LIBS=$ac_check_lib_save_LIBS
12656 fi
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12658 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12659 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12660 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12661 else
12662 HAVE_OTF_GET_VARIATION_GLYPHS=no
12663 fi
12664
12665 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12666
12667 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12668
12669 fi
12670 fi
12671 fi
12672 fi
12673
12674 HAVE_M17N_FLT=no
12675 if test "${HAVE_LIBOTF}" = yes; then
12676 if test "${with_m17n_flt}" != "no"; then
12677
12678 succeeded=no
12679
12680 if test "$PKG_CONFIG" = "no" ; then
12681 HAVE_M17N_FLT=no
12682 else
12683 PKG_CONFIG_MIN_VERSION=0.9.0
12684 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12686 $as_echo_n "checking for m17n-flt... " >&6; }
12687
12688 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12689 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12690 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
12691 edit_cflags="
12692 s,///*,/,g
12693 s/^/ /
12694 s/ -I/ $isystem/g
12695 s/^ //
12696 "
12697 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12698 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12700 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12701 succeeded=yes
12702 else
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12704 $as_echo "no" >&6; }
12705 M17N_FLT_CFLAGS=""
12706 M17N_FLT_LIBS=""
12707 ## If we have a custom action on failure, don't print errors, but
12708 ## do set a variable so people can do so. Do it in a subshell
12709 ## to capture any diagnostics in invoking pkg-config.
12710 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
12711
12712 fi
12713
12714
12715
12716 else
12717 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12718 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12719 fi
12720 fi
12721
12722 if test $succeeded = yes; then
12723 HAVE_M17N_FLT=yes
12724 else
12725 HAVE_M17N_FLT=no
12726 fi
12727
12728 if test "$HAVE_M17N_FLT" = "yes"; then
12729
12730 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12731
12732 fi
12733 fi
12734 fi
12735 else
12736 HAVE_XFT=no
12737 HAVE_FREETYPE=no
12738 HAVE_LIBOTF=no
12739 HAVE_M17N_FLT=no
12740 fi
12741
12742 ### End of font-backend (under X11) section.
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753 ### Use -lXpm if available, unless `--with-xpm=no'.
12754 HAVE_XPM=no
12755 LIBXPM=
12756
12757 if test "${HAVE_W32}" = "yes"; then
12758 if test "${with_xpm}" != "no"; then
12759 SAVE_CPPFLAGS="$CPPFLAGS"
12760 SAVE_LDFLAGS="$LDFLAGS"
12761 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12762 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12763 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12764 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12766 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12767 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12768 $as_echo_n "(cached) " >&6
12769 else
12770 ac_check_lib_save_LIBS=$LIBS
12771 LIBS="-lXpm $LIBS"
12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773 /* end confdefs.h. */
12774
12775 /* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
12778 #ifdef __cplusplus
12779 extern "C"
12780 #endif
12781 char XpmReadFileToImage ();
12782 int
12783 main ()
12784 {
12785 return XpmReadFileToImage ();
12786 ;
12787 return 0;
12788 }
12789 _ACEOF
12790 if ac_fn_c_try_link "$LINENO"; then :
12791 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12792 else
12793 ac_cv_lib_Xpm_XpmReadFileToImage=no
12794 fi
12795 rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
12797 LIBS=$ac_check_lib_save_LIBS
12798 fi
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12800 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12801 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12802 HAVE_XPM=yes
12803 fi
12804
12805 fi
12806
12807
12808 if test "${HAVE_XPM}" = "yes"; then
12809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12810 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12812 /* end confdefs.h. */
12813 #include "X11/xpm.h"
12814 #ifndef XpmReturnAllocPixels
12815 no_return_alloc_pixels
12816 #endif
12817
12818 _ACEOF
12819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12820 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12821 HAVE_XPM=no
12822 else
12823 HAVE_XPM=yes
12824 fi
12825 rm -f conftest*
12826
12827
12828 if test "${HAVE_XPM}" = "yes"; then
12829 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12831 $as_echo "yes" >&6; }
12832 else
12833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834 $as_echo "no" >&6; }
12835 CPPFLAGS="$SAVE_CPPFLAGS"
12836 LDFLAGS="$SAVE_LDFLAGS"
12837 fi
12838 fi
12839 fi
12840
12841 if test "${HAVE_XPM}" = "yes"; then
12842
12843 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12844
12845 LIBXPM=-lXpm
12846 fi
12847 fi
12848
12849 if test "${HAVE_X11}" = "yes"; then
12850 if test "${with_xpm}" != "no"; then
12851 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12852 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12854 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12855 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
12856 $as_echo_n "(cached) " >&6
12857 else
12858 ac_check_lib_save_LIBS=$LIBS
12859 LIBS="-lXpm -lX11 $LIBS"
12860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861 /* end confdefs.h. */
12862
12863 /* Override any GCC internal prototype to avoid an error.
12864 Use char because int might match the return type of a GCC
12865 builtin and then its argument prototype would still apply. */
12866 #ifdef __cplusplus
12867 extern "C"
12868 #endif
12869 char XpmReadFileToPixmap ();
12870 int
12871 main ()
12872 {
12873 return XpmReadFileToPixmap ();
12874 ;
12875 return 0;
12876 }
12877 _ACEOF
12878 if ac_fn_c_try_link "$LINENO"; then :
12879 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
12880 else
12881 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
12882 fi
12883 rm -f core conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext conftest.$ac_ext
12885 LIBS=$ac_check_lib_save_LIBS
12886 fi
12887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12888 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12889 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12890 HAVE_XPM=yes
12891 fi
12892
12893 fi
12894
12895
12896 if test "${HAVE_XPM}" = "yes"; then
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12898 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12900 /* end confdefs.h. */
12901 #include "X11/xpm.h"
12902 #ifndef XpmReturnAllocPixels
12903 no_return_alloc_pixels
12904 #endif
12905
12906 _ACEOF
12907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12908 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12909 HAVE_XPM=no
12910 else
12911 HAVE_XPM=yes
12912 fi
12913 rm -f conftest*
12914
12915
12916 if test "${HAVE_XPM}" = "yes"; then
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12918 $as_echo "yes" >&6; }
12919 else
12920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12921 $as_echo "no" >&6; }
12922 fi
12923 fi
12924 fi
12925
12926 if test "${HAVE_XPM}" = "yes"; then
12927
12928 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12929
12930 LIBXPM=-lXpm
12931 fi
12932 fi
12933
12934
12935
12936 ### Use -ljpeg if available, unless `--with-jpeg=no'.
12937 HAVE_JPEG=no
12938 LIBJPEG=
12939 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12940 if test "${with_jpeg}" != "no"; then
12941 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12942 if test "x$ac_cv_header_jerror_h" = x""yes; then :
12943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12944 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12945 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
12946 $as_echo_n "(cached) " >&6
12947 else
12948 ac_check_lib_save_LIBS=$LIBS
12949 LIBS="-ljpeg $LIBS"
12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12951 /* end confdefs.h. */
12952
12953 /* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
12956 #ifdef __cplusplus
12957 extern "C"
12958 #endif
12959 char jpeg_destroy_compress ();
12960 int
12961 main ()
12962 {
12963 return jpeg_destroy_compress ();
12964 ;
12965 return 0;
12966 }
12967 _ACEOF
12968 if ac_fn_c_try_link "$LINENO"; then :
12969 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
12970 else
12971 ac_cv_lib_jpeg_jpeg_destroy_compress=no
12972 fi
12973 rm -f core conftest.err conftest.$ac_objext \
12974 conftest$ac_exeext conftest.$ac_ext
12975 LIBS=$ac_check_lib_save_LIBS
12976 fi
12977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12978 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12979 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12980 HAVE_JPEG=yes
12981 fi
12982
12983 fi
12984
12985
12986 fi
12987
12988 if test "${HAVE_JPEG}" = "yes"; then
12989 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12990
12991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12992 /* end confdefs.h. */
12993 #include <jpeglib.h>
12994 version=JPEG_LIB_VERSION
12995
12996 _ACEOF
12997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12998 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12999 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13000
13001 else
13002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13003 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13004 HAVE_JPEG=no
13005 fi
13006 rm -f conftest*
13007
13008 fi
13009 if test "${HAVE_JPEG}" = "yes"; then
13010 LIBJPEG=-ljpeg
13011 fi
13012 fi
13013
13014
13015 ### Use -lpng if available, unless `--with-png=no'.
13016 HAVE_PNG=no
13017 LIBPNG=
13018 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13019 if test "${with_png}" != "no"; then
13020 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13021 # in /usr/include/libpng.
13022 for ac_header in png.h libpng/png.h
13023 do :
13024 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13025 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13026 eval as_val=\$$as_ac_Header
13027 if test "x$as_val" = x""yes; then :
13028 cat >>confdefs.h <<_ACEOF
13029 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13030 _ACEOF
13031 break
13032 fi
13033
13034 done
13035
13036 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13038 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13039 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13040 $as_echo_n "(cached) " >&6
13041 else
13042 ac_check_lib_save_LIBS=$LIBS
13043 LIBS="-lpng -lz -lm $LIBS"
13044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13045 /* end confdefs.h. */
13046
13047 /* Override any GCC internal prototype to avoid an error.
13048 Use char because int might match the return type of a GCC
13049 builtin and then its argument prototype would still apply. */
13050 #ifdef __cplusplus
13051 extern "C"
13052 #endif
13053 char png_get_channels ();
13054 int
13055 main ()
13056 {
13057 return png_get_channels ();
13058 ;
13059 return 0;
13060 }
13061 _ACEOF
13062 if ac_fn_c_try_link "$LINENO"; then :
13063 ac_cv_lib_png_png_get_channels=yes
13064 else
13065 ac_cv_lib_png_png_get_channels=no
13066 fi
13067 rm -f core conftest.err conftest.$ac_objext \
13068 conftest$ac_exeext conftest.$ac_ext
13069 LIBS=$ac_check_lib_save_LIBS
13070 fi
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13072 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13073 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13074 HAVE_PNG=yes
13075 fi
13076
13077 fi
13078 fi
13079
13080 if test "${HAVE_PNG}" = "yes"; then
13081
13082 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13083
13084 LIBPNG="-lpng -lz -lm"
13085
13086 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13087 # include <libpng/png.h>
13088 #else
13089 # include <png.h>
13090 #endif
13091
13092 "
13093 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13094
13095 else
13096
13097 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13098
13099 fi
13100
13101 fi
13102 fi
13103
13104
13105 ### Use -ltiff if available, unless `--with-tiff=no'.
13106 HAVE_TIFF=no
13107 LIBTIFF=
13108 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13109 if test "${with_tiff}" != "no"; then
13110 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13111 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13112 tifflibs="-lz -lm"
13113 # At least one tiff package requires the jpeg library.
13114 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13116 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13117 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13118 $as_echo_n "(cached) " >&6
13119 else
13120 ac_check_lib_save_LIBS=$LIBS
13121 LIBS="-ltiff $tifflibs $LIBS"
13122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123 /* end confdefs.h. */
13124
13125 /* Override any GCC internal prototype to avoid an error.
13126 Use char because int might match the return type of a GCC
13127 builtin and then its argument prototype would still apply. */
13128 #ifdef __cplusplus
13129 extern "C"
13130 #endif
13131 char TIFFGetVersion ();
13132 int
13133 main ()
13134 {
13135 return TIFFGetVersion ();
13136 ;
13137 return 0;
13138 }
13139 _ACEOF
13140 if ac_fn_c_try_link "$LINENO"; then :
13141 ac_cv_lib_tiff_TIFFGetVersion=yes
13142 else
13143 ac_cv_lib_tiff_TIFFGetVersion=no
13144 fi
13145 rm -f core conftest.err conftest.$ac_objext \
13146 conftest$ac_exeext conftest.$ac_ext
13147 LIBS=$ac_check_lib_save_LIBS
13148 fi
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13150 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13151 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13152 HAVE_TIFF=yes
13153 fi
13154
13155 fi
13156
13157
13158 fi
13159
13160 if test "${HAVE_TIFF}" = "yes"; then
13161
13162 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13163
13164 LIBTIFF=-ltiff
13165 fi
13166 fi
13167
13168
13169 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13170 HAVE_GIF=no
13171 LIBGIF=
13172 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13173 || test "${HAVE_W32}" = "yes"; then
13174 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13175 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13176 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13177 # Earlier versions can crash Emacs.
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13179 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13180 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13181 $as_echo_n "(cached) " >&6
13182 else
13183 ac_check_lib_save_LIBS=$LIBS
13184 LIBS="-lgif $LIBS"
13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13186 /* end confdefs.h. */
13187
13188 /* Override any GCC internal prototype to avoid an error.
13189 Use char because int might match the return type of a GCC
13190 builtin and then its argument prototype would still apply. */
13191 #ifdef __cplusplus
13192 extern "C"
13193 #endif
13194 char EGifPutExtensionLast ();
13195 int
13196 main ()
13197 {
13198 return EGifPutExtensionLast ();
13199 ;
13200 return 0;
13201 }
13202 _ACEOF
13203 if ac_fn_c_try_link "$LINENO"; then :
13204 ac_cv_lib_gif_EGifPutExtensionLast=yes
13205 else
13206 ac_cv_lib_gif_EGifPutExtensionLast=no
13207 fi
13208 rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext conftest.$ac_ext
13210 LIBS=$ac_check_lib_save_LIBS
13211 fi
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13213 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13214 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13215 HAVE_GIF=yes
13216 else
13217 HAVE_GIF=maybe
13218 fi
13219
13220 fi
13221
13222
13223
13224 if test "$HAVE_GIF" = yes; then
13225 LIBGIF=-lgif
13226 elif test "$HAVE_GIF" = maybe; then
13227 # If gif_lib.h but no libgif, try libungif.
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13229 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13230 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13231 $as_echo_n "(cached) " >&6
13232 else
13233 ac_check_lib_save_LIBS=$LIBS
13234 LIBS="-lungif $LIBS"
13235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13236 /* end confdefs.h. */
13237
13238 /* Override any GCC internal prototype to avoid an error.
13239 Use char because int might match the return type of a GCC
13240 builtin and then its argument prototype would still apply. */
13241 #ifdef __cplusplus
13242 extern "C"
13243 #endif
13244 char EGifPutExtensionLast ();
13245 int
13246 main ()
13247 {
13248 return EGifPutExtensionLast ();
13249 ;
13250 return 0;
13251 }
13252 _ACEOF
13253 if ac_fn_c_try_link "$LINENO"; then :
13254 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13255 else
13256 ac_cv_lib_ungif_EGifPutExtensionLast=no
13257 fi
13258 rm -f core conftest.err conftest.$ac_objext \
13259 conftest$ac_exeext conftest.$ac_ext
13260 LIBS=$ac_check_lib_save_LIBS
13261 fi
13262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13263 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13264 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13265 HAVE_GIF=yes
13266 else
13267 HAVE_GIF=no
13268 fi
13269
13270 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13271 fi
13272
13273 if test "${HAVE_GIF}" = "yes"; then
13274
13275 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13276
13277 fi
13278 fi
13279
13280
13281 if test "${HAVE_X11}" = "yes"; then
13282 MISSING=""
13283 WITH_NO=""
13284 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13285 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13286 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13287 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13288 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13289 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13290 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13291 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13292 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13293 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13294
13295 if test "X${MISSING}" != X; then
13296 as_fn_error "The following required libraries were not found:
13297 $MISSING
13298 Maybe some development libraries/packages are missing?
13299 If you don't want to link with them give
13300 $WITH_NO
13301 as options to configure" "$LINENO" 5
13302 fi
13303 fi
13304
13305 ### Use -lgpm if available, unless `--with-gpm=no'.
13306 HAVE_GPM=no
13307 LIBGPM=
13308 if test "${with_gpm}" != "no"; then
13309 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13310 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13312 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13313 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13314 $as_echo_n "(cached) " >&6
13315 else
13316 ac_check_lib_save_LIBS=$LIBS
13317 LIBS="-lgpm $LIBS"
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13320
13321 /* Override any GCC internal prototype to avoid an error.
13322 Use char because int might match the return type of a GCC
13323 builtin and then its argument prototype would still apply. */
13324 #ifdef __cplusplus
13325 extern "C"
13326 #endif
13327 char Gpm_Open ();
13328 int
13329 main ()
13330 {
13331 return Gpm_Open ();
13332 ;
13333 return 0;
13334 }
13335 _ACEOF
13336 if ac_fn_c_try_link "$LINENO"; then :
13337 ac_cv_lib_gpm_Gpm_Open=yes
13338 else
13339 ac_cv_lib_gpm_Gpm_Open=no
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
13343 LIBS=$ac_check_lib_save_LIBS
13344 fi
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13346 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13347 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13348 HAVE_GPM=yes
13349 fi
13350
13351 fi
13352
13353
13354
13355 if test "${HAVE_GPM}" = "yes"; then
13356
13357 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13358
13359 LIBGPM=-lgpm
13360 fi
13361 fi
13362
13363
13364
13365
13366
13367
13368 GNUSTEP_CFLAGS=
13369 ### Use NeXTstep API to implement GUI.
13370 if test "${HAVE_NS}" = "yes"; then
13371
13372 $as_echo "#define HAVE_NS 1" >>confdefs.h
13373
13374 if test "${NS_IMPL_COCOA}" = "yes"; then
13375
13376 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13377
13378 fi
13379 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13380
13381 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13382
13383 # See also .m.o rule in Makefile.in */
13384 # FIXME: are all these flags really needed? Document here why. */
13385 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13386 ## Extra CFLAGS applied to src/*.m files.
13387 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"
13388 fi
13389 # We also have mouse menus.
13390 HAVE_MENUS=yes
13391 OTHER_FILES=ns-app
13392 fi
13393
13394 if test "${HAVE_W32}" = "yes"; then
13395 HAVE_MENUS=yes
13396 fi
13397
13398 ### Use session management (-lSM -lICE) if available
13399 HAVE_X_SM=no
13400 LIBXSM=
13401 if test "${HAVE_X11}" = "yes"; then
13402 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13403 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13405 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13406 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13407 $as_echo_n "(cached) " >&6
13408 else
13409 ac_check_lib_save_LIBS=$LIBS
13410 LIBS="-lSM -lICE $LIBS"
13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13412 /* end confdefs.h. */
13413
13414 /* Override any GCC internal prototype to avoid an error.
13415 Use char because int might match the return type of a GCC
13416 builtin and then its argument prototype would still apply. */
13417 #ifdef __cplusplus
13418 extern "C"
13419 #endif
13420 char SmcOpenConnection ();
13421 int
13422 main ()
13423 {
13424 return SmcOpenConnection ();
13425 ;
13426 return 0;
13427 }
13428 _ACEOF
13429 if ac_fn_c_try_link "$LINENO"; then :
13430 ac_cv_lib_SM_SmcOpenConnection=yes
13431 else
13432 ac_cv_lib_SM_SmcOpenConnection=no
13433 fi
13434 rm -f core conftest.err conftest.$ac_objext \
13435 conftest$ac_exeext conftest.$ac_ext
13436 LIBS=$ac_check_lib_save_LIBS
13437 fi
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13439 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13440 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13441 HAVE_X_SM=yes
13442 fi
13443
13444 fi
13445
13446
13447
13448 if test "${HAVE_X_SM}" = "yes"; then
13449
13450 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13451
13452 LIBXSM="-lSM -lICE"
13453 case "$LIBS" in
13454 *-lSM*) ;;
13455 *) LIBS="$LIBXSM $LIBS" ;;
13456 esac
13457 fi
13458 fi
13459
13460
13461 ### Use XRandr (-lXrandr) if available
13462 HAVE_XRANDR=no
13463 if test "${HAVE_X11}" = "yes"; then
13464 XRANDR_REQUIRED=1.2.2
13465 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
13466
13467 succeeded=no
13468
13469 if test "$PKG_CONFIG" = "no" ; then
13470 HAVE_XRANDR=no
13471 else
13472 PKG_CONFIG_MIN_VERSION=0.9.0
13473 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
13475 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
13476
13477 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
13478 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
13479 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
13480 edit_cflags="
13481 s,///*,/,g
13482 s/^/ /
13483 s/ -I/ $isystem/g
13484 s/^ //
13485 "
13486 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
13487 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
13489 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
13490 succeeded=yes
13491 else
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493 $as_echo "no" >&6; }
13494 XRANDR_CFLAGS=""
13495 XRANDR_LIBS=""
13496 ## If we have a custom action on failure, don't print errors, but
13497 ## do set a variable so people can do so. Do it in a subshell
13498 ## to capture any diagnostics in invoking pkg-config.
13499 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
13500
13501 fi
13502
13503
13504
13505 else
13506 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13507 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13508 fi
13509 fi
13510
13511 if test $succeeded = yes; then
13512 HAVE_XRANDR=yes
13513 else
13514 HAVE_XRANDR=no
13515 fi
13516
13517 if test $HAVE_XRANDR = no; then
13518 # Test old way in case pkg-config doesn't have it (older machines).
13519 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
13520 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
13521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRQueryExtension in -lXrandr" >&5
13522 $as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; }
13523 if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then :
13524 $as_echo_n "(cached) " >&6
13525 else
13526 ac_check_lib_save_LIBS=$LIBS
13527 LIBS="-lXrandr $LIBS"
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529 /* end confdefs.h. */
13530
13531 /* Override any GCC internal prototype to avoid an error.
13532 Use char because int might match the return type of a GCC
13533 builtin and then its argument prototype would still apply. */
13534 #ifdef __cplusplus
13535 extern "C"
13536 #endif
13537 char XRRQueryExtension ();
13538 int
13539 main ()
13540 {
13541 return XRRQueryExtension ();
13542 ;
13543 return 0;
13544 }
13545 _ACEOF
13546 if ac_fn_c_try_link "$LINENO"; then :
13547 ac_cv_lib_Xrandr_XRRQueryExtension=yes
13548 else
13549 ac_cv_lib_Xrandr_XRRQueryExtension=no
13550 fi
13551 rm -f core conftest.err conftest.$ac_objext \
13552 conftest$ac_exeext conftest.$ac_ext
13553 LIBS=$ac_check_lib_save_LIBS
13554 fi
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5
13556 $as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; }
13557 if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then :
13558 HAVE_XRANDR=yes
13559 fi
13560
13561 fi
13562
13563
13564 if test $HAVE_XRANDR = yes; then
13565 XRANDR_LIBS=-lXrandr
13566
13567 fi
13568 fi
13569 if test $HAVE_XRANDR = yes; then
13570 SAVE_CFLAGS="$CFLAGS"
13571 SAVE_LIBS="$LIBS"
13572 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
13573 LIBS="$XRANDR_LIBS $LIBS"
13574 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
13575 do :
13576 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13577 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13578 eval as_val=\$$as_ac_var
13579 if test "x$as_val" = x""yes; then :
13580 cat >>confdefs.h <<_ACEOF
13581 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13582 _ACEOF
13583
13584 fi
13585 done
13586
13587 CFLAGS="$SAVE_CFLAGS"
13588 LIBS="$SAVE_LIBS"
13589
13590
13591 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
13592
13593 fi
13594 fi
13595
13596 ### Use Xinerama (-lXinerama) if available
13597 HAVE_XINERAMA=no
13598 if test "${HAVE_X11}" = "yes"; then
13599 XINERAMA_REQUIRED=1.0.2
13600 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
13601
13602 succeeded=no
13603
13604 if test "$PKG_CONFIG" = "no" ; then
13605 HAVE_XINERAMA=no
13606 else
13607 PKG_CONFIG_MIN_VERSION=0.9.0
13608 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
13610 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
13611
13612 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
13613 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
13614 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
13615 edit_cflags="
13616 s,///*,/,g
13617 s/^/ /
13618 s/ -I/ $isystem/g
13619 s/^ //
13620 "
13621 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
13622 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
13624 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
13625 succeeded=yes
13626 else
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13628 $as_echo "no" >&6; }
13629 XINERAMA_CFLAGS=""
13630 XINERAMA_LIBS=""
13631 ## If we have a custom action on failure, don't print errors, but
13632 ## do set a variable so people can do so. Do it in a subshell
13633 ## to capture any diagnostics in invoking pkg-config.
13634 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
13635
13636 fi
13637
13638
13639
13640 else
13641 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13642 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13643 fi
13644 fi
13645
13646 if test $succeeded = yes; then
13647 HAVE_XINERAMA=yes
13648 else
13649 HAVE_XINERAMA=no
13650 fi
13651
13652 if test $HAVE_XINERAMA = no; then
13653 # Test old way in case pkg-config doesn't have it (older machines).
13654 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
13655 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
13657 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
13658 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
13659 $as_echo_n "(cached) " >&6
13660 else
13661 ac_check_lib_save_LIBS=$LIBS
13662 LIBS="-lXinerama $LIBS"
13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13664 /* end confdefs.h. */
13665
13666 /* Override any GCC internal prototype to avoid an error.
13667 Use char because int might match the return type of a GCC
13668 builtin and then its argument prototype would still apply. */
13669 #ifdef __cplusplus
13670 extern "C"
13671 #endif
13672 char XineramaQueryExtension ();
13673 int
13674 main ()
13675 {
13676 return XineramaQueryExtension ();
13677 ;
13678 return 0;
13679 }
13680 _ACEOF
13681 if ac_fn_c_try_link "$LINENO"; then :
13682 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
13683 else
13684 ac_cv_lib_Xinerama_XineramaQueryExtension=no
13685 fi
13686 rm -f core conftest.err conftest.$ac_objext \
13687 conftest$ac_exeext conftest.$ac_ext
13688 LIBS=$ac_check_lib_save_LIBS
13689 fi
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
13691 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
13692 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
13693 HAVE_XINERAMA=yes
13694 fi
13695
13696 fi
13697
13698
13699 if test $HAVE_XINERAMA = yes; then
13700 XINERAMA_LIBS=-lXinerama
13701
13702 fi
13703 fi
13704 if test $HAVE_XINERAMA = yes; then
13705
13706 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
13707
13708 fi
13709 fi
13710
13711
13712 ### Use libxml (-lxml2) if available
13713 HAVE_LIBXML2=no
13714 if test "${with_xml2}" != "no"; then
13715 ### I'm not sure what the version number should be, so I just guessed.
13716
13717 succeeded=no
13718
13719 if test "$PKG_CONFIG" = "no" ; then
13720 HAVE_LIBXML2=no
13721 else
13722 PKG_CONFIG_MIN_VERSION=0.9.0
13723 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13725 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
13726
13727 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13728 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13729 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
13730 edit_cflags="
13731 s,///*,/,g
13732 s/^/ /
13733 s/ -I/ $isystem/g
13734 s/^ //
13735 "
13736 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13737 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13739 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13740 succeeded=yes
13741 else
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13743 $as_echo "no" >&6; }
13744 LIBXML2_CFLAGS=""
13745 LIBXML2_LIBS=""
13746 ## If we have a custom action on failure, don't print errors, but
13747 ## do set a variable so people can do so. Do it in a subshell
13748 ## to capture any diagnostics in invoking pkg-config.
13749 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
13750
13751 fi
13752
13753
13754
13755 else
13756 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13757 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13758 fi
13759 fi
13760
13761 if test $succeeded = yes; then
13762 HAVE_LIBXML2=yes
13763 else
13764 HAVE_LIBXML2=no
13765 fi
13766
13767 if test "${HAVE_LIBXML2}" = "yes"; then
13768 LIBS="$LIBXML2_LIBS $LIBS"
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13770 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13771 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
13772 $as_echo_n "(cached) " >&6
13773 else
13774 ac_check_lib_save_LIBS=$LIBS
13775 LIBS="-lxml2 $LIBS"
13776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777 /* end confdefs.h. */
13778
13779 /* Override any GCC internal prototype to avoid an error.
13780 Use char because int might match the return type of a GCC
13781 builtin and then its argument prototype would still apply. */
13782 #ifdef __cplusplus
13783 extern "C"
13784 #endif
13785 char htmlReadMemory ();
13786 int
13787 main ()
13788 {
13789 return htmlReadMemory ();
13790 ;
13791 return 0;
13792 }
13793 _ACEOF
13794 if ac_fn_c_try_link "$LINENO"; then :
13795 ac_cv_lib_xml2_htmlReadMemory=yes
13796 else
13797 ac_cv_lib_xml2_htmlReadMemory=no
13798 fi
13799 rm -f core conftest.err conftest.$ac_objext \
13800 conftest$ac_exeext conftest.$ac_ext
13801 LIBS=$ac_check_lib_save_LIBS
13802 fi
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13804 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13805 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13806 HAVE_LIBXML2=yes
13807 else
13808 HAVE_LIBXML2=no
13809 fi
13810
13811 if test "${HAVE_LIBXML2}" = "yes"; then
13812
13813 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
13814
13815 else
13816 LIBXML2_LIBS=""
13817 LIBXML2_CFLAGS=""
13818 fi
13819 fi
13820 fi
13821
13822
13823
13824 # If netdb.h doesn't declare h_errno, we must declare it by hand.
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13826 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
13827 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13828 $as_echo_n "(cached) " >&6
13829 else
13830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13831 /* end confdefs.h. */
13832 #include <netdb.h>
13833 int
13834 main ()
13835 {
13836 return h_errno;
13837 ;
13838 return 0;
13839 }
13840 _ACEOF
13841 if ac_fn_c_try_link "$LINENO"; then :
13842 emacs_cv_netdb_declares_h_errno=yes
13843 else
13844 emacs_cv_netdb_declares_h_errno=no
13845 fi
13846 rm -f core conftest.err conftest.$ac_objext \
13847 conftest$ac_exeext conftest.$ac_ext
13848 fi
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13850 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13851 if test $emacs_cv_netdb_declares_h_errno = yes; then
13852
13853 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
13854
13855 fi
13856
13857 # sqrt and other floating-point functions such as fmod and frexp
13858 # are found in -lm on most systems.
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13860 $as_echo_n "checking for sqrt in -lm... " >&6; }
13861 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13862 $as_echo_n "(cached) " >&6
13863 else
13864 ac_check_lib_save_LIBS=$LIBS
13865 LIBS="-lm $LIBS"
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h. */
13868
13869 /* Override any GCC internal prototype to avoid an error.
13870 Use char because int might match the return type of a GCC
13871 builtin and then its argument prototype would still apply. */
13872 #ifdef __cplusplus
13873 extern "C"
13874 #endif
13875 char sqrt ();
13876 int
13877 main ()
13878 {
13879 return sqrt ();
13880 ;
13881 return 0;
13882 }
13883 _ACEOF
13884 if ac_fn_c_try_link "$LINENO"; then :
13885 ac_cv_lib_m_sqrt=yes
13886 else
13887 ac_cv_lib_m_sqrt=no
13888 fi
13889 rm -f core conftest.err conftest.$ac_objext \
13890 conftest$ac_exeext conftest.$ac_ext
13891 LIBS=$ac_check_lib_save_LIBS
13892 fi
13893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13894 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
13895 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13896 cat >>confdefs.h <<_ACEOF
13897 #define HAVE_LIBM 1
13898 _ACEOF
13899
13900 LIBS="-lm $LIBS"
13901
13902 fi
13903
13904
13905 # Check for mail-locking functions in a "mail" library. Probably this should
13906 # have the same check as for liblockfile below.
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13908 $as_echo_n "checking for maillock in -lmail... " >&6; }
13909 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
13910 $as_echo_n "(cached) " >&6
13911 else
13912 ac_check_lib_save_LIBS=$LIBS
13913 LIBS="-lmail $LIBS"
13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915 /* end confdefs.h. */
13916
13917 /* Override any GCC internal prototype to avoid an error.
13918 Use char because int might match the return type of a GCC
13919 builtin and then its argument prototype would still apply. */
13920 #ifdef __cplusplus
13921 extern "C"
13922 #endif
13923 char maillock ();
13924 int
13925 main ()
13926 {
13927 return maillock ();
13928 ;
13929 return 0;
13930 }
13931 _ACEOF
13932 if ac_fn_c_try_link "$LINENO"; then :
13933 ac_cv_lib_mail_maillock=yes
13934 else
13935 ac_cv_lib_mail_maillock=no
13936 fi
13937 rm -f core conftest.err conftest.$ac_objext \
13938 conftest$ac_exeext conftest.$ac_ext
13939 LIBS=$ac_check_lib_save_LIBS
13940 fi
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13942 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
13943 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13944 have_mail=yes
13945 else
13946 have_mail=no
13947 fi
13948
13949 if test $have_mail = yes; then
13950 LIBS_MAIL=-lmail
13951 LIBS="$LIBS_MAIL $LIBS"
13952
13953 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
13954
13955 else
13956 LIBS_MAIL=
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13959 $as_echo_n "checking for maillock in -llockfile... " >&6; }
13960 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
13961 $as_echo_n "(cached) " >&6
13962 else
13963 ac_check_lib_save_LIBS=$LIBS
13964 LIBS="-llockfile $LIBS"
13965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966 /* end confdefs.h. */
13967
13968 /* Override any GCC internal prototype to avoid an error.
13969 Use char because int might match the return type of a GCC
13970 builtin and then its argument prototype would still apply. */
13971 #ifdef __cplusplus
13972 extern "C"
13973 #endif
13974 char maillock ();
13975 int
13976 main ()
13977 {
13978 return maillock ();
13979 ;
13980 return 0;
13981 }
13982 _ACEOF
13983 if ac_fn_c_try_link "$LINENO"; then :
13984 ac_cv_lib_lockfile_maillock=yes
13985 else
13986 ac_cv_lib_lockfile_maillock=no
13987 fi
13988 rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
13990 LIBS=$ac_check_lib_save_LIBS
13991 fi
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13993 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13994 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13995 have_lockfile=yes
13996 else
13997 have_lockfile=no
13998 fi
13999
14000 if test $have_lockfile = yes; then
14001 LIBS_MAIL=-llockfile
14002 LIBS="$LIBS_MAIL $LIBS"
14003
14004 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
14005
14006 else
14007 # If we have the shared liblockfile, assume we must use it for mail
14008 # locking (e.g. Debian). If we couldn't link against liblockfile
14009 # (no liblockfile.a installed), ensure that we don't need to.
14010 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14011 set dummy liblockfile.so; ac_word=$2
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14013 $as_echo_n "checking for $ac_word... " >&6; }
14014 if test "${ac_cv_prog_liblockfile+set}" = set; then :
14015 $as_echo_n "(cached) " >&6
14016 else
14017 if test -n "$liblockfile"; then
14018 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14019 else
14020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14021 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14022 for as_dir in $as_dummy
14023 do
14024 IFS=$as_save_IFS
14025 test -z "$as_dir" && as_dir=.
14026 for ac_exec_ext in '' $ac_executable_extensions; do
14027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14028 ac_cv_prog_liblockfile="yes"
14029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14030 break 2
14031 fi
14032 done
14033 done
14034 IFS=$as_save_IFS
14035
14036 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14037 fi
14038 fi
14039 liblockfile=$ac_cv_prog_liblockfile
14040 if test -n "$liblockfile"; then
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14042 $as_echo "$liblockfile" >&6; }
14043 else
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14045 $as_echo "no" >&6; }
14046 fi
14047
14048
14049 if test $ac_cv_prog_liblockfile = yes; then
14050 as_fn_error "Shared liblockfile found but can't link against it.
14051 This probably means that movemail could lose mail.
14052 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14053 fi
14054 fi
14055
14056
14057
14058
14059
14060 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14061 ## interlock access to the mail spool. The alternative is a lock file named
14062 ## /usr/spool/mail/$USER.lock.
14063 mail_lock=no
14064 case "$opsys" in
14065 aix4-2) mail_lock="lockf" ;;
14066
14067 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14068
14069 ## On GNU/Linux systems, both methods are used by various mail programs.
14070 ## I assume most people are using newer mailers that have heard of flock.
14071 ## Change this if you need to.
14072 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14073 ## configure gets the right answers, and that means *NOT* using flock.
14074 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14075 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14076 ## Debian maintainer hasn't provided a clean fix for Emacs.
14077 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14078 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14079 ## correct logic. -- fx
14080 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14081 ## liblockfile is a Free Software replacement for libmail, used on
14082 ## Debian systems and elsewhere. -rfr.
14083 gnu-*)
14084 mail_lock="flock"
14085 if test $have_mail = yes || test $have_lockfile = yes; then
14086 test $ac_cv_header_maillock_h = yes && mail_lock=no
14087 fi
14088 ;;
14089 esac
14090
14091 BLESSMAIL_TARGET=
14092 case "$mail_lock" in
14093 flock)
14094 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14095 ;;
14096
14097 lockf)
14098 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14099 ;;
14100
14101 *) BLESSMAIL_TARGET="need-blessmail" ;;
14102 esac
14103
14104
14105
14106 for ac_func in gethostname \
14107 getrusage get_current_dir_name \
14108 lrand48 \
14109 select getpagesize setlocale \
14110 utimes getrlimit setrlimit shutdown getaddrinfo \
14111 strsignal setitimer \
14112 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
14113 gai_strerror mkstemp getline getdelim sync \
14114 difftime posix_memalign \
14115 getpwent endpwent getgrent endgrent \
14116 touchlock \
14117 cfmakeraw cfsetspeed copysign __executable_start
14118 do :
14119 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14120 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14121 eval as_val=\$$as_ac_var
14122 if test "x$as_val" = x""yes; then :
14123 cat >>confdefs.h <<_ACEOF
14124 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14125 _ACEOF
14126
14127 fi
14128 done
14129
14130
14131 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14132 ## has a broken `rint' in some library versions including math library
14133 ## version number A.09.05.
14134 ## You can fix the math library by installing patch number PHSS_4630.
14135 ## But we can fix it more reliably for Emacs by just not using rint.
14136 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
14137 case $opsys in
14138 hpux*) : ;;
14139 *) for ac_func in random rint
14140 do :
14141 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14142 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14143 eval as_val=\$$as_ac_var
14144 if test "x$as_val" = x""yes; then :
14145 cat >>confdefs.h <<_ACEOF
14146 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14147 _ACEOF
14148
14149 fi
14150 done
14151 ;;
14152 esac
14153
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14155 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14156 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14157 $as_echo_n "(cached) " >&6
14158 else
14159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160 /* end confdefs.h. */
14161
14162 int
14163 main ()
14164 {
14165 __builtin_unwind_init ();
14166 ;
14167 return 0;
14168 }
14169 _ACEOF
14170 if ac_fn_c_try_link "$LINENO"; then :
14171 emacs_cv_func___builtin_unwind_init=yes
14172 else
14173 emacs_cv_func___builtin_unwind_init=no
14174 fi
14175 rm -f core conftest.err conftest.$ac_objext \
14176 conftest$ac_exeext conftest.$ac_ext
14177 fi
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14179 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14180 if test $emacs_cv_func___builtin_unwind_init = yes; then
14181
14182 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14183
14184 fi
14185
14186
14187
14188
14189
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14191 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14192 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14193 $as_echo_n "(cached) " >&6
14194 else
14195 while :; do
14196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14197 /* end confdefs.h. */
14198 #include <sys/types.h> /* for off_t */
14199 #include <stdio.h>
14200 int
14201 main ()
14202 {
14203 int (*fp) (FILE *, off_t, int) = fseeko;
14204 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14205 ;
14206 return 0;
14207 }
14208 _ACEOF
14209 if ac_fn_c_try_link "$LINENO"; then :
14210 ac_cv_sys_largefile_source=no; break
14211 fi
14212 rm -f core conftest.err conftest.$ac_objext \
14213 conftest$ac_exeext conftest.$ac_ext
14214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14215 /* end confdefs.h. */
14216 #define _LARGEFILE_SOURCE 1
14217 #include <sys/types.h> /* for off_t */
14218 #include <stdio.h>
14219 int
14220 main ()
14221 {
14222 int (*fp) (FILE *, off_t, int) = fseeko;
14223 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14224 ;
14225 return 0;
14226 }
14227 _ACEOF
14228 if ac_fn_c_try_link "$LINENO"; then :
14229 ac_cv_sys_largefile_source=1; break
14230 fi
14231 rm -f core conftest.err conftest.$ac_objext \
14232 conftest$ac_exeext conftest.$ac_ext
14233 ac_cv_sys_largefile_source=unknown
14234 break
14235 done
14236 fi
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14238 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14239 case $ac_cv_sys_largefile_source in #(
14240 no | unknown) ;;
14241 *)
14242 cat >>confdefs.h <<_ACEOF
14243 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14244 _ACEOF
14245 ;;
14246 esac
14247 rm -rf conftest*
14248
14249 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14250 # in glibc 2.1.3, but that breaks too many other things.
14251 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14252 if test $ac_cv_sys_largefile_source != unknown; then
14253
14254 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14255
14256 fi
14257
14258
14259 # UNIX98 PTYs.
14260 for ac_func in grantpt
14261 do :
14262 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14263 if test "x$ac_cv_func_grantpt" = x""yes; then :
14264 cat >>confdefs.h <<_ACEOF
14265 #define HAVE_GRANTPT 1
14266 _ACEOF
14267
14268 fi
14269 done
14270
14271
14272 # PTY-related GNU extensions.
14273 for ac_func in getpt posix_openpt
14274 do :
14275 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14276 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14277 eval as_val=\$$as_ac_var
14278 if test "x$as_val" = x""yes; then :
14279 cat >>confdefs.h <<_ACEOF
14280 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14281 _ACEOF
14282
14283 fi
14284 done
14285
14286
14287 # Check this now, so that we will NOT find the above functions in ncurses.
14288 # That is because we have not set up to link ncurses in lib-src.
14289 # It's better to believe a function is not available
14290 # than to expect to find it in ncurses.
14291 # Also we need tputs and friends to be able to build at all.
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14293 $as_echo_n "checking for library containing tputs... " >&6; }
14294 # Run a test program that contains a call to tputs, a call that is
14295 # never executed. This tests whether a pre-'main' dynamic linker
14296 # works with the library. It's too much trouble to actually call
14297 # tputs in the test program, due to portability hassles. When
14298 # cross-compiling, assume the test program will run if it links.
14299
14300 # Maybe curses should be tried earlier?
14301 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14302 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14303 OLIBS=$LIBS
14304 if test -z "$tputs_library"; then
14305 LIBS_TERMCAP=
14306 msg='none required'
14307 else
14308 LIBS_TERMCAP=-l$tputs_library
14309 msg=$LIBS_TERMCAP
14310 LIBS="$LIBS_TERMCAP $LIBS"
14311 fi
14312 if test "$cross_compiling" = yes; then :
14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14314 /* end confdefs.h. */
14315
14316 extern void tputs (const char *, int, int (*)(int));
14317 int main (int argc, char **argv)
14318 {
14319 if (argc == 10000)
14320 tputs (argv[0], 0, 0);
14321 return 0;
14322 }
14323
14324 _ACEOF
14325 if ac_fn_c_try_link "$LINENO"; then :
14326
14327 else
14328 msg=no
14329 fi
14330 rm -f core conftest.err conftest.$ac_objext \
14331 conftest$ac_exeext conftest.$ac_ext
14332 else
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 /* end confdefs.h. */
14335
14336 extern void tputs (const char *, int, int (*)(int));
14337 int main (int argc, char **argv)
14338 {
14339 if (argc == 10000)
14340 tputs (argv[0], 0, 0);
14341 return 0;
14342 }
14343
14344 _ACEOF
14345 if ac_fn_c_try_run "$LINENO"; then :
14346
14347 else
14348 msg=no
14349 fi
14350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14351 conftest.$ac_objext conftest.beam conftest.$ac_ext
14352 fi
14353
14354 LIBS=$OLIBS
14355 if test "X$msg" != Xno; then
14356 break
14357 fi
14358 done
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14360 $as_echo "$msg" >&6; }
14361 if test "X$msg" = Xno; then
14362 as_fn_error "The required function \`tputs' was not found in any library.
14363 The following libraries were tried (in order):
14364 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14365 Please try installing whichever of these libraries is most appropriate
14366 for your system, together with its header files.
14367 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
14368 fi
14369
14370 ## Use termcap instead of terminfo?
14371 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14372 TERMINFO=yes
14373 ## FIXME? In the cases below where we unconditionally set
14374 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14375 ## if that was found above to have tputs.
14376 ## Should we use the gnu* logic everywhere?
14377 case "$opsys" in
14378 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14379 ## The ncurses library has been moved out of the System framework in
14380 ## Mac OS X 10.2. So if configure detects it, set the command-line
14381 ## option to use it.
14382 darwin) LIBS_TERMCAP="-lncurses" ;;
14383
14384 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14385
14386 freebsd)
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14388 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14389 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14390 $as_echo_n "(cached) " >&6
14391 else
14392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14393 /* end confdefs.h. */
14394 #include <osreldate.h>
14395 int
14396 main ()
14397 {
14398 #if __FreeBSD_version < 400000
14399 fail;
14400 #endif
14401
14402 ;
14403 return 0;
14404 }
14405 _ACEOF
14406 if ac_fn_c_try_link "$LINENO"; then :
14407 emacs_cv_freebsd_terminfo=yes
14408 else
14409 emacs_cv_freebsd_terminfo=no
14410 fi
14411 rm -f core conftest.err conftest.$ac_objext \
14412 conftest$ac_exeext conftest.$ac_ext
14413 fi
14414
14415
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14417 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14418
14419 if test $emacs_cv_freebsd_terminfo = yes; then
14420 LIBS_TERMCAP="-lncurses"
14421 else
14422 TERMINFO=no
14423 LIBS_TERMCAP="-ltermcap"
14424 fi
14425 ;;
14426
14427 netbsd)
14428 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14429 TERMINFO=no
14430 LIBS_TERMCAP="-ltermcap"
14431 fi
14432 ;;
14433
14434 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
14435
14436 ## hpux: Make sure we get select from libc rather than from libcurses
14437 ## because libcurses on HPUX 10.10 has a broken version of select.
14438 ## We used to use -lc -lcurses, but this may be cleaner.
14439 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14440 # set that way, now it uses the default). Isn't this a contradiction?
14441 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14442
14443 esac
14444
14445 TERMCAP_OBJ=tparam.o
14446 if test $TERMINFO = yes; then
14447
14448 $as_echo "#define TERMINFO 1" >>confdefs.h
14449
14450 TERMCAP_OBJ=terminfo.o
14451 fi
14452
14453
14454
14455
14456 # Do we have res_init, for detecting changes in /etc/resolv.conf?
14457 # On Darwin, res_init appears not to be useful: see bug#562 and
14458 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14459 resolv=no
14460
14461 if test $opsys != darwin; then
14462
14463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14464 /* end confdefs.h. */
14465 #include <netinet/in.h>
14466 #include <arpa/nameser.h>
14467 #include <resolv.h>
14468 int
14469 main ()
14470 {
14471 return res_init();
14472 ;
14473 return 0;
14474 }
14475 _ACEOF
14476 if ac_fn_c_try_link "$LINENO"; then :
14477 have_res_init=yes
14478 else
14479 have_res_init=no
14480 fi
14481 rm -f core conftest.err conftest.$ac_objext \
14482 conftest$ac_exeext conftest.$ac_ext
14483 if test "$have_res_init" = no; then
14484 OLIBS="$LIBS"
14485 LIBS="$LIBS -lresolv"
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14487 $as_echo_n "checking for res_init with -lresolv... " >&6; }
14488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14489 /* end confdefs.h. */
14490 #include <netinet/in.h>
14491 #include <arpa/nameser.h>
14492 #include <resolv.h>
14493 int
14494 main ()
14495 {
14496 return res_init();
14497 ;
14498 return 0;
14499 }
14500 _ACEOF
14501 if ac_fn_c_try_link "$LINENO"; then :
14502 have_res_init=yes
14503 else
14504 have_res_init=no
14505 fi
14506 rm -f core conftest.err conftest.$ac_objext \
14507 conftest$ac_exeext conftest.$ac_ext
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14509 $as_echo "$have_res_init" >&6; }
14510 if test "$have_res_init" = yes ; then
14511 resolv=yes
14512 fi
14513 LIBS="$OLIBS"
14514 fi
14515
14516 if test "$have_res_init" = yes; then
14517
14518 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
14519
14520 fi
14521 fi
14522 # Do we need the Hesiod library to provide the support routines?
14523 LIBHESIOD=
14524 if test "$with_hesiod" != no ; then
14525 # Don't set $LIBS here -- see comments above. FIXME which comments?
14526 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14527 if test "x$ac_cv_func_res_send" = x""yes; then :
14528
14529 else
14530 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14531 if test "x$ac_cv_func___res_send" = x""yes; then :
14532
14533 else
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14535 $as_echo_n "checking for res_send in -lresolv... " >&6; }
14536 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
14537 $as_echo_n "(cached) " >&6
14538 else
14539 ac_check_lib_save_LIBS=$LIBS
14540 LIBS="-lresolv $LIBS"
14541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14542 /* end confdefs.h. */
14543
14544 /* Override any GCC internal prototype to avoid an error.
14545 Use char because int might match the return type of a GCC
14546 builtin and then its argument prototype would still apply. */
14547 #ifdef __cplusplus
14548 extern "C"
14549 #endif
14550 char res_send ();
14551 int
14552 main ()
14553 {
14554 return res_send ();
14555 ;
14556 return 0;
14557 }
14558 _ACEOF
14559 if ac_fn_c_try_link "$LINENO"; then :
14560 ac_cv_lib_resolv_res_send=yes
14561 else
14562 ac_cv_lib_resolv_res_send=no
14563 fi
14564 rm -f core conftest.err conftest.$ac_objext \
14565 conftest$ac_exeext conftest.$ac_ext
14566 LIBS=$ac_check_lib_save_LIBS
14567 fi
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14569 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14570 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14571 resolv=yes
14572 else
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14574 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
14575 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
14576 $as_echo_n "(cached) " >&6
14577 else
14578 ac_check_lib_save_LIBS=$LIBS
14579 LIBS="-lresolv $LIBS"
14580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14581 /* end confdefs.h. */
14582
14583 /* Override any GCC internal prototype to avoid an error.
14584 Use char because int might match the return type of a GCC
14585 builtin and then its argument prototype would still apply. */
14586 #ifdef __cplusplus
14587 extern "C"
14588 #endif
14589 char __res_send ();
14590 int
14591 main ()
14592 {
14593 return __res_send ();
14594 ;
14595 return 0;
14596 }
14597 _ACEOF
14598 if ac_fn_c_try_link "$LINENO"; then :
14599 ac_cv_lib_resolv___res_send=yes
14600 else
14601 ac_cv_lib_resolv___res_send=no
14602 fi
14603 rm -f core conftest.err conftest.$ac_objext \
14604 conftest$ac_exeext conftest.$ac_ext
14605 LIBS=$ac_check_lib_save_LIBS
14606 fi
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14608 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14609 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14610 resolv=yes
14611 fi
14612
14613 fi
14614
14615 fi
14616
14617 fi
14618
14619 if test "$resolv" = yes ; then
14620 RESOLVLIB=-lresolv
14621 else
14622 RESOLVLIB=
14623 fi
14624 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14625 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14626
14627 else
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14629 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14630 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14631 $as_echo_n "(cached) " >&6
14632 else
14633 ac_check_lib_save_LIBS=$LIBS
14634 LIBS="-lhesiod $RESOLVLIB $LIBS"
14635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14636 /* end confdefs.h. */
14637
14638 /* Override any GCC internal prototype to avoid an error.
14639 Use char because int might match the return type of a GCC
14640 builtin and then its argument prototype would still apply. */
14641 #ifdef __cplusplus
14642 extern "C"
14643 #endif
14644 char hes_getmailhost ();
14645 int
14646 main ()
14647 {
14648 return hes_getmailhost ();
14649 ;
14650 return 0;
14651 }
14652 _ACEOF
14653 if ac_fn_c_try_link "$LINENO"; then :
14654 ac_cv_lib_hesiod_hes_getmailhost=yes
14655 else
14656 ac_cv_lib_hesiod_hes_getmailhost=no
14657 fi
14658 rm -f core conftest.err conftest.$ac_objext \
14659 conftest$ac_exeext conftest.$ac_ext
14660 LIBS=$ac_check_lib_save_LIBS
14661 fi
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14663 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14664 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14665 hesiod=yes
14666 else
14667 :
14668 fi
14669
14670 fi
14671
14672
14673 if test x"$hesiod" = xyes; then
14674
14675 $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
14676
14677 LIBHESIOD=-lhesiod
14678 fi
14679 fi
14680
14681
14682 # Do we need libresolv (due to res_init or Hesiod)?
14683 if test "$resolv" = yes && test $opsys != darwin; then
14684
14685 $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
14686
14687 LIBRESOLV=-lresolv
14688 else
14689 LIBRESOLV=
14690 fi
14691
14692
14693 # These tell us which Kerberos-related libraries to use.
14694 COM_ERRLIB=
14695 CRYPTOLIB=
14696 KRB5LIB=
14697 DESLIB=
14698 KRB4LIB=
14699
14700 if test "${with_kerberos}" != no; then
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14702 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
14703 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14704 $as_echo_n "(cached) " >&6
14705 else
14706 ac_check_lib_save_LIBS=$LIBS
14707 LIBS="-lcom_err $LIBS"
14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h. */
14710
14711 /* Override any GCC internal prototype to avoid an error.
14712 Use char because int might match the return type of a GCC
14713 builtin and then its argument prototype would still apply. */
14714 #ifdef __cplusplus
14715 extern "C"
14716 #endif
14717 char com_err ();
14718 int
14719 main ()
14720 {
14721 return com_err ();
14722 ;
14723 return 0;
14724 }
14725 _ACEOF
14726 if ac_fn_c_try_link "$LINENO"; then :
14727 ac_cv_lib_com_err_com_err=yes
14728 else
14729 ac_cv_lib_com_err_com_err=no
14730 fi
14731 rm -f core conftest.err conftest.$ac_objext \
14732 conftest$ac_exeext conftest.$ac_ext
14733 LIBS=$ac_check_lib_save_LIBS
14734 fi
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14736 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14737 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14738 have_com_err=yes
14739 else
14740 have_com_err=no
14741 fi
14742
14743 if test $have_com_err = yes; then
14744 COM_ERRLIB=-lcom_err
14745 LIBS="$COM_ERRLIB $LIBS"
14746
14747 $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
14748
14749 fi
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14751 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14752 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14753 $as_echo_n "(cached) " >&6
14754 else
14755 ac_check_lib_save_LIBS=$LIBS
14756 LIBS="-lcrypto $LIBS"
14757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14758 /* end confdefs.h. */
14759
14760 /* Override any GCC internal prototype to avoid an error.
14761 Use char because int might match the return type of a GCC
14762 builtin and then its argument prototype would still apply. */
14763 #ifdef __cplusplus
14764 extern "C"
14765 #endif
14766 char mit_des_cbc_encrypt ();
14767 int
14768 main ()
14769 {
14770 return mit_des_cbc_encrypt ();
14771 ;
14772 return 0;
14773 }
14774 _ACEOF
14775 if ac_fn_c_try_link "$LINENO"; then :
14776 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14777 else
14778 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14779 fi
14780 rm -f core conftest.err conftest.$ac_objext \
14781 conftest$ac_exeext conftest.$ac_ext
14782 LIBS=$ac_check_lib_save_LIBS
14783 fi
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14785 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14786 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14787 have_crypto=yes
14788 else
14789 have_crypto=no
14790 fi
14791
14792 if test $have_crypto = yes; then
14793 CRYPTOLIB=-lcrypto
14794 LIBS="$CRYPTOLIB $LIBS"
14795
14796 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
14797
14798 fi
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14800 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14801 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14802 $as_echo_n "(cached) " >&6
14803 else
14804 ac_check_lib_save_LIBS=$LIBS
14805 LIBS="-lk5crypto $LIBS"
14806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807 /* end confdefs.h. */
14808
14809 /* Override any GCC internal prototype to avoid an error.
14810 Use char because int might match the return type of a GCC
14811 builtin and then its argument prototype would still apply. */
14812 #ifdef __cplusplus
14813 extern "C"
14814 #endif
14815 char mit_des_cbc_encrypt ();
14816 int
14817 main ()
14818 {
14819 return mit_des_cbc_encrypt ();
14820 ;
14821 return 0;
14822 }
14823 _ACEOF
14824 if ac_fn_c_try_link "$LINENO"; then :
14825 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14826 else
14827 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14828 fi
14829 rm -f core conftest.err conftest.$ac_objext \
14830 conftest$ac_exeext conftest.$ac_ext
14831 LIBS=$ac_check_lib_save_LIBS
14832 fi
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14834 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14835 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14836 have_k5crypto=yes
14837 else
14838 have_k5crypto=no
14839 fi
14840
14841 if test $have_k5crypto = yes; then
14842 CRYPTOLIB=-lk5crypto
14843 LIBS="$CRYPTOLIB $LIBS"
14844
14845 $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
14846
14847 fi
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14849 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14850 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14851 $as_echo_n "(cached) " >&6
14852 else
14853 ac_check_lib_save_LIBS=$LIBS
14854 LIBS="-lkrb5 $LIBS"
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h. */
14857
14858 /* Override any GCC internal prototype to avoid an error.
14859 Use char because int might match the return type of a GCC
14860 builtin and then its argument prototype would still apply. */
14861 #ifdef __cplusplus
14862 extern "C"
14863 #endif
14864 char krb5_init_context ();
14865 int
14866 main ()
14867 {
14868 return krb5_init_context ();
14869 ;
14870 return 0;
14871 }
14872 _ACEOF
14873 if ac_fn_c_try_link "$LINENO"; then :
14874 ac_cv_lib_krb5_krb5_init_context=yes
14875 else
14876 ac_cv_lib_krb5_krb5_init_context=no
14877 fi
14878 rm -f core conftest.err conftest.$ac_objext \
14879 conftest$ac_exeext conftest.$ac_ext
14880 LIBS=$ac_check_lib_save_LIBS
14881 fi
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14883 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14884 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14885 have_krb5=yes
14886 else
14887 have_krb5=no
14888 fi
14889
14890 if test $have_krb5=yes; then
14891 KRB5LIB=-lkrb5
14892 LIBS="$KRB5LIB $LIBS"
14893
14894 $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
14895
14896 fi
14897 if test "${with_kerberos5}" = no; then
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14899 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14900 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
14901 $as_echo_n "(cached) " >&6
14902 else
14903 ac_check_lib_save_LIBS=$LIBS
14904 LIBS="-ldes425 $LIBS"
14905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14906 /* end confdefs.h. */
14907
14908 /* Override any GCC internal prototype to avoid an error.
14909 Use char because int might match the return type of a GCC
14910 builtin and then its argument prototype would still apply. */
14911 #ifdef __cplusplus
14912 extern "C"
14913 #endif
14914 char des_cbc_encrypt ();
14915 int
14916 main ()
14917 {
14918 return des_cbc_encrypt ();
14919 ;
14920 return 0;
14921 }
14922 _ACEOF
14923 if ac_fn_c_try_link "$LINENO"; then :
14924 ac_cv_lib_des425_des_cbc_encrypt=yes
14925 else
14926 ac_cv_lib_des425_des_cbc_encrypt=no
14927 fi
14928 rm -f core conftest.err conftest.$ac_objext \
14929 conftest$ac_exeext conftest.$ac_ext
14930 LIBS=$ac_check_lib_save_LIBS
14931 fi
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14933 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14934 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14935 have_des425=yes
14936 else
14937 have_des425=no
14938 fi
14939
14940 if test $have_des425 = yes; then
14941 DESLIB=-ldes425
14942 LIBS="$DESLIB $LIBS"
14943
14944 $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
14945
14946 else
14947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14948 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14949 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14950 $as_echo_n "(cached) " >&6
14951 else
14952 ac_check_lib_save_LIBS=$LIBS
14953 LIBS="-ldes $LIBS"
14954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955 /* end confdefs.h. */
14956
14957 /* Override any GCC internal prototype to avoid an error.
14958 Use char because int might match the return type of a GCC
14959 builtin and then its argument prototype would still apply. */
14960 #ifdef __cplusplus
14961 extern "C"
14962 #endif
14963 char des_cbc_encrypt ();
14964 int
14965 main ()
14966 {
14967 return des_cbc_encrypt ();
14968 ;
14969 return 0;
14970 }
14971 _ACEOF
14972 if ac_fn_c_try_link "$LINENO"; then :
14973 ac_cv_lib_des_des_cbc_encrypt=yes
14974 else
14975 ac_cv_lib_des_des_cbc_encrypt=no
14976 fi
14977 rm -f core conftest.err conftest.$ac_objext \
14978 conftest$ac_exeext conftest.$ac_ext
14979 LIBS=$ac_check_lib_save_LIBS
14980 fi
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14982 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14983 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14984 have_des=yes
14985 else
14986 have_des=no
14987 fi
14988
14989 if test $have_des = yes; then
14990 DESLIB=-ldes
14991 LIBS="$DESLIB $LIBS"
14992
14993 $as_echo "#define HAVE_LIBDES 1" >>confdefs.h
14994
14995 fi
14996 fi
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14998 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14999 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
15000 $as_echo_n "(cached) " >&6
15001 else
15002 ac_check_lib_save_LIBS=$LIBS
15003 LIBS="-lkrb4 $LIBS"
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005 /* end confdefs.h. */
15006
15007 /* Override any GCC internal prototype to avoid an error.
15008 Use char because int might match the return type of a GCC
15009 builtin and then its argument prototype would still apply. */
15010 #ifdef __cplusplus
15011 extern "C"
15012 #endif
15013 char krb_get_cred ();
15014 int
15015 main ()
15016 {
15017 return krb_get_cred ();
15018 ;
15019 return 0;
15020 }
15021 _ACEOF
15022 if ac_fn_c_try_link "$LINENO"; then :
15023 ac_cv_lib_krb4_krb_get_cred=yes
15024 else
15025 ac_cv_lib_krb4_krb_get_cred=no
15026 fi
15027 rm -f core conftest.err conftest.$ac_objext \
15028 conftest$ac_exeext conftest.$ac_ext
15029 LIBS=$ac_check_lib_save_LIBS
15030 fi
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15032 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15033 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15034 have_krb4=yes
15035 else
15036 have_krb4=no
15037 fi
15038
15039 if test $have_krb4 = yes; then
15040 KRB4LIB=-lkrb4
15041 LIBS="$KRB4LIB $LIBS"
15042
15043 $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
15044
15045 else
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15047 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15048 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15049 $as_echo_n "(cached) " >&6
15050 else
15051 ac_check_lib_save_LIBS=$LIBS
15052 LIBS="-lkrb $LIBS"
15053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15054 /* end confdefs.h. */
15055
15056 /* Override any GCC internal prototype to avoid an error.
15057 Use char because int might match the return type of a GCC
15058 builtin and then its argument prototype would still apply. */
15059 #ifdef __cplusplus
15060 extern "C"
15061 #endif
15062 char krb_get_cred ();
15063 int
15064 main ()
15065 {
15066 return krb_get_cred ();
15067 ;
15068 return 0;
15069 }
15070 _ACEOF
15071 if ac_fn_c_try_link "$LINENO"; then :
15072 ac_cv_lib_krb_krb_get_cred=yes
15073 else
15074 ac_cv_lib_krb_krb_get_cred=no
15075 fi
15076 rm -f core conftest.err conftest.$ac_objext \
15077 conftest$ac_exeext conftest.$ac_ext
15078 LIBS=$ac_check_lib_save_LIBS
15079 fi
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15081 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15082 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15083 have_krb=yes
15084 else
15085 have_krb=no
15086 fi
15087
15088 if test $have_krb = yes; then
15089 KRB4LIB=-lkrb
15090 LIBS="$KRB4LIB $LIBS"
15091
15092 $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
15093
15094 fi
15095 fi
15096 fi
15097
15098 if test "${with_kerberos5}" != no; then
15099 for ac_header in krb5.h
15100 do :
15101 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15102 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15103 cat >>confdefs.h <<_ACEOF
15104 #define HAVE_KRB5_H 1
15105 _ACEOF
15106 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15107 "
15108 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15109
15110 cat >>confdefs.h <<_ACEOF
15111 #define HAVE_KRB5_ERROR_TEXT 1
15112 _ACEOF
15113
15114
15115 fi
15116 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15117 "
15118 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15119
15120 cat >>confdefs.h <<_ACEOF
15121 #define HAVE_KRB5_ERROR_E_TEXT 1
15122 _ACEOF
15123
15124
15125 fi
15126
15127 fi
15128
15129 done
15130
15131 else
15132 for ac_header in des.h
15133 do :
15134 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
15135 if test "x$ac_cv_header_des_h" = x""yes; then :
15136 cat >>confdefs.h <<_ACEOF
15137 #define HAVE_DES_H 1
15138 _ACEOF
15139
15140 else
15141 for ac_header in kerberosIV/des.h
15142 do :
15143 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
15144 if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
15145 cat >>confdefs.h <<_ACEOF
15146 #define HAVE_KERBEROSIV_DES_H 1
15147 _ACEOF
15148
15149 else
15150 for ac_header in kerberos/des.h
15151 do :
15152 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
15153 if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
15154 cat >>confdefs.h <<_ACEOF
15155 #define HAVE_KERBEROS_DES_H 1
15156 _ACEOF
15157
15158 fi
15159
15160 done
15161
15162 fi
15163
15164 done
15165
15166 fi
15167
15168 done
15169
15170 for ac_header in krb.h
15171 do :
15172 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15173 if test "x$ac_cv_header_krb_h" = x""yes; then :
15174 cat >>confdefs.h <<_ACEOF
15175 #define HAVE_KRB_H 1
15176 _ACEOF
15177
15178 else
15179 for ac_header in kerberosIV/krb.h
15180 do :
15181 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15182 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15183 cat >>confdefs.h <<_ACEOF
15184 #define HAVE_KERBEROSIV_KRB_H 1
15185 _ACEOF
15186
15187 else
15188 for ac_header in kerberos/krb.h
15189 do :
15190 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15191 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15192 cat >>confdefs.h <<_ACEOF
15193 #define HAVE_KERBEROS_KRB_H 1
15194 _ACEOF
15195
15196 fi
15197
15198 done
15199
15200 fi
15201
15202 done
15203
15204 fi
15205
15206 done
15207
15208 fi
15209 for ac_header in com_err.h
15210 do :
15211 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15212 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15213 cat >>confdefs.h <<_ACEOF
15214 #define HAVE_COM_ERR_H 1
15215 _ACEOF
15216
15217 fi
15218
15219 done
15220
15221 fi
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232 for ac_func in $ac_func_list
15233 do :
15234 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15235 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15236 eval as_val=\$$as_ac_var
15237 if test "x$as_val" = x""yes; then :
15238 cat >>confdefs.h <<_ACEOF
15239 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15240 _ACEOF
15241
15242 fi
15243 done
15244
15245
15246
15247
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15249 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15250 if test "${emacs_cv_localtime_cache+set}" = set; then :
15251 $as_echo_n "(cached) " >&6
15252 else
15253 if test x$ac_cv_func_tzset = xyes; then
15254 if test "$cross_compiling" = yes; then :
15255 # If we have tzset, assume the worst when cross-compiling.
15256 emacs_cv_localtime_cache=yes
15257 else
15258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15259 /* end confdefs.h. */
15260 #include <time.h>
15261 char TZ_GMT0[] = "TZ=GMT0";
15262 char TZ_PST8[] = "TZ=PST8";
15263 main()
15264 {
15265 time_t now = time ((time_t *) 0);
15266 int hour_GMT0, hour_unset;
15267 if (putenv (TZ_GMT0) != 0)
15268 exit (1);
15269 hour_GMT0 = localtime (&now)->tm_hour;
15270 unsetenv("TZ");
15271 hour_unset = localtime (&now)->tm_hour;
15272 if (putenv (TZ_PST8) != 0)
15273 exit (1);
15274 if (localtime (&now)->tm_hour == hour_GMT0)
15275 exit (1);
15276 unsetenv("TZ");
15277 if (localtime (&now)->tm_hour != hour_unset)
15278 exit (1);
15279 exit (0);
15280 }
15281 _ACEOF
15282 if ac_fn_c_try_run "$LINENO"; then :
15283 emacs_cv_localtime_cache=no
15284 else
15285 emacs_cv_localtime_cache=yes
15286 fi
15287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15288 conftest.$ac_objext conftest.beam conftest.$ac_ext
15289 fi
15290
15291 else
15292 # If we lack tzset, report that localtime does not cache TZ,
15293 # since we can't invalidate the cache if we don't have tzset.
15294 emacs_cv_localtime_cache=no
15295 fi
15296 fi
15297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15298 $as_echo "$emacs_cv_localtime_cache" >&6; }
15299 if test $emacs_cv_localtime_cache = yes; then
15300
15301 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15302
15303 fi
15304
15305 ok_so_far=yes
15306 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15307 if test "x$ac_cv_func_socket" = x""yes; then :
15308
15309 else
15310 ok_so_far=no
15311 fi
15312
15313 if test $ok_so_far = yes; then
15314 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15315 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15316
15317 else
15318 ok_so_far=no
15319 fi
15320
15321
15322 fi
15323 if test $ok_so_far = yes; then
15324 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15325 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15326
15327 else
15328 ok_so_far=no
15329 fi
15330
15331
15332 fi
15333 if test $ok_so_far = yes; then
15334
15335 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
15336
15337 fi
15338
15339 if test -f /usr/lpp/X11/bin/smt.exp; then
15340
15341 $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
15342
15343 fi
15344
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15346 $as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15347 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15349 $as_echo "yes" >&6; }
15350
15351 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
15352
15353 else
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15355 $as_echo "no" >&6; }
15356 fi
15357
15358 case $canonical in
15359 *-solaris2.4 | *-solaris2.4.*)
15360 : ${ac_cv_func_vfork_works=no};;
15361 esac
15362
15363 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15364 if test "x$ac_cv_type_pid_t" = x""yes; then :
15365
15366 else
15367
15368 cat >>confdefs.h <<_ACEOF
15369 #define pid_t int
15370 _ACEOF
15371
15372 fi
15373
15374 for ac_header in vfork.h
15375 do :
15376 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15377 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15378 cat >>confdefs.h <<_ACEOF
15379 #define HAVE_VFORK_H 1
15380 _ACEOF
15381
15382 fi
15383
15384 done
15385
15386 for ac_func in fork vfork
15387 do :
15388 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15389 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15390 eval as_val=\$$as_ac_var
15391 if test "x$as_val" = x""yes; then :
15392 cat >>confdefs.h <<_ACEOF
15393 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15394 _ACEOF
15395
15396 fi
15397 done
15398
15399 if test "x$ac_cv_func_fork" = xyes; then
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15401 $as_echo_n "checking for working fork... " >&6; }
15402 if test "${ac_cv_func_fork_works+set}" = set; then :
15403 $as_echo_n "(cached) " >&6
15404 else
15405 if test "$cross_compiling" = yes; then :
15406 ac_cv_func_fork_works=cross
15407 else
15408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15409 /* end confdefs.h. */
15410 $ac_includes_default
15411 int
15412 main ()
15413 {
15414
15415 /* By Ruediger Kuhlmann. */
15416 return fork () < 0;
15417
15418 ;
15419 return 0;
15420 }
15421 _ACEOF
15422 if ac_fn_c_try_run "$LINENO"; then :
15423 ac_cv_func_fork_works=yes
15424 else
15425 ac_cv_func_fork_works=no
15426 fi
15427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15428 conftest.$ac_objext conftest.beam conftest.$ac_ext
15429 fi
15430
15431 fi
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15433 $as_echo "$ac_cv_func_fork_works" >&6; }
15434
15435 else
15436 ac_cv_func_fork_works=$ac_cv_func_fork
15437 fi
15438 if test "x$ac_cv_func_fork_works" = xcross; then
15439 case $host in
15440 *-*-amigaos* | *-*-msdosdjgpp*)
15441 # Override, as these systems have only a dummy fork() stub
15442 ac_cv_func_fork_works=no
15443 ;;
15444 *)
15445 ac_cv_func_fork_works=yes
15446 ;;
15447 esac
15448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15449 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15450 fi
15451 ac_cv_func_vfork_works=$ac_cv_func_vfork
15452 if test "x$ac_cv_func_vfork" = xyes; then
15453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15454 $as_echo_n "checking for working vfork... " >&6; }
15455 if test "${ac_cv_func_vfork_works+set}" = set; then :
15456 $as_echo_n "(cached) " >&6
15457 else
15458 if test "$cross_compiling" = yes; then :
15459 ac_cv_func_vfork_works=cross
15460 else
15461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15462 /* end confdefs.h. */
15463 /* Thanks to Paul Eggert for this test. */
15464 $ac_includes_default
15465 #include <sys/wait.h>
15466 #ifdef HAVE_VFORK_H
15467 # include <vfork.h>
15468 #endif
15469 /* On some sparc systems, changes by the child to local and incoming
15470 argument registers are propagated back to the parent. The compiler
15471 is told about this with #include <vfork.h>, but some compilers
15472 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15473 static variable whose address is put into a register that is
15474 clobbered by the vfork. */
15475 static void
15476 #ifdef __cplusplus
15477 sparc_address_test (int arg)
15478 # else
15479 sparc_address_test (arg) int arg;
15480 #endif
15481 {
15482 static pid_t child;
15483 if (!child) {
15484 child = vfork ();
15485 if (child < 0) {
15486 perror ("vfork");
15487 _exit(2);
15488 }
15489 if (!child) {
15490 arg = getpid();
15491 write(-1, "", 0);
15492 _exit (arg);
15493 }
15494 }
15495 }
15496
15497 int
15498 main ()
15499 {
15500 pid_t parent = getpid ();
15501 pid_t child;
15502
15503 sparc_address_test (0);
15504
15505 child = vfork ();
15506
15507 if (child == 0) {
15508 /* Here is another test for sparc vfork register problems. This
15509 test uses lots of local variables, at least as many local
15510 variables as main has allocated so far including compiler
15511 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15512 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15513 reuse the register of parent for one of the local variables,
15514 since it will think that parent can't possibly be used any more
15515 in this routine. Assigning to the local variable will thus
15516 munge parent in the parent process. */
15517 pid_t
15518 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15519 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15520 /* Convince the compiler that p..p7 are live; otherwise, it might
15521 use the same hardware register for all 8 local variables. */
15522 if (p != p1 || p != p2 || p != p3 || p != p4
15523 || p != p5 || p != p6 || p != p7)
15524 _exit(1);
15525
15526 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15527 from child file descriptors. If the child closes a descriptor
15528 before it execs or exits, this munges the parent's descriptor
15529 as well. Test for this by closing stdout in the child. */
15530 _exit(close(fileno(stdout)) != 0);
15531 } else {
15532 int status;
15533 struct stat st;
15534
15535 while (wait(&status) != child)
15536 ;
15537 return (
15538 /* Was there some problem with vforking? */
15539 child < 0
15540
15541 /* Did the child fail? (This shouldn't happen.) */
15542 || status
15543
15544 /* Did the vfork/compiler bug occur? */
15545 || parent != getpid()
15546
15547 /* Did the file descriptor bug occur? */
15548 || fstat(fileno(stdout), &st) != 0
15549 );
15550 }
15551 }
15552 _ACEOF
15553 if ac_fn_c_try_run "$LINENO"; then :
15554 ac_cv_func_vfork_works=yes
15555 else
15556 ac_cv_func_vfork_works=no
15557 fi
15558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15559 conftest.$ac_objext conftest.beam conftest.$ac_ext
15560 fi
15561
15562 fi
15563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15564 $as_echo "$ac_cv_func_vfork_works" >&6; }
15565
15566 fi;
15567 if test "x$ac_cv_func_fork_works" = xcross; then
15568 ac_cv_func_vfork_works=$ac_cv_func_vfork
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15570 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15571 fi
15572
15573 if test "x$ac_cv_func_vfork_works" = xyes; then
15574
15575 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15576
15577 else
15578
15579 $as_echo "#define vfork fork" >>confdefs.h
15580
15581 fi
15582 if test "x$ac_cv_func_fork_works" = xyes; then
15583
15584 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15585
15586 fi
15587
15588
15589 for ac_func in snprintf
15590 do :
15591 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15592 if test "x$ac_cv_func_snprintf" = x""yes; then :
15593 cat >>confdefs.h <<_ACEOF
15594 #define HAVE_SNPRINTF 1
15595 _ACEOF
15596
15597 fi
15598 done
15599
15600
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15602 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15603 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15604 $as_echo_n "(cached) " >&6
15605 else
15606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607 /* end confdefs.h. */
15608 #include <langinfo.h>
15609 int
15610 main ()
15611 {
15612 char* cs = nl_langinfo(CODESET);
15613 ;
15614 return 0;
15615 }
15616 _ACEOF
15617 if ac_fn_c_try_link "$LINENO"; then :
15618 emacs_cv_langinfo_codeset=yes
15619 else
15620 emacs_cv_langinfo_codeset=no
15621 fi
15622 rm -f core conftest.err conftest.$ac_objext \
15623 conftest$ac_exeext conftest.$ac_ext
15624
15625 fi
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15627 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
15628 if test $emacs_cv_langinfo_codeset = yes; then
15629
15630 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
15631
15632 fi
15633
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15635 $as_echo_n "checking for mbstate_t... " >&6; }
15636 if test "${ac_cv_type_mbstate_t+set}" = set; then :
15637 $as_echo_n "(cached) " >&6
15638 else
15639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640 /* end confdefs.h. */
15641 $ac_includes_default
15642 # include <wchar.h>
15643 int
15644 main ()
15645 {
15646 mbstate_t x; return sizeof x;
15647 ;
15648 return 0;
15649 }
15650 _ACEOF
15651 if ac_fn_c_try_compile "$LINENO"; then :
15652 ac_cv_type_mbstate_t=yes
15653 else
15654 ac_cv_type_mbstate_t=no
15655 fi
15656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15657 fi
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15659 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15660 if test $ac_cv_type_mbstate_t = yes; then
15661
15662 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15663
15664 else
15665
15666 $as_echo "#define mbstate_t int" >>confdefs.h
15667
15668 fi
15669
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15671 $as_echo_n "checking for C restricted array declarations... " >&6; }
15672 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15673 $as_echo_n "(cached) " >&6
15674 else
15675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15676 /* end confdefs.h. */
15677 void fred (int x[__restrict]);
15678 int
15679 main ()
15680 {
15681
15682 ;
15683 return 0;
15684 }
15685 _ACEOF
15686 if ac_fn_c_try_compile "$LINENO"; then :
15687 emacs_cv_c_restrict_arr=yes
15688 else
15689 emacs_cv_c_restrict_arr=no
15690 fi
15691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692 fi
15693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15694 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
15695 if test "$emacs_cv_c_restrict_arr" = yes; then
15696
15697 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
15698
15699 fi
15700
15701
15702
15703 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15704
15705
15706
15707 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
15708
15709
15710 ## Note: PTYs are broken on darwin <6. Use at your own risk.
15711
15712 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
15713
15714
15715
15716 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
15717
15718
15719
15720
15721
15722 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15723
15724
15725
15726 $as_echo "#define SEPCHAR ':'" >>confdefs.h
15727
15728
15729
15730 $as_echo "#define subprocesses 1" >>confdefs.h
15731
15732
15733
15734 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15735
15736
15737
15738
15739 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15740
15741
15742
15743
15744
15745 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15746
15747
15748
15749 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15750
15751
15752
15753 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15754
15755
15756
15757
15758
15759 case $opsys in
15760 aix4-2)
15761 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15762 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15763
15764 fi
15765 ;;
15766
15767 hpux*)
15768 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15769
15770 ;;
15771 esac
15772
15773
15774 case $opsys in
15775 irix6-5 | sol2* | unixware )
15776
15777 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
15778
15779 ;;
15780 esac
15781
15782 emacs_broken_SIGIO=no
15783
15784 case $opsys in
15785 hpux* | irix6-5 | openbsd | sol2* | unixware )
15786 emacs_broken_SIGIO=yes
15787 ;;
15788
15789 aix4-2)
15790
15791 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
15792
15793 ;;
15794
15795 freebsd)
15796
15797 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
15798
15799 ;;
15800 esac
15801
15802 case $opsys in
15803 gnu-* | sol2-10 )
15804
15805 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
15806
15807 ;;
15808 esac
15809
15810 case $opsys in
15811 darwin | dragonfly | freebsd | netbsd | openbsd )
15812
15813 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
15814
15815 ;;
15816 esac
15817
15818 case $opsys in
15819 netbsd | openbsd) sound_device="/dev/audio" ;;
15820 *) sound_device="/dev/dsp" ;;
15821 esac
15822
15823
15824 cat >>confdefs.h <<_ACEOF
15825 #define DEFAULT_SOUND_DEVICE "$sound_device"
15826 _ACEOF
15827
15828
15829
15830 case $opsys in
15831 darwin | gnu-linux | gnu-kfreebsd )
15832
15833 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
15834
15835 ;;
15836 esac
15837
15838
15839 case $opsys in
15840 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
15841
15842 $as_echo "#define NARROWPROTO 1" >>confdefs.h
15843
15844 ;;
15845 esac
15846
15847
15848
15849
15850
15851
15852
15853
15854 case $opsys in
15855 aix4-2 )
15856 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
15857
15858 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
15859
15860 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
15861
15862 ;;
15863
15864 cygwin )
15865 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15866
15867 $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
15868
15869 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15870
15871 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15872
15873 ;;
15874
15875 darwin )
15876 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15877
15878 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15879
15880 $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
15881
15882 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15883
15884 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15885
15886 ;;
15887
15888 gnu | openbsd )
15889 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15890
15891 ;;
15892
15893 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
15894 if test "x$ac_cv_func_grantpt" = xyes; then
15895
15896 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
15897
15898 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15899
15900 $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
15901
15902 if test "x$ac_cv_func_posix_openpt" = xyes; then
15903 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15904
15905 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15906
15907 elif test "x$ac_cv_func_getpt" = xyes; then
15908 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
15909
15910 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15911
15912 else
15913 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15914
15915 fi
15916 else
15917 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15918
15919 fi
15920 ;;
15921
15922 hpux*)
15923 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15924
15925 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
15926
15927 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
15928
15929 ;;
15930
15931 irix6-5 )
15932 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
15933
15934 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
15935
15936 $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
15937
15938 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15939
15940 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15941
15942 ;;
15943
15944 sol2* )
15945 $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
15946
15947 ;;
15948
15949 unixware )
15950 $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
15951
15952 ;;
15953 esac
15954
15955
15956 case $opsys in
15957 sol2* | unixware )
15958 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15959
15960 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15961
15962
15963 $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
15964
15965 ;;
15966 esac
15967
15968
15969
15970
15971 case $opsys in
15972 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
15973 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15974
15975 ;;
15976
15977 gnu-linux | gnu-kfreebsd )
15978
15979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15980 $as_echo_n "checking for signals via characters... " >&6; }
15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982 /* end confdefs.h. */
15983
15984 #include <linux/version.h>
15985 #if LINUX_VERSION_CODE < 0x20400
15986 # error "Linux version too old"
15987 #endif
15988
15989 int
15990 main ()
15991 {
15992
15993 ;
15994 return 0;
15995 }
15996 _ACEOF
15997 if ac_fn_c_try_cpp "$LINENO"; then :
15998 emacs_signals_via_chars=yes
15999 else
16000 emacs_signals_via_chars=no
16001 fi
16002 rm -f conftest.err conftest.$ac_ext
16003
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16005 $as_echo "$emacs_signals_via_chars" >&6; }
16006 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16007
16008 ;;
16009 esac
16010
16011
16012
16013
16014 case $opsys in
16015 aix*)
16016 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
16017
16018 ;;
16019 hpux*)
16020 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
16021
16022 ;;
16023 irix6-5)
16024 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
16025
16026 ;;
16027 esac
16028
16029
16030
16031
16032 case $opsys in
16033 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16034 ;;
16035
16036 gnu | dragonfly | freebsd | netbsd | openbsd )
16037
16038 $as_echo "#define TABDLY OXTABS" >>confdefs.h
16039
16040 $as_echo "#define TAB3 OXTABS" >>confdefs.h
16041
16042 ;;
16043
16044 gnu-linux | gnu-kfreebsd )
16045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h. */
16047
16048 #ifndef __ia64__
16049 # error "not ia64"
16050 #endif
16051
16052 int
16053 main ()
16054 {
16055
16056 ;
16057 return 0;
16058 }
16059 _ACEOF
16060 if ac_fn_c_try_cpp "$LINENO"; then :
16061
16062 $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
16063
16064 fi
16065 rm -f conftest.err conftest.$ac_ext
16066 ;;
16067
16068 hpux*)
16069
16070 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
16071
16072 ;;
16073 esac
16074
16075
16076
16077
16078
16079 case $opsys in
16080 gnu-linux | gnu-kfreebsd )
16081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082 /* end confdefs.h. */
16083
16084 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16085 || defined __alpha__ || defined __mips__ || defined __s390__ \
16086 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16087 || defined __ia64__ || defined __sh__
16088 /* ok */
16089 #else
16090 # error "setjmp not known to work on this arch"
16091 #endif
16092
16093 int
16094 main ()
16095 {
16096
16097 ;
16098 return 0;
16099 }
16100 _ACEOF
16101 if ac_fn_c_try_cpp "$LINENO"; then :
16102 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16103
16104 fi
16105 rm -f conftest.err conftest.$ac_ext
16106 ;;
16107 esac
16108
16109
16110 if test x$GCC = xyes; then
16111 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16112
16113 else
16114 case $opsys in
16115 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
16116 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16117
16118 ;;
16119 esac
16120 fi
16121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16122 $as_echo_n "checking for _setjmp... " >&6; }
16123 if test "${emacs_cv_func__setjmp+set}" = set; then :
16124 $as_echo_n "(cached) " >&6
16125 else
16126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16127 /* end confdefs.h. */
16128 #include <setjmp.h>
16129
16130 int
16131 main ()
16132 {
16133 jmp_buf j;
16134 if (! _setjmp (j))
16135 _longjmp (j, 1);
16136 ;
16137 return 0;
16138 }
16139 _ACEOF
16140 if ac_fn_c_try_link "$LINENO"; then :
16141 emacs_cv_func__setjmp=yes
16142 else
16143 emacs_cv_func__setjmp=no
16144 fi
16145 rm -f core conftest.err conftest.$ac_objext \
16146 conftest$ac_exeext conftest.$ac_ext
16147 fi
16148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16149 $as_echo "$emacs_cv_func__setjmp" >&6; }
16150 if test $emacs_cv_func__setjmp = yes; then
16151
16152 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
16153
16154 else
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16156 $as_echo_n "checking for sigsetjmp... " >&6; }
16157 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16158 $as_echo_n "(cached) " >&6
16159 else
16160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16161 /* end confdefs.h. */
16162 #include <setjmp.h>
16163
16164 int
16165 main ()
16166 {
16167 sigjmp_buf j;
16168 if (! sigsetjmp (j, 1))
16169 siglongjmp (j, 1);
16170 ;
16171 return 0;
16172 }
16173 _ACEOF
16174 if ac_fn_c_try_link "$LINENO"; then :
16175 emacs_cv_func_sigsetjmp=yes
16176 else
16177 emacs_cv_func_sigsetjmp=no
16178 fi
16179 rm -f core conftest.err conftest.$ac_objext \
16180 conftest$ac_exeext conftest.$ac_ext
16181 fi
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16183 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16184 if test $emacs_cv_func_sigsetjmp = yes; then
16185
16186 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
16187
16188 fi
16189 fi
16190
16191 case $opsys in
16192 sol2* | unixware )
16193
16194 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16195
16196 ;;
16197 esac
16198
16199
16200 case $opsys in
16201 hpux* | sol2* )
16202
16203 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
16204
16205 ;;
16206 esac
16207
16208
16209
16210
16211
16212
16213
16214
16215 case $opsys in
16216 aix4-2)
16217 $as_echo "#define USG /**/" >>confdefs.h
16218
16219 $as_echo "#define USG5 /**/" >>confdefs.h
16220
16221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16222 /* end confdefs.h. */
16223
16224 #ifndef _AIX
16225 # error "_AIX not defined"
16226 #endif
16227
16228 int
16229 main ()
16230 {
16231
16232 ;
16233 return 0;
16234 }
16235 _ACEOF
16236 if ac_fn_c_try_cpp "$LINENO"; then :
16237
16238 else
16239
16240 $as_echo "#define _AIX /**/" >>confdefs.h
16241
16242 fi
16243 rm -f conftest.err conftest.$ac_ext
16244 ;;
16245
16246 cygwin)
16247
16248 $as_echo "#define CYGWIN 1" >>confdefs.h
16249
16250 ;;
16251
16252 darwin)
16253
16254 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
16255
16256 ;;
16257
16258 gnu-linux | gnu-kfreebsd )
16259 $as_echo "#define USG /**/" >>confdefs.h
16260
16261
16262 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
16263
16264 ;;
16265
16266 hpux*)
16267 $as_echo "#define USG /**/" >>confdefs.h
16268
16269 $as_echo "#define USG5 /**/" >>confdefs.h
16270
16271
16272 $as_echo "#define HPUX /**/" >>confdefs.h
16273
16274 ;;
16275
16276 irix6-5)
16277 $as_echo "#define USG /**/" >>confdefs.h
16278
16279 $as_echo "#define USG5 /**/" >>confdefs.h
16280
16281 $as_echo "#define USG5_4 /**/" >>confdefs.h
16282
16283
16284 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
16285
16286 ;;
16287
16288 sol2*)
16289 $as_echo "#define USG /**/" >>confdefs.h
16290
16291 $as_echo "#define USG5 /**/" >>confdefs.h
16292
16293 $as_echo "#define USG5_4 /**/" >>confdefs.h
16294
16295
16296 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
16297
16298 ;;
16299
16300 unixware)
16301 $as_echo "#define USG /**/" >>confdefs.h
16302
16303 $as_echo "#define USG5 /**/" >>confdefs.h
16304
16305 $as_echo "#define USG5_4 /**/" >>confdefs.h
16306
16307 ;;
16308 esac
16309
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16311 $as_echo_n "checking for usable FIONREAD... " >&6; }
16312 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16313 $as_echo_n "(cached) " >&6
16314 else
16315 case $opsys in
16316 aix4-2)
16317 emacs_cv_usable_FIONREAD=no
16318 ;;
16319
16320 *)
16321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16322 /* end confdefs.h. */
16323 #include <sys/types.h>
16324 #include <sys/ioctl.h>
16325 #ifdef USG5_4
16326 # include <sys/filio.h>
16327 #endif
16328
16329 int
16330 main ()
16331 {
16332 int foo = ioctl (0, FIONREAD, &foo);
16333 ;
16334 return 0;
16335 }
16336 _ACEOF
16337 if ac_fn_c_try_compile "$LINENO"; then :
16338 emacs_cv_usable_FIONREAD=yes
16339 else
16340 emacs_cv_usable_FIONREAD=no
16341 fi
16342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16343 ;;
16344 esac
16345 fi
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16347 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16348 if test $emacs_cv_usable_FIONREAD = yes; then
16349
16350 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16351
16352
16353 if test $emacs_broken_SIGIO = no; then
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16355 $as_echo_n "checking for usable SIGIO... " >&6; }
16356 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16357 $as_echo_n "(cached) " >&6
16358 else
16359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h. */
16361 #include <fcntl.h>
16362 #include <signal.h>
16363
16364 int
16365 main ()
16366 {
16367 int foo = SIGIO | F_SETFL | FASYNC;
16368 ;
16369 return 0;
16370 }
16371 _ACEOF
16372 if ac_fn_c_try_compile "$LINENO"; then :
16373 emacs_cv_usable_SIGIO=yes
16374 else
16375 emacs_cv_usable_SIGIO=no
16376 fi
16377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16378 fi
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16380 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
16381 if test $emacs_cv_usable_SIGIO = yes; then
16382
16383 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16384
16385 fi
16386 fi
16387 fi
16388
16389
16390 case $opsys in
16391 cygwin)
16392
16393 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
16394
16395 ;;
16396
16397 hpux11)
16398
16399 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
16400
16401 ;;
16402
16403 irix6-5)
16404
16405 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
16406
16407 ;;
16408
16409 sol2-10)
16410
16411 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
16412
16413 ;;
16414 esac
16415
16416 # Set up the CFLAGS for real compilation, so we can substitute it.
16417 CFLAGS="$REAL_CFLAGS"
16418 CPPFLAGS="$REAL_CPPFLAGS"
16419
16420 ## Hack to detect a buggy GCC version.
16421 if test "x$GCC" = xyes \
16422 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16423 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16424 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16425 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16426 fi
16427
16428 version=$PACKAGE_VERSION
16429
16430 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
16431
16432 cat >>confdefs.h <<_ACEOF
16433 #define COPYRIGHT "$copyright"
16434 _ACEOF
16435
16436
16437
16438 ### Specify what sort of things we'll be editing into Makefile and config.h.
16439 ### Use configuration here uncanonicalized to avoid exceeding size limits.
16440
16441
16442 ## Unused?
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16466 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16467 ## end of LIBX_BASE, but nothing ever set it.
16468
16469
16470
16471
16472 ## Used in lwlib/Makefile.in.
16473
16474
16475
16476
16477
16478
16479
16480
16481 if test -n "${term_header}"; then
16482
16483 cat >>confdefs.h <<_ACEOF
16484 #define TERM_HEADER "${term_header}"
16485 _ACEOF
16486
16487 fi
16488
16489
16490 cat >>confdefs.h <<_ACEOF
16491 #define EMACS_CONFIGURATION "${canonical}"
16492 _ACEOF
16493
16494 emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
16495
16496 cat >>confdefs.h <<_ACEOF
16497 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
16498 _ACEOF
16499
16500
16501
16502 XMENU_OBJ=
16503 XOBJ=
16504 FONT_OBJ=
16505 if test "${HAVE_X_WINDOWS}" = "yes" ; then
16506
16507 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
16508
16509 XMENU_OBJ=xmenu.o
16510 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
16511 FONT_OBJ=xfont.o
16512 if test "$HAVE_XFT" = "yes"; then
16513 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16514 elif test "$HAVE_FREETYPE" = "yes"; then
16515 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16516 fi
16517
16518 fi
16519
16520
16521
16522
16523 WIDGET_OBJ=
16524 MOTIF_LIBW=
16525 if test "${USE_X_TOOLKIT}" != "none" ; then
16526 WIDGET_OBJ=widget.o
16527
16528 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16529
16530 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16531
16532 $as_echo "#define USE_LUCID 1" >>confdefs.h
16533
16534 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
16535
16536 $as_echo "#define USE_MOTIF 1" >>confdefs.h
16537
16538 MOTIF_LIBW=-lXm
16539 case "$opsys" in
16540 gnu-linux)
16541 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16542 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16543 ;;
16544
16545 unixware)
16546 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16547 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16548 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16549 ;;
16550
16551 aix4-2)
16552 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16553 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16554 ;;
16555 esac
16556 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16557 fi
16558 fi
16559
16560
16561 TOOLKIT_LIBW=
16562 case "$USE_X_TOOLKIT" in
16563 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16564 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16565 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16566 esac
16567
16568
16569 if test "$USE_X_TOOLKIT" = "none"; then
16570 LIBXT_OTHER="\$(LIBXSM)"
16571 OLDXMENU_TARGET="really-oldXMenu"
16572 else
16573 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16574 OLDXMENU_TARGET="really-lwlib"
16575 fi
16576
16577
16578 ## The X Menu stuff is present in the X10 distribution, but missing
16579 ## from X11. If we have X10, just use the installed library;
16580 ## otherwise, use our own copy.
16581 if test "${HAVE_X11}" = "yes" ; then
16582
16583 $as_echo "#define HAVE_X11 1" >>confdefs.h
16584
16585
16586 if test "$USE_X_TOOLKIT" = "none"; then
16587 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16588 else
16589 OLDXMENU="\${lwlibdir}/liblw.a"
16590 fi
16591 LIBXMENU="\$(OLDXMENU)"
16592 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16593 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
16594 else
16595 ## For a syntactically valid Makefile; not actually used for anything.
16596 ## See comments in src/Makefile.in.
16597 OLDXMENU=nothing
16598 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16599 if test "${HAVE_X_WINDOWS}" = "yes"; then
16600 LIBXMENU="-lXMenu"
16601 else
16602 LIBXMENU=
16603 fi
16604 LIBX_OTHER=
16605 OLDXMENU_DEPS=
16606 fi
16607
16608 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16609 OLDXMENU_TARGET=
16610 OLDXMENU=nothing
16611 LIBXMENU=
16612 OLDXMENU_DEPS=
16613 fi
16614
16615
16616
16617
16618
16619
16620
16621 if test "${HAVE_MENUS}" = "yes" ; then
16622
16623 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
16624
16625 fi
16626
16627 if test "${GNU_MALLOC}" = "yes" ; then
16628
16629 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
16630
16631 fi
16632
16633 RALLOC_OBJ=
16634 if test "${REL_ALLOC}" = "yes" ; then
16635
16636 $as_echo "#define REL_ALLOC 1" >>confdefs.h
16637
16638
16639 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16640 fi
16641
16642
16643 if test "$opsys" = "cygwin"; then
16644 CYGWIN_OBJ="sheap.o cygw32.o"
16645 ## Cygwin differs because of its unexec().
16646 PRE_ALLOC_OBJ=
16647 POST_ALLOC_OBJ=lastfile.o
16648 else
16649 CYGWIN_OBJ=
16650 PRE_ALLOC_OBJ=lastfile.o
16651 POST_ALLOC_OBJ=
16652 fi
16653
16654
16655
16656
16657 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16658 # it temporarily reverts them to their pre-pkg-config values,
16659 # because gnulib needs to work with both src (which uses the
16660 # pkg-config stuff) and lib-src (which does not). For example, gnulib
16661 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16662 # and it therefore needs to run in an environment where LIBS does not
16663 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16664 # for some package unrelated to lib-src.
16665 SAVE_CFLAGS=$CFLAGS
16666 SAVE_LIBS=$LIBS
16667 CFLAGS=$pre_PKG_CONFIG_CFLAGS
16668 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680 LIBC_FATAL_STDERR_=1
16681 export LIBC_FATAL_STDERR_
16682
16683 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16684 # for constant arguments. Useless!
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16686 $as_echo_n "checking for working alloca.h... " >&6; }
16687 if test "${ac_cv_working_alloca_h+set}" = set; then :
16688 $as_echo_n "(cached) " >&6
16689 else
16690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16691 /* end confdefs.h. */
16692 #include <alloca.h>
16693 int
16694 main ()
16695 {
16696 char *p = (char *) alloca (2 * sizeof (int));
16697 if (p) return 0;
16698 ;
16699 return 0;
16700 }
16701 _ACEOF
16702 if ac_fn_c_try_link "$LINENO"; then :
16703 ac_cv_working_alloca_h=yes
16704 else
16705 ac_cv_working_alloca_h=no
16706 fi
16707 rm -f core conftest.err conftest.$ac_objext \
16708 conftest$ac_exeext conftest.$ac_ext
16709 fi
16710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16711 $as_echo "$ac_cv_working_alloca_h" >&6; }
16712 if test $ac_cv_working_alloca_h = yes; then
16713
16714 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
16715
16716 fi
16717
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16719 $as_echo_n "checking for alloca... " >&6; }
16720 if test "${ac_cv_func_alloca_works+set}" = set; then :
16721 $as_echo_n "(cached) " >&6
16722 else
16723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h. */
16725 #ifdef __GNUC__
16726 # define alloca __builtin_alloca
16727 #else
16728 # ifdef _MSC_VER
16729 # include <malloc.h>
16730 # define alloca _alloca
16731 # else
16732 # ifdef HAVE_ALLOCA_H
16733 # include <alloca.h>
16734 # else
16735 # ifdef _AIX
16736 #pragma alloca
16737 # else
16738 # ifndef alloca /* predefined by HP cc +Olibcalls */
16739 char *alloca ();
16740 # endif
16741 # endif
16742 # endif
16743 # endif
16744 #endif
16745
16746 int
16747 main ()
16748 {
16749 char *p = (char *) alloca (1);
16750 if (p) return 0;
16751 ;
16752 return 0;
16753 }
16754 _ACEOF
16755 if ac_fn_c_try_link "$LINENO"; then :
16756 ac_cv_func_alloca_works=yes
16757 else
16758 ac_cv_func_alloca_works=no
16759 fi
16760 rm -f core conftest.err conftest.$ac_objext \
16761 conftest$ac_exeext conftest.$ac_ext
16762 fi
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16764 $as_echo "$ac_cv_func_alloca_works" >&6; }
16765
16766 if test $ac_cv_func_alloca_works = yes; then
16767
16768 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16769
16770 else
16771 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16772 # that cause trouble. Some versions do not even contain alloca or
16773 # contain a buggy version. If you still want to use their alloca,
16774 # use ar to extract alloca.o from them instead of compiling alloca.c.
16775
16776
16777
16778
16779
16780 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
16781
16782 $as_echo "#define C_ALLOCA 1" >>confdefs.h
16783
16784
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16786 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16787 if test "${ac_cv_os_cray+set}" = set; then :
16788 $as_echo_n "(cached) " >&6
16789 else
16790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16791 /* end confdefs.h. */
16792 #if defined CRAY && ! defined CRAY2
16793 webecray
16794 #else
16795 wenotbecray
16796 #endif
16797
16798 _ACEOF
16799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16800 $EGREP "webecray" >/dev/null 2>&1; then :
16801 ac_cv_os_cray=yes
16802 else
16803 ac_cv_os_cray=no
16804 fi
16805 rm -f conftest*
16806
16807 fi
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16809 $as_echo "$ac_cv_os_cray" >&6; }
16810 if test $ac_cv_os_cray = yes; then
16811 for ac_func in _getb67 GETB67 getb67; do
16812 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16813 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16814 eval as_val=\$$as_ac_var
16815 if test "x$as_val" = x""yes; then :
16816
16817 cat >>confdefs.h <<_ACEOF
16818 #define CRAY_STACKSEG_END $ac_func
16819 _ACEOF
16820
16821 break
16822 fi
16823
16824 done
16825 fi
16826
16827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16828 $as_echo_n "checking stack direction for C alloca... " >&6; }
16829 if test "${ac_cv_c_stack_direction+set}" = set; then :
16830 $as_echo_n "(cached) " >&6
16831 else
16832 if test "$cross_compiling" = yes; then :
16833 ac_cv_c_stack_direction=0
16834 else
16835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16836 /* end confdefs.h. */
16837 $ac_includes_default
16838 int
16839 find_stack_direction (int *addr, int depth)
16840 {
16841 int dir, dummy = 0;
16842 if (! addr)
16843 addr = &dummy;
16844 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16845 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16846 return dir + dummy;
16847 }
16848
16849 int
16850 main (int argc, char **argv)
16851 {
16852 return find_stack_direction (0, argc + !argv + 20) < 0;
16853 }
16854 _ACEOF
16855 if ac_fn_c_try_run "$LINENO"; then :
16856 ac_cv_c_stack_direction=1
16857 else
16858 ac_cv_c_stack_direction=-1
16859 fi
16860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16861 conftest.$ac_objext conftest.beam conftest.$ac_ext
16862 fi
16863
16864 fi
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16866 $as_echo "$ac_cv_c_stack_direction" >&6; }
16867 cat >>confdefs.h <<_ACEOF
16868 #define STACK_DIRECTION $ac_cv_c_stack_direction
16869 _ACEOF
16870
16871
16872 fi
16873
16874
16875
16876
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16878 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16879 if test "${ac_cv_c_bigendian+set}" = set; then :
16880 $as_echo_n "(cached) " >&6
16881 else
16882 ac_cv_c_bigendian=unknown
16883 # See if we're dealing with a universal compiler.
16884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16885 /* end confdefs.h. */
16886 #ifndef __APPLE_CC__
16887 not a universal capable compiler
16888 #endif
16889 typedef int dummy;
16890
16891 _ACEOF
16892 if ac_fn_c_try_compile "$LINENO"; then :
16893
16894 # Check for potential -arch flags. It is not universal unless
16895 # there are at least two -arch flags with different values.
16896 ac_arch=
16897 ac_prev=
16898 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16899 if test -n "$ac_prev"; then
16900 case $ac_word in
16901 i?86 | x86_64 | ppc | ppc64)
16902 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16903 ac_arch=$ac_word
16904 else
16905 ac_cv_c_bigendian=universal
16906 break
16907 fi
16908 ;;
16909 esac
16910 ac_prev=
16911 elif test "x$ac_word" = "x-arch"; then
16912 ac_prev=arch
16913 fi
16914 done
16915 fi
16916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16917 if test $ac_cv_c_bigendian = unknown; then
16918 # See if sys/param.h defines the BYTE_ORDER macro.
16919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16920 /* end confdefs.h. */
16921 #include <sys/types.h>
16922 #include <sys/param.h>
16923
16924 int
16925 main ()
16926 {
16927 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16928 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16929 && LITTLE_ENDIAN)
16930 bogus endian macros
16931 #endif
16932
16933 ;
16934 return 0;
16935 }
16936 _ACEOF
16937 if ac_fn_c_try_compile "$LINENO"; then :
16938 # It does; now see whether it defined to BIG_ENDIAN or not.
16939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16940 /* end confdefs.h. */
16941 #include <sys/types.h>
16942 #include <sys/param.h>
16943
16944 int
16945 main ()
16946 {
16947 #if BYTE_ORDER != BIG_ENDIAN
16948 not big endian
16949 #endif
16950
16951 ;
16952 return 0;
16953 }
16954 _ACEOF
16955 if ac_fn_c_try_compile "$LINENO"; then :
16956 ac_cv_c_bigendian=yes
16957 else
16958 ac_cv_c_bigendian=no
16959 fi
16960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16961 fi
16962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16963 fi
16964 if test $ac_cv_c_bigendian = unknown; then
16965 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16967 /* end confdefs.h. */
16968 #include <limits.h>
16969
16970 int
16971 main ()
16972 {
16973 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16974 bogus endian macros
16975 #endif
16976
16977 ;
16978 return 0;
16979 }
16980 _ACEOF
16981 if ac_fn_c_try_compile "$LINENO"; then :
16982 # It does; now see whether it defined to _BIG_ENDIAN or not.
16983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16984 /* end confdefs.h. */
16985 #include <limits.h>
16986
16987 int
16988 main ()
16989 {
16990 #ifndef _BIG_ENDIAN
16991 not big endian
16992 #endif
16993
16994 ;
16995 return 0;
16996 }
16997 _ACEOF
16998 if ac_fn_c_try_compile "$LINENO"; then :
16999 ac_cv_c_bigendian=yes
17000 else
17001 ac_cv_c_bigendian=no
17002 fi
17003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17004 fi
17005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17006 fi
17007 if test $ac_cv_c_bigendian = unknown; then
17008 # Compile a test program.
17009 if test "$cross_compiling" = yes; then :
17010 # Try to guess by grepping values from an object file.
17011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17012 /* end confdefs.h. */
17013 short int ascii_mm[] =
17014 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17015 short int ascii_ii[] =
17016 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17017 int use_ascii (int i) {
17018 return ascii_mm[i] + ascii_ii[i];
17019 }
17020 short int ebcdic_ii[] =
17021 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17022 short int ebcdic_mm[] =
17023 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17024 int use_ebcdic (int i) {
17025 return ebcdic_mm[i] + ebcdic_ii[i];
17026 }
17027 extern int foo;
17028
17029 int
17030 main ()
17031 {
17032 return use_ascii (foo) == use_ebcdic (foo);
17033 ;
17034 return 0;
17035 }
17036 _ACEOF
17037 if ac_fn_c_try_compile "$LINENO"; then :
17038 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17039 ac_cv_c_bigendian=yes
17040 fi
17041 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17042 if test "$ac_cv_c_bigendian" = unknown; then
17043 ac_cv_c_bigendian=no
17044 else
17045 # finding both strings is unlikely to happen, but who knows?
17046 ac_cv_c_bigendian=unknown
17047 fi
17048 fi
17049 fi
17050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17051 else
17052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17053 /* end confdefs.h. */
17054 $ac_includes_default
17055 int
17056 main ()
17057 {
17058
17059 /* Are we little or big endian? From Harbison&Steele. */
17060 union
17061 {
17062 long int l;
17063 char c[sizeof (long int)];
17064 } u;
17065 u.l = 1;
17066 return u.c[sizeof (long int) - 1] == 1;
17067
17068 ;
17069 return 0;
17070 }
17071 _ACEOF
17072 if ac_fn_c_try_run "$LINENO"; then :
17073 ac_cv_c_bigendian=no
17074 else
17075 ac_cv_c_bigendian=yes
17076 fi
17077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17078 conftest.$ac_objext conftest.beam conftest.$ac_ext
17079 fi
17080
17081 fi
17082 fi
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17084 $as_echo "$ac_cv_c_bigendian" >&6; }
17085 case $ac_cv_c_bigendian in #(
17086 yes)
17087 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17088 ;; #(
17089 no)
17090 ;; #(
17091 universal)
17092
17093 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17094
17095 ;; #(
17096 *)
17097 as_fn_error "unknown endianness
17098 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17099 esac
17100
17101
17102
17103 GNULIB_CHDIR=0;
17104 GNULIB_CHOWN=0;
17105 GNULIB_CLOSE=0;
17106 GNULIB_DUP=0;
17107 GNULIB_DUP2=0;
17108 GNULIB_DUP3=0;
17109 GNULIB_ENVIRON=0;
17110 GNULIB_EUIDACCESS=0;
17111 GNULIB_FACCESSAT=0;
17112 GNULIB_FCHDIR=0;
17113 GNULIB_FCHOWNAT=0;
17114 GNULIB_FDATASYNC=0;
17115 GNULIB_FSYNC=0;
17116 GNULIB_FTRUNCATE=0;
17117 GNULIB_GETCWD=0;
17118 GNULIB_GETDOMAINNAME=0;
17119 GNULIB_GETDTABLESIZE=0;
17120 GNULIB_GETGROUPS=0;
17121 GNULIB_GETHOSTNAME=0;
17122 GNULIB_GETLOGIN=0;
17123 GNULIB_GETLOGIN_R=0;
17124 GNULIB_GETPAGESIZE=0;
17125 GNULIB_GETUSERSHELL=0;
17126 GNULIB_GROUP_MEMBER=0;
17127 GNULIB_ISATTY=0;
17128 GNULIB_LCHOWN=0;
17129 GNULIB_LINK=0;
17130 GNULIB_LINKAT=0;
17131 GNULIB_LSEEK=0;
17132 GNULIB_PIPE=0;
17133 GNULIB_PIPE2=0;
17134 GNULIB_PREAD=0;
17135 GNULIB_PWRITE=0;
17136 GNULIB_READ=0;
17137 GNULIB_READLINK=0;
17138 GNULIB_READLINKAT=0;
17139 GNULIB_RMDIR=0;
17140 GNULIB_SETHOSTNAME=0;
17141 GNULIB_SLEEP=0;
17142 GNULIB_SYMLINK=0;
17143 GNULIB_SYMLINKAT=0;
17144 GNULIB_TTYNAME_R=0;
17145 GNULIB_UNISTD_H_NONBLOCKING=0;
17146 GNULIB_UNISTD_H_SIGPIPE=0;
17147 GNULIB_UNLINK=0;
17148 GNULIB_UNLINKAT=0;
17149 GNULIB_USLEEP=0;
17150 GNULIB_WRITE=0;
17151 HAVE_CHOWN=1;
17152 HAVE_DUP2=1;
17153 HAVE_DUP3=1;
17154 HAVE_EUIDACCESS=1;
17155 HAVE_FACCESSAT=1;
17156 HAVE_FCHDIR=1;
17157 HAVE_FCHOWNAT=1;
17158 HAVE_FDATASYNC=1;
17159 HAVE_FSYNC=1;
17160 HAVE_FTRUNCATE=1;
17161 HAVE_GETDTABLESIZE=1;
17162 HAVE_GETGROUPS=1;
17163 HAVE_GETHOSTNAME=1;
17164 HAVE_GETLOGIN=1;
17165 HAVE_GETPAGESIZE=1;
17166 HAVE_GROUP_MEMBER=1;
17167 HAVE_LCHOWN=1;
17168 HAVE_LINK=1;
17169 HAVE_LINKAT=1;
17170 HAVE_PIPE=1;
17171 HAVE_PIPE2=1;
17172 HAVE_PREAD=1;
17173 HAVE_PWRITE=1;
17174 HAVE_READLINK=1;
17175 HAVE_READLINKAT=1;
17176 HAVE_SETHOSTNAME=1;
17177 HAVE_SLEEP=1;
17178 HAVE_SYMLINK=1;
17179 HAVE_SYMLINKAT=1;
17180 HAVE_UNLINKAT=1;
17181 HAVE_USLEEP=1;
17182 HAVE_DECL_ENVIRON=1;
17183 HAVE_DECL_FCHDIR=1;
17184 HAVE_DECL_FDATASYNC=1;
17185 HAVE_DECL_GETDOMAINNAME=1;
17186 HAVE_DECL_GETLOGIN_R=1;
17187 HAVE_DECL_GETPAGESIZE=1;
17188 HAVE_DECL_GETUSERSHELL=1;
17189 HAVE_DECL_SETHOSTNAME=1;
17190 HAVE_DECL_TTYNAME_R=1;
17191 HAVE_OS_H=0;
17192 HAVE_SYS_PARAM_H=0;
17193 REPLACE_CHOWN=0;
17194 REPLACE_CLOSE=0;
17195 REPLACE_DUP=0;
17196 REPLACE_DUP2=0;
17197 REPLACE_FCHOWNAT=0;
17198 REPLACE_FTRUNCATE=0;
17199 REPLACE_GETCWD=0;
17200 REPLACE_GETDOMAINNAME=0;
17201 REPLACE_GETLOGIN_R=0;
17202 REPLACE_GETGROUPS=0;
17203 REPLACE_GETPAGESIZE=0;
17204 REPLACE_ISATTY=0;
17205 REPLACE_LCHOWN=0;
17206 REPLACE_LINK=0;
17207 REPLACE_LINKAT=0;
17208 REPLACE_LSEEK=0;
17209 REPLACE_PREAD=0;
17210 REPLACE_PWRITE=0;
17211 REPLACE_READ=0;
17212 REPLACE_READLINK=0;
17213 REPLACE_RMDIR=0;
17214 REPLACE_SLEEP=0;
17215 REPLACE_SYMLINK=0;
17216 REPLACE_TTYNAME_R=0;
17217 REPLACE_UNLINK=0;
17218 REPLACE_UNLINKAT=0;
17219 REPLACE_USLEEP=0;
17220 REPLACE_WRITE=0;
17221 UNISTD_H_HAVE_WINSOCK2_H=0;
17222 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
17223
17224
17225
17226 GNULIB_OPENDIR=0;
17227 GNULIB_READDIR=0;
17228 GNULIB_REWINDDIR=0;
17229 GNULIB_CLOSEDIR=0;
17230 GNULIB_DIRFD=0;
17231 GNULIB_FDOPENDIR=0;
17232 GNULIB_SCANDIR=0;
17233 GNULIB_ALPHASORT=0;
17234 HAVE_OPENDIR=1;
17235 HAVE_READDIR=1;
17236 HAVE_REWINDDIR=1;
17237 HAVE_CLOSEDIR=1;
17238 HAVE_DECL_DIRFD=1;
17239 HAVE_DECL_FDOPENDIR=1;
17240 HAVE_FDOPENDIR=1;
17241 HAVE_SCANDIR=1;
17242 HAVE_ALPHASORT=1;
17243 REPLACE_OPENDIR=0;
17244 REPLACE_CLOSEDIR=0;
17245 REPLACE_DIRFD=0;
17246 REPLACE_FDOPENDIR=0;
17247
17248
17249
17250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17251 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17252 if test "${gl_cv_have_include_next+set}" = set; then :
17253 $as_echo_n "(cached) " >&6
17254 else
17255 rm -rf conftestd1a conftestd1b conftestd2
17256 mkdir conftestd1a conftestd1b conftestd2
17257 cat <<EOF > conftestd1a/conftest.h
17258 #define DEFINED_IN_CONFTESTD1
17259 #include_next <conftest.h>
17260 #ifdef DEFINED_IN_CONFTESTD2
17261 int foo;
17262 #else
17263 #error "include_next doesn't work"
17264 #endif
17265 EOF
17266 cat <<EOF > conftestd1b/conftest.h
17267 #define DEFINED_IN_CONFTESTD1
17268 #include <stdio.h>
17269 #include_next <conftest.h>
17270 #ifdef DEFINED_IN_CONFTESTD2
17271 int foo;
17272 #else
17273 #error "include_next doesn't work"
17274 #endif
17275 EOF
17276 cat <<EOF > conftestd2/conftest.h
17277 #ifndef DEFINED_IN_CONFTESTD1
17278 #error "include_next test doesn't work"
17279 #endif
17280 #define DEFINED_IN_CONFTESTD2
17281 EOF
17282 gl_save_CPPFLAGS="$CPPFLAGS"
17283 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17285 /* end confdefs.h. */
17286 #include <conftest.h>
17287 _ACEOF
17288 if ac_fn_c_try_compile "$LINENO"; then :
17289 gl_cv_have_include_next=yes
17290 else
17291 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293 /* end confdefs.h. */
17294 #include <conftest.h>
17295 _ACEOF
17296 if ac_fn_c_try_compile "$LINENO"; then :
17297 gl_cv_have_include_next=buggy
17298 else
17299 gl_cv_have_include_next=no
17300 fi
17301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17302
17303 fi
17304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17305 CPPFLAGS="$gl_save_CPPFLAGS"
17306 rm -rf conftestd1a conftestd1b conftestd2
17307
17308 fi
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17310 $as_echo "$gl_cv_have_include_next" >&6; }
17311 PRAGMA_SYSTEM_HEADER=
17312 if test $gl_cv_have_include_next = yes; then
17313 INCLUDE_NEXT=include_next
17314 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17315 if test -n "$GCC"; then
17316 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17317 fi
17318 else
17319 if test $gl_cv_have_include_next = buggy; then
17320 INCLUDE_NEXT=include
17321 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17322 else
17323 INCLUDE_NEXT=include
17324 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17325 fi
17326 fi
17327
17328
17329
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17331 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17332 if test "${gl_cv_pragma_columns+set}" = set; then :
17333 $as_echo_n "(cached) " >&6
17334 else
17335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h. */
17337
17338 #ifdef __TANDEM
17339 choke me
17340 #endif
17341
17342 _ACEOF
17343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17344 $EGREP "choke me" >/dev/null 2>&1; then :
17345 gl_cv_pragma_columns=yes
17346 else
17347 gl_cv_pragma_columns=no
17348 fi
17349 rm -f conftest*
17350
17351
17352 fi
17353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17354 $as_echo "$gl_cv_pragma_columns" >&6; }
17355 if test $gl_cv_pragma_columns = yes; then
17356 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17357 else
17358 PRAGMA_COLUMNS=
17359 fi
17360
17361
17362
17363
17364
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17366 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
17367 if test "${gl_cv_func_c99_strtold+set}" = set; then :
17368 $as_echo_n "(cached) " >&6
17369 else
17370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17371 /* end confdefs.h. */
17372 /* On HP-UX before 11.23, strtold returns a struct instead of
17373 long double. Reject implementations like that, by requiring
17374 compatibility with the C99 prototype. */
17375 #include <stdlib.h>
17376 static long double (*p) (char const *, char **) = strtold;
17377 static long double
17378 test (char const *nptr, char **endptr)
17379 {
17380 long double r;
17381 r = strtold (nptr, endptr);
17382 return r;
17383 }
17384 int
17385 main ()
17386 {
17387 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
17388 ;
17389 return 0;
17390 }
17391 _ACEOF
17392 if ac_fn_c_try_link "$LINENO"; then :
17393 gl_cv_func_c99_strtold=yes
17394 else
17395 gl_cv_func_c99_strtold=no
17396 fi
17397 rm -f core conftest.err conftest.$ac_objext \
17398 conftest$ac_exeext conftest.$ac_ext
17399 fi
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17401 $as_echo "$gl_cv_func_c99_strtold" >&6; }
17402 if test $gl_cv_func_c99_strtold = yes; then
17403
17404 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
17405
17406 fi
17407
17408
17409
17410
17411
17412
17413
17414
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17416 $as_echo_n "checking if environ is properly declared... " >&6; }
17417 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17418 $as_echo_n "(cached) " >&6
17419 else
17420
17421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17422 /* end confdefs.h. */
17423 #if HAVE_UNISTD_H
17424 #include <unistd.h>
17425 #endif
17426 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17427 #include <stdlib.h>
17428
17429 extern struct { int foo; } environ;
17430 int
17431 main ()
17432 {
17433 environ.foo = 1;
17434 ;
17435 return 0;
17436 }
17437 _ACEOF
17438 if ac_fn_c_try_compile "$LINENO"; then :
17439 gt_cv_var_environ_declaration=no
17440 else
17441 gt_cv_var_environ_declaration=yes
17442 fi
17443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17444 fi
17445
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17447 $as_echo "$gt_cv_var_environ_declaration" >&6; }
17448 if test $gt_cv_var_environ_declaration = yes; then
17449
17450 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17451
17452 fi
17453
17454
17455 if test $gt_cv_var_environ_declaration != yes; then
17456 HAVE_DECL_ENVIRON=0
17457 fi
17458
17459
17460
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
17462 $as_echo_n "checking for complete errno.h... " >&6; }
17463 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
17464 $as_echo_n "(cached) " >&6
17465 else
17466
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h. */
17469
17470 #include <errno.h>
17471 #if !defined ETXTBSY
17472 booboo
17473 #endif
17474 #if !defined ENOMSG
17475 booboo
17476 #endif
17477 #if !defined EIDRM
17478 booboo
17479 #endif
17480 #if !defined ENOLINK
17481 booboo
17482 #endif
17483 #if !defined EPROTO
17484 booboo
17485 #endif
17486 #if !defined EMULTIHOP
17487 booboo
17488 #endif
17489 #if !defined EBADMSG
17490 booboo
17491 #endif
17492 #if !defined EOVERFLOW
17493 booboo
17494 #endif
17495 #if !defined ENOTSUP
17496 booboo
17497 #endif
17498 #if !defined ENETRESET
17499 booboo
17500 #endif
17501 #if !defined ECONNABORTED
17502 booboo
17503 #endif
17504 #if !defined ESTALE
17505 booboo
17506 #endif
17507 #if !defined EDQUOT
17508 booboo
17509 #endif
17510 #if !defined ECANCELED
17511 booboo
17512 #endif
17513 #if !defined EOWNERDEAD
17514 booboo
17515 #endif
17516 #if !defined ENOTRECOVERABLE
17517 booboo
17518 #endif
17519 #if !defined EILSEQ
17520 booboo
17521 #endif
17522
17523 _ACEOF
17524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17525 $EGREP "booboo" >/dev/null 2>&1; then :
17526 gl_cv_header_errno_h_complete=no
17527 else
17528 gl_cv_header_errno_h_complete=yes
17529 fi
17530 rm -f conftest*
17531
17532
17533 fi
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
17535 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
17536 if test $gl_cv_header_errno_h_complete = yes; then
17537 ERRNO_H=''
17538 else
17539
17540
17541
17542
17543
17544
17545
17546
17547 if test $gl_cv_have_include_next = yes; then
17548 gl_cv_next_errno_h='<'errno.h'>'
17549 else
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
17551 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
17552 if test "${gl_cv_next_errno_h+set}" = set; then :
17553 $as_echo_n "(cached) " >&6
17554 else
17555
17556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17557 /* end confdefs.h. */
17558 #include <errno.h>
17559
17560 _ACEOF
17561 case "$host_os" in
17562 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17563 *) gl_absname_cpp="$ac_cpp" ;;
17564 esac
17565
17566 case "$host_os" in
17567 mingw*)
17568 gl_dirsep_regex='[/\\]'
17569 ;;
17570 *)
17571 gl_dirsep_regex='\/'
17572 ;;
17573 esac
17574 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17575
17576 gl_header_literal_regex=`echo 'errno.h' \
17577 | sed -e "$gl_make_literal_regex_sed"`
17578 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17579 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17580 s|^/[^/]|//&|
17581 p
17582 q
17583 }'
17584 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17585 sed -n "$gl_absolute_header_sed"`'"'
17586
17587
17588 fi
17589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
17590 $as_echo "$gl_cv_next_errno_h" >&6; }
17591 fi
17592 NEXT_ERRNO_H=$gl_cv_next_errno_h
17593
17594 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17595 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17596 gl_next_as_first_directive='<'errno.h'>'
17597 else
17598 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17599 gl_next_as_first_directive=$gl_cv_next_errno_h
17600 fi
17601 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
17602
17603
17604
17605
17606 ERRNO_H='errno.h'
17607 fi
17608
17609 if test -n "$ERRNO_H"; then
17610 GL_GENERATE_ERRNO_H_TRUE=
17611 GL_GENERATE_ERRNO_H_FALSE='#'
17612 else
17613 GL_GENERATE_ERRNO_H_TRUE='#'
17614 GL_GENERATE_ERRNO_H_FALSE=
17615 fi
17616
17617
17618 if test -n "$ERRNO_H"; then
17619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
17620 $as_echo_n "checking for EMULTIHOP value... " >&6; }
17621 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
17622 $as_echo_n "(cached) " >&6
17623 else
17624
17625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17626 /* end confdefs.h. */
17627
17628 #include <errno.h>
17629 #ifdef EMULTIHOP
17630 yes
17631 #endif
17632
17633 _ACEOF
17634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17635 $EGREP "yes" >/dev/null 2>&1; then :
17636 gl_cv_header_errno_h_EMULTIHOP=yes
17637 else
17638 gl_cv_header_errno_h_EMULTIHOP=no
17639 fi
17640 rm -f conftest*
17641
17642 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
17643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17644 /* end confdefs.h. */
17645
17646 #define _XOPEN_SOURCE_EXTENDED 1
17647 #include <errno.h>
17648 #ifdef EMULTIHOP
17649 yes
17650 #endif
17651
17652 _ACEOF
17653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17654 $EGREP "yes" >/dev/null 2>&1; then :
17655 gl_cv_header_errno_h_EMULTIHOP=hidden
17656 fi
17657 rm -f conftest*
17658
17659 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
17660 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
17661 #define _XOPEN_SOURCE_EXTENDED 1
17662 #include <errno.h>
17663 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17664 #include <stdio.h>
17665 #include <stdlib.h>
17666 "; then :
17667
17668 fi
17669
17670 fi
17671 fi
17672
17673 fi
17674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
17675 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
17676 case $gl_cv_header_errno_h_EMULTIHOP in
17677 yes | no)
17678 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
17679 ;;
17680 *)
17681 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
17682 ;;
17683 esac
17684
17685
17686 fi
17687
17688
17689 if test -n "$ERRNO_H"; then
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
17691 $as_echo_n "checking for ENOLINK value... " >&6; }
17692 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
17693 $as_echo_n "(cached) " >&6
17694 else
17695
17696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17697 /* end confdefs.h. */
17698
17699 #include <errno.h>
17700 #ifdef ENOLINK
17701 yes
17702 #endif
17703
17704 _ACEOF
17705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17706 $EGREP "yes" >/dev/null 2>&1; then :
17707 gl_cv_header_errno_h_ENOLINK=yes
17708 else
17709 gl_cv_header_errno_h_ENOLINK=no
17710 fi
17711 rm -f conftest*
17712
17713 if test $gl_cv_header_errno_h_ENOLINK = no; then
17714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17715 /* end confdefs.h. */
17716
17717 #define _XOPEN_SOURCE_EXTENDED 1
17718 #include <errno.h>
17719 #ifdef ENOLINK
17720 yes
17721 #endif
17722
17723 _ACEOF
17724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17725 $EGREP "yes" >/dev/null 2>&1; then :
17726 gl_cv_header_errno_h_ENOLINK=hidden
17727 fi
17728 rm -f conftest*
17729
17730 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
17731 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
17732 #define _XOPEN_SOURCE_EXTENDED 1
17733 #include <errno.h>
17734 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17735 #include <stdio.h>
17736 #include <stdlib.h>
17737 "; then :
17738
17739 fi
17740
17741 fi
17742 fi
17743
17744 fi
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
17746 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
17747 case $gl_cv_header_errno_h_ENOLINK in
17748 yes | no)
17749 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
17750 ;;
17751 *)
17752 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
17753 ;;
17754 esac
17755
17756
17757 fi
17758
17759
17760 if test -n "$ERRNO_H"; then
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
17762 $as_echo_n "checking for EOVERFLOW value... " >&6; }
17763 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
17764 $as_echo_n "(cached) " >&6
17765 else
17766
17767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17768 /* end confdefs.h. */
17769
17770 #include <errno.h>
17771 #ifdef EOVERFLOW
17772 yes
17773 #endif
17774
17775 _ACEOF
17776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17777 $EGREP "yes" >/dev/null 2>&1; then :
17778 gl_cv_header_errno_h_EOVERFLOW=yes
17779 else
17780 gl_cv_header_errno_h_EOVERFLOW=no
17781 fi
17782 rm -f conftest*
17783
17784 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
17785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17786 /* end confdefs.h. */
17787
17788 #define _XOPEN_SOURCE_EXTENDED 1
17789 #include <errno.h>
17790 #ifdef EOVERFLOW
17791 yes
17792 #endif
17793
17794 _ACEOF
17795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17796 $EGREP "yes" >/dev/null 2>&1; then :
17797 gl_cv_header_errno_h_EOVERFLOW=hidden
17798 fi
17799 rm -f conftest*
17800
17801 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
17802 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
17803 #define _XOPEN_SOURCE_EXTENDED 1
17804 #include <errno.h>
17805 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17806 #include <stdio.h>
17807 #include <stdlib.h>
17808 "; then :
17809
17810 fi
17811
17812 fi
17813 fi
17814
17815 fi
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
17817 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
17818 case $gl_cv_header_errno_h_EOVERFLOW in
17819 yes | no)
17820 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
17821 ;;
17822 *)
17823 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
17824 ;;
17825 esac
17826
17827
17828 fi
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839 GNULIB_FCNTL=0;
17840 GNULIB_NONBLOCKING=0;
17841 GNULIB_OPEN=0;
17842 GNULIB_OPENAT=0;
17843 HAVE_FCNTL=1;
17844 HAVE_OPENAT=1;
17845 REPLACE_FCNTL=0;
17846 REPLACE_OPEN=0;
17847 REPLACE_OPENAT=0;
17848
17849
17850 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17851 if test "x$ac_cv_type_mode_t" = x""yes; then :
17852
17853 else
17854
17855 cat >>confdefs.h <<_ACEOF
17856 #define mode_t int
17857 _ACEOF
17858
17859 fi
17860
17861 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
17862 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
17863 ac_have_decl=1
17864 else
17865 ac_have_decl=0
17866 fi
17867
17868 cat >>confdefs.h <<_ACEOF
17869 #define HAVE_DECL_FDATASYNC $ac_have_decl
17870 _ACEOF
17871
17872
17873
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17875 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17876 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17877 $as_echo_n "(cached) " >&6
17878 else
17879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17880 /* end confdefs.h. */
17881
17882 #include <sys/types.h>
17883 #include <sys/stat.h>
17884 int
17885 main ()
17886 {
17887 struct stat s; s.st_dm_mode;
17888 ;
17889 return 0;
17890 }
17891 _ACEOF
17892 if ac_fn_c_try_compile "$LINENO"; then :
17893 ac_cv_struct_st_dm_mode=yes
17894 else
17895 ac_cv_struct_st_dm_mode=no
17896 fi
17897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17898 fi
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17900 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17901
17902 if test $ac_cv_struct_st_dm_mode = yes; then
17903
17904 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17905
17906 fi
17907
17908
17909 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17910 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17911 ac_have_decl=1
17912 else
17913 ac_have_decl=0
17914 fi
17915
17916 cat >>confdefs.h <<_ACEOF
17917 #define HAVE_DECL_STRMODE $ac_have_decl
17918 _ACEOF
17919
17920
17921
17922
17923
17924
17925 GNULIB_FCHMODAT=0;
17926 GNULIB_FSTAT=0;
17927 GNULIB_FSTATAT=0;
17928 GNULIB_FUTIMENS=0;
17929 GNULIB_LCHMOD=0;
17930 GNULIB_LSTAT=0;
17931 GNULIB_MKDIRAT=0;
17932 GNULIB_MKFIFO=0;
17933 GNULIB_MKFIFOAT=0;
17934 GNULIB_MKNOD=0;
17935 GNULIB_MKNODAT=0;
17936 GNULIB_STAT=0;
17937 GNULIB_UTIMENSAT=0;
17938 HAVE_FCHMODAT=1;
17939 HAVE_FSTATAT=1;
17940 HAVE_FUTIMENS=1;
17941 HAVE_LCHMOD=1;
17942 HAVE_LSTAT=1;
17943 HAVE_MKDIRAT=1;
17944 HAVE_MKFIFO=1;
17945 HAVE_MKFIFOAT=1;
17946 HAVE_MKNOD=1;
17947 HAVE_MKNODAT=1;
17948 HAVE_UTIMENSAT=1;
17949 REPLACE_FSTAT=0;
17950 REPLACE_FSTATAT=0;
17951 REPLACE_FUTIMENS=0;
17952 REPLACE_LSTAT=0;
17953 REPLACE_MKDIR=0;
17954 REPLACE_MKFIFO=0;
17955 REPLACE_MKNOD=0;
17956 REPLACE_STAT=0;
17957 REPLACE_UTIMENSAT=0;
17958
17959
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17961 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17962 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17963 $as_echo_n "(cached) " >&6
17964 else
17965 rm -f conftest.sym conftest.file
17966 echo >conftest.file
17967 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17968 if test "$cross_compiling" = yes; then :
17969 case "$host_os" in
17970 # Guess yes on glibc systems.
17971 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17972 # If we don't know, assume the worst.
17973 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17974 esac
17975
17976 else
17977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17978 /* end confdefs.h. */
17979 $ac_includes_default
17980 int
17981 main ()
17982 {
17983 struct stat sbuf;
17984 /* Linux will dereference the symlink and fail, as required by
17985 POSIX. That is better in the sense that it means we will not
17986 have to compile and use the lstat wrapper. */
17987 return lstat ("conftest.sym/", &sbuf) == 0;
17988
17989 ;
17990 return 0;
17991 }
17992 _ACEOF
17993 if ac_fn_c_try_run "$LINENO"; then :
17994 gl_cv_func_lstat_dereferences_slashed_symlink=yes
17995 else
17996 gl_cv_func_lstat_dereferences_slashed_symlink=no
17997 fi
17998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17999 conftest.$ac_objext conftest.beam conftest.$ac_ext
18000 fi
18001
18002 else
18003 # If the 'ln -s' command failed, then we probably don't even
18004 # have an lstat function.
18005 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18006 fi
18007 rm -f conftest.sym conftest.file
18008
18009 fi
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18011 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18012 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18013 *yes)
18014
18015 cat >>confdefs.h <<_ACEOF
18016 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18017 _ACEOF
18018
18019 ;;
18020 esac
18021
18022
18023
18024
18025
18026
18027 GNULIB__EXIT=0;
18028 GNULIB_ATOLL=0;
18029 GNULIB_CALLOC_POSIX=0;
18030 GNULIB_CANONICALIZE_FILE_NAME=0;
18031 GNULIB_GETLOADAVG=0;
18032 GNULIB_GETSUBOPT=0;
18033 GNULIB_GRANTPT=0;
18034 GNULIB_MALLOC_POSIX=0;
18035 GNULIB_MBTOWC=0;
18036 GNULIB_MKDTEMP=0;
18037 GNULIB_MKOSTEMP=0;
18038 GNULIB_MKOSTEMPS=0;
18039 GNULIB_MKSTEMP=0;
18040 GNULIB_MKSTEMPS=0;
18041 GNULIB_POSIX_OPENPT=0;
18042 GNULIB_PTSNAME=0;
18043 GNULIB_PTSNAME_R=0;
18044 GNULIB_PUTENV=0;
18045 GNULIB_RANDOM=0;
18046 GNULIB_RANDOM_R=0;
18047 GNULIB_REALLOC_POSIX=0;
18048 GNULIB_REALPATH=0;
18049 GNULIB_RPMATCH=0;
18050 GNULIB_SECURE_GETENV=0;
18051 GNULIB_SETENV=0;
18052 GNULIB_STRTOD=0;
18053 GNULIB_STRTOLL=0;
18054 GNULIB_STRTOULL=0;
18055 GNULIB_SYSTEM_POSIX=0;
18056 GNULIB_UNLOCKPT=0;
18057 GNULIB_UNSETENV=0;
18058 GNULIB_WCTOMB=0;
18059 HAVE__EXIT=1;
18060 HAVE_ATOLL=1;
18061 HAVE_CANONICALIZE_FILE_NAME=1;
18062 HAVE_DECL_GETLOADAVG=1;
18063 HAVE_GETSUBOPT=1;
18064 HAVE_GRANTPT=1;
18065 HAVE_MKDTEMP=1;
18066 HAVE_MKOSTEMP=1;
18067 HAVE_MKOSTEMPS=1;
18068 HAVE_MKSTEMP=1;
18069 HAVE_MKSTEMPS=1;
18070 HAVE_POSIX_OPENPT=1;
18071 HAVE_PTSNAME=1;
18072 HAVE_PTSNAME_R=1;
18073 HAVE_RANDOM=1;
18074 HAVE_RANDOM_H=1;
18075 HAVE_RANDOM_R=1;
18076 HAVE_REALPATH=1;
18077 HAVE_RPMATCH=1;
18078 HAVE_SECURE_GETENV=1;
18079 HAVE_SETENV=1;
18080 HAVE_DECL_SETENV=1;
18081 HAVE_STRTOD=1;
18082 HAVE_STRTOLL=1;
18083 HAVE_STRTOULL=1;
18084 HAVE_STRUCT_RANDOM_DATA=1;
18085 HAVE_SYS_LOADAVG_H=0;
18086 HAVE_UNLOCKPT=1;
18087 HAVE_DECL_UNSETENV=1;
18088 REPLACE_CALLOC=0;
18089 REPLACE_CANONICALIZE_FILE_NAME=0;
18090 REPLACE_MALLOC=0;
18091 REPLACE_MBTOWC=0;
18092 REPLACE_MKSTEMP=0;
18093 REPLACE_PTSNAME=0;
18094 REPLACE_PTSNAME_R=0;
18095 REPLACE_PUTENV=0;
18096 REPLACE_RANDOM_R=0;
18097 REPLACE_REALLOC=0;
18098 REPLACE_REALPATH=0;
18099 REPLACE_SETENV=0;
18100 REPLACE_STRTOD=0;
18101 REPLACE_UNSETENV=0;
18102 REPLACE_WCTOMB=0;
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119 if test $gl_cv_have_include_next = yes; then
18120 gl_cv_next_getopt_h='<'getopt.h'>'
18121 else
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18123 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18124 if test "${gl_cv_next_getopt_h+set}" = set; then :
18125 $as_echo_n "(cached) " >&6
18126 else
18127
18128 if test $ac_cv_header_getopt_h = yes; then
18129
18130
18131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18132 /* end confdefs.h. */
18133 #include <getopt.h>
18134
18135 _ACEOF
18136 case "$host_os" in
18137 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18138 *) gl_absname_cpp="$ac_cpp" ;;
18139 esac
18140
18141 case "$host_os" in
18142 mingw*)
18143 gl_dirsep_regex='[/\\]'
18144 ;;
18145 *)
18146 gl_dirsep_regex='\/'
18147 ;;
18148 esac
18149 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18150
18151 gl_header_literal_regex=`echo 'getopt.h' \
18152 | sed -e "$gl_make_literal_regex_sed"`
18153 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18154 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18155 s|^/[^/]|//&|
18156 p
18157 q
18158 }'
18159 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18160 sed -n "$gl_absolute_header_sed"`'"'
18161 else
18162 gl_cv_next_getopt_h='<'getopt.h'>'
18163 fi
18164
18165
18166 fi
18167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18168 $as_echo "$gl_cv_next_getopt_h" >&6; }
18169 fi
18170 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18171
18172 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18173 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18174 gl_next_as_first_directive='<'getopt.h'>'
18175 else
18176 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18177 gl_next_as_first_directive=$gl_cv_next_getopt_h
18178 fi
18179 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18180
18181
18182
18183
18184 if test $ac_cv_header_getopt_h = yes; then
18185 HAVE_GETOPT_H=1
18186 else
18187 HAVE_GETOPT_H=0
18188 fi
18189
18190
18191 gl_replace_getopt=
18192
18193 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18194 for ac_header in getopt.h
18195 do :
18196 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18197 if test "x$ac_cv_header_getopt_h" = x""yes; then :
18198 cat >>confdefs.h <<_ACEOF
18199 #define HAVE_GETOPT_H 1
18200 _ACEOF
18201
18202 else
18203 gl_replace_getopt=yes
18204 fi
18205
18206 done
18207
18208 fi
18209
18210 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18211 for ac_func in getopt_long_only
18212 do :
18213 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18214 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18215 cat >>confdefs.h <<_ACEOF
18216 #define HAVE_GETOPT_LONG_ONLY 1
18217 _ACEOF
18218
18219 else
18220 gl_replace_getopt=yes
18221 fi
18222 done
18223
18224 fi
18225
18226 if test -z "$gl_replace_getopt"; then
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18228 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18229 if test "${gl_cv_func_getopt_posix+set}" = set; then :
18230 $as_echo_n "(cached) " >&6
18231 else
18232
18233 if test $cross_compiling = no; then
18234 if test "$cross_compiling" = yes; then :
18235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18236 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18237 as_fn_error "cannot run test program while cross compiling
18238 See \`config.log' for more details." "$LINENO" 5; }
18239 else
18240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18241 /* end confdefs.h. */
18242
18243 #include <unistd.h>
18244 #include <stdlib.h>
18245 #include <string.h>
18246
18247 int
18248 main ()
18249 {
18250 static char program[] = "program";
18251 static char a[] = "-a";
18252 static char foo[] = "foo";
18253 static char bar[] = "bar";
18254 char *argv[] = { program, a, foo, bar, NULL };
18255 int c;
18256
18257 c = getopt (4, argv, "ab");
18258 if (!(c == 'a'))
18259 return 1;
18260 c = getopt (4, argv, "ab");
18261 if (!(c == -1))
18262 return 2;
18263 if (!(optind == 2))
18264 return 3;
18265 return 0;
18266 }
18267
18268 _ACEOF
18269 if ac_fn_c_try_run "$LINENO"; then :
18270 gl_cv_func_getopt_posix=maybe
18271 else
18272 gl_cv_func_getopt_posix=no
18273 fi
18274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18275 conftest.$ac_objext conftest.beam conftest.$ac_ext
18276 fi
18277
18278 if test $gl_cv_func_getopt_posix = maybe; then
18279 if test "$cross_compiling" = yes; then :
18280 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18281 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18282 as_fn_error "cannot run test program while cross compiling
18283 See \`config.log' for more details." "$LINENO" 5; }
18284 else
18285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18286 /* end confdefs.h. */
18287
18288 #include <unistd.h>
18289 #include <stdlib.h>
18290 #include <string.h>
18291
18292 int
18293 main ()
18294 {
18295 static char program[] = "program";
18296 static char donald[] = "donald";
18297 static char p[] = "-p";
18298 static char billy[] = "billy";
18299 static char duck[] = "duck";
18300 static char a[] = "-a";
18301 static char bar[] = "bar";
18302 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18303 int c;
18304
18305 c = getopt (7, argv, "+abp:q:");
18306 if (!(c == -1))
18307 return 4;
18308 if (!(strcmp (argv[0], "program") == 0))
18309 return 5;
18310 if (!(strcmp (argv[1], "donald") == 0))
18311 return 6;
18312 if (!(strcmp (argv[2], "-p") == 0))
18313 return 7;
18314 if (!(strcmp (argv[3], "billy") == 0))
18315 return 8;
18316 if (!(strcmp (argv[4], "duck") == 0))
18317 return 9;
18318 if (!(strcmp (argv[5], "-a") == 0))
18319 return 10;
18320 if (!(strcmp (argv[6], "bar") == 0))
18321 return 11;
18322 if (!(optind == 1))
18323 return 12;
18324 return 0;
18325 }
18326
18327 _ACEOF
18328 if ac_fn_c_try_run "$LINENO"; then :
18329 gl_cv_func_getopt_posix=maybe
18330 else
18331 gl_cv_func_getopt_posix=no
18332 fi
18333 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18334 conftest.$ac_objext conftest.beam conftest.$ac_ext
18335 fi
18336
18337 fi
18338 if test $gl_cv_func_getopt_posix = maybe; then
18339 if test "$cross_compiling" = yes; then :
18340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18342 as_fn_error "cannot run test program while cross compiling
18343 See \`config.log' for more details." "$LINENO" 5; }
18344 else
18345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18346 /* end confdefs.h. */
18347
18348 #include <unistd.h>
18349 #include <stdlib.h>
18350 #include <string.h>
18351
18352 int
18353 main ()
18354 {
18355 static char program[] = "program";
18356 static char ab[] = "-ab";
18357 char *argv[3] = { program, ab, NULL };
18358 if (getopt (2, argv, "ab:") != 'a')
18359 return 13;
18360 if (getopt (2, argv, "ab:") != '?')
18361 return 14;
18362 if (optopt != 'b')
18363 return 15;
18364 if (optind != 2)
18365 return 16;
18366 return 0;
18367 }
18368
18369 _ACEOF
18370 if ac_fn_c_try_run "$LINENO"; then :
18371 gl_cv_func_getopt_posix=yes
18372 else
18373 gl_cv_func_getopt_posix=no
18374 fi
18375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18376 conftest.$ac_objext conftest.beam conftest.$ac_ext
18377 fi
18378
18379 fi
18380 else
18381 case "$host_os" in
18382 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18383 *) gl_cv_func_getopt_posix="guessing yes";;
18384 esac
18385 fi
18386
18387 fi
18388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18389 $as_echo "$gl_cv_func_getopt_posix" >&6; }
18390 case "$gl_cv_func_getopt_posix" in
18391 *no) gl_replace_getopt=yes ;;
18392 esac
18393 fi
18394
18395 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18397 $as_echo_n "checking for working GNU getopt function... " >&6; }
18398 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
18399 $as_echo_n "(cached) " >&6
18400 else
18401 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
18402 # optstring is necessary for programs like m4 that have POSIX-mandated
18403 # semantics for supporting options interspersed with files.
18404 # Also, since getopt_long is a GNU extension, we require optind=0.
18405 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
18406 # so take care to revert to the correct (non-)export state.
18407 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
18408 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
18409 xx) gl_had_POSIXLY_CORRECT=exported ;;
18410 x) gl_had_POSIXLY_CORRECT=yes ;;
18411 *) gl_had_POSIXLY_CORRECT= ;;
18412 esac
18413 POSIXLY_CORRECT=1
18414 export POSIXLY_CORRECT
18415 if test "$cross_compiling" = yes; then :
18416 gl_cv_func_getopt_gnu="guessing no"
18417
18418 else
18419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18420 /* end confdefs.h. */
18421 #include <getopt.h>
18422 #include <stddef.h>
18423 #include <string.h>
18424
18425 #include <stdlib.h>
18426 #if defined __MACH__ && defined __APPLE__
18427 /* Avoid a crash on Mac OS X. */
18428 #include <mach/mach.h>
18429 #include <mach/mach_error.h>
18430 #include <mach/thread_status.h>
18431 #include <mach/exception.h>
18432 #include <mach/task.h>
18433 #include <pthread.h>
18434 /* The exception port on which our thread listens. */
18435 static mach_port_t our_exception_port;
18436 /* The main function of the thread listening for exceptions of type
18437 EXC_BAD_ACCESS. */
18438 static void *
18439 mach_exception_thread (void *arg)
18440 {
18441 /* Buffer for a message to be received. */
18442 struct {
18443 mach_msg_header_t head;
18444 mach_msg_body_t msgh_body;
18445 char data[1024];
18446 } msg;
18447 mach_msg_return_t retval;
18448 /* Wait for a message on the exception port. */
18449 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18450 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18451 if (retval != MACH_MSG_SUCCESS)
18452 abort ();
18453 exit (1);
18454 }
18455 static void
18456 nocrash_init (void)
18457 {
18458 mach_port_t self = mach_task_self ();
18459 /* Allocate a port on which the thread shall listen for exceptions. */
18460 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18461 == KERN_SUCCESS) {
18462 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
18463 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18464 MACH_MSG_TYPE_MAKE_SEND)
18465 == KERN_SUCCESS) {
18466 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
18467 for us. */
18468 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18469 /* Create the thread listening on the exception port. */
18470 pthread_attr_t attr;
18471 pthread_t thread;
18472 if (pthread_attr_init (&attr) == 0
18473 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18474 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18475 pthread_attr_destroy (&attr);
18476 /* Replace the exception port info for these exceptions with our own.
18477 Note that we replace the exception port for the entire task, not only
18478 for a particular thread. This has the effect that when our exception
18479 port gets the message, the thread specific exception port has already
18480 been asked, and we don't need to bother about it.
18481 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
18482 task_set_exception_ports (self, mask, our_exception_port,
18483 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18484 }
18485 }
18486 }
18487 }
18488 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18489 /* Avoid a crash on native Windows. */
18490 #define WIN32_LEAN_AND_MEAN
18491 #include <windows.h>
18492 #include <winerror.h>
18493 static LONG WINAPI
18494 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
18495 {
18496 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
18497 {
18498 case EXCEPTION_ACCESS_VIOLATION:
18499 case EXCEPTION_IN_PAGE_ERROR:
18500 case EXCEPTION_STACK_OVERFLOW:
18501 case EXCEPTION_GUARD_PAGE:
18502 case EXCEPTION_PRIV_INSTRUCTION:
18503 case EXCEPTION_ILLEGAL_INSTRUCTION:
18504 case EXCEPTION_DATATYPE_MISALIGNMENT:
18505 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
18506 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
18507 exit (1);
18508 }
18509 return EXCEPTION_CONTINUE_SEARCH;
18510 }
18511 static void
18512 nocrash_init (void)
18513 {
18514 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
18515 }
18516 #else
18517 /* Avoid a crash on POSIX systems. */
18518 #include <signal.h>
18519 /* A POSIX signal handler. */
18520 static void
18521 exception_handler (int sig)
18522 {
18523 exit (1);
18524 }
18525 static void
18526 nocrash_init (void)
18527 {
18528 #ifdef SIGSEGV
18529 signal (SIGSEGV, exception_handler);
18530 #endif
18531 #ifdef SIGBUS
18532 signal (SIGBUS, exception_handler);
18533 #endif
18534 }
18535 #endif
18536
18537
18538 int
18539 main ()
18540 {
18541
18542 int result = 0;
18543
18544 nocrash_init();
18545
18546 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
18547 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
18548 OSF/1 5.1, Solaris 10. */
18549 {
18550 static char conftest[] = "conftest";
18551 static char plus[] = "-+";
18552 char *argv[3] = { conftest, plus, NULL };
18553 opterr = 0;
18554 if (getopt (2, argv, "+a") != '?')
18555 result |= 1;
18556 }
18557 /* This code succeeds on glibc 2.8, mingw,
18558 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
18559 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
18560 {
18561 static char program[] = "program";
18562 static char p[] = "-p";
18563 static char foo[] = "foo";
18564 static char bar[] = "bar";
18565 char *argv[] = { program, p, foo, bar, NULL };
18566
18567 optind = 1;
18568 if (getopt (4, argv, "p::") != 'p')
18569 result |= 2;
18570 else if (optarg != NULL)
18571 result |= 4;
18572 else if (getopt (4, argv, "p::") != -1)
18573 result |= 6;
18574 else if (optind != 2)
18575 result |= 8;
18576 }
18577 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
18578 {
18579 static char program[] = "program";
18580 static char foo[] = "foo";
18581 static char p[] = "-p";
18582 char *argv[] = { program, foo, p, NULL };
18583 optind = 0;
18584 if (getopt (3, argv, "-p") != 1)
18585 result |= 16;
18586 else if (getopt (3, argv, "-p") != 'p')
18587 result |= 16;
18588 }
18589 /* This code fails on glibc 2.11. */
18590 {
18591 static char program[] = "program";
18592 static char b[] = "-b";
18593 static char a[] = "-a";
18594 char *argv[] = { program, b, a, NULL };
18595 optind = opterr = 0;
18596 if (getopt (3, argv, "+:a:b") != 'b')
18597 result |= 32;
18598 else if (getopt (3, argv, "+:a:b") != ':')
18599 result |= 32;
18600 }
18601 /* This code dumps core on glibc 2.14. */
18602 {
18603 static char program[] = "program";
18604 static char w[] = "-W";
18605 static char dummy[] = "dummy";
18606 char *argv[] = { program, w, dummy, NULL };
18607 optind = opterr = 1;
18608 if (getopt (3, argv, "W;") != 'W')
18609 result |= 64;
18610 }
18611 return result;
18612
18613 ;
18614 return 0;
18615 }
18616 _ACEOF
18617 if ac_fn_c_try_run "$LINENO"; then :
18618 gl_cv_func_getopt_gnu=yes
18619 else
18620 gl_cv_func_getopt_gnu=no
18621 fi
18622 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18623 conftest.$ac_objext conftest.beam conftest.$ac_ext
18624 fi
18625
18626 case $gl_had_POSIXLY_CORRECT in
18627 exported) ;;
18628 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
18629 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
18630 esac
18631
18632 fi
18633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
18634 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
18635 if test "$gl_cv_func_getopt_gnu" != yes; then
18636 gl_replace_getopt=yes
18637 else
18638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
18639 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
18640 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
18641 $as_echo_n "(cached) " >&6
18642 else
18643 if test "$cross_compiling" = yes; then :
18644 case "$host_os" in
18645 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
18646 *) gl_cv_func_getopt_long_gnu="guessing yes";;
18647 esac
18648
18649 else
18650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18651 /* end confdefs.h. */
18652 #include <getopt.h>
18653 #include <stddef.h>
18654 #include <string.h>
18655
18656 int
18657 main ()
18658 {
18659 static const struct option long_options[] =
18660 {
18661 { "xtremely-",no_argument, NULL, 1003 },
18662 { "xtra", no_argument, NULL, 1001 },
18663 { "xtreme", no_argument, NULL, 1002 },
18664 { "xtremely", no_argument, NULL, 1003 },
18665 { NULL, 0, NULL, 0 }
18666 };
18667 /* This code fails on OpenBSD 5.0. */
18668 {
18669 static char program[] = "program";
18670 static char xtremel[] = "--xtremel";
18671 char *argv[] = { program, xtremel, NULL };
18672 int option_index;
18673 optind = 1; opterr = 0;
18674 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
18675 return 1;
18676 }
18677 return 0;
18678
18679 ;
18680 return 0;
18681 }
18682 _ACEOF
18683 if ac_fn_c_try_run "$LINENO"; then :
18684 gl_cv_func_getopt_long_gnu=yes
18685 else
18686 gl_cv_func_getopt_long_gnu=no
18687 fi
18688 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18689 conftest.$ac_objext conftest.beam conftest.$ac_ext
18690 fi
18691
18692
18693 fi
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
18695 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
18696 case "$gl_cv_func_getopt_long_gnu" in
18697 *yes) ;;
18698 *) gl_replace_getopt=yes ;;
18699 esac
18700 fi
18701 fi
18702
18703
18704
18705
18706
18707
18708 REPLACE_GETOPT=0
18709 if test -n "$gl_replace_getopt"; then
18710 REPLACE_GETOPT=1
18711 fi
18712
18713 if test $REPLACE_GETOPT = 1; then
18714
18715 GETOPT_H=getopt.h
18716
18717 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
18718
18719
18720
18721 fi
18722
18723 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
18724 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
18725 ac_have_decl=1
18726 else
18727 ac_have_decl=0
18728 fi
18729
18730 cat >>confdefs.h <<_ACEOF
18731 #define HAVE_DECL_GETENV $ac_have_decl
18732 _ACEOF
18733
18734 :
18735
18736
18737
18738
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18740 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18741 if test "${ac_cv_c_restrict+set}" = set; then :
18742 $as_echo_n "(cached) " >&6
18743 else
18744 ac_cv_c_restrict=no
18745 # The order here caters to the fact that C++ does not require restrict.
18746 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18748 /* end confdefs.h. */
18749 typedef int * int_ptr;
18750 int foo (int_ptr $ac_kw ip) {
18751 return ip[0];
18752 }
18753 int
18754 main ()
18755 {
18756 int s[1];
18757 int * $ac_kw t = s;
18758 t[0] = 0;
18759 return foo(t)
18760 ;
18761 return 0;
18762 }
18763 _ACEOF
18764 if ac_fn_c_try_compile "$LINENO"; then :
18765 ac_cv_c_restrict=$ac_kw
18766 fi
18767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18768 test "$ac_cv_c_restrict" != no && break
18769 done
18770
18771 fi
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18773 $as_echo "$ac_cv_c_restrict" >&6; }
18774
18775 case $ac_cv_c_restrict in
18776 restrict) ;;
18777 no) $as_echo "#define restrict /**/" >>confdefs.h
18778 ;;
18779 *) cat >>confdefs.h <<_ACEOF
18780 #define restrict $ac_cv_c_restrict
18781 _ACEOF
18782 ;;
18783 esac
18784
18785
18786 GNULIB_GETTIMEOFDAY=0;
18787 HAVE_GETTIMEOFDAY=1;
18788 HAVE_STRUCT_TIMEVAL=1;
18789 HAVE_SYS_TIME_H=1;
18790 REPLACE_GETTIMEOFDAY=0;
18791 REPLACE_STRUCT_TIMEVAL=0;
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808 if test $gl_cv_have_include_next = yes; then
18809 gl_cv_next_sys_time_h='<'sys/time.h'>'
18810 else
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
18812 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
18813 if test "${gl_cv_next_sys_time_h+set}" = set; then :
18814 $as_echo_n "(cached) " >&6
18815 else
18816
18817 if test $ac_cv_header_sys_time_h = yes; then
18818
18819
18820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18821 /* end confdefs.h. */
18822 #include <sys/time.h>
18823
18824 _ACEOF
18825 case "$host_os" in
18826 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18827 *) gl_absname_cpp="$ac_cpp" ;;
18828 esac
18829
18830 case "$host_os" in
18831 mingw*)
18832 gl_dirsep_regex='[/\\]'
18833 ;;
18834 *)
18835 gl_dirsep_regex='\/'
18836 ;;
18837 esac
18838 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18839
18840 gl_header_literal_regex=`echo 'sys/time.h' \
18841 | sed -e "$gl_make_literal_regex_sed"`
18842 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18843 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18844 s|^/[^/]|//&|
18845 p
18846 q
18847 }'
18848 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18849 sed -n "$gl_absolute_header_sed"`'"'
18850 else
18851 gl_cv_next_sys_time_h='<'sys/time.h'>'
18852 fi
18853
18854
18855 fi
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18857 $as_echo "$gl_cv_next_sys_time_h" >&6; }
18858 fi
18859 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
18860
18861 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18862 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18863 gl_next_as_first_directive='<'sys/time.h'>'
18864 else
18865 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18866 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18867 fi
18868 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
18869
18870
18871
18872
18873
18874 if test $ac_cv_header_sys_time_h != yes; then
18875 HAVE_SYS_TIME_H=0
18876 fi
18877
18878
18879
18880
18881
18882 if test $ac_cv_header_sys_socket_h != yes; then
18883 for ac_header in winsock2.h
18884 do :
18885 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18886 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18887 cat >>confdefs.h <<_ACEOF
18888 #define HAVE_WINSOCK2_H 1
18889 _ACEOF
18890
18891 fi
18892
18893 done
18894
18895 fi
18896 if test "$ac_cv_header_winsock2_h" = yes; then
18897 HAVE_WINSOCK2_H=1
18898 UNISTD_H_HAVE_WINSOCK2_H=1
18899 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18900 else
18901 HAVE_WINSOCK2_H=0
18902 fi
18903
18904
18905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18906 $as_echo_n "checking for struct timeval... " >&6; }
18907 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18908 $as_echo_n "(cached) " >&6
18909 else
18910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18911 /* end confdefs.h. */
18912 #if HAVE_SYS_TIME_H
18913 #include <sys/time.h>
18914 #endif
18915 #include <time.h>
18916 #if HAVE_WINSOCK2_H
18917 # include <winsock2.h>
18918 #endif
18919
18920 int
18921 main ()
18922 {
18923 static struct timeval x; x.tv_sec = x.tv_usec;
18924 ;
18925 return 0;
18926 }
18927 _ACEOF
18928 if ac_fn_c_try_compile "$LINENO"; then :
18929 gl_cv_sys_struct_timeval=yes
18930 else
18931 gl_cv_sys_struct_timeval=no
18932 fi
18933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18934
18935 fi
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18937 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
18938 if test $gl_cv_sys_struct_timeval != yes; then
18939 HAVE_STRUCT_TIMEVAL=0
18940 else
18941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18942 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18943 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18944 $as_echo_n "(cached) " >&6
18945 else
18946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18947 /* end confdefs.h. */
18948 #if HAVE_SYS_TIME_H
18949 #include <sys/time.h>
18950 #endif
18951 #include <time.h>
18952 #if HAVE_WINSOCK2_H
18953 # include <winsock2.h>
18954 #endif
18955
18956 int
18957 main ()
18958 {
18959 static struct timeval x;
18960 typedef int verify_tv_sec_type[
18961 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18962 ];
18963
18964 ;
18965 return 0;
18966 }
18967 _ACEOF
18968 if ac_fn_c_try_compile "$LINENO"; then :
18969 gl_cv_sys_struct_timeval_tv_sec=yes
18970 else
18971 gl_cv_sys_struct_timeval_tv_sec=no
18972 fi
18973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18974
18975 fi
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18977 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18978 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18979 REPLACE_STRUCT_TIMEVAL=1
18980 fi
18981 fi
18982
18983
18984
18985
18986
18987
18988
18989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18990 $as_echo_n "checking for unsigned long long int... " >&6; }
18991 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18992 $as_echo_n "(cached) " >&6
18993 else
18994 ac_cv_type_unsigned_long_long_int=yes
18995 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18997 /* end confdefs.h. */
18998
18999 /* For now, do not test the preprocessor; as of 2007 there are too many
19000 implementations with broken preprocessors. Perhaps this can
19001 be revisited in 2012. In the meantime, code should not expect
19002 #if to work with literals wider than 32 bits. */
19003 /* Test literals. */
19004 long long int ll = 9223372036854775807ll;
19005 long long int nll = -9223372036854775807LL;
19006 unsigned long long int ull = 18446744073709551615ULL;
19007 /* Test constant expressions. */
19008 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19009 ? 1 : -1)];
19010 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19011 ? 1 : -1)];
19012 int i = 63;
19013 int
19014 main ()
19015 {
19016 /* Test availability of runtime routines for shift and division. */
19017 long long int llmax = 9223372036854775807ll;
19018 unsigned long long int ullmax = 18446744073709551615ull;
19019 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19020 | (llmax / ll) | (llmax % ll)
19021 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19022 | (ullmax / ull) | (ullmax % ull));
19023 ;
19024 return 0;
19025 }
19026
19027 _ACEOF
19028 if ac_fn_c_try_link "$LINENO"; then :
19029
19030 else
19031 ac_cv_type_unsigned_long_long_int=no
19032 fi
19033 rm -f core conftest.err conftest.$ac_objext \
19034 conftest$ac_exeext conftest.$ac_ext
19035 fi
19036 fi
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19038 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19039 if test $ac_cv_type_unsigned_long_long_int = yes; then
19040
19041 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19042
19043 fi
19044
19045
19046
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19048 $as_echo_n "checking for long long int... " >&6; }
19049 if test "${ac_cv_type_long_long_int+set}" = set; then :
19050 $as_echo_n "(cached) " >&6
19051 else
19052 ac_cv_type_long_long_int=yes
19053 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19054 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19055 if test $ac_cv_type_long_long_int = yes; then
19056 if test "$cross_compiling" = yes; then :
19057 :
19058 else
19059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19060 /* end confdefs.h. */
19061 #include <limits.h>
19062 #ifndef LLONG_MAX
19063 # define HALF \
19064 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19065 # define LLONG_MAX (HALF - 1 + HALF)
19066 #endif
19067 int
19068 main ()
19069 {
19070 long long int n = 1;
19071 int i;
19072 for (i = 0; ; i++)
19073 {
19074 long long int m = n << i;
19075 if (m >> i != n)
19076 return 1;
19077 if (LLONG_MAX / 2 < m)
19078 break;
19079 }
19080 return 0;
19081 ;
19082 return 0;
19083 }
19084 _ACEOF
19085 if ac_fn_c_try_run "$LINENO"; then :
19086
19087 else
19088 ac_cv_type_long_long_int=no
19089 fi
19090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19091 conftest.$ac_objext conftest.beam conftest.$ac_ext
19092 fi
19093
19094 fi
19095 fi
19096 fi
19097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19098 $as_echo "$ac_cv_type_long_long_int" >&6; }
19099 if test $ac_cv_type_long_long_int = yes; then
19100
19101 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19102
19103 fi
19104
19105
19106
19107
19108
19109
19110 gl_cv_c_multiarch=no
19111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19112 /* end confdefs.h. */
19113 #ifndef __APPLE_CC__
19114 not a universal capable compiler
19115 #endif
19116 typedef int dummy;
19117
19118 _ACEOF
19119 if ac_fn_c_try_compile "$LINENO"; then :
19120
19121 arch=
19122 prev=
19123 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19124 if test -n "$prev"; then
19125 case $word in
19126 i?86 | x86_64 | ppc | ppc64)
19127 if test -z "$arch" || test "$arch" = "$word"; then
19128 arch="$word"
19129 else
19130 gl_cv_c_multiarch=yes
19131 fi
19132 ;;
19133 esac
19134 prev=
19135 else
19136 if test "x$word" = "x-arch"; then
19137 prev=arch
19138 fi
19139 fi
19140 done
19141
19142 fi
19143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19144 if test $gl_cv_c_multiarch = yes; then
19145 APPLE_UNIVERSAL_BUILD=1
19146 else
19147 APPLE_UNIVERSAL_BUILD=0
19148 fi
19149
19150
19151
19152
19153
19154 if test $ac_cv_type_long_long_int = yes; then
19155 HAVE_LONG_LONG_INT=1
19156 else
19157 HAVE_LONG_LONG_INT=0
19158 fi
19159
19160
19161 if test $ac_cv_type_unsigned_long_long_int = yes; then
19162 HAVE_UNSIGNED_LONG_LONG_INT=1
19163 else
19164 HAVE_UNSIGNED_LONG_LONG_INT=0
19165 fi
19166
19167
19168
19169 if test $ac_cv_header_wchar_h = yes; then
19170 HAVE_WCHAR_H=1
19171 else
19172 HAVE_WCHAR_H=0
19173 fi
19174
19175
19176 if test $ac_cv_header_inttypes_h = yes; then
19177 HAVE_INTTYPES_H=1
19178 else
19179 HAVE_INTTYPES_H=0
19180 fi
19181
19182
19183 if test $ac_cv_header_sys_types_h = yes; then
19184 HAVE_SYS_TYPES_H=1
19185 else
19186 HAVE_SYS_TYPES_H=0
19187 fi
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199 if test $gl_cv_have_include_next = yes; then
19200 gl_cv_next_stdint_h='<'stdint.h'>'
19201 else
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19203 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19204 if test "${gl_cv_next_stdint_h+set}" = set; then :
19205 $as_echo_n "(cached) " >&6
19206 else
19207
19208 if test $ac_cv_header_stdint_h = yes; then
19209
19210
19211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19212 /* end confdefs.h. */
19213 #include <stdint.h>
19214
19215 _ACEOF
19216 case "$host_os" in
19217 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19218 *) gl_absname_cpp="$ac_cpp" ;;
19219 esac
19220
19221 case "$host_os" in
19222 mingw*)
19223 gl_dirsep_regex='[/\\]'
19224 ;;
19225 *)
19226 gl_dirsep_regex='\/'
19227 ;;
19228 esac
19229 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19230
19231 gl_header_literal_regex=`echo 'stdint.h' \
19232 | sed -e "$gl_make_literal_regex_sed"`
19233 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19234 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19235 s|^/[^/]|//&|
19236 p
19237 q
19238 }'
19239 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19240 sed -n "$gl_absolute_header_sed"`'"'
19241 else
19242 gl_cv_next_stdint_h='<'stdint.h'>'
19243 fi
19244
19245
19246 fi
19247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19248 $as_echo "$gl_cv_next_stdint_h" >&6; }
19249 fi
19250 NEXT_STDINT_H=$gl_cv_next_stdint_h
19251
19252 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19253 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19254 gl_next_as_first_directive='<'stdint.h'>'
19255 else
19256 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19257 gl_next_as_first_directive=$gl_cv_next_stdint_h
19258 fi
19259 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19260
19261
19262
19263
19264 if test $ac_cv_header_stdint_h = yes; then
19265 HAVE_STDINT_H=1
19266 else
19267 HAVE_STDINT_H=0
19268 fi
19269
19270
19271 if test $ac_cv_header_stdint_h = yes; then
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19273 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19274 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
19275 $as_echo_n "(cached) " >&6
19276 else
19277 gl_cv_header_working_stdint_h=no
19278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19279 /* end confdefs.h. */
19280
19281
19282 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19283 #include <stdint.h>
19284 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19285 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
19286 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19287 #endif
19288
19289
19290 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19291 included before <wchar.h>. */
19292 #include <stddef.h>
19293 #include <signal.h>
19294 #if HAVE_WCHAR_H
19295 # include <stdio.h>
19296 # include <time.h>
19297 # include <wchar.h>
19298 #endif
19299
19300
19301 #ifdef INT8_MAX
19302 int8_t a1 = INT8_MAX;
19303 int8_t a1min = INT8_MIN;
19304 #endif
19305 #ifdef INT16_MAX
19306 int16_t a2 = INT16_MAX;
19307 int16_t a2min = INT16_MIN;
19308 #endif
19309 #ifdef INT32_MAX
19310 int32_t a3 = INT32_MAX;
19311 int32_t a3min = INT32_MIN;
19312 #endif
19313 #ifdef INT64_MAX
19314 int64_t a4 = INT64_MAX;
19315 int64_t a4min = INT64_MIN;
19316 #endif
19317 #ifdef UINT8_MAX
19318 uint8_t b1 = UINT8_MAX;
19319 #else
19320 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19321 #endif
19322 #ifdef UINT16_MAX
19323 uint16_t b2 = UINT16_MAX;
19324 #endif
19325 #ifdef UINT32_MAX
19326 uint32_t b3 = UINT32_MAX;
19327 #endif
19328 #ifdef UINT64_MAX
19329 uint64_t b4 = UINT64_MAX;
19330 #endif
19331 int_least8_t c1 = INT8_C (0x7f);
19332 int_least8_t c1max = INT_LEAST8_MAX;
19333 int_least8_t c1min = INT_LEAST8_MIN;
19334 int_least16_t c2 = INT16_C (0x7fff);
19335 int_least16_t c2max = INT_LEAST16_MAX;
19336 int_least16_t c2min = INT_LEAST16_MIN;
19337 int_least32_t c3 = INT32_C (0x7fffffff);
19338 int_least32_t c3max = INT_LEAST32_MAX;
19339 int_least32_t c3min = INT_LEAST32_MIN;
19340 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19341 int_least64_t c4max = INT_LEAST64_MAX;
19342 int_least64_t c4min = INT_LEAST64_MIN;
19343 uint_least8_t d1 = UINT8_C (0xff);
19344 uint_least8_t d1max = UINT_LEAST8_MAX;
19345 uint_least16_t d2 = UINT16_C (0xffff);
19346 uint_least16_t d2max = UINT_LEAST16_MAX;
19347 uint_least32_t d3 = UINT32_C (0xffffffff);
19348 uint_least32_t d3max = UINT_LEAST32_MAX;
19349 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19350 uint_least64_t d4max = UINT_LEAST64_MAX;
19351 int_fast8_t e1 = INT_FAST8_MAX;
19352 int_fast8_t e1min = INT_FAST8_MIN;
19353 int_fast16_t e2 = INT_FAST16_MAX;
19354 int_fast16_t e2min = INT_FAST16_MIN;
19355 int_fast32_t e3 = INT_FAST32_MAX;
19356 int_fast32_t e3min = INT_FAST32_MIN;
19357 int_fast64_t e4 = INT_FAST64_MAX;
19358 int_fast64_t e4min = INT_FAST64_MIN;
19359 uint_fast8_t f1 = UINT_FAST8_MAX;
19360 uint_fast16_t f2 = UINT_FAST16_MAX;
19361 uint_fast32_t f3 = UINT_FAST32_MAX;
19362 uint_fast64_t f4 = UINT_FAST64_MAX;
19363 #ifdef INTPTR_MAX
19364 intptr_t g = INTPTR_MAX;
19365 intptr_t gmin = INTPTR_MIN;
19366 #endif
19367 #ifdef UINTPTR_MAX
19368 uintptr_t h = UINTPTR_MAX;
19369 #endif
19370 intmax_t i = INTMAX_MAX;
19371 uintmax_t j = UINTMAX_MAX;
19372
19373 #include <limits.h> /* for CHAR_BIT */
19374 #define TYPE_MINIMUM(t) \
19375 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19376 #define TYPE_MAXIMUM(t) \
19377 ((t) ((t) 0 < (t) -1 \
19378 ? (t) -1 \
19379 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19380 struct s {
19381 int check_PTRDIFF:
19382 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19383 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19384 ? 1 : -1;
19385 /* Detect bug in FreeBSD 6.0 / ia64. */
19386 int check_SIG_ATOMIC:
19387 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19388 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19389 ? 1 : -1;
19390 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19391 int check_WCHAR:
19392 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19393 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19394 ? 1 : -1;
19395 /* Detect bug in mingw. */
19396 int check_WINT:
19397 WINT_MIN == TYPE_MINIMUM (wint_t)
19398 && WINT_MAX == TYPE_MAXIMUM (wint_t)
19399 ? 1 : -1;
19400
19401 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
19402 int check_UINT8_C:
19403 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
19404 int check_UINT16_C:
19405 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
19406
19407 /* Detect bugs in OpenBSD 3.9 stdint.h. */
19408 #ifdef UINT8_MAX
19409 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
19410 #endif
19411 #ifdef UINT16_MAX
19412 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
19413 #endif
19414 #ifdef UINT32_MAX
19415 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
19416 #endif
19417 #ifdef UINT64_MAX
19418 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
19419 #endif
19420 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
19421 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
19422 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
19423 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
19424 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
19425 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
19426 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
19427 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
19428 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
19429 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
19430 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
19431 };
19432
19433 int
19434 main ()
19435 {
19436
19437 ;
19438 return 0;
19439 }
19440 _ACEOF
19441 if ac_fn_c_try_compile "$LINENO"; then :
19442 if test "$cross_compiling" = yes; then :
19443 gl_cv_header_working_stdint_h=yes
19444
19445 else
19446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19447 /* end confdefs.h. */
19448
19449
19450 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19451 #include <stdint.h>
19452
19453
19454 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19455 included before <wchar.h>. */
19456 #include <stddef.h>
19457 #include <signal.h>
19458 #if HAVE_WCHAR_H
19459 # include <stdio.h>
19460 # include <time.h>
19461 # include <wchar.h>
19462 #endif
19463
19464
19465 #include <stdio.h>
19466 #include <string.h>
19467 #define MVAL(macro) MVAL1(macro)
19468 #define MVAL1(expression) #expression
19469 static const char *macro_values[] =
19470 {
19471 #ifdef INT8_MAX
19472 MVAL (INT8_MAX),
19473 #endif
19474 #ifdef INT16_MAX
19475 MVAL (INT16_MAX),
19476 #endif
19477 #ifdef INT32_MAX
19478 MVAL (INT32_MAX),
19479 #endif
19480 #ifdef INT64_MAX
19481 MVAL (INT64_MAX),
19482 #endif
19483 #ifdef UINT8_MAX
19484 MVAL (UINT8_MAX),
19485 #endif
19486 #ifdef UINT16_MAX
19487 MVAL (UINT16_MAX),
19488 #endif
19489 #ifdef UINT32_MAX
19490 MVAL (UINT32_MAX),
19491 #endif
19492 #ifdef UINT64_MAX
19493 MVAL (UINT64_MAX),
19494 #endif
19495 NULL
19496 };
19497
19498 int
19499 main ()
19500 {
19501
19502 const char **mv;
19503 for (mv = macro_values; *mv != NULL; mv++)
19504 {
19505 const char *value = *mv;
19506 /* Test whether it looks like a cast expression. */
19507 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
19508 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
19509 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
19510 || strncmp (value, "((int)"/*)*/, 6) == 0
19511 || strncmp (value, "((signed short)"/*)*/, 15) == 0
19512 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
19513 return mv - macro_values + 1;
19514 }
19515 return 0;
19516
19517 ;
19518 return 0;
19519 }
19520 _ACEOF
19521 if ac_fn_c_try_run "$LINENO"; then :
19522 gl_cv_header_working_stdint_h=yes
19523 fi
19524 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19525 conftest.$ac_objext conftest.beam conftest.$ac_ext
19526 fi
19527
19528
19529 fi
19530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19531
19532 fi
19533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
19534 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
19535 fi
19536 if test "$gl_cv_header_working_stdint_h" = yes; then
19537 STDINT_H=
19538 else
19539 for ac_header in sys/inttypes.h sys/bitypes.h
19540 do :
19541 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19542 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19543 eval as_val=\$$as_ac_Header
19544 if test "x$as_val" = x""yes; then :
19545 cat >>confdefs.h <<_ACEOF
19546 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19547 _ACEOF
19548
19549 fi
19550
19551 done
19552
19553 if test $ac_cv_header_sys_inttypes_h = yes; then
19554 HAVE_SYS_INTTYPES_H=1
19555 else
19556 HAVE_SYS_INTTYPES_H=0
19557 fi
19558
19559 if test $ac_cv_header_sys_bitypes_h = yes; then
19560 HAVE_SYS_BITYPES_H=1
19561 else
19562 HAVE_SYS_BITYPES_H=0
19563 fi
19564
19565
19566
19567
19568 if test $APPLE_UNIVERSAL_BUILD = 0; then
19569
19570
19571 for gltype in ptrdiff_t size_t ; do
19572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19573 $as_echo_n "checking for bit size of $gltype... " >&6; }
19574 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
19575 $as_echo_n "(cached) " >&6
19576 else
19577 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19578 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19579 included before <wchar.h>. */
19580 #include <stddef.h>
19581 #include <signal.h>
19582 #if HAVE_WCHAR_H
19583 # include <stdio.h>
19584 # include <time.h>
19585 # include <wchar.h>
19586 #endif
19587
19588 #include <limits.h>"; then :
19589
19590 else
19591 result=unknown
19592 fi
19593
19594 eval gl_cv_bitsizeof_${gltype}=\$result
19595
19596 fi
19597 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19599 $as_echo "$ac_res" >&6; }
19600 eval result=\$gl_cv_bitsizeof_${gltype}
19601 if test $result = unknown; then
19602 result=0
19603 fi
19604 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19605 cat >>confdefs.h <<_ACEOF
19606 #define BITSIZEOF_${GLTYPE} $result
19607 _ACEOF
19608
19609 eval BITSIZEOF_${GLTYPE}=\$result
19610 done
19611
19612
19613 fi
19614
19615
19616 for gltype in sig_atomic_t wchar_t wint_t ; do
19617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19618 $as_echo_n "checking for bit size of $gltype... " >&6; }
19619 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
19620 $as_echo_n "(cached) " >&6
19621 else
19622 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19623 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19624 included before <wchar.h>. */
19625 #include <stddef.h>
19626 #include <signal.h>
19627 #if HAVE_WCHAR_H
19628 # include <stdio.h>
19629 # include <time.h>
19630 # include <wchar.h>
19631 #endif
19632
19633 #include <limits.h>"; then :
19634
19635 else
19636 result=unknown
19637 fi
19638
19639 eval gl_cv_bitsizeof_${gltype}=\$result
19640
19641 fi
19642 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19644 $as_echo "$ac_res" >&6; }
19645 eval result=\$gl_cv_bitsizeof_${gltype}
19646 if test $result = unknown; then
19647 result=0
19648 fi
19649 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19650 cat >>confdefs.h <<_ACEOF
19651 #define BITSIZEOF_${GLTYPE} $result
19652 _ACEOF
19653
19654 eval BITSIZEOF_${GLTYPE}=\$result
19655 done
19656
19657
19658
19659
19660 for gltype in sig_atomic_t wchar_t wint_t ; do
19661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19662 $as_echo_n "checking whether $gltype is signed... " >&6; }
19663 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
19664 $as_echo_n "(cached) " >&6
19665 else
19666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19667 /* end confdefs.h. */
19668
19669 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19670 included before <wchar.h>. */
19671 #include <stddef.h>
19672 #include <signal.h>
19673 #if HAVE_WCHAR_H
19674 # include <stdio.h>
19675 # include <time.h>
19676 # include <wchar.h>
19677 #endif
19678
19679 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
19680 int
19681 main ()
19682 {
19683
19684 ;
19685 return 0;
19686 }
19687 _ACEOF
19688 if ac_fn_c_try_compile "$LINENO"; then :
19689 result=yes
19690 else
19691 result=no
19692 fi
19693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19694 eval gl_cv_type_${gltype}_signed=\$result
19695
19696 fi
19697 eval ac_res=\$gl_cv_type_${gltype}_signed
19698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19699 $as_echo "$ac_res" >&6; }
19700 eval result=\$gl_cv_type_${gltype}_signed
19701 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19702 if test "$result" = yes; then
19703 cat >>confdefs.h <<_ACEOF
19704 #define HAVE_SIGNED_${GLTYPE} 1
19705 _ACEOF
19706
19707 eval HAVE_SIGNED_${GLTYPE}=1
19708 else
19709 eval HAVE_SIGNED_${GLTYPE}=0
19710 fi
19711 done
19712
19713
19714 gl_cv_type_ptrdiff_t_signed=yes
19715 gl_cv_type_size_t_signed=no
19716 if test $APPLE_UNIVERSAL_BUILD = 0; then
19717
19718
19719 for gltype in ptrdiff_t size_t ; do
19720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19721 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19722 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
19723 $as_echo_n "(cached) " >&6
19724 else
19725 eval gl_cv_type_${gltype}_suffix=no
19726 eval result=\$gl_cv_type_${gltype}_signed
19727 if test "$result" = yes; then
19728 glsufu=
19729 else
19730 glsufu=u
19731 fi
19732 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19733 case $glsuf in
19734 '') gltype1='int';;
19735 l) gltype1='long int';;
19736 ll) gltype1='long long int';;
19737 i64) gltype1='__int64';;
19738 u) gltype1='unsigned int';;
19739 ul) gltype1='unsigned long int';;
19740 ull) gltype1='unsigned long long int';;
19741 ui64)gltype1='unsigned __int64';;
19742 esac
19743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19744 /* end confdefs.h. */
19745
19746 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19747 included before <wchar.h>. */
19748 #include <stddef.h>
19749 #include <signal.h>
19750 #if HAVE_WCHAR_H
19751 # include <stdio.h>
19752 # include <time.h>
19753 # include <wchar.h>
19754 #endif
19755
19756 extern $gltype foo;
19757 extern $gltype1 foo;
19758 int
19759 main ()
19760 {
19761
19762 ;
19763 return 0;
19764 }
19765 _ACEOF
19766 if ac_fn_c_try_compile "$LINENO"; then :
19767 eval gl_cv_type_${gltype}_suffix=\$glsuf
19768 fi
19769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19770 eval result=\$gl_cv_type_${gltype}_suffix
19771 test "$result" != no && break
19772 done
19773 fi
19774 eval ac_res=\$gl_cv_type_${gltype}_suffix
19775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19776 $as_echo "$ac_res" >&6; }
19777 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19778 eval result=\$gl_cv_type_${gltype}_suffix
19779 test "$result" = no && result=
19780 eval ${GLTYPE}_SUFFIX=\$result
19781 cat >>confdefs.h <<_ACEOF
19782 #define ${GLTYPE}_SUFFIX $result
19783 _ACEOF
19784
19785 done
19786
19787
19788 fi
19789
19790
19791 for gltype in sig_atomic_t wchar_t wint_t ; do
19792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19793 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19794 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
19795 $as_echo_n "(cached) " >&6
19796 else
19797 eval gl_cv_type_${gltype}_suffix=no
19798 eval result=\$gl_cv_type_${gltype}_signed
19799 if test "$result" = yes; then
19800 glsufu=
19801 else
19802 glsufu=u
19803 fi
19804 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19805 case $glsuf in
19806 '') gltype1='int';;
19807 l) gltype1='long int';;
19808 ll) gltype1='long long int';;
19809 i64) gltype1='__int64';;
19810 u) gltype1='unsigned int';;
19811 ul) gltype1='unsigned long int';;
19812 ull) gltype1='unsigned long long int';;
19813 ui64)gltype1='unsigned __int64';;
19814 esac
19815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19816 /* end confdefs.h. */
19817
19818 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19819 included before <wchar.h>. */
19820 #include <stddef.h>
19821 #include <signal.h>
19822 #if HAVE_WCHAR_H
19823 # include <stdio.h>
19824 # include <time.h>
19825 # include <wchar.h>
19826 #endif
19827
19828 extern $gltype foo;
19829 extern $gltype1 foo;
19830 int
19831 main ()
19832 {
19833
19834 ;
19835 return 0;
19836 }
19837 _ACEOF
19838 if ac_fn_c_try_compile "$LINENO"; then :
19839 eval gl_cv_type_${gltype}_suffix=\$glsuf
19840 fi
19841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19842 eval result=\$gl_cv_type_${gltype}_suffix
19843 test "$result" != no && break
19844 done
19845 fi
19846 eval ac_res=\$gl_cv_type_${gltype}_suffix
19847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19848 $as_echo "$ac_res" >&6; }
19849 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19850 eval result=\$gl_cv_type_${gltype}_suffix
19851 test "$result" = no && result=
19852 eval ${GLTYPE}_SUFFIX=\$result
19853 cat >>confdefs.h <<_ACEOF
19854 #define ${GLTYPE}_SUFFIX $result
19855 _ACEOF
19856
19857 done
19858
19859
19860
19861 if test $BITSIZEOF_WINT_T -lt 32; then
19862 BITSIZEOF_WINT_T=32
19863 fi
19864
19865 STDINT_H=stdint.h
19866 fi
19867
19868 if test -n "$STDINT_H"; then
19869 GL_GENERATE_STDINT_H_TRUE=
19870 GL_GENERATE_STDINT_H_FALSE='#'
19871 else
19872 GL_GENERATE_STDINT_H_TRUE='#'
19873 GL_GENERATE_STDINT_H_FALSE=
19874 fi
19875
19876
19877
19878
19879
19880 GNULIB_IMAXABS=0;
19881 GNULIB_IMAXDIV=0;
19882 GNULIB_STRTOIMAX=0;
19883 GNULIB_STRTOUMAX=0;
19884 HAVE_DECL_IMAXABS=1;
19885 HAVE_DECL_IMAXDIV=1;
19886 HAVE_DECL_STRTOIMAX=1;
19887 HAVE_DECL_STRTOUMAX=1;
19888 REPLACE_STRTOIMAX=0;
19889 INT32_MAX_LT_INTMAX_MAX=1;
19890 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19891 PRI_MACROS_BROKEN=0;
19892 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19893 UINT32_MAX_LT_UINTMAX_MAX=1;
19894 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910 if test $gl_cv_have_include_next = yes; then
19911 gl_cv_next_inttypes_h='<'inttypes.h'>'
19912 else
19913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19914 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19915 if test "${gl_cv_next_inttypes_h+set}" = set; then :
19916 $as_echo_n "(cached) " >&6
19917 else
19918
19919 if test $ac_cv_header_inttypes_h = yes; then
19920
19921
19922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19923 /* end confdefs.h. */
19924 #include <inttypes.h>
19925
19926 _ACEOF
19927 case "$host_os" in
19928 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19929 *) gl_absname_cpp="$ac_cpp" ;;
19930 esac
19931
19932 case "$host_os" in
19933 mingw*)
19934 gl_dirsep_regex='[/\\]'
19935 ;;
19936 *)
19937 gl_dirsep_regex='\/'
19938 ;;
19939 esac
19940 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19941
19942 gl_header_literal_regex=`echo 'inttypes.h' \
19943 | sed -e "$gl_make_literal_regex_sed"`
19944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19946 s|^/[^/]|//&|
19947 p
19948 q
19949 }'
19950 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19951 sed -n "$gl_absolute_header_sed"`'"'
19952 else
19953 gl_cv_next_inttypes_h='<'inttypes.h'>'
19954 fi
19955
19956
19957 fi
19958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19959 $as_echo "$gl_cv_next_inttypes_h" >&6; }
19960 fi
19961 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19962
19963 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19964 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19965 gl_next_as_first_directive='<'inttypes.h'>'
19966 else
19967 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19968 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19969 fi
19970 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982 case "$host_os" in
19983 mingw*)
19984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19985 $as_echo_n "checking for 64-bit off_t... " >&6; }
19986 if test "${gl_cv_type_off_t_64+set}" = set; then :
19987 $as_echo_n "(cached) " >&6
19988 else
19989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19990 /* end confdefs.h. */
19991 #include <sys/types.h>
19992 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19993
19994 int
19995 main ()
19996 {
19997
19998 ;
19999 return 0;
20000 }
20001 _ACEOF
20002 if ac_fn_c_try_compile "$LINENO"; then :
20003 gl_cv_type_off_t_64=yes
20004 else
20005 gl_cv_type_off_t_64=no
20006 fi
20007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20008
20009 fi
20010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20011 $as_echo "$gl_cv_type_off_t_64" >&6; }
20012 if test $gl_cv_type_off_t_64 = no; then
20013 WINDOWS_64_BIT_OFF_T=1
20014 else
20015 WINDOWS_64_BIT_OFF_T=0
20016 fi
20017 WINDOWS_64_BIT_ST_SIZE=1
20018 ;;
20019 *)
20020 WINDOWS_64_BIT_OFF_T=0
20021 WINDOWS_64_BIT_ST_SIZE=0
20022 ;;
20023 esac
20024
20025
20026
20027
20028 GNULIB_FFSL=0;
20029 GNULIB_FFSLL=0;
20030 GNULIB_MEMCHR=0;
20031 GNULIB_MEMMEM=0;
20032 GNULIB_MEMPCPY=0;
20033 GNULIB_MEMRCHR=0;
20034 GNULIB_RAWMEMCHR=0;
20035 GNULIB_STPCPY=0;
20036 GNULIB_STPNCPY=0;
20037 GNULIB_STRCHRNUL=0;
20038 GNULIB_STRDUP=0;
20039 GNULIB_STRNCAT=0;
20040 GNULIB_STRNDUP=0;
20041 GNULIB_STRNLEN=0;
20042 GNULIB_STRPBRK=0;
20043 GNULIB_STRSEP=0;
20044 GNULIB_STRSTR=0;
20045 GNULIB_STRCASESTR=0;
20046 GNULIB_STRTOK_R=0;
20047 GNULIB_MBSLEN=0;
20048 GNULIB_MBSNLEN=0;
20049 GNULIB_MBSCHR=0;
20050 GNULIB_MBSRCHR=0;
20051 GNULIB_MBSSTR=0;
20052 GNULIB_MBSCASECMP=0;
20053 GNULIB_MBSNCASECMP=0;
20054 GNULIB_MBSPCASECMP=0;
20055 GNULIB_MBSCASESTR=0;
20056 GNULIB_MBSCSPN=0;
20057 GNULIB_MBSPBRK=0;
20058 GNULIB_MBSSPN=0;
20059 GNULIB_MBSSEP=0;
20060 GNULIB_MBSTOK_R=0;
20061 GNULIB_STRERROR=0;
20062 GNULIB_STRERROR_R=0;
20063 GNULIB_STRSIGNAL=0;
20064 GNULIB_STRVERSCMP=0;
20065 HAVE_MBSLEN=0;
20066 HAVE_FFSL=1;
20067 HAVE_FFSLL=1;
20068 HAVE_MEMCHR=1;
20069 HAVE_DECL_MEMMEM=1;
20070 HAVE_MEMPCPY=1;
20071 HAVE_DECL_MEMRCHR=1;
20072 HAVE_RAWMEMCHR=1;
20073 HAVE_STPCPY=1;
20074 HAVE_STPNCPY=1;
20075 HAVE_STRCHRNUL=1;
20076 HAVE_DECL_STRDUP=1;
20077 HAVE_DECL_STRNDUP=1;
20078 HAVE_DECL_STRNLEN=1;
20079 HAVE_STRPBRK=1;
20080 HAVE_STRSEP=1;
20081 HAVE_STRCASESTR=1;
20082 HAVE_DECL_STRTOK_R=1;
20083 HAVE_DECL_STRERROR_R=1;
20084 HAVE_DECL_STRSIGNAL=1;
20085 HAVE_STRVERSCMP=1;
20086 REPLACE_MEMCHR=0;
20087 REPLACE_MEMMEM=0;
20088 REPLACE_STPNCPY=0;
20089 REPLACE_STRDUP=0;
20090 REPLACE_STRSTR=0;
20091 REPLACE_STRCASESTR=0;
20092 REPLACE_STRCHRNUL=0;
20093 REPLACE_STRERROR=0;
20094 REPLACE_STRERROR_R=0;
20095 REPLACE_STRNCAT=0;
20096 REPLACE_STRNDUP=0;
20097 REPLACE_STRNLEN=0;
20098 REPLACE_STRSIGNAL=0;
20099 REPLACE_STRTOK_R=0;
20100 UNDEFINE_STRTOK_R=0;
20101
20102 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20103 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20104 ac_have_decl=1
20105 else
20106 ac_have_decl=0
20107 fi
20108
20109 cat >>confdefs.h <<_ACEOF
20110 #define HAVE_DECL_MEMRCHR $ac_have_decl
20111 _ACEOF
20112
20113
20114 GNULIB_MKTIME=0;
20115 GNULIB_NANOSLEEP=0;
20116 GNULIB_STRPTIME=0;
20117 GNULIB_TIMEGM=0;
20118 GNULIB_TIME_R=0;
20119 HAVE_DECL_LOCALTIME_R=1;
20120 HAVE_NANOSLEEP=1;
20121 HAVE_STRPTIME=1;
20122 HAVE_TIMEGM=1;
20123 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20124 REPLACE_MKTIME=GNULIB_PORTCHECK;
20125 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20126 REPLACE_TIMEGM=GNULIB_PORTCHECK;
20127
20128 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20129 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20130 ac_have_decl=1
20131 else
20132 ac_have_decl=0
20133 fi
20134
20135 cat >>confdefs.h <<_ACEOF
20136 #define HAVE_DECL_ALARM $ac_have_decl
20137 _ACEOF
20138
20139
20140 GNULIB_PSELECT=0;
20141 GNULIB_SELECT=0;
20142 HAVE_PSELECT=1;
20143 REPLACE_PSELECT=0;
20144 REPLACE_SELECT=0;
20145
20146
20147
20148
20149
20150
20151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20152 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20153 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
20154 $as_echo_n "(cached) " >&6
20155 else
20156
20157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20158 /* end confdefs.h. */
20159 #include <sys/select.h>
20160 int
20161 main ()
20162 {
20163 struct timeval b;
20164 ;
20165 return 0;
20166 }
20167 _ACEOF
20168 if ac_fn_c_try_compile "$LINENO"; then :
20169 gl_cv_header_sys_select_h_selfcontained=yes
20170 else
20171 gl_cv_header_sys_select_h_selfcontained=no
20172 fi
20173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20174 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20176 /* end confdefs.h. */
20177 #include <sys/select.h>
20178 int
20179 main ()
20180 {
20181 int memset; int bzero;
20182 ;
20183 return 0;
20184 }
20185
20186 _ACEOF
20187 if ac_fn_c_try_compile "$LINENO"; then :
20188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20189 /* end confdefs.h. */
20190 #include <sys/select.h>
20191 int
20192 main ()
20193 {
20194
20195 #undef memset
20196 #define memset nonexistent_memset
20197 extern
20198 #ifdef __cplusplus
20199 "C"
20200 #endif
20201 void *memset (void *, int, unsigned long);
20202 #undef bzero
20203 #define bzero nonexistent_bzero
20204 extern
20205 #ifdef __cplusplus
20206 "C"
20207 #endif
20208 void bzero (void *, unsigned long);
20209 fd_set fds;
20210 FD_ZERO (&fds);
20211
20212 ;
20213 return 0;
20214 }
20215
20216 _ACEOF
20217 if ac_fn_c_try_link "$LINENO"; then :
20218
20219 else
20220 gl_cv_header_sys_select_h_selfcontained=no
20221 fi
20222 rm -f core conftest.err conftest.$ac_objext \
20223 conftest$ac_exeext conftest.$ac_ext
20224
20225 fi
20226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20227 fi
20228
20229 fi
20230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20231 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241 if test $gl_cv_have_include_next = yes; then
20242 gl_cv_next_sys_select_h='<'sys/select.h'>'
20243 else
20244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20245 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20246 if test "${gl_cv_next_sys_select_h+set}" = set; then :
20247 $as_echo_n "(cached) " >&6
20248 else
20249
20250 if test $ac_cv_header_sys_select_h = yes; then
20251
20252
20253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20254 /* end confdefs.h. */
20255 #include <sys/select.h>
20256
20257 _ACEOF
20258 case "$host_os" in
20259 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20260 *) gl_absname_cpp="$ac_cpp" ;;
20261 esac
20262
20263 case "$host_os" in
20264 mingw*)
20265 gl_dirsep_regex='[/\\]'
20266 ;;
20267 *)
20268 gl_dirsep_regex='\/'
20269 ;;
20270 esac
20271 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20272
20273 gl_header_literal_regex=`echo 'sys/select.h' \
20274 | sed -e "$gl_make_literal_regex_sed"`
20275 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20276 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20277 s|^/[^/]|//&|
20278 p
20279 q
20280 }'
20281 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20282 sed -n "$gl_absolute_header_sed"`'"'
20283 else
20284 gl_cv_next_sys_select_h='<'sys/select.h'>'
20285 fi
20286
20287
20288 fi
20289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20290 $as_echo "$gl_cv_next_sys_select_h" >&6; }
20291 fi
20292 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
20293
20294 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20295 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20296 gl_next_as_first_directive='<'sys/select.h'>'
20297 else
20298 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20299 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20300 fi
20301 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20302
20303
20304
20305
20306 if test $ac_cv_header_sys_select_h = yes; then
20307 HAVE_SYS_SELECT_H=1
20308 else
20309 HAVE_SYS_SELECT_H=0
20310 fi
20311
20312
20313
20314
20315
20316 if test $ac_cv_header_sys_socket_h != yes; then
20317 for ac_header in winsock2.h
20318 do :
20319 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20320 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20321 cat >>confdefs.h <<_ACEOF
20322 #define HAVE_WINSOCK2_H 1
20323 _ACEOF
20324
20325 fi
20326
20327 done
20328
20329 fi
20330 if test "$ac_cv_header_winsock2_h" = yes; then
20331 HAVE_WINSOCK2_H=1
20332 UNISTD_H_HAVE_WINSOCK2_H=1
20333 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20334 else
20335 HAVE_WINSOCK2_H=0
20336 fi
20337
20338
20339
20340
20341
20342
20343
20344
20345 GNULIB_PTHREAD_SIGMASK=0;
20346 GNULIB_RAISE=0;
20347 GNULIB_SIGNAL_H_SIGPIPE=0;
20348 GNULIB_SIGPROCMASK=0;
20349 GNULIB_SIGACTION=0;
20350 HAVE_POSIX_SIGNALBLOCKING=1;
20351 HAVE_PTHREAD_SIGMASK=1;
20352 HAVE_RAISE=1;
20353 HAVE_SIGSET_T=1;
20354 HAVE_SIGINFO_T=1;
20355 HAVE_SIGACTION=1;
20356 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20357
20358 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20359
20360 HAVE_SIGHANDLER_T=1;
20361 REPLACE_PTHREAD_SIGMASK=0;
20362 REPLACE_RAISE=0;
20363
20364
20365
20366
20367
20368
20369
20370 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20371 #include <signal.h>
20372 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20373 #include <sys/types.h>
20374
20375 "
20376 if test "x$ac_cv_type_sigset_t" = x""yes; then :
20377
20378 cat >>confdefs.h <<_ACEOF
20379 #define HAVE_SIGSET_T 1
20380 _ACEOF
20381
20382 gl_cv_type_sigset_t=yes
20383 else
20384 gl_cv_type_sigset_t=no
20385 fi
20386
20387 if test $gl_cv_type_sigset_t != yes; then
20388 HAVE_SIGSET_T=0
20389 fi
20390
20391
20392
20393 if test $ac_cv_header_sys_socket_h = no; then
20394 for ac_header in ws2tcpip.h
20395 do :
20396 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
20397 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
20398 cat >>confdefs.h <<_ACEOF
20399 #define HAVE_WS2TCPIP_H 1
20400 _ACEOF
20401
20402 fi
20403
20404 done
20405
20406 fi
20407
20408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20409 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20410 if test "${ac_cv_header_stdbool_h+set}" = set; then :
20411 $as_echo_n "(cached) " >&6
20412 else
20413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20414 /* end confdefs.h. */
20415
20416 #include <stdbool.h>
20417 #ifndef bool
20418 "error: bool is not defined"
20419 #endif
20420 #ifndef false
20421 "error: false is not defined"
20422 #endif
20423 #if false
20424 "error: false is not 0"
20425 #endif
20426 #ifndef true
20427 "error: true is not defined"
20428 #endif
20429 #if true != 1
20430 "error: true is not 1"
20431 #endif
20432 #ifndef __bool_true_false_are_defined
20433 "error: __bool_true_false_are_defined is not defined"
20434 #endif
20435
20436 struct s { _Bool s: 1; _Bool t; } s;
20437
20438 char a[true == 1 ? 1 : -1];
20439 char b[false == 0 ? 1 : -1];
20440 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20441 char d[(bool) 0.5 == true ? 1 : -1];
20442 /* See body of main program for 'e'. */
20443 char f[(_Bool) 0.0 == false ? 1 : -1];
20444 char g[true];
20445 char h[sizeof (_Bool)];
20446 char i[sizeof s.t];
20447 enum { j = false, k = true, l = false * true, m = true * 256 };
20448 /* The following fails for
20449 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20450 _Bool n[m];
20451 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20452 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20453 /* Catch a bug in an HP-UX C compiler. See
20454 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20455 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
20456 */
20457 _Bool q = true;
20458 _Bool *pq = &q;
20459
20460 int
20461 main ()
20462 {
20463
20464 bool e = &s;
20465 *pq |= q;
20466 *pq |= ! q;
20467 /* Refer to every declared value, to avoid compiler optimizations. */
20468 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20469 + !m + !n + !o + !p + !q + !pq);
20470
20471 ;
20472 return 0;
20473 }
20474 _ACEOF
20475 if ac_fn_c_try_compile "$LINENO"; then :
20476 ac_cv_header_stdbool_h=yes
20477 else
20478 ac_cv_header_stdbool_h=no
20479 fi
20480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20481 fi
20482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20483 $as_echo "$ac_cv_header_stdbool_h" >&6; }
20484 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20485 if test "x$ac_cv_type__Bool" = x""yes; then :
20486
20487 cat >>confdefs.h <<_ACEOF
20488 #define HAVE__BOOL 1
20489 _ACEOF
20490
20491
20492 fi
20493
20494
20495
20496 REPLACE_NULL=0;
20497 HAVE_WCHAR_T=1;
20498
20499
20500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
20501 $as_echo_n "checking for wchar_t... " >&6; }
20502 if test "${gt_cv_c_wchar_t+set}" = set; then :
20503 $as_echo_n "(cached) " >&6
20504 else
20505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20506 /* end confdefs.h. */
20507 #include <stddef.h>
20508 wchar_t foo = (wchar_t)'\0';
20509 int
20510 main ()
20511 {
20512
20513 ;
20514 return 0;
20515 }
20516 _ACEOF
20517 if ac_fn_c_try_compile "$LINENO"; then :
20518 gt_cv_c_wchar_t=yes
20519 else
20520 gt_cv_c_wchar_t=no
20521 fi
20522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20523 fi
20524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
20525 $as_echo "$gt_cv_c_wchar_t" >&6; }
20526 if test $gt_cv_c_wchar_t = yes; then
20527
20528 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
20529
20530 fi
20531
20532
20533 GNULIB_DPRINTF=0;
20534 GNULIB_FCLOSE=0;
20535 GNULIB_FDOPEN=0;
20536 GNULIB_FFLUSH=0;
20537 GNULIB_FGETC=0;
20538 GNULIB_FGETS=0;
20539 GNULIB_FOPEN=0;
20540 GNULIB_FPRINTF=0;
20541 GNULIB_FPRINTF_POSIX=0;
20542 GNULIB_FPURGE=0;
20543 GNULIB_FPUTC=0;
20544 GNULIB_FPUTS=0;
20545 GNULIB_FREAD=0;
20546 GNULIB_FREOPEN=0;
20547 GNULIB_FSCANF=0;
20548 GNULIB_FSEEK=0;
20549 GNULIB_FSEEKO=0;
20550 GNULIB_FTELL=0;
20551 GNULIB_FTELLO=0;
20552 GNULIB_FWRITE=0;
20553 GNULIB_GETC=0;
20554 GNULIB_GETCHAR=0;
20555 GNULIB_GETDELIM=0;
20556 GNULIB_GETLINE=0;
20557 GNULIB_OBSTACK_PRINTF=0;
20558 GNULIB_OBSTACK_PRINTF_POSIX=0;
20559 GNULIB_PCLOSE=0;
20560 GNULIB_PERROR=0;
20561 GNULIB_POPEN=0;
20562 GNULIB_PRINTF=0;
20563 GNULIB_PRINTF_POSIX=0;
20564 GNULIB_PUTC=0;
20565 GNULIB_PUTCHAR=0;
20566 GNULIB_PUTS=0;
20567 GNULIB_REMOVE=0;
20568 GNULIB_RENAME=0;
20569 GNULIB_RENAMEAT=0;
20570 GNULIB_SCANF=0;
20571 GNULIB_SNPRINTF=0;
20572 GNULIB_SPRINTF_POSIX=0;
20573 GNULIB_STDIO_H_NONBLOCKING=0;
20574 GNULIB_STDIO_H_SIGPIPE=0;
20575 GNULIB_TMPFILE=0;
20576 GNULIB_VASPRINTF=0;
20577 GNULIB_VFSCANF=0;
20578 GNULIB_VSCANF=0;
20579 GNULIB_VDPRINTF=0;
20580 GNULIB_VFPRINTF=0;
20581 GNULIB_VFPRINTF_POSIX=0;
20582 GNULIB_VPRINTF=0;
20583 GNULIB_VPRINTF_POSIX=0;
20584 GNULIB_VSNPRINTF=0;
20585 GNULIB_VSPRINTF_POSIX=0;
20586 HAVE_DECL_FPURGE=1;
20587 HAVE_DECL_FSEEKO=1;
20588 HAVE_DECL_FTELLO=1;
20589 HAVE_DECL_GETDELIM=1;
20590 HAVE_DECL_GETLINE=1;
20591 HAVE_DECL_OBSTACK_PRINTF=1;
20592 HAVE_DECL_SNPRINTF=1;
20593 HAVE_DECL_VSNPRINTF=1;
20594 HAVE_DPRINTF=1;
20595 HAVE_FSEEKO=1;
20596 HAVE_FTELLO=1;
20597 HAVE_PCLOSE=1;
20598 HAVE_POPEN=1;
20599 HAVE_RENAMEAT=1;
20600 HAVE_VASPRINTF=1;
20601 HAVE_VDPRINTF=1;
20602 REPLACE_DPRINTF=0;
20603 REPLACE_FCLOSE=0;
20604 REPLACE_FDOPEN=0;
20605 REPLACE_FFLUSH=0;
20606 REPLACE_FOPEN=0;
20607 REPLACE_FPRINTF=0;
20608 REPLACE_FPURGE=0;
20609 REPLACE_FREOPEN=0;
20610 REPLACE_FSEEK=0;
20611 REPLACE_FSEEKO=0;
20612 REPLACE_FTELL=0;
20613 REPLACE_FTELLO=0;
20614 REPLACE_GETDELIM=0;
20615 REPLACE_GETLINE=0;
20616 REPLACE_OBSTACK_PRINTF=0;
20617 REPLACE_PERROR=0;
20618 REPLACE_POPEN=0;
20619 REPLACE_PRINTF=0;
20620 REPLACE_REMOVE=0;
20621 REPLACE_RENAME=0;
20622 REPLACE_RENAMEAT=0;
20623 REPLACE_SNPRINTF=0;
20624 REPLACE_SPRINTF=0;
20625 REPLACE_STDIO_READ_FUNCS=0;
20626 REPLACE_STDIO_WRITE_FUNCS=0;
20627 REPLACE_TMPFILE=0;
20628 REPLACE_VASPRINTF=0;
20629 REPLACE_VDPRINTF=0;
20630 REPLACE_VFPRINTF=0;
20631 REPLACE_VPRINTF=0;
20632 REPLACE_VSNPRINTF=0;
20633 REPLACE_VSPRINTF=0;
20634
20635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
20636 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
20637 if test "${ac_cv_struct_tm+set}" = set; then :
20638 $as_echo_n "(cached) " >&6
20639 else
20640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20641 /* end confdefs.h. */
20642 #include <sys/types.h>
20643 #include <time.h>
20644
20645 int
20646 main ()
20647 {
20648 struct tm tm;
20649 int *p = &tm.tm_sec;
20650 return !p;
20651 ;
20652 return 0;
20653 }
20654 _ACEOF
20655 if ac_fn_c_try_compile "$LINENO"; then :
20656 ac_cv_struct_tm=time.h
20657 else
20658 ac_cv_struct_tm=sys/time.h
20659 fi
20660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20661 fi
20662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
20663 $as_echo "$ac_cv_struct_tm" >&6; }
20664 if test $ac_cv_struct_tm = sys/time.h; then
20665
20666 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
20667
20668 fi
20669
20670 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
20671 #include <$ac_cv_struct_tm>
20672
20673 "
20674 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
20675
20676 cat >>confdefs.h <<_ACEOF
20677 #define HAVE_STRUCT_TM_TM_ZONE 1
20678 _ACEOF
20679
20680
20681 fi
20682
20683 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20684
20685 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
20686
20687 else
20688 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20689 "
20690 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
20691 ac_have_decl=1
20692 else
20693 ac_have_decl=0
20694 fi
20695
20696 cat >>confdefs.h <<_ACEOF
20697 #define HAVE_DECL_TZNAME $ac_have_decl
20698 _ACEOF
20699
20700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20701 $as_echo_n "checking for tzname... " >&6; }
20702 if test "${ac_cv_var_tzname+set}" = set; then :
20703 $as_echo_n "(cached) " >&6
20704 else
20705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20706 /* end confdefs.h. */
20707 #include <time.h>
20708 #if !HAVE_DECL_TZNAME
20709 extern char *tzname[];
20710 #endif
20711
20712 int
20713 main ()
20714 {
20715 return tzname[0][0];
20716 ;
20717 return 0;
20718 }
20719 _ACEOF
20720 if ac_fn_c_try_link "$LINENO"; then :
20721 ac_cv_var_tzname=yes
20722 else
20723 ac_cv_var_tzname=no
20724 fi
20725 rm -f core conftest.err conftest.$ac_objext \
20726 conftest$ac_exeext conftest.$ac_ext
20727 fi
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20729 $as_echo "$ac_cv_var_tzname" >&6; }
20730 if test $ac_cv_var_tzname = yes; then
20731
20732 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
20733
20734 fi
20735 fi
20736
20737
20738 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20739 "
20740 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
20741
20742 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
20743
20744 fi
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758 if test $gl_cv_have_include_next = yes; then
20759 gl_cv_next_string_h='<'string.h'>'
20760 else
20761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20762 $as_echo_n "checking absolute name of <string.h>... " >&6; }
20763 if test "${gl_cv_next_string_h+set}" = set; then :
20764 $as_echo_n "(cached) " >&6
20765 else
20766
20767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20768 /* end confdefs.h. */
20769 #include <string.h>
20770
20771 _ACEOF
20772 case "$host_os" in
20773 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20774 *) gl_absname_cpp="$ac_cpp" ;;
20775 esac
20776
20777 case "$host_os" in
20778 mingw*)
20779 gl_dirsep_regex='[/\\]'
20780 ;;
20781 *)
20782 gl_dirsep_regex='\/'
20783 ;;
20784 esac
20785 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20786
20787 gl_header_literal_regex=`echo 'string.h' \
20788 | sed -e "$gl_make_literal_regex_sed"`
20789 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20790 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20791 s|^/[^/]|//&|
20792 p
20793 q
20794 }'
20795 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20796 sed -n "$gl_absolute_header_sed"`'"'
20797
20798
20799 fi
20800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20801 $as_echo "$gl_cv_next_string_h" >&6; }
20802 fi
20803 NEXT_STRING_H=$gl_cv_next_string_h
20804
20805 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20806 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20807 gl_next_as_first_directive='<'string.h'>'
20808 else
20809 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20810 gl_next_as_first_directive=$gl_cv_next_string_h
20811 fi
20812 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
20823 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
20824 ac_have_decl=1
20825 else
20826 ac_have_decl=0
20827 fi
20828
20829 cat >>confdefs.h <<_ACEOF
20830 #define HAVE_DECL_STRTOIMAX $ac_have_decl
20831 _ACEOF
20832
20833
20834
20835 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
20836 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
20837 ac_have_decl=1
20838 else
20839 ac_have_decl=0
20840 fi
20841
20842 cat >>confdefs.h <<_ACEOF
20843 #define HAVE_DECL_STRTOUMAX $ac_have_decl
20844 _ACEOF
20845
20846
20847
20848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
20849 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20850 if test "${ac_cv_header_stat_broken+set}" = set; then :
20851 $as_echo_n "(cached) " >&6
20852 else
20853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20854 /* end confdefs.h. */
20855 #include <sys/types.h>
20856 #include <sys/stat.h>
20857
20858 #if defined S_ISBLK && defined S_IFDIR
20859 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20860 #endif
20861
20862 #if defined S_ISBLK && defined S_IFCHR
20863 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20864 #endif
20865
20866 #if defined S_ISLNK && defined S_IFREG
20867 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20868 #endif
20869
20870 #if defined S_ISSOCK && defined S_IFREG
20871 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20872 #endif
20873
20874 _ACEOF
20875 if ac_fn_c_try_compile "$LINENO"; then :
20876 ac_cv_header_stat_broken=no
20877 else
20878 ac_cv_header_stat_broken=yes
20879 fi
20880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20881 fi
20882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20883 $as_echo "$ac_cv_header_stat_broken" >&6; }
20884 if test $ac_cv_header_stat_broken = yes; then
20885
20886 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
20887
20888 fi
20889
20890
20891
20892
20893
20894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20895 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20896 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
20897 $as_echo_n "(cached) " >&6
20898 else
20899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20900 /* end confdefs.h. */
20901 #include <time.h>
20902
20903 int
20904 main ()
20905 {
20906 static struct timespec x; x.tv_sec = x.tv_nsec;
20907 ;
20908 return 0;
20909 }
20910 _ACEOF
20911 if ac_fn_c_try_compile "$LINENO"; then :
20912 gl_cv_sys_struct_timespec_in_time_h=yes
20913 else
20914 gl_cv_sys_struct_timespec_in_time_h=no
20915 fi
20916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20917 fi
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20919 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
20920
20921 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20922 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20923 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20924 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20925 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20926 else
20927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20928 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20929 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20930 $as_echo_n "(cached) " >&6
20931 else
20932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20933 /* end confdefs.h. */
20934 #include <sys/time.h>
20935
20936 int
20937 main ()
20938 {
20939 static struct timespec x; x.tv_sec = x.tv_nsec;
20940 ;
20941 return 0;
20942 }
20943 _ACEOF
20944 if ac_fn_c_try_compile "$LINENO"; then :
20945 gl_cv_sys_struct_timespec_in_sys_time_h=yes
20946 else
20947 gl_cv_sys_struct_timespec_in_sys_time_h=no
20948 fi
20949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20950 fi
20951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20952 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20953 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20954 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20955 else
20956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20957 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20958 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
20959 $as_echo_n "(cached) " >&6
20960 else
20961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20962 /* end confdefs.h. */
20963 #include <pthread.h>
20964
20965 int
20966 main ()
20967 {
20968 static struct timespec x; x.tv_sec = x.tv_nsec;
20969 ;
20970 return 0;
20971 }
20972 _ACEOF
20973 if ac_fn_c_try_compile "$LINENO"; then :
20974 gl_cv_sys_struct_timespec_in_pthread_h=yes
20975 else
20976 gl_cv_sys_struct_timespec_in_pthread_h=no
20977 fi
20978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20979 fi
20980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20981 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20982 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20983 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20984 fi
20985 fi
20986 fi
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002 if test $gl_cv_have_include_next = yes; then
21003 gl_cv_next_time_h='<'time.h'>'
21004 else
21005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21006 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21007 if test "${gl_cv_next_time_h+set}" = set; then :
21008 $as_echo_n "(cached) " >&6
21009 else
21010
21011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21012 /* end confdefs.h. */
21013 #include <time.h>
21014
21015 _ACEOF
21016 case "$host_os" in
21017 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21018 *) gl_absname_cpp="$ac_cpp" ;;
21019 esac
21020
21021 case "$host_os" in
21022 mingw*)
21023 gl_dirsep_regex='[/\\]'
21024 ;;
21025 *)
21026 gl_dirsep_regex='\/'
21027 ;;
21028 esac
21029 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21030
21031 gl_header_literal_regex=`echo 'time.h' \
21032 | sed -e "$gl_make_literal_regex_sed"`
21033 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21034 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21035 s|^/[^/]|//&|
21036 p
21037 q
21038 }'
21039 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21040 sed -n "$gl_absolute_header_sed"`'"'
21041
21042
21043 fi
21044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21045 $as_echo "$gl_cv_next_time_h" >&6; }
21046 fi
21047 NEXT_TIME_H=$gl_cv_next_time_h
21048
21049 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21050 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21051 gl_next_as_first_directive='<'time.h'>'
21052 else
21053 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21054 gl_next_as_first_directive=$gl_cv_next_time_h
21055 fi
21056 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21072 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21073 ac_have_decl=1
21074 else
21075 ac_have_decl=0
21076 fi
21077
21078 cat >>confdefs.h <<_ACEOF
21079 #define HAVE_DECL_UNSETENV $ac_have_decl
21080 _ACEOF
21081
21082
21083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21084 $as_echo_n "checking whether the utimes function works... " >&6; }
21085 if test "${gl_cv_func_working_utimes+set}" = set; then :
21086 $as_echo_n "(cached) " >&6
21087 else
21088
21089 if test "$cross_compiling" = yes; then :
21090 gl_cv_func_working_utimes=no
21091 else
21092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21093 /* end confdefs.h. */
21094
21095 #include <sys/types.h>
21096 #include <sys/stat.h>
21097 #include <fcntl.h>
21098 #include <sys/time.h>
21099 #include <time.h>
21100 #include <unistd.h>
21101 #include <stdlib.h>
21102 #include <stdio.h>
21103 #include <utime.h>
21104
21105 static int
21106 inorder (time_t a, time_t b, time_t c)
21107 {
21108 return a <= b && b <= c;
21109 }
21110
21111 int
21112 main ()
21113 {
21114 int result = 0;
21115 char const *file = "conftest.utimes";
21116 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
21117
21118 /* Test whether utimes() essentially works. */
21119 {
21120 struct stat sbuf;
21121 FILE *f = fopen (file, "w");
21122 if (f == NULL)
21123 result |= 1;
21124 else if (fclose (f) != 0)
21125 result |= 1;
21126 else if (utimes (file, timeval) != 0)
21127 result |= 2;
21128 else if (lstat (file, &sbuf) != 0)
21129 result |= 1;
21130 else if (!(sbuf.st_atime == timeval[0].tv_sec
21131 && sbuf.st_mtime == timeval[1].tv_sec))
21132 result |= 4;
21133 if (unlink (file) != 0)
21134 result |= 1;
21135 }
21136
21137 /* Test whether utimes() with a NULL argument sets the file's timestamp
21138 to the current time. Use 'fstat' as well as 'time' to
21139 determine the "current" time, to accommodate NFS file systems
21140 if there is a time skew between the host and the NFS server. */
21141 {
21142 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21143 if (fd < 0)
21144 result |= 1;
21145 else
21146 {
21147 time_t t0, t2;
21148 struct stat st0, st1, st2;
21149 if (time (&t0) == (time_t) -1)
21150 result |= 1;
21151 else if (fstat (fd, &st0) != 0)
21152 result |= 1;
21153 else if (utimes (file, timeval) != 0)
21154 result |= 2;
21155 else if (utimes (file, NULL) != 0)
21156 result |= 8;
21157 else if (fstat (fd, &st1) != 0)
21158 result |= 1;
21159 else if (write (fd, "\n", 1) != 1)
21160 result |= 1;
21161 else if (fstat (fd, &st2) != 0)
21162 result |= 1;
21163 else if (time (&t2) == (time_t) -1)
21164 result |= 1;
21165 else
21166 {
21167 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21168 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21169 if (! (st1.st_atime == st1.st_mtime))
21170 result |= 16;
21171 if (! (m_ok_POSIX || m_ok_NFS))
21172 result |= 32;
21173 }
21174 if (close (fd) != 0)
21175 result |= 1;
21176 }
21177 if (unlink (file) != 0)
21178 result |= 1;
21179 }
21180
21181 /* Test whether utimes() with a NULL argument works on read-only files. */
21182 {
21183 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21184 if (fd < 0)
21185 result |= 1;
21186 else if (close (fd) != 0)
21187 result |= 1;
21188 else if (utimes (file, NULL) != 0)
21189 result |= 64;
21190 if (unlink (file) != 0)
21191 result |= 1;
21192 }
21193
21194 return result;
21195 }
21196
21197 _ACEOF
21198 if ac_fn_c_try_run "$LINENO"; then :
21199 gl_cv_func_working_utimes=yes
21200 else
21201 gl_cv_func_working_utimes=no
21202 fi
21203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21204 conftest.$ac_objext conftest.beam conftest.$ac_ext
21205 fi
21206
21207 fi
21208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21209 $as_echo "$gl_cv_func_working_utimes" >&6; }
21210
21211 if test $gl_cv_func_working_utimes = yes; then
21212
21213 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
21214
21215 fi
21216
21217
21218
21219
21220
21221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21222 $as_echo_n "checking for struct utimbuf... " >&6; }
21223 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21224 $as_echo_n "(cached) " >&6
21225 else
21226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21227 /* end confdefs.h. */
21228 #if HAVE_SYS_TIME_H
21229 #include <sys/time.h>
21230 #endif
21231 #include <time.h>
21232 #ifdef HAVE_UTIME_H
21233 #include <utime.h>
21234 #endif
21235
21236 int
21237 main ()
21238 {
21239 static struct utimbuf x; x.actime = x.modtime;
21240 ;
21241 return 0;
21242 }
21243 _ACEOF
21244 if ac_fn_c_try_compile "$LINENO"; then :
21245 gl_cv_sys_struct_utimbuf=yes
21246 else
21247 gl_cv_sys_struct_utimbuf=no
21248 fi
21249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21250 fi
21251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21252 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
21253
21254 if test $gl_cv_sys_struct_utimbuf = yes; then
21255
21256 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
21257
21258 fi
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21271 $as_echo_n "checking type of array argument to getgroups... " >&6; }
21272 if test "${ac_cv_type_getgroups+set}" = set; then :
21273 $as_echo_n "(cached) " >&6
21274 else
21275 if test "$cross_compiling" = yes; then :
21276 ac_cv_type_getgroups=cross
21277 else
21278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21279 /* end confdefs.h. */
21280 /* Thanks to Mike Rendell for this test. */
21281 $ac_includes_default
21282 #define NGID 256
21283 #undef MAX
21284 #define MAX(x, y) ((x) > (y) ? (x) : (y))
21285
21286 int
21287 main ()
21288 {
21289 gid_t gidset[NGID];
21290 int i, n;
21291 union { gid_t gval; long int lval; } val;
21292
21293 val.lval = -1;
21294 for (i = 0; i < NGID; i++)
21295 gidset[i] = val.gval;
21296 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21297 gidset);
21298 /* Exit non-zero if getgroups seems to require an array of ints. This
21299 happens when gid_t is short int but getgroups modifies an array
21300 of ints. */
21301 return n > 0 && gidset[n] != val.gval;
21302 }
21303 _ACEOF
21304 if ac_fn_c_try_run "$LINENO"; then :
21305 ac_cv_type_getgroups=gid_t
21306 else
21307 ac_cv_type_getgroups=int
21308 fi
21309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21310 conftest.$ac_objext conftest.beam conftest.$ac_ext
21311 fi
21312
21313 if test $ac_cv_type_getgroups = cross; then
21314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21315 /* end confdefs.h. */
21316 #include <unistd.h>
21317
21318 _ACEOF
21319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21320 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
21321 ac_cv_type_getgroups=gid_t
21322 else
21323 ac_cv_type_getgroups=int
21324 fi
21325 rm -f conftest*
21326
21327 fi
21328 fi
21329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
21330 $as_echo "$ac_cv_type_getgroups" >&6; }
21331
21332 cat >>confdefs.h <<_ACEOF
21333 #define GETGROUPS_T $ac_cv_type_getgroups
21334 _ACEOF
21335
21336
21337
21338
21339 if false; then
21340 GL_COND_LIBTOOL_TRUE=
21341 GL_COND_LIBTOOL_FALSE='#'
21342 else
21343 GL_COND_LIBTOOL_TRUE='#'
21344 GL_COND_LIBTOOL_FALSE=
21345 fi
21346
21347 gl_cond_libtool=false
21348 gl_libdeps=
21349 gl_ltlibdeps=
21350 gl_m4_base='m4'
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360 gl_source_base='lib'
21361
21362
21363 if test $ac_cv_func_alloca_works = no; then
21364 :
21365 fi
21366
21367 # Define an additional variable used in the Makefile substitution.
21368 if test $ac_cv_working_alloca_h = yes; then
21369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21370 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21371 if test "${gl_cv_rpl_alloca+set}" = set; then :
21372 $as_echo_n "(cached) " >&6
21373 else
21374
21375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21376 /* end confdefs.h. */
21377
21378 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21379 Need own alloca
21380 #endif
21381
21382 _ACEOF
21383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21384 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21385 gl_cv_rpl_alloca=yes
21386 else
21387 gl_cv_rpl_alloca=no
21388 fi
21389 rm -f conftest*
21390
21391
21392 fi
21393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21394 $as_echo "$gl_cv_rpl_alloca" >&6; }
21395 if test $gl_cv_rpl_alloca = yes; then
21396
21397 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
21398
21399 ALLOCA_H=alloca.h
21400 else
21401 ALLOCA_H=
21402 fi
21403 else
21404 ALLOCA_H=alloca.h
21405 fi
21406
21407 if test -n "$ALLOCA_H"; then
21408 GL_GENERATE_ALLOCA_H_TRUE=
21409 GL_GENERATE_ALLOCA_H_FALSE='#'
21410 else
21411 GL_GENERATE_ALLOCA_H_TRUE='#'
21412 GL_GENERATE_ALLOCA_H_FALSE=
21413 fi
21414
21415
21416
21417
21418
21419
21420 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
21421 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
21422
21423 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
21424 # programs in the package would end up linked with that potentially-shared
21425 # library, inducing unnecessary run-time overhead.
21426 LIB_CLOCK_GETTIME=
21427
21428 gl_saved_libs=$LIBS
21429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21430 $as_echo_n "checking for library containing clock_gettime... " >&6; }
21431 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21432 $as_echo_n "(cached) " >&6
21433 else
21434 ac_func_search_save_LIBS=$LIBS
21435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21436 /* end confdefs.h. */
21437
21438 /* Override any GCC internal prototype to avoid an error.
21439 Use char because int might match the return type of a GCC
21440 builtin and then its argument prototype would still apply. */
21441 #ifdef __cplusplus
21442 extern "C"
21443 #endif
21444 char clock_gettime ();
21445 int
21446 main ()
21447 {
21448 return clock_gettime ();
21449 ;
21450 return 0;
21451 }
21452 _ACEOF
21453 for ac_lib in '' rt posix4; do
21454 if test -z "$ac_lib"; then
21455 ac_res="none required"
21456 else
21457 ac_res=-l$ac_lib
21458 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21459 fi
21460 if ac_fn_c_try_link "$LINENO"; then :
21461 ac_cv_search_clock_gettime=$ac_res
21462 fi
21463 rm -f core conftest.err conftest.$ac_objext \
21464 conftest$ac_exeext
21465 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21466 break
21467 fi
21468 done
21469 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21470
21471 else
21472 ac_cv_search_clock_gettime=no
21473 fi
21474 rm conftest.$ac_ext
21475 LIBS=$ac_func_search_save_LIBS
21476 fi
21477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21478 $as_echo "$ac_cv_search_clock_gettime" >&6; }
21479 ac_res=$ac_cv_search_clock_gettime
21480 if test "$ac_res" != no; then :
21481 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21482 test "$ac_cv_search_clock_gettime" = "none required" ||
21483 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
21484 fi
21485
21486 for ac_func in clock_gettime clock_settime
21487 do :
21488 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21489 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21490 eval as_val=\$$as_ac_var
21491 if test "x$as_val" = x""yes; then :
21492 cat >>confdefs.h <<_ACEOF
21493 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21494 _ACEOF
21495
21496 fi
21497 done
21498
21499 LIBS=$gl_saved_libs
21500
21501
21502 :
21503
21504
21505
21506 cat >>confdefs.h <<_ACEOF
21507 #define GNULIB_CLOSE_STREAM 1
21508 _ACEOF
21509
21510
21511
21512
21513 :
21514
21515
21516
21517 :
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537 if test $gl_cv_have_include_next = yes; then
21538 gl_cv_next_dirent_h='<'dirent.h'>'
21539 else
21540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
21541 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
21542 if test "${gl_cv_next_dirent_h+set}" = set; then :
21543 $as_echo_n "(cached) " >&6
21544 else
21545
21546 if test $ac_cv_header_dirent_h = yes; then
21547
21548
21549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21550 /* end confdefs.h. */
21551 #include <dirent.h>
21552
21553 _ACEOF
21554 case "$host_os" in
21555 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21556 *) gl_absname_cpp="$ac_cpp" ;;
21557 esac
21558
21559 case "$host_os" in
21560 mingw*)
21561 gl_dirsep_regex='[/\\]'
21562 ;;
21563 *)
21564 gl_dirsep_regex='\/'
21565 ;;
21566 esac
21567 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21568
21569 gl_header_literal_regex=`echo 'dirent.h' \
21570 | sed -e "$gl_make_literal_regex_sed"`
21571 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21572 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21573 s|^/[^/]|//&|
21574 p
21575 q
21576 }'
21577 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21578 sed -n "$gl_absolute_header_sed"`'"'
21579 else
21580 gl_cv_next_dirent_h='<'dirent.h'>'
21581 fi
21582
21583
21584 fi
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
21586 $as_echo "$gl_cv_next_dirent_h" >&6; }
21587 fi
21588 NEXT_DIRENT_H=$gl_cv_next_dirent_h
21589
21590 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21591 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21592 gl_next_as_first_directive='<'dirent.h'>'
21593 else
21594 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21595 gl_next_as_first_directive=$gl_cv_next_dirent_h
21596 fi
21597 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
21598
21599
21600
21601
21602 if test $ac_cv_header_dirent_h = yes; then
21603 HAVE_DIRENT_H=1
21604 else
21605 HAVE_DIRENT_H=0
21606 fi
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21618
21619
21620 if test $HAVE_DUP2 = 1; then
21621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21622 $as_echo_n "checking whether dup2 works... " >&6; }
21623 if test "${gl_cv_func_dup2_works+set}" = set; then :
21624 $as_echo_n "(cached) " >&6
21625 else
21626 if test "$cross_compiling" = yes; then :
21627 case "$host_os" in
21628 mingw*) # on this platform, dup2 always returns 0 for success
21629 gl_cv_func_dup2_works="guessing no" ;;
21630 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21631 gl_cv_func_dup2_works="guessing no" ;;
21632 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
21633 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
21634 gl_cv_func_dup2_works="guessing no" ;;
21635 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
21636 gl_cv_func_dup2_works="guessing no" ;;
21637 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21638 gl_cv_func_dup2_works="guessing no" ;;
21639 *) gl_cv_func_dup2_works="guessing yes" ;;
21640 esac
21641 else
21642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21643 /* end confdefs.h. */
21644
21645 #include <unistd.h>
21646 #include <fcntl.h>
21647 #include <errno.h>
21648 int
21649 main ()
21650 {
21651 int result = 0;
21652 #ifdef FD_CLOEXEC
21653 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21654 result |= 1;
21655 #endif
21656 if (dup2 (1, 1) == 0)
21657 result |= 2;
21658 #ifdef FD_CLOEXEC
21659 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21660 result |= 4;
21661 #endif
21662 close (0);
21663 if (dup2 (0, 0) != -1)
21664 result |= 8;
21665 /* Many gnulib modules require POSIX conformance of EBADF. */
21666 if (dup2 (2, 1000000) == -1 && errno != EBADF)
21667 result |= 16;
21668 /* Flush out a cygwin core dump. */
21669 if (dup2 (2, -1) != -1 || errno != EBADF)
21670 result |= 32;
21671 return result;
21672
21673 ;
21674 return 0;
21675 }
21676
21677 _ACEOF
21678 if ac_fn_c_try_run "$LINENO"; then :
21679 gl_cv_func_dup2_works=yes
21680 else
21681 gl_cv_func_dup2_works=no
21682 fi
21683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21684 conftest.$ac_objext conftest.beam conftest.$ac_ext
21685 fi
21686
21687
21688 fi
21689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21690 $as_echo "$gl_cv_func_dup2_works" >&6; }
21691 case "$gl_cv_func_dup2_works" in
21692 *yes) ;;
21693 *)
21694 REPLACE_DUP2=1
21695 ;;
21696 esac
21697 fi
21698
21699
21700 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
21701
21702
21703
21704
21705
21706
21707
21708
21709 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
21710
21711
21712 fi
21713
21714
21715
21716
21717
21718 GNULIB_DUP2=1
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730 GNULIB_ENVIRON=1
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740 LIB_EXECINFO=''
21741 EXECINFO_H='execinfo.h'
21742
21743 if test $ac_cv_header_execinfo_h = yes; then
21744 gl_saved_libs=$LIBS
21745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
21746 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
21747 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21748 $as_echo_n "(cached) " >&6
21749 else
21750 ac_func_search_save_LIBS=$LIBS
21751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21752 /* end confdefs.h. */
21753
21754 /* Override any GCC internal prototype to avoid an error.
21755 Use char because int might match the return type of a GCC
21756 builtin and then its argument prototype would still apply. */
21757 #ifdef __cplusplus
21758 extern "C"
21759 #endif
21760 char backtrace_symbols_fd ();
21761 int
21762 main ()
21763 {
21764 return backtrace_symbols_fd ();
21765 ;
21766 return 0;
21767 }
21768 _ACEOF
21769 for ac_lib in '' execinfo; do
21770 if test -z "$ac_lib"; then
21771 ac_res="none required"
21772 else
21773 ac_res=-l$ac_lib
21774 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21775 fi
21776 if ac_fn_c_try_link "$LINENO"; then :
21777 ac_cv_search_backtrace_symbols_fd=$ac_res
21778 fi
21779 rm -f core conftest.err conftest.$ac_objext \
21780 conftest$ac_exeext
21781 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21782 break
21783 fi
21784 done
21785 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21786
21787 else
21788 ac_cv_search_backtrace_symbols_fd=no
21789 fi
21790 rm conftest.$ac_ext
21791 LIBS=$ac_func_search_save_LIBS
21792 fi
21793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
21794 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
21795 ac_res=$ac_cv_search_backtrace_symbols_fd
21796 if test "$ac_res" != no; then :
21797 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21798 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
21799 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
21800 fi
21801
21802 LIBS=$gl_saved_libs
21803 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
21804 fi
21805
21806 if test -n "$EXECINFO_H"; then
21807
21808
21809
21810
21811
21812
21813
21814
21815 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
21816
21817 fi
21818
21819
21820
21821 if test -n "$EXECINFO_H"; then
21822 GL_GENERATE_EXECINFO_H_TRUE=
21823 GL_GENERATE_EXECINFO_H_FALSE='#'
21824 else
21825 GL_GENERATE_EXECINFO_H_TRUE='#'
21826 GL_GENERATE_EXECINFO_H_FALSE=
21827 fi
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837 if test $ac_cv_func_faccessat = no; then
21838 HAVE_FACCESSAT=0
21839 fi
21840
21841 if test $HAVE_FACCESSAT = 0; then
21842
21843
21844
21845
21846
21847
21848
21849
21850 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21851
21852
21853 for ac_func in access
21854 do :
21855 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21856 if test "x$ac_cv_func_access" = x""yes; then :
21857 cat >>confdefs.h <<_ACEOF
21858 #define HAVE_ACCESS 1
21859 _ACEOF
21860
21861 fi
21862 done
21863
21864
21865 fi
21866
21867
21868 cat >>confdefs.h <<_ACEOF
21869 #define GNULIB_FACCESSAT 1
21870 _ACEOF
21871
21872
21873
21874
21875
21876
21877
21878 GNULIB_FACCESSAT=1
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895 if test $gl_cv_have_include_next = yes; then
21896 gl_cv_next_fcntl_h='<'fcntl.h'>'
21897 else
21898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21899 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21900 if test "${gl_cv_next_fcntl_h+set}" = set; then :
21901 $as_echo_n "(cached) " >&6
21902 else
21903
21904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21905 /* end confdefs.h. */
21906 #include <fcntl.h>
21907
21908 _ACEOF
21909 case "$host_os" in
21910 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21911 *) gl_absname_cpp="$ac_cpp" ;;
21912 esac
21913
21914 case "$host_os" in
21915 mingw*)
21916 gl_dirsep_regex='[/\\]'
21917 ;;
21918 *)
21919 gl_dirsep_regex='\/'
21920 ;;
21921 esac
21922 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21923
21924 gl_header_literal_regex=`echo 'fcntl.h' \
21925 | sed -e "$gl_make_literal_regex_sed"`
21926 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21927 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21928 s|^/[^/]|//&|
21929 p
21930 q
21931 }'
21932 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21933 sed -n "$gl_absolute_header_sed"`'"'
21934
21935
21936 fi
21937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21938 $as_echo "$gl_cv_next_fcntl_h" >&6; }
21939 fi
21940 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21941
21942 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21943 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21944 gl_next_as_first_directive='<'fcntl.h'>'
21945 else
21946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21947 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21948 fi
21949 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965 LIB_FDATASYNC=
21966
21967
21968 if test $ac_cv_have_decl_fdatasync = no; then
21969 HAVE_DECL_FDATASYNC=0
21970 for ac_func in fdatasync
21971 do :
21972 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
21973 if test "x$ac_cv_func_fdatasync" = x""yes; then :
21974 cat >>confdefs.h <<_ACEOF
21975 #define HAVE_FDATASYNC 1
21976 _ACEOF
21977
21978 fi
21979 done
21980
21981 if test $ac_cv_func_fdatasync = no; then
21982 HAVE_FDATASYNC=0
21983 fi
21984 else
21985 gl_saved_libs=$LIBS
21986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
21987 $as_echo_n "checking for library containing fdatasync... " >&6; }
21988 if test "${ac_cv_search_fdatasync+set}" = set; then :
21989 $as_echo_n "(cached) " >&6
21990 else
21991 ac_func_search_save_LIBS=$LIBS
21992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21993 /* end confdefs.h. */
21994
21995 /* Override any GCC internal prototype to avoid an error.
21996 Use char because int might match the return type of a GCC
21997 builtin and then its argument prototype would still apply. */
21998 #ifdef __cplusplus
21999 extern "C"
22000 #endif
22001 char fdatasync ();
22002 int
22003 main ()
22004 {
22005 return fdatasync ();
22006 ;
22007 return 0;
22008 }
22009 _ACEOF
22010 for ac_lib in '' rt posix4; do
22011 if test -z "$ac_lib"; then
22012 ac_res="none required"
22013 else
22014 ac_res=-l$ac_lib
22015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22016 fi
22017 if ac_fn_c_try_link "$LINENO"; then :
22018 ac_cv_search_fdatasync=$ac_res
22019 fi
22020 rm -f core conftest.err conftest.$ac_objext \
22021 conftest$ac_exeext
22022 if test "${ac_cv_search_fdatasync+set}" = set; then :
22023 break
22024 fi
22025 done
22026 if test "${ac_cv_search_fdatasync+set}" = set; then :
22027
22028 else
22029 ac_cv_search_fdatasync=no
22030 fi
22031 rm conftest.$ac_ext
22032 LIBS=$ac_func_search_save_LIBS
22033 fi
22034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22035 $as_echo "$ac_cv_search_fdatasync" >&6; }
22036 ac_res=$ac_cv_search_fdatasync
22037 if test "$ac_res" != no; then :
22038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22039 test "$ac_cv_search_fdatasync" = "none required" ||
22040 LIB_FDATASYNC=$ac_cv_search_fdatasync
22041 fi
22042
22043 LIBS=$gl_saved_libs
22044 fi
22045
22046 if test $HAVE_FDATASYNC = 0; then
22047
22048
22049
22050
22051
22052
22053
22054
22055 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22056
22057 fi
22058
22059
22060
22061
22062
22063 GNULIB_FDATASYNC=1
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22075 #include <dirent.h>
22076
22077 "
22078 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22079 ac_have_decl=1
22080 else
22081 ac_have_decl=0
22082 fi
22083
22084 cat >>confdefs.h <<_ACEOF
22085 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22086 _ACEOF
22087 if test $ac_have_decl = 1; then :
22088
22089 else
22090 HAVE_DECL_FDOPENDIR=0
22091 fi
22092
22093
22094 if test $ac_cv_func_fdopendir = no; then
22095 HAVE_FDOPENDIR=0
22096 else
22097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22098 $as_echo_n "checking whether fdopendir works... " >&6; }
22099 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22100 $as_echo_n "(cached) " >&6
22101 else
22102 if test "$cross_compiling" = yes; then :
22103 case "$host_os" in
22104 # Guess yes on glibc systems.
22105 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22106 # If we don't know, assume the worst.
22107 *) gl_cv_func_fdopendir_works="guessing no" ;;
22108 esac
22109
22110 else
22111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22112 /* end confdefs.h. */
22113
22114 #include <dirent.h>
22115 #include <fcntl.h>
22116 #include <unistd.h>
22117 #if !HAVE_DECL_FDOPENDIR
22118 extern
22119 # ifdef __cplusplus
22120 "C"
22121 # endif
22122 DIR *fdopendir (int);
22123 #endif
22124
22125 int
22126 main ()
22127 {
22128 int result = 0;
22129 int fd = open ("conftest.c", O_RDONLY);
22130 if (fd < 0) result |= 1;
22131 if (fdopendir (fd)) result |= 2;
22132 if (close (fd)) result |= 4;
22133 return result;
22134 ;
22135 return 0;
22136 }
22137 _ACEOF
22138 if ac_fn_c_try_run "$LINENO"; then :
22139 gl_cv_func_fdopendir_works=yes
22140 else
22141 gl_cv_func_fdopendir_works=no
22142 fi
22143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22144 conftest.$ac_objext conftest.beam conftest.$ac_ext
22145 fi
22146
22147 fi
22148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22149 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22150 case "$gl_cv_func_fdopendir_works" in
22151 *yes) ;;
22152 *)
22153 REPLACE_FDOPENDIR=1
22154 ;;
22155 esac
22156 fi
22157
22158 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22159
22160
22161
22162
22163
22164
22165
22166
22167 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22168
22169 fi
22170
22171
22172
22173
22174
22175 GNULIB_FDOPENDIR=1
22176
22177
22178
22179
22180
22181
22182
22183 cat >>confdefs.h <<_ACEOF
22184 #define GNULIB_FDOPENDIR 1
22185 _ACEOF
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195 fp_headers='
22196 # include <stdio.h>
22197 # if HAVE_STDIO_EXT_H
22198 # include <stdio_ext.h>
22199 # endif
22200 '
22201 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22202 "
22203 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22204 ac_have_decl=1
22205 else
22206 ac_have_decl=0
22207 fi
22208
22209 cat >>confdefs.h <<_ACEOF
22210 #define HAVE_DECL___FPENDING $ac_have_decl
22211 _ACEOF
22212
22213
22214 if test $ac_cv_func___fpending = no; then
22215
22216
22217
22218
22219
22220
22221
22222
22223 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22224
22225
22226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22227 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
22228 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
22229 $as_echo_n "(cached) " >&6
22230 else
22231
22232 for ac_expr in \
22233 \
22234 '# glibc2' \
22235 'fp->_IO_write_ptr - fp->_IO_write_base' \
22236 \
22237 '# traditional Unix' \
22238 'fp->_ptr - fp->_base' \
22239 \
22240 '# BSD' \
22241 'fp->_p - fp->_bf._base' \
22242 \
22243 '# SCO, Unixware' \
22244 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
22245 \
22246 '# QNX' \
22247 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
22248 \
22249 '# old glibc?' \
22250 'fp->__bufp - fp->__buffer' \
22251 \
22252 '# old glibc iostream?' \
22253 'fp->_pptr - fp->_pbase' \
22254 \
22255 '# emx+gcc' \
22256 'fp->_ptr - fp->_buffer' \
22257 \
22258 '# Minix' \
22259 'fp->_ptr - fp->_buf' \
22260 \
22261 '# Plan9' \
22262 'fp->wp - fp->buf' \
22263 \
22264 '# VMS' \
22265 '(*fp)->_ptr - (*fp)->_base' \
22266 \
22267 '# e.g., DGUX R4.11; the info is not available' \
22268 1 \
22269 ; do
22270
22271 # Skip each embedded comment.
22272 case "$ac_expr" in '#'*) continue;; esac
22273
22274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22275 /* end confdefs.h. */
22276 #include <stdio.h>
22277 int
22278 main ()
22279 {
22280 FILE *fp = stdin; (void) ($ac_expr);
22281 ;
22282 return 0;
22283 }
22284 _ACEOF
22285 if ac_fn_c_try_compile "$LINENO"; then :
22286 fp_done=yes
22287
22288 fi
22289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22290 test "$fp_done" = yes && break
22291 done
22292
22293 ac_cv_sys_pending_output_n_bytes=$ac_expr
22294
22295
22296 fi
22297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
22298 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
22299
22300 cat >>confdefs.h <<_ACEOF
22301 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
22302 _ACEOF
22303
22304
22305 fi
22306
22307
22308
22309
22310
22311
22312 if test $ac_cv_func_fstatat = no; then
22313 HAVE_FSTATAT=0
22314 else
22315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22316 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
22317 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
22318 $as_echo_n "(cached) " >&6
22319 else
22320 if test "$cross_compiling" = yes; then :
22321 case "$host_os" in
22322 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22323 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
22324 esac
22325
22326 else
22327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22328 /* end confdefs.h. */
22329
22330 #include <fcntl.h>
22331 #include <sys/stat.h>
22332 int
22333 main (void)
22334 {
22335 struct stat a;
22336 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22337 }
22338
22339 _ACEOF
22340 if ac_fn_c_try_run "$LINENO"; then :
22341 gl_cv_func_fstatat_zero_flag=yes
22342 else
22343 gl_cv_func_fstatat_zero_flag=no
22344 fi
22345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22346 conftest.$ac_objext conftest.beam conftest.$ac_ext
22347 fi
22348
22349
22350 fi
22351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22352 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
22353
22354 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22355 *yes+*yes) ;;
22356 *) REPLACE_FSTATAT=1
22357 case $gl_cv_func_fstatat_zero_flag in
22358 *yes)
22359
22360 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22361
22362 ;;
22363 esac
22364 ;;
22365 esac
22366 fi
22367
22368 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22369
22370
22371
22372
22373
22374
22375
22376
22377 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22378
22379 fi
22380
22381
22382
22383
22384
22385 GNULIB_FSTATAT=1
22386
22387
22388
22389
22390
22391
22392
22393
22394 if test $ac_cv_func_fsync = no; then
22395 HAVE_FSYNC=0
22396 fi
22397
22398 if test $HAVE_FSYNC = 0; then
22399
22400
22401
22402
22403
22404
22405
22406
22407 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22408
22409 :
22410 fi
22411
22412
22413
22414
22415
22416 GNULIB_FSYNC=1
22417
22418
22419
22420
22421
22422
22423
22424 # Persuade glibc <stdlib.h> to declare getloadavg().
22425
22426
22427 gl_save_LIBS=$LIBS
22428
22429 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
22430 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
22431 HAVE_GETLOADAVG=1
22432 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
22433 if test "x$ac_cv_func_getloadavg" = x""yes; then :
22434
22435 else
22436 gl_func_getloadavg_done=no
22437
22438 # Some systems with -lutil have (and need) -lkvm as well, some do not.
22439 # On Solaris, -lkvm requires nlist from -lelf, so check that first
22440 # to get the right answer into the cache.
22441 # For kstat on solaris, we need to test for libelf and libkvm to force the
22442 # definition of SVR4 below.
22443 if test $gl_func_getloadavg_done = no; then
22444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
22445 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
22446 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
22447 $as_echo_n "(cached) " >&6
22448 else
22449 ac_check_lib_save_LIBS=$LIBS
22450 LIBS="-lelf $LIBS"
22451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22452 /* end confdefs.h. */
22453
22454 /* Override any GCC internal prototype to avoid an error.
22455 Use char because int might match the return type of a GCC
22456 builtin and then its argument prototype would still apply. */
22457 #ifdef __cplusplus
22458 extern "C"
22459 #endif
22460 char elf_begin ();
22461 int
22462 main ()
22463 {
22464 return elf_begin ();
22465 ;
22466 return 0;
22467 }
22468 _ACEOF
22469 if ac_fn_c_try_link "$LINENO"; then :
22470 ac_cv_lib_elf_elf_begin=yes
22471 else
22472 ac_cv_lib_elf_elf_begin=no
22473 fi
22474 rm -f core conftest.err conftest.$ac_objext \
22475 conftest$ac_exeext conftest.$ac_ext
22476 LIBS=$ac_check_lib_save_LIBS
22477 fi
22478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
22479 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
22480 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
22481 LIBS="-lelf $LIBS"
22482 fi
22483
22484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
22485 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
22486 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
22487 $as_echo_n "(cached) " >&6
22488 else
22489 ac_check_lib_save_LIBS=$LIBS
22490 LIBS="-lkvm $LIBS"
22491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22492 /* end confdefs.h. */
22493
22494 /* Override any GCC internal prototype to avoid an error.
22495 Use char because int might match the return type of a GCC
22496 builtin and then its argument prototype would still apply. */
22497 #ifdef __cplusplus
22498 extern "C"
22499 #endif
22500 char kvm_open ();
22501 int
22502 main ()
22503 {
22504 return kvm_open ();
22505 ;
22506 return 0;
22507 }
22508 _ACEOF
22509 if ac_fn_c_try_link "$LINENO"; then :
22510 ac_cv_lib_kvm_kvm_open=yes
22511 else
22512 ac_cv_lib_kvm_kvm_open=no
22513 fi
22514 rm -f core conftest.err conftest.$ac_objext \
22515 conftest$ac_exeext conftest.$ac_ext
22516 LIBS=$ac_check_lib_save_LIBS
22517 fi
22518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
22519 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
22520 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
22521 LIBS="-lkvm $LIBS"
22522 fi
22523
22524 # Check for the 4.4BSD definition of getloadavg.
22525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
22526 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
22527 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
22528 $as_echo_n "(cached) " >&6
22529 else
22530 ac_check_lib_save_LIBS=$LIBS
22531 LIBS="-lutil $LIBS"
22532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22533 /* end confdefs.h. */
22534
22535 /* Override any GCC internal prototype to avoid an error.
22536 Use char because int might match the return type of a GCC
22537 builtin and then its argument prototype would still apply. */
22538 #ifdef __cplusplus
22539 extern "C"
22540 #endif
22541 char getloadavg ();
22542 int
22543 main ()
22544 {
22545 return getloadavg ();
22546 ;
22547 return 0;
22548 }
22549 _ACEOF
22550 if ac_fn_c_try_link "$LINENO"; then :
22551 ac_cv_lib_util_getloadavg=yes
22552 else
22553 ac_cv_lib_util_getloadavg=no
22554 fi
22555 rm -f core conftest.err conftest.$ac_objext \
22556 conftest$ac_exeext conftest.$ac_ext
22557 LIBS=$ac_check_lib_save_LIBS
22558 fi
22559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
22560 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
22561 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
22562 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
22563 fi
22564
22565 fi
22566
22567 if test $gl_func_getloadavg_done = no; then
22568 # There is a commonly available library for RS/6000 AIX.
22569 # Since it is not a standard part of AIX, it might be installed locally.
22570 gl_getloadavg_LIBS=$LIBS
22571 LIBS="-L/usr/local/lib $LIBS"
22572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
22573 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
22574 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
22575 $as_echo_n "(cached) " >&6
22576 else
22577 ac_check_lib_save_LIBS=$LIBS
22578 LIBS="-lgetloadavg $LIBS"
22579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22580 /* end confdefs.h. */
22581
22582 /* Override any GCC internal prototype to avoid an error.
22583 Use char because int might match the return type of a GCC
22584 builtin and then its argument prototype would still apply. */
22585 #ifdef __cplusplus
22586 extern "C"
22587 #endif
22588 char getloadavg ();
22589 int
22590 main ()
22591 {
22592 return getloadavg ();
22593 ;
22594 return 0;
22595 }
22596 _ACEOF
22597 if ac_fn_c_try_link "$LINENO"; then :
22598 ac_cv_lib_getloadavg_getloadavg=yes
22599 else
22600 ac_cv_lib_getloadavg_getloadavg=no
22601 fi
22602 rm -f core conftest.err conftest.$ac_objext \
22603 conftest$ac_exeext conftest.$ac_ext
22604 LIBS=$ac_check_lib_save_LIBS
22605 fi
22606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
22607 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
22608 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
22609 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
22610 else
22611 LIBS=$gl_getloadavg_LIBS
22612 fi
22613
22614 fi
22615
22616 # Set up the replacement function if necessary.
22617 if test $gl_func_getloadavg_done = no; then
22618 HAVE_GETLOADAVG=0
22619
22620 # Solaris has libkstat which does not require root.
22621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
22622 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
22623 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
22624 $as_echo_n "(cached) " >&6
22625 else
22626 ac_check_lib_save_LIBS=$LIBS
22627 LIBS="-lkstat $LIBS"
22628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22629 /* end confdefs.h. */
22630
22631 /* Override any GCC internal prototype to avoid an error.
22632 Use char because int might match the return type of a GCC
22633 builtin and then its argument prototype would still apply. */
22634 #ifdef __cplusplus
22635 extern "C"
22636 #endif
22637 char kstat_open ();
22638 int
22639 main ()
22640 {
22641 return kstat_open ();
22642 ;
22643 return 0;
22644 }
22645 _ACEOF
22646 if ac_fn_c_try_link "$LINENO"; then :
22647 ac_cv_lib_kstat_kstat_open=yes
22648 else
22649 ac_cv_lib_kstat_kstat_open=no
22650 fi
22651 rm -f core conftest.err conftest.$ac_objext \
22652 conftest$ac_exeext conftest.$ac_ext
22653 LIBS=$ac_check_lib_save_LIBS
22654 fi
22655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
22656 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
22657 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
22658 cat >>confdefs.h <<_ACEOF
22659 #define HAVE_LIBKSTAT 1
22660 _ACEOF
22661
22662 LIBS="-lkstat $LIBS"
22663
22664 fi
22665
22666 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
22667
22668 # AIX has libperfstat which does not require root
22669 if test $gl_func_getloadavg_done = no; then
22670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
22671 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
22672 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
22673 $as_echo_n "(cached) " >&6
22674 else
22675 ac_check_lib_save_LIBS=$LIBS
22676 LIBS="-lperfstat $LIBS"
22677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22678 /* end confdefs.h. */
22679
22680 /* Override any GCC internal prototype to avoid an error.
22681 Use char because int might match the return type of a GCC
22682 builtin and then its argument prototype would still apply. */
22683 #ifdef __cplusplus
22684 extern "C"
22685 #endif
22686 char perfstat_cpu_total ();
22687 int
22688 main ()
22689 {
22690 return perfstat_cpu_total ();
22691 ;
22692 return 0;
22693 }
22694 _ACEOF
22695 if ac_fn_c_try_link "$LINENO"; then :
22696 ac_cv_lib_perfstat_perfstat_cpu_total=yes
22697 else
22698 ac_cv_lib_perfstat_perfstat_cpu_total=no
22699 fi
22700 rm -f core conftest.err conftest.$ac_objext \
22701 conftest$ac_exeext conftest.$ac_ext
22702 LIBS=$ac_check_lib_save_LIBS
22703 fi
22704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
22705 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
22706 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
22707 cat >>confdefs.h <<_ACEOF
22708 #define HAVE_LIBPERFSTAT 1
22709 _ACEOF
22710
22711 LIBS="-lperfstat $LIBS"
22712
22713 fi
22714
22715 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
22716 fi
22717
22718 if test $gl_func_getloadavg_done = no; then
22719 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
22720 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
22721 gl_func_getloadavg_done=yes
22722
22723 $as_echo "#define DGUX 1" >>confdefs.h
22724
22725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
22726 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
22727 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
22728 $as_echo_n "(cached) " >&6
22729 else
22730 ac_check_lib_save_LIBS=$LIBS
22731 LIBS="-ldgc $LIBS"
22732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22733 /* end confdefs.h. */
22734
22735 /* Override any GCC internal prototype to avoid an error.
22736 Use char because int might match the return type of a GCC
22737 builtin and then its argument prototype would still apply. */
22738 #ifdef __cplusplus
22739 extern "C"
22740 #endif
22741 char dg_sys_info ();
22742 int
22743 main ()
22744 {
22745 return dg_sys_info ();
22746 ;
22747 return 0;
22748 }
22749 _ACEOF
22750 if ac_fn_c_try_link "$LINENO"; then :
22751 ac_cv_lib_dgc_dg_sys_info=yes
22752 else
22753 ac_cv_lib_dgc_dg_sys_info=no
22754 fi
22755 rm -f core conftest.err conftest.$ac_objext \
22756 conftest$ac_exeext conftest.$ac_ext
22757 LIBS=$ac_check_lib_save_LIBS
22758 fi
22759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
22760 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
22761 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
22762 cat >>confdefs.h <<_ACEOF
22763 #define HAVE_LIBDGC 1
22764 _ACEOF
22765
22766 LIBS="-ldgc $LIBS"
22767
22768 fi
22769
22770 fi
22771
22772
22773 fi
22774 fi
22775 fi
22776
22777
22778 if test "x$gl_save_LIBS" = x; then
22779 GETLOADAVG_LIBS=$LIBS
22780 else
22781 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
22782 fi
22783 LIBS=$gl_save_LIBS
22784
22785
22786 # Test whether the system declares getloadavg. Solaris has the function
22787 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
22788 for ac_header in sys/loadavg.h
22789 do :
22790 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
22791 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
22792 cat >>confdefs.h <<_ACEOF
22793 #define HAVE_SYS_LOADAVG_H 1
22794 _ACEOF
22795
22796 fi
22797
22798 done
22799
22800 if test $ac_cv_header_sys_loadavg_h = yes; then
22801 HAVE_SYS_LOADAVG_H=1
22802 else
22803 HAVE_SYS_LOADAVG_H=0
22804 fi
22805 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
22806 # include <sys/loadavg.h>
22807 #endif
22808 #include <stdlib.h>
22809 "
22810 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
22811
22812 else
22813 HAVE_DECL_GETLOADAVG=0
22814 fi
22815
22816
22817 if test $HAVE_GETLOADAVG = 0; then
22818
22819
22820
22821
22822
22823
22824
22825
22826 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
22827
22828
22829 # Figure out what our getloadavg.c needs.
22830
22831
22832
22833 # On HPUX9, an unprivileged user can get load averages this way.
22834 if test $gl_func_getloadavg_done = no; then
22835 for ac_func in pstat_getdynamic
22836 do :
22837 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
22838 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
22839 cat >>confdefs.h <<_ACEOF
22840 #define HAVE_PSTAT_GETDYNAMIC 1
22841 _ACEOF
22842 gl_func_getloadavg_done=yes
22843 fi
22844 done
22845
22846 fi
22847
22848 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
22849 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
22850 # Irix 4.0.5F has the header but not the library.
22851 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
22852 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
22853 gl_func_getloadavg_done=yes
22854
22855 $as_echo "#define SVR4 1" >>confdefs.h
22856
22857 fi
22858
22859 if test $gl_func_getloadavg_done = no; then
22860 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
22861 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
22862 gl_func_getloadavg_done=yes
22863
22864 $as_echo "#define UMAX 1" >>confdefs.h
22865
22866
22867 $as_echo "#define UMAX4_3 1" >>confdefs.h
22868
22869 fi
22870
22871
22872 fi
22873
22874 if test $gl_func_getloadavg_done = no; then
22875 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
22876 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
22877 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
22878
22879 fi
22880
22881
22882 fi
22883
22884 if test $gl_func_getloadavg_done = no; then
22885 for ac_header in mach/mach.h
22886 do :
22887 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
22888 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
22889 cat >>confdefs.h <<_ACEOF
22890 #define HAVE_MACH_MACH_H 1
22891 _ACEOF
22892
22893 fi
22894
22895 done
22896
22897 fi
22898
22899 for ac_header in nlist.h
22900 do :
22901 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
22902 if test "x$ac_cv_header_nlist_h" = x""yes; then :
22903 cat >>confdefs.h <<_ACEOF
22904 #define HAVE_NLIST_H 1
22905 _ACEOF
22906 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
22907 "
22908 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
22909
22910 cat >>confdefs.h <<_ACEOF
22911 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
22912 _ACEOF
22913
22914
22915 fi
22916
22917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22918 /* end confdefs.h. */
22919 #include <nlist.h>
22920 int
22921 main ()
22922 {
22923 struct nlist x;
22924 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
22925 x.n_un.n_name = "";
22926 #else
22927 x.n_name = "";
22928 #endif
22929 ;
22930 return 0;
22931 }
22932 _ACEOF
22933 if ac_fn_c_try_link "$LINENO"; then :
22934
22935 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
22936
22937 fi
22938 rm -f core conftest.err conftest.$ac_objext \
22939 conftest$ac_exeext conftest.$ac_ext
22940
22941 fi
22942
22943 done
22944
22945 fi
22946
22947
22948
22949
22950
22951 GNULIB_GETLOADAVG=1
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962 if test $REPLACE_GETOPT = 1; then
22963
22964
22965
22966
22967
22968
22969
22970
22971 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22982
22983
22984
22985
22986 GNULIB_GL_UNISTD_H_GETOPT=1
22987 fi
22988
22989
22990
22991
22992
22993
22994
22995 REPLACE_GETOPT=0
22996 if test -n "$gl_replace_getopt"; then
22997 REPLACE_GETOPT=1
22998 fi
22999
23000 if test $REPLACE_GETOPT = 1; then
23001
23002 GETOPT_H=getopt.h
23003
23004 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23005
23006
23007
23008 fi
23009
23010 if test $REPLACE_GETOPT = 1; then
23011
23012
23013
23014
23015
23016
23017
23018
23019 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23030
23031
23032
23033
23034 GNULIB_GL_UNISTD_H_GETOPT=1
23035 fi
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048 gl_gettimeofday_timezone=void
23049 if test $ac_cv_func_gettimeofday != yes; then
23050 HAVE_GETTIMEOFDAY=0
23051 else
23052
23053
23054
23055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23056 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23057 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23058 $as_echo_n "(cached) " >&6
23059 else
23060 if test "$cross_compiling" = yes; then :
23061 # When cross-compiling:
23062 case "$host_os" in
23063 # Guess all is fine on glibc systems.
23064 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23065 # If we don't know, assume the worst.
23066 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23067 esac
23068
23069 else
23070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23071 /* end confdefs.h. */
23072 #include <string.h>
23073 #include <sys/time.h>
23074 #include <time.h>
23075 #include <stdlib.h>
23076
23077 int
23078 main ()
23079 {
23080
23081 time_t t = 0;
23082 struct tm *lt;
23083 struct tm saved_lt;
23084 struct timeval tv;
23085 lt = localtime (&t);
23086 saved_lt = *lt;
23087 gettimeofday (&tv, NULL);
23088 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23089
23090 ;
23091 return 0;
23092 }
23093 _ACEOF
23094 if ac_fn_c_try_run "$LINENO"; then :
23095 gl_cv_func_gettimeofday_clobber=no
23096 else
23097 gl_cv_func_gettimeofday_clobber=yes
23098 fi
23099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23100 conftest.$ac_objext conftest.beam conftest.$ac_ext
23101 fi
23102
23103 fi
23104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23105 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23106
23107 case "$gl_cv_func_gettimeofday_clobber" in
23108 *yes)
23109 REPLACE_GETTIMEOFDAY=1
23110
23111
23112 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23113
23114
23115 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23116
23117
23118
23119 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23120
23121 ;;
23122 esac
23123
23124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23125 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23126 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
23127 $as_echo_n "(cached) " >&6
23128 else
23129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23130 /* end confdefs.h. */
23131 #include <sys/time.h>
23132 struct timeval c;
23133 int gettimeofday (struct timeval *restrict, void *restrict);
23134
23135 int
23136 main ()
23137 {
23138 /* glibc uses struct timezone * rather than the POSIX void *
23139 if _GNU_SOURCE is defined. However, since the only portable
23140 use of gettimeofday uses NULL as the second parameter, and
23141 since the glibc definition is actually more typesafe, it is
23142 not worth wrapping this to get a compliant signature. */
23143 int (*f) (struct timeval *restrict, void *restrict)
23144 = gettimeofday;
23145 int x = f (&c, 0);
23146 return !(x | c.tv_sec | c.tv_usec);
23147
23148 ;
23149 return 0;
23150 }
23151 _ACEOF
23152 if ac_fn_c_try_compile "$LINENO"; then :
23153 gl_cv_func_gettimeofday_posix_signature=yes
23154 else
23155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23156 /* end confdefs.h. */
23157 #include <sys/time.h>
23158 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23159
23160 int
23161 main ()
23162 {
23163
23164 ;
23165 return 0;
23166 }
23167 _ACEOF
23168 if ac_fn_c_try_compile "$LINENO"; then :
23169 gl_cv_func_gettimeofday_posix_signature=almost
23170 else
23171 gl_cv_func_gettimeofday_posix_signature=no
23172 fi
23173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23174 fi
23175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23176 fi
23177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23178 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23179 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23180 gl_gettimeofday_timezone='struct timezone'
23181 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23182 REPLACE_GETTIMEOFDAY=1
23183 fi
23184 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23185 REPLACE_GETTIMEOFDAY=1
23186 fi
23187
23188 fi
23189
23190 cat >>confdefs.h <<_ACEOF
23191 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23192 _ACEOF
23193
23194
23195 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23196
23197
23198
23199
23200
23201
23202
23203
23204 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23205
23206
23207 for ac_header in sys/timeb.h
23208 do :
23209 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23210 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23211 cat >>confdefs.h <<_ACEOF
23212 #define HAVE_SYS_TIMEB_H 1
23213 _ACEOF
23214
23215 fi
23216
23217 done
23218
23219 for ac_func in _ftime
23220 do :
23221 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23222 if test "x$ac_cv_func__ftime" = x""yes; then :
23223 cat >>confdefs.h <<_ACEOF
23224 #define HAVE__FTIME 1
23225 _ACEOF
23226
23227 fi
23228 done
23229
23230
23231 fi
23232
23233
23234
23235
23236
23237 GNULIB_GETTIMEOFDAY=1
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248 if test $ac_cv_func_lstat = yes; then
23249
23250 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23251 *no)
23252 REPLACE_LSTAT=1
23253 ;;
23254 esac
23255 else
23256 HAVE_LSTAT=0
23257 fi
23258
23259 if test $REPLACE_LSTAT = 1; then
23260
23261
23262
23263
23264
23265
23266
23267
23268 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23269
23270 :
23271 fi
23272
23273
23274
23275
23276
23277 GNULIB_LSTAT=1
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288 if test $ac_cv_have_decl_memrchr = no; then
23289 HAVE_DECL_MEMRCHR=0
23290 fi
23291
23292 for ac_func in memrchr
23293 do :
23294 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23295 if test "x$ac_cv_func_memrchr" = x""yes; then :
23296 cat >>confdefs.h <<_ACEOF
23297 #define HAVE_MEMRCHR 1
23298 _ACEOF
23299
23300 fi
23301 done
23302
23303
23304 if test $ac_cv_func_memrchr = no; then
23305
23306
23307
23308
23309
23310
23311
23312
23313 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23314
23315 :
23316 fi
23317
23318
23319
23320
23321
23322 GNULIB_MEMRCHR=1
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334 if test $APPLE_UNIVERSAL_BUILD = 1; then
23335 # A universal build on Apple Mac OS X platforms.
23336 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
23337 # But we need a configuration result that is valid in both modes.
23338 gl_cv_func_working_mktime=no
23339 fi
23340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
23341 $as_echo_n "checking for working mktime... " >&6; }
23342 if test "${gl_cv_func_working_mktime+set}" = set; then :
23343 $as_echo_n "(cached) " >&6
23344 else
23345 if test "$cross_compiling" = yes; then :
23346 gl_cv_func_working_mktime=no
23347 else
23348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23349 /* end confdefs.h. */
23350 /* Test program from Paul Eggert and Tony Leneis. */
23351 #include <limits.h>
23352 #include <stdlib.h>
23353 #include <time.h>
23354
23355 #ifdef HAVE_UNISTD_H
23356 # include <unistd.h>
23357 #endif
23358
23359 #if HAVE_DECL_ALARM
23360 # include <signal.h>
23361 #endif
23362
23363 /* Work around redefinition to rpl_putenv by other config tests. */
23364 #undef putenv
23365
23366 static time_t time_t_max;
23367 static time_t time_t_min;
23368
23369 /* Values we'll use to set the TZ environment variable. */
23370 static char *tz_strings[] = {
23371 (char *) 0, "TZ=GMT0", "TZ=JST-9",
23372 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
23373 };
23374 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
23375
23376 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
23377 Based on a problem report from Andreas Jaeger. */
23378 static int
23379 spring_forward_gap ()
23380 {
23381 /* glibc (up to about 1998-10-07) failed this test. */
23382 struct tm tm;
23383
23384 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23385 instead of "TZ=America/Vancouver" in order to detect the bug even
23386 on systems that don't support the Olson extension, or don't have the
23387 full zoneinfo tables installed. */
23388 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
23389
23390 tm.tm_year = 98;
23391 tm.tm_mon = 3;
23392 tm.tm_mday = 5;
23393 tm.tm_hour = 2;
23394 tm.tm_min = 0;
23395 tm.tm_sec = 0;
23396 tm.tm_isdst = -1;
23397 return mktime (&tm) != (time_t) -1;
23398 }
23399
23400 static int
23401 mktime_test1 (time_t now)
23402 {
23403 struct tm *lt;
23404 return ! (lt = localtime (&now)) || mktime (lt) == now;
23405 }
23406
23407 static int
23408 mktime_test (time_t now)
23409 {
23410 return (mktime_test1 (now)
23411 && mktime_test1 ((time_t) (time_t_max - now))
23412 && mktime_test1 ((time_t) (time_t_min + now)));
23413 }
23414
23415 static int
23416 irix_6_4_bug ()
23417 {
23418 /* Based on code from Ariel Faigon. */
23419 struct tm tm;
23420 tm.tm_year = 96;
23421 tm.tm_mon = 3;
23422 tm.tm_mday = 0;
23423 tm.tm_hour = 0;
23424 tm.tm_min = 0;
23425 tm.tm_sec = 0;
23426 tm.tm_isdst = -1;
23427 mktime (&tm);
23428 return tm.tm_mon == 2 && tm.tm_mday == 31;
23429 }
23430
23431 static int
23432 bigtime_test (int j)
23433 {
23434 struct tm tm;
23435 time_t now;
23436 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
23437 now = mktime (&tm);
23438 if (now != (time_t) -1)
23439 {
23440 struct tm *lt = localtime (&now);
23441 if (! (lt
23442 && lt->tm_year == tm.tm_year
23443 && lt->tm_mon == tm.tm_mon
23444 && lt->tm_mday == tm.tm_mday
23445 && lt->tm_hour == tm.tm_hour
23446 && lt->tm_min == tm.tm_min
23447 && lt->tm_sec == tm.tm_sec
23448 && lt->tm_yday == tm.tm_yday
23449 && lt->tm_wday == tm.tm_wday
23450 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
23451 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
23452 return 0;
23453 }
23454 return 1;
23455 }
23456
23457 static int
23458 year_2050_test ()
23459 {
23460 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
23461 ignoring leap seconds. */
23462 unsigned long int answer = 2527315200UL;
23463
23464 struct tm tm;
23465 time_t t;
23466 tm.tm_year = 2050 - 1900;
23467 tm.tm_mon = 2 - 1;
23468 tm.tm_mday = 1;
23469 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
23470 tm.tm_isdst = -1;
23471
23472 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23473 instead of "TZ=America/Vancouver" in order to detect the bug even
23474 on systems that don't support the Olson extension, or don't have the
23475 full zoneinfo tables installed. */
23476 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
23477
23478 t = mktime (&tm);
23479
23480 /* Check that the result is either a failure, or close enough
23481 to the correct answer that we can assume the discrepancy is
23482 due to leap seconds. */
23483 return (t == (time_t) -1
23484 || (0 < t && answer - 120 <= t && t <= answer + 120));
23485 }
23486
23487 int
23488 main ()
23489 {
23490 int result = 0;
23491 time_t t, delta;
23492 int i, j;
23493 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
23494 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
23495
23496 #if HAVE_DECL_ALARM
23497 /* This test makes some buggy mktime implementations loop.
23498 Give up after 60 seconds; a mktime slower than that
23499 isn't worth using anyway. */
23500 signal (SIGALRM, SIG_DFL);
23501 alarm (60);
23502 #endif
23503
23504 time_t_max = (! time_t_signed
23505 ? (time_t) -1
23506 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
23507 * 2 + 1));
23508 time_t_min = (! time_t_signed
23509 ? (time_t) 0
23510 : time_t_signed_magnitude
23511 ? ~ (time_t) 0
23512 : ~ time_t_max);
23513
23514 delta = time_t_max / 997; /* a suitable prime number */
23515 for (i = 0; i < N_STRINGS; i++)
23516 {
23517 if (tz_strings[i])
23518 putenv (tz_strings[i]);
23519
23520 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
23521 if (! mktime_test (t))
23522 result |= 1;
23523 if ((result & 2) == 0
23524 && ! (mktime_test ((time_t) 1)
23525 && mktime_test ((time_t) (60 * 60))
23526 && mktime_test ((time_t) (60 * 60 * 24))))
23527 result |= 2;
23528
23529 for (j = 1; (result & 4) == 0; j <<= 1)
23530 {
23531 if (! bigtime_test (j))
23532 result |= 4;
23533 if (INT_MAX / 2 < j)
23534 break;
23535 }
23536 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
23537 result |= 8;
23538 }
23539 if (! irix_6_4_bug ())
23540 result |= 16;
23541 if (! spring_forward_gap ())
23542 result |= 32;
23543 if (! year_2050_test ())
23544 result |= 64;
23545 return result;
23546 }
23547 _ACEOF
23548 if ac_fn_c_try_run "$LINENO"; then :
23549 gl_cv_func_working_mktime=yes
23550 else
23551 gl_cv_func_working_mktime=no
23552 fi
23553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23554 conftest.$ac_objext conftest.beam conftest.$ac_ext
23555 fi
23556
23557
23558 fi
23559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
23560 $as_echo "$gl_cv_func_working_mktime" >&6; }
23561
23562 if test $gl_cv_func_working_mktime = no; then
23563 REPLACE_MKTIME=1
23564 else
23565 REPLACE_MKTIME=0
23566 fi
23567
23568 if test $REPLACE_MKTIME = 1; then
23569
23570
23571
23572
23573
23574
23575
23576
23577 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
23578
23579 :
23580 fi
23581
23582
23583
23584
23585
23586 GNULIB_MKTIME=1
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598 if test $ac_cv_func_pselect = yes; then
23599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
23600 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
23601 if test "${gl_cv_sig_pselect+set}" = set; then :
23602 $as_echo_n "(cached) " >&6
23603 else
23604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23605 /* end confdefs.h. */
23606 #include <sys/select.h>
23607
23608 int
23609 main ()
23610 {
23611 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
23612 struct timespec const *restrict,
23613 sigset_t const *restrict) = pselect;
23614 return !p;
23615 ;
23616 return 0;
23617 }
23618 _ACEOF
23619 if ac_fn_c_try_link "$LINENO"; then :
23620 gl_cv_sig_pselect=yes
23621 else
23622 gl_cv_sig_pselect=no
23623 fi
23624 rm -f core conftest.err conftest.$ac_objext \
23625 conftest$ac_exeext conftest.$ac_ext
23626 fi
23627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
23628 $as_echo "$gl_cv_sig_pselect" >&6; }
23629
23630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
23631 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
23632 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
23633 $as_echo_n "(cached) " >&6
23634 else
23635
23636 if test "$cross_compiling" = yes; then :
23637
23638 case "$host_os" in
23639 # Guess yes on glibc systems.
23640 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
23641 # If we don't know, assume the worst.
23642 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
23643 esac
23644
23645 else
23646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23647 /* end confdefs.h. */
23648
23649 #include <sys/types.h>
23650 #include <sys/time.h>
23651 #if HAVE_SYS_SELECT_H
23652 # include <sys/select.h>
23653 #endif
23654 #include <unistd.h>
23655 #include <errno.h>
23656
23657 int
23658 main ()
23659 {
23660
23661 fd_set set;
23662 dup2(0, 16);
23663 FD_ZERO(&set);
23664 FD_SET(16, &set);
23665 close(16);
23666 struct timespec timeout;
23667 timeout.tv_sec = 0;
23668 timeout.tv_nsec = 5000;
23669 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
23670
23671 ;
23672 return 0;
23673 }
23674 _ACEOF
23675 if ac_fn_c_try_run "$LINENO"; then :
23676 gl_cv_func_pselect_detects_ebadf=yes
23677 else
23678 gl_cv_func_pselect_detects_ebadf=no
23679 fi
23680 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23681 conftest.$ac_objext conftest.beam conftest.$ac_ext
23682 fi
23683
23684
23685 fi
23686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
23687 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
23688 case $gl_cv_func_pselect_detects_ebadf in
23689 *yes) ;;
23690 *) REPLACE_PSELECT=1 ;;
23691 esac
23692 fi
23693
23694 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
23695 REPLACE_PSELECT=1
23696 fi
23697
23698 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
23699
23700
23701
23702
23703
23704
23705
23706
23707 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
23708
23709 fi
23710
23711
23712
23713
23714
23715 GNULIB_PSELECT=1
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725 LIB_PTHREAD_SIGMASK=
23726
23727
23728
23729
23730 if test "$gl_threads_api" = posix; then
23731 if test $ac_cv_func_pthread_sigmask = yes; then
23732 :
23733 else
23734 if test -n "$LIBMULTITHREAD"; then
23735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
23736 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
23737 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
23738 $as_echo_n "(cached) " >&6
23739 else
23740 gl_save_LIBS="$LIBS"
23741 LIBS="$LIBS $LIBMULTITHREAD"
23742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23743 /* end confdefs.h. */
23744 #include <pthread.h>
23745 #include <signal.h>
23746
23747 int
23748 main ()
23749 {
23750 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
23751 ;
23752 return 0;
23753 }
23754
23755 _ACEOF
23756 if ac_fn_c_try_link "$LINENO"; then :
23757 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
23758 else
23759 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
23760 fi
23761 rm -f core conftest.err conftest.$ac_objext \
23762 conftest$ac_exeext conftest.$ac_ext
23763 LIBS="$gl_save_LIBS"
23764
23765 fi
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
23767 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
23768 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
23769 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
23770 else
23771 HAVE_PTHREAD_SIGMASK=0
23772 fi
23773 else
23774 HAVE_PTHREAD_SIGMASK=0
23775 fi
23776 fi
23777 else
23778 if test $ac_cv_func_pthread_sigmask = yes; then
23779 REPLACE_PTHREAD_SIGMASK=1
23780 else
23781 HAVE_PTHREAD_SIGMASK=0
23782 fi
23783 fi
23784
23785
23786
23787
23788 if test $HAVE_PTHREAD_SIGMASK = 1; then
23789
23790
23791 if test -z "$LIB_PTHREAD_SIGMASK"; then
23792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
23793 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
23794 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
23795 $as_echo_n "(cached) " >&6
23796 else
23797
23798 if test "$cross_compiling" = yes; then :
23799
23800 case "$host_os" in
23801 freebsd* | hpux* | solaris | solaris2.[2-9]*)
23802 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
23803 *)
23804 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
23805 esac
23806
23807 else
23808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23809 /* end confdefs.h. */
23810
23811 #include <pthread.h>
23812 #include <signal.h>
23813 #include <stddef.h>
23814 int main ()
23815 {
23816 sigset_t set;
23817 sigemptyset (&set);
23818 return pthread_sigmask (1729, &set, NULL) != 0;
23819 }
23820 _ACEOF
23821 if ac_fn_c_try_run "$LINENO"; then :
23822 gl_cv_func_pthread_sigmask_in_libc_works=no
23823 else
23824 gl_cv_func_pthread_sigmask_in_libc_works=yes
23825 fi
23826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23827 conftest.$ac_objext conftest.beam conftest.$ac_ext
23828 fi
23829
23830
23831 fi
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
23833 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
23834 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
23835 *no)
23836 REPLACE_PTHREAD_SIGMASK=1
23837
23838 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
23839
23840 ;;
23841 esac
23842 fi
23843
23844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
23845 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
23846 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
23847 $as_echo_n "(cached) " >&6
23848 else
23849
23850 gl_save_LIBS="$LIBS"
23851 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
23852 if test "$cross_compiling" = yes; then :
23853 case "$host_os" in
23854 cygwin*)
23855 gl_cv_func_pthread_sigmask_return_works="guessing no";;
23856 *)
23857 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
23858 esac
23859
23860 else
23861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23862 /* end confdefs.h. */
23863
23864 #include <pthread.h>
23865 #include <signal.h>
23866 #include <stddef.h>
23867 int main ()
23868 {
23869 sigset_t set;
23870 sigemptyset (&set);
23871 if (pthread_sigmask (1729, &set, NULL) == -1)
23872 return 1;
23873 return 0;
23874 }
23875 _ACEOF
23876 if ac_fn_c_try_run "$LINENO"; then :
23877 gl_cv_func_pthread_sigmask_return_works=yes
23878 else
23879 gl_cv_func_pthread_sigmask_return_works=no
23880 fi
23881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23882 conftest.$ac_objext conftest.beam conftest.$ac_ext
23883 fi
23884
23885 LIBS="$gl_save_LIBS"
23886
23887 fi
23888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
23889 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
23890 case "$gl_cv_func_pthread_sigmask_return_works" in
23891 *no)
23892 REPLACE_PTHREAD_SIGMASK=1
23893
23894 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
23895
23896 ;;
23897 esac
23898
23899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
23900 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
23901 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
23902 $as_echo_n "(cached) " >&6
23903 else
23904
23905 case "$host_os" in
23906 irix*)
23907 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
23908 *)
23909 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
23910 esac
23911 gl_save_LIBS="$LIBS"
23912 LIBS="$LIBS $LIBMULTITHREAD"
23913 if test "$cross_compiling" = yes; then :
23914 :
23915 else
23916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23917 /* end confdefs.h. */
23918
23919 #include <pthread.h>
23920 #include <signal.h>
23921 #include <stdio.h>
23922 #include <stdlib.h>
23923 #include <unistd.h>
23924 static volatile int sigint_occurred;
23925 static void
23926 sigint_handler (int sig)
23927 {
23928 sigint_occurred++;
23929 }
23930 int main ()
23931 {
23932 sigset_t set;
23933 int pid = getpid ();
23934 char command[80];
23935 signal (SIGINT, sigint_handler);
23936 sigemptyset (&set);
23937 sigaddset (&set, SIGINT);
23938 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
23939 return 1;
23940 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
23941 if (!(system (command) == 0))
23942 return 2;
23943 sleep (2);
23944 if (!(sigint_occurred == 0))
23945 return 3;
23946 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
23947 return 4;
23948 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
23949 return 5;
23950 return 0;
23951 }
23952 _ACEOF
23953 if ac_fn_c_try_run "$LINENO"; then :
23954 :
23955 else
23956 gl_cv_func_pthread_sigmask_unblock_works=no
23957 fi
23958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23959 conftest.$ac_objext conftest.beam conftest.$ac_ext
23960 fi
23961
23962 LIBS="$gl_save_LIBS"
23963
23964 fi
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
23966 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
23967 case "$gl_cv_func_pthread_sigmask_unblock_works" in
23968 *no)
23969 REPLACE_PTHREAD_SIGMASK=1
23970
23971 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
23972
23973 ;;
23974 esac
23975 fi
23976
23977 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
23978
23979
23980
23981
23982
23983
23984
23985
23986 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
23987
23988
23989 if test $HAVE_PTHREAD_SIGMASK = 1; then
23990
23991 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
23992
23993 fi
23994
23995 fi
23996
23997
23998
23999
24000
24001 GNULIB_PTHREAD_SIGMASK=1
24002
24003
24004
24005
24006
24007
24008
24009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24010 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24011 if test "${gl_cv_func_svid_putenv+set}" = set; then :
24012 $as_echo_n "(cached) " >&6
24013 else
24014 if test "$cross_compiling" = yes; then :
24015 case "$host_os" in
24016 # Guess yes on glibc systems.
24017 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24018 # If we don't know, assume the worst.
24019 *) gl_cv_func_svid_putenv="guessing no" ;;
24020 esac
24021
24022 else
24023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24024 /* end confdefs.h. */
24025 $ac_includes_default
24026 int
24027 main ()
24028 {
24029
24030 /* Put it in env. */
24031 if (putenv ("CONFTEST_putenv=val"))
24032 return 1;
24033
24034 /* Try to remove it. */
24035 if (putenv ("CONFTEST_putenv"))
24036 return 2;
24037
24038 /* Make sure it was deleted. */
24039 if (getenv ("CONFTEST_putenv") != 0)
24040 return 3;
24041
24042 return 0;
24043
24044 ;
24045 return 0;
24046 }
24047 _ACEOF
24048 if ac_fn_c_try_run "$LINENO"; then :
24049 gl_cv_func_svid_putenv=yes
24050 else
24051 gl_cv_func_svid_putenv=no
24052 fi
24053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24054 conftest.$ac_objext conftest.beam conftest.$ac_ext
24055 fi
24056
24057
24058 fi
24059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24060 $as_echo "$gl_cv_func_svid_putenv" >&6; }
24061 case "$gl_cv_func_svid_putenv" in
24062 *yes) ;;
24063 *)
24064 REPLACE_PUTENV=1
24065 ;;
24066 esac
24067
24068 if test $REPLACE_PUTENV = 1; then
24069
24070
24071
24072
24073
24074
24075
24076
24077 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24078
24079
24080 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24081 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24082 ac_have_decl=1
24083 else
24084 ac_have_decl=0
24085 fi
24086
24087 cat >>confdefs.h <<_ACEOF
24088 #define HAVE_DECL__PUTENV $ac_have_decl
24089 _ACEOF
24090
24091
24092 fi
24093
24094
24095
24096
24097
24098 GNULIB_PUTENV=1
24099
24100
24101
24102
24103
24104
24105 # Check whether --enable-acl was given.
24106 if test "${enable_acl+set}" = set; then :
24107 enableval=$enable_acl;
24108 else
24109 enable_acl=auto
24110 fi
24111
24112
24113 LIB_ACL=
24114 use_acl=0
24115 if test "x$enable_acl" != "xno"; then
24116 for ac_header in sys/acl.h
24117 do :
24118 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24119 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24120 cat >>confdefs.h <<_ACEOF
24121 #define HAVE_SYS_ACL_H 1
24122 _ACEOF
24123
24124 fi
24125
24126 done
24127
24128 if test $ac_cv_header_sys_acl_h = yes; then
24129 ac_save_LIBS=$LIBS
24130
24131 if test $use_acl = 0; then
24132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24133 $as_echo_n "checking for library containing acl_get_file... " >&6; }
24134 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24135 $as_echo_n "(cached) " >&6
24136 else
24137 ac_func_search_save_LIBS=$LIBS
24138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24139 /* end confdefs.h. */
24140
24141 /* Override any GCC internal prototype to avoid an error.
24142 Use char because int might match the return type of a GCC
24143 builtin and then its argument prototype would still apply. */
24144 #ifdef __cplusplus
24145 extern "C"
24146 #endif
24147 char acl_get_file ();
24148 int
24149 main ()
24150 {
24151 return acl_get_file ();
24152 ;
24153 return 0;
24154 }
24155 _ACEOF
24156 for ac_lib in '' acl pacl; do
24157 if test -z "$ac_lib"; then
24158 ac_res="none required"
24159 else
24160 ac_res=-l$ac_lib
24161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24162 fi
24163 if ac_fn_c_try_link "$LINENO"; then :
24164 ac_cv_search_acl_get_file=$ac_res
24165 fi
24166 rm -f core conftest.err conftest.$ac_objext \
24167 conftest$ac_exeext
24168 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24169 break
24170 fi
24171 done
24172 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24173
24174 else
24175 ac_cv_search_acl_get_file=no
24176 fi
24177 rm conftest.$ac_ext
24178 LIBS=$ac_func_search_save_LIBS
24179 fi
24180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24181 $as_echo "$ac_cv_search_acl_get_file" >&6; }
24182 ac_res=$ac_cv_search_acl_get_file
24183 if test "$ac_res" != no; then :
24184 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24185 if test "$ac_cv_search_acl_get_file" != "none required"; then
24186 LIB_ACL=$ac_cv_search_acl_get_file
24187 fi
24188 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
24189 acl_free acl_from_mode acl_from_text \
24190 acl_delete_def_file acl_extended_file \
24191 acl_delete_fd_np acl_delete_file_np \
24192 acl_copy_ext_native acl_create_entry_np \
24193 acl_to_short_text acl_free_text
24194 do :
24195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24196 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24197 eval as_val=\$$as_ac_var
24198 if test "x$as_val" = x""yes; then :
24199 cat >>confdefs.h <<_ACEOF
24200 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24201 _ACEOF
24202
24203 fi
24204 done
24205
24206 # If the acl_get_file bug is detected, don't enable the ACL support.
24207
24208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24209 $as_echo_n "checking for working acl_get_file... " >&6; }
24210 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
24211 $as_echo_n "(cached) " >&6
24212 else
24213 if test "$cross_compiling" = yes; then :
24214 gl_cv_func_working_acl_get_file=cross-compiling
24215 else
24216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24217 /* end confdefs.h. */
24218 #include <sys/types.h>
24219 #include <sys/acl.h>
24220 #include <errno.h>
24221
24222 int
24223 main ()
24224 {
24225 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
24226 return 1;
24227 return 0;
24228
24229 ;
24230 return 0;
24231 }
24232 _ACEOF
24233 if ac_fn_c_try_run "$LINENO"; then :
24234 gl_cv_func_working_acl_get_file=yes
24235 else
24236 gl_cv_func_working_acl_get_file=no
24237 fi
24238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24239 conftest.$ac_objext conftest.beam conftest.$ac_ext
24240 fi
24241
24242 fi
24243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24244 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
24245
24246 if test $gl_cv_func_working_acl_get_file = yes; then :
24247 use_acl=1
24248 fi
24249
24250 if test $use_acl = 1; then
24251 for ac_header in acl/libacl.h
24252 do :
24253 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
24254 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
24255 cat >>confdefs.h <<_ACEOF
24256 #define HAVE_ACL_LIBACL_H 1
24257 _ACEOF
24258
24259 fi
24260
24261 done
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271 for ac_func in acl_entries
24272 do :
24273 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
24274 if test "x$ac_cv_func_acl_entries" = x""yes; then :
24275 cat >>confdefs.h <<_ACEOF
24276 #define HAVE_ACL_ENTRIES 1
24277 _ACEOF
24278
24279 else
24280
24281 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24282
24283 fi
24284 done
24285
24286
24287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
24288 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
24289 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
24290 $as_echo_n "(cached) " >&6
24291 else
24292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24293 /* end confdefs.h. */
24294 #include <sys/types.h>
24295 #include <sys/acl.h>
24296 int type = ACL_FIRST_ENTRY;
24297 int
24298 main ()
24299 {
24300
24301 ;
24302 return 0;
24303 }
24304 _ACEOF
24305 if ac_fn_c_try_compile "$LINENO"; then :
24306 gl_cv_acl_ACL_FIRST_ENTRY=yes
24307 else
24308 gl_cv_acl_ACL_FIRST_ENTRY=no
24309 fi
24310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24311 fi
24312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
24313 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
24314 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
24315
24316 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
24317
24318 fi
24319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
24320 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
24321 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
24322 $as_echo_n "(cached) " >&6
24323 else
24324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24325 /* end confdefs.h. */
24326 #include <sys/types.h>
24327 #include <sys/acl.h>
24328 int type = ACL_TYPE_EXTENDED;
24329 int
24330 main ()
24331 {
24332
24333 ;
24334 return 0;
24335 }
24336 _ACEOF
24337 if ac_fn_c_try_compile "$LINENO"; then :
24338 gl_cv_acl_ACL_TYPE_EXTENDED=yes
24339 else
24340 gl_cv_acl_ACL_TYPE_EXTENDED=no
24341 fi
24342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24343 fi
24344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
24345 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
24346 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
24347
24348 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
24349
24350 fi
24351 else
24352 LIB_ACL=
24353 fi
24354
24355 fi
24356
24357 fi
24358
24359 if test $use_acl = 0; then
24360 for ac_func in facl
24361 do :
24362 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
24363 if test "x$ac_cv_func_facl" = x""yes; then :
24364 cat >>confdefs.h <<_ACEOF
24365 #define HAVE_FACL 1
24366 _ACEOF
24367
24368 fi
24369 done
24370
24371 if test $ac_cv_func_facl = yes; then
24372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
24373 $as_echo_n "checking for library containing acl_trivial... " >&6; }
24374 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24375 $as_echo_n "(cached) " >&6
24376 else
24377 ac_func_search_save_LIBS=$LIBS
24378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24379 /* end confdefs.h. */
24380
24381 /* Override any GCC internal prototype to avoid an error.
24382 Use char because int might match the return type of a GCC
24383 builtin and then its argument prototype would still apply. */
24384 #ifdef __cplusplus
24385 extern "C"
24386 #endif
24387 char acl_trivial ();
24388 int
24389 main ()
24390 {
24391 return acl_trivial ();
24392 ;
24393 return 0;
24394 }
24395 _ACEOF
24396 for ac_lib in '' sec; do
24397 if test -z "$ac_lib"; then
24398 ac_res="none required"
24399 else
24400 ac_res=-l$ac_lib
24401 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24402 fi
24403 if ac_fn_c_try_link "$LINENO"; then :
24404 ac_cv_search_acl_trivial=$ac_res
24405 fi
24406 rm -f core conftest.err conftest.$ac_objext \
24407 conftest$ac_exeext
24408 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24409 break
24410 fi
24411 done
24412 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24413
24414 else
24415 ac_cv_search_acl_trivial=no
24416 fi
24417 rm conftest.$ac_ext
24418 LIBS=$ac_func_search_save_LIBS
24419 fi
24420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
24421 $as_echo "$ac_cv_search_acl_trivial" >&6; }
24422 ac_res=$ac_cv_search_acl_trivial
24423 if test "$ac_res" != no; then :
24424 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24425 if test "$ac_cv_search_acl_trivial" != "none required"; then
24426 LIB_ACL=$ac_cv_search_acl_trivial
24427 fi
24428
24429 fi
24430
24431 for ac_func in acl_trivial
24432 do :
24433 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
24434 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
24435 cat >>confdefs.h <<_ACEOF
24436 #define HAVE_ACL_TRIVIAL 1
24437 _ACEOF
24438
24439 fi
24440 done
24441
24442 use_acl=1
24443 fi
24444 fi
24445
24446 if test $use_acl = 0; then
24447 for ac_func in getacl
24448 do :
24449 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
24450 if test "x$ac_cv_func_getacl" = x""yes; then :
24451 cat >>confdefs.h <<_ACEOF
24452 #define HAVE_GETACL 1
24453 _ACEOF
24454
24455 fi
24456 done
24457
24458 if test $ac_cv_func_getacl = yes; then
24459 use_acl=1
24460 fi
24461 for ac_header in aclv.h
24462 do :
24463 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
24464 "
24465 if test "x$ac_cv_header_aclv_h" = x""yes; then :
24466 cat >>confdefs.h <<_ACEOF
24467 #define HAVE_ACLV_H 1
24468 _ACEOF
24469
24470 fi
24471
24472 done
24473
24474 fi
24475
24476 if test $use_acl = 0; then
24477 for ac_func in aclx_get
24478 do :
24479 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
24480 if test "x$ac_cv_func_aclx_get" = x""yes; then :
24481 cat >>confdefs.h <<_ACEOF
24482 #define HAVE_ACLX_GET 1
24483 _ACEOF
24484
24485 fi
24486 done
24487
24488 if test $ac_cv_func_aclx_get = yes; then
24489 use_acl=1
24490 fi
24491 fi
24492
24493 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
24494 for ac_func in statacl
24495 do :
24496 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
24497 if test "x$ac_cv_func_statacl" = x""yes; then :
24498 cat >>confdefs.h <<_ACEOF
24499 #define HAVE_STATACL 1
24500 _ACEOF
24501
24502 fi
24503 done
24504
24505 if test $ac_cv_func_statacl = yes; then
24506 use_acl=1
24507 fi
24508 fi
24509
24510 if test $use_acl = 0; then
24511 for ac_func in aclsort
24512 do :
24513 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
24514 if test "x$ac_cv_func_aclsort" = x""yes; then :
24515 cat >>confdefs.h <<_ACEOF
24516 #define HAVE_ACLSORT 1
24517 _ACEOF
24518
24519 fi
24520 done
24521
24522 if test $ac_cv_func_aclsort = yes; then
24523 use_acl=1
24524 fi
24525 fi
24526
24527 LIBS=$ac_save_LIBS
24528 fi
24529 if test "x$enable_acl$use_acl" = "xyes0"; then
24530 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
24531 elif test "x$enable_acl$use_acl" = "xauto0"; then
24532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
24533 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
24534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
24535 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
24536 fi
24537 fi
24538
24539
24540 cat >>confdefs.h <<_ACEOF
24541 #define USE_ACL $use_acl
24542 _ACEOF
24543
24544 USE_ACL=$use_acl
24545
24546
24547
24548
24549
24550 if test $ac_cv_func_readlink = no; then
24551 HAVE_READLINK=0
24552 else
24553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24554 $as_echo_n "checking whether readlink signature is correct... " >&6; }
24555 if test "${gl_cv_decl_readlink_works+set}" = set; then :
24556 $as_echo_n "(cached) " >&6
24557 else
24558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24559 /* end confdefs.h. */
24560 #include <unistd.h>
24561 /* Cause compilation failure if original declaration has wrong type. */
24562 ssize_t readlink (const char *, char *, size_t);
24563 int
24564 main ()
24565 {
24566
24567 ;
24568 return 0;
24569 }
24570 _ACEOF
24571 if ac_fn_c_try_compile "$LINENO"; then :
24572 gl_cv_decl_readlink_works=yes
24573 else
24574 gl_cv_decl_readlink_works=no
24575 fi
24576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24577 fi
24578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24579 $as_echo "$gl_cv_decl_readlink_works" >&6; }
24580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24581 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
24582 if test "${gl_cv_func_readlink_works+set}" = set; then :
24583 $as_echo_n "(cached) " >&6
24584 else
24585 # We have readlink, so assume ln -s works.
24586 ln -s conftest.no-such conftest.link
24587 ln -s conftest.link conftest.lnk2
24588 if test "$cross_compiling" = yes; then :
24589 case "$host_os" in
24590 # Guess yes on glibc systems.
24591 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24592 # If we don't know, assume the worst.
24593 *) gl_cv_func_readlink_works="guessing no" ;;
24594 esac
24595
24596 else
24597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24598 /* end confdefs.h. */
24599 #include <unistd.h>
24600
24601 int
24602 main ()
24603 {
24604 char buf[20];
24605 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24606 ;
24607 return 0;
24608 }
24609 _ACEOF
24610 if ac_fn_c_try_run "$LINENO"; then :
24611 gl_cv_func_readlink_works=yes
24612 else
24613 gl_cv_func_readlink_works=no
24614 fi
24615 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24616 conftest.$ac_objext conftest.beam conftest.$ac_ext
24617 fi
24618
24619 rm -f conftest.link conftest.lnk2
24620 fi
24621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24622 $as_echo "$gl_cv_func_readlink_works" >&6; }
24623 case "$gl_cv_func_readlink_works" in
24624 *yes)
24625 if test "$gl_cv_decl_readlink_works" != yes; then
24626 REPLACE_READLINK=1
24627 fi
24628 ;;
24629 *)
24630
24631 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24632
24633 REPLACE_READLINK=1
24634 ;;
24635 esac
24636 fi
24637
24638 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24639
24640
24641
24642
24643
24644
24645
24646
24647 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24648
24649
24650 :
24651
24652 fi
24653
24654
24655
24656
24657
24658 GNULIB_READLINK=1
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668 if test $ac_cv_func_readlinkat = no; then
24669 HAVE_READLINKAT=0
24670 fi
24671
24672 if test $HAVE_READLINKAT = 0; then
24673
24674
24675
24676
24677
24678
24679
24680
24681 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
24682
24683 fi
24684
24685
24686
24687
24688
24689 GNULIB_READLINKAT=1
24690
24691
24692
24693
24694
24695
24696 for ac_func in sig2str
24697 do :
24698 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
24699 if test "x$ac_cv_func_sig2str" = x""yes; then :
24700 cat >>confdefs.h <<_ACEOF
24701 #define HAVE_SIG2STR 1
24702 _ACEOF
24703
24704 fi
24705 done
24706
24707
24708 if test $ac_cv_func_sig2str = no; then
24709
24710
24711
24712
24713
24714
24715
24716
24717 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
24718
24719
24720 :
24721
24722 fi
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734 if test $gl_cv_have_include_next = yes; then
24735 gl_cv_next_signal_h='<'signal.h'>'
24736 else
24737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
24738 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
24739 if test "${gl_cv_next_signal_h+set}" = set; then :
24740 $as_echo_n "(cached) " >&6
24741 else
24742
24743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24744 /* end confdefs.h. */
24745 #include <signal.h>
24746
24747 _ACEOF
24748 case "$host_os" in
24749 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24750 *) gl_absname_cpp="$ac_cpp" ;;
24751 esac
24752
24753 case "$host_os" in
24754 mingw*)
24755 gl_dirsep_regex='[/\\]'
24756 ;;
24757 *)
24758 gl_dirsep_regex='\/'
24759 ;;
24760 esac
24761 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24762
24763 gl_header_literal_regex=`echo 'signal.h' \
24764 | sed -e "$gl_make_literal_regex_sed"`
24765 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24766 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24767 s|^/[^/]|//&|
24768 p
24769 q
24770 }'
24771 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24772 sed -n "$gl_absolute_header_sed"`'"'
24773
24774
24775 fi
24776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
24777 $as_echo "$gl_cv_next_signal_h" >&6; }
24778 fi
24779 NEXT_SIGNAL_H=$gl_cv_next_signal_h
24780
24781 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24783 gl_next_as_first_directive='<'signal.h'>'
24784 else
24785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24786 gl_next_as_first_directive=$gl_cv_next_signal_h
24787 fi
24788 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
24789
24790
24791
24792
24793
24794 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
24795 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
24796 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
24797 #include <signal.h>
24798
24799 "
24800 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
24801
24802 else
24803 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
24804 fi
24805
24806
24807
24808
24809
24810
24811
24812 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
24813 #include <signal.h>
24814
24815 "
24816 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
24817
24818 else
24819 HAVE_SIGHANDLER_T=0
24820 fi
24821
24822
24823
24824
24825 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
24826 /* <sys/types.h> is not needed according to POSIX, but the
24827 <sys/socket.h> in i386-unknown-freebsd4.10 and
24828 powerpc-apple-darwin5.5 required it. */
24829 #include <sys/types.h>
24830 #if HAVE_SYS_SOCKET_H
24831 # include <sys/socket.h>
24832 #elif HAVE_WS2TCPIP_H
24833 # include <ws2tcpip.h>
24834 #endif
24835
24836 "
24837 if test "x$ac_cv_type_socklen_t" = x""yes; then :
24838
24839 else
24840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
24841 $as_echo_n "checking for socklen_t equivalent... " >&6; }
24842 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
24843 $as_echo_n "(cached) " >&6
24844 else
24845 # Systems have either "struct sockaddr *" or
24846 # "void *" as the second argument to getpeername
24847 gl_cv_socklen_t_equiv=
24848 for arg2 in "struct sockaddr" void; do
24849 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
24850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24851 /* end confdefs.h. */
24852 #include <sys/types.h>
24853 #include <sys/socket.h>
24854
24855 int getpeername (int, $arg2 *, $t *);
24856 int
24857 main ()
24858 {
24859 $t len;
24860 getpeername (0, 0, &len);
24861 ;
24862 return 0;
24863 }
24864 _ACEOF
24865 if ac_fn_c_try_compile "$LINENO"; then :
24866 gl_cv_socklen_t_equiv="$t"
24867 fi
24868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24869 test "$gl_cv_socklen_t_equiv" != "" && break
24870 done
24871 test "$gl_cv_socklen_t_equiv" != "" && break
24872 done
24873
24874 fi
24875
24876 if test "$gl_cv_socklen_t_equiv" = ""; then
24877 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
24878 fi
24879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
24880 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
24881
24882 cat >>confdefs.h <<_ACEOF
24883 #define socklen_t $gl_cv_socklen_t_equiv
24884 _ACEOF
24885
24886 fi
24887
24888
24889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
24890 $as_echo_n "checking for ssize_t... " >&6; }
24891 if test "${gt_cv_ssize_t+set}" = set; then :
24892 $as_echo_n "(cached) " >&6
24893 else
24894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24895 /* end confdefs.h. */
24896 #include <sys/types.h>
24897 int
24898 main ()
24899 {
24900 int x = sizeof (ssize_t *) + sizeof (ssize_t);
24901 return !x;
24902 ;
24903 return 0;
24904 }
24905 _ACEOF
24906 if ac_fn_c_try_compile "$LINENO"; then :
24907 gt_cv_ssize_t=yes
24908 else
24909 gt_cv_ssize_t=no
24910 fi
24911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24912 fi
24913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
24914 $as_echo "$gt_cv_ssize_t" >&6; }
24915 if test $gt_cv_ssize_t = no; then
24916
24917 $as_echo "#define ssize_t int" >>confdefs.h
24918
24919 fi
24920
24921
24922
24923
24924
24925 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>
24926 #include <sys/stat.h>
24927 "
24928 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
24929
24930 cat >>confdefs.h <<_ACEOF
24931 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
24932 _ACEOF
24933
24934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
24935 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
24936 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
24937 $as_echo_n "(cached) " >&6
24938 else
24939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24940 /* end confdefs.h. */
24941
24942 #include <sys/types.h>
24943 #include <sys/stat.h>
24944 #if HAVE_SYS_TIME_H
24945 # include <sys/time.h>
24946 #endif
24947 #include <time.h>
24948 struct timespec ts;
24949 struct stat st;
24950
24951 int
24952 main ()
24953 {
24954
24955 st.st_atim = ts;
24956
24957 ;
24958 return 0;
24959 }
24960 _ACEOF
24961 if ac_fn_c_try_compile "$LINENO"; then :
24962 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
24963 else
24964 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
24965 fi
24966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24967 fi
24968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
24969 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
24970 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
24971
24972 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
24973
24974 fi
24975 else
24976 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>
24977 #include <sys/stat.h>
24978 "
24979 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
24980
24981 cat >>confdefs.h <<_ACEOF
24982 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
24983 _ACEOF
24984
24985
24986 else
24987 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
24988 #include <sys/stat.h>
24989 "
24990 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
24991
24992 cat >>confdefs.h <<_ACEOF
24993 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
24994 _ACEOF
24995
24996
24997 else
24998 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>
24999 #include <sys/stat.h>
25000 "
25001 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25002
25003 cat >>confdefs.h <<_ACEOF
25004 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25005 _ACEOF
25006
25007
25008 fi
25009
25010 fi
25011
25012 fi
25013
25014 fi
25015
25016
25017
25018
25019
25020 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>
25021 #include <sys/stat.h>
25022 "
25023 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25024
25025 cat >>confdefs.h <<_ACEOF
25026 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25027 _ACEOF
25028
25029
25030 else
25031 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25032 #include <sys/stat.h>
25033 "
25034 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
25035
25036 cat >>confdefs.h <<_ACEOF
25037 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25038 _ACEOF
25039
25040
25041 else
25042 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>
25043 #include <sys/stat.h>
25044 "
25045 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
25046
25047 cat >>confdefs.h <<_ACEOF
25048 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25049 _ACEOF
25050
25051
25052 fi
25053
25054 fi
25055
25056 fi
25057
25058
25059
25060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25061 $as_echo_n "checking for working stdalign.h... " >&6; }
25062 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
25063 $as_echo_n "(cached) " >&6
25064 else
25065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25066 /* end confdefs.h. */
25067 #include <stdalign.h>
25068 #include <stddef.h>
25069
25070 /* Test that alignof yields a result consistent with offsetof.
25071 This catches GCC bug 52023
25072 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25073 #ifdef __cplusplus
25074 template <class t> struct alignof_helper { char a; t b; };
25075 # define ao(type) offsetof (alignof_helper<type>, b)
25076 #else
25077 # define ao(type) offsetof (struct { char a; type b; }, b)
25078 #endif
25079 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25080 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25081 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25082
25083 /* Test _Alignas only on platforms where gnulib can help. */
25084 #if \
25085 (__GNUC__ || __IBMC__ || __IBMCPP__ \
25086 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
25087 struct alignas_test { char c; char alignas (8) alignas_8; };
25088 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25089 ? 1 : -1];
25090 #endif
25091
25092 int
25093 main ()
25094 {
25095
25096 ;
25097 return 0;
25098 }
25099 _ACEOF
25100 if ac_fn_c_try_compile "$LINENO"; then :
25101 gl_cv_header_working_stdalign_h=yes
25102 else
25103 gl_cv_header_working_stdalign_h=no
25104 fi
25105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25106 fi
25107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25108 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25109
25110 if test $gl_cv_header_working_stdalign_h = yes; then
25111 STDALIGN_H=''
25112 else
25113 STDALIGN_H='stdalign.h'
25114 fi
25115
25116
25117 if test -n "$STDALIGN_H"; then
25118 GL_GENERATE_STDALIGN_H_TRUE=
25119 GL_GENERATE_STDALIGN_H_FALSE='#'
25120 else
25121 GL_GENERATE_STDALIGN_H_TRUE='#'
25122 GL_GENERATE_STDALIGN_H_FALSE=
25123 fi
25124
25125
25126
25127 STDARG_H=''
25128 NEXT_STDARG_H='<stdarg.h>'
25129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25130 $as_echo_n "checking for va_copy... " >&6; }
25131 if test "${gl_cv_func_va_copy+set}" = set; then :
25132 $as_echo_n "(cached) " >&6
25133 else
25134
25135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25136 /* end confdefs.h. */
25137 #include <stdarg.h>
25138 int
25139 main ()
25140 {
25141
25142 #ifndef va_copy
25143 void (*func) (va_list, va_list) = va_copy;
25144 #endif
25145
25146 ;
25147 return 0;
25148 }
25149 _ACEOF
25150 if ac_fn_c_try_compile "$LINENO"; then :
25151 gl_cv_func_va_copy=yes
25152 else
25153 gl_cv_func_va_copy=no
25154 fi
25155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25156 fi
25157
25158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25159 $as_echo "$gl_cv_func_va_copy" >&6; }
25160 if test $gl_cv_func_va_copy = no; then
25161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25162 /* end confdefs.h. */
25163 #if defined _AIX && !defined __GNUC__
25164 AIX vaccine
25165 #endif
25166
25167 _ACEOF
25168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25169 $EGREP "vaccine" >/dev/null 2>&1; then :
25170 gl_aixcc=yes
25171 else
25172 gl_aixcc=no
25173 fi
25174 rm -f conftest*
25175
25176 if test $gl_aixcc = yes; then
25177 STDARG_H=stdarg.h
25178
25179
25180
25181
25182
25183
25184
25185
25186 if test $gl_cv_have_include_next = yes; then
25187 gl_cv_next_stdarg_h='<'stdarg.h'>'
25188 else
25189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25190 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25191 if test "${gl_cv_next_stdarg_h+set}" = set; then :
25192 $as_echo_n "(cached) " >&6
25193 else
25194
25195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25196 /* end confdefs.h. */
25197 #include <stdarg.h>
25198
25199 _ACEOF
25200 case "$host_os" in
25201 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25202 *) gl_absname_cpp="$ac_cpp" ;;
25203 esac
25204
25205 case "$host_os" in
25206 mingw*)
25207 gl_dirsep_regex='[/\\]'
25208 ;;
25209 *)
25210 gl_dirsep_regex='\/'
25211 ;;
25212 esac
25213 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25214
25215 gl_header_literal_regex=`echo 'stdarg.h' \
25216 | sed -e "$gl_make_literal_regex_sed"`
25217 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25218 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25219 s|^/[^/]|//&|
25220 p
25221 q
25222 }'
25223 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25224 sed -n "$gl_absolute_header_sed"`'"'
25225
25226
25227 fi
25228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25229 $as_echo "$gl_cv_next_stdarg_h" >&6; }
25230 fi
25231 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25232
25233 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25234 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25235 gl_next_as_first_directive='<'stdarg.h'>'
25236 else
25237 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25238 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25239 fi
25240 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
25241
25242
25243
25244
25245 if test "$gl_cv_next_stdarg_h" = '""'; then
25246 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25247 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25248 fi
25249 else
25250
25251 saved_as_echo_n="$as_echo_n"
25252 as_echo_n=':'
25253 if test "${gl_cv_func___va_copy+set}" = set; then :
25254 $as_echo_n "(cached) " >&6
25255 else
25256
25257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25258 /* end confdefs.h. */
25259 #include <stdarg.h>
25260 int
25261 main ()
25262 {
25263
25264 #ifndef __va_copy
25265 error, bail out
25266 #endif
25267
25268 ;
25269 return 0;
25270 }
25271 _ACEOF
25272 if ac_fn_c_try_compile "$LINENO"; then :
25273 gl_cv_func___va_copy=yes
25274 else
25275 gl_cv_func___va_copy=no
25276 fi
25277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25278 fi
25279
25280 as_echo_n="$saved_as_echo_n"
25281
25282 if test $gl_cv_func___va_copy = yes; then
25283
25284 $as_echo "#define va_copy __va_copy" >>confdefs.h
25285
25286 else
25287
25288
25289 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
25290
25291 fi
25292 fi
25293 fi
25294
25295 if test -n "$STDARG_H"; then
25296 GL_GENERATE_STDARG_H_TRUE=
25297 GL_GENERATE_STDARG_H_FALSE='#'
25298 else
25299 GL_GENERATE_STDARG_H_TRUE='#'
25300 GL_GENERATE_STDARG_H_FALSE=
25301 fi
25302
25303
25304
25305
25306
25307
25308 # Define two additional variables used in the Makefile substitution.
25309
25310 if test "$ac_cv_header_stdbool_h" = yes; then
25311 STDBOOL_H=''
25312 else
25313 STDBOOL_H='stdbool.h'
25314 fi
25315
25316 if test -n "$STDBOOL_H"; then
25317 GL_GENERATE_STDBOOL_H_TRUE=
25318 GL_GENERATE_STDBOOL_H_FALSE='#'
25319 else
25320 GL_GENERATE_STDBOOL_H_TRUE='#'
25321 GL_GENERATE_STDBOOL_H_FALSE=
25322 fi
25323
25324
25325 if test "$ac_cv_type__Bool" = yes; then
25326 HAVE__BOOL=1
25327 else
25328 HAVE__BOOL=0
25329 fi
25330
25331
25332
25333
25334
25335 STDDEF_H=
25336 if test $gt_cv_c_wchar_t = no; then
25337 HAVE_WCHAR_T=0
25338 STDDEF_H=stddef.h
25339 fi
25340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25341 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25342 if test "${gl_cv_decl_null_works+set}" = set; then :
25343 $as_echo_n "(cached) " >&6
25344 else
25345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346 /* end confdefs.h. */
25347 #include <stddef.h>
25348 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25349
25350 int
25351 main ()
25352 {
25353
25354 ;
25355 return 0;
25356 }
25357 _ACEOF
25358 if ac_fn_c_try_compile "$LINENO"; then :
25359 gl_cv_decl_null_works=yes
25360 else
25361 gl_cv_decl_null_works=no
25362 fi
25363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25364 fi
25365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25366 $as_echo "$gl_cv_decl_null_works" >&6; }
25367 if test $gl_cv_decl_null_works = no; then
25368 REPLACE_NULL=1
25369 STDDEF_H=stddef.h
25370 fi
25371
25372 if test -n "$STDDEF_H"; then
25373 GL_GENERATE_STDDEF_H_TRUE=
25374 GL_GENERATE_STDDEF_H_FALSE='#'
25375 else
25376 GL_GENERATE_STDDEF_H_TRUE='#'
25377 GL_GENERATE_STDDEF_H_FALSE=
25378 fi
25379
25380 if test -n "$STDDEF_H"; then
25381
25382
25383
25384
25385
25386
25387
25388
25389 if test $gl_cv_have_include_next = yes; then
25390 gl_cv_next_stddef_h='<'stddef.h'>'
25391 else
25392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25393 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25394 if test "${gl_cv_next_stddef_h+set}" = set; then :
25395 $as_echo_n "(cached) " >&6
25396 else
25397
25398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25399 /* end confdefs.h. */
25400 #include <stddef.h>
25401
25402 _ACEOF
25403 case "$host_os" in
25404 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25405 *) gl_absname_cpp="$ac_cpp" ;;
25406 esac
25407
25408 case "$host_os" in
25409 mingw*)
25410 gl_dirsep_regex='[/\\]'
25411 ;;
25412 *)
25413 gl_dirsep_regex='\/'
25414 ;;
25415 esac
25416 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25417
25418 gl_header_literal_regex=`echo 'stddef.h' \
25419 | sed -e "$gl_make_literal_regex_sed"`
25420 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25421 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25422 s|^/[^/]|//&|
25423 p
25424 q
25425 }'
25426 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25427 sed -n "$gl_absolute_header_sed"`'"'
25428
25429
25430 fi
25431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25432 $as_echo "$gl_cv_next_stddef_h" >&6; }
25433 fi
25434 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25435
25436 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25437 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25438 gl_next_as_first_directive='<'stddef.h'>'
25439 else
25440 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25441 gl_next_as_first_directive=$gl_cv_next_stddef_h
25442 fi
25443 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25444
25445
25446
25447
25448 fi
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461 if test $gl_cv_have_include_next = yes; then
25462 gl_cv_next_stdio_h='<'stdio.h'>'
25463 else
25464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25465 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25466 if test "${gl_cv_next_stdio_h+set}" = set; then :
25467 $as_echo_n "(cached) " >&6
25468 else
25469
25470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25471 /* end confdefs.h. */
25472 #include <stdio.h>
25473
25474 _ACEOF
25475 case "$host_os" in
25476 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25477 *) gl_absname_cpp="$ac_cpp" ;;
25478 esac
25479
25480 case "$host_os" in
25481 mingw*)
25482 gl_dirsep_regex='[/\\]'
25483 ;;
25484 *)
25485 gl_dirsep_regex='\/'
25486 ;;
25487 esac
25488 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25489
25490 gl_header_literal_regex=`echo 'stdio.h' \
25491 | sed -e "$gl_make_literal_regex_sed"`
25492 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25493 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25494 s|^/[^/]|//&|
25495 p
25496 q
25497 }'
25498 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25499 sed -n "$gl_absolute_header_sed"`'"'
25500
25501
25502 fi
25503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25504 $as_echo "$gl_cv_next_stdio_h" >&6; }
25505 fi
25506 NEXT_STDIO_H=$gl_cv_next_stdio_h
25507
25508 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25509 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25510 gl_next_as_first_directive='<'stdio.h'>'
25511 else
25512 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25513 gl_next_as_first_directive=$gl_cv_next_stdio_h
25514 fi
25515 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25516
25517
25518
25519
25520
25521 GNULIB_FSCANF=1
25522
25523
25524 cat >>confdefs.h <<_ACEOF
25525 #define GNULIB_FSCANF 1
25526 _ACEOF
25527
25528
25529 GNULIB_SCANF=1
25530
25531
25532 cat >>confdefs.h <<_ACEOF
25533 #define GNULIB_SCANF 1
25534 _ACEOF
25535
25536
25537 GNULIB_FGETC=1
25538 GNULIB_GETC=1
25539 GNULIB_GETCHAR=1
25540 GNULIB_FGETS=1
25541 GNULIB_FREAD=1
25542
25543
25544 GNULIB_FPRINTF=1
25545 GNULIB_PRINTF=1
25546 GNULIB_VFPRINTF=1
25547 GNULIB_VPRINTF=1
25548 GNULIB_FPUTC=1
25549 GNULIB_PUTC=1
25550 GNULIB_PUTCHAR=1
25551 GNULIB_FPUTS=1
25552 GNULIB_PUTS=1
25553 GNULIB_FWRITE=1
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569 if test $gl_cv_have_include_next = yes; then
25570 gl_cv_next_stdlib_h='<'stdlib.h'>'
25571 else
25572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25573 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25574 if test "${gl_cv_next_stdlib_h+set}" = set; then :
25575 $as_echo_n "(cached) " >&6
25576 else
25577
25578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25579 /* end confdefs.h. */
25580 #include <stdlib.h>
25581
25582 _ACEOF
25583 case "$host_os" in
25584 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25585 *) gl_absname_cpp="$ac_cpp" ;;
25586 esac
25587
25588 case "$host_os" in
25589 mingw*)
25590 gl_dirsep_regex='[/\\]'
25591 ;;
25592 *)
25593 gl_dirsep_regex='\/'
25594 ;;
25595 esac
25596 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25597
25598 gl_header_literal_regex=`echo 'stdlib.h' \
25599 | sed -e "$gl_make_literal_regex_sed"`
25600 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25601 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25602 s|^/[^/]|//&|
25603 p
25604 q
25605 }'
25606 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25607 sed -n "$gl_absolute_header_sed"`'"'
25608
25609
25610 fi
25611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25612 $as_echo "$gl_cv_next_stdlib_h" >&6; }
25613 fi
25614 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25615
25616 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25618 gl_next_as_first_directive='<'stdlib.h'>'
25619 else
25620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25621 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25622 fi
25623 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
25634
25635
25636
25637
25638
25639
25640
25641 $as_echo "#define my_strftime nstrftime" >>confdefs.h
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653 if test "$ac_cv_have_decl_strtoimax" != yes; then
25654 HAVE_DECL_STRTOIMAX=0
25655 fi
25656
25657 if test $ac_cv_func_strtoimax = yes; then
25658 HAVE_STRTOIMAX=1
25659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
25660 $as_echo_n "checking whether strtoimax works... " >&6; }
25661 if test "${gl_cv_func_strtoimax+set}" = set; then :
25662 $as_echo_n "(cached) " >&6
25663 else
25664 if test "$cross_compiling" = yes; then :
25665 case "$host_os" in
25666 # Guess no on AIX 5.
25667 aix5*) gl_cv_func_strtoimax="guessing no" ;;
25668 # Guess yes otherwise.
25669 *) gl_cv_func_strtoimax="guessing yes" ;;
25670 esac
25671
25672 else
25673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25674 /* end confdefs.h. */
25675
25676 #include <errno.h>
25677 #include <string.h>
25678 #include <inttypes.h>
25679 int main ()
25680 {
25681 if (sizeof (intmax_t) > sizeof (int))
25682 {
25683 const char *s = "4294967295";
25684 char *p;
25685 intmax_t res;
25686 errno = 0;
25687 res = strtoimax (s, &p, 10);
25688 if (p != s + strlen (s))
25689 return 1;
25690 if (errno != 0)
25691 return 2;
25692 if (res != (intmax_t) 65535 * (intmax_t) 65537)
25693 return 3;
25694 }
25695 else
25696 {
25697 const char *s = "2147483647";
25698 char *p;
25699 intmax_t res;
25700 errno = 0;
25701 res = strtoimax (s, &p, 10);
25702 if (p != s + strlen (s))
25703 return 1;
25704 if (errno != 0)
25705 return 2;
25706 if (res != 2147483647)
25707 return 3;
25708 }
25709 return 0;
25710 }
25711
25712 _ACEOF
25713 if ac_fn_c_try_run "$LINENO"; then :
25714 gl_cv_func_strtoimax=yes
25715 else
25716 gl_cv_func_strtoimax=no
25717 fi
25718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25719 conftest.$ac_objext conftest.beam conftest.$ac_ext
25720 fi
25721
25722
25723 fi
25724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
25725 $as_echo "$gl_cv_func_strtoimax" >&6; }
25726 case "$gl_cv_func_strtoimax" in
25727 *no) REPLACE_STRTOIMAX=1 ;;
25728 esac
25729 else
25730 HAVE_STRTOIMAX=0
25731 fi
25732
25733 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
25734
25735
25736
25737
25738
25739
25740
25741
25742 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
25743
25744
25745 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
25746 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
25747 ac_have_decl=1
25748 else
25749 ac_have_decl=0
25750 fi
25751
25752 cat >>confdefs.h <<_ACEOF
25753 #define HAVE_DECL_STRTOLL $ac_have_decl
25754 _ACEOF
25755
25756
25757
25758 fi
25759
25760
25761
25762
25763
25764 GNULIB_STRTOIMAX=1
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774 if test "$ac_cv_have_decl_strtoumax" != yes; then
25775 HAVE_DECL_STRTOUMAX=0
25776 fi
25777
25778 if test $ac_cv_func_strtoumax = no; then
25779
25780
25781
25782
25783
25784
25785
25786
25787 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
25788
25789
25790 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
25791 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
25792 ac_have_decl=1
25793 else
25794 ac_have_decl=0
25795 fi
25796
25797 cat >>confdefs.h <<_ACEOF
25798 #define HAVE_DECL_STRTOULL $ac_have_decl
25799 _ACEOF
25800
25801
25802
25803 fi
25804
25805
25806
25807
25808
25809 GNULIB_STRTOUMAX=1
25810
25811
25812
25813
25814
25815
25816
25817 if test $ac_cv_func_symlink = no; then
25818 HAVE_SYMLINK=0
25819 else
25820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
25821 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
25822 if test "${gl_cv_func_symlink_works+set}" = set; then :
25823 $as_echo_n "(cached) " >&6
25824 else
25825 if test "$cross_compiling" = yes; then :
25826 case "$host_os" in
25827 # Guess yes on glibc systems.
25828 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
25829 # If we don't know, assume the worst.
25830 *) gl_cv_func_symlink_works="guessing no" ;;
25831 esac
25832
25833 else
25834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25835 /* end confdefs.h. */
25836 #include <unistd.h>
25837
25838 int
25839 main ()
25840 {
25841 int result = 0;
25842 if (!symlink ("a", "conftest.link/"))
25843 result |= 1;
25844 if (symlink ("conftest.f", "conftest.lnk2"))
25845 result |= 2;
25846 else if (!symlink ("a", "conftest.lnk2/"))
25847 result |= 4;
25848 return result;
25849
25850 ;
25851 return 0;
25852 }
25853 _ACEOF
25854 if ac_fn_c_try_run "$LINENO"; then :
25855 gl_cv_func_symlink_works=yes
25856 else
25857 gl_cv_func_symlink_works=no
25858 fi
25859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25860 conftest.$ac_objext conftest.beam conftest.$ac_ext
25861 fi
25862
25863 rm -f conftest.f conftest.link conftest.lnk2
25864 fi
25865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
25866 $as_echo "$gl_cv_func_symlink_works" >&6; }
25867 case "$gl_cv_func_symlink_works" in
25868 *yes) ;;
25869 *)
25870 REPLACE_SYMLINK=1
25871 ;;
25872 esac
25873 fi
25874
25875 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
25876
25877
25878
25879
25880
25881
25882
25883
25884 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
25885
25886 fi
25887
25888
25889
25890
25891
25892 GNULIB_SYMLINK=1
25893
25894
25895
25896
25897
25898
25899
25900
25901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
25902 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
25903 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
25904 $as_echo_n "(cached) " >&6
25905 else
25906
25907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25908 /* end confdefs.h. */
25909 #include <sys/select.h>
25910 int
25911 main ()
25912 {
25913 struct timeval b;
25914 ;
25915 return 0;
25916 }
25917 _ACEOF
25918 if ac_fn_c_try_compile "$LINENO"; then :
25919 gl_cv_header_sys_select_h_selfcontained=yes
25920 else
25921 gl_cv_header_sys_select_h_selfcontained=no
25922 fi
25923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25924 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
25925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25926 /* end confdefs.h. */
25927 #include <sys/select.h>
25928 int
25929 main ()
25930 {
25931 int memset; int bzero;
25932 ;
25933 return 0;
25934 }
25935
25936 _ACEOF
25937 if ac_fn_c_try_compile "$LINENO"; then :
25938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25939 /* end confdefs.h. */
25940 #include <sys/select.h>
25941 int
25942 main ()
25943 {
25944
25945 #undef memset
25946 #define memset nonexistent_memset
25947 extern
25948 #ifdef __cplusplus
25949 "C"
25950 #endif
25951 void *memset (void *, int, unsigned long);
25952 #undef bzero
25953 #define bzero nonexistent_bzero
25954 extern
25955 #ifdef __cplusplus
25956 "C"
25957 #endif
25958 void bzero (void *, unsigned long);
25959 fd_set fds;
25960 FD_ZERO (&fds);
25961
25962 ;
25963 return 0;
25964 }
25965
25966 _ACEOF
25967 if ac_fn_c_try_link "$LINENO"; then :
25968
25969 else
25970 gl_cv_header_sys_select_h_selfcontained=no
25971 fi
25972 rm -f core conftest.err conftest.$ac_objext \
25973 conftest$ac_exeext conftest.$ac_ext
25974
25975 fi
25976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25977 fi
25978
25979 fi
25980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
25981 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991 if test $gl_cv_have_include_next = yes; then
25992 gl_cv_next_sys_select_h='<'sys/select.h'>'
25993 else
25994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
25995 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
25996 if test "${gl_cv_next_sys_select_h+set}" = set; then :
25997 $as_echo_n "(cached) " >&6
25998 else
25999
26000 if test $ac_cv_header_sys_select_h = yes; then
26001
26002
26003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26004 /* end confdefs.h. */
26005 #include <sys/select.h>
26006
26007 _ACEOF
26008 case "$host_os" in
26009 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26010 *) gl_absname_cpp="$ac_cpp" ;;
26011 esac
26012
26013 case "$host_os" in
26014 mingw*)
26015 gl_dirsep_regex='[/\\]'
26016 ;;
26017 *)
26018 gl_dirsep_regex='\/'
26019 ;;
26020 esac
26021 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26022
26023 gl_header_literal_regex=`echo 'sys/select.h' \
26024 | sed -e "$gl_make_literal_regex_sed"`
26025 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26026 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26027 s|^/[^/]|//&|
26028 p
26029 q
26030 }'
26031 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26032 sed -n "$gl_absolute_header_sed"`'"'
26033 else
26034 gl_cv_next_sys_select_h='<'sys/select.h'>'
26035 fi
26036
26037
26038 fi
26039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26040 $as_echo "$gl_cv_next_sys_select_h" >&6; }
26041 fi
26042 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26043
26044 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26045 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26046 gl_next_as_first_directive='<'sys/select.h'>'
26047 else
26048 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26049 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26050 fi
26051 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26052
26053
26054
26055
26056 if test $ac_cv_header_sys_select_h = yes; then
26057 HAVE_SYS_SELECT_H=1
26058 else
26059 HAVE_SYS_SELECT_H=0
26060 fi
26061
26062
26063
26064
26065
26066 if test $ac_cv_header_sys_socket_h != yes; then
26067 for ac_header in winsock2.h
26068 do :
26069 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26070 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26071 cat >>confdefs.h <<_ACEOF
26072 #define HAVE_WINSOCK2_H 1
26073 _ACEOF
26074
26075 fi
26076
26077 done
26078
26079 fi
26080 if test "$ac_cv_header_winsock2_h" = yes; then
26081 HAVE_WINSOCK2_H=1
26082 UNISTD_H_HAVE_WINSOCK2_H=1
26083 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26084 else
26085 HAVE_WINSOCK2_H=0
26086 fi
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107 if test $gl_cv_have_include_next = yes; then
26108 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26109 else
26110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26111 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26112 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26113 $as_echo_n "(cached) " >&6
26114 else
26115
26116 if test $ac_cv_header_sys_stat_h = yes; then
26117
26118
26119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26120 /* end confdefs.h. */
26121 #include <sys/stat.h>
26122
26123 _ACEOF
26124 case "$host_os" in
26125 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26126 *) gl_absname_cpp="$ac_cpp" ;;
26127 esac
26128
26129 case "$host_os" in
26130 mingw*)
26131 gl_dirsep_regex='[/\\]'
26132 ;;
26133 *)
26134 gl_dirsep_regex='\/'
26135 ;;
26136 esac
26137 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26138
26139 gl_header_literal_regex=`echo 'sys/stat.h' \
26140 | sed -e "$gl_make_literal_regex_sed"`
26141 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26142 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26143 s|^/[^/]|//&|
26144 p
26145 q
26146 }'
26147 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26148 sed -n "$gl_absolute_header_sed"`'"'
26149 else
26150 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26151 fi
26152
26153
26154 fi
26155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26156 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26157 fi
26158 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26159
26160 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26161 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26162 gl_next_as_first_directive='<'sys/stat.h'>'
26163 else
26164 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26165 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26166 fi
26167 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26180
26181 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26182
26183 fi
26184
26185 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26186 #include <sys/stat.h>
26187 "
26188 if test "x$ac_cv_type_nlink_t" = x""yes; then :
26189
26190 else
26191
26192 $as_echo "#define nlink_t int" >>confdefs.h
26193
26194 fi
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
26214 "
26215 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
26216 ac_have_decl=1
26217 else
26218 ac_have_decl=0
26219 fi
26220
26221 cat >>confdefs.h <<_ACEOF
26222 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
26223 _ACEOF
26224
26225 if test $ac_cv_have_decl_localtime_r = no; then
26226 HAVE_DECL_LOCALTIME_R=0
26227 fi
26228
26229
26230 if test $ac_cv_func_localtime_r = yes; then
26231 HAVE_LOCALTIME_R=1
26232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
26233 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
26234 if test "${gl_cv_time_r_posix+set}" = set; then :
26235 $as_echo_n "(cached) " >&6
26236 else
26237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26238 /* end confdefs.h. */
26239 #include <time.h>
26240 int
26241 main ()
26242 {
26243 /* We don't need to append 'restrict's to the argument types,
26244 even though the POSIX signature has the 'restrict's,
26245 since C99 says they can't affect type compatibility. */
26246 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
26247 if (ptr) return 0;
26248 /* Check the return type is a pointer.
26249 On HP-UX 10 it is 'int'. */
26250 *localtime_r (0, 0);
26251 ;
26252 return 0;
26253 }
26254
26255 _ACEOF
26256 if ac_fn_c_try_compile "$LINENO"; then :
26257 gl_cv_time_r_posix=yes
26258 else
26259 gl_cv_time_r_posix=no
26260 fi
26261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26262
26263 fi
26264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
26265 $as_echo "$gl_cv_time_r_posix" >&6; }
26266 if test $gl_cv_time_r_posix = yes; then
26267 REPLACE_LOCALTIME_R=0
26268 else
26269 REPLACE_LOCALTIME_R=1
26270 fi
26271 else
26272 HAVE_LOCALTIME_R=0
26273 fi
26274
26275 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
26276
26277
26278
26279
26280
26281
26282
26283
26284 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
26285
26286
26287 :
26288
26289 fi
26290
26291
26292
26293
26294
26295 GNULIB_TIME_R=1
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306 LIB_TIMER_TIME=
26307
26308 gl_saved_libs=$LIBS
26309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
26310 $as_echo_n "checking for library containing timer_settime... " >&6; }
26311 if test "${ac_cv_search_timer_settime+set}" = set; then :
26312 $as_echo_n "(cached) " >&6
26313 else
26314 ac_func_search_save_LIBS=$LIBS
26315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26316 /* end confdefs.h. */
26317
26318 /* Override any GCC internal prototype to avoid an error.
26319 Use char because int might match the return type of a GCC
26320 builtin and then its argument prototype would still apply. */
26321 #ifdef __cplusplus
26322 extern "C"
26323 #endif
26324 char timer_settime ();
26325 int
26326 main ()
26327 {
26328 return timer_settime ();
26329 ;
26330 return 0;
26331 }
26332 _ACEOF
26333 for ac_lib in '' rt posix4; do
26334 if test -z "$ac_lib"; then
26335 ac_res="none required"
26336 else
26337 ac_res=-l$ac_lib
26338 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26339 fi
26340 if ac_fn_c_try_link "$LINENO"; then :
26341 ac_cv_search_timer_settime=$ac_res
26342 fi
26343 rm -f core conftest.err conftest.$ac_objext \
26344 conftest$ac_exeext
26345 if test "${ac_cv_search_timer_settime+set}" = set; then :
26346 break
26347 fi
26348 done
26349 if test "${ac_cv_search_timer_settime+set}" = set; then :
26350
26351 else
26352 ac_cv_search_timer_settime=no
26353 fi
26354 rm conftest.$ac_ext
26355 LIBS=$ac_func_search_save_LIBS
26356 fi
26357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
26358 $as_echo "$ac_cv_search_timer_settime" >&6; }
26359 ac_res=$ac_cv_search_timer_settime
26360 if test "$ac_res" != no; then :
26361 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26362 test "$ac_cv_search_timer_settime" = "none required" ||
26363 LIB_TIMER_TIME=$ac_cv_search_timer_settime
26364 fi
26365
26366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26367 /* end confdefs.h. */
26368
26369 #include <features.h>
26370 #ifdef __GNU_LIBRARY__
26371 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
26372 && !defined __UCLIBC__
26373 Thread emulation available
26374 #endif
26375 #endif
26376
26377 _ACEOF
26378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26379 $EGREP "Thread" >/dev/null 2>&1; then :
26380 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
26381 fi
26382 rm -f conftest*
26383
26384 for ac_func in timer_settime
26385 do :
26386 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
26387 if test "x$ac_cv_func_timer_settime" = x""yes; then :
26388 cat >>confdefs.h <<_ACEOF
26389 #define HAVE_TIMER_SETTIME 1
26390 _ACEOF
26391
26392 fi
26393 done
26394
26395 LIBS=$gl_saved_libs
26396
26397 :
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410 if test $gl_cv_have_include_next = yes; then
26411 gl_cv_next_unistd_h='<'unistd.h'>'
26412 else
26413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26414 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
26415 if test "${gl_cv_next_unistd_h+set}" = set; then :
26416 $as_echo_n "(cached) " >&6
26417 else
26418
26419 if test $ac_cv_header_unistd_h = yes; then
26420
26421
26422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26423 /* end confdefs.h. */
26424 #include <unistd.h>
26425
26426 _ACEOF
26427 case "$host_os" in
26428 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26429 *) gl_absname_cpp="$ac_cpp" ;;
26430 esac
26431
26432 case "$host_os" in
26433 mingw*)
26434 gl_dirsep_regex='[/\\]'
26435 ;;
26436 *)
26437 gl_dirsep_regex='\/'
26438 ;;
26439 esac
26440 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26441
26442 gl_header_literal_regex=`echo 'unistd.h' \
26443 | sed -e "$gl_make_literal_regex_sed"`
26444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26446 s|^/[^/]|//&|
26447 p
26448 q
26449 }'
26450 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26451 sed -n "$gl_absolute_header_sed"`'"'
26452 else
26453 gl_cv_next_unistd_h='<'unistd.h'>'
26454 fi
26455
26456
26457 fi
26458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26459 $as_echo "$gl_cv_next_unistd_h" >&6; }
26460 fi
26461 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26462
26463 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26464 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26465 gl_next_as_first_directive='<'unistd.h'>'
26466 else
26467 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26468 gl_next_as_first_directive=$gl_cv_next_unistd_h
26469 fi
26470 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26471
26472
26473
26474
26475 if test $ac_cv_header_unistd_h = yes; then
26476 HAVE_UNISTD_H=1
26477 else
26478 HAVE_UNISTD_H=0
26479 fi
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491 if test $ac_cv_have_decl_unsetenv = no; then
26492 HAVE_DECL_UNSETENV=0
26493 fi
26494 for ac_func in unsetenv
26495 do :
26496 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
26497 if test "x$ac_cv_func_unsetenv" = x""yes; then :
26498 cat >>confdefs.h <<_ACEOF
26499 #define HAVE_UNSETENV 1
26500 _ACEOF
26501
26502 fi
26503 done
26504
26505 if test $ac_cv_func_unsetenv = no; then
26506 HAVE_UNSETENV=0
26507 else
26508 HAVE_UNSETENV=1
26509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
26510 $as_echo_n "checking for unsetenv() return type... " >&6; }
26511 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
26512 $as_echo_n "(cached) " >&6
26513 else
26514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26515 /* end confdefs.h. */
26516
26517 #undef _BSD
26518 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
26519 #include <stdlib.h>
26520 extern
26521 #ifdef __cplusplus
26522 "C"
26523 #endif
26524 int unsetenv (const char *name);
26525
26526 int
26527 main ()
26528 {
26529
26530 ;
26531 return 0;
26532 }
26533 _ACEOF
26534 if ac_fn_c_try_compile "$LINENO"; then :
26535 gt_cv_func_unsetenv_ret='int'
26536 else
26537 gt_cv_func_unsetenv_ret='void'
26538 fi
26539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26540 fi
26541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
26542 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
26543 if test $gt_cv_func_unsetenv_ret = 'void'; then
26544
26545 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
26546
26547 REPLACE_UNSETENV=1
26548 fi
26549
26550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
26551 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
26552 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
26553 $as_echo_n "(cached) " >&6
26554 else
26555 if test "$cross_compiling" = yes; then :
26556 case "$host_os" in
26557 # Guess yes on glibc systems.
26558 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
26559 # If we don't know, assume the worst.
26560 *) gl_cv_func_unsetenv_works="guessing no" ;;
26561 esac
26562
26563 else
26564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26565 /* end confdefs.h. */
26566
26567 #include <stdlib.h>
26568 #include <errno.h>
26569 extern char **environ;
26570
26571 int
26572 main ()
26573 {
26574
26575 char entry1[] = "a=1";
26576 char entry2[] = "b=2";
26577 char *env[] = { entry1, entry2, NULL };
26578 if (putenv ((char *) "a=1")) return 1;
26579 if (putenv (entry2)) return 2;
26580 entry2[0] = 'a';
26581 unsetenv ("a");
26582 if (getenv ("a")) return 3;
26583 if (!unsetenv ("") || errno != EINVAL) return 4;
26584 entry2[0] = 'b';
26585 environ = env;
26586 if (!getenv ("a")) return 5;
26587 entry2[0] = 'a';
26588 unsetenv ("a");
26589 if (getenv ("a")) return 6;
26590
26591 ;
26592 return 0;
26593 }
26594 _ACEOF
26595 if ac_fn_c_try_run "$LINENO"; then :
26596 gl_cv_func_unsetenv_works=yes
26597 else
26598 gl_cv_func_unsetenv_works=no
26599 fi
26600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26601 conftest.$ac_objext conftest.beam conftest.$ac_ext
26602 fi
26603
26604 fi
26605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
26606 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
26607 case "$gl_cv_func_unsetenv_works" in
26608 *yes) ;;
26609 *)
26610 REPLACE_UNSETENV=1
26611 ;;
26612 esac
26613 fi
26614
26615 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
26616
26617
26618
26619
26620
26621
26622
26623
26624 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
26625
26626
26627
26628
26629
26630 fi
26631
26632
26633
26634
26635
26636 GNULIB_UNSETENV=1
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26650 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
26651 if test "${gl_cv_func_futimesat_works+set}" = set; then :
26652 $as_echo_n "(cached) " >&6
26653 else
26654 touch conftest.file
26655 if test "$cross_compiling" = yes; then :
26656 case "$host_os" in
26657 # Guess yes on glibc systems.
26658 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26659 # If we don't know, assume the worst.
26660 *) gl_cv_func_futimesat_works="guessing no" ;;
26661 esac
26662
26663 else
26664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26665 /* end confdefs.h. */
26666
26667 #include <stddef.h>
26668 #include <sys/times.h>
26669 #include <fcntl.h>
26670
26671 int
26672 main ()
26673 {
26674 int fd = open ("conftest.file", O_RDWR);
26675 if (fd < 0) return 1;
26676 if (futimesat (fd, NULL, NULL)) return 2;
26677
26678 ;
26679 return 0;
26680 }
26681 _ACEOF
26682 if ac_fn_c_try_run "$LINENO"; then :
26683 gl_cv_func_futimesat_works=yes
26684 else
26685 gl_cv_func_futimesat_works=no
26686 fi
26687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26688 conftest.$ac_objext conftest.beam conftest.$ac_ext
26689 fi
26690
26691 rm -f conftest.file
26692 fi
26693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26694 $as_echo "$gl_cv_func_futimesat_works" >&6; }
26695 case "$gl_cv_func_futimesat_works" in
26696 *yes) ;;
26697 *)
26698
26699 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26700
26701 ;;
26702 esac
26703 fi
26704
26705 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
26706 gl_gnulib_enabled_dosname=false
26707 gl_gnulib_enabled_euidaccess=false
26708 gl_gnulib_enabled_getgroups=false
26709 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
26710 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
26711 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
26712 gl_gnulib_enabled_pathmax=false
26713 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
26714 gl_gnulib_enabled_stat=false
26715 gl_gnulib_enabled_strtoll=false
26716 gl_gnulib_enabled_strtoull=false
26717 gl_gnulib_enabled_verify=false
26718 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
26719 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
26720 {
26721 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
26722
26723
26724
26725
26726
26727
26728
26729
26730 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
26731
26732 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
26733 fi
26734 }
26735 func_gl_gnulib_m4code_dosname ()
26736 {
26737 if ! $gl_gnulib_enabled_dosname; then
26738 gl_gnulib_enabled_dosname=true
26739 fi
26740 }
26741 func_gl_gnulib_m4code_euidaccess ()
26742 {
26743 if ! $gl_gnulib_enabled_euidaccess; then
26744
26745
26746
26747
26748
26749 for ac_func in euidaccess
26750 do :
26751 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
26752 if test "x$ac_cv_func_euidaccess" = x""yes; then :
26753 cat >>confdefs.h <<_ACEOF
26754 #define HAVE_EUIDACCESS 1
26755 _ACEOF
26756
26757 fi
26758 done
26759
26760 if test $ac_cv_func_euidaccess = no; then
26761 HAVE_EUIDACCESS=0
26762 fi
26763
26764 if test $HAVE_EUIDACCESS = 0; then
26765
26766
26767
26768
26769
26770
26771
26772
26773 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
26774
26775
26776
26777 for ac_header in libgen.h
26778 do :
26779 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
26780 if test "x$ac_cv_header_libgen_h" = x""yes; then :
26781 cat >>confdefs.h <<_ACEOF
26782 #define HAVE_LIBGEN_H 1
26783 _ACEOF
26784
26785 fi
26786
26787 done
26788
26789
26790 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
26791 if test "x$ac_cv_func_getgroups" = x""yes; then :
26792
26793 fi
26794
26795
26796 # If we don't yet have getgroups, see if it's in -lbsd.
26797 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
26798 ac_save_LIBS=$LIBS
26799 if test $ac_cv_func_getgroups = no; then
26800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
26801 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
26802 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
26803 $as_echo_n "(cached) " >&6
26804 else
26805 ac_check_lib_save_LIBS=$LIBS
26806 LIBS="-lbsd $LIBS"
26807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26808 /* end confdefs.h. */
26809
26810 /* Override any GCC internal prototype to avoid an error.
26811 Use char because int might match the return type of a GCC
26812 builtin and then its argument prototype would still apply. */
26813 #ifdef __cplusplus
26814 extern "C"
26815 #endif
26816 char getgroups ();
26817 int
26818 main ()
26819 {
26820 return getgroups ();
26821 ;
26822 return 0;
26823 }
26824 _ACEOF
26825 if ac_fn_c_try_link "$LINENO"; then :
26826 ac_cv_lib_bsd_getgroups=yes
26827 else
26828 ac_cv_lib_bsd_getgroups=no
26829 fi
26830 rm -f core conftest.err conftest.$ac_objext \
26831 conftest$ac_exeext conftest.$ac_ext
26832 LIBS=$ac_check_lib_save_LIBS
26833 fi
26834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
26835 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
26836 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
26837 GETGROUPS_LIB=-lbsd
26838 fi
26839
26840 fi
26841
26842 # Run the program to test the functionality of the system-supplied
26843 # getgroups function only if there is such a function.
26844 if test $ac_cv_func_getgroups = yes; then
26845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
26846 $as_echo_n "checking for working getgroups... " >&6; }
26847 if test "${ac_cv_func_getgroups_works+set}" = set; then :
26848 $as_echo_n "(cached) " >&6
26849 else
26850 if test "$cross_compiling" = yes; then :
26851 case "$host_os" in # ((
26852 # Guess yes on glibc systems.
26853 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
26854 # If we don't know, assume the worst.
26855 *) ac_cv_func_getgroups_works="guessing no" ;;
26856 esac
26857
26858 else
26859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26860 /* end confdefs.h. */
26861 $ac_includes_default
26862 int
26863 main ()
26864 {
26865 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
26866 return getgroups (0, 0) == -1;
26867 ;
26868 return 0;
26869 }
26870
26871 _ACEOF
26872 if ac_fn_c_try_run "$LINENO"; then :
26873 ac_cv_func_getgroups_works=yes
26874 else
26875 ac_cv_func_getgroups_works=no
26876 fi
26877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26878 conftest.$ac_objext conftest.beam conftest.$ac_ext
26879 fi
26880
26881
26882 fi
26883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
26884 $as_echo "$ac_cv_func_getgroups_works" >&6; }
26885 else
26886 ac_cv_func_getgroups_works=no
26887 fi
26888 case "$ac_cv_func_getgroups_works" in
26889 *yes)
26890
26891 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
26892
26893 ;;
26894 esac
26895 LIBS=$ac_save_LIBS
26896
26897
26898 # Solaris 9 and 10 need -lgen to get the eaccess function.
26899 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
26900 # programs in the package would end up linked with that potentially-shared
26901 # library, inducing unnecessary run-time overhead.
26902 LIB_EACCESS=
26903
26904 gl_saved_libs=$LIBS
26905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
26906 $as_echo_n "checking for library containing eaccess... " >&6; }
26907 if test "${ac_cv_search_eaccess+set}" = set; then :
26908 $as_echo_n "(cached) " >&6
26909 else
26910 ac_func_search_save_LIBS=$LIBS
26911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26912 /* end confdefs.h. */
26913
26914 /* Override any GCC internal prototype to avoid an error.
26915 Use char because int might match the return type of a GCC
26916 builtin and then its argument prototype would still apply. */
26917 #ifdef __cplusplus
26918 extern "C"
26919 #endif
26920 char eaccess ();
26921 int
26922 main ()
26923 {
26924 return eaccess ();
26925 ;
26926 return 0;
26927 }
26928 _ACEOF
26929 for ac_lib in '' gen; do
26930 if test -z "$ac_lib"; then
26931 ac_res="none required"
26932 else
26933 ac_res=-l$ac_lib
26934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26935 fi
26936 if ac_fn_c_try_link "$LINENO"; then :
26937 ac_cv_search_eaccess=$ac_res
26938 fi
26939 rm -f core conftest.err conftest.$ac_objext \
26940 conftest$ac_exeext
26941 if test "${ac_cv_search_eaccess+set}" = set; then :
26942 break
26943 fi
26944 done
26945 if test "${ac_cv_search_eaccess+set}" = set; then :
26946
26947 else
26948 ac_cv_search_eaccess=no
26949 fi
26950 rm conftest.$ac_ext
26951 LIBS=$ac_func_search_save_LIBS
26952 fi
26953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
26954 $as_echo "$ac_cv_search_eaccess" >&6; }
26955 ac_res=$ac_cv_search_eaccess
26956 if test "$ac_res" != no; then :
26957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26958 test "$ac_cv_search_eaccess" = "none required" ||
26959 LIB_EACCESS=$ac_cv_search_eaccess
26960 fi
26961
26962 for ac_func in eaccess
26963 do :
26964 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
26965 if test "x$ac_cv_func_eaccess" = x""yes; then :
26966 cat >>confdefs.h <<_ACEOF
26967 #define HAVE_EACCESS 1
26968 _ACEOF
26969
26970 fi
26971 done
26972
26973 LIBS=$gl_saved_libs
26974
26975 fi
26976
26977
26978
26979
26980
26981 GNULIB_EUIDACCESS=1
26982
26983
26984
26985
26986
26987 gl_gnulib_enabled_euidaccess=true
26988 if test $HAVE_EUIDACCESS = 0; then
26989 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
26990 fi
26991 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
26992 if test $HAVE_EUIDACCESS = 0; then
26993 func_gl_gnulib_m4code_stat
26994 fi
26995 fi
26996 }
26997 func_gl_gnulib_m4code_getgroups ()
26998 {
26999 if ! $gl_gnulib_enabled_getgroups; then
27000
27001
27002
27003
27004
27005 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27006 if test "x$ac_cv_func_getgroups" = x""yes; then :
27007
27008 fi
27009
27010
27011 # If we don't yet have getgroups, see if it's in -lbsd.
27012 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27013 ac_save_LIBS=$LIBS
27014 if test $ac_cv_func_getgroups = no; then
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27016 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27017 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27018 $as_echo_n "(cached) " >&6
27019 else
27020 ac_check_lib_save_LIBS=$LIBS
27021 LIBS="-lbsd $LIBS"
27022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27023 /* end confdefs.h. */
27024
27025 /* Override any GCC internal prototype to avoid an error.
27026 Use char because int might match the return type of a GCC
27027 builtin and then its argument prototype would still apply. */
27028 #ifdef __cplusplus
27029 extern "C"
27030 #endif
27031 char getgroups ();
27032 int
27033 main ()
27034 {
27035 return getgroups ();
27036 ;
27037 return 0;
27038 }
27039 _ACEOF
27040 if ac_fn_c_try_link "$LINENO"; then :
27041 ac_cv_lib_bsd_getgroups=yes
27042 else
27043 ac_cv_lib_bsd_getgroups=no
27044 fi
27045 rm -f core conftest.err conftest.$ac_objext \
27046 conftest$ac_exeext conftest.$ac_ext
27047 LIBS=$ac_check_lib_save_LIBS
27048 fi
27049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27050 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27051 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27052 GETGROUPS_LIB=-lbsd
27053 fi
27054
27055 fi
27056
27057 # Run the program to test the functionality of the system-supplied
27058 # getgroups function only if there is such a function.
27059 if test $ac_cv_func_getgroups = yes; then
27060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27061 $as_echo_n "checking for working getgroups... " >&6; }
27062 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27063 $as_echo_n "(cached) " >&6
27064 else
27065 if test "$cross_compiling" = yes; then :
27066 case "$host_os" in # ((
27067 # Guess yes on glibc systems.
27068 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27069 # If we don't know, assume the worst.
27070 *) ac_cv_func_getgroups_works="guessing no" ;;
27071 esac
27072
27073 else
27074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27075 /* end confdefs.h. */
27076 $ac_includes_default
27077 int
27078 main ()
27079 {
27080 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27081 return getgroups (0, 0) == -1;
27082 ;
27083 return 0;
27084 }
27085
27086 _ACEOF
27087 if ac_fn_c_try_run "$LINENO"; then :
27088 ac_cv_func_getgroups_works=yes
27089 else
27090 ac_cv_func_getgroups_works=no
27091 fi
27092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27093 conftest.$ac_objext conftest.beam conftest.$ac_ext
27094 fi
27095
27096
27097 fi
27098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27099 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27100 else
27101 ac_cv_func_getgroups_works=no
27102 fi
27103 case "$ac_cv_func_getgroups_works" in
27104 *yes)
27105
27106 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27107
27108 ;;
27109 esac
27110 LIBS=$ac_save_LIBS
27111
27112 if test $ac_cv_func_getgroups != yes; then
27113 HAVE_GETGROUPS=0
27114 else
27115 if test "$ac_cv_type_getgroups" != gid_t \
27116 || { case "$ac_cv_func_getgroups_works" in
27117 *yes) false;;
27118 *) true;;
27119 esac
27120 }; then
27121 REPLACE_GETGROUPS=1
27122
27123 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
27124
27125 else
27126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
27127 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
27128 if test "${gl_cv_func_getgroups_works+set}" = set; then :
27129 $as_echo_n "(cached) " >&6
27130 else
27131 if test "$cross_compiling" = yes; then :
27132 case "$host_os" in
27133 # Guess yes on glibc systems.
27134 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
27135 # If we don't know, assume the worst.
27136 *) gl_cv_func_getgroups_works="guessing no" ;;
27137 esac
27138
27139 else
27140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27141 /* end confdefs.h. */
27142 $ac_includes_default
27143 int
27144 main ()
27145 {
27146 int size = getgroups (0, 0);
27147 gid_t *list = malloc (size * sizeof *list);
27148 return getgroups (-1, list) != -1;
27149 ;
27150 return 0;
27151 }
27152 _ACEOF
27153 if ac_fn_c_try_run "$LINENO"; then :
27154 gl_cv_func_getgroups_works=yes
27155 else
27156 gl_cv_func_getgroups_works=no
27157 fi
27158 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27159 conftest.$ac_objext conftest.beam conftest.$ac_ext
27160 fi
27161
27162 fi
27163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
27164 $as_echo "$gl_cv_func_getgroups_works" >&6; }
27165 case "$gl_cv_func_getgroups_works" in
27166 *yes) ;;
27167 *) REPLACE_GETGROUPS=1 ;;
27168 esac
27169 fi
27170 fi
27171 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
27172
27173 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
27174
27175
27176
27177
27178
27179
27180
27181
27182 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
27183
27184 fi
27185
27186
27187
27188
27189
27190 GNULIB_GETGROUPS=1
27191
27192
27193
27194
27195
27196 gl_gnulib_enabled_getgroups=true
27197 fi
27198 }
27199 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
27200 {
27201 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27202
27203
27204 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
27205 fi
27206 }
27207 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
27208 {
27209 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27210
27211
27212
27213
27214
27215 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
27216 if test "x$ac_cv_func_group_member" = x""yes; then :
27217
27218 else
27219
27220 HAVE_GROUP_MEMBER=0
27221
27222 fi
27223
27224
27225 if test $HAVE_GROUP_MEMBER = 0; then
27226
27227
27228
27229
27230
27231
27232
27233
27234 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
27235
27236
27237
27238
27239 fi
27240
27241
27242
27243
27244
27245 GNULIB_GROUP_MEMBER=1
27246
27247
27248
27249
27250
27251 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
27252 if test $HAVE_GROUP_MEMBER = 0; then
27253 func_gl_gnulib_m4code_getgroups
27254 fi
27255 if test $HAVE_GROUP_MEMBER = 0; then
27256 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
27257 fi
27258 fi
27259 }
27260 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
27261 {
27262 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27263 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
27264 fi
27265 }
27266 func_gl_gnulib_m4code_pathmax ()
27267 {
27268 if ! $gl_gnulib_enabled_pathmax; then
27269
27270
27271
27272 gl_gnulib_enabled_pathmax=true
27273 fi
27274 }
27275 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
27276 {
27277 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27278 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
27279 fi
27280 }
27281 func_gl_gnulib_m4code_stat ()
27282 {
27283 if ! $gl_gnulib_enabled_stat; then
27284
27285
27286
27287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27288 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27289 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
27290 $as_echo_n "(cached) " >&6
27291 else
27292 if test "$cross_compiling" = yes; then :
27293 case $host_os in
27294 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27295 *) gl_cv_func_stat_dir_slash="guessing yes";;
27296 esac
27297 else
27298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27299 /* end confdefs.h. */
27300 #include <sys/stat.h>
27301
27302 int
27303 main ()
27304 {
27305 struct stat st; return stat (".", &st) != stat ("./", &st);
27306 ;
27307 return 0;
27308 }
27309 _ACEOF
27310 if ac_fn_c_try_run "$LINENO"; then :
27311 gl_cv_func_stat_dir_slash=yes
27312 else
27313 gl_cv_func_stat_dir_slash=no
27314 fi
27315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27316 conftest.$ac_objext conftest.beam conftest.$ac_ext
27317 fi
27318
27319 fi
27320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27321 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27323 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27324 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
27325 $as_echo_n "(cached) " >&6
27326 else
27327 touch conftest.tmp
27328 # Assume that if we have lstat, we can also check symlinks.
27329 if test $ac_cv_func_lstat = yes; then
27330 ln -s conftest.tmp conftest.lnk
27331 fi
27332 if test "$cross_compiling" = yes; then :
27333 case "$host_os" in
27334 # Guess yes on glibc systems.
27335 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27336 # If we don't know, assume the worst.
27337 *) gl_cv_func_stat_file_slash="guessing no" ;;
27338 esac
27339
27340 else
27341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27342 /* end confdefs.h. */
27343 #include <sys/stat.h>
27344
27345 int
27346 main ()
27347 {
27348 int result = 0;
27349 struct stat st;
27350 if (!stat ("conftest.tmp/", &st))
27351 result |= 1;
27352 #if HAVE_LSTAT
27353 if (!stat ("conftest.lnk/", &st))
27354 result |= 2;
27355 #endif
27356 return result;
27357
27358 ;
27359 return 0;
27360 }
27361 _ACEOF
27362 if ac_fn_c_try_run "$LINENO"; then :
27363 gl_cv_func_stat_file_slash=yes
27364 else
27365 gl_cv_func_stat_file_slash=no
27366 fi
27367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27368 conftest.$ac_objext conftest.beam conftest.$ac_ext
27369 fi
27370
27371 rm -f conftest.tmp conftest.lnk
27372 fi
27373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27374 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
27375 case $gl_cv_func_stat_dir_slash in
27376 *no) REPLACE_STAT=1
27377
27378 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
27379 ;;
27380 esac
27381 case $gl_cv_func_stat_file_slash in
27382 *no) REPLACE_STAT=1
27383
27384 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27385 ;;
27386 esac
27387
27388 if test $REPLACE_STAT = 1; then
27389
27390
27391
27392
27393
27394
27395
27396
27397 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27398
27399 :
27400 fi
27401
27402
27403
27404
27405
27406 GNULIB_STAT=1
27407
27408
27409
27410
27411
27412 gl_gnulib_enabled_stat=true
27413 if test $REPLACE_STAT = 1; then
27414 func_gl_gnulib_m4code_dosname
27415 fi
27416 if test $REPLACE_STAT = 1; then
27417 func_gl_gnulib_m4code_pathmax
27418 fi
27419 if test $REPLACE_STAT = 1; then
27420 func_gl_gnulib_m4code_verify
27421 fi
27422 fi
27423 }
27424 func_gl_gnulib_m4code_strtoll ()
27425 {
27426 if ! $gl_gnulib_enabled_strtoll; then
27427
27428
27429
27430 if test "$ac_cv_type_long_long_int" = yes; then
27431 for ac_func in strtoll
27432 do :
27433 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
27434 if test "x$ac_cv_func_strtoll" = x""yes; then :
27435 cat >>confdefs.h <<_ACEOF
27436 #define HAVE_STRTOLL 1
27437 _ACEOF
27438
27439 fi
27440 done
27441
27442 if test $ac_cv_func_strtoll = no; then
27443 HAVE_STRTOLL=0
27444 fi
27445 fi
27446
27447 if test $HAVE_STRTOLL = 0; then
27448
27449
27450
27451
27452
27453
27454
27455
27456 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
27457
27458
27459 :
27460
27461 fi
27462
27463
27464
27465
27466
27467 GNULIB_STRTOLL=1
27468
27469
27470
27471
27472
27473 gl_gnulib_enabled_strtoll=true
27474 fi
27475 }
27476 func_gl_gnulib_m4code_strtoull ()
27477 {
27478 if ! $gl_gnulib_enabled_strtoull; then
27479
27480
27481
27482 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
27483 for ac_func in strtoull
27484 do :
27485 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
27486 if test "x$ac_cv_func_strtoull" = x""yes; then :
27487 cat >>confdefs.h <<_ACEOF
27488 #define HAVE_STRTOULL 1
27489 _ACEOF
27490
27491 fi
27492 done
27493
27494 if test $ac_cv_func_strtoull = no; then
27495 HAVE_STRTOULL=0
27496 fi
27497 fi
27498
27499 if test $HAVE_STRTOULL = 0; then
27500
27501
27502
27503
27504
27505
27506
27507
27508 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
27509
27510
27511 :
27512
27513 fi
27514
27515
27516
27517
27518
27519 GNULIB_STRTOULL=1
27520
27521
27522
27523
27524
27525 gl_gnulib_enabled_strtoull=true
27526 fi
27527 }
27528 func_gl_gnulib_m4code_verify ()
27529 {
27530 if ! $gl_gnulib_enabled_verify; then
27531 gl_gnulib_enabled_verify=true
27532 fi
27533 }
27534 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
27535 {
27536 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
27537 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
27538 fi
27539 }
27540 if test $HAVE_FACCESSAT = 0; then
27541 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27542 fi
27543 if test $HAVE_FACCESSAT = 0; then
27544 func_gl_gnulib_m4code_dosname
27545 fi
27546 if test $HAVE_FACCESSAT = 0; then
27547 func_gl_gnulib_m4code_euidaccess
27548 fi
27549 if test $HAVE_FACCESSAT = 0; then
27550 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27551 fi
27552 if test $HAVE_FDOPENDIR = 0; then
27553 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27554 fi
27555 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27556 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27557 fi
27558 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27559 func_gl_gnulib_m4code_dosname
27560 fi
27561 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27562 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27563 fi
27564 if test $REPLACE_GETOPT = 1; then
27565 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
27566 fi
27567 if test $REPLACE_LSTAT = 1; then
27568 func_gl_gnulib_m4code_dosname
27569 fi
27570 if test $REPLACE_LSTAT = 1; then
27571 func_gl_gnulib_m4code_stat
27572 fi
27573 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27574 func_gl_gnulib_m4code_stat
27575 fi
27576 if test $HAVE_READLINKAT = 0; then
27577 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27578 fi
27579 if test $HAVE_READLINKAT = 0; then
27580 func_gl_gnulib_m4code_dosname
27581 fi
27582 if test $HAVE_READLINKAT = 0; then
27583 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27584 fi
27585 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
27586 func_gl_gnulib_m4code_strtoll
27587 fi
27588 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
27589 func_gl_gnulib_m4code_verify
27590 fi
27591 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
27592 func_gl_gnulib_m4code_strtoull
27593 fi
27594 if test $ac_cv_func_strtoumax = no; then
27595 func_gl_gnulib_m4code_verify
27596 fi
27597
27598 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27599 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
27600 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
27601 else
27602 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
27603 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
27604 fi
27605
27606 if $gl_gnulib_enabled_dosname; then
27607 gl_GNULIB_ENABLED_dosname_TRUE=
27608 gl_GNULIB_ENABLED_dosname_FALSE='#'
27609 else
27610 gl_GNULIB_ENABLED_dosname_TRUE='#'
27611 gl_GNULIB_ENABLED_dosname_FALSE=
27612 fi
27613
27614 if $gl_gnulib_enabled_euidaccess; then
27615 gl_GNULIB_ENABLED_euidaccess_TRUE=
27616 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
27617 else
27618 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
27619 gl_GNULIB_ENABLED_euidaccess_FALSE=
27620 fi
27621
27622 if $gl_gnulib_enabled_getgroups; then
27623 gl_GNULIB_ENABLED_getgroups_TRUE=
27624 gl_GNULIB_ENABLED_getgroups_FALSE='#'
27625 else
27626 gl_GNULIB_ENABLED_getgroups_TRUE='#'
27627 gl_GNULIB_ENABLED_getgroups_FALSE=
27628 fi
27629
27630 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27631 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
27632 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
27633 else
27634 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
27635 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
27636 fi
27637
27638 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27639 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
27640 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
27641 else
27642 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
27643 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
27644 fi
27645
27646 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27647 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
27648 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
27649 else
27650 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
27651 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
27652 fi
27653
27654 if $gl_gnulib_enabled_pathmax; then
27655 gl_GNULIB_ENABLED_pathmax_TRUE=
27656 gl_GNULIB_ENABLED_pathmax_FALSE='#'
27657 else
27658 gl_GNULIB_ENABLED_pathmax_TRUE='#'
27659 gl_GNULIB_ENABLED_pathmax_FALSE=
27660 fi
27661
27662 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27663 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
27664 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
27665 else
27666 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
27667 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
27668 fi
27669
27670 if $gl_gnulib_enabled_stat; then
27671 gl_GNULIB_ENABLED_stat_TRUE=
27672 gl_GNULIB_ENABLED_stat_FALSE='#'
27673 else
27674 gl_GNULIB_ENABLED_stat_TRUE='#'
27675 gl_GNULIB_ENABLED_stat_FALSE=
27676 fi
27677
27678 if $gl_gnulib_enabled_strtoll; then
27679 gl_GNULIB_ENABLED_strtoll_TRUE=
27680 gl_GNULIB_ENABLED_strtoll_FALSE='#'
27681 else
27682 gl_GNULIB_ENABLED_strtoll_TRUE='#'
27683 gl_GNULIB_ENABLED_strtoll_FALSE=
27684 fi
27685
27686 if $gl_gnulib_enabled_strtoull; then
27687 gl_GNULIB_ENABLED_strtoull_TRUE=
27688 gl_GNULIB_ENABLED_strtoull_FALSE='#'
27689 else
27690 gl_GNULIB_ENABLED_strtoull_TRUE='#'
27691 gl_GNULIB_ENABLED_strtoull_FALSE=
27692 fi
27693
27694 if $gl_gnulib_enabled_verify; then
27695 gl_GNULIB_ENABLED_verify_TRUE=
27696 gl_GNULIB_ENABLED_verify_FALSE='#'
27697 else
27698 gl_GNULIB_ENABLED_verify_TRUE='#'
27699 gl_GNULIB_ENABLED_verify_FALSE=
27700 fi
27701
27702 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
27703 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
27704 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
27705 else
27706 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
27707 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
27708 fi
27709
27710 # End of code from modules
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720 gltests_libdeps=
27721 gltests_ltlibdeps=
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731 gl_source_base='tests'
27732 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
27733
27734 gl_module_indicator_condition=$gltests_WITNESS
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745 LIBGNU_LIBDEPS="$gl_libdeps"
27746
27747 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
27748
27749
27750 CFLAGS=$SAVE_CFLAGS
27751 LIBS=$SAVE_LIBS
27752
27753 case "$opsys" in
27754 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
27755
27756 darwin)
27757 ## The -headerpad option tells ld (see man page) to leave room at the
27758 ## end of the header for adding load commands. Needed for dumping.
27759 ## 0x690 is the total size of 30 segment load commands (at 56
27760 ## each); under Cocoa 31 commands are required.
27761 if test "$HAVE_NS" = "yes"; then
27762 libs_nsgui="-framework AppKit"
27763 if test "$NS_IMPL_COCOA" = "yes"; then
27764 libs_nsgui="$libs_nsgui -framework IOKit"
27765 fi
27766 headerpad_extra=6C8
27767 else
27768 libs_nsgui=
27769 headerpad_extra=690
27770 fi
27771 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
27772
27773 ## This is here because src/Makefile.in did some extra fiddling around
27774 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
27775 ## LD_SWITCH_SYSTEM_TEMACS instead,
27776 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
27777 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
27778 ;;
27779
27780 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
27781 ## find X at run-time.
27782 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
27783 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
27784 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
27785 ## had different values in configure (in ac_link) and src/Makefile.in.
27786 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
27787 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
27788
27789 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
27790
27791 *) LD_SWITCH_SYSTEM_TEMACS= ;;
27792 esac
27793
27794 if test x$ac_enable_profiling != x ; then
27795 case $opsys in
27796 *freebsd | gnu-linux) ;;
27797 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
27798 esac
27799 fi
27800
27801
27802
27803 ## Common for all window systems
27804 if test "$window_system" != "none"; then
27805
27806 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
27807
27808 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
27809 fi
27810
27811
27812
27813
27814
27815 #### Report on what we decided to do.
27816 #### Report GTK as a toolkit, even if it doesn't use Xt.
27817 #### It makes printing result more understandable as using GTK sets
27818 #### toolkit_scroll_bars to yes by default.
27819 if test "${HAVE_GTK}" = "yes"; then
27820 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
27821 fi
27822
27823 echo "
27824 Configured for \`${canonical}'.
27825
27826 Where should the build process find the source code? ${srcdir}
27827 What compiler should emacs be built with? ${CC} ${CFLAGS}
27828 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
27829 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
27830 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
27831 What window system should Emacs use? ${window_system}
27832 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
27833
27834 if test -n "${x_includes}"; then
27835 echo " Where do we find X Windows header files? ${x_includes}"
27836 else
27837 echo " Where do we find X Windows header files? Standard dirs"
27838 fi
27839 if test -n "${x_libraries}"; then
27840 echo " Where do we find X Windows libraries? ${x_libraries}"
27841 else
27842 echo " Where do we find X Windows libraries? Standard dirs"
27843 fi
27844
27845 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
27846 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
27847 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
27848 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
27849 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
27850 echo " Does Emacs use -lpng? ${HAVE_PNG}"
27851 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
27852 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
27853
27854 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
27855 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
27856 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
27857 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
27858 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27859 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
27860 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
27861
27862 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
27863 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
27864 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
27865 echo " Does Emacs use -lxft? ${HAVE_XFT}"
27866
27867 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
27868 echo
27869
27870 if test -n "${EMACSDATA}"; then
27871 echo " Environment variable EMACSDATA set to: $EMACSDATA"
27872 fi
27873 if test -n "${EMACSDOC}"; then
27874 echo " Environment variable EMACSDOC set to: $EMACSDOC"
27875 fi
27876
27877 echo
27878
27879 if test "$HAVE_NS" = "yes"; then
27880 echo
27881 echo "You must run \"${MAKE-make} install\" in order to test the built application.
27882 The installed application will go to nextstep/Emacs.app and can be
27883 run or moved from there."
27884 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
27885 echo "The application will be fully self-contained."
27886 else
27887 echo "The lisp resources for the application will be installed under ${prefix}.
27888 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
27889 to run if these resources are not installed."
27890 fi
27891 echo
27892 fi
27893
27894 if test "${opsys}" = "cygwin"; then
27895 case `uname -r` in
27896 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
27897 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
27898 echo
27899 ;;
27900 esac
27901 fi
27902
27903 # Remove any trailing slashes in these variables.
27904 test "${prefix}" != NONE &&
27905 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
27906 test "${exec_prefix}" != NONE &&
27907 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
27908
27909 if test "$HAVE_NS" = "yes"; then
27910 if test "$NS_IMPL_GNUSTEP" = yes; then
27911 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"
27912
27913 else
27914 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"
27915
27916 fi
27917 fi
27918
27919 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"
27920
27921 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"
27922
27923
27924 opt_makefile=test/automated/Makefile
27925
27926 if test -f "$srcdir/$opt_makefile.in"; then
27927 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
27928 ac_config_files="$ac_config_files test/automated/Makefile"
27929
27930 fi
27931
27932
27933 opt_makefile=admin/unidata/Makefile
27934
27935 if test -f "$srcdir/$opt_makefile.in"; then
27936 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
27937 ac_config_files="$ac_config_files admin/unidata/Makefile"
27938
27939 fi
27940
27941
27942 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
27943
27944
27945
27946 ac_config_commands="$ac_config_commands mkdirs"
27947
27948
27949 ac_config_commands="$ac_config_commands epaths"
27950
27951
27952 ac_config_commands="$ac_config_commands gdbinit"
27953
27954
27955 cat >confcache <<\_ACEOF
27956 # This file is a shell script that caches the results of configure
27957 # tests run on this system so they can be shared between configure
27958 # scripts and configure runs, see configure's option --config-cache.
27959 # It is not useful on other systems. If it contains results you don't
27960 # want to keep, you may remove or edit it.
27961 #
27962 # config.status only pays attention to the cache file if you give it
27963 # the --recheck option to rerun configure.
27964 #
27965 # `ac_cv_env_foo' variables (set or unset) will be overridden when
27966 # loading this file, other *unset* `ac_cv_foo' will be assigned the
27967 # following values.
27968
27969 _ACEOF
27970
27971 # The following way of writing the cache mishandles newlines in values,
27972 # but we know of no workaround that is simple, portable, and efficient.
27973 # So, we kill variables containing newlines.
27974 # Ultrix sh set writes to stderr and can't be redirected directly,
27975 # and sets the high bit in the cache file unless we assign to the vars.
27976 (
27977 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27978 eval ac_val=\$$ac_var
27979 case $ac_val in #(
27980 *${as_nl}*)
27981 case $ac_var in #(
27982 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
27983 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
27984 esac
27985 case $ac_var in #(
27986 _ | IFS | as_nl) ;; #(
27987 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
27988 *) { eval $ac_var=; unset $ac_var;} ;;
27989 esac ;;
27990 esac
27991 done
27992
27993 (set) 2>&1 |
27994 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27995 *${as_nl}ac_space=\ *)
27996 # `set' does not quote correctly, so add quotes: double-quote
27997 # substitution turns \\\\ into \\, and sed turns \\ into \.
27998 sed -n \
27999 "s/'/'\\\\''/g;
28000 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28001 ;; #(
28002 *)
28003 # `set' quotes correctly as required by POSIX, so do not add quotes.
28004 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28005 ;;
28006 esac |
28007 sort
28008 ) |
28009 sed '
28010 /^ac_cv_env_/b end
28011 t clear
28012 :clear
28013 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28014 t end
28015 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28016 :end' >>confcache
28017 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28018 if test -w "$cache_file"; then
28019 test "x$cache_file" != "x/dev/null" &&
28020 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28021 $as_echo "$as_me: updating cache $cache_file" >&6;}
28022 cat confcache >$cache_file
28023 else
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28025 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28026 fi
28027 fi
28028 rm -f confcache
28029
28030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28031 # Let make expand exec_prefix.
28032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28033
28034 DEFS=-DHAVE_CONFIG_H
28035
28036 ac_libobjs=
28037 ac_ltlibobjs=
28038 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28039 # 1. Remove the extension, and $U if already installed.
28040 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28041 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28042 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28043 # will be set to the directory where LIBOBJS objects are built.
28044 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28045 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28046 done
28047 LIBOBJS=$ac_libobjs
28048
28049 LTLIBOBJS=$ac_ltlibobjs
28050
28051
28052 if test -n "$EXEEXT"; then
28053 am__EXEEXT_TRUE=
28054 am__EXEEXT_FALSE='#'
28055 else
28056 am__EXEEXT_TRUE='#'
28057 am__EXEEXT_FALSE=
28058 fi
28059
28060 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28061 as_fn_error "conditional \"AMDEP\" was never defined.
28062 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28063 fi
28064 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28065 as_fn_error "conditional \"am__fastdepCC\" was never defined.
28066 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28067 fi
28068 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28069 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
28070 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28071 fi
28072 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28073 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28074 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28075 fi
28076
28077 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28078 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28079 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28080 fi
28081 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
28082 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
28083 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28084 fi
28085 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28086 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28087 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28088 fi
28089 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
28090 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
28091 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28092 fi
28093 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
28094 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
28095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28096 fi
28097 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28098 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28099 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28100 fi
28101 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28102 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28104 fi
28105 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
28106 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
28107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28108 fi
28109 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
28110 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
28111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28112 fi
28113 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
28114 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
28115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28116 fi
28117 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
28118 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
28119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28120 fi
28121 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
28122 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
28123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28124 fi
28125 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
28126 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
28127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28128 fi
28129 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
28130 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
28131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28132 fi
28133 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
28134 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
28135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28136 fi
28137 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
28138 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
28139 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28140 fi
28141 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
28142 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
28143 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28144 fi
28145 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
28146 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
28147 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28148 fi
28149 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
28150 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
28151 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28152 fi
28153 if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
28154 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
28155 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28156 fi
28157 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
28158 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
28159 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28160 fi
28161
28162 gl_libobjs=
28163 gl_ltlibobjs=
28164 if test -n "$gl_LIBOBJS"; then
28165 # Remove the extension.
28166 sed_drop_objext='s/\.o$//;s/\.obj$//'
28167 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28168 gl_libobjs="$gl_libobjs $i.$ac_objext"
28169 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28170 done
28171 fi
28172 gl_LIBOBJS=$gl_libobjs
28173
28174 gl_LTLIBOBJS=$gl_ltlibobjs
28175
28176
28177
28178 gltests_libobjs=
28179 gltests_ltlibobjs=
28180 if test -n "$gltests_LIBOBJS"; then
28181 # Remove the extension.
28182 sed_drop_objext='s/\.o$//;s/\.obj$//'
28183 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28184 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28185 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28186 done
28187 fi
28188 gltests_LIBOBJS=$gltests_libobjs
28189
28190 gltests_LTLIBOBJS=$gltests_ltlibobjs
28191
28192
28193
28194 : ${CONFIG_STATUS=./config.status}
28195 ac_write_fail=0
28196 ac_clean_files_save=$ac_clean_files
28197 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28198 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28199 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
28200 as_write_fail=0
28201 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28202 #! $SHELL
28203 # Generated by $as_me.
28204 # Run this file to recreate the current configuration.
28205 # Compiler output produced by configure, useful for debugging
28206 # configure, is in config.log if it exists.
28207
28208 debug=false
28209 ac_cs_recheck=false
28210 ac_cs_silent=false
28211
28212 SHELL=\${CONFIG_SHELL-$SHELL}
28213 export SHELL
28214 _ASEOF
28215 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28216 ## -------------------- ##
28217 ## M4sh Initialization. ##
28218 ## -------------------- ##
28219
28220 # Be more Bourne compatible
28221 DUALCASE=1; export DUALCASE # for MKS sh
28222 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
28223 emulate sh
28224 NULLCMD=:
28225 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28226 # is contrary to our usage. Disable this feature.
28227 alias -g '${1+"$@"}'='"$@"'
28228 setopt NO_GLOB_SUBST
28229 else
28230 case `(set -o) 2>/dev/null` in #(
28231 *posix*) :
28232 set -o posix ;; #(
28233 *) :
28234 ;;
28235 esac
28236 fi
28237
28238
28239 as_nl='
28240 '
28241 export as_nl
28242 # Printing a long string crashes Solaris 7 /usr/bin/printf.
28243 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
28244 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
28245 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
28246 # Prefer a ksh shell builtin over an external printf program on Solaris,
28247 # but without wasting forks for bash or zsh.
28248 if test -z "$BASH_VERSION$ZSH_VERSION" \
28249 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
28250 as_echo='print -r --'
28251 as_echo_n='print -rn --'
28252 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
28253 as_echo='printf %s\n'
28254 as_echo_n='printf %s'
28255 else
28256 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
28257 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
28258 as_echo_n='/usr/ucb/echo -n'
28259 else
28260 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
28261 as_echo_n_body='eval
28262 arg=$1;
28263 case $arg in #(
28264 *"$as_nl"*)
28265 expr "X$arg" : "X\\(.*\\)$as_nl";
28266 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
28267 esac;
28268 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
28269 '
28270 export as_echo_n_body
28271 as_echo_n='sh -c $as_echo_n_body as_echo'
28272 fi
28273 export as_echo_body
28274 as_echo='sh -c $as_echo_body as_echo'
28275 fi
28276
28277 # The user is always right.
28278 if test "${PATH_SEPARATOR+set}" != set; then
28279 PATH_SEPARATOR=:
28280 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
28281 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
28282 PATH_SEPARATOR=';'
28283 }
28284 fi
28285
28286
28287 # IFS
28288 # We need space, tab and new line, in precisely that order. Quoting is
28289 # there to prevent editors from complaining about space-tab.
28290 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
28291 # splitting by setting IFS to empty value.)
28292 IFS=" "" $as_nl"
28293
28294 # Find who we are. Look in the path if we contain no directory separator.
28295 case $0 in #((
28296 *[\\/]* ) as_myself=$0 ;;
28297 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28298 for as_dir in $PATH
28299 do
28300 IFS=$as_save_IFS
28301 test -z "$as_dir" && as_dir=.
28302 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28303 done
28304 IFS=$as_save_IFS
28305
28306 ;;
28307 esac
28308 # We did not find ourselves, most probably we were run as `sh COMMAND'
28309 # in which case we are not to be found in the path.
28310 if test "x$as_myself" = x; then
28311 as_myself=$0
28312 fi
28313 if test ! -f "$as_myself"; then
28314 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28315 exit 1
28316 fi
28317
28318 # Unset variables that we do not need and which cause bugs (e.g. in
28319 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
28320 # suppresses any "Segmentation fault" message there. '((' could
28321 # trigger a bug in pdksh 5.2.14.
28322 for as_var in BASH_ENV ENV MAIL MAILPATH
28323 do eval test x\${$as_var+set} = xset \
28324 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
28325 done
28326 PS1='$ '
28327 PS2='> '
28328 PS4='+ '
28329
28330 # NLS nuisances.
28331 LC_ALL=C
28332 export LC_ALL
28333 LANGUAGE=C
28334 export LANGUAGE
28335
28336 # CDPATH.
28337 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
28338
28339
28340 # as_fn_error ERROR [LINENO LOG_FD]
28341 # ---------------------------------
28342 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
28343 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
28344 # script with status $?, using 1 if that was 0.
28345 as_fn_error ()
28346 {
28347 as_status=$?; test $as_status -eq 0 && as_status=1
28348 if test "$3"; then
28349 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
28350 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
28351 fi
28352 $as_echo "$as_me: error: $1" >&2
28353 as_fn_exit $as_status
28354 } # as_fn_error
28355
28356
28357 # as_fn_set_status STATUS
28358 # -----------------------
28359 # Set $? to STATUS, without forking.
28360 as_fn_set_status ()
28361 {
28362 return $1
28363 } # as_fn_set_status
28364
28365 # as_fn_exit STATUS
28366 # -----------------
28367 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
28368 as_fn_exit ()
28369 {
28370 set +e
28371 as_fn_set_status $1
28372 exit $1
28373 } # as_fn_exit
28374
28375 # as_fn_unset VAR
28376 # ---------------
28377 # Portably unset VAR.
28378 as_fn_unset ()
28379 {
28380 { eval $1=; unset $1;}
28381 }
28382 as_unset=as_fn_unset
28383 # as_fn_append VAR VALUE
28384 # ----------------------
28385 # Append the text in VALUE to the end of the definition contained in VAR. Take
28386 # advantage of any shell optimizations that allow amortized linear growth over
28387 # repeated appends, instead of the typical quadratic growth present in naive
28388 # implementations.
28389 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
28390 eval 'as_fn_append ()
28391 {
28392 eval $1+=\$2
28393 }'
28394 else
28395 as_fn_append ()
28396 {
28397 eval $1=\$$1\$2
28398 }
28399 fi # as_fn_append
28400
28401 # as_fn_arith ARG...
28402 # ------------------
28403 # Perform arithmetic evaluation on the ARGs, and store the result in the
28404 # global $as_val. Take advantage of shells that can avoid forks. The arguments
28405 # must be portable across $(()) and expr.
28406 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
28407 eval 'as_fn_arith ()
28408 {
28409 as_val=$(( $* ))
28410 }'
28411 else
28412 as_fn_arith ()
28413 {
28414 as_val=`expr "$@" || test $? -eq 1`
28415 }
28416 fi # as_fn_arith
28417
28418
28419 if expr a : '\(a\)' >/dev/null 2>&1 &&
28420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28421 as_expr=expr
28422 else
28423 as_expr=false
28424 fi
28425
28426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28427 as_basename=basename
28428 else
28429 as_basename=false
28430 fi
28431
28432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28433 as_dirname=dirname
28434 else
28435 as_dirname=false
28436 fi
28437
28438 as_me=`$as_basename -- "$0" ||
28439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28440 X"$0" : 'X\(//\)$' \| \
28441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
28442 $as_echo X/"$0" |
28443 sed '/^.*\/\([^/][^/]*\)\/*$/{
28444 s//\1/
28445 q
28446 }
28447 /^X\/\(\/\/\)$/{
28448 s//\1/
28449 q
28450 }
28451 /^X\/\(\/\).*/{
28452 s//\1/
28453 q
28454 }
28455 s/.*/./; q'`
28456
28457 # Avoid depending upon Character Ranges.
28458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
28459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
28460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
28461 as_cr_digits='0123456789'
28462 as_cr_alnum=$as_cr_Letters$as_cr_digits
28463
28464 ECHO_C= ECHO_N= ECHO_T=
28465 case `echo -n x` in #(((((
28466 -n*)
28467 case `echo 'xy\c'` in
28468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28469 xy) ECHO_C='\c';;
28470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
28471 ECHO_T=' ';;
28472 esac;;
28473 *)
28474 ECHO_N='-n';;
28475 esac
28476
28477 rm -f conf$$ conf$$.exe conf$$.file
28478 if test -d conf$$.dir; then
28479 rm -f conf$$.dir/conf$$.file
28480 else
28481 rm -f conf$$.dir
28482 mkdir conf$$.dir 2>/dev/null
28483 fi
28484 if (echo >conf$$.file) 2>/dev/null; then
28485 if ln -s conf$$.file conf$$ 2>/dev/null; then
28486 as_ln_s='ln -s'
28487 # ... but there are two gotchas:
28488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28490 # In both cases, we have to default to `cp -p'.
28491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
28492 as_ln_s='cp -p'
28493 elif ln conf$$.file conf$$ 2>/dev/null; then
28494 as_ln_s=ln
28495 else
28496 as_ln_s='cp -p'
28497 fi
28498 else
28499 as_ln_s='cp -p'
28500 fi
28501 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28502 rmdir conf$$.dir 2>/dev/null
28503
28504
28505 # as_fn_mkdir_p
28506 # -------------
28507 # Create "$as_dir" as a directory, including parents if necessary.
28508 as_fn_mkdir_p ()
28509 {
28510
28511 case $as_dir in #(
28512 -*) as_dir=./$as_dir;;
28513 esac
28514 test -d "$as_dir" || eval $as_mkdir_p || {
28515 as_dirs=
28516 while :; do
28517 case $as_dir in #(
28518 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
28519 *) as_qdir=$as_dir;;
28520 esac
28521 as_dirs="'$as_qdir' $as_dirs"
28522 as_dir=`$as_dirname -- "$as_dir" ||
28523 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28524 X"$as_dir" : 'X\(//\)[^/]' \| \
28525 X"$as_dir" : 'X\(//\)$' \| \
28526 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
28527 $as_echo X"$as_dir" |
28528 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28529 s//\1/
28530 q
28531 }
28532 /^X\(\/\/\)[^/].*/{
28533 s//\1/
28534 q
28535 }
28536 /^X\(\/\/\)$/{
28537 s//\1/
28538 q
28539 }
28540 /^X\(\/\).*/{
28541 s//\1/
28542 q
28543 }
28544 s/.*/./; q'`
28545 test -d "$as_dir" && break
28546 done
28547 test -z "$as_dirs" || eval "mkdir $as_dirs"
28548 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
28549
28550
28551 } # as_fn_mkdir_p
28552 if mkdir -p . 2>/dev/null; then
28553 as_mkdir_p='mkdir -p "$as_dir"'
28554 else
28555 test -d ./-p && rmdir ./-p
28556 as_mkdir_p=false
28557 fi
28558
28559 if test -x / >/dev/null 2>&1; then
28560 as_test_x='test -x'
28561 else
28562 if ls -dL / >/dev/null 2>&1; then
28563 as_ls_L_option=L
28564 else
28565 as_ls_L_option=
28566 fi
28567 as_test_x='
28568 eval sh -c '\''
28569 if test -d "$1"; then
28570 test -d "$1/.";
28571 else
28572 case $1 in #(
28573 -*)set "./$1";;
28574 esac;
28575 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
28576 ???[sx]*):;;*)false;;esac;fi
28577 '\'' sh
28578 '
28579 fi
28580 as_executable_p=$as_test_x
28581
28582 # Sed expression to map a string onto a valid CPP name.
28583 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
28584
28585 # Sed expression to map a string onto a valid variable name.
28586 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
28587
28588
28589 exec 6>&1
28590 ## ----------------------------------- ##
28591 ## Main body of $CONFIG_STATUS script. ##
28592 ## ----------------------------------- ##
28593 _ASEOF
28594 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
28595
28596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28597 # Save the log message, to keep $0 and so on meaningful, and to
28598 # report actual input values of CONFIG_FILES etc. instead of their
28599 # values after options handling.
28600 ac_log="
28601 This file was extended by emacs $as_me 24.3.50, which was
28602 generated by GNU Autoconf 2.65. Invocation command line was
28603
28604 CONFIG_FILES = $CONFIG_FILES
28605 CONFIG_HEADERS = $CONFIG_HEADERS
28606 CONFIG_LINKS = $CONFIG_LINKS
28607 CONFIG_COMMANDS = $CONFIG_COMMANDS
28608 $ $0 $@
28609
28610 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28611 "
28612
28613 _ACEOF
28614
28615 case $ac_config_files in *"
28616 "*) set x $ac_config_files; shift; ac_config_files=$*;;
28617 esac
28618
28619 case $ac_config_headers in *"
28620 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
28621 esac
28622
28623
28624 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28625 # Files that config.status was made for.
28626 config_files="$ac_config_files"
28627 config_headers="$ac_config_headers"
28628 config_commands="$ac_config_commands"
28629
28630 _ACEOF
28631
28632 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28633 ac_cs_usage="\
28634 \`$as_me' instantiates files and other configuration actions
28635 from templates according to the current configuration. Unless the files
28636 and actions are specified as TAGs, all are instantiated by default.
28637
28638 Usage: $0 [OPTION]... [TAG]...
28639
28640 -h, --help print this help, then exit
28641 -V, --version print version number and configuration settings, then exit
28642 --config print configuration, then exit
28643 -q, --quiet, --silent
28644 do not print progress messages
28645 -d, --debug don't remove temporary files
28646 --recheck update $as_me by reconfiguring in the same conditions
28647 --file=FILE[:TEMPLATE]
28648 instantiate the configuration file FILE
28649 --header=FILE[:TEMPLATE]
28650 instantiate the configuration header FILE
28651
28652 Configuration files:
28653 $config_files
28654
28655 Configuration headers:
28656 $config_headers
28657
28658 Configuration commands:
28659 $config_commands
28660
28661 Report bugs to the package provider."
28662
28663 _ACEOF
28664 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28665 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
28666 ac_cs_version="\\
28667 emacs config.status 24.3.50
28668 configured by $0, generated by GNU Autoconf 2.65,
28669 with options \\"\$ac_cs_config\\"
28670
28671 Copyright (C) 2009 Free Software Foundation, Inc.
28672 This config.status script is free software; the Free Software Foundation
28673 gives unlimited permission to copy, distribute and modify it."
28674
28675 ac_pwd='$ac_pwd'
28676 srcdir='$srcdir'
28677 INSTALL='$INSTALL'
28678 MKDIR_P='$MKDIR_P'
28679 AWK='$AWK'
28680 test -n "\$AWK" || AWK=awk
28681 _ACEOF
28682
28683 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28684 # The default lists apply if the user does not specify any file.
28685 ac_need_defaults=:
28686 while test $# != 0
28687 do
28688 case $1 in
28689 --*=*)
28690 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28691 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
28692 ac_shift=:
28693 ;;
28694 *)
28695 ac_option=$1
28696 ac_optarg=$2
28697 ac_shift=shift
28698 ;;
28699 esac
28700
28701 case $ac_option in
28702 # Handling of the options.
28703 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28704 ac_cs_recheck=: ;;
28705 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
28706 $as_echo "$ac_cs_version"; exit ;;
28707 --config | --confi | --conf | --con | --co | --c )
28708 $as_echo "$ac_cs_config"; exit ;;
28709 --debug | --debu | --deb | --de | --d | -d )
28710 debug=: ;;
28711 --file | --fil | --fi | --f )
28712 $ac_shift
28713 case $ac_optarg in
28714 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28715 esac
28716 as_fn_append CONFIG_FILES " '$ac_optarg'"
28717 ac_need_defaults=false;;
28718 --header | --heade | --head | --hea )
28719 $ac_shift
28720 case $ac_optarg in
28721 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28722 esac
28723 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
28724 ac_need_defaults=false;;
28725 --he | --h)
28726 # Conflict between --help and --header
28727 as_fn_error "ambiguous option: \`$1'
28728 Try \`$0 --help' for more information.";;
28729 --help | --hel | -h )
28730 $as_echo "$ac_cs_usage"; exit ;;
28731 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28732 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28733 ac_cs_silent=: ;;
28734
28735 # This is an error.
28736 -*) as_fn_error "unrecognized option: \`$1'
28737 Try \`$0 --help' for more information." ;;
28738
28739 *) as_fn_append ac_config_targets " $1"
28740 ac_need_defaults=false ;;
28741
28742 esac
28743 shift
28744 done
28745
28746 ac_configure_extra_args=
28747
28748 if $ac_cs_silent; then
28749 exec 6>/dev/null
28750 ac_configure_extra_args="$ac_configure_extra_args --silent"
28751 fi
28752
28753 _ACEOF
28754 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28755 if \$ac_cs_recheck; then
28756 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
28757 shift
28758 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
28759 CONFIG_SHELL='$SHELL'
28760 export CONFIG_SHELL
28761 exec "\$@"
28762 fi
28763
28764 _ACEOF
28765 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28766 exec 5>>config.log
28767 {
28768 echo
28769 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28770 ## Running $as_me. ##
28771 _ASBOX
28772 $as_echo "$ac_log"
28773 } >&5
28774
28775 _ACEOF
28776 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28777 #
28778 # INIT-COMMANDS
28779 #
28780 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
28781 GCC="$GCC" CPPFLAGS="$CPPFLAGS"
28782
28783 _ACEOF
28784
28785 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28786
28787 # Handling of arguments.
28788 for ac_config_target in $ac_config_targets
28789 do
28790 case $ac_config_target in
28791 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
28792 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
28793 "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" ;;
28794 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
28795 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
28796 "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" ;;
28797 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28798 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
28799 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
28800 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
28801 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
28802 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
28803 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
28804 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
28805 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
28806 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
28807 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
28808 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
28809 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
28810 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
28811 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
28812 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
28813 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
28814 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
28815
28816 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
28817 esac
28818 done
28819
28820
28821 # If the user did not use the arguments to specify the items to instantiate,
28822 # then the envvar interface is used. Set only those that are not.
28823 # We use the long form for the default assignment because of an extremely
28824 # bizarre bug on SunOS 4.1.3.
28825 if $ac_need_defaults; then
28826 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28827 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28828 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28829 fi
28830
28831 # Have a temporary directory for convenience. Make it in the build tree
28832 # simply because there is no reason against having it here, and in addition,
28833 # creating and moving files from /tmp can sometimes cause problems.
28834 # Hook for its removal unless debugging.
28835 # Note that there is a small window in which the directory will not be cleaned:
28836 # after its creation but before its name has been assigned to `$tmp'.
28837 $debug ||
28838 {
28839 tmp=
28840 trap 'exit_status=$?
28841 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28842 ' 0
28843 trap 'as_fn_exit 1' 1 2 13 15
28844 }
28845 # Create a (secure) tmp directory for tmp files.
28846
28847 {
28848 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
28849 test -n "$tmp" && test -d "$tmp"
28850 } ||
28851 {
28852 tmp=./conf$$-$RANDOM
28853 (umask 077 && mkdir "$tmp")
28854 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
28855
28856 # Set up the scripts for CONFIG_FILES section.
28857 # No need to generate them if there are no CONFIG_FILES.
28858 # This happens for instance with `./config.status config.h'.
28859 if test -n "$CONFIG_FILES"; then
28860
28861 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
28862 ac_cs_awk_getline=:
28863 ac_cs_awk_pipe_init=
28864 ac_cs_awk_read_file='
28865 while ((getline aline < (F[key])) > 0)
28866 print(aline)
28867 close(F[key])'
28868 ac_cs_awk_pipe_fini=
28869 else
28870 ac_cs_awk_getline=false
28871 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
28872 ac_cs_awk_read_file='
28873 print "|#_!!_#|"
28874 print "cat " F[key] " &&"
28875 '$ac_cs_awk_pipe_init
28876 # The final `:' finishes the AND list.
28877 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
28878 fi
28879 ac_cr=`echo X | tr X '\015'`
28880 # On cygwin, bash can eat \r inside `` if the user requested igncr.
28881 # But we know of no other shell where ac_cr would be empty at this
28882 # point, so we can use a bashism as a fallback.
28883 if test "x$ac_cr" = x; then
28884 eval ac_cr=\$\'\\r\'
28885 fi
28886 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
28887 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
28888 ac_cs_awk_cr='\r'
28889 else
28890 ac_cs_awk_cr=$ac_cr
28891 fi
28892
28893 echo 'BEGIN {' >"$tmp/subs1.awk" &&
28894 _ACEOF
28895
28896 # Create commands to substitute file output variables.
28897 {
28898 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
28899 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
28900 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
28901 echo "_ACAWK" &&
28902 echo "_ACEOF"
28903 } >conf$$files.sh &&
28904 . ./conf$$files.sh ||
28905 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
28906 rm -f conf$$files.sh
28907
28908 {
28909 echo "cat >conf$$subs.awk <<_ACEOF" &&
28910 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
28911 echo "_ACEOF"
28912 } >conf$$subs.sh ||
28913 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
28914 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
28915 ac_delim='%!_!# '
28916 for ac_last_try in false false false false false :; do
28917 . ./conf$$subs.sh ||
28918 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
28919
28920 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
28921 if test $ac_delim_n = $ac_delim_num; then
28922 break
28923 elif $ac_last_try; then
28924 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
28925 else
28926 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28927 fi
28928 done
28929 rm -f conf$$subs.sh
28930
28931 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28932 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
28933 _ACEOF
28934 sed -n '
28935 h
28936 s/^/S["/; s/!.*/"]=/
28937 p
28938 g
28939 s/^[^!]*!//
28940 :repl
28941 t repl
28942 s/'"$ac_delim"'$//
28943 t delim
28944 :nl
28945 h
28946 s/\(.\{148\}\)..*/\1/
28947 t more1
28948 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
28949 p
28950 n
28951 b repl
28952 :more1
28953 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28954 p
28955 g
28956 s/.\{148\}//
28957 t nl
28958 :delim
28959 h
28960 s/\(.\{148\}\)..*/\1/
28961 t more2
28962 s/["\\]/\\&/g; s/^/"/; s/$/"/
28963 p
28964 b
28965 :more2
28966 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28967 p
28968 g
28969 s/.\{148\}//
28970 t delim
28971 ' <conf$$subs.awk | sed '
28972 /^[^""]/{
28973 N
28974 s/\n//
28975 }
28976 ' >>$CONFIG_STATUS || ac_write_fail=1
28977 rm -f conf$$subs.awk
28978 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28979 _ACAWK
28980 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
28981 for (key in S) S_is_set[key] = 1
28982 FS = "\a"
28983 \$ac_cs_awk_pipe_init
28984 }
28985 {
28986 line = $ 0
28987 nfields = split(line, field, "@")
28988 substed = 0
28989 len = length(field[1])
28990 for (i = 2; i < nfields; i++) {
28991 key = field[i]
28992 keylen = length(key)
28993 if (S_is_set[key]) {
28994 value = S[key]
28995 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
28996 len += length(value) + length(field[++i])
28997 substed = 1
28998 } else
28999 len += 1 + keylen
29000 }
29001 if (nfields == 3 && !substed) {
29002 key = field[2]
29003 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
29004 \$ac_cs_awk_read_file
29005 next
29006 }
29007 }
29008 print line
29009 }
29010 \$ac_cs_awk_pipe_fini
29011 _ACAWK
29012 _ACEOF
29013 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29014 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29015 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29016 else
29017 cat
29018 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
29019 || as_fn_error "could not setup config files machinery" "$LINENO" 5
29020 _ACEOF
29021
29022 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29023 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29024 # trailing colons and then remove the whole line if VPATH becomes empty
29025 # (actually we leave an empty line to preserve line numbers).
29026 if test "x$srcdir" = x.; then
29027 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29028 s/:*\$(srcdir):*/:/
29029 s/:*\${srcdir}:*/:/
29030 s/:*@srcdir@:*/:/
29031 s/^\([^=]*=[ ]*\):*/\1/
29032 s/:*$//
29033 s/^[^=]*=[ ]*$//
29034 }'
29035 fi
29036
29037 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29038 fi # test -n "$CONFIG_FILES"
29039
29040 # Set up the scripts for CONFIG_HEADERS section.
29041 # No need to generate them if there are no CONFIG_HEADERS.
29042 # This happens for instance with `./config.status Makefile'.
29043 if test -n "$CONFIG_HEADERS"; then
29044 cat >"$tmp/defines.awk" <<\_ACAWK ||
29045 BEGIN {
29046 _ACEOF
29047
29048 # Transform confdefs.h into an awk script `defines.awk', embedded as
29049 # here-document in config.status, that substitutes the proper values into
29050 # config.h.in to produce config.h.
29051
29052 # Create a delimiter string that does not exist in confdefs.h, to ease
29053 # handling of long lines.
29054 ac_delim='%!_!# '
29055 for ac_last_try in false false :; do
29056 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
29057 if test -z "$ac_t"; then
29058 break
29059 elif $ac_last_try; then
29060 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
29061 else
29062 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29063 fi
29064 done
29065
29066 # For the awk script, D is an array of macro values keyed by name,
29067 # likewise P contains macro parameters if any. Preserve backslash
29068 # newline sequences.
29069
29070 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29071 sed -n '
29072 s/.\{148\}/&'"$ac_delim"'/g
29073 t rset
29074 :rset
29075 s/^[ ]*#[ ]*define[ ][ ]*/ /
29076 t def
29077 d
29078 :def
29079 s/\\$//
29080 t bsnl
29081 s/["\\]/\\&/g
29082 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29083 D["\1"]=" \3"/p
29084 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29085 d
29086 :bsnl
29087 s/["\\]/\\&/g
29088 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29089 D["\1"]=" \3\\\\\\n"\\/p
29090 t cont
29091 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29092 t cont
29093 d
29094 :cont
29095 n
29096 s/.\{148\}/&'"$ac_delim"'/g
29097 t clear
29098 :clear
29099 s/\\$//
29100 t bsnlc
29101 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29102 d
29103 :bsnlc
29104 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29105 b cont
29106 ' <confdefs.h | sed '
29107 s/'"$ac_delim"'/"\\\
29108 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29109
29110 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29111 for (key in D) D_is_set[key] = 1
29112 FS = "\a"
29113 }
29114 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29115 line = \$ 0
29116 split(line, arg, " ")
29117 if (arg[1] == "#") {
29118 defundef = arg[2]
29119 mac1 = arg[3]
29120 } else {
29121 defundef = substr(arg[1], 2)
29122 mac1 = arg[2]
29123 }
29124 split(mac1, mac2, "(") #)
29125 macro = mac2[1]
29126 prefix = substr(line, 1, index(line, defundef) - 1)
29127 if (D_is_set[macro]) {
29128 # Preserve the white space surrounding the "#".
29129 print prefix "define", macro P[macro] D[macro]
29130 next
29131 } else {
29132 # Replace #undef with comments. This is necessary, for example,
29133 # in the case of _POSIX_SOURCE, which is predefined and required
29134 # on some systems where configure will not decide to define it.
29135 if (defundef == "undef") {
29136 print "/*", prefix defundef, macro, "*/"
29137 next
29138 }
29139 }
29140 }
29141 { print }
29142 _ACAWK
29143 _ACEOF
29144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29145 as_fn_error "could not setup config headers machinery" "$LINENO" 5
29146 fi # test -n "$CONFIG_HEADERS"
29147
29148
29149 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
29150 shift
29151 for ac_tag
29152 do
29153 case $ac_tag in
29154 :[FHLC]) ac_mode=$ac_tag; continue;;
29155 esac
29156 case $ac_mode$ac_tag in
29157 :[FHL]*:*);;
29158 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
29159 :[FH]-) ac_tag=-:-;;
29160 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29161 esac
29162 ac_save_IFS=$IFS
29163 IFS=:
29164 set x $ac_tag
29165 IFS=$ac_save_IFS
29166 shift
29167 ac_file=$1
29168 shift
29169
29170 case $ac_mode in
29171 :L) ac_source=$1;;
29172 :[FH])
29173 ac_file_inputs=
29174 for ac_f
29175 do
29176 case $ac_f in
29177 -) ac_f="$tmp/stdin";;
29178 *) # Look for the file first in the build tree, then in the source tree
29179 # (if the path is not absolute). The absolute path cannot be DOS-style,
29180 # because $ac_f cannot contain `:'.
29181 test -f "$ac_f" ||
29182 case $ac_f in
29183 [\\/$]*) false;;
29184 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29185 esac ||
29186 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29187 esac
29188 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29189 as_fn_append ac_file_inputs " '$ac_f'"
29190 done
29191
29192 # Let's still pretend it is `configure' which instantiates (i.e., don't
29193 # use $as_me), people would be surprised to read:
29194 # /* config.h. Generated by config.status. */
29195 configure_input='Generated from '`
29196 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29197 `' by configure.'
29198 if test x"$ac_file" != x-; then
29199 configure_input="$ac_file. $configure_input"
29200 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29201 $as_echo "$as_me: creating $ac_file" >&6;}
29202 fi
29203 # Neutralize special characters interpreted by sed in replacement strings.
29204 case $configure_input in #(
29205 *\&* | *\|* | *\\* )
29206 ac_sed_conf_input=`$as_echo "$configure_input" |
29207 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29208 *) ac_sed_conf_input=$configure_input;;
29209 esac
29210
29211 case $ac_tag in
29212 *:-:* | *:-) cat >"$tmp/stdin" \
29213 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
29214 esac
29215 ;;
29216 esac
29217
29218 ac_dir=`$as_dirname -- "$ac_file" ||
29219 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29220 X"$ac_file" : 'X\(//\)[^/]' \| \
29221 X"$ac_file" : 'X\(//\)$' \| \
29222 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29223 $as_echo X"$ac_file" |
29224 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29225 s//\1/
29226 q
29227 }
29228 /^X\(\/\/\)[^/].*/{
29229 s//\1/
29230 q
29231 }
29232 /^X\(\/\/\)$/{
29233 s//\1/
29234 q
29235 }
29236 /^X\(\/\).*/{
29237 s//\1/
29238 q
29239 }
29240 s/.*/./; q'`
29241 as_dir="$ac_dir"; as_fn_mkdir_p
29242 ac_builddir=.
29243
29244 case "$ac_dir" in
29245 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29246 *)
29247 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
29248 # A ".." for each directory in $ac_dir_suffix.
29249 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29250 case $ac_top_builddir_sub in
29251 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29252 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29253 esac ;;
29254 esac
29255 ac_abs_top_builddir=$ac_pwd
29256 ac_abs_builddir=$ac_pwd$ac_dir_suffix
29257 # for backward compatibility:
29258 ac_top_builddir=$ac_top_build_prefix
29259
29260 case $srcdir in
29261 .) # We are building in place.
29262 ac_srcdir=.
29263 ac_top_srcdir=$ac_top_builddir_sub
29264 ac_abs_top_srcdir=$ac_pwd ;;
29265 [\\/]* | ?:[\\/]* ) # Absolute name.
29266 ac_srcdir=$srcdir$ac_dir_suffix;
29267 ac_top_srcdir=$srcdir
29268 ac_abs_top_srcdir=$srcdir ;;
29269 *) # Relative name.
29270 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29271 ac_top_srcdir=$ac_top_build_prefix$srcdir
29272 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29273 esac
29274 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29275
29276
29277 case $ac_mode in
29278 :F)
29279 #
29280 # CONFIG_FILE
29281 #
29282
29283 case $INSTALL in
29284 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29285 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
29286 esac
29287 ac_MKDIR_P=$MKDIR_P
29288 case $MKDIR_P in
29289 [\\/$]* | ?:[\\/]* ) ;;
29290 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
29291 esac
29292 _ACEOF
29293
29294 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29295 # If the template does not know about datarootdir, expand it.
29296 # FIXME: This hack should be removed a few years after 2.60.
29297 ac_datarootdir_hack=; ac_datarootdir_seen=
29298 ac_sed_dataroot='
29299 /datarootdir/ {
29300 p
29301 q
29302 }
29303 /@datadir@/p
29304 /@docdir@/p
29305 /@infodir@/p
29306 /@localedir@/p
29307 /@mandir@/p'
29308 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
29309 *datarootdir*) ac_datarootdir_seen=yes;;
29310 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
29311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
29312 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
29313 _ACEOF
29314 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29315 ac_datarootdir_hack='
29316 s&@datadir@&$datadir&g
29317 s&@docdir@&$docdir&g
29318 s&@infodir@&$infodir&g
29319 s&@localedir@&$localedir&g
29320 s&@mandir@&$mandir&g
29321 s&\\\${datarootdir}&$datarootdir&g' ;;
29322 esac
29323 _ACEOF
29324
29325 # Neutralize VPATH when `$srcdir' = `.'.
29326 # Shell code in configure.ac might set extrasub.
29327 # FIXME: do we really want to maintain this feature?
29328 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29329 ac_sed_extra="$ac_vpsub
29330 $extrasub
29331 _ACEOF
29332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29333 :t
29334 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29335 s|@configure_input@|$ac_sed_conf_input|;t t
29336 s&@top_builddir@&$ac_top_builddir_sub&;t t
29337 s&@top_build_prefix@&$ac_top_build_prefix&;t t
29338 s&@srcdir@&$ac_srcdir&;t t
29339 s&@abs_srcdir@&$ac_abs_srcdir&;t t
29340 s&@top_srcdir@&$ac_top_srcdir&;t t
29341 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
29342 s&@builddir@&$ac_builddir&;t t
29343 s&@abs_builddir@&$ac_abs_builddir&;t t
29344 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
29345 s&@INSTALL@&$ac_INSTALL&;t t
29346 s&@MKDIR_P@&$ac_MKDIR_P&;t t
29347 $ac_datarootdir_hack
29348 "
29349 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
29350 if $ac_cs_awk_getline; then
29351 $AWK -f "$tmp/subs.awk"
29352 else
29353 $AWK -f "$tmp/subs.awk" | $SHELL
29354 fi >$tmp/out \
29355 || as_fn_error "could not create $ac_file" "$LINENO" 5
29356
29357 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
29358 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
29359 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
29360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29361 which seems to be undefined. Please make sure it is defined." >&5
29362 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29363 which seems to be undefined. Please make sure it is defined." >&2;}
29364
29365 rm -f "$tmp/stdin"
29366 case $ac_file in
29367 -) cat "$tmp/out" && rm -f "$tmp/out";;
29368 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
29369 esac \
29370 || as_fn_error "could not create $ac_file" "$LINENO" 5
29371 ;;
29372 :H)
29373 #
29374 # CONFIG_HEADER
29375 #
29376 if test x"$ac_file" != x-; then
29377 {
29378 $as_echo "/* $configure_input */" \
29379 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
29380 } >"$tmp/config.h" \
29381 || as_fn_error "could not create $ac_file" "$LINENO" 5
29382 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
29383 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
29384 $as_echo "$as_me: $ac_file is unchanged" >&6;}
29385 else
29386 rm -f "$ac_file"
29387 mv "$tmp/config.h" "$ac_file" \
29388 || as_fn_error "could not create $ac_file" "$LINENO" 5
29389 fi
29390 else
29391 $as_echo "/* $configure_input */" \
29392 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
29393 || as_fn_error "could not create -" "$LINENO" 5
29394 fi
29395 # Compute "$ac_file"'s index in $config_headers.
29396 _am_arg="$ac_file"
29397 _am_stamp_count=1
29398 for _am_header in $config_headers :; do
29399 case $_am_header in
29400 $_am_arg | $_am_arg:* )
29401 break ;;
29402 * )
29403 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
29404 esac
29405 done
29406 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
29407 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29408 X"$_am_arg" : 'X\(//\)[^/]' \| \
29409 X"$_am_arg" : 'X\(//\)$' \| \
29410 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
29411 $as_echo X"$_am_arg" |
29412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29413 s//\1/
29414 q
29415 }
29416 /^X\(\/\/\)[^/].*/{
29417 s//\1/
29418 q
29419 }
29420 /^X\(\/\/\)$/{
29421 s//\1/
29422 q
29423 }
29424 /^X\(\/\).*/{
29425 s//\1/
29426 q
29427 }
29428 s/.*/./; q'`/stamp-h$_am_stamp_count
29429 ;;
29430
29431 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
29432 $as_echo "$as_me: executing $ac_file commands" >&6;}
29433 ;;
29434 esac
29435
29436
29437 case $ac_file$ac_mode in
29438 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
29439 # Autoconf 2.62 quotes --file arguments for eval, but not when files
29440 # are listed without --file. Let's play safe and only enable the eval
29441 # if we detect the quoting.
29442 case $CONFIG_FILES in
29443 *\'*) eval set x "$CONFIG_FILES" ;;
29444 *) set x $CONFIG_FILES ;;
29445 esac
29446 shift
29447 for mf
29448 do
29449 # Strip MF so we end up with the name of the file.
29450 mf=`echo "$mf" | sed -e 's/:.*$//'`
29451 # Check whether this is an Automake generated Makefile or not.
29452 # We used to match only the files named `Makefile.in', but
29453 # some people rename them; so instead we look at the file content.
29454 # Grep'ing the first line is not enough: some people post-process
29455 # each Makefile.in and add a new line on top of each file to say so.
29456 # Grep'ing the whole file is not good either: AIX grep has a line
29457 # limit of 2048, but all sed's we know have understand at least 4000.
29458 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
29459 dirpart=`$as_dirname -- "$mf" ||
29460 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29461 X"$mf" : 'X\(//\)[^/]' \| \
29462 X"$mf" : 'X\(//\)$' \| \
29463 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
29464 $as_echo X"$mf" |
29465 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29466 s//\1/
29467 q
29468 }
29469 /^X\(\/\/\)[^/].*/{
29470 s//\1/
29471 q
29472 }
29473 /^X\(\/\/\)$/{
29474 s//\1/
29475 q
29476 }
29477 /^X\(\/\).*/{
29478 s//\1/
29479 q
29480 }
29481 s/.*/./; q'`
29482 else
29483 continue
29484 fi
29485 # Extract the definition of DEPDIR, am__include, and am__quote
29486 # from the Makefile without running `make'.
29487 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
29488 test -z "$DEPDIR" && continue
29489 am__include=`sed -n 's/^am__include = //p' < "$mf"`
29490 test -z "am__include" && continue
29491 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
29492 # When using ansi2knr, U may be empty or an underscore; expand it
29493 U=`sed -n 's/^U = //p' < "$mf"`
29494 # Find all dependency output files, they are included files with
29495 # $(DEPDIR) in their names. We invoke sed twice because it is the
29496 # simplest approach to changing $(DEPDIR) to its actual value in the
29497 # expansion.
29498 for file in `sed -n "
29499 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
29500 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
29501 # Make sure the directory exists.
29502 test -f "$dirpart/$file" && continue
29503 fdir=`$as_dirname -- "$file" ||
29504 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29505 X"$file" : 'X\(//\)[^/]' \| \
29506 X"$file" : 'X\(//\)$' \| \
29507 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
29508 $as_echo X"$file" |
29509 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29510 s//\1/
29511 q
29512 }
29513 /^X\(\/\/\)[^/].*/{
29514 s//\1/
29515 q
29516 }
29517 /^X\(\/\/\)$/{
29518 s//\1/
29519 q
29520 }
29521 /^X\(\/\).*/{
29522 s//\1/
29523 q
29524 }
29525 s/.*/./; q'`
29526 as_dir=$dirpart/$fdir; as_fn_mkdir_p
29527 # echo "creating $dirpart/$file"
29528 echo '# dummy' > "$dirpart/$file"
29529 done
29530 done
29531 }
29532 ;;
29533 "mkdirs":C)
29534 for dir in etc lisp ; do
29535 test -d ${dir} || mkdir ${dir}
29536 done
29537 ;;
29538 "epaths":C)
29539 echo creating src/epaths.h
29540 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
29541 ;;
29542 "gdbinit":C)
29543 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
29544 echo creating src/.gdbinit
29545 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
29546 fi
29547 ;;
29548
29549 esac
29550 done # for ac_tag
29551
29552
29553 as_fn_exit 0
29554 _ACEOF
29555 ac_clean_files=$ac_clean_files_save
29556
29557 test $ac_write_fail = 0 ||
29558 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
29559
29560
29561 # configure is writing to config.log, and then calls config.status.
29562 # config.status does its own redirection, appending to config.log.
29563 # Unfortunately, on DOS this fails, as config.log is still kept open
29564 # by configure, so config.status won't be able to write to it; its
29565 # output is simply discarded. So we exec the FD to /dev/null,
29566 # effectively closing config.log, so it can be properly (re)opened and
29567 # appended to by config.status. When coming back to configure, we
29568 # need to make the FD available again.
29569 if test "$no_create" != yes; then
29570 ac_cs_success=:
29571 ac_config_status_args=
29572 test "$silent" = yes &&
29573 ac_config_status_args="$ac_config_status_args --quiet"
29574 exec 5>/dev/null
29575 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
29576 exec 5>>config.log
29577 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29578 # would make configure fail if this is the last instruction.
29579 $ac_cs_success || as_fn_exit $?
29580 fi
29581 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
29582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
29583 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
29584 fi
29585