* lisp/bindings.el (ctl-x-r-map): Bind ?f to frameset-to-register.
[emacs.git] / autogen / configure
blob254664246153dd7a8b298ef6b8a8e4863959e088
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.
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.
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 ## -------------------- ##
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 *) :
32 esac
36 as_nl='
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"
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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 *) :
150 esac
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; }
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 :
166 else
167 exitcode=1; echo positional parameters were not saved.
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
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
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
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
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+"$@"}
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."
236 exit 1
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
246 ## --------------------- ##
247 ## M4sh Shell Functions. ##
248 ## --------------------- ##
249 # as_fn_unset VAR
250 # ---------------
251 # Portably unset VAR.
252 as_fn_unset ()
254 { eval $1=; unset $1;}
256 as_unset=as_fn_unset
258 # as_fn_set_status STATUS
259 # -----------------------
260 # Set $? to STATUS, without forking.
261 as_fn_set_status ()
263 return $1
264 } # as_fn_set_status
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 ()
271 set +e
272 as_fn_set_status $1
273 exit $1
274 } # as_fn_exit
276 # as_fn_mkdir_p
277 # -------------
278 # Create "$as_dir" as a directory, including parents if necessary.
279 as_fn_mkdir_p ()
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/
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
307 /^X\(\/\/\)$/{
308 s//\1/
311 /^X\(\/\).*/{
312 s//\1/
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"
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 ()
332 eval $1+=\$2
334 else
335 as_fn_append ()
337 eval $1=\$$1\$2
339 fi # as_fn_append
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 ()
349 as_val=$(( $* ))
351 else
352 as_fn_arith ()
354 as_val=`expr "$@" || test $? -eq 1`
356 fi # as_fn_arith
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 ()
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
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373 } # as_fn_error
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
382 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384 else
385 as_basename=false
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
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/
403 /^X\/\(\/\/\)$/{
404 s//\1/
407 /^X\/\(\/\).*/{
408 s//\1/
411 s/.*/./; q'`
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
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 '
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
434 :lineno
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; }
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
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;;
462 ECHO_N='-n';;
463 esac
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
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'
486 else
487 as_ln_s='cp -p'
489 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490 rmdir conf$$.dir 2>/dev/null
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
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=
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
520 as_executable_p=$as_test_x
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'"
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'"
529 test -n "$DJDIR" || exec 7<&0 </dev/null
530 exec 6>&1
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`
538 # Initializations.
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=
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=''
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"
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 EMACS_HEAPSIZE
609 TEMACS_POST_LINK
610 ADDSECTION
611 LD_SWITCH_SYSTEM_TEMACS
612 LIBGNU_LTLIBDEPS
613 LIBGNU_LIBDEPS
614 gltests_WITNESS
615 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
616 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
617 gl_GNULIB_ENABLED_tempname_FALSE
618 gl_GNULIB_ENABLED_tempname_TRUE
619 gl_GNULIB_ENABLED_strtoull_FALSE
620 gl_GNULIB_ENABLED_strtoull_TRUE
621 gl_GNULIB_ENABLED_strtoll_FALSE
622 gl_GNULIB_ENABLED_strtoll_TRUE
623 gl_GNULIB_ENABLED_stat_FALSE
624 gl_GNULIB_ENABLED_stat_TRUE
625 gl_GNULIB_ENABLED_secure_getenv_FALSE
626 gl_GNULIB_ENABLED_secure_getenv_TRUE
627 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
628 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
629 gl_GNULIB_ENABLED_pathmax_FALSE
630 gl_GNULIB_ENABLED_pathmax_TRUE
631 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
632 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
633 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
634 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
635 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
636 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
637 gl_GNULIB_ENABLED_getgroups_FALSE
638 gl_GNULIB_ENABLED_getgroups_TRUE
639 gl_GNULIB_ENABLED_getdtablesize_FALSE
640 gl_GNULIB_ENABLED_getdtablesize_TRUE
641 gl_GNULIB_ENABLED_euidaccess_FALSE
642 gl_GNULIB_ENABLED_euidaccess_TRUE
643 gl_GNULIB_ENABLED_dosname_FALSE
644 gl_GNULIB_ENABLED_dosname_TRUE
645 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
646 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
647 LTLIBINTL
648 LIBINTL
649 LIB_EACCESS
650 WINDOWS_64_BIT_OFF_T
651 HAVE_UNISTD_H
652 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
653 NEXT_UNISTD_H
654 LIB_TIMER_TIME
655 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
656 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
657 TIME_H_DEFINES_STRUCT_TIMESPEC
658 NEXT_AS_FIRST_DIRECTIVE_TIME_H
659 NEXT_TIME_H
660 WINDOWS_64_BIT_ST_SIZE
661 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
662 NEXT_SYS_STAT_H
663 NEXT_AS_FIRST_DIRECTIVE_STRING_H
664 NEXT_STRING_H
665 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
666 NEXT_STDLIB_H
667 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
668 NEXT_STDIO_H
669 REPLACE_VSPRINTF
670 REPLACE_VSNPRINTF
671 REPLACE_VPRINTF
672 REPLACE_VFPRINTF
673 REPLACE_VDPRINTF
674 REPLACE_VASPRINTF
675 REPLACE_TMPFILE
676 REPLACE_STDIO_WRITE_FUNCS
677 REPLACE_STDIO_READ_FUNCS
678 REPLACE_SPRINTF
679 REPLACE_SNPRINTF
680 REPLACE_RENAMEAT
681 REPLACE_RENAME
682 REPLACE_REMOVE
683 REPLACE_PRINTF
684 REPLACE_POPEN
685 REPLACE_PERROR
686 REPLACE_OBSTACK_PRINTF
687 REPLACE_GETLINE
688 REPLACE_GETDELIM
689 REPLACE_FTELLO
690 REPLACE_FTELL
691 REPLACE_FSEEKO
692 REPLACE_FSEEK
693 REPLACE_FREOPEN
694 REPLACE_FPURGE
695 REPLACE_FPRINTF
696 REPLACE_FOPEN
697 REPLACE_FFLUSH
698 REPLACE_FDOPEN
699 REPLACE_FCLOSE
700 REPLACE_DPRINTF
701 HAVE_VDPRINTF
702 HAVE_VASPRINTF
703 HAVE_RENAMEAT
704 HAVE_POPEN
705 HAVE_PCLOSE
706 HAVE_FTELLO
707 HAVE_FSEEKO
708 HAVE_DPRINTF
709 HAVE_DECL_VSNPRINTF
710 HAVE_DECL_SNPRINTF
711 HAVE_DECL_OBSTACK_PRINTF
712 HAVE_DECL_GETLINE
713 HAVE_DECL_GETDELIM
714 HAVE_DECL_FTELLO
715 HAVE_DECL_FSEEKO
716 HAVE_DECL_FPURGE
717 GNULIB_VSPRINTF_POSIX
718 GNULIB_VSNPRINTF
719 GNULIB_VPRINTF_POSIX
720 GNULIB_VPRINTF
721 GNULIB_VFPRINTF_POSIX
722 GNULIB_VFPRINTF
723 GNULIB_VDPRINTF
724 GNULIB_VSCANF
725 GNULIB_VFSCANF
726 GNULIB_VASPRINTF
727 GNULIB_TMPFILE
728 GNULIB_STDIO_H_SIGPIPE
729 GNULIB_STDIO_H_NONBLOCKING
730 GNULIB_SPRINTF_POSIX
731 GNULIB_SNPRINTF
732 GNULIB_SCANF
733 GNULIB_RENAMEAT
734 GNULIB_RENAME
735 GNULIB_REMOVE
736 GNULIB_PUTS
737 GNULIB_PUTCHAR
738 GNULIB_PUTC
739 GNULIB_PRINTF_POSIX
740 GNULIB_PRINTF
741 GNULIB_POPEN
742 GNULIB_PERROR
743 GNULIB_PCLOSE
744 GNULIB_OBSTACK_PRINTF_POSIX
745 GNULIB_OBSTACK_PRINTF
746 GNULIB_GETLINE
747 GNULIB_GETDELIM
748 GNULIB_GETCHAR
749 GNULIB_GETC
750 GNULIB_FWRITE
751 GNULIB_FTELLO
752 GNULIB_FTELL
753 GNULIB_FSEEKO
754 GNULIB_FSEEK
755 GNULIB_FSCANF
756 GNULIB_FREOPEN
757 GNULIB_FREAD
758 GNULIB_FPUTS
759 GNULIB_FPUTC
760 GNULIB_FPURGE
761 GNULIB_FPRINTF_POSIX
762 GNULIB_FPRINTF
763 GNULIB_FOPEN
764 GNULIB_FGETS
765 GNULIB_FGETC
766 GNULIB_FFLUSH
767 GNULIB_FDOPEN
768 GNULIB_FCLOSE
769 GNULIB_DPRINTF
770 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
771 NEXT_STDDEF_H
772 GL_GENERATE_STDDEF_H_FALSE
773 GL_GENERATE_STDDEF_H_TRUE
774 STDDEF_H
775 HAVE_WCHAR_T
776 REPLACE_NULL
777 HAVE__BOOL
778 GL_GENERATE_STDBOOL_H_FALSE
779 GL_GENERATE_STDBOOL_H_TRUE
780 STDBOOL_H
781 GL_GENERATE_STDARG_H_FALSE
782 GL_GENERATE_STDARG_H_TRUE
783 STDARG_H
784 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
785 NEXT_STDARG_H
786 GL_GENERATE_STDALIGN_H_FALSE
787 GL_GENERATE_STDALIGN_H_TRUE
788 STDALIGN_H
789 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
790 NEXT_SIGNAL_H
791 USE_ACL
792 LIB_ACL
793 LIB_PTHREAD_SIGMASK
794 REPLACE_RAISE
795 REPLACE_PTHREAD_SIGMASK
796 HAVE_SIGHANDLER_T
797 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
798 HAVE_STRUCT_SIGACTION_SA_SIGACTION
799 HAVE_SIGACTION
800 HAVE_SIGINFO_T
801 HAVE_SIGSET_T
802 HAVE_RAISE
803 HAVE_PTHREAD_SIGMASK
804 HAVE_POSIX_SIGNALBLOCKING
805 GNULIB_SIGACTION
806 GNULIB_SIGPROCMASK
807 GNULIB_SIGNAL_H_SIGPIPE
808 GNULIB_RAISE
809 GNULIB_PTHREAD_SIGMASK
810 HAVE_SYS_SELECT_H
811 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
812 NEXT_SYS_SELECT_H
813 REPLACE_SELECT
814 REPLACE_PSELECT
815 HAVE_PSELECT
816 GNULIB_SELECT
817 GNULIB_PSELECT
818 REPLACE_TIMEGM
819 REPLACE_NANOSLEEP
820 REPLACE_MKTIME
821 REPLACE_LOCALTIME_R
822 HAVE_TIMEGM
823 HAVE_STRPTIME
824 HAVE_NANOSLEEP
825 HAVE_DECL_LOCALTIME_R
826 GNULIB_TIME_R
827 GNULIB_TIMEGM
828 GNULIB_STRPTIME
829 GNULIB_NANOSLEEP
830 GNULIB_MKTIME
831 UNDEFINE_STRTOK_R
832 REPLACE_STRTOK_R
833 REPLACE_STRSIGNAL
834 REPLACE_STRNLEN
835 REPLACE_STRNDUP
836 REPLACE_STRNCAT
837 REPLACE_STRERROR_R
838 REPLACE_STRERROR
839 REPLACE_STRCHRNUL
840 REPLACE_STRCASESTR
841 REPLACE_STRSTR
842 REPLACE_STRDUP
843 REPLACE_STPNCPY
844 REPLACE_MEMMEM
845 REPLACE_MEMCHR
846 HAVE_STRVERSCMP
847 HAVE_DECL_STRSIGNAL
848 HAVE_DECL_STRERROR_R
849 HAVE_DECL_STRTOK_R
850 HAVE_STRCASESTR
851 HAVE_STRSEP
852 HAVE_STRPBRK
853 HAVE_DECL_STRNLEN
854 HAVE_DECL_STRNDUP
855 HAVE_DECL_STRDUP
856 HAVE_STRCHRNUL
857 HAVE_STPNCPY
858 HAVE_STPCPY
859 HAVE_RAWMEMCHR
860 HAVE_DECL_MEMRCHR
861 HAVE_MEMPCPY
862 HAVE_DECL_MEMMEM
863 HAVE_MEMCHR
864 HAVE_FFSLL
865 HAVE_FFSL
866 HAVE_MBSLEN
867 GNULIB_STRVERSCMP
868 GNULIB_STRSIGNAL
869 GNULIB_STRERROR_R
870 GNULIB_STRERROR
871 GNULIB_MBSTOK_R
872 GNULIB_MBSSEP
873 GNULIB_MBSSPN
874 GNULIB_MBSPBRK
875 GNULIB_MBSCSPN
876 GNULIB_MBSCASESTR
877 GNULIB_MBSPCASECMP
878 GNULIB_MBSNCASECMP
879 GNULIB_MBSCASECMP
880 GNULIB_MBSSTR
881 GNULIB_MBSRCHR
882 GNULIB_MBSCHR
883 GNULIB_MBSNLEN
884 GNULIB_MBSLEN
885 GNULIB_STRTOK_R
886 GNULIB_STRCASESTR
887 GNULIB_STRSTR
888 GNULIB_STRSEP
889 GNULIB_STRPBRK
890 GNULIB_STRNLEN
891 GNULIB_STRNDUP
892 GNULIB_STRNCAT
893 GNULIB_STRDUP
894 GNULIB_STRCHRNUL
895 GNULIB_STPNCPY
896 GNULIB_STPCPY
897 GNULIB_RAWMEMCHR
898 GNULIB_MEMRCHR
899 GNULIB_MEMPCPY
900 GNULIB_MEMMEM
901 GNULIB_MEMCHR
902 GNULIB_FFSLL
903 GNULIB_FFSL
904 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
905 NEXT_INTTYPES_H
906 UINT64_MAX_EQ_ULONG_MAX
907 UINT32_MAX_LT_UINTMAX_MAX
908 PRIPTR_PREFIX
909 PRI_MACROS_BROKEN
910 INT64_MAX_EQ_LONG_MAX
911 INT32_MAX_LT_INTMAX_MAX
912 REPLACE_STRTOIMAX
913 HAVE_DECL_STRTOUMAX
914 HAVE_DECL_STRTOIMAX
915 HAVE_DECL_IMAXDIV
916 HAVE_DECL_IMAXABS
917 GNULIB_STRTOUMAX
918 GNULIB_STRTOIMAX
919 GNULIB_IMAXDIV
920 GNULIB_IMAXABS
921 GL_GENERATE_STDINT_H_FALSE
922 GL_GENERATE_STDINT_H_TRUE
923 STDINT_H
924 WINT_T_SUFFIX
925 WCHAR_T_SUFFIX
926 SIG_ATOMIC_T_SUFFIX
927 SIZE_T_SUFFIX
928 PTRDIFF_T_SUFFIX
929 HAVE_SIGNED_WINT_T
930 HAVE_SIGNED_WCHAR_T
931 HAVE_SIGNED_SIG_ATOMIC_T
932 BITSIZEOF_WINT_T
933 BITSIZEOF_WCHAR_T
934 BITSIZEOF_SIG_ATOMIC_T
935 BITSIZEOF_SIZE_T
936 BITSIZEOF_PTRDIFF_T
937 APPLE_UNIVERSAL_BUILD
938 HAVE_SYS_BITYPES_H
939 HAVE_SYS_INTTYPES_H
940 HAVE_STDINT_H
941 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
942 NEXT_STDINT_H
943 HAVE_SYS_TYPES_H
944 HAVE_INTTYPES_H
945 HAVE_WCHAR_H
946 HAVE_UNSIGNED_LONG_LONG_INT
947 HAVE_LONG_LONG_INT
948 HAVE_WINSOCK2_H
949 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
950 NEXT_SYS_TIME_H
951 REPLACE_STRUCT_TIMEVAL
952 REPLACE_GETTIMEOFDAY
953 HAVE_SYS_TIME_H
954 HAVE_STRUCT_TIMEVAL
955 HAVE_GETTIMEOFDAY
956 GNULIB_GETTIMEOFDAY
957 GNULIB_GL_UNISTD_H_GETOPT
958 GETOPT_H
959 HAVE_GETOPT_H
960 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
961 NEXT_GETOPT_H
962 GETLOADAVG_LIBS
963 REPLACE_WCTOMB
964 REPLACE_UNSETENV
965 REPLACE_STRTOD
966 REPLACE_SETENV
967 REPLACE_REALPATH
968 REPLACE_REALLOC
969 REPLACE_RANDOM_R
970 REPLACE_PUTENV
971 REPLACE_PTSNAME_R
972 REPLACE_PTSNAME
973 REPLACE_MKSTEMP
974 REPLACE_MBTOWC
975 REPLACE_MALLOC
976 REPLACE_CANONICALIZE_FILE_NAME
977 REPLACE_CALLOC
978 HAVE_DECL_UNSETENV
979 HAVE_UNLOCKPT
980 HAVE_SYS_LOADAVG_H
981 HAVE_STRUCT_RANDOM_DATA
982 HAVE_STRTOULL
983 HAVE_STRTOLL
984 HAVE_STRTOD
985 HAVE_DECL_SETENV
986 HAVE_SETENV
987 HAVE_SECURE_GETENV
988 HAVE_RPMATCH
989 HAVE_REALPATH
990 HAVE_RANDOM_R
991 HAVE_RANDOM_H
992 HAVE_RANDOM
993 HAVE_PTSNAME_R
994 HAVE_PTSNAME
995 HAVE_POSIX_OPENPT
996 HAVE_MKSTEMPS
997 HAVE_MKSTEMP
998 HAVE_MKOSTEMPS
999 HAVE_MKOSTEMP
1000 HAVE_MKDTEMP
1001 HAVE_GRANTPT
1002 HAVE_GETSUBOPT
1003 HAVE_DECL_GETLOADAVG
1004 HAVE_CANONICALIZE_FILE_NAME
1005 HAVE_ATOLL
1006 HAVE__EXIT
1007 GNULIB_WCTOMB
1008 GNULIB_UNSETENV
1009 GNULIB_UNLOCKPT
1010 GNULIB_SYSTEM_POSIX
1011 GNULIB_STRTOULL
1012 GNULIB_STRTOLL
1013 GNULIB_STRTOD
1014 GNULIB_SETENV
1015 GNULIB_SECURE_GETENV
1016 GNULIB_RPMATCH
1017 GNULIB_REALPATH
1018 GNULIB_REALLOC_POSIX
1019 GNULIB_RANDOM_R
1020 GNULIB_RANDOM
1021 GNULIB_PUTENV
1022 GNULIB_PTSNAME_R
1023 GNULIB_PTSNAME
1024 GNULIB_POSIX_OPENPT
1025 GNULIB_MKSTEMPS
1026 GNULIB_MKSTEMP
1027 GNULIB_MKOSTEMPS
1028 GNULIB_MKOSTEMP
1029 GNULIB_MKDTEMP
1030 GNULIB_MBTOWC
1031 GNULIB_MALLOC_POSIX
1032 GNULIB_GRANTPT
1033 GNULIB_GETSUBOPT
1034 GNULIB_GETLOADAVG
1035 GNULIB_CANONICALIZE_FILE_NAME
1036 GNULIB_CALLOC_POSIX
1037 GNULIB_ATOLL
1038 GNULIB__EXIT
1039 REPLACE_UTIMENSAT
1040 REPLACE_STAT
1041 REPLACE_MKNOD
1042 REPLACE_MKFIFO
1043 REPLACE_MKDIR
1044 REPLACE_LSTAT
1045 REPLACE_FUTIMENS
1046 REPLACE_FSTATAT
1047 REPLACE_FSTAT
1048 HAVE_UTIMENSAT
1049 HAVE_MKNODAT
1050 HAVE_MKNOD
1051 HAVE_MKFIFOAT
1052 HAVE_MKFIFO
1053 HAVE_MKDIRAT
1054 HAVE_LSTAT
1055 HAVE_LCHMOD
1056 HAVE_FUTIMENS
1057 HAVE_FSTATAT
1058 HAVE_FCHMODAT
1059 GNULIB_UTIMENSAT
1060 GNULIB_STAT
1061 GNULIB_MKNODAT
1062 GNULIB_MKNOD
1063 GNULIB_MKFIFOAT
1064 GNULIB_MKFIFO
1065 GNULIB_MKDIRAT
1066 GNULIB_LSTAT
1067 GNULIB_LCHMOD
1068 GNULIB_FUTIMENS
1069 GNULIB_FSTATAT
1070 GNULIB_FSTAT
1071 GNULIB_FCHMODAT
1072 LIB_FDATASYNC
1073 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1074 NEXT_FCNTL_H
1075 REPLACE_OPENAT
1076 REPLACE_OPEN
1077 REPLACE_FCNTL
1078 HAVE_OPENAT
1079 HAVE_FCNTL
1080 GNULIB_OPENAT
1081 GNULIB_OPEN
1082 GNULIB_NONBLOCKING
1083 GNULIB_FCNTL
1084 GL_GENERATE_EXECINFO_H_FALSE
1085 GL_GENERATE_EXECINFO_H_TRUE
1086 LIB_EXECINFO
1087 EXECINFO_H
1088 EOVERFLOW_VALUE
1089 EOVERFLOW_HIDDEN
1090 ENOLINK_VALUE
1091 ENOLINK_HIDDEN
1092 EMULTIHOP_VALUE
1093 EMULTIHOP_HIDDEN
1094 GL_GENERATE_ERRNO_H_FALSE
1095 GL_GENERATE_ERRNO_H_TRUE
1096 ERRNO_H
1097 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1098 NEXT_ERRNO_H
1099 HAVE_DIRENT_H
1100 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1101 NEXT_DIRENT_H
1102 PRAGMA_COLUMNS
1103 PRAGMA_SYSTEM_HEADER
1104 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1105 INCLUDE_NEXT
1106 REPLACE_FDOPENDIR
1107 REPLACE_DIRFD
1108 REPLACE_CLOSEDIR
1109 REPLACE_OPENDIR
1110 HAVE_ALPHASORT
1111 HAVE_SCANDIR
1112 HAVE_FDOPENDIR
1113 HAVE_DECL_FDOPENDIR
1114 HAVE_DECL_DIRFD
1115 HAVE_CLOSEDIR
1116 HAVE_REWINDDIR
1117 HAVE_READDIR
1118 HAVE_OPENDIR
1119 GNULIB_ALPHASORT
1120 GNULIB_SCANDIR
1121 GNULIB_FDOPENDIR
1122 GNULIB_DIRFD
1123 GNULIB_CLOSEDIR
1124 GNULIB_REWINDDIR
1125 GNULIB_READDIR
1126 GNULIB_OPENDIR
1127 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1128 UNISTD_H_HAVE_WINSOCK2_H
1129 REPLACE_WRITE
1130 REPLACE_USLEEP
1131 REPLACE_UNLINKAT
1132 REPLACE_UNLINK
1133 REPLACE_TTYNAME_R
1134 REPLACE_SYMLINK
1135 REPLACE_SLEEP
1136 REPLACE_RMDIR
1137 REPLACE_READLINK
1138 REPLACE_READ
1139 REPLACE_PWRITE
1140 REPLACE_PREAD
1141 REPLACE_LSEEK
1142 REPLACE_LINKAT
1143 REPLACE_LINK
1144 REPLACE_LCHOWN
1145 REPLACE_ISATTY
1146 REPLACE_GETPAGESIZE
1147 REPLACE_GETGROUPS
1148 REPLACE_GETLOGIN_R
1149 REPLACE_GETDOMAINNAME
1150 REPLACE_GETCWD
1151 REPLACE_FTRUNCATE
1152 REPLACE_FCHOWNAT
1153 REPLACE_DUP2
1154 REPLACE_DUP
1155 REPLACE_CLOSE
1156 REPLACE_CHOWN
1157 HAVE_SYS_PARAM_H
1158 HAVE_OS_H
1159 HAVE_DECL_TTYNAME_R
1160 HAVE_DECL_SETHOSTNAME
1161 HAVE_DECL_GETUSERSHELL
1162 HAVE_DECL_GETPAGESIZE
1163 HAVE_DECL_GETLOGIN_R
1164 HAVE_DECL_GETDOMAINNAME
1165 HAVE_DECL_FDATASYNC
1166 HAVE_DECL_FCHDIR
1167 HAVE_DECL_ENVIRON
1168 HAVE_USLEEP
1169 HAVE_UNLINKAT
1170 HAVE_SYMLINKAT
1171 HAVE_SYMLINK
1172 HAVE_SLEEP
1173 HAVE_SETHOSTNAME
1174 HAVE_READLINKAT
1175 HAVE_READLINK
1176 HAVE_PWRITE
1177 HAVE_PREAD
1178 HAVE_PIPE2
1179 HAVE_PIPE
1180 HAVE_LINKAT
1181 HAVE_LINK
1182 HAVE_LCHOWN
1183 HAVE_GROUP_MEMBER
1184 HAVE_GETPAGESIZE
1185 HAVE_GETLOGIN
1186 HAVE_GETHOSTNAME
1187 HAVE_GETGROUPS
1188 HAVE_GETDTABLESIZE
1189 HAVE_FTRUNCATE
1190 HAVE_FSYNC
1191 HAVE_FDATASYNC
1192 HAVE_FCHOWNAT
1193 HAVE_FCHDIR
1194 HAVE_FACCESSAT
1195 HAVE_EUIDACCESS
1196 HAVE_DUP3
1197 HAVE_DUP2
1198 HAVE_CHOWN
1199 GNULIB_WRITE
1200 GNULIB_USLEEP
1201 GNULIB_UNLINKAT
1202 GNULIB_UNLINK
1203 GNULIB_UNISTD_H_SIGPIPE
1204 GNULIB_UNISTD_H_NONBLOCKING
1205 GNULIB_TTYNAME_R
1206 GNULIB_SYMLINKAT
1207 GNULIB_SYMLINK
1208 GNULIB_SLEEP
1209 GNULIB_SETHOSTNAME
1210 GNULIB_RMDIR
1211 GNULIB_READLINKAT
1212 GNULIB_READLINK
1213 GNULIB_READ
1214 GNULIB_PWRITE
1215 GNULIB_PREAD
1216 GNULIB_PIPE2
1217 GNULIB_PIPE
1218 GNULIB_LSEEK
1219 GNULIB_LINKAT
1220 GNULIB_LINK
1221 GNULIB_LCHOWN
1222 GNULIB_ISATTY
1223 GNULIB_GROUP_MEMBER
1224 GNULIB_GETUSERSHELL
1225 GNULIB_GETPAGESIZE
1226 GNULIB_GETLOGIN_R
1227 GNULIB_GETLOGIN
1228 GNULIB_GETHOSTNAME
1229 GNULIB_GETGROUPS
1230 GNULIB_GETDTABLESIZE
1231 GNULIB_GETDOMAINNAME
1232 GNULIB_GETCWD
1233 GNULIB_FTRUNCATE
1234 GNULIB_FSYNC
1235 GNULIB_FDATASYNC
1236 GNULIB_FCHOWNAT
1237 GNULIB_FCHDIR
1238 GNULIB_FACCESSAT
1239 GNULIB_EUIDACCESS
1240 GNULIB_ENVIRON
1241 GNULIB_DUP3
1242 GNULIB_DUP2
1243 GNULIB_DUP
1244 GNULIB_CLOSE
1245 GNULIB_CHOWN
1246 GNULIB_CHDIR
1247 LIB_CLOCK_GETTIME
1248 GL_GENERATE_ALLOCA_H_FALSE
1249 GL_GENERATE_ALLOCA_H_TRUE
1250 ALLOCA_H
1251 ALLOCA
1252 GL_COND_LIBTOOL_FALSE
1253 GL_COND_LIBTOOL_TRUE
1254 POST_ALLOC_OBJ
1255 PRE_ALLOC_OBJ
1256 CYGWIN_OBJ
1257 RALLOC_OBJ
1258 OLDXMENU_DEPS
1259 LIBX_OTHER
1260 LIBXMENU
1261 OLDXMENU
1262 OLDXMENU_TARGET
1263 LIBXT_OTHER
1264 TOOLKIT_LIBW
1265 WIDGET_OBJ
1266 XOBJ
1267 XMENU_OBJ
1268 FONT_OBJ
1269 OTHER_FILES
1270 GNU_OBJC_CFLAGS
1271 ns_appsrc
1272 ns_appresdir
1273 ns_appbindir
1274 ns_appdir
1275 X_TOOLKIT_TYPE
1276 GNUSTEP_CFLAGS
1277 C_SWITCH_X_SITE
1278 LD_SWITCH_X_SITE
1279 gameuser
1280 gamedir
1281 bitmapdir
1282 archlibdir
1283 etcdir
1284 x_default_search_path
1285 lisppath
1286 locallisppath
1287 standardlisppath
1288 leimdir
1289 lispdir
1290 srcdir
1291 canonical
1292 configuration
1293 version
1294 copyright
1295 XGSELOBJ
1296 KRB4LIB
1297 DESLIB
1298 KRB5LIB
1299 CRYPTOLIB
1300 COM_ERRLIB
1301 LIBRESOLV
1302 LIBHESIOD
1303 TERMCAP_OBJ
1304 LIBS_TERMCAP
1305 BLESSMAIL_TARGET
1306 LIBS_MAIL
1307 liblockfile
1308 LIBXML2_LIBS
1309 LIBXML2_CFLAGS
1310 XINERAMA_LIBS
1311 XINERAMA_CFLAGS
1312 XRANDR_LIBS
1313 XRANDR_CFLAGS
1314 LIBXSM
1315 LIBGPM
1316 LIBGIF
1317 LIBTIFF
1318 LIBPNG
1319 LIBJPEG
1320 LIBXPM
1321 M17N_FLT_LIBS
1322 M17N_FLT_CFLAGS
1323 LIBOTF_LIBS
1324 LIBOTF_CFLAGS
1325 FREETYPE_LIBS
1326 FREETYPE_CFLAGS
1327 XFT_LIBS
1328 XFT_CFLAGS
1329 FONTCONFIG_LIBS
1330 FONTCONFIG_CFLAGS
1331 LIBXMU
1332 LIBXTR6
1333 NOTIFY_OBJ
1334 GFILENOTIFY_LIBS
1335 GFILENOTIFY_CFLAGS
1336 LIBGNUTLS_LIBS
1337 LIBGNUTLS_CFLAGS
1338 LIBSELINUX_LIBS
1339 SETTINGS_LIBS
1340 SETTINGS_CFLAGS
1341 GOBJECT_LIBS
1342 GOBJECT_CFLAGS
1343 GCONF_LIBS
1344 GCONF_CFLAGS
1345 GSETTINGS_LIBS
1346 GSETTINGS_CFLAGS
1347 DBUS_OBJ
1348 DBUS_LIBS
1349 DBUS_CFLAGS
1350 GTK_OBJ
1351 GTK_LIBS
1352 GTK_CFLAGS
1353 IMAGEMAGICK_LIBS
1354 IMAGEMAGICK_CFLAGS
1355 RSVG_LIBS
1356 RSVG_CFLAGS
1357 LIB_PTHREAD
1358 VMLIMIT_OBJ
1359 GMALLOC_OBJ
1360 HAVE_XSERVER
1361 XARGS_LIMIT
1362 NTLIB
1363 LIB_WSOCK32
1364 LIBS_ECLIENT
1365 CM_OBJ
1366 NTDIR
1367 FIRSTFILE_OBJ
1368 W32_RES_LINK
1369 CLIENTW
1370 CLIENTRES
1371 EMACS_MANIFEST
1372 EMACSRES
1373 W32_LIBS
1374 W32_OBJ
1375 WINDRES
1376 NS_OBJC_OBJ
1377 NS_OBJ
1378 ns_self_contained
1379 INSTALL_ARCH_INDEP_EXTRA
1380 LIBS_GNUSTEP
1381 LD_SWITCH_X_SITE_RPATH
1382 XMKMF
1383 DEPFLAGS
1384 MKDEPDIR
1385 CFLAGS_SOUND
1386 ALSA_LIBS
1387 ALSA_CFLAGS
1388 LIBSOUND
1389 PKG_CONFIG
1390 LIB_MATH
1391 LIBS_SYSTEM
1392 C_SWITCH_SYSTEM
1393 UNEXEC_OBJ
1394 C_SWITCH_MACHINE
1395 LD_SWITCH_SYSTEM
1396 CANNOT_DUMP
1397 INFO_OPTS
1398 INFO_EXT
1399 HAVE_MAKEINFO
1400 PAXCTL
1401 GZIP_PROG
1402 INSTALL_INFO
1403 LN_S_FILEONLY
1404 GNULIB_WARN_CFLAGS
1405 WARN_CFLAGS
1406 WERROR_CFLAGS
1407 RANLIB
1408 ARFLAGS
1410 EGREP
1411 GREP
1413 BUILDING_FOR_WINDOWSNT_FALSE
1414 BUILDING_FOR_WINDOWSNT_TRUE
1415 am__fastdepCC_FALSE
1416 am__fastdepCC_TRUE
1417 CCDEPMODE
1418 AMDEPBACKSLASH
1419 AMDEP_FALSE
1420 AMDEP_TRUE
1421 am__quote
1422 am__include
1423 DEPDIR
1424 OBJEXT
1425 EXEEXT
1426 ac_ct_CC
1427 CPPFLAGS
1428 LDFLAGS
1429 CFLAGS
1431 host_os
1432 host_vendor
1433 host_cpu
1434 host
1435 build_os
1436 build_vendor
1437 build_cpu
1438 build
1439 PROFILING_CFLAGS
1440 GZIP_INFO
1441 cache_file
1442 am__untar
1443 am__tar
1444 AMTAR
1445 am__leading_dot
1446 SET_MAKE
1448 mkdir_p
1449 MKDIR_P
1450 INSTALL_STRIP_PROGRAM
1451 STRIP
1452 install_sh
1453 MAKEINFO
1454 AUTOHEADER
1455 AUTOMAKE
1456 AUTOCONF
1457 ACLOCAL
1458 VERSION
1459 PACKAGE
1460 CYGPATH_W
1461 am__isrc
1462 INSTALL_DATA
1463 INSTALL_SCRIPT
1464 INSTALL_PROGRAM
1465 target_alias
1466 host_alias
1467 build_alias
1468 LIBS
1469 ECHO_T
1470 ECHO_N
1471 ECHO_C
1472 DEFS
1473 mandir
1474 localedir
1475 libdir
1476 psdir
1477 pdfdir
1478 dvidir
1479 htmldir
1480 infodir
1481 docdir
1482 oldincludedir
1483 includedir
1484 localstatedir
1485 sharedstatedir
1486 sysconfdir
1487 datadir
1488 datarootdir
1489 libexecdir
1490 sbindir
1491 bindir
1492 program_transform_name
1493 prefix
1494 exec_prefix
1495 PACKAGE_URL
1496 PACKAGE_BUGREPORT
1497 PACKAGE_STRING
1498 PACKAGE_VERSION
1499 PACKAGE_TARNAME
1500 PACKAGE_NAME
1501 PATH_SEPARATOR
1502 SHELL'
1503 ac_subst_files='deps_frag
1504 lisp_frag'
1505 ac_user_opts='
1506 enable_option_checking
1507 with_all
1508 with_pop
1509 with_kerberos
1510 with_kerberos5
1511 with_hesiod
1512 with_mmdf
1513 with_mail_unlink
1514 with_mailhost
1515 with_sound
1516 with_x_toolkit
1517 with_wide_int
1518 with_xpm
1519 with_jpeg
1520 with_tiff
1521 with_gif
1522 with_png
1523 with_rsvg
1524 with_xml2
1525 with_imagemagick
1526 with_xft
1527 with_libotf
1528 with_m17n_flt
1529 with_toolkit_scroll_bars
1530 with_xaw3d
1531 with_xim
1532 with_ns
1533 with_w32
1534 with_gpm
1535 with_dbus
1536 with_gconf
1537 with_gsettings
1538 with_selinux
1539 with_gnutls
1540 with_file_notification
1541 with_makeinfo
1542 with_compress_info
1543 with_pkg_config_prog
1544 with_gameuser
1545 with_gnustep_conf
1546 enable_ns_self_contained
1547 enable_locallisppath
1548 enable_checking
1549 enable_check_lisp_object_type
1550 enable_profiling
1551 enable_autodepend
1552 enable_gtk_deprecation_warnings
1553 enable_dependency_tracking
1554 enable_largefile
1555 enable_gcc_warnings
1556 enable_link_time_optimization
1557 with_x
1558 enable_acl
1560 ac_precious_vars='build_alias
1561 host_alias
1562 target_alias
1564 CFLAGS
1565 LDFLAGS
1566 LIBS
1567 CPPFLAGS
1569 XMKMF'
1572 # Initialize some variables set by options.
1573 ac_init_help=
1574 ac_init_version=false
1575 ac_unrecognized_opts=
1576 ac_unrecognized_sep=
1577 # The variables have the same names as the options, with
1578 # dashes changed to underlines.
1579 cache_file=/dev/null
1580 exec_prefix=NONE
1581 no_create=
1582 no_recursion=
1583 prefix=NONE
1584 program_prefix=NONE
1585 program_suffix=NONE
1586 program_transform_name=s,x,x,
1587 silent=
1588 site=
1589 srcdir=
1590 verbose=
1591 x_includes=NONE
1592 x_libraries=NONE
1594 # Installation directory options.
1595 # These are left unexpanded so users can "make install exec_prefix=/foo"
1596 # and all the variables that are supposed to be based on exec_prefix
1597 # by default will actually change.
1598 # Use braces instead of parens because sh, perl, etc. also accept them.
1599 # (The list follows the same order as the GNU Coding Standards.)
1600 bindir='${exec_prefix}/bin'
1601 sbindir='${exec_prefix}/sbin'
1602 libexecdir='${exec_prefix}/libexec'
1603 datarootdir='${prefix}/share'
1604 datadir='${datarootdir}'
1605 sysconfdir='${prefix}/etc'
1606 sharedstatedir='${prefix}/com'
1607 localstatedir='${prefix}/var'
1608 includedir='${prefix}/include'
1609 oldincludedir='/usr/include'
1610 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1611 infodir='${datarootdir}/info'
1612 htmldir='${docdir}'
1613 dvidir='${docdir}'
1614 pdfdir='${docdir}'
1615 psdir='${docdir}'
1616 libdir='${exec_prefix}/lib'
1617 localedir='${datarootdir}/locale'
1618 mandir='${datarootdir}/man'
1620 ac_prev=
1621 ac_dashdash=
1622 for ac_option
1624 # If the previous option needs an argument, assign it.
1625 if test -n "$ac_prev"; then
1626 eval $ac_prev=\$ac_option
1627 ac_prev=
1628 continue
1631 case $ac_option in
1632 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1633 *) ac_optarg=yes ;;
1634 esac
1636 # Accept the important Cygnus configure options, so we can diagnose typos.
1638 case $ac_dashdash$ac_option in
1640 ac_dashdash=yes ;;
1642 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1643 ac_prev=bindir ;;
1644 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1645 bindir=$ac_optarg ;;
1647 -build | --build | --buil | --bui | --bu)
1648 ac_prev=build_alias ;;
1649 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1650 build_alias=$ac_optarg ;;
1652 -cache-file | --cache-file | --cache-fil | --cache-fi \
1653 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1654 ac_prev=cache_file ;;
1655 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1656 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1657 cache_file=$ac_optarg ;;
1659 --config-cache | -C)
1660 cache_file=config.cache ;;
1662 -datadir | --datadir | --datadi | --datad)
1663 ac_prev=datadir ;;
1664 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1665 datadir=$ac_optarg ;;
1667 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1668 | --dataroo | --dataro | --datar)
1669 ac_prev=datarootdir ;;
1670 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1671 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1672 datarootdir=$ac_optarg ;;
1674 -disable-* | --disable-*)
1675 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1676 # Reject names that are not valid shell variable names.
1677 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1678 as_fn_error "invalid feature name: $ac_useropt"
1679 ac_useropt_orig=$ac_useropt
1680 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1681 case $ac_user_opts in
1683 "enable_$ac_useropt"
1684 "*) ;;
1685 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1686 ac_unrecognized_sep=', ';;
1687 esac
1688 eval enable_$ac_useropt=no ;;
1690 -docdir | --docdir | --docdi | --doc | --do)
1691 ac_prev=docdir ;;
1692 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1693 docdir=$ac_optarg ;;
1695 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1696 ac_prev=dvidir ;;
1697 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1698 dvidir=$ac_optarg ;;
1700 -enable-* | --enable-*)
1701 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1702 # Reject names that are not valid shell variable names.
1703 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704 as_fn_error "invalid feature name: $ac_useropt"
1705 ac_useropt_orig=$ac_useropt
1706 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707 case $ac_user_opts in
1709 "enable_$ac_useropt"
1710 "*) ;;
1711 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1712 ac_unrecognized_sep=', ';;
1713 esac
1714 eval enable_$ac_useropt=\$ac_optarg ;;
1716 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1717 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1718 | --exec | --exe | --ex)
1719 ac_prev=exec_prefix ;;
1720 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1721 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1722 | --exec=* | --exe=* | --ex=*)
1723 exec_prefix=$ac_optarg ;;
1725 -gas | --gas | --ga | --g)
1726 # Obsolete; use --with-gas.
1727 with_gas=yes ;;
1729 -help | --help | --hel | --he | -h)
1730 ac_init_help=long ;;
1731 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1732 ac_init_help=recursive ;;
1733 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1734 ac_init_help=short ;;
1736 -host | --host | --hos | --ho)
1737 ac_prev=host_alias ;;
1738 -host=* | --host=* | --hos=* | --ho=*)
1739 host_alias=$ac_optarg ;;
1741 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1742 ac_prev=htmldir ;;
1743 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1744 | --ht=*)
1745 htmldir=$ac_optarg ;;
1747 -includedir | --includedir | --includedi | --included | --include \
1748 | --includ | --inclu | --incl | --inc)
1749 ac_prev=includedir ;;
1750 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1751 | --includ=* | --inclu=* | --incl=* | --inc=*)
1752 includedir=$ac_optarg ;;
1754 -infodir | --infodir | --infodi | --infod | --info | --inf)
1755 ac_prev=infodir ;;
1756 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1757 infodir=$ac_optarg ;;
1759 -libdir | --libdir | --libdi | --libd)
1760 ac_prev=libdir ;;
1761 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1762 libdir=$ac_optarg ;;
1764 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1765 | --libexe | --libex | --libe)
1766 ac_prev=libexecdir ;;
1767 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1768 | --libexe=* | --libex=* | --libe=*)
1769 libexecdir=$ac_optarg ;;
1771 -localedir | --localedir | --localedi | --localed | --locale)
1772 ac_prev=localedir ;;
1773 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1774 localedir=$ac_optarg ;;
1776 -localstatedir | --localstatedir | --localstatedi | --localstated \
1777 | --localstate | --localstat | --localsta | --localst | --locals)
1778 ac_prev=localstatedir ;;
1779 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1780 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1781 localstatedir=$ac_optarg ;;
1783 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1784 ac_prev=mandir ;;
1785 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1786 mandir=$ac_optarg ;;
1788 -nfp | --nfp | --nf)
1789 # Obsolete; use --without-fp.
1790 with_fp=no ;;
1792 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1793 | --no-cr | --no-c | -n)
1794 no_create=yes ;;
1796 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1797 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1798 no_recursion=yes ;;
1800 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1801 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1802 | --oldin | --oldi | --old | --ol | --o)
1803 ac_prev=oldincludedir ;;
1804 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1805 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1806 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1807 oldincludedir=$ac_optarg ;;
1809 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1810 ac_prev=prefix ;;
1811 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1812 prefix=$ac_optarg ;;
1814 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1815 | --program-pre | --program-pr | --program-p)
1816 ac_prev=program_prefix ;;
1817 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1818 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1819 program_prefix=$ac_optarg ;;
1821 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1822 | --program-suf | --program-su | --program-s)
1823 ac_prev=program_suffix ;;
1824 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1825 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1826 program_suffix=$ac_optarg ;;
1828 -program-transform-name | --program-transform-name \
1829 | --program-transform-nam | --program-transform-na \
1830 | --program-transform-n | --program-transform- \
1831 | --program-transform | --program-transfor \
1832 | --program-transfo | --program-transf \
1833 | --program-trans | --program-tran \
1834 | --progr-tra | --program-tr | --program-t)
1835 ac_prev=program_transform_name ;;
1836 -program-transform-name=* | --program-transform-name=* \
1837 | --program-transform-nam=* | --program-transform-na=* \
1838 | --program-transform-n=* | --program-transform-=* \
1839 | --program-transform=* | --program-transfor=* \
1840 | --program-transfo=* | --program-transf=* \
1841 | --program-trans=* | --program-tran=* \
1842 | --progr-tra=* | --program-tr=* | --program-t=*)
1843 program_transform_name=$ac_optarg ;;
1845 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1846 ac_prev=pdfdir ;;
1847 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1848 pdfdir=$ac_optarg ;;
1850 -psdir | --psdir | --psdi | --psd | --ps)
1851 ac_prev=psdir ;;
1852 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1853 psdir=$ac_optarg ;;
1855 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1856 | -silent | --silent | --silen | --sile | --sil)
1857 silent=yes ;;
1859 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1860 ac_prev=sbindir ;;
1861 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1862 | --sbi=* | --sb=*)
1863 sbindir=$ac_optarg ;;
1865 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1866 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1867 | --sharedst | --shareds | --shared | --share | --shar \
1868 | --sha | --sh)
1869 ac_prev=sharedstatedir ;;
1870 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1871 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1872 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1873 | --sha=* | --sh=*)
1874 sharedstatedir=$ac_optarg ;;
1876 -site | --site | --sit)
1877 ac_prev=site ;;
1878 -site=* | --site=* | --sit=*)
1879 site=$ac_optarg ;;
1881 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1882 ac_prev=srcdir ;;
1883 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1884 srcdir=$ac_optarg ;;
1886 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1887 | --syscon | --sysco | --sysc | --sys | --sy)
1888 ac_prev=sysconfdir ;;
1889 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1890 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1891 sysconfdir=$ac_optarg ;;
1893 -target | --target | --targe | --targ | --tar | --ta | --t)
1894 ac_prev=target_alias ;;
1895 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1896 target_alias=$ac_optarg ;;
1898 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1899 verbose=yes ;;
1901 -version | --version | --versio | --versi | --vers | -V)
1902 ac_init_version=: ;;
1904 -with-* | --with-*)
1905 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1906 # Reject names that are not valid shell variable names.
1907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1908 as_fn_error "invalid package name: $ac_useropt"
1909 ac_useropt_orig=$ac_useropt
1910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1911 case $ac_user_opts in
1913 "with_$ac_useropt"
1914 "*) ;;
1915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1916 ac_unrecognized_sep=', ';;
1917 esac
1918 eval with_$ac_useropt=\$ac_optarg ;;
1920 -without-* | --without-*)
1921 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1922 # Reject names that are not valid shell variable names.
1923 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1924 as_fn_error "invalid package name: $ac_useropt"
1925 ac_useropt_orig=$ac_useropt
1926 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1927 case $ac_user_opts in
1929 "with_$ac_useropt"
1930 "*) ;;
1931 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1932 ac_unrecognized_sep=', ';;
1933 esac
1934 eval with_$ac_useropt=no ;;
1936 --x)
1937 # Obsolete; use --with-x.
1938 with_x=yes ;;
1940 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1941 | --x-incl | --x-inc | --x-in | --x-i)
1942 ac_prev=x_includes ;;
1943 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1944 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1945 x_includes=$ac_optarg ;;
1947 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1948 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1949 ac_prev=x_libraries ;;
1950 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1951 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1952 x_libraries=$ac_optarg ;;
1954 -*) as_fn_error "unrecognized option: \`$ac_option'
1955 Try \`$0 --help' for more information."
1958 *=*)
1959 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1960 # Reject names that are not valid shell variable names.
1961 case $ac_envvar in #(
1962 '' | [0-9]* | *[!_$as_cr_alnum]* )
1963 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1964 esac
1965 eval $ac_envvar=\$ac_optarg
1966 export $ac_envvar ;;
1969 # FIXME: should be removed in autoconf 3.0.
1970 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1971 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1972 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1973 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1976 esac
1977 done
1979 if test -n "$ac_prev"; then
1980 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1981 as_fn_error "missing argument to $ac_option"
1984 if test -n "$ac_unrecognized_opts"; then
1985 case $enable_option_checking in
1986 no) ;;
1987 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1988 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1989 esac
1992 # Check all directory arguments for consistency.
1993 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1994 datadir sysconfdir sharedstatedir localstatedir includedir \
1995 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1996 libdir localedir mandir
1998 eval ac_val=\$$ac_var
1999 # Remove trailing slashes.
2000 case $ac_val in
2001 */ )
2002 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2003 eval $ac_var=\$ac_val;;
2004 esac
2005 # Be sure to have absolute directory names.
2006 case $ac_val in
2007 [\\/$]* | ?:[\\/]* ) continue;;
2008 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2009 esac
2010 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2011 done
2013 # There might be people who depend on the old broken behavior: `$host'
2014 # used to hold the argument of --host etc.
2015 # FIXME: To remove some day.
2016 build=$build_alias
2017 host=$host_alias
2018 target=$target_alias
2020 # FIXME: To remove some day.
2021 if test "x$host_alias" != x; then
2022 if test "x$build_alias" = x; then
2023 cross_compiling=maybe
2024 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2025 If a cross compiler is detected then cross compile mode will be used." >&2
2026 elif test "x$build_alias" != "x$host_alias"; then
2027 cross_compiling=yes
2031 ac_tool_prefix=
2032 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2034 test "$silent" = yes && exec 6>/dev/null
2037 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2038 ac_ls_di=`ls -di .` &&
2039 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2040 as_fn_error "working directory cannot be determined"
2041 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2042 as_fn_error "pwd does not report name of working directory"
2045 # Find the source files, if location was not specified.
2046 if test -z "$srcdir"; then
2047 ac_srcdir_defaulted=yes
2048 # Try the directory containing this script, then the parent directory.
2049 ac_confdir=`$as_dirname -- "$as_myself" ||
2050 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2051 X"$as_myself" : 'X\(//\)[^/]' \| \
2052 X"$as_myself" : 'X\(//\)$' \| \
2053 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2054 $as_echo X"$as_myself" |
2055 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2056 s//\1/
2059 /^X\(\/\/\)[^/].*/{
2060 s//\1/
2063 /^X\(\/\/\)$/{
2064 s//\1/
2067 /^X\(\/\).*/{
2068 s//\1/
2071 s/.*/./; q'`
2072 srcdir=$ac_confdir
2073 if test ! -r "$srcdir/$ac_unique_file"; then
2074 srcdir=..
2076 else
2077 ac_srcdir_defaulted=no
2079 if test ! -r "$srcdir/$ac_unique_file"; then
2080 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2081 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2083 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2084 ac_abs_confdir=`(
2085 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2086 pwd)`
2087 # When building in place, set srcdir=.
2088 if test "$ac_abs_confdir" = "$ac_pwd"; then
2089 srcdir=.
2091 # Remove unnecessary trailing slashes from srcdir.
2092 # Double slashes in file names in object file debugging info
2093 # mess up M-x gdb in Emacs.
2094 case $srcdir in
2095 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2096 esac
2097 for ac_var in $ac_precious_vars; do
2098 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2099 eval ac_env_${ac_var}_value=\$${ac_var}
2100 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2101 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2102 done
2105 # Report the --help message.
2107 if test "$ac_init_help" = "long"; then
2108 # Omit some internal or obsolete options to make the list less imposing.
2109 # This message is too long to be a string in the A/UX 3.1 sh.
2110 cat <<_ACEOF
2111 \`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
2113 Usage: $0 [OPTION]... [VAR=VALUE]...
2115 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2116 VAR=VALUE. See below for descriptions of some of the useful variables.
2118 Defaults for the options are specified in brackets.
2120 Configuration:
2121 -h, --help display this help and exit
2122 --help=short display options specific to this package
2123 --help=recursive display the short help of all the included packages
2124 -V, --version display version information and exit
2125 -q, --quiet, --silent do not print \`checking...' messages
2126 --cache-file=FILE cache test results in FILE [disabled]
2127 -C, --config-cache alias for \`--cache-file=config.cache'
2128 -n, --no-create do not create output files
2129 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2131 Installation directories:
2132 --prefix=PREFIX install architecture-independent files in PREFIX
2133 [$ac_default_prefix]
2134 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2135 [PREFIX]
2137 By default, \`make install' will install all the files in
2138 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2139 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2140 for instance \`--prefix=\$HOME'.
2142 For better control, use the options below.
2144 Fine tuning of the installation directories:
2145 --bindir=DIR user executables [EPREFIX/bin]
2146 --sbindir=DIR system admin executables [EPREFIX/sbin]
2147 --libexecdir=DIR program executables [EPREFIX/libexec]
2148 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2149 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2150 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2151 --libdir=DIR object code libraries [EPREFIX/lib]
2152 --includedir=DIR C header files [PREFIX/include]
2153 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2154 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2155 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2156 --infodir=DIR info documentation [DATAROOTDIR/info]
2157 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2158 --mandir=DIR man documentation [DATAROOTDIR/man]
2159 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2160 --htmldir=DIR html documentation [DOCDIR]
2161 --dvidir=DIR dvi documentation [DOCDIR]
2162 --pdfdir=DIR pdf documentation [DOCDIR]
2163 --psdir=DIR ps documentation [DOCDIR]
2164 _ACEOF
2166 cat <<\_ACEOF
2168 Program names:
2169 --program-prefix=PREFIX prepend PREFIX to installed program names
2170 --program-suffix=SUFFIX append SUFFIX to installed program names
2171 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2173 X features:
2174 --x-includes=DIR X include files are in DIR
2175 --x-libraries=DIR X library files are in DIR
2177 System types:
2178 --build=BUILD configure for building on BUILD [guessed]
2179 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2180 _ACEOF
2183 if test -n "$ac_init_help"; then
2184 case $ac_init_help in
2185 short | recursive ) echo "Configuration of emacs 24.3.50:";;
2186 esac
2187 cat <<\_ACEOF
2189 Optional Features:
2190 --disable-option-checking ignore unrecognized --enable/--with options
2191 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2192 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2193 --disable-ns-self-contained
2194 disable self contained build under NeXTstep
2195 --enable-locallisppath=PATH
2196 directories Emacs should search for lisp files
2197 specific to this site
2198 --enable-checking[=LIST]
2199 enable expensive run-time checks. With LIST, enable
2200 only specific categories of checks. Categories are:
2201 all,yes,no. Flags are: stringbytes, stringoverrun,
2202 stringfreelist, xmallocoverrun, conslist, glyphs
2203 --enable-check-lisp-object-type
2204 enable compile time checks for the Lisp_Object data
2205 type. This is useful for development for catching
2206 certain types of bugs.
2207 --enable-profiling build emacs with low-level, gprof profiling support.
2208 Mainly useful for debugging Emacs itself. May not
2209 work on all platforms. Stops profiler.el working.
2210 --enable-autodepend automatically generate dependencies to .h-files.
2211 Requires GNU Make and Gcc. Enabled if GNU Make and
2212 Gcc is found
2213 --enable-gtk-deprecation-warnings
2214 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
2215 --disable-dependency-tracking speeds up one-time build
2216 --enable-dependency-tracking do not reject slow dependency extractors
2217 --disable-largefile omit support for large files
2218 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2219 intended for developers, and may generate false
2220 alarms when used with older or non-GNU development
2221 tools.
2222 --enable-link-time-optimization
2223 build emacs with link-time optimization. This is
2224 supported only for GCC since 4.5.0.
2225 --disable-acl do not support ACLs
2227 Optional Packages:
2228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2230 --without-all omit almost all features and build small executable
2231 with minimal dependencies
2232 --without-pop don't support POP mail retrieval with movemail
2233 --with-kerberos support Kerberos-authenticated POP
2234 --with-kerberos5 support Kerberos version 5 authenticated POP
2235 --with-hesiod support Hesiod to get the POP server host
2236 --with-mmdf support MMDF mailboxes
2237 --with-mail-unlink unlink, rather than empty, mail spool after reading
2238 --with-mailhost=HOSTNAME
2239 string giving default POP mail host
2240 --with-sound=VALUE compile with sound support (VALUE one of: yes,
2241 ossaudio, alsa, no; default yes). Only for
2242 GNU/Linux, FreeBSD, NetBSD, MinGW.
2243 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2244 gtk3, lucid or athena, motif, no)
2245 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2246 --without-xpm don't compile with XPM image support
2247 --without-jpeg don't compile with JPEG image support
2248 --without-tiff don't compile with TIFF image support
2249 --without-gif don't compile with GIF image support
2250 --without-png don't compile with PNG image support
2251 --without-rsvg don't compile with SVG image support
2252 --without-xml2 don't compile with XML parsing support
2253 --without-imagemagick don't compile with ImageMagick image support
2254 --without-xft don't use XFT for anti aliased fonts
2255 --without-libotf don't use libotf for OpenType font support
2256 --without-m17n-flt don't use m17n-flt for text shaping
2257 --without-toolkit-scroll-bars
2258 don't use Motif or Xaw3d scroll bars
2259 --without-xaw3d don't use Xaw3d
2260 --without-xim don't use X11 XIM
2261 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2262 --with-w32 use native MS Windows GUI in a Cygwin build
2263 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2264 console
2265 --without-dbus don't compile with D-Bus support
2266 --without-gconf don't compile with GConf support
2267 --without-gsettings don't compile with GSettings support
2268 --without-selinux don't compile with SELinux support
2269 --without-gnutls don't use -lgnutls for SSL/TLS support
2270 --with-file-notification=LIB
2271 use a file notification library (LIB one of: yes,
2272 gfile, inotify, w32, no)
2273 --without-makeinfo don't require makeinfo for building manuals
2274 --without-compress-info don't compress the installed Info pages
2275 --with-pkg-config-prog=FILENAME
2276 file name of pkg-config for finding GTK and librsvg
2277 --with-gameuser=USER user for shared game score files
2278 --with-gnustep-conf=FILENAME
2279 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2280 or /etc/GNUstep/GNUstep.conf
2281 --with-x use the X Window System
2283 Some influential environment variables:
2284 CC C compiler command
2285 CFLAGS C compiler flags
2286 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2287 nonstandard directory <lib dir>
2288 LIBS libraries to pass to the linker, e.g. -l<library>
2289 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2290 you have headers in a nonstandard directory <include dir>
2291 CPP C preprocessor
2292 XMKMF Path to xmkmf, Makefile generator for X Window System
2294 Use these variables to override the choices made by `configure' or to help
2295 it to find libraries and programs with nonstandard names/locations.
2297 Report bugs to the package provider.
2298 _ACEOF
2299 ac_status=$?
2302 if test "$ac_init_help" = "recursive"; then
2303 # If there are subdirs, report their specific --help.
2304 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2305 test -d "$ac_dir" ||
2306 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2307 continue
2308 ac_builddir=.
2310 case "$ac_dir" in
2311 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2313 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2314 # A ".." for each directory in $ac_dir_suffix.
2315 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2316 case $ac_top_builddir_sub in
2317 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2319 esac ;;
2320 esac
2321 ac_abs_top_builddir=$ac_pwd
2322 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2323 # for backward compatibility:
2324 ac_top_builddir=$ac_top_build_prefix
2326 case $srcdir in
2327 .) # We are building in place.
2328 ac_srcdir=.
2329 ac_top_srcdir=$ac_top_builddir_sub
2330 ac_abs_top_srcdir=$ac_pwd ;;
2331 [\\/]* | ?:[\\/]* ) # Absolute name.
2332 ac_srcdir=$srcdir$ac_dir_suffix;
2333 ac_top_srcdir=$srcdir
2334 ac_abs_top_srcdir=$srcdir ;;
2335 *) # Relative name.
2336 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2337 ac_top_srcdir=$ac_top_build_prefix$srcdir
2338 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2339 esac
2340 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2342 cd "$ac_dir" || { ac_status=$?; continue; }
2343 # Check for guested configure.
2344 if test -f "$ac_srcdir/configure.gnu"; then
2345 echo &&
2346 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2347 elif test -f "$ac_srcdir/configure"; then
2348 echo &&
2349 $SHELL "$ac_srcdir/configure" --help=recursive
2350 else
2351 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2352 fi || ac_status=$?
2353 cd "$ac_pwd" || { ac_status=$?; break; }
2354 done
2357 test -n "$ac_init_help" && exit $ac_status
2358 if $ac_init_version; then
2359 cat <<\_ACEOF
2360 emacs configure 24.3.50
2361 generated by GNU Autoconf 2.65
2363 Copyright (C) 2009 Free Software Foundation, Inc.
2364 This configure script is free software; the Free Software Foundation
2365 gives unlimited permission to copy, distribute and modify it.
2366 _ACEOF
2367 exit
2370 ## ------------------------ ##
2371 ## Autoconf initialization. ##
2372 ## ------------------------ ##
2374 # ac_fn_c_try_compile LINENO
2375 # --------------------------
2376 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2377 ac_fn_c_try_compile ()
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 rm -f conftest.$ac_objext
2381 if { { ac_try="$ac_compile"
2382 case "(($ac_try" in
2383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2384 *) ac_try_echo=$ac_try;;
2385 esac
2386 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2387 $as_echo "$ac_try_echo"; } >&5
2388 (eval "$ac_compile") 2>conftest.err
2389 ac_status=$?
2390 if test -s conftest.err; then
2391 grep -v '^ *+' conftest.err >conftest.er1
2392 cat conftest.er1 >&5
2393 mv -f conftest.er1 conftest.err
2395 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2396 test $ac_status = 0; } && {
2397 test -z "$ac_c_werror_flag" ||
2398 test ! -s conftest.err
2399 } && test -s conftest.$ac_objext; then :
2400 ac_retval=0
2401 else
2402 $as_echo "$as_me: failed program was:" >&5
2403 sed 's/^/| /' conftest.$ac_ext >&5
2405 ac_retval=1
2407 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2408 as_fn_set_status $ac_retval
2410 } # ac_fn_c_try_compile
2412 # ac_fn_c_try_cpp LINENO
2413 # ----------------------
2414 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2415 ac_fn_c_try_cpp ()
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418 if { { ac_try="$ac_cpp conftest.$ac_ext"
2419 case "(($ac_try" in
2420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2421 *) ac_try_echo=$ac_try;;
2422 esac
2423 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2424 $as_echo "$ac_try_echo"; } >&5
2425 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2426 ac_status=$?
2427 if test -s conftest.err; then
2428 grep -v '^ *+' conftest.err >conftest.er1
2429 cat conftest.er1 >&5
2430 mv -f conftest.er1 conftest.err
2432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2433 test $ac_status = 0; } >/dev/null && {
2434 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2435 test ! -s conftest.err
2436 }; then :
2437 ac_retval=0
2438 else
2439 $as_echo "$as_me: failed program was:" >&5
2440 sed 's/^/| /' conftest.$ac_ext >&5
2442 ac_retval=1
2444 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2445 as_fn_set_status $ac_retval
2447 } # ac_fn_c_try_cpp
2449 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2450 # -------------------------------------------------------
2451 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2452 # the include files in INCLUDES and setting the cache variable VAR
2453 # accordingly.
2454 ac_fn_c_check_header_mongrel ()
2456 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2459 $as_echo_n "checking for $2... " >&6; }
2460 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2461 $as_echo_n "(cached) " >&6
2463 eval ac_res=\$$3
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2465 $as_echo "$ac_res" >&6; }
2466 else
2467 # Is the header compilable?
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2469 $as_echo_n "checking $2 usability... " >&6; }
2470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2471 /* end confdefs.h. */
2473 #include <$2>
2474 _ACEOF
2475 if ac_fn_c_try_compile "$LINENO"; then :
2476 ac_header_compiler=yes
2477 else
2478 ac_header_compiler=no
2480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2482 $as_echo "$ac_header_compiler" >&6; }
2484 # Is the header present?
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2486 $as_echo_n "checking $2 presence... " >&6; }
2487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2488 /* end confdefs.h. */
2489 #include <$2>
2490 _ACEOF
2491 if ac_fn_c_try_cpp "$LINENO"; then :
2492 ac_header_preproc=yes
2493 else
2494 ac_header_preproc=no
2496 rm -f conftest.err conftest.$ac_ext
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2498 $as_echo "$ac_header_preproc" >&6; }
2500 # So? What about this header?
2501 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2502 yes:no: )
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2504 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2506 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2508 no:yes:* )
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2510 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2512 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2514 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2516 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2518 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2520 esac
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2522 $as_echo_n "checking for $2... " >&6; }
2523 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2524 $as_echo_n "(cached) " >&6
2525 else
2526 eval "$3=\$ac_header_compiler"
2528 eval ac_res=\$$3
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2530 $as_echo "$ac_res" >&6; }
2532 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2534 } # ac_fn_c_check_header_mongrel
2536 # ac_fn_c_try_run LINENO
2537 # ----------------------
2538 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2539 # that executables *can* be run.
2540 ac_fn_c_try_run ()
2542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543 if { { ac_try="$ac_link"
2544 case "(($ac_try" in
2545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546 *) ac_try_echo=$ac_try;;
2547 esac
2548 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549 $as_echo "$ac_try_echo"; } >&5
2550 (eval "$ac_link") 2>&5
2551 ac_status=$?
2552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2554 { { case "(($ac_try" in
2555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2556 *) ac_try_echo=$ac_try;;
2557 esac
2558 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2559 $as_echo "$ac_try_echo"; } >&5
2560 (eval "$ac_try") 2>&5
2561 ac_status=$?
2562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563 test $ac_status = 0; }; }; then :
2564 ac_retval=0
2565 else
2566 $as_echo "$as_me: program exited with status $ac_status" >&5
2567 $as_echo "$as_me: failed program was:" >&5
2568 sed 's/^/| /' conftest.$ac_ext >&5
2570 ac_retval=$ac_status
2572 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2573 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2574 as_fn_set_status $ac_retval
2576 } # ac_fn_c_try_run
2578 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2579 # -------------------------------------------------------
2580 # Tests whether HEADER exists and can be compiled using the include files in
2581 # INCLUDES, setting the cache variable VAR accordingly.
2582 ac_fn_c_check_header_compile ()
2584 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586 $as_echo_n "checking for $2... " >&6; }
2587 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2588 $as_echo_n "(cached) " >&6
2589 else
2590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591 /* end confdefs.h. */
2593 #include <$2>
2594 _ACEOF
2595 if ac_fn_c_try_compile "$LINENO"; then :
2596 eval "$3=yes"
2597 else
2598 eval "$3=no"
2600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602 eval ac_res=\$$3
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2604 $as_echo "$ac_res" >&6; }
2605 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2607 } # ac_fn_c_check_header_compile
2609 # ac_fn_c_try_link LINENO
2610 # -----------------------
2611 # Try to link conftest.$ac_ext, and return whether this succeeded.
2612 ac_fn_c_try_link ()
2614 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2615 rm -f conftest.$ac_objext conftest$ac_exeext
2616 if { { ac_try="$ac_link"
2617 case "(($ac_try" in
2618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2619 *) ac_try_echo=$ac_try;;
2620 esac
2621 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2622 $as_echo "$ac_try_echo"; } >&5
2623 (eval "$ac_link") 2>conftest.err
2624 ac_status=$?
2625 if test -s conftest.err; then
2626 grep -v '^ *+' conftest.err >conftest.er1
2627 cat conftest.er1 >&5
2628 mv -f conftest.er1 conftest.err
2630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2631 test $ac_status = 0; } && {
2632 test -z "$ac_c_werror_flag" ||
2633 test ! -s conftest.err
2634 } && test -s conftest$ac_exeext && {
2635 test "$cross_compiling" = yes ||
2636 $as_test_x conftest$ac_exeext
2637 }; then :
2638 ac_retval=0
2639 else
2640 $as_echo "$as_me: failed program was:" >&5
2641 sed 's/^/| /' conftest.$ac_ext >&5
2643 ac_retval=1
2645 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2646 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2647 # interfere with the next link command; also delete a directory that is
2648 # left behind by Apple's compiler. We do this before executing the actions.
2649 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2650 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2651 as_fn_set_status $ac_retval
2653 } # ac_fn_c_try_link
2655 # ac_fn_c_check_decl LINENO SYMBOL VAR
2656 # ------------------------------------
2657 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2658 ac_fn_c_check_decl ()
2660 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2662 $as_echo_n "checking whether $2 is declared... " >&6; }
2663 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2664 $as_echo_n "(cached) " >&6
2665 else
2666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2667 /* end confdefs.h. */
2670 main ()
2672 #ifndef $2
2673 (void) $2;
2674 #endif
2677 return 0;
2679 _ACEOF
2680 if ac_fn_c_try_compile "$LINENO"; then :
2681 eval "$3=yes"
2682 else
2683 eval "$3=no"
2685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687 eval ac_res=\$$3
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2689 $as_echo "$ac_res" >&6; }
2690 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2692 } # ac_fn_c_check_decl
2694 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2695 # ----------------------------------------------
2696 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2697 ac_fn_c_check_header_preproc ()
2699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2701 $as_echo_n "checking for $2... " >&6; }
2702 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2703 $as_echo_n "(cached) " >&6
2704 else
2705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2706 /* end confdefs.h. */
2707 #include <$2>
2708 _ACEOF
2709 if ac_fn_c_try_cpp "$LINENO"; then :
2710 eval "$3=yes"
2711 else
2712 eval "$3=no"
2714 rm -f conftest.err conftest.$ac_ext
2716 eval ac_res=\$$3
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2718 $as_echo "$ac_res" >&6; }
2719 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2721 } # ac_fn_c_check_header_preproc
2723 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2724 # ----------------------------------------------------
2725 # Tries to find if the field MEMBER exists in type AGGR, after including
2726 # INCLUDES, setting cache variable VAR accordingly.
2727 ac_fn_c_check_member ()
2729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2731 $as_echo_n "checking for $2.$3... " >&6; }
2732 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2733 $as_echo_n "(cached) " >&6
2734 else
2735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736 /* end confdefs.h. */
2739 main ()
2741 static $2 ac_aggr;
2742 if (ac_aggr.$3)
2743 return 0;
2745 return 0;
2747 _ACEOF
2748 if ac_fn_c_try_compile "$LINENO"; then :
2749 eval "$4=yes"
2750 else
2751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752 /* end confdefs.h. */
2755 main ()
2757 static $2 ac_aggr;
2758 if (sizeof ac_aggr.$3)
2759 return 0;
2761 return 0;
2763 _ACEOF
2764 if ac_fn_c_try_compile "$LINENO"; then :
2765 eval "$4=yes"
2766 else
2767 eval "$4=no"
2769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2773 eval ac_res=\$$4
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2775 $as_echo "$ac_res" >&6; }
2776 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2778 } # ac_fn_c_check_member
2780 # ac_fn_c_check_func LINENO FUNC VAR
2781 # ----------------------------------
2782 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2783 ac_fn_c_check_func ()
2785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787 $as_echo_n "checking for $2... " >&6; }
2788 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2789 $as_echo_n "(cached) " >&6
2790 else
2791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2792 /* end confdefs.h. */
2793 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2794 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2795 #define $2 innocuous_$2
2797 /* System header to define __stub macros and hopefully few prototypes,
2798 which can conflict with char $2 (); below.
2799 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2800 <limits.h> exists even on freestanding compilers. */
2802 #ifdef __STDC__
2803 # include <limits.h>
2804 #else
2805 # include <assert.h>
2806 #endif
2808 #undef $2
2810 /* Override any GCC internal prototype to avoid an error.
2811 Use char because int might match the return type of a GCC
2812 builtin and then its argument prototype would still apply. */
2813 #ifdef __cplusplus
2814 extern "C"
2815 #endif
2816 char $2 ();
2817 /* The GNU C library defines this for functions which it implements
2818 to always fail with ENOSYS. Some functions are actually named
2819 something starting with __ and the normal name is an alias. */
2820 #if defined __stub_$2 || defined __stub___$2
2821 choke me
2822 #endif
2825 main ()
2827 return $2 ();
2829 return 0;
2831 _ACEOF
2832 if ac_fn_c_try_link "$LINENO"; then :
2833 eval "$3=yes"
2834 else
2835 eval "$3=no"
2837 rm -f core conftest.err conftest.$ac_objext \
2838 conftest$ac_exeext conftest.$ac_ext
2840 eval ac_res=\$$3
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842 $as_echo "$ac_res" >&6; }
2843 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2845 } # ac_fn_c_check_func
2847 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2848 # -------------------------------------------
2849 # Tests whether TYPE exists after having included INCLUDES, setting cache
2850 # variable VAR accordingly.
2851 ac_fn_c_check_type ()
2853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855 $as_echo_n "checking for $2... " >&6; }
2856 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2857 $as_echo_n "(cached) " >&6
2858 else
2859 eval "$3=no"
2860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861 /* end confdefs.h. */
2864 main ()
2866 if (sizeof ($2))
2867 return 0;
2869 return 0;
2871 _ACEOF
2872 if ac_fn_c_try_compile "$LINENO"; then :
2873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874 /* end confdefs.h. */
2877 main ()
2879 if (sizeof (($2)))
2880 return 0;
2882 return 0;
2884 _ACEOF
2885 if ac_fn_c_try_compile "$LINENO"; then :
2887 else
2888 eval "$3=yes"
2890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2894 eval ac_res=\$$3
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2896 $as_echo "$ac_res" >&6; }
2897 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2899 } # ac_fn_c_check_type
2901 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2902 # --------------------------------------------
2903 # Tries to find the compile-time value of EXPR in a program that includes
2904 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2905 # computed
2906 ac_fn_c_compute_int ()
2908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2909 if test "$cross_compiling" = yes; then
2910 # Depending upon the size, compute the lo and hi bounds.
2911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2912 /* end confdefs.h. */
2915 main ()
2917 static int test_array [1 - 2 * !(($2) >= 0)];
2918 test_array [0] = 0
2921 return 0;
2923 _ACEOF
2924 if ac_fn_c_try_compile "$LINENO"; then :
2925 ac_lo=0 ac_mid=0
2926 while :; do
2927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2928 /* end confdefs.h. */
2931 main ()
2933 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2934 test_array [0] = 0
2937 return 0;
2939 _ACEOF
2940 if ac_fn_c_try_compile "$LINENO"; then :
2941 ac_hi=$ac_mid; break
2942 else
2943 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2944 if test $ac_lo -le $ac_mid; then
2945 ac_lo= ac_hi=
2946 break
2948 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951 done
2952 else
2953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2954 /* end confdefs.h. */
2957 main ()
2959 static int test_array [1 - 2 * !(($2) < 0)];
2960 test_array [0] = 0
2963 return 0;
2965 _ACEOF
2966 if ac_fn_c_try_compile "$LINENO"; then :
2967 ac_hi=-1 ac_mid=-1
2968 while :; do
2969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2970 /* end confdefs.h. */
2973 main ()
2975 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2976 test_array [0] = 0
2979 return 0;
2981 _ACEOF
2982 if ac_fn_c_try_compile "$LINENO"; then :
2983 ac_lo=$ac_mid; break
2984 else
2985 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2986 if test $ac_mid -le $ac_hi; then
2987 ac_lo= ac_hi=
2988 break
2990 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2993 done
2994 else
2995 ac_lo= ac_hi=
2997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000 # Binary search between lo and hi bounds.
3001 while test "x$ac_lo" != "x$ac_hi"; do
3002 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3004 /* end confdefs.h. */
3007 main ()
3009 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3010 test_array [0] = 0
3013 return 0;
3015 _ACEOF
3016 if ac_fn_c_try_compile "$LINENO"; then :
3017 ac_hi=$ac_mid
3018 else
3019 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3022 done
3023 case $ac_lo in #((
3024 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3025 '') ac_retval=1 ;;
3026 esac
3027 else
3028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3029 /* end confdefs.h. */
3031 static long int longval () { return $2; }
3032 static unsigned long int ulongval () { return $2; }
3033 #include <stdio.h>
3034 #include <stdlib.h>
3036 main ()
3039 FILE *f = fopen ("conftest.val", "w");
3040 if (! f)
3041 return 1;
3042 if (($2) < 0)
3044 long int i = longval ();
3045 if (i != ($2))
3046 return 1;
3047 fprintf (f, "%ld", i);
3049 else
3051 unsigned long int i = ulongval ();
3052 if (i != ($2))
3053 return 1;
3054 fprintf (f, "%lu", i);
3056 /* Do not output a trailing newline, as this causes \r\n confusion
3057 on some platforms. */
3058 return ferror (f) || fclose (f) != 0;
3061 return 0;
3063 _ACEOF
3064 if ac_fn_c_try_run "$LINENO"; then :
3065 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3066 else
3067 ac_retval=1
3069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3070 conftest.$ac_objext conftest.beam conftest.$ac_ext
3071 rm -f conftest.val
3074 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3075 as_fn_set_status $ac_retval
3077 } # ac_fn_c_compute_int
3078 cat >config.log <<_ACEOF
3079 This file contains any messages produced by compilers while
3080 running configure, to aid debugging if configure makes a mistake.
3082 It was created by emacs $as_me 24.3.50, which was
3083 generated by GNU Autoconf 2.65. Invocation command line was
3085 $ $0 $@
3087 _ACEOF
3088 exec 5>>config.log
3090 cat <<_ASUNAME
3091 ## --------- ##
3092 ## Platform. ##
3093 ## --------- ##
3095 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3096 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3097 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3098 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3099 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3101 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3102 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3104 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3105 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3106 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3107 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3108 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3109 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3110 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3112 _ASUNAME
3114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3115 for as_dir in $PATH
3117 IFS=$as_save_IFS
3118 test -z "$as_dir" && as_dir=.
3119 $as_echo "PATH: $as_dir"
3120 done
3121 IFS=$as_save_IFS
3123 } >&5
3125 cat >&5 <<_ACEOF
3128 ## ----------- ##
3129 ## Core tests. ##
3130 ## ----------- ##
3132 _ACEOF
3135 # Keep a trace of the command line.
3136 # Strip out --no-create and --no-recursion so they do not pile up.
3137 # Strip out --silent because we don't want to record it for future runs.
3138 # Also quote any args containing shell meta-characters.
3139 # Make two passes to allow for proper duplicate-argument suppression.
3140 ac_configure_args=
3141 ac_configure_args0=
3142 ac_configure_args1=
3143 ac_must_keep_next=false
3144 for ac_pass in 1 2
3146 for ac_arg
3148 case $ac_arg in
3149 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3151 | -silent | --silent | --silen | --sile | --sil)
3152 continue ;;
3153 *\'*)
3154 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3155 esac
3156 case $ac_pass in
3157 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3159 as_fn_append ac_configure_args1 " '$ac_arg'"
3160 if test $ac_must_keep_next = true; then
3161 ac_must_keep_next=false # Got value, back to normal.
3162 else
3163 case $ac_arg in
3164 *=* | --config-cache | -C | -disable-* | --disable-* \
3165 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3166 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3167 | -with-* | --with-* | -without-* | --without-* | --x)
3168 case "$ac_configure_args0 " in
3169 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3170 esac
3172 -* ) ac_must_keep_next=true ;;
3173 esac
3175 as_fn_append ac_configure_args " '$ac_arg'"
3177 esac
3178 done
3179 done
3180 { ac_configure_args0=; unset ac_configure_args0;}
3181 { ac_configure_args1=; unset ac_configure_args1;}
3183 # When interrupted or exit'd, cleanup temporary files, and complete
3184 # config.log. We remove comments because anyway the quotes in there
3185 # would cause problems or look ugly.
3186 # WARNING: Use '\'' to represent an apostrophe within the trap.
3187 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3188 trap 'exit_status=$?
3189 # Save into config.log some information that might help in debugging.
3191 echo
3193 cat <<\_ASBOX
3194 ## ---------------- ##
3195 ## Cache variables. ##
3196 ## ---------------- ##
3197 _ASBOX
3198 echo
3199 # The following way of writing the cache mishandles newlines in values,
3201 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3202 eval ac_val=\$$ac_var
3203 case $ac_val in #(
3204 *${as_nl}*)
3205 case $ac_var in #(
3206 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3207 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3208 esac
3209 case $ac_var in #(
3210 _ | IFS | as_nl) ;; #(
3211 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3212 *) { eval $ac_var=; unset $ac_var;} ;;
3213 esac ;;
3214 esac
3215 done
3216 (set) 2>&1 |
3217 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3218 *${as_nl}ac_space=\ *)
3219 sed -n \
3220 "s/'\''/'\''\\\\'\'''\''/g;
3221 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3222 ;; #(
3224 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3226 esac |
3227 sort
3229 echo
3231 cat <<\_ASBOX
3232 ## ----------------- ##
3233 ## Output variables. ##
3234 ## ----------------- ##
3235 _ASBOX
3236 echo
3237 for ac_var in $ac_subst_vars
3239 eval ac_val=\$$ac_var
3240 case $ac_val in
3241 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3242 esac
3243 $as_echo "$ac_var='\''$ac_val'\''"
3244 done | sort
3245 echo
3247 if test -n "$ac_subst_files"; then
3248 cat <<\_ASBOX
3249 ## ------------------- ##
3250 ## File substitutions. ##
3251 ## ------------------- ##
3252 _ASBOX
3253 echo
3254 for ac_var in $ac_subst_files
3256 eval ac_val=\$$ac_var
3257 case $ac_val in
3258 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3259 esac
3260 $as_echo "$ac_var='\''$ac_val'\''"
3261 done | sort
3262 echo
3265 if test -s confdefs.h; then
3266 cat <<\_ASBOX
3267 ## ----------- ##
3268 ## confdefs.h. ##
3269 ## ----------- ##
3270 _ASBOX
3271 echo
3272 cat confdefs.h
3273 echo
3275 test "$ac_signal" != 0 &&
3276 $as_echo "$as_me: caught signal $ac_signal"
3277 $as_echo "$as_me: exit $exit_status"
3278 } >&5
3279 rm -f core *.core core.conftest.* &&
3280 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3281 exit $exit_status
3283 for ac_signal in 1 2 13 15; do
3284 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3285 done
3286 ac_signal=0
3288 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3289 rm -f -r conftest* confdefs.h
3291 $as_echo "/* confdefs.h */" > confdefs.h
3293 # Predefined preprocessor variables.
3295 cat >>confdefs.h <<_ACEOF
3296 #define PACKAGE_NAME "$PACKAGE_NAME"
3297 _ACEOF
3299 cat >>confdefs.h <<_ACEOF
3300 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3301 _ACEOF
3303 cat >>confdefs.h <<_ACEOF
3304 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3305 _ACEOF
3307 cat >>confdefs.h <<_ACEOF
3308 #define PACKAGE_STRING "$PACKAGE_STRING"
3309 _ACEOF
3311 cat >>confdefs.h <<_ACEOF
3312 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3313 _ACEOF
3315 cat >>confdefs.h <<_ACEOF
3316 #define PACKAGE_URL "$PACKAGE_URL"
3317 _ACEOF
3320 # Let the site file select an alternate cache file if it wants to.
3321 # Prefer an explicitly selected file to automatically selected ones.
3322 ac_site_file1=NONE
3323 ac_site_file2=NONE
3324 if test -n "$CONFIG_SITE"; then
3325 ac_site_file1=$CONFIG_SITE
3326 elif test "x$prefix" != xNONE; then
3327 ac_site_file1=$prefix/share/config.site
3328 ac_site_file2=$prefix/etc/config.site
3329 else
3330 ac_site_file1=$ac_default_prefix/share/config.site
3331 ac_site_file2=$ac_default_prefix/etc/config.site
3333 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3335 test "x$ac_site_file" = xNONE && continue
3336 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3337 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3338 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3339 sed 's/^/| /' "$ac_site_file" >&5
3340 . "$ac_site_file"
3342 done
3344 if test -r "$cache_file"; then
3345 # Some versions of bash will fail to source /dev/null (special files
3346 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3347 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349 $as_echo "$as_me: loading cache $cache_file" >&6;}
3350 case $cache_file in
3351 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352 *) . "./$cache_file";;
3353 esac
3355 else
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357 $as_echo "$as_me: creating cache $cache_file" >&6;}
3358 >$cache_file
3361 as_fn_append ac_header_list " sys/systeminfo.h"
3362 as_fn_append ac_header_list " coff.h"
3363 as_fn_append ac_header_list " pty.h"
3364 as_fn_append ac_header_list " sys/resource.h"
3365 as_fn_append ac_header_list " sys/utsname.h"
3366 as_fn_append ac_header_list " pwd.h"
3367 as_fn_append ac_header_list " utmp.h"
3368 as_fn_append ac_header_list " util.h"
3369 as_fn_append ac_header_list " sys/socket.h"
3370 as_fn_append ac_header_list " stdlib.h"
3371 as_fn_append ac_header_list " unistd.h"
3372 as_fn_append ac_header_list " sys/param.h"
3373 as_fn_append ac_header_list " pthread.h"
3374 as_fn_append ac_header_list " malloc/malloc.h"
3375 as_fn_append ac_header_list " maillock.h"
3376 as_fn_append ac_header_list " sys/un.h"
3377 as_fn_append ac_func_list " tzset"
3378 as_fn_append ac_func_list " readlinkat"
3379 as_fn_append ac_header_list " dirent.h"
3380 as_fn_append ac_header_list " execinfo.h"
3381 as_fn_append ac_func_list " faccessat"
3382 as_fn_append ac_func_list " fcntl"
3383 as_fn_append ac_func_list " fdopendir"
3384 as_fn_append ac_header_list " stdio_ext.h"
3385 as_fn_append ac_func_list " __fpending"
3386 as_fn_append ac_func_list " fstatat"
3387 as_fn_append ac_func_list " fsync"
3388 gl_getopt_required=GNU
3389 as_fn_append ac_header_list " getopt.h"
3390 as_fn_append ac_func_list " gettimeofday"
3391 as_fn_append ac_func_list " nanotime"
3392 as_fn_append ac_header_list " sys/time.h"
3393 as_fn_append ac_header_list " wchar.h"
3394 as_fn_append ac_header_list " stdint.h"
3395 as_fn_append ac_header_list " inttypes.h"
3396 as_fn_append ac_func_list " lstat"
3397 as_fn_append ac_func_list " mkostemp"
3398 as_fn_append ac_func_list " pipe2"
3399 as_fn_append ac_header_list " sys/select.h"
3400 as_fn_append ac_func_list " pselect"
3401 as_fn_append ac_func_list " pthread_sigmask"
3402 as_fn_append ac_func_list " readlink"
3403 as_fn_append ac_func_list " strtoimax"
3404 as_fn_append ac_func_list " strtoumax"
3405 as_fn_append ac_func_list " symlink"
3406 as_fn_append ac_header_list " sys/stat.h"
3407 as_fn_append ac_func_list " localtime_r"
3408 as_fn_append ac_header_list " utime.h"
3409 as_fn_append ac_func_list " futimes"
3410 as_fn_append ac_func_list " futimesat"
3411 as_fn_append ac_func_list " futimens"
3412 as_fn_append ac_func_list " utimensat"
3413 as_fn_append ac_func_list " lutimes"
3414 as_fn_append ac_func_list " getdtablesize"
3415 as_fn_append ac_func_list " secure_getenv"
3416 # Check that the precious variables saved in the cache have kept the same
3417 # value.
3418 ac_cache_corrupted=false
3419 for ac_var in $ac_precious_vars; do
3420 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3421 eval ac_new_set=\$ac_env_${ac_var}_set
3422 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3423 eval ac_new_val=\$ac_env_${ac_var}_value
3424 case $ac_old_set,$ac_new_set in
3425 set,)
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3427 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3428 ac_cache_corrupted=: ;;
3429 ,set)
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3431 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3432 ac_cache_corrupted=: ;;
3433 ,);;
3435 if test "x$ac_old_val" != "x$ac_new_val"; then
3436 # differences in whitespace do not lead to failure.
3437 ac_old_val_w=`echo x $ac_old_val`
3438 ac_new_val_w=`echo x $ac_new_val`
3439 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3441 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3442 ac_cache_corrupted=:
3443 else
3444 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3445 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3446 eval $ac_var=\$ac_old_val
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3449 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3451 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3452 fi;;
3453 esac
3454 # Pass precious variables to config.status.
3455 if test "$ac_new_set" = set; then
3456 case $ac_new_val in
3457 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3458 *) ac_arg=$ac_var=$ac_new_val ;;
3459 esac
3460 case " $ac_configure_args " in
3461 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3462 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3463 esac
3465 done
3466 if $ac_cache_corrupted; then
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3469 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3470 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3471 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3473 ## -------------------- ##
3474 ## Main body of script. ##
3475 ## -------------------- ##
3477 ac_ext=c
3478 ac_cpp='$CPP $CPPFLAGS'
3479 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3480 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3481 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3485 emacs_config_options="$@"
3486 ## Add some environment variables, if they were passed via the environment
3487 ## rather than on the command-line.
3488 for var in CFLAGS CPPFLAGS LDFLAGS; do
3489 case "$emacs_config_options" in
3490 *$var=*) continue ;;
3491 esac
3492 eval val="\$${var}"
3493 test x"$val" = x && continue
3494 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
3495 done
3497 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3500 ac_aux_dir=
3501 for ac_dir in build-aux "$srcdir"/build-aux; do
3502 for ac_t in install-sh install.sh shtool; do
3503 if test -f "$ac_dir/$ac_t"; then
3504 ac_aux_dir=$ac_dir
3505 ac_install_sh="$ac_aux_dir/$ac_t -c"
3506 break 2
3508 done
3509 done
3510 if test -z "$ac_aux_dir"; then
3511 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3514 # These three variables are undocumented and unsupported,
3515 # and are intended to be withdrawn in a future Autoconf release.
3516 # They can cause serious problems if a builder's source tree is in a directory
3517 # whose full name contains unusual characters.
3518 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3519 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3520 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3523 am__api_version='1.11'
3525 # Find a good install program. We prefer a C program (faster),
3526 # so one script is as good as another. But avoid the broken or
3527 # incompatible versions:
3528 # SysV /etc/install, /usr/sbin/install
3529 # SunOS /usr/etc/install
3530 # IRIX /sbin/install
3531 # AIX /bin/install
3532 # AmigaOS /C/install, which installs bootblocks on floppy discs
3533 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3534 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3535 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3536 # OS/2's system install, which has a completely different semantic
3537 # ./install, which can be erroneously created by make from ./install.sh.
3538 # Reject install programs that cannot install multiple files.
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3540 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3541 if test -z "$INSTALL"; then
3542 if test "${ac_cv_path_install+set}" = set; then :
3543 $as_echo_n "(cached) " >&6
3544 else
3545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546 for as_dir in $PATH
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
3550 # Account for people who put trailing slashes in PATH elements.
3551 case $as_dir/ in #((
3552 ./ | .// | /[cC]/* | \
3553 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3554 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3555 /usr/ucb/* ) ;;
3557 # OSF1 and SCO ODT 3.0 have their own names for install.
3558 # Don't use installbsd from OSF since it installs stuff as root
3559 # by default.
3560 for ac_prog in ginstall scoinst install; do
3561 for ac_exec_ext in '' $ac_executable_extensions; do
3562 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3563 if test $ac_prog = install &&
3564 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3565 # AIX install. It has an incompatible calling convention.
3567 elif test $ac_prog = install &&
3568 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3569 # program-specific install script used by HP pwplus--don't use.
3571 else
3572 rm -rf conftest.one conftest.two conftest.dir
3573 echo one > conftest.one
3574 echo two > conftest.two
3575 mkdir conftest.dir
3576 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3577 test -s conftest.one && test -s conftest.two &&
3578 test -s conftest.dir/conftest.one &&
3579 test -s conftest.dir/conftest.two
3580 then
3581 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3582 break 3
3586 done
3587 done
3589 esac
3591 done
3592 IFS=$as_save_IFS
3594 rm -rf conftest.one conftest.two conftest.dir
3597 if test "${ac_cv_path_install+set}" = set; then
3598 INSTALL=$ac_cv_path_install
3599 else
3600 # As a last resort, use the slow shell script. Don't cache a
3601 # value for INSTALL within a source directory, because that will
3602 # break other packages using the cache if that directory is
3603 # removed, or if the value is a relative name.
3604 INSTALL=$ac_install_sh
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3608 $as_echo "$INSTALL" >&6; }
3610 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3611 # It thinks the first close brace ends the variable substitution.
3612 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3614 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3616 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3619 $as_echo_n "checking whether build environment is sane... " >&6; }
3620 # Just in case
3621 sleep 1
3622 echo timestamp > conftest.file
3623 # Reject unsafe characters in $srcdir or the absolute working directory
3624 # name. Accept space and tab only in the latter.
3625 am_lf='
3627 case `pwd` in
3628 *[\\\"\#\$\&\'\`$am_lf]*)
3629 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3630 esac
3631 case $srcdir in
3632 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3633 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3634 esac
3636 # Do `set' in a subshell so we don't clobber the current shell's
3637 # arguments. Must try -L first in case configure is actually a
3638 # symlink; some systems play weird games with the mod time of symlinks
3639 # (eg FreeBSD returns the mod time of the symlink's containing
3640 # directory).
3641 if (
3642 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3643 if test "$*" = "X"; then
3644 # -L didn't work.
3645 set X `ls -t "$srcdir/configure" conftest.file`
3647 rm -f conftest.file
3648 if test "$*" != "X $srcdir/configure conftest.file" \
3649 && test "$*" != "X conftest.file $srcdir/configure"; then
3651 # If neither matched, then we have a broken ls. This can happen
3652 # if, for instance, CONFIG_SHELL is bash and it inherits a
3653 # broken ls alias from the environment. This has actually
3654 # happened. Such a system could not be considered "sane".
3655 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3656 alias in your environment" "$LINENO" 5
3659 test "$2" = conftest.file
3661 then
3662 # Ok.
3664 else
3665 as_fn_error "newly created file is older than distributed files!
3666 Check your system clock" "$LINENO" 5
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3669 $as_echo "yes" >&6; }
3670 test "$program_prefix" != NONE &&
3671 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3672 # Use a double $ so make ignores it.
3673 test "$program_suffix" != NONE &&
3674 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3675 # Double any \ or $.
3676 # By default was `s,x,x', remove it if useless.
3677 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3678 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3680 # expand $ac_aux_dir to an absolute path
3681 am_aux_dir=`cd $ac_aux_dir && pwd`
3683 if test x"${MISSING+set}" != xset; then
3684 case $am_aux_dir in
3685 *\ * | *\ *)
3686 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3688 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3689 esac
3691 # Use eval to expand $SHELL
3692 if eval "$MISSING --run true"; then
3693 am_missing_run="$MISSING --run "
3694 else
3695 am_missing_run=
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3697 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3700 if test x"${install_sh}" != xset; then
3701 case $am_aux_dir in
3702 *\ * | *\ *)
3703 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3705 install_sh="\${SHELL} $am_aux_dir/install-sh"
3706 esac
3709 # Installed binaries are usually stripped using `strip' when the user
3710 # run `make install-strip'. However `strip' might not be the right
3711 # tool to use in cross-compilation environments, therefore Automake
3712 # will honor the `STRIP' environment variable to overrule this program.
3713 if test "$cross_compiling" != no; then
3714 if test -n "$ac_tool_prefix"; then
3715 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3716 set dummy ${ac_tool_prefix}strip; ac_word=$2
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718 $as_echo_n "checking for $ac_word... " >&6; }
3719 if test "${ac_cv_prog_STRIP+set}" = set; then :
3720 $as_echo_n "(cached) " >&6
3721 else
3722 if test -n "$STRIP"; then
3723 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3724 else
3725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726 for as_dir in $PATH
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
3730 for ac_exec_ext in '' $ac_executable_extensions; do
3731 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3732 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3734 break 2
3736 done
3737 done
3738 IFS=$as_save_IFS
3742 STRIP=$ac_cv_prog_STRIP
3743 if test -n "$STRIP"; then
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3745 $as_echo "$STRIP" >&6; }
3746 else
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748 $as_echo "no" >&6; }
3753 if test -z "$ac_cv_prog_STRIP"; then
3754 ac_ct_STRIP=$STRIP
3755 # Extract the first word of "strip", so it can be a program name with args.
3756 set dummy strip; ac_word=$2
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758 $as_echo_n "checking for $ac_word... " >&6; }
3759 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3760 $as_echo_n "(cached) " >&6
3761 else
3762 if test -n "$ac_ct_STRIP"; then
3763 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3764 else
3765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766 for as_dir in $PATH
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
3770 for ac_exec_ext in '' $ac_executable_extensions; do
3771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3772 ac_cv_prog_ac_ct_STRIP="strip"
3773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3774 break 2
3776 done
3777 done
3778 IFS=$as_save_IFS
3782 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3783 if test -n "$ac_ct_STRIP"; then
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3785 $as_echo "$ac_ct_STRIP" >&6; }
3786 else
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788 $as_echo "no" >&6; }
3791 if test "x$ac_ct_STRIP" = x; then
3792 STRIP=":"
3793 else
3794 case $cross_compiling:$ac_tool_warned in
3795 yes:)
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3797 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3798 ac_tool_warned=yes ;;
3799 esac
3800 STRIP=$ac_ct_STRIP
3802 else
3803 STRIP="$ac_cv_prog_STRIP"
3807 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3810 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3811 if test -z "$MKDIR_P"; then
3812 if test "${ac_cv_path_mkdir+set}" = set; then :
3813 $as_echo_n "(cached) " >&6
3814 else
3815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
3820 for ac_prog in mkdir gmkdir; do
3821 for ac_exec_ext in '' $ac_executable_extensions; do
3822 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3823 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3824 'mkdir (GNU coreutils) '* | \
3825 'mkdir (coreutils) '* | \
3826 'mkdir (fileutils) '4.1*)
3827 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3828 break 3;;
3829 esac
3830 done
3831 done
3832 done
3833 IFS=$as_save_IFS
3837 test -d ./--version && rmdir ./--version
3838 if test "${ac_cv_path_mkdir+set}" = set; then
3839 MKDIR_P="$ac_cv_path_mkdir -p"
3840 else
3841 # As a last resort, use the slow shell script. Don't cache a
3842 # value for MKDIR_P within a source directory, because that will
3843 # break other packages using the cache if that directory is
3844 # removed, or if the value is a relative name.
3845 MKDIR_P="$ac_install_sh -d"
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3849 $as_echo "$MKDIR_P" >&6; }
3851 mkdir_p="$MKDIR_P"
3852 case $mkdir_p in
3853 [\\/$]* | ?:[\\/]*) ;;
3854 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3855 esac
3857 for ac_prog in gawk mawk nawk awk
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860 set dummy $ac_prog; ac_word=$2
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862 $as_echo_n "checking for $ac_word... " >&6; }
3863 if test "${ac_cv_prog_AWK+set}" = set; then :
3864 $as_echo_n "(cached) " >&6
3865 else
3866 if test -n "$AWK"; then
3867 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3868 else
3869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870 for as_dir in $PATH
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
3874 for ac_exec_ext in '' $ac_executable_extensions; do
3875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3876 ac_cv_prog_AWK="$ac_prog"
3877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878 break 2
3880 done
3881 done
3882 IFS=$as_save_IFS
3886 AWK=$ac_cv_prog_AWK
3887 if test -n "$AWK"; then
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3889 $as_echo "$AWK" >&6; }
3890 else
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892 $as_echo "no" >&6; }
3896 test -n "$AWK" && break
3897 done
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3900 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3901 set x ${MAKE-make}
3902 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3903 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3904 $as_echo_n "(cached) " >&6
3905 else
3906 cat >conftest.make <<\_ACEOF
3907 SHELL = /bin/sh
3908 all:
3909 @echo '@@@%%%=$(MAKE)=@@@%%%'
3910 _ACEOF
3911 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3912 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3913 *@@@%%%=?*=@@@%%%*)
3914 eval ac_cv_prog_make_${ac_make}_set=yes;;
3916 eval ac_cv_prog_make_${ac_make}_set=no;;
3917 esac
3918 rm -f conftest.make
3920 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3922 $as_echo "yes" >&6; }
3923 SET_MAKE=
3924 else
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926 $as_echo "no" >&6; }
3927 SET_MAKE="MAKE=${MAKE-make}"
3930 rm -rf .tst 2>/dev/null
3931 mkdir .tst 2>/dev/null
3932 if test -d .tst; then
3933 am__leading_dot=.
3934 else
3935 am__leading_dot=_
3937 rmdir .tst 2>/dev/null
3939 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3940 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3941 # is not polluted with repeated "-I."
3942 am__isrc=' -I$(srcdir)'
3943 # test to see if srcdir already configured
3944 if test -f $srcdir/config.status; then
3945 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3949 # test whether we have cygpath
3950 if test -z "$CYGPATH_W"; then
3951 if (cygpath --version) >/dev/null 2>/dev/null; then
3952 CYGPATH_W='cygpath -w'
3953 else
3954 CYGPATH_W=echo
3959 # Define the identity of the package.
3960 PACKAGE='emacs'
3961 VERSION='24.3.50'
3964 cat >>confdefs.h <<_ACEOF
3965 #define PACKAGE "$PACKAGE"
3966 _ACEOF
3969 cat >>confdefs.h <<_ACEOF
3970 #define VERSION "$VERSION"
3971 _ACEOF
3973 # Some tools Automake needs.
3975 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3978 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3981 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3984 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3987 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3989 # We need awk for the "check" target. The system "awk" is bad on
3990 # some platforms.
3991 # Always define AMTAR for backward compatibility.
3993 AMTAR=${AMTAR-"${am_missing_run}tar"}
3995 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4004 lispdir='${datadir}/emacs/${version}/lisp'
4005 leimdir='${datadir}/emacs/${version}/leim'
4006 standardlisppath='${lispdir}:${leimdir}'
4007 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4008 '${datadir}/emacs/site-lisp'
4009 lisppath='${locallisppath}:${standardlisppath}'
4010 etcdir='${datadir}/emacs/${version}/etc'
4011 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
4012 docdir='${datadir}/emacs/${version}/etc'
4013 gamedir='${localstatedir}/games/emacs'
4016 # Check whether --with-all was given.
4017 if test "${with_all+set}" = set; then :
4018 withval=$with_all; with_features=$withval
4019 else
4020 with_features=yes
4027 # Check whether --with-pop was given.
4028 if test "${with_pop+set}" = set; then :
4029 withval=$with_pop;
4030 else
4031 with_pop=$with_features
4034 if test "$with_pop" = yes; then
4035 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4040 # Check whether --with-kerberos was given.
4041 if test "${with_kerberos+set}" = set; then :
4042 withval=$with_kerberos;
4043 else
4044 with_kerberos=no
4047 if test "$with_kerberos" != no; then
4048 $as_echo "#define KERBEROS 1" >>confdefs.h
4053 # Check whether --with-kerberos5 was given.
4054 if test "${with_kerberos5+set}" = set; then :
4055 withval=$with_kerberos5;
4056 else
4057 with_kerberos5=no
4060 if test "${with_kerberos5}" != no; then
4061 if test "${with_kerberos}" = no; then
4062 with_kerberos=yes
4063 $as_echo "#define KERBEROS 1" >>confdefs.h
4067 $as_echo "#define KERBEROS5 1" >>confdefs.h
4072 # Check whether --with-hesiod was given.
4073 if test "${with_hesiod+set}" = set; then :
4074 withval=$with_hesiod;
4075 else
4076 with_hesiod=no
4079 if test "$with_hesiod" != no; then
4081 $as_echo "#define HESIOD 1" >>confdefs.h
4086 # Check whether --with-mmdf was given.
4087 if test "${with_mmdf+set}" = set; then :
4088 withval=$with_mmdf;
4089 else
4090 with_mmdf=no
4093 if test "$with_mmdf" != no; then
4095 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4100 # Check whether --with-mail-unlink was given.
4101 if test "${with_mail_unlink+set}" = set; then :
4102 withval=$with_mail_unlink;
4103 else
4104 with_mail_unlink=no
4107 if test "$with_mail_unlink" != no; then
4109 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4114 # Check whether --with-mailhost was given.
4115 if test "${with_mailhost+set}" = set; then :
4116 withval=$with_mailhost;
4117 cat >>confdefs.h <<_ACEOF
4118 #define MAILHOST "$withval"
4119 _ACEOF
4125 # Check whether --with-sound was given.
4126 if test "${with_sound+set}" = set; then :
4127 withval=$with_sound; case "${withval}" in
4128 yes|no|ossaudio|alsa) val=$withval ;;
4129 *) as_fn_error "\`--with-sound=$withval' is invalid;
4130 this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5
4132 esac
4133 with_sound=$val
4135 else
4136 with_sound=$with_features
4141 # Check whether --with-x-toolkit was given.
4142 if test "${with_x_toolkit+set}" = set; then :
4143 withval=$with_x_toolkit; case "${withval}" in
4144 y | ye | yes ) val=gtk ;;
4145 n | no ) val=no ;;
4146 l | lu | luc | luci | lucid ) val=lucid ;;
4147 a | at | ath | athe | athen | athena ) val=athena ;;
4148 m | mo | mot | moti | motif ) val=motif ;;
4149 g | gt | gtk ) val=gtk ;;
4150 gtk2 ) val=gtk2 ;;
4151 gtk3 ) val=gtk3 ;;
4153 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4154 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4155 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4156 \`athena' and \`lucid' are synonyms." "$LINENO" 5
4158 esac
4159 with_x_toolkit=$val
4165 # Check whether --with-wide-int was given.
4166 if test "${with_wide_int+set}" = set; then :
4167 withval=$with_wide_int;
4168 else
4169 with_wide_int=no
4172 if test "$with_wide_int" = yes; then
4174 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4179 # Check whether --with-xpm was given.
4180 if test "${with_xpm+set}" = set; then :
4181 withval=$with_xpm;
4182 else
4183 with_xpm=$with_features
4187 # Check whether --with-jpeg was given.
4188 if test "${with_jpeg+set}" = set; then :
4189 withval=$with_jpeg;
4190 else
4191 with_jpeg=$with_features
4195 # Check whether --with-tiff was given.
4196 if test "${with_tiff+set}" = set; then :
4197 withval=$with_tiff;
4198 else
4199 with_tiff=$with_features
4203 # Check whether --with-gif was given.
4204 if test "${with_gif+set}" = set; then :
4205 withval=$with_gif;
4206 else
4207 with_gif=$with_features
4211 # Check whether --with-png was given.
4212 if test "${with_png+set}" = set; then :
4213 withval=$with_png;
4214 else
4215 with_png=$with_features
4219 # Check whether --with-rsvg was given.
4220 if test "${with_rsvg+set}" = set; then :
4221 withval=$with_rsvg;
4222 else
4223 with_rsvg=$with_features
4227 # Check whether --with-xml2 was given.
4228 if test "${with_xml2+set}" = set; then :
4229 withval=$with_xml2;
4230 else
4231 with_xml2=$with_features
4235 # Check whether --with-imagemagick was given.
4236 if test "${with_imagemagick+set}" = set; then :
4237 withval=$with_imagemagick;
4238 else
4239 with_imagemagick=$with_features
4244 # Check whether --with-xft was given.
4245 if test "${with_xft+set}" = set; then :
4246 withval=$with_xft;
4247 else
4248 with_xft=$with_features
4252 # Check whether --with-libotf was given.
4253 if test "${with_libotf+set}" = set; then :
4254 withval=$with_libotf;
4255 else
4256 with_libotf=$with_features
4260 # Check whether --with-m17n-flt was given.
4261 if test "${with_m17n_flt+set}" = set; then :
4262 withval=$with_m17n_flt;
4263 else
4264 with_m17n_flt=$with_features
4269 # Check whether --with-toolkit-scroll-bars was given.
4270 if test "${with_toolkit_scroll_bars+set}" = set; then :
4271 withval=$with_toolkit_scroll_bars;
4272 else
4273 with_toolkit_scroll_bars=$with_features
4277 # Check whether --with-xaw3d was given.
4278 if test "${with_xaw3d+set}" = set; then :
4279 withval=$with_xaw3d;
4280 else
4281 with_xaw3d=$with_features
4285 # Check whether --with-xim was given.
4286 if test "${with_xim+set}" = set; then :
4287 withval=$with_xim;
4288 else
4289 with_xim=$with_features
4293 # Check whether --with-ns was given.
4294 if test "${with_ns+set}" = set; then :
4295 withval=$with_ns;
4296 else
4297 with_ns=no
4301 # Check whether --with-w32 was given.
4302 if test "${with_w32+set}" = set; then :
4303 withval=$with_w32;
4304 else
4305 with_w32=no
4310 # Check whether --with-gpm was given.
4311 if test "${with_gpm+set}" = set; then :
4312 withval=$with_gpm;
4313 else
4314 with_gpm=$with_features
4318 # Check whether --with-dbus was given.
4319 if test "${with_dbus+set}" = set; then :
4320 withval=$with_dbus;
4321 else
4322 with_dbus=$with_features
4326 # Check whether --with-gconf was given.
4327 if test "${with_gconf+set}" = set; then :
4328 withval=$with_gconf;
4329 else
4330 with_gconf=$with_features
4334 # Check whether --with-gsettings was given.
4335 if test "${with_gsettings+set}" = set; then :
4336 withval=$with_gsettings;
4337 else
4338 with_gsettings=$with_features
4342 # Check whether --with-selinux was given.
4343 if test "${with_selinux+set}" = set; then :
4344 withval=$with_selinux;
4345 else
4346 with_selinux=$with_features
4350 # Check whether --with-gnutls was given.
4351 if test "${with_gnutls+set}" = set; then :
4352 withval=$with_gnutls;
4353 else
4354 with_gnutls=$with_features
4359 # Check whether --with-file-notification was given.
4360 if test "${with_file_notification+set}" = set; then :
4361 withval=$with_file_notification; case "${withval}" in
4362 y | ye | yes ) val=yes ;;
4363 n | no ) val=no ;;
4364 g | gf | gfi | gfil | gfile ) val=gfile ;;
4365 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4366 w | w3 | w32 ) val=w32 ;;
4367 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4368 this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
4369 \`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4370 otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
4372 esac
4373 with_file_notification=$val
4375 else
4376 with_file_notification=$with_features
4380 ## For the times when you want to build Emacs but don't have
4381 ## a suitable makeinfo, and can live without the manuals.
4383 # Check whether --with-makeinfo was given.
4384 if test "${with_makeinfo+set}" = set; then :
4385 withval=$with_makeinfo;
4386 else
4387 with_makeinfo=$with_features
4391 ## Makefile.in needs the cache file name.
4394 ## This is an option because I do not know if all info/man support
4395 ## compressed files, nor how to test if they do so.
4397 # Check whether --with-compress-info was given.
4398 if test "${with_compress_info+set}" = set; then :
4399 withval=$with_compress_info;
4400 else
4401 with_compress_info=$with_features
4404 if test $with_compress_info = yes; then
4405 GZIP_INFO=yes
4406 else
4407 GZIP_INFO=
4412 # Check whether --with-pkg-config-prog was given.
4413 if test "${with_pkg_config_prog+set}" = set; then :
4414 withval=$with_pkg_config_prog;
4417 if test "X${with_pkg_config_prog}" != X; then
4418 if test "${with_pkg_config_prog}" != yes; then
4419 PKG_CONFIG="${with_pkg_config_prog}"
4424 # Check whether --with-gameuser was given.
4425 if test "${with_gameuser+set}" = set; then :
4426 withval=$with_gameuser;
4429 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4430 && gameuser="${with_gameuser}"
4431 test "X$gameuser" = X && gameuser=games
4434 # Check whether --with-gnustep-conf was given.
4435 if test "${with_gnustep_conf+set}" = set; then :
4436 withval=$with_gnustep_conf;
4439 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4440 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4441 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4442 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4444 # Check whether --enable-ns-self-contained was given.
4445 if test "${enable_ns_self_contained+set}" = set; then :
4446 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4447 else
4448 EN_NS_SELF_CONTAINED=yes
4452 # Check whether --enable-locallisppath was given.
4453 if test "${enable_locallisppath+set}" = set; then :
4454 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4455 locallisppath=
4456 elif test "${enableval}" != "yes"; then
4457 locallisppath=${enableval}
4462 # Check whether --enable-checking was given.
4463 if test "${enable_checking+set}" = set; then :
4464 enableval=$enable_checking; ac_checking_flags="${enableval}"
4467 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4468 for check in $ac_checking_flags
4470 case $check in
4471 # these set all the flags to specific states
4472 yes) ac_enable_checking=1 ;;
4473 no) ac_enable_checking= ;
4474 ac_gc_check_stringbytes= ;
4475 ac_gc_check_string_overrun= ;
4476 ac_gc_check_string_free_list= ;
4477 ac_xmalloc_overrun= ;
4478 ac_gc_check_cons_list= ;
4479 ac_glyphs_debug= ;;
4480 all) ac_enable_checking=1 ;
4481 ac_gc_check_stringbytes=1 ;
4482 ac_gc_check_string_overrun=1 ;
4483 ac_gc_check_string_free_list=1 ;
4484 ac_xmalloc_overrun=1 ;
4485 ac_gc_check_cons_list=1 ;
4486 ac_glyphs_debug=1 ;;
4487 # these enable particular checks
4488 stringbytes) ac_gc_check_stringbytes=1 ;;
4489 stringoverrun) ac_gc_check_string_overrun=1 ;;
4490 stringfreelist) ac_gc_check_string_free_list=1 ;;
4491 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4492 conslist) ac_gc_check_cons_list=1 ;;
4493 glyphs) ac_glyphs_debug=1 ;;
4494 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4495 esac
4496 done
4497 IFS="$ac_save_IFS"
4499 if test x$ac_enable_checking != x ; then
4501 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4504 if test x$ac_gc_check_stringbytes != x ; then
4506 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4509 if test x$ac_gc_check_string_overrun != x ; then
4511 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4514 if test x$ac_gc_check_string_free_list != x ; then
4516 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4519 if test x$ac_xmalloc_overrun != x ; then
4521 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4524 if test x$ac_gc_check_cons_list != x ; then
4526 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4529 if test x$ac_glyphs_debug != x ; then
4531 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4535 # Check whether --enable-check-lisp-object-type was given.
4536 if test "${enable_check_lisp_object_type+set}" = set; then :
4537 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4539 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4546 # Check whether --enable-profiling was given.
4547 if test "${enable_profiling+set}" = set; then :
4548 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4551 if test x$ac_enable_profiling != x ; then
4552 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4553 else
4554 PROFILING_CFLAGS=
4558 # Check whether --enable-autodepend was given.
4559 if test "${enable_autodepend+set}" = set; then :
4560 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4561 else
4562 ac_enable_autodepend=yes
4566 # Check whether --enable-gtk-deprecation-warnings was given.
4567 if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4568 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4572 #### Make srcdir absolute, if it isn't already. It's important to
4573 #### avoid running the file name through pwd unnecessarily, since pwd can
4574 #### give you automounter prefixes, which can go away. We do all this
4575 #### so Emacs can find its files when run uninstalled.
4576 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4577 unset CDPATH
4578 case "${srcdir}" in
4579 [\\/]* | ?:[\\/]*) ;;
4581 ## We may be able to use the $PWD environment variable to make this
4582 ## absolute. But sometimes PWD is inaccurate.
4583 ## Note: we used to use $PWD at the end instead of `pwd`,
4584 ## but that tested only for a well-formed and valid PWD,
4585 ## it did not object when PWD was well-formed and valid but just wrong.
4586 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
4587 then
4588 srcdir="$PWD"
4589 else
4590 srcdir=`(cd "$srcdir"; pwd)`
4593 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
4594 esac
4596 ### Canonicalize the configuration name.
4598 # Make sure we can run config.sub.
4599 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4600 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4603 $as_echo_n "checking build system type... " >&6; }
4604 if test "${ac_cv_build+set}" = set; then :
4605 $as_echo_n "(cached) " >&6
4606 else
4607 ac_build_alias=$build_alias
4608 test "x$ac_build_alias" = x &&
4609 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4610 test "x$ac_build_alias" = x &&
4611 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4612 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4613 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4617 $as_echo "$ac_cv_build" >&6; }
4618 case $ac_cv_build in
4619 *-*-*) ;;
4620 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4621 esac
4622 build=$ac_cv_build
4623 ac_save_IFS=$IFS; IFS='-'
4624 set x $ac_cv_build
4625 shift
4626 build_cpu=$1
4627 build_vendor=$2
4628 shift; shift
4629 # Remember, the first character of IFS is used to create $*,
4630 # except with old shells:
4631 build_os=$*
4632 IFS=$ac_save_IFS
4633 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4637 $as_echo_n "checking host system type... " >&6; }
4638 if test "${ac_cv_host+set}" = set; then :
4639 $as_echo_n "(cached) " >&6
4640 else
4641 if test "x$host_alias" = x; then
4642 ac_cv_host=$ac_cv_build
4643 else
4644 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4645 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4650 $as_echo "$ac_cv_host" >&6; }
4651 case $ac_cv_host in
4652 *-*-*) ;;
4653 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4654 esac
4655 host=$ac_cv_host
4656 ac_save_IFS=$IFS; IFS='-'
4657 set x $ac_cv_host
4658 shift
4659 host_cpu=$1
4660 host_vendor=$2
4661 shift; shift
4662 # Remember, the first character of IFS is used to create $*,
4663 # except with old shells:
4664 host_os=$*
4665 IFS=$ac_save_IFS
4666 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4669 canonical=$host
4670 configuration=${host_alias-${build_alias-$host}}
4674 ### If you add support for a new configuration, add code to this
4675 ### switch statement to recognize your configuration name and select
4676 ### the appropriate operating system file.
4678 ### You would hope that you could choose an s/*.h
4679 ### file based on the operating system portion. However, it turns out
4680 ### that each s/*.h file is pretty manufacturer-specific.
4681 ### So we basically have to have a special case for each
4682 ### configuration name.
4684 ### As far as handling version numbers on operating systems is
4685 ### concerned, make sure things will fail in a fixable way. If
4686 ### /etc/MACHINES doesn't say anything about version numbers, be
4687 ### prepared to handle anything reasonably. If version numbers
4688 ### matter, be sure /etc/MACHINES says something about it.
4690 opsys='' unported=no
4691 case "${canonical}" in
4693 ## GNU/Linux and similar ports
4694 *-*-linux* )
4695 opsys=gnu-linux
4698 ## FreeBSD ports
4699 *-*-freebsd* )
4700 opsys=freebsd
4703 ## DragonFly ports
4704 *-*-dragonfly* )
4705 opsys=dragonfly
4708 ## FreeBSD kernel + glibc based userland
4709 *-*-kfreebsd*gnu* )
4710 opsys=gnu-kfreebsd
4713 ## NetBSD ports
4714 *-*-netbsd* )
4715 opsys=netbsd
4718 ## OpenBSD ports
4719 *-*-openbsd* )
4720 opsys=openbsd
4723 ## Apple Darwin / Mac OS X
4724 *-apple-darwin* )
4725 case "${canonical}" in
4726 i[3456]86-* ) ;;
4727 powerpc-* ) ;;
4728 x86_64-* ) ;;
4729 * ) unported=yes ;;
4730 esac
4731 opsys=darwin
4732 ## Use fink packages if available.
4733 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4734 ## if test -d /sw/include && test -d /sw/lib; then
4735 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4736 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4737 ## fi
4740 ## Cygwin ports
4741 *-*-cygwin )
4742 opsys=cygwin
4745 ## HP 9000 series 700 and 800, running HP/UX
4746 hppa*-hp-hpux10.2* )
4747 opsys=hpux10-20
4749 hppa*-hp-hpux1[1-9]* )
4750 opsys=hpux11
4751 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4754 ## IBM machines
4755 rs6000-ibm-aix4.[23]* )
4756 opsys=aix4-2
4758 powerpc-ibm-aix4.[23]* )
4759 opsys=aix4-2
4761 rs6000-ibm-aix[56]* )
4762 opsys=aix4-2
4764 powerpc-ibm-aix[56]* )
4765 opsys=aix4-2
4768 ## Silicon Graphics machines
4769 ## Iris 4D
4770 mips-sgi-irix6.5 )
4771 opsys=irix6-5
4772 # Without defining _LANGUAGE_C, things get masked out in the headers
4773 # so that, for instance, grepping for `free' in stdlib.h fails and
4774 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4775 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4778 ## Suns
4779 *-sun-solaris* \
4780 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4781 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4782 case "${canonical}" in
4783 i[3456]86-*-* ) ;;
4784 amd64-*-*|x86_64-*-*) ;;
4785 sparc* ) ;;
4786 * ) unported=yes ;;
4787 esac
4788 case "${canonical}" in
4789 *-sunos5.6* | *-solaris2.6* )
4790 opsys=sol2-6
4791 RANLIB="ar -ts"
4793 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4794 opsys=sol2-6
4795 emacs_check_sunpro_c=yes
4797 *-sunos5* | *-solaris* )
4798 opsys=sol2-10
4799 emacs_check_sunpro_c=yes
4801 esac
4802 ## Watch out for a compiler that we know will not work.
4803 case "${canonical}" in
4804 *-solaris* | *-sunos5* )
4805 if [ "x$CC" = x/usr/ucb/cc ]; then
4806 ## /usr/ucb/cc doesn't work;
4807 ## we should find some other compiler that does work.
4808 unset CC
4811 *) ;;
4812 esac
4815 ## Intel 386 machines where we don't care about the manufacturer.
4816 i[3456]86-*-* )
4817 case "${canonical}" in
4818 *-darwin* ) opsys=darwin ;;
4819 *-mingw32 )
4820 opsys=mingw32
4821 # MinGW overrides and adds some system headers in nt/inc.
4822 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4824 *-sysv4.2uw* ) opsys=unixware ;;
4825 *-sysv5uw* ) opsys=unixware ;;
4826 *-sysv5OpenUNIX* ) opsys=unixware ;;
4827 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4828 esac
4832 unported=yes
4834 esac
4836 ### If the code above didn't choose an operating system, just choose
4837 ### an operating system based on the configuration name. You really
4838 ### only want to use this when you have no idea what the right
4839 ### operating system is; if you know what operating systems a machine
4840 ### runs, it's cleaner to make it explicit in the case statement
4841 ### above.
4842 if test x"${opsys}" = x; then
4843 case "${canonical}" in
4844 *-gnu* ) opsys=gnu ;;
4846 unported=yes
4848 esac
4853 if test $unported = yes; then
4854 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4855 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4859 #### Choose a compiler.
4861 ac_ext=c
4862 ac_cpp='$CPP $CPPFLAGS'
4863 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4864 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4865 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4866 if test -n "$ac_tool_prefix"; then
4867 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4868 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870 $as_echo_n "checking for $ac_word... " >&6; }
4871 if test "${ac_cv_prog_CC+set}" = set; then :
4872 $as_echo_n "(cached) " >&6
4873 else
4874 if test -n "$CC"; then
4875 ac_cv_prog_CC="$CC" # Let the user override the test.
4876 else
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878 for as_dir in $PATH
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4888 done
4889 done
4890 IFS=$as_save_IFS
4894 CC=$ac_cv_prog_CC
4895 if test -n "$CC"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4897 $as_echo "$CC" >&6; }
4898 else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900 $as_echo "no" >&6; }
4905 if test -z "$ac_cv_prog_CC"; then
4906 ac_ct_CC=$CC
4907 # Extract the first word of "gcc", so it can be a program name with args.
4908 set dummy gcc; ac_word=$2
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910 $as_echo_n "checking for $ac_word... " >&6; }
4911 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4912 $as_echo_n "(cached) " >&6
4913 else
4914 if test -n "$ac_ct_CC"; then
4915 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4916 else
4917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918 for as_dir in $PATH
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
4922 for ac_exec_ext in '' $ac_executable_extensions; do
4923 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4924 ac_cv_prog_ac_ct_CC="gcc"
4925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926 break 2
4928 done
4929 done
4930 IFS=$as_save_IFS
4934 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4935 if test -n "$ac_ct_CC"; then
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4937 $as_echo "$ac_ct_CC" >&6; }
4938 else
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940 $as_echo "no" >&6; }
4943 if test "x$ac_ct_CC" = x; then
4944 CC=""
4945 else
4946 case $cross_compiling:$ac_tool_warned in
4947 yes:)
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4949 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4950 ac_tool_warned=yes ;;
4951 esac
4952 CC=$ac_ct_CC
4954 else
4955 CC="$ac_cv_prog_CC"
4958 if test -z "$CC"; then
4959 if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4961 set dummy ${ac_tool_prefix}cc; ac_word=$2
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963 $as_echo_n "checking for $ac_word... " >&6; }
4964 if test "${ac_cv_prog_CC+set}" = set; then :
4965 $as_echo_n "(cached) " >&6
4966 else
4967 if test -n "$CC"; then
4968 ac_cv_prog_CC="$CC" # Let the user override the test.
4969 else
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971 for as_dir in $PATH
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4977 ac_cv_prog_CC="${ac_tool_prefix}cc"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4981 done
4982 done
4983 IFS=$as_save_IFS
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; }
4999 if test -z "$CC"; then
5000 # Extract the first word of "cc", so it can be a program name with args.
5001 set dummy cc; ac_word=$2
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003 $as_echo_n "checking for $ac_word... " >&6; }
5004 if test "${ac_cv_prog_CC+set}" = set; then :
5005 $as_echo_n "(cached) " >&6
5006 else
5007 if test -n "$CC"; then
5008 ac_cv_prog_CC="$CC" # Let the user override the test.
5009 else
5010 ac_prog_rejected=no
5011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5019 ac_prog_rejected=yes
5020 continue
5022 ac_cv_prog_CC="cc"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5026 done
5027 done
5028 IFS=$as_save_IFS
5030 if test $ac_prog_rejected = yes; then
5031 # We found a bogon in the path, so make sure we never use it.
5032 set dummy $ac_cv_prog_CC
5033 shift
5034 if test $# != 0; then
5035 # We chose a different compiler from the bogus one.
5036 # However, it has the same basename, so the bogon will be chosen
5037 # first if we set CC to just the basename; use the full file name.
5038 shift
5039 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5044 CC=$ac_cv_prog_CC
5045 if test -n "$CC"; then
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5047 $as_echo "$CC" >&6; }
5048 else
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050 $as_echo "no" >&6; }
5055 if test -z "$CC"; then
5056 if test -n "$ac_tool_prefix"; then
5057 for ac_prog in cl.exe
5059 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5060 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062 $as_echo_n "checking for $ac_word... " >&6; }
5063 if test "${ac_cv_prog_CC+set}" = set; then :
5064 $as_echo_n "(cached) " >&6
5065 else
5066 if test -n "$CC"; then
5067 ac_cv_prog_CC="$CC" # Let the user override the test.
5068 else
5069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070 for as_dir in $PATH
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
5074 for ac_exec_ext in '' $ac_executable_extensions; do
5075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5078 break 2
5080 done
5081 done
5082 IFS=$as_save_IFS
5086 CC=$ac_cv_prog_CC
5087 if test -n "$CC"; then
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5089 $as_echo "$CC" >&6; }
5090 else
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092 $as_echo "no" >&6; }
5096 test -n "$CC" && break
5097 done
5099 if test -z "$CC"; then
5100 ac_ct_CC=$CC
5101 for ac_prog in cl.exe
5103 # Extract the first word of "$ac_prog", so it can be a program name with args.
5104 set dummy $ac_prog; ac_word=$2
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106 $as_echo_n "checking for $ac_word... " >&6; }
5107 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5108 $as_echo_n "(cached) " >&6
5109 else
5110 if test -n "$ac_ct_CC"; then
5111 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5112 else
5113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114 for as_dir in $PATH
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
5118 for ac_exec_ext in '' $ac_executable_extensions; do
5119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_ac_ct_CC="$ac_prog"
5121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122 break 2
5124 done
5125 done
5126 IFS=$as_save_IFS
5130 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5131 if test -n "$ac_ct_CC"; then
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5133 $as_echo "$ac_ct_CC" >&6; }
5134 else
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136 $as_echo "no" >&6; }
5140 test -n "$ac_ct_CC" && break
5141 done
5143 if test "x$ac_ct_CC" = x; then
5144 CC=""
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147 yes:)
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5150 ac_tool_warned=yes ;;
5151 esac
5152 CC=$ac_ct_CC
5159 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5161 as_fn_error "no acceptable C compiler found in \$PATH
5162 See \`config.log' for more details." "$LINENO" 5; }
5164 # Provide some information about the compiler.
5165 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5166 set X $ac_compile
5167 ac_compiler=$2
5168 for ac_option in --version -v -V -qversion; do
5169 { { ac_try="$ac_compiler $ac_option >&5"
5170 case "(($ac_try" in
5171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5172 *) ac_try_echo=$ac_try;;
5173 esac
5174 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5175 $as_echo "$ac_try_echo"; } >&5
5176 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5177 ac_status=$?
5178 if test -s conftest.err; then
5179 sed '10a\
5180 ... rest of stderr output deleted ...
5181 10q' conftest.err >conftest.er1
5182 cat conftest.er1 >&5
5184 rm -f conftest.er1 conftest.err
5185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5186 test $ac_status = 0; }
5187 done
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190 /* end confdefs.h. */
5193 main ()
5197 return 0;
5199 _ACEOF
5200 ac_clean_files_save=$ac_clean_files
5201 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5202 # Try to create an executable without -o first, disregard a.out.
5203 # It will help us diagnose broken compilers, and finding out an intuition
5204 # of exeext.
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5206 $as_echo_n "checking whether the C compiler works... " >&6; }
5207 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5209 # The possible output files:
5210 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5212 ac_rmfiles=
5213 for ac_file in $ac_files
5215 case $ac_file in
5216 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5217 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5218 esac
5219 done
5220 rm -f $ac_rmfiles
5222 if { { ac_try="$ac_link_default"
5223 case "(($ac_try" in
5224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5225 *) ac_try_echo=$ac_try;;
5226 esac
5227 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5228 $as_echo "$ac_try_echo"; } >&5
5229 (eval "$ac_link_default") 2>&5
5230 ac_status=$?
5231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5232 test $ac_status = 0; }; then :
5233 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5234 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5235 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5236 # so that the user can short-circuit this test for compilers unknown to
5237 # Autoconf.
5238 for ac_file in $ac_files ''
5240 test -f "$ac_file" || continue
5241 case $ac_file in
5242 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5244 [ab].out )
5245 # We found the default executable, but exeext='' is most
5246 # certainly right.
5247 break;;
5248 *.* )
5249 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5250 then :; else
5251 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5253 # We set ac_cv_exeext here because the later test for it is not
5254 # safe: cross compilers may not add the suffix if given an `-o'
5255 # argument, so we may need to know it at that point already.
5256 # Even if this section looks crufty: it has the advantage of
5257 # actually working.
5258 break;;
5260 break;;
5261 esac
5262 done
5263 test "$ac_cv_exeext" = no && ac_cv_exeext=
5265 else
5266 ac_file=''
5268 if test -z "$ac_file"; then :
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5270 $as_echo "no" >&6; }
5271 $as_echo "$as_me: failed program was:" >&5
5272 sed 's/^/| /' conftest.$ac_ext >&5
5274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5276 { as_fn_set_status 77
5277 as_fn_error "C compiler cannot create executables
5278 See \`config.log' for more details." "$LINENO" 5; }; }
5279 else
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5281 $as_echo "yes" >&6; }
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5284 $as_echo_n "checking for C compiler default output file name... " >&6; }
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5286 $as_echo "$ac_file" >&6; }
5287 ac_exeext=$ac_cv_exeext
5289 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5290 ac_clean_files=$ac_clean_files_save
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5292 $as_echo_n "checking for suffix of executables... " >&6; }
5293 if { { ac_try="$ac_link"
5294 case "(($ac_try" in
5295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5296 *) ac_try_echo=$ac_try;;
5297 esac
5298 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5299 $as_echo "$ac_try_echo"; } >&5
5300 (eval "$ac_link") 2>&5
5301 ac_status=$?
5302 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5303 test $ac_status = 0; }; then :
5304 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5305 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5306 # work properly (i.e., refer to `conftest.exe'), while it won't with
5307 # `rm'.
5308 for ac_file in conftest.exe conftest conftest.*; do
5309 test -f "$ac_file" || continue
5310 case $ac_file in
5311 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5312 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5313 break;;
5314 * ) break;;
5315 esac
5316 done
5317 else
5318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5320 as_fn_error "cannot compute suffix of executables: cannot compile and link
5321 See \`config.log' for more details." "$LINENO" 5; }
5323 rm -f conftest conftest$ac_cv_exeext
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5325 $as_echo "$ac_cv_exeext" >&6; }
5327 rm -f conftest.$ac_ext
5328 EXEEXT=$ac_cv_exeext
5329 ac_exeext=$EXEEXT
5330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5331 /* end confdefs.h. */
5332 #include <stdio.h>
5334 main ()
5336 FILE *f = fopen ("conftest.out", "w");
5337 return ferror (f) || fclose (f) != 0;
5340 return 0;
5342 _ACEOF
5343 ac_clean_files="$ac_clean_files conftest.out"
5344 # Check that the compiler produces executables we can run. If not, either
5345 # the compiler is broken, or we cross compile.
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5347 $as_echo_n "checking whether we are cross compiling... " >&6; }
5348 if test "$cross_compiling" != yes; then
5349 { { ac_try="$ac_link"
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_link") 2>&5
5357 ac_status=$?
5358 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5359 test $ac_status = 0; }
5360 if { ac_try='./conftest$ac_cv_exeext'
5361 { { case "(($ac_try" in
5362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5363 *) ac_try_echo=$ac_try;;
5364 esac
5365 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5366 $as_echo "$ac_try_echo"; } >&5
5367 (eval "$ac_try") 2>&5
5368 ac_status=$?
5369 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5370 test $ac_status = 0; }; }; then
5371 cross_compiling=no
5372 else
5373 if test "$cross_compiling" = maybe; then
5374 cross_compiling=yes
5375 else
5376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5377 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5378 as_fn_error "cannot run C compiled programs.
5379 If you meant to cross compile, use \`--host'.
5380 See \`config.log' for more details." "$LINENO" 5; }
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5385 $as_echo "$cross_compiling" >&6; }
5387 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5388 ac_clean_files=$ac_clean_files_save
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5390 $as_echo_n "checking for suffix of object files... " >&6; }
5391 if test "${ac_cv_objext+set}" = set; then :
5392 $as_echo_n "(cached) " >&6
5393 else
5394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5395 /* end confdefs.h. */
5398 main ()
5402 return 0;
5404 _ACEOF
5405 rm -f conftest.o conftest.obj
5406 if { { ac_try="$ac_compile"
5407 case "(($ac_try" in
5408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5409 *) ac_try_echo=$ac_try;;
5410 esac
5411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5412 $as_echo "$ac_try_echo"; } >&5
5413 (eval "$ac_compile") 2>&5
5414 ac_status=$?
5415 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5416 test $ac_status = 0; }; then :
5417 for ac_file in conftest.o conftest.obj conftest.*; do
5418 test -f "$ac_file" || continue;
5419 case $ac_file in
5420 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5421 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5422 break;;
5423 esac
5424 done
5425 else
5426 $as_echo "$as_me: failed program was:" >&5
5427 sed 's/^/| /' conftest.$ac_ext >&5
5429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5431 as_fn_error "cannot compute suffix of object files: cannot compile
5432 See \`config.log' for more details." "$LINENO" 5; }
5434 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5437 $as_echo "$ac_cv_objext" >&6; }
5438 OBJEXT=$ac_cv_objext
5439 ac_objext=$OBJEXT
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5441 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5442 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5443 $as_echo_n "(cached) " >&6
5444 else
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5446 /* end confdefs.h. */
5449 main ()
5451 #ifndef __GNUC__
5452 choke me
5453 #endif
5456 return 0;
5458 _ACEOF
5459 if ac_fn_c_try_compile "$LINENO"; then :
5460 ac_compiler_gnu=yes
5461 else
5462 ac_compiler_gnu=no
5464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5469 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5470 if test $ac_compiler_gnu = yes; then
5471 GCC=yes
5472 else
5473 GCC=
5475 ac_test_CFLAGS=${CFLAGS+set}
5476 ac_save_CFLAGS=$CFLAGS
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5478 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5479 if test "${ac_cv_prog_cc_g+set}" = set; then :
5480 $as_echo_n "(cached) " >&6
5481 else
5482 ac_save_c_werror_flag=$ac_c_werror_flag
5483 ac_c_werror_flag=yes
5484 ac_cv_prog_cc_g=no
5485 CFLAGS="-g"
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487 /* end confdefs.h. */
5490 main ()
5494 return 0;
5496 _ACEOF
5497 if ac_fn_c_try_compile "$LINENO"; then :
5498 ac_cv_prog_cc_g=yes
5499 else
5500 CFLAGS=""
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502 /* end confdefs.h. */
5505 main ()
5509 return 0;
5511 _ACEOF
5512 if ac_fn_c_try_compile "$LINENO"; then :
5514 else
5515 ac_c_werror_flag=$ac_save_c_werror_flag
5516 CFLAGS="-g"
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518 /* end confdefs.h. */
5521 main ()
5525 return 0;
5527 _ACEOF
5528 if ac_fn_c_try_compile "$LINENO"; then :
5529 ac_cv_prog_cc_g=yes
5531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5536 ac_c_werror_flag=$ac_save_c_werror_flag
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5539 $as_echo "$ac_cv_prog_cc_g" >&6; }
5540 if test "$ac_test_CFLAGS" = set; then
5541 CFLAGS=$ac_save_CFLAGS
5542 elif test $ac_cv_prog_cc_g = yes; then
5543 if test "$GCC" = yes; then
5544 CFLAGS="-g -O2"
5545 else
5546 CFLAGS="-g"
5548 else
5549 if test "$GCC" = yes; then
5550 CFLAGS="-O2"
5551 else
5552 CFLAGS=
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5556 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5557 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5558 $as_echo_n "(cached) " >&6
5559 else
5560 ac_cv_prog_cc_c89=no
5561 ac_save_CC=$CC
5562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563 /* end confdefs.h. */
5564 #include <stdarg.h>
5565 #include <stdio.h>
5566 #include <sys/types.h>
5567 #include <sys/stat.h>
5568 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5569 struct buf { int x; };
5570 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5571 static char *e (p, i)
5572 char **p;
5573 int i;
5575 return p[i];
5577 static char *f (char * (*g) (char **, int), char **p, ...)
5579 char *s;
5580 va_list v;
5581 va_start (v,p);
5582 s = g (p, va_arg (v,int));
5583 va_end (v);
5584 return s;
5587 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5588 function prototypes and stuff, but not '\xHH' hex character constants.
5589 These don't provoke an error unfortunately, instead are silently treated
5590 as 'x'. The following induces an error, until -std is added to get
5591 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5592 array size at least. It's necessary to write '\x00'==0 to get something
5593 that's true only with -std. */
5594 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5596 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5597 inside strings and character constants. */
5598 #define FOO(x) 'x'
5599 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5601 int test (int i, double x);
5602 struct s1 {int (*f) (int a);};
5603 struct s2 {int (*f) (double a);};
5604 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5605 int argc;
5606 char **argv;
5608 main ()
5610 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5612 return 0;
5614 _ACEOF
5615 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5616 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5618 CC="$ac_save_CC $ac_arg"
5619 if ac_fn_c_try_compile "$LINENO"; then :
5620 ac_cv_prog_cc_c89=$ac_arg
5622 rm -f core conftest.err conftest.$ac_objext
5623 test "x$ac_cv_prog_cc_c89" != "xno" && break
5624 done
5625 rm -f conftest.$ac_ext
5626 CC=$ac_save_CC
5629 # AC_CACHE_VAL
5630 case "x$ac_cv_prog_cc_c89" in
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5633 $as_echo "none needed" >&6; } ;;
5634 xno)
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5636 $as_echo "unsupported" >&6; } ;;
5638 CC="$CC $ac_cv_prog_cc_c89"
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5640 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5641 esac
5642 if test "x$ac_cv_prog_cc_c89" != xno; then :
5646 ac_ext=c
5647 ac_cpp='$CPP $CPPFLAGS'
5648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5651 DEPDIR="${am__leading_dot}deps"
5653 ac_config_commands="$ac_config_commands depfiles"
5656 am_make=${MAKE-make}
5657 cat > confinc << 'END'
5658 am__doit:
5659 @echo this is the am__doit target
5660 .PHONY: am__doit
5662 # If we don't find an include directive, just comment out the code.
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5664 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5665 am__include="#"
5666 am__quote=
5667 _am_result=none
5668 # First try GNU make style include.
5669 echo "include confinc" > confmf
5670 # Ignore all kinds of additional output from `make'.
5671 case `$am_make -s -f confmf 2> /dev/null` in #(
5672 *the\ am__doit\ target*)
5673 am__include=include
5674 am__quote=
5675 _am_result=GNU
5677 esac
5678 # Now try BSD make style include.
5679 if test "$am__include" = "#"; then
5680 echo '.include "confinc"' > confmf
5681 case `$am_make -s -f confmf 2> /dev/null` in #(
5682 *the\ am__doit\ target*)
5683 am__include=.include
5684 am__quote="\""
5685 _am_result=BSD
5687 esac
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5692 $as_echo "$_am_result" >&6; }
5693 rm -f confinc confmf
5695 # Check whether --enable-dependency-tracking was given.
5696 if test "${enable_dependency_tracking+set}" = set; then :
5697 enableval=$enable_dependency_tracking;
5700 if test "x$enable_dependency_tracking" != xno; then
5701 am_depcomp="$ac_aux_dir/depcomp"
5702 AMDEPBACKSLASH='\'
5704 if test "x$enable_dependency_tracking" != xno; then
5705 AMDEP_TRUE=
5706 AMDEP_FALSE='#'
5707 else
5708 AMDEP_TRUE='#'
5709 AMDEP_FALSE=
5714 depcc="$CC" am_compiler_list=
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5717 $as_echo_n "checking dependency style of $depcc... " >&6; }
5718 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5719 $as_echo_n "(cached) " >&6
5720 else
5721 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5722 # We make a subdir and do the tests there. Otherwise we can end up
5723 # making bogus files that we don't know about and never remove. For
5724 # instance it was reported that on HP-UX the gcc test will end up
5725 # making a dummy file named `D' -- because `-MD' means `put the output
5726 # in D'.
5727 mkdir conftest.dir
5728 # Copy depcomp to subdir because otherwise we won't find it if we're
5729 # using a relative directory.
5730 cp "$am_depcomp" conftest.dir
5731 cd conftest.dir
5732 # We will build objects and dependencies in a subdirectory because
5733 # it helps to detect inapplicable dependency modes. For instance
5734 # both Tru64's cc and ICC support -MD to output dependencies as a
5735 # side effect of compilation, but ICC will put the dependencies in
5736 # the current directory while Tru64 will put them in the object
5737 # directory.
5738 mkdir sub
5740 am_cv_CC_dependencies_compiler_type=none
5741 if test "$am_compiler_list" = ""; then
5742 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5744 am__universal=false
5745 case " $depcc " in #(
5746 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5747 esac
5749 for depmode in $am_compiler_list; do
5750 # Setup a source with many dependencies, because some compilers
5751 # like to wrap large dependency lists on column 80 (with \), and
5752 # we should not choose a depcomp mode which is confused by this.
5754 # We need to recreate these files for each test, as the compiler may
5755 # overwrite some of them when testing with obscure command lines.
5756 # This happens at least with the AIX C compiler.
5757 : > sub/conftest.c
5758 for i in 1 2 3 4 5 6; do
5759 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5760 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5761 # Solaris 8's {/usr,}/bin/sh.
5762 touch sub/conftst$i.h
5763 done
5764 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5766 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5767 # mode. It turns out that the SunPro C++ compiler does not properly
5768 # handle `-M -o', and we need to detect this. Also, some Intel
5769 # versions had trouble with output in subdirs
5770 am__obj=sub/conftest.${OBJEXT-o}
5771 am__minus_obj="-o $am__obj"
5772 case $depmode in
5773 gcc)
5774 # This depmode causes a compiler race in universal mode.
5775 test "$am__universal" = false || continue
5777 nosideeffect)
5778 # after this tag, mechanisms are not by side-effect, so they'll
5779 # only be used when explicitly requested
5780 if test "x$enable_dependency_tracking" = xyes; then
5781 continue
5782 else
5783 break
5786 msvisualcpp | msvcmsys)
5787 # This compiler won't grok `-c -o', but also, the minuso test has
5788 # not run yet. These depmodes are late enough in the game, and
5789 # so weak that their functioning should not be impacted.
5790 am__obj=conftest.${OBJEXT-o}
5791 am__minus_obj=
5793 none) break ;;
5794 esac
5795 if depmode=$depmode \
5796 source=sub/conftest.c object=$am__obj \
5797 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5798 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5799 >/dev/null 2>conftest.err &&
5800 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5801 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5802 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5803 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5804 # icc doesn't choke on unknown options, it will just issue warnings
5805 # or remarks (even with -Werror). So we grep stderr for any message
5806 # that says an option was ignored or not supported.
5807 # When given -MP, icc 7.0 and 7.1 complain thusly:
5808 # icc: Command line warning: ignoring option '-M'; no argument required
5809 # The diagnosis changed in icc 8.0:
5810 # icc: Command line remark: option '-MP' not supported
5811 if (grep 'ignoring option' conftest.err ||
5812 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5813 am_cv_CC_dependencies_compiler_type=$depmode
5814 break
5817 done
5819 cd ..
5820 rm -rf conftest.dir
5821 else
5822 am_cv_CC_dependencies_compiler_type=none
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5827 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5828 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5831 test "x$enable_dependency_tracking" != xno \
5832 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5833 am__fastdepCC_TRUE=
5834 am__fastdepCC_FALSE='#'
5835 else
5836 am__fastdepCC_TRUE='#'
5837 am__fastdepCC_FALSE=
5841 if test "x$CC" != xcc; then
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5843 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5844 else
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5846 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5848 set dummy $CC; ac_cc=`$as_echo "$2" |
5849 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5850 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5851 $as_echo_n "(cached) " >&6
5852 else
5853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5854 /* end confdefs.h. */
5857 main ()
5861 return 0;
5863 _ACEOF
5864 # Make sure it works both with $CC and with simple cc.
5865 # We do the test twice because some compilers refuse to overwrite an
5866 # existing .o file with -o, though they will create one.
5867 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5868 rm -f conftest2.*
5869 if { { case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872 esac
5873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5874 $as_echo "$ac_try_echo"; } >&5
5875 (eval "$ac_try") 2>&5
5876 ac_status=$?
5877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5878 test $ac_status = 0; } &&
5879 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881 *) ac_try_echo=$ac_try;;
5882 esac
5883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5884 $as_echo "$ac_try_echo"; } >&5
5885 (eval "$ac_try") 2>&5
5886 ac_status=$?
5887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5888 test $ac_status = 0; };
5889 then
5890 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5891 if test "x$CC" != xcc; then
5892 # Test first that cc exists at all.
5893 if { ac_try='cc -c conftest.$ac_ext >&5'
5894 { { case "(($ac_try" in
5895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5896 *) ac_try_echo=$ac_try;;
5897 esac
5898 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5899 $as_echo "$ac_try_echo"; } >&5
5900 (eval "$ac_try") 2>&5
5901 ac_status=$?
5902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5903 test $ac_status = 0; }; }; then
5904 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5905 rm -f conftest2.*
5906 if { { case "(($ac_try" in
5907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5908 *) ac_try_echo=$ac_try;;
5909 esac
5910 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5911 $as_echo "$ac_try_echo"; } >&5
5912 (eval "$ac_try") 2>&5
5913 ac_status=$?
5914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5915 test $ac_status = 0; } &&
5916 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5918 *) ac_try_echo=$ac_try;;
5919 esac
5920 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5921 $as_echo "$ac_try_echo"; } >&5
5922 (eval "$ac_try") 2>&5
5923 ac_status=$?
5924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5925 test $ac_status = 0; };
5926 then
5927 # cc works too.
5929 else
5930 # cc exists but doesn't like -o.
5931 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5935 else
5936 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5938 rm -f core conftest*
5941 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943 $as_echo "yes" >&6; }
5944 else
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5946 $as_echo "no" >&6; }
5948 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5952 # FIXME: we rely on the cache variable name because
5953 # there is no other way.
5954 set dummy $CC
5955 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5956 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5957 if test "$am_t" != yes; then
5958 # Losing compiler, so override with the script.
5959 # FIXME: It is wrong to rewrite CC.
5960 # But if we don't then we get into trouble of one sort or another.
5961 # A longer-term fix would be to have automake use am__CC in this case,
5962 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5963 CC="$am_aux_dir/compile $CC"
5968 if test x$GCC = xyes; then
5969 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5970 else
5971 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5974 if test "x$opsys" = "xmingw32"; then
5975 BUILDING_FOR_WINDOWSNT_TRUE=
5976 BUILDING_FOR_WINDOWSNT_FALSE='#'
5977 else
5978 BUILDING_FOR_WINDOWSNT_TRUE='#'
5979 BUILDING_FOR_WINDOWSNT_FALSE=
5983 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5984 # as we don't use them.
5986 # Avoid gnulib's threadlib module, as we do threads our own way.
5989 # Initialize gnulib right after choosing the compiler.
5991 ac_ext=c
5992 ac_cpp='$CPP $CPPFLAGS'
5993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5997 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5998 # On Suns, sometimes $CPP names a directory.
5999 if test -n "$CPP" && test -d "$CPP"; then
6000 CPP=
6002 if test -z "$CPP"; then
6003 if test "${ac_cv_prog_CPP+set}" = set; then :
6004 $as_echo_n "(cached) " >&6
6005 else
6006 # Double quotes because CPP needs to be expanded
6007 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6009 ac_preproc_ok=false
6010 for ac_c_preproc_warn_flag in '' yes
6012 # Use a header file that comes with gcc, so configuring glibc
6013 # with a fresh cross-compiler works.
6014 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6015 # <limits.h> exists even on freestanding compilers.
6016 # On the NeXT, cc -E runs the code through the compiler's parser,
6017 # not just through cpp. "Syntax error" is here to catch this case.
6018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h. */
6020 #ifdef __STDC__
6021 # include <limits.h>
6022 #else
6023 # include <assert.h>
6024 #endif
6025 Syntax error
6026 _ACEOF
6027 if ac_fn_c_try_cpp "$LINENO"; then :
6029 else
6030 # Broken: fails on valid input.
6031 continue
6033 rm -f conftest.err conftest.$ac_ext
6035 # OK, works on sane cases. Now check whether nonexistent headers
6036 # can be detected and how.
6037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6038 /* end confdefs.h. */
6039 #include <ac_nonexistent.h>
6040 _ACEOF
6041 if ac_fn_c_try_cpp "$LINENO"; then :
6042 # Broken: success on invalid input.
6043 continue
6044 else
6045 # Passes both tests.
6046 ac_preproc_ok=:
6047 break
6049 rm -f conftest.err conftest.$ac_ext
6051 done
6052 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6053 rm -f conftest.err conftest.$ac_ext
6054 if $ac_preproc_ok; then :
6055 break
6058 done
6059 ac_cv_prog_CPP=$CPP
6062 CPP=$ac_cv_prog_CPP
6063 else
6064 ac_cv_prog_CPP=$CPP
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6067 $as_echo "$CPP" >&6; }
6068 ac_preproc_ok=false
6069 for ac_c_preproc_warn_flag in '' yes
6071 # Use a header file that comes with gcc, so configuring glibc
6072 # with a fresh cross-compiler works.
6073 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6074 # <limits.h> exists even on freestanding compilers.
6075 # On the NeXT, cc -E runs the code through the compiler's parser,
6076 # not just through cpp. "Syntax error" is here to catch this case.
6077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6078 /* end confdefs.h. */
6079 #ifdef __STDC__
6080 # include <limits.h>
6081 #else
6082 # include <assert.h>
6083 #endif
6084 Syntax error
6085 _ACEOF
6086 if ac_fn_c_try_cpp "$LINENO"; then :
6088 else
6089 # Broken: fails on valid input.
6090 continue
6092 rm -f conftest.err conftest.$ac_ext
6094 # OK, works on sane cases. Now check whether nonexistent headers
6095 # can be detected and how.
6096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h. */
6098 #include <ac_nonexistent.h>
6099 _ACEOF
6100 if ac_fn_c_try_cpp "$LINENO"; then :
6101 # Broken: success on invalid input.
6102 continue
6103 else
6104 # Passes both tests.
6105 ac_preproc_ok=:
6106 break
6108 rm -f conftest.err conftest.$ac_ext
6110 done
6111 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6112 rm -f conftest.err conftest.$ac_ext
6113 if $ac_preproc_ok; then :
6115 else
6116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6117 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6118 as_fn_error "C preprocessor \"$CPP\" fails sanity check
6119 See \`config.log' for more details." "$LINENO" 5; }
6122 ac_ext=c
6123 ac_cpp='$CPP $CPPFLAGS'
6124 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6125 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6126 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6130 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6131 if test "${ac_cv_path_GREP+set}" = set; then :
6132 $as_echo_n "(cached) " >&6
6133 else
6134 if test -z "$GREP"; then
6135 ac_path_GREP_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
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
6142 for ac_prog in grep ggrep; do
6143 for ac_exec_ext in '' $ac_executable_extensions; do
6144 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6145 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6146 # Check for GNU ac_path_GREP and select it if it is found.
6147 # Check for GNU $ac_path_GREP
6148 case `"$ac_path_GREP" --version 2>&1` in
6149 *GNU*)
6150 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6152 ac_count=0
6153 $as_echo_n 0123456789 >"conftest.in"
6154 while :
6156 cat "conftest.in" "conftest.in" >"conftest.tmp"
6157 mv "conftest.tmp" "conftest.in"
6158 cp "conftest.in" "conftest.nl"
6159 $as_echo 'GREP' >> "conftest.nl"
6160 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "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_GREP_max-0}; then
6164 # Best one so far, save it but keep looking for a better one
6165 ac_cv_path_GREP="$ac_path_GREP"
6166 ac_path_GREP_max=$ac_count
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
6174 $ac_path_GREP_found && break 3
6175 done
6176 done
6177 done
6178 IFS=$as_save_IFS
6179 if test -z "$ac_cv_path_GREP"; then
6180 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6182 else
6183 ac_cv_path_GREP=$GREP
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6188 $as_echo "$ac_cv_path_GREP" >&6; }
6189 GREP="$ac_cv_path_GREP"
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6193 $as_echo_n "checking for egrep... " >&6; }
6194 if test "${ac_cv_path_EGREP+set}" = set; then :
6195 $as_echo_n "(cached) " >&6
6196 else
6197 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6198 then ac_cv_path_EGREP="$GREP -E"
6199 else
6200 if test -z "$EGREP"; then
6201 ac_path_EGREP_found=false
6202 # Loop through the user's path and test for each of PROGNAME-LIST
6203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6206 IFS=$as_save_IFS
6207 test -z "$as_dir" && as_dir=.
6208 for ac_prog in egrep; do
6209 for ac_exec_ext in '' $ac_executable_extensions; do
6210 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6211 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6212 # Check for GNU ac_path_EGREP and select it if it is found.
6213 # Check for GNU $ac_path_EGREP
6214 case `"$ac_path_EGREP" --version 2>&1` in
6215 *GNU*)
6216 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6218 ac_count=0
6219 $as_echo_n 0123456789 >"conftest.in"
6220 while :
6222 cat "conftest.in" "conftest.in" >"conftest.tmp"
6223 mv "conftest.tmp" "conftest.in"
6224 cp "conftest.in" "conftest.nl"
6225 $as_echo 'EGREP' >> "conftest.nl"
6226 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6227 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6228 as_fn_arith $ac_count + 1 && ac_count=$as_val
6229 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6230 # Best one so far, save it but keep looking for a better one
6231 ac_cv_path_EGREP="$ac_path_EGREP"
6232 ac_path_EGREP_max=$ac_count
6234 # 10*(2^10) chars as input seems more than enough
6235 test $ac_count -gt 10 && break
6236 done
6237 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6238 esac
6240 $ac_path_EGREP_found && break 3
6241 done
6242 done
6243 done
6244 IFS=$as_save_IFS
6245 if test -z "$ac_cv_path_EGREP"; then
6246 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6248 else
6249 ac_cv_path_EGREP=$EGREP
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6255 $as_echo "$ac_cv_path_EGREP" >&6; }
6256 EGREP="$ac_cv_path_EGREP"
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6262 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6263 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6264 $as_echo_n "(cached) " >&6
6265 else
6267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6268 /* end confdefs.h. */
6270 #ifdef __ACK__
6271 Amsterdam
6272 #endif
6274 _ACEOF
6275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6276 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6277 gl_cv_c_amsterdam_compiler=yes
6278 else
6279 gl_cv_c_amsterdam_compiler=no
6281 rm -f conftest*
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6286 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6287 if test -z "$AR"; then
6288 if test $gl_cv_c_amsterdam_compiler = yes; then
6289 AR='cc -c.a'
6290 if test -z "$ARFLAGS"; then
6291 ARFLAGS='-o'
6293 else
6294 if test -n "$ac_tool_prefix"; then
6295 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6296 set dummy ${ac_tool_prefix}ar; ac_word=$2
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6298 $as_echo_n "checking for $ac_word... " >&6; }
6299 if test "${ac_cv_prog_AR+set}" = set; then :
6300 $as_echo_n "(cached) " >&6
6301 else
6302 if test -n "$AR"; then
6303 ac_cv_prog_AR="$AR" # Let the user override the test.
6304 else
6305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6306 for as_dir in $PATH
6308 IFS=$as_save_IFS
6309 test -z "$as_dir" && as_dir=.
6310 for ac_exec_ext in '' $ac_executable_extensions; do
6311 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6312 ac_cv_prog_AR="${ac_tool_prefix}ar"
6313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6314 break 2
6316 done
6317 done
6318 IFS=$as_save_IFS
6322 AR=$ac_cv_prog_AR
6323 if test -n "$AR"; then
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6325 $as_echo "$AR" >&6; }
6326 else
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328 $as_echo "no" >&6; }
6333 if test -z "$ac_cv_prog_AR"; then
6334 ac_ct_AR=$AR
6335 # Extract the first word of "ar", so it can be a program name with args.
6336 set dummy ar; ac_word=$2
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338 $as_echo_n "checking for $ac_word... " >&6; }
6339 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6340 $as_echo_n "(cached) " >&6
6341 else
6342 if test -n "$ac_ct_AR"; then
6343 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6344 else
6345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346 for as_dir in $PATH
6348 IFS=$as_save_IFS
6349 test -z "$as_dir" && as_dir=.
6350 for ac_exec_ext in '' $ac_executable_extensions; do
6351 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6352 ac_cv_prog_ac_ct_AR="ar"
6353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354 break 2
6356 done
6357 done
6358 IFS=$as_save_IFS
6362 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6363 if test -n "$ac_ct_AR"; then
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6365 $as_echo "$ac_ct_AR" >&6; }
6366 else
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368 $as_echo "no" >&6; }
6371 if test "x$ac_ct_AR" = x; then
6372 AR="ar"
6373 else
6374 case $cross_compiling:$ac_tool_warned in
6375 yes:)
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6377 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6378 ac_tool_warned=yes ;;
6379 esac
6380 AR=$ac_ct_AR
6382 else
6383 AR="$ac_cv_prog_AR"
6386 if test -z "$ARFLAGS"; then
6387 ARFLAGS='cru'
6390 else
6391 if test -z "$ARFLAGS"; then
6392 ARFLAGS='cru'
6397 if test -z "$RANLIB"; then
6398 if test $gl_cv_c_amsterdam_compiler = yes; then
6399 RANLIB=':'
6400 else
6401 if test -n "$ac_tool_prefix"; then
6402 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6403 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405 $as_echo_n "checking for $ac_word... " >&6; }
6406 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6407 $as_echo_n "(cached) " >&6
6408 else
6409 if test -n "$RANLIB"; then
6410 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6411 else
6412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6413 for as_dir in $PATH
6415 IFS=$as_save_IFS
6416 test -z "$as_dir" && as_dir=.
6417 for ac_exec_ext in '' $ac_executable_extensions; do
6418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6419 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6421 break 2
6423 done
6424 done
6425 IFS=$as_save_IFS
6429 RANLIB=$ac_cv_prog_RANLIB
6430 if test -n "$RANLIB"; then
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6432 $as_echo "$RANLIB" >&6; }
6433 else
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435 $as_echo "no" >&6; }
6440 if test -z "$ac_cv_prog_RANLIB"; then
6441 ac_ct_RANLIB=$RANLIB
6442 # Extract the first word of "ranlib", so it can be a program name with args.
6443 set dummy ranlib; ac_word=$2
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6445 $as_echo_n "checking for $ac_word... " >&6; }
6446 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6447 $as_echo_n "(cached) " >&6
6448 else
6449 if test -n "$ac_ct_RANLIB"; then
6450 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6451 else
6452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453 for as_dir in $PATH
6455 IFS=$as_save_IFS
6456 test -z "$as_dir" && as_dir=.
6457 for ac_exec_ext in '' $ac_executable_extensions; do
6458 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6459 ac_cv_prog_ac_ct_RANLIB="ranlib"
6460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461 break 2
6463 done
6464 done
6465 IFS=$as_save_IFS
6469 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6470 if test -n "$ac_ct_RANLIB"; then
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6472 $as_echo "$ac_ct_RANLIB" >&6; }
6473 else
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475 $as_echo "no" >&6; }
6478 if test "x$ac_ct_RANLIB" = x; then
6479 RANLIB=":"
6480 else
6481 case $cross_compiling:$ac_tool_warned in
6482 yes:)
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6484 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6485 ac_tool_warned=yes ;;
6486 esac
6487 RANLIB=$ac_ct_RANLIB
6489 else
6490 RANLIB="$ac_cv_prog_RANLIB"
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6498 $as_echo_n "checking for ANSI C header files... " >&6; }
6499 if test "${ac_cv_header_stdc+set}" = set; then :
6500 $as_echo_n "(cached) " >&6
6501 else
6502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6503 /* end confdefs.h. */
6504 #include <stdlib.h>
6505 #include <stdarg.h>
6506 #include <string.h>
6507 #include <float.h>
6510 main ()
6514 return 0;
6516 _ACEOF
6517 if ac_fn_c_try_compile "$LINENO"; then :
6518 ac_cv_header_stdc=yes
6519 else
6520 ac_cv_header_stdc=no
6522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6524 if test $ac_cv_header_stdc = yes; then
6525 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527 /* end confdefs.h. */
6528 #include <string.h>
6530 _ACEOF
6531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6532 $EGREP "memchr" >/dev/null 2>&1; then :
6534 else
6535 ac_cv_header_stdc=no
6537 rm -f conftest*
6541 if test $ac_cv_header_stdc = yes; then
6542 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6544 /* end confdefs.h. */
6545 #include <stdlib.h>
6547 _ACEOF
6548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6549 $EGREP "free" >/dev/null 2>&1; then :
6551 else
6552 ac_cv_header_stdc=no
6554 rm -f conftest*
6558 if test $ac_cv_header_stdc = yes; then
6559 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6560 if test "$cross_compiling" = yes; then :
6562 else
6563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6564 /* end confdefs.h. */
6565 #include <ctype.h>
6566 #include <stdlib.h>
6567 #if ((' ' & 0x0FF) == 0x020)
6568 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6569 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6570 #else
6571 # define ISLOWER(c) \
6572 (('a' <= (c) && (c) <= 'i') \
6573 || ('j' <= (c) && (c) <= 'r') \
6574 || ('s' <= (c) && (c) <= 'z'))
6575 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6576 #endif
6578 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6580 main ()
6582 int i;
6583 for (i = 0; i < 256; i++)
6584 if (XOR (islower (i), ISLOWER (i))
6585 || toupper (i) != TOUPPER (i))
6586 return 2;
6587 return 0;
6589 _ACEOF
6590 if ac_fn_c_try_run "$LINENO"; then :
6592 else
6593 ac_cv_header_stdc=no
6595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6596 conftest.$ac_objext conftest.beam conftest.$ac_ext
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6602 $as_echo "$ac_cv_header_stdc" >&6; }
6603 if test $ac_cv_header_stdc = yes; then
6605 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6609 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6610 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6611 inttypes.h stdint.h unistd.h
6612 do :
6613 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6614 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6616 eval as_val=\$$as_ac_Header
6617 if test "x$as_val" = x""yes; then :
6618 cat >>confdefs.h <<_ACEOF
6619 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6620 _ACEOF
6624 done
6628 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6629 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6630 MINIX=yes
6631 else
6632 MINIX=
6636 if test "$MINIX" = yes; then
6638 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6641 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6644 $as_echo "#define _MINIX 1" >>confdefs.h
6647 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6653 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6654 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6655 $as_echo_n "(cached) " >&6
6656 else
6657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6658 /* end confdefs.h. */
6660 # define __EXTENSIONS__ 1
6661 $ac_includes_default
6663 main ()
6667 return 0;
6669 _ACEOF
6670 if ac_fn_c_try_compile "$LINENO"; then :
6671 ac_cv_safe_to_define___extensions__=yes
6672 else
6673 ac_cv_safe_to_define___extensions__=no
6675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6678 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6679 test $ac_cv_safe_to_define___extensions__ = yes &&
6680 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6682 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6684 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6686 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6688 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6690 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6693 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6694 if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6695 $as_echo_n "(cached) " >&6
6696 else
6697 ac_cv_should_define__xopen_source=no
6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6699 /* end confdefs.h. */
6701 #include <wchar.h>
6702 mbstate_t x;
6704 main ()
6708 return 0;
6710 _ACEOF
6711 if ac_fn_c_try_compile "$LINENO"; then :
6713 else
6714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715 /* end confdefs.h. */
6717 #define _XOPEN_SOURCE 500
6718 #include <wchar.h>
6719 mbstate_t x;
6721 main ()
6725 return 0;
6727 _ACEOF
6728 if ac_fn_c_try_compile "$LINENO"; then :
6729 ac_cv_should_define__xopen_source=yes
6731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6736 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6737 test $ac_cv_should_define__xopen_source = yes &&
6738 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6747 # Check whether --enable-largefile was given.
6748 if test "${enable_largefile+set}" = set; then :
6749 enableval=$enable_largefile;
6752 if test "$enable_largefile" != no; then
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6755 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6756 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6757 $as_echo_n "(cached) " >&6
6758 else
6759 ac_cv_sys_largefile_CC=no
6760 if test "$GCC" != yes; then
6761 ac_save_CC=$CC
6762 while :; do
6763 # IRIX 6.2 and later do not support large files by default,
6764 # so use the C compiler's -n32 option if that helps.
6765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6766 /* end confdefs.h. */
6767 #include <sys/types.h>
6768 /* Check that off_t can represent 2**63 - 1 correctly.
6769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6770 since some C++ compilers masquerading as C compilers
6771 incorrectly reject 9223372036854775807. */
6772 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6774 && LARGE_OFF_T % 2147483647 == 1)
6775 ? 1 : -1];
6777 main ()
6781 return 0;
6783 _ACEOF
6784 if ac_fn_c_try_compile "$LINENO"; then :
6785 break
6787 rm -f core conftest.err conftest.$ac_objext
6788 CC="$CC -n32"
6789 if ac_fn_c_try_compile "$LINENO"; then :
6790 ac_cv_sys_largefile_CC=' -n32'; break
6792 rm -f core conftest.err conftest.$ac_objext
6793 break
6794 done
6795 CC=$ac_save_CC
6796 rm -f conftest.$ac_ext
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6800 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6801 if test "$ac_cv_sys_largefile_CC" != no; then
6802 CC=$CC$ac_cv_sys_largefile_CC
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6806 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6807 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6808 $as_echo_n "(cached) " >&6
6809 else
6810 while :; do
6811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812 /* end confdefs.h. */
6813 #include <sys/types.h>
6814 /* Check that off_t can represent 2**63 - 1 correctly.
6815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6816 since some C++ compilers masquerading as C compilers
6817 incorrectly reject 9223372036854775807. */
6818 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6820 && LARGE_OFF_T % 2147483647 == 1)
6821 ? 1 : -1];
6823 main ()
6827 return 0;
6829 _ACEOF
6830 if ac_fn_c_try_compile "$LINENO"; then :
6831 ac_cv_sys_file_offset_bits=no; break
6833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6835 /* end confdefs.h. */
6836 #define _FILE_OFFSET_BITS 64
6837 #include <sys/types.h>
6838 /* Check that off_t can represent 2**63 - 1 correctly.
6839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6840 since some C++ compilers masquerading as C compilers
6841 incorrectly reject 9223372036854775807. */
6842 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6844 && LARGE_OFF_T % 2147483647 == 1)
6845 ? 1 : -1];
6847 main ()
6851 return 0;
6853 _ACEOF
6854 if ac_fn_c_try_compile "$LINENO"; then :
6855 ac_cv_sys_file_offset_bits=64; break
6857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6858 ac_cv_sys_file_offset_bits=unknown
6859 break
6860 done
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6863 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6864 case $ac_cv_sys_file_offset_bits in #(
6865 no | unknown) ;;
6867 cat >>confdefs.h <<_ACEOF
6868 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6869 _ACEOF
6871 esac
6872 rm -rf conftest*
6873 if test $ac_cv_sys_file_offset_bits = unknown; then
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6875 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6876 if test "${ac_cv_sys_large_files+set}" = set; then :
6877 $as_echo_n "(cached) " >&6
6878 else
6879 while :; do
6880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6881 /* end confdefs.h. */
6882 #include <sys/types.h>
6883 /* Check that off_t can represent 2**63 - 1 correctly.
6884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6885 since some C++ compilers masquerading as C compilers
6886 incorrectly reject 9223372036854775807. */
6887 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6889 && LARGE_OFF_T % 2147483647 == 1)
6890 ? 1 : -1];
6892 main ()
6896 return 0;
6898 _ACEOF
6899 if ac_fn_c_try_compile "$LINENO"; then :
6900 ac_cv_sys_large_files=no; break
6902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6904 /* end confdefs.h. */
6905 #define _LARGE_FILES 1
6906 #include <sys/types.h>
6907 /* Check that off_t can represent 2**63 - 1 correctly.
6908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6909 since some C++ compilers masquerading as C compilers
6910 incorrectly reject 9223372036854775807. */
6911 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6913 && LARGE_OFF_T % 2147483647 == 1)
6914 ? 1 : -1];
6916 main ()
6920 return 0;
6922 _ACEOF
6923 if ac_fn_c_try_compile "$LINENO"; then :
6924 ac_cv_sys_large_files=1; break
6926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927 ac_cv_sys_large_files=unknown
6928 break
6929 done
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6932 $as_echo "$ac_cv_sys_large_files" >&6; }
6933 case $ac_cv_sys_large_files in #(
6934 no | unknown) ;;
6936 cat >>confdefs.h <<_ACEOF
6937 #define _LARGE_FILES $ac_cv_sys_large_files
6938 _ACEOF
6940 esac
6941 rm -rf conftest*
6945 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6949 case $ac_cv_prog_cc_stdc in #(
6950 no) :
6951 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6952 *) :
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6954 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6955 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6956 $as_echo_n "(cached) " >&6
6957 else
6958 ac_cv_prog_cc_c99=no
6959 ac_save_CC=$CC
6960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6961 /* end confdefs.h. */
6962 #include <stdarg.h>
6963 #include <stdbool.h>
6964 #include <stdlib.h>
6965 #include <wchar.h>
6966 #include <stdio.h>
6968 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6969 #define debug(...) fprintf (stderr, __VA_ARGS__)
6970 #define showlist(...) puts (#__VA_ARGS__)
6971 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6972 static void
6973 test_varargs_macros (void)
6975 int x = 1234;
6976 int y = 5678;
6977 debug ("Flag");
6978 debug ("X = %d\n", x);
6979 showlist (The first, second, and third items.);
6980 report (x>y, "x is %d but y is %d", x, y);
6983 // Check long long types.
6984 #define BIG64 18446744073709551615ull
6985 #define BIG32 4294967295ul
6986 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6987 #if !BIG_OK
6988 your preprocessor is broken;
6989 #endif
6990 #if BIG_OK
6991 #else
6992 your preprocessor is broken;
6993 #endif
6994 static long long int bignum = -9223372036854775807LL;
6995 static unsigned long long int ubignum = BIG64;
6997 struct incomplete_array
6999 int datasize;
7000 double data[];
7003 struct named_init {
7004 int number;
7005 const wchar_t *name;
7006 double average;
7009 typedef const char *ccp;
7011 static inline int
7012 test_restrict (ccp restrict text)
7014 // See if C++-style comments work.
7015 // Iterate through items via the restricted pointer.
7016 // Also check for declarations in for loops.
7017 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7018 continue;
7019 return 0;
7022 // Check varargs and va_copy.
7023 static void
7024 test_varargs (const char *format, ...)
7026 va_list args;
7027 va_start (args, format);
7028 va_list args_copy;
7029 va_copy (args_copy, args);
7031 const char *str;
7032 int number;
7033 float fnumber;
7035 while (*format)
7037 switch (*format++)
7039 case 's': // string
7040 str = va_arg (args_copy, const char *);
7041 break;
7042 case 'd': // int
7043 number = va_arg (args_copy, int);
7044 break;
7045 case 'f': // float
7046 fnumber = va_arg (args_copy, double);
7047 break;
7048 default:
7049 break;
7052 va_end (args_copy);
7053 va_end (args);
7057 main ()
7060 // Check bool.
7061 _Bool success = false;
7063 // Check restrict.
7064 if (test_restrict ("String literal") == 0)
7065 success = true;
7066 char *restrict newvar = "Another string";
7068 // Check varargs.
7069 test_varargs ("s, d' f .", "string", 65, 34.234);
7070 test_varargs_macros ();
7072 // Check flexible array members.
7073 struct incomplete_array *ia =
7074 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7075 ia->datasize = 10;
7076 for (int i = 0; i < ia->datasize; ++i)
7077 ia->data[i] = i * 1.234;
7079 // Check named initializers.
7080 struct named_init ni = {
7081 .number = 34,
7082 .name = L"Test wide string",
7083 .average = 543.34343,
7086 ni.number = 58;
7088 int dynamic_array[ni.number];
7089 dynamic_array[ni.number - 1] = 543;
7091 // work around unused variable warnings
7092 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7093 || dynamic_array[ni.number - 1] != 543);
7096 return 0;
7098 _ACEOF
7099 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7101 CC="$ac_save_CC $ac_arg"
7102 if ac_fn_c_try_compile "$LINENO"; then :
7103 ac_cv_prog_cc_c99=$ac_arg
7105 rm -f core conftest.err conftest.$ac_objext
7106 test "x$ac_cv_prog_cc_c99" != "xno" && break
7107 done
7108 rm -f conftest.$ac_ext
7109 CC=$ac_save_CC
7112 # AC_CACHE_VAL
7113 case "x$ac_cv_prog_cc_c99" in
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7116 $as_echo "none needed" >&6; } ;;
7117 xno)
7118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7119 $as_echo "unsupported" >&6; } ;;
7121 CC="$CC $ac_cv_prog_cc_c99"
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7123 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7124 esac
7125 if test "x$ac_cv_prog_cc_c99" != xno; then :
7126 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7127 else
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7129 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7130 if test "${ac_cv_prog_cc_c89+set}" = set; then :
7131 $as_echo_n "(cached) " >&6
7132 else
7133 ac_cv_prog_cc_c89=no
7134 ac_save_CC=$CC
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136 /* end confdefs.h. */
7137 #include <stdarg.h>
7138 #include <stdio.h>
7139 #include <sys/types.h>
7140 #include <sys/stat.h>
7141 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7142 struct buf { int x; };
7143 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7144 static char *e (p, i)
7145 char **p;
7146 int i;
7148 return p[i];
7150 static char *f (char * (*g) (char **, int), char **p, ...)
7152 char *s;
7153 va_list v;
7154 va_start (v,p);
7155 s = g (p, va_arg (v,int));
7156 va_end (v);
7157 return s;
7160 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7161 function prototypes and stuff, but not '\xHH' hex character constants.
7162 These don't provoke an error unfortunately, instead are silently treated
7163 as 'x'. The following induces an error, until -std is added to get
7164 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7165 array size at least. It's necessary to write '\x00'==0 to get something
7166 that's true only with -std. */
7167 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7169 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7170 inside strings and character constants. */
7171 #define FOO(x) 'x'
7172 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7174 int test (int i, double x);
7175 struct s1 {int (*f) (int a);};
7176 struct s2 {int (*f) (double a);};
7177 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7178 int argc;
7179 char **argv;
7181 main ()
7183 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7185 return 0;
7187 _ACEOF
7188 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7189 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7191 CC="$ac_save_CC $ac_arg"
7192 if ac_fn_c_try_compile "$LINENO"; then :
7193 ac_cv_prog_cc_c89=$ac_arg
7195 rm -f core conftest.err conftest.$ac_objext
7196 test "x$ac_cv_prog_cc_c89" != "xno" && break
7197 done
7198 rm -f conftest.$ac_ext
7199 CC=$ac_save_CC
7202 # AC_CACHE_VAL
7203 case "x$ac_cv_prog_cc_c89" in
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7206 $as_echo "none needed" >&6; } ;;
7207 xno)
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7209 $as_echo "unsupported" >&6; } ;;
7211 CC="$CC $ac_cv_prog_cc_c89"
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7213 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7214 esac
7215 if test "x$ac_cv_prog_cc_c89" != xno; then :
7216 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7217 else
7218 ac_cv_prog_cc_stdc=no
7223 esac
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7225 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
7226 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
7227 $as_echo_n "(cached) " >&6
7230 case $ac_cv_prog_cc_stdc in #(
7231 no) :
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7233 $as_echo "unsupported" >&6; } ;; #(
7234 '') :
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7236 $as_echo "none needed" >&6; } ;; #(
7237 *) :
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7239 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7240 esac
7244 # Code from module alloca-opt:
7245 # Code from module allocator:
7246 # Code from module at-internal:
7247 # Code from module binary-io:
7248 # Code from module c-ctype:
7249 # Code from module c-strcase:
7250 # Code from module careadlinkat:
7251 # Code from module clock-time:
7252 # Code from module close-stream:
7253 # Code from module crypto/md5:
7254 # Code from module crypto/sha1:
7255 # Code from module crypto/sha256:
7256 # Code from module crypto/sha512:
7257 # Code from module dirent:
7258 # Code from module dosname:
7259 # Code from module dtoastr:
7260 # Code from module dtotimespec:
7261 # Code from module dup2:
7262 # Code from module environ:
7263 # Code from module errno:
7264 # Code from module euidaccess:
7265 # Code from module execinfo:
7266 # Code from module extensions:
7268 # Code from module extern-inline:
7269 # Code from module faccessat:
7270 # Code from module fcntl:
7271 # Code from module fcntl-h:
7272 # Code from module fdatasync:
7273 # Code from module fdopendir:
7274 # Code from module filemode:
7275 # Code from module fpending:
7276 # Code from module fstatat:
7277 # Code from module fsync:
7278 # Code from module getdtablesize:
7279 # Code from module getgroups:
7280 # Code from module getloadavg:
7281 # Code from module getopt-gnu:
7282 # Code from module getopt-posix:
7283 # Code from module gettext-h:
7284 # Code from module gettime:
7285 # Code from module gettimeofday:
7286 # Code from module group-member:
7287 # Code from module include_next:
7288 # Code from module intprops:
7289 # Code from module inttypes-incomplete:
7290 # Code from module largefile:
7292 # Code from module lstat:
7293 # Code from module manywarnings:
7294 # Code from module memrchr:
7295 # Code from module mkostemp:
7296 # Code from module mktime:
7297 # Code from module multiarch:
7298 # Code from module nocrash:
7299 # Code from module openat-h:
7300 # Code from module pathmax:
7301 # Code from module pipe2:
7302 # Code from module pselect:
7303 # Code from module pthread_sigmask:
7304 # Code from module putenv:
7305 # Code from module qacl:
7306 # Code from module readlink:
7307 # Code from module readlinkat:
7308 # Code from module root-uid:
7309 # Code from module secure_getenv:
7310 # Code from module sig2str:
7311 # Code from module signal-h:
7312 # Code from module snippet/_Noreturn:
7313 # Code from module snippet/arg-nonnull:
7314 # Code from module snippet/c++defs:
7315 # Code from module snippet/warn-on-use:
7316 # Code from module socklen:
7317 # Code from module ssize_t:
7318 # Code from module stat:
7319 # Code from module stat-time:
7320 # Code from module stdalign:
7321 # Code from module stdarg:
7325 # Code from module stdbool:
7326 # Code from module stddef:
7327 # Code from module stdint:
7328 # Code from module stdio:
7329 # Code from module stdlib:
7330 # Code from module strftime:
7331 # Code from module string:
7332 # Code from module strtoimax:
7333 # Code from module strtoll:
7334 # Code from module strtoull:
7335 # Code from module strtoumax:
7336 # Code from module symlink:
7337 # Code from module sys_select:
7338 # Code from module sys_stat:
7339 # Code from module sys_time:
7340 # Code from module tempname:
7341 # Code from module time:
7342 # Code from module time_r:
7343 # Code from module timer-time:
7344 # Code from module timespec:
7345 # Code from module timespec-add:
7346 # Code from module timespec-sub:
7347 # Code from module u64:
7348 # Code from module unistd:
7349 # Code from module unsetenv:
7350 # Code from module utimens:
7351 # Code from module verify:
7352 # Code from module warnings:
7353 # Code from module xalloc-oversized:
7356 if test "$ac_test_CFLAGS" != set; then
7357 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7358 # if -g3 works and the user does not specify CFLAGS.
7359 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7360 case $CFLAGS in
7361 '-g')
7362 emacs_g3_CFLAGS='-g3';;
7363 '-g -O2')
7364 emacs_g3_CFLAGS='-g3 -O2';;
7366 emacs_g3_CFLAGS='';;
7367 esac
7368 if test -n "$emacs_g3_CFLAGS"; then
7369 emacs_save_CFLAGS=$CFLAGS
7370 CFLAGS=$emacs_g3_CFLAGS
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7372 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7373 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7374 $as_echo_n "(cached) " >&6
7375 else
7376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7377 /* end confdefs.h. */
7380 main ()
7384 return 0;
7386 _ACEOF
7387 if ac_fn_c_try_link "$LINENO"; then :
7388 emacs_cv_prog_cc_g3=yes
7389 else
7390 emacs_cv_prog_cc_g3=no
7392 rm -f core conftest.err conftest.$ac_objext \
7393 conftest$ac_exeext conftest.$ac_ext
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7396 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7397 if test $emacs_cv_prog_cc_g3 != yes; then
7398 CFLAGS=$emacs_save_CFLAGS
7400 if test $opsys = mingw32; then
7401 CFLAGS="$CFLAGS -gdwarf-2"
7405 case $CFLAGS in
7406 *-O*) ;;
7408 # No optimization flag was inferred for this non-GCC compiler.
7409 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7410 emacs_save_CFLAGS=$CFLAGS
7411 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7412 CFLAGS=${CFLAGS}-O
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7414 $as_echo_n "checking whether $CC accepts -O... " >&6; }
7415 if test "${emacs_cv_prog_cc_o+set}" = set; then :
7416 $as_echo_n "(cached) " >&6
7417 else
7418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7419 /* end confdefs.h. */
7422 main ()
7426 return 0;
7428 _ACEOF
7429 if ac_fn_c_try_link "$LINENO"; then :
7430 emacs_cv_prog_cc_o=yes
7431 else
7432 emacs_cv_prog_cc_o=no
7434 rm -f core conftest.err conftest.$ac_objext \
7435 conftest$ac_exeext conftest.$ac_ext
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7438 $as_echo "$emacs_cv_prog_cc_o" >&6; }
7439 if test $emacs_cv_prog_cc_o != yes; then
7440 CFLAGS=$emacs_save_CFLAGS
7441 fi ;;
7442 esac
7445 # Check whether --enable-gcc-warnings was given.
7446 if test "${enable_gcc_warnings+set}" = set; then :
7447 enableval=$enable_gcc_warnings; case $enableval in
7448 yes|no) ;;
7449 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7450 esac
7451 gl_gcc_warnings=$enableval
7452 else
7453 gl_gcc_warnings=no
7458 # Check whether --enable-link-time-optimization was given.
7459 if test "${enable_link_time_optimization+set}" = set; then :
7460 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7462 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7463 ac_lto_supported=no
7464 if test x$GCC = xyes; then
7465 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7466 if test x$CPUS != x; then
7467 LTO="-flto=$CPUS"
7468 else
7469 LTO="-flto"
7471 old_CFLAGS=$CFLAGS
7472 CFLAGS="$CFLAGS $LTO"
7473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7474 /* end confdefs.h. */
7477 main ()
7481 return 0;
7483 _ACEOF
7484 if ac_fn_c_try_compile "$LINENO"; then :
7485 ac_lto_supported=yes
7486 else
7487 ac_lto_supported=no
7489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7490 CFLAGS="$old_CFLAGS"
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7493 $as_echo "$ac_lto_supported" >&6; }
7494 if test "$ac_lto_supported" = "yes"; then
7495 CFLAGS="$CFLAGS $LTO"
7501 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7502 # ------------------------------------------------
7503 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7504 # Otherwise, run RUN-IF-NOT-FOUND.
7507 # When compiling with GCC, prefer -isystem to -I when including system
7508 # include files, to avoid generating useless diagnostics for the files.
7509 if test "$gl_gcc_warnings" != yes; then
7510 isystem='-I'
7511 else
7512 isystem='-isystem '
7514 # This, $nw, is the list of warnings we disable.
7517 case $with_x_toolkit in
7518 lucid | athena | motif)
7519 # Old toolkits mishandle 'const'.
7520 nw="$nw -Wwrite-strings"
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7524 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7525 if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7526 $as_echo_n "(cached) " >&6
7527 else
7529 gl_save_compiler_FLAGS="$CFLAGS"
7530 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7532 /* end confdefs.h. */
7535 main ()
7539 return 0;
7541 _ACEOF
7542 if ac_fn_c_try_compile "$LINENO"; then :
7543 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7544 else
7545 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7548 CFLAGS="$gl_save_compiler_FLAGS"
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7552 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7553 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7554 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7555 else
7556 gl_unknown_warnings_are_errors=
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7561 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7562 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7563 $as_echo_n "(cached) " >&6
7564 else
7566 gl_save_compiler_FLAGS="$CFLAGS"
7567 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h. */
7572 main ()
7576 return 0;
7578 _ACEOF
7579 if ac_fn_c_try_compile "$LINENO"; then :
7580 gl_cv_warn_c__Werror=yes
7581 else
7582 gl_cv_warn_c__Werror=no
7584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7585 CFLAGS="$gl_save_compiler_FLAGS"
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7589 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7590 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7591 as_fn_append WERROR_CFLAGS " -Werror"
7596 esac
7599 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7600 nw="$nw -Woverlength-strings" # Not a problem these days
7601 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7602 nw="$nw -Wformat-nonliteral" # we do this a lot
7603 nw="$nw -Wvla" # warnings in gettext.h
7604 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7605 nw="$nw -Wswitch-default" # Too many warnings for now
7606 nw="$nw -Winline" # OK to ignore 'inline'
7607 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7608 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7609 # signed overflow has undefined behavior
7610 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7611 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7612 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
7614 # Emacs doesn't care about shadowing; see
7615 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7616 nw="$nw -Wshadow"
7618 # Emacs's use of alloca inhibits protecting the stack.
7619 nw="$nw -Wstack-protector"
7621 # The following line should be removable at some point.
7622 nw="$nw -Wsuggest-attribute=pure"
7624 # clang is unduly picky about some things.
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7626 $as_echo_n "checking whether the compiler is clang... " >&6; }
7627 if test "${emacs_cv_clang+set}" = set; then :
7628 $as_echo_n "(cached) " >&6
7629 else
7630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7631 /* end confdefs.h. */
7633 #ifndef __clang__
7634 #error "not clang"
7635 #endif
7638 main ()
7642 return 0;
7644 _ACEOF
7645 if ac_fn_c_try_compile "$LINENO"; then :
7646 emacs_cv_clang=yes
7647 else
7648 emacs_cv_clang=no
7650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7653 $as_echo "$emacs_cv_clang" >&6; }
7654 if test $emacs_cv_clang = yes; then
7655 nw="$nw -Wcast-align"
7660 if test -n "$GCC"; then
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7663 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7664 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7665 $as_echo_n "(cached) " >&6
7666 else
7668 gl_save_CFLAGS="$CFLAGS"
7669 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h. */
7674 main ()
7678 return 0;
7680 _ACEOF
7681 if ac_fn_c_try_compile "$LINENO"; then :
7682 gl_cv_cc_nomfi_supported=yes
7683 else
7684 gl_cv_cc_nomfi_supported=no
7686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7687 CFLAGS="$gl_save_CFLAGS"
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7691 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7693 if test "$gl_cv_cc_nomfi_supported" = yes; then
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7695 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7696 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7697 $as_echo_n "(cached) " >&6
7698 else
7700 gl_save_CFLAGS="$CFLAGS"
7701 CFLAGS="$CFLAGS -W -Werror"
7702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7703 /* end confdefs.h. */
7704 void f (void)
7706 typedef struct { int a; int b; } s_t;
7707 s_t s1 = { 0, };
7711 main ()
7715 return 0;
7717 _ACEOF
7718 if ac_fn_c_try_compile "$LINENO"; then :
7719 gl_cv_cc_nomfi_needed=no
7720 else
7721 gl_cv_cc_nomfi_needed=yes
7723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7724 CFLAGS="$gl_save_CFLAGS"
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7729 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7733 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7734 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7735 $as_echo_n "(cached) " >&6
7736 else
7738 gl_save_CFLAGS="$CFLAGS"
7739 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7741 /* end confdefs.h. */
7744 main ()
7748 return 0;
7750 _ACEOF
7751 if ac_fn_c_try_compile "$LINENO"; then :
7752 gl_cv_cc_uninitialized_supported=yes
7753 else
7754 gl_cv_cc_uninitialized_supported=no
7756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7757 CFLAGS="$gl_save_CFLAGS"
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7761 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7765 # List all gcc warning categories.
7766 gl_manywarn_set=
7767 for gl_manywarn_item in \
7768 -W \
7769 -Wabi \
7770 -Waddress \
7771 -Waggressive-loop-optimizations \
7772 -Wall \
7773 -Warray-bounds \
7774 -Wattributes \
7775 -Wbad-function-cast \
7776 -Wbuiltin-macro-redefined \
7777 -Wcast-align \
7778 -Wchar-subscripts \
7779 -Wclobbered \
7780 -Wcomment \
7781 -Wcomments \
7782 -Wcoverage-mismatch \
7783 -Wcpp \
7784 -Wdeprecated \
7785 -Wdeprecated-declarations \
7786 -Wdisabled-optimization \
7787 -Wdiv-by-zero \
7788 -Wdouble-promotion \
7789 -Wempty-body \
7790 -Wendif-labels \
7791 -Wenum-compare \
7792 -Wextra \
7793 -Wformat-contains-nul \
7794 -Wformat-extra-args \
7795 -Wformat-nonliteral \
7796 -Wformat-security \
7797 -Wformat-y2k \
7798 -Wformat-zero-length \
7799 -Wfree-nonheap-object \
7800 -Wignored-qualifiers \
7801 -Wimplicit \
7802 -Wimplicit-function-declaration \
7803 -Wimplicit-int \
7804 -Winit-self \
7805 -Winline \
7806 -Wint-to-pointer-cast \
7807 -Winvalid-memory-model \
7808 -Winvalid-pch \
7809 -Wjump-misses-init \
7810 -Wlogical-op \
7811 -Wmain \
7812 -Wmaybe-uninitialized \
7813 -Wmissing-braces \
7814 -Wmissing-declarations \
7815 -Wmissing-field-initializers \
7816 -Wmissing-include-dirs \
7817 -Wmissing-parameter-type \
7818 -Wmissing-prototypes \
7819 -Wmudflap \
7820 -Wmultichar \
7821 -Wnarrowing \
7822 -Wnested-externs \
7823 -Wnonnull \
7824 -Wnormalized=nfc \
7825 -Wold-style-declaration \
7826 -Wold-style-definition \
7827 -Woverflow \
7828 -Woverlength-strings \
7829 -Woverride-init \
7830 -Wpacked \
7831 -Wpacked-bitfield-compat \
7832 -Wparentheses \
7833 -Wpointer-arith \
7834 -Wpointer-sign \
7835 -Wpointer-to-int-cast \
7836 -Wpragmas \
7837 -Wreturn-local-addr \
7838 -Wreturn-type \
7839 -Wsequence-point \
7840 -Wshadow \
7841 -Wsizeof-pointer-memaccess \
7842 -Wstack-protector \
7843 -Wstrict-aliasing \
7844 -Wstrict-overflow \
7845 -Wstrict-prototypes \
7846 -Wsuggest-attribute=const \
7847 -Wsuggest-attribute=format \
7848 -Wsuggest-attribute=noreturn \
7849 -Wsuggest-attribute=pure \
7850 -Wswitch \
7851 -Wswitch-default \
7852 -Wsync-nand \
7853 -Wsystem-headers \
7854 -Wtrampolines \
7855 -Wtrigraphs \
7856 -Wtype-limits \
7857 -Wuninitialized \
7858 -Wunknown-pragmas \
7859 -Wunsafe-loop-optimizations \
7860 -Wunused \
7861 -Wunused-but-set-parameter \
7862 -Wunused-but-set-variable \
7863 -Wunused-function \
7864 -Wunused-label \
7865 -Wunused-local-typedefs \
7866 -Wunused-macros \
7867 -Wunused-parameter \
7868 -Wunused-result \
7869 -Wunused-value \
7870 -Wunused-variable \
7871 -Wvarargs \
7872 -Wvariadic-macros \
7873 -Wvector-operation-performance \
7874 -Wvla \
7875 -Wvolatile-register-var \
7876 -Wwrite-strings \
7878 ; do
7879 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7880 done
7882 # Disable specific options as needed.
7883 if test "$gl_cv_cc_nomfi_needed" = yes; then
7884 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7887 if test "$gl_cv_cc_uninitialized_supported" = no; then
7888 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7891 ws=$gl_manywarn_set
7894 gl_warn_set=
7895 set x $ws; shift
7896 for gl_warn_item
7898 case " $nw " in
7899 *" $gl_warn_item "*)
7902 gl_warn_set="$gl_warn_set $gl_warn_item"
7904 esac
7905 done
7906 ws=$gl_warn_set
7908 for w in $ws; do
7910 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7912 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7913 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7914 $as_echo_n "(cached) " >&6
7915 else
7917 gl_save_compiler_FLAGS="$CFLAGS"
7918 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
7919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7920 /* end confdefs.h. */
7923 main ()
7927 return 0;
7929 _ACEOF
7930 if ac_fn_c_try_compile "$LINENO"; then :
7931 eval "$as_gl_Warn=yes"
7932 else
7933 eval "$as_gl_Warn=no"
7935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7936 CFLAGS="$gl_save_compiler_FLAGS"
7939 eval ac_res=\$$as_gl_Warn
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7941 $as_echo "$ac_res" >&6; }
7942 eval as_val=\$$as_gl_Warn
7943 if test "x$as_val" = x""yes; then :
7944 as_fn_append WARN_CFLAGS " $w"
7948 done
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7951 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7952 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7953 $as_echo_n "(cached) " >&6
7954 else
7956 gl_save_compiler_FLAGS="$CFLAGS"
7957 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
7958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7959 /* end confdefs.h. */
7962 main ()
7966 return 0;
7968 _ACEOF
7969 if ac_fn_c_try_compile "$LINENO"; then :
7970 gl_cv_warn_c__Wno_missing_field_initializers=yes
7971 else
7972 gl_cv_warn_c__Wno_missing_field_initializers=no
7974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7975 CFLAGS="$gl_save_compiler_FLAGS"
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7979 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7980 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7981 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7984 # We need this one
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7987 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7988 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7989 $as_echo_n "(cached) " >&6
7990 else
7992 gl_save_compiler_FLAGS="$CFLAGS"
7993 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
7994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7995 /* end confdefs.h. */
7998 main ()
8002 return 0;
8004 _ACEOF
8005 if ac_fn_c_try_compile "$LINENO"; then :
8006 gl_cv_warn_c__Wno_sign_compare=yes
8007 else
8008 gl_cv_warn_c__Wno_sign_compare=no
8010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8011 CFLAGS="$gl_save_compiler_FLAGS"
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8015 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8016 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8017 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8020 # Too many warnings for now
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
8023 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8024 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8025 $as_echo_n "(cached) " >&6
8026 else
8028 gl_save_compiler_FLAGS="$CFLAGS"
8029 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
8030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8031 /* end confdefs.h. */
8034 main ()
8038 return 0;
8040 _ACEOF
8041 if ac_fn_c_try_compile "$LINENO"; then :
8042 gl_cv_warn_c__Wno_type_limits=yes
8043 else
8044 gl_cv_warn_c__Wno_type_limits=no
8046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8047 CFLAGS="$gl_save_compiler_FLAGS"
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8051 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8052 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8053 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8056 # Too many warnings for now
8058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
8059 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8060 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8061 $as_echo_n "(cached) " >&6
8062 else
8064 gl_save_compiler_FLAGS="$CFLAGS"
8065 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
8066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h. */
8070 main ()
8074 return 0;
8076 _ACEOF
8077 if ac_fn_c_try_compile "$LINENO"; then :
8078 gl_cv_warn_c__Wno_switch=yes
8079 else
8080 gl_cv_warn_c__Wno_switch=no
8082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8083 CFLAGS="$gl_save_compiler_FLAGS"
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8087 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8088 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8089 as_fn_append WARN_CFLAGS " -Wno-switch"
8092 # Too many warnings for now
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
8095 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8096 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8097 $as_echo_n "(cached) " >&6
8098 else
8100 gl_save_compiler_FLAGS="$CFLAGS"
8101 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
8102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103 /* end confdefs.h. */
8106 main ()
8110 return 0;
8112 _ACEOF
8113 if ac_fn_c_try_compile "$LINENO"; then :
8114 gl_cv_warn_c__Wno_unused_parameter=yes
8115 else
8116 gl_cv_warn_c__Wno_unused_parameter=no
8118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8119 CFLAGS="$gl_save_compiler_FLAGS"
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8123 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8124 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8125 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8128 # Too many warnings for now
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
8131 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8132 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8133 $as_echo_n "(cached) " >&6
8134 else
8136 gl_save_compiler_FLAGS="$CFLAGS"
8137 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
8138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8139 /* end confdefs.h. */
8142 main ()
8146 return 0;
8148 _ACEOF
8149 if ac_fn_c_try_compile "$LINENO"; then :
8150 gl_cv_warn_c__Wno_format_nonliteral=yes
8151 else
8152 gl_cv_warn_c__Wno_format_nonliteral=no
8154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8155 CFLAGS="$gl_save_compiler_FLAGS"
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8159 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8160 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8161 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8166 # In spite of excluding -Wlogical-op above, it is enabled, as of
8167 # gcc 4.5.0 20090517.
8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8170 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8171 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8172 $as_echo_n "(cached) " >&6
8173 else
8175 gl_save_compiler_FLAGS="$CFLAGS"
8176 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
8177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178 /* end confdefs.h. */
8181 main ()
8185 return 0;
8187 _ACEOF
8188 if ac_fn_c_try_compile "$LINENO"; then :
8189 gl_cv_warn_c__Wno_logical_op=yes
8190 else
8191 gl_cv_warn_c__Wno_logical_op=no
8193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8194 CFLAGS="$gl_save_compiler_FLAGS"
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8198 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8199 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8200 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8205 # More things that clang is unduly picky about.
8206 if test $emacs_cv_clang = yes; then
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8209 $as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8210 if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8211 $as_echo_n "(cached) " >&6
8212 else
8214 gl_save_compiler_FLAGS="$CFLAGS"
8215 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args"
8216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8217 /* end confdefs.h. */
8220 main ()
8224 return 0;
8226 _ACEOF
8227 if ac_fn_c_try_compile "$LINENO"; then :
8228 gl_cv_warn_c__Wno_format_extra_args=yes
8229 else
8230 gl_cv_warn_c__Wno_format_extra_args=no
8232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8233 CFLAGS="$gl_save_compiler_FLAGS"
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8237 $as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8238 if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8239 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8245 $as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8246 if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8247 $as_echo_n "(cached) " >&6
8248 else
8250 gl_save_compiler_FLAGS="$CFLAGS"
8251 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare"
8252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8253 /* end confdefs.h. */
8256 main ()
8260 return 0;
8262 _ACEOF
8263 if ac_fn_c_try_compile "$LINENO"; then :
8264 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8265 else
8266 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8269 CFLAGS="$gl_save_compiler_FLAGS"
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8273 $as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8274 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8275 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8281 $as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8282 if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8283 $as_echo_n "(cached) " >&6
8284 else
8286 gl_save_compiler_FLAGS="$CFLAGS"
8287 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument"
8288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8289 /* end confdefs.h. */
8292 main ()
8296 return 0;
8298 _ACEOF
8299 if ac_fn_c_try_compile "$LINENO"; then :
8300 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8301 else
8302 gl_cv_warn_c__Wno_unused_command_line_argument=no
8304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8305 CFLAGS="$gl_save_compiler_FLAGS"
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8309 $as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8310 if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8311 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8317 $as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8318 if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8319 $as_echo_n "(cached) " >&6
8320 else
8322 gl_save_compiler_FLAGS="$CFLAGS"
8323 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value"
8324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8325 /* end confdefs.h. */
8328 main ()
8332 return 0;
8334 _ACEOF
8335 if ac_fn_c_try_compile "$LINENO"; then :
8336 gl_cv_warn_c__Wno_unused_value=yes
8337 else
8338 gl_cv_warn_c__Wno_unused_value=no
8340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8341 CFLAGS="$gl_save_compiler_FLAGS"
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8345 $as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8346 if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8347 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8355 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8356 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8357 $as_echo_n "(cached) " >&6
8358 else
8360 gl_save_compiler_FLAGS="$CFLAGS"
8361 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
8362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8363 /* end confdefs.h. */
8366 main ()
8370 return 0;
8372 _ACEOF
8373 if ac_fn_c_try_compile "$LINENO"; then :
8374 gl_cv_warn_c__fdiagnostics_show_option=yes
8375 else
8376 gl_cv_warn_c__fdiagnostics_show_option=no
8378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8379 CFLAGS="$gl_save_compiler_FLAGS"
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8383 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8384 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8385 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8391 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8392 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8393 $as_echo_n "(cached) " >&6
8394 else
8396 gl_save_compiler_FLAGS="$CFLAGS"
8397 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
8398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8399 /* end confdefs.h. */
8402 main ()
8406 return 0;
8408 _ACEOF
8409 if ac_fn_c_try_compile "$LINENO"; then :
8410 gl_cv_warn_c__funit_at_a_time=yes
8411 else
8412 gl_cv_warn_c__funit_at_a_time=no
8414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8415 CFLAGS="$gl_save_compiler_FLAGS"
8418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8419 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8420 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8421 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8427 $as_echo "#define lint 1" >>confdefs.h
8431 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8434 # We use a slightly smaller set of warning options for lib/.
8435 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8437 nw="$nw -Wunused-macros"
8440 gl_warn_set=
8441 set x $WARN_CFLAGS; shift
8442 for gl_warn_item
8444 case " $nw " in
8445 *" $gl_warn_item "*)
8448 gl_warn_set="$gl_warn_set $gl_warn_item"
8450 esac
8451 done
8452 GNULIB_WARN_CFLAGS=$gl_warn_set
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8463 $as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8464 rm -f conf$$ conf$$.file
8466 LN_S_FILEONLY='cp -p'
8468 if (echo >conf$$.file) 2>/dev/null; then
8469 if ln -s conf$$.file conf$$ 2>/dev/null; then
8470 LN_S_FILEONLY='ln -s'
8471 elif ln conf$$.file conf$$ 2>/dev/null; then
8472 LN_S_FILEONLY=ln
8476 rm -f conf$$ conf$$.file
8478 if test "$LN_S_FILEONLY" = "ln -s"; then
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8480 $as_echo "yes" >&6; }
8481 else
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8483 $as_echo "no, using $LN_S_FILEONLY" >&6; }
8489 if test "$opsys" = "mingw32"; then
8490 LN_S="ln"
8493 # Extract the first word of "install-info", so it can be a program name with args.
8494 set dummy install-info; ac_word=$2
8495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8496 $as_echo_n "checking for $ac_word... " >&6; }
8497 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
8498 $as_echo_n "(cached) " >&6
8499 else
8500 case $INSTALL_INFO in
8501 [\\/]* | ?:[\\/]*)
8502 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8506 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
8508 IFS=$as_save_IFS
8509 test -z "$as_dir" && as_dir=.
8510 for ac_exec_ext in '' $ac_executable_extensions; do
8511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8512 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8514 break 2
8516 done
8517 done
8518 IFS=$as_save_IFS
8520 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8522 esac
8524 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8525 if test -n "$INSTALL_INFO"; then
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8527 $as_echo "$INSTALL_INFO" >&6; }
8528 else
8529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8530 $as_echo "no" >&6; }
8534 # Extract the first word of "gzip", so it can be a program name with args.
8535 set dummy gzip; ac_word=$2
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8537 $as_echo_n "checking for $ac_word... " >&6; }
8538 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
8539 $as_echo_n "(cached) " >&6
8540 else
8541 case $GZIP_PROG in
8542 [\\/]* | ?:[\\/]*)
8543 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8547 for as_dir in $PATH
8549 IFS=$as_save_IFS
8550 test -z "$as_dir" && as_dir=.
8551 for ac_exec_ext in '' $ac_executable_extensions; do
8552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8553 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8555 break 2
8557 done
8558 done
8559 IFS=$as_save_IFS
8562 esac
8564 GZIP_PROG=$ac_cv_path_GZIP_PROG
8565 if test -n "$GZIP_PROG"; then
8566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8567 $as_echo "$GZIP_PROG" >&6; }
8568 else
8569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8570 $as_echo "no" >&6; }
8575 if test $opsys = gnu-linux; then
8576 # Extract the first word of "paxctl", so it can be a program name with args.
8577 set dummy paxctl; ac_word=$2
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579 $as_echo_n "checking for $ac_word... " >&6; }
8580 if test "${ac_cv_path_PAXCTL+set}" = set; then :
8581 $as_echo_n "(cached) " >&6
8582 else
8583 case $PAXCTL in
8584 [\\/]* | ?:[\\/]*)
8585 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8591 IFS=$as_save_IFS
8592 test -z "$as_dir" && as_dir=.
8593 for ac_exec_ext in '' $ac_executable_extensions; do
8594 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8595 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597 break 2
8599 done
8600 done
8601 IFS=$as_save_IFS
8604 esac
8606 PAXCTL=$ac_cv_path_PAXCTL
8607 if test -n "$PAXCTL"; then
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8609 $as_echo "$PAXCTL" >&6; }
8610 else
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612 $as_echo "no" >&6; }
8616 if test "X$PAXCTL" != X; then
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8618 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620 /* end confdefs.h. */
8623 main ()
8627 return 0;
8629 _ACEOF
8630 if ac_fn_c_try_link "$LINENO"; then :
8631 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8632 $as_echo "yes" >&6; }
8633 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634 $as_echo "no" >&6; }; PAXCTL=""; fi
8636 rm -f core conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
8641 ## Need makeinfo >= 4.7 (?) to build the manuals.
8642 # Extract the first word of "makeinfo", so it can be a program name with args.
8643 set dummy makeinfo; ac_word=$2
8644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8645 $as_echo_n "checking for $ac_word... " >&6; }
8646 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8647 $as_echo_n "(cached) " >&6
8648 else
8649 case $MAKEINFO in
8650 [\\/]* | ?:[\\/]*)
8651 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8655 for as_dir in $PATH
8657 IFS=$as_save_IFS
8658 test -z "$as_dir" && as_dir=.
8659 for ac_exec_ext in '' $ac_executable_extensions; do
8660 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8661 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8663 break 2
8665 done
8666 done
8667 IFS=$as_save_IFS
8669 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8671 esac
8673 MAKEINFO=$ac_cv_path_MAKEINFO
8674 if test -n "$MAKEINFO"; then
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8676 $as_echo "$MAKEINFO" >&6; }
8677 else
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679 $as_echo "no" >&6; }
8683 if test "$MAKEINFO" != "no"; then
8684 case `
8685 $MAKEINFO --version 2> /dev/null |
8686 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8687 ` in
8688 '') MAKEINFO=no;;
8689 esac
8692 ## Makeinfo is unusual. For a released Emacs, the manuals are
8693 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8694 ## therefore in the category of "special tools" not normally required, which
8695 ## configure does not have to check for (eg autoconf itself).
8696 ## In a Bazaar checkout on the other hand, the manuals are not included.
8697 ## So makeinfo is a requirement to build from Bazaar, and configure
8698 ## should test for it as it does for any other build requirement.
8699 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8700 ## with pre-built manuals, from a Bazaar checkout.
8701 HAVE_MAKEINFO=yes
8703 if test "$MAKEINFO" = "no"; then
8704 MAKEINFO=makeinfo
8705 if test "x${with_makeinfo}" = "xno"; then
8706 HAVE_MAKEINFO=no
8707 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
8708 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8709 source tree does not seem to have pre-built manuals in the \`info' directory.
8710 Either install a suitable version of makeinfo, or re-run configure
8711 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8716 INFO_EXT=.info
8717 INFO_OPTS=--no-split
8722 if test x$GCC = xyes; then
8723 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8724 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8725 else
8726 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8727 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8731 late_LDFLAGS=$LDFLAGS
8732 if test x$GCC = xyes; then
8733 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8734 else
8735 LDFLAGS="$LDFLAGS -znocombreloc"
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8739 $as_echo_n "checking for -znocombreloc... " >&6; }
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741 /* end confdefs.h. */
8744 main ()
8748 return 0;
8750 _ACEOF
8751 if ac_fn_c_try_link "$LINENO"; then :
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8753 $as_echo "yes" >&6; }
8754 else
8755 LDFLAGS=$late_LDFLAGS
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757 $as_echo "no" >&6; }
8759 rm -f core conftest.err conftest.$ac_objext \
8760 conftest$ac_exeext conftest.$ac_ext
8763 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8764 case "$opsys" in
8765 your-opsys-here) CANNOT_DUMP=yes ;;
8766 esac
8768 test "$CANNOT_DUMP" = "yes" && \
8770 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8776 UNEXEC_OBJ=unexelf.o
8777 case "$opsys" in
8778 # MSDOS uses unexcoff.o
8779 aix4-2)
8780 UNEXEC_OBJ=unexaix.o
8782 cygwin)
8783 UNEXEC_OBJ=unexcw.o
8785 darwin)
8786 UNEXEC_OBJ=unexmacosx.o
8788 hpux10-20 | hpux11)
8789 UNEXEC_OBJ=unexhp9k800.o
8791 mingw32)
8792 UNEXEC_OBJ=unexw32.o
8794 sol2-10)
8795 # Use the Solaris dldump() function, called from unexsol.c, to dump
8796 # emacs, instead of the generic ELF dump code found in unexelf.c.
8797 # The resulting binary has a complete symbol table, and is better
8798 # for debugging and other observability tools (debuggers, pstack, etc).
8800 # If you encounter a problem using dldump(), please consider sending
8801 # a message to the OpenSolaris tools-linking mailing list:
8802 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8804 # It is likely that dldump() works with older Solaris too, but this has
8805 # not been tested, so for now this change is for Solaris 10 or newer.
8806 UNEXEC_OBJ=unexsol.o
8808 esac
8810 LD_SWITCH_SYSTEM=
8811 case "$opsys" in
8812 freebsd|dragonfly)
8813 ## Let `ld' find image libs and similar things in /usr/local/lib.
8814 ## The system compiler, GCC, has apparently been modified to not
8815 ## look there, contrary to what a stock GCC would do.
8816 ### It's not our place to do this. See bug#10313#17.
8817 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8821 gnu-linux)
8822 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8823 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8826 netbsd)
8827 ### It's not our place to do this. See bug#10313#17.
8828 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8832 openbsd)
8833 ## Han Boetes <han@boetes.org> says this is necessary,
8834 ## otherwise Emacs dumps core on elf systems.
8835 LD_SWITCH_SYSTEM="-Z"
8837 esac
8840 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8842 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8843 ## which has not been defined yet. When this was handled with cpp,
8844 ## it was expanded to null when configure sourced the s/*.h file.
8845 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8846 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8847 ## (or somesuch), but because it is supposed to go at the _front_
8848 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8849 ## Compare with the gnu-linux case below, which added to the end
8850 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8851 ## LD_SWITCH_SYSTEM_TEMACS.
8852 case "$opsys" in
8853 netbsd|openbsd)
8854 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8855 esac
8858 C_SWITCH_MACHINE=
8859 case $canonical in
8860 alpha*)
8861 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8862 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8866 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8867 ## With ELF, make sure that all common symbols get allocated to in the
8868 ## data section. Otherwise, the dump of temacs may miss variables in
8869 ## the shared library that have been initialized. For example, with
8870 ## GNU libc, __malloc_initialized would normally be resolved to the
8871 ## shared library's .bss section, which is fatal.
8872 if test "x$GCC" = "xyes"; then
8873 C_SWITCH_MACHINE="-fno-common"
8874 else
8875 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8877 else
8878 UNEXEC_OBJ=unexalpha.o
8881 esac
8886 C_SWITCH_SYSTEM=
8887 ## Some programs in src produce warnings saying certain subprograms
8888 ## are too complex and need a MAXMEM value greater than 2000 for
8889 ## additional optimization. --nils@exp-math.uni-essen.de
8890 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8891 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8892 test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
8893 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8894 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8898 LIBS_SYSTEM=
8899 case "$opsys" in
8900 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8901 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8903 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
8905 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8907 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8909 ## Motif needs -lgen.
8910 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8911 esac
8915 ### Make sure subsequent tests use flags consistent with the build flags.
8917 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8918 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8919 else
8920 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8923 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8925 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8929 LIB_MATH=-lm
8930 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8932 case $opsys in
8933 cygwin )
8934 LIB_MATH=
8936 darwin )
8937 ## Adding -lm confuses the dynamic linker, so omit it.
8938 LIB_MATH=
8940 freebsd | dragonfly )
8941 SYSTEM_TYPE=berkeley-unix
8943 gnu-linux | gnu-kfreebsd )
8945 hpux10-20 | hpux11 )
8947 mingw32 )
8948 LIB_MATH=
8949 SYSTEM_TYPE=windows-nt
8951 netbsd | openbsd )
8952 SYSTEM_TYPE=berkeley-unix
8955 sol2* | unixware )
8956 SYSTEM_TYPE=usg-unix-v
8959 esac
8963 cat >>confdefs.h <<_ACEOF
8964 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8965 _ACEOF
8969 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8970 pre_PKG_CONFIG_LIBS=$LIBS
8972 # Extract the first word of "pkg-config", so it can be a program name with args.
8973 set dummy pkg-config; ac_word=$2
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8975 $as_echo_n "checking for $ac_word... " >&6; }
8976 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8977 $as_echo_n "(cached) " >&6
8978 else
8979 case $PKG_CONFIG in
8980 [\\/]* | ?:[\\/]*)
8981 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8985 for as_dir in $PATH
8987 IFS=$as_save_IFS
8988 test -z "$as_dir" && as_dir=.
8989 for ac_exec_ext in '' $ac_executable_extensions; do
8990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8991 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8993 break 2
8995 done
8996 done
8997 IFS=$as_save_IFS
8999 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9001 esac
9003 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9004 if test -n "$PKG_CONFIG"; then
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9006 $as_echo "$PKG_CONFIG" >&6; }
9007 else
9008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9009 $as_echo "no" >&6; }
9016 HAVE_SOUND=no
9017 if test "${with_sound}" != "no"; then
9018 # Sound support for GNU/Linux, the free BSDs, and MinGW.
9019 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
9020 do :
9021 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9022 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9023 #ifdef __MINGW32__
9024 #define WIN32_LEAN_AND_MEAN
9025 #include <windows.h>
9026 #endif
9029 eval as_val=\$$as_ac_Header
9030 if test "x$as_val" = x""yes; then :
9031 cat >>confdefs.h <<_ACEOF
9032 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9033 _ACEOF
9034 have_sound_header=yes
9037 done
9039 if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then
9040 # Emulation library used on NetBSD.
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9042 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9043 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
9044 $as_echo_n "(cached) " >&6
9045 else
9046 ac_check_lib_save_LIBS=$LIBS
9047 LIBS="-lossaudio $LIBS"
9048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9049 /* end confdefs.h. */
9051 /* Override any GCC internal prototype to avoid an error.
9052 Use char because int might match the return type of a GCC
9053 builtin and then its argument prototype would still apply. */
9054 #ifdef __cplusplus
9055 extern "C"
9056 #endif
9057 char _oss_ioctl ();
9059 main ()
9061 return _oss_ioctl ();
9063 return 0;
9065 _ACEOF
9066 if ac_fn_c_try_link "$LINENO"; then :
9067 ac_cv_lib_ossaudio__oss_ioctl=yes
9068 else
9069 ac_cv_lib_ossaudio__oss_ioctl=no
9071 rm -f core conftest.err conftest.$ac_objext \
9072 conftest$ac_exeext conftest.$ac_ext
9073 LIBS=$ac_check_lib_save_LIBS
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9076 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9077 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9078 LIBSOUND=-lossaudio
9079 else
9080 LIBSOUND=
9083 test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \
9084 as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5
9088 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9089 ALSA_REQUIRED=1.0.0
9090 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9092 succeeded=no
9094 if test "$PKG_CONFIG" = "no" ; then
9095 HAVE_ALSA=no
9096 else
9097 PKG_CONFIG_MIN_VERSION=0.9.0
9098 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9100 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
9102 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9103 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9104 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
9105 edit_cflags="
9106 s,///*,/,g
9107 s/^/ /
9108 s/ -I/ $isystem/g
9109 s/^ //
9111 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9112 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9114 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9115 succeeded=yes
9116 else
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9118 $as_echo "no" >&6; }
9119 ALSA_CFLAGS=""
9120 ALSA_LIBS=""
9121 ## If we have a custom action on failure, don't print errors, but
9122 ## do set a variable so people can do so. Do it in a subshell
9123 ## to capture any diagnostics in invoking pkg-config.
9124 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
9130 else
9131 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9132 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9136 if test $succeeded = yes; then
9137 HAVE_ALSA=yes
9138 else
9139 HAVE_ALSA=no
9142 if test $HAVE_ALSA = yes; then
9143 SAVE_CFLAGS="$CFLAGS"
9144 SAVE_LIBS="$LIBS"
9145 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9146 LIBS="$ALSA_LIBS $LIBS"
9147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9148 /* end confdefs.h. */
9149 #include <asoundlib.h>
9151 main ()
9153 snd_lib_error_set_handler (0);
9155 return 0;
9157 _ACEOF
9158 if ac_fn_c_try_compile "$LINENO"; then :
9159 emacs_alsa_normal=yes
9160 else
9161 emacs_alsa_normal=no
9163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9164 if test "$emacs_alsa_normal" != yes; then
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166 /* end confdefs.h. */
9167 #include <alsa/asoundlib.h>
9169 main ()
9171 snd_lib_error_set_handler (0);
9173 return 0;
9175 _ACEOF
9176 if ac_fn_c_try_compile "$LINENO"; then :
9177 emacs_alsa_subdir=yes
9178 else
9179 emacs_alsa_subdir=no
9181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9182 if test "$emacs_alsa_subdir" != yes; then
9183 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9185 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9188 CFLAGS="$SAVE_CFLAGS"
9189 LIBS="$SAVE_LIBS"
9190 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9191 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
9193 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
9195 elif test "${with_sound}" = "alsa"; then
9196 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9199 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9200 case "$opsys" in
9201 gnu-linux|freebsd|netbsd|mingw32)
9203 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
9205 HAVE_SOUND=yes
9207 esac
9216 for ac_header in $ac_header_list
9217 do :
9218 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9219 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9221 eval as_val=\$$as_ac_Header
9222 if test "x$as_val" = x""yes; then :
9223 cat >>confdefs.h <<_ACEOF
9224 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9225 _ACEOF
9229 done
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9250 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252 /* end confdefs.h. */
9253 #include <sys/personality.h>
9255 main ()
9257 personality (PER_LINUX32)
9259 return 0;
9261 _ACEOF
9262 if ac_fn_c_try_compile "$LINENO"; then :
9263 emacs_cv_personality_linux32=yes
9264 else
9265 emacs_cv_personality_linux32=no
9267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9269 $as_echo "$emacs_cv_personality_linux32" >&6; }
9271 if test $emacs_cv_personality_linux32 = yes; then
9273 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9277 for ac_header in term.h
9278 do :
9279 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9280 if test "x$ac_cv_header_term_h" = x""yes; then :
9281 cat >>confdefs.h <<_ACEOF
9282 #define HAVE_TERM_H 1
9283 _ACEOF
9287 done
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9290 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9291 if test "${ac_cv_header_time+set}" = set; then :
9292 $as_echo_n "(cached) " >&6
9293 else
9294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9295 /* end confdefs.h. */
9296 #include <sys/types.h>
9297 #include <sys/time.h>
9298 #include <time.h>
9301 main ()
9303 if ((struct tm *) 0)
9304 return 0;
9306 return 0;
9308 _ACEOF
9309 if ac_fn_c_try_compile "$LINENO"; then :
9310 ac_cv_header_time=yes
9311 else
9312 ac_cv_header_time=no
9314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9317 $as_echo "$ac_cv_header_time" >&6; }
9318 if test $ac_cv_header_time = yes; then
9320 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9324 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9327 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9328 ac_have_decl=1
9329 else
9330 ac_have_decl=0
9333 cat >>confdefs.h <<_ACEOF
9334 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
9335 _ACEOF
9337 if test $ac_cv_have_decl_sys_siglist != yes; then
9338 # For Tru64, at least:
9339 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9342 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9343 ac_have_decl=1
9344 else
9345 ac_have_decl=0
9348 cat >>confdefs.h <<_ACEOF
9349 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9350 _ACEOF
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9354 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9355 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9356 $as_echo_n "(cached) " >&6
9357 else
9358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9359 /* end confdefs.h. */
9360 #include <sys/types.h>
9361 #include <sys/wait.h>
9362 #ifndef WEXITSTATUS
9363 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9364 #endif
9365 #ifndef WIFEXITED
9366 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9367 #endif
9370 main ()
9372 int s;
9373 wait (&s);
9374 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9376 return 0;
9378 _ACEOF
9379 if ac_fn_c_try_compile "$LINENO"; then :
9380 ac_cv_header_sys_wait_h=yes
9381 else
9382 ac_cv_header_sys_wait_h=no
9384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9387 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
9388 if test $ac_cv_header_sys_wait_h = yes; then
9390 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9398 for ac_header in net/if.h
9399 do :
9400 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9401 #if HAVE_SYS_SOCKET_H
9402 #include <sys/socket.h>
9403 #endif
9405 if test "x$ac_cv_header_net_if_h" = x""yes; then :
9406 cat >>confdefs.h <<_ACEOF
9407 #define HAVE_NET_IF_H 1
9408 _ACEOF
9412 done
9414 for ac_header in ifaddrs.h
9415 do :
9416 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9417 #if HAVE_SYS_SOCKET_H
9418 #include <sys/socket.h>
9419 #endif
9421 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9422 cat >>confdefs.h <<_ACEOF
9423 #define HAVE_IFADDRS_H 1
9424 _ACEOF
9428 done
9430 for ac_header in net/if_dl.h
9431 do :
9432 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9433 #if HAVE_SYS_SOCKET_H
9434 #include <sys/socket.h>
9435 #endif
9437 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
9438 cat >>confdefs.h <<_ACEOF
9439 #define HAVE_NET_IF_DL_H 1
9440 _ACEOF
9444 done
9447 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9448 #if HAVE_SYS_SOCKET_H
9449 #include <sys/socket.h>
9450 #endif
9451 #if HAVE_NET_IF_H
9452 #include <net/if.h>
9453 #endif
9455 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
9457 cat >>confdefs.h <<_ACEOF
9458 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9459 _ACEOF
9463 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9464 #if HAVE_SYS_SOCKET_H
9465 #include <sys/socket.h>
9466 #endif
9467 #if HAVE_NET_IF_H
9468 #include <net/if.h>
9469 #endif
9471 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9473 cat >>confdefs.h <<_ACEOF
9474 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9475 _ACEOF
9479 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9480 #if HAVE_SYS_SOCKET_H
9481 #include <sys/socket.h>
9482 #endif
9483 #if HAVE_NET_IF_H
9484 #include <net/if.h>
9485 #endif
9487 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9489 cat >>confdefs.h <<_ACEOF
9490 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9491 _ACEOF
9495 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9496 #if HAVE_SYS_SOCKET_H
9497 #include <sys/socket.h>
9498 #endif
9499 #if HAVE_NET_IF_H
9500 #include <net/if.h>
9501 #endif
9503 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9505 cat >>confdefs.h <<_ACEOF
9506 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9507 _ACEOF
9511 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9512 #if HAVE_SYS_SOCKET_H
9513 #include <sys/socket.h>
9514 #endif
9515 #if HAVE_NET_IF_H
9516 #include <net/if.h>
9517 #endif
9519 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9521 cat >>confdefs.h <<_ACEOF
9522 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9523 _ACEOF
9527 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9528 #if HAVE_SYS_SOCKET_H
9529 #include <sys/socket.h>
9530 #endif
9531 #if HAVE_NET_IF_H
9532 #include <net/if.h>
9533 #endif
9535 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9537 cat >>confdefs.h <<_ACEOF
9538 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9539 _ACEOF
9547 DEPFLAGS=
9548 MKDEPDIR=":"
9549 deps_frag=deps.mk
9550 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9552 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9553 HAVE_GNU_MAKE=no
9554 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9555 if test "x$testval" != x; then
9556 HAVE_GNU_MAKE=yes
9557 else
9558 ac_enable_autodepend=no
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9561 $as_echo "$HAVE_GNU_MAKE" >&6; }
9562 if test $HAVE_GNU_MAKE = yes; then
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9564 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9565 SAVE_CFLAGS="$CFLAGS"
9566 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9568 /* end confdefs.h. */
9571 main ()
9575 return 0;
9577 _ACEOF
9578 if ac_fn_c_try_compile "$LINENO"; then :
9580 else
9581 ac_enable_autodepend=no
9583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9584 CFLAGS="$SAVE_CFLAGS"
9585 test -f deps.d || ac_enable_autodepend=no
9586 rm -rf deps.d
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9588 $as_echo "$ac_enable_autodepend" >&6; }
9590 if test $ac_enable_autodepend = yes; then
9591 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9592 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9593 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9594 deps_frag=autodeps.mk
9597 deps_frag=$srcdir/src/$deps_frag
9603 lisp_frag=$srcdir/src/lisp.mk
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9608 $as_echo_n "checking for long file names... " >&6; }
9609 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9610 $as_echo_n "(cached) " >&6
9611 else
9612 ac_cv_sys_long_file_names=yes
9613 # Test for long file names in all the places we know might matter:
9614 # . the current directory, where building will happen
9615 # $prefix/lib where we will be installing things
9616 # $exec_prefix/lib likewise
9617 # $TMPDIR if set, where it might want to write temporary files
9618 # /tmp where it might want to write temporary files
9619 # /var/tmp likewise
9620 # /usr/tmp likewise
9621 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9622 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9623 # in the usual case where exec_prefix is '${prefix}'.
9624 case $ac_dir in #(
9625 . | /* | ?:[\\/]*) ;; #(
9626 *) continue;;
9627 esac
9628 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9629 ac_xdir=$ac_dir/cf$$
9630 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9631 ac_tf1=$ac_xdir/conftest9012345
9632 ac_tf2=$ac_xdir/conftest9012346
9633 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9634 ac_cv_sys_long_file_names=no
9635 rm -f -r "$ac_xdir" 2>/dev/null
9636 test $ac_cv_sys_long_file_names = no && break
9637 done
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9640 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9641 if test $ac_cv_sys_long_file_names = yes; then
9643 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9648 #### Choose a window system.
9650 ## We leave window_system equal to none if
9651 ## we end up building without one. Any new window system should
9652 ## set window_system to an appropriate value and add objects to
9653 ## window-system-specific substs.
9655 window_system=none
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9657 $as_echo_n "checking for X... " >&6; }
9660 # Check whether --with-x was given.
9661 if test "${with_x+set}" = set; then :
9662 withval=$with_x;
9665 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9666 if test "x$with_x" = xno; then
9667 # The user explicitly disabled X.
9668 have_x=disabled
9669 else
9670 case $x_includes,$x_libraries in #(
9671 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9672 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9673 $as_echo_n "(cached) " >&6
9674 else
9675 # One or both of the vars are not set, and there is no cached value.
9676 ac_x_includes=no ac_x_libraries=no
9677 rm -f -r conftest.dir
9678 if mkdir conftest.dir; then
9679 cd conftest.dir
9680 cat >Imakefile <<'_ACEOF'
9681 incroot:
9682 @echo incroot='${INCROOT}'
9683 usrlibdir:
9684 @echo usrlibdir='${USRLIBDIR}'
9685 libdir:
9686 @echo libdir='${LIBDIR}'
9687 _ACEOF
9688 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9689 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9690 for ac_var in incroot usrlibdir libdir; do
9691 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9692 done
9693 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9694 for ac_extension in a so sl dylib la dll; do
9695 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9696 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9697 ac_im_usrlibdir=$ac_im_libdir; break
9699 done
9700 # Screen out bogus values from the imake configuration. They are
9701 # bogus both because they are the default anyway, and because
9702 # using them would break gcc on systems where it needs fixed includes.
9703 case $ac_im_incroot in
9704 /usr/include) ac_x_includes= ;;
9705 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9706 esac
9707 case $ac_im_usrlibdir in
9708 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9709 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9710 esac
9712 cd ..
9713 rm -f -r conftest.dir
9716 # Standard set of common directories for X headers.
9717 # Check X11 before X11Rn because it is often a symlink to the current release.
9718 ac_x_header_dirs='
9719 /usr/X11/include
9720 /usr/X11R7/include
9721 /usr/X11R6/include
9722 /usr/X11R5/include
9723 /usr/X11R4/include
9725 /usr/include/X11
9726 /usr/include/X11R7
9727 /usr/include/X11R6
9728 /usr/include/X11R5
9729 /usr/include/X11R4
9731 /usr/local/X11/include
9732 /usr/local/X11R7/include
9733 /usr/local/X11R6/include
9734 /usr/local/X11R5/include
9735 /usr/local/X11R4/include
9737 /usr/local/include/X11
9738 /usr/local/include/X11R7
9739 /usr/local/include/X11R6
9740 /usr/local/include/X11R5
9741 /usr/local/include/X11R4
9743 /usr/X386/include
9744 /usr/x386/include
9745 /usr/XFree86/include/X11
9747 /usr/include
9748 /usr/local/include
9749 /usr/unsupported/include
9750 /usr/athena/include
9751 /usr/local/x11r5/include
9752 /usr/lpp/Xamples/include
9754 /usr/openwin/include
9755 /usr/openwin/share/include'
9757 if test "$ac_x_includes" = no; then
9758 # Guess where to find include files, by looking for Xlib.h.
9759 # First, try using that file with no special directory specified.
9760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761 /* end confdefs.h. */
9762 #include <X11/Xlib.h>
9763 _ACEOF
9764 if ac_fn_c_try_cpp "$LINENO"; then :
9765 # We can compile using X headers with no special include directory.
9766 ac_x_includes=
9767 else
9768 for ac_dir in $ac_x_header_dirs; do
9769 if test -r "$ac_dir/X11/Xlib.h"; then
9770 ac_x_includes=$ac_dir
9771 break
9773 done
9775 rm -f conftest.err conftest.$ac_ext
9776 fi # $ac_x_includes = no
9778 if test "$ac_x_libraries" = no; then
9779 # Check for the libraries.
9780 # See if we find them without any special options.
9781 # Don't add to $LIBS permanently.
9782 ac_save_LIBS=$LIBS
9783 LIBS="-lX11 $LIBS"
9784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9785 /* end confdefs.h. */
9786 #include <X11/Xlib.h>
9788 main ()
9790 XrmInitialize ()
9792 return 0;
9794 _ACEOF
9795 if ac_fn_c_try_link "$LINENO"; then :
9796 LIBS=$ac_save_LIBS
9797 # We can link X programs with no special library path.
9798 ac_x_libraries=
9799 else
9800 LIBS=$ac_save_LIBS
9801 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9803 # Don't even attempt the hair of trying to link an X program!
9804 for ac_extension in a so sl dylib la dll; do
9805 if test -r "$ac_dir/libX11.$ac_extension"; then
9806 ac_x_libraries=$ac_dir
9807 break 2
9809 done
9810 done
9812 rm -f core conftest.err conftest.$ac_objext \
9813 conftest$ac_exeext conftest.$ac_ext
9814 fi # $ac_x_libraries = no
9816 case $ac_x_includes,$ac_x_libraries in #(
9817 no,* | *,no | *\'*)
9818 # Didn't find X, or a directory has "'" in its name.
9819 ac_cv_have_x="have_x=no";; #(
9821 # Record where we found X for the cache.
9822 ac_cv_have_x="have_x=yes\
9823 ac_x_includes='$ac_x_includes'\
9824 ac_x_libraries='$ac_x_libraries'"
9825 esac
9827 ;; #(
9828 *) have_x=yes;;
9829 esac
9830 eval "$ac_cv_have_x"
9831 fi # $with_x != no
9833 if test "$have_x" != yes; then
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9835 $as_echo "$have_x" >&6; }
9836 no_x=yes
9837 else
9838 # If each of the values was on the command line, it overrides each guess.
9839 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9840 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9841 # Update the cache value to reflect the command line values.
9842 ac_cv_have_x="have_x=yes\
9843 ac_x_includes='$x_includes'\
9844 ac_x_libraries='$x_libraries'"
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9846 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9849 if test "$no_x" != yes; then
9850 window_system=x11
9853 LD_SWITCH_X_SITE_RPATH=
9854 if test "${x_libraries}" != NONE; then
9855 if test -n "${x_libraries}"; then
9856 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9857 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9859 x_default_search_path=""
9860 x_search_path=${x_libraries}
9861 if test -z "${x_search_path}"; then
9862 x_search_path=/usr/lib
9864 for x_library in `echo ${x_search_path}: | \
9865 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9866 x_search_path="\
9867 ${x_library}/X11/%L/%T/%N%C%S:\
9868 ${x_library}/X11/%l/%T/%N%C%S:\
9869 ${x_library}/X11/%T/%N%C%S:\
9870 ${x_library}/X11/%L/%T/%N%S:\
9871 ${x_library}/X11/%l/%T/%N%S:\
9872 ${x_library}/X11/%T/%N%S"
9873 if test x"${x_default_search_path}" = x; then
9874 x_default_search_path=${x_search_path}
9875 else
9876 x_default_search_path="${x_search_path}:${x_default_search_path}"
9878 done
9882 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9883 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9886 if test x"${x_includes}" = x; then
9887 bitmapdir=/usr/include/X11/bitmaps
9888 else
9889 # accumulate include directories that have X11 bitmap subdirectories
9890 bmd_acc="dummyval"
9891 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9892 if test -d "${bmd}/X11/bitmaps"; then
9893 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9895 if test -d "${bmd}/bitmaps"; then
9896 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9898 done
9899 if test ${bmd_acc} != "dummyval"; then
9900 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9904 HAVE_NS=no
9905 NS_IMPL_COCOA=no
9906 NS_IMPL_GNUSTEP=no
9907 tmp_CPPFLAGS="$CPPFLAGS"
9908 tmp_CFLAGS="$CFLAGS"
9909 CPPFLAGS="$CPPFLAGS -x objective-c"
9910 CFLAGS="$CFLAGS -x objective-c"
9911 GNU_OBJC_CFLAGS=
9912 LIBS_GNUSTEP=
9913 if test "${with_ns}" != no; then
9914 if test "${opsys}" = darwin; then
9915 NS_IMPL_COCOA=yes
9916 ns_appdir=`pwd`/nextstep/Emacs.app
9917 ns_appbindir=${ns_appdir}/Contents/MacOS
9918 ns_appresdir=${ns_appdir}/Contents/Resources
9919 ns_appsrc=Cocoa/Emacs.base
9920 elif test -f $GNUSTEP_CONFIG_FILE; then
9921 NS_IMPL_GNUSTEP=yes
9922 ns_appdir=`pwd`/nextstep/Emacs.app
9923 ns_appbindir=${ns_appdir}
9924 ns_appresdir=${ns_appdir}/Resources
9925 ns_appsrc=GNUstep/Emacs.base
9926 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9927 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9928 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9929 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9930 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9931 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9932 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9933 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9934 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9935 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9936 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9937 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9939 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9940 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9941 $as_echo_n "(cached) " >&6
9942 else
9943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9944 /* end confdefs.h. */
9945 #include <GNUstepBase/GSConfig.h>
9947 main ()
9949 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9951 #else
9952 fail;
9953 #endif
9955 return 0;
9957 _ACEOF
9958 if ac_fn_c_try_compile "$LINENO"; then :
9959 emacs_cv_objc_exceptions=yes
9960 else
9961 emacs_cv_objc_exceptions=no
9963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9966 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9967 if test $emacs_cv_objc_exceptions = yes; then
9969 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9971 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9975 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9977 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9978 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9979 HAVE_NS=yes
9980 else
9981 as_fn_error "\`--with-ns' was specified, but the include
9982 files are missing or cannot be compiled." "$LINENO" 5
9987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9988 /* end confdefs.h. */
9989 #include <AppKit/AppKit.h>
9991 main ()
9994 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9995 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9996 ; /* OK */
9997 #else
9998 #error "OSX 10.4 or newer required"
9999 #endif
10000 #endif
10003 return 0;
10005 _ACEOF
10006 if ac_fn_c_try_compile "$LINENO"; then :
10007 ns_osx_have_104=yes
10008 else
10009 ns_osx_have_104=no
10011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10013 /* end confdefs.h. */
10014 #include <Foundation/NSObjCRuntime.h>
10016 main ()
10018 NSInteger i;
10020 return 0;
10022 _ACEOF
10023 if ac_fn_c_try_compile "$LINENO"; then :
10024 ns_have_nsinteger=yes
10025 else
10026 ns_have_nsinteger=no
10028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10029 if test $ns_osx_have_104 = no; then
10030 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10032 if test $ns_have_nsinteger = yes; then
10034 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10041 INSTALL_ARCH_INDEP_EXTRA=install-etc
10042 ns_self_contained=no
10043 NS_OBJ=
10044 NS_OBJC_OBJ=
10045 if test "${HAVE_NS}" = yes; then
10046 if test "$with_toolkit_scroll_bars" = "no"; then
10047 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10050 window_system=nextstep
10051 # set up packaging dirs
10052 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10053 ns_self_contained=yes
10054 prefix=${ns_appresdir}
10055 exec_prefix=${ns_appbindir}
10056 libexecdir="\${ns_appbindir}/libexec"
10057 archlibdir="\${ns_appbindir}/libexec"
10058 docdir="\${ns_appresdir}/etc"
10059 etcdir="\${ns_appresdir}/etc"
10060 infodir="\${ns_appresdir}/info"
10061 mandir="\${ns_appresdir}/man"
10062 lispdir="\${ns_appresdir}/lisp"
10063 leimdir="\${ns_appresdir}/leim"
10064 INSTALL_ARCH_INDEP_EXTRA=
10066 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
10068 CFLAGS="$tmp_CFLAGS"
10069 CPPFLAGS="$tmp_CPPFLAGS"
10075 HAVE_W32=no
10076 W32_OBJ=
10077 W32_LIBS=
10078 EMACSRES=
10079 CLIENTRES=
10080 CLIENTW=
10081 W32_RES_LINK=
10082 EMACS_MANIFEST=
10083 if test "${with_w32}" != no; then
10084 case "${opsys}" in
10085 cygwin)
10086 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
10087 if test "x$ac_cv_header_windows_h" = x""yes; then :
10088 HAVE_W32=yes
10089 else
10090 as_fn_error "\`--with-w32' was specified, but windows.h
10091 cannot be found." "$LINENO" 5
10096 mingw32)
10097 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10100 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10102 esac
10105 if test "${opsys}" = "mingw32"; then
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10107 $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10109 /* end confdefs.h. */
10111 #include <windows.h>
10112 #include <usp10.h>
10114 main ()
10116 PIMAGE_NT_HEADERS pHeader;
10117 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
10119 return 0;
10121 _ACEOF
10122 if ac_fn_c_try_compile "$LINENO"; then :
10123 emacs_cv_w32api=yes
10124 HAVE_W32=yes
10125 else
10126 emacs_cv_w32api=no
10128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10130 $as_echo "$emacs_cv_w32api" >&6; }
10131 if test "${emacs_cv_w32api}" = "no"; then
10132 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10136 FIRSTFILE_OBJ=
10137 NTDIR=
10138 LIBS_ECLIENT=
10139 LIB_WSOCK32=
10140 NTLIB=
10141 CM_OBJ="cm.o"
10142 XARGS_LIMIT=
10143 if test "${HAVE_W32}" = "yes"; then
10145 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10147 if test -n "$ac_tool_prefix"; then
10148 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10149 set dummy ${ac_tool_prefix}windres; ac_word=$2
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151 $as_echo_n "checking for $ac_word... " >&6; }
10152 if test "${ac_cv_prog_WINDRES+set}" = set; then :
10153 $as_echo_n "(cached) " >&6
10154 else
10155 if test -n "$WINDRES"; then
10156 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10157 else
10158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159 for as_dir in $PATH
10161 IFS=$as_save_IFS
10162 test -z "$as_dir" && as_dir=.
10163 for ac_exec_ext in '' $ac_executable_extensions; do
10164 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10165 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167 break 2
10169 done
10170 done
10171 IFS=$as_save_IFS
10175 WINDRES=$ac_cv_prog_WINDRES
10176 if test -n "$WINDRES"; then
10177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10178 $as_echo "$WINDRES" >&6; }
10179 else
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181 $as_echo "no" >&6; }
10186 if test -z "$ac_cv_prog_WINDRES"; then
10187 ac_ct_WINDRES=$WINDRES
10188 # Extract the first word of "windres", so it can be a program name with args.
10189 set dummy windres; ac_word=$2
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191 $as_echo_n "checking for $ac_word... " >&6; }
10192 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10193 $as_echo_n "(cached) " >&6
10194 else
10195 if test -n "$ac_ct_WINDRES"; then
10196 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10197 else
10198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199 for as_dir in $PATH
10201 IFS=$as_save_IFS
10202 test -z "$as_dir" && as_dir=.
10203 for ac_exec_ext in '' $ac_executable_extensions; do
10204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10205 ac_cv_prog_ac_ct_WINDRES="windres"
10206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207 break 2
10209 done
10210 done
10211 IFS=$as_save_IFS
10215 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10216 if test -n "$ac_ct_WINDRES"; then
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10218 $as_echo "$ac_ct_WINDRES" >&6; }
10219 else
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221 $as_echo "no" >&6; }
10224 if test "x$ac_ct_WINDRES" = x; then
10225 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10226 else
10227 case $cross_compiling:$ac_tool_warned in
10228 yes:)
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10230 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10231 ac_tool_warned=yes ;;
10232 esac
10233 WINDRES=$ac_ct_WINDRES
10235 else
10236 WINDRES="$ac_cv_prog_WINDRES"
10239 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10240 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
10241 EMACSRES="emacs.res"
10242 case "$canonical" in
10243 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10244 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10245 esac
10246 if test "${opsys}" = "cygwin"; then
10247 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10248 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10249 # Tell the linker that emacs.res is an object (which we compile from
10250 # the rc file), not a linker script.
10251 W32_RES_LINK="-Wl,emacs.res"
10252 else
10253 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
10254 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10255 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10256 W32_RES_LINK="\$(EMACSRES)"
10257 CLIENTRES="emacsclient.res"
10258 CLIENTW="emacsclientw\$(EXEEXT)"
10259 FIRSTFILE_OBJ=firstfile.o
10260 NTDIR=nt
10261 CM_OBJ=
10262 LIBS_ECLIENT="-lcomctl32"
10263 LIB_WSOCK32="-lwsock32"
10264 NTLIB="ntlib.$ac_objext"
10265 XARGS_LIMIT="-s 10000"
10283 if test "${HAVE_W32}" = "yes"; then
10284 window_system=w32
10285 with_xft=no
10288 ## $window_system is now set to the window system we will
10289 ## ultimately use.
10291 term_header=
10292 HAVE_X_WINDOWS=no
10293 HAVE_X11=no
10294 USE_X_TOOLKIT=none
10296 case "${window_system}" in
10297 x11 )
10298 HAVE_X_WINDOWS=yes
10299 HAVE_X11=yes
10300 term_header=xterm.h
10301 case "${with_x_toolkit}" in
10302 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10303 motif ) USE_X_TOOLKIT=MOTIF ;;
10304 gtk ) with_gtk=yes
10305 term_header=gtkutil.h
10306 USE_X_TOOLKIT=none ;;
10307 gtk2 ) with_gtk2=yes
10308 term_header=gtkutil.h
10309 USE_X_TOOLKIT=none ;;
10310 gtk3 ) with_gtk3=yes
10311 term_header=gtkutil.h
10312 USE_X_TOOLKIT=none ;;
10313 no ) USE_X_TOOLKIT=none ;;
10314 * ) USE_X_TOOLKIT=maybe ;;
10315 esac
10317 nextstep )
10318 term_header=nsterm.h
10320 w32 )
10321 term_header=w32term.h
10323 esac
10325 if test "$window_system" = none && test "X$with_x" != "Xno"; then
10326 # Extract the first word of "X", so it can be a program name with args.
10327 set dummy X; ac_word=$2
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10329 $as_echo_n "checking for $ac_word... " >&6; }
10330 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10331 $as_echo_n "(cached) " >&6
10332 else
10333 if test -n "$HAVE_XSERVER"; then
10334 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10335 else
10336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337 for as_dir in $PATH
10339 IFS=$as_save_IFS
10340 test -z "$as_dir" && as_dir=.
10341 for ac_exec_ext in '' $ac_executable_extensions; do
10342 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10343 ac_cv_prog_HAVE_XSERVER="true"
10344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345 break 2
10347 done
10348 done
10349 IFS=$as_save_IFS
10351 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10354 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10355 if test -n "$HAVE_XSERVER"; then
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10357 $as_echo "$HAVE_XSERVER" >&6; }
10358 else
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360 $as_echo "no" >&6; }
10364 if test "$HAVE_XSERVER" = true ||
10365 test -n "$DISPLAY" ||
10366 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10367 as_fn_error "You seem to be running X, but no X development libraries
10368 were found. You should install the relevant development files for X
10369 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10370 sure you have development files for image handling, i.e.
10371 tiff, gif, jpeg, png and xpm.
10372 If you are sure you want Emacs compiled without X window support, pass
10373 --without-x
10374 to configure." "$LINENO" 5
10378 ### If we're using X11, we should use the X menu package.
10379 HAVE_MENUS=no
10380 case ${HAVE_X11} in
10381 yes ) HAVE_MENUS=yes ;;
10382 esac
10384 # Does the opsystem file prohibit the use of the GNU malloc?
10385 # Assume not, until told otherwise.
10386 GNU_MALLOC=yes
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10389 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10390 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
10391 $as_echo_n "(cached) " >&6
10392 else
10393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10394 /* end confdefs.h. */
10395 #include <malloc.h>
10396 static void hook (void) {}
10398 main ()
10400 malloc_set_state (malloc_get_state ());
10401 __after_morecore_hook = hook;
10402 __malloc_initialize_hook = hook;
10404 return 0;
10406 _ACEOF
10407 if ac_fn_c_try_link "$LINENO"; then :
10408 emacs_cv_var_doug_lea_malloc=yes
10409 else
10410 emacs_cv_var_doug_lea_malloc=no
10412 rm -f core conftest.err conftest.$ac_objext \
10413 conftest$ac_exeext conftest.$ac_ext
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10416 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10417 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10420 system_malloc=no
10421 case "$opsys" in
10422 ## darwin ld insists on the use of malloc routines in the System framework.
10423 darwin|sol2-10) system_malloc=yes ;;
10424 esac
10426 if test "${system_malloc}" = "yes"; then
10428 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10430 GNU_MALLOC=no
10431 GNU_MALLOC_reason="
10432 (The GNU allocators don't work with this system configuration.)"
10433 GMALLOC_OBJ=
10434 VMLIMIT_OBJ=
10435 else
10436 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10437 VMLIMIT_OBJ=vm-limit.o
10439 for ac_header in sys/vlimit.h
10440 do :
10441 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10442 if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10443 cat >>confdefs.h <<_ACEOF
10444 #define HAVE_SYS_VLIMIT_H 1
10445 _ACEOF
10449 done
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10452 $as_echo_n "checking for data_start... " >&6; }
10453 if test "${emacs_cv_data_start+set}" = set; then :
10454 $as_echo_n "(cached) " >&6
10455 else
10456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10457 /* end confdefs.h. */
10458 extern char data_start[]; char ch;
10460 main ()
10462 return data_start < &ch;
10464 return 0;
10466 _ACEOF
10467 if ac_fn_c_try_link "$LINENO"; then :
10468 emacs_cv_data_start=yes
10469 else
10470 emacs_cv_data_start=no
10472 rm -f core conftest.err conftest.$ac_objext \
10473 conftest$ac_exeext conftest.$ac_ext
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10476 $as_echo "$emacs_cv_data_start" >&6; }
10477 if test $emacs_cv_data_start = yes; then
10479 $as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10486 if test "$doug_lea_malloc" = "yes" ; then
10487 if test "$GNU_MALLOC" = yes ; then
10488 GNU_MALLOC_reason="
10489 (Using Doug Lea's new malloc from the GNU C Library.)"
10492 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10495 ## Use mmap directly for allocating larger buffers.
10496 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10497 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10498 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10499 case "$opsys" in
10500 gnu*) REL_ALLOC=no ;;
10501 esac
10504 if test x"${REL_ALLOC}" = x; then
10505 REL_ALLOC=${GNU_MALLOC}
10508 use_mmap_for_buffers=no
10509 case "$opsys" in
10510 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10511 esac
10520 for ac_func in getpagesize
10521 do :
10522 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10523 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10524 cat >>confdefs.h <<_ACEOF
10525 #define HAVE_GETPAGESIZE 1
10526 _ACEOF
10529 done
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10532 $as_echo_n "checking for working mmap... " >&6; }
10533 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10534 $as_echo_n "(cached) " >&6
10535 else
10536 if test "$cross_compiling" = yes; then :
10537 ac_cv_func_mmap_fixed_mapped=no
10538 else
10539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10540 /* end confdefs.h. */
10541 $ac_includes_default
10542 /* malloc might have been renamed as rpl_malloc. */
10543 #undef malloc
10545 /* Thanks to Mike Haertel and Jim Avera for this test.
10546 Here is a matrix of mmap possibilities:
10547 mmap private not fixed
10548 mmap private fixed at somewhere currently unmapped
10549 mmap private fixed at somewhere already mapped
10550 mmap shared not fixed
10551 mmap shared fixed at somewhere currently unmapped
10552 mmap shared fixed at somewhere already mapped
10553 For private mappings, we should verify that changes cannot be read()
10554 back from the file, nor mmap's back from the file at a different
10555 address. (There have been systems where private was not correctly
10556 implemented like the infamous i386 svr4.0, and systems where the
10557 VM page cache was not coherent with the file system buffer cache
10558 like early versions of FreeBSD and possibly contemporary NetBSD.)
10559 For shared mappings, we should conversely verify that changes get
10560 propagated back to all the places they're supposed to be.
10562 Grep wants private fixed already mapped.
10563 The main things grep needs to know about mmap are:
10564 * does it exist and is it safe to write into the mmap'd area
10565 * how to use it (BSD variants) */
10567 #include <fcntl.h>
10568 #include <sys/mman.h>
10570 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10571 char *malloc ();
10572 #endif
10574 /* This mess was copied from the GNU getpagesize.h. */
10575 #ifndef HAVE_GETPAGESIZE
10576 # ifdef _SC_PAGESIZE
10577 # define getpagesize() sysconf(_SC_PAGESIZE)
10578 # else /* no _SC_PAGESIZE */
10579 # ifdef HAVE_SYS_PARAM_H
10580 # include <sys/param.h>
10581 # ifdef EXEC_PAGESIZE
10582 # define getpagesize() EXEC_PAGESIZE
10583 # else /* no EXEC_PAGESIZE */
10584 # ifdef NBPG
10585 # define getpagesize() NBPG * CLSIZE
10586 # ifndef CLSIZE
10587 # define CLSIZE 1
10588 # endif /* no CLSIZE */
10589 # else /* no NBPG */
10590 # ifdef NBPC
10591 # define getpagesize() NBPC
10592 # else /* no NBPC */
10593 # ifdef PAGESIZE
10594 # define getpagesize() PAGESIZE
10595 # endif /* PAGESIZE */
10596 # endif /* no NBPC */
10597 # endif /* no NBPG */
10598 # endif /* no EXEC_PAGESIZE */
10599 # else /* no HAVE_SYS_PARAM_H */
10600 # define getpagesize() 8192 /* punt totally */
10601 # endif /* no HAVE_SYS_PARAM_H */
10602 # endif /* no _SC_PAGESIZE */
10604 #endif /* no HAVE_GETPAGESIZE */
10607 main ()
10609 char *data, *data2, *data3;
10610 const char *cdata2;
10611 int i, pagesize;
10612 int fd, fd2;
10614 pagesize = getpagesize ();
10616 /* First, make a file with some known garbage in it. */
10617 data = (char *) malloc (pagesize);
10618 if (!data)
10619 return 1;
10620 for (i = 0; i < pagesize; ++i)
10621 *(data + i) = rand ();
10622 umask (0);
10623 fd = creat ("conftest.mmap", 0600);
10624 if (fd < 0)
10625 return 2;
10626 if (write (fd, data, pagesize) != pagesize)
10627 return 3;
10628 close (fd);
10630 /* Next, check that the tail of a page is zero-filled. File must have
10631 non-zero length, otherwise we risk SIGBUS for entire page. */
10632 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10633 if (fd2 < 0)
10634 return 4;
10635 cdata2 = "";
10636 if (write (fd2, cdata2, 1) != 1)
10637 return 5;
10638 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10639 if (data2 == MAP_FAILED)
10640 return 6;
10641 for (i = 0; i < pagesize; ++i)
10642 if (*(data2 + i))
10643 return 7;
10644 close (fd2);
10645 if (munmap (data2, pagesize))
10646 return 8;
10648 /* Next, try to mmap the file at a fixed address which already has
10649 something else allocated at it. If we can, also make sure that
10650 we see the same garbage. */
10651 fd = open ("conftest.mmap", O_RDWR);
10652 if (fd < 0)
10653 return 9;
10654 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10655 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10656 return 10;
10657 for (i = 0; i < pagesize; ++i)
10658 if (*(data + i) != *(data2 + i))
10659 return 11;
10661 /* Finally, make sure that changes to the mapped area do not
10662 percolate back to the file as seen by read(). (This is a bug on
10663 some variants of i386 svr4.0.) */
10664 for (i = 0; i < pagesize; ++i)
10665 *(data2 + i) = *(data2 + i) + 1;
10666 data3 = (char *) malloc (pagesize);
10667 if (!data3)
10668 return 12;
10669 if (read (fd, data3, pagesize) != pagesize)
10670 return 13;
10671 for (i = 0; i < pagesize; ++i)
10672 if (*(data + i) != *(data3 + i))
10673 return 14;
10674 close (fd);
10675 return 0;
10677 _ACEOF
10678 if ac_fn_c_try_run "$LINENO"; then :
10679 ac_cv_func_mmap_fixed_mapped=yes
10680 else
10681 ac_cv_func_mmap_fixed_mapped=no
10683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10684 conftest.$ac_objext conftest.beam conftest.$ac_ext
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10689 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10690 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10692 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10695 rm -f conftest.mmap conftest.txt
10697 if test $use_mmap_for_buffers = yes; then
10699 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10701 REL_ALLOC=no
10704 LIBS="$LIBS_SYSTEM $LIBS"
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10707 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10708 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10709 $as_echo_n "(cached) " >&6
10710 else
10711 ac_check_lib_save_LIBS=$LIBS
10712 LIBS="-ldnet $LIBS"
10713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10714 /* end confdefs.h. */
10716 /* Override any GCC internal prototype to avoid an error.
10717 Use char because int might match the return type of a GCC
10718 builtin and then its argument prototype would still apply. */
10719 #ifdef __cplusplus
10720 extern "C"
10721 #endif
10722 char dnet_ntoa ();
10724 main ()
10726 return dnet_ntoa ();
10728 return 0;
10730 _ACEOF
10731 if ac_fn_c_try_link "$LINENO"; then :
10732 ac_cv_lib_dnet_dnet_ntoa=yes
10733 else
10734 ac_cv_lib_dnet_dnet_ntoa=no
10736 rm -f core conftest.err conftest.$ac_objext \
10737 conftest$ac_exeext conftest.$ac_ext
10738 LIBS=$ac_check_lib_save_LIBS
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10741 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10742 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10743 cat >>confdefs.h <<_ACEOF
10744 #define HAVE_LIBDNET 1
10745 _ACEOF
10747 LIBS="-ldnet $LIBS"
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10753 $as_echo_n "checking for main in -lXbsd... " >&6; }
10754 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10755 $as_echo_n "(cached) " >&6
10756 else
10757 ac_check_lib_save_LIBS=$LIBS
10758 LIBS="-lXbsd $LIBS"
10759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10760 /* end confdefs.h. */
10764 main ()
10766 return main ();
10768 return 0;
10770 _ACEOF
10771 if ac_fn_c_try_link "$LINENO"; then :
10772 ac_cv_lib_Xbsd_main=yes
10773 else
10774 ac_cv_lib_Xbsd_main=no
10776 rm -f core conftest.err conftest.$ac_objext \
10777 conftest$ac_exeext conftest.$ac_ext
10778 LIBS=$ac_check_lib_save_LIBS
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10781 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10782 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10783 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10787 LIB_PTHREAD=
10791 if test "$ac_cv_header_pthread_h"; then
10792 if test "$GMALLOC_OBJ" = gmalloc.o; then
10793 emacs_pthread_function=pthread_atfork
10794 else
10795 emacs_pthread_function=pthread_self
10797 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10799 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10800 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10801 $as_echo_n "(cached) " >&6
10802 else
10803 ac_check_lib_save_LIBS=$LIBS
10804 LIBS="-lpthread $LIBS"
10805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10806 /* end confdefs.h. */
10808 /* Override any GCC internal prototype to avoid an error.
10809 Use char because int might match the return type of a GCC
10810 builtin and then its argument prototype would still apply. */
10811 #ifdef __cplusplus
10812 extern "C"
10813 #endif
10814 char $emacs_pthread_function ();
10816 main ()
10818 return $emacs_pthread_function ();
10820 return 0;
10822 _ACEOF
10823 if ac_fn_c_try_link "$LINENO"; then :
10824 eval "$as_ac_Lib=yes"
10825 else
10826 eval "$as_ac_Lib=no"
10828 rm -f core conftest.err conftest.$ac_objext \
10829 conftest$ac_exeext conftest.$ac_ext
10830 LIBS=$ac_check_lib_save_LIBS
10832 eval ac_res=\$$as_ac_Lib
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10834 $as_echo "$ac_res" >&6; }
10835 eval as_val=\$$as_ac_Lib
10836 if test "x$as_val" = x""yes; then :
10837 HAVE_PTHREAD=yes
10841 if test "$HAVE_PTHREAD" = yes; then
10842 case "${canonical}" in
10843 *-hpux*) ;;
10844 *) LIB_PTHREAD="-lpthread"
10845 LIBS="$LIB_PTHREAD $LIBS" ;;
10846 esac
10848 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10854 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10855 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10856 $as_echo_n "(cached) " >&6
10857 else
10858 ac_check_lib_save_LIBS=$LIBS
10859 LIBS="-lpthreads $LIBS"
10860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10861 /* end confdefs.h. */
10863 /* Override any GCC internal prototype to avoid an error.
10864 Use char because int might match the return type of a GCC
10865 builtin and then its argument prototype would still apply. */
10866 #ifdef __cplusplus
10867 extern "C"
10868 #endif
10869 char cma_open ();
10871 main ()
10873 return cma_open ();
10875 return 0;
10877 _ACEOF
10878 if ac_fn_c_try_link "$LINENO"; then :
10879 ac_cv_lib_pthreads_cma_open=yes
10880 else
10881 ac_cv_lib_pthreads_cma_open=no
10883 rm -f core conftest.err conftest.$ac_objext \
10884 conftest$ac_exeext conftest.$ac_ext
10885 LIBS=$ac_check_lib_save_LIBS
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10888 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10889 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10890 cat >>confdefs.h <<_ACEOF
10891 #define HAVE_LIBPTHREADS 1
10892 _ACEOF
10894 LIBS="-lpthreads $LIBS"
10899 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10900 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10901 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10902 ## added to LIBS in configure would never contain the pthreads part,
10903 ## but the value used in Makefiles might. FIXME?
10905 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10906 ## be harmless on older versions of X where it happens to exist.
10907 test "$opsys" = "aix4-2" && \
10908 test $ac_cv_lib_pthreads_cma_open = yes && \
10909 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10912 case ${host_os} in
10913 aix*)
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10915 $as_echo_n "checking for -bbigtoc option... " >&6; }
10916 if test "${gdb_cv_bigtoc+set}" = set; then :
10917 $as_echo_n "(cached) " >&6
10918 else
10920 case $GCC in
10921 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10922 *) gdb_cv_bigtoc=-bbigtoc ;;
10923 esac
10925 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10927 /* end confdefs.h. */
10930 main ()
10932 int i;
10934 return 0;
10936 _ACEOF
10937 if ac_fn_c_try_link "$LINENO"; then :
10939 else
10940 gdb_cv_bigtoc=
10942 rm -f core conftest.err conftest.$ac_objext \
10943 conftest$ac_exeext conftest.$ac_ext
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10947 $as_echo "$gdb_cv_bigtoc" >&6; }
10949 esac
10951 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10952 # used for the tests that follow. We set them back to REAL_CFLAGS and
10953 # REAL_CPPFLAGS later on.
10955 REAL_CFLAGS="$CFLAGS"
10956 REAL_CPPFLAGS="$CPPFLAGS"
10958 if test "${HAVE_X11}" = "yes"; then
10959 DEFS="$C_SWITCH_X_SITE $DEFS"
10960 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10961 LIBS="-lX11 $LIBS"
10962 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10963 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10965 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10966 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10967 # but it's more convenient here to set LD_RUN_PATH since this
10968 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10969 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10970 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10971 export LD_RUN_PATH
10974 if test "${opsys}" = "gnu-linux"; then
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10976 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978 /* end confdefs.h. */
10981 main ()
10983 XOpenDisplay ("foo");
10985 return 0;
10987 _ACEOF
10988 if ac_fn_c_try_link "$LINENO"; then :
10989 xgnu_linux_first_failure=no
10990 else
10991 xgnu_linux_first_failure=yes
10993 rm -f core conftest.err conftest.$ac_objext \
10994 conftest$ac_exeext conftest.$ac_ext
10995 if test "${xgnu_linux_first_failure}" = "yes"; then
10996 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10997 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10998 OLD_CPPFLAGS="$CPPFLAGS"
10999 OLD_LIBS="$LIBS"
11000 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11001 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11002 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11003 LIBS="$LIBS -b i486-linuxaout"
11004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11005 /* end confdefs.h. */
11008 main ()
11010 XOpenDisplay ("foo");
11012 return 0;
11014 _ACEOF
11015 if ac_fn_c_try_link "$LINENO"; then :
11016 xgnu_linux_second_failure=no
11017 else
11018 xgnu_linux_second_failure=yes
11020 rm -f core conftest.err conftest.$ac_objext \
11021 conftest$ac_exeext conftest.$ac_ext
11022 if test "${xgnu_linux_second_failure}" = "yes"; then
11023 # If we get the same failure with -b, there is no use adding -b.
11024 # So take it out. This plays safe.
11025 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11026 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11027 CPPFLAGS="$OLD_CPPFLAGS"
11028 LIBS="$OLD_LIBS"
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030 $as_echo "no" >&6; }
11031 else
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11033 $as_echo "yes" >&6; }
11035 else
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037 $as_echo "no" >&6; }
11041 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11042 # header files included from there.
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11044 $as_echo_n "checking for Xkb... " >&6; }
11045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11046 /* end confdefs.h. */
11047 #include <X11/Xlib.h>
11048 #include <X11/XKBlib.h>
11050 main ()
11052 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
11054 return 0;
11056 _ACEOF
11057 if ac_fn_c_try_link "$LINENO"; then :
11058 emacs_xkb=yes
11059 else
11060 emacs_xkb=no
11062 rm -f core conftest.err conftest.$ac_objext \
11063 conftest$ac_exeext conftest.$ac_ext
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11065 $as_echo "$emacs_xkb" >&6; }
11066 if test $emacs_xkb = yes; then
11068 $as_echo "#define HAVE_XKB 1" >>confdefs.h
11072 for ac_func in XrmSetDatabase XScreenResourceString \
11073 XScreenNumberOfScreen
11074 do :
11075 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11076 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11077 eval as_val=\$$as_ac_var
11078 if test "x$as_val" = x""yes; then :
11079 cat >>confdefs.h <<_ACEOF
11080 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11081 _ACEOF
11084 done
11088 if test "${window_system}" = "x11"; then
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11090 $as_echo_n "checking X11 version 6... " >&6; }
11091 if test "${emacs_cv_x11_version_6+set}" = set; then :
11092 $as_echo_n "(cached) " >&6
11093 else
11094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11095 /* end confdefs.h. */
11096 #include <X11/Xlib.h>
11098 main ()
11100 #if XlibSpecificationRelease < 6
11101 fail;
11102 #endif
11105 return 0;
11107 _ACEOF
11108 if ac_fn_c_try_link "$LINENO"; then :
11109 emacs_cv_x11_version_6=yes
11110 else
11111 emacs_cv_x11_version_6=no
11113 rm -f core conftest.err conftest.$ac_objext \
11114 conftest$ac_exeext conftest.$ac_ext
11117 if test $emacs_cv_x11_version_6 = yes; then
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11119 $as_echo "6 or newer" >&6; }
11121 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
11124 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
11126 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11127 ## XIM support.
11128 case "$opsys" in
11129 sol2-*) : ;;
11131 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
11134 esac
11135 else
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11137 $as_echo "before 6" >&6; }
11142 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11143 HAVE_RSVG=no
11144 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
11145 if test "${with_rsvg}" != "no"; then
11146 RSVG_REQUIRED=2.11.0
11147 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11150 succeeded=no
11152 if test "$PKG_CONFIG" = "no" ; then
11154 else
11155 PKG_CONFIG_MIN_VERSION=0.9.0
11156 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11158 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
11160 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11161 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11162 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
11163 edit_cflags="
11164 s,///*,/,g
11165 s/^/ /
11166 s/ -I/ $isystem/g
11167 s/^ //
11169 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11170 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11172 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11173 succeeded=yes
11174 else
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176 $as_echo "no" >&6; }
11177 RSVG_CFLAGS=""
11178 RSVG_LIBS=""
11179 ## If we have a custom action on failure, don't print errors, but
11180 ## do set a variable so people can do so. Do it in a subshell
11181 ## to capture any diagnostics in invoking pkg-config.
11182 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
11188 else
11189 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11190 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11194 if test $succeeded = yes; then
11195 HAVE_RSVG=yes
11196 else
11203 if test $HAVE_RSVG = yes; then
11205 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
11207 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11208 LIBS="$RSVG_LIBS $LIBS"
11213 HAVE_IMAGEMAGICK=no
11214 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
11215 if test "${with_imagemagick}" != "no"; then
11216 ## 6.2.8 is the earliest version known to work, but earlier versions
11217 ## might work - let us know if you find one.
11218 ## 6.0.7 does not work. See bug#7955.
11219 ## 6.8.2 makes Emacs crash; see Bug#13867.
11220 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
11222 succeeded=no
11224 if test "$PKG_CONFIG" = "no" ; then
11226 else
11227 PKG_CONFIG_MIN_VERSION=0.9.0
11228 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11230 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
11232 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11233 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11234 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
11235 edit_cflags="
11236 s,///*,/,g
11237 s/^/ /
11238 s/ -I/ $isystem/g
11239 s/^ //
11241 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11242 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11244 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11245 succeeded=yes
11246 else
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248 $as_echo "no" >&6; }
11249 IMAGEMAGICK_CFLAGS=""
11250 IMAGEMAGICK_LIBS=""
11251 ## If we have a custom action on failure, don't print errors, but
11252 ## do set a variable so people can do so. Do it in a subshell
11253 ## to capture any diagnostics in invoking pkg-config.
11254 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
11260 else
11261 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11262 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11266 if test $succeeded = yes; then
11267 HAVE_IMAGEMAGICK=yes
11268 else
11275 if test $HAVE_IMAGEMAGICK = yes; then
11277 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
11279 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11280 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11281 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11282 do :
11283 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11284 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11285 eval as_val=\$$as_ac_var
11286 if test "x$as_val" = x""yes; then :
11287 cat >>confdefs.h <<_ACEOF
11288 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11289 _ACEOF
11292 done
11299 HAVE_GTK=no
11300 GTK_OBJ=
11301 gtk_term_header=$term_header
11302 check_gtk2=no
11303 gtk3_pkg_errors=
11304 if test "${opsys}" != "mingw32"; then
11305 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11306 GLIB_REQUIRED=2.28
11307 GTK_REQUIRED=3.0
11308 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11311 succeeded=no
11313 if test "$PKG_CONFIG" = "no" ; then
11314 pkg_check_gtk=no
11315 else
11316 PKG_CONFIG_MIN_VERSION=0.9.0
11317 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11319 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11321 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11322 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11323 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11324 edit_cflags="
11325 s,///*,/,g
11326 s/^/ /
11327 s/ -I/ $isystem/g
11328 s/^ //
11330 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11331 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11333 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11334 succeeded=yes
11335 else
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337 $as_echo "no" >&6; }
11338 GTK_CFLAGS=""
11339 GTK_LIBS=""
11340 ## If we have a custom action on failure, don't print errors, but
11341 ## do set a variable so people can do so. Do it in a subshell
11342 ## to capture any diagnostics in invoking pkg-config.
11343 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11349 else
11350 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11351 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11355 if test $succeeded = yes; then
11356 pkg_check_gtk=yes
11357 else
11358 pkg_check_gtk=no
11361 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11362 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11364 if test "$pkg_check_gtk" = "yes"; then
11366 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
11368 GTK_OBJ=emacsgtkfixed.o
11369 gtk_term_header=gtkutil.h
11370 USE_GTK_TOOLKIT="GTK3"
11371 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11372 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11373 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
11375 else
11376 check_gtk2=yes
11377 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11381 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11382 GLIB_REQUIRED=2.10
11383 GTK_REQUIRED=2.10
11384 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11387 succeeded=no
11389 if test "$PKG_CONFIG" = "no" ; then
11390 pkg_check_gtk=no
11391 else
11392 PKG_CONFIG_MIN_VERSION=0.9.0
11393 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11395 $as_echo_n "checking for $GTK_MODULES... " >&6; }
11397 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11398 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11399 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
11400 edit_cflags="
11401 s,///*,/,g
11402 s/^/ /
11403 s/ -I/ $isystem/g
11404 s/^ //
11406 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11407 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11409 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11410 succeeded=yes
11411 else
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413 $as_echo "no" >&6; }
11414 GTK_CFLAGS=""
11415 GTK_LIBS=""
11416 ## If we have a custom action on failure, don't print errors, but
11417 ## do set a variable so people can do so. Do it in a subshell
11418 ## to capture any diagnostics in invoking pkg-config.
11419 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
11425 else
11426 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11427 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11431 if test $succeeded = yes; then
11432 pkg_check_gtk=yes
11433 else
11434 pkg_check_gtk=no
11437 if test "$pkg_check_gtk" = "no" &&
11438 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11439 then
11440 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11442 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
11446 if test x"$pkg_check_gtk" = xyes; then
11450 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11451 CFLAGS="$CFLAGS $GTK_CFLAGS"
11452 LIBS="$GTK_LIBS $LIBS"
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11454 $as_echo_n "checking whether GTK compiles... " >&6; }
11455 GTK_COMPILES=no
11456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457 /* end confdefs.h. */
11458 /* Check the Gtk and Glib APIs. */
11459 #include <gtk/gtk.h>
11460 #include <glib-object.h>
11461 static void
11462 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11466 main ()
11469 GtkSettings *gs = 0;
11470 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11471 strict C prohibits this. Use gtk_main_iteration to test that the
11472 libraries are there. */
11473 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11474 0, 0, 0, G_CALLBACK (callback), 0))
11475 gtk_main_iteration ();
11478 return 0;
11480 _ACEOF
11481 if ac_fn_c_try_link "$LINENO"; then :
11482 GTK_COMPILES=yes
11484 rm -f core conftest.err conftest.$ac_objext \
11485 conftest$ac_exeext conftest.$ac_ext
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11487 $as_echo "$GTK_COMPILES" >&6; }
11488 if test "${GTK_COMPILES}" != "yes"; then
11489 GTK_OBJ=
11490 if test "$USE_X_TOOLKIT" != "maybe"; then
11491 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11493 else
11494 HAVE_GTK=yes
11496 $as_echo "#define USE_GTK 1" >>confdefs.h
11498 GTK_OBJ="gtkutil.o $GTK_OBJ"
11499 term_header=$gtk_term_header
11500 USE_X_TOOLKIT=none
11501 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
11503 else
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11505 closing open displays. This is no problem if you just use
11506 one display, but if you use more than one and close one of them
11507 Emacs may crash." >&5
11508 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11509 closing open displays. This is no problem if you just use
11510 one display, but if you use more than one and close one of them
11511 Emacs may crash." >&2;}
11512 sleep 3
11520 if test "${HAVE_GTK}" = "yes"; then
11522 if test "$with_toolkit_scroll_bars" != no; then
11523 with_toolkit_scroll_bars=yes
11526 HAVE_GTK_FILE_SELECTION=no
11527 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11528 #include <gtk/gtk.h>
11530 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11531 HAVE_GTK_FILE_SELECTION=yes
11532 else
11533 HAVE_GTK_FILE_SELECTION=no
11536 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11537 for ac_func in gtk_file_selection_new
11538 do :
11539 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11540 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11541 cat >>confdefs.h <<_ACEOF
11542 #define HAVE_GTK_FILE_SELECTION_NEW 1
11543 _ACEOF
11546 done
11550 HAVE_GTK_HANDLE_BOX=no
11551 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11552 #include <gtk/gtk.h>
11554 if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11555 HAVE_GTK_HANDLE_BOX=yes
11556 else
11557 HAVE_GTK_HANDLE_BOX=no
11560 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11561 for ac_func in gtk_handle_box_new
11562 do :
11563 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11564 if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11565 cat >>confdefs.h <<_ACEOF
11566 #define HAVE_GTK_HANDLE_BOX_NEW 1
11567 _ACEOF
11570 done
11574 HAVE_GTK_TEAROFF_MENU_ITEM=no
11575 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11576 #include <gtk/gtk.h>
11578 if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11579 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11580 else
11581 HAVE_GTK_TEAROFF_MENU_ITEM=no
11584 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11585 for ac_func in gtk_tearoff_menu_item_new
11586 do :
11587 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11588 if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11589 cat >>confdefs.h <<_ACEOF
11590 #define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11591 _ACEOF
11594 done
11598 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11599 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11600 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11601 gtk_orientable_set_orientation \
11602 gtk_window_set_has_resize_grip
11603 do :
11604 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11605 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11606 eval as_val=\$$as_ac_var
11607 if test "x$as_val" = x""yes; then :
11608 cat >>confdefs.h <<_ACEOF
11609 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11610 _ACEOF
11613 done
11616 term_header=gtkutil.h
11619 HAVE_DBUS=no
11620 DBUS_OBJ=
11621 if test "${with_dbus}" = "yes"; then
11623 succeeded=no
11625 if test "$PKG_CONFIG" = "no" ; then
11626 HAVE_DBUS=no
11627 else
11628 PKG_CONFIG_MIN_VERSION=0.9.0
11629 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11631 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11633 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11634 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11635 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
11636 edit_cflags="
11637 s,///*,/,g
11638 s/^/ /
11639 s/ -I/ $isystem/g
11640 s/^ //
11642 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11643 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11645 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11646 succeeded=yes
11647 else
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649 $as_echo "no" >&6; }
11650 DBUS_CFLAGS=""
11651 DBUS_LIBS=""
11652 ## If we have a custom action on failure, don't print errors, but
11653 ## do set a variable so people can do so. Do it in a subshell
11654 ## to capture any diagnostics in invoking pkg-config.
11655 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
11661 else
11662 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11663 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11667 if test $succeeded = yes; then
11668 HAVE_DBUS=yes
11669 else
11670 HAVE_DBUS=no
11673 if test "$HAVE_DBUS" = yes; then
11674 LIBS="$LIBS $DBUS_LIBS"
11676 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
11678 for ac_func in dbus_watch_get_unix_fd \
11679 dbus_type_is_valid \
11680 dbus_validate_bus_name \
11681 dbus_validate_path \
11682 dbus_validate_interface \
11683 dbus_validate_member
11684 do :
11685 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11686 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11687 eval as_val=\$$as_ac_var
11688 if test "x$as_val" = x""yes; then :
11689 cat >>confdefs.h <<_ACEOF
11690 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11691 _ACEOF
11694 done
11696 DBUS_OBJ=dbusbind.o
11701 HAVE_GSETTINGS=no
11702 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11704 succeeded=no
11706 if test "$PKG_CONFIG" = "no" ; then
11707 HAVE_GSETTINGS=no
11708 else
11709 PKG_CONFIG_MIN_VERSION=0.9.0
11710 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11712 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11714 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11715 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11716 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
11717 edit_cflags="
11718 s,///*,/,g
11719 s/^/ /
11720 s/ -I/ $isystem/g
11721 s/^ //
11723 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11724 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11726 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11727 succeeded=yes
11728 else
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730 $as_echo "no" >&6; }
11731 GSETTINGS_CFLAGS=""
11732 GSETTINGS_LIBS=""
11733 ## If we have a custom action on failure, don't print errors, but
11734 ## do set a variable so people can do so. Do it in a subshell
11735 ## to capture any diagnostics in invoking pkg-config.
11736 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
11742 else
11743 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11744 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11748 if test $succeeded = yes; then
11749 HAVE_GSETTINGS=yes
11750 else
11751 HAVE_GSETTINGS=no
11754 if test "$HAVE_GSETTINGS" = "yes"; then
11756 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11758 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11759 SETTINGS_LIBS="$GSETTINGS_LIBS"
11763 HAVE_GCONF=no
11764 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11766 succeeded=no
11768 if test "$PKG_CONFIG" = "no" ; then
11769 HAVE_GCONF=no
11770 else
11771 PKG_CONFIG_MIN_VERSION=0.9.0
11772 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11774 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11776 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11777 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11778 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
11779 edit_cflags="
11780 s,///*,/,g
11781 s/^/ /
11782 s/ -I/ $isystem/g
11783 s/^ //
11785 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11786 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11788 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11789 succeeded=yes
11790 else
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11792 $as_echo "no" >&6; }
11793 GCONF_CFLAGS=""
11794 GCONF_LIBS=""
11795 ## If we have a custom action on failure, don't print errors, but
11796 ## do set a variable so people can do so. Do it in a subshell
11797 ## to capture any diagnostics in invoking pkg-config.
11798 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
11804 else
11805 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11806 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11810 if test $succeeded = yes; then
11811 HAVE_GCONF=yes
11812 else
11813 HAVE_GCONF=no
11816 if test "$HAVE_GCONF" = yes; then
11818 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11820 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11821 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11825 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11827 succeeded=no
11829 if test "$PKG_CONFIG" = "no" ; then
11830 HAVE_GOBJECT=no
11831 else
11832 PKG_CONFIG_MIN_VERSION=0.9.0
11833 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11835 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11837 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11838 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11839 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
11840 edit_cflags="
11841 s,///*,/,g
11842 s/^/ /
11843 s/ -I/ $isystem/g
11844 s/^ //
11846 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11847 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11849 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11850 succeeded=yes
11851 else
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853 $as_echo "no" >&6; }
11854 GOBJECT_CFLAGS=""
11855 GOBJECT_LIBS=""
11856 ## If we have a custom action on failure, don't print errors, but
11857 ## do set a variable so people can do so. Do it in a subshell
11858 ## to capture any diagnostics in invoking pkg-config.
11859 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
11865 else
11866 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11867 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11871 if test $succeeded = yes; then
11872 HAVE_GOBJECT=yes
11873 else
11874 HAVE_GOBJECT=no
11877 if test "$HAVE_GOBJECT" = "yes"; then
11878 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11879 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11881 SAVE_CFLAGS="$CFLAGS"
11882 SAVE_LIBS="$LIBS"
11883 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11884 LIBS="$SETTINGS_LIBS $LIBS"
11885 for ac_func in g_type_init
11886 do :
11887 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11888 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11889 cat >>confdefs.h <<_ACEOF
11890 #define HAVE_G_TYPE_INIT 1
11891 _ACEOF
11894 done
11896 CFLAGS="$SAVE_CFLAGS"
11897 LIBS="$SAVE_LIBS"
11903 HAVE_LIBSELINUX=no
11904 LIBSELINUX_LIBS=
11905 if test "${with_selinux}" = "yes"; then
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11907 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11908 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11909 $as_echo_n "(cached) " >&6
11910 else
11911 ac_check_lib_save_LIBS=$LIBS
11912 LIBS="-lselinux $LIBS"
11913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914 /* end confdefs.h. */
11916 /* Override any GCC internal prototype to avoid an error.
11917 Use char because int might match the return type of a GCC
11918 builtin and then its argument prototype would still apply. */
11919 #ifdef __cplusplus
11920 extern "C"
11921 #endif
11922 char lgetfilecon ();
11924 main ()
11926 return lgetfilecon ();
11928 return 0;
11930 _ACEOF
11931 if ac_fn_c_try_link "$LINENO"; then :
11932 ac_cv_lib_selinux_lgetfilecon=yes
11933 else
11934 ac_cv_lib_selinux_lgetfilecon=no
11936 rm -f core conftest.err conftest.$ac_objext \
11937 conftest$ac_exeext conftest.$ac_ext
11938 LIBS=$ac_check_lib_save_LIBS
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11941 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11942 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11943 HAVE_LIBSELINUX=yes
11944 else
11945 HAVE_LIBSELINUX=no
11948 if test "$HAVE_LIBSELINUX" = yes; then
11950 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11952 LIBSELINUX_LIBS=-lselinux
11957 HAVE_GNUTLS=no
11958 if test "${with_gnutls}" = "yes" ; then
11960 succeeded=no
11962 if test "$PKG_CONFIG" = "no" ; then
11963 HAVE_GNUTLS=no
11964 else
11965 PKG_CONFIG_MIN_VERSION=0.9.0
11966 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11968 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11970 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11971 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11972 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
11973 edit_cflags="
11974 s,///*,/,g
11975 s/^/ /
11976 s/ -I/ $isystem/g
11977 s/^ //
11979 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11980 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11982 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11983 succeeded=yes
11984 else
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986 $as_echo "no" >&6; }
11987 LIBGNUTLS_CFLAGS=""
11988 LIBGNUTLS_LIBS=""
11989 ## If we have a custom action on failure, don't print errors, but
11990 ## do set a variable so people can do so. Do it in a subshell
11991 ## to capture any diagnostics in invoking pkg-config.
11992 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
11998 else
11999 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12000 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12004 if test $succeeded = yes; then
12005 HAVE_GNUTLS=yes
12006 else
12007 HAVE_GNUTLS=no
12010 if test "${HAVE_GNUTLS}" = "yes"; then
12012 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
12016 # Windows loads GnuTLS dynamically
12017 if test "${opsys}" = "mingw32"; then
12018 LIBGNUTLS_LIBS=
12019 else
12020 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12021 LIBS="$LIBGNUTLS_LIBS $LIBS"
12028 NOTIFY_OBJ=
12029 NOTIFY_SUMMARY=no
12031 if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12032 with_file_notification=no
12035 case $with_file_notification,$opsys in
12036 w32,* | yes,mingw32)
12037 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12038 if test "x$ac_cv_header_windows_h" = x""yes; then :
12043 if test "$ac_cv_header_windows_h" = yes ; then
12045 $as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12047 NOTIFY_OBJ=w32notify.o
12048 NOTIFY_SUMMARY="yes (w32)"
12049 fi ;;
12050 esac
12052 case $with_file_notification,$NOTIFY_OBJ in
12053 gfile, | yes,)
12055 succeeded=no
12057 if test "$PKG_CONFIG" = "no" ; then
12058 HAVE_GFILENOTIFY=no
12059 else
12060 PKG_CONFIG_MIN_VERSION=0.9.0
12061 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12063 $as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12065 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12066 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12067 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12068 edit_cflags="
12069 s,///*,/,g
12070 s/^/ /
12071 s/ -I/ $isystem/g
12072 s/^ //
12074 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12075 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12077 $as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12078 succeeded=yes
12079 else
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081 $as_echo "no" >&6; }
12082 GFILENOTIFY_CFLAGS=""
12083 GFILENOTIFY_LIBS=""
12084 ## If we have a custom action on failure, don't print errors, but
12085 ## do set a variable so people can do so. Do it in a subshell
12086 ## to capture any diagnostics in invoking pkg-config.
12087 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12093 else
12094 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12095 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12099 if test $succeeded = yes; then
12100 HAVE_GFILENOTIFY=yes
12101 else
12102 HAVE_GFILENOTIFY=no
12105 if test "$HAVE_GFILENOTIFY" = "yes"; then
12107 $as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12109 NOTIFY_OBJ=gfilenotify.o
12110 NOTIFY_SUMMARY="yes -lgio (gfile)"
12111 fi ;;
12112 esac
12114 case $with_file_notification,$NOTIFY_OBJ in
12115 inotify, | yes,)
12116 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
12117 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
12122 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12123 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
12124 if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12128 if test "$ac_cv_func_inotify_init1" = yes; then
12130 $as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12132 NOTIFY_OBJ=inotify.o
12133 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12135 fi ;;
12136 esac
12138 case $with_file_notification,$NOTIFY_OBJ in
12139 yes,* | no,* | *,?*) ;;
12140 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12141 esac
12143 if test -n "$NOTIFY_OBJ"; then
12145 $as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
12152 HAVE_XAW3D=no
12153 LUCID_LIBW=
12154 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12155 if test "$with_xaw3d" != no; then
12156 if test "${emacs_cv_xaw3d+set}" = set; then :
12157 $as_echo_n "(cached) " >&6
12158 else
12159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12160 /* end confdefs.h. */
12162 #include <X11/Intrinsic.h>
12163 #include <X11/Xaw3d/Simple.h>
12165 main ()
12169 return 0;
12171 _ACEOF
12172 if ac_fn_c_try_link "$LINENO"; then :
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12174 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12175 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12176 $as_echo_n "(cached) " >&6
12177 else
12178 ac_check_lib_save_LIBS=$LIBS
12179 LIBS="-lXaw3d $LIBS"
12180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12181 /* end confdefs.h. */
12183 /* Override any GCC internal prototype to avoid an error.
12184 Use char because int might match the return type of a GCC
12185 builtin and then its argument prototype would still apply. */
12186 #ifdef __cplusplus
12187 extern "C"
12188 #endif
12189 char XawScrollbarSetThumb ();
12191 main ()
12193 return XawScrollbarSetThumb ();
12195 return 0;
12197 _ACEOF
12198 if ac_fn_c_try_link "$LINENO"; then :
12199 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
12200 else
12201 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
12203 rm -f core conftest.err conftest.$ac_objext \
12204 conftest$ac_exeext conftest.$ac_ext
12205 LIBS=$ac_check_lib_save_LIBS
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12208 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12209 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12210 emacs_cv_xaw3d=yes
12211 else
12212 emacs_cv_xaw3d=no
12215 else
12216 emacs_cv_xaw3d=no
12218 rm -f core conftest.err conftest.$ac_objext \
12219 conftest$ac_exeext conftest.$ac_ext
12222 else
12223 emacs_cv_xaw3d=no
12225 if test $emacs_cv_xaw3d = yes; then
12226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12227 $as_echo_n "checking for xaw3d... " >&6; }
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12229 $as_echo "yes; using Lucid toolkit" >&6; }
12230 USE_X_TOOLKIT=LUCID
12231 HAVE_XAW3D=yes
12232 LUCID_LIBW=-lXaw3d
12234 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
12236 else
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12238 $as_echo_n "checking for xaw3d... " >&6; }
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240 $as_echo "no" >&6; }
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12242 $as_echo_n "checking for libXaw... " >&6; }
12243 if test "${emacs_cv_xaw+set}" = set; then :
12244 $as_echo_n "(cached) " >&6
12245 else
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h. */
12249 #include <X11/Intrinsic.h>
12250 #include <X11/Xaw/Simple.h>
12252 main ()
12256 return 0;
12258 _ACEOF
12259 if ac_fn_c_try_link "$LINENO"; then :
12260 emacs_cv_xaw=yes
12261 else
12262 emacs_cv_xaw=no
12264 rm -f core conftest.err conftest.$ac_objext \
12265 conftest$ac_exeext conftest.$ac_ext
12268 if test $emacs_cv_xaw = yes; then
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12270 $as_echo "yes; using Lucid toolkit" >&6; }
12271 USE_X_TOOLKIT=LUCID
12272 LUCID_LIBW=-lXaw
12273 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12274 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
12275 else
12276 as_fn_error "No X toolkit could be found.
12277 If you are sure you want Emacs compiled without an X toolkit, pass
12278 --with-x-toolkit=no
12279 to configure. Otherwise, install the development libraries for the toolkit
12280 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
12285 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12287 LIBXTR6=
12288 if test "${USE_X_TOOLKIT}" != "none"; then
12289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12290 $as_echo_n "checking X11 toolkit version... " >&6; }
12291 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
12292 $as_echo_n "(cached) " >&6
12293 else
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295 /* end confdefs.h. */
12296 #include <X11/Intrinsic.h>
12298 main ()
12300 #if XtSpecificationRelease < 6
12301 fail;
12302 #endif
12305 return 0;
12307 _ACEOF
12308 if ac_fn_c_try_link "$LINENO"; then :
12309 emacs_cv_x11_toolkit_version_6=yes
12310 else
12311 emacs_cv_x11_toolkit_version_6=no
12313 rm -f core conftest.err conftest.$ac_objext \
12314 conftest$ac_exeext conftest.$ac_ext
12317 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12318 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12320 $as_echo "6 or newer" >&6; }
12322 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
12324 LIBXTR6="-lSM -lICE"
12325 case "$opsys" in
12326 ## Use libw.a along with X11R6 Xt.
12327 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12328 esac
12329 else
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12331 $as_echo "before 6" >&6; }
12334 OLDLIBS="$LIBS"
12335 if test x$HAVE_X11XTR6 = xyes; then
12336 LIBS="-lXt -lSM -lICE $LIBS"
12337 else
12338 LIBS="-lXt $LIBS"
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12341 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12342 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12343 $as_echo_n "(cached) " >&6
12344 else
12345 ac_check_lib_save_LIBS=$LIBS
12346 LIBS="-lXmu $LIBS"
12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12348 /* end confdefs.h. */
12350 /* Override any GCC internal prototype to avoid an error.
12351 Use char because int might match the return type of a GCC
12352 builtin and then its argument prototype would still apply. */
12353 #ifdef __cplusplus
12354 extern "C"
12355 #endif
12356 char XmuConvertStandardSelection ();
12358 main ()
12360 return XmuConvertStandardSelection ();
12362 return 0;
12364 _ACEOF
12365 if ac_fn_c_try_link "$LINENO"; then :
12366 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12367 else
12368 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
12370 rm -f core conftest.err conftest.$ac_objext \
12371 conftest$ac_exeext conftest.$ac_ext
12372 LIBS=$ac_check_lib_save_LIBS
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12375 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12376 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12377 cat >>confdefs.h <<_ACEOF
12378 #define HAVE_LIBXMU 1
12379 _ACEOF
12381 LIBS="-lXmu $LIBS"
12385 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12389 LIBXMU=-lXmu
12390 case $opsys in
12391 ## These systems don't supply Xmu.
12392 hpux* | aix4-2 )
12393 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12395 mingw32 )
12396 LIBXMU=
12398 esac
12401 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12402 if test "${HAVE_X11}" = "yes"; then
12403 if test "${USE_X_TOOLKIT}" != "none"; then
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12405 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12406 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
12407 $as_echo_n "(cached) " >&6
12408 else
12409 ac_check_lib_save_LIBS=$LIBS
12410 LIBS="-lXext $LIBS"
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412 /* end confdefs.h. */
12414 /* Override any GCC internal prototype to avoid an error.
12415 Use char because int might match the return type of a GCC
12416 builtin and then its argument prototype would still apply. */
12417 #ifdef __cplusplus
12418 extern "C"
12419 #endif
12420 char XShapeQueryExtension ();
12422 main ()
12424 return XShapeQueryExtension ();
12426 return 0;
12428 _ACEOF
12429 if ac_fn_c_try_link "$LINENO"; then :
12430 ac_cv_lib_Xext_XShapeQueryExtension=yes
12431 else
12432 ac_cv_lib_Xext_XShapeQueryExtension=no
12434 rm -f core conftest.err conftest.$ac_objext \
12435 conftest$ac_exeext conftest.$ac_ext
12436 LIBS=$ac_check_lib_save_LIBS
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12439 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12440 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12441 cat >>confdefs.h <<_ACEOF
12442 #define HAVE_LIBXEXT 1
12443 _ACEOF
12445 LIBS="-lXext $LIBS"
12452 LIBXP=
12453 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12454 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12455 if test -d /usr/include/openmotif; then
12456 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12457 emacs_cv_openmotif=yes
12458 case "$canonical" in
12459 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12460 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12463 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12464 esac
12465 else
12466 emacs_cv_openmotif=no
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12469 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
12470 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
12471 $as_echo_n "(cached) " >&6
12472 else
12473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12474 /* end confdefs.h. */
12475 #include <Xm/Xm.h>
12477 main ()
12479 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12480 int x = 5;
12481 #else
12482 Motif version prior to 2.1.
12483 #endif
12485 return 0;
12487 _ACEOF
12488 if ac_fn_c_try_compile "$LINENO"; then :
12489 emacs_cv_motif_version_2_1=yes
12490 else
12491 emacs_cv_motif_version_2_1=no
12493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12496 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
12497 if test $emacs_cv_motif_version_2_1 = yes; then
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12499 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12500 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12501 $as_echo_n "(cached) " >&6
12502 else
12503 ac_check_lib_save_LIBS=$LIBS
12504 LIBS="-lXp $LIBS"
12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12506 /* end confdefs.h. */
12508 /* Override any GCC internal prototype to avoid an error.
12509 Use char because int might match the return type of a GCC
12510 builtin and then its argument prototype would still apply. */
12511 #ifdef __cplusplus
12512 extern "C"
12513 #endif
12514 char XpCreateContext ();
12516 main ()
12518 return XpCreateContext ();
12520 return 0;
12522 _ACEOF
12523 if ac_fn_c_try_link "$LINENO"; then :
12524 ac_cv_lib_Xp_XpCreateContext=yes
12525 else
12526 ac_cv_lib_Xp_XpCreateContext=no
12528 rm -f core conftest.err conftest.$ac_objext \
12529 conftest$ac_exeext conftest.$ac_ext
12530 LIBS=$ac_check_lib_save_LIBS
12532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12533 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12534 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12535 LIBXP=-lXp
12538 if test x$emacs_cv_openmotif = xyes; then
12539 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12541 else
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12543 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
12544 if test "${emacs_cv_lesstif+set}" = set; then :
12545 $as_echo_n "(cached) " >&6
12546 else
12547 # We put this in CFLAGS temporarily to precede other -I options
12548 # that might be in CFLAGS temporarily.
12549 # We put this in CPPFLAGS where it precedes the other -I options.
12550 OLD_CPPFLAGS=$CPPFLAGS
12551 OLD_CFLAGS=$CFLAGS
12552 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12553 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555 /* end confdefs.h. */
12556 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12558 main ()
12560 int x = 5;
12562 return 0;
12564 _ACEOF
12565 if ac_fn_c_try_compile "$LINENO"; then :
12566 emacs_cv_lesstif=yes
12567 else
12568 emacs_cv_lesstif=no
12570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12573 $as_echo "$emacs_cv_lesstif" >&6; }
12574 if test $emacs_cv_lesstif = yes; then
12575 # Make sure this -I option remains in CPPFLAGS after it is set
12576 # back to REAL_CPPFLAGS.
12577 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12578 # have those other -I options anyway. Ultimately, having this
12579 # directory ultimately in CPPFLAGS will be enough.
12580 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12581 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12582 else
12583 CFLAGS=$OLD_CFLAGS
12584 CPPFLAGS=$OLD_CPPFLAGS
12587 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12588 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
12590 else
12591 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
12598 USE_TOOLKIT_SCROLL_BARS=no
12599 if test "${with_toolkit_scroll_bars}" != "no"; then
12600 if test "${USE_X_TOOLKIT}" != "none"; then
12601 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12602 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12604 HAVE_XAW3D=no
12605 USE_TOOLKIT_SCROLL_BARS=yes
12606 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12607 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12609 USE_TOOLKIT_SCROLL_BARS=yes
12611 elif test "${HAVE_GTK}" = "yes"; then
12612 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12614 USE_TOOLKIT_SCROLL_BARS=yes
12615 elif test "${HAVE_NS}" = "yes"; then
12616 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12618 USE_TOOLKIT_SCROLL_BARS=yes
12619 elif test "${HAVE_W32}" = "yes"; then
12620 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12622 USE_TOOLKIT_SCROLL_BARS=yes
12626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627 /* end confdefs.h. */
12629 #include <X11/Xlib.h>
12630 #include <X11/Xresource.h>
12632 main ()
12634 XIMProc callback;
12636 return 0;
12638 _ACEOF
12639 if ac_fn_c_try_compile "$LINENO"; then :
12640 HAVE_XIM=yes
12642 $as_echo "#define HAVE_XIM 1" >>confdefs.h
12644 else
12645 HAVE_XIM=no
12647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12650 if test "${with_xim}" != "no"; then
12652 $as_echo "#define USE_XIM 1" >>confdefs.h
12657 if test "${HAVE_XIM}" != "no"; then
12658 late_CFLAGS=$CFLAGS
12659 if test "$GCC" = yes; then
12660 CFLAGS="$CFLAGS --pedantic-errors"
12662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12663 /* end confdefs.h. */
12665 #include <X11/Xlib.h>
12666 #include <X11/Xresource.h>
12668 main ()
12670 Display *display;
12671 XrmDatabase db;
12672 char *res_name;
12673 char *res_class;
12674 XIMProc callback;
12675 XPointer *client_data;
12676 #ifndef __GNUC__
12677 /* If we're not using GCC, it's probably not XFree86, and this is
12678 probably right, but we can't use something like --pedantic-errors. */
12679 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12680 char*, XIMProc, XPointer*);
12681 #endif
12682 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12683 client_data);
12685 return 0;
12687 _ACEOF
12688 if ac_fn_c_try_compile "$LINENO"; then :
12689 emacs_cv_arg6_star=yes
12691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 if test "$emacs_cv_arg6_star" = yes; then
12693 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12695 else
12696 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
12699 CFLAGS=$late_CFLAGS
12702 ### Start of font-backend (under any platform) section.
12703 # (nothing here yet -- this is a placeholder)
12704 ### End of font-backend (under any platform) section.
12706 ### Start of font-backend (under X11) section.
12707 if test "${HAVE_X11}" = "yes"; then
12709 succeeded=no
12711 if test "$PKG_CONFIG" = "no" ; then
12712 HAVE_FC=no
12713 else
12714 PKG_CONFIG_MIN_VERSION=0.9.0
12715 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12717 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12719 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12720 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12721 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
12722 edit_cflags="
12723 s,///*,/,g
12724 s/^/ /
12725 s/ -I/ $isystem/g
12726 s/^ //
12728 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12729 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12731 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12732 succeeded=yes
12733 else
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735 $as_echo "no" >&6; }
12736 FONTCONFIG_CFLAGS=""
12737 FONTCONFIG_LIBS=""
12738 ## If we have a custom action on failure, don't print errors, but
12739 ## do set a variable so people can do so. Do it in a subshell
12740 ## to capture any diagnostics in invoking pkg-config.
12741 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
12747 else
12748 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12749 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12753 if test $succeeded = yes; then
12754 HAVE_FC=yes
12755 else
12756 HAVE_FC=no
12760 ## Use -lXft if available, unless `--with-xft=no'.
12761 HAVE_XFT=maybe
12762 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12763 with_xft="no";
12765 if test "x${with_xft}" != "xno"; then
12768 succeeded=no
12770 if test "$PKG_CONFIG" = "no" ; then
12771 HAVE_XFT=no
12772 else
12773 PKG_CONFIG_MIN_VERSION=0.9.0
12774 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12776 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12778 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12779 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12780 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
12781 edit_cflags="
12782 s,///*,/,g
12783 s/^/ /
12784 s/ -I/ $isystem/g
12785 s/^ //
12787 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12788 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12790 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12791 succeeded=yes
12792 else
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12794 $as_echo "no" >&6; }
12795 XFT_CFLAGS=""
12796 XFT_LIBS=""
12797 ## If we have a custom action on failure, don't print errors, but
12798 ## do set a variable so people can do so. Do it in a subshell
12799 ## to capture any diagnostics in invoking pkg-config.
12800 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
12806 else
12807 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12808 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12812 if test $succeeded = yes; then
12814 else
12815 HAVE_XFT=no
12818 ## Because xftfont.c uses XRenderQueryExtension, we also
12819 ## need to link to -lXrender.
12820 HAVE_XRENDER=no
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12822 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12823 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12824 $as_echo_n "(cached) " >&6
12825 else
12826 ac_check_lib_save_LIBS=$LIBS
12827 LIBS="-lXrender $LIBS"
12828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829 /* end confdefs.h. */
12831 /* Override any GCC internal prototype to avoid an error.
12832 Use char because int might match the return type of a GCC
12833 builtin and then its argument prototype would still apply. */
12834 #ifdef __cplusplus
12835 extern "C"
12836 #endif
12837 char XRenderQueryExtension ();
12839 main ()
12841 return XRenderQueryExtension ();
12843 return 0;
12845 _ACEOF
12846 if ac_fn_c_try_link "$LINENO"; then :
12847 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12848 else
12849 ac_cv_lib_Xrender_XRenderQueryExtension=no
12851 rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext conftest.$ac_ext
12853 LIBS=$ac_check_lib_save_LIBS
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12856 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12857 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12858 HAVE_XRENDER=yes
12861 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12862 OLD_CPPFLAGS="$CPPFLAGS"
12863 OLD_CFLAGS="$CFLAGS"
12864 OLD_LIBS="$LIBS"
12865 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12866 CFLAGS="$CFLAGS $XFT_CFLAGS"
12867 XFT_LIBS="-lXrender $XFT_LIBS"
12868 LIBS="$XFT_LIBS $LIBS"
12869 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
12871 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12873 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12874 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12875 $as_echo_n "(cached) " >&6
12876 else
12877 ac_check_lib_save_LIBS=$LIBS
12878 LIBS="-lXft $XFT_LIBS $LIBS"
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880 /* end confdefs.h. */
12882 /* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 char XftFontOpen ();
12890 main ()
12892 return XftFontOpen ();
12894 return 0;
12896 _ACEOF
12897 if ac_fn_c_try_link "$LINENO"; then :
12898 ac_cv_lib_Xft_XftFontOpen=yes
12899 else
12900 ac_cv_lib_Xft_XftFontOpen=no
12902 rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
12904 LIBS=$ac_check_lib_save_LIBS
12906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12907 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12908 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12909 HAVE_XFT=yes
12916 if test "${HAVE_XFT}" = "yes"; then
12918 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12921 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12922 else
12923 CPPFLAGS="$OLD_CPPFLAGS"
12924 CFLAGS="$OLD_CFLAGS"
12925 LIBS="$OLD_LIBS"
12926 fi # "${HAVE_XFT}" = "yes"
12927 fi # "$HAVE_XFT" != no
12928 fi # "x${with_xft}" != "xno"
12930 ## We used to allow building with FreeType and without Xft.
12931 ## However, the ftx font backend driver is not in good shape.
12932 if test "$HAVE_XFT" != "yes"; then
12933 HAVE_XFT=no
12934 HAVE_FREETYPE=no
12935 else
12937 succeeded=no
12939 if test "$PKG_CONFIG" = "no" ; then
12940 HAVE_FREETYPE=no
12941 else
12942 PKG_CONFIG_MIN_VERSION=0.9.0
12943 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12945 $as_echo_n "checking for freetype2... " >&6; }
12947 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12948 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12949 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
12950 edit_cflags="
12951 s,///*,/,g
12952 s/^/ /
12953 s/ -I/ $isystem/g
12954 s/^ //
12956 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12957 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12959 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12960 succeeded=yes
12961 else
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12963 $as_echo "no" >&6; }
12964 FREETYPE_CFLAGS=""
12965 FREETYPE_LIBS=""
12966 ## If we have a custom action on failure, don't print errors, but
12967 ## do set a variable so people can do so. Do it in a subshell
12968 ## to capture any diagnostics in invoking pkg-config.
12969 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
12975 else
12976 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12977 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12981 if test $succeeded = yes; then
12982 HAVE_FREETYPE=yes
12983 else
12984 HAVE_FREETYPE=no
12988 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12991 HAVE_LIBOTF=no
12992 if test "${HAVE_FREETYPE}" = "yes"; then
12994 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12996 if test "${with_libotf}" != "no"; then
12998 succeeded=no
13000 if test "$PKG_CONFIG" = "no" ; then
13001 HAVE_LIBOTF=no
13002 else
13003 PKG_CONFIG_MIN_VERSION=0.9.0
13004 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13006 $as_echo_n "checking for libotf... " >&6; }
13008 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13009 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13010 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
13011 edit_cflags="
13012 s,///*,/,g
13013 s/^/ /
13014 s/ -I/ $isystem/g
13015 s/^ //
13017 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13018 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13020 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13021 succeeded=yes
13022 else
13023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13024 $as_echo "no" >&6; }
13025 LIBOTF_CFLAGS=""
13026 LIBOTF_LIBS=""
13027 ## If we have a custom action on failure, don't print errors, but
13028 ## do set a variable so people can do so. Do it in a subshell
13029 ## to capture any diagnostics in invoking pkg-config.
13030 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
13036 else
13037 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13038 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13042 if test $succeeded = yes; then
13043 HAVE_LIBOTF=yes
13044 else
13045 HAVE_LIBOTF=no
13048 if test "$HAVE_LIBOTF" = "yes"; then
13050 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13053 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13054 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
13055 $as_echo_n "(cached) " >&6
13056 else
13057 ac_check_lib_save_LIBS=$LIBS
13058 LIBS="-lotf $LIBS"
13059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13060 /* end confdefs.h. */
13062 /* Override any GCC internal prototype to avoid an error.
13063 Use char because int might match the return type of a GCC
13064 builtin and then its argument prototype would still apply. */
13065 #ifdef __cplusplus
13066 extern "C"
13067 #endif
13068 char OTF_get_variation_glyphs ();
13070 main ()
13072 return OTF_get_variation_glyphs ();
13074 return 0;
13076 _ACEOF
13077 if ac_fn_c_try_link "$LINENO"; then :
13078 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13079 else
13080 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13082 rm -f core conftest.err conftest.$ac_objext \
13083 conftest$ac_exeext conftest.$ac_ext
13084 LIBS=$ac_check_lib_save_LIBS
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13087 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13088 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13089 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13090 else
13091 HAVE_OTF_GET_VARIATION_GLYPHS=no
13094 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13096 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13103 HAVE_M17N_FLT=no
13104 if test "${HAVE_LIBOTF}" = yes; then
13105 if test "${with_m17n_flt}" != "no"; then
13107 succeeded=no
13109 if test "$PKG_CONFIG" = "no" ; then
13110 HAVE_M17N_FLT=no
13111 else
13112 PKG_CONFIG_MIN_VERSION=0.9.0
13113 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13115 $as_echo_n "checking for m17n-flt... " >&6; }
13117 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13118 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13119 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
13120 edit_cflags="
13121 s,///*,/,g
13122 s/^/ /
13123 s/ -I/ $isystem/g
13124 s/^ //
13126 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13127 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13129 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13130 succeeded=yes
13131 else
13132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13133 $as_echo "no" >&6; }
13134 M17N_FLT_CFLAGS=""
13135 M17N_FLT_LIBS=""
13136 ## If we have a custom action on failure, don't print errors, but
13137 ## do set a variable so people can do so. Do it in a subshell
13138 ## to capture any diagnostics in invoking pkg-config.
13139 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
13145 else
13146 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13147 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13151 if test $succeeded = yes; then
13152 HAVE_M17N_FLT=yes
13153 else
13154 HAVE_M17N_FLT=no
13157 if test "$HAVE_M17N_FLT" = "yes"; then
13159 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13164 else
13165 HAVE_XFT=no
13166 HAVE_FREETYPE=no
13167 HAVE_LIBOTF=no
13168 HAVE_M17N_FLT=no
13171 ### End of font-backend (under X11) section.
13182 ### Use -lXpm if available, unless `--with-xpm=no'.
13183 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
13184 HAVE_XPM=no
13185 LIBXPM=
13186 if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
13187 if test "${with_xpm}" != "no"; then
13188 SAVE_CPPFLAGS="$CPPFLAGS"
13189 SAVE_LDFLAGS="$LDFLAGS"
13190 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13191 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13192 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13193 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13195 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13196 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13197 $as_echo_n "(cached) " >&6
13198 else
13199 ac_check_lib_save_LIBS=$LIBS
13200 LIBS="-lXpm $LIBS"
13201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202 /* end confdefs.h. */
13204 /* Override any GCC internal prototype to avoid an error.
13205 Use char because int might match the return type of a GCC
13206 builtin and then its argument prototype would still apply. */
13207 #ifdef __cplusplus
13208 extern "C"
13209 #endif
13210 char XpmReadFileToImage ();
13212 main ()
13214 return XpmReadFileToImage ();
13216 return 0;
13218 _ACEOF
13219 if ac_fn_c_try_link "$LINENO"; then :
13220 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13221 else
13222 ac_cv_lib_Xpm_XpmReadFileToImage=no
13224 rm -f core conftest.err conftest.$ac_objext \
13225 conftest$ac_exeext conftest.$ac_ext
13226 LIBS=$ac_check_lib_save_LIBS
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13229 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13230 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13231 HAVE_XPM=yes
13237 if test "${HAVE_XPM}" = "yes"; then
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13239 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241 /* end confdefs.h. */
13242 #include "X11/xpm.h"
13243 #ifndef XpmReturnAllocPixels
13244 no_return_alloc_pixels
13245 #endif
13247 _ACEOF
13248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13249 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13250 HAVE_XPM=no
13251 else
13252 HAVE_XPM=yes
13254 rm -f conftest*
13257 if test "${HAVE_XPM}" = "yes"; then
13258 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13260 $as_echo "yes" >&6; }
13261 else
13262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13263 $as_echo "no" >&6; }
13264 CPPFLAGS="$SAVE_CPPFLAGS"
13265 LDFLAGS="$SAVE_LDFLAGS"
13270 if test "${HAVE_XPM}" = "yes"; then
13272 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13274 LIBXPM=-lXpm
13278 if test "${HAVE_X11}" = "yes"; then
13279 if test "${with_xpm}" != "no"; then
13280 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13281 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13283 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13284 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
13285 $as_echo_n "(cached) " >&6
13286 else
13287 ac_check_lib_save_LIBS=$LIBS
13288 LIBS="-lXpm -lX11 $LIBS"
13289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13290 /* end confdefs.h. */
13292 /* Override any GCC internal prototype to avoid an error.
13293 Use char because int might match the return type of a GCC
13294 builtin and then its argument prototype would still apply. */
13295 #ifdef __cplusplus
13296 extern "C"
13297 #endif
13298 char XpmReadFileToPixmap ();
13300 main ()
13302 return XpmReadFileToPixmap ();
13304 return 0;
13306 _ACEOF
13307 if ac_fn_c_try_link "$LINENO"; then :
13308 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
13309 else
13310 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
13312 rm -f core conftest.err conftest.$ac_objext \
13313 conftest$ac_exeext conftest.$ac_ext
13314 LIBS=$ac_check_lib_save_LIBS
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13317 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13318 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13319 HAVE_XPM=yes
13325 if test "${HAVE_XPM}" = "yes"; then
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13327 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13329 /* end confdefs.h. */
13330 #include "X11/xpm.h"
13331 #ifndef XpmReturnAllocPixels
13332 no_return_alloc_pixels
13333 #endif
13335 _ACEOF
13336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13337 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13338 HAVE_XPM=no
13339 else
13340 HAVE_XPM=yes
13342 rm -f conftest*
13345 if test "${HAVE_XPM}" = "yes"; then
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13347 $as_echo "yes" >&6; }
13348 else
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13350 $as_echo "no" >&6; }
13355 if test "${HAVE_XPM}" = "yes"; then
13357 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13359 LIBXPM=-lXpm
13363 ### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13364 ### slightly different requirements wrt image libraries (it doesn't
13365 ### use -lXpm because it loads the xpm shared library dynamically at
13366 ### run time).
13367 if test "${opsys}" = "mingw32"; then
13368 if test "${with_xpm}" != "no"; then
13369 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13370 #define FOR_MSW 1
13372 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13373 HAVE_XPM=yes
13374 else
13375 HAVE_XPM=no
13381 if test "${HAVE_XPM}" = "yes"; then
13383 $as_echo "#define HAVE_XPM 1" >>confdefs.h
13390 ### Use -ljpeg if available, unless `--with-jpeg=no'.
13391 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
13392 HAVE_JPEG=no
13393 LIBJPEG=
13394 if test "${opsys}" = "mingw32"; then
13395 if test "${with_jpeg}" != "no"; then
13396 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13397 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13398 HAVE_JPEG=yes
13399 else
13400 HAVE_JPEG=no
13405 if test "${HAVE_JPEG}" = "yes"; then
13406 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409 /* end confdefs.h. */
13410 #include <jpeglib.h>
13411 version=JPEG_LIB_VERSION
13413 _ACEOF
13414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13415 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13416 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13418 else
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13420 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13421 HAVE_JPEG=no
13423 rm -f conftest*
13426 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13427 if test "${with_jpeg}" != "no"; then
13428 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13429 if test "x$ac_cv_header_jerror_h" = x""yes; then :
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13431 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13432 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
13433 $as_echo_n "(cached) " >&6
13434 else
13435 ac_check_lib_save_LIBS=$LIBS
13436 LIBS="-ljpeg $LIBS"
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h. */
13440 /* Override any GCC internal prototype to avoid an error.
13441 Use char because int might match the return type of a GCC
13442 builtin and then its argument prototype would still apply. */
13443 #ifdef __cplusplus
13444 extern "C"
13445 #endif
13446 char jpeg_destroy_compress ();
13448 main ()
13450 return jpeg_destroy_compress ();
13452 return 0;
13454 _ACEOF
13455 if ac_fn_c_try_link "$LINENO"; then :
13456 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
13457 else
13458 ac_cv_lib_jpeg_jpeg_destroy_compress=no
13460 rm -f core conftest.err conftest.$ac_objext \
13461 conftest$ac_exeext conftest.$ac_ext
13462 LIBS=$ac_check_lib_save_LIBS
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13465 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13466 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13467 HAVE_JPEG=yes
13475 if test "${HAVE_JPEG}" = "yes"; then
13476 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h. */
13480 #include <jpeglib.h>
13481 version=JPEG_LIB_VERSION
13483 _ACEOF
13484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13485 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13486 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13488 else
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13490 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13491 HAVE_JPEG=no
13493 rm -f conftest*
13496 if test "${HAVE_JPEG}" = "yes"; then
13497 LIBJPEG=-ljpeg
13502 ### Use -lpng if available, unless `--with-png=no'.
13503 ### mingw32 doesn't use -lpng, since it loads the library dynamically.
13504 HAVE_PNG=no
13505 LIBPNG=
13506 if test "${opsys}" = "mingw32"; then
13507 if test "${with_png}" != "no"; then
13508 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13509 if test "x$ac_cv_header_png_h" = x""yes; then :
13510 HAVE_PNG=yes
13511 else
13512 HAVE_PNG=no
13517 if test "${HAVE_PNG}" = "yes"; then
13519 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13522 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13523 # include <libpng/png.h>
13524 #else
13525 # include <png.h>
13526 #endif
13529 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13531 else
13533 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13538 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13539 if test "${with_png}" != "no"; then
13540 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13541 # in /usr/include/libpng.
13542 for ac_header in png.h libpng/png.h
13543 do :
13544 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13545 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13546 eval as_val=\$$as_ac_Header
13547 if test "x$as_val" = x""yes; then :
13548 cat >>confdefs.h <<_ACEOF
13549 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13550 _ACEOF
13551 break
13554 done
13556 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13558 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13559 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13560 $as_echo_n "(cached) " >&6
13561 else
13562 ac_check_lib_save_LIBS=$LIBS
13563 LIBS="-lpng -lz -lm $LIBS"
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565 /* end confdefs.h. */
13567 /* Override any GCC internal prototype to avoid an error.
13568 Use char because int might match the return type of a GCC
13569 builtin and then its argument prototype would still apply. */
13570 #ifdef __cplusplus
13571 extern "C"
13572 #endif
13573 char png_get_channels ();
13575 main ()
13577 return png_get_channels ();
13579 return 0;
13581 _ACEOF
13582 if ac_fn_c_try_link "$LINENO"; then :
13583 ac_cv_lib_png_png_get_channels=yes
13584 else
13585 ac_cv_lib_png_png_get_channels=no
13587 rm -f core conftest.err conftest.$ac_objext \
13588 conftest$ac_exeext conftest.$ac_ext
13589 LIBS=$ac_check_lib_save_LIBS
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13592 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13593 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13594 HAVE_PNG=yes
13600 if test "${HAVE_PNG}" = "yes"; then
13602 $as_echo "#define HAVE_PNG 1" >>confdefs.h
13604 LIBPNG="-lpng -lz -lm"
13606 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13607 # include <libpng/png.h>
13608 #else
13609 # include <png.h>
13610 #endif
13613 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13615 else
13617 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13625 ### Use -ltiff if available, unless `--with-tiff=no'.
13626 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
13627 HAVE_TIFF=no
13628 LIBTIFF=
13629 if test "${opsys}" = "mingw32"; then
13630 if test "${with_tiff}" != "no"; then
13631 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13632 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13633 HAVE_TIFF=yes
13634 else
13635 HAVE_TIFF=no
13640 if test "${HAVE_TIFF}" = "yes"; then
13642 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13645 elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
13646 if test "${with_tiff}" != "no"; then
13647 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13648 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13649 tifflibs="-lz -lm"
13650 # At least one tiff package requires the jpeg library.
13651 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13653 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13654 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
13655 $as_echo_n "(cached) " >&6
13656 else
13657 ac_check_lib_save_LIBS=$LIBS
13658 LIBS="-ltiff $tifflibs $LIBS"
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660 /* end confdefs.h. */
13662 /* Override any GCC internal prototype to avoid an error.
13663 Use char because int might match the return type of a GCC
13664 builtin and then its argument prototype would still apply. */
13665 #ifdef __cplusplus
13666 extern "C"
13667 #endif
13668 char TIFFGetVersion ();
13670 main ()
13672 return TIFFGetVersion ();
13674 return 0;
13676 _ACEOF
13677 if ac_fn_c_try_link "$LINENO"; then :
13678 ac_cv_lib_tiff_TIFFGetVersion=yes
13679 else
13680 ac_cv_lib_tiff_TIFFGetVersion=no
13682 rm -f core conftest.err conftest.$ac_objext \
13683 conftest$ac_exeext conftest.$ac_ext
13684 LIBS=$ac_check_lib_save_LIBS
13686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13687 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13688 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13689 HAVE_TIFF=yes
13697 if test "${HAVE_TIFF}" = "yes"; then
13699 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
13701 LIBTIFF=-ltiff
13706 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
13707 ### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
13708 HAVE_GIF=no
13709 LIBGIF=
13710 if test "${opsys}" = "mingw32"; then
13711 if test "${with_gif}" != "no"; then
13712 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13713 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13714 HAVE_GIF=yes
13715 else
13716 HAVE_GIF=no
13721 if test "${HAVE_GIF}" = "yes"; then
13723 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13726 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13727 || test "${HAVE_W32}" = "yes"; then
13728 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13730 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13731 # Earlier versions can crash Emacs.
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13733 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13734 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
13735 $as_echo_n "(cached) " >&6
13736 else
13737 ac_check_lib_save_LIBS=$LIBS
13738 LIBS="-lgif $LIBS"
13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740 /* end confdefs.h. */
13742 /* Override any GCC internal prototype to avoid an error.
13743 Use char because int might match the return type of a GCC
13744 builtin and then its argument prototype would still apply. */
13745 #ifdef __cplusplus
13746 extern "C"
13747 #endif
13748 char EGifPutExtensionLast ();
13750 main ()
13752 return EGifPutExtensionLast ();
13754 return 0;
13756 _ACEOF
13757 if ac_fn_c_try_link "$LINENO"; then :
13758 ac_cv_lib_gif_EGifPutExtensionLast=yes
13759 else
13760 ac_cv_lib_gif_EGifPutExtensionLast=no
13762 rm -f core conftest.err conftest.$ac_objext \
13763 conftest$ac_exeext conftest.$ac_ext
13764 LIBS=$ac_check_lib_save_LIBS
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13767 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13768 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13769 HAVE_GIF=yes
13770 else
13771 HAVE_GIF=maybe
13778 if test "$HAVE_GIF" = yes; then
13779 LIBGIF=-lgif
13780 elif test "$HAVE_GIF" = maybe; then
13781 # If gif_lib.h but no libgif, try libungif.
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13783 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13784 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
13785 $as_echo_n "(cached) " >&6
13786 else
13787 ac_check_lib_save_LIBS=$LIBS
13788 LIBS="-lungif $LIBS"
13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13790 /* end confdefs.h. */
13792 /* Override any GCC internal prototype to avoid an error.
13793 Use char because int might match the return type of a GCC
13794 builtin and then its argument prototype would still apply. */
13795 #ifdef __cplusplus
13796 extern "C"
13797 #endif
13798 char EGifPutExtensionLast ();
13800 main ()
13802 return EGifPutExtensionLast ();
13804 return 0;
13806 _ACEOF
13807 if ac_fn_c_try_link "$LINENO"; then :
13808 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13809 else
13810 ac_cv_lib_ungif_EGifPutExtensionLast=no
13812 rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
13814 LIBS=$ac_check_lib_save_LIBS
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13817 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13818 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13819 HAVE_GIF=yes
13820 else
13821 HAVE_GIF=no
13824 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13827 if test "${HAVE_GIF}" = "yes"; then
13829 $as_echo "#define HAVE_GIF 1" >>confdefs.h
13835 if test "${HAVE_X11}" = "yes"; then
13836 MISSING=""
13837 WITH_NO=""
13838 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13839 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13840 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13841 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13842 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13843 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13844 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13845 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13846 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13847 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13849 if test "X${MISSING}" != X; then
13850 as_fn_error "The following required libraries were not found:
13851 $MISSING
13852 Maybe some development libraries/packages are missing?
13853 If you don't want to link with them give
13854 $WITH_NO
13855 as options to configure" "$LINENO" 5
13859 ### Use -lgpm if available, unless `--with-gpm=no'.
13860 HAVE_GPM=no
13861 LIBGPM=
13862 if test "${with_gpm}" != "no"; then
13863 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13864 if test "x$ac_cv_header_gpm_h" = x""yes; then :
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13866 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13867 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
13868 $as_echo_n "(cached) " >&6
13869 else
13870 ac_check_lib_save_LIBS=$LIBS
13871 LIBS="-lgpm $LIBS"
13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h. */
13875 /* Override any GCC internal prototype to avoid an error.
13876 Use char because int might match the return type of a GCC
13877 builtin and then its argument prototype would still apply. */
13878 #ifdef __cplusplus
13879 extern "C"
13880 #endif
13881 char Gpm_Open ();
13883 main ()
13885 return Gpm_Open ();
13887 return 0;
13889 _ACEOF
13890 if ac_fn_c_try_link "$LINENO"; then :
13891 ac_cv_lib_gpm_Gpm_Open=yes
13892 else
13893 ac_cv_lib_gpm_Gpm_Open=no
13895 rm -f core conftest.err conftest.$ac_objext \
13896 conftest$ac_exeext conftest.$ac_ext
13897 LIBS=$ac_check_lib_save_LIBS
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13900 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13901 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13902 HAVE_GPM=yes
13909 if test "${HAVE_GPM}" = "yes"; then
13911 $as_echo "#define HAVE_GPM 1" >>confdefs.h
13913 LIBGPM=-lgpm
13922 GNUSTEP_CFLAGS=
13923 ### Use NeXTstep API to implement GUI.
13924 if test "${HAVE_NS}" = "yes"; then
13926 $as_echo "#define HAVE_NS 1" >>confdefs.h
13928 if test "${NS_IMPL_COCOA}" = "yes"; then
13930 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13933 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13935 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13937 # See also .m.o rule in Makefile.in */
13938 # FIXME: are all these flags really needed? Document here why. */
13939 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13940 ## Extra CFLAGS applied to src/*.m files.
13941 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"
13943 # We also have mouse menus.
13944 HAVE_MENUS=yes
13945 OTHER_FILES=ns-app
13948 if test "${HAVE_W32}" = "yes"; then
13949 HAVE_MENUS=yes
13952 ### Use session management (-lSM -lICE) if available
13953 HAVE_X_SM=no
13954 LIBXSM=
13955 if test "${HAVE_X11}" = "yes"; then
13956 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13957 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13959 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13960 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
13961 $as_echo_n "(cached) " >&6
13962 else
13963 ac_check_lib_save_LIBS=$LIBS
13964 LIBS="-lSM -lICE $LIBS"
13965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966 /* end confdefs.h. */
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 SmcOpenConnection ();
13976 main ()
13978 return SmcOpenConnection ();
13980 return 0;
13982 _ACEOF
13983 if ac_fn_c_try_link "$LINENO"; then :
13984 ac_cv_lib_SM_SmcOpenConnection=yes
13985 else
13986 ac_cv_lib_SM_SmcOpenConnection=no
13988 rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
13990 LIBS=$ac_check_lib_save_LIBS
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13993 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13994 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13995 HAVE_X_SM=yes
14002 if test "${HAVE_X_SM}" = "yes"; then
14004 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
14006 LIBXSM="-lSM -lICE"
14007 case "$LIBS" in
14008 *-lSM*) ;;
14009 *) LIBS="$LIBXSM $LIBS" ;;
14010 esac
14015 ### Use XRandr (-lXrandr) if available
14016 HAVE_XRANDR=no
14017 if test "${HAVE_X11}" = "yes"; then
14018 XRANDR_REQUIRED=1.2.2
14019 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14021 succeeded=no
14023 if test "$PKG_CONFIG" = "no" ; then
14024 HAVE_XRANDR=no
14025 else
14026 PKG_CONFIG_MIN_VERSION=0.9.0
14027 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14029 $as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14031 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14032 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14033 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14034 edit_cflags="
14035 s,///*,/,g
14036 s/^/ /
14037 s/ -I/ $isystem/g
14038 s/^ //
14040 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14041 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14043 $as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14044 succeeded=yes
14045 else
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14047 $as_echo "no" >&6; }
14048 XRANDR_CFLAGS=""
14049 XRANDR_LIBS=""
14050 ## If we have a custom action on failure, don't print errors, but
14051 ## do set a variable so people can do so. Do it in a subshell
14052 ## to capture any diagnostics in invoking pkg-config.
14053 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14059 else
14060 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14061 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14065 if test $succeeded = yes; then
14066 HAVE_XRANDR=yes
14067 else
14068 HAVE_XRANDR=no
14071 if test $HAVE_XRANDR = no; then
14072 # Test old way in case pkg-config doesn't have it (older machines).
14073 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14074 if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14076 $as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14077 if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
14078 $as_echo_n "(cached) " >&6
14079 else
14080 ac_check_lib_save_LIBS=$LIBS
14081 LIBS="-lXrandr $LIBS"
14082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14083 /* end confdefs.h. */
14085 /* Override any GCC internal prototype to avoid an error.
14086 Use char because int might match the return type of a GCC
14087 builtin and then its argument prototype would still apply. */
14088 #ifdef __cplusplus
14089 extern "C"
14090 #endif
14091 char XRRGetScreenResources ();
14093 main ()
14095 return XRRGetScreenResources ();
14097 return 0;
14099 _ACEOF
14100 if ac_fn_c_try_link "$LINENO"; then :
14101 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
14102 else
14103 ac_cv_lib_Xrandr_XRRGetScreenResources=no
14105 rm -f core conftest.err conftest.$ac_objext \
14106 conftest$ac_exeext conftest.$ac_ext
14107 LIBS=$ac_check_lib_save_LIBS
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14110 $as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14111 if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
14112 HAVE_XRANDR=yes
14118 if test $HAVE_XRANDR = yes; then
14119 XRANDR_LIBS=-lXrandr
14123 if test $HAVE_XRANDR = yes; then
14124 SAVE_CFLAGS="$CFLAGS"
14125 SAVE_LIBS="$LIBS"
14126 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14127 LIBS="$XRANDR_LIBS $LIBS"
14128 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14129 do :
14130 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14131 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14132 eval as_val=\$$as_ac_var
14133 if test "x$as_val" = x""yes; then :
14134 cat >>confdefs.h <<_ACEOF
14135 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14136 _ACEOF
14139 done
14141 CFLAGS="$SAVE_CFLAGS"
14142 LIBS="$SAVE_LIBS"
14145 $as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14150 ### Use Xinerama (-lXinerama) if available
14151 HAVE_XINERAMA=no
14152 if test "${HAVE_X11}" = "yes"; then
14153 XINERAMA_REQUIRED=1.0.2
14154 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14156 succeeded=no
14158 if test "$PKG_CONFIG" = "no" ; then
14159 HAVE_XINERAMA=no
14160 else
14161 PKG_CONFIG_MIN_VERSION=0.9.0
14162 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14164 $as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14166 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14167 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14168 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14169 edit_cflags="
14170 s,///*,/,g
14171 s/^/ /
14172 s/ -I/ $isystem/g
14173 s/^ //
14175 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14176 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14178 $as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14179 succeeded=yes
14180 else
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14182 $as_echo "no" >&6; }
14183 XINERAMA_CFLAGS=""
14184 XINERAMA_LIBS=""
14185 ## If we have a custom action on failure, don't print errors, but
14186 ## do set a variable so people can do so. Do it in a subshell
14187 ## to capture any diagnostics in invoking pkg-config.
14188 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14194 else
14195 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14196 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14200 if test $succeeded = yes; then
14201 HAVE_XINERAMA=yes
14202 else
14203 HAVE_XINERAMA=no
14206 if test $HAVE_XINERAMA = no; then
14207 # Test old way in case pkg-config doesn't have it (older machines).
14208 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14209 if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14211 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14212 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14213 $as_echo_n "(cached) " >&6
14214 else
14215 ac_check_lib_save_LIBS=$LIBS
14216 LIBS="-lXinerama $LIBS"
14217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218 /* end confdefs.h. */
14220 /* Override any GCC internal prototype to avoid an error.
14221 Use char because int might match the return type of a GCC
14222 builtin and then its argument prototype would still apply. */
14223 #ifdef __cplusplus
14224 extern "C"
14225 #endif
14226 char XineramaQueryExtension ();
14228 main ()
14230 return XineramaQueryExtension ();
14232 return 0;
14234 _ACEOF
14235 if ac_fn_c_try_link "$LINENO"; then :
14236 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14237 else
14238 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14240 rm -f core conftest.err conftest.$ac_objext \
14241 conftest$ac_exeext conftest.$ac_ext
14242 LIBS=$ac_check_lib_save_LIBS
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14245 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14246 if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14247 HAVE_XINERAMA=yes
14253 if test $HAVE_XINERAMA = yes; then
14254 XINERAMA_LIBS=-lXinerama
14258 if test $HAVE_XINERAMA = yes; then
14260 $as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14266 ### Use libxml (-lxml2) if available
14267 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
14268 HAVE_LIBXML2=no
14269 if test "${with_xml2}" != "no"; then
14270 ### I'm not sure what the version number should be, so I just guessed.
14272 succeeded=no
14274 if test "$PKG_CONFIG" = "no" ; then
14275 HAVE_LIBXML2=no
14276 else
14277 PKG_CONFIG_MIN_VERSION=0.9.0
14278 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14280 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
14282 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14283 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14284 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
14285 edit_cflags="
14286 s,///*,/,g
14287 s/^/ /
14288 s/ -I/ $isystem/g
14289 s/^ //
14291 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14292 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14294 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14295 succeeded=yes
14296 else
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14298 $as_echo "no" >&6; }
14299 LIBXML2_CFLAGS=""
14300 LIBXML2_LIBS=""
14301 ## If we have a custom action on failure, don't print errors, but
14302 ## do set a variable so people can do so. Do it in a subshell
14303 ## to capture any diagnostics in invoking pkg-config.
14304 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
14310 else
14311 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14312 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14316 if test $succeeded = yes; then
14317 HAVE_LIBXML2=yes
14318 else
14319 HAVE_LIBXML2=no
14322 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14323 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14324 SAVE_CPPFLAGS="$CPPFLAGS"
14325 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14326 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14327 if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14328 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14330 if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14331 HAVE_LIBXML2=yes
14337 CPPFLAGS="$SAVE_CPPFLAGS"
14338 if test "${HAVE_LIBXML2}" = "yes"; then
14339 LIBXML2_LIBS="-lxml2"
14340 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14343 if test "${HAVE_LIBXML2}" = "yes"; then
14344 if test "${opsys}" != "mingw32"; then
14345 LIBS="$LIBXML2_LIBS $LIBS"
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
14347 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14348 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
14349 $as_echo_n "(cached) " >&6
14350 else
14351 ac_check_lib_save_LIBS=$LIBS
14352 LIBS="-lxml2 $LIBS"
14353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14354 /* end confdefs.h. */
14356 /* Override any GCC internal prototype to avoid an error.
14357 Use char because int might match the return type of a GCC
14358 builtin and then its argument prototype would still apply. */
14359 #ifdef __cplusplus
14360 extern "C"
14361 #endif
14362 char htmlReadMemory ();
14364 main ()
14366 return htmlReadMemory ();
14368 return 0;
14370 _ACEOF
14371 if ac_fn_c_try_link "$LINENO"; then :
14372 ac_cv_lib_xml2_htmlReadMemory=yes
14373 else
14374 ac_cv_lib_xml2_htmlReadMemory=no
14376 rm -f core conftest.err conftest.$ac_objext \
14377 conftest$ac_exeext conftest.$ac_ext
14378 LIBS=$ac_check_lib_save_LIBS
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14381 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14382 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14383 HAVE_LIBXML2=yes
14384 else
14385 HAVE_LIBXML2=no
14388 else
14389 LIBXML2_LIBS=""
14391 if test "${HAVE_LIBXML2}" = "yes"; then
14393 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
14395 else
14396 LIBXML2_LIBS=""
14397 LIBXML2_CFLAGS=""
14404 # If netdb.h doesn't declare h_errno, we must declare it by hand.
14405 # On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14406 if test "${opsys}" = "mingw32"; then
14407 emacs_cv_netdb_declares_h_errno=yes
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14410 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
14411 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14412 $as_echo_n "(cached) " >&6
14413 else
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h. */
14416 #include <netdb.h>
14418 main ()
14420 return h_errno;
14422 return 0;
14424 _ACEOF
14425 if ac_fn_c_try_link "$LINENO"; then :
14426 emacs_cv_netdb_declares_h_errno=yes
14427 else
14428 emacs_cv_netdb_declares_h_errno=no
14430 rm -f core conftest.err conftest.$ac_objext \
14431 conftest$ac_exeext conftest.$ac_ext
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14434 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14435 if test $emacs_cv_netdb_declares_h_errno = yes; then
14437 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
14441 # sqrt and other floating-point functions such as fmod and frexp
14442 # are found in -lm on most systems, but mingw32 doesn't use -lm.
14443 if test "${opsys}" != "mingw32"; then
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
14445 $as_echo_n "checking for sqrt in -lm... " >&6; }
14446 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14447 $as_echo_n "(cached) " >&6
14448 else
14449 ac_check_lib_save_LIBS=$LIBS
14450 LIBS="-lm $LIBS"
14451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452 /* end confdefs.h. */
14454 /* Override any GCC internal prototype to avoid an error.
14455 Use char because int might match the return type of a GCC
14456 builtin and then its argument prototype would still apply. */
14457 #ifdef __cplusplus
14458 extern "C"
14459 #endif
14460 char sqrt ();
14462 main ()
14464 return sqrt ();
14466 return 0;
14468 _ACEOF
14469 if ac_fn_c_try_link "$LINENO"; then :
14470 ac_cv_lib_m_sqrt=yes
14471 else
14472 ac_cv_lib_m_sqrt=no
14474 rm -f core conftest.err conftest.$ac_objext \
14475 conftest$ac_exeext conftest.$ac_ext
14476 LIBS=$ac_check_lib_save_LIBS
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14479 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
14480 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14481 cat >>confdefs.h <<_ACEOF
14482 #define HAVE_LIBM 1
14483 _ACEOF
14485 LIBS="-lm $LIBS"
14491 # Check for mail-locking functions in a "mail" library. Probably this should
14492 # have the same check as for liblockfile below.
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14494 $as_echo_n "checking for maillock in -lmail... " >&6; }
14495 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
14496 $as_echo_n "(cached) " >&6
14497 else
14498 ac_check_lib_save_LIBS=$LIBS
14499 LIBS="-lmail $LIBS"
14500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501 /* end confdefs.h. */
14503 /* Override any GCC internal prototype to avoid an error.
14504 Use char because int might match the return type of a GCC
14505 builtin and then its argument prototype would still apply. */
14506 #ifdef __cplusplus
14507 extern "C"
14508 #endif
14509 char maillock ();
14511 main ()
14513 return maillock ();
14515 return 0;
14517 _ACEOF
14518 if ac_fn_c_try_link "$LINENO"; then :
14519 ac_cv_lib_mail_maillock=yes
14520 else
14521 ac_cv_lib_mail_maillock=no
14523 rm -f core conftest.err conftest.$ac_objext \
14524 conftest$ac_exeext conftest.$ac_ext
14525 LIBS=$ac_check_lib_save_LIBS
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14528 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
14529 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14530 have_mail=yes
14531 else
14532 have_mail=no
14535 if test $have_mail = yes; then
14536 LIBS_MAIL=-lmail
14537 LIBS="$LIBS_MAIL $LIBS"
14539 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
14541 else
14542 LIBS_MAIL=
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14545 $as_echo_n "checking for maillock in -llockfile... " >&6; }
14546 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
14547 $as_echo_n "(cached) " >&6
14548 else
14549 ac_check_lib_save_LIBS=$LIBS
14550 LIBS="-llockfile $LIBS"
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552 /* end confdefs.h. */
14554 /* Override any GCC internal prototype to avoid an error.
14555 Use char because int might match the return type of a GCC
14556 builtin and then its argument prototype would still apply. */
14557 #ifdef __cplusplus
14558 extern "C"
14559 #endif
14560 char maillock ();
14562 main ()
14564 return maillock ();
14566 return 0;
14568 _ACEOF
14569 if ac_fn_c_try_link "$LINENO"; then :
14570 ac_cv_lib_lockfile_maillock=yes
14571 else
14572 ac_cv_lib_lockfile_maillock=no
14574 rm -f core conftest.err conftest.$ac_objext \
14575 conftest$ac_exeext conftest.$ac_ext
14576 LIBS=$ac_check_lib_save_LIBS
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14579 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14580 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14581 have_lockfile=yes
14582 else
14583 have_lockfile=no
14586 if test $have_lockfile = yes; then
14587 LIBS_MAIL=-llockfile
14588 LIBS="$LIBS_MAIL $LIBS"
14590 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
14592 else
14593 # If we have the shared liblockfile, assume we must use it for mail
14594 # locking (e.g. Debian). If we couldn't link against liblockfile
14595 # (no liblockfile.a installed), ensure that we don't need to.
14596 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14597 set dummy liblockfile.so; ac_word=$2
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14599 $as_echo_n "checking for $ac_word... " >&6; }
14600 if test "${ac_cv_prog_liblockfile+set}" = set; then :
14601 $as_echo_n "(cached) " >&6
14602 else
14603 if test -n "$liblockfile"; then
14604 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14605 else
14606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14607 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14608 for as_dir in $as_dummy
14610 IFS=$as_save_IFS
14611 test -z "$as_dir" && as_dir=.
14612 for ac_exec_ext in '' $ac_executable_extensions; do
14613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14614 ac_cv_prog_liblockfile="yes"
14615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14616 break 2
14618 done
14619 done
14620 IFS=$as_save_IFS
14622 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14625 liblockfile=$ac_cv_prog_liblockfile
14626 if test -n "$liblockfile"; then
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14628 $as_echo "$liblockfile" >&6; }
14629 else
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14631 $as_echo "no" >&6; }
14635 if test $ac_cv_prog_liblockfile = yes; then
14636 as_fn_error "Shared liblockfile found but can't link against it.
14637 This probably means that movemail could lose mail.
14638 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14646 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14647 ## interlock access to the mail spool. The alternative is a lock file named
14648 ## /usr/spool/mail/$USER.lock.
14649 mail_lock=no
14650 case "$opsys" in
14651 aix4-2) mail_lock="lockf" ;;
14653 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
14655 ## On GNU/Linux systems, both methods are used by various mail programs.
14656 ## I assume most people are using newer mailers that have heard of flock.
14657 ## Change this if you need to.
14658 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14659 ## configure gets the right answers, and that means *NOT* using flock.
14660 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14661 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14662 ## Debian maintainer hasn't provided a clean fix for Emacs.
14663 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14664 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14665 ## correct logic. -- fx
14666 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14667 ## liblockfile is a Free Software replacement for libmail, used on
14668 ## Debian systems and elsewhere. -rfr.
14669 gnu-*)
14670 mail_lock="flock"
14671 if test $have_mail = yes || test $have_lockfile = yes; then
14672 test $ac_cv_header_maillock_h = yes && mail_lock=no
14676 mingw32)
14677 mail_lock="none-needed" ;;
14678 esac
14680 BLESSMAIL_TARGET=
14681 case "$mail_lock" in
14682 flock)
14683 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14686 lockf)
14687 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14690 none-needed) ;;
14692 *) BLESSMAIL_TARGET="need-blessmail" ;;
14693 esac
14697 for ac_func in accept4 gethostname \
14698 getrusage get_current_dir_name \
14699 lrand48 \
14700 select getpagesize setlocale \
14701 getrlimit setrlimit shutdown getaddrinfo \
14702 strsignal setitimer \
14703 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
14704 gai_strerror getline getdelim sync \
14705 difftime posix_memalign \
14706 getpwent endpwent getgrent endgrent \
14707 touchlock \
14708 cfmakeraw cfsetspeed copysign __executable_start log2
14709 do :
14710 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14711 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14712 eval as_val=\$$as_ac_var
14713 if test "x$as_val" = x""yes; then :
14714 cat >>confdefs.h <<_ACEOF
14715 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14716 _ACEOF
14719 done
14722 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14723 ## has a broken `rint' in some library versions including math library
14724 ## version number A.09.05.
14725 ## You can fix the math library by installing patch number PHSS_4630.
14726 ## But we can fix it more reliably for Emacs by just not using rint.
14727 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
14728 case $opsys in
14729 hpux*) : ;;
14730 *) for ac_func in random rint
14731 do :
14732 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14733 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14734 eval as_val=\$$as_ac_var
14735 if test "x$as_val" = x""yes; then :
14736 cat >>confdefs.h <<_ACEOF
14737 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14738 _ACEOF
14741 done
14743 esac
14745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14746 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
14747 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
14748 $as_echo_n "(cached) " >&6
14749 else
14750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14751 /* end confdefs.h. */
14754 main ()
14756 __builtin_unwind_init ();
14758 return 0;
14760 _ACEOF
14761 if ac_fn_c_try_link "$LINENO"; then :
14762 emacs_cv_func___builtin_unwind_init=yes
14763 else
14764 emacs_cv_func___builtin_unwind_init=no
14766 rm -f core conftest.err conftest.$ac_objext \
14767 conftest$ac_exeext conftest.$ac_ext
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14770 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14771 if test $emacs_cv_func___builtin_unwind_init = yes; then
14773 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14782 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14783 if test "${ac_cv_sys_largefile_source+set}" = set; then :
14784 $as_echo_n "(cached) " >&6
14785 else
14786 while :; do
14787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14788 /* end confdefs.h. */
14789 #include <sys/types.h> /* for off_t */
14790 #include <stdio.h>
14792 main ()
14794 int (*fp) (FILE *, off_t, int) = fseeko;
14795 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14797 return 0;
14799 _ACEOF
14800 if ac_fn_c_try_link "$LINENO"; then :
14801 ac_cv_sys_largefile_source=no; break
14803 rm -f core conftest.err conftest.$ac_objext \
14804 conftest$ac_exeext conftest.$ac_ext
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14807 #define _LARGEFILE_SOURCE 1
14808 #include <sys/types.h> /* for off_t */
14809 #include <stdio.h>
14811 main ()
14813 int (*fp) (FILE *, off_t, int) = fseeko;
14814 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14816 return 0;
14818 _ACEOF
14819 if ac_fn_c_try_link "$LINENO"; then :
14820 ac_cv_sys_largefile_source=1; break
14822 rm -f core conftest.err conftest.$ac_objext \
14823 conftest$ac_exeext conftest.$ac_ext
14824 ac_cv_sys_largefile_source=unknown
14825 break
14826 done
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14829 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14830 case $ac_cv_sys_largefile_source in #(
14831 no | unknown) ;;
14833 cat >>confdefs.h <<_ACEOF
14834 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14835 _ACEOF
14837 esac
14838 rm -rf conftest*
14840 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14841 # in glibc 2.1.3, but that breaks too many other things.
14842 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14843 if test $ac_cv_sys_largefile_source != unknown; then
14845 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14850 # UNIX98 PTYs.
14851 for ac_func in grantpt
14852 do :
14853 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14854 if test "x$ac_cv_func_grantpt" = x""yes; then :
14855 cat >>confdefs.h <<_ACEOF
14856 #define HAVE_GRANTPT 1
14857 _ACEOF
14860 done
14863 # PTY-related GNU extensions.
14864 for ac_func in getpt posix_openpt
14865 do :
14866 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14867 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14868 eval as_val=\$$as_ac_var
14869 if test "x$as_val" = x""yes; then :
14870 cat >>confdefs.h <<_ACEOF
14871 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14872 _ACEOF
14875 done
14878 # Check this now, so that we will NOT find the above functions in ncurses.
14879 # That is because we have not set up to link ncurses in lib-src.
14880 # It's better to believe a function is not available
14881 # than to expect to find it in ncurses.
14882 # Also we need tputs and friends to be able to build at all.
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14884 $as_echo_n "checking for library containing tputs... " >&6; }
14885 # Run a test program that contains a call to tputs, a call that is
14886 # never executed. This tests whether a pre-'main' dynamic linker
14887 # works with the library. It's too much trouble to actually call
14888 # tputs in the test program, due to portability hassles. When
14889 # cross-compiling, assume the test program will run if it links.
14891 if test "${opsys}" = "mingw32"; then
14892 msg='none required'
14893 else
14894 # Maybe curses should be tried earlier?
14895 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14896 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14897 OLIBS=$LIBS
14898 if test -z "$tputs_library"; then
14899 LIBS_TERMCAP=
14900 msg='none required'
14901 else
14902 LIBS_TERMCAP=-l$tputs_library
14903 msg=$LIBS_TERMCAP
14904 LIBS="$LIBS_TERMCAP $LIBS"
14906 if test "$cross_compiling" = yes; then :
14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908 /* end confdefs.h. */
14910 extern void tputs (const char *, int, int (*)(int));
14911 int main (int argc, char **argv)
14913 if (argc == 10000)
14914 tputs (argv[0], 0, 0);
14915 return 0;
14918 _ACEOF
14919 if ac_fn_c_try_link "$LINENO"; then :
14921 else
14922 msg=no
14924 rm -f core conftest.err conftest.$ac_objext \
14925 conftest$ac_exeext conftest.$ac_ext
14926 else
14927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14928 /* end confdefs.h. */
14930 extern void tputs (const char *, int, int (*)(int));
14931 int main (int argc, char **argv)
14933 if (argc == 10000)
14934 tputs (argv[0], 0, 0);
14935 return 0;
14938 _ACEOF
14939 if ac_fn_c_try_run "$LINENO"; then :
14941 else
14942 msg=no
14944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14945 conftest.$ac_objext conftest.beam conftest.$ac_ext
14948 LIBS=$OLIBS
14949 if test "X$msg" != Xno; then
14950 break
14952 done
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14955 $as_echo "$msg" >&6; }
14956 if test "X$msg" = Xno; then
14957 as_fn_error "The required function \`tputs' was not found in any library.
14958 The following libraries were tried (in order):
14959 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14960 Please try installing whichever of these libraries is most appropriate
14961 for your system, together with its header files.
14962 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
14965 ## Use termcap instead of terminfo?
14966 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14967 TERMINFO=yes
14968 ## FIXME? In the cases below where we unconditionally set
14969 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14970 ## if that was found above to have tputs.
14971 ## Should we use the gnu* logic everywhere?
14972 case "$opsys" in
14973 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14974 ## The ncurses library has been moved out of the System framework in
14975 ## Mac OS X 10.2. So if configure detects it, set the command-line
14976 ## option to use it.
14977 darwin) LIBS_TERMCAP="-lncurses" ;;
14979 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14981 freebsd)
14982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14983 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14984 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
14985 $as_echo_n "(cached) " >&6
14986 else
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14988 /* end confdefs.h. */
14989 #include <osreldate.h>
14991 main ()
14993 #if __FreeBSD_version < 400000
14994 fail;
14995 #endif
14998 return 0;
15000 _ACEOF
15001 if ac_fn_c_try_link "$LINENO"; then :
15002 emacs_cv_freebsd_terminfo=yes
15003 else
15004 emacs_cv_freebsd_terminfo=no
15006 rm -f core conftest.err conftest.$ac_objext \
15007 conftest$ac_exeext conftest.$ac_ext
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15012 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15014 if test $emacs_cv_freebsd_terminfo = yes; then
15015 LIBS_TERMCAP="-lncurses"
15016 else
15017 TERMINFO=no
15018 LIBS_TERMCAP="-ltermcap"
15022 mingw32)
15023 TERMINFO=no
15024 LIBS_TERMCAP=
15027 netbsd)
15028 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15029 TERMINFO=no
15030 LIBS_TERMCAP="-ltermcap"
15034 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
15036 ## hpux: Make sure we get select from libc rather than from libcurses
15037 ## because libcurses on HPUX 10.10 has a broken version of select.
15038 ## We used to use -lc -lcurses, but this may be cleaner.
15039 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15040 # set that way, now it uses the default). Isn't this a contradiction?
15041 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15043 esac
15045 TERMCAP_OBJ=tparam.o
15046 if test $TERMINFO = yes; then
15048 $as_echo "#define TERMINFO 1" >>confdefs.h
15050 TERMCAP_OBJ=terminfo.o
15052 if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15054 $as_echo "#define USE_NCURSES 1" >>confdefs.h
15061 # Do we have res_init, for detecting changes in /etc/resolv.conf?
15062 # On Darwin, res_init appears not to be useful: see bug#562 and
15063 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15064 resolv=no
15066 if test $opsys != darwin; then
15068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069 /* end confdefs.h. */
15070 #include <netinet/in.h>
15071 #include <arpa/nameser.h>
15072 #include <resolv.h>
15074 main ()
15076 return res_init();
15078 return 0;
15080 _ACEOF
15081 if ac_fn_c_try_link "$LINENO"; then :
15082 have_res_init=yes
15083 else
15084 have_res_init=no
15086 rm -f core conftest.err conftest.$ac_objext \
15087 conftest$ac_exeext conftest.$ac_ext
15088 if test "$have_res_init" = no; then
15089 OLIBS="$LIBS"
15090 LIBS="$LIBS -lresolv"
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15092 $as_echo_n "checking for res_init with -lresolv... " >&6; }
15093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15094 /* end confdefs.h. */
15095 #include <netinet/in.h>
15096 #include <arpa/nameser.h>
15097 #include <resolv.h>
15099 main ()
15101 return res_init();
15103 return 0;
15105 _ACEOF
15106 if ac_fn_c_try_link "$LINENO"; then :
15107 have_res_init=yes
15108 else
15109 have_res_init=no
15111 rm -f core conftest.err conftest.$ac_objext \
15112 conftest$ac_exeext conftest.$ac_ext
15113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15114 $as_echo "$have_res_init" >&6; }
15115 if test "$have_res_init" = yes ; then
15116 resolv=yes
15118 LIBS="$OLIBS"
15121 if test "$have_res_init" = yes; then
15123 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
15127 # Do we need the Hesiod library to provide the support routines?
15128 LIBHESIOD=
15129 if test "$with_hesiod" != no ; then
15130 # Don't set $LIBS here -- see comments above. FIXME which comments?
15131 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15132 if test "x$ac_cv_func_res_send" = x""yes; then :
15134 else
15135 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15136 if test "x$ac_cv_func___res_send" = x""yes; then :
15138 else
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15140 $as_echo_n "checking for res_send in -lresolv... " >&6; }
15141 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
15142 $as_echo_n "(cached) " >&6
15143 else
15144 ac_check_lib_save_LIBS=$LIBS
15145 LIBS="-lresolv $LIBS"
15146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147 /* end confdefs.h. */
15149 /* Override any GCC internal prototype to avoid an error.
15150 Use char because int might match the return type of a GCC
15151 builtin and then its argument prototype would still apply. */
15152 #ifdef __cplusplus
15153 extern "C"
15154 #endif
15155 char res_send ();
15157 main ()
15159 return res_send ();
15161 return 0;
15163 _ACEOF
15164 if ac_fn_c_try_link "$LINENO"; then :
15165 ac_cv_lib_resolv_res_send=yes
15166 else
15167 ac_cv_lib_resolv_res_send=no
15169 rm -f core conftest.err conftest.$ac_objext \
15170 conftest$ac_exeext conftest.$ac_ext
15171 LIBS=$ac_check_lib_save_LIBS
15173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15174 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15175 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15176 resolv=yes
15177 else
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15179 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
15180 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
15181 $as_echo_n "(cached) " >&6
15182 else
15183 ac_check_lib_save_LIBS=$LIBS
15184 LIBS="-lresolv $LIBS"
15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186 /* end confdefs.h. */
15188 /* Override any GCC internal prototype to avoid an error.
15189 Use char because int might match the return type of a GCC
15190 builtin and then its argument prototype would still apply. */
15191 #ifdef __cplusplus
15192 extern "C"
15193 #endif
15194 char __res_send ();
15196 main ()
15198 return __res_send ();
15200 return 0;
15202 _ACEOF
15203 if ac_fn_c_try_link "$LINENO"; then :
15204 ac_cv_lib_resolv___res_send=yes
15205 else
15206 ac_cv_lib_resolv___res_send=no
15208 rm -f core conftest.err conftest.$ac_objext \
15209 conftest$ac_exeext conftest.$ac_ext
15210 LIBS=$ac_check_lib_save_LIBS
15212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15213 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15214 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15215 resolv=yes
15224 if test "$resolv" = yes ; then
15225 RESOLVLIB=-lresolv
15226 else
15227 RESOLVLIB=
15229 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15230 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15232 else
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15234 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15235 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15236 $as_echo_n "(cached) " >&6
15237 else
15238 ac_check_lib_save_LIBS=$LIBS
15239 LIBS="-lhesiod $RESOLVLIB $LIBS"
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15243 /* Override any GCC internal prototype to avoid an error.
15244 Use char because int might match the return type of a GCC
15245 builtin and then its argument prototype would still apply. */
15246 #ifdef __cplusplus
15247 extern "C"
15248 #endif
15249 char hes_getmailhost ();
15251 main ()
15253 return hes_getmailhost ();
15255 return 0;
15257 _ACEOF
15258 if ac_fn_c_try_link "$LINENO"; then :
15259 ac_cv_lib_hesiod_hes_getmailhost=yes
15260 else
15261 ac_cv_lib_hesiod_hes_getmailhost=no
15263 rm -f core conftest.err conftest.$ac_objext \
15264 conftest$ac_exeext conftest.$ac_ext
15265 LIBS=$ac_check_lib_save_LIBS
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15268 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15269 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15270 hesiod=yes
15271 else
15278 if test x"$hesiod" = xyes; then
15279 LIBHESIOD=-lhesiod
15284 # Do we need libresolv (due to res_init or Hesiod)?
15285 if test "$resolv" = yes && test $opsys != darwin; then
15286 LIBRESOLV=-lresolv
15287 else
15288 LIBRESOLV=
15292 # These tell us which Kerberos-related libraries to use.
15293 COM_ERRLIB=
15294 CRYPTOLIB=
15295 KRB5LIB=
15296 DESLIB=
15297 KRB4LIB=
15299 if test "${with_kerberos}" != no; then
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15301 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
15302 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15303 $as_echo_n "(cached) " >&6
15304 else
15305 ac_check_lib_save_LIBS=$LIBS
15306 LIBS="-lcom_err $LIBS"
15307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15308 /* end confdefs.h. */
15310 /* Override any GCC internal prototype to avoid an error.
15311 Use char because int might match the return type of a GCC
15312 builtin and then its argument prototype would still apply. */
15313 #ifdef __cplusplus
15314 extern "C"
15315 #endif
15316 char com_err ();
15318 main ()
15320 return com_err ();
15322 return 0;
15324 _ACEOF
15325 if ac_fn_c_try_link "$LINENO"; then :
15326 ac_cv_lib_com_err_com_err=yes
15327 else
15328 ac_cv_lib_com_err_com_err=no
15330 rm -f core conftest.err conftest.$ac_objext \
15331 conftest$ac_exeext conftest.$ac_ext
15332 LIBS=$ac_check_lib_save_LIBS
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15335 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15336 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15337 have_com_err=yes
15338 else
15339 have_com_err=no
15342 if test $have_com_err = yes; then
15343 COM_ERRLIB=-lcom_err
15344 LIBS="$COM_ERRLIB $LIBS"
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15347 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15348 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15349 $as_echo_n "(cached) " >&6
15350 else
15351 ac_check_lib_save_LIBS=$LIBS
15352 LIBS="-lcrypto $LIBS"
15353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354 /* end confdefs.h. */
15356 /* Override any GCC internal prototype to avoid an error.
15357 Use char because int might match the return type of a GCC
15358 builtin and then its argument prototype would still apply. */
15359 #ifdef __cplusplus
15360 extern "C"
15361 #endif
15362 char mit_des_cbc_encrypt ();
15364 main ()
15366 return mit_des_cbc_encrypt ();
15368 return 0;
15370 _ACEOF
15371 if ac_fn_c_try_link "$LINENO"; then :
15372 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15373 else
15374 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15376 rm -f core conftest.err conftest.$ac_objext \
15377 conftest$ac_exeext conftest.$ac_ext
15378 LIBS=$ac_check_lib_save_LIBS
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15381 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15382 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15383 have_crypto=yes
15384 else
15385 have_crypto=no
15388 if test $have_crypto = yes; then
15389 CRYPTOLIB=-lcrypto
15390 LIBS="$CRYPTOLIB $LIBS"
15392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15393 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15394 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15395 $as_echo_n "(cached) " >&6
15396 else
15397 ac_check_lib_save_LIBS=$LIBS
15398 LIBS="-lk5crypto $LIBS"
15399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400 /* end confdefs.h. */
15402 /* Override any GCC internal prototype to avoid an error.
15403 Use char because int might match the return type of a GCC
15404 builtin and then its argument prototype would still apply. */
15405 #ifdef __cplusplus
15406 extern "C"
15407 #endif
15408 char mit_des_cbc_encrypt ();
15410 main ()
15412 return mit_des_cbc_encrypt ();
15414 return 0;
15416 _ACEOF
15417 if ac_fn_c_try_link "$LINENO"; then :
15418 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15419 else
15420 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15422 rm -f core conftest.err conftest.$ac_objext \
15423 conftest$ac_exeext conftest.$ac_ext
15424 LIBS=$ac_check_lib_save_LIBS
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15427 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15428 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15429 have_k5crypto=yes
15430 else
15431 have_k5crypto=no
15434 if test $have_k5crypto = yes; then
15435 CRYPTOLIB=-lk5crypto
15436 LIBS="$CRYPTOLIB $LIBS"
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15439 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15440 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15441 $as_echo_n "(cached) " >&6
15442 else
15443 ac_check_lib_save_LIBS=$LIBS
15444 LIBS="-lkrb5 $LIBS"
15445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15446 /* end confdefs.h. */
15448 /* Override any GCC internal prototype to avoid an error.
15449 Use char because int might match the return type of a GCC
15450 builtin and then its argument prototype would still apply. */
15451 #ifdef __cplusplus
15452 extern "C"
15453 #endif
15454 char krb5_init_context ();
15456 main ()
15458 return krb5_init_context ();
15460 return 0;
15462 _ACEOF
15463 if ac_fn_c_try_link "$LINENO"; then :
15464 ac_cv_lib_krb5_krb5_init_context=yes
15465 else
15466 ac_cv_lib_krb5_krb5_init_context=no
15468 rm -f core conftest.err conftest.$ac_objext \
15469 conftest$ac_exeext conftest.$ac_ext
15470 LIBS=$ac_check_lib_save_LIBS
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15473 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15474 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15475 have_krb5=yes
15476 else
15477 have_krb5=no
15480 if test $have_krb5=yes; then
15481 KRB5LIB=-lkrb5
15482 LIBS="$KRB5LIB $LIBS"
15484 if test "${with_kerberos5}" = no; then
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15486 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15487 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
15488 $as_echo_n "(cached) " >&6
15489 else
15490 ac_check_lib_save_LIBS=$LIBS
15491 LIBS="-ldes425 $LIBS"
15492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15493 /* end confdefs.h. */
15495 /* Override any GCC internal prototype to avoid an error.
15496 Use char because int might match the return type of a GCC
15497 builtin and then its argument prototype would still apply. */
15498 #ifdef __cplusplus
15499 extern "C"
15500 #endif
15501 char des_cbc_encrypt ();
15503 main ()
15505 return des_cbc_encrypt ();
15507 return 0;
15509 _ACEOF
15510 if ac_fn_c_try_link "$LINENO"; then :
15511 ac_cv_lib_des425_des_cbc_encrypt=yes
15512 else
15513 ac_cv_lib_des425_des_cbc_encrypt=no
15515 rm -f core conftest.err conftest.$ac_objext \
15516 conftest$ac_exeext conftest.$ac_ext
15517 LIBS=$ac_check_lib_save_LIBS
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15520 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15521 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15522 have_des425=yes
15523 else
15524 have_des425=no
15527 if test $have_des425 = yes; then
15528 DESLIB=-ldes425
15529 LIBS="$DESLIB $LIBS"
15530 else
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15532 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15533 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15534 $as_echo_n "(cached) " >&6
15535 else
15536 ac_check_lib_save_LIBS=$LIBS
15537 LIBS="-ldes $LIBS"
15538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15539 /* end confdefs.h. */
15541 /* Override any GCC internal prototype to avoid an error.
15542 Use char because int might match the return type of a GCC
15543 builtin and then its argument prototype would still apply. */
15544 #ifdef __cplusplus
15545 extern "C"
15546 #endif
15547 char des_cbc_encrypt ();
15549 main ()
15551 return des_cbc_encrypt ();
15553 return 0;
15555 _ACEOF
15556 if ac_fn_c_try_link "$LINENO"; then :
15557 ac_cv_lib_des_des_cbc_encrypt=yes
15558 else
15559 ac_cv_lib_des_des_cbc_encrypt=no
15561 rm -f core conftest.err conftest.$ac_objext \
15562 conftest$ac_exeext conftest.$ac_ext
15563 LIBS=$ac_check_lib_save_LIBS
15565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15566 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15567 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15568 have_des=yes
15569 else
15570 have_des=no
15573 if test $have_des = yes; then
15574 DESLIB=-ldes
15575 LIBS="$DESLIB $LIBS"
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15579 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15580 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
15581 $as_echo_n "(cached) " >&6
15582 else
15583 ac_check_lib_save_LIBS=$LIBS
15584 LIBS="-lkrb4 $LIBS"
15585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15586 /* end confdefs.h. */
15588 /* Override any GCC internal prototype to avoid an error.
15589 Use char because int might match the return type of a GCC
15590 builtin and then its argument prototype would still apply. */
15591 #ifdef __cplusplus
15592 extern "C"
15593 #endif
15594 char krb_get_cred ();
15596 main ()
15598 return krb_get_cred ();
15600 return 0;
15602 _ACEOF
15603 if ac_fn_c_try_link "$LINENO"; then :
15604 ac_cv_lib_krb4_krb_get_cred=yes
15605 else
15606 ac_cv_lib_krb4_krb_get_cred=no
15608 rm -f core conftest.err conftest.$ac_objext \
15609 conftest$ac_exeext conftest.$ac_ext
15610 LIBS=$ac_check_lib_save_LIBS
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15613 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15614 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15615 have_krb4=yes
15616 else
15617 have_krb4=no
15620 if test $have_krb4 = yes; then
15621 KRB4LIB=-lkrb4
15622 LIBS="$KRB4LIB $LIBS"
15623 else
15624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15625 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15626 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15627 $as_echo_n "(cached) " >&6
15628 else
15629 ac_check_lib_save_LIBS=$LIBS
15630 LIBS="-lkrb $LIBS"
15631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15632 /* end confdefs.h. */
15634 /* Override any GCC internal prototype to avoid an error.
15635 Use char because int might match the return type of a GCC
15636 builtin and then its argument prototype would still apply. */
15637 #ifdef __cplusplus
15638 extern "C"
15639 #endif
15640 char krb_get_cred ();
15642 main ()
15644 return krb_get_cred ();
15646 return 0;
15648 _ACEOF
15649 if ac_fn_c_try_link "$LINENO"; then :
15650 ac_cv_lib_krb_krb_get_cred=yes
15651 else
15652 ac_cv_lib_krb_krb_get_cred=no
15654 rm -f core conftest.err conftest.$ac_objext \
15655 conftest$ac_exeext conftest.$ac_ext
15656 LIBS=$ac_check_lib_save_LIBS
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15659 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15660 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15661 have_krb=yes
15662 else
15663 have_krb=no
15666 if test $have_krb = yes; then
15667 KRB4LIB=-lkrb
15668 LIBS="$KRB4LIB $LIBS"
15673 if test "${with_kerberos5}" != no; then
15674 for ac_header in krb5.h
15675 do :
15676 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15677 if test "x$ac_cv_header_krb5_h" = x""yes; then :
15678 cat >>confdefs.h <<_ACEOF
15679 #define HAVE_KRB5_H 1
15680 _ACEOF
15681 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15683 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15685 cat >>confdefs.h <<_ACEOF
15686 #define HAVE_KRB5_ERROR_TEXT 1
15687 _ACEOF
15691 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15693 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
15695 cat >>confdefs.h <<_ACEOF
15696 #define HAVE_KRB5_ERROR_E_TEXT 1
15697 _ACEOF
15704 done
15706 else
15707 for ac_header in krb.h
15708 do :
15709 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15710 if test "x$ac_cv_header_krb_h" = x""yes; then :
15711 cat >>confdefs.h <<_ACEOF
15712 #define HAVE_KRB_H 1
15713 _ACEOF
15715 else
15716 for ac_header in kerberosIV/krb.h
15717 do :
15718 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15719 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15720 cat >>confdefs.h <<_ACEOF
15721 #define HAVE_KERBEROSIV_KRB_H 1
15722 _ACEOF
15724 else
15725 for ac_header in kerberos/krb.h
15726 do :
15727 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15728 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15729 cat >>confdefs.h <<_ACEOF
15730 #define HAVE_KERBEROS_KRB_H 1
15731 _ACEOF
15735 done
15739 done
15743 done
15746 for ac_header in com_err.h
15747 do :
15748 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15749 if test "x$ac_cv_header_com_err_h" = x""yes; then :
15750 cat >>confdefs.h <<_ACEOF
15751 #define HAVE_COM_ERR_H 1
15752 _ACEOF
15756 done
15769 for ac_func in $ac_func_list
15770 do :
15771 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15772 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15773 eval as_val=\$$as_ac_var
15774 if test "x$as_val" = x""yes; then :
15775 cat >>confdefs.h <<_ACEOF
15776 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15777 _ACEOF
15780 done
15785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15786 $as_echo_n "checking whether localtime caches TZ... " >&6; }
15787 if test "${emacs_cv_localtime_cache+set}" = set; then :
15788 $as_echo_n "(cached) " >&6
15789 else
15790 if test x$ac_cv_func_tzset = xyes; then
15791 if test "$cross_compiling" = yes; then :
15792 # If we have tzset, assume the worst when cross-compiling.
15793 emacs_cv_localtime_cache=yes
15794 else
15795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15796 /* end confdefs.h. */
15797 #include <time.h>
15798 char TZ_GMT0[] = "TZ=GMT0";
15799 char TZ_PST8[] = "TZ=PST8";
15800 main()
15802 time_t now = time ((time_t *) 0);
15803 int hour_GMT0, hour_unset;
15804 if (putenv (TZ_GMT0) != 0)
15805 exit (1);
15806 hour_GMT0 = localtime (&now)->tm_hour;
15807 unsetenv("TZ");
15808 hour_unset = localtime (&now)->tm_hour;
15809 if (putenv (TZ_PST8) != 0)
15810 exit (1);
15811 if (localtime (&now)->tm_hour == hour_GMT0)
15812 exit (1);
15813 unsetenv("TZ");
15814 if (localtime (&now)->tm_hour != hour_unset)
15815 exit (1);
15816 exit (0);
15818 _ACEOF
15819 if ac_fn_c_try_run "$LINENO"; then :
15820 emacs_cv_localtime_cache=no
15821 else
15822 emacs_cv_localtime_cache=yes
15824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15825 conftest.$ac_objext conftest.beam conftest.$ac_ext
15828 else
15829 # If we lack tzset, report that localtime does not cache TZ,
15830 # since we can't invalidate the cache if we don't have tzset.
15831 emacs_cv_localtime_cache=no
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15835 $as_echo "$emacs_cv_localtime_cache" >&6; }
15836 if test $emacs_cv_localtime_cache = yes; then
15838 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
15842 ok_so_far=yes
15843 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15844 if test "x$ac_cv_func_socket" = x""yes; then :
15846 else
15847 ok_so_far=no
15850 if test $ok_so_far = yes; then
15851 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15852 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
15854 else
15855 ok_so_far=no
15860 if test $ok_so_far = yes; then
15861 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15862 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
15864 else
15865 ok_so_far=no
15870 if test $ok_so_far = yes; then
15872 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
15876 case $canonical in
15877 *-solaris2.4 | *-solaris2.4.*)
15878 : ${ac_cv_func_vfork_works=no};;
15879 esac
15881 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15882 if test "x$ac_cv_type_pid_t" = x""yes; then :
15884 else
15886 cat >>confdefs.h <<_ACEOF
15887 #define pid_t int
15888 _ACEOF
15892 for ac_header in vfork.h
15893 do :
15894 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15895 if test "x$ac_cv_header_vfork_h" = x""yes; then :
15896 cat >>confdefs.h <<_ACEOF
15897 #define HAVE_VFORK_H 1
15898 _ACEOF
15902 done
15904 for ac_func in fork vfork
15905 do :
15906 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15907 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15908 eval as_val=\$$as_ac_var
15909 if test "x$as_val" = x""yes; then :
15910 cat >>confdefs.h <<_ACEOF
15911 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15912 _ACEOF
15915 done
15917 if test "x$ac_cv_func_fork" = xyes; then
15918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15919 $as_echo_n "checking for working fork... " >&6; }
15920 if test "${ac_cv_func_fork_works+set}" = set; then :
15921 $as_echo_n "(cached) " >&6
15922 else
15923 if test "$cross_compiling" = yes; then :
15924 ac_cv_func_fork_works=cross
15925 else
15926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15927 /* end confdefs.h. */
15928 $ac_includes_default
15930 main ()
15933 /* By Ruediger Kuhlmann. */
15934 return fork () < 0;
15937 return 0;
15939 _ACEOF
15940 if ac_fn_c_try_run "$LINENO"; then :
15941 ac_cv_func_fork_works=yes
15942 else
15943 ac_cv_func_fork_works=no
15945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15946 conftest.$ac_objext conftest.beam conftest.$ac_ext
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15951 $as_echo "$ac_cv_func_fork_works" >&6; }
15953 else
15954 ac_cv_func_fork_works=$ac_cv_func_fork
15956 if test "x$ac_cv_func_fork_works" = xcross; then
15957 case $host in
15958 *-*-amigaos* | *-*-msdosdjgpp*)
15959 # Override, as these systems have only a dummy fork() stub
15960 ac_cv_func_fork_works=no
15963 ac_cv_func_fork_works=yes
15965 esac
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15967 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15969 ac_cv_func_vfork_works=$ac_cv_func_vfork
15970 if test "x$ac_cv_func_vfork" = xyes; then
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15972 $as_echo_n "checking for working vfork... " >&6; }
15973 if test "${ac_cv_func_vfork_works+set}" = set; then :
15974 $as_echo_n "(cached) " >&6
15975 else
15976 if test "$cross_compiling" = yes; then :
15977 ac_cv_func_vfork_works=cross
15978 else
15979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15980 /* end confdefs.h. */
15981 /* Thanks to Paul Eggert for this test. */
15982 $ac_includes_default
15983 #include <sys/wait.h>
15984 #ifdef HAVE_VFORK_H
15985 # include <vfork.h>
15986 #endif
15987 /* On some sparc systems, changes by the child to local and incoming
15988 argument registers are propagated back to the parent. The compiler
15989 is told about this with #include <vfork.h>, but some compilers
15990 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15991 static variable whose address is put into a register that is
15992 clobbered by the vfork. */
15993 static void
15994 #ifdef __cplusplus
15995 sparc_address_test (int arg)
15996 # else
15997 sparc_address_test (arg) int arg;
15998 #endif
16000 static pid_t child;
16001 if (!child) {
16002 child = vfork ();
16003 if (child < 0) {
16004 perror ("vfork");
16005 _exit(2);
16007 if (!child) {
16008 arg = getpid();
16009 write(-1, "", 0);
16010 _exit (arg);
16016 main ()
16018 pid_t parent = getpid ();
16019 pid_t child;
16021 sparc_address_test (0);
16023 child = vfork ();
16025 if (child == 0) {
16026 /* Here is another test for sparc vfork register problems. This
16027 test uses lots of local variables, at least as many local
16028 variables as main has allocated so far including compiler
16029 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16030 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16031 reuse the register of parent for one of the local variables,
16032 since it will think that parent can't possibly be used any more
16033 in this routine. Assigning to the local variable will thus
16034 munge parent in the parent process. */
16035 pid_t
16036 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16037 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16038 /* Convince the compiler that p..p7 are live; otherwise, it might
16039 use the same hardware register for all 8 local variables. */
16040 if (p != p1 || p != p2 || p != p3 || p != p4
16041 || p != p5 || p != p6 || p != p7)
16042 _exit(1);
16044 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16045 from child file descriptors. If the child closes a descriptor
16046 before it execs or exits, this munges the parent's descriptor
16047 as well. Test for this by closing stdout in the child. */
16048 _exit(close(fileno(stdout)) != 0);
16049 } else {
16050 int status;
16051 struct stat st;
16053 while (wait(&status) != child)
16055 return (
16056 /* Was there some problem with vforking? */
16057 child < 0
16059 /* Did the child fail? (This shouldn't happen.) */
16060 || status
16062 /* Did the vfork/compiler bug occur? */
16063 || parent != getpid()
16065 /* Did the file descriptor bug occur? */
16066 || fstat(fileno(stdout), &st) != 0
16070 _ACEOF
16071 if ac_fn_c_try_run "$LINENO"; then :
16072 ac_cv_func_vfork_works=yes
16073 else
16074 ac_cv_func_vfork_works=no
16076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16077 conftest.$ac_objext conftest.beam conftest.$ac_ext
16081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16082 $as_echo "$ac_cv_func_vfork_works" >&6; }
16085 if test "x$ac_cv_func_fork_works" = xcross; then
16086 ac_cv_func_vfork_works=$ac_cv_func_vfork
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16088 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16091 if test "x$ac_cv_func_vfork_works" = xyes; then
16093 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16095 else
16097 $as_echo "#define vfork fork" >>confdefs.h
16100 if test "x$ac_cv_func_fork_works" = xyes; then
16102 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
16107 for ac_func in snprintf
16108 do :
16109 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16110 if test "x$ac_cv_func_snprintf" = x""yes; then :
16111 cat >>confdefs.h <<_ACEOF
16112 #define HAVE_SNPRINTF 1
16113 _ACEOF
16116 done
16119 XGSELOBJ=
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16121 $as_echo_n "checking whether GLib is linked in... " >&6; }
16122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16123 /* end confdefs.h. */
16124 #include <glib.h>
16127 main ()
16129 g_print ("Hello world");
16131 return 0;
16133 _ACEOF
16134 if ac_fn_c_try_link "$LINENO"; then :
16135 links_glib=yes
16136 else
16137 links_glib=no
16139 rm -f core conftest.err conftest.$ac_objext \
16140 conftest$ac_exeext conftest.$ac_ext
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16142 $as_echo "$links_glib" >&6; }
16143 if test "${links_glib}" = "yes"; then
16145 $as_echo "#define HAVE_GLIB 1" >>confdefs.h
16147 if test "$HAVE_NS" = no;then
16148 XGSELOBJ=xgselect.o
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16154 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16155 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16156 $as_echo_n "(cached) " >&6
16157 else
16158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159 /* end confdefs.h. */
16160 #include <langinfo.h>
16162 main ()
16164 char* cs = nl_langinfo(CODESET);
16166 return 0;
16168 _ACEOF
16169 if ac_fn_c_try_link "$LINENO"; then :
16170 emacs_cv_langinfo_codeset=yes
16171 else
16172 emacs_cv_langinfo_codeset=no
16174 rm -f core conftest.err conftest.$ac_objext \
16175 conftest$ac_exeext conftest.$ac_ext
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16179 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
16180 if test $emacs_cv_langinfo_codeset = yes; then
16182 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16187 $as_echo_n "checking for mbstate_t... " >&6; }
16188 if test "${ac_cv_type_mbstate_t+set}" = set; then :
16189 $as_echo_n "(cached) " >&6
16190 else
16191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192 /* end confdefs.h. */
16193 $ac_includes_default
16194 # include <wchar.h>
16196 main ()
16198 mbstate_t x; return sizeof x;
16200 return 0;
16202 _ACEOF
16203 if ac_fn_c_try_compile "$LINENO"; then :
16204 ac_cv_type_mbstate_t=yes
16205 else
16206 ac_cv_type_mbstate_t=no
16208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16211 $as_echo "$ac_cv_type_mbstate_t" >&6; }
16212 if test $ac_cv_type_mbstate_t = yes; then
16214 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
16216 else
16218 $as_echo "#define mbstate_t int" >>confdefs.h
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16223 $as_echo_n "checking for C restricted array declarations... " >&6; }
16224 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16225 $as_echo_n "(cached) " >&6
16226 else
16227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228 /* end confdefs.h. */
16229 void fred (int x[__restrict]);
16231 main ()
16235 return 0;
16237 _ACEOF
16238 if ac_fn_c_try_compile "$LINENO"; then :
16239 emacs_cv_c_restrict_arr=yes
16240 else
16241 emacs_cv_c_restrict_arr=no
16243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16246 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
16247 if test "$emacs_cv_c_restrict_arr" = yes; then
16249 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
16254 if test "${opsys}" != "mingw32"; then
16256 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16261 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
16264 ## Note: PTYs are broken on darwin <6. Use at your own risk.
16265 if test "${opsys}" != "mingw32"; then
16267 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
16272 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
16278 if test "${opsys}" = "mingw32"; then
16279 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16281 else
16282 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16287 if test "${opsys}" = "mingw32"; then
16288 $as_echo "#define SEPCHAR ';'" >>confdefs.h
16290 else
16291 $as_echo "#define SEPCHAR ':'" >>confdefs.h
16296 $as_echo "#define subprocesses 1" >>confdefs.h
16300 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16305 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16308 if test "${opsys}" = "mingw32"; then
16310 $as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
16314 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16318 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16320 else
16322 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16326 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16330 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16336 case $opsys in
16337 aix4-2)
16338 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16339 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16344 hpux*)
16345 $as_echo "#define NO_EDITRES 1" >>confdefs.h
16348 esac
16351 case $opsys in
16352 irix6-5 | sol2* | unixware )
16354 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
16357 esac
16359 emacs_broken_SIGIO=no
16361 case $opsys in
16362 hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd )
16363 emacs_broken_SIGIO=yes
16366 aix4-2)
16368 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
16372 freebsd)
16374 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
16377 esac
16379 case $opsys in
16380 gnu-* | sol2-10 )
16382 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
16385 esac
16387 case $opsys in
16388 darwin | dragonfly | freebsd | netbsd | openbsd )
16390 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
16393 esac
16395 case $opsys in
16396 netbsd | openbsd) sound_device="/dev/audio" ;;
16397 *) sound_device="/dev/dsp" ;;
16398 esac
16401 cat >>confdefs.h <<_ACEOF
16402 #define DEFAULT_SOUND_DEVICE "$sound_device"
16403 _ACEOF
16407 case $opsys in
16408 darwin | gnu-linux | gnu-kfreebsd )
16410 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
16413 esac
16416 case $opsys in
16417 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
16419 $as_echo "#define NARROWPROTO 1" >>confdefs.h
16422 esac
16431 case $opsys in
16432 aix4-2 )
16433 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
16435 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
16437 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
16441 cygwin )
16442 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16444 $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
16446 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16448 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16452 darwin )
16453 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16455 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16457 $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
16459 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16461 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16465 gnu | openbsd )
16466 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16470 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
16471 if test "x$ac_cv_func_grantpt" = xyes; then
16473 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
16475 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
16477 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16479 if test "x$ac_cv_func_posix_openpt" = xyes; then
16480 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h
16482 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16484 elif test "x$ac_cv_func_getpt" = xyes; then
16485 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
16487 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16489 else
16490 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16493 else
16494 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16499 hpux*)
16500 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
16502 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
16504 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
16508 irix6-5 )
16509 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
16511 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
16513 $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
16515 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16517 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
16521 sol2* )
16522 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16526 unixware )
16527 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
16530 esac
16533 case $opsys in
16534 sol2* | unixware )
16535 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16537 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
16540 $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
16543 esac
16548 case $opsys in
16549 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
16550 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16554 gnu-linux | gnu-kfreebsd )
16556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16557 $as_echo_n "checking for signals via characters... " >&6; }
16558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559 /* end confdefs.h. */
16561 #include <linux/version.h>
16562 #if LINUX_VERSION_CODE < 0x20400
16563 # error "Linux version too old"
16564 #endif
16567 main ()
16571 return 0;
16573 _ACEOF
16574 if ac_fn_c_try_cpp "$LINENO"; then :
16575 emacs_signals_via_chars=yes
16576 else
16577 emacs_signals_via_chars=no
16579 rm -f conftest.err conftest.$ac_ext
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16582 $as_echo "$emacs_signals_via_chars" >&6; }
16583 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16586 esac
16591 case $opsys in
16592 aix*)
16593 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
16596 hpux*)
16597 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
16600 irix6-5)
16601 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
16604 esac
16609 case $opsys in
16610 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16613 gnu | dragonfly | freebsd | netbsd | openbsd )
16615 $as_echo "#define TABDLY OXTABS" >>confdefs.h
16617 $as_echo "#define TAB3 OXTABS" >>confdefs.h
16621 gnu-linux | gnu-kfreebsd )
16622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623 /* end confdefs.h. */
16625 #ifndef __ia64__
16626 # error "not ia64"
16627 #endif
16630 main ()
16634 return 0;
16636 _ACEOF
16637 if ac_fn_c_try_cpp "$LINENO"; then :
16639 $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
16642 rm -f conftest.err conftest.$ac_ext
16645 hpux*)
16647 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
16650 esac
16656 case $opsys in
16657 gnu-linux | gnu-kfreebsd )
16658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659 /* end confdefs.h. */
16661 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16662 || defined __alpha__ || defined __mips__ || defined __s390__ \
16663 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16664 || defined __ia64__ || defined __sh__
16665 /* ok */
16666 #else
16667 # error "setjmp not known to work on this arch"
16668 #endif
16671 main ()
16675 return 0;
16677 _ACEOF
16678 if ac_fn_c_try_cpp "$LINENO"; then :
16679 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16682 rm -f conftest.err conftest.$ac_ext
16684 esac
16687 if test x$GCC = xyes; then
16688 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16690 else
16691 case $opsys in
16692 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
16693 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16696 esac
16698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16699 $as_echo_n "checking for _setjmp... " >&6; }
16700 if test "${emacs_cv_func__setjmp+set}" = set; then :
16701 $as_echo_n "(cached) " >&6
16702 else
16703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16704 /* end confdefs.h. */
16705 #include <setjmp.h>
16706 #ifdef __MINGW32__
16707 # define _longjmp longjmp
16708 #endif
16711 main ()
16713 jmp_buf j;
16714 if (! _setjmp (j))
16715 _longjmp (j, 1);
16717 return 0;
16719 _ACEOF
16720 if ac_fn_c_try_link "$LINENO"; then :
16721 emacs_cv_func__setjmp=yes
16722 else
16723 emacs_cv_func__setjmp=no
16725 rm -f core conftest.err conftest.$ac_objext \
16726 conftest$ac_exeext conftest.$ac_ext
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16729 $as_echo "$emacs_cv_func__setjmp" >&6; }
16730 if test $emacs_cv_func__setjmp = yes; then
16732 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
16734 else
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16736 $as_echo_n "checking for sigsetjmp... " >&6; }
16737 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16738 $as_echo_n "(cached) " >&6
16739 else
16740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16741 /* end confdefs.h. */
16742 #include <setjmp.h>
16745 main ()
16747 sigjmp_buf j;
16748 if (! sigsetjmp (j, 1))
16749 siglongjmp (j, 1);
16751 return 0;
16753 _ACEOF
16754 if ac_fn_c_try_link "$LINENO"; then :
16755 emacs_cv_func_sigsetjmp=yes
16756 else
16757 emacs_cv_func_sigsetjmp=no
16759 rm -f core conftest.err conftest.$ac_objext \
16760 conftest$ac_exeext conftest.$ac_ext
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16763 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16764 if test $emacs_cv_func_sigsetjmp = yes; then
16766 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
16771 case $opsys in
16772 sol2* | unixware )
16774 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16777 esac
16780 case $opsys in
16781 hpux* | sol2* )
16783 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
16786 esac
16794 case $opsys in
16795 aix4-2)
16796 $as_echo "#define USG /**/" >>confdefs.h
16798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16799 /* end confdefs.h. */
16801 #ifndef _AIX
16802 # error "_AIX not defined"
16803 #endif
16806 main ()
16810 return 0;
16812 _ACEOF
16813 if ac_fn_c_try_cpp "$LINENO"; then :
16815 else
16817 $as_echo "#define _AIX /**/" >>confdefs.h
16820 rm -f conftest.err conftest.$ac_ext
16823 cygwin)
16825 $as_echo "#define CYGWIN 1" >>confdefs.h
16829 darwin)
16831 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
16835 gnu-linux | gnu-kfreebsd )
16836 $as_echo "#define USG /**/" >>confdefs.h
16839 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
16843 hpux*)
16844 $as_echo "#define USG /**/" >>confdefs.h
16847 $as_echo "#define HPUX /**/" >>confdefs.h
16851 irix6-5)
16852 $as_echo "#define USG /**/" >>confdefs.h
16854 $as_echo "#define USG5_4 /**/" >>confdefs.h
16857 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
16861 mingw32)
16862 $as_echo "#define DOS_NT /**/" >>confdefs.h
16865 $as_echo "#define WINDOWSNT 1" >>confdefs.h
16867 if test "x$ac_enable_checking" != "x" ; then
16869 $as_echo "#define EMACSDEBUG 1" >>confdefs.h
16874 sol2*)
16875 $as_echo "#define USG /**/" >>confdefs.h
16877 $as_echo "#define USG5_4 /**/" >>confdefs.h
16880 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
16884 unixware)
16885 $as_echo "#define USG /**/" >>confdefs.h
16887 $as_echo "#define USG5_4 /**/" >>confdefs.h
16890 esac
16892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16893 $as_echo_n "checking for usable FIONREAD... " >&6; }
16894 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16895 $as_echo_n "(cached) " >&6
16896 else
16897 case $opsys in
16898 aix4-2)
16899 emacs_cv_usable_FIONREAD=no
16902 mingw32)
16903 emacs_cv_usable_FIONREAD=yes
16907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908 /* end confdefs.h. */
16909 #include <sys/types.h>
16910 #include <sys/ioctl.h>
16911 #ifdef USG5_4
16912 # include <sys/filio.h>
16913 #endif
16916 main ()
16918 int foo = ioctl (0, FIONREAD, &foo);
16920 return 0;
16922 _ACEOF
16923 if ac_fn_c_try_compile "$LINENO"; then :
16924 emacs_cv_usable_FIONREAD=yes
16925 else
16926 emacs_cv_usable_FIONREAD=no
16928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16930 esac
16932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16933 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16934 if test $emacs_cv_usable_FIONREAD = yes; then
16936 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16939 if test $emacs_broken_SIGIO = no; then
16940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16941 $as_echo_n "checking for usable SIGIO... " >&6; }
16942 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16943 $as_echo_n "(cached) " >&6
16944 else
16945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16946 /* end confdefs.h. */
16947 #include <fcntl.h>
16948 #include <signal.h>
16951 main ()
16953 int foo = SIGIO | F_SETFL | FASYNC;
16955 return 0;
16957 _ACEOF
16958 if ac_fn_c_try_compile "$LINENO"; then :
16959 emacs_cv_usable_SIGIO=yes
16960 else
16961 emacs_cv_usable_SIGIO=no
16963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16966 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
16967 if test $emacs_cv_usable_SIGIO = yes; then
16969 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16976 case $opsys in
16977 cygwin)
16979 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
16983 hpux11)
16985 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
16989 irix6-5)
16991 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
16995 sol2-10)
16997 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
17000 esac
17002 # Set up the CFLAGS for real compilation, so we can substitute it.
17003 CFLAGS="$REAL_CFLAGS"
17004 CPPFLAGS="$REAL_CPPFLAGS"
17006 ## Hack to detect a buggy GCC version.
17007 if test "x$GCC" = xyes \
17008 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17009 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17010 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17011 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17014 version=$PACKAGE_VERSION
17016 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
17018 cat >>confdefs.h <<_ACEOF
17019 #define COPYRIGHT "$copyright"
17020 _ACEOF
17024 ### Specify what sort of things we'll be editing into Makefile and config.h.
17025 ### Use configuration here uncanonicalized to avoid exceeding size limits.
17028 ## Unused?
17051 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17052 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17053 ## end of LIBX_BASE, but nothing ever set it.
17058 ## Used in lwlib/Makefile.in.
17067 if test -n "${term_header}"; then
17069 cat >>confdefs.h <<_ACEOF
17070 #define TERM_HEADER "${term_header}"
17071 _ACEOF
17076 cat >>confdefs.h <<_ACEOF
17077 #define EMACS_CONFIGURATION "${canonical}"
17078 _ACEOF
17080 emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
17082 cat >>confdefs.h <<_ACEOF
17083 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
17084 _ACEOF
17088 case $opsys in
17089 mingw32)
17090 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17093 esac
17095 XMENU_OBJ=
17096 XOBJ=
17097 FONT_OBJ=
17098 if test "${HAVE_X_WINDOWS}" = "yes" ; then
17100 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
17102 XMENU_OBJ=xmenu.o
17103 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
17104 FONT_OBJ=xfont.o
17105 if test "$HAVE_XFT" = "yes"; then
17106 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17107 elif test "$HAVE_FREETYPE" = "yes"; then
17108 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17116 WIDGET_OBJ=
17117 MOTIF_LIBW=
17118 if test "${USE_X_TOOLKIT}" != "none" ; then
17119 WIDGET_OBJ=widget.o
17121 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17123 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17125 $as_echo "#define USE_LUCID 1" >>confdefs.h
17127 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
17129 $as_echo "#define USE_MOTIF 1" >>confdefs.h
17131 MOTIF_LIBW=-lXm
17132 case "$opsys" in
17133 gnu-linux)
17134 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17135 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17138 unixware)
17139 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17140 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17141 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17144 aix4-2)
17145 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17146 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17148 esac
17149 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17154 TOOLKIT_LIBW=
17155 case "$USE_X_TOOLKIT" in
17156 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17157 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17158 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17159 esac
17162 if test "${opsys}" != "mingw32"; then
17163 if test "$USE_X_TOOLKIT" = "none"; then
17164 LIBXT_OTHER="\$(LIBXSM)"
17165 OLDXMENU_TARGET="really-oldXMenu"
17166 else
17167 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17168 OLDXMENU_TARGET="really-lwlib"
17173 ## The X Menu stuff is present in the X10 distribution, but missing
17174 ## from X11. If we have X10, just use the installed library;
17175 ## otherwise, use our own copy.
17176 if test "${HAVE_X11}" = "yes" ; then
17178 $as_echo "#define HAVE_X11 1" >>confdefs.h
17181 if test "$USE_X_TOOLKIT" = "none"; then
17182 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17183 else
17184 OLDXMENU="\${lwlibdir}/liblw.a"
17186 LIBXMENU="\$(OLDXMENU)"
17187 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17188 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
17189 else
17190 ## For a syntactically valid Makefile; not actually used for anything.
17191 ## See comments in src/Makefile.in.
17192 OLDXMENU=nothing
17193 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17194 if test "${HAVE_X_WINDOWS}" = "yes"; then
17195 LIBXMENU="-lXMenu"
17196 else
17197 LIBXMENU=
17199 LIBX_OTHER=
17200 OLDXMENU_DEPS=
17203 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17204 OLDXMENU_TARGET=
17205 OLDXMENU=nothing
17206 LIBXMENU=
17207 OLDXMENU_DEPS=
17216 if test "${HAVE_MENUS}" = "yes" ; then
17218 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
17222 if test "${GNU_MALLOC}" = "yes" ; then
17224 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
17228 RALLOC_OBJ=
17229 if test "${REL_ALLOC}" = "yes" ; then
17231 $as_echo "#define REL_ALLOC 1" >>confdefs.h
17234 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17238 if test "$opsys" = "cygwin"; then
17239 CYGWIN_OBJ="sheap.o cygw32.o"
17240 ## Cygwin differs because of its unexec().
17241 PRE_ALLOC_OBJ=
17242 POST_ALLOC_OBJ=lastfile.o
17243 elif test "$opsys" = "mingw32"; then
17244 CYGWIN_OBJ=
17245 PRE_ALLOC_OBJ=
17246 POST_ALLOC_OBJ=lastfile.o
17247 else
17248 CYGWIN_OBJ=
17249 PRE_ALLOC_OBJ=lastfile.o
17250 POST_ALLOC_OBJ=
17256 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17257 # it temporarily reverts them to their pre-pkg-config values,
17258 # because gnulib needs to work with both src (which uses the
17259 # pkg-config stuff) and lib-src (which does not). For example, gnulib
17260 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17261 # and it therefore needs to run in an environment where LIBS does not
17262 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17263 # for some package unrelated to lib-src.
17264 SAVE_CFLAGS=$CFLAGS
17265 SAVE_LIBS=$LIBS
17266 CFLAGS=$pre_PKG_CONFIG_CFLAGS
17267 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
17279 LIBC_FATAL_STDERR_=1
17280 export LIBC_FATAL_STDERR_
17282 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17283 # for constant arguments. Useless!
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17285 $as_echo_n "checking for working alloca.h... " >&6; }
17286 if test "${ac_cv_working_alloca_h+set}" = set; then :
17287 $as_echo_n "(cached) " >&6
17288 else
17289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17290 /* end confdefs.h. */
17291 #include <alloca.h>
17293 main ()
17295 char *p = (char *) alloca (2 * sizeof (int));
17296 if (p) return 0;
17298 return 0;
17300 _ACEOF
17301 if ac_fn_c_try_link "$LINENO"; then :
17302 ac_cv_working_alloca_h=yes
17303 else
17304 ac_cv_working_alloca_h=no
17306 rm -f core conftest.err conftest.$ac_objext \
17307 conftest$ac_exeext conftest.$ac_ext
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17310 $as_echo "$ac_cv_working_alloca_h" >&6; }
17311 if test $ac_cv_working_alloca_h = yes; then
17313 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17318 $as_echo_n "checking for alloca... " >&6; }
17319 if test "${ac_cv_func_alloca_works+set}" = set; then :
17320 $as_echo_n "(cached) " >&6
17321 else
17322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323 /* end confdefs.h. */
17324 #ifdef __GNUC__
17325 # define alloca __builtin_alloca
17326 #else
17327 # ifdef _MSC_VER
17328 # include <malloc.h>
17329 # define alloca _alloca
17330 # else
17331 # ifdef HAVE_ALLOCA_H
17332 # include <alloca.h>
17333 # else
17334 # ifdef _AIX
17335 #pragma alloca
17336 # else
17337 # ifndef alloca /* predefined by HP cc +Olibcalls */
17338 char *alloca ();
17339 # endif
17340 # endif
17341 # endif
17342 # endif
17343 #endif
17346 main ()
17348 char *p = (char *) alloca (1);
17349 if (p) return 0;
17351 return 0;
17353 _ACEOF
17354 if ac_fn_c_try_link "$LINENO"; then :
17355 ac_cv_func_alloca_works=yes
17356 else
17357 ac_cv_func_alloca_works=no
17359 rm -f core conftest.err conftest.$ac_objext \
17360 conftest$ac_exeext conftest.$ac_ext
17362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17363 $as_echo "$ac_cv_func_alloca_works" >&6; }
17365 if test $ac_cv_func_alloca_works = yes; then
17367 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17369 else
17370 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17371 # that cause trouble. Some versions do not even contain alloca or
17372 # contain a buggy version. If you still want to use their alloca,
17373 # use ar to extract alloca.o from them instead of compiling alloca.c.
17379 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17381 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17385 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17386 if test "${ac_cv_os_cray+set}" = set; then :
17387 $as_echo_n "(cached) " >&6
17388 else
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390 /* end confdefs.h. */
17391 #if defined CRAY && ! defined CRAY2
17392 webecray
17393 #else
17394 wenotbecray
17395 #endif
17397 _ACEOF
17398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17399 $EGREP "webecray" >/dev/null 2>&1; then :
17400 ac_cv_os_cray=yes
17401 else
17402 ac_cv_os_cray=no
17404 rm -f conftest*
17407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17408 $as_echo "$ac_cv_os_cray" >&6; }
17409 if test $ac_cv_os_cray = yes; then
17410 for ac_func in _getb67 GETB67 getb67; do
17411 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17412 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17413 eval as_val=\$$as_ac_var
17414 if test "x$as_val" = x""yes; then :
17416 cat >>confdefs.h <<_ACEOF
17417 #define CRAY_STACKSEG_END $ac_func
17418 _ACEOF
17420 break
17423 done
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17427 $as_echo_n "checking stack direction for C alloca... " >&6; }
17428 if test "${ac_cv_c_stack_direction+set}" = set; then :
17429 $as_echo_n "(cached) " >&6
17430 else
17431 if test "$cross_compiling" = yes; then :
17432 ac_cv_c_stack_direction=0
17433 else
17434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435 /* end confdefs.h. */
17436 $ac_includes_default
17438 find_stack_direction (int *addr, int depth)
17440 int dir, dummy = 0;
17441 if (! addr)
17442 addr = &dummy;
17443 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17444 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17445 return dir + dummy;
17449 main (int argc, char **argv)
17451 return find_stack_direction (0, argc + !argv + 20) < 0;
17453 _ACEOF
17454 if ac_fn_c_try_run "$LINENO"; then :
17455 ac_cv_c_stack_direction=1
17456 else
17457 ac_cv_c_stack_direction=-1
17459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17460 conftest.$ac_objext conftest.beam conftest.$ac_ext
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17465 $as_echo "$ac_cv_c_stack_direction" >&6; }
17466 cat >>confdefs.h <<_ACEOF
17467 #define STACK_DIRECTION $ac_cv_c_stack_direction
17468 _ACEOF
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17477 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17478 if test "${ac_cv_c_bigendian+set}" = set; then :
17479 $as_echo_n "(cached) " >&6
17480 else
17481 ac_cv_c_bigendian=unknown
17482 # See if we're dealing with a universal compiler.
17483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484 /* end confdefs.h. */
17485 #ifndef __APPLE_CC__
17486 not a universal capable compiler
17487 #endif
17488 typedef int dummy;
17490 _ACEOF
17491 if ac_fn_c_try_compile "$LINENO"; then :
17493 # Check for potential -arch flags. It is not universal unless
17494 # there are at least two -arch flags with different values.
17495 ac_arch=
17496 ac_prev=
17497 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17498 if test -n "$ac_prev"; then
17499 case $ac_word in
17500 i?86 | x86_64 | ppc | ppc64)
17501 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17502 ac_arch=$ac_word
17503 else
17504 ac_cv_c_bigendian=universal
17505 break
17508 esac
17509 ac_prev=
17510 elif test "x$ac_word" = "x-arch"; then
17511 ac_prev=arch
17513 done
17515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17516 if test $ac_cv_c_bigendian = unknown; then
17517 # See if sys/param.h defines the BYTE_ORDER macro.
17518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17519 /* end confdefs.h. */
17520 #include <sys/types.h>
17521 #include <sys/param.h>
17524 main ()
17526 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17527 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17528 && LITTLE_ENDIAN)
17529 bogus endian macros
17530 #endif
17533 return 0;
17535 _ACEOF
17536 if ac_fn_c_try_compile "$LINENO"; then :
17537 # It does; now see whether it defined to BIG_ENDIAN or not.
17538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17539 /* end confdefs.h. */
17540 #include <sys/types.h>
17541 #include <sys/param.h>
17544 main ()
17546 #if BYTE_ORDER != BIG_ENDIAN
17547 not big endian
17548 #endif
17551 return 0;
17553 _ACEOF
17554 if ac_fn_c_try_compile "$LINENO"; then :
17555 ac_cv_c_bigendian=yes
17556 else
17557 ac_cv_c_bigendian=no
17559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17563 if test $ac_cv_c_bigendian = unknown; then
17564 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17566 /* end confdefs.h. */
17567 #include <limits.h>
17570 main ()
17572 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17573 bogus endian macros
17574 #endif
17577 return 0;
17579 _ACEOF
17580 if ac_fn_c_try_compile "$LINENO"; then :
17581 # It does; now see whether it defined to _BIG_ENDIAN or not.
17582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17583 /* end confdefs.h. */
17584 #include <limits.h>
17587 main ()
17589 #ifndef _BIG_ENDIAN
17590 not big endian
17591 #endif
17594 return 0;
17596 _ACEOF
17597 if ac_fn_c_try_compile "$LINENO"; then :
17598 ac_cv_c_bigendian=yes
17599 else
17600 ac_cv_c_bigendian=no
17602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17606 if test $ac_cv_c_bigendian = unknown; then
17607 # Compile a test program.
17608 if test "$cross_compiling" = yes; then :
17609 # Try to guess by grepping values from an object file.
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h. */
17612 short int ascii_mm[] =
17613 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17614 short int ascii_ii[] =
17615 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17616 int use_ascii (int i) {
17617 return ascii_mm[i] + ascii_ii[i];
17619 short int ebcdic_ii[] =
17620 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17621 short int ebcdic_mm[] =
17622 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17623 int use_ebcdic (int i) {
17624 return ebcdic_mm[i] + ebcdic_ii[i];
17626 extern int foo;
17629 main ()
17631 return use_ascii (foo) == use_ebcdic (foo);
17633 return 0;
17635 _ACEOF
17636 if ac_fn_c_try_compile "$LINENO"; then :
17637 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17638 ac_cv_c_bigendian=yes
17640 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17641 if test "$ac_cv_c_bigendian" = unknown; then
17642 ac_cv_c_bigendian=no
17643 else
17644 # finding both strings is unlikely to happen, but who knows?
17645 ac_cv_c_bigendian=unknown
17649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17650 else
17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17652 /* end confdefs.h. */
17653 $ac_includes_default
17655 main ()
17658 /* Are we little or big endian? From Harbison&Steele. */
17659 union
17661 long int l;
17662 char c[sizeof (long int)];
17663 } u;
17664 u.l = 1;
17665 return u.c[sizeof (long int) - 1] == 1;
17668 return 0;
17670 _ACEOF
17671 if ac_fn_c_try_run "$LINENO"; then :
17672 ac_cv_c_bigendian=no
17673 else
17674 ac_cv_c_bigendian=yes
17676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17677 conftest.$ac_objext conftest.beam conftest.$ac_ext
17682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17683 $as_echo "$ac_cv_c_bigendian" >&6; }
17684 case $ac_cv_c_bigendian in #(
17685 yes)
17686 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17687 ;; #(
17689 ;; #(
17690 universal)
17692 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
17694 ;; #(
17696 as_fn_error "unknown endianness
17697 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17698 esac
17702 GNULIB_CHDIR=0;
17703 GNULIB_CHOWN=0;
17704 GNULIB_CLOSE=0;
17705 GNULIB_DUP=0;
17706 GNULIB_DUP2=0;
17707 GNULIB_DUP3=0;
17708 GNULIB_ENVIRON=0;
17709 GNULIB_EUIDACCESS=0;
17710 GNULIB_FACCESSAT=0;
17711 GNULIB_FCHDIR=0;
17712 GNULIB_FCHOWNAT=0;
17713 GNULIB_FDATASYNC=0;
17714 GNULIB_FSYNC=0;
17715 GNULIB_FTRUNCATE=0;
17716 GNULIB_GETCWD=0;
17717 GNULIB_GETDOMAINNAME=0;
17718 GNULIB_GETDTABLESIZE=0;
17719 GNULIB_GETGROUPS=0;
17720 GNULIB_GETHOSTNAME=0;
17721 GNULIB_GETLOGIN=0;
17722 GNULIB_GETLOGIN_R=0;
17723 GNULIB_GETPAGESIZE=0;
17724 GNULIB_GETUSERSHELL=0;
17725 GNULIB_GROUP_MEMBER=0;
17726 GNULIB_ISATTY=0;
17727 GNULIB_LCHOWN=0;
17728 GNULIB_LINK=0;
17729 GNULIB_LINKAT=0;
17730 GNULIB_LSEEK=0;
17731 GNULIB_PIPE=0;
17732 GNULIB_PIPE2=0;
17733 GNULIB_PREAD=0;
17734 GNULIB_PWRITE=0;
17735 GNULIB_READ=0;
17736 GNULIB_READLINK=0;
17737 GNULIB_READLINKAT=0;
17738 GNULIB_RMDIR=0;
17739 GNULIB_SETHOSTNAME=0;
17740 GNULIB_SLEEP=0;
17741 GNULIB_SYMLINK=0;
17742 GNULIB_SYMLINKAT=0;
17743 GNULIB_TTYNAME_R=0;
17744 GNULIB_UNISTD_H_NONBLOCKING=0;
17745 GNULIB_UNISTD_H_SIGPIPE=0;
17746 GNULIB_UNLINK=0;
17747 GNULIB_UNLINKAT=0;
17748 GNULIB_USLEEP=0;
17749 GNULIB_WRITE=0;
17750 HAVE_CHOWN=1;
17751 HAVE_DUP2=1;
17752 HAVE_DUP3=1;
17753 HAVE_EUIDACCESS=1;
17754 HAVE_FACCESSAT=1;
17755 HAVE_FCHDIR=1;
17756 HAVE_FCHOWNAT=1;
17757 HAVE_FDATASYNC=1;
17758 HAVE_FSYNC=1;
17759 HAVE_FTRUNCATE=1;
17760 HAVE_GETDTABLESIZE=1;
17761 HAVE_GETGROUPS=1;
17762 HAVE_GETHOSTNAME=1;
17763 HAVE_GETLOGIN=1;
17764 HAVE_GETPAGESIZE=1;
17765 HAVE_GROUP_MEMBER=1;
17766 HAVE_LCHOWN=1;
17767 HAVE_LINK=1;
17768 HAVE_LINKAT=1;
17769 HAVE_PIPE=1;
17770 HAVE_PIPE2=1;
17771 HAVE_PREAD=1;
17772 HAVE_PWRITE=1;
17773 HAVE_READLINK=1;
17774 HAVE_READLINKAT=1;
17775 HAVE_SETHOSTNAME=1;
17776 HAVE_SLEEP=1;
17777 HAVE_SYMLINK=1;
17778 HAVE_SYMLINKAT=1;
17779 HAVE_UNLINKAT=1;
17780 HAVE_USLEEP=1;
17781 HAVE_DECL_ENVIRON=1;
17782 HAVE_DECL_FCHDIR=1;
17783 HAVE_DECL_FDATASYNC=1;
17784 HAVE_DECL_GETDOMAINNAME=1;
17785 HAVE_DECL_GETLOGIN_R=1;
17786 HAVE_DECL_GETPAGESIZE=1;
17787 HAVE_DECL_GETUSERSHELL=1;
17788 HAVE_DECL_SETHOSTNAME=1;
17789 HAVE_DECL_TTYNAME_R=1;
17790 HAVE_OS_H=0;
17791 HAVE_SYS_PARAM_H=0;
17792 REPLACE_CHOWN=0;
17793 REPLACE_CLOSE=0;
17794 REPLACE_DUP=0;
17795 REPLACE_DUP2=0;
17796 REPLACE_FCHOWNAT=0;
17797 REPLACE_FTRUNCATE=0;
17798 REPLACE_GETCWD=0;
17799 REPLACE_GETDOMAINNAME=0;
17800 REPLACE_GETLOGIN_R=0;
17801 REPLACE_GETGROUPS=0;
17802 REPLACE_GETPAGESIZE=0;
17803 REPLACE_ISATTY=0;
17804 REPLACE_LCHOWN=0;
17805 REPLACE_LINK=0;
17806 REPLACE_LINKAT=0;
17807 REPLACE_LSEEK=0;
17808 REPLACE_PREAD=0;
17809 REPLACE_PWRITE=0;
17810 REPLACE_READ=0;
17811 REPLACE_READLINK=0;
17812 REPLACE_RMDIR=0;
17813 REPLACE_SLEEP=0;
17814 REPLACE_SYMLINK=0;
17815 REPLACE_TTYNAME_R=0;
17816 REPLACE_UNLINK=0;
17817 REPLACE_UNLINKAT=0;
17818 REPLACE_USLEEP=0;
17819 REPLACE_WRITE=0;
17820 UNISTD_H_HAVE_WINSOCK2_H=0;
17821 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
17825 GNULIB_OPENDIR=0;
17826 GNULIB_READDIR=0;
17827 GNULIB_REWINDDIR=0;
17828 GNULIB_CLOSEDIR=0;
17829 GNULIB_DIRFD=0;
17830 GNULIB_FDOPENDIR=0;
17831 GNULIB_SCANDIR=0;
17832 GNULIB_ALPHASORT=0;
17833 HAVE_OPENDIR=1;
17834 HAVE_READDIR=1;
17835 HAVE_REWINDDIR=1;
17836 HAVE_CLOSEDIR=1;
17837 HAVE_DECL_DIRFD=1;
17838 HAVE_DECL_FDOPENDIR=1;
17839 HAVE_FDOPENDIR=1;
17840 HAVE_SCANDIR=1;
17841 HAVE_ALPHASORT=1;
17842 REPLACE_OPENDIR=0;
17843 REPLACE_CLOSEDIR=0;
17844 REPLACE_DIRFD=0;
17845 REPLACE_FDOPENDIR=0;
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17850 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17851 if test "${gl_cv_have_include_next+set}" = set; then :
17852 $as_echo_n "(cached) " >&6
17853 else
17854 rm -rf conftestd1a conftestd1b conftestd2
17855 mkdir conftestd1a conftestd1b conftestd2
17856 cat <<EOF > conftestd1a/conftest.h
17857 #define DEFINED_IN_CONFTESTD1
17858 #include_next <conftest.h>
17859 #ifdef DEFINED_IN_CONFTESTD2
17860 int foo;
17861 #else
17862 #error "include_next doesn't work"
17863 #endif
17865 cat <<EOF > conftestd1b/conftest.h
17866 #define DEFINED_IN_CONFTESTD1
17867 #include <stdio.h>
17868 #include_next <conftest.h>
17869 #ifdef DEFINED_IN_CONFTESTD2
17870 int foo;
17871 #else
17872 #error "include_next doesn't work"
17873 #endif
17875 cat <<EOF > conftestd2/conftest.h
17876 #ifndef DEFINED_IN_CONFTESTD1
17877 #error "include_next test doesn't work"
17878 #endif
17879 #define DEFINED_IN_CONFTESTD2
17881 gl_save_CPPFLAGS="$CPPFLAGS"
17882 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17884 /* end confdefs.h. */
17885 #include <conftest.h>
17886 _ACEOF
17887 if ac_fn_c_try_compile "$LINENO"; then :
17888 gl_cv_have_include_next=yes
17889 else
17890 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17892 /* end confdefs.h. */
17893 #include <conftest.h>
17894 _ACEOF
17895 if ac_fn_c_try_compile "$LINENO"; then :
17896 gl_cv_have_include_next=buggy
17897 else
17898 gl_cv_have_include_next=no
17900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17904 CPPFLAGS="$gl_save_CPPFLAGS"
17905 rm -rf conftestd1a conftestd1b conftestd2
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17909 $as_echo "$gl_cv_have_include_next" >&6; }
17910 PRAGMA_SYSTEM_HEADER=
17911 if test $gl_cv_have_include_next = yes; then
17912 INCLUDE_NEXT=include_next
17913 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17914 if test -n "$GCC"; then
17915 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17917 else
17918 if test $gl_cv_have_include_next = buggy; then
17919 INCLUDE_NEXT=include
17920 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17921 else
17922 INCLUDE_NEXT=include
17923 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17930 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17931 if test "${gl_cv_pragma_columns+set}" = set; then :
17932 $as_echo_n "(cached) " >&6
17933 else
17934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17935 /* end confdefs.h. */
17937 #ifdef __TANDEM
17938 choke me
17939 #endif
17941 _ACEOF
17942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17943 $EGREP "choke me" >/dev/null 2>&1; then :
17944 gl_cv_pragma_columns=yes
17945 else
17946 gl_cv_pragma_columns=no
17948 rm -f conftest*
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17953 $as_echo "$gl_cv_pragma_columns" >&6; }
17954 if test $gl_cv_pragma_columns = yes; then
17955 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17956 else
17957 PRAGMA_COLUMNS=
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17965 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
17966 if test "${gl_cv_func_c99_strtold+set}" = set; then :
17967 $as_echo_n "(cached) " >&6
17968 else
17969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17970 /* end confdefs.h. */
17971 /* On HP-UX before 11.23, strtold returns a struct instead of
17972 long double. Reject implementations like that, by requiring
17973 compatibility with the C99 prototype. */
17974 #include <stdlib.h>
17975 static long double (*p) (char const *, char **) = strtold;
17976 static long double
17977 test (char const *nptr, char **endptr)
17979 long double r;
17980 r = strtold (nptr, endptr);
17981 return r;
17984 main ()
17986 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
17988 return 0;
17990 _ACEOF
17991 if ac_fn_c_try_link "$LINENO"; then :
17992 gl_cv_func_c99_strtold=yes
17993 else
17994 gl_cv_func_c99_strtold=no
17996 rm -f core conftest.err conftest.$ac_objext \
17997 conftest$ac_exeext conftest.$ac_ext
17999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18000 $as_echo "$gl_cv_func_c99_strtold" >&6; }
18001 if test $gl_cv_func_c99_strtold = yes; then
18003 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
18014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18015 $as_echo_n "checking if environ is properly declared... " >&6; }
18016 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18017 $as_echo_n "(cached) " >&6
18018 else
18020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18021 /* end confdefs.h. */
18022 #if HAVE_UNISTD_H
18023 #include <unistd.h>
18024 #endif
18025 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18026 #include <stdlib.h>
18028 extern struct { int foo; } environ;
18030 main ()
18032 environ.foo = 1;
18034 return 0;
18036 _ACEOF
18037 if ac_fn_c_try_compile "$LINENO"; then :
18038 gt_cv_var_environ_declaration=no
18039 else
18040 gt_cv_var_environ_declaration=yes
18042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18046 $as_echo "$gt_cv_var_environ_declaration" >&6; }
18047 if test $gt_cv_var_environ_declaration = yes; then
18049 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18054 if test $gt_cv_var_environ_declaration != yes; then
18055 HAVE_DECL_ENVIRON=0
18060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18061 $as_echo_n "checking for complete errno.h... " >&6; }
18062 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18063 $as_echo_n "(cached) " >&6
18064 else
18066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18067 /* end confdefs.h. */
18069 #include <errno.h>
18070 #if !defined ETXTBSY
18071 booboo
18072 #endif
18073 #if !defined ENOMSG
18074 booboo
18075 #endif
18076 #if !defined EIDRM
18077 booboo
18078 #endif
18079 #if !defined ENOLINK
18080 booboo
18081 #endif
18082 #if !defined EPROTO
18083 booboo
18084 #endif
18085 #if !defined EMULTIHOP
18086 booboo
18087 #endif
18088 #if !defined EBADMSG
18089 booboo
18090 #endif
18091 #if !defined EOVERFLOW
18092 booboo
18093 #endif
18094 #if !defined ENOTSUP
18095 booboo
18096 #endif
18097 #if !defined ENETRESET
18098 booboo
18099 #endif
18100 #if !defined ECONNABORTED
18101 booboo
18102 #endif
18103 #if !defined ESTALE
18104 booboo
18105 #endif
18106 #if !defined EDQUOT
18107 booboo
18108 #endif
18109 #if !defined ECANCELED
18110 booboo
18111 #endif
18112 #if !defined EOWNERDEAD
18113 booboo
18114 #endif
18115 #if !defined ENOTRECOVERABLE
18116 booboo
18117 #endif
18118 #if !defined EILSEQ
18119 booboo
18120 #endif
18122 _ACEOF
18123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18124 $EGREP "booboo" >/dev/null 2>&1; then :
18125 gl_cv_header_errno_h_complete=no
18126 else
18127 gl_cv_header_errno_h_complete=yes
18129 rm -f conftest*
18133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18134 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
18135 if test $gl_cv_header_errno_h_complete = yes; then
18136 ERRNO_H=''
18137 else
18146 if test $gl_cv_have_include_next = yes; then
18147 gl_cv_next_errno_h='<'errno.h'>'
18148 else
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18150 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
18151 if test "${gl_cv_next_errno_h+set}" = set; then :
18152 $as_echo_n "(cached) " >&6
18153 else
18155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18156 /* end confdefs.h. */
18157 #include <errno.h>
18159 _ACEOF
18160 case "$host_os" in
18161 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18162 *) gl_absname_cpp="$ac_cpp" ;;
18163 esac
18165 case "$host_os" in
18166 mingw*)
18167 gl_dirsep_regex='[/\\]'
18170 gl_dirsep_regex='\/'
18172 esac
18173 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18175 gl_header_literal_regex=`echo 'errno.h' \
18176 | sed -e "$gl_make_literal_regex_sed"`
18177 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18178 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18179 s|^/[^/]|//&|
18183 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18184 sed -n "$gl_absolute_header_sed"`'"'
18188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18189 $as_echo "$gl_cv_next_errno_h" >&6; }
18191 NEXT_ERRNO_H=$gl_cv_next_errno_h
18193 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18194 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18195 gl_next_as_first_directive='<'errno.h'>'
18196 else
18197 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18198 gl_next_as_first_directive=$gl_cv_next_errno_h
18200 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
18205 ERRNO_H='errno.h'
18208 if test -n "$ERRNO_H"; then
18209 GL_GENERATE_ERRNO_H_TRUE=
18210 GL_GENERATE_ERRNO_H_FALSE='#'
18211 else
18212 GL_GENERATE_ERRNO_H_TRUE='#'
18213 GL_GENERATE_ERRNO_H_FALSE=
18217 if test -n "$ERRNO_H"; then
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18219 $as_echo_n "checking for EMULTIHOP value... " >&6; }
18220 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18221 $as_echo_n "(cached) " >&6
18222 else
18224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225 /* end confdefs.h. */
18227 #include <errno.h>
18228 #ifdef EMULTIHOP
18230 #endif
18232 _ACEOF
18233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18234 $EGREP "yes" >/dev/null 2>&1; then :
18235 gl_cv_header_errno_h_EMULTIHOP=yes
18236 else
18237 gl_cv_header_errno_h_EMULTIHOP=no
18239 rm -f conftest*
18241 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18243 /* end confdefs.h. */
18245 #define _XOPEN_SOURCE_EXTENDED 1
18246 #include <errno.h>
18247 #ifdef EMULTIHOP
18249 #endif
18251 _ACEOF
18252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18253 $EGREP "yes" >/dev/null 2>&1; then :
18254 gl_cv_header_errno_h_EMULTIHOP=hidden
18256 rm -f conftest*
18258 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18259 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18260 #define _XOPEN_SOURCE_EXTENDED 1
18261 #include <errno.h>
18262 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18263 #include <stdio.h>
18264 #include <stdlib.h>
18265 "; then :
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18274 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18275 case $gl_cv_header_errno_h_EMULTIHOP in
18276 yes | no)
18277 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18280 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18282 esac
18288 if test -n "$ERRNO_H"; then
18289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18290 $as_echo_n "checking for ENOLINK value... " >&6; }
18291 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
18292 $as_echo_n "(cached) " >&6
18293 else
18295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18296 /* end confdefs.h. */
18298 #include <errno.h>
18299 #ifdef ENOLINK
18301 #endif
18303 _ACEOF
18304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18305 $EGREP "yes" >/dev/null 2>&1; then :
18306 gl_cv_header_errno_h_ENOLINK=yes
18307 else
18308 gl_cv_header_errno_h_ENOLINK=no
18310 rm -f conftest*
18312 if test $gl_cv_header_errno_h_ENOLINK = no; then
18313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18314 /* end confdefs.h. */
18316 #define _XOPEN_SOURCE_EXTENDED 1
18317 #include <errno.h>
18318 #ifdef ENOLINK
18320 #endif
18322 _ACEOF
18323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18324 $EGREP "yes" >/dev/null 2>&1; then :
18325 gl_cv_header_errno_h_ENOLINK=hidden
18327 rm -f conftest*
18329 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18330 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18331 #define _XOPEN_SOURCE_EXTENDED 1
18332 #include <errno.h>
18333 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18334 #include <stdio.h>
18335 #include <stdlib.h>
18336 "; then :
18344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18345 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18346 case $gl_cv_header_errno_h_ENOLINK in
18347 yes | no)
18348 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18351 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18353 esac
18359 if test -n "$ERRNO_H"; then
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18361 $as_echo_n "checking for EOVERFLOW value... " >&6; }
18362 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18363 $as_echo_n "(cached) " >&6
18364 else
18366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18367 /* end confdefs.h. */
18369 #include <errno.h>
18370 #ifdef EOVERFLOW
18372 #endif
18374 _ACEOF
18375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18376 $EGREP "yes" >/dev/null 2>&1; then :
18377 gl_cv_header_errno_h_EOVERFLOW=yes
18378 else
18379 gl_cv_header_errno_h_EOVERFLOW=no
18381 rm -f conftest*
18383 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385 /* end confdefs.h. */
18387 #define _XOPEN_SOURCE_EXTENDED 1
18388 #include <errno.h>
18389 #ifdef EOVERFLOW
18391 #endif
18393 _ACEOF
18394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18395 $EGREP "yes" >/dev/null 2>&1; then :
18396 gl_cv_header_errno_h_EOVERFLOW=hidden
18398 rm -f conftest*
18400 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18401 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18402 #define _XOPEN_SOURCE_EXTENDED 1
18403 #include <errno.h>
18404 /* The following two lines are a workaround against an autoconf-2.52 bug. */
18405 #include <stdio.h>
18406 #include <stdlib.h>
18407 "; then :
18415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18416 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18417 case $gl_cv_header_errno_h_EOVERFLOW in
18418 yes | no)
18419 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18422 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18424 esac
18438 GNULIB_FCNTL=0;
18439 GNULIB_NONBLOCKING=0;
18440 GNULIB_OPEN=0;
18441 GNULIB_OPENAT=0;
18442 HAVE_FCNTL=1;
18443 HAVE_OPENAT=1;
18444 REPLACE_FCNTL=0;
18445 REPLACE_OPEN=0;
18446 REPLACE_OPENAT=0;
18451 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18452 if test "x$ac_cv_type_mode_t" = x""yes; then :
18454 else
18456 cat >>confdefs.h <<_ACEOF
18457 #define mode_t int
18458 _ACEOF
18462 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18463 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18464 ac_have_decl=1
18465 else
18466 ac_have_decl=0
18469 cat >>confdefs.h <<_ACEOF
18470 #define HAVE_DECL_FDATASYNC $ac_have_decl
18471 _ACEOF
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18476 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18477 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18478 $as_echo_n "(cached) " >&6
18479 else
18480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18481 /* end confdefs.h. */
18483 #include <sys/types.h>
18484 #include <sys/stat.h>
18486 main ()
18488 struct stat s; s.st_dm_mode;
18490 return 0;
18492 _ACEOF
18493 if ac_fn_c_try_compile "$LINENO"; then :
18494 ac_cv_struct_st_dm_mode=yes
18495 else
18496 ac_cv_struct_st_dm_mode=no
18498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18501 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18503 if test $ac_cv_struct_st_dm_mode = yes; then
18505 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18510 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18511 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18512 ac_have_decl=1
18513 else
18514 ac_have_decl=0
18517 cat >>confdefs.h <<_ACEOF
18518 #define HAVE_DECL_STRMODE $ac_have_decl
18519 _ACEOF
18526 GNULIB_FCHMODAT=0;
18527 GNULIB_FSTAT=0;
18528 GNULIB_FSTATAT=0;
18529 GNULIB_FUTIMENS=0;
18530 GNULIB_LCHMOD=0;
18531 GNULIB_LSTAT=0;
18532 GNULIB_MKDIRAT=0;
18533 GNULIB_MKFIFO=0;
18534 GNULIB_MKFIFOAT=0;
18535 GNULIB_MKNOD=0;
18536 GNULIB_MKNODAT=0;
18537 GNULIB_STAT=0;
18538 GNULIB_UTIMENSAT=0;
18539 HAVE_FCHMODAT=1;
18540 HAVE_FSTATAT=1;
18541 HAVE_FUTIMENS=1;
18542 HAVE_LCHMOD=1;
18543 HAVE_LSTAT=1;
18544 HAVE_MKDIRAT=1;
18545 HAVE_MKFIFO=1;
18546 HAVE_MKFIFOAT=1;
18547 HAVE_MKNOD=1;
18548 HAVE_MKNODAT=1;
18549 HAVE_UTIMENSAT=1;
18550 REPLACE_FSTAT=0;
18551 REPLACE_FSTATAT=0;
18552 REPLACE_FUTIMENS=0;
18553 REPLACE_LSTAT=0;
18554 REPLACE_MKDIR=0;
18555 REPLACE_MKFIFO=0;
18556 REPLACE_MKNOD=0;
18557 REPLACE_STAT=0;
18558 REPLACE_UTIMENSAT=0;
18561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18562 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18563 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18564 $as_echo_n "(cached) " >&6
18565 else
18566 rm -f conftest.sym conftest.file
18567 echo >conftest.file
18568 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18569 if test "$cross_compiling" = yes; then :
18570 case "$host_os" in
18571 # Guess yes on glibc systems.
18572 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18573 # If we don't know, assume the worst.
18574 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18575 esac
18577 else
18578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h. */
18580 $ac_includes_default
18582 main ()
18584 struct stat sbuf;
18585 /* Linux will dereference the symlink and fail, as required by
18586 POSIX. That is better in the sense that it means we will not
18587 have to compile and use the lstat wrapper. */
18588 return lstat ("conftest.sym/", &sbuf) == 0;
18591 return 0;
18593 _ACEOF
18594 if ac_fn_c_try_run "$LINENO"; then :
18595 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18596 else
18597 gl_cv_func_lstat_dereferences_slashed_symlink=no
18599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18600 conftest.$ac_objext conftest.beam conftest.$ac_ext
18603 else
18604 # If the 'ln -s' command failed, then we probably don't even
18605 # have an lstat function.
18606 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18608 rm -f conftest.sym conftest.file
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18612 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18613 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18614 *yes)
18616 cat >>confdefs.h <<_ACEOF
18617 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18618 _ACEOF
18621 esac
18628 GNULIB__EXIT=0;
18629 GNULIB_ATOLL=0;
18630 GNULIB_CALLOC_POSIX=0;
18631 GNULIB_CANONICALIZE_FILE_NAME=0;
18632 GNULIB_GETLOADAVG=0;
18633 GNULIB_GETSUBOPT=0;
18634 GNULIB_GRANTPT=0;
18635 GNULIB_MALLOC_POSIX=0;
18636 GNULIB_MBTOWC=0;
18637 GNULIB_MKDTEMP=0;
18638 GNULIB_MKOSTEMP=0;
18639 GNULIB_MKOSTEMPS=0;
18640 GNULIB_MKSTEMP=0;
18641 GNULIB_MKSTEMPS=0;
18642 GNULIB_POSIX_OPENPT=0;
18643 GNULIB_PTSNAME=0;
18644 GNULIB_PTSNAME_R=0;
18645 GNULIB_PUTENV=0;
18646 GNULIB_RANDOM=0;
18647 GNULIB_RANDOM_R=0;
18648 GNULIB_REALLOC_POSIX=0;
18649 GNULIB_REALPATH=0;
18650 GNULIB_RPMATCH=0;
18651 GNULIB_SECURE_GETENV=0;
18652 GNULIB_SETENV=0;
18653 GNULIB_STRTOD=0;
18654 GNULIB_STRTOLL=0;
18655 GNULIB_STRTOULL=0;
18656 GNULIB_SYSTEM_POSIX=0;
18657 GNULIB_UNLOCKPT=0;
18658 GNULIB_UNSETENV=0;
18659 GNULIB_WCTOMB=0;
18660 HAVE__EXIT=1;
18661 HAVE_ATOLL=1;
18662 HAVE_CANONICALIZE_FILE_NAME=1;
18663 HAVE_DECL_GETLOADAVG=1;
18664 HAVE_GETSUBOPT=1;
18665 HAVE_GRANTPT=1;
18666 HAVE_MKDTEMP=1;
18667 HAVE_MKOSTEMP=1;
18668 HAVE_MKOSTEMPS=1;
18669 HAVE_MKSTEMP=1;
18670 HAVE_MKSTEMPS=1;
18671 HAVE_POSIX_OPENPT=1;
18672 HAVE_PTSNAME=1;
18673 HAVE_PTSNAME_R=1;
18674 HAVE_RANDOM=1;
18675 HAVE_RANDOM_H=1;
18676 HAVE_RANDOM_R=1;
18677 HAVE_REALPATH=1;
18678 HAVE_RPMATCH=1;
18679 HAVE_SECURE_GETENV=1;
18680 HAVE_SETENV=1;
18681 HAVE_DECL_SETENV=1;
18682 HAVE_STRTOD=1;
18683 HAVE_STRTOLL=1;
18684 HAVE_STRTOULL=1;
18685 HAVE_STRUCT_RANDOM_DATA=1;
18686 HAVE_SYS_LOADAVG_H=0;
18687 HAVE_UNLOCKPT=1;
18688 HAVE_DECL_UNSETENV=1;
18689 REPLACE_CALLOC=0;
18690 REPLACE_CANONICALIZE_FILE_NAME=0;
18691 REPLACE_MALLOC=0;
18692 REPLACE_MBTOWC=0;
18693 REPLACE_MKSTEMP=0;
18694 REPLACE_PTSNAME=0;
18695 REPLACE_PTSNAME_R=0;
18696 REPLACE_PUTENV=0;
18697 REPLACE_RANDOM_R=0;
18698 REPLACE_REALLOC=0;
18699 REPLACE_REALPATH=0;
18700 REPLACE_SETENV=0;
18701 REPLACE_STRTOD=0;
18702 REPLACE_UNSETENV=0;
18703 REPLACE_WCTOMB=0;
18720 if test $gl_cv_have_include_next = yes; then
18721 gl_cv_next_getopt_h='<'getopt.h'>'
18722 else
18723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18724 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18725 if test "${gl_cv_next_getopt_h+set}" = set; then :
18726 $as_echo_n "(cached) " >&6
18727 else
18729 if test $ac_cv_header_getopt_h = yes; then
18732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18733 /* end confdefs.h. */
18734 #include <getopt.h>
18736 _ACEOF
18737 case "$host_os" in
18738 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18739 *) gl_absname_cpp="$ac_cpp" ;;
18740 esac
18742 case "$host_os" in
18743 mingw*)
18744 gl_dirsep_regex='[/\\]'
18747 gl_dirsep_regex='\/'
18749 esac
18750 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18752 gl_header_literal_regex=`echo 'getopt.h' \
18753 | sed -e "$gl_make_literal_regex_sed"`
18754 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18755 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18756 s|^/[^/]|//&|
18760 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18761 sed -n "$gl_absolute_header_sed"`'"'
18762 else
18763 gl_cv_next_getopt_h='<'getopt.h'>'
18768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18769 $as_echo "$gl_cv_next_getopt_h" >&6; }
18771 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18773 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18775 gl_next_as_first_directive='<'getopt.h'>'
18776 else
18777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18778 gl_next_as_first_directive=$gl_cv_next_getopt_h
18780 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18785 if test $ac_cv_header_getopt_h = yes; then
18786 HAVE_GETOPT_H=1
18787 else
18788 HAVE_GETOPT_H=0
18792 gl_replace_getopt=
18794 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18795 for ac_header in getopt.h
18796 do :
18797 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18798 if test "x$ac_cv_header_getopt_h" = x""yes; then :
18799 cat >>confdefs.h <<_ACEOF
18800 #define HAVE_GETOPT_H 1
18801 _ACEOF
18803 else
18804 gl_replace_getopt=yes
18807 done
18811 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18812 for ac_func in getopt_long_only
18813 do :
18814 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18815 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18816 cat >>confdefs.h <<_ACEOF
18817 #define HAVE_GETOPT_LONG_ONLY 1
18818 _ACEOF
18820 else
18821 gl_replace_getopt=yes
18823 done
18827 if test -z "$gl_replace_getopt"; then
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18829 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18830 if test "${gl_cv_func_getopt_posix+set}" = set; then :
18831 $as_echo_n "(cached) " >&6
18832 else
18834 if test $cross_compiling = no; then
18835 if test "$cross_compiling" = yes; then :
18836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18837 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18838 as_fn_error "cannot run test program while cross compiling
18839 See \`config.log' for more details." "$LINENO" 5; }
18840 else
18841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18842 /* end confdefs.h. */
18844 #include <unistd.h>
18845 #include <stdlib.h>
18846 #include <string.h>
18849 main ()
18851 static char program[] = "program";
18852 static char a[] = "-a";
18853 static char foo[] = "foo";
18854 static char bar[] = "bar";
18855 char *argv[] = { program, a, foo, bar, NULL };
18856 int c;
18858 c = getopt (4, argv, "ab");
18859 if (!(c == 'a'))
18860 return 1;
18861 c = getopt (4, argv, "ab");
18862 if (!(c == -1))
18863 return 2;
18864 if (!(optind == 2))
18865 return 3;
18866 return 0;
18869 _ACEOF
18870 if ac_fn_c_try_run "$LINENO"; then :
18871 gl_cv_func_getopt_posix=maybe
18872 else
18873 gl_cv_func_getopt_posix=no
18875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18876 conftest.$ac_objext conftest.beam conftest.$ac_ext
18879 if test $gl_cv_func_getopt_posix = maybe; then
18880 if test "$cross_compiling" = yes; then :
18881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18882 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18883 as_fn_error "cannot run test program while cross compiling
18884 See \`config.log' for more details." "$LINENO" 5; }
18885 else
18886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18887 /* end confdefs.h. */
18889 #include <unistd.h>
18890 #include <stdlib.h>
18891 #include <string.h>
18894 main ()
18896 static char program[] = "program";
18897 static char donald[] = "donald";
18898 static char p[] = "-p";
18899 static char billy[] = "billy";
18900 static char duck[] = "duck";
18901 static char a[] = "-a";
18902 static char bar[] = "bar";
18903 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18904 int c;
18906 c = getopt (7, argv, "+abp:q:");
18907 if (!(c == -1))
18908 return 4;
18909 if (!(strcmp (argv[0], "program") == 0))
18910 return 5;
18911 if (!(strcmp (argv[1], "donald") == 0))
18912 return 6;
18913 if (!(strcmp (argv[2], "-p") == 0))
18914 return 7;
18915 if (!(strcmp (argv[3], "billy") == 0))
18916 return 8;
18917 if (!(strcmp (argv[4], "duck") == 0))
18918 return 9;
18919 if (!(strcmp (argv[5], "-a") == 0))
18920 return 10;
18921 if (!(strcmp (argv[6], "bar") == 0))
18922 return 11;
18923 if (!(optind == 1))
18924 return 12;
18925 return 0;
18928 _ACEOF
18929 if ac_fn_c_try_run "$LINENO"; then :
18930 gl_cv_func_getopt_posix=maybe
18931 else
18932 gl_cv_func_getopt_posix=no
18934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18935 conftest.$ac_objext conftest.beam conftest.$ac_ext
18939 if test $gl_cv_func_getopt_posix = maybe; then
18940 if test "$cross_compiling" = yes; then :
18941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18942 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18943 as_fn_error "cannot run test program while cross compiling
18944 See \`config.log' for more details." "$LINENO" 5; }
18945 else
18946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18947 /* end confdefs.h. */
18949 #include <unistd.h>
18950 #include <stdlib.h>
18951 #include <string.h>
18954 main ()
18956 static char program[] = "program";
18957 static char ab[] = "-ab";
18958 char *argv[3] = { program, ab, NULL };
18959 if (getopt (2, argv, "ab:") != 'a')
18960 return 13;
18961 if (getopt (2, argv, "ab:") != '?')
18962 return 14;
18963 if (optopt != 'b')
18964 return 15;
18965 if (optind != 2)
18966 return 16;
18967 return 0;
18970 _ACEOF
18971 if ac_fn_c_try_run "$LINENO"; then :
18972 gl_cv_func_getopt_posix=yes
18973 else
18974 gl_cv_func_getopt_posix=no
18976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18977 conftest.$ac_objext conftest.beam conftest.$ac_ext
18981 else
18982 case "$host_os" in
18983 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18984 *) gl_cv_func_getopt_posix="guessing yes";;
18985 esac
18989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18990 $as_echo "$gl_cv_func_getopt_posix" >&6; }
18991 case "$gl_cv_func_getopt_posix" in
18992 *no) gl_replace_getopt=yes ;;
18993 esac
18996 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18998 $as_echo_n "checking for working GNU getopt function... " >&6; }
18999 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19000 $as_echo_n "(cached) " >&6
19001 else
19002 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19003 # optstring is necessary for programs like m4 that have POSIX-mandated
19004 # semantics for supporting options interspersed with files.
19005 # Also, since getopt_long is a GNU extension, we require optind=0.
19006 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19007 # so take care to revert to the correct (non-)export state.
19008 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19009 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19010 xx) gl_had_POSIXLY_CORRECT=exported ;;
19011 x) gl_had_POSIXLY_CORRECT=yes ;;
19012 *) gl_had_POSIXLY_CORRECT= ;;
19013 esac
19014 POSIXLY_CORRECT=1
19015 export POSIXLY_CORRECT
19016 if test "$cross_compiling" = yes; then :
19017 gl_cv_func_getopt_gnu="guessing no"
19019 else
19020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19021 /* end confdefs.h. */
19022 #include <getopt.h>
19023 #include <stddef.h>
19024 #include <string.h>
19026 #include <stdlib.h>
19027 #if defined __MACH__ && defined __APPLE__
19028 /* Avoid a crash on Mac OS X. */
19029 #include <mach/mach.h>
19030 #include <mach/mach_error.h>
19031 #include <mach/thread_status.h>
19032 #include <mach/exception.h>
19033 #include <mach/task.h>
19034 #include <pthread.h>
19035 /* The exception port on which our thread listens. */
19036 static mach_port_t our_exception_port;
19037 /* The main function of the thread listening for exceptions of type
19038 EXC_BAD_ACCESS. */
19039 static void *
19040 mach_exception_thread (void *arg)
19042 /* Buffer for a message to be received. */
19043 struct {
19044 mach_msg_header_t head;
19045 mach_msg_body_t msgh_body;
19046 char data[1024];
19047 } msg;
19048 mach_msg_return_t retval;
19049 /* Wait for a message on the exception port. */
19050 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19051 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19052 if (retval != MACH_MSG_SUCCESS)
19053 abort ();
19054 exit (1);
19056 static void
19057 nocrash_init (void)
19059 mach_port_t self = mach_task_self ();
19060 /* Allocate a port on which the thread shall listen for exceptions. */
19061 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19062 == KERN_SUCCESS) {
19063 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19064 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19065 MACH_MSG_TYPE_MAKE_SEND)
19066 == KERN_SUCCESS) {
19067 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19068 for us. */
19069 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19070 /* Create the thread listening on the exception port. */
19071 pthread_attr_t attr;
19072 pthread_t thread;
19073 if (pthread_attr_init (&attr) == 0
19074 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19075 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19076 pthread_attr_destroy (&attr);
19077 /* Replace the exception port info for these exceptions with our own.
19078 Note that we replace the exception port for the entire task, not only
19079 for a particular thread. This has the effect that when our exception
19080 port gets the message, the thread specific exception port has already
19081 been asked, and we don't need to bother about it.
19082 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19083 task_set_exception_ports (self, mask, our_exception_port,
19084 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19089 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19090 /* Avoid a crash on native Windows. */
19091 #define WIN32_LEAN_AND_MEAN
19092 #include <windows.h>
19093 #include <winerror.h>
19094 static LONG WINAPI
19095 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19097 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19099 case EXCEPTION_ACCESS_VIOLATION:
19100 case EXCEPTION_IN_PAGE_ERROR:
19101 case EXCEPTION_STACK_OVERFLOW:
19102 case EXCEPTION_GUARD_PAGE:
19103 case EXCEPTION_PRIV_INSTRUCTION:
19104 case EXCEPTION_ILLEGAL_INSTRUCTION:
19105 case EXCEPTION_DATATYPE_MISALIGNMENT:
19106 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19107 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19108 exit (1);
19110 return EXCEPTION_CONTINUE_SEARCH;
19112 static void
19113 nocrash_init (void)
19115 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19117 #else
19118 /* Avoid a crash on POSIX systems. */
19119 #include <signal.h>
19120 /* A POSIX signal handler. */
19121 static void
19122 exception_handler (int sig)
19124 exit (1);
19126 static void
19127 nocrash_init (void)
19129 #ifdef SIGSEGV
19130 signal (SIGSEGV, exception_handler);
19131 #endif
19132 #ifdef SIGBUS
19133 signal (SIGBUS, exception_handler);
19134 #endif
19136 #endif
19140 main ()
19143 int result = 0;
19145 nocrash_init();
19147 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19148 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19149 OSF/1 5.1, Solaris 10. */
19151 static char conftest[] = "conftest";
19152 static char plus[] = "-+";
19153 char *argv[3] = { conftest, plus, NULL };
19154 opterr = 0;
19155 if (getopt (2, argv, "+a") != '?')
19156 result |= 1;
19158 /* This code succeeds on glibc 2.8, mingw,
19159 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19160 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19162 static char program[] = "program";
19163 static char p[] = "-p";
19164 static char foo[] = "foo";
19165 static char bar[] = "bar";
19166 char *argv[] = { program, p, foo, bar, NULL };
19168 optind = 1;
19169 if (getopt (4, argv, "p::") != 'p')
19170 result |= 2;
19171 else if (optarg != NULL)
19172 result |= 4;
19173 else if (getopt (4, argv, "p::") != -1)
19174 result |= 6;
19175 else if (optind != 2)
19176 result |= 8;
19178 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19180 static char program[] = "program";
19181 static char foo[] = "foo";
19182 static char p[] = "-p";
19183 char *argv[] = { program, foo, p, NULL };
19184 optind = 0;
19185 if (getopt (3, argv, "-p") != 1)
19186 result |= 16;
19187 else if (getopt (3, argv, "-p") != 'p')
19188 result |= 16;
19190 /* This code fails on glibc 2.11. */
19192 static char program[] = "program";
19193 static char b[] = "-b";
19194 static char a[] = "-a";
19195 char *argv[] = { program, b, a, NULL };
19196 optind = opterr = 0;
19197 if (getopt (3, argv, "+:a:b") != 'b')
19198 result |= 32;
19199 else if (getopt (3, argv, "+:a:b") != ':')
19200 result |= 32;
19202 /* This code dumps core on glibc 2.14. */
19204 static char program[] = "program";
19205 static char w[] = "-W";
19206 static char dummy[] = "dummy";
19207 char *argv[] = { program, w, dummy, NULL };
19208 optind = opterr = 1;
19209 if (getopt (3, argv, "W;") != 'W')
19210 result |= 64;
19212 return result;
19215 return 0;
19217 _ACEOF
19218 if ac_fn_c_try_run "$LINENO"; then :
19219 gl_cv_func_getopt_gnu=yes
19220 else
19221 gl_cv_func_getopt_gnu=no
19223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19224 conftest.$ac_objext conftest.beam conftest.$ac_ext
19227 case $gl_had_POSIXLY_CORRECT in
19228 exported) ;;
19229 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19230 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19231 esac
19234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19235 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
19236 if test "$gl_cv_func_getopt_gnu" != yes; then
19237 gl_replace_getopt=yes
19238 else
19239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19240 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
19241 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
19242 $as_echo_n "(cached) " >&6
19243 else
19244 if test "$cross_compiling" = yes; then :
19245 case "$host_os" in
19246 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19247 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19248 esac
19250 else
19251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19252 /* end confdefs.h. */
19253 #include <getopt.h>
19254 #include <stddef.h>
19255 #include <string.h>
19258 main ()
19260 static const struct option long_options[] =
19262 { "xtremely-",no_argument, NULL, 1003 },
19263 { "xtra", no_argument, NULL, 1001 },
19264 { "xtreme", no_argument, NULL, 1002 },
19265 { "xtremely", no_argument, NULL, 1003 },
19266 { NULL, 0, NULL, 0 }
19268 /* This code fails on OpenBSD 5.0. */
19270 static char program[] = "program";
19271 static char xtremel[] = "--xtremel";
19272 char *argv[] = { program, xtremel, NULL };
19273 int option_index;
19274 optind = 1; opterr = 0;
19275 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19276 return 1;
19278 return 0;
19281 return 0;
19283 _ACEOF
19284 if ac_fn_c_try_run "$LINENO"; then :
19285 gl_cv_func_getopt_long_gnu=yes
19286 else
19287 gl_cv_func_getopt_long_gnu=no
19289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19290 conftest.$ac_objext conftest.beam conftest.$ac_ext
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19296 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19297 case "$gl_cv_func_getopt_long_gnu" in
19298 *yes) ;;
19299 *) gl_replace_getopt=yes ;;
19300 esac
19309 REPLACE_GETOPT=0
19310 if test -n "$gl_replace_getopt"; then
19311 REPLACE_GETOPT=1
19314 if test $REPLACE_GETOPT = 1; then
19316 GETOPT_H=getopt.h
19318 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19324 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19325 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19326 ac_have_decl=1
19327 else
19328 ac_have_decl=0
19331 cat >>confdefs.h <<_ACEOF
19332 #define HAVE_DECL_GETENV $ac_have_decl
19333 _ACEOF
19340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19341 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19342 if test "${ac_cv_c_restrict+set}" = set; then :
19343 $as_echo_n "(cached) " >&6
19344 else
19345 ac_cv_c_restrict=no
19346 # The order here caters to the fact that C++ does not require restrict.
19347 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19349 /* end confdefs.h. */
19350 typedef int * int_ptr;
19351 int foo (int_ptr $ac_kw ip) {
19352 return ip[0];
19355 main ()
19357 int s[1];
19358 int * $ac_kw t = s;
19359 t[0] = 0;
19360 return foo(t)
19362 return 0;
19364 _ACEOF
19365 if ac_fn_c_try_compile "$LINENO"; then :
19366 ac_cv_c_restrict=$ac_kw
19368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19369 test "$ac_cv_c_restrict" != no && break
19370 done
19373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19374 $as_echo "$ac_cv_c_restrict" >&6; }
19376 case $ac_cv_c_restrict in
19377 restrict) ;;
19378 no) $as_echo "#define restrict /**/" >>confdefs.h
19380 *) cat >>confdefs.h <<_ACEOF
19381 #define restrict $ac_cv_c_restrict
19382 _ACEOF
19384 esac
19387 GNULIB_GETTIMEOFDAY=0;
19388 HAVE_GETTIMEOFDAY=1;
19389 HAVE_STRUCT_TIMEVAL=1;
19390 HAVE_SYS_TIME_H=1;
19391 REPLACE_GETTIMEOFDAY=0;
19392 REPLACE_STRUCT_TIMEVAL=0;
19409 if test $gl_cv_have_include_next = yes; then
19410 gl_cv_next_sys_time_h='<'sys/time.h'>'
19411 else
19412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19413 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19414 if test "${gl_cv_next_sys_time_h+set}" = set; then :
19415 $as_echo_n "(cached) " >&6
19416 else
19418 if test $ac_cv_header_sys_time_h = yes; then
19421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19422 /* end confdefs.h. */
19423 #include <sys/time.h>
19425 _ACEOF
19426 case "$host_os" in
19427 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19428 *) gl_absname_cpp="$ac_cpp" ;;
19429 esac
19431 case "$host_os" in
19432 mingw*)
19433 gl_dirsep_regex='[/\\]'
19436 gl_dirsep_regex='\/'
19438 esac
19439 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19441 gl_header_literal_regex=`echo 'sys/time.h' \
19442 | sed -e "$gl_make_literal_regex_sed"`
19443 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19444 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19445 s|^/[^/]|//&|
19449 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19450 sed -n "$gl_absolute_header_sed"`'"'
19451 else
19452 gl_cv_next_sys_time_h='<'sys/time.h'>'
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19458 $as_echo "$gl_cv_next_sys_time_h" >&6; }
19460 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
19462 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19463 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19464 gl_next_as_first_directive='<'sys/time.h'>'
19465 else
19466 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19467 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19469 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
19475 if test $ac_cv_header_sys_time_h != yes; then
19476 HAVE_SYS_TIME_H=0
19483 if test $ac_cv_header_sys_socket_h != yes; then
19484 for ac_header in winsock2.h
19485 do :
19486 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19487 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19488 cat >>confdefs.h <<_ACEOF
19489 #define HAVE_WINSOCK2_H 1
19490 _ACEOF
19494 done
19497 if test "$ac_cv_header_winsock2_h" = yes; then
19498 HAVE_WINSOCK2_H=1
19499 UNISTD_H_HAVE_WINSOCK2_H=1
19500 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19501 else
19502 HAVE_WINSOCK2_H=0
19506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19507 $as_echo_n "checking for struct timeval... " >&6; }
19508 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19509 $as_echo_n "(cached) " >&6
19510 else
19511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19512 /* end confdefs.h. */
19513 #if HAVE_SYS_TIME_H
19514 #include <sys/time.h>
19515 #endif
19516 #include <time.h>
19517 #if HAVE_WINSOCK2_H
19518 # include <winsock2.h>
19519 #endif
19522 main ()
19524 static struct timeval x; x.tv_sec = x.tv_usec;
19526 return 0;
19528 _ACEOF
19529 if ac_fn_c_try_compile "$LINENO"; then :
19530 gl_cv_sys_struct_timeval=yes
19531 else
19532 gl_cv_sys_struct_timeval=no
19534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19538 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
19539 if test $gl_cv_sys_struct_timeval != yes; then
19540 HAVE_STRUCT_TIMEVAL=0
19541 else
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19543 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19544 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19545 $as_echo_n "(cached) " >&6
19546 else
19547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19548 /* end confdefs.h. */
19549 #if HAVE_SYS_TIME_H
19550 #include <sys/time.h>
19551 #endif
19552 #include <time.h>
19553 #if HAVE_WINSOCK2_H
19554 # include <winsock2.h>
19555 #endif
19558 main ()
19560 static struct timeval x;
19561 typedef int verify_tv_sec_type[
19562 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19566 return 0;
19568 _ACEOF
19569 if ac_fn_c_try_compile "$LINENO"; then :
19570 gl_cv_sys_struct_timeval_tv_sec=yes
19571 else
19572 gl_cv_sys_struct_timeval_tv_sec=no
19574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19578 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19579 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19580 REPLACE_STRUCT_TIMEVAL=1
19590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19591 $as_echo_n "checking for unsigned long long int... " >&6; }
19592 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19593 $as_echo_n "(cached) " >&6
19594 else
19595 ac_cv_type_unsigned_long_long_int=yes
19596 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19598 /* end confdefs.h. */
19600 /* For now, do not test the preprocessor; as of 2007 there are too many
19601 implementations with broken preprocessors. Perhaps this can
19602 be revisited in 2012. In the meantime, code should not expect
19603 #if to work with literals wider than 32 bits. */
19604 /* Test literals. */
19605 long long int ll = 9223372036854775807ll;
19606 long long int nll = -9223372036854775807LL;
19607 unsigned long long int ull = 18446744073709551615ULL;
19608 /* Test constant expressions. */
19609 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19610 ? 1 : -1)];
19611 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19612 ? 1 : -1)];
19613 int i = 63;
19615 main ()
19617 /* Test availability of runtime routines for shift and division. */
19618 long long int llmax = 9223372036854775807ll;
19619 unsigned long long int ullmax = 18446744073709551615ull;
19620 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19621 | (llmax / ll) | (llmax % ll)
19622 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19623 | (ullmax / ull) | (ullmax % ull));
19625 return 0;
19628 _ACEOF
19629 if ac_fn_c_try_link "$LINENO"; then :
19631 else
19632 ac_cv_type_unsigned_long_long_int=no
19634 rm -f core conftest.err conftest.$ac_objext \
19635 conftest$ac_exeext conftest.$ac_ext
19638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19639 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19640 if test $ac_cv_type_unsigned_long_long_int = yes; then
19642 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19649 $as_echo_n "checking for long long int... " >&6; }
19650 if test "${ac_cv_type_long_long_int+set}" = set; then :
19651 $as_echo_n "(cached) " >&6
19652 else
19653 ac_cv_type_long_long_int=yes
19654 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19655 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19656 if test $ac_cv_type_long_long_int = yes; then
19657 if test "$cross_compiling" = yes; then :
19659 else
19660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19661 /* end confdefs.h. */
19662 #include <limits.h>
19663 #ifndef LLONG_MAX
19664 # define HALF \
19665 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19666 # define LLONG_MAX (HALF - 1 + HALF)
19667 #endif
19669 main ()
19671 long long int n = 1;
19672 int i;
19673 for (i = 0; ; i++)
19675 long long int m = n << i;
19676 if (m >> i != n)
19677 return 1;
19678 if (LLONG_MAX / 2 < m)
19679 break;
19681 return 0;
19683 return 0;
19685 _ACEOF
19686 if ac_fn_c_try_run "$LINENO"; then :
19688 else
19689 ac_cv_type_long_long_int=no
19691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19692 conftest.$ac_objext conftest.beam conftest.$ac_ext
19698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19699 $as_echo "$ac_cv_type_long_long_int" >&6; }
19700 if test $ac_cv_type_long_long_int = yes; then
19702 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19711 gl_cv_c_multiarch=no
19712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19713 /* end confdefs.h. */
19714 #ifndef __APPLE_CC__
19715 not a universal capable compiler
19716 #endif
19717 typedef int dummy;
19719 _ACEOF
19720 if ac_fn_c_try_compile "$LINENO"; then :
19722 arch=
19723 prev=
19724 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19725 if test -n "$prev"; then
19726 case $word in
19727 i?86 | x86_64 | ppc | ppc64)
19728 if test -z "$arch" || test "$arch" = "$word"; then
19729 arch="$word"
19730 else
19731 gl_cv_c_multiarch=yes
19734 esac
19735 prev=
19736 else
19737 if test "x$word" = "x-arch"; then
19738 prev=arch
19741 done
19744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19745 if test $gl_cv_c_multiarch = yes; then
19746 APPLE_UNIVERSAL_BUILD=1
19747 else
19748 APPLE_UNIVERSAL_BUILD=0
19755 if test $ac_cv_type_long_long_int = yes; then
19756 HAVE_LONG_LONG_INT=1
19757 else
19758 HAVE_LONG_LONG_INT=0
19762 if test $ac_cv_type_unsigned_long_long_int = yes; then
19763 HAVE_UNSIGNED_LONG_LONG_INT=1
19764 else
19765 HAVE_UNSIGNED_LONG_LONG_INT=0
19770 if test $ac_cv_header_wchar_h = yes; then
19771 HAVE_WCHAR_H=1
19772 else
19773 HAVE_WCHAR_H=0
19777 if test $ac_cv_header_inttypes_h = yes; then
19778 HAVE_INTTYPES_H=1
19779 else
19780 HAVE_INTTYPES_H=0
19784 if test $ac_cv_header_sys_types_h = yes; then
19785 HAVE_SYS_TYPES_H=1
19786 else
19787 HAVE_SYS_TYPES_H=0
19800 if test $gl_cv_have_include_next = yes; then
19801 gl_cv_next_stdint_h='<'stdint.h'>'
19802 else
19803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19804 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19805 if test "${gl_cv_next_stdint_h+set}" = set; then :
19806 $as_echo_n "(cached) " >&6
19807 else
19809 if test $ac_cv_header_stdint_h = yes; then
19812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19813 /* end confdefs.h. */
19814 #include <stdint.h>
19816 _ACEOF
19817 case "$host_os" in
19818 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19819 *) gl_absname_cpp="$ac_cpp" ;;
19820 esac
19822 case "$host_os" in
19823 mingw*)
19824 gl_dirsep_regex='[/\\]'
19827 gl_dirsep_regex='\/'
19829 esac
19830 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19832 gl_header_literal_regex=`echo 'stdint.h' \
19833 | sed -e "$gl_make_literal_regex_sed"`
19834 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19835 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19836 s|^/[^/]|//&|
19840 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19841 sed -n "$gl_absolute_header_sed"`'"'
19842 else
19843 gl_cv_next_stdint_h='<'stdint.h'>'
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19849 $as_echo "$gl_cv_next_stdint_h" >&6; }
19851 NEXT_STDINT_H=$gl_cv_next_stdint_h
19853 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19854 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19855 gl_next_as_first_directive='<'stdint.h'>'
19856 else
19857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19858 gl_next_as_first_directive=$gl_cv_next_stdint_h
19860 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19865 if test $ac_cv_header_stdint_h = yes; then
19866 HAVE_STDINT_H=1
19867 else
19868 HAVE_STDINT_H=0
19872 if test $ac_cv_header_stdint_h = yes; then
19873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19874 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19875 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
19876 $as_echo_n "(cached) " >&6
19877 else
19878 gl_cv_header_working_stdint_h=no
19879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19880 /* end confdefs.h. */
19883 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19884 #include <stdint.h>
19885 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19886 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
19887 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19888 #endif
19891 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19892 included before <wchar.h>. */
19893 #include <stddef.h>
19894 #include <signal.h>
19895 #if HAVE_WCHAR_H
19896 # include <stdio.h>
19897 # include <time.h>
19898 # include <wchar.h>
19899 #endif
19902 #ifdef INT8_MAX
19903 int8_t a1 = INT8_MAX;
19904 int8_t a1min = INT8_MIN;
19905 #endif
19906 #ifdef INT16_MAX
19907 int16_t a2 = INT16_MAX;
19908 int16_t a2min = INT16_MIN;
19909 #endif
19910 #ifdef INT32_MAX
19911 int32_t a3 = INT32_MAX;
19912 int32_t a3min = INT32_MIN;
19913 #endif
19914 #ifdef INT64_MAX
19915 int64_t a4 = INT64_MAX;
19916 int64_t a4min = INT64_MIN;
19917 #endif
19918 #ifdef UINT8_MAX
19919 uint8_t b1 = UINT8_MAX;
19920 #else
19921 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19922 #endif
19923 #ifdef UINT16_MAX
19924 uint16_t b2 = UINT16_MAX;
19925 #endif
19926 #ifdef UINT32_MAX
19927 uint32_t b3 = UINT32_MAX;
19928 #endif
19929 #ifdef UINT64_MAX
19930 uint64_t b4 = UINT64_MAX;
19931 #endif
19932 int_least8_t c1 = INT8_C (0x7f);
19933 int_least8_t c1max = INT_LEAST8_MAX;
19934 int_least8_t c1min = INT_LEAST8_MIN;
19935 int_least16_t c2 = INT16_C (0x7fff);
19936 int_least16_t c2max = INT_LEAST16_MAX;
19937 int_least16_t c2min = INT_LEAST16_MIN;
19938 int_least32_t c3 = INT32_C (0x7fffffff);
19939 int_least32_t c3max = INT_LEAST32_MAX;
19940 int_least32_t c3min = INT_LEAST32_MIN;
19941 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19942 int_least64_t c4max = INT_LEAST64_MAX;
19943 int_least64_t c4min = INT_LEAST64_MIN;
19944 uint_least8_t d1 = UINT8_C (0xff);
19945 uint_least8_t d1max = UINT_LEAST8_MAX;
19946 uint_least16_t d2 = UINT16_C (0xffff);
19947 uint_least16_t d2max = UINT_LEAST16_MAX;
19948 uint_least32_t d3 = UINT32_C (0xffffffff);
19949 uint_least32_t d3max = UINT_LEAST32_MAX;
19950 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19951 uint_least64_t d4max = UINT_LEAST64_MAX;
19952 int_fast8_t e1 = INT_FAST8_MAX;
19953 int_fast8_t e1min = INT_FAST8_MIN;
19954 int_fast16_t e2 = INT_FAST16_MAX;
19955 int_fast16_t e2min = INT_FAST16_MIN;
19956 int_fast32_t e3 = INT_FAST32_MAX;
19957 int_fast32_t e3min = INT_FAST32_MIN;
19958 int_fast64_t e4 = INT_FAST64_MAX;
19959 int_fast64_t e4min = INT_FAST64_MIN;
19960 uint_fast8_t f1 = UINT_FAST8_MAX;
19961 uint_fast16_t f2 = UINT_FAST16_MAX;
19962 uint_fast32_t f3 = UINT_FAST32_MAX;
19963 uint_fast64_t f4 = UINT_FAST64_MAX;
19964 #ifdef INTPTR_MAX
19965 intptr_t g = INTPTR_MAX;
19966 intptr_t gmin = INTPTR_MIN;
19967 #endif
19968 #ifdef UINTPTR_MAX
19969 uintptr_t h = UINTPTR_MAX;
19970 #endif
19971 intmax_t i = INTMAX_MAX;
19972 uintmax_t j = UINTMAX_MAX;
19974 #include <limits.h> /* for CHAR_BIT */
19975 #define TYPE_MINIMUM(t) \
19976 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19977 #define TYPE_MAXIMUM(t) \
19978 ((t) ((t) 0 < (t) -1 \
19979 ? (t) -1 \
19980 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19981 struct s {
19982 int check_PTRDIFF:
19983 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19984 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19985 ? 1 : -1;
19986 /* Detect bug in FreeBSD 6.0 / ia64. */
19987 int check_SIG_ATOMIC:
19988 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19989 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19990 ? 1 : -1;
19991 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19992 int check_WCHAR:
19993 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19994 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19995 ? 1 : -1;
19996 /* Detect bug in mingw. */
19997 int check_WINT:
19998 WINT_MIN == TYPE_MINIMUM (wint_t)
19999 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20000 ? 1 : -1;
20002 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20003 int check_UINT8_C:
20004 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20005 int check_UINT16_C:
20006 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20008 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20009 #ifdef UINT8_MAX
20010 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20011 #endif
20012 #ifdef UINT16_MAX
20013 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20014 #endif
20015 #ifdef UINT32_MAX
20016 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20017 #endif
20018 #ifdef UINT64_MAX
20019 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20020 #endif
20021 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20022 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20023 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20024 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20025 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20026 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20027 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20028 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20029 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20030 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20031 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20035 main ()
20039 return 0;
20041 _ACEOF
20042 if ac_fn_c_try_compile "$LINENO"; then :
20043 if test "$cross_compiling" = yes; then :
20044 gl_cv_header_working_stdint_h=yes
20046 else
20047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20048 /* end confdefs.h. */
20051 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20052 #include <stdint.h>
20055 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20056 included before <wchar.h>. */
20057 #include <stddef.h>
20058 #include <signal.h>
20059 #if HAVE_WCHAR_H
20060 # include <stdio.h>
20061 # include <time.h>
20062 # include <wchar.h>
20063 #endif
20066 #include <stdio.h>
20067 #include <string.h>
20068 #define MVAL(macro) MVAL1(macro)
20069 #define MVAL1(expression) #expression
20070 static const char *macro_values[] =
20072 #ifdef INT8_MAX
20073 MVAL (INT8_MAX),
20074 #endif
20075 #ifdef INT16_MAX
20076 MVAL (INT16_MAX),
20077 #endif
20078 #ifdef INT32_MAX
20079 MVAL (INT32_MAX),
20080 #endif
20081 #ifdef INT64_MAX
20082 MVAL (INT64_MAX),
20083 #endif
20084 #ifdef UINT8_MAX
20085 MVAL (UINT8_MAX),
20086 #endif
20087 #ifdef UINT16_MAX
20088 MVAL (UINT16_MAX),
20089 #endif
20090 #ifdef UINT32_MAX
20091 MVAL (UINT32_MAX),
20092 #endif
20093 #ifdef UINT64_MAX
20094 MVAL (UINT64_MAX),
20095 #endif
20096 NULL
20100 main ()
20103 const char **mv;
20104 for (mv = macro_values; *mv != NULL; mv++)
20106 const char *value = *mv;
20107 /* Test whether it looks like a cast expression. */
20108 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20109 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20110 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20111 || strncmp (value, "((int)"/*)*/, 6) == 0
20112 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20113 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20114 return mv - macro_values + 1;
20116 return 0;
20119 return 0;
20121 _ACEOF
20122 if ac_fn_c_try_run "$LINENO"; then :
20123 gl_cv_header_working_stdint_h=yes
20125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20126 conftest.$ac_objext conftest.beam conftest.$ac_ext
20131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20135 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20137 if test "$gl_cv_header_working_stdint_h" = yes; then
20138 STDINT_H=
20139 else
20140 for ac_header in sys/inttypes.h sys/bitypes.h
20141 do :
20142 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20143 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20144 eval as_val=\$$as_ac_Header
20145 if test "x$as_val" = x""yes; then :
20146 cat >>confdefs.h <<_ACEOF
20147 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20148 _ACEOF
20152 done
20154 if test $ac_cv_header_sys_inttypes_h = yes; then
20155 HAVE_SYS_INTTYPES_H=1
20156 else
20157 HAVE_SYS_INTTYPES_H=0
20160 if test $ac_cv_header_sys_bitypes_h = yes; then
20161 HAVE_SYS_BITYPES_H=1
20162 else
20163 HAVE_SYS_BITYPES_H=0
20169 if test $APPLE_UNIVERSAL_BUILD = 0; then
20172 for gltype in ptrdiff_t size_t ; do
20173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20174 $as_echo_n "checking for bit size of $gltype... " >&6; }
20175 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20176 $as_echo_n "(cached) " >&6
20177 else
20178 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20179 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20180 included before <wchar.h>. */
20181 #include <stddef.h>
20182 #include <signal.h>
20183 #if HAVE_WCHAR_H
20184 # include <stdio.h>
20185 # include <time.h>
20186 # include <wchar.h>
20187 #endif
20189 #include <limits.h>"; then :
20191 else
20192 result=unknown
20195 eval gl_cv_bitsizeof_${gltype}=\$result
20198 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20200 $as_echo "$ac_res" >&6; }
20201 eval result=\$gl_cv_bitsizeof_${gltype}
20202 if test $result = unknown; then
20203 result=0
20205 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20206 cat >>confdefs.h <<_ACEOF
20207 #define BITSIZEOF_${GLTYPE} $result
20208 _ACEOF
20210 eval BITSIZEOF_${GLTYPE}=\$result
20211 done
20217 for gltype in sig_atomic_t wchar_t wint_t ; do
20218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20219 $as_echo_n "checking for bit size of $gltype... " >&6; }
20220 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20221 $as_echo_n "(cached) " >&6
20222 else
20223 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20224 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20225 included before <wchar.h>. */
20226 #include <stddef.h>
20227 #include <signal.h>
20228 #if HAVE_WCHAR_H
20229 # include <stdio.h>
20230 # include <time.h>
20231 # include <wchar.h>
20232 #endif
20234 #include <limits.h>"; then :
20236 else
20237 result=unknown
20240 eval gl_cv_bitsizeof_${gltype}=\$result
20243 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20245 $as_echo "$ac_res" >&6; }
20246 eval result=\$gl_cv_bitsizeof_${gltype}
20247 if test $result = unknown; then
20248 result=0
20250 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20251 cat >>confdefs.h <<_ACEOF
20252 #define BITSIZEOF_${GLTYPE} $result
20253 _ACEOF
20255 eval BITSIZEOF_${GLTYPE}=\$result
20256 done
20261 for gltype in sig_atomic_t wchar_t wint_t ; do
20262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20263 $as_echo_n "checking whether $gltype is signed... " >&6; }
20264 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20265 $as_echo_n "(cached) " >&6
20266 else
20267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20268 /* end confdefs.h. */
20270 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20271 included before <wchar.h>. */
20272 #include <stddef.h>
20273 #include <signal.h>
20274 #if HAVE_WCHAR_H
20275 # include <stdio.h>
20276 # include <time.h>
20277 # include <wchar.h>
20278 #endif
20280 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20282 main ()
20286 return 0;
20288 _ACEOF
20289 if ac_fn_c_try_compile "$LINENO"; then :
20290 result=yes
20291 else
20292 result=no
20294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20295 eval gl_cv_type_${gltype}_signed=\$result
20298 eval ac_res=\$gl_cv_type_${gltype}_signed
20299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20300 $as_echo "$ac_res" >&6; }
20301 eval result=\$gl_cv_type_${gltype}_signed
20302 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20303 if test "$result" = yes; then
20304 cat >>confdefs.h <<_ACEOF
20305 #define HAVE_SIGNED_${GLTYPE} 1
20306 _ACEOF
20308 eval HAVE_SIGNED_${GLTYPE}=1
20309 else
20310 eval HAVE_SIGNED_${GLTYPE}=0
20312 done
20315 gl_cv_type_ptrdiff_t_signed=yes
20316 gl_cv_type_size_t_signed=no
20317 if test $APPLE_UNIVERSAL_BUILD = 0; then
20320 for gltype in ptrdiff_t size_t ; do
20321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20322 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20323 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20324 $as_echo_n "(cached) " >&6
20325 else
20326 eval gl_cv_type_${gltype}_suffix=no
20327 eval result=\$gl_cv_type_${gltype}_signed
20328 if test "$result" = yes; then
20329 glsufu=
20330 else
20331 glsufu=u
20333 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20334 case $glsuf in
20335 '') gltype1='int';;
20336 l) gltype1='long int';;
20337 ll) gltype1='long long int';;
20338 i64) gltype1='__int64';;
20339 u) gltype1='unsigned int';;
20340 ul) gltype1='unsigned long int';;
20341 ull) gltype1='unsigned long long int';;
20342 ui64)gltype1='unsigned __int64';;
20343 esac
20344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20345 /* end confdefs.h. */
20347 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20348 included before <wchar.h>. */
20349 #include <stddef.h>
20350 #include <signal.h>
20351 #if HAVE_WCHAR_H
20352 # include <stdio.h>
20353 # include <time.h>
20354 # include <wchar.h>
20355 #endif
20357 extern $gltype foo;
20358 extern $gltype1 foo;
20360 main ()
20364 return 0;
20366 _ACEOF
20367 if ac_fn_c_try_compile "$LINENO"; then :
20368 eval gl_cv_type_${gltype}_suffix=\$glsuf
20370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20371 eval result=\$gl_cv_type_${gltype}_suffix
20372 test "$result" != no && break
20373 done
20375 eval ac_res=\$gl_cv_type_${gltype}_suffix
20376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20377 $as_echo "$ac_res" >&6; }
20378 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20379 eval result=\$gl_cv_type_${gltype}_suffix
20380 test "$result" = no && result=
20381 eval ${GLTYPE}_SUFFIX=\$result
20382 cat >>confdefs.h <<_ACEOF
20383 #define ${GLTYPE}_SUFFIX $result
20384 _ACEOF
20386 done
20392 for gltype in sig_atomic_t wchar_t wint_t ; do
20393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20394 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20395 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20396 $as_echo_n "(cached) " >&6
20397 else
20398 eval gl_cv_type_${gltype}_suffix=no
20399 eval result=\$gl_cv_type_${gltype}_signed
20400 if test "$result" = yes; then
20401 glsufu=
20402 else
20403 glsufu=u
20405 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20406 case $glsuf in
20407 '') gltype1='int';;
20408 l) gltype1='long int';;
20409 ll) gltype1='long long int';;
20410 i64) gltype1='__int64';;
20411 u) gltype1='unsigned int';;
20412 ul) gltype1='unsigned long int';;
20413 ull) gltype1='unsigned long long int';;
20414 ui64)gltype1='unsigned __int64';;
20415 esac
20416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20417 /* end confdefs.h. */
20419 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20420 included before <wchar.h>. */
20421 #include <stddef.h>
20422 #include <signal.h>
20423 #if HAVE_WCHAR_H
20424 # include <stdio.h>
20425 # include <time.h>
20426 # include <wchar.h>
20427 #endif
20429 extern $gltype foo;
20430 extern $gltype1 foo;
20432 main ()
20436 return 0;
20438 _ACEOF
20439 if ac_fn_c_try_compile "$LINENO"; then :
20440 eval gl_cv_type_${gltype}_suffix=\$glsuf
20442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20443 eval result=\$gl_cv_type_${gltype}_suffix
20444 test "$result" != no && break
20445 done
20447 eval ac_res=\$gl_cv_type_${gltype}_suffix
20448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20449 $as_echo "$ac_res" >&6; }
20450 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20451 eval result=\$gl_cv_type_${gltype}_suffix
20452 test "$result" = no && result=
20453 eval ${GLTYPE}_SUFFIX=\$result
20454 cat >>confdefs.h <<_ACEOF
20455 #define ${GLTYPE}_SUFFIX $result
20456 _ACEOF
20458 done
20462 if test $BITSIZEOF_WINT_T -lt 32; then
20463 BITSIZEOF_WINT_T=32
20466 STDINT_H=stdint.h
20469 if test -n "$STDINT_H"; then
20470 GL_GENERATE_STDINT_H_TRUE=
20471 GL_GENERATE_STDINT_H_FALSE='#'
20472 else
20473 GL_GENERATE_STDINT_H_TRUE='#'
20474 GL_GENERATE_STDINT_H_FALSE=
20481 GNULIB_IMAXABS=0;
20482 GNULIB_IMAXDIV=0;
20483 GNULIB_STRTOIMAX=0;
20484 GNULIB_STRTOUMAX=0;
20485 HAVE_DECL_IMAXABS=1;
20486 HAVE_DECL_IMAXDIV=1;
20487 HAVE_DECL_STRTOIMAX=1;
20488 HAVE_DECL_STRTOUMAX=1;
20489 REPLACE_STRTOIMAX=0;
20490 INT32_MAX_LT_INTMAX_MAX=1;
20491 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20492 PRI_MACROS_BROKEN=0;
20493 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20494 UINT32_MAX_LT_UINTMAX_MAX=1;
20495 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20511 if test $gl_cv_have_include_next = yes; then
20512 gl_cv_next_inttypes_h='<'inttypes.h'>'
20513 else
20514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20515 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20516 if test "${gl_cv_next_inttypes_h+set}" = set; then :
20517 $as_echo_n "(cached) " >&6
20518 else
20520 if test $ac_cv_header_inttypes_h = yes; then
20523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20524 /* end confdefs.h. */
20525 #include <inttypes.h>
20527 _ACEOF
20528 case "$host_os" in
20529 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20530 *) gl_absname_cpp="$ac_cpp" ;;
20531 esac
20533 case "$host_os" in
20534 mingw*)
20535 gl_dirsep_regex='[/\\]'
20538 gl_dirsep_regex='\/'
20540 esac
20541 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20543 gl_header_literal_regex=`echo 'inttypes.h' \
20544 | sed -e "$gl_make_literal_regex_sed"`
20545 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20546 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20547 s|^/[^/]|//&|
20551 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20552 sed -n "$gl_absolute_header_sed"`'"'
20553 else
20554 gl_cv_next_inttypes_h='<'inttypes.h'>'
20559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20560 $as_echo "$gl_cv_next_inttypes_h" >&6; }
20562 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
20564 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20565 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20566 gl_next_as_first_directive='<'inttypes.h'>'
20567 else
20568 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20569 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20571 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
20583 case "$host_os" in
20584 mingw*)
20585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20586 $as_echo_n "checking for 64-bit off_t... " >&6; }
20587 if test "${gl_cv_type_off_t_64+set}" = set; then :
20588 $as_echo_n "(cached) " >&6
20589 else
20590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20591 /* end confdefs.h. */
20592 #include <sys/types.h>
20593 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20596 main ()
20600 return 0;
20602 _ACEOF
20603 if ac_fn_c_try_compile "$LINENO"; then :
20604 gl_cv_type_off_t_64=yes
20605 else
20606 gl_cv_type_off_t_64=no
20608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20612 $as_echo "$gl_cv_type_off_t_64" >&6; }
20613 if test $gl_cv_type_off_t_64 = no; then
20614 WINDOWS_64_BIT_OFF_T=1
20615 else
20616 WINDOWS_64_BIT_OFF_T=0
20618 WINDOWS_64_BIT_ST_SIZE=1
20621 WINDOWS_64_BIT_OFF_T=0
20622 WINDOWS_64_BIT_ST_SIZE=0
20624 esac
20629 GNULIB_FFSL=0;
20630 GNULIB_FFSLL=0;
20631 GNULIB_MEMCHR=0;
20632 GNULIB_MEMMEM=0;
20633 GNULIB_MEMPCPY=0;
20634 GNULIB_MEMRCHR=0;
20635 GNULIB_RAWMEMCHR=0;
20636 GNULIB_STPCPY=0;
20637 GNULIB_STPNCPY=0;
20638 GNULIB_STRCHRNUL=0;
20639 GNULIB_STRDUP=0;
20640 GNULIB_STRNCAT=0;
20641 GNULIB_STRNDUP=0;
20642 GNULIB_STRNLEN=0;
20643 GNULIB_STRPBRK=0;
20644 GNULIB_STRSEP=0;
20645 GNULIB_STRSTR=0;
20646 GNULIB_STRCASESTR=0;
20647 GNULIB_STRTOK_R=0;
20648 GNULIB_MBSLEN=0;
20649 GNULIB_MBSNLEN=0;
20650 GNULIB_MBSCHR=0;
20651 GNULIB_MBSRCHR=0;
20652 GNULIB_MBSSTR=0;
20653 GNULIB_MBSCASECMP=0;
20654 GNULIB_MBSNCASECMP=0;
20655 GNULIB_MBSPCASECMP=0;
20656 GNULIB_MBSCASESTR=0;
20657 GNULIB_MBSCSPN=0;
20658 GNULIB_MBSPBRK=0;
20659 GNULIB_MBSSPN=0;
20660 GNULIB_MBSSEP=0;
20661 GNULIB_MBSTOK_R=0;
20662 GNULIB_STRERROR=0;
20663 GNULIB_STRERROR_R=0;
20664 GNULIB_STRSIGNAL=0;
20665 GNULIB_STRVERSCMP=0;
20666 HAVE_MBSLEN=0;
20667 HAVE_FFSL=1;
20668 HAVE_FFSLL=1;
20669 HAVE_MEMCHR=1;
20670 HAVE_DECL_MEMMEM=1;
20671 HAVE_MEMPCPY=1;
20672 HAVE_DECL_MEMRCHR=1;
20673 HAVE_RAWMEMCHR=1;
20674 HAVE_STPCPY=1;
20675 HAVE_STPNCPY=1;
20676 HAVE_STRCHRNUL=1;
20677 HAVE_DECL_STRDUP=1;
20678 HAVE_DECL_STRNDUP=1;
20679 HAVE_DECL_STRNLEN=1;
20680 HAVE_STRPBRK=1;
20681 HAVE_STRSEP=1;
20682 HAVE_STRCASESTR=1;
20683 HAVE_DECL_STRTOK_R=1;
20684 HAVE_DECL_STRERROR_R=1;
20685 HAVE_DECL_STRSIGNAL=1;
20686 HAVE_STRVERSCMP=1;
20687 REPLACE_MEMCHR=0;
20688 REPLACE_MEMMEM=0;
20689 REPLACE_STPNCPY=0;
20690 REPLACE_STRDUP=0;
20691 REPLACE_STRSTR=0;
20692 REPLACE_STRCASESTR=0;
20693 REPLACE_STRCHRNUL=0;
20694 REPLACE_STRERROR=0;
20695 REPLACE_STRERROR_R=0;
20696 REPLACE_STRNCAT=0;
20697 REPLACE_STRNDUP=0;
20698 REPLACE_STRNLEN=0;
20699 REPLACE_STRSIGNAL=0;
20700 REPLACE_STRTOK_R=0;
20701 UNDEFINE_STRTOK_R=0;
20703 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20704 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20705 ac_have_decl=1
20706 else
20707 ac_have_decl=0
20710 cat >>confdefs.h <<_ACEOF
20711 #define HAVE_DECL_MEMRCHR $ac_have_decl
20712 _ACEOF
20717 GNULIB_MKTIME=0;
20718 GNULIB_NANOSLEEP=0;
20719 GNULIB_STRPTIME=0;
20720 GNULIB_TIMEGM=0;
20721 GNULIB_TIME_R=0;
20722 HAVE_DECL_LOCALTIME_R=1;
20723 HAVE_NANOSLEEP=1;
20724 HAVE_STRPTIME=1;
20725 HAVE_TIMEGM=1;
20726 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20727 REPLACE_MKTIME=GNULIB_PORTCHECK;
20728 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20729 REPLACE_TIMEGM=GNULIB_PORTCHECK;
20731 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20732 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20733 ac_have_decl=1
20734 else
20735 ac_have_decl=0
20738 cat >>confdefs.h <<_ACEOF
20739 #define HAVE_DECL_ALARM $ac_have_decl
20740 _ACEOF
20745 GNULIB_PSELECT=0;
20746 GNULIB_SELECT=0;
20747 HAVE_PSELECT=1;
20748 REPLACE_PSELECT=0;
20749 REPLACE_SELECT=0;
20756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20757 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20758 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
20759 $as_echo_n "(cached) " >&6
20760 else
20762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20763 /* end confdefs.h. */
20764 #include <sys/select.h>
20766 main ()
20768 struct timeval b;
20770 return 0;
20772 _ACEOF
20773 if ac_fn_c_try_compile "$LINENO"; then :
20774 gl_cv_header_sys_select_h_selfcontained=yes
20775 else
20776 gl_cv_header_sys_select_h_selfcontained=no
20778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20779 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20781 /* end confdefs.h. */
20782 #include <sys/select.h>
20784 main ()
20786 int memset; int bzero;
20788 return 0;
20791 _ACEOF
20792 if ac_fn_c_try_compile "$LINENO"; then :
20793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20794 /* end confdefs.h. */
20795 #include <sys/select.h>
20797 main ()
20800 #undef memset
20801 #define memset nonexistent_memset
20802 extern
20803 #ifdef __cplusplus
20805 #endif
20806 void *memset (void *, int, unsigned long);
20807 #undef bzero
20808 #define bzero nonexistent_bzero
20809 extern
20810 #ifdef __cplusplus
20812 #endif
20813 void bzero (void *, unsigned long);
20814 fd_set fds;
20815 FD_ZERO (&fds);
20818 return 0;
20821 _ACEOF
20822 if ac_fn_c_try_link "$LINENO"; then :
20824 else
20825 gl_cv_header_sys_select_h_selfcontained=no
20827 rm -f core conftest.err conftest.$ac_objext \
20828 conftest$ac_exeext conftest.$ac_ext
20831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20836 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20846 if test $gl_cv_have_include_next = yes; then
20847 gl_cv_next_sys_select_h='<'sys/select.h'>'
20848 else
20849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20850 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20851 if test "${gl_cv_next_sys_select_h+set}" = set; then :
20852 $as_echo_n "(cached) " >&6
20853 else
20855 if test $ac_cv_header_sys_select_h = yes; then
20858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20859 /* end confdefs.h. */
20860 #include <sys/select.h>
20862 _ACEOF
20863 case "$host_os" in
20864 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20865 *) gl_absname_cpp="$ac_cpp" ;;
20866 esac
20868 case "$host_os" in
20869 mingw*)
20870 gl_dirsep_regex='[/\\]'
20873 gl_dirsep_regex='\/'
20875 esac
20876 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20878 gl_header_literal_regex=`echo 'sys/select.h' \
20879 | sed -e "$gl_make_literal_regex_sed"`
20880 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20881 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20882 s|^/[^/]|//&|
20886 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20887 sed -n "$gl_absolute_header_sed"`'"'
20888 else
20889 gl_cv_next_sys_select_h='<'sys/select.h'>'
20894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20895 $as_echo "$gl_cv_next_sys_select_h" >&6; }
20897 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
20899 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20900 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20901 gl_next_as_first_directive='<'sys/select.h'>'
20902 else
20903 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20904 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20906 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20911 if test $ac_cv_header_sys_select_h = yes; then
20912 HAVE_SYS_SELECT_H=1
20913 else
20914 HAVE_SYS_SELECT_H=0
20921 if test $ac_cv_header_sys_socket_h != yes; then
20922 for ac_header in winsock2.h
20923 do :
20924 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20925 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20926 cat >>confdefs.h <<_ACEOF
20927 #define HAVE_WINSOCK2_H 1
20928 _ACEOF
20932 done
20935 if test "$ac_cv_header_winsock2_h" = yes; then
20936 HAVE_WINSOCK2_H=1
20937 UNISTD_H_HAVE_WINSOCK2_H=1
20938 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20939 else
20940 HAVE_WINSOCK2_H=0
20950 GNULIB_PTHREAD_SIGMASK=0;
20951 GNULIB_RAISE=0;
20952 GNULIB_SIGNAL_H_SIGPIPE=0;
20953 GNULIB_SIGPROCMASK=0;
20954 GNULIB_SIGACTION=0;
20955 HAVE_POSIX_SIGNALBLOCKING=1;
20956 HAVE_PTHREAD_SIGMASK=1;
20957 HAVE_RAISE=1;
20958 HAVE_SIGSET_T=1;
20959 HAVE_SIGINFO_T=1;
20960 HAVE_SIGACTION=1;
20961 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20963 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20965 HAVE_SIGHANDLER_T=1;
20966 REPLACE_PTHREAD_SIGMASK=0;
20967 REPLACE_RAISE=0;
20975 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20976 #include <signal.h>
20977 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20978 #include <sys/types.h>
20981 if test "x$ac_cv_type_sigset_t" = x""yes; then :
20983 cat >>confdefs.h <<_ACEOF
20984 #define HAVE_SIGSET_T 1
20985 _ACEOF
20987 gl_cv_type_sigset_t=yes
20988 else
20989 gl_cv_type_sigset_t=no
20992 if test $gl_cv_type_sigset_t != yes; then
20993 HAVE_SIGSET_T=0
20998 if test $ac_cv_header_sys_socket_h = no; then
20999 for ac_header in ws2tcpip.h
21000 do :
21001 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21002 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21003 cat >>confdefs.h <<_ACEOF
21004 #define HAVE_WS2TCPIP_H 1
21005 _ACEOF
21009 done
21013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21014 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21015 if test "${ac_cv_header_stdbool_h+set}" = set; then :
21016 $as_echo_n "(cached) " >&6
21017 else
21018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21019 /* end confdefs.h. */
21021 #include <stdbool.h>
21022 #ifndef bool
21023 "error: bool is not defined"
21024 #endif
21025 #ifndef false
21026 "error: false is not defined"
21027 #endif
21028 #if false
21029 "error: false is not 0"
21030 #endif
21031 #ifndef true
21032 "error: true is not defined"
21033 #endif
21034 #if true != 1
21035 "error: true is not 1"
21036 #endif
21037 #ifndef __bool_true_false_are_defined
21038 "error: __bool_true_false_are_defined is not defined"
21039 #endif
21041 struct s { _Bool s: 1; _Bool t; } s;
21043 char a[true == 1 ? 1 : -1];
21044 char b[false == 0 ? 1 : -1];
21045 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21046 char d[(bool) 0.5 == true ? 1 : -1];
21047 /* See body of main program for 'e'. */
21048 char f[(_Bool) 0.0 == false ? 1 : -1];
21049 char g[true];
21050 char h[sizeof (_Bool)];
21051 char i[sizeof s.t];
21052 enum { j = false, k = true, l = false * true, m = true * 256 };
21053 /* The following fails for
21054 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21055 _Bool n[m];
21056 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21057 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21058 /* Catch a bug in an HP-UX C compiler. See
21059 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21060 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21062 _Bool q = true;
21063 _Bool *pq = &q;
21066 main ()
21069 bool e = &s;
21070 *pq |= q;
21071 *pq |= ! q;
21072 /* Refer to every declared value, to avoid compiler optimizations. */
21073 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21074 + !m + !n + !o + !p + !q + !pq);
21077 return 0;
21079 _ACEOF
21080 if ac_fn_c_try_compile "$LINENO"; then :
21081 ac_cv_header_stdbool_h=yes
21082 else
21083 ac_cv_header_stdbool_h=no
21085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21088 $as_echo "$ac_cv_header_stdbool_h" >&6; }
21089 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21090 if test "x$ac_cv_type__Bool" = x""yes; then :
21092 cat >>confdefs.h <<_ACEOF
21093 #define HAVE__BOOL 1
21094 _ACEOF
21101 REPLACE_NULL=0;
21102 HAVE_WCHAR_T=1;
21105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21106 $as_echo_n "checking for wchar_t... " >&6; }
21107 if test "${gt_cv_c_wchar_t+set}" = set; then :
21108 $as_echo_n "(cached) " >&6
21109 else
21110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21111 /* end confdefs.h. */
21112 #include <stddef.h>
21113 wchar_t foo = (wchar_t)'\0';
21115 main ()
21119 return 0;
21121 _ACEOF
21122 if ac_fn_c_try_compile "$LINENO"; then :
21123 gt_cv_c_wchar_t=yes
21124 else
21125 gt_cv_c_wchar_t=no
21127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21130 $as_echo "$gt_cv_c_wchar_t" >&6; }
21131 if test $gt_cv_c_wchar_t = yes; then
21133 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21138 GNULIB_DPRINTF=0;
21139 GNULIB_FCLOSE=0;
21140 GNULIB_FDOPEN=0;
21141 GNULIB_FFLUSH=0;
21142 GNULIB_FGETC=0;
21143 GNULIB_FGETS=0;
21144 GNULIB_FOPEN=0;
21145 GNULIB_FPRINTF=0;
21146 GNULIB_FPRINTF_POSIX=0;
21147 GNULIB_FPURGE=0;
21148 GNULIB_FPUTC=0;
21149 GNULIB_FPUTS=0;
21150 GNULIB_FREAD=0;
21151 GNULIB_FREOPEN=0;
21152 GNULIB_FSCANF=0;
21153 GNULIB_FSEEK=0;
21154 GNULIB_FSEEKO=0;
21155 GNULIB_FTELL=0;
21156 GNULIB_FTELLO=0;
21157 GNULIB_FWRITE=0;
21158 GNULIB_GETC=0;
21159 GNULIB_GETCHAR=0;
21160 GNULIB_GETDELIM=0;
21161 GNULIB_GETLINE=0;
21162 GNULIB_OBSTACK_PRINTF=0;
21163 GNULIB_OBSTACK_PRINTF_POSIX=0;
21164 GNULIB_PCLOSE=0;
21165 GNULIB_PERROR=0;
21166 GNULIB_POPEN=0;
21167 GNULIB_PRINTF=0;
21168 GNULIB_PRINTF_POSIX=0;
21169 GNULIB_PUTC=0;
21170 GNULIB_PUTCHAR=0;
21171 GNULIB_PUTS=0;
21172 GNULIB_REMOVE=0;
21173 GNULIB_RENAME=0;
21174 GNULIB_RENAMEAT=0;
21175 GNULIB_SCANF=0;
21176 GNULIB_SNPRINTF=0;
21177 GNULIB_SPRINTF_POSIX=0;
21178 GNULIB_STDIO_H_NONBLOCKING=0;
21179 GNULIB_STDIO_H_SIGPIPE=0;
21180 GNULIB_TMPFILE=0;
21181 GNULIB_VASPRINTF=0;
21182 GNULIB_VFSCANF=0;
21183 GNULIB_VSCANF=0;
21184 GNULIB_VDPRINTF=0;
21185 GNULIB_VFPRINTF=0;
21186 GNULIB_VFPRINTF_POSIX=0;
21187 GNULIB_VPRINTF=0;
21188 GNULIB_VPRINTF_POSIX=0;
21189 GNULIB_VSNPRINTF=0;
21190 GNULIB_VSPRINTF_POSIX=0;
21191 HAVE_DECL_FPURGE=1;
21192 HAVE_DECL_FSEEKO=1;
21193 HAVE_DECL_FTELLO=1;
21194 HAVE_DECL_GETDELIM=1;
21195 HAVE_DECL_GETLINE=1;
21196 HAVE_DECL_OBSTACK_PRINTF=1;
21197 HAVE_DECL_SNPRINTF=1;
21198 HAVE_DECL_VSNPRINTF=1;
21199 HAVE_DPRINTF=1;
21200 HAVE_FSEEKO=1;
21201 HAVE_FTELLO=1;
21202 HAVE_PCLOSE=1;
21203 HAVE_POPEN=1;
21204 HAVE_RENAMEAT=1;
21205 HAVE_VASPRINTF=1;
21206 HAVE_VDPRINTF=1;
21207 REPLACE_DPRINTF=0;
21208 REPLACE_FCLOSE=0;
21209 REPLACE_FDOPEN=0;
21210 REPLACE_FFLUSH=0;
21211 REPLACE_FOPEN=0;
21212 REPLACE_FPRINTF=0;
21213 REPLACE_FPURGE=0;
21214 REPLACE_FREOPEN=0;
21215 REPLACE_FSEEK=0;
21216 REPLACE_FSEEKO=0;
21217 REPLACE_FTELL=0;
21218 REPLACE_FTELLO=0;
21219 REPLACE_GETDELIM=0;
21220 REPLACE_GETLINE=0;
21221 REPLACE_OBSTACK_PRINTF=0;
21222 REPLACE_PERROR=0;
21223 REPLACE_POPEN=0;
21224 REPLACE_PRINTF=0;
21225 REPLACE_REMOVE=0;
21226 REPLACE_RENAME=0;
21227 REPLACE_RENAMEAT=0;
21228 REPLACE_SNPRINTF=0;
21229 REPLACE_SPRINTF=0;
21230 REPLACE_STDIO_READ_FUNCS=0;
21231 REPLACE_STDIO_WRITE_FUNCS=0;
21232 REPLACE_TMPFILE=0;
21233 REPLACE_VASPRINTF=0;
21234 REPLACE_VDPRINTF=0;
21235 REPLACE_VFPRINTF=0;
21236 REPLACE_VPRINTF=0;
21237 REPLACE_VSNPRINTF=0;
21238 REPLACE_VSPRINTF=0;
21240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21241 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21242 if test "${ac_cv_struct_tm+set}" = set; then :
21243 $as_echo_n "(cached) " >&6
21244 else
21245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21246 /* end confdefs.h. */
21247 #include <sys/types.h>
21248 #include <time.h>
21251 main ()
21253 struct tm tm;
21254 int *p = &tm.tm_sec;
21255 return !p;
21257 return 0;
21259 _ACEOF
21260 if ac_fn_c_try_compile "$LINENO"; then :
21261 ac_cv_struct_tm=time.h
21262 else
21263 ac_cv_struct_tm=sys/time.h
21265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21268 $as_echo "$ac_cv_struct_tm" >&6; }
21269 if test $ac_cv_struct_tm = sys/time.h; then
21271 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
21275 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21276 #include <$ac_cv_struct_tm>
21279 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
21281 cat >>confdefs.h <<_ACEOF
21282 #define HAVE_STRUCT_TM_TM_ZONE 1
21283 _ACEOF
21288 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21290 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
21292 else
21293 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21295 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21296 ac_have_decl=1
21297 else
21298 ac_have_decl=0
21301 cat >>confdefs.h <<_ACEOF
21302 #define HAVE_DECL_TZNAME $ac_have_decl
21303 _ACEOF
21305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21306 $as_echo_n "checking for tzname... " >&6; }
21307 if test "${ac_cv_var_tzname+set}" = set; then :
21308 $as_echo_n "(cached) " >&6
21309 else
21310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21311 /* end confdefs.h. */
21312 #include <time.h>
21313 #if !HAVE_DECL_TZNAME
21314 extern char *tzname[];
21315 #endif
21318 main ()
21320 return tzname[0][0];
21322 return 0;
21324 _ACEOF
21325 if ac_fn_c_try_link "$LINENO"; then :
21326 ac_cv_var_tzname=yes
21327 else
21328 ac_cv_var_tzname=no
21330 rm -f core conftest.err conftest.$ac_objext \
21331 conftest$ac_exeext conftest.$ac_ext
21333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21334 $as_echo "$ac_cv_var_tzname" >&6; }
21335 if test $ac_cv_var_tzname = yes; then
21337 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
21343 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21345 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21347 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
21363 if test $gl_cv_have_include_next = yes; then
21364 gl_cv_next_string_h='<'string.h'>'
21365 else
21366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21367 $as_echo_n "checking absolute name of <string.h>... " >&6; }
21368 if test "${gl_cv_next_string_h+set}" = set; then :
21369 $as_echo_n "(cached) " >&6
21370 else
21372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21373 /* end confdefs.h. */
21374 #include <string.h>
21376 _ACEOF
21377 case "$host_os" in
21378 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21379 *) gl_absname_cpp="$ac_cpp" ;;
21380 esac
21382 case "$host_os" in
21383 mingw*)
21384 gl_dirsep_regex='[/\\]'
21387 gl_dirsep_regex='\/'
21389 esac
21390 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21392 gl_header_literal_regex=`echo 'string.h' \
21393 | sed -e "$gl_make_literal_regex_sed"`
21394 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21395 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21396 s|^/[^/]|//&|
21400 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21401 sed -n "$gl_absolute_header_sed"`'"'
21405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21406 $as_echo "$gl_cv_next_string_h" >&6; }
21408 NEXT_STRING_H=$gl_cv_next_string_h
21410 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21412 gl_next_as_first_directive='<'string.h'>'
21413 else
21414 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21415 gl_next_as_first_directive=$gl_cv_next_string_h
21417 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21427 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21428 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21429 ac_have_decl=1
21430 else
21431 ac_have_decl=0
21434 cat >>confdefs.h <<_ACEOF
21435 #define HAVE_DECL_STRTOIMAX $ac_have_decl
21436 _ACEOF
21440 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21441 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21442 ac_have_decl=1
21443 else
21444 ac_have_decl=0
21447 cat >>confdefs.h <<_ACEOF
21448 #define HAVE_DECL_STRTOUMAX $ac_have_decl
21449 _ACEOF
21453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21454 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21455 if test "${ac_cv_header_stat_broken+set}" = set; then :
21456 $as_echo_n "(cached) " >&6
21457 else
21458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21459 /* end confdefs.h. */
21460 #include <sys/types.h>
21461 #include <sys/stat.h>
21463 #if defined S_ISBLK && defined S_IFDIR
21464 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21465 #endif
21467 #if defined S_ISBLK && defined S_IFCHR
21468 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21469 #endif
21471 #if defined S_ISLNK && defined S_IFREG
21472 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21473 #endif
21475 #if defined S_ISSOCK && defined S_IFREG
21476 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21477 #endif
21479 _ACEOF
21480 if ac_fn_c_try_compile "$LINENO"; then :
21481 ac_cv_header_stat_broken=no
21482 else
21483 ac_cv_header_stat_broken=yes
21485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21488 $as_echo "$ac_cv_header_stat_broken" >&6; }
21489 if test $ac_cv_header_stat_broken = yes; then
21491 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
21499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21500 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21501 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21502 $as_echo_n "(cached) " >&6
21503 else
21504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21505 /* end confdefs.h. */
21506 #include <time.h>
21509 main ()
21511 static struct timespec x; x.tv_sec = x.tv_nsec;
21513 return 0;
21515 _ACEOF
21516 if ac_fn_c_try_compile "$LINENO"; then :
21517 gl_cv_sys_struct_timespec_in_time_h=yes
21518 else
21519 gl_cv_sys_struct_timespec_in_time_h=no
21521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21524 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21526 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21527 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21528 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21529 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21530 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21531 else
21532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21533 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21534 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21535 $as_echo_n "(cached) " >&6
21536 else
21537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21538 /* end confdefs.h. */
21539 #include <sys/time.h>
21542 main ()
21544 static struct timespec x; x.tv_sec = x.tv_nsec;
21546 return 0;
21548 _ACEOF
21549 if ac_fn_c_try_compile "$LINENO"; then :
21550 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21551 else
21552 gl_cv_sys_struct_timespec_in_sys_time_h=no
21554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21557 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21558 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21559 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21560 else
21561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21562 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21563 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
21564 $as_echo_n "(cached) " >&6
21565 else
21566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21567 /* end confdefs.h. */
21568 #include <pthread.h>
21571 main ()
21573 static struct timespec x; x.tv_sec = x.tv_nsec;
21575 return 0;
21577 _ACEOF
21578 if ac_fn_c_try_compile "$LINENO"; then :
21579 gl_cv_sys_struct_timespec_in_pthread_h=yes
21580 else
21581 gl_cv_sys_struct_timespec_in_pthread_h=no
21583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21586 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21587 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21588 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21607 if test $gl_cv_have_include_next = yes; then
21608 gl_cv_next_time_h='<'time.h'>'
21609 else
21610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21611 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21612 if test "${gl_cv_next_time_h+set}" = set; then :
21613 $as_echo_n "(cached) " >&6
21614 else
21616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21617 /* end confdefs.h. */
21618 #include <time.h>
21620 _ACEOF
21621 case "$host_os" in
21622 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21623 *) gl_absname_cpp="$ac_cpp" ;;
21624 esac
21626 case "$host_os" in
21627 mingw*)
21628 gl_dirsep_regex='[/\\]'
21631 gl_dirsep_regex='\/'
21633 esac
21634 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21636 gl_header_literal_regex=`echo 'time.h' \
21637 | sed -e "$gl_make_literal_regex_sed"`
21638 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21639 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21640 s|^/[^/]|//&|
21644 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21645 sed -n "$gl_absolute_header_sed"`'"'
21649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21650 $as_echo "$gl_cv_next_time_h" >&6; }
21652 NEXT_TIME_H=$gl_cv_next_time_h
21654 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21655 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21656 gl_next_as_first_directive='<'time.h'>'
21657 else
21658 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21659 gl_next_as_first_directive=$gl_cv_next_time_h
21661 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21676 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21677 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21678 ac_have_decl=1
21679 else
21680 ac_have_decl=0
21683 cat >>confdefs.h <<_ACEOF
21684 #define HAVE_DECL_UNSETENV $ac_have_decl
21685 _ACEOF
21688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21689 $as_echo_n "checking whether the utimes function works... " >&6; }
21690 if test "${gl_cv_func_working_utimes+set}" = set; then :
21691 $as_echo_n "(cached) " >&6
21692 else
21694 if test "$cross_compiling" = yes; then :
21695 gl_cv_func_working_utimes=no
21696 else
21697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21698 /* end confdefs.h. */
21700 #include <sys/types.h>
21701 #include <sys/stat.h>
21702 #include <fcntl.h>
21703 #include <sys/time.h>
21704 #include <time.h>
21705 #include <unistd.h>
21706 #include <stdlib.h>
21707 #include <stdio.h>
21708 #include <utime.h>
21710 static int
21711 inorder (time_t a, time_t b, time_t c)
21713 return a <= b && b <= c;
21717 main ()
21719 int result = 0;
21720 char const *file = "conftest.utimes";
21721 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
21723 /* Test whether utimes() essentially works. */
21725 struct stat sbuf;
21726 FILE *f = fopen (file, "w");
21727 if (f == NULL)
21728 result |= 1;
21729 else if (fclose (f) != 0)
21730 result |= 1;
21731 else if (utimes (file, timeval) != 0)
21732 result |= 2;
21733 else if (lstat (file, &sbuf) != 0)
21734 result |= 1;
21735 else if (!(sbuf.st_atime == timeval[0].tv_sec
21736 && sbuf.st_mtime == timeval[1].tv_sec))
21737 result |= 4;
21738 if (unlink (file) != 0)
21739 result |= 1;
21742 /* Test whether utimes() with a NULL argument sets the file's timestamp
21743 to the current time. Use 'fstat' as well as 'time' to
21744 determine the "current" time, to accommodate NFS file systems
21745 if there is a time skew between the host and the NFS server. */
21747 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21748 if (fd < 0)
21749 result |= 1;
21750 else
21752 time_t t0, t2;
21753 struct stat st0, st1, st2;
21754 if (time (&t0) == (time_t) -1)
21755 result |= 1;
21756 else if (fstat (fd, &st0) != 0)
21757 result |= 1;
21758 else if (utimes (file, timeval) != 0)
21759 result |= 2;
21760 else if (utimes (file, NULL) != 0)
21761 result |= 8;
21762 else if (fstat (fd, &st1) != 0)
21763 result |= 1;
21764 else if (write (fd, "\n", 1) != 1)
21765 result |= 1;
21766 else if (fstat (fd, &st2) != 0)
21767 result |= 1;
21768 else if (time (&t2) == (time_t) -1)
21769 result |= 1;
21770 else
21772 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21773 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21774 if (! (st1.st_atime == st1.st_mtime))
21775 result |= 16;
21776 if (! (m_ok_POSIX || m_ok_NFS))
21777 result |= 32;
21779 if (close (fd) != 0)
21780 result |= 1;
21782 if (unlink (file) != 0)
21783 result |= 1;
21786 /* Test whether utimes() with a NULL argument works on read-only files. */
21788 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21789 if (fd < 0)
21790 result |= 1;
21791 else if (close (fd) != 0)
21792 result |= 1;
21793 else if (utimes (file, NULL) != 0)
21794 result |= 64;
21795 if (unlink (file) != 0)
21796 result |= 1;
21799 return result;
21802 _ACEOF
21803 if ac_fn_c_try_run "$LINENO"; then :
21804 gl_cv_func_working_utimes=yes
21805 else
21806 gl_cv_func_working_utimes=no
21808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21809 conftest.$ac_objext conftest.beam conftest.$ac_ext
21813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21814 $as_echo "$gl_cv_func_working_utimes" >&6; }
21816 if test $gl_cv_func_working_utimes = yes; then
21818 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
21826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21827 $as_echo_n "checking for struct utimbuf... " >&6; }
21828 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21829 $as_echo_n "(cached) " >&6
21830 else
21831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21832 /* end confdefs.h. */
21833 #if HAVE_SYS_TIME_H
21834 #include <sys/time.h>
21835 #endif
21836 #include <time.h>
21837 #ifdef HAVE_UTIME_H
21838 #include <utime.h>
21839 #endif
21842 main ()
21844 static struct utimbuf x; x.actime = x.modtime;
21846 return 0;
21848 _ACEOF
21849 if ac_fn_c_try_compile "$LINENO"; then :
21850 gl_cv_sys_struct_utimbuf=yes
21851 else
21852 gl_cv_sys_struct_utimbuf=no
21854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21857 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
21859 if test $gl_cv_sys_struct_utimbuf = yes; then
21861 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
21875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21876 $as_echo_n "checking type of array argument to getgroups... " >&6; }
21877 if test "${ac_cv_type_getgroups+set}" = set; then :
21878 $as_echo_n "(cached) " >&6
21879 else
21880 if test "$cross_compiling" = yes; then :
21881 ac_cv_type_getgroups=cross
21882 else
21883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21884 /* end confdefs.h. */
21885 /* Thanks to Mike Rendell for this test. */
21886 $ac_includes_default
21887 #define NGID 256
21888 #undef MAX
21889 #define MAX(x, y) ((x) > (y) ? (x) : (y))
21892 main ()
21894 gid_t gidset[NGID];
21895 int i, n;
21896 union { gid_t gval; long int lval; } val;
21898 val.lval = -1;
21899 for (i = 0; i < NGID; i++)
21900 gidset[i] = val.gval;
21901 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21902 gidset);
21903 /* Exit non-zero if getgroups seems to require an array of ints. This
21904 happens when gid_t is short int but getgroups modifies an array
21905 of ints. */
21906 return n > 0 && gidset[n] != val.gval;
21908 _ACEOF
21909 if ac_fn_c_try_run "$LINENO"; then :
21910 ac_cv_type_getgroups=gid_t
21911 else
21912 ac_cv_type_getgroups=int
21914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21915 conftest.$ac_objext conftest.beam conftest.$ac_ext
21918 if test $ac_cv_type_getgroups = cross; then
21919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21920 /* end confdefs.h. */
21921 #include <unistd.h>
21923 _ACEOF
21924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21925 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
21926 ac_cv_type_getgroups=gid_t
21927 else
21928 ac_cv_type_getgroups=int
21930 rm -f conftest*
21934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
21935 $as_echo "$ac_cv_type_getgroups" >&6; }
21937 cat >>confdefs.h <<_ACEOF
21938 #define GETGROUPS_T $ac_cv_type_getgroups
21939 _ACEOF
21948 if false; then
21949 GL_COND_LIBTOOL_TRUE=
21950 GL_COND_LIBTOOL_FALSE='#'
21951 else
21952 GL_COND_LIBTOOL_TRUE='#'
21953 GL_COND_LIBTOOL_FALSE=
21956 gl_cond_libtool=false
21957 gl_libdeps=
21958 gl_ltlibdeps=
21959 gl_m4_base='m4'
21969 gl_source_base='lib'
21972 if test $ac_cv_func_alloca_works = no; then
21976 # Define an additional variable used in the Makefile substitution.
21977 if test $ac_cv_working_alloca_h = yes; then
21978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21979 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21980 if test "${gl_cv_rpl_alloca+set}" = set; then :
21981 $as_echo_n "(cached) " >&6
21982 else
21984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21985 /* end confdefs.h. */
21987 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21988 Need own alloca
21989 #endif
21991 _ACEOF
21992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21993 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21994 gl_cv_rpl_alloca=yes
21995 else
21996 gl_cv_rpl_alloca=no
21998 rm -f conftest*
22002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22003 $as_echo "$gl_cv_rpl_alloca" >&6; }
22004 if test $gl_cv_rpl_alloca = yes; then
22006 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
22008 ALLOCA_H=alloca.h
22009 else
22010 ALLOCA_H=
22012 else
22013 ALLOCA_H=alloca.h
22016 if test -n "$ALLOCA_H"; then
22017 GL_GENERATE_ALLOCA_H_TRUE=
22018 GL_GENERATE_ALLOCA_H_FALSE='#'
22019 else
22020 GL_GENERATE_ALLOCA_H_TRUE='#'
22021 GL_GENERATE_ALLOCA_H_FALSE=
22029 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22030 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
22032 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22033 # programs in the package would end up linked with that potentially-shared
22034 # library, inducing unnecessary run-time overhead.
22035 LIB_CLOCK_GETTIME=
22037 gl_saved_libs=$LIBS
22038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22039 $as_echo_n "checking for library containing clock_gettime... " >&6; }
22040 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22041 $as_echo_n "(cached) " >&6
22042 else
22043 ac_func_search_save_LIBS=$LIBS
22044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22045 /* end confdefs.h. */
22047 /* Override any GCC internal prototype to avoid an error.
22048 Use char because int might match the return type of a GCC
22049 builtin and then its argument prototype would still apply. */
22050 #ifdef __cplusplus
22051 extern "C"
22052 #endif
22053 char clock_gettime ();
22055 main ()
22057 return clock_gettime ();
22059 return 0;
22061 _ACEOF
22062 for ac_lib in '' rt posix4; do
22063 if test -z "$ac_lib"; then
22064 ac_res="none required"
22065 else
22066 ac_res=-l$ac_lib
22067 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22069 if ac_fn_c_try_link "$LINENO"; then :
22070 ac_cv_search_clock_gettime=$ac_res
22072 rm -f core conftest.err conftest.$ac_objext \
22073 conftest$ac_exeext
22074 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22075 break
22077 done
22078 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22080 else
22081 ac_cv_search_clock_gettime=no
22083 rm conftest.$ac_ext
22084 LIBS=$ac_func_search_save_LIBS
22086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22087 $as_echo "$ac_cv_search_clock_gettime" >&6; }
22088 ac_res=$ac_cv_search_clock_gettime
22089 if test "$ac_res" != no; then :
22090 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22091 test "$ac_cv_search_clock_gettime" = "none required" ||
22092 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22095 for ac_func in clock_gettime clock_settime
22096 do :
22097 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22098 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22099 eval as_val=\$$as_ac_var
22100 if test "x$as_val" = x""yes; then :
22101 cat >>confdefs.h <<_ACEOF
22102 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22103 _ACEOF
22106 done
22108 LIBS=$gl_saved_libs
22115 cat >>confdefs.h <<_ACEOF
22116 #define GNULIB_CLOSE_STREAM 1
22117 _ACEOF
22146 if test $gl_cv_have_include_next = yes; then
22147 gl_cv_next_dirent_h='<'dirent.h'>'
22148 else
22149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22150 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22151 if test "${gl_cv_next_dirent_h+set}" = set; then :
22152 $as_echo_n "(cached) " >&6
22153 else
22155 if test $ac_cv_header_dirent_h = yes; then
22158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22159 /* end confdefs.h. */
22160 #include <dirent.h>
22162 _ACEOF
22163 case "$host_os" in
22164 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22165 *) gl_absname_cpp="$ac_cpp" ;;
22166 esac
22168 case "$host_os" in
22169 mingw*)
22170 gl_dirsep_regex='[/\\]'
22173 gl_dirsep_regex='\/'
22175 esac
22176 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22178 gl_header_literal_regex=`echo 'dirent.h' \
22179 | sed -e "$gl_make_literal_regex_sed"`
22180 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22181 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22182 s|^/[^/]|//&|
22186 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22187 sed -n "$gl_absolute_header_sed"`'"'
22188 else
22189 gl_cv_next_dirent_h='<'dirent.h'>'
22194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22195 $as_echo "$gl_cv_next_dirent_h" >&6; }
22197 NEXT_DIRENT_H=$gl_cv_next_dirent_h
22199 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22200 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22201 gl_next_as_first_directive='<'dirent.h'>'
22202 else
22203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22204 gl_next_as_first_directive=$gl_cv_next_dirent_h
22206 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
22211 if test $ac_cv_header_dirent_h = yes; then
22212 HAVE_DIRENT_H=1
22213 else
22214 HAVE_DIRENT_H=0
22226 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
22229 if test $HAVE_DUP2 = 1; then
22230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22231 $as_echo_n "checking whether dup2 works... " >&6; }
22232 if test "${gl_cv_func_dup2_works+set}" = set; then :
22233 $as_echo_n "(cached) " >&6
22234 else
22235 if test "$cross_compiling" = yes; then :
22236 case "$host_os" in
22237 mingw*) # on this platform, dup2 always returns 0 for success
22238 gl_cv_func_dup2_works="guessing no" ;;
22239 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22240 gl_cv_func_dup2_works="guessing no" ;;
22241 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22242 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22243 gl_cv_func_dup2_works="guessing no" ;;
22244 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22245 gl_cv_func_dup2_works="guessing no" ;;
22246 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22247 gl_cv_func_dup2_works="guessing no" ;;
22248 *) gl_cv_func_dup2_works="guessing yes" ;;
22249 esac
22250 else
22251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22252 /* end confdefs.h. */
22254 #include <unistd.h>
22255 #include <fcntl.h>
22256 #include <errno.h>
22258 main ()
22260 int result = 0;
22261 #ifdef FD_CLOEXEC
22262 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22263 result |= 1;
22264 #endif
22265 if (dup2 (1, 1) == 0)
22266 result |= 2;
22267 #ifdef FD_CLOEXEC
22268 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22269 result |= 4;
22270 #endif
22271 close (0);
22272 if (dup2 (0, 0) != -1)
22273 result |= 8;
22274 /* Many gnulib modules require POSIX conformance of EBADF. */
22275 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22276 result |= 16;
22277 /* Flush out a cygwin core dump. */
22278 if (dup2 (2, -1) != -1 || errno != EBADF)
22279 result |= 32;
22280 return result;
22283 return 0;
22286 _ACEOF
22287 if ac_fn_c_try_run "$LINENO"; then :
22288 gl_cv_func_dup2_works=yes
22289 else
22290 gl_cv_func_dup2_works=no
22292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22293 conftest.$ac_objext conftest.beam conftest.$ac_ext
22298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22299 $as_echo "$gl_cv_func_dup2_works" >&6; }
22300 case "$gl_cv_func_dup2_works" in
22301 *yes) ;;
22303 REPLACE_DUP2=1
22305 esac
22309 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22318 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22327 GNULIB_DUP2=1
22339 GNULIB_ENVIRON=1
22349 LIB_EXECINFO=''
22350 EXECINFO_H='execinfo.h'
22352 if test $ac_cv_header_execinfo_h = yes; then
22353 gl_saved_libs=$LIBS
22354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22355 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22356 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22357 $as_echo_n "(cached) " >&6
22358 else
22359 ac_func_search_save_LIBS=$LIBS
22360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22361 /* end confdefs.h. */
22363 /* Override any GCC internal prototype to avoid an error.
22364 Use char because int might match the return type of a GCC
22365 builtin and then its argument prototype would still apply. */
22366 #ifdef __cplusplus
22367 extern "C"
22368 #endif
22369 char backtrace_symbols_fd ();
22371 main ()
22373 return backtrace_symbols_fd ();
22375 return 0;
22377 _ACEOF
22378 for ac_lib in '' execinfo; do
22379 if test -z "$ac_lib"; then
22380 ac_res="none required"
22381 else
22382 ac_res=-l$ac_lib
22383 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22385 if ac_fn_c_try_link "$LINENO"; then :
22386 ac_cv_search_backtrace_symbols_fd=$ac_res
22388 rm -f core conftest.err conftest.$ac_objext \
22389 conftest$ac_exeext
22390 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22391 break
22393 done
22394 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22396 else
22397 ac_cv_search_backtrace_symbols_fd=no
22399 rm conftest.$ac_ext
22400 LIBS=$ac_func_search_save_LIBS
22402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22403 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22404 ac_res=$ac_cv_search_backtrace_symbols_fd
22405 if test "$ac_res" != no; then :
22406 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22407 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22408 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22411 LIBS=$gl_saved_libs
22412 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22415 if test -n "$EXECINFO_H"; then
22424 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22430 if test -n "$EXECINFO_H"; then
22431 GL_GENERATE_EXECINFO_H_TRUE=
22432 GL_GENERATE_EXECINFO_H_FALSE='#'
22433 else
22434 GL_GENERATE_EXECINFO_H_TRUE='#'
22435 GL_GENERATE_EXECINFO_H_FALSE=
22446 if test $ac_cv_func_faccessat = no; then
22447 HAVE_FACCESSAT=0
22450 if test $HAVE_FACCESSAT = 0; then
22459 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22462 for ac_func in access
22463 do :
22464 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22465 if test "x$ac_cv_func_access" = x""yes; then :
22466 cat >>confdefs.h <<_ACEOF
22467 #define HAVE_ACCESS 1
22468 _ACEOF
22471 done
22477 cat >>confdefs.h <<_ACEOF
22478 #define GNULIB_FACCESSAT 1
22479 _ACEOF
22487 GNULIB_FACCESSAT=1
22498 if test $ac_cv_func_fcntl = no; then
22502 if test $ac_cv_func_fcntl = no; then
22503 HAVE_FCNTL=0
22504 else
22505 REPLACE_FCNTL=1
22508 else
22509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22510 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22511 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22512 $as_echo_n "(cached) " >&6
22513 else
22514 if test "$cross_compiling" = yes; then :
22515 # Guess that it works on glibc systems
22516 case $host_os in #((
22517 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22518 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22519 esac
22520 else
22521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22522 /* end confdefs.h. */
22524 #include <fcntl.h>
22525 #include <errno.h>
22528 main ()
22530 int result = 0;
22531 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22532 if (errno != EINVAL) result |= 2;
22533 return result;
22536 return 0;
22538 _ACEOF
22539 if ac_fn_c_try_run "$LINENO"; then :
22540 gl_cv_func_fcntl_f_dupfd_works=yes
22541 else
22542 gl_cv_func_fcntl_f_dupfd_works=no
22544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22545 conftest.$ac_objext conftest.beam conftest.$ac_ext
22549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22550 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22551 case $gl_cv_func_fcntl_f_dupfd_works in
22552 *yes) ;;
22556 if test $ac_cv_func_fcntl = no; then
22557 HAVE_FCNTL=0
22558 else
22559 REPLACE_FCNTL=1
22563 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22565 esac
22567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22568 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22569 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
22570 $as_echo_n "(cached) " >&6
22571 else
22572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22573 /* end confdefs.h. */
22575 #include <fcntl.h>
22576 #ifndef F_DUPFD_CLOEXEC
22577 choke me
22578 #endif
22581 main ()
22585 return 0;
22587 _ACEOF
22588 if ac_fn_c_try_compile "$LINENO"; then :
22589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22590 /* end confdefs.h. */
22592 #ifdef __linux__
22593 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22594 it to support the semantics on older kernels that failed with EINVAL. */
22595 choke me
22596 #endif
22599 main ()
22603 return 0;
22605 _ACEOF
22606 if ac_fn_c_try_compile "$LINENO"; then :
22607 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22608 else
22609 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22612 else
22613 gl_cv_func_fcntl_f_dupfd_cloexec=no
22615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22618 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22619 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22623 if test $ac_cv_func_fcntl = no; then
22624 HAVE_FCNTL=0
22625 else
22626 REPLACE_FCNTL=1
22633 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22642 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22650 GNULIB_FCNTL=1
22667 if test $gl_cv_have_include_next = yes; then
22668 gl_cv_next_fcntl_h='<'fcntl.h'>'
22669 else
22670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22671 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22672 if test "${gl_cv_next_fcntl_h+set}" = set; then :
22673 $as_echo_n "(cached) " >&6
22674 else
22676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22677 /* end confdefs.h. */
22678 #include <fcntl.h>
22680 _ACEOF
22681 case "$host_os" in
22682 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22683 *) gl_absname_cpp="$ac_cpp" ;;
22684 esac
22686 case "$host_os" in
22687 mingw*)
22688 gl_dirsep_regex='[/\\]'
22691 gl_dirsep_regex='\/'
22693 esac
22694 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22696 gl_header_literal_regex=`echo 'fcntl.h' \
22697 | sed -e "$gl_make_literal_regex_sed"`
22698 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22699 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22700 s|^/[^/]|//&|
22704 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22705 sed -n "$gl_absolute_header_sed"`'"'
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22710 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22712 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22714 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22715 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22716 gl_next_as_first_directive='<'fcntl.h'>'
22717 else
22718 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22719 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22721 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22737 LIB_FDATASYNC=
22740 if test $ac_cv_have_decl_fdatasync = no; then
22741 HAVE_DECL_FDATASYNC=0
22742 for ac_func in fdatasync
22743 do :
22744 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
22745 if test "x$ac_cv_func_fdatasync" = x""yes; then :
22746 cat >>confdefs.h <<_ACEOF
22747 #define HAVE_FDATASYNC 1
22748 _ACEOF
22751 done
22753 if test $ac_cv_func_fdatasync = no; then
22754 HAVE_FDATASYNC=0
22756 else
22757 gl_saved_libs=$LIBS
22758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
22759 $as_echo_n "checking for library containing fdatasync... " >&6; }
22760 if test "${ac_cv_search_fdatasync+set}" = set; then :
22761 $as_echo_n "(cached) " >&6
22762 else
22763 ac_func_search_save_LIBS=$LIBS
22764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22765 /* end confdefs.h. */
22767 /* Override any GCC internal prototype to avoid an error.
22768 Use char because int might match the return type of a GCC
22769 builtin and then its argument prototype would still apply. */
22770 #ifdef __cplusplus
22771 extern "C"
22772 #endif
22773 char fdatasync ();
22775 main ()
22777 return fdatasync ();
22779 return 0;
22781 _ACEOF
22782 for ac_lib in '' rt posix4; do
22783 if test -z "$ac_lib"; then
22784 ac_res="none required"
22785 else
22786 ac_res=-l$ac_lib
22787 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22789 if ac_fn_c_try_link "$LINENO"; then :
22790 ac_cv_search_fdatasync=$ac_res
22792 rm -f core conftest.err conftest.$ac_objext \
22793 conftest$ac_exeext
22794 if test "${ac_cv_search_fdatasync+set}" = set; then :
22795 break
22797 done
22798 if test "${ac_cv_search_fdatasync+set}" = set; then :
22800 else
22801 ac_cv_search_fdatasync=no
22803 rm conftest.$ac_ext
22804 LIBS=$ac_func_search_save_LIBS
22806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22807 $as_echo "$ac_cv_search_fdatasync" >&6; }
22808 ac_res=$ac_cv_search_fdatasync
22809 if test "$ac_res" != no; then :
22810 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22811 test "$ac_cv_search_fdatasync" = "none required" ||
22812 LIB_FDATASYNC=$ac_cv_search_fdatasync
22815 LIBS=$gl_saved_libs
22818 if test $HAVE_FDATASYNC = 0; then
22827 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22835 GNULIB_FDATASYNC=1
22846 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22847 #include <dirent.h>
22850 if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22851 ac_have_decl=1
22852 else
22853 ac_have_decl=0
22856 cat >>confdefs.h <<_ACEOF
22857 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22858 _ACEOF
22859 if test $ac_have_decl = 1; then :
22861 else
22862 HAVE_DECL_FDOPENDIR=0
22866 if test $ac_cv_func_fdopendir = no; then
22867 HAVE_FDOPENDIR=0
22868 else
22869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22870 $as_echo_n "checking whether fdopendir works... " >&6; }
22871 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22872 $as_echo_n "(cached) " >&6
22873 else
22874 if test "$cross_compiling" = yes; then :
22875 case "$host_os" in
22876 # Guess yes on glibc systems.
22877 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22878 # If we don't know, assume the worst.
22879 *) gl_cv_func_fdopendir_works="guessing no" ;;
22880 esac
22882 else
22883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22884 /* end confdefs.h. */
22886 #include <dirent.h>
22887 #include <fcntl.h>
22888 #include <unistd.h>
22889 #if !HAVE_DECL_FDOPENDIR
22890 extern
22891 # ifdef __cplusplus
22893 # endif
22894 DIR *fdopendir (int);
22895 #endif
22898 main ()
22900 int result = 0;
22901 int fd = open ("conftest.c", O_RDONLY);
22902 if (fd < 0) result |= 1;
22903 if (fdopendir (fd)) result |= 2;
22904 if (close (fd)) result |= 4;
22905 return result;
22907 return 0;
22909 _ACEOF
22910 if ac_fn_c_try_run "$LINENO"; then :
22911 gl_cv_func_fdopendir_works=yes
22912 else
22913 gl_cv_func_fdopendir_works=no
22915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22916 conftest.$ac_objext conftest.beam conftest.$ac_ext
22920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22921 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22922 case "$gl_cv_func_fdopendir_works" in
22923 *yes) ;;
22925 REPLACE_FDOPENDIR=1
22927 esac
22930 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22939 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22947 GNULIB_FDOPENDIR=1
22955 cat >>confdefs.h <<_ACEOF
22956 #define GNULIB_FDOPENDIR 1
22957 _ACEOF
22967 fp_headers='
22968 # include <stdio.h>
22969 # if HAVE_STDIO_EXT_H
22970 # include <stdio_ext.h>
22971 # endif
22973 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22975 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22976 ac_have_decl=1
22977 else
22978 ac_have_decl=0
22981 cat >>confdefs.h <<_ACEOF
22982 #define HAVE_DECL___FPENDING $ac_have_decl
22983 _ACEOF
22986 if test $ac_cv_func___fpending = no; then
22995 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22999 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23000 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23001 $as_echo_n "(cached) " >&6
23002 else
23004 for ac_expr in \
23006 '# glibc2' \
23007 'fp->_IO_write_ptr - fp->_IO_write_base' \
23009 '# traditional Unix' \
23010 'fp->_ptr - fp->_base' \
23012 '# BSD' \
23013 'fp->_p - fp->_bf._base' \
23015 '# SCO, Unixware' \
23016 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23018 '# QNX' \
23019 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23021 '# old glibc?' \
23022 'fp->__bufp - fp->__buffer' \
23024 '# old glibc iostream?' \
23025 'fp->_pptr - fp->_pbase' \
23027 '# emx+gcc' \
23028 'fp->_ptr - fp->_buffer' \
23030 '# Minix' \
23031 'fp->_ptr - fp->_buf' \
23033 '# Plan9' \
23034 'fp->wp - fp->buf' \
23036 '# VMS' \
23037 '(*fp)->_ptr - (*fp)->_base' \
23039 '# e.g., DGUX R4.11; the info is not available' \
23041 ; do
23043 # Skip each embedded comment.
23044 case "$ac_expr" in '#'*) continue;; esac
23046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23047 /* end confdefs.h. */
23048 #include <stdio.h>
23050 main ()
23052 FILE *fp = stdin; (void) ($ac_expr);
23054 return 0;
23056 _ACEOF
23057 if ac_fn_c_try_compile "$LINENO"; then :
23058 fp_done=yes
23061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23062 test "$fp_done" = yes && break
23063 done
23065 ac_cv_sys_pending_output_n_bytes=$ac_expr
23069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23070 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23072 cat >>confdefs.h <<_ACEOF
23073 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23074 _ACEOF
23084 if test $ac_cv_func_fstatat = no; then
23085 HAVE_FSTATAT=0
23086 else
23087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23088 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23089 if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23090 $as_echo_n "(cached) " >&6
23091 else
23092 if test "$cross_compiling" = yes; then :
23093 case "$host_os" in
23094 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23095 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23096 esac
23098 else
23099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h. */
23102 #include <fcntl.h>
23103 #include <sys/stat.h>
23105 main (void)
23107 struct stat a;
23108 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23111 _ACEOF
23112 if ac_fn_c_try_run "$LINENO"; then :
23113 gl_cv_func_fstatat_zero_flag=yes
23114 else
23115 gl_cv_func_fstatat_zero_flag=no
23117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23118 conftest.$ac_objext conftest.beam conftest.$ac_ext
23123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23124 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23126 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23127 *yes+*yes) ;;
23128 *) REPLACE_FSTATAT=1
23129 case $gl_cv_func_fstatat_zero_flag in
23130 *yes)
23132 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23135 esac
23137 esac
23140 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23149 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23157 GNULIB_FSTATAT=1
23166 if test $ac_cv_func_fsync = no; then
23167 HAVE_FSYNC=0
23170 if test $HAVE_FSYNC = 0; then
23179 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23188 GNULIB_FSYNC=1
23196 # Persuade glibc <stdlib.h> to declare getloadavg().
23199 gl_save_LIBS=$LIBS
23201 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23202 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23203 HAVE_GETLOADAVG=1
23204 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23205 if test "x$ac_cv_func_getloadavg" = x""yes; then :
23207 else
23208 gl_func_getloadavg_done=no
23210 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23211 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23212 # to get the right answer into the cache.
23213 # For kstat on solaris, we need to test for libelf and libkvm to force the
23214 # definition of SVR4 below.
23215 if test $gl_func_getloadavg_done = no; then
23216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23217 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
23218 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
23219 $as_echo_n "(cached) " >&6
23220 else
23221 ac_check_lib_save_LIBS=$LIBS
23222 LIBS="-lelf $LIBS"
23223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23224 /* end confdefs.h. */
23226 /* Override any GCC internal prototype to avoid an error.
23227 Use char because int might match the return type of a GCC
23228 builtin and then its argument prototype would still apply. */
23229 #ifdef __cplusplus
23230 extern "C"
23231 #endif
23232 char elf_begin ();
23234 main ()
23236 return elf_begin ();
23238 return 0;
23240 _ACEOF
23241 if ac_fn_c_try_link "$LINENO"; then :
23242 ac_cv_lib_elf_elf_begin=yes
23243 else
23244 ac_cv_lib_elf_elf_begin=no
23246 rm -f core conftest.err conftest.$ac_objext \
23247 conftest$ac_exeext conftest.$ac_ext
23248 LIBS=$ac_check_lib_save_LIBS
23250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23251 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23252 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23253 LIBS="-lelf $LIBS"
23256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23257 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23258 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
23259 $as_echo_n "(cached) " >&6
23260 else
23261 ac_check_lib_save_LIBS=$LIBS
23262 LIBS="-lkvm $LIBS"
23263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23264 /* end confdefs.h. */
23266 /* Override any GCC internal prototype to avoid an error.
23267 Use char because int might match the return type of a GCC
23268 builtin and then its argument prototype would still apply. */
23269 #ifdef __cplusplus
23270 extern "C"
23271 #endif
23272 char kvm_open ();
23274 main ()
23276 return kvm_open ();
23278 return 0;
23280 _ACEOF
23281 if ac_fn_c_try_link "$LINENO"; then :
23282 ac_cv_lib_kvm_kvm_open=yes
23283 else
23284 ac_cv_lib_kvm_kvm_open=no
23286 rm -f core conftest.err conftest.$ac_objext \
23287 conftest$ac_exeext conftest.$ac_ext
23288 LIBS=$ac_check_lib_save_LIBS
23290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23291 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23292 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23293 LIBS="-lkvm $LIBS"
23296 # Check for the 4.4BSD definition of getloadavg.
23297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23298 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
23299 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
23300 $as_echo_n "(cached) " >&6
23301 else
23302 ac_check_lib_save_LIBS=$LIBS
23303 LIBS="-lutil $LIBS"
23304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23305 /* end confdefs.h. */
23307 /* Override any GCC internal prototype to avoid an error.
23308 Use char because int might match the return type of a GCC
23309 builtin and then its argument prototype would still apply. */
23310 #ifdef __cplusplus
23311 extern "C"
23312 #endif
23313 char getloadavg ();
23315 main ()
23317 return getloadavg ();
23319 return 0;
23321 _ACEOF
23322 if ac_fn_c_try_link "$LINENO"; then :
23323 ac_cv_lib_util_getloadavg=yes
23324 else
23325 ac_cv_lib_util_getloadavg=no
23327 rm -f core conftest.err conftest.$ac_objext \
23328 conftest$ac_exeext conftest.$ac_ext
23329 LIBS=$ac_check_lib_save_LIBS
23331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23332 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23333 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23334 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
23339 if test $gl_func_getloadavg_done = no; then
23340 # There is a commonly available library for RS/6000 AIX.
23341 # Since it is not a standard part of AIX, it might be installed locally.
23342 gl_getloadavg_LIBS=$LIBS
23343 LIBS="-L/usr/local/lib $LIBS"
23344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23345 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23346 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
23347 $as_echo_n "(cached) " >&6
23348 else
23349 ac_check_lib_save_LIBS=$LIBS
23350 LIBS="-lgetloadavg $LIBS"
23351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h. */
23354 /* Override any GCC internal prototype to avoid an error.
23355 Use char because int might match the return type of a GCC
23356 builtin and then its argument prototype would still apply. */
23357 #ifdef __cplusplus
23358 extern "C"
23359 #endif
23360 char getloadavg ();
23362 main ()
23364 return getloadavg ();
23366 return 0;
23368 _ACEOF
23369 if ac_fn_c_try_link "$LINENO"; then :
23370 ac_cv_lib_getloadavg_getloadavg=yes
23371 else
23372 ac_cv_lib_getloadavg_getloadavg=no
23374 rm -f core conftest.err conftest.$ac_objext \
23375 conftest$ac_exeext conftest.$ac_ext
23376 LIBS=$ac_check_lib_save_LIBS
23378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23379 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23380 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23381 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23382 else
23383 LIBS=$gl_getloadavg_LIBS
23388 # Set up the replacement function if necessary.
23389 if test $gl_func_getloadavg_done = no; then
23390 HAVE_GETLOADAVG=0
23392 # Solaris has libkstat which does not require root.
23393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23394 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23395 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
23396 $as_echo_n "(cached) " >&6
23397 else
23398 ac_check_lib_save_LIBS=$LIBS
23399 LIBS="-lkstat $LIBS"
23400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23401 /* end confdefs.h. */
23403 /* Override any GCC internal prototype to avoid an error.
23404 Use char because int might match the return type of a GCC
23405 builtin and then its argument prototype would still apply. */
23406 #ifdef __cplusplus
23407 extern "C"
23408 #endif
23409 char kstat_open ();
23411 main ()
23413 return kstat_open ();
23415 return 0;
23417 _ACEOF
23418 if ac_fn_c_try_link "$LINENO"; then :
23419 ac_cv_lib_kstat_kstat_open=yes
23420 else
23421 ac_cv_lib_kstat_kstat_open=no
23423 rm -f core conftest.err conftest.$ac_objext \
23424 conftest$ac_exeext conftest.$ac_ext
23425 LIBS=$ac_check_lib_save_LIBS
23427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23428 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23429 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
23430 cat >>confdefs.h <<_ACEOF
23431 #define HAVE_LIBKSTAT 1
23432 _ACEOF
23434 LIBS="-lkstat $LIBS"
23438 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
23440 # AIX has libperfstat which does not require root
23441 if test $gl_func_getloadavg_done = no; then
23442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23443 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23444 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
23445 $as_echo_n "(cached) " >&6
23446 else
23447 ac_check_lib_save_LIBS=$LIBS
23448 LIBS="-lperfstat $LIBS"
23449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23450 /* end confdefs.h. */
23452 /* Override any GCC internal prototype to avoid an error.
23453 Use char because int might match the return type of a GCC
23454 builtin and then its argument prototype would still apply. */
23455 #ifdef __cplusplus
23456 extern "C"
23457 #endif
23458 char perfstat_cpu_total ();
23460 main ()
23462 return perfstat_cpu_total ();
23464 return 0;
23466 _ACEOF
23467 if ac_fn_c_try_link "$LINENO"; then :
23468 ac_cv_lib_perfstat_perfstat_cpu_total=yes
23469 else
23470 ac_cv_lib_perfstat_perfstat_cpu_total=no
23472 rm -f core conftest.err conftest.$ac_objext \
23473 conftest$ac_exeext conftest.$ac_ext
23474 LIBS=$ac_check_lib_save_LIBS
23476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23477 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23478 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23479 cat >>confdefs.h <<_ACEOF
23480 #define HAVE_LIBPERFSTAT 1
23481 _ACEOF
23483 LIBS="-lperfstat $LIBS"
23487 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23490 if test $gl_func_getloadavg_done = no; then
23491 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23492 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23493 gl_func_getloadavg_done=yes
23495 $as_echo "#define DGUX 1" >>confdefs.h
23497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23498 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23499 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
23500 $as_echo_n "(cached) " >&6
23501 else
23502 ac_check_lib_save_LIBS=$LIBS
23503 LIBS="-ldgc $LIBS"
23504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23505 /* end confdefs.h. */
23507 /* Override any GCC internal prototype to avoid an error.
23508 Use char because int might match the return type of a GCC
23509 builtin and then its argument prototype would still apply. */
23510 #ifdef __cplusplus
23511 extern "C"
23512 #endif
23513 char dg_sys_info ();
23515 main ()
23517 return dg_sys_info ();
23519 return 0;
23521 _ACEOF
23522 if ac_fn_c_try_link "$LINENO"; then :
23523 ac_cv_lib_dgc_dg_sys_info=yes
23524 else
23525 ac_cv_lib_dgc_dg_sys_info=no
23527 rm -f core conftest.err conftest.$ac_objext \
23528 conftest$ac_exeext conftest.$ac_ext
23529 LIBS=$ac_check_lib_save_LIBS
23531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23532 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23533 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23534 cat >>confdefs.h <<_ACEOF
23535 #define HAVE_LIBDGC 1
23536 _ACEOF
23538 LIBS="-ldgc $LIBS"
23550 if test "x$gl_save_LIBS" = x; then
23551 GETLOADAVG_LIBS=$LIBS
23552 else
23553 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23555 LIBS=$gl_save_LIBS
23558 # Test whether the system declares getloadavg. Solaris has the function
23559 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
23560 for ac_header in sys/loadavg.h
23561 do :
23562 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23563 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23564 cat >>confdefs.h <<_ACEOF
23565 #define HAVE_SYS_LOADAVG_H 1
23566 _ACEOF
23570 done
23572 if test $ac_cv_header_sys_loadavg_h = yes; then
23573 HAVE_SYS_LOADAVG_H=1
23574 else
23575 HAVE_SYS_LOADAVG_H=0
23577 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23578 # include <sys/loadavg.h>
23579 #endif
23580 #include <stdlib.h>
23582 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
23584 else
23585 HAVE_DECL_GETLOADAVG=0
23589 if test $HAVE_GETLOADAVG = 0; then
23598 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23601 # Figure out what our getloadavg.c needs.
23605 # On HPUX9, an unprivileged user can get load averages this way.
23606 if test $gl_func_getloadavg_done = no; then
23607 for ac_func in pstat_getdynamic
23608 do :
23609 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23610 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23611 cat >>confdefs.h <<_ACEOF
23612 #define HAVE_PSTAT_GETDYNAMIC 1
23613 _ACEOF
23614 gl_func_getloadavg_done=yes
23616 done
23620 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23621 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23622 # Irix 4.0.5F has the header but not the library.
23623 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23624 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23625 gl_func_getloadavg_done=yes
23627 $as_echo "#define SVR4 1" >>confdefs.h
23631 if test $gl_func_getloadavg_done = no; then
23632 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23633 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23634 gl_func_getloadavg_done=yes
23636 $as_echo "#define UMAX 1" >>confdefs.h
23639 $as_echo "#define UMAX4_3 1" >>confdefs.h
23646 if test $gl_func_getloadavg_done = no; then
23647 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23648 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23649 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23656 if test $gl_func_getloadavg_done = no; then
23657 for ac_header in mach/mach.h
23658 do :
23659 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23660 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23661 cat >>confdefs.h <<_ACEOF
23662 #define HAVE_MACH_MACH_H 1
23663 _ACEOF
23667 done
23671 for ac_header in nlist.h
23672 do :
23673 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23674 if test "x$ac_cv_header_nlist_h" = x""yes; then :
23675 cat >>confdefs.h <<_ACEOF
23676 #define HAVE_NLIST_H 1
23677 _ACEOF
23678 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
23680 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
23682 cat >>confdefs.h <<_ACEOF
23683 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
23684 _ACEOF
23689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23690 /* end confdefs.h. */
23691 #include <nlist.h>
23693 main ()
23695 struct nlist x;
23696 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
23697 x.n_un.n_name = "";
23698 #else
23699 x.n_name = "";
23700 #endif
23702 return 0;
23704 _ACEOF
23705 if ac_fn_c_try_link "$LINENO"; then :
23707 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
23710 rm -f core conftest.err conftest.$ac_objext \
23711 conftest$ac_exeext conftest.$ac_ext
23715 done
23723 GNULIB_GETLOADAVG=1
23734 if test $REPLACE_GETOPT = 1; then
23743 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23753 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23758 GNULIB_GL_UNISTD_H_GETOPT=1
23767 REPLACE_GETOPT=0
23768 if test -n "$gl_replace_getopt"; then
23769 REPLACE_GETOPT=1
23772 if test $REPLACE_GETOPT = 1; then
23774 GETOPT_H=getopt.h
23776 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23782 if test $REPLACE_GETOPT = 1; then
23791 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23801 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23806 GNULIB_GL_UNISTD_H_GETOPT=1
23820 gl_gettimeofday_timezone=void
23821 if test $ac_cv_func_gettimeofday != yes; then
23822 HAVE_GETTIMEOFDAY=0
23823 else
23827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23828 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23829 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23830 $as_echo_n "(cached) " >&6
23831 else
23832 if test "$cross_compiling" = yes; then :
23833 # When cross-compiling:
23834 case "$host_os" in
23835 # Guess all is fine on glibc systems.
23836 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23837 # If we don't know, assume the worst.
23838 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23839 esac
23841 else
23842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23843 /* end confdefs.h. */
23844 #include <string.h>
23845 #include <sys/time.h>
23846 #include <time.h>
23847 #include <stdlib.h>
23850 main ()
23853 time_t t = 0;
23854 struct tm *lt;
23855 struct tm saved_lt;
23856 struct timeval tv;
23857 lt = localtime (&t);
23858 saved_lt = *lt;
23859 gettimeofday (&tv, NULL);
23860 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23863 return 0;
23865 _ACEOF
23866 if ac_fn_c_try_run "$LINENO"; then :
23867 gl_cv_func_gettimeofday_clobber=no
23868 else
23869 gl_cv_func_gettimeofday_clobber=yes
23871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23872 conftest.$ac_objext conftest.beam conftest.$ac_ext
23876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23877 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23879 case "$gl_cv_func_gettimeofday_clobber" in
23880 *yes)
23881 REPLACE_GETTIMEOFDAY=1
23884 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23887 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23891 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23894 esac
23896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23897 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23898 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
23899 $as_echo_n "(cached) " >&6
23900 else
23901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23902 /* end confdefs.h. */
23903 #include <sys/time.h>
23904 struct timeval c;
23905 int gettimeofday (struct timeval *restrict, void *restrict);
23908 main ()
23910 /* glibc uses struct timezone * rather than the POSIX void *
23911 if _GNU_SOURCE is defined. However, since the only portable
23912 use of gettimeofday uses NULL as the second parameter, and
23913 since the glibc definition is actually more typesafe, it is
23914 not worth wrapping this to get a compliant signature. */
23915 int (*f) (struct timeval *restrict, void *restrict)
23916 = gettimeofday;
23917 int x = f (&c, 0);
23918 return !(x | c.tv_sec | c.tv_usec);
23921 return 0;
23923 _ACEOF
23924 if ac_fn_c_try_compile "$LINENO"; then :
23925 gl_cv_func_gettimeofday_posix_signature=yes
23926 else
23927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23928 /* end confdefs.h. */
23929 #include <sys/time.h>
23930 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23933 main ()
23937 return 0;
23939 _ACEOF
23940 if ac_fn_c_try_compile "$LINENO"; then :
23941 gl_cv_func_gettimeofday_posix_signature=almost
23942 else
23943 gl_cv_func_gettimeofday_posix_signature=no
23945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23950 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23951 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23952 gl_gettimeofday_timezone='struct timezone'
23953 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23954 REPLACE_GETTIMEOFDAY=1
23956 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23957 REPLACE_GETTIMEOFDAY=1
23962 cat >>confdefs.h <<_ACEOF
23963 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23964 _ACEOF
23967 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23976 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23979 for ac_header in sys/timeb.h
23980 do :
23981 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23982 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23983 cat >>confdefs.h <<_ACEOF
23984 #define HAVE_SYS_TIMEB_H 1
23985 _ACEOF
23989 done
23991 for ac_func in _ftime
23992 do :
23993 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23994 if test "x$ac_cv_func__ftime" = x""yes; then :
23995 cat >>confdefs.h <<_ACEOF
23996 #define HAVE__FTIME 1
23997 _ACEOF
24000 done
24009 GNULIB_GETTIMEOFDAY=1
24020 if test $ac_cv_func_lstat = yes; then
24022 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24023 *no)
24024 REPLACE_LSTAT=1
24026 esac
24027 else
24028 HAVE_LSTAT=0
24031 if test $REPLACE_LSTAT = 1; then
24040 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24049 GNULIB_LSTAT=1
24060 if test $ac_cv_have_decl_memrchr = no; then
24061 HAVE_DECL_MEMRCHR=0
24064 for ac_func in memrchr
24065 do :
24066 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24067 if test "x$ac_cv_func_memrchr" = x""yes; then :
24068 cat >>confdefs.h <<_ACEOF
24069 #define HAVE_MEMRCHR 1
24070 _ACEOF
24073 done
24076 if test $ac_cv_func_memrchr = no; then
24085 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24094 GNULIB_MEMRCHR=1
24106 if test $ac_cv_func_mkostemp != yes; then
24107 HAVE_MKOSTEMP=0
24110 if test $HAVE_MKOSTEMP = 0; then
24119 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24126 cat >>confdefs.h <<_ACEOF
24127 #define GNULIB_MKOSTEMP 1
24128 _ACEOF
24136 GNULIB_MKOSTEMP=1
24148 if test $APPLE_UNIVERSAL_BUILD = 1; then
24149 # A universal build on Apple Mac OS X platforms.
24150 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24151 # But we need a configuration result that is valid in both modes.
24152 gl_cv_func_working_mktime=no
24154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24155 $as_echo_n "checking for working mktime... " >&6; }
24156 if test "${gl_cv_func_working_mktime+set}" = set; then :
24157 $as_echo_n "(cached) " >&6
24158 else
24159 if test "$cross_compiling" = yes; then :
24160 gl_cv_func_working_mktime=no
24161 else
24162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24163 /* end confdefs.h. */
24164 /* Test program from Paul Eggert and Tony Leneis. */
24165 #include <limits.h>
24166 #include <stdlib.h>
24167 #include <time.h>
24169 #ifdef HAVE_UNISTD_H
24170 # include <unistd.h>
24171 #endif
24173 #if HAVE_DECL_ALARM
24174 # include <signal.h>
24175 #endif
24177 /* Work around redefinition to rpl_putenv by other config tests. */
24178 #undef putenv
24180 static time_t time_t_max;
24181 static time_t time_t_min;
24183 /* Values we'll use to set the TZ environment variable. */
24184 static char *tz_strings[] = {
24185 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24186 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24188 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24190 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24191 Based on a problem report from Andreas Jaeger. */
24192 static int
24193 spring_forward_gap ()
24195 /* glibc (up to about 1998-10-07) failed this test. */
24196 struct tm tm;
24198 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24199 instead of "TZ=America/Vancouver" in order to detect the bug even
24200 on systems that don't support the Olson extension, or don't have the
24201 full zoneinfo tables installed. */
24202 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24204 tm.tm_year = 98;
24205 tm.tm_mon = 3;
24206 tm.tm_mday = 5;
24207 tm.tm_hour = 2;
24208 tm.tm_min = 0;
24209 tm.tm_sec = 0;
24210 tm.tm_isdst = -1;
24211 return mktime (&tm) != (time_t) -1;
24214 static int
24215 mktime_test1 (time_t now)
24217 struct tm *lt;
24218 return ! (lt = localtime (&now)) || mktime (lt) == now;
24221 static int
24222 mktime_test (time_t now)
24224 return (mktime_test1 (now)
24225 && mktime_test1 ((time_t) (time_t_max - now))
24226 && mktime_test1 ((time_t) (time_t_min + now)));
24229 static int
24230 irix_6_4_bug ()
24232 /* Based on code from Ariel Faigon. */
24233 struct tm tm;
24234 tm.tm_year = 96;
24235 tm.tm_mon = 3;
24236 tm.tm_mday = 0;
24237 tm.tm_hour = 0;
24238 tm.tm_min = 0;
24239 tm.tm_sec = 0;
24240 tm.tm_isdst = -1;
24241 mktime (&tm);
24242 return tm.tm_mon == 2 && tm.tm_mday == 31;
24245 static int
24246 bigtime_test (int j)
24248 struct tm tm;
24249 time_t now;
24250 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24251 now = mktime (&tm);
24252 if (now != (time_t) -1)
24254 struct tm *lt = localtime (&now);
24255 if (! (lt
24256 && lt->tm_year == tm.tm_year
24257 && lt->tm_mon == tm.tm_mon
24258 && lt->tm_mday == tm.tm_mday
24259 && lt->tm_hour == tm.tm_hour
24260 && lt->tm_min == tm.tm_min
24261 && lt->tm_sec == tm.tm_sec
24262 && lt->tm_yday == tm.tm_yday
24263 && lt->tm_wday == tm.tm_wday
24264 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24265 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24266 return 0;
24268 return 1;
24271 static int
24272 year_2050_test ()
24274 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24275 ignoring leap seconds. */
24276 unsigned long int answer = 2527315200UL;
24278 struct tm tm;
24279 time_t t;
24280 tm.tm_year = 2050 - 1900;
24281 tm.tm_mon = 2 - 1;
24282 tm.tm_mday = 1;
24283 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24284 tm.tm_isdst = -1;
24286 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24287 instead of "TZ=America/Vancouver" in order to detect the bug even
24288 on systems that don't support the Olson extension, or don't have the
24289 full zoneinfo tables installed. */
24290 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24292 t = mktime (&tm);
24294 /* Check that the result is either a failure, or close enough
24295 to the correct answer that we can assume the discrepancy is
24296 due to leap seconds. */
24297 return (t == (time_t) -1
24298 || (0 < t && answer - 120 <= t && t <= answer + 120));
24302 main ()
24304 int result = 0;
24305 time_t t, delta;
24306 int i, j;
24307 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24308 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24310 #if HAVE_DECL_ALARM
24311 /* This test makes some buggy mktime implementations loop.
24312 Give up after 60 seconds; a mktime slower than that
24313 isn't worth using anyway. */
24314 signal (SIGALRM, SIG_DFL);
24315 alarm (60);
24316 #endif
24318 time_t_max = (! time_t_signed
24319 ? (time_t) -1
24320 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24321 * 2 + 1));
24322 time_t_min = (! time_t_signed
24323 ? (time_t) 0
24324 : time_t_signed_magnitude
24325 ? ~ (time_t) 0
24326 : ~ time_t_max);
24328 delta = time_t_max / 997; /* a suitable prime number */
24329 for (i = 0; i < N_STRINGS; i++)
24331 if (tz_strings[i])
24332 putenv (tz_strings[i]);
24334 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24335 if (! mktime_test (t))
24336 result |= 1;
24337 if ((result & 2) == 0
24338 && ! (mktime_test ((time_t) 1)
24339 && mktime_test ((time_t) (60 * 60))
24340 && mktime_test ((time_t) (60 * 60 * 24))))
24341 result |= 2;
24343 for (j = 1; (result & 4) == 0; j <<= 1)
24345 if (! bigtime_test (j))
24346 result |= 4;
24347 if (INT_MAX / 2 < j)
24348 break;
24350 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24351 result |= 8;
24353 if (! irix_6_4_bug ())
24354 result |= 16;
24355 if (! spring_forward_gap ())
24356 result |= 32;
24357 if (! year_2050_test ())
24358 result |= 64;
24359 return result;
24361 _ACEOF
24362 if ac_fn_c_try_run "$LINENO"; then :
24363 gl_cv_func_working_mktime=yes
24364 else
24365 gl_cv_func_working_mktime=no
24367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24368 conftest.$ac_objext conftest.beam conftest.$ac_ext
24373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24374 $as_echo "$gl_cv_func_working_mktime" >&6; }
24376 if test $gl_cv_func_working_mktime = no; then
24377 REPLACE_MKTIME=1
24378 else
24379 REPLACE_MKTIME=0
24382 if test $REPLACE_MKTIME = 1; then
24391 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24400 GNULIB_MKTIME=1
24413 if test $ac_cv_func_pipe2 != yes; then
24414 HAVE_PIPE2=0
24422 GNULIB_PIPE2=1
24433 if test $ac_cv_func_pselect = yes; then
24434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24435 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24436 if test "${gl_cv_sig_pselect+set}" = set; then :
24437 $as_echo_n "(cached) " >&6
24438 else
24439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24440 /* end confdefs.h. */
24441 #include <sys/select.h>
24444 main ()
24446 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24447 struct timespec const *restrict,
24448 sigset_t const *restrict) = pselect;
24449 return !p;
24451 return 0;
24453 _ACEOF
24454 if ac_fn_c_try_link "$LINENO"; then :
24455 gl_cv_sig_pselect=yes
24456 else
24457 gl_cv_sig_pselect=no
24459 rm -f core conftest.err conftest.$ac_objext \
24460 conftest$ac_exeext conftest.$ac_ext
24462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24463 $as_echo "$gl_cv_sig_pselect" >&6; }
24465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24466 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24467 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24468 $as_echo_n "(cached) " >&6
24469 else
24471 if test "$cross_compiling" = yes; then :
24473 case "$host_os" in
24474 # Guess yes on glibc systems.
24475 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24476 # If we don't know, assume the worst.
24477 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24478 esac
24480 else
24481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24482 /* end confdefs.h. */
24484 #include <sys/types.h>
24485 #include <sys/time.h>
24486 #if HAVE_SYS_SELECT_H
24487 # include <sys/select.h>
24488 #endif
24489 #include <unistd.h>
24490 #include <errno.h>
24493 main ()
24496 fd_set set;
24497 dup2(0, 16);
24498 FD_ZERO(&set);
24499 FD_SET(16, &set);
24500 close(16);
24501 struct timespec timeout;
24502 timeout.tv_sec = 0;
24503 timeout.tv_nsec = 5000;
24504 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24507 return 0;
24509 _ACEOF
24510 if ac_fn_c_try_run "$LINENO"; then :
24511 gl_cv_func_pselect_detects_ebadf=yes
24512 else
24513 gl_cv_func_pselect_detects_ebadf=no
24515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24516 conftest.$ac_objext conftest.beam conftest.$ac_ext
24521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24522 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24523 case $gl_cv_func_pselect_detects_ebadf in
24524 *yes) ;;
24525 *) REPLACE_PSELECT=1 ;;
24526 esac
24529 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24530 REPLACE_PSELECT=1
24533 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
24542 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
24550 GNULIB_PSELECT=1
24560 LIB_PTHREAD_SIGMASK=
24565 if test "$gl_threads_api" = posix; then
24566 if test $ac_cv_func_pthread_sigmask = yes; then
24568 else
24569 if test -n "$LIBMULTITHREAD"; then
24570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24571 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24572 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24573 $as_echo_n "(cached) " >&6
24574 else
24575 gl_save_LIBS="$LIBS"
24576 LIBS="$LIBS $LIBMULTITHREAD"
24577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24578 /* end confdefs.h. */
24579 #include <pthread.h>
24580 #include <signal.h>
24583 main ()
24585 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24587 return 0;
24590 _ACEOF
24591 if ac_fn_c_try_link "$LINENO"; then :
24592 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24593 else
24594 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24596 rm -f core conftest.err conftest.$ac_objext \
24597 conftest$ac_exeext conftest.$ac_ext
24598 LIBS="$gl_save_LIBS"
24601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24602 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24603 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24604 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24605 else
24606 HAVE_PTHREAD_SIGMASK=0
24608 else
24609 HAVE_PTHREAD_SIGMASK=0
24612 else
24613 if test $ac_cv_func_pthread_sigmask = yes; then
24614 REPLACE_PTHREAD_SIGMASK=1
24615 else
24616 HAVE_PTHREAD_SIGMASK=0
24623 if test $HAVE_PTHREAD_SIGMASK = 1; then
24626 if test -z "$LIB_PTHREAD_SIGMASK"; then
24627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24628 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24629 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
24630 $as_echo_n "(cached) " >&6
24631 else
24633 if test "$cross_compiling" = yes; then :
24635 case "$host_os" in
24636 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24637 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24639 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24640 esac
24642 else
24643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24644 /* end confdefs.h. */
24646 #include <pthread.h>
24647 #include <signal.h>
24648 #include <stddef.h>
24649 int main ()
24651 sigset_t set;
24652 sigemptyset (&set);
24653 return pthread_sigmask (1729, &set, NULL) != 0;
24655 _ACEOF
24656 if ac_fn_c_try_run "$LINENO"; then :
24657 gl_cv_func_pthread_sigmask_in_libc_works=no
24658 else
24659 gl_cv_func_pthread_sigmask_in_libc_works=yes
24661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24662 conftest.$ac_objext conftest.beam conftest.$ac_ext
24667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24668 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24669 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24670 *no)
24671 REPLACE_PTHREAD_SIGMASK=1
24673 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
24676 esac
24679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
24680 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
24681 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
24682 $as_echo_n "(cached) " >&6
24683 else
24685 gl_save_LIBS="$LIBS"
24686 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
24687 if test "$cross_compiling" = yes; then :
24688 case "$host_os" in
24689 cygwin*)
24690 gl_cv_func_pthread_sigmask_return_works="guessing no";;
24692 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
24693 esac
24695 else
24696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24697 /* end confdefs.h. */
24699 #include <pthread.h>
24700 #include <signal.h>
24701 #include <stddef.h>
24702 int main ()
24704 sigset_t set;
24705 sigemptyset (&set);
24706 if (pthread_sigmask (1729, &set, NULL) == -1)
24707 return 1;
24708 return 0;
24710 _ACEOF
24711 if ac_fn_c_try_run "$LINENO"; then :
24712 gl_cv_func_pthread_sigmask_return_works=yes
24713 else
24714 gl_cv_func_pthread_sigmask_return_works=no
24716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24717 conftest.$ac_objext conftest.beam conftest.$ac_ext
24720 LIBS="$gl_save_LIBS"
24723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
24724 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
24725 case "$gl_cv_func_pthread_sigmask_return_works" in
24726 *no)
24727 REPLACE_PTHREAD_SIGMASK=1
24729 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
24732 esac
24734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
24735 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
24736 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
24737 $as_echo_n "(cached) " >&6
24738 else
24740 case "$host_os" in
24741 irix*)
24742 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
24744 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
24745 esac
24746 gl_save_LIBS="$LIBS"
24747 LIBS="$LIBS $LIBMULTITHREAD"
24748 if test "$cross_compiling" = yes; then :
24750 else
24751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24752 /* end confdefs.h. */
24754 #include <pthread.h>
24755 #include <signal.h>
24756 #include <stdio.h>
24757 #include <stdlib.h>
24758 #include <unistd.h>
24759 static volatile int sigint_occurred;
24760 static void
24761 sigint_handler (int sig)
24763 sigint_occurred++;
24765 int main ()
24767 sigset_t set;
24768 int pid = getpid ();
24769 char command[80];
24770 signal (SIGINT, sigint_handler);
24771 sigemptyset (&set);
24772 sigaddset (&set, SIGINT);
24773 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
24774 return 1;
24775 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
24776 if (!(system (command) == 0))
24777 return 2;
24778 sleep (2);
24779 if (!(sigint_occurred == 0))
24780 return 3;
24781 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
24782 return 4;
24783 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
24784 return 5;
24785 return 0;
24787 _ACEOF
24788 if ac_fn_c_try_run "$LINENO"; then :
24790 else
24791 gl_cv_func_pthread_sigmask_unblock_works=no
24793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24794 conftest.$ac_objext conftest.beam conftest.$ac_ext
24797 LIBS="$gl_save_LIBS"
24800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
24801 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
24802 case "$gl_cv_func_pthread_sigmask_unblock_works" in
24803 *no)
24804 REPLACE_PTHREAD_SIGMASK=1
24806 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
24809 esac
24812 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
24821 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
24824 if test $HAVE_PTHREAD_SIGMASK = 1; then
24826 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
24836 GNULIB_PTHREAD_SIGMASK=1
24844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24845 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24846 if test "${gl_cv_func_svid_putenv+set}" = set; then :
24847 $as_echo_n "(cached) " >&6
24848 else
24849 if test "$cross_compiling" = yes; then :
24850 case "$host_os" in
24851 # Guess yes on glibc systems.
24852 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24853 # If we don't know, assume the worst.
24854 *) gl_cv_func_svid_putenv="guessing no" ;;
24855 esac
24857 else
24858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24859 /* end confdefs.h. */
24860 $ac_includes_default
24862 main ()
24865 /* Put it in env. */
24866 if (putenv ("CONFTEST_putenv=val"))
24867 return 1;
24869 /* Try to remove it. */
24870 if (putenv ("CONFTEST_putenv"))
24871 return 2;
24873 /* Make sure it was deleted. */
24874 if (getenv ("CONFTEST_putenv") != 0)
24875 return 3;
24877 return 0;
24880 return 0;
24882 _ACEOF
24883 if ac_fn_c_try_run "$LINENO"; then :
24884 gl_cv_func_svid_putenv=yes
24885 else
24886 gl_cv_func_svid_putenv=no
24888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24889 conftest.$ac_objext conftest.beam conftest.$ac_ext
24894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24895 $as_echo "$gl_cv_func_svid_putenv" >&6; }
24896 case "$gl_cv_func_svid_putenv" in
24897 *yes) ;;
24899 REPLACE_PUTENV=1
24901 esac
24903 if test $REPLACE_PUTENV = 1; then
24912 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24915 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24916 if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24917 ac_have_decl=1
24918 else
24919 ac_have_decl=0
24922 cat >>confdefs.h <<_ACEOF
24923 #define HAVE_DECL__PUTENV $ac_have_decl
24924 _ACEOF
24933 GNULIB_PUTENV=1
24940 # Check whether --enable-acl was given.
24941 if test "${enable_acl+set}" = set; then :
24942 enableval=$enable_acl;
24943 else
24944 enable_acl=auto
24948 LIB_ACL=
24949 use_acl=0
24950 if test "x$enable_acl" != "xno"; then
24951 for ac_header in sys/acl.h
24952 do :
24953 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24954 if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24955 cat >>confdefs.h <<_ACEOF
24956 #define HAVE_SYS_ACL_H 1
24957 _ACEOF
24961 done
24963 if test $ac_cv_header_sys_acl_h = yes; then
24964 ac_save_LIBS=$LIBS
24966 if test $use_acl = 0; then
24967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24968 $as_echo_n "checking for library containing acl_get_file... " >&6; }
24969 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24970 $as_echo_n "(cached) " >&6
24971 else
24972 ac_func_search_save_LIBS=$LIBS
24973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974 /* end confdefs.h. */
24976 /* Override any GCC internal prototype to avoid an error.
24977 Use char because int might match the return type of a GCC
24978 builtin and then its argument prototype would still apply. */
24979 #ifdef __cplusplus
24980 extern "C"
24981 #endif
24982 char acl_get_file ();
24984 main ()
24986 return acl_get_file ();
24988 return 0;
24990 _ACEOF
24991 for ac_lib in '' acl pacl; do
24992 if test -z "$ac_lib"; then
24993 ac_res="none required"
24994 else
24995 ac_res=-l$ac_lib
24996 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24998 if ac_fn_c_try_link "$LINENO"; then :
24999 ac_cv_search_acl_get_file=$ac_res
25001 rm -f core conftest.err conftest.$ac_objext \
25002 conftest$ac_exeext
25003 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25004 break
25006 done
25007 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25009 else
25010 ac_cv_search_acl_get_file=no
25012 rm conftest.$ac_ext
25013 LIBS=$ac_func_search_save_LIBS
25015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25016 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25017 ac_res=$ac_cv_search_acl_get_file
25018 if test "$ac_res" != no; then :
25019 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25020 if test "$ac_cv_search_acl_get_file" != "none required"; then
25021 LIB_ACL=$ac_cv_search_acl_get_file
25023 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25024 acl_free acl_from_mode acl_from_text \
25025 acl_delete_def_file acl_extended_file \
25026 acl_delete_fd_np acl_delete_file_np \
25027 acl_copy_ext_native acl_create_entry_np \
25028 acl_to_short_text acl_free_text
25029 do :
25030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25031 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25032 eval as_val=\$$as_ac_var
25033 if test "x$as_val" = x""yes; then :
25034 cat >>confdefs.h <<_ACEOF
25035 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25036 _ACEOF
25039 done
25041 # If the acl_get_file bug is detected, don't enable the ACL support.
25043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25044 $as_echo_n "checking for working acl_get_file... " >&6; }
25045 if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25046 $as_echo_n "(cached) " >&6
25047 else
25048 if test "$cross_compiling" = yes; then :
25049 gl_cv_func_working_acl_get_file=cross-compiling
25050 else
25051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25052 /* end confdefs.h. */
25053 #include <sys/types.h>
25054 #include <sys/acl.h>
25055 #include <errno.h>
25058 main ()
25060 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25061 return 1;
25062 return 0;
25065 return 0;
25067 _ACEOF
25068 if ac_fn_c_try_run "$LINENO"; then :
25069 gl_cv_func_working_acl_get_file=yes
25070 else
25071 gl_cv_func_working_acl_get_file=no
25073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25074 conftest.$ac_objext conftest.beam conftest.$ac_ext
25078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25079 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25081 if test $gl_cv_func_working_acl_get_file = yes; then :
25082 use_acl=1
25085 if test $use_acl = 1; then
25086 for ac_header in acl/libacl.h
25087 do :
25088 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25089 if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25090 cat >>confdefs.h <<_ACEOF
25091 #define HAVE_ACL_LIBACL_H 1
25092 _ACEOF
25096 done
25106 for ac_func in acl_entries
25107 do :
25108 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25109 if test "x$ac_cv_func_acl_entries" = x""yes; then :
25110 cat >>confdefs.h <<_ACEOF
25111 #define HAVE_ACL_ENTRIES 1
25112 _ACEOF
25114 else
25116 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25119 done
25122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25123 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25124 if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25125 $as_echo_n "(cached) " >&6
25126 else
25127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25128 /* end confdefs.h. */
25129 #include <sys/types.h>
25130 #include <sys/acl.h>
25131 int type = ACL_FIRST_ENTRY;
25133 main ()
25137 return 0;
25139 _ACEOF
25140 if ac_fn_c_try_compile "$LINENO"; then :
25141 gl_cv_acl_ACL_FIRST_ENTRY=yes
25142 else
25143 gl_cv_acl_ACL_FIRST_ENTRY=no
25145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25148 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25149 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25151 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25155 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25156 if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25157 $as_echo_n "(cached) " >&6
25158 else
25159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25160 /* end confdefs.h. */
25161 #include <sys/types.h>
25162 #include <sys/acl.h>
25163 int type = ACL_TYPE_EXTENDED;
25165 main ()
25169 return 0;
25171 _ACEOF
25172 if ac_fn_c_try_compile "$LINENO"; then :
25173 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25174 else
25175 gl_cv_acl_ACL_TYPE_EXTENDED=no
25177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25180 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25181 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25183 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25186 else
25187 LIB_ACL=
25194 if test $use_acl = 0; then
25195 for ac_func in facl
25196 do :
25197 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25198 if test "x$ac_cv_func_facl" = x""yes; then :
25199 cat >>confdefs.h <<_ACEOF
25200 #define HAVE_FACL 1
25201 _ACEOF
25204 done
25206 if test $ac_cv_func_facl = yes; then
25207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25208 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25209 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25210 $as_echo_n "(cached) " >&6
25211 else
25212 ac_func_search_save_LIBS=$LIBS
25213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25214 /* end confdefs.h. */
25216 /* Override any GCC internal prototype to avoid an error.
25217 Use char because int might match the return type of a GCC
25218 builtin and then its argument prototype would still apply. */
25219 #ifdef __cplusplus
25220 extern "C"
25221 #endif
25222 char acl_trivial ();
25224 main ()
25226 return acl_trivial ();
25228 return 0;
25230 _ACEOF
25231 for ac_lib in '' sec; do
25232 if test -z "$ac_lib"; then
25233 ac_res="none required"
25234 else
25235 ac_res=-l$ac_lib
25236 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25238 if ac_fn_c_try_link "$LINENO"; then :
25239 ac_cv_search_acl_trivial=$ac_res
25241 rm -f core conftest.err conftest.$ac_objext \
25242 conftest$ac_exeext
25243 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25244 break
25246 done
25247 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25249 else
25250 ac_cv_search_acl_trivial=no
25252 rm conftest.$ac_ext
25253 LIBS=$ac_func_search_save_LIBS
25255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25256 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25257 ac_res=$ac_cv_search_acl_trivial
25258 if test "$ac_res" != no; then :
25259 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25260 if test "$ac_cv_search_acl_trivial" != "none required"; then
25261 LIB_ACL=$ac_cv_search_acl_trivial
25266 for ac_func in acl_trivial
25267 do :
25268 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25269 if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25270 cat >>confdefs.h <<_ACEOF
25271 #define HAVE_ACL_TRIVIAL 1
25272 _ACEOF
25275 done
25277 use_acl=1
25281 if test $use_acl = 0; then
25282 for ac_func in getacl
25283 do :
25284 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25285 if test "x$ac_cv_func_getacl" = x""yes; then :
25286 cat >>confdefs.h <<_ACEOF
25287 #define HAVE_GETACL 1
25288 _ACEOF
25291 done
25293 if test $ac_cv_func_getacl = yes; then
25294 use_acl=1
25296 for ac_header in aclv.h
25297 do :
25298 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25300 if test "x$ac_cv_header_aclv_h" = x""yes; then :
25301 cat >>confdefs.h <<_ACEOF
25302 #define HAVE_ACLV_H 1
25303 _ACEOF
25307 done
25311 if test $use_acl = 0; then
25312 for ac_func in aclx_get
25313 do :
25314 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25315 if test "x$ac_cv_func_aclx_get" = x""yes; then :
25316 cat >>confdefs.h <<_ACEOF
25317 #define HAVE_ACLX_GET 1
25318 _ACEOF
25321 done
25323 if test $ac_cv_func_aclx_get = yes; then
25324 use_acl=1
25328 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25329 for ac_func in statacl
25330 do :
25331 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25332 if test "x$ac_cv_func_statacl" = x""yes; then :
25333 cat >>confdefs.h <<_ACEOF
25334 #define HAVE_STATACL 1
25335 _ACEOF
25338 done
25340 if test $ac_cv_func_statacl = yes; then
25341 use_acl=1
25345 if test $use_acl = 0; then
25346 for ac_func in aclsort
25347 do :
25348 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25349 if test "x$ac_cv_func_aclsort" = x""yes; then :
25350 cat >>confdefs.h <<_ACEOF
25351 #define HAVE_ACLSORT 1
25352 _ACEOF
25355 done
25357 if test $ac_cv_func_aclsort = yes; then
25358 use_acl=1
25362 LIBS=$ac_save_LIBS
25364 if test "x$enable_acl$use_acl" = "xyes0"; then
25365 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25366 elif test "x$enable_acl$use_acl" = "xauto0"; then
25367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25368 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25370 $as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25375 cat >>confdefs.h <<_ACEOF
25376 #define USE_ACL $use_acl
25377 _ACEOF
25379 USE_ACL=$use_acl
25385 if test $ac_cv_func_readlink = no; then
25386 HAVE_READLINK=0
25387 else
25388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25389 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25390 if test "${gl_cv_decl_readlink_works+set}" = set; then :
25391 $as_echo_n "(cached) " >&6
25392 else
25393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25394 /* end confdefs.h. */
25395 #include <unistd.h>
25396 /* Cause compilation failure if original declaration has wrong type. */
25397 ssize_t readlink (const char *, char *, size_t);
25399 main ()
25403 return 0;
25405 _ACEOF
25406 if ac_fn_c_try_compile "$LINENO"; then :
25407 gl_cv_decl_readlink_works=yes
25408 else
25409 gl_cv_decl_readlink_works=no
25411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25414 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25416 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25417 if test "${gl_cv_func_readlink_works+set}" = set; then :
25418 $as_echo_n "(cached) " >&6
25419 else
25420 # We have readlink, so assume ln -s works.
25421 ln -s conftest.no-such conftest.link
25422 ln -s conftest.link conftest.lnk2
25423 if test "$cross_compiling" = yes; then :
25424 case "$host_os" in
25425 # Guess yes on glibc systems.
25426 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25427 # If we don't know, assume the worst.
25428 *) gl_cv_func_readlink_works="guessing no" ;;
25429 esac
25431 else
25432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25433 /* end confdefs.h. */
25434 #include <unistd.h>
25437 main ()
25439 char buf[20];
25440 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25442 return 0;
25444 _ACEOF
25445 if ac_fn_c_try_run "$LINENO"; then :
25446 gl_cv_func_readlink_works=yes
25447 else
25448 gl_cv_func_readlink_works=no
25450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25451 conftest.$ac_objext conftest.beam conftest.$ac_ext
25454 rm -f conftest.link conftest.lnk2
25456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25457 $as_echo "$gl_cv_func_readlink_works" >&6; }
25458 case "$gl_cv_func_readlink_works" in
25459 *yes)
25460 if test "$gl_cv_decl_readlink_works" != yes; then
25461 REPLACE_READLINK=1
25466 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25468 REPLACE_READLINK=1
25470 esac
25473 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25482 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25493 GNULIB_READLINK=1
25503 if test $ac_cv_func_readlinkat = no; then
25504 HAVE_READLINKAT=0
25507 if test $HAVE_READLINKAT = 0; then
25516 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25524 GNULIB_READLINKAT=1
25531 for ac_func in sig2str
25532 do :
25533 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25534 if test "x$ac_cv_func_sig2str" = x""yes; then :
25535 cat >>confdefs.h <<_ACEOF
25536 #define HAVE_SIG2STR 1
25537 _ACEOF
25540 done
25543 if test $ac_cv_func_sig2str = no; then
25552 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25569 if test $gl_cv_have_include_next = yes; then
25570 gl_cv_next_signal_h='<'signal.h'>'
25571 else
25572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25573 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
25574 if test "${gl_cv_next_signal_h+set}" = set; then :
25575 $as_echo_n "(cached) " >&6
25576 else
25578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25579 /* end confdefs.h. */
25580 #include <signal.h>
25582 _ACEOF
25583 case "$host_os" in
25584 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25585 *) gl_absname_cpp="$ac_cpp" ;;
25586 esac
25588 case "$host_os" in
25589 mingw*)
25590 gl_dirsep_regex='[/\\]'
25593 gl_dirsep_regex='\/'
25595 esac
25596 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25598 gl_header_literal_regex=`echo 'signal.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|^/[^/]|//&|
25606 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25607 sed -n "$gl_absolute_header_sed"`'"'
25611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25612 $as_echo "$gl_cv_next_signal_h" >&6; }
25614 NEXT_SIGNAL_H=$gl_cv_next_signal_h
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='<'signal.h'>'
25619 else
25620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25621 gl_next_as_first_directive=$gl_cv_next_signal_h
25623 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25629 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25630 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25631 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25632 #include <signal.h>
25635 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25637 else
25638 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25647 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25648 #include <signal.h>
25651 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25653 else
25654 HAVE_SIGHANDLER_T=0
25660 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25661 /* <sys/types.h> is not needed according to POSIX, but the
25662 <sys/socket.h> in i386-unknown-freebsd4.10 and
25663 powerpc-apple-darwin5.5 required it. */
25664 #include <sys/types.h>
25665 #if HAVE_SYS_SOCKET_H
25666 # include <sys/socket.h>
25667 #elif HAVE_WS2TCPIP_H
25668 # include <ws2tcpip.h>
25669 #endif
25672 if test "x$ac_cv_type_socklen_t" = x""yes; then :
25674 else
25675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25676 $as_echo_n "checking for socklen_t equivalent... " >&6; }
25677 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25678 $as_echo_n "(cached) " >&6
25679 else
25680 # Systems have either "struct sockaddr *" or
25681 # "void *" as the second argument to getpeername
25682 gl_cv_socklen_t_equiv=
25683 for arg2 in "struct sockaddr" void; do
25684 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25686 /* end confdefs.h. */
25687 #include <sys/types.h>
25688 #include <sys/socket.h>
25690 int getpeername (int, $arg2 *, $t *);
25692 main ()
25694 $t len;
25695 getpeername (0, 0, &len);
25697 return 0;
25699 _ACEOF
25700 if ac_fn_c_try_compile "$LINENO"; then :
25701 gl_cv_socklen_t_equiv="$t"
25703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25704 test "$gl_cv_socklen_t_equiv" != "" && break
25705 done
25706 test "$gl_cv_socklen_t_equiv" != "" && break
25707 done
25711 if test "$gl_cv_socklen_t_equiv" = ""; then
25712 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25715 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
25717 cat >>confdefs.h <<_ACEOF
25718 #define socklen_t $gl_cv_socklen_t_equiv
25719 _ACEOF
25724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25725 $as_echo_n "checking for ssize_t... " >&6; }
25726 if test "${gt_cv_ssize_t+set}" = set; then :
25727 $as_echo_n "(cached) " >&6
25728 else
25729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25730 /* end confdefs.h. */
25731 #include <sys/types.h>
25733 main ()
25735 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25736 return !x;
25738 return 0;
25740 _ACEOF
25741 if ac_fn_c_try_compile "$LINENO"; then :
25742 gt_cv_ssize_t=yes
25743 else
25744 gt_cv_ssize_t=no
25746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25749 $as_echo "$gt_cv_ssize_t" >&6; }
25750 if test $gt_cv_ssize_t = no; then
25752 $as_echo "#define ssize_t int" >>confdefs.h
25760 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>
25761 #include <sys/stat.h>
25763 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
25765 cat >>confdefs.h <<_ACEOF
25766 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25767 _ACEOF
25769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25770 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25771 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
25772 $as_echo_n "(cached) " >&6
25773 else
25774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25775 /* end confdefs.h. */
25777 #include <sys/types.h>
25778 #include <sys/stat.h>
25779 #if HAVE_SYS_TIME_H
25780 # include <sys/time.h>
25781 #endif
25782 #include <time.h>
25783 struct timespec ts;
25784 struct stat st;
25787 main ()
25790 st.st_atim = ts;
25793 return 0;
25795 _ACEOF
25796 if ac_fn_c_try_compile "$LINENO"; then :
25797 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25798 else
25799 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25804 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25805 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25807 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25810 else
25811 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>
25812 #include <sys/stat.h>
25814 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
25816 cat >>confdefs.h <<_ACEOF
25817 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25818 _ACEOF
25821 else
25822 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25823 #include <sys/stat.h>
25825 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
25827 cat >>confdefs.h <<_ACEOF
25828 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25829 _ACEOF
25832 else
25833 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>
25834 #include <sys/stat.h>
25836 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25838 cat >>confdefs.h <<_ACEOF
25839 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25840 _ACEOF
25855 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>
25856 #include <sys/stat.h>
25858 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25860 cat >>confdefs.h <<_ACEOF
25861 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25862 _ACEOF
25865 else
25866 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25867 #include <sys/stat.h>
25869 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
25871 cat >>confdefs.h <<_ACEOF
25872 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25873 _ACEOF
25876 else
25877 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>
25878 #include <sys/stat.h>
25880 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
25882 cat >>confdefs.h <<_ACEOF
25883 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25884 _ACEOF
25895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25896 $as_echo_n "checking for working stdalign.h... " >&6; }
25897 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
25898 $as_echo_n "(cached) " >&6
25899 else
25900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25901 /* end confdefs.h. */
25902 #include <stdalign.h>
25903 #include <stddef.h>
25905 /* Test that alignof yields a result consistent with offsetof.
25906 This catches GCC bug 52023
25907 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25908 #ifdef __cplusplus
25909 template <class t> struct alignof_helper { char a; t b; };
25910 # define ao(type) offsetof (alignof_helper<type>, b)
25911 #else
25912 # define ao(type) offsetof (struct { char a; type b; }, b)
25913 #endif
25914 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25915 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25916 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25918 /* Test _Alignas only on platforms where gnulib can help. */
25919 #if \
25920 ((defined __cplusplus && 201103 <= __cplusplus) \
25921 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
25922 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
25923 struct alignas_test { char c; char alignas (8) alignas_8; };
25924 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25925 ? 1 : -1];
25926 #endif
25929 main ()
25933 return 0;
25935 _ACEOF
25936 if ac_fn_c_try_compile "$LINENO"; then :
25937 gl_cv_header_working_stdalign_h=yes
25938 else
25939 gl_cv_header_working_stdalign_h=no
25941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25944 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25946 if test $gl_cv_header_working_stdalign_h = yes; then
25947 STDALIGN_H=''
25948 else
25949 STDALIGN_H='stdalign.h'
25953 if test -n "$STDALIGN_H"; then
25954 GL_GENERATE_STDALIGN_H_TRUE=
25955 GL_GENERATE_STDALIGN_H_FALSE='#'
25956 else
25957 GL_GENERATE_STDALIGN_H_TRUE='#'
25958 GL_GENERATE_STDALIGN_H_FALSE=
25963 STDARG_H=''
25964 NEXT_STDARG_H='<stdarg.h>'
25965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25966 $as_echo_n "checking for va_copy... " >&6; }
25967 if test "${gl_cv_func_va_copy+set}" = set; then :
25968 $as_echo_n "(cached) " >&6
25969 else
25971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25972 /* end confdefs.h. */
25973 #include <stdarg.h>
25975 main ()
25978 #ifndef va_copy
25979 void (*func) (va_list, va_list) = va_copy;
25980 #endif
25983 return 0;
25985 _ACEOF
25986 if ac_fn_c_try_compile "$LINENO"; then :
25987 gl_cv_func_va_copy=yes
25988 else
25989 gl_cv_func_va_copy=no
25991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25995 $as_echo "$gl_cv_func_va_copy" >&6; }
25996 if test $gl_cv_func_va_copy = no; then
25997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25998 /* end confdefs.h. */
25999 #if defined _AIX && !defined __GNUC__
26000 AIX vaccine
26001 #endif
26003 _ACEOF
26004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26005 $EGREP "vaccine" >/dev/null 2>&1; then :
26006 gl_aixcc=yes
26007 else
26008 gl_aixcc=no
26010 rm -f conftest*
26012 if test $gl_aixcc = yes; then
26013 STDARG_H=stdarg.h
26022 if test $gl_cv_have_include_next = yes; then
26023 gl_cv_next_stdarg_h='<'stdarg.h'>'
26024 else
26025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26026 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26027 if test "${gl_cv_next_stdarg_h+set}" = set; then :
26028 $as_echo_n "(cached) " >&6
26029 else
26031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26032 /* end confdefs.h. */
26033 #include <stdarg.h>
26035 _ACEOF
26036 case "$host_os" in
26037 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26038 *) gl_absname_cpp="$ac_cpp" ;;
26039 esac
26041 case "$host_os" in
26042 mingw*)
26043 gl_dirsep_regex='[/\\]'
26046 gl_dirsep_regex='\/'
26048 esac
26049 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26051 gl_header_literal_regex=`echo 'stdarg.h' \
26052 | sed -e "$gl_make_literal_regex_sed"`
26053 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26054 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26055 s|^/[^/]|//&|
26059 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26060 sed -n "$gl_absolute_header_sed"`'"'
26064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26065 $as_echo "$gl_cv_next_stdarg_h" >&6; }
26067 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26069 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26070 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26071 gl_next_as_first_directive='<'stdarg.h'>'
26072 else
26073 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26074 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26076 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
26081 if test "$gl_cv_next_stdarg_h" = '""'; then
26082 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26083 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26085 else
26087 saved_as_echo_n="$as_echo_n"
26088 as_echo_n=':'
26089 if test "${gl_cv_func___va_copy+set}" = set; then :
26090 $as_echo_n "(cached) " >&6
26091 else
26093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26094 /* end confdefs.h. */
26095 #include <stdarg.h>
26097 main ()
26100 #ifndef __va_copy
26101 error, bail out
26102 #endif
26105 return 0;
26107 _ACEOF
26108 if ac_fn_c_try_compile "$LINENO"; then :
26109 gl_cv_func___va_copy=yes
26110 else
26111 gl_cv_func___va_copy=no
26113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26116 as_echo_n="$saved_as_echo_n"
26118 if test $gl_cv_func___va_copy = yes; then
26120 $as_echo "#define va_copy __va_copy" >>confdefs.h
26122 else
26125 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
26131 if test -n "$STDARG_H"; then
26132 GL_GENERATE_STDARG_H_TRUE=
26133 GL_GENERATE_STDARG_H_FALSE='#'
26134 else
26135 GL_GENERATE_STDARG_H_TRUE='#'
26136 GL_GENERATE_STDARG_H_FALSE=
26144 # Define two additional variables used in the Makefile substitution.
26146 if test "$ac_cv_header_stdbool_h" = yes; then
26147 STDBOOL_H=''
26148 else
26149 STDBOOL_H='stdbool.h'
26152 if test -n "$STDBOOL_H"; then
26153 GL_GENERATE_STDBOOL_H_TRUE=
26154 GL_GENERATE_STDBOOL_H_FALSE='#'
26155 else
26156 GL_GENERATE_STDBOOL_H_TRUE='#'
26157 GL_GENERATE_STDBOOL_H_FALSE=
26161 if test "$ac_cv_type__Bool" = yes; then
26162 HAVE__BOOL=1
26163 else
26164 HAVE__BOOL=0
26171 STDDEF_H=
26172 if test $gt_cv_c_wchar_t = no; then
26173 HAVE_WCHAR_T=0
26174 STDDEF_H=stddef.h
26176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26177 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26178 if test "${gl_cv_decl_null_works+set}" = set; then :
26179 $as_echo_n "(cached) " >&6
26180 else
26181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26182 /* end confdefs.h. */
26183 #include <stddef.h>
26184 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26187 main ()
26191 return 0;
26193 _ACEOF
26194 if ac_fn_c_try_compile "$LINENO"; then :
26195 gl_cv_decl_null_works=yes
26196 else
26197 gl_cv_decl_null_works=no
26199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26202 $as_echo "$gl_cv_decl_null_works" >&6; }
26203 if test $gl_cv_decl_null_works = no; then
26204 REPLACE_NULL=1
26205 STDDEF_H=stddef.h
26208 if test -n "$STDDEF_H"; then
26209 GL_GENERATE_STDDEF_H_TRUE=
26210 GL_GENERATE_STDDEF_H_FALSE='#'
26211 else
26212 GL_GENERATE_STDDEF_H_TRUE='#'
26213 GL_GENERATE_STDDEF_H_FALSE=
26216 if test -n "$STDDEF_H"; then
26225 if test $gl_cv_have_include_next = yes; then
26226 gl_cv_next_stddef_h='<'stddef.h'>'
26227 else
26228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26229 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26230 if test "${gl_cv_next_stddef_h+set}" = set; then :
26231 $as_echo_n "(cached) " >&6
26232 else
26234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26235 /* end confdefs.h. */
26236 #include <stddef.h>
26238 _ACEOF
26239 case "$host_os" in
26240 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26241 *) gl_absname_cpp="$ac_cpp" ;;
26242 esac
26244 case "$host_os" in
26245 mingw*)
26246 gl_dirsep_regex='[/\\]'
26249 gl_dirsep_regex='\/'
26251 esac
26252 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26254 gl_header_literal_regex=`echo 'stddef.h' \
26255 | sed -e "$gl_make_literal_regex_sed"`
26256 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26257 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26258 s|^/[^/]|//&|
26262 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26263 sed -n "$gl_absolute_header_sed"`'"'
26267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26268 $as_echo "$gl_cv_next_stddef_h" >&6; }
26270 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26272 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26273 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26274 gl_next_as_first_directive='<'stddef.h'>'
26275 else
26276 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26277 gl_next_as_first_directive=$gl_cv_next_stddef_h
26279 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26297 if test $gl_cv_have_include_next = yes; then
26298 gl_cv_next_stdio_h='<'stdio.h'>'
26299 else
26300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26301 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26302 if test "${gl_cv_next_stdio_h+set}" = set; then :
26303 $as_echo_n "(cached) " >&6
26304 else
26306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26307 /* end confdefs.h. */
26308 #include <stdio.h>
26310 _ACEOF
26311 case "$host_os" in
26312 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26313 *) gl_absname_cpp="$ac_cpp" ;;
26314 esac
26316 case "$host_os" in
26317 mingw*)
26318 gl_dirsep_regex='[/\\]'
26321 gl_dirsep_regex='\/'
26323 esac
26324 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26326 gl_header_literal_regex=`echo 'stdio.h' \
26327 | sed -e "$gl_make_literal_regex_sed"`
26328 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26329 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26330 s|^/[^/]|//&|
26334 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26335 sed -n "$gl_absolute_header_sed"`'"'
26339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26340 $as_echo "$gl_cv_next_stdio_h" >&6; }
26342 NEXT_STDIO_H=$gl_cv_next_stdio_h
26344 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26346 gl_next_as_first_directive='<'stdio.h'>'
26347 else
26348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26349 gl_next_as_first_directive=$gl_cv_next_stdio_h
26351 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26357 GNULIB_FSCANF=1
26360 cat >>confdefs.h <<_ACEOF
26361 #define GNULIB_FSCANF 1
26362 _ACEOF
26365 GNULIB_SCANF=1
26368 cat >>confdefs.h <<_ACEOF
26369 #define GNULIB_SCANF 1
26370 _ACEOF
26373 GNULIB_FGETC=1
26374 GNULIB_GETC=1
26375 GNULIB_GETCHAR=1
26376 GNULIB_FGETS=1
26377 GNULIB_FREAD=1
26380 GNULIB_FPRINTF=1
26381 GNULIB_PRINTF=1
26382 GNULIB_VFPRINTF=1
26383 GNULIB_VPRINTF=1
26384 GNULIB_FPUTC=1
26385 GNULIB_PUTC=1
26386 GNULIB_PUTCHAR=1
26387 GNULIB_FPUTS=1
26388 GNULIB_PUTS=1
26389 GNULIB_FWRITE=1
26405 if test $gl_cv_have_include_next = yes; then
26406 gl_cv_next_stdlib_h='<'stdlib.h'>'
26407 else
26408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26409 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26410 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26411 $as_echo_n "(cached) " >&6
26412 else
26414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26415 /* end confdefs.h. */
26416 #include <stdlib.h>
26418 _ACEOF
26419 case "$host_os" in
26420 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26421 *) gl_absname_cpp="$ac_cpp" ;;
26422 esac
26424 case "$host_os" in
26425 mingw*)
26426 gl_dirsep_regex='[/\\]'
26429 gl_dirsep_regex='\/'
26431 esac
26432 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26434 gl_header_literal_regex=`echo 'stdlib.h' \
26435 | sed -e "$gl_make_literal_regex_sed"`
26436 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26437 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26438 s|^/[^/]|//&|
26442 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26443 sed -n "$gl_absolute_header_sed"`'"'
26447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26448 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26450 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26452 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26453 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26454 gl_next_as_first_directive='<'stdlib.h'>'
26455 else
26456 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26457 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26459 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26469 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
26477 $as_echo "#define my_strftime nstrftime" >>confdefs.h
26489 if test "$ac_cv_have_decl_strtoimax" != yes; then
26490 HAVE_DECL_STRTOIMAX=0
26493 if test $ac_cv_func_strtoimax = yes; then
26494 HAVE_STRTOIMAX=1
26495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26496 $as_echo_n "checking whether strtoimax works... " >&6; }
26497 if test "${gl_cv_func_strtoimax+set}" = set; then :
26498 $as_echo_n "(cached) " >&6
26499 else
26500 if test "$cross_compiling" = yes; then :
26501 case "$host_os" in
26502 # Guess no on AIX 5.
26503 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26504 # Guess yes otherwise.
26505 *) gl_cv_func_strtoimax="guessing yes" ;;
26506 esac
26508 else
26509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26510 /* end confdefs.h. */
26512 #include <errno.h>
26513 #include <string.h>
26514 #include <inttypes.h>
26515 int main ()
26517 if (sizeof (intmax_t) > sizeof (int))
26519 const char *s = "4294967295";
26520 char *p;
26521 intmax_t res;
26522 errno = 0;
26523 res = strtoimax (s, &p, 10);
26524 if (p != s + strlen (s))
26525 return 1;
26526 if (errno != 0)
26527 return 2;
26528 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26529 return 3;
26531 else
26533 const char *s = "2147483647";
26534 char *p;
26535 intmax_t res;
26536 errno = 0;
26537 res = strtoimax (s, &p, 10);
26538 if (p != s + strlen (s))
26539 return 1;
26540 if (errno != 0)
26541 return 2;
26542 if (res != 2147483647)
26543 return 3;
26545 return 0;
26548 _ACEOF
26549 if ac_fn_c_try_run "$LINENO"; then :
26550 gl_cv_func_strtoimax=yes
26551 else
26552 gl_cv_func_strtoimax=no
26554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26555 conftest.$ac_objext conftest.beam conftest.$ac_ext
26560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26561 $as_echo "$gl_cv_func_strtoimax" >&6; }
26562 case "$gl_cv_func_strtoimax" in
26563 *no) REPLACE_STRTOIMAX=1 ;;
26564 esac
26565 else
26566 HAVE_STRTOIMAX=0
26569 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26578 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26581 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26582 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26583 ac_have_decl=1
26584 else
26585 ac_have_decl=0
26588 cat >>confdefs.h <<_ACEOF
26589 #define HAVE_DECL_STRTOLL $ac_have_decl
26590 _ACEOF
26600 GNULIB_STRTOIMAX=1
26610 if test "$ac_cv_have_decl_strtoumax" != yes; then
26611 HAVE_DECL_STRTOUMAX=0
26614 if test $ac_cv_func_strtoumax = no; then
26623 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26626 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26627 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26628 ac_have_decl=1
26629 else
26630 ac_have_decl=0
26633 cat >>confdefs.h <<_ACEOF
26634 #define HAVE_DECL_STRTOULL $ac_have_decl
26635 _ACEOF
26645 GNULIB_STRTOUMAX=1
26653 if test $ac_cv_func_symlink = no; then
26654 HAVE_SYMLINK=0
26655 else
26656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26657 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26658 if test "${gl_cv_func_symlink_works+set}" = set; then :
26659 $as_echo_n "(cached) " >&6
26660 else
26661 if test "$cross_compiling" = yes; then :
26662 case "$host_os" in
26663 # Guess yes on glibc systems.
26664 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26665 # If we don't know, assume the worst.
26666 *) gl_cv_func_symlink_works="guessing no" ;;
26667 esac
26669 else
26670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26671 /* end confdefs.h. */
26672 #include <unistd.h>
26675 main ()
26677 int result = 0;
26678 if (!symlink ("a", "conftest.link/"))
26679 result |= 1;
26680 if (symlink ("conftest.f", "conftest.lnk2"))
26681 result |= 2;
26682 else if (!symlink ("a", "conftest.lnk2/"))
26683 result |= 4;
26684 return result;
26687 return 0;
26689 _ACEOF
26690 if ac_fn_c_try_run "$LINENO"; then :
26691 gl_cv_func_symlink_works=yes
26692 else
26693 gl_cv_func_symlink_works=no
26695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26696 conftest.$ac_objext conftest.beam conftest.$ac_ext
26699 rm -f conftest.f conftest.link conftest.lnk2
26701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
26702 $as_echo "$gl_cv_func_symlink_works" >&6; }
26703 case "$gl_cv_func_symlink_works" in
26704 *yes) ;;
26706 REPLACE_SYMLINK=1
26708 esac
26711 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
26720 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
26728 GNULIB_SYMLINK=1
26737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26738 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
26739 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
26740 $as_echo_n "(cached) " >&6
26741 else
26743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26744 /* end confdefs.h. */
26745 #include <sys/select.h>
26747 main ()
26749 struct timeval b;
26751 return 0;
26753 _ACEOF
26754 if ac_fn_c_try_compile "$LINENO"; then :
26755 gl_cv_header_sys_select_h_selfcontained=yes
26756 else
26757 gl_cv_header_sys_select_h_selfcontained=no
26759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26760 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26762 /* end confdefs.h. */
26763 #include <sys/select.h>
26765 main ()
26767 int memset; int bzero;
26769 return 0;
26772 _ACEOF
26773 if ac_fn_c_try_compile "$LINENO"; then :
26774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26775 /* end confdefs.h. */
26776 #include <sys/select.h>
26778 main ()
26781 #undef memset
26782 #define memset nonexistent_memset
26783 extern
26784 #ifdef __cplusplus
26786 #endif
26787 void *memset (void *, int, unsigned long);
26788 #undef bzero
26789 #define bzero nonexistent_bzero
26790 extern
26791 #ifdef __cplusplus
26793 #endif
26794 void bzero (void *, unsigned long);
26795 fd_set fds;
26796 FD_ZERO (&fds);
26799 return 0;
26802 _ACEOF
26803 if ac_fn_c_try_link "$LINENO"; then :
26805 else
26806 gl_cv_header_sys_select_h_selfcontained=no
26808 rm -f core conftest.err conftest.$ac_objext \
26809 conftest$ac_exeext conftest.$ac_ext
26812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26817 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26827 if test $gl_cv_have_include_next = yes; then
26828 gl_cv_next_sys_select_h='<'sys/select.h'>'
26829 else
26830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26831 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
26832 if test "${gl_cv_next_sys_select_h+set}" = set; then :
26833 $as_echo_n "(cached) " >&6
26834 else
26836 if test $ac_cv_header_sys_select_h = yes; then
26839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26840 /* end confdefs.h. */
26841 #include <sys/select.h>
26843 _ACEOF
26844 case "$host_os" in
26845 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26846 *) gl_absname_cpp="$ac_cpp" ;;
26847 esac
26849 case "$host_os" in
26850 mingw*)
26851 gl_dirsep_regex='[/\\]'
26854 gl_dirsep_regex='\/'
26856 esac
26857 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26859 gl_header_literal_regex=`echo 'sys/select.h' \
26860 | sed -e "$gl_make_literal_regex_sed"`
26861 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26862 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26863 s|^/[^/]|//&|
26867 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26868 sed -n "$gl_absolute_header_sed"`'"'
26869 else
26870 gl_cv_next_sys_select_h='<'sys/select.h'>'
26875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26876 $as_echo "$gl_cv_next_sys_select_h" >&6; }
26878 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26880 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26882 gl_next_as_first_directive='<'sys/select.h'>'
26883 else
26884 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26885 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26887 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26892 if test $ac_cv_header_sys_select_h = yes; then
26893 HAVE_SYS_SELECT_H=1
26894 else
26895 HAVE_SYS_SELECT_H=0
26902 if test $ac_cv_header_sys_socket_h != yes; then
26903 for ac_header in winsock2.h
26904 do :
26905 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26906 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26907 cat >>confdefs.h <<_ACEOF
26908 #define HAVE_WINSOCK2_H 1
26909 _ACEOF
26913 done
26916 if test "$ac_cv_header_winsock2_h" = yes; then
26917 HAVE_WINSOCK2_H=1
26918 UNISTD_H_HAVE_WINSOCK2_H=1
26919 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26920 else
26921 HAVE_WINSOCK2_H=0
26943 if test $gl_cv_have_include_next = yes; then
26944 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26945 else
26946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26947 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26948 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26949 $as_echo_n "(cached) " >&6
26950 else
26952 if test $ac_cv_header_sys_stat_h = yes; then
26955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26956 /* end confdefs.h. */
26957 #include <sys/stat.h>
26959 _ACEOF
26960 case "$host_os" in
26961 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26962 *) gl_absname_cpp="$ac_cpp" ;;
26963 esac
26965 case "$host_os" in
26966 mingw*)
26967 gl_dirsep_regex='[/\\]'
26970 gl_dirsep_regex='\/'
26972 esac
26973 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26975 gl_header_literal_regex=`echo 'sys/stat.h' \
26976 | sed -e "$gl_make_literal_regex_sed"`
26977 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26978 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26979 s|^/[^/]|//&|
26983 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26984 sed -n "$gl_absolute_header_sed"`'"'
26985 else
26986 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26992 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26994 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26996 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26997 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26998 gl_next_as_first_directive='<'sys/stat.h'>'
26999 else
27000 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27001 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27003 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27015 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
27017 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
27021 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27022 #include <sys/stat.h>
27024 if test "x$ac_cv_type_nlink_t" = x""yes; then :
27026 else
27028 $as_echo "#define nlink_t int" >>confdefs.h
27049 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27051 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27052 ac_have_decl=1
27053 else
27054 ac_have_decl=0
27057 cat >>confdefs.h <<_ACEOF
27058 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
27059 _ACEOF
27061 if test $ac_cv_have_decl_localtime_r = no; then
27062 HAVE_DECL_LOCALTIME_R=0
27066 if test $ac_cv_func_localtime_r = yes; then
27067 HAVE_LOCALTIME_R=1
27068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27069 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27070 if test "${gl_cv_time_r_posix+set}" = set; then :
27071 $as_echo_n "(cached) " >&6
27072 else
27073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27074 /* end confdefs.h. */
27075 #include <time.h>
27077 main ()
27079 /* We don't need to append 'restrict's to the argument types,
27080 even though the POSIX signature has the 'restrict's,
27081 since C99 says they can't affect type compatibility. */
27082 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27083 if (ptr) return 0;
27084 /* Check the return type is a pointer.
27085 On HP-UX 10 it is 'int'. */
27086 *localtime_r (0, 0);
27088 return 0;
27091 _ACEOF
27092 if ac_fn_c_try_compile "$LINENO"; then :
27093 gl_cv_time_r_posix=yes
27094 else
27095 gl_cv_time_r_posix=no
27097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27101 $as_echo "$gl_cv_time_r_posix" >&6; }
27102 if test $gl_cv_time_r_posix = yes; then
27103 REPLACE_LOCALTIME_R=0
27104 else
27105 REPLACE_LOCALTIME_R=1
27107 else
27108 HAVE_LOCALTIME_R=0
27111 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27120 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27131 GNULIB_TIME_R=1
27142 LIB_TIMER_TIME=
27144 gl_saved_libs=$LIBS
27145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27146 $as_echo_n "checking for library containing timer_settime... " >&6; }
27147 if test "${ac_cv_search_timer_settime+set}" = set; then :
27148 $as_echo_n "(cached) " >&6
27149 else
27150 ac_func_search_save_LIBS=$LIBS
27151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27152 /* end confdefs.h. */
27154 /* Override any GCC internal prototype to avoid an error.
27155 Use char because int might match the return type of a GCC
27156 builtin and then its argument prototype would still apply. */
27157 #ifdef __cplusplus
27158 extern "C"
27159 #endif
27160 char timer_settime ();
27162 main ()
27164 return timer_settime ();
27166 return 0;
27168 _ACEOF
27169 for ac_lib in '' rt posix4; do
27170 if test -z "$ac_lib"; then
27171 ac_res="none required"
27172 else
27173 ac_res=-l$ac_lib
27174 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27176 if ac_fn_c_try_link "$LINENO"; then :
27177 ac_cv_search_timer_settime=$ac_res
27179 rm -f core conftest.err conftest.$ac_objext \
27180 conftest$ac_exeext
27181 if test "${ac_cv_search_timer_settime+set}" = set; then :
27182 break
27184 done
27185 if test "${ac_cv_search_timer_settime+set}" = set; then :
27187 else
27188 ac_cv_search_timer_settime=no
27190 rm conftest.$ac_ext
27191 LIBS=$ac_func_search_save_LIBS
27193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27194 $as_echo "$ac_cv_search_timer_settime" >&6; }
27195 ac_res=$ac_cv_search_timer_settime
27196 if test "$ac_res" != no; then :
27197 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27198 test "$ac_cv_search_timer_settime" = "none required" ||
27199 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27203 /* end confdefs.h. */
27205 #include <features.h>
27206 #ifdef __GNU_LIBRARY__
27207 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27208 && !defined __UCLIBC__
27209 Thread emulation available
27210 #endif
27211 #endif
27213 _ACEOF
27214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27215 $EGREP "Thread" >/dev/null 2>&1; then :
27216 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27218 rm -f conftest*
27220 for ac_func in timer_settime
27221 do :
27222 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27223 if test "x$ac_cv_func_timer_settime" = x""yes; then :
27224 cat >>confdefs.h <<_ACEOF
27225 #define HAVE_TIMER_SETTIME 1
27226 _ACEOF
27229 done
27231 LIBS=$gl_saved_libs
27246 if test $gl_cv_have_include_next = yes; then
27247 gl_cv_next_unistd_h='<'unistd.h'>'
27248 else
27249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27250 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27251 if test "${gl_cv_next_unistd_h+set}" = set; then :
27252 $as_echo_n "(cached) " >&6
27253 else
27255 if test $ac_cv_header_unistd_h = yes; then
27258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27259 /* end confdefs.h. */
27260 #include <unistd.h>
27262 _ACEOF
27263 case "$host_os" in
27264 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27265 *) gl_absname_cpp="$ac_cpp" ;;
27266 esac
27268 case "$host_os" in
27269 mingw*)
27270 gl_dirsep_regex='[/\\]'
27273 gl_dirsep_regex='\/'
27275 esac
27276 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27278 gl_header_literal_regex=`echo 'unistd.h' \
27279 | sed -e "$gl_make_literal_regex_sed"`
27280 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27281 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27282 s|^/[^/]|//&|
27286 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27287 sed -n "$gl_absolute_header_sed"`'"'
27288 else
27289 gl_cv_next_unistd_h='<'unistd.h'>'
27294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27295 $as_echo "$gl_cv_next_unistd_h" >&6; }
27297 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27299 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27300 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27301 gl_next_as_first_directive='<'unistd.h'>'
27302 else
27303 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27304 gl_next_as_first_directive=$gl_cv_next_unistd_h
27306 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27311 if test $ac_cv_header_unistd_h = yes; then
27312 HAVE_UNISTD_H=1
27313 else
27314 HAVE_UNISTD_H=0
27327 if test $ac_cv_have_decl_unsetenv = no; then
27328 HAVE_DECL_UNSETENV=0
27330 for ac_func in unsetenv
27331 do :
27332 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27333 if test "x$ac_cv_func_unsetenv" = x""yes; then :
27334 cat >>confdefs.h <<_ACEOF
27335 #define HAVE_UNSETENV 1
27336 _ACEOF
27339 done
27341 if test $ac_cv_func_unsetenv = no; then
27342 HAVE_UNSETENV=0
27343 else
27344 HAVE_UNSETENV=1
27345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27346 $as_echo_n "checking for unsetenv() return type... " >&6; }
27347 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27348 $as_echo_n "(cached) " >&6
27349 else
27350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27351 /* end confdefs.h. */
27353 #undef _BSD
27354 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27355 #include <stdlib.h>
27356 extern
27357 #ifdef __cplusplus
27359 #endif
27360 int unsetenv (const char *name);
27363 main ()
27367 return 0;
27369 _ACEOF
27370 if ac_fn_c_try_compile "$LINENO"; then :
27371 gt_cv_func_unsetenv_ret='int'
27372 else
27373 gt_cv_func_unsetenv_ret='void'
27375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27378 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27379 if test $gt_cv_func_unsetenv_ret = 'void'; then
27381 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27383 REPLACE_UNSETENV=1
27386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27387 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27388 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27389 $as_echo_n "(cached) " >&6
27390 else
27391 if test "$cross_compiling" = yes; then :
27392 case "$host_os" in
27393 # Guess yes on glibc systems.
27394 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27395 # If we don't know, assume the worst.
27396 *) gl_cv_func_unsetenv_works="guessing no" ;;
27397 esac
27399 else
27400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27401 /* end confdefs.h. */
27403 #include <stdlib.h>
27404 #include <errno.h>
27405 extern char **environ;
27408 main ()
27411 char entry1[] = "a=1";
27412 char entry2[] = "b=2";
27413 char *env[] = { entry1, entry2, NULL };
27414 if (putenv ((char *) "a=1")) return 1;
27415 if (putenv (entry2)) return 2;
27416 entry2[0] = 'a';
27417 unsetenv ("a");
27418 if (getenv ("a")) return 3;
27419 if (!unsetenv ("") || errno != EINVAL) return 4;
27420 entry2[0] = 'b';
27421 environ = env;
27422 if (!getenv ("a")) return 5;
27423 entry2[0] = 'a';
27424 unsetenv ("a");
27425 if (getenv ("a")) return 6;
27428 return 0;
27430 _ACEOF
27431 if ac_fn_c_try_run "$LINENO"; then :
27432 gl_cv_func_unsetenv_works=yes
27433 else
27434 gl_cv_func_unsetenv_works=no
27436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27437 conftest.$ac_objext conftest.beam conftest.$ac_ext
27441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27442 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
27443 case "$gl_cv_func_unsetenv_works" in
27444 *yes) ;;
27446 REPLACE_UNSETENV=1
27448 esac
27451 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27460 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27472 GNULIB_UNSETENV=1
27484 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27486 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27487 if test "${gl_cv_func_futimesat_works+set}" = set; then :
27488 $as_echo_n "(cached) " >&6
27489 else
27490 touch conftest.file
27491 if test "$cross_compiling" = yes; then :
27492 case "$host_os" in
27493 # Guess yes on glibc systems.
27494 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27495 # If we don't know, assume the worst.
27496 *) gl_cv_func_futimesat_works="guessing no" ;;
27497 esac
27499 else
27500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27501 /* end confdefs.h. */
27503 #include <stddef.h>
27504 #include <sys/times.h>
27505 #include <fcntl.h>
27508 main ()
27510 int fd = open ("conftest.file", O_RDWR);
27511 if (fd < 0) return 1;
27512 if (futimesat (fd, NULL, NULL)) return 2;
27515 return 0;
27517 _ACEOF
27518 if ac_fn_c_try_run "$LINENO"; then :
27519 gl_cv_func_futimesat_works=yes
27520 else
27521 gl_cv_func_futimesat_works=no
27523 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27524 conftest.$ac_objext conftest.beam conftest.$ac_ext
27527 rm -f conftest.file
27529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27530 $as_echo "$gl_cv_func_futimesat_works" >&6; }
27531 case "$gl_cv_func_futimesat_works" in
27532 *yes) ;;
27535 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
27538 esac
27541 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
27542 gl_gnulib_enabled_dosname=false
27543 gl_gnulib_enabled_euidaccess=false
27544 gl_gnulib_enabled_getdtablesize=false
27545 gl_gnulib_enabled_getgroups=false
27546 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
27547 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
27548 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
27549 gl_gnulib_enabled_pathmax=false
27550 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
27551 gl_gnulib_enabled_secure_getenv=false
27552 gl_gnulib_enabled_stat=false
27553 gl_gnulib_enabled_strtoll=false
27554 gl_gnulib_enabled_strtoull=false
27555 gl_gnulib_enabled_tempname=false
27556 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
27557 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27559 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27568 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27570 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27573 func_gl_gnulib_m4code_dosname ()
27575 if ! $gl_gnulib_enabled_dosname; then
27576 gl_gnulib_enabled_dosname=true
27579 func_gl_gnulib_m4code_euidaccess ()
27581 if ! $gl_gnulib_enabled_euidaccess; then
27587 for ac_func in euidaccess
27588 do :
27589 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27590 if test "x$ac_cv_func_euidaccess" = x""yes; then :
27591 cat >>confdefs.h <<_ACEOF
27592 #define HAVE_EUIDACCESS 1
27593 _ACEOF
27596 done
27598 if test $ac_cv_func_euidaccess = no; then
27599 HAVE_EUIDACCESS=0
27602 if test $HAVE_EUIDACCESS = 0; then
27611 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27615 for ac_header in libgen.h
27616 do :
27617 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27618 if test "x$ac_cv_header_libgen_h" = x""yes; then :
27619 cat >>confdefs.h <<_ACEOF
27620 #define HAVE_LIBGEN_H 1
27621 _ACEOF
27625 done
27628 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27629 if test "x$ac_cv_func_getgroups" = x""yes; then :
27634 # If we don't yet have getgroups, see if it's in -lbsd.
27635 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27636 ac_save_LIBS=$LIBS
27637 if test $ac_cv_func_getgroups = no; then
27638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27639 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27640 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27641 $as_echo_n "(cached) " >&6
27642 else
27643 ac_check_lib_save_LIBS=$LIBS
27644 LIBS="-lbsd $LIBS"
27645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27646 /* end confdefs.h. */
27648 /* Override any GCC internal prototype to avoid an error.
27649 Use char because int might match the return type of a GCC
27650 builtin and then its argument prototype would still apply. */
27651 #ifdef __cplusplus
27652 extern "C"
27653 #endif
27654 char getgroups ();
27656 main ()
27658 return getgroups ();
27660 return 0;
27662 _ACEOF
27663 if ac_fn_c_try_link "$LINENO"; then :
27664 ac_cv_lib_bsd_getgroups=yes
27665 else
27666 ac_cv_lib_bsd_getgroups=no
27668 rm -f core conftest.err conftest.$ac_objext \
27669 conftest$ac_exeext conftest.$ac_ext
27670 LIBS=$ac_check_lib_save_LIBS
27672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27673 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27674 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27675 GETGROUPS_LIB=-lbsd
27680 # Run the program to test the functionality of the system-supplied
27681 # getgroups function only if there is such a function.
27682 if test $ac_cv_func_getgroups = yes; then
27683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27684 $as_echo_n "checking for working getgroups... " >&6; }
27685 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27686 $as_echo_n "(cached) " >&6
27687 else
27688 if test "$cross_compiling" = yes; then :
27689 case "$host_os" in # ((
27690 # Guess yes on glibc systems.
27691 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27692 # If we don't know, assume the worst.
27693 *) ac_cv_func_getgroups_works="guessing no" ;;
27694 esac
27696 else
27697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27698 /* end confdefs.h. */
27699 $ac_includes_default
27701 main ()
27703 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27704 return getgroups (0, 0) == -1;
27706 return 0;
27709 _ACEOF
27710 if ac_fn_c_try_run "$LINENO"; then :
27711 ac_cv_func_getgroups_works=yes
27712 else
27713 ac_cv_func_getgroups_works=no
27715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27716 conftest.$ac_objext conftest.beam conftest.$ac_ext
27721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27722 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27723 else
27724 ac_cv_func_getgroups_works=no
27726 case "$ac_cv_func_getgroups_works" in
27727 *yes)
27729 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27732 esac
27733 LIBS=$ac_save_LIBS
27736 # Solaris 9 and 10 need -lgen to get the eaccess function.
27737 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
27738 # programs in the package would end up linked with that potentially-shared
27739 # library, inducing unnecessary run-time overhead.
27740 LIB_EACCESS=
27742 gl_saved_libs=$LIBS
27743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
27744 $as_echo_n "checking for library containing eaccess... " >&6; }
27745 if test "${ac_cv_search_eaccess+set}" = set; then :
27746 $as_echo_n "(cached) " >&6
27747 else
27748 ac_func_search_save_LIBS=$LIBS
27749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27750 /* end confdefs.h. */
27752 /* Override any GCC internal prototype to avoid an error.
27753 Use char because int might match the return type of a GCC
27754 builtin and then its argument prototype would still apply. */
27755 #ifdef __cplusplus
27756 extern "C"
27757 #endif
27758 char eaccess ();
27760 main ()
27762 return eaccess ();
27764 return 0;
27766 _ACEOF
27767 for ac_lib in '' gen; do
27768 if test -z "$ac_lib"; then
27769 ac_res="none required"
27770 else
27771 ac_res=-l$ac_lib
27772 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27774 if ac_fn_c_try_link "$LINENO"; then :
27775 ac_cv_search_eaccess=$ac_res
27777 rm -f core conftest.err conftest.$ac_objext \
27778 conftest$ac_exeext
27779 if test "${ac_cv_search_eaccess+set}" = set; then :
27780 break
27782 done
27783 if test "${ac_cv_search_eaccess+set}" = set; then :
27785 else
27786 ac_cv_search_eaccess=no
27788 rm conftest.$ac_ext
27789 LIBS=$ac_func_search_save_LIBS
27791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
27792 $as_echo "$ac_cv_search_eaccess" >&6; }
27793 ac_res=$ac_cv_search_eaccess
27794 if test "$ac_res" != no; then :
27795 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27796 test "$ac_cv_search_eaccess" = "none required" ||
27797 LIB_EACCESS=$ac_cv_search_eaccess
27800 for ac_func in eaccess
27801 do :
27802 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27803 if test "x$ac_cv_func_eaccess" = x""yes; then :
27804 cat >>confdefs.h <<_ACEOF
27805 #define HAVE_EACCESS 1
27806 _ACEOF
27809 done
27811 LIBS=$gl_saved_libs
27819 GNULIB_EUIDACCESS=1
27825 gl_gnulib_enabled_euidaccess=true
27826 if test $HAVE_EUIDACCESS = 0; then
27827 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
27829 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
27830 if test $HAVE_EUIDACCESS = 0; then
27831 func_gl_gnulib_m4code_stat
27835 func_gl_gnulib_m4code_getdtablesize ()
27837 if ! $gl_gnulib_enabled_getdtablesize; then
27841 if test $ac_cv_func_getdtablesize != yes; then
27842 HAVE_GETDTABLESIZE=0
27845 if test $HAVE_GETDTABLESIZE = 0; then
27854 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
27863 GNULIB_GETDTABLESIZE=1
27869 gl_gnulib_enabled_getdtablesize=true
27872 func_gl_gnulib_m4code_getgroups ()
27874 if ! $gl_gnulib_enabled_getgroups; then
27880 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27881 if test "x$ac_cv_func_getgroups" = x""yes; then :
27886 # If we don't yet have getgroups, see if it's in -lbsd.
27887 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27888 ac_save_LIBS=$LIBS
27889 if test $ac_cv_func_getgroups = no; then
27890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27891 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
27892 if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27893 $as_echo_n "(cached) " >&6
27894 else
27895 ac_check_lib_save_LIBS=$LIBS
27896 LIBS="-lbsd $LIBS"
27897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27898 /* end confdefs.h. */
27900 /* Override any GCC internal prototype to avoid an error.
27901 Use char because int might match the return type of a GCC
27902 builtin and then its argument prototype would still apply. */
27903 #ifdef __cplusplus
27904 extern "C"
27905 #endif
27906 char getgroups ();
27908 main ()
27910 return getgroups ();
27912 return 0;
27914 _ACEOF
27915 if ac_fn_c_try_link "$LINENO"; then :
27916 ac_cv_lib_bsd_getgroups=yes
27917 else
27918 ac_cv_lib_bsd_getgroups=no
27920 rm -f core conftest.err conftest.$ac_objext \
27921 conftest$ac_exeext conftest.$ac_ext
27922 LIBS=$ac_check_lib_save_LIBS
27924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27925 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27926 if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27927 GETGROUPS_LIB=-lbsd
27932 # Run the program to test the functionality of the system-supplied
27933 # getgroups function only if there is such a function.
27934 if test $ac_cv_func_getgroups = yes; then
27935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27936 $as_echo_n "checking for working getgroups... " >&6; }
27937 if test "${ac_cv_func_getgroups_works+set}" = set; then :
27938 $as_echo_n "(cached) " >&6
27939 else
27940 if test "$cross_compiling" = yes; then :
27941 case "$host_os" in # ((
27942 # Guess yes on glibc systems.
27943 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27944 # If we don't know, assume the worst.
27945 *) ac_cv_func_getgroups_works="guessing no" ;;
27946 esac
27948 else
27949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27950 /* end confdefs.h. */
27951 $ac_includes_default
27953 main ()
27955 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
27956 return getgroups (0, 0) == -1;
27958 return 0;
27961 _ACEOF
27962 if ac_fn_c_try_run "$LINENO"; then :
27963 ac_cv_func_getgroups_works=yes
27964 else
27965 ac_cv_func_getgroups_works=no
27967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27968 conftest.$ac_objext conftest.beam conftest.$ac_ext
27973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27974 $as_echo "$ac_cv_func_getgroups_works" >&6; }
27975 else
27976 ac_cv_func_getgroups_works=no
27978 case "$ac_cv_func_getgroups_works" in
27979 *yes)
27981 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27984 esac
27985 LIBS=$ac_save_LIBS
27987 if test $ac_cv_func_getgroups != yes; then
27988 HAVE_GETGROUPS=0
27989 else
27990 if test "$ac_cv_type_getgroups" != gid_t \
27991 || { case "$ac_cv_func_getgroups_works" in
27992 *yes) false;;
27993 *) true;;
27994 esac
27995 }; then
27996 REPLACE_GETGROUPS=1
27998 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28000 else
28001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28002 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
28003 if test "${gl_cv_func_getgroups_works+set}" = set; then :
28004 $as_echo_n "(cached) " >&6
28005 else
28006 if test "$cross_compiling" = yes; then :
28007 case "$host_os" in
28008 # Guess yes on glibc systems.
28009 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28010 # If we don't know, assume the worst.
28011 *) gl_cv_func_getgroups_works="guessing no" ;;
28012 esac
28014 else
28015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28016 /* end confdefs.h. */
28017 $ac_includes_default
28019 main ()
28021 int size = getgroups (0, 0);
28022 gid_t *list = malloc (size * sizeof *list);
28023 return getgroups (-1, list) != -1;
28025 return 0;
28027 _ACEOF
28028 if ac_fn_c_try_run "$LINENO"; then :
28029 gl_cv_func_getgroups_works=yes
28030 else
28031 gl_cv_func_getgroups_works=no
28033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28034 conftest.$ac_objext conftest.beam conftest.$ac_ext
28038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28039 $as_echo "$gl_cv_func_getgroups_works" >&6; }
28040 case "$gl_cv_func_getgroups_works" in
28041 *yes) ;;
28042 *) REPLACE_GETGROUPS=1 ;;
28043 esac
28046 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28048 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28057 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28065 GNULIB_GETGROUPS=1
28071 gl_gnulib_enabled_getgroups=true
28074 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28076 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28079 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28082 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28084 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28090 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28091 if test "x$ac_cv_func_group_member" = x""yes; then :
28093 else
28095 HAVE_GROUP_MEMBER=0
28100 if test $HAVE_GROUP_MEMBER = 0; then
28109 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28120 GNULIB_GROUP_MEMBER=1
28126 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28127 if test $HAVE_GROUP_MEMBER = 0; then
28128 func_gl_gnulib_m4code_getgroups
28130 if test $HAVE_GROUP_MEMBER = 0; then
28131 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28135 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28137 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28138 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28141 func_gl_gnulib_m4code_pathmax ()
28143 if ! $gl_gnulib_enabled_pathmax; then
28147 gl_gnulib_enabled_pathmax=true
28150 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28152 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28153 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28156 func_gl_gnulib_m4code_secure_getenv ()
28158 if ! $gl_gnulib_enabled_secure_getenv; then
28164 if test $ac_cv_func_secure_getenv = no; then
28165 HAVE_SECURE_GETENV=0
28168 if test $HAVE_SECURE_GETENV = 0; then
28177 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28180 for ac_func in __secure_getenv
28181 do :
28182 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28183 if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28184 cat >>confdefs.h <<_ACEOF
28185 #define HAVE___SECURE_GETENV 1
28186 _ACEOF
28189 done
28191 if test $ac_cv_func___secure_getenv = no; then
28192 for ac_func in issetugid
28193 do :
28194 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28195 if test "x$ac_cv_func_issetugid" = x""yes; then :
28196 cat >>confdefs.h <<_ACEOF
28197 #define HAVE_ISSETUGID 1
28198 _ACEOF
28201 done
28211 GNULIB_SECURE_GETENV=1
28217 gl_gnulib_enabled_secure_getenv=true
28220 func_gl_gnulib_m4code_stat ()
28222 if ! $gl_gnulib_enabled_stat; then
28226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28227 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28228 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28229 $as_echo_n "(cached) " >&6
28230 else
28231 if test "$cross_compiling" = yes; then :
28232 case $host_os in
28233 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28234 *) gl_cv_func_stat_dir_slash="guessing yes";;
28235 esac
28236 else
28237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28238 /* end confdefs.h. */
28239 #include <sys/stat.h>
28242 main ()
28244 struct stat st; return stat (".", &st) != stat ("./", &st);
28246 return 0;
28248 _ACEOF
28249 if ac_fn_c_try_run "$LINENO"; then :
28250 gl_cv_func_stat_dir_slash=yes
28251 else
28252 gl_cv_func_stat_dir_slash=no
28254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28255 conftest.$ac_objext conftest.beam conftest.$ac_ext
28259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28260 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28262 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28263 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28264 $as_echo_n "(cached) " >&6
28265 else
28266 touch conftest.tmp
28267 # Assume that if we have lstat, we can also check symlinks.
28268 if test $ac_cv_func_lstat = yes; then
28269 ln -s conftest.tmp conftest.lnk
28271 if test "$cross_compiling" = yes; then :
28272 case "$host_os" in
28273 # Guess yes on glibc systems.
28274 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28275 # If we don't know, assume the worst.
28276 *) gl_cv_func_stat_file_slash="guessing no" ;;
28277 esac
28279 else
28280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28281 /* end confdefs.h. */
28282 #include <sys/stat.h>
28285 main ()
28287 int result = 0;
28288 struct stat st;
28289 if (!stat ("conftest.tmp/", &st))
28290 result |= 1;
28291 #if HAVE_LSTAT
28292 if (!stat ("conftest.lnk/", &st))
28293 result |= 2;
28294 #endif
28295 return result;
28298 return 0;
28300 _ACEOF
28301 if ac_fn_c_try_run "$LINENO"; then :
28302 gl_cv_func_stat_file_slash=yes
28303 else
28304 gl_cv_func_stat_file_slash=no
28306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28307 conftest.$ac_objext conftest.beam conftest.$ac_ext
28310 rm -f conftest.tmp conftest.lnk
28312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28313 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28314 case $gl_cv_func_stat_dir_slash in
28315 *no) REPLACE_STAT=1
28317 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28319 esac
28320 case $gl_cv_func_stat_file_slash in
28321 *no) REPLACE_STAT=1
28323 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28325 esac
28327 if test $REPLACE_STAT = 1; then
28336 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28345 GNULIB_STAT=1
28351 gl_gnulib_enabled_stat=true
28352 if test $REPLACE_STAT = 1; then
28353 func_gl_gnulib_m4code_dosname
28355 if test $REPLACE_STAT = 1; then
28356 func_gl_gnulib_m4code_pathmax
28360 func_gl_gnulib_m4code_strtoll ()
28362 if ! $gl_gnulib_enabled_strtoll; then
28366 if test "$ac_cv_type_long_long_int" = yes; then
28367 for ac_func in strtoll
28368 do :
28369 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28370 if test "x$ac_cv_func_strtoll" = x""yes; then :
28371 cat >>confdefs.h <<_ACEOF
28372 #define HAVE_STRTOLL 1
28373 _ACEOF
28376 done
28378 if test $ac_cv_func_strtoll = no; then
28379 HAVE_STRTOLL=0
28383 if test $HAVE_STRTOLL = 0; then
28392 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
28403 GNULIB_STRTOLL=1
28409 gl_gnulib_enabled_strtoll=true
28412 func_gl_gnulib_m4code_strtoull ()
28414 if ! $gl_gnulib_enabled_strtoull; then
28418 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28419 for ac_func in strtoull
28420 do :
28421 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28422 if test "x$ac_cv_func_strtoull" = x""yes; then :
28423 cat >>confdefs.h <<_ACEOF
28424 #define HAVE_STRTOULL 1
28425 _ACEOF
28428 done
28430 if test $ac_cv_func_strtoull = no; then
28431 HAVE_STRTOULL=0
28435 if test $HAVE_STRTOULL = 0; then
28444 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28455 GNULIB_STRTOULL=1
28461 gl_gnulib_enabled_strtoull=true
28464 func_gl_gnulib_m4code_tempname ()
28466 if ! $gl_gnulib_enabled_tempname; then
28472 gl_gnulib_enabled_tempname=true
28473 func_gl_gnulib_m4code_secure_getenv
28476 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28478 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28479 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28482 if test $HAVE_FACCESSAT = 0; then
28483 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28485 if test $HAVE_FACCESSAT = 0; then
28486 func_gl_gnulib_m4code_dosname
28488 if test $HAVE_FACCESSAT = 0; then
28489 func_gl_gnulib_m4code_euidaccess
28491 if test $HAVE_FACCESSAT = 0; then
28492 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28494 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
28495 func_gl_gnulib_m4code_getdtablesize
28497 if test $HAVE_FDOPENDIR = 0; then
28498 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28500 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28501 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28503 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28504 func_gl_gnulib_m4code_dosname
28506 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28507 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28509 if test $REPLACE_GETOPT = 1; then
28510 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28512 if test $REPLACE_LSTAT = 1; then
28513 func_gl_gnulib_m4code_dosname
28515 if test $REPLACE_LSTAT = 1; then
28516 func_gl_gnulib_m4code_stat
28518 if test $HAVE_MKOSTEMP = 0; then
28519 func_gl_gnulib_m4code_tempname
28521 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28522 func_gl_gnulib_m4code_stat
28524 if test $HAVE_READLINKAT = 0; then
28525 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28527 if test $HAVE_READLINKAT = 0; then
28528 func_gl_gnulib_m4code_dosname
28530 if test $HAVE_READLINKAT = 0; then
28531 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28533 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28534 func_gl_gnulib_m4code_strtoll
28536 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28537 func_gl_gnulib_m4code_strtoull
28540 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28541 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28542 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28543 else
28544 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28545 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28548 if $gl_gnulib_enabled_dosname; then
28549 gl_GNULIB_ENABLED_dosname_TRUE=
28550 gl_GNULIB_ENABLED_dosname_FALSE='#'
28551 else
28552 gl_GNULIB_ENABLED_dosname_TRUE='#'
28553 gl_GNULIB_ENABLED_dosname_FALSE=
28556 if $gl_gnulib_enabled_euidaccess; then
28557 gl_GNULIB_ENABLED_euidaccess_TRUE=
28558 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28559 else
28560 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28561 gl_GNULIB_ENABLED_euidaccess_FALSE=
28564 if $gl_gnulib_enabled_getdtablesize; then
28565 gl_GNULIB_ENABLED_getdtablesize_TRUE=
28566 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
28567 else
28568 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
28569 gl_GNULIB_ENABLED_getdtablesize_FALSE=
28572 if $gl_gnulib_enabled_getgroups; then
28573 gl_GNULIB_ENABLED_getgroups_TRUE=
28574 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28575 else
28576 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28577 gl_GNULIB_ENABLED_getgroups_FALSE=
28580 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28581 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28582 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28583 else
28584 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28585 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28588 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28589 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28590 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28591 else
28592 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28593 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28596 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28597 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28598 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28599 else
28600 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28601 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28604 if $gl_gnulib_enabled_pathmax; then
28605 gl_GNULIB_ENABLED_pathmax_TRUE=
28606 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28607 else
28608 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28609 gl_GNULIB_ENABLED_pathmax_FALSE=
28612 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28613 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28614 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28615 else
28616 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28617 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28620 if $gl_gnulib_enabled_secure_getenv; then
28621 gl_GNULIB_ENABLED_secure_getenv_TRUE=
28622 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
28623 else
28624 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
28625 gl_GNULIB_ENABLED_secure_getenv_FALSE=
28628 if $gl_gnulib_enabled_stat; then
28629 gl_GNULIB_ENABLED_stat_TRUE=
28630 gl_GNULIB_ENABLED_stat_FALSE='#'
28631 else
28632 gl_GNULIB_ENABLED_stat_TRUE='#'
28633 gl_GNULIB_ENABLED_stat_FALSE=
28636 if $gl_gnulib_enabled_strtoll; then
28637 gl_GNULIB_ENABLED_strtoll_TRUE=
28638 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28639 else
28640 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28641 gl_GNULIB_ENABLED_strtoll_FALSE=
28644 if $gl_gnulib_enabled_strtoull; then
28645 gl_GNULIB_ENABLED_strtoull_TRUE=
28646 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28647 else
28648 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28649 gl_GNULIB_ENABLED_strtoull_FALSE=
28652 if $gl_gnulib_enabled_tempname; then
28653 gl_GNULIB_ENABLED_tempname_TRUE=
28654 gl_GNULIB_ENABLED_tempname_FALSE='#'
28655 else
28656 gl_GNULIB_ENABLED_tempname_TRUE='#'
28657 gl_GNULIB_ENABLED_tempname_FALSE=
28660 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28661 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28662 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28663 else
28664 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28665 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28668 # End of code from modules
28678 gltests_libdeps=
28679 gltests_ltlibdeps=
28689 gl_source_base='tests'
28690 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
28692 gl_module_indicator_condition=$gltests_WITNESS
28703 LIBGNU_LIBDEPS="$gl_libdeps"
28705 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28708 CFLAGS=$SAVE_CFLAGS
28709 LIBS=$SAVE_LIBS
28711 if test "${opsys}" = "mingw32"; then
28712 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
28713 # Remove unneeded switches from the value of CC that goes to Makefiles
28714 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
28717 case "$opsys" in
28718 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
28720 darwin)
28721 ## The -headerpad option tells ld (see man page) to leave room at the
28722 ## end of the header for adding load commands. Needed for dumping.
28723 ## 0x690 is the total size of 30 segment load commands (at 56
28724 ## each); under Cocoa 31 commands are required.
28725 if test "$HAVE_NS" = "yes"; then
28726 libs_nsgui="-framework AppKit"
28727 if test "$NS_IMPL_COCOA" = "yes"; then
28728 libs_nsgui="$libs_nsgui -framework IOKit"
28730 headerpad_extra=6C8
28731 else
28732 libs_nsgui=
28733 headerpad_extra=690
28735 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
28737 ## This is here because src/Makefile.in did some extra fiddling around
28738 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
28739 ## LD_SWITCH_SYSTEM_TEMACS instead,
28740 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
28741 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
28744 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
28745 ## find X at run-time.
28746 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
28747 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
28748 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
28749 ## had different values in configure (in ac_link) and src/Makefile.in.
28750 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
28751 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
28753 mingw32)
28754 ## MinGW64 does not prepend an underscore to symbols, so we must
28755 ## pass a different -entry switch to linker. FIXME: It is better
28756 ## to make the entry points the same by changing unexw32.c.
28757 case "$canonical" in
28758 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
28759 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
28760 esac
28763 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
28765 *) LD_SWITCH_SYSTEM_TEMACS= ;;
28766 esac
28768 if test x$ac_enable_profiling != x ; then
28769 case $opsys in
28770 *freebsd | gnu-linux) ;;
28771 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
28772 esac
28777 ## MinGW-specific post-link processing of temacs.
28778 TEMACS_POST_LINK=":"
28779 ADDSECTION=
28780 EMACS_HEAPSIZE=
28781 if test "${opsys}" = "mingw32"; then
28782 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
28783 ADDSECTION="../nt/addsection\$(EXEEXT)"
28784 ## Preload heap size of temacs.exe in MB.
28785 case "$canonical" in
28786 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
28787 *) EMACS_HEAPSIZE=27 ;;
28788 esac
28795 ## Common for all window systems
28796 if test "$window_system" != "none"; then
28798 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
28800 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
28807 #### Report on what we decided to do.
28808 #### Report GTK as a toolkit, even if it doesn't use Xt.
28809 #### It makes printing result more understandable as using GTK sets
28810 #### toolkit_scroll_bars to yes by default.
28811 if test "${HAVE_GTK}" = "yes"; then
28812 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
28815 if test $USE_ACL -ne 0; then
28816 acl_summary="yes $LIB_ACL"
28817 else
28818 acl_summary=no
28821 echo "
28822 Configured for \`${canonical}'.
28824 Where should the build process find the source code? ${srcdir}
28825 What compiler should emacs be built with? ${CC} ${CFLAGS}
28826 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
28827 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
28828 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
28829 What window system should Emacs use? ${window_system}
28830 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
28832 if test -n "${x_includes}"; then
28833 echo " Where do we find X Windows header files? ${x_includes}"
28834 else
28835 echo " Where do we find X Windows header files? Standard dirs"
28837 if test -n "${x_libraries}"; then
28838 echo " Where do we find X Windows libraries? ${x_libraries}"
28839 else
28840 echo " Where do we find X Windows libraries? Standard dirs"
28843 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
28844 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
28845 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
28846 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
28847 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
28848 echo " Does Emacs use -lpng? ${HAVE_PNG}"
28849 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
28850 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
28852 echo " Does Emacs support sound? ${HAVE_SOUND}"
28854 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
28855 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
28856 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
28857 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
28858 echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28859 echo " Does Emacs use access control lists? ${acl_summary}"
28860 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
28861 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
28862 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
28864 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
28865 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
28866 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
28867 echo " Does Emacs use -lxft? ${HAVE_XFT}"
28869 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
28870 echo
28872 if test -n "${EMACSDATA}"; then
28873 echo " Environment variable EMACSDATA set to: $EMACSDATA"
28875 if test -n "${EMACSDOC}"; then
28876 echo " Environment variable EMACSDOC set to: $EMACSDOC"
28879 echo
28881 if test "$HAVE_NS" = "yes"; then
28882 echo
28883 echo "You must run \"${MAKE-make} install\" in order to test the built application.
28884 The installed application will go to nextstep/Emacs.app and can be
28885 run or moved from there."
28886 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
28887 echo "The application will be fully self-contained."
28888 else
28889 echo "The lisp resources for the application will be installed under ${prefix}.
28890 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
28891 to run if these resources are not installed."
28893 echo
28896 if test "${opsys}" = "cygwin"; then
28897 case `uname -r` in
28898 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
28899 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
28900 echo
28902 esac
28905 # Remove any trailing slashes in these variables.
28906 test "${prefix}" != NONE &&
28907 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
28908 test "${exec_prefix}" != NONE &&
28909 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
28911 if test "$HAVE_NS" = "yes"; then
28912 if test "$NS_IMPL_GNUSTEP" = yes; then
28913 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"
28915 else
28916 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"
28921 SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
28923 ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
28926 opt_makefile=test/automated/Makefile
28928 if test -f "$srcdir/$opt_makefile.in"; then
28929 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28930 ac_config_files="$ac_config_files test/automated/Makefile"
28935 opt_makefile=admin/unidata/Makefile
28937 if test -f "$srcdir/$opt_makefile.in"; then
28938 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28939 ac_config_files="$ac_config_files admin/unidata/Makefile"
28944 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
28948 ac_config_commands="$ac_config_commands src/epaths.h"
28951 ac_config_commands="$ac_config_commands src/.gdbinit"
28954 cat >confcache <<\_ACEOF
28955 # This file is a shell script that caches the results of configure
28956 # tests run on this system so they can be shared between configure
28957 # scripts and configure runs, see configure's option --config-cache.
28958 # It is not useful on other systems. If it contains results you don't
28959 # want to keep, you may remove or edit it.
28961 # config.status only pays attention to the cache file if you give it
28962 # the --recheck option to rerun configure.
28964 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28965 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28966 # following values.
28968 _ACEOF
28970 # The following way of writing the cache mishandles newlines in values,
28971 # but we know of no workaround that is simple, portable, and efficient.
28972 # So, we kill variables containing newlines.
28973 # Ultrix sh set writes to stderr and can't be redirected directly,
28974 # and sets the high bit in the cache file unless we assign to the vars.
28976 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28977 eval ac_val=\$$ac_var
28978 case $ac_val in #(
28979 *${as_nl}*)
28980 case $ac_var in #(
28981 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28982 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28983 esac
28984 case $ac_var in #(
28985 _ | IFS | as_nl) ;; #(
28986 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28987 *) { eval $ac_var=; unset $ac_var;} ;;
28988 esac ;;
28989 esac
28990 done
28992 (set) 2>&1 |
28993 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28994 *${as_nl}ac_space=\ *)
28995 # `set' does not quote correctly, so add quotes: double-quote
28996 # substitution turns \\\\ into \\, and sed turns \\ into \.
28997 sed -n \
28998 "s/'/'\\\\''/g;
28999 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29000 ;; #(
29002 # `set' quotes correctly as required by POSIX, so do not add quotes.
29003 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29005 esac |
29006 sort
29008 sed '
29009 /^ac_cv_env_/b end
29010 t clear
29011 :clear
29012 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29013 t end
29014 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29015 :end' >>confcache
29016 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29017 if test -w "$cache_file"; then
29018 test "x$cache_file" != "x/dev/null" &&
29019 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29020 $as_echo "$as_me: updating cache $cache_file" >&6;}
29021 cat confcache >$cache_file
29022 else
29023 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29024 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29027 rm -f confcache
29029 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29030 # Let make expand exec_prefix.
29031 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29033 DEFS=-DHAVE_CONFIG_H
29035 ac_libobjs=
29036 ac_ltlibobjs=
29037 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29038 # 1. Remove the extension, and $U if already installed.
29039 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29040 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29041 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29042 # will be set to the directory where LIBOBJS objects are built.
29043 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29044 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29045 done
29046 LIBOBJS=$ac_libobjs
29048 LTLIBOBJS=$ac_ltlibobjs
29051 if test -n "$EXEEXT"; then
29052 am__EXEEXT_TRUE=
29053 am__EXEEXT_FALSE='#'
29054 else
29055 am__EXEEXT_TRUE='#'
29056 am__EXEEXT_FALSE=
29059 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29060 as_fn_error "conditional \"AMDEP\" was never defined.
29061 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29063 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29064 as_fn_error "conditional \"am__fastdepCC\" was never defined.
29065 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29067 if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29068 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29069 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29071 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29072 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
29073 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29075 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29076 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29077 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29080 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29081 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29082 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29084 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29085 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29086 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29088 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29089 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29090 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29092 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29093 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29094 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29096 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
29097 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
29098 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29100 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29101 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29102 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29104 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29105 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29106 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29108 if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29109 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29110 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29112 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
29113 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
29114 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29116 if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29117 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29118 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29120 if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29121 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29122 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29124 if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29125 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29126 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29128 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
29129 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
29130 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29132 if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29133 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29134 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29136 if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29137 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29140 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29141 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29142 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29144 if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29145 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29146 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29148 if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29149 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29150 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29152 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
29153 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
29154 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29156 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
29157 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
29158 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29160 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
29161 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
29162 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29164 if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29165 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29166 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29168 if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29169 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29170 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29173 gl_libobjs=
29174 gl_ltlibobjs=
29175 if test -n "$gl_LIBOBJS"; then
29176 # Remove the extension.
29177 sed_drop_objext='s/\.o$//;s/\.obj$//'
29178 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29179 gl_libobjs="$gl_libobjs $i.$ac_objext"
29180 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29181 done
29183 gl_LIBOBJS=$gl_libobjs
29185 gl_LTLIBOBJS=$gl_ltlibobjs
29189 gltests_libobjs=
29190 gltests_ltlibobjs=
29191 if test -n "$gltests_LIBOBJS"; then
29192 # Remove the extension.
29193 sed_drop_objext='s/\.o$//;s/\.obj$//'
29194 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29195 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29196 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29197 done
29199 gltests_LIBOBJS=$gltests_libobjs
29201 gltests_LTLIBOBJS=$gltests_ltlibobjs
29205 : ${CONFIG_STATUS=./config.status}
29206 ac_write_fail=0
29207 ac_clean_files_save=$ac_clean_files
29208 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29209 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29210 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29211 as_write_fail=0
29212 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29213 #! $SHELL
29214 # Generated by $as_me.
29215 # Run this file to recreate the current configuration.
29216 # Compiler output produced by configure, useful for debugging
29217 # configure, is in config.log if it exists.
29219 debug=false
29220 ac_cs_recheck=false
29221 ac_cs_silent=false
29223 SHELL=\${CONFIG_SHELL-$SHELL}
29224 export SHELL
29225 _ASEOF
29226 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29227 ## -------------------- ##
29228 ## M4sh Initialization. ##
29229 ## -------------------- ##
29231 # Be more Bourne compatible
29232 DUALCASE=1; export DUALCASE # for MKS sh
29233 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29234 emulate sh
29235 NULLCMD=:
29236 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29237 # is contrary to our usage. Disable this feature.
29238 alias -g '${1+"$@"}'='"$@"'
29239 setopt NO_GLOB_SUBST
29240 else
29241 case `(set -o) 2>/dev/null` in #(
29242 *posix*) :
29243 set -o posix ;; #(
29244 *) :
29246 esac
29250 as_nl='
29252 export as_nl
29253 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29254 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29255 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29256 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29257 # Prefer a ksh shell builtin over an external printf program on Solaris,
29258 # but without wasting forks for bash or zsh.
29259 if test -z "$BASH_VERSION$ZSH_VERSION" \
29260 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29261 as_echo='print -r --'
29262 as_echo_n='print -rn --'
29263 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29264 as_echo='printf %s\n'
29265 as_echo_n='printf %s'
29266 else
29267 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29268 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29269 as_echo_n='/usr/ucb/echo -n'
29270 else
29271 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29272 as_echo_n_body='eval
29273 arg=$1;
29274 case $arg in #(
29275 *"$as_nl"*)
29276 expr "X$arg" : "X\\(.*\\)$as_nl";
29277 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29278 esac;
29279 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29281 export as_echo_n_body
29282 as_echo_n='sh -c $as_echo_n_body as_echo'
29284 export as_echo_body
29285 as_echo='sh -c $as_echo_body as_echo'
29288 # The user is always right.
29289 if test "${PATH_SEPARATOR+set}" != set; then
29290 PATH_SEPARATOR=:
29291 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29292 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29293 PATH_SEPARATOR=';'
29298 # IFS
29299 # We need space, tab and new line, in precisely that order. Quoting is
29300 # there to prevent editors from complaining about space-tab.
29301 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29302 # splitting by setting IFS to empty value.)
29303 IFS=" "" $as_nl"
29305 # Find who we are. Look in the path if we contain no directory separator.
29306 case $0 in #((
29307 *[\\/]* ) as_myself=$0 ;;
29308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29309 for as_dir in $PATH
29311 IFS=$as_save_IFS
29312 test -z "$as_dir" && as_dir=.
29313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29314 done
29315 IFS=$as_save_IFS
29318 esac
29319 # We did not find ourselves, most probably we were run as `sh COMMAND'
29320 # in which case we are not to be found in the path.
29321 if test "x$as_myself" = x; then
29322 as_myself=$0
29324 if test ! -f "$as_myself"; then
29325 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29326 exit 1
29329 # Unset variables that we do not need and which cause bugs (e.g. in
29330 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29331 # suppresses any "Segmentation fault" message there. '((' could
29332 # trigger a bug in pdksh 5.2.14.
29333 for as_var in BASH_ENV ENV MAIL MAILPATH
29334 do eval test x\${$as_var+set} = xset \
29335 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29336 done
29337 PS1='$ '
29338 PS2='> '
29339 PS4='+ '
29341 # NLS nuisances.
29342 LC_ALL=C
29343 export LC_ALL
29344 LANGUAGE=C
29345 export LANGUAGE
29347 # CDPATH.
29348 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29351 # as_fn_error ERROR [LINENO LOG_FD]
29352 # ---------------------------------
29353 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29354 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29355 # script with status $?, using 1 if that was 0.
29356 as_fn_error ()
29358 as_status=$?; test $as_status -eq 0 && as_status=1
29359 if test "$3"; then
29360 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29361 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
29363 $as_echo "$as_me: error: $1" >&2
29364 as_fn_exit $as_status
29365 } # as_fn_error
29368 # as_fn_set_status STATUS
29369 # -----------------------
29370 # Set $? to STATUS, without forking.
29371 as_fn_set_status ()
29373 return $1
29374 } # as_fn_set_status
29376 # as_fn_exit STATUS
29377 # -----------------
29378 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29379 as_fn_exit ()
29381 set +e
29382 as_fn_set_status $1
29383 exit $1
29384 } # as_fn_exit
29386 # as_fn_unset VAR
29387 # ---------------
29388 # Portably unset VAR.
29389 as_fn_unset ()
29391 { eval $1=; unset $1;}
29393 as_unset=as_fn_unset
29394 # as_fn_append VAR VALUE
29395 # ----------------------
29396 # Append the text in VALUE to the end of the definition contained in VAR. Take
29397 # advantage of any shell optimizations that allow amortized linear growth over
29398 # repeated appends, instead of the typical quadratic growth present in naive
29399 # implementations.
29400 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29401 eval 'as_fn_append ()
29403 eval $1+=\$2
29405 else
29406 as_fn_append ()
29408 eval $1=\$$1\$2
29410 fi # as_fn_append
29412 # as_fn_arith ARG...
29413 # ------------------
29414 # Perform arithmetic evaluation on the ARGs, and store the result in the
29415 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29416 # must be portable across $(()) and expr.
29417 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29418 eval 'as_fn_arith ()
29420 as_val=$(( $* ))
29422 else
29423 as_fn_arith ()
29425 as_val=`expr "$@" || test $? -eq 1`
29427 fi # as_fn_arith
29430 if expr a : '\(a\)' >/dev/null 2>&1 &&
29431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29432 as_expr=expr
29433 else
29434 as_expr=false
29437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29438 as_basename=basename
29439 else
29440 as_basename=false
29443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29444 as_dirname=dirname
29445 else
29446 as_dirname=false
29449 as_me=`$as_basename -- "$0" ||
29450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29451 X"$0" : 'X\(//\)$' \| \
29452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29453 $as_echo X/"$0" |
29454 sed '/^.*\/\([^/][^/]*\)\/*$/{
29455 s//\1/
29458 /^X\/\(\/\/\)$/{
29459 s//\1/
29462 /^X\/\(\/\).*/{
29463 s//\1/
29466 s/.*/./; q'`
29468 # Avoid depending upon Character Ranges.
29469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29472 as_cr_digits='0123456789'
29473 as_cr_alnum=$as_cr_Letters$as_cr_digits
29475 ECHO_C= ECHO_N= ECHO_T=
29476 case `echo -n x` in #(((((
29477 -n*)
29478 case `echo 'xy\c'` in
29479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29480 xy) ECHO_C='\c';;
29481 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29482 ECHO_T=' ';;
29483 esac;;
29485 ECHO_N='-n';;
29486 esac
29488 rm -f conf$$ conf$$.exe conf$$.file
29489 if test -d conf$$.dir; then
29490 rm -f conf$$.dir/conf$$.file
29491 else
29492 rm -f conf$$.dir
29493 mkdir conf$$.dir 2>/dev/null
29495 if (echo >conf$$.file) 2>/dev/null; then
29496 if ln -s conf$$.file conf$$ 2>/dev/null; then
29497 as_ln_s='ln -s'
29498 # ... but there are two gotchas:
29499 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29500 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29501 # In both cases, we have to default to `cp -p'.
29502 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29503 as_ln_s='cp -p'
29504 elif ln conf$$.file conf$$ 2>/dev/null; then
29505 as_ln_s=ln
29506 else
29507 as_ln_s='cp -p'
29509 else
29510 as_ln_s='cp -p'
29512 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29513 rmdir conf$$.dir 2>/dev/null
29516 # as_fn_mkdir_p
29517 # -------------
29518 # Create "$as_dir" as a directory, including parents if necessary.
29519 as_fn_mkdir_p ()
29522 case $as_dir in #(
29523 -*) as_dir=./$as_dir;;
29524 esac
29525 test -d "$as_dir" || eval $as_mkdir_p || {
29526 as_dirs=
29527 while :; do
29528 case $as_dir in #(
29529 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29530 *) as_qdir=$as_dir;;
29531 esac
29532 as_dirs="'$as_qdir' $as_dirs"
29533 as_dir=`$as_dirname -- "$as_dir" ||
29534 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29535 X"$as_dir" : 'X\(//\)[^/]' \| \
29536 X"$as_dir" : 'X\(//\)$' \| \
29537 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29538 $as_echo X"$as_dir" |
29539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29540 s//\1/
29543 /^X\(\/\/\)[^/].*/{
29544 s//\1/
29547 /^X\(\/\/\)$/{
29548 s//\1/
29551 /^X\(\/\).*/{
29552 s//\1/
29555 s/.*/./; q'`
29556 test -d "$as_dir" && break
29557 done
29558 test -z "$as_dirs" || eval "mkdir $as_dirs"
29559 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
29562 } # as_fn_mkdir_p
29563 if mkdir -p . 2>/dev/null; then
29564 as_mkdir_p='mkdir -p "$as_dir"'
29565 else
29566 test -d ./-p && rmdir ./-p
29567 as_mkdir_p=false
29570 if test -x / >/dev/null 2>&1; then
29571 as_test_x='test -x'
29572 else
29573 if ls -dL / >/dev/null 2>&1; then
29574 as_ls_L_option=L
29575 else
29576 as_ls_L_option=
29578 as_test_x='
29579 eval sh -c '\''
29580 if test -d "$1"; then
29581 test -d "$1/.";
29582 else
29583 case $1 in #(
29584 -*)set "./$1";;
29585 esac;
29586 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29587 ???[sx]*):;;*)false;;esac;fi
29588 '\'' sh
29591 as_executable_p=$as_test_x
29593 # Sed expression to map a string onto a valid CPP name.
29594 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29596 # Sed expression to map a string onto a valid variable name.
29597 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29600 exec 6>&1
29601 ## ----------------------------------- ##
29602 ## Main body of $CONFIG_STATUS script. ##
29603 ## ----------------------------------- ##
29604 _ASEOF
29605 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29607 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29608 # Save the log message, to keep $0 and so on meaningful, and to
29609 # report actual input values of CONFIG_FILES etc. instead of their
29610 # values after options handling.
29611 ac_log="
29612 This file was extended by emacs $as_me 24.3.50, which was
29613 generated by GNU Autoconf 2.65. Invocation command line was
29615 CONFIG_FILES = $CONFIG_FILES
29616 CONFIG_HEADERS = $CONFIG_HEADERS
29617 CONFIG_LINKS = $CONFIG_LINKS
29618 CONFIG_COMMANDS = $CONFIG_COMMANDS
29619 $ $0 $@
29621 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29624 _ACEOF
29626 case $ac_config_files in *"
29627 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29628 esac
29630 case $ac_config_headers in *"
29631 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29632 esac
29635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29636 # Files that config.status was made for.
29637 config_files="$ac_config_files"
29638 config_headers="$ac_config_headers"
29639 config_commands="$ac_config_commands"
29641 _ACEOF
29643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29644 ac_cs_usage="\
29645 \`$as_me' instantiates files and other configuration actions
29646 from templates according to the current configuration. Unless the files
29647 and actions are specified as TAGs, all are instantiated by default.
29649 Usage: $0 [OPTION]... [TAG]...
29651 -h, --help print this help, then exit
29652 -V, --version print version number and configuration settings, then exit
29653 --config print configuration, then exit
29654 -q, --quiet, --silent
29655 do not print progress messages
29656 -d, --debug don't remove temporary files
29657 --recheck update $as_me by reconfiguring in the same conditions
29658 --file=FILE[:TEMPLATE]
29659 instantiate the configuration file FILE
29660 --header=FILE[:TEMPLATE]
29661 instantiate the configuration header FILE
29663 Configuration files:
29664 $config_files
29666 Configuration headers:
29667 $config_headers
29669 Configuration commands:
29670 $config_commands
29672 Report bugs to the package provider."
29674 _ACEOF
29675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29676 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29677 ac_cs_version="\\
29678 emacs config.status 24.3.50
29679 configured by $0, generated by GNU Autoconf 2.65,
29680 with options \\"\$ac_cs_config\\"
29682 Copyright (C) 2009 Free Software Foundation, Inc.
29683 This config.status script is free software; the Free Software Foundation
29684 gives unlimited permission to copy, distribute and modify it."
29686 ac_pwd='$ac_pwd'
29687 srcdir='$srcdir'
29688 INSTALL='$INSTALL'
29689 MKDIR_P='$MKDIR_P'
29690 AWK='$AWK'
29691 test -n "\$AWK" || AWK=awk
29692 _ACEOF
29694 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29695 # The default lists apply if the user does not specify any file.
29696 ac_need_defaults=:
29697 while test $# != 0
29699 case $1 in
29700 --*=*)
29701 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29702 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29703 ac_shift=:
29706 ac_option=$1
29707 ac_optarg=$2
29708 ac_shift=shift
29710 esac
29712 case $ac_option in
29713 # Handling of the options.
29714 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29715 ac_cs_recheck=: ;;
29716 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29717 $as_echo "$ac_cs_version"; exit ;;
29718 --config | --confi | --conf | --con | --co | --c )
29719 $as_echo "$ac_cs_config"; exit ;;
29720 --debug | --debu | --deb | --de | --d | -d )
29721 debug=: ;;
29722 --file | --fil | --fi | --f )
29723 $ac_shift
29724 case $ac_optarg in
29725 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29726 esac
29727 as_fn_append CONFIG_FILES " '$ac_optarg'"
29728 ac_need_defaults=false;;
29729 --header | --heade | --head | --hea )
29730 $ac_shift
29731 case $ac_optarg in
29732 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29733 esac
29734 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29735 ac_need_defaults=false;;
29736 --he | --h)
29737 # Conflict between --help and --header
29738 as_fn_error "ambiguous option: \`$1'
29739 Try \`$0 --help' for more information.";;
29740 --help | --hel | -h )
29741 $as_echo "$ac_cs_usage"; exit ;;
29742 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29743 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29744 ac_cs_silent=: ;;
29746 # This is an error.
29747 -*) as_fn_error "unrecognized option: \`$1'
29748 Try \`$0 --help' for more information." ;;
29750 *) as_fn_append ac_config_targets " $1"
29751 ac_need_defaults=false ;;
29753 esac
29754 shift
29755 done
29757 ac_configure_extra_args=
29759 if $ac_cs_silent; then
29760 exec 6>/dev/null
29761 ac_configure_extra_args="$ac_configure_extra_args --silent"
29764 _ACEOF
29765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29766 if \$ac_cs_recheck; then
29767 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29768 shift
29769 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29770 CONFIG_SHELL='$SHELL'
29771 export CONFIG_SHELL
29772 exec "\$@"
29775 _ACEOF
29776 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29777 exec 5>>config.log
29779 echo
29780 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29781 ## Running $as_me. ##
29782 _ASBOX
29783 $as_echo "$ac_log"
29784 } >&5
29786 _ACEOF
29787 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29789 # INIT-COMMANDS
29791 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29792 GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
29794 _ACEOF
29796 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29798 # Handling of arguments.
29799 for ac_config_target in $ac_config_targets
29801 case $ac_config_target in
29802 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
29803 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29804 "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" ;;
29805 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
29806 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
29807 "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" ;;
29808 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29809 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29810 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
29811 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
29812 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
29813 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
29814 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
29815 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
29816 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
29817 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
29818 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
29819 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
29820 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
29821 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
29822 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
29823 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
29824 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
29825 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
29827 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29828 esac
29829 done
29832 # If the user did not use the arguments to specify the items to instantiate,
29833 # then the envvar interface is used. Set only those that are not.
29834 # We use the long form for the default assignment because of an extremely
29835 # bizarre bug on SunOS 4.1.3.
29836 if $ac_need_defaults; then
29837 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29838 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29839 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29842 # Have a temporary directory for convenience. Make it in the build tree
29843 # simply because there is no reason against having it here, and in addition,
29844 # creating and moving files from /tmp can sometimes cause problems.
29845 # Hook for its removal unless debugging.
29846 # Note that there is a small window in which the directory will not be cleaned:
29847 # after its creation but before its name has been assigned to `$tmp'.
29848 $debug ||
29850 tmp=
29851 trap 'exit_status=$?
29852 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
29854 trap 'as_fn_exit 1' 1 2 13 15
29856 # Create a (secure) tmp directory for tmp files.
29859 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29860 test -n "$tmp" && test -d "$tmp"
29861 } ||
29863 tmp=./conf$$-$RANDOM
29864 (umask 077 && mkdir "$tmp")
29865 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
29867 # Set up the scripts for CONFIG_FILES section.
29868 # No need to generate them if there are no CONFIG_FILES.
29869 # This happens for instance with `./config.status config.h'.
29870 if test -n "$CONFIG_FILES"; then
29872 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
29873 ac_cs_awk_getline=:
29874 ac_cs_awk_pipe_init=
29875 ac_cs_awk_read_file='
29876 while ((getline aline < (F[key])) > 0)
29877 print(aline)
29878 close(F[key])'
29879 ac_cs_awk_pipe_fini=
29880 else
29881 ac_cs_awk_getline=false
29882 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
29883 ac_cs_awk_read_file='
29884 print "|#_!!_#|"
29885 print "cat " F[key] " &&"
29886 '$ac_cs_awk_pipe_init
29887 # The final `:' finishes the AND list.
29888 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
29890 ac_cr=`echo X | tr X '\015'`
29891 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29892 # But we know of no other shell where ac_cr would be empty at this
29893 # point, so we can use a bashism as a fallback.
29894 if test "x$ac_cr" = x; then
29895 eval ac_cr=\$\'\\r\'
29897 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29898 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29899 ac_cs_awk_cr='\r'
29900 else
29901 ac_cs_awk_cr=$ac_cr
29904 echo 'BEGIN {' >"$tmp/subs1.awk" &&
29905 _ACEOF
29907 # Create commands to substitute file output variables.
29909 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
29910 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
29911 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
29912 echo "_ACAWK" &&
29913 echo "_ACEOF"
29914 } >conf$$files.sh &&
29915 . ./conf$$files.sh ||
29916 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29917 rm -f conf$$files.sh
29920 echo "cat >conf$$subs.awk <<_ACEOF" &&
29921 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29922 echo "_ACEOF"
29923 } >conf$$subs.sh ||
29924 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29925 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
29926 ac_delim='%!_!# '
29927 for ac_last_try in false false false false false :; do
29928 . ./conf$$subs.sh ||
29929 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29931 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29932 if test $ac_delim_n = $ac_delim_num; then
29933 break
29934 elif $ac_last_try; then
29935 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29936 else
29937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29939 done
29940 rm -f conf$$subs.sh
29942 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29943 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
29944 _ACEOF
29945 sed -n '
29947 s/^/S["/; s/!.*/"]=/
29950 s/^[^!]*!//
29951 :repl
29952 t repl
29953 s/'"$ac_delim"'$//
29954 t delim
29957 s/\(.\{148\}\)..*/\1/
29958 t more1
29959 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29962 b repl
29963 :more1
29964 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29967 s/.\{148\}//
29968 t nl
29969 :delim
29971 s/\(.\{148\}\)..*/\1/
29972 t more2
29973 s/["\\]/\\&/g; s/^/"/; s/$/"/
29976 :more2
29977 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29980 s/.\{148\}//
29981 t delim
29982 ' <conf$$subs.awk | sed '
29983 /^[^""]/{
29985 s/\n//
29987 ' >>$CONFIG_STATUS || ac_write_fail=1
29988 rm -f conf$$subs.awk
29989 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29990 _ACAWK
29991 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
29992 for (key in S) S_is_set[key] = 1
29993 FS = "\a"
29994 \$ac_cs_awk_pipe_init
29997 line = $ 0
29998 nfields = split(line, field, "@")
29999 substed = 0
30000 len = length(field[1])
30001 for (i = 2; i < nfields; i++) {
30002 key = field[i]
30003 keylen = length(key)
30004 if (S_is_set[key]) {
30005 value = S[key]
30006 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30007 len += length(value) + length(field[++i])
30008 substed = 1
30009 } else
30010 len += 1 + keylen
30012 if (nfields == 3 && !substed) {
30013 key = field[2]
30014 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30015 \$ac_cs_awk_read_file
30016 next
30019 print line
30021 \$ac_cs_awk_pipe_fini
30022 _ACAWK
30023 _ACEOF
30024 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30025 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30026 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30027 else
30029 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30030 || as_fn_error "could not setup config files machinery" "$LINENO" 5
30031 _ACEOF
30033 # VPATH may cause trouble with some makes, so we remove $(srcdir),
30034 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30035 # trailing colons and then remove the whole line if VPATH becomes empty
30036 # (actually we leave an empty line to preserve line numbers).
30037 if test "x$srcdir" = x.; then
30038 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30039 s/:*\$(srcdir):*/:/
30040 s/:*\${srcdir}:*/:/
30041 s/:*@srcdir@:*/:/
30042 s/^\([^=]*=[ ]*\):*/\1/
30043 s/:*$//
30044 s/^[^=]*=[ ]*$//
30048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30049 fi # test -n "$CONFIG_FILES"
30051 # Set up the scripts for CONFIG_HEADERS section.
30052 # No need to generate them if there are no CONFIG_HEADERS.
30053 # This happens for instance with `./config.status Makefile'.
30054 if test -n "$CONFIG_HEADERS"; then
30055 cat >"$tmp/defines.awk" <<\_ACAWK ||
30056 BEGIN {
30057 _ACEOF
30059 # Transform confdefs.h into an awk script `defines.awk', embedded as
30060 # here-document in config.status, that substitutes the proper values into
30061 # config.h.in to produce config.h.
30063 # Create a delimiter string that does not exist in confdefs.h, to ease
30064 # handling of long lines.
30065 ac_delim='%!_!# '
30066 for ac_last_try in false false :; do
30067 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30068 if test -z "$ac_t"; then
30069 break
30070 elif $ac_last_try; then
30071 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
30072 else
30073 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30075 done
30077 # For the awk script, D is an array of macro values keyed by name,
30078 # likewise P contains macro parameters if any. Preserve backslash
30079 # newline sequences.
30081 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30082 sed -n '
30083 s/.\{148\}/&'"$ac_delim"'/g
30084 t rset
30085 :rset
30086 s/^[ ]*#[ ]*define[ ][ ]*/ /
30087 t def
30089 :def
30090 s/\\$//
30091 t bsnl
30092 s/["\\]/\\&/g
30093 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30094 D["\1"]=" \3"/p
30095 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30097 :bsnl
30098 s/["\\]/\\&/g
30099 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30100 D["\1"]=" \3\\\\\\n"\\/p
30101 t cont
30102 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30103 t cont
30105 :cont
30107 s/.\{148\}/&'"$ac_delim"'/g
30108 t clear
30109 :clear
30110 s/\\$//
30111 t bsnlc
30112 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30114 :bsnlc
30115 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30116 b cont
30117 ' <confdefs.h | sed '
30118 s/'"$ac_delim"'/"\\\
30119 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30121 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30122 for (key in D) D_is_set[key] = 1
30123 FS = "\a"
30125 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30126 line = \$ 0
30127 split(line, arg, " ")
30128 if (arg[1] == "#") {
30129 defundef = arg[2]
30130 mac1 = arg[3]
30131 } else {
30132 defundef = substr(arg[1], 2)
30133 mac1 = arg[2]
30135 split(mac1, mac2, "(") #)
30136 macro = mac2[1]
30137 prefix = substr(line, 1, index(line, defundef) - 1)
30138 if (D_is_set[macro]) {
30139 # Preserve the white space surrounding the "#".
30140 print prefix "define", macro P[macro] D[macro]
30141 next
30142 } else {
30143 # Replace #undef with comments. This is necessary, for example,
30144 # in the case of _POSIX_SOURCE, which is predefined and required
30145 # on some systems where configure will not decide to define it.
30146 if (defundef == "undef") {
30147 print "/*", prefix defundef, macro, "*/"
30148 next
30152 { print }
30153 _ACAWK
30154 _ACEOF
30155 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30156 as_fn_error "could not setup config headers machinery" "$LINENO" 5
30157 fi # test -n "$CONFIG_HEADERS"
30160 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30161 shift
30162 for ac_tag
30164 case $ac_tag in
30165 :[FHLC]) ac_mode=$ac_tag; continue;;
30166 esac
30167 case $ac_mode$ac_tag in
30168 :[FHL]*:*);;
30169 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
30170 :[FH]-) ac_tag=-:-;;
30171 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30172 esac
30173 ac_save_IFS=$IFS
30174 IFS=:
30175 set x $ac_tag
30176 IFS=$ac_save_IFS
30177 shift
30178 ac_file=$1
30179 shift
30181 case $ac_mode in
30182 :L) ac_source=$1;;
30183 :[FH])
30184 ac_file_inputs=
30185 for ac_f
30187 case $ac_f in
30188 -) ac_f="$tmp/stdin";;
30189 *) # Look for the file first in the build tree, then in the source tree
30190 # (if the path is not absolute). The absolute path cannot be DOS-style,
30191 # because $ac_f cannot contain `:'.
30192 test -f "$ac_f" ||
30193 case $ac_f in
30194 [\\/$]*) false;;
30195 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30196 esac ||
30197 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30198 esac
30199 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30200 as_fn_append ac_file_inputs " '$ac_f'"
30201 done
30203 # Let's still pretend it is `configure' which instantiates (i.e., don't
30204 # use $as_me), people would be surprised to read:
30205 # /* config.h. Generated by config.status. */
30206 configure_input='Generated from '`
30207 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30208 `' by configure.'
30209 if test x"$ac_file" != x-; then
30210 configure_input="$ac_file. $configure_input"
30211 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30212 $as_echo "$as_me: creating $ac_file" >&6;}
30214 # Neutralize special characters interpreted by sed in replacement strings.
30215 case $configure_input in #(
30216 *\&* | *\|* | *\\* )
30217 ac_sed_conf_input=`$as_echo "$configure_input" |
30218 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30219 *) ac_sed_conf_input=$configure_input;;
30220 esac
30222 case $ac_tag in
30223 *:-:* | *:-) cat >"$tmp/stdin" \
30224 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
30225 esac
30227 esac
30229 ac_dir=`$as_dirname -- "$ac_file" ||
30230 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30231 X"$ac_file" : 'X\(//\)[^/]' \| \
30232 X"$ac_file" : 'X\(//\)$' \| \
30233 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30234 $as_echo X"$ac_file" |
30235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30236 s//\1/
30239 /^X\(\/\/\)[^/].*/{
30240 s//\1/
30243 /^X\(\/\/\)$/{
30244 s//\1/
30247 /^X\(\/\).*/{
30248 s//\1/
30251 s/.*/./; q'`
30252 as_dir="$ac_dir"; as_fn_mkdir_p
30253 ac_builddir=.
30255 case "$ac_dir" in
30256 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30258 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30259 # A ".." for each directory in $ac_dir_suffix.
30260 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30261 case $ac_top_builddir_sub in
30262 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30263 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30264 esac ;;
30265 esac
30266 ac_abs_top_builddir=$ac_pwd
30267 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30268 # for backward compatibility:
30269 ac_top_builddir=$ac_top_build_prefix
30271 case $srcdir in
30272 .) # We are building in place.
30273 ac_srcdir=.
30274 ac_top_srcdir=$ac_top_builddir_sub
30275 ac_abs_top_srcdir=$ac_pwd ;;
30276 [\\/]* | ?:[\\/]* ) # Absolute name.
30277 ac_srcdir=$srcdir$ac_dir_suffix;
30278 ac_top_srcdir=$srcdir
30279 ac_abs_top_srcdir=$srcdir ;;
30280 *) # Relative name.
30281 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30282 ac_top_srcdir=$ac_top_build_prefix$srcdir
30283 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30284 esac
30285 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30288 case $ac_mode in
30291 # CONFIG_FILE
30294 case $INSTALL in
30295 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30296 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30297 esac
30298 ac_MKDIR_P=$MKDIR_P
30299 case $MKDIR_P in
30300 [\\/$]* | ?:[\\/]* ) ;;
30301 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30302 esac
30303 _ACEOF
30305 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30306 # If the template does not know about datarootdir, expand it.
30307 # FIXME: This hack should be removed a few years after 2.60.
30308 ac_datarootdir_hack=; ac_datarootdir_seen=
30309 ac_sed_dataroot='
30310 /datarootdir/ {
30314 /@datadir@/p
30315 /@docdir@/p
30316 /@infodir@/p
30317 /@localedir@/p
30318 /@mandir@/p'
30319 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30320 *datarootdir*) ac_datarootdir_seen=yes;;
30321 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30323 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30324 _ACEOF
30325 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30326 ac_datarootdir_hack='
30327 s&@datadir@&$datadir&g
30328 s&@docdir@&$docdir&g
30329 s&@infodir@&$infodir&g
30330 s&@localedir@&$localedir&g
30331 s&@mandir@&$mandir&g
30332 s&\\\${datarootdir}&$datarootdir&g' ;;
30333 esac
30334 _ACEOF
30336 # Neutralize VPATH when `$srcdir' = `.'.
30337 # Shell code in configure.ac might set extrasub.
30338 # FIXME: do we really want to maintain this feature?
30339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30340 ac_sed_extra="$ac_vpsub
30341 $extrasub
30342 _ACEOF
30343 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30345 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30346 s|@configure_input@|$ac_sed_conf_input|;t t
30347 s&@top_builddir@&$ac_top_builddir_sub&;t t
30348 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30349 s&@srcdir@&$ac_srcdir&;t t
30350 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30351 s&@top_srcdir@&$ac_top_srcdir&;t t
30352 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30353 s&@builddir@&$ac_builddir&;t t
30354 s&@abs_builddir@&$ac_abs_builddir&;t t
30355 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30356 s&@INSTALL@&$ac_INSTALL&;t t
30357 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30358 $ac_datarootdir_hack
30360 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30361 if $ac_cs_awk_getline; then
30362 $AWK -f "$tmp/subs.awk"
30363 else
30364 $AWK -f "$tmp/subs.awk" | $SHELL
30365 fi >$tmp/out \
30366 || as_fn_error "could not create $ac_file" "$LINENO" 5
30368 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30369 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30370 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30371 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30372 which seems to be undefined. Please make sure it is defined." >&5
30373 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30374 which seems to be undefined. Please make sure it is defined." >&2;}
30376 rm -f "$tmp/stdin"
30377 case $ac_file in
30378 -) cat "$tmp/out" && rm -f "$tmp/out";;
30379 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30380 esac \
30381 || as_fn_error "could not create $ac_file" "$LINENO" 5
30385 # CONFIG_HEADER
30387 if test x"$ac_file" != x-; then
30389 $as_echo "/* $configure_input */" \
30390 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30391 } >"$tmp/config.h" \
30392 || as_fn_error "could not create $ac_file" "$LINENO" 5
30393 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30394 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30395 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30396 else
30397 rm -f "$ac_file"
30398 mv "$tmp/config.h" "$ac_file" \
30399 || as_fn_error "could not create $ac_file" "$LINENO" 5
30401 else
30402 $as_echo "/* $configure_input */" \
30403 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30404 || as_fn_error "could not create -" "$LINENO" 5
30406 # Compute "$ac_file"'s index in $config_headers.
30407 _am_arg="$ac_file"
30408 _am_stamp_count=1
30409 for _am_header in $config_headers :; do
30410 case $_am_header in
30411 $_am_arg | $_am_arg:* )
30412 break ;;
30414 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30415 esac
30416 done
30417 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30418 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30419 X"$_am_arg" : 'X\(//\)[^/]' \| \
30420 X"$_am_arg" : 'X\(//\)$' \| \
30421 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30422 $as_echo X"$_am_arg" |
30423 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30424 s//\1/
30427 /^X\(\/\/\)[^/].*/{
30428 s//\1/
30431 /^X\(\/\/\)$/{
30432 s//\1/
30435 /^X\(\/\).*/{
30436 s//\1/
30439 s/.*/./; q'`/stamp-h$_am_stamp_count
30442 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30443 $as_echo "$as_me: executing $ac_file commands" >&6;}
30445 esac
30448 case $ac_file$ac_mode in
30449 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30450 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30451 # are listed without --file. Let's play safe and only enable the eval
30452 # if we detect the quoting.
30453 case $CONFIG_FILES in
30454 *\'*) eval set x "$CONFIG_FILES" ;;
30455 *) set x $CONFIG_FILES ;;
30456 esac
30457 shift
30458 for mf
30460 # Strip MF so we end up with the name of the file.
30461 mf=`echo "$mf" | sed -e 's/:.*$//'`
30462 # Check whether this is an Automake generated Makefile or not.
30463 # We used to match only the files named `Makefile.in', but
30464 # some people rename them; so instead we look at the file content.
30465 # Grep'ing the first line is not enough: some people post-process
30466 # each Makefile.in and add a new line on top of each file to say so.
30467 # Grep'ing the whole file is not good either: AIX grep has a line
30468 # limit of 2048, but all sed's we know have understand at least 4000.
30469 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30470 dirpart=`$as_dirname -- "$mf" ||
30471 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30472 X"$mf" : 'X\(//\)[^/]' \| \
30473 X"$mf" : 'X\(//\)$' \| \
30474 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30475 $as_echo X"$mf" |
30476 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30477 s//\1/
30480 /^X\(\/\/\)[^/].*/{
30481 s//\1/
30484 /^X\(\/\/\)$/{
30485 s//\1/
30488 /^X\(\/\).*/{
30489 s//\1/
30492 s/.*/./; q'`
30493 else
30494 continue
30496 # Extract the definition of DEPDIR, am__include, and am__quote
30497 # from the Makefile without running `make'.
30498 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30499 test -z "$DEPDIR" && continue
30500 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30501 test -z "am__include" && continue
30502 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30503 # When using ansi2knr, U may be empty or an underscore; expand it
30504 U=`sed -n 's/^U = //p' < "$mf"`
30505 # Find all dependency output files, they are included files with
30506 # $(DEPDIR) in their names. We invoke sed twice because it is the
30507 # simplest approach to changing $(DEPDIR) to its actual value in the
30508 # expansion.
30509 for file in `sed -n "
30510 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30511 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30512 # Make sure the directory exists.
30513 test -f "$dirpart/$file" && continue
30514 fdir=`$as_dirname -- "$file" ||
30515 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30516 X"$file" : 'X\(//\)[^/]' \| \
30517 X"$file" : 'X\(//\)$' \| \
30518 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30519 $as_echo X"$file" |
30520 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30521 s//\1/
30524 /^X\(\/\/\)[^/].*/{
30525 s//\1/
30528 /^X\(\/\/\)$/{
30529 s//\1/
30532 /^X\(\/\).*/{
30533 s//\1/
30536 s/.*/./; q'`
30537 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30538 # echo "creating $dirpart/$file"
30539 echo '# dummy' > "$dirpart/$file"
30540 done
30541 done
30544 "src/epaths.h":C)
30545 if test "${opsys}" = "mingw32"; then
30546 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30547 else
30548 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30551 "src/.gdbinit":C)
30552 if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
30553 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
30557 esac
30558 done # for ac_tag
30561 as_fn_exit 0
30562 _ACEOF
30563 ac_clean_files=$ac_clean_files_save
30565 test $ac_write_fail = 0 ||
30566 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
30569 # configure is writing to config.log, and then calls config.status.
30570 # config.status does its own redirection, appending to config.log.
30571 # Unfortunately, on DOS this fails, as config.log is still kept open
30572 # by configure, so config.status won't be able to write to it; its
30573 # output is simply discarded. So we exec the FD to /dev/null,
30574 # effectively closing config.log, so it can be properly (re)opened and
30575 # appended to by config.status. When coming back to configure, we
30576 # need to make the FD available again.
30577 if test "$no_create" != yes; then
30578 ac_cs_success=:
30579 ac_config_status_args=
30580 test "$silent" = yes &&
30581 ac_config_status_args="$ac_config_status_args --quiet"
30582 exec 5>/dev/null
30583 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30584 exec 5>>config.log
30585 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30586 # would make configure fail if this is the last instruction.
30587 $ac_cs_success || as_fn_exit $?
30589 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30591 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}